@file-viewer/vue3 3.2.0 → 3.2.2

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.mjs CHANGED
@@ -4097,7 +4097,7 @@ var bi = [
4097
4097
  containerVersions: ["EPSF/DSC PostScript", "Adobe PostScript programs"],
4098
4098
  knownLimits: [
4099
4099
  "Stet WASM renders pages in a terminable Worker with latest-wins interactive requests and bounded source size, VM memory, page count, dimensions, pixels, DPI, total print working set, and retained canvas cache",
4100
- "The distributed runtime excludes upstream URW Base35 and Ghostscript CMYK ICC assets; Carlito, Tinos, Cousine, and Noto Sans Symbols 2 OFL substitutes plus the PLRM DeviceCMYK formula fallback can differ in metrics and color from Adobe applications",
4100
+ "The unpatched Stet runtime embeds URW Base35 fonts under OFL-1.1 and the Compact ICC Profiles CGATS001Compat-v2-micro CMYK profile under CC0; document-specific fonts and print conditions can still differ from Adobe applications",
4101
4101
  "This experimental path is not claimed to implement every Adobe PostScript Level 3 operator, font technology, color-management workflow, or printer device"
4102
4102
  ],
4103
4103
  capabilities: {
@@ -5088,17 +5088,18 @@ var oa = [
5088
5088
  return r(l(), e == null ? i == null ? void 0 : i() : e);
5089
5089
  }
5090
5090
  };
5091
- }, Ra = (e) => e ? n(n({}, e), {}, {
5091
+ }, Z = (e) => e ? n(n({}, e), {}, {
5092
+ spreadsheet: e.spreadsheet ? n(n({}, e.spreadsheet), {}, { range: e.spreadsheet.range ? n({}, e.spreadsheet.range) : void 0 }) : void 0,
5092
5093
  zoom: e.zoom ? n({}, e.zoom) : void 0,
5093
5094
  scroll: e.scroll ? n({}, e.scroll) : void 0,
5094
5095
  navigation: e.navigation ? n({}, e.navigation) : void 0,
5095
5096
  extra: e.extra ? n({}, e.extra) : void 0
5096
- }) : null, za = (e, t = {}) => ({
5097
- state: Ra(e) || {},
5097
+ }) : null, Ra = (e, t = {}) => ({
5098
+ state: Z(e) || {},
5098
5099
  action: t.action || "init",
5099
5100
  source: t.source || "viewer",
5100
5101
  timestamp: t.timestamp || Date.now()
5101
- }), Ba = () => {
5102
+ }), za = () => {
5102
5103
  let e = /* @__PURE__ */ new Set();
5103
5104
  return {
5104
5105
  emit(t) {
@@ -5110,15 +5111,15 @@ var oa = [
5110
5111
  };
5111
5112
  }
5112
5113
  };
5113
- }, Va = (e) => {
5114
+ }, Ba = (e) => {
5114
5115
  var t;
5115
5116
  return ((t = e.ownerDocument) == null ? void 0 : t.defaultView) || (typeof window < "u" ? window : void 0);
5116
- }, Ha = (e) => {
5117
- let t = Va(e);
5117
+ }, Va = (e) => {
5118
+ let t = Ba(e);
5118
5119
  return new Promise((e) => {
5119
5120
  t != null && t.requestAnimationFrame ? t.requestAnimationFrame(() => e()) : setTimeout(e, 16);
5120
5121
  });
5121
- }, Ua = (e) => {
5122
+ }, Ha = (e) => {
5122
5123
  let t = Math.max(0, e.scrollHeight - e.clientHeight), n = Math.max(0, e.scrollWidth - e.clientWidth);
5123
5124
  return {
5124
5125
  top: e.scrollTop || 0,
@@ -5130,24 +5131,24 @@ var oa = [
5130
5131
  topRatio: t > 0 ? (e.scrollTop || 0) / t : 0,
5131
5132
  leftRatio: n > 0 ? (e.scrollLeft || 0) / n : 0
5132
5133
  };
5133
- }, Wa = (e, t, n) => {
5134
+ }, Ua = (e, t, n) => {
5134
5135
  if (Number.isFinite(e)) return Number(e);
5135
5136
  if (Number.isFinite(t)) return Number(t) * n;
5136
- }, Ga = ({ host: e, renderer: n, scrollTarget: r }) => {
5137
+ }, Wa = ({ host: e, renderer: n, scrollTarget: r }) => {
5137
5138
  var i, s;
5138
- let c = Ba(), u = Va(e), d = !1, f = 0, p = 0, h = null, g = () => typeof r == "function" ? r() || e : r || la(e) || e, _ = () => a(e), v = () => {
5139
+ let c = za(), u = Ba(e), d = !1, f = 0, p = 0, h = null, g = () => typeof r == "function" ? r() || e : r || la(e) || e, _ = () => a(e), v = () => {
5139
5140
  var e, t;
5140
5141
  let r = (t = (e = _()) == null ? void 0 : e.getState) == null ? void 0 : t.call(e), i = g();
5141
5142
  return {
5142
5143
  renderer: n,
5143
5144
  scale: r == null ? void 0 : r.scale,
5144
5145
  zoom: r,
5145
- scroll: i ? Ua(i) : void 0
5146
+ scroll: i ? Ha(i) : void 0
5146
5147
  };
5147
5148
  }, y = (e, t = "viewer") => {
5148
5149
  if (d) return v();
5149
5150
  let n = v();
5150
- return c.emit(za(n, {
5151
+ return c.emit(Ra(n, {
5151
5152
  action: e,
5152
5153
  source: t
5153
5154
  })), n;
@@ -5155,7 +5156,7 @@ var oa = [
5155
5156
  p = Math.max(p, Date.now() + 180);
5156
5157
  }, x = (e) => {
5157
5158
  if (!e) return;
5158
- let t = g(), n = Math.max(0, t.scrollHeight - t.clientHeight), r = Math.max(0, t.scrollWidth - t.clientWidth), i = Wa(e.top, e.topRatio, n), a = Wa(e.left, e.leftRatio, r);
5159
+ let t = g(), n = Math.max(0, t.scrollHeight - t.clientHeight), r = Math.max(0, t.scrollWidth - t.clientWidth), i = Ua(e.top, e.topRatio, n), a = Ua(e.left, e.leftRatio, r);
5159
5160
  b(), i !== void 0 && (t.scrollTop = Math.min(Math.max(0, i), n)), a !== void 0 && (t.scrollLeft = Math.min(Math.max(0, a), r));
5160
5161
  }, S = function() {
5161
5162
  var n = t(function* (t) {
@@ -5188,7 +5189,7 @@ var oa = [
5188
5189
  reason: "unmeasurable",
5189
5190
  provider: "view-state"
5190
5191
  };
5191
- b(), yield o.setZoom(h), yield Ha(e);
5192
+ b(), yield o.setZoom(h), yield Va(e);
5192
5193
  let v = y("fit", t.source);
5193
5194
  return {
5194
5195
  applied: !0,
@@ -5213,7 +5214,7 @@ var oa = [
5213
5214
  return t(function* (t, n = {}) {
5214
5215
  var r, i;
5215
5216
  let a = n.source || "api", o = n.action || "restore", s = n.notify !== !1, c = _(), l = Number((r = t.scale) == null ? (i = t.zoom) == null ? void 0 : i.scale : r);
5216
- return b(), Number.isFinite(l) && c != null && c.setZoom && (yield c.setZoom(l)), yield Ha(e), x(t.scroll), yield Ha(e), x(t.scroll), s ? y(o, a) : v();
5217
+ return b(), Number.isFinite(l) && c != null && c.setZoom && (yield c.setZoom(l)), yield Va(e), x(t.scroll), yield Va(e), x(t.scroll), s ? y(o, a) : v();
5217
5218
  }).apply(this, arguments);
5218
5219
  },
5219
5220
  fit: S,
@@ -5233,21 +5234,21 @@ var oa = [
5233
5234
  d = !0, h == null || h(), h = null, f && u != null && u.cancelAnimationFrame && u.cancelAnimationFrame(f), f = 0, (t = e.removeEventListener) == null || t.call(e, "scroll", C, !0), o(e);
5234
5235
  }
5235
5236
  };
5236
- }, Ka = (e) => {
5237
+ }, Ga = (e) => {
5237
5238
  var t, n;
5238
5239
  return ((n = (t = e == null ? void 0 : e.ownerDocument) == null ? void 0 : t.defaultView) == null ? void 0 : n.MutationObserver) || (typeof MutationObserver < "u" ? MutationObserver : void 0);
5239
- }, qa = ({ root: e, enabled: r, onChange: i }) => {
5240
- let a = null, o = null, s = null, c = null, l = () => {
5240
+ }, Ka = ({ root: e, enabled: r, onChange: i }) => {
5241
+ let a = null, o = null, s = null, c = null, l = 0, u = !1, d = () => {
5241
5242
  var e;
5242
- return Ra(((e = a == null ? void 0 : a.getState) == null ? void 0 : e.call(a)) || null);
5243
- }, u = (e, t) => (c = Ra(e), t && c && (i == null || i(n(n({}, t), {}, { state: Ra(t.state) || c }))), Ra(c)), d = () => (o == null || o(), o = null, a = null, u(null)), f = () => {
5243
+ return Z(((e = a == null ? void 0 : a.getState) == null ? void 0 : e.call(a)) || null);
5244
+ }, f = (e, t) => (c = Z(e), t && c && (i == null || i(n(n({}, t), {}, { state: Z(t.state) || c }))), Z(c)), p = () => (l += 1, o == null || o(), o = null, a = null, f(null)), m = () => {
5244
5245
  var t;
5245
- if ((r == null ? void 0 : r()) === !1) return d(), null;
5246
+ if (u || (r == null ? void 0 : r()) === !1) return p(), null;
5246
5247
  let n = h(e());
5247
- return n !== a && (o == null || o(), a = n, o = ((t = n == null ? void 0 : n.subscribe) == null ? void 0 : t.call(n, (e) => {
5248
- u(e.state, e);
5249
- })) || null), u(l()), n;
5250
- }, p = () => {
5248
+ return n !== a && (l += 1, o == null || o(), a = n, o = ((t = n == null ? void 0 : n.subscribe) == null ? void 0 : t.call(n, (e) => {
5249
+ u || a !== n || f(e.state, e);
5250
+ })) || null), f(d()), n;
5251
+ }, g = () => {
5251
5252
  s == null || s.disconnect(), s = null;
5252
5253
  };
5253
5254
  return {
@@ -5255,53 +5256,53 @@ var oa = [
5255
5256
  return a;
5256
5257
  },
5257
5258
  get state() {
5258
- return Ra(c);
5259
+ return Z(c);
5259
5260
  },
5260
5261
  hasProvider() {
5261
- return !!f();
5262
+ return !!m();
5262
5263
  },
5263
- refreshProvider: f,
5264
+ refreshProvider: m,
5264
5265
  observe() {
5265
- p();
5266
- let t = e(), n = Ka(t);
5266
+ g();
5267
+ let t = e(), n = Ga(t);
5267
5268
  !t || !n || (s = new n(() => {
5268
- f();
5269
+ m();
5269
5270
  }), s.observe(t, {
5270
5271
  childList: !0,
5271
5272
  subtree: !0
5272
- })), f();
5273
+ })), m();
5273
5274
  },
5274
- clearProvider: d,
5275
+ clearProvider: p,
5275
5276
  getState() {
5276
- return f(), Ra(c);
5277
+ return m(), Z(c);
5277
5278
  },
5278
5279
  applyState(e, n) {
5279
5280
  return t(function* () {
5280
- let t = f();
5281
- if (!(t != null && t.applyState)) return Ra(c);
5282
- let r = yield t.applyState(e, n);
5283
- return u(r || t.getState()), Ra(c);
5281
+ let t = m();
5282
+ if (!(t != null && t.applyState)) return Z(c);
5283
+ let r = ++l, i = yield t.applyState(Z(e) || {}, n);
5284
+ return u || t !== m() ? Z(c) : r === l ? (f(i || t.getState()), Z(c)) : Z(i || t.getState());
5284
5285
  })();
5285
5286
  },
5286
5287
  destroy() {
5287
- p(), d();
5288
+ u = !0, g(), p();
5288
5289
  }
5289
5290
  };
5290
- }, Ja = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Ya = (e) => `url("data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}")`, Xa = (e, t, n, r) => Math.min(r, Math.max(n, typeof e == "number" && Number.isFinite(e) ? e : t)), Za = (e) => e ? e === !0 ? {
5291
+ }, qa = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Ja = (e) => `url("data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}")`, Ya = (e, t, n, r) => Math.min(r, Math.max(n, typeof e == "number" && Number.isFinite(e) ? e : t)), Xa = (e) => e ? e === !0 ? {
5291
5292
  enabled: !0,
5292
5293
  text: "Flyfish Viewer"
5293
- } : e.enabled === !1 || !e.text && !e.image ? null : n({ enabled: !0 }, e) : null, Qa = (e) => {
5294
- let t = Xa(e.gapX, 260, 96, 800), n = Xa(e.gapY, 180, 80, 800), r = Xa(e.width, e.image ? 160 : 220, 32, t), i = Xa(e.height, (e.image, 72), 24, n), a = Xa(e.rotate, -24, -75, 75), o = Xa(e.opacity, .18, .02, .8), s = (t - r) / 2, c = (n - i) / 2, l = t / 2, u = n / 2;
5295
- if (e.image) return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}" viewBox="0 0 ${t} ${n}"><g opacity="${o}" transform="rotate(${a} ${l} ${u})"><image href="${Ja(e.image)}" x="${s}" y="${c}" width="${r}" height="${i}" preserveAspectRatio="xMidYMid meet"/></g></svg>`;
5296
- let d = Ja(e.text || "Flyfish Viewer"), f = Xa(e.fontSize, 20, 10, 72);
5297
- return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}" viewBox="0 0 ${t} ${n}"><g opacity="${o}" transform="rotate(${a} ${l} ${u})"><text x="${l}" y="${u}" text-anchor="middle" dominant-baseline="middle" fill="${Ja(e.color || "#355070")}" font-family="${Ja(e.fontFamily || "Aptos, 'Segoe UI', sans-serif")}" font-size="${f}" font-weight="700">${d}</text></g></svg>`;
5294
+ } : e.enabled === !1 || !e.text && !e.image ? null : n({ enabled: !0 }, e) : null, Za = (e) => {
5295
+ let t = Ya(e.gapX, 260, 96, 800), n = Ya(e.gapY, 180, 80, 800), r = Ya(e.width, e.image ? 160 : 220, 32, t), i = Ya(e.height, (e.image, 72), 24, n), a = Ya(e.rotate, -24, -75, 75), o = Ya(e.opacity, .18, .02, .8), s = (t - r) / 2, c = (n - i) / 2, l = t / 2, u = n / 2;
5296
+ if (e.image) return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}" viewBox="0 0 ${t} ${n}"><g opacity="${o}" transform="rotate(${a} ${l} ${u})"><image href="${qa(e.image)}" x="${s}" y="${c}" width="${r}" height="${i}" preserveAspectRatio="xMidYMid meet"/></g></svg>`;
5297
+ let d = qa(e.text || "Flyfish Viewer"), f = Ya(e.fontSize, 20, 10, 72);
5298
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}" viewBox="0 0 ${t} ${n}"><g opacity="${o}" transform="rotate(${a} ${l} ${u})"><text x="${l}" y="${u}" text-anchor="middle" dominant-baseline="middle" fill="${qa(e.color || "#355070")}" font-family="${qa(e.fontFamily || "Aptos, 'Segoe UI', sans-serif")}" font-size="${f}" font-weight="700">${d}</text></g></svg>`;
5299
+ }, Qa = (e) => {
5300
+ let t = Xa(e);
5301
+ return t ? Ja(Za(t)) : "";
5298
5302
  }, $a = (e) => {
5299
- let t = Za(e);
5300
- return t ? Ya(Qa(t)) : "";
5301
- }, eo = (e) => {
5302
- let t = $a(e);
5303
+ let t = Qa(e);
5303
5304
  return t ? `position:absolute;inset:0;pointer-events:none;background-image:${t};background-repeat:repeat;z-index:20;` : "";
5304
- }, to = Object.freeze({
5305
+ }, eo = Object.freeze({
5305
5306
  download: !1,
5306
5307
  print: !1,
5307
5308
  exportHtml: !1,
@@ -5309,20 +5310,20 @@ var oa = [
5309
5310
  zoomIn: !1,
5310
5311
  zoomOut: !1,
5311
5312
  zoomReset: !1
5312
- }), no = (e) => e === !0 || e === "adapter" || e === "provider", ro = (e, t) => {
5313
+ }), to = (e) => e === !0 || e === "adapter" || e === "provider", no = (e, t) => {
5313
5314
  var r, i, a, o, s, c, l, u;
5314
- if (!e) return n({}, to);
5315
+ if (!e) return n({}, eo);
5315
5316
  let d = {
5316
5317
  download: ((r = e.capabilities) == null ? void 0 : r.download) !== !1,
5317
- print: no((i = e.capabilities) == null ? void 0 : i.print),
5318
- exportHtml: no((a = e.capabilities) == null ? void 0 : a.exportHtml),
5319
- zoom: no((o = e.capabilities) == null ? void 0 : o.zoom),
5320
- zoomIn: no((s = e.capabilities) == null ? void 0 : s.zoom),
5321
- zoomOut: no((c = e.capabilities) == null ? void 0 : c.zoom),
5322
- zoomReset: no((l = e.capabilities) == null ? void 0 : l.zoom)
5318
+ print: to((i = e.capabilities) == null ? void 0 : i.print),
5319
+ exportHtml: to((a = e.capabilities) == null ? void 0 : a.exportHtml),
5320
+ zoom: to((o = e.capabilities) == null ? void 0 : o.zoom),
5321
+ zoomIn: to((s = e.capabilities) == null ? void 0 : s.zoom),
5322
+ zoomOut: to((c = e.capabilities) == null ? void 0 : c.zoom),
5323
+ zoomReset: to((l = e.capabilities) == null ? void 0 : l.zoom)
5323
5324
  };
5324
5325
  return n(n({}, d), (u = t == null ? void 0 : t.getAvailability) == null ? void 0 : u.call(t));
5325
- }, io = (e, t) => {
5326
+ }, ro = (e, t) => {
5326
5327
  let r = e.zoom && (t.canZoomIn || t.canZoomOut || t.canReset);
5327
5328
  return n(n({}, e), {}, {
5328
5329
  zoom: r,
@@ -5330,54 +5331,54 @@ var oa = [
5330
5331
  zoomOut: r && t.canZoomOut,
5331
5332
  zoomReset: r && t.canReset
5332
5333
  });
5333
- }, ao = (e) => n(n({}, to), {}, { download: X(e).length > 0 });
5334
+ }, io = (e) => n(n({}, eo), {}, { download: X(e).length > 0 });
5334
5335
  [...Ei, ...Di], [...wi, ...Ti];
5335
5336
  //#endregion
5336
5337
  //#region ../../core/dist/viewer/operations.js
5337
- var oo = [
5338
+ var ao = [
5338
5339
  "download",
5339
5340
  "filename",
5340
5341
  "beforeOperation",
5341
5342
  "i18n"
5342
- ], so = [
5343
+ ], oo = [
5343
5344
  "autoPrint",
5344
5345
  "beforeOperation",
5345
5346
  "i18n",
5346
5347
  "openWindow",
5347
5348
  "printAvailable",
5348
5349
  "printWindow"
5349
- ], co = "file-viewer-preview", lo = "preview", uo = Oi, fo = (e) => e && "name" in e && typeof e.name == "string" ? e.name : "", po = (e) => e && typeof e.type == "string" ? e.type : "", mo = ({ buffer: e = null, file: t = null, url: n = null, filename: r = null, mimeType: i = null } = {}) => ({
5350
+ ], so = "file-viewer-preview", co = "preview", lo = Oi, uo = (e) => e && "name" in e && typeof e.name == "string" ? e.name : "", fo = (e) => e && typeof e.type == "string" ? e.type : "", po = ({ buffer: e = null, file: t = null, url: n = null, filename: r = null, mimeType: i = null } = {}) => ({
5350
5351
  buffer: e,
5351
5352
  file: t,
5352
5353
  url: n,
5353
5354
  filename: r,
5354
- mimeType: i || po(t) || null
5355
- }), ho = (e, t = lo) => (e == null ? void 0 : e.filename) || t, go = (e, t = lo) => {
5355
+ mimeType: i || fo(t) || null
5356
+ }), mo = (e, t = co) => (e == null ? void 0 : e.filename) || t, ho = (e, t = co) => {
5356
5357
  var n;
5357
- return mo({
5358
+ return po({
5358
5359
  buffer: e == null ? void 0 : e.buffer,
5359
5360
  file: e == null ? void 0 : e.file,
5360
5361
  url: e == null ? void 0 : e.url,
5361
- filename: ho(e, t),
5362
+ filename: mo(e, t),
5362
5363
  mimeType: (n = e == null ? void 0 : e.file) == null ? void 0 : n.type
5363
5364
  });
5364
- }, _o = (e, t = "preview") => e.filename || fo(e.file) || t, vo = ({ filename: e, source: t, fallback: n = co }) => e || (t ? _o(t, "") : "") || n, yo = (e) => !!e.buffer || !!e.file || !!e.url, bo = function() {
5365
+ }, go = (e, t = "preview") => e.filename || uo(e.file) || t, _o = ({ filename: e, source: t, fallback: n = so }) => e || (t ? go(t, "") : "") || n, vo = (e) => !!e.buffer || !!e.file || !!e.url, yo = function() {
5365
5366
  var e = t(function* (e, t) {
5366
5367
  return e ? yield e(t) : !0;
5367
5368
  });
5368
5369
  return function(t, n) {
5369
5370
  return e.apply(this, arguments);
5370
5371
  };
5371
- }(), xo = function() {
5372
+ }(), bo = function() {
5372
5373
  var e = t(function* (e, { source: t, title: n, filename: r, adapter: i = null, watermarkInlineStyle: a, mask: o = null, i18n: s }) {
5373
5374
  if (!t) throw Error(w(s, "error.noExportContent"));
5374
5375
  let { buildFileViewerRenderedHtmlDocument: c } = yield import("./components/export2.js");
5375
5376
  return c({
5376
5377
  source: t,
5377
5378
  mode: e,
5378
- title: vo({
5379
+ title: _o({
5379
5380
  filename: n || r,
5380
- fallback: co
5381
+ fallback: so
5381
5382
  }),
5382
5383
  adapter: i,
5383
5384
  watermarkInlineStyle: a,
@@ -5387,16 +5388,16 @@ var oo = [
5387
5388
  return function(t, n) {
5388
5389
  return e.apply(this, arguments);
5389
5390
  };
5390
- }(), So = function() {
5391
+ }(), xo = function() {
5391
5392
  var e = t(function* ({ source: e, title: t, filename: n, adapter: r = null, watermarkInlineStyle: i, mask: a = null, i18n: o }) {
5392
5393
  if (!e) throw Error(w(o, "error.noExportContent"));
5393
5394
  let { buildFileViewerRenderedDomDocument: s } = yield import("./components/export2.js");
5394
5395
  return s({
5395
5396
  source: e,
5396
5397
  mode: "print",
5397
- title: vo({
5398
+ title: _o({
5398
5399
  filename: t || n,
5399
- fallback: co
5400
+ fallback: so
5400
5401
  }),
5401
5402
  adapter: r,
5402
5403
  watermarkInlineStyle: i,
@@ -5406,13 +5407,13 @@ var oo = [
5406
5407
  return function(t) {
5407
5408
  return e.apply(this, arguments);
5408
5409
  };
5409
- }(), Co = (e, t) => {
5410
+ }(), So = (e, t) => {
5410
5411
  let n = e.importNode(t, !0), r = e.documentElement;
5411
5412
  r ? r.replaceWith(n) : e.append(n), e.doctype || e.insertBefore(e.implementation.createDocumentType("html", "", ""), n);
5412
- }, wo = "<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"></head><body></body></html>", To = function() {
5413
+ }, Co = "<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"></head><body></body></html>", wo = function() {
5413
5414
  var e = t(function* (e) {
5414
5415
  if (e.document.compatMode === "CSS1Compat") return;
5415
- let t = e, n = t.URL.createObjectURL(new t.Blob([wo], { type: "text/html;charset=utf-8" }));
5416
+ let t = e, n = t.URL.createObjectURL(new t.Blob([Co], { type: "text/html;charset=utf-8" }));
5416
5417
  try {
5417
5418
  yield new Promise((t, r) => {
5418
5419
  let i = !1, a = () => {
@@ -5427,36 +5428,36 @@ var oo = [
5427
5428
  return function(t) {
5428
5429
  return e.apply(this, arguments);
5429
5430
  };
5430
- }(), Eo = function() {
5431
+ }(), To = function() {
5431
5432
  var e = t(function* ({ source: e, filename: t, beforeOperation: n, i18n: r, throwOnMissingSource: i = !0 }) {
5432
5433
  var a;
5433
- if (!yo(e)) {
5434
+ if (!vo(e)) {
5434
5435
  if (i) throw Error(w(r, "error.noDownloadSource"));
5435
5436
  return !1;
5436
5437
  }
5437
- if (!(yield bo(n, "download"))) return !1;
5438
- let o = vo({
5438
+ if (!(yield yo(n, "download"))) return !1;
5439
+ let o = _o({
5439
5440
  filename: t,
5440
5441
  source: e,
5441
- fallback: uo
5442
+ fallback: lo
5442
5443
  });
5443
5444
  return e.buffer && (e.buffer.byteLength > 0 || !e.file && !e.url) ? (y(new Blob([e.buffer], { type: e.mimeType || ((a = e.file) == null ? void 0 : a.type) || "application/octet-stream" }), o), !0) : e.file && (e.file.size > 0 || !e.url) ? (y(e.file, o), !0) : e.url ? (S(e.url, o), !0) : e.file ? (y(e.file, o), !0) : (y(new Blob([e.buffer], { type: e.mimeType || "application/octet-stream" }), o), !0);
5444
5445
  });
5445
5446
  return function(t) {
5446
5447
  return e.apply(this, arguments);
5447
5448
  };
5448
- }(), Do = function() {
5449
+ }(), Eo = function() {
5449
5450
  var e = t(function* (e) {
5450
- let { download: t = !0, filename: r, beforeOperation: i, i18n: a } = e, o = Ft(e, oo);
5451
- if (!(yield bo(i, "export-html"))) return "";
5452
- let s = yield xo("export", n(n({}, o), {}, {
5451
+ let { download: t = !0, filename: r, beforeOperation: i, i18n: a } = e, o = Ft(e, ao);
5452
+ if (!(yield yo(i, "export-html"))) return "";
5453
+ let s = yield bo("export", n(n({}, o), {}, {
5453
5454
  filename: r,
5454
5455
  i18n: a
5455
5456
  }));
5456
5457
  if (t !== !1) {
5457
- let e = vo({
5458
+ let e = _o({
5458
5459
  filename: r || o.title,
5459
- fallback: lo
5460
+ fallback: co
5460
5461
  });
5461
5462
  y(new Blob([s], { type: "text/html;charset=utf-8" }), `${e}.rendered.html`);
5462
5463
  }
@@ -5465,9 +5466,9 @@ var oo = [
5465
5466
  return function(t) {
5466
5467
  return e.apply(this, arguments);
5467
5468
  };
5468
- }(), Oo = function() {
5469
+ }(), Do = function() {
5469
5470
  var e = t(function* (e) {
5470
- let { autoPrint: t = !0, beforeOperation: r, i18n: i, openWindow: a, printAvailable: o = !0, printWindow: s } = e, c = Ft(e, so);
5471
+ let { autoPrint: t = !0, beforeOperation: r, i18n: i, openWindow: a, printAvailable: o = !0, printWindow: s } = e, c = Ft(e, oo);
5471
5472
  if (!o) throw Error(w(i, "error.printUnavailable"));
5472
5473
  let l = !r || r("print");
5473
5474
  if (l === !1) return !1;
@@ -5475,8 +5476,8 @@ var oo = [
5475
5476
  if (!d) throw Error(w(i, "error.printWindowBlocked"));
5476
5477
  try {
5477
5478
  if (!(yield l)) return u && d.close(), !1;
5478
- let e = yield So(n(n({}, c), {}, { i18n: i }));
5479
- return yield To(d), Co(d.document, e), d.focus(), yield x(d), t !== !1 && d.print(), !0;
5479
+ let e = yield xo(n(n({}, c), {}, { i18n: i }));
5480
+ return yield wo(d), So(d.document, e), d.focus(), yield x(d), t !== !1 && d.print(), !0;
5480
5481
  } catch (e) {
5481
5482
  throw u && d.close(), e;
5482
5483
  }
@@ -5484,27 +5485,27 @@ var oo = [
5484
5485
  return function(t) {
5485
5486
  return e.apply(this, arguments);
5486
5487
  };
5487
- }(), ko = ["phase"], Ao = {
5488
+ }(), Oo = ["phase"], ko = {
5488
5489
  "load-start": "onLoadStart",
5489
5490
  "load-complete": "onLoadComplete",
5490
5491
  "unload-start": "onUnloadStart",
5491
5492
  "unload-complete": "onUnloadComplete"
5492
- }, jo = [
5493
+ }, Ao = [
5493
5494
  "zoom-in",
5494
5495
  "zoom-out",
5495
5496
  "zoom-reset"
5496
- ], Mo = {
5497
+ ], jo = {
5497
5498
  canZoomIn: "zoom-in",
5498
5499
  canZoomOut: "zoom-out",
5499
5500
  canReset: "zoom-reset"
5500
- }, No = [
5501
+ }, Mo = [
5501
5502
  "search",
5502
5503
  "zoom",
5503
5504
  "download",
5504
5505
  "print",
5505
5506
  "exportHtml",
5506
5507
  "theme"
5507
- ], Po = ({ phase: e, version: t, source: n, filename: r, file: i, url: a, size: o, bufferSize: s, startedAt: c, duration: l, timestamp: u, reason: d }) => {
5508
+ ], No = ({ phase: e, version: t, source: n, filename: r, file: i, url: a, size: o, bufferSize: s, startedAt: c, duration: l, timestamp: u, reason: d }) => {
5508
5509
  var f;
5509
5510
  let p = ji((i == null ? void 0 : i.name) || r || a || ""), m = u == null ? Date.now() : u;
5510
5511
  return {
@@ -5520,9 +5521,9 @@ var oo = [
5520
5521
  duration: l == null ? e === "load-complete" && typeof c == "number" ? m - c : void 0 : l,
5521
5522
  reason: d
5522
5523
  };
5523
- }, Fo = ({ phase: e, source: t, version: n, startedAt: r, timestamp: i, reason: a }) => {
5524
+ }, Po = ({ phase: e, source: t, version: n, startedAt: r, timestamp: i, reason: a }) => {
5524
5525
  let o = i == null ? Date.now() : i;
5525
- return Po({
5526
+ return No({
5526
5527
  phase: e,
5527
5528
  filename: t.filename,
5528
5529
  source: t.kind,
@@ -5534,8 +5535,8 @@ var oo = [
5534
5535
  duration: e.endsWith("complete") && typeof r == "number" ? o - r : void 0,
5535
5536
  reason: a
5536
5537
  });
5537
- }, Io = (e, t, r = Date.now(), i) => {
5538
- let { phase: a } = t, o = Ft(t, ko);
5538
+ }, Fo = (e, t, r = Date.now(), i) => {
5539
+ let { phase: a } = t, o = Ft(t, Oo);
5539
5540
  return n(n({}, o), {}, {
5540
5541
  operation: e,
5541
5542
  label: w(i, {
@@ -5548,9 +5549,9 @@ var oo = [
5548
5549
  }[e]),
5549
5550
  timestamp: r
5550
5551
  });
5551
- }, Lo = (e) => Ao[e], Ro = function() {
5552
+ }, Io = (e) => ko[e], Lo = function() {
5552
5553
  var e = t(function* (e, t, n) {
5553
- let r = t == null ? void 0 : t[Lo(e.phase)];
5554
+ let r = t == null ? void 0 : t[Io(e.phase)];
5554
5555
  if (r) try {
5555
5556
  yield r(e);
5556
5557
  } catch (t) {
@@ -5560,7 +5561,7 @@ var oo = [
5560
5561
  return function(t, n, r) {
5561
5562
  return e.apply(this, arguments);
5562
5563
  };
5563
- }(), zo = (e, t) => {
5564
+ }(), Ro = (e, t) => {
5564
5565
  let n = e == null ? void 0 : e.toolbar;
5565
5566
  if (!n || typeof n != "object") return [e == null ? void 0 : e.beforeOperation];
5566
5567
  let r = t === "download" ? n.beforeDownload : t === "print" ? n.beforePrint : t === "export-html" ? n.beforeExportHtml : void 0;
@@ -5569,22 +5570,22 @@ var oo = [
5569
5570
  n.beforeOperation,
5570
5571
  r
5571
5572
  ];
5572
- }, Bo = (e, t) => (e == null ? void 0 : e[t]) !== !1, Vo = (e, t) => !e || typeof e != "object" || Bo(e.permissions, t), Ho = (e, t) => Bo(e.items, t) && Bo(e.permissions, t), Uo = (e) => {
5573
+ }, zo = (e, t) => (e == null ? void 0 : e[t]) !== !1, Bo = (e, t) => !e || typeof e != "object" || zo(e.permissions, t), Vo = (e, t) => zo(e.items, t) && zo(e.permissions, t), Ho = (e) => {
5573
5574
  if (e === "search" || e === "zoom" || e === "download" || e === "print") return e;
5574
5575
  if (e === "exportHtml" || e === "export-html") return "exportHtml";
5575
5576
  if (e === "theme") return "theme";
5576
- }, Wo = (e) => {
5577
+ }, Uo = (e) => {
5577
5578
  let t = [], n = /* @__PURE__ */ new Set(), r = (e) => {
5578
- let r = Uo(e);
5579
+ let r = Ho(e);
5579
5580
  r && !n.has(r) && (n.add(r), t.push(r));
5580
5581
  };
5581
- return Array.isArray(e == null ? void 0 : e.order) && e.order.forEach(r), No.forEach(r), t;
5582
- }, Go = (e) => jo.some((t) => Ho(e, t)), Ko = function() {
5582
+ return Array.isArray(e == null ? void 0 : e.order) && e.order.forEach(r), Mo.forEach(r), t;
5583
+ }, Wo = (e) => Ao.some((t) => Vo(e, t)), Go = function() {
5583
5584
  var e = t(function* ({ context: e, options: t, onBefore: n, onCancel: r, onError: i }) {
5584
5585
  n == null || n(e);
5585
5586
  try {
5586
- if (!Vo(t == null ? void 0 : t.toolbar, e.operation)) return r == null || r(e), !1;
5587
- for (let n of zo(t, e.operation)) if (n && (yield n(e)) === !1) return r == null || r(e), !1;
5587
+ if (!Bo(t == null ? void 0 : t.toolbar, e.operation)) return r == null || r(e), !1;
5588
+ for (let n of Ro(t, e.operation)) if (n && (yield n(e)) === !1) return r == null || r(e), !1;
5588
5589
  } catch (t) {
5589
5590
  return i == null || i(t, e), r == null || r(e), !1;
5590
5591
  }
@@ -5593,7 +5594,7 @@ var oo = [
5593
5594
  return function(t) {
5594
5595
  return e.apply(this, arguments);
5595
5596
  };
5596
- }(), qo = (e) => {
5597
+ }(), Ko = (e) => {
5597
5598
  let t = e == null ? void 0 : e.toolbar;
5598
5599
  return t === !1 ? {
5599
5600
  download: !1,
@@ -5602,15 +5603,15 @@ var oo = [
5602
5603
  zoom: !1,
5603
5604
  search: !1,
5604
5605
  theme: !1,
5605
- order: Wo(void 0)
5606
+ order: Uo(void 0)
5606
5607
  } : t && typeof t == "object" ? {
5607
- download: t.download !== !1 && Ho(t, "download"),
5608
- print: t.print !== !1 && Ho(t, "print"),
5609
- exportHtml: t.exportHtml !== !1 && Ho(t, "export-html"),
5610
- zoom: t.zoom !== !1 && Go(t),
5608
+ download: t.download !== !1 && Vo(t, "download"),
5609
+ print: t.print !== !1 && Vo(t, "print"),
5610
+ exportHtml: t.exportHtml !== !1 && Vo(t, "export-html"),
5611
+ zoom: t.zoom !== !1 && Wo(t),
5611
5612
  search: t.search !== !1,
5612
5613
  theme: t.theme !== !1,
5613
- order: Wo(t),
5614
+ order: Uo(t),
5614
5615
  items: t.items,
5615
5616
  permissions: t.permissions,
5616
5617
  position: t.position,
@@ -5625,25 +5626,25 @@ var oo = [
5625
5626
  zoom: !0,
5626
5627
  search: !0,
5627
5628
  theme: !0,
5628
- order: Wo(void 0)
5629
+ order: Uo(void 0)
5629
5630
  };
5630
- }, Jo = (e, t, n = !0) => ({
5631
+ }, qo = (e, t, n = !0) => ({
5631
5632
  download: e.download && t.download,
5632
5633
  print: e.print && t.print,
5633
5634
  exportHtml: e.exportHtml && t.exportHtml,
5634
5635
  zoom: e.zoom && t.zoom,
5635
5636
  search: e.search !== !1 && n,
5636
5637
  theme: e.theme !== !1
5637
- }), Yo = (e) => !!(e.download || e.print || e.exportHtml || e.zoom || e.search || e.theme), Xo = ({ toolbarDisabled: e = !1, availability: t, zoomState: n, action: r }) => {
5638
- let i = Mo[r], a = i === "zoom-in" ? t.zoomIn : i === "zoom-out" ? t.zoomOut : t.zoomReset;
5638
+ }), Jo = (e) => !!(e.download || e.print || e.exportHtml || e.zoom || e.search || e.theme), Yo = ({ toolbarDisabled: e = !1, availability: t, zoomState: n, action: r }) => {
5639
+ let i = jo[r], a = i === "zoom-in" ? t.zoomIn : i === "zoom-out" ? t.zoomOut : t.zoomReset;
5639
5640
  return e || !t.zoom || !a || !n[r];
5640
- }, Zo = (e, t) => {
5641
+ }, Xo = (e, t) => {
5641
5642
  let n = e == null ? void 0 : e.toolbar, r = n && typeof n == "object" ? n.position : "auto";
5642
5643
  return r === "top" || r === "top-center" || r === "bottom-right" ? r : t === "pdf" ? "bottom-right" : "top";
5643
- }, Qo = (e) => Vo(e == null ? void 0 : e.toolbar, "download") && Vo(e == null ? void 0 : e.toolbar, "export-html"), $o = ({ getOptions: e, isCurrent: r, beforeDownload: i }) => function() {
5644
+ }, Zo = (e) => Bo(e == null ? void 0 : e.toolbar, "download") && Bo(e == null ? void 0 : e.toolbar, "export-html"), Qo = ({ getOptions: e, isCurrent: r, beforeDownload: i }) => function() {
5644
5645
  var a = t(function* (t) {
5645
5646
  var a, o;
5646
- let s = () => r() && Qo(e());
5647
+ let s = () => r() && Zo(e());
5647
5648
  if (!s() || !(yield i()) || !s()) return !1;
5648
5649
  let c = (a = e()) == null ? void 0 : a.watermark, l = JSON.stringify(c), u = yield t(c && typeof c == "object" ? Object.freeze(n({}, c)) : c);
5649
5650
  return !s() || JSON.stringify((o = e()) == null ? void 0 : o.watermark) !== l ? !1 : (y(u.blob, u.filename), !0);
@@ -5651,21 +5652,21 @@ var oo = [
5651
5652
  return function(e) {
5652
5653
  return a.apply(this, arguments);
5653
5654
  };
5654
- }(), es = "__flyfish_file_viewer_auto_renderer_presets__", ts = () => {
5655
+ }(), $o = "__flyfish_file_viewer_auto_renderer_presets__", es = () => {
5655
5656
  let e = globalThis;
5656
- return e[es] || (e[es] = {
5657
+ return e[$o] || (e[$o] = {
5657
5658
  version: 0,
5658
5659
  presets: /* @__PURE__ */ new Map()
5659
- }), e[es];
5660
- }, ns = (e) => {
5660
+ }), e[$o];
5661
+ }, ts = (e) => {
5661
5662
  var t;
5662
5663
  return n(n({}, e), {}, {
5663
5664
  extensions: e.extensions.map(X),
5664
5665
  enhancesExtensions: (t = e.enhancesExtensions) == null ? void 0 : t.map(X)
5665
5666
  });
5666
- }, rs = (e = bi) => {
5667
+ }, ns = (e = bi) => {
5667
5668
  let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = (e) => {
5668
- let r = ns(e), i = t.get(r.id);
5669
+ let r = ts(e), i = t.get(r.id);
5669
5670
  i && i.extensions.forEach((e) => {
5670
5671
  var t;
5671
5672
  ((t = n.get(e)) == null ? void 0 : t.id) === i.id && n.delete(e);
@@ -5700,25 +5701,25 @@ var oo = [
5700
5701
  return Array.from(n.keys()).sort();
5701
5702
  }
5702
5703
  };
5703
- }, is = (e, t) => {
5704
+ }, rs = (e, t) => {
5704
5705
  let n = ji(t, "").toLowerCase();
5705
5706
  return n ? (e.filenamePatterns || []).some((e) => {
5706
5707
  let t = e.trim().toLowerCase();
5707
5708
  return t ? t.startsWith("*.") ? n.endsWith(t.slice(1)) : n === t : !1;
5708
5709
  }) : !1;
5709
- }, as = (e, t) => {
5710
- let n = t.filename ? e.list().find((e) => is(e, t.filename || "")) : void 0;
5710
+ }, is = (e, t) => {
5711
+ let n = t.filename ? e.list().find((e) => rs(e, t.filename || "")) : void 0;
5711
5712
  if (n) return n;
5712
5713
  let r = X(t.extension || Ai(t.filename || ""));
5713
5714
  return r ? e.getByExtension(r) : void 0;
5714
- }, os = (e, t) => {
5715
+ }, as = (e, t) => {
5715
5716
  var n, r;
5716
- let i = t.map(ns), a = /* @__PURE__ */ new Map();
5717
+ let i = t.map(ts), a = /* @__PURE__ */ new Map();
5717
5718
  i.forEach((e) => {
5718
5719
  a.set(e.id, e);
5719
5720
  });
5720
5721
  let o = /* @__PURE__ */ new Map();
5721
- for (let t of e.list().map(ns)) {
5722
+ for (let t of e.list().map(ts)) {
5722
5723
  let r = t.enhancesRendererId;
5723
5724
  if (!r || !((n = t.enhancesExtensions) != null && n.length)) continue;
5724
5725
  let i = new Set(t.extensions);
@@ -5762,25 +5763,25 @@ var oo = [
5762
5763
  claims: Array.from(o.values()),
5763
5764
  normalizedDefinitions: i
5764
5765
  };
5765
- }, ss = (e, t) => {
5766
- let { claims: r, normalizedDefinitions: i } = os(e, t), a = /* @__PURE__ */ new Map();
5766
+ }, os = (e, t) => {
5767
+ let { claims: r, normalizedDefinitions: i } = as(e, t), a = /* @__PURE__ */ new Map();
5767
5768
  r.forEach((e) => {
5768
5769
  let t = a.get(e.ownerId) || /* @__PURE__ */ new Set();
5769
5770
  t.add(e.extension), a.set(e.ownerId, t);
5770
5771
  });
5771
5772
  let o = (e) => {
5772
5773
  var t, r;
5773
- let i = ns(e), o = new Set(i.extensions);
5774
+ let i = ts(e), o = new Set(i.extensions);
5774
5775
  return (t = i.enhancesExtensions) == null || t.forEach((e) => o.add(e)), (r = a.get(i.id)) == null || r.forEach((e) => o.delete(e)), n(n({}, i), {}, { extensions: Array.from(o) });
5775
5776
  }, s = new Set(i.map((e) => e.id)), c = Array.from(a.keys()).filter((e) => !s.has(e)).map((t) => e.getById(t)).filter((e) => !!e).map(o), l = i.filter((e) => e.enhancesRendererId === void 0).map(o), u = i.filter((e) => e.enhancesRendererId !== void 0).map(o), d = [
5776
5777
  ...c,
5777
5778
  ...l,
5778
5779
  ...u
5779
- ], f = rs(e.list());
5780
+ ], f = ns(e.list());
5780
5781
  return d.forEach((e) => f.register(e)), { definitions: d };
5781
- }, cs = (e) => ({
5782
+ }, ss = (e) => ({
5782
5783
  register(t) {
5783
- ss(e, [t]).definitions.forEach((t) => e.register(t));
5784
+ os(e, [t]).definitions.forEach((t) => e.register(t));
5784
5785
  },
5785
5786
  unregister: (t) => e.unregister(t),
5786
5787
  getById: (t) => e.getById(t),
@@ -5788,25 +5789,25 @@ var oo = [
5788
5789
  hasExtension: (t) => e.hasExtension(t),
5789
5790
  list: () => e.list(),
5790
5791
  listExtensions: () => e.listExtensions()
5791
- }), ls = (e) => !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.renderers), us = (e) => e ? Array.isArray(e) ? e.flatMap((e) => us(e)) : ls(e) ? us(e.renderers) : [e] : [], ds = () => Array.from(ts().presets.values()).map((e) => e.input), fs = (e) => {
5792
+ }), cs = (e) => !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.renderers), ls = (e) => e ? Array.isArray(e) ? e.flatMap((e) => ls(e)) : cs(e) ? ls(e.renderers) : [e] : [], us = () => Array.from(es().presets.values()).map((e) => e.input), ds = (e) => {
5792
5793
  var t;
5793
- let n = ts(), r = n.presets.get(e);
5794
+ let n = es(), r = n.presets.get(e);
5794
5795
  if (r) return r.input;
5795
5796
  let i = e.startsWith("@file-viewer/preset-") ? e : `@file-viewer/preset-${e}`;
5796
5797
  return (t = Array.from(n.presets.values()).find((e) => e.packageName === i || e.id === i)) == null ? void 0 : t.input;
5797
- }, ps = () => ts().version, ms = (e) => e ? typeof e == "string" ? !0 : Array.isArray(e) ? e.some((e) => ms(e)) : !1 : !1, hs = (e) => {
5798
+ }, fs = () => es().version, ps = (e) => e ? typeof e == "string" ? !0 : Array.isArray(e) ? e.some((e) => ps(e)) : !1 : !1, ms = (e) => {
5798
5799
  if (!e) return [];
5799
5800
  if (typeof e == "string") {
5800
- let t = fs(e);
5801
+ let t = ds(e);
5801
5802
  return t ? [t] : [];
5802
5803
  }
5803
- return Array.isArray(e) ? e.flatMap((e) => hs(e)) : [e];
5804
- }, gs = function() {
5804
+ return Array.isArray(e) ? e.flatMap((e) => ms(e)) : [e];
5805
+ }, hs = function() {
5805
5806
  var e = t(function* ({ registry: e, plugins: t, registerHandler: n }) {
5806
5807
  var r, i;
5807
5808
  let a = Array.from(t);
5808
- ss(e, a.flatMap((e) => [...e.definitions || []])).definitions.forEach((t) => e.register(t));
5809
- let o = cs(e);
5809
+ os(e, a.flatMap((e) => [...e.definitions || []])).definitions.forEach((t) => e.register(t));
5810
+ let o = ss(e);
5810
5811
  for (let e of a) (r = e.handlers) == null || r.forEach((e) => {
5811
5812
  n == null || n(e);
5812
5813
  }), yield (i = e.install) == null ? void 0 : i.call(e, {
@@ -5818,9 +5819,9 @@ var oo = [
5818
5819
  return function(t) {
5819
5820
  return e.apply(this, arguments);
5820
5821
  };
5821
- }(), _s = (e) => {
5822
+ }(), gs = (e) => {
5822
5823
  if (e && typeof e == "object" && "actualRendererId" in e) return String(e.actualRendererId || "").trim() || void 0;
5823
- }, vs = ({ registry: e = rs(bi), handlers: t, fallbackHandler: n, fallbackKey: r = "error" }) => {
5824
+ }, _s = ({ registry: e = ns(bi), handlers: t, fallbackHandler: n, fallbackKey: r = "error" }) => {
5824
5825
  let i = Array.from(t).reduce((e, t) => (e.set(t.rendererId, t.handler), e), /* @__PURE__ */ new Map()), a = /* @__PURE__ */ new Map(), o = [];
5825
5826
  e.list().forEach((e) => {
5826
5827
  let t = i.get(e.id);
@@ -5844,28 +5845,28 @@ var oo = [
5844
5845
  return Array.from(a.keys()).sort();
5845
5846
  }
5846
5847
  };
5847
- }, ys = "fileViewerErrorMessage";
5848
+ }, vs = "fileViewerErrorMessage";
5848
5849
  Object.freeze({
5849
5850
  downloading: "正在下载文件资源...",
5850
5851
  streamingPdf: "正在建立 PDF 流式预览...",
5851
5852
  reading: "正在解析文件内容..."
5852
5853
  });
5853
- var bs = (e) => Object.freeze({
5854
+ var ys = (e) => Object.freeze({
5854
5855
  downloading: w(e, "preview.downloading"),
5855
5856
  streamingPdf: w(e, "preview.streamingPdf"),
5856
5857
  reading: w(e, "preview.reading")
5857
- }), xs = Object.freeze({
5858
+ }), bs = Object.freeze({
5858
5859
  accent: "#5f6f82",
5859
5860
  soft: "rgba(95, 111, 130, 0.12)",
5860
5861
  badge: "DOC",
5861
5862
  label: "文件内容",
5862
5863
  hint: "正在整理内容结构并生成预览。"
5863
- }), Ss = (e, t) => {
5864
+ }), xs = (e, t) => {
5864
5865
  let n = X(e);
5865
5866
  if (n) return `.${n}`;
5866
5867
  let r = C(t);
5867
5868
  return r === "zh-CN" ? "当前文件" : r === "ja-JP" ? "現在のファイル" : r === "de-DE" ? "aktuelle Datei" : "current file";
5868
- }, Cs = {
5869
+ }, Ss = {
5869
5870
  "office-word-openxml": "@file-viewer/renderer-word",
5870
5871
  "office-word-binary": "@file-viewer/renderer-word",
5871
5872
  "office-presentation-binary": "@file-viewer/renderer-presentation",
@@ -5892,7 +5893,7 @@ var bs = (e) => Object.freeze({
5892
5893
  video: "@file-viewer/renderer-media",
5893
5894
  audio: "@file-viewer/renderer-media",
5894
5895
  "data-asset": "@file-viewer/renderer-data"
5895
- }, ws = /* @__PURE__ */ new Set([
5896
+ }, Cs = /* @__PURE__ */ new Set([
5896
5897
  "office-word-openxml",
5897
5898
  "office-word-binary",
5898
5899
  "office-presentation-binary",
@@ -5901,13 +5902,13 @@ var bs = (e) => Object.freeze({
5901
5902
  "spreadsheet-openxml",
5902
5903
  "pdf",
5903
5904
  "ofd"
5904
- ]), Ts = /* @__PURE__ */ new Set([
5905
+ ]), ws = /* @__PURE__ */ new Set([
5905
5906
  "image",
5906
5907
  "markdown",
5907
5908
  "code",
5908
5909
  "video",
5909
5910
  "audio"
5910
- ]), Es = /* @__PURE__ */ new Set([
5911
+ ]), Ts = /* @__PURE__ */ new Set([
5911
5912
  "typst",
5912
5913
  "archive",
5913
5914
  "eda",
@@ -5917,15 +5918,15 @@ var bs = (e) => Object.freeze({
5917
5918
  "drawing",
5918
5919
  "mindmap",
5919
5920
  "data-asset"
5920
- ]), Ds = (e) => ws.has(e.id) ? {
5921
+ ]), Es = (e) => Cs.has(e.id) ? {
5921
5922
  packageName: "@file-viewer/preset-office",
5922
5923
  vitePreset: "office",
5923
5924
  label: "Office preset"
5924
- } : Es.has(e.id) ? {
5925
+ } : Ts.has(e.id) ? {
5925
5926
  packageName: "@file-viewer/preset-engineering",
5926
5927
  vitePreset: "engineering",
5927
5928
  label: "Engineering preset"
5928
- } : Ts.has(e.id) ? {
5929
+ } : ws.has(e.id) ? {
5929
5930
  packageName: "@file-viewer/preset-lite",
5930
5931
  vitePreset: "lite",
5931
5932
  label: "Lite preset"
@@ -5933,21 +5934,21 @@ var bs = (e) => Object.freeze({
5933
5934
  packageName: "@file-viewer/preset-all",
5934
5935
  vitePreset: "all",
5935
5936
  label: "Full preset"
5936
- }, Os = (e = "") => {
5937
+ }, Ds = (e = "") => {
5937
5938
  let t = X(e), n = bi.find((e) => e.extensions.map(X).includes(t));
5938
5939
  if (!n) return null;
5939
- let r = Ds(n);
5940
+ let r = Es(n);
5940
5941
  return {
5941
5942
  extension: t,
5942
5943
  rendererId: n.id,
5943
5944
  rendererLabel: n.label,
5944
5945
  rendererCategory: n.category,
5945
- rendererPackage: Cs[n.id],
5946
+ rendererPackage: Ss[n.id],
5946
5947
  presetPackage: r.packageName,
5947
5948
  vitePreset: r.vitePreset,
5948
5949
  presetLabel: r.label
5949
5950
  };
5950
- }, ks = ({ state: e, extension: t = "", title: n, message: r, description: i, theme: a = xs, recoverable: o }) => ({
5951
+ }, Os = ({ state: e, extension: t = "", title: n, message: r, description: i, theme: a = bs, recoverable: o }) => ({
5951
5952
  state: e,
5952
5953
  extension: X(t),
5953
5954
  title: n,
@@ -5955,11 +5956,11 @@ var bs = (e) => Object.freeze({
5955
5956
  description: i,
5956
5957
  theme: a,
5957
5958
  recoverable: o
5958
- }), As = (e = "", t = xs, n) => {
5959
- let r = Ss(e, n), i = Os(e);
5959
+ }), ks = (e = "", t = bs, n) => {
5960
+ let r = xs(e, n), i = Ds(e);
5960
5961
  if (i) {
5961
5962
  let a = C(n), o = i.rendererPackage ? a === "zh-CN" ? `;如果需要极致裁剪,也可以只安装 ${i.rendererPackage}` : a === "ja-JP" ? `;厳密に最小構成へ絞る場合は ${i.rendererPackage} のみをインストールすることもできます` : a === "de-DE" ? `; für eine strikt minimale Konfiguration installieren Sie nur ${i.rendererPackage}` : `; for a strict custom cut, install only ${i.rendererPackage}` : "";
5962
- return ks({
5963
+ return Os({
5963
5964
  state: "unsupported",
5964
5965
  extension: e,
5965
5966
  title: w(n, "state.unsupported.install.title"),
@@ -5978,7 +5979,7 @@ var bs = (e) => Object.freeze({
5978
5979
  recoverable: !0
5979
5980
  });
5980
5981
  }
5981
- return ks({
5982
+ return Os({
5982
5983
  state: "unsupported",
5983
5984
  extension: e,
5984
5985
  title: w(n, "state.unsupported.title"),
@@ -5987,7 +5988,7 @@ var bs = (e) => Object.freeze({
5987
5988
  theme: t,
5988
5989
  recoverable: !0
5989
5990
  });
5990
- }, js = {
5991
+ }, As = {
5991
5992
  "Blob is not available in the current execution environment.": "error.blobUnavailable",
5992
5993
  "Unsupported file source input.": "error.sourceUnsupported",
5993
5994
  "Failed to read file as ArrayBuffer.": "error.fileReadArrayBuffer",
@@ -6003,39 +6004,39 @@ var bs = (e) => Object.freeze({
6003
6004
  "OFD 文件解析失败": "ofd.error.parseFailed",
6004
6005
  "IndexedDB 不可用": "archive.error.indexedDbUnavailable",
6005
6006
  "Web Worker is not supported by this browser.": "archive.error.workerUnsupported"
6006
- }, Ms = (e, t) => {
6007
- let n = js[e.trim()];
6007
+ }, js = (e, t) => {
6008
+ let n = As[e.trim()];
6008
6009
  return n ? w(t, n) : e;
6009
- }, Ns = (e, t) => {
6010
+ }, Ms = (e, t) => {
6010
6011
  try {
6011
6012
  return e[t];
6012
6013
  } catch (e) {
6013
6014
  return;
6014
6015
  }
6015
- }, Ps = (e, t) => {
6016
+ }, Ns = (e, t) => {
6016
6017
  if (e && typeof e == "object") {
6017
- let n = Ns(e, ys);
6018
- if (typeof n == "string" && n.trim()) return Ms(n, t);
6018
+ let n = Ms(e, vs);
6019
+ if (typeof n == "string" && n.trim()) return js(n, t);
6019
6020
  }
6020
- if (e instanceof Error) return Ms(e.message, t);
6021
- if (typeof e == "string") return Ms(e, t);
6021
+ if (e instanceof Error) return js(e.message, t);
6022
+ if (typeof e == "string") return js(e, t);
6022
6023
  if (e == null) return w(t, "error.unknown");
6023
6024
  if (typeof e == "object") {
6024
- let n = Ns(e, "message");
6025
- if (typeof n == "string" && n.trim()) return Ms(n, t);
6026
- let r = Ns(e, "reason");
6027
- if (r !== void 0 && r !== e) return Ps(r, t);
6025
+ let n = Ms(e, "message");
6026
+ if (typeof n == "string" && n.trim()) return js(n, t);
6027
+ let r = Ms(e, "reason");
6028
+ if (r !== void 0 && r !== e) return Ns(r, t);
6028
6029
  }
6029
6030
  let n = String(e);
6030
6031
  return n === "[object Object]" ? w(t, "error.unknown") : n;
6031
- }, Fs = (e = "", t = void 0, n = xs, r) => ks({
6032
+ }, Ps = (e = "", t = void 0, n = bs, r) => Os({
6032
6033
  state: "error",
6033
6034
  extension: e,
6034
6035
  title: w(r, "state.error.title"),
6035
- message: Ps(t, r),
6036
+ message: Ns(t, r),
6036
6037
  theme: n,
6037
6038
  recoverable: !0
6038
- }), Is = "preview.pdf", Ls = () => {
6039
+ }), Fs = "preview.pdf", Is = () => {
6039
6040
  let e = 0, t = null;
6040
6041
  return {
6041
6042
  get version() {
@@ -6057,26 +6058,26 @@ var bs = (e) => Object.freeze({
6057
6058
  t == null || t.abort(), t = null;
6058
6059
  }
6059
6060
  };
6060
- }, Rs = (e = Ls()) => ({
6061
+ }, Ls = (e = Is()) => ({
6061
6062
  requestController: e,
6062
6063
  getCurrentVersion: () => e.version,
6063
6064
  isCurrentRequest: (t) => e.isCurrent(t)
6064
- }), zs = (e) => {
6065
+ }), Rs = (e) => {
6065
6066
  if (typeof DOMException < "u" && e instanceof DOMException && e.name === "AbortError") return !0;
6066
6067
  if (!e || typeof e != "object") return !1;
6067
6068
  let t = e;
6068
6069
  return t.__CANCEL__ === !0 || t.code === "ERR_CANCELED" || t.name === "AbortError" || t.name === "CanceledError";
6069
- }, Bs = ({ file: e, url: t } = {}) => !!e || !!t, Vs = (e = {}) => Bs(e) ? "replace" : "reset", Hs = /^[a-z][a-z0-9+.-]*:\/\//i, Us = /^[a-z][a-z0-9+.-]*:/i, Ws = (e) => {
6070
+ }, zs = ({ file: e, url: t } = {}) => !!e || !!t, Bs = (e = {}) => zs(e) ? "replace" : "reset", Vs = /^[a-z][a-z0-9+.-]*:\/\//i, Hs = /^[a-z][a-z0-9+.-]*:/i, Us = (e) => {
6070
6071
  let t = e.indexOf("?"), n = e.indexOf("#");
6071
6072
  return t === -1 ? n : n === -1 ? t : Math.min(t, n);
6072
- }, Gs = (e) => {
6073
+ }, Ws = (e) => {
6073
6074
  if (!e) return e;
6074
6075
  let t = e;
6075
6076
  try {
6076
6077
  t = decodeURIComponent(e);
6077
6078
  } catch (e) {}
6078
6079
  return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%40/gi, "@").replace(/%24/g, "$").replace(/%26/g, "&").replace(/%2B/gi, "+").replace(/%2C/gi, ",").replace(/%3B/gi, ";").replace(/%3D/gi, "=");
6079
- }, Ks = (e) => e.split("/").map(Gs).join("/"), qs = (e) => {
6080
+ }, Gs = (e) => e.split("/").map(Ws).join("/"), Ks = (e) => {
6080
6081
  if (e.startsWith("//")) {
6081
6082
  let t = e.indexOf("/", 2);
6082
6083
  return t === -1 ? {
@@ -6087,7 +6088,7 @@ var bs = (e) => Object.freeze({
6087
6088
  pathname: e.slice(t)
6088
6089
  };
6089
6090
  }
6090
- let t = e.match(Hs);
6091
+ let t = e.match(Vs);
6091
6092
  if (t) {
6092
6093
  let n = e.indexOf("/", t[0].length);
6093
6094
  return n === -1 ? {
@@ -6098,40 +6099,40 @@ var bs = (e) => Object.freeze({
6098
6099
  pathname: e.slice(n)
6099
6100
  };
6100
6101
  }
6101
- return Us.test(e) ? {
6102
+ return Hs.test(e) ? {
6102
6103
  prefix: e,
6103
6104
  pathname: ""
6104
6105
  } : {
6105
6106
  prefix: "",
6106
6107
  pathname: e
6107
6108
  };
6108
- }, Js = (e) => {
6109
+ }, qs = (e) => {
6109
6110
  let t = e == null ? void 0 : e.trim();
6110
6111
  if (!t) return null;
6111
- let n = Ws(t), r = n === -1 ? t : t.slice(0, n), i = n === -1 ? "" : t.slice(n), { prefix: a, pathname: o } = qs(r);
6112
- return o ? `${a}${Ks(o)}${i}` : `${a}${i}`;
6113
- }, Ys = () => ({
6112
+ let n = Us(t), r = n === -1 ? t : t.slice(0, n), i = n === -1 ? "" : t.slice(n), { prefix: a, pathname: o } = Ks(r);
6113
+ return o ? `${a}${Gs(o)}${i}` : `${a}${i}`;
6114
+ }, Js = () => ({
6114
6115
  filename: "",
6115
6116
  file: null,
6116
6117
  buffer: null,
6117
6118
  sourceUrl: null,
6118
6119
  renderedReady: !1,
6119
6120
  progressiveReady: !1
6120
- }), Xs = () => ({
6121
+ }), Ys = () => ({
6121
6122
  file: null,
6122
6123
  buffer: null,
6123
6124
  sourceUrl: null,
6124
6125
  progressiveReady: !1
6125
- }), Zs = (e, t = Xs()) => (e.file = t.file, e.buffer = t.buffer, e.sourceUrl = t.sourceUrl, e.progressiveReady = t.progressiveReady, e), Qs = ({ reason: e = "replace", requestController: t, previewTarget: n, onClearRenderedContent: r, onClearError: i }) => {
6126
+ }), Xs = (e, t = Ys()) => (e.file = t.file, e.buffer = t.buffer, e.sourceUrl = t.sourceUrl, e.progressiveReady = t.progressiveReady, e), Zs = ({ reason: e = "replace", requestController: t, previewTarget: n, onClearRenderedContent: r, onClearError: i }) => {
6126
6127
  let a = t.createVersion();
6127
- return r == null || r(e), Zs(n), i == null || i(), a;
6128
- }, $s = (e, t = Ys()) => (e.filename = t.filename, e.renderedReady = t.renderedReady, Zs(e, t), e), ec = ({ previewTarget: e, state: t, reason: n, onClearRenderedContent: r, onResetLoading: i }) => ($s(e, t), r == null || r(n), i == null || i(), e);
6128
+ return r == null || r(e), Xs(n), i == null || i(), a;
6129
+ }, Qs = (e, t = Js()) => (e.filename = t.filename, e.renderedReady = t.renderedReady, Xs(e, t), e), $s = ({ previewTarget: e, state: t, reason: n, onClearRenderedContent: r, onResetLoading: i }) => (Qs(e, t), r == null || r(n), i == null || i(), e);
6129
6130
  (function() {
6130
- var e = t(function* ({ file: e, url: t, reason: n = Vs({
6131
+ var e = t(function* ({ file: e, url: t, reason: n = Bs({
6131
6132
  file: e,
6132
6133
  url: t
6133
6134
  }), requestController: r, previewTarget: i, onPreviewLocalFile: a, onPreviewRemoteFile: o, onClearRenderedContent: s, onClearError: c, onResetLoading: l }) {
6134
- let u = Qs({
6135
+ let u = Zs({
6135
6136
  reason: n,
6136
6137
  requestController: r,
6137
6138
  previewTarget: i,
@@ -6158,7 +6159,7 @@ var bs = (e) => Object.freeze({
6158
6159
  reason: n,
6159
6160
  file: null,
6160
6161
  url: null,
6161
- result: ec({
6162
+ result: $s({
6162
6163
  previewTarget: i,
6163
6164
  onClearRenderedContent: s,
6164
6165
  onResetLoading: l
@@ -6169,22 +6170,22 @@ var bs = (e) => Object.freeze({
6169
6170
  return e.apply(this, arguments);
6170
6171
  };
6171
6172
  })();
6172
- var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6173
+ var ec = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6173
6174
  filename: Pi({
6174
6175
  file: e,
6175
6176
  fallback: r
6176
6177
  }),
6177
6178
  file: e,
6178
6179
  buffer: t,
6179
- sourceUrl: Js(n)
6180
- }), nc = (e, t) => (e.filename = t.filename, e.file = t.file, e.buffer = t.buffer, e.sourceUrl = t.sourceUrl, e), rc = (e, t) => (e.sourceUrl = Js(t), e), ic = (e, t, n = "") => (e.filename = Pi({
6180
+ sourceUrl: qs(n)
6181
+ }), tc = (e, t) => (e.filename = t.filename, e.file = t.file, e.buffer = t.buffer, e.sourceUrl = t.sourceUrl, e), nc = (e, t) => (e.sourceUrl = qs(t), e), rc = (e, t, n = "") => (e.filename = Pi({
6181
6182
  filename: t,
6182
6183
  fallback: n
6183
- }), e), ac = (e, t) => (typeof t.renderedReady == "boolean" && (e.renderedReady = t.renderedReady), typeof t.progressiveReady == "boolean" && (e.progressiveReady = t.progressiveReady), e), oc = ({ version: e, session: t, buildState: n, readinessTarget: r, onSession: i, onActiveDocumentContext: a, onLifecycle: o, onClearLoadStarted: s }) => {
6184
+ }), e), ic = (e, t) => (typeof t.renderedReady == "boolean" && (e.renderedReady = t.renderedReady), typeof t.progressiveReady == "boolean" && (e.progressiveReady = t.progressiveReady), e), ac = ({ version: e, session: t, buildState: n, readinessTarget: r, onSession: i, onActiveDocumentContext: a, onLifecycle: o, onClearLoadStarted: s }) => {
6184
6185
  i == null || i(t == null ? null : t);
6185
6186
  let c = n();
6186
- return ac(r, c.readiness), a == null || a(c.lifecycleContext), o == null || o(c.lifecycleContext), s == null || s(e), c;
6187
- }, sc = function() {
6187
+ return ic(r, c.readiness), a == null || a(c.lifecycleContext), o == null || o(c.lifecycleContext), s == null || s(e), c;
6188
+ }, oc = function() {
6188
6189
  var e = t(function* ({ file: e, version: t, signal: n, sourceUrl: r, source: i = r ? "url" : "file", fallbackFilename: a = "", previewTarget: o, isCurrent: s, mountRenderedContent: c, destroyRenderSession: l, buildRenderCompleteState: u, onSession: d, onActiveDocumentContext: f, onLifecycle: p, onClearLoadStarted: m }) {
6189
6190
  let h = yield Li(e);
6190
6191
  if (!s(t) || n != null && n.aborted) return {
@@ -6193,7 +6194,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6193
6194
  session: null,
6194
6195
  complete: null
6195
6196
  };
6196
- nc(o, tc({
6197
+ tc(o, ec({
6197
6198
  file: e,
6198
6199
  buffer: h,
6199
6200
  sourceUrl: r,
@@ -6209,7 +6210,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6209
6210
  stale: !1,
6210
6211
  buffer: h,
6211
6212
  session: g,
6212
- complete: oc({
6213
+ complete: ac({
6213
6214
  version: t,
6214
6215
  session: g,
6215
6216
  readinessTarget: o,
@@ -6229,12 +6230,12 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6229
6230
  return function(t) {
6230
6231
  return e.apply(this, arguments);
6231
6232
  };
6232
- }(), cc = function() {
6233
+ }(), sc = function() {
6233
6234
  var e = t(function* ({ url: e, version: t, filename: n, previewTarget: r, isCurrent: i, mountRenderedContent: a, destroyRenderSession: o, buildRenderCompleteState: s, loadingMessage: c, signal: l, typeOverride: u, i18n: d, onStartLoading: f, onSession: p, onActiveDocumentContext: m, onLifecycle: h, onClearLoadStarted: g, onStopLoading: _, onError: v }) {
6234
6235
  let y = null;
6235
- f == null || f(c || bs(d).streamingPdf);
6236
+ f == null || f(c || ys(d).streamingPdf);
6236
6237
  try {
6237
- y = _c(n), rc(r, e);
6238
+ y = gc(n), nc(r, e);
6238
6239
  let c = yield a(/* @__PURE__ */ new ArrayBuffer(0), y, t, e, e, l, u);
6239
6240
  if (!i(t) || l != null && l.aborted) return yield o == null ? void 0 : o(c), {
6240
6241
  status: "stale",
@@ -6243,7 +6244,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6243
6244
  complete: null,
6244
6245
  error: null
6245
6246
  };
6246
- let d = oc({
6247
+ let d = ac({
6247
6248
  version: t,
6248
6249
  session: c,
6249
6250
  readinessTarget: r,
@@ -6265,7 +6266,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6265
6266
  error: null
6266
6267
  };
6267
6268
  } catch (e) {
6268
- return !i(t) || l != null && l.aborted || zs(e) ? {
6269
+ return !i(t) || l != null && l.aborted || Rs(e) ? {
6269
6270
  status: "stale",
6270
6271
  placeholderFile: y,
6271
6272
  session: null,
@@ -6279,7 +6280,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6279
6280
  error: e
6280
6281
  });
6281
6282
  } finally {
6282
- lc({
6283
+ cc({
6283
6284
  version: t,
6284
6285
  isCurrent: i,
6285
6286
  onClearLoadStarted: g,
@@ -6293,12 +6294,12 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6293
6294
  }();
6294
6295
  (function() {
6295
6296
  var e = t(function* ({ source: e, version: t, currentFilename: n, fallbackFilename: r, shouldStreamLocalFile: i, requestController: a, previewTarget: o, isCurrent: s, mountRenderedContent: c, destroyRenderSession: l, buildLoadStartState: u, buildRenderCompleteState: d, onMarkLoadStarted: f, onStartLoading: p, onSession: m, onActiveDocumentContext: h, onLifecycle: g, onClearLoadStarted: _, onStopLoading: v, onError: y }) {
6296
- let b = dc({
6297
+ let b = uc({
6297
6298
  source: e,
6298
6299
  currentFilename: n,
6299
6300
  fallbackFilename: r
6300
6301
  }), { file: x } = b;
6301
- uc({
6302
+ lc({
6302
6303
  version: t,
6303
6304
  filename: b.filename,
6304
6305
  filenameTarget: o,
@@ -6327,7 +6328,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6327
6328
  };
6328
6329
  if (e) {
6329
6330
  let n = /* @__PURE__ */ new ArrayBuffer(0), r = typeof e == "string" ? e : void 0;
6330
- nc(o, tc({
6331
+ tc(o, ec({
6331
6332
  file: x,
6332
6333
  buffer: n,
6333
6334
  fallbackFilename: b.filename
@@ -6345,7 +6346,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6345
6346
  stale: !1,
6346
6347
  buffer: n,
6347
6348
  session: i,
6348
- complete: oc({
6349
+ complete: ac({
6349
6350
  version: t,
6350
6351
  session: i,
6351
6352
  readinessTarget: o,
@@ -6363,7 +6364,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6363
6364
  error: null
6364
6365
  };
6365
6366
  }
6366
- let n = yield sc({
6367
+ let n = yield oc({
6367
6368
  file: x,
6368
6369
  version: t,
6369
6370
  signal: S == null ? void 0 : S.signal,
@@ -6406,7 +6407,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6406
6407
  error: e
6407
6408
  });
6408
6409
  } finally {
6409
- a == null || a.clearAbortController(S), lc({
6410
+ a == null || a.clearAbortController(S), cc({
6410
6411
  version: t,
6411
6412
  isCurrent: s,
6412
6413
  onClearLoadStarted: _,
@@ -6419,7 +6420,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6419
6420
  };
6420
6421
  })(), function() {
6421
6422
  var e = t(function* ({ url: e, version: t, pageHref: r, streaming: i, shouldStreamRemoteUrl: a, previewTarget: o, requestController: s, isCurrent: c, downloadFile: l, mountRenderedContent: u, destroyRenderSession: d, buildLoadStartState: f, buildRenderCompleteState: p, i18n: m, onMarkLoadStarted: h, onStartLoading: g, onSetLoadingMessage: _, onSession: v, onActiveDocumentContext: y, onLifecycle: b, onClearLoadStarted: x, onStopLoading: S, onMissingData: C, onError: w }) {
6422
- let T = hc({
6423
+ let T = mc({
6423
6424
  pageHref: r,
6424
6425
  streaming: i,
6425
6426
  url: e
@@ -6446,7 +6447,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6446
6447
  stream: null,
6447
6448
  error: null
6448
6449
  };
6449
- if (uc({
6450
+ if (lc({
6450
6451
  version: t,
6451
6452
  filename: T.filename,
6452
6453
  filenameTarget: o,
@@ -6459,7 +6460,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6459
6460
  onLifecycle: b,
6460
6461
  onStartLoading: g
6461
6462
  }), T.streamPdf || T.streamRenderer) {
6462
- let e = yield cc({
6463
+ let e = yield sc({
6463
6464
  url: E,
6464
6465
  version: t,
6465
6466
  filename: T.filename,
@@ -6473,7 +6474,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6473
6474
  sourceUrl: E
6474
6475
  }),
6475
6476
  i18n: m,
6476
- loadingMessage: T.streamPdf ? void 0 : bs(m).downloading,
6477
+ loadingMessage: T.streamPdf ? void 0 : ys(m).downloading,
6477
6478
  signal: D == null ? void 0 : D.signal,
6478
6479
  typeOverride: T.streamType,
6479
6480
  onStartLoading: g,
@@ -6507,7 +6508,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6507
6508
  error: null
6508
6509
  };
6509
6510
  }
6510
- let e = gc({
6511
+ let e = hc({
6511
6512
  version: t,
6512
6513
  data: yield l({
6513
6514
  url: E,
@@ -6535,7 +6536,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6535
6536
  stream: null,
6536
6537
  error: null
6537
6538
  };
6538
- let i = yield sc({
6539
+ let i = yield oc({
6539
6540
  file: e.source.file,
6540
6541
  version: t,
6541
6542
  source: "url",
@@ -6571,7 +6572,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6571
6572
  error: null
6572
6573
  };
6573
6574
  } catch (e) {
6574
- return !c(t) || zs(e) ? {
6575
+ return !c(t) || Rs(e) ? {
6575
6576
  status: "stale",
6576
6577
  remoteSource: T,
6577
6578
  download: null,
@@ -6587,7 +6588,7 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6587
6588
  error: e
6588
6589
  });
6589
6590
  } finally {
6590
- s.clearAbortController(D), O || lc({
6591
+ s.clearAbortController(D), O || cc({
6591
6592
  version: t,
6592
6593
  isCurrent: c,
6593
6594
  onClearLoadStarted: x,
@@ -6599,13 +6600,13 @@ var tc = ({ file: e, buffer: t, sourceUrl: n, fallbackFilename: r = "" }) => ({
6599
6600
  return e.apply(this, arguments);
6600
6601
  };
6601
6602
  }();
6602
- var lc = ({ version: e, isCurrent: t, onClearLoadStarted: n, onStopLoading: r }) => {
6603
+ var cc = ({ version: e, isCurrent: t, onClearLoadStarted: n, onStopLoading: r }) => {
6603
6604
  n == null || n(e), t(e) && (r == null || r());
6604
- }, uc = ({ version: e, filename: t, fallbackFilename: n, filenameTarget: r, buildState: i, onMarkLoadStarted: a, onLifecycle: o, onStartLoading: s }) => {
6605
- r && ic(r, t, n), a == null || a(e);
6605
+ }, lc = ({ version: e, filename: t, fallbackFilename: n, filenameTarget: r, buildState: i, onMarkLoadStarted: a, onLifecycle: o, onStartLoading: s }) => {
6606
+ r && rc(r, t, n), a == null || a(e);
6606
6607
  let c = i();
6607
6608
  return o == null || o(c.lifecycleContext), s == null || s(c.loadingMessage), c;
6608
- }, dc = ({ source: e, currentFilename: t, fallbackFilename: n = Oi }) => {
6609
+ }, uc = ({ source: e, currentFilename: t, fallbackFilename: n = Oi }) => {
6609
6610
  let r = Ii(e, t || n);
6610
6611
  return {
6611
6612
  file: r,
@@ -6614,19 +6615,19 @@ var lc = ({ version: e, isCurrent: t, onClearLoadStarted: n, onStopLoading: r })
6614
6615
  fallback: n
6615
6616
  })
6616
6617
  };
6617
- }, fc = (e) => e === !0 || e === !1 || e === "same-origin" ? e : "same-origin", pc = (e, t) => {
6618
+ }, dc = (e) => e === !0 || e === !1 || e === "same-origin" ? e : "same-origin", fc = (e, t) => {
6618
6619
  try {
6619
6620
  let n = new URL(e, t), r = new URL(t);
6620
6621
  return n.origin === r.origin;
6621
6622
  } catch (e) {
6622
6623
  return !1;
6623
6624
  }
6624
- }, mc = ({ extension: e, pageHref: t, streaming: n, url: r }) => {
6625
+ }, pc = ({ extension: e, pageHref: t, streaming: n, url: r }) => {
6625
6626
  if (e.toLowerCase() !== "pdf") return !1;
6626
- let i = fc(n);
6627
- return i === !1 ? !1 : i === !0 || pc(r, t);
6628
- }, hc = ({ filename: e, fallbackFilename: t = Oi, pageHref: n, streaming: r, shouldStreamRemoteUrl: i, url: a }) => {
6629
- let o = Js(a) || a, s = ji(e || a, t), c = Ai(s), l = n ? mc({
6627
+ let i = dc(n);
6628
+ return i === !1 ? !1 : i === !0 || fc(r, t);
6629
+ }, mc = ({ filename: e, fallbackFilename: t = Oi, pageHref: n, streaming: r, shouldStreamRemoteUrl: i, url: a }) => {
6630
+ let o = qs(a) || a, s = ji(e || a, t), c = Ai(s), l = n ? pc({
6630
6631
  extension: c,
6631
6632
  pageHref: n,
6632
6633
  streaming: r,
@@ -6645,10 +6646,10 @@ var lc = ({ version: e, isCurrent: t, onClearLoadStarted: n, onStopLoading: r })
6645
6646
  streamRenderer: u === !0 || typeof u == "string",
6646
6647
  streamType: typeof u == "string" ? u : void 0
6647
6648
  };
6648
- }, gc = ({ version: e, data: t, currentFilename: n, fallbackFilename: r, isCurrent: i, i18n: a, onMissingData: o, onSetLoadingMessage: s }) => i(e) ? t ? (s == null || s(bs(a).reading), {
6649
+ }, hc = ({ version: e, data: t, currentFilename: n, fallbackFilename: r, isCurrent: i, i18n: a, onMissingData: o, onSetLoadingMessage: s }) => i(e) ? t ? (s == null || s(ys(a).reading), {
6649
6650
  stale: !1,
6650
6651
  missing: !1,
6651
- source: dc({
6652
+ source: uc({
6652
6653
  source: t,
6653
6654
  currentFilename: n,
6654
6655
  fallbackFilename: r
@@ -6661,61 +6662,61 @@ var lc = ({ version: e, isCurrent: t, onClearLoadStarted: n, onStopLoading: r })
6661
6662
  stale: !0,
6662
6663
  missing: !1,
6663
6664
  source: null
6664
- }, _c = (e) => {
6665
+ }, gc = (e) => {
6665
6666
  if (typeof Blob > "u") throw Error("Blob is not available in the current execution environment.");
6666
- return Ii(new Blob([], { type: "application/pdf" }), ji(e, Is));
6667
- }, vc = "--file-viewer-render-surface-background", yc = "file-render-host", bc = "file-render-shadow-target", xc = (e) => {
6667
+ return Ii(new Blob([], { type: "application/pdf" }), ji(e, Fs));
6668
+ }, _c = "--file-viewer-render-surface-background", vc = "file-render-host", yc = "file-render-shadow-target", bc = (e) => {
6668
6669
  if (typeof e != "string") return null;
6669
6670
  let t = e.trim();
6670
6671
  return t && t.toLowerCase() !== "auto" ? t : null;
6671
- }, Sc = (e, t) => {
6672
+ }, xc = (e, t) => {
6672
6673
  var n;
6673
6674
  if (!e) return null;
6674
- let r = xc((n = t == null ? void 0 : t.ui) == null ? void 0 : n.surfaceBackground);
6675
- return r ? e.style.setProperty(vc, r) : e.style.removeProperty(vc), r;
6676
- }, Cc = (e) => !e || typeof e != "object" ? !1 : typeof ShadowRoot < "u" && e instanceof ShadowRoot || e.nodeType === 11 && !!e.host, wc = (e) => {
6675
+ let r = bc((n = t == null ? void 0 : t.ui) == null ? void 0 : n.surfaceBackground);
6676
+ return r ? e.style.setProperty(_c, r) : e.style.removeProperty(_c), r;
6677
+ }, Sc = (e) => !e || typeof e != "object" ? !1 : typeof ShadowRoot < "u" && e instanceof ShadowRoot || e.nodeType === 11 && !!e.host, Cc = (e) => {
6677
6678
  var t;
6678
6679
  return ((t = e == null ? void 0 : e.getRootNode) == null ? void 0 : t.call(e)) || null;
6679
- }, Tc = (e) => {
6680
+ }, wc = (e) => {
6680
6681
  var t;
6681
6682
  if (!e) return null;
6682
- if (Cc(e)) return e;
6683
+ if (Sc(e)) return e;
6683
6684
  let n = (t = e.getRootNode) == null ? void 0 : t.call(e);
6684
- return Cc(n) ? n : null;
6685
- }, Ec = (e) => e === "shadow" || e === "scoped" || e === "none" ? e : "auto", Dc = (e, t) => {
6686
- let n = Ec(e == null ? void 0 : e.styleIsolation);
6687
- return n === "auto" ? Cc(wc(t)) ? "scoped" : "none" : n === "shadow" && Cc(wc(t)) ? "scoped" : n;
6688
- }, Oc = (e) => !!e && (typeof e == "object" || typeof e == "function") && typeof e.then == "function", kc = (e, t = {}) => {
6685
+ return Sc(n) ? n : null;
6686
+ }, Tc = (e) => e === "shadow" || e === "scoped" || e === "none" ? e : "auto", Ec = (e, t) => {
6687
+ let n = Tc(e == null ? void 0 : e.styleIsolation);
6688
+ return n === "auto" ? Sc(Cc(t)) ? "scoped" : "none" : n === "shadow" && Sc(Cc(t)) ? "scoped" : n;
6689
+ }, Dc = (e) => !!e && (typeof e == "object" || typeof e == "function") && typeof e.then == "function", Oc = (e, t = {}) => {
6689
6690
  let n = e.ownerDocument.createElement("div");
6690
6691
  return n.className = t.className || "file-render", n.style.width = "100%", n.style.minWidth = "0", n.style.minHeight = "0", e.appendChild(n), n;
6691
- }, Ac = (e, t = {}) => {
6692
- let n = Dc({ styleIsolation: t.styleIsolation }, e), r = t.className || "file-render";
6692
+ }, kc = (e, t = {}) => {
6693
+ let n = Ec({ styleIsolation: t.styleIsolation }, e), r = t.className || "file-render";
6693
6694
  if (n === "shadow" && typeof e.attachShadow == "function") {
6694
6695
  let t = e.ownerDocument.createElement("div");
6695
- t.className = `${yc} ${r}`, t.dataset.fileViewerStyleIsolation = "shadow", t.style.width = "100%", t.style.minWidth = "0", t.style.minHeight = "0";
6696
+ t.className = `${vc} ${r}`, t.dataset.fileViewerStyleIsolation = "shadow", t.style.width = "100%", t.style.minWidth = "0", t.style.minHeight = "0";
6696
6697
  let i = t.attachShadow({ mode: "open" }), a = e.ownerDocument.createElement("div");
6697
- return a.className = `${bc} ${r}`, a.dataset.fileViewerStyleIsolation = "shadow", a.style.width = "100%", a.style.minWidth = "0", a.style.minHeight = "0", i.appendChild(a), e.appendChild(t), {
6698
+ return a.className = `${yc} ${r}`, a.dataset.fileViewerStyleIsolation = "shadow", a.style.width = "100%", a.style.minWidth = "0", a.style.minHeight = "0", i.appendChild(a), e.appendChild(t), {
6698
6699
  host: t,
6699
6700
  container: a,
6700
6701
  shadowRoot: i,
6701
6702
  styleIsolation: n
6702
6703
  };
6703
6704
  }
6704
- let i = kc(e, { className: r });
6705
+ let i = Oc(e, { className: r });
6705
6706
  return i.dataset.fileViewerStyleIsolation = n, {
6706
6707
  host: i,
6707
6708
  container: i,
6708
6709
  styleIsolation: n
6709
6710
  };
6710
- }, jc = (e, t) => {
6711
+ }, Ac = (e, t) => {
6711
6712
  let n = e.ownerDocument.createElement("style");
6712
6713
  return n.textContent = t, e.appendChild(n), n;
6713
- }, Mc = (e) => {
6714
+ }, jc = (e) => {
6714
6715
  var t, n;
6715
6716
  let r = (n = (t = e.ownerDocument.defaultView) == null ? void 0 : t.CSSStyleSheet) == null ? typeof CSSStyleSheet < "u" ? CSSStyleSheet : void 0 : n;
6716
6717
  return "adoptedStyleSheets" in e && r && typeof r.prototype.replaceSync == "function" ? r : null;
6717
- }, Nc = (e, t, n = {}) => {
6718
- let r = Tc(e), i = r ? Mc(r) : null;
6718
+ }, Mc = (e, t, n = {}) => {
6719
+ let r = wc(e), i = r ? jc(r) : null;
6719
6720
  if (n.adoptedStyleSheet && r && i) {
6720
6721
  let e = new i();
6721
6722
  return e.replaceSync(t), r.adoptedStyleSheets = [...r.adoptedStyleSheets, e], {
@@ -6725,30 +6726,30 @@ var lc = ({ version: e, isCurrent: t, onClearLoadStarted: n, onStopLoading: r })
6725
6726
  }
6726
6727
  };
6727
6728
  }
6728
- let a = jc((Cc(e), e), t);
6729
+ let a = Ac((Sc(e), e), t);
6729
6730
  return {
6730
6731
  node: a,
6731
6732
  remove() {
6732
6733
  a.remove();
6733
6734
  }
6734
6735
  };
6735
- }, Pc = (e, t) => t.parentNode === e && (e.removeChild(t), !0), Fc = () => ({
6736
+ }, Nc = (e, t) => t.parentNode === e && (e.removeChild(t), !0), Pc = () => ({
6736
6737
  session: null,
6737
6738
  exportAdapter: null,
6738
6739
  thumbnailAdapter: null
6739
- }), Ic = (e, t) => {
6740
+ }), Fc = (e, t) => {
6740
6741
  var n, r, i;
6741
6742
  return "session" in t && (e.session = (n = t.session) == null ? null : n), "exportAdapter" in t && (e.exportAdapter = (r = t.exportAdapter) == null ? null : r), "thumbnailAdapter" in t && (e.thumbnailAdapter = (i = t.thumbnailAdapter) == null ? null : i), e;
6742
- }, Lc = (e, t) => ({
6743
+ }, Ic = (e, t) => ({
6743
6744
  rendered: e,
6744
- destroy: () => t ? t() : Rc(e)
6745
- }), Rc = (e) => {
6745
+ destroy: () => t ? t() : Lc(e)
6746
+ }), Lc = (e) => {
6746
6747
  if (!e || typeof e != "object") return;
6747
6748
  let t = e;
6748
6749
  if (typeof t.unmount == "function") return t.unmount();
6749
6750
  if (typeof t.$destroy == "function") return t.$destroy();
6750
6751
  if (typeof t.destroy == "function") return t.destroy();
6751
- }, zc = (e, t = {}) => {
6752
+ }, Rc = (e, t = {}) => {
6752
6753
  if (!(e != null && e.destroy)) return;
6753
6754
  let n = (e) => {
6754
6755
  var n;
@@ -6756,26 +6757,26 @@ var lc = ({ version: e, isCurrent: t, onClearLoadStarted: n, onStopLoading: r })
6756
6757
  };
6757
6758
  try {
6758
6759
  let t = e.destroy();
6759
- Oc(t) && Promise.resolve(t).catch(n);
6760
+ Dc(t) && Promise.resolve(t).catch(n);
6760
6761
  } catch (e) {
6761
6762
  n(e);
6762
6763
  }
6763
6764
  };
6764
6765
  (function() {
6765
- var e = t(function* ({ buffer: e, file: t, version: n, sourceUrl: r, streamUrl: i, signal: a, typeOverride: o, getContainer: s, surfaceState: c, readinessState: l, isCurrent: u, clearRenderedContent: d, render: f, waitForContainer: p, waitForPaint: m = b, disposeSession: h = zc, onStartZoomObserver: g, onStartFitObserver: _, onStartViewStateObserver: v, onApplyInitialFit: y, onRefreshDocumentIndex: x, onRefreshZoomProvider: S, onRefreshViewStateProvider: C }) {
6766
+ var e = t(function* ({ buffer: e, file: t, version: n, sourceUrl: r, streamUrl: i, signal: a, typeOverride: o, getContainer: s, surfaceState: c, readinessState: l, isCurrent: u, clearRenderedContent: d, render: f, waitForContainer: p, waitForPaint: m = b, disposeSession: h = Rc, onStartZoomObserver: g, onStartFitObserver: _, onStartViewStateObserver: v, onApplyInitialFit: y, onRefreshDocumentIndex: x, onRefreshZoomProvider: S, onRefreshViewStateProvider: C }) {
6766
6767
  s() || (yield p == null ? void 0 : p());
6767
6768
  let w = s();
6768
6769
  if (!w || !u(n)) return;
6769
6770
  d("replace");
6770
- let T = kc(w);
6771
+ let T = Oc(w);
6771
6772
  if (g == null || g(), _ == null || _(), v == null || v(), yield p == null ? void 0 : p(), yield m(), !u(n)) {
6772
- Pc(w, T);
6773
+ Nc(w, T);
6773
6774
  return;
6774
6775
  }
6775
6776
  let E = (e) => {
6776
- Ic(c, { exportAdapter: e });
6777
+ Fc(c, { exportAdapter: e });
6777
6778
  }, D = () => {
6778
- u(n) && ac(l, { progressiveReady: !0 });
6779
+ u(n) && ic(l, { progressiveReady: !0 });
6779
6780
  };
6780
6781
  try {
6781
6782
  let s = yield f({
@@ -6794,19 +6795,19 @@ var lc = ({ version: e, isCurrent: t, onClearLoadStarted: n, onStopLoading: r })
6794
6795
  readinessState: l
6795
6796
  });
6796
6797
  if (!u(n)) {
6797
- h(s), Pc(w, T);
6798
+ h(s), Nc(w, T);
6798
6799
  return;
6799
6800
  }
6800
6801
  return x == null || x(), S == null || S(), C == null || C(), y && (yield y(), S == null || S(), C == null || C()), s;
6801
6802
  } catch (e) {
6802
- throw Pc(w, T), e;
6803
+ throw Nc(w, T), e;
6803
6804
  }
6804
6805
  });
6805
6806
  return function(t) {
6806
6807
  return e.apply(this, arguments);
6807
6808
  };
6808
6809
  })();
6809
- var Bc = ({ source: e, surface: t, options: r, signal: i, registerExportAdapter: a, registerThumbnailAdapter: o, renderContext: s }) => n({
6810
+ var zc = ({ source: e, surface: t, options: r, signal: i, registerExportAdapter: a, registerThumbnailAdapter: o, renderContext: s }) => n({
6810
6811
  filename: e.filename,
6811
6812
  url: e.url,
6812
6813
  streamUrl: e.url,
@@ -6816,14 +6817,14 @@ var Bc = ({ source: e, surface: t, options: r, signal: i, registerExportAdapter:
6816
6817
  surface: t,
6817
6818
  registerExportAdapter: a,
6818
6819
  registerThumbnailAdapter: o
6819
- }, s), Vc = function() {
6820
+ }, s), Bc = function() {
6820
6821
  var e = t(function* ({ dispatcher: e, buffer: t, target: n, type: r = "", context: i, throwOnMissingHandler: a = !1 }) {
6821
6822
  var o, s, c;
6822
6823
  let l = X(r), u = e.resolve(l);
6823
6824
  if (u) try {
6824
6825
  return yield u(t, n, l, i);
6825
6826
  } catch (r) {
6826
- let a = _s(r), d = a ? e.handlersByRendererId.get(a) : void 0;
6827
+ let a = gs(r), d = a ? e.handlersByRendererId.get(a) : void 0;
6827
6828
  if (!d || d === u) throw r;
6828
6829
  let f = ((o = bi.find((e) => e.id === a)) == null ? void 0 : o.extensions[0]) || l;
6829
6830
  return (c = (s = i == null ? void 0 : i.options) == null ? void 0 : s.onDiagnostic) == null || c.call(s, {
@@ -6842,19 +6843,19 @@ var Bc = ({ source: e, surface: t, options: r, signal: i, registerExportAdapter:
6842
6843
  return function(t) {
6843
6844
  return e.apply(this, arguments);
6844
6845
  };
6845
- }(), Hc = ({ handler: e, rendererId: n, allowUrlSource: r = !1, getTarget: i = (e) => e.surface.container, createContext: a = Bc, destroy: o }) => function() {
6846
+ }(), Vc = ({ handler: e, rendererId: n, allowUrlSource: r = !1, getTarget: i = (e) => e.surface.container, createContext: a = zc, destroy: o }) => function() {
6846
6847
  var s = t(function* (t) {
6847
6848
  let { source: s } = t;
6848
6849
  if (!s.buffer && !(r && (s.url || s.file))) throw Error("FileRenderHandler renderer requires an ArrayBuffer source.");
6849
- let c = s.buffer || /* @__PURE__ */ new ArrayBuffer(0), l = i(t), u = a(t), d = yield e(c, l, s.extension, u), f = h(l), p = f ? null : Ga({
6850
+ let c = s.buffer || /* @__PURE__ */ new ArrayBuffer(0), l = i(t), u = a(t), d = yield e(c, l, s.extension, u), f = h(l), p = f ? null : Wa({
6850
6851
  host: l,
6851
6852
  renderer: n || s.extension
6852
6853
  }), m = f || (p == null ? void 0 : p.provider) || null;
6853
6854
  return t.options.initialViewState && m != null && m.applyState && (yield m.applyState(t.options.initialViewState, {
6854
6855
  action: "restore",
6855
6856
  source: "initial"
6856
- })), Lc(d, () => {
6857
- let e = () => o ? o(d, t) : Rc(d);
6857
+ })), Ic(d, () => {
6858
+ let e = () => o ? o(d, t) : Lc(d);
6858
6859
  try {
6859
6860
  p == null || p.destroy();
6860
6861
  } finally {
@@ -6865,14 +6866,14 @@ var Bc = ({ source: e, surface: t, options: r, signal: i, registerExportAdapter:
6865
6866
  return function(e) {
6866
6867
  return s.apply(this, arguments);
6867
6868
  };
6868
- }(), Uc = ({ definitions: e = bi, handlers: t, getTarget: r, createContext: i, destroy: a }) => {
6869
- let o = rs(e), s = vs({
6869
+ }(), Hc = ({ definitions: e = bi, handlers: t, getTarget: r, createContext: i, destroy: a }) => {
6870
+ let o = ns(e), s = _s({
6870
6871
  registry: o,
6871
6872
  handlers: t
6872
6873
  });
6873
6874
  return {
6874
- registry: rs(o.list().map((e) => s.handlersByRendererId.get(e.id) ? n(n({}, e), {}, { load: Hc({
6875
- handler: (e, t, n, r) => Vc({
6875
+ registry: ns(o.list().map((e) => s.handlersByRendererId.get(e.id) ? n(n({}, e), {}, { load: Vc({
6876
+ handler: (e, t, n, r) => Bc({
6876
6877
  dispatcher: s,
6877
6878
  buffer: e,
6878
6879
  target: t,
@@ -6888,10 +6889,10 @@ var Bc = ({ source: e, surface: t, options: r, signal: i, registerExportAdapter:
6888
6889
  dispatcher: s,
6889
6890
  missingRendererIds: s.missingRendererIds
6890
6891
  };
6891
- }, Wc = (e) => ({
6892
+ }, Uc = (e) => ({
6892
6893
  $el: e,
6893
6894
  unmount() {}
6894
- }), Gc = [{
6895
+ }), Wc = [{
6895
6896
  rendererId: "image",
6896
6897
  handler: function() {
6897
6898
  var e = t(function* (e, t, n, r) {
@@ -6902,38 +6903,38 @@ var Bc = ({ source: e, surface: t, options: r, signal: i, registerExportAdapter:
6902
6903
  return e.apply(this, arguments);
6903
6904
  };
6904
6905
  }()
6905
- }], Kc = ["image"], qc = Gc.filter((e) => Kc.includes(e.rendererId)), Jc = bi.filter((e) => Kc.includes(e.id)), Yc = (e) => e === "none" ? [] : e === "lite" ? Jc : bi, Xc = (e) => e === "none" ? [] : e === "lite" ? qc : Gc, Zc = function() {
6906
+ }], Gc = ["image"], Kc = Wc.filter((e) => Gc.includes(e.rendererId)), qc = bi.filter((e) => Gc.includes(e.id)), Jc = (e) => e === "none" ? [] : e === "lite" ? qc : bi, Yc = (e) => e === "none" ? [] : e === "lite" ? Kc : Wc, Xc = function() {
6906
6907
  var e = t(function* (e, t, n, r) {
6907
- let i = As(n, void 0, r == null ? void 0 : r.options), a = document.createElement("div");
6908
+ let i = ks(n, void 0, r == null ? void 0 : r.options), a = document.createElement("div");
6908
6909
  a.style.textAlign = "center", a.style.marginTop = "80px";
6909
6910
  let o = document.createElement("div");
6910
6911
  if (o.textContent = i.message, a.appendChild(o), i.description) {
6911
6912
  let e = document.createElement("div");
6912
6913
  e.textContent = i.description, a.appendChild(e);
6913
6914
  }
6914
- return t.replaceChildren(a), Wc(t);
6915
+ return t.replaceChildren(a), Uc(t);
6915
6916
  });
6916
6917
  return function(t, n, r, i) {
6917
6918
  return e.apply(this, arguments);
6918
6919
  };
6919
- }(), Qc = (e = {}) => {
6920
- let t = e.builtinRenderers || "all", r = Uc({
6921
- definitions: Yc(t),
6922
- handlers: Xc(t)
6920
+ }(), Zc = (e = {}) => {
6921
+ let t = e.builtinRenderers || "all", r = Hc({
6922
+ definitions: Jc(t),
6923
+ handlers: Yc(t)
6923
6924
  });
6924
- return n(n({}, r), {}, { dispatcher: vs({
6925
+ return n(n({}, r), {}, { dispatcher: _s({
6925
6926
  registry: r.registry,
6926
- handlers: Gc,
6927
- fallbackHandler: Zc
6927
+ handlers: Wc,
6928
+ fallbackHandler: Xc
6928
6929
  }) });
6929
- }, $c = Qc();
6930
- $c.registry, $c.dispatcher, $c.missingRendererIds;
6930
+ }, Qc = Zc();
6931
+ Qc.registry, Qc.dispatcher, Qc.missingRendererIds;
6931
6932
  //#endregion
6932
6933
  //#region ../../core/dist/config/options.js
6933
- var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system", tl = () => typeof globalThis.matchMedia == "function" && globalThis.matchMedia("(prefers-color-scheme: dark)").matches, nl = (e, t = tl()) => {
6934
- let n = el(e);
6934
+ var $c = (e) => e === "light" || e === "dark" || e === "system" ? e : "system", el = () => typeof globalThis.matchMedia == "function" && globalThis.matchMedia("(prefers-color-scheme: dark)").matches, tl = (e, t = el()) => {
6935
+ let n = $c(e);
6935
6936
  return n === "system" ? t ? "dark" : "light" : n;
6936
- }, rl = (e, t = tl()) => nl(e, t) === "dark" ? "light" : "dark", il = (e) => e === "compact" ? "compact" : "comfortable", al = function() {
6937
+ }, nl = (e, t = el()) => tl(e, t) === "dark" ? "light" : "dark", rl = (e) => e === "compact" ? "compact" : "comfortable", il = function() {
6937
6938
  var e = t(function* (e) {
6938
6939
  let { openFileViewerPrintMaskDesigner: t } = yield import("./components/print-mask.js");
6939
6940
  return t(e);
@@ -6941,9 +6942,9 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
6941
6942
  return function(t) {
6942
6943
  return e.apply(this, arguments);
6943
6944
  };
6944
- }(), ol = function() {
6945
+ }(), al = function() {
6945
6946
  var e = t(function* (e, t, n, r, i, a, o) {
6946
- let s = Fo({
6947
+ let s = Po({
6947
6948
  phase: n,
6948
6949
  source: r,
6949
6950
  version: i,
@@ -6951,7 +6952,7 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
6951
6952
  startedAt: a,
6952
6953
  reason: o
6953
6954
  });
6954
- yield Ro(s, e.hooks, (e) => {
6955
+ yield Lo(s, e.hooks, (e) => {
6955
6956
  throw e;
6956
6957
  }), t == null || t({
6957
6958
  type: n,
@@ -6961,10 +6962,10 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
6961
6962
  return function(t, n, r, i, a, o, s) {
6962
6963
  return e.apply(this, arguments);
6963
6964
  };
6964
- }(), sl = (e, t) => t.rendererMode === "replace" ? rs([]) : e.registry ? e.registry : Qc({ builtinRenderers: t.builtinRenderers }).registry, cl = (e) => {
6965
+ }(), ol = (e, t) => t.rendererMode === "replace" ? ns([]) : e.registry ? e.registry : Zc({ builtinRenderers: t.builtinRenderers }).registry, sl = (e) => {
6965
6966
  let t = e.autoRenderers;
6966
6967
  return typeof t == "boolean" ? t : (t == null ? void 0 : t.enabled) === void 0 ? (e.rendererMode || "extend") !== "replace" : t.enabled;
6967
- }, ll = (e, t) => {
6968
+ }, cl = (e, t) => {
6968
6969
  if (!e) return t.find((e) => e);
6969
6970
  let n = [];
6970
6971
  e.signal.addEventListener("abort", () => n.splice(0).forEach((e) => e()), { once: !0 });
@@ -6978,8 +6979,8 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
6978
6979
  r.addEventListener("abort", t, { once: !0 }), n.push(() => r.removeEventListener("abort", t));
6979
6980
  }
6980
6981
  return e.signal;
6981
- }, ul = (e) => !!(e && typeof e == "object" && e.name === "AbortError"), dl = (e, t, n) => {
6982
- let r = e.ownerDocument, i = As(t, void 0, n), a = r.createElement("div");
6982
+ }, ll = (e) => !!(e && typeof e == "object" && e.name === "AbortError"), ul = (e, t, n) => {
6983
+ let r = e.ownerDocument, i = ks(t, void 0, n), a = r.createElement("div");
6983
6984
  a.className = "file-viewer-missing-renderer", a.style.cssText = [
6984
6985
  "display:flex",
6985
6986
  "min-height:260px",
@@ -6996,8 +6997,8 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
6996
6997
  s.textContent = i.message, s.style.cssText = "display:block;margin-bottom:8px;color:#172033;font-size:16px;";
6997
6998
  let c = r.createElement("p");
6998
6999
  c.textContent = i.description || i.title, c.style.cssText = "max-width:520px;margin:0;", o.append(s, c), a.append(o), e.replaceChildren(a);
6999
- }, fl = (e, t, n, r) => {
7000
- let i = e.ownerDocument, a = Fs(t, n, void 0, r), o = i.createElement("div");
7000
+ }, dl = (e, t, n, r) => {
7001
+ let i = e.ownerDocument, a = Ps(t, n, void 0, r), o = i.createElement("div");
7001
7002
  o.className = "file-viewer-render-error", o.setAttribute("role", "alert"), o.setAttribute("aria-live", "assertive"), o.style.cssText = [
7002
7003
  "display:flex",
7003
7004
  "min-height:260px",
@@ -7022,8 +7023,8 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7022
7023
  c.textContent = a.title, c.style.cssText = "display:block;margin-bottom:10px;font-size:18px;";
7023
7024
  let l = i.createElement("p");
7024
7025
  l.textContent = a.message, l.style.cssText = "margin:0;white-space:pre-wrap;overflow-wrap:anywhere;", s.append(c, l), o.append(s), e.replaceChildren(o);
7025
- }, pl = (e, r = {}) => {
7026
- let a = r.options || {}, o = sl(r, a), s, c, l, u = a.rendererMode || "extend", f = a.builtinRenderers || "all", p = cl(a), m = -1, h = null, v = null, y = null, b = null, x = Fc(), S = Rs(), C = {
7026
+ }, fl = (e, r = {}) => {
7027
+ let a = r.options || {}, o = ol(r, a), s, c, l, u = a.rendererMode || "extend", f = a.builtinRenderers || "all", p = sl(a), m = -1, h = null, v = null, y = null, b = null, x = Pc(), S = Ls(), C = {
7027
7028
  anchors: { value: [] },
7028
7029
  state: _()
7029
7030
  }, w = null, T = !1, E = null, D = null, O = null, k = () => e.ownerDocument.defaultView || (typeof window < "u" ? window : void 0), A = () => {
@@ -7056,10 +7057,10 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7056
7057
  }, P = () => {
7057
7058
  ee(), w == null || w.remove(), w = null, T && (e.style.position = "", T = !1);
7058
7059
  }, F = (t = y) => {
7059
- t && (Pc(e, t), y === t && (y = null));
7060
+ t && (Nc(e, t), y === t && (y = null));
7060
7061
  }, I = (t = !0) => {
7061
- let n = Ac(e, { styleIsolation: a.styleIsolation }), r = n.host || n.container;
7062
- return t && (r.style.height = "100%", n.container.style.height = "100%"), Sc(r, a), y = r, n;
7062
+ let n = kc(e, { styleIsolation: a.styleIsolation }), r = n.host || n.container;
7063
+ return t && (r.style.height = "100%", n.container.style.height = "100%"), xc(r, a), y = r, n;
7063
7064
  }, L = function() {
7064
7065
  var e = t(function* (e, t) {
7065
7066
  var n;
@@ -7073,7 +7074,7 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7073
7074
  return e.apply(this, arguments);
7074
7075
  };
7075
7076
  }(), te = () => {
7076
- let t = eo(a.watermark);
7077
+ let t = $a(a.watermark);
7077
7078
  if (!t) {
7078
7079
  P();
7079
7080
  return;
@@ -7083,18 +7084,18 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7083
7084
  n != null && n.getComputedStyle && n.getComputedStyle(e).position === "static" && !e.style.position && (e.style.position = "relative", T = !0), w.parentElement !== e && e.appendChild(w), N();
7084
7085
  }, R = function() {
7085
7086
  var e = t(function* () {
7086
- let e = a.rendererMode || "extend", t = a.renderers, i = a.preset, d = a.presets, h = a.builtinRenderers || "all", g = cl(a), _ = g || ms(i) || ms(d) ? ps() : 0;
7087
+ let e = a.rendererMode || "extend", t = a.renderers, i = a.preset, d = a.presets, h = a.builtinRenderers || "all", g = sl(a), _ = g || ps(i) || ps(d) ? fs() : 0;
7087
7088
  if (e === u && t === s && i === c && d === l && h === f && g === p && _ === m) return;
7088
- o = sl(r, a), u = e, s = t, c = i, l = d, f = h, p = g, m = _;
7089
+ o = ol(r, a), u = e, s = t, c = i, l = d, f = h, p = g, m = _;
7089
7090
  let v = [];
7090
- g && v.push(...ds()), v.push(...hs(i), ...hs(d)), t && v.push(t);
7091
- let y = us(v);
7092
- y.length && (yield gs({
7091
+ g && v.push(...us()), v.push(...ms(i), ...ms(d)), t && v.push(t);
7092
+ let y = ls(v);
7093
+ y.length && (yield hs({
7093
7094
  registry: o,
7094
7095
  plugins: y,
7095
7096
  registerHandler: (e) => {
7096
7097
  let t = o.getById(e.rendererId);
7097
- t && o.register(n(n({}, t), {}, { load: Hc({
7098
+ t && o.register(n(n({}, t), {}, { load: Vc({
7098
7099
  handler: e.handler,
7099
7100
  rendererId: t.id,
7100
7101
  allowUrlSource: t.sourceAccess === "stream-preferred",
@@ -7130,7 +7131,7 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7130
7131
  }(), re = function() {
7131
7132
  var e = t(function* (e, t, i, s) {
7132
7133
  var c;
7133
- let l = (s == null ? void 0 : s.options) || a, u = pl(i, {
7134
+ let l = (s == null ? void 0 : s.options) || a, u = fl(i, {
7134
7135
  registry: o,
7135
7136
  options: n(n({}, l), {}, {
7136
7137
  autoRenderers: !1,
@@ -7162,15 +7163,15 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7162
7163
  return function(t, n, r, i) {
7163
7164
  return e.apply(this, arguments);
7164
7165
  };
7165
- }(), ie = () => Fo({
7166
+ }(), ie = () => Po({
7166
7167
  phase: "load-complete",
7167
7168
  source: h || Fi({}),
7168
7169
  version: S.getCurrentVersion(),
7169
7170
  timestamp: Date.now()
7170
7171
  }), ae = function() {
7171
7172
  var e = t(function* (e) {
7172
- return Ko({
7173
- context: Io(e, ie()),
7173
+ return Go({
7174
+ context: Fo(e, ie()),
7174
7175
  options: a,
7175
7176
  onBefore: (e) => {
7176
7177
  var t;
@@ -7194,12 +7195,12 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7194
7195
  return function(t) {
7195
7196
  return e.apply(this, arguments);
7196
7197
  };
7197
- }(), z = (e) => typeof e == "string" ? e : eo(a.watermark), B = (e) => {
7198
- let t = e || (h == null ? void 0 : h.extension) || "", n = e ? as(o, { extension: e }) : v ? o.getById(v) : as(o, {
7198
+ }(), z = (e) => typeof e == "string" ? e : $a(a.watermark), B = (e) => {
7199
+ let t = e || (h == null ? void 0 : h.extension) || "", n = e ? is(o, { extension: e }) : v ? o.getById(v) : is(o, {
7199
7200
  filename: h == null ? void 0 : h.filename,
7200
7201
  extension: t
7201
7202
  }), r = H.getState();
7202
- return io(n ? ro(n, x.session) : ao(t), r);
7203
+ return ro(n ? no(n, x.session) : io(t), r);
7203
7204
  }, oe = () => {
7204
7205
  var e;
7205
7206
  (e = r.onEvent) == null || e.call(r, {
@@ -7231,7 +7232,7 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7231
7232
  onFit: (e) => {
7232
7233
  H.refreshProvider(), W.refreshProvider(), se(), ce(e);
7233
7234
  }
7234
- }), W = qa({
7235
+ }), W = Ka({
7235
7236
  root: () => b || e,
7236
7237
  onChange: (e) => {
7237
7238
  var t;
@@ -7267,11 +7268,11 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7267
7268
  let n = x.session, i = y;
7268
7269
  if (!h && !n && !i) return;
7269
7270
  let o = h, s = Date.now(), c = S.getCurrentVersion();
7270
- o && (yield ol(a, r.onEvent, "unload-start", o, c, s, e)), yield (t = n == null ? void 0 : n.destroy) == null ? void 0 : t.call(n), F(i || void 0), h = null, v = null, b = null, Ic(x, {
7271
+ o && (yield al(a, r.onEvent, "unload-start", o, c, s, e)), yield (t = n == null ? void 0 : n.destroy) == null ? void 0 : t.call(n), F(i || void 0), h = null, v = null, b = null, Fc(x, {
7271
7272
  session: null,
7272
7273
  exportAdapter: null,
7273
7274
  thumbnailAdapter: null
7274
- }), P(), yield G.clearDocumentState(), H.clearProvider(), W.clearProvider(), U.resetAutoFit(), se(), o && (yield ol(a, r.onEvent, "unload-complete", o, c, s, e));
7275
+ }), P(), yield G.clearDocumentState(), H.clearProvider(), W.clearProvider(), U.resetAutoFit(), se(), o && (yield al(a, r.onEvent, "unload-complete", o, c, s, e));
7275
7276
  });
7276
7277
  return function() {
7277
7278
  return e.apply(this, arguments);
@@ -7285,25 +7286,25 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7285
7286
  },
7286
7287
  load(e) {
7287
7288
  return t(function* (e, i = {}) {
7288
- let s = S.requestController.createVersion(), c = S.requestController.createAbortController(), l = ll(c, [r.signal, i.signal]);
7289
+ let s = S.requestController.createVersion(), c = S.requestController.createAbortController(), l = cl(c, [r.signal, i.signal]);
7289
7290
  if (yield K("replace"), yield R(), !S.isCurrentRequest(s)) return null;
7290
7291
  let u = Fi(e), f;
7291
7292
  try {
7292
7293
  f = yield ne(u, l);
7293
7294
  } catch (e) {
7294
- if (S.requestController.clearAbortController(c), !S.isCurrentRequest(s) || l != null && l.aborted || ul(e)) return null;
7295
+ if (S.requestController.clearAbortController(c), !S.isCurrentRequest(s) || l != null && l.aborted || ll(e)) return null;
7295
7296
  throw e;
7296
7297
  }
7297
7298
  if (!S.isCurrentRequest(s) || l != null && l.aborted) return S.requestController.clearAbortController(c), null;
7298
- let p = as(o, {
7299
+ let p = is(o, {
7299
7300
  filename: u.filename,
7300
7301
  extension: f
7301
7302
  }), m = f === u.extension ? u : n(n({}, u), {}, { extension: f });
7302
7303
  h = u, v = (p == null ? void 0 : p.id) || null;
7303
7304
  let g = Date.now();
7304
- yield ol(a, r.onEvent, "load-start", u, s, g);
7305
+ yield al(a, r.onEvent, "load-start", u, s, g);
7305
7306
  let _ = I((p == null ? void 0 : p.id) !== "office-presentation" && (p == null ? void 0 : p.id) !== "office-presentation-binary"), C = _.container, w = _.host || C;
7306
- if (b = C, !(p != null && p.load)) return dl(C, f, a), Ic(x, { session: null }), te(), se(), yield ol(a, r.onEvent, "load-complete", u, s, g), null;
7307
+ if (b = C, !(p != null && p.load)) return ul(C, f, a), Fc(x, { session: null }), te(), se(), yield al(a, r.onEvent, "load-complete", u, s, g), null;
7307
7308
  let T;
7308
7309
  try {
7309
7310
  T = yield p.load({
@@ -7312,15 +7313,15 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7312
7313
  options: a,
7313
7314
  signal: l,
7314
7315
  registerExportAdapter: (e) => {
7315
- S.isCurrentRequest(s) && Ic(x, { exportAdapter: e });
7316
+ S.isCurrentRequest(s) && Fc(x, { exportAdapter: e });
7316
7317
  },
7317
7318
  registerThumbnailAdapter: (e) => {
7318
- S.isCurrentRequest(s) && Ic(x, { thumbnailAdapter: e });
7319
+ S.isCurrentRequest(s) && Fc(x, { thumbnailAdapter: e });
7319
7320
  },
7320
7321
  renderContext: {
7321
7322
  renderPurpose: r.renderPurpose || "preview",
7322
7323
  renderNestedBuffer: re,
7323
- requestSnapshotDownload: $o({
7324
+ requestSnapshotDownload: Qo({
7324
7325
  getOptions: () => a,
7325
7326
  isCurrent: () => S.isCurrentRequest(s),
7326
7327
  beforeDownload: () => ae("download")
@@ -7328,15 +7329,15 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7328
7329
  }
7329
7330
  });
7330
7331
  } catch (e) {
7331
- if (!S.isCurrentRequest(s) || l != null && l.aborted || ul(e)) return F(w), null;
7332
- throw Ic(x, {
7332
+ if (!S.isCurrentRequest(s) || l != null && l.aborted || ll(e)) return F(w), null;
7333
+ throw Fc(x, {
7333
7334
  session: null,
7334
7335
  exportAdapter: null,
7335
7336
  thumbnailAdapter: null
7336
- }), P(), fl(C, f, e, a), se(), e;
7337
+ }), P(), dl(C, f, e, a), se(), e;
7337
7338
  }
7338
7339
  if (!S.isCurrentRequest(s) || l != null && l.aborted) return yield L(T, w), S.requestController.clearAbortController(c), null;
7339
- Ic(x, { session: T }), te(), H.refreshProvider(), W.refreshProvider();
7340
+ Fc(x, { session: T }), te(), H.refreshProvider(), W.refreshProvider();
7340
7341
  let E = function() {
7341
7342
  var e = t(function* () {
7342
7343
  x.session === T && y === w ? yield K("replace") : F(w), S.requestController.clearAbortController(c);
@@ -7345,7 +7346,7 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7345
7346
  return e.apply(this, arguments);
7346
7347
  };
7347
7348
  }();
7348
- return yield G.refreshDocumentIndex({ notify: !1 }), !S.isCurrentRequest(s) || l != null && l.aborted || (yield U.applyInitialFit({ skip: d(a.initialViewState) }), !S.isCurrentRequest(s) || l != null && l.aborted) ? (yield E(), null) : (H.refreshProvider(), W.refreshProvider(), se(), yield ol(a, r.onEvent, "load-complete", u, s, g), T);
7349
+ return yield G.refreshDocumentIndex({ notify: !1 }), !S.isCurrentRequest(s) || l != null && l.aborted || (yield U.applyInitialFit({ skip: d(a.initialViewState) }), !S.isCurrentRequest(s) || l != null && l.aborted) ? (yield E(), null) : (H.refreshProvider(), W.refreshProvider(), se(), yield al(a, r.onEvent, "load-complete", u, s, g), T);
7349
7350
  }).apply(this, arguments);
7350
7351
  },
7351
7352
  unload(e = "replace") {
@@ -7360,13 +7361,13 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7360
7361
  },
7361
7362
  updateOptions(e) {
7362
7363
  let t = a.fit;
7363
- a = n(n({}, a), e), Sc(y, a), te(), "fit" in e && e.fit !== t && (U.resetAutoFit(), U.scheduleFit("resize"));
7364
+ a = n(n({}, a), e), xc(y, a), te(), "fit" in e && e.fit !== t && (U.resetAutoFit(), U.scheduleFit("resize"));
7364
7365
  },
7365
7366
  getCapabilities(e) {
7366
7367
  return B(e);
7367
7368
  },
7368
7369
  getRenderer(e) {
7369
- return !e && v ? o.getById(v) : as(o, {
7370
+ return !e && v ? o.getById(v) : is(o, {
7370
7371
  filename: e || h == null ? void 0 : h.filename,
7371
7372
  extension: e || (h == null ? void 0 : h.extension) || ""
7372
7373
  });
@@ -7375,25 +7376,25 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7375
7376
  return h;
7376
7377
  },
7377
7378
  registerExportAdapter(e) {
7378
- Ic(x, { exportAdapter: e });
7379
+ Fc(x, { exportAdapter: e });
7379
7380
  },
7380
7381
  getExportAdapter() {
7381
7382
  return x.exportAdapter;
7382
7383
  },
7383
7384
  registerThumbnailAdapter(e) {
7384
- Ic(x, { thumbnailAdapter: e });
7385
+ Fc(x, { thumbnailAdapter: e });
7385
7386
  },
7386
7387
  getThumbnailAdapter() {
7387
7388
  return x.thumbnailAdapter;
7388
7389
  },
7389
7390
  download() {
7390
7391
  return t(function* (e = {}) {
7391
- let t = go(h);
7392
- yield Eo({
7392
+ let t = ho(h);
7393
+ yield To({
7393
7394
  source: t,
7394
- filename: e.filename || vo({
7395
+ filename: e.filename || _o({
7395
7396
  source: t,
7396
- fallback: uo
7397
+ fallback: lo
7397
7398
  }),
7398
7399
  beforeOperation: ae
7399
7400
  });
@@ -7401,16 +7402,16 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7401
7402
  },
7402
7403
  exportHtml() {
7403
7404
  return t(function* (t = {}) {
7404
- return Do({
7405
+ return Eo({
7405
7406
  source: e,
7406
7407
  adapter: x.exportAdapter,
7407
7408
  download: t.download,
7408
- filename: t.filename || vo({
7409
- filename: ho(h),
7409
+ filename: t.filename || _o({
7410
+ filename: mo(h),
7410
7411
  fallback: "preview"
7411
7412
  }),
7412
- title: t.title || vo({
7413
- filename: ho(h),
7413
+ title: t.title || _o({
7414
+ filename: mo(h),
7414
7415
  fallback: "file-viewer-preview"
7415
7416
  }),
7416
7417
  watermarkInlineStyle: z(t.watermarkInlineStyle),
@@ -7420,14 +7421,14 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7420
7421
  },
7421
7422
  print() {
7422
7423
  return t(function* (t = {}) {
7423
- yield Oo({
7424
+ yield Do({
7424
7425
  source: e,
7425
7426
  adapter: x.exportAdapter,
7426
7427
  autoPrint: t.autoPrint,
7427
7428
  openWindow: t.openWindow,
7428
7429
  printWindow: t.printWindow,
7429
- title: t.title || vo({
7430
- filename: ho(h),
7430
+ title: t.title || _o({
7431
+ filename: mo(h),
7431
7432
  fallback: "file-viewer-preview"
7432
7433
  }),
7433
7434
  watermarkInlineStyle: z(t.watermarkInlineStyle),
@@ -7440,7 +7441,7 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7440
7441
  printWithMask() {
7441
7442
  return t(function* (t = {}) {
7442
7443
  var r, i, o, s, c;
7443
- let l = yield al({
7444
+ let l = yield il({
7444
7445
  root: e,
7445
7446
  pages: (i = (r = x.exportAdapter) == null ? void 0 : r.getPrintMaskPages) == null ? void 0 : i.call(r),
7446
7447
  i18n: a,
@@ -7522,7 +7523,7 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7522
7523
  }
7523
7524
  };
7524
7525
  return le;
7525
- }, ml = 1048576;
7526
+ }, pl = 1048576;
7526
7527
  (function() {
7527
7528
  var e = t(function* (e, t) {
7528
7529
  var n, r, i;
@@ -7534,7 +7535,7 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7534
7535
  signal: a.signal,
7535
7536
  credentials: "same-origin"
7536
7537
  });
7537
- if (!t.ok || !((n = t.headers.get("content-type")) != null && n.includes("json")) || Number(t.headers.get("content-length")) > ml) return null;
7538
+ if (!t.ok || !((n = t.headers.get("content-type")) != null && n.includes("json")) || Number(t.headers.get("content-length")) > pl) return null;
7538
7539
  let o = (r = t.body) == null ? void 0 : r.getReader();
7539
7540
  if (!o) return null;
7540
7541
  let s = [], c = 0;
@@ -7542,7 +7543,7 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7542
7543
  for (;;) {
7543
7544
  let { value: e, done: t } = yield o.read();
7544
7545
  if (t) break;
7545
- if (c += e.byteLength, c > ml) return null;
7546
+ if (c += e.byteLength, c > pl) return null;
7546
7547
  s.push(e);
7547
7548
  }
7548
7549
  } finally {
@@ -7733,7 +7734,7 @@ var el = (e) => e === "light" || e === "dark" || e === "system" ? e : "system",
7733
7734
  }();
7734
7735
  //#endregion
7735
7736
  //#region ../../core/dist/browser/controller.js
7736
- var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!(e.url || e.file || e.buffer), _l = (e = {}) => ({
7737
+ var ml = () => typeof window < "u" && typeof document < "u", hl = (e = {}) => !!(e.url || e.file || e.buffer), gl = (e = {}) => ({
7737
7738
  url: e.url,
7738
7739
  file: e.file,
7739
7740
  buffer: e.buffer,
@@ -7741,7 +7742,7 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7741
7742
  name: e.name,
7742
7743
  type: e.type,
7743
7744
  size: e.size
7744
- }), vl = [
7745
+ }), _l = [
7745
7746
  "theme",
7746
7747
  "rendererMode",
7747
7748
  "builtinRenderers",
@@ -7767,36 +7768,36 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7767
7768
  "drawing",
7768
7769
  "cad",
7769
7770
  "model"
7770
- ], yl = (e) => {
7771
+ ], vl = (e) => {
7771
7772
  let t = Object.getPrototypeOf(e);
7772
7773
  return t === Object.prototype || t === null;
7773
- }, bl = (e, t, n = /* @__PURE__ */ new WeakMap()) => {
7774
+ }, yl = (e, t, n = /* @__PURE__ */ new WeakMap()) => {
7774
7775
  if (Object.is(e, t)) return !0;
7775
7776
  if (e === null || t === null || typeof e != "object" || typeof t != "object") return !1;
7776
7777
  let r = n.get(e);
7777
7778
  if (r) return r === t;
7778
- if (n.set(e, t), Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length === t.length && e.every((e, r) => bl(e, t[r], n));
7779
- if (!yl(e) || !yl(t)) return !1;
7779
+ if (n.set(e, t), Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length === t.length && e.every((e, r) => yl(e, t[r], n));
7780
+ if (!vl(e) || !vl(t)) return !1;
7780
7781
  let i = Object.keys(e).sort(), a = Object.keys(t).sort();
7781
- return i.length === a.length && i.every((r, i) => r === a[i] && bl(e[r], t[r], n));
7782
- }, xl = (e, t) => vl.some((n) => !bl(e == null ? void 0 : e[n], t == null ? void 0 : t[n])), Sl = (e, t) => !e || !t ? e === t : e.url === t.url && e.file === t.file && e.buffer === t.buffer && e.filename === t.filename && e.name === t.name && e.type === t.type && Object.is(e.size, t.size), Cl = () => typeof fetch == "function", wl = function() {
7782
+ return i.length === a.length && i.every((r, i) => r === a[i] && yl(e[r], t[r], n));
7783
+ }, bl = (e, t) => _l.some((n) => !yl(e == null ? void 0 : e[n], t == null ? void 0 : t[n])), xl = (e, t) => !e || !t ? e === t : e.url === t.url && e.file === t.file && e.buffer === t.buffer && e.filename === t.filename && e.name === t.name && e.type === t.type && Object.is(e.size, t.size), Sl = () => typeof fetch == "function", Cl = function() {
7783
7784
  var e = t(function* ({ url: e, signal: t }) {
7784
- if (!Cl()) throw Error("fetch is not available in the current environment.");
7785
- let n = Js(e) || e, r = yield fetch(n, { signal: t });
7785
+ if (!Sl()) throw Error("fetch is not available in the current environment.");
7786
+ let n = qs(e) || e, r = yield fetch(n, { signal: t });
7786
7787
  if (!r.ok) throw Error(`Failed to fetch file: ${r.status} ${r.statusText}`);
7787
7788
  return r.blob();
7788
7789
  });
7789
7790
  return function(t) {
7790
7791
  return e.apply(this, arguments);
7791
7792
  };
7792
- }(), Tl = (e) => ji(e.filename || e.name || Pi({
7793
+ }(), wl = (e) => ji(e.filename || e.name || Pi({
7793
7794
  file: e.file,
7794
7795
  url: e.url,
7795
7796
  fallback: "preview.bin"
7796
- }), e.type ? `preview.${e.type}` : Oi), El = function() {
7797
+ }), e.type ? `preview.${e.type}` : Oi), Tl = function() {
7797
7798
  var e = t(function* (e, t = {}) {
7798
7799
  var n, r, i;
7799
- let a = Tl(e), o = e.type || Ai(a);
7800
+ let a = wl(e), o = e.type || Ai(a);
7800
7801
  if (e.buffer) return {
7801
7802
  buffer: e.buffer,
7802
7803
  filename: a,
@@ -7816,7 +7817,7 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7816
7817
  };
7817
7818
  }
7818
7819
  if (e.url) {
7819
- let n = yield (t.fetchFile || wl)({
7820
+ let n = yield (t.fetchFile || Cl)({
7820
7821
  url: e.url,
7821
7822
  signal: t.signal,
7822
7823
  source: e
@@ -7840,14 +7841,14 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7840
7841
  return function(t) {
7841
7842
  return e.apply(this, arguments);
7842
7843
  };
7843
- }(), Z = function() {
7844
+ }(), Q = function() {
7844
7845
  var e = t(function* (e, t, n) {
7845
7846
  return e ? t(e) : n;
7846
7847
  });
7847
7848
  return function(t, n, r) {
7848
7849
  return e.apply(this, arguments);
7849
7850
  };
7850
- }(), Dl = (e) => !!(e && typeof e == "object" && e.name === "AbortError"), Ol = {
7851
+ }(), El = (e) => !!(e && typeof e == "object" && e.name === "AbortError"), Dl = {
7851
7852
  download: !1,
7852
7853
  print: !1,
7853
7854
  exportHtml: !1,
@@ -7855,13 +7856,13 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7855
7856
  zoomIn: !1,
7856
7857
  zoomOut: !1,
7857
7858
  zoomReset: !1
7858
- }, kl = {
7859
+ }, Ol = {
7859
7860
  scale: 1,
7860
7861
  label: "100%",
7861
7862
  canZoomIn: !1,
7862
7863
  canZoomOut: !1,
7863
7864
  canReset: !1
7864
- }, Al = /* @__PURE__ */ new WeakMap(), jl = "\n:host,.file-viewer-web-shell{display:block;width:100%;height:100%;min-width:0;min-height:0;contain:content;--file-viewer-bg:transparent;--file-viewer-content-bg:transparent;--file-viewer-text:#172033;--file-viewer-muted:#607282;--file-viewer-font:14px/1.45 system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif;--file-viewer-border:rgba(20,35,53,.08);--file-viewer-toolbar-bg:rgba(255,255,255,.92);--file-viewer-toolbar-border:rgba(20,35,53,.06);--file-viewer-toolbar-shadow:0 18px 44px rgba(15,23,42,.16);--file-viewer-toolbar-radius:999px;--file-viewer-toolbar-gap:6px;--file-viewer-toolbar-min-height:45px;--file-viewer-toolbar-padding:6px 10px;--file-viewer-toolbar-floating-min-height:42px;--file-viewer-toolbar-floating-padding:6px;--file-viewer-toolbar-floating-offset:16px;--file-viewer-group-bg:rgba(20,35,53,.035);--file-viewer-group-border:rgba(20,35,53,.08);--file-viewer-group-gap:2px;--file-viewer-group-padding:2px;--file-viewer-button-color:#40546a;--file-viewer-button-hover-bg:rgba(33,163,102,.1);--file-viewer-button-hover-color:#16774c;--file-viewer-button-disabled-color:#aab5c0;--file-viewer-button-radius:8px;--file-viewer-button-min-width:42px;--file-viewer-button-height:30px;--file-viewer-button-padding:0 10px;--file-viewer-icon-button-size:30px;--file-viewer-zoom-meter-min-width:48px;--file-viewer-zoom-meter-padding:0 8px;--file-viewer-floating-button-min-width:48px;--file-viewer-floating-button-height:32px;--file-viewer-floating-icon-button-size:32px;--file-viewer-floating-zoom-meter-min-width:54px;--file-viewer-search-input-height:30px;--file-viewer-search-input-padding:0 10px;--file-viewer-search-button-min-width:32px;--file-viewer-search-button-padding:0 8px;--file-viewer-search-count-min-width:42px;--file-viewer-floating-search-input-height:32px;--file-viewer-focus-ring:rgba(31,157,103,.22);--file-viewer-z-toolbar:20;--file-viewer-z-floating-toolbar:30}\n:host([theme='dark']),.file-viewer-web-shell[data-viewer-theme='dark']{--file-viewer-bg:#0f1720;--file-viewer-content-bg:#111b24;--file-viewer-text:#e5eef8;--file-viewer-muted:#cbd5e1;--file-viewer-border:rgba(148,163,184,.18);--file-viewer-toolbar-bg:rgba(15,23,42,.9);--file-viewer-toolbar-border:rgba(148,163,184,.18);--file-viewer-group-bg:rgba(148,163,184,.1);--file-viewer-group-border:rgba(148,163,184,.16);--file-viewer-button-color:#d7dee8;--file-viewer-button-hover-bg:rgba(45,212,191,.14);--file-viewer-button-hover-color:#5eead4;--file-viewer-button-disabled-color:#64748b;--file-viewer-input-bg:rgba(15,23,42,.78);--file-viewer-input-color:#f8fafc}\n.file-viewer-web-shell,.file-viewer-web-shell *,.file-viewer-web-shell *::before,.file-viewer-web-shell *::after{box-sizing:border-box}\n.file-viewer-web-shell{position:relative;width:100%;height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--file-viewer-render-surface-background,var(--file-viewer-bg));color:var(--file-viewer-text);font:var(--file-viewer-font);letter-spacing:0;box-sizing:border-box;contain:content}\n.file-viewer-web-shell[data-viewer-density=\"compact\"]{--file-viewer-toolbar-gap:3px;--file-viewer-toolbar-min-height:34px;--file-viewer-toolbar-padding:3px 5px;--file-viewer-toolbar-floating-min-height:32px;--file-viewer-toolbar-floating-padding:3px;--file-viewer-toolbar-floating-offset:10px;--file-viewer-group-gap:2px;--file-viewer-group-padding:2px;--file-viewer-button-radius:6px;--file-viewer-button-min-width:34px;--file-viewer-button-height:26px;--file-viewer-button-padding:0 6px;--file-viewer-icon-button-size:26px;--file-viewer-zoom-meter-min-width:42px;--file-viewer-zoom-meter-padding:0 5px;--file-viewer-floating-button-min-width:38px;--file-viewer-floating-button-height:28px;--file-viewer-floating-icon-button-size:28px;--file-viewer-floating-zoom-meter-min-width:46px;--file-viewer-search-input-height:26px;--file-viewer-search-input-padding:0 8px;--file-viewer-search-button-min-width:28px;--file-viewer-search-button-padding:0 6px;--file-viewer-search-count-min-width:36px;--file-viewer-floating-search-input-height:28px}\n.file-viewer-web-content{position:relative;flex:1 1 auto;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;background:var(--file-viewer-render-surface-background,var(--file-viewer-content-bg))}\n.file-viewer-web-toolbar{flex:0 0 auto;min-height:var(--file-viewer-toolbar-min-height);display:inline-flex;align-items:center;justify-content:flex-end;gap:var(--file-viewer-toolbar-gap);padding:var(--file-viewer-toolbar-padding);border-bottom:1px solid var(--file-viewer-toolbar-border);background:var(--file-viewer-toolbar-bg);box-sizing:border-box;z-index:var(--file-viewer-z-toolbar)}\n.file-viewer-web-toolbar[hidden]{display:none!important}\n.file-viewer-web-toolbar[data-toolbar-position=\"top-center\"]{justify-content:center}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"]{position:absolute;right:calc(var(--file-viewer-toolbar-floating-offset) + env(safe-area-inset-right,0px));bottom:calc(var(--file-viewer-toolbar-floating-offset) + env(safe-area-inset-bottom,0px));min-height:var(--file-viewer-toolbar-floating-min-height);padding:var(--file-viewer-toolbar-floating-padding);border:1px solid var(--file-viewer-border);border-radius:var(--file-viewer-toolbar-radius);background:var(--file-viewer-toolbar-bg);box-shadow:var(--file-viewer-toolbar-shadow);backdrop-filter:blur(16px);z-index:var(--file-viewer-z-floating-toolbar)}\n.file-viewer-web-toolbar-group{display:inline-flex;align-items:center;gap:var(--file-viewer-group-gap);padding:var(--file-viewer-group-padding);border:1px solid var(--file-viewer-group-border);border-radius:var(--file-viewer-toolbar-radius);background:var(--file-viewer-group-bg)}\n.file-viewer-web-toolbar button{min-width:var(--file-viewer-button-min-width);height:var(--file-viewer-button-height);padding:var(--file-viewer-button-padding);border:0;border-radius:var(--file-viewer-button-radius);background:transparent;color:var(--file-viewer-button-color);font:inherit;font-size:12px;font-weight:800;line-height:1;letter-spacing:0;white-space:nowrap;cursor:pointer}\n.file-viewer-web-toolbar button:hover:not(:disabled){background:var(--file-viewer-button-hover-bg);color:var(--file-viewer-button-hover-color)}\n.file-viewer-web-toolbar button:disabled{color:var(--file-viewer-button-disabled-color);cursor:not-allowed}\n.file-viewer-web-toolbar .file-viewer-web-icon-button{width:var(--file-viewer-icon-button-size);min-width:var(--file-viewer-icon-button-size);padding:0;display:inline-flex;align-items:center;justify-content:center}\n.file-viewer-web-theme-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\n.file-viewer-web-toolbar .file-viewer-web-zoom-meter{min-width:var(--file-viewer-zoom-meter-min-width);height:var(--file-viewer-button-height);padding:var(--file-viewer-zoom-meter-padding);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;color:var(--file-viewer-button-color)}\n.file-viewer-web-toolbar .file-viewer-web-zoom-meter--readonly{font-size:12px;font-weight:800;line-height:1;white-space:nowrap}\n.file-viewer-web-print-menu{position:relative;display:inline-flex}\n.file-viewer-web-print-menu > button{min-width:var(--file-viewer-button-min-width);height:var(--file-viewer-button-height);padding:var(--file-viewer-button-padding);border:0;border-radius:var(--file-viewer-button-radius);background:transparent;color:var(--file-viewer-button-color);font:inherit;font-size:12px;font-weight:800;line-height:1;letter-spacing:0;white-space:nowrap;cursor:pointer}\n.file-viewer-web-print-menu > button:hover:not(:disabled){background:var(--file-viewer-button-hover-bg);color:var(--file-viewer-button-hover-color)}\n.file-viewer-web-print-menu > button:disabled{color:var(--file-viewer-button-disabled-color);cursor:not-allowed}\n.file-viewer-web-print-menu-panel{position:absolute;top:calc(100% + 4px);right:0;z-index:40;min-width:118px;padding:4px;border:1px solid var(--file-viewer-group-border);border-radius:10px;background:var(--file-viewer-toolbar-bg);box-shadow:var(--file-viewer-toolbar-shadow);display:none;flex-direction:column;gap:2px}\n.file-viewer-web-print-menu[data-open=\"true\"] .file-viewer-web-print-menu-panel{display:flex}\n.file-viewer-web-print-menu-panel button{width:100%;min-width:0;justify-content:flex-start;text-align:left;border-radius:8px}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-print-menu-panel{top:auto;bottom:calc(100% + 6px);z-index:50}\n.file-viewer-web-search{gap:4px}\n.file-viewer-web-search input{width:clamp(128px,18vw,220px);height:var(--file-viewer-search-input-height);box-sizing:border-box;border:0;border-radius:var(--file-viewer-toolbar-radius);padding:var(--file-viewer-search-input-padding);background:var(--file-viewer-input-bg);color:var(--file-viewer-input-color);font:inherit;font-size:12px;line-height:var(--file-viewer-search-input-height);letter-spacing:0;outline:0}\n.file-viewer-web-search input:focus{box-shadow:0 0 0 2px var(--file-viewer-focus-ring)}\n.file-viewer-web-search button{min-width:var(--file-viewer-search-button-min-width);height:var(--file-viewer-search-input-height);padding:var(--file-viewer-search-button-padding);border-radius:999px}\n.file-viewer-web-search-count{min-width:var(--file-viewer-search-count-min-width);text-align:center;color:var(--file-viewer-muted);font-size:12px;font-weight:800;line-height:var(--file-viewer-search-input-height);white-space:nowrap}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] button{min-width:var(--file-viewer-floating-button-min-width);height:var(--file-viewer-floating-button-height);border-radius:999px}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-icon-button{width:var(--file-viewer-floating-icon-button-size);min-width:var(--file-viewer-floating-icon-button-size)}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-zoom-meter{min-width:var(--file-viewer-floating-zoom-meter-min-width);height:var(--file-viewer-floating-button-height)}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-search button{min-width:var(--file-viewer-search-button-min-width);height:var(--file-viewer-floating-search-input-height)}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-search input{height:var(--file-viewer-floating-search-input-height);line-height:var(--file-viewer-floating-search-input-height);width:clamp(120px,18vw,190px)}\n.file-viewer-web-shell[data-viewer-theme='dark']{color-scheme:dark;--file-viewer-bg:#0f1720;--file-viewer-content-bg:#111b24;--file-viewer-text:#e5eef8;--file-viewer-muted:#cbd5e1;--file-viewer-border:rgba(148,163,184,.18);--file-viewer-toolbar-bg:rgba(15,23,42,.9);--file-viewer-toolbar-border:rgba(148,163,184,.18);--file-viewer-group-bg:rgba(148,163,184,.1);--file-viewer-group-border:rgba(148,163,184,.16);--file-viewer-button-color:#d7dee8;--file-viewer-button-hover-bg:rgba(45,212,191,.14);--file-viewer-button-hover-color:#5eead4;--file-viewer-button-disabled-color:#64748b;--file-viewer-input-bg:rgba(15,23,42,.78);--file-viewer-input-color:#f8fafc}\n@media (prefers-color-scheme:dark){.file-viewer-web-shell[data-viewer-theme='system']{color-scheme:dark;--file-viewer-bg:#0f1720;--file-viewer-content-bg:#111b24;--file-viewer-text:#e5eef8;--file-viewer-muted:#cbd5e1;--file-viewer-border:rgba(148,163,184,.18);--file-viewer-toolbar-bg:rgba(15,23,42,.9);--file-viewer-toolbar-border:rgba(148,163,184,.18);--file-viewer-group-bg:rgba(148,163,184,.1);--file-viewer-group-border:rgba(148,163,184,.16);--file-viewer-button-color:#d7dee8;--file-viewer-button-hover-bg:rgba(45,212,191,.14);--file-viewer-button-hover-color:#5eead4;--file-viewer-button-disabled-color:#64748b;--file-viewer-input-bg:rgba(15,23,42,.78);--file-viewer-input-color:#f8fafc}}\n@media (max-width:640px){.file-viewer-web-toolbar{max-width:100%;overflow-x:auto;overflow-y:visible}.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"]{max-width:calc(100% - 32px);overflow:visible}.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-print-menu-panel{left:50%;right:auto;transform:translateX(-50%);min-width:min(148px,calc(100vw - 32px))}.file-viewer-web-search input{width:120px}}\n", Q = (e, ...t) => {
7865
+ }, kl = /* @__PURE__ */ new WeakMap(), Al = "\n:host,.file-viewer-web-shell{display:block;width:100%;height:100%;min-width:0;min-height:0;contain:content;--file-viewer-bg:transparent;--file-viewer-content-bg:transparent;--file-viewer-text:#172033;--file-viewer-muted:#607282;--file-viewer-font:14px/1.45 system-ui,-apple-system,BlinkMacSystemFont,\"Segoe UI\",sans-serif;--file-viewer-border:rgba(20,35,53,.08);--file-viewer-toolbar-bg:rgba(255,255,255,.92);--file-viewer-toolbar-border:rgba(20,35,53,.06);--file-viewer-toolbar-shadow:0 18px 44px rgba(15,23,42,.16);--file-viewer-toolbar-radius:999px;--file-viewer-toolbar-gap:6px;--file-viewer-toolbar-min-height:45px;--file-viewer-toolbar-padding:6px 10px;--file-viewer-toolbar-floating-min-height:42px;--file-viewer-toolbar-floating-padding:6px;--file-viewer-toolbar-floating-offset:16px;--file-viewer-group-bg:rgba(20,35,53,.035);--file-viewer-group-border:rgba(20,35,53,.08);--file-viewer-group-gap:2px;--file-viewer-group-padding:2px;--file-viewer-button-color:#40546a;--file-viewer-button-hover-bg:rgba(33,163,102,.1);--file-viewer-button-hover-color:#16774c;--file-viewer-button-disabled-color:#aab5c0;--file-viewer-button-radius:8px;--file-viewer-button-min-width:42px;--file-viewer-button-height:30px;--file-viewer-button-padding:0 10px;--file-viewer-icon-button-size:30px;--file-viewer-zoom-meter-min-width:48px;--file-viewer-zoom-meter-padding:0 8px;--file-viewer-floating-button-min-width:48px;--file-viewer-floating-button-height:32px;--file-viewer-floating-icon-button-size:32px;--file-viewer-floating-zoom-meter-min-width:54px;--file-viewer-search-input-height:30px;--file-viewer-search-input-padding:0 10px;--file-viewer-search-button-min-width:32px;--file-viewer-search-button-padding:0 8px;--file-viewer-search-count-min-width:42px;--file-viewer-floating-search-input-height:32px;--file-viewer-focus-ring:rgba(31,157,103,.22);--file-viewer-z-toolbar:20;--file-viewer-z-floating-toolbar:30}\n:host([theme='dark']),.file-viewer-web-shell[data-viewer-theme='dark']{--file-viewer-bg:#0f1720;--file-viewer-content-bg:#111b24;--file-viewer-text:#e5eef8;--file-viewer-muted:#cbd5e1;--file-viewer-border:rgba(148,163,184,.18);--file-viewer-toolbar-bg:rgba(15,23,42,.9);--file-viewer-toolbar-border:rgba(148,163,184,.18);--file-viewer-group-bg:rgba(148,163,184,.1);--file-viewer-group-border:rgba(148,163,184,.16);--file-viewer-button-color:#d7dee8;--file-viewer-button-hover-bg:rgba(45,212,191,.14);--file-viewer-button-hover-color:#5eead4;--file-viewer-button-disabled-color:#64748b;--file-viewer-input-bg:rgba(15,23,42,.78);--file-viewer-input-color:#f8fafc}\n.file-viewer-web-shell,.file-viewer-web-shell *,.file-viewer-web-shell *::before,.file-viewer-web-shell *::after{box-sizing:border-box}\n.file-viewer-web-shell{position:relative;width:100%;height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--file-viewer-render-surface-background,var(--file-viewer-bg));color:var(--file-viewer-text);font:var(--file-viewer-font);letter-spacing:0;box-sizing:border-box;contain:content}\n.file-viewer-web-shell[data-viewer-density=\"compact\"]{--file-viewer-toolbar-gap:3px;--file-viewer-toolbar-min-height:34px;--file-viewer-toolbar-padding:3px 5px;--file-viewer-toolbar-floating-min-height:32px;--file-viewer-toolbar-floating-padding:3px;--file-viewer-toolbar-floating-offset:10px;--file-viewer-group-gap:2px;--file-viewer-group-padding:2px;--file-viewer-button-radius:6px;--file-viewer-button-min-width:34px;--file-viewer-button-height:26px;--file-viewer-button-padding:0 6px;--file-viewer-icon-button-size:26px;--file-viewer-zoom-meter-min-width:42px;--file-viewer-zoom-meter-padding:0 5px;--file-viewer-floating-button-min-width:38px;--file-viewer-floating-button-height:28px;--file-viewer-floating-icon-button-size:28px;--file-viewer-floating-zoom-meter-min-width:46px;--file-viewer-search-input-height:26px;--file-viewer-search-input-padding:0 8px;--file-viewer-search-button-min-width:28px;--file-viewer-search-button-padding:0 6px;--file-viewer-search-count-min-width:36px;--file-viewer-floating-search-input-height:28px}\n.file-viewer-web-content{position:relative;flex:1 1 auto;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;background:var(--file-viewer-render-surface-background,var(--file-viewer-content-bg))}\n.file-viewer-web-toolbar{flex:0 0 auto;min-height:var(--file-viewer-toolbar-min-height);display:inline-flex;align-items:center;justify-content:flex-end;gap:var(--file-viewer-toolbar-gap);padding:var(--file-viewer-toolbar-padding);border-bottom:1px solid var(--file-viewer-toolbar-border);background:var(--file-viewer-toolbar-bg);box-sizing:border-box;z-index:var(--file-viewer-z-toolbar)}\n.file-viewer-web-toolbar[hidden]{display:none!important}\n.file-viewer-web-toolbar[data-toolbar-position=\"top-center\"]{justify-content:center}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"]{position:absolute;right:calc(var(--file-viewer-toolbar-floating-offset) + env(safe-area-inset-right,0px));bottom:calc(var(--file-viewer-toolbar-floating-offset) + env(safe-area-inset-bottom,0px));min-height:var(--file-viewer-toolbar-floating-min-height);padding:var(--file-viewer-toolbar-floating-padding);border:1px solid var(--file-viewer-border);border-radius:var(--file-viewer-toolbar-radius);background:var(--file-viewer-toolbar-bg);box-shadow:var(--file-viewer-toolbar-shadow);backdrop-filter:blur(16px);z-index:var(--file-viewer-z-floating-toolbar)}\n.file-viewer-web-toolbar-group{display:inline-flex;align-items:center;gap:var(--file-viewer-group-gap);padding:var(--file-viewer-group-padding);border:1px solid var(--file-viewer-group-border);border-radius:var(--file-viewer-toolbar-radius);background:var(--file-viewer-group-bg)}\n.file-viewer-web-toolbar button{min-width:var(--file-viewer-button-min-width);height:var(--file-viewer-button-height);padding:var(--file-viewer-button-padding);border:0;border-radius:var(--file-viewer-button-radius);background:transparent;color:var(--file-viewer-button-color);font:inherit;font-size:12px;font-weight:800;line-height:1;letter-spacing:0;white-space:nowrap;cursor:pointer}\n.file-viewer-web-toolbar button:hover:not(:disabled){background:var(--file-viewer-button-hover-bg);color:var(--file-viewer-button-hover-color)}\n.file-viewer-web-toolbar button:disabled{color:var(--file-viewer-button-disabled-color);cursor:not-allowed}\n.file-viewer-web-toolbar .file-viewer-web-icon-button{width:var(--file-viewer-icon-button-size);min-width:var(--file-viewer-icon-button-size);padding:0;display:inline-flex;align-items:center;justify-content:center}\n.file-viewer-web-theme-button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\n.file-viewer-web-toolbar .file-viewer-web-zoom-meter{min-width:var(--file-viewer-zoom-meter-min-width);height:var(--file-viewer-button-height);padding:var(--file-viewer-zoom-meter-padding);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;color:var(--file-viewer-button-color)}\n.file-viewer-web-toolbar .file-viewer-web-zoom-meter--readonly{font-size:12px;font-weight:800;line-height:1;white-space:nowrap}\n.file-viewer-web-print-menu{position:relative;display:inline-flex}\n.file-viewer-web-print-menu > button{min-width:var(--file-viewer-button-min-width);height:var(--file-viewer-button-height);padding:var(--file-viewer-button-padding);border:0;border-radius:var(--file-viewer-button-radius);background:transparent;color:var(--file-viewer-button-color);font:inherit;font-size:12px;font-weight:800;line-height:1;letter-spacing:0;white-space:nowrap;cursor:pointer}\n.file-viewer-web-print-menu > button:hover:not(:disabled){background:var(--file-viewer-button-hover-bg);color:var(--file-viewer-button-hover-color)}\n.file-viewer-web-print-menu > button:disabled{color:var(--file-viewer-button-disabled-color);cursor:not-allowed}\n.file-viewer-web-print-menu-panel{position:absolute;top:calc(100% + 4px);right:0;z-index:40;min-width:118px;padding:4px;border:1px solid var(--file-viewer-group-border);border-radius:10px;background:var(--file-viewer-toolbar-bg);box-shadow:var(--file-viewer-toolbar-shadow);display:none;flex-direction:column;gap:2px}\n.file-viewer-web-print-menu[data-open=\"true\"] .file-viewer-web-print-menu-panel{display:flex}\n.file-viewer-web-print-menu-panel button{width:100%;min-width:0;justify-content:flex-start;text-align:left;border-radius:8px}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-print-menu-panel{top:auto;bottom:calc(100% + 6px);z-index:50}\n.file-viewer-web-search{gap:4px}\n.file-viewer-web-search input{width:clamp(128px,18vw,220px);height:var(--file-viewer-search-input-height);box-sizing:border-box;border:0;border-radius:var(--file-viewer-toolbar-radius);padding:var(--file-viewer-search-input-padding);background:var(--file-viewer-input-bg);color:var(--file-viewer-input-color);font:inherit;font-size:12px;line-height:var(--file-viewer-search-input-height);letter-spacing:0;outline:0}\n.file-viewer-web-search input:focus{box-shadow:0 0 0 2px var(--file-viewer-focus-ring)}\n.file-viewer-web-search button{min-width:var(--file-viewer-search-button-min-width);height:var(--file-viewer-search-input-height);padding:var(--file-viewer-search-button-padding);border-radius:999px}\n.file-viewer-web-search-count{min-width:var(--file-viewer-search-count-min-width);text-align:center;color:var(--file-viewer-muted);font-size:12px;font-weight:800;line-height:var(--file-viewer-search-input-height);white-space:nowrap}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] button{min-width:var(--file-viewer-floating-button-min-width);height:var(--file-viewer-floating-button-height);border-radius:999px}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-icon-button{width:var(--file-viewer-floating-icon-button-size);min-width:var(--file-viewer-floating-icon-button-size)}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-zoom-meter{min-width:var(--file-viewer-floating-zoom-meter-min-width);height:var(--file-viewer-floating-button-height)}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-search button{min-width:var(--file-viewer-search-button-min-width);height:var(--file-viewer-floating-search-input-height)}\n.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-search input{height:var(--file-viewer-floating-search-input-height);line-height:var(--file-viewer-floating-search-input-height);width:clamp(120px,18vw,190px)}\n.file-viewer-web-shell[data-viewer-theme='dark']{color-scheme:dark;--file-viewer-bg:#0f1720;--file-viewer-content-bg:#111b24;--file-viewer-text:#e5eef8;--file-viewer-muted:#cbd5e1;--file-viewer-border:rgba(148,163,184,.18);--file-viewer-toolbar-bg:rgba(15,23,42,.9);--file-viewer-toolbar-border:rgba(148,163,184,.18);--file-viewer-group-bg:rgba(148,163,184,.1);--file-viewer-group-border:rgba(148,163,184,.16);--file-viewer-button-color:#d7dee8;--file-viewer-button-hover-bg:rgba(45,212,191,.14);--file-viewer-button-hover-color:#5eead4;--file-viewer-button-disabled-color:#64748b;--file-viewer-input-bg:rgba(15,23,42,.78);--file-viewer-input-color:#f8fafc}\n@media (prefers-color-scheme:dark){.file-viewer-web-shell[data-viewer-theme='system']{color-scheme:dark;--file-viewer-bg:#0f1720;--file-viewer-content-bg:#111b24;--file-viewer-text:#e5eef8;--file-viewer-muted:#cbd5e1;--file-viewer-border:rgba(148,163,184,.18);--file-viewer-toolbar-bg:rgba(15,23,42,.9);--file-viewer-toolbar-border:rgba(148,163,184,.18);--file-viewer-group-bg:rgba(148,163,184,.1);--file-viewer-group-border:rgba(148,163,184,.16);--file-viewer-button-color:#d7dee8;--file-viewer-button-hover-bg:rgba(45,212,191,.14);--file-viewer-button-hover-color:#5eead4;--file-viewer-button-disabled-color:#64748b;--file-viewer-input-bg:rgba(15,23,42,.78);--file-viewer-input-color:#f8fafc}}\n@media (max-width:640px){.file-viewer-web-toolbar{max-width:100%;overflow-x:auto;overflow-y:visible}.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"]{max-width:calc(100% - 32px);overflow:visible}.file-viewer-web-toolbar[data-toolbar-position=\"bottom-right\"] .file-viewer-web-print-menu-panel{left:50%;right:auto;transform:translateX(-50%);min-width:min(148px,calc(100vw - 32px))}.file-viewer-web-search input{width:120px}}\n", $ = (e, ...t) => {
7865
7866
  let n = e.part;
7866
7867
  if (n != null && n.add) {
7867
7868
  n.add(...t);
@@ -7869,23 +7870,23 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7869
7870
  }
7870
7871
  let r = /* @__PURE__ */ new Set([...(e.getAttribute("part") || "").split(/\s+/).filter(Boolean), ...t]);
7871
7872
  e.setAttribute("part", [...r].join(" "));
7872
- }, $ = (e, t, n, r) => {
7873
+ }, jl = (e, t, n, r) => {
7873
7874
  let i = e.createElement("button");
7874
- return i.type = "button", i.className = n, Q(i, "button"), i.textContent = t, i.title = t, i.setAttribute("aria-label", t), i.addEventListener("click", () => {
7875
+ return i.type = "button", i.className = n, $(i, "button"), i.textContent = t, i.title = t, i.setAttribute("aria-label", t), i.addEventListener("click", () => {
7875
7876
  r();
7876
7877
  }), i;
7877
7878
  }, Ml = (e, t, n) => {
7878
7879
  let r = e.createElement("span");
7879
- return r.className = `${n} file-viewer-web-zoom-meter--readonly`, Q(r, "button"), r.textContent = t, r.title = t, r.setAttribute("aria-label", t), r;
7880
+ return r.className = `${n} file-viewer-web-zoom-meter--readonly`, $(r, "button"), r.textContent = t, r.title = t, r.setAttribute("aria-label", t), r;
7880
7881
  }, Nl = (e, t) => {
7881
7882
  e.innerHTML = t === "dark" ? "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"12\" r=\"4\"/><path d=\"M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.42-1.42M17.66 6.34l1.41-1.41\"/></svg>" : "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z\"/></svg>";
7882
7883
  }, Pl = (e, r = {}, i = {}) => {
7883
7884
  var a, o, s, c, l;
7884
- if (!hl()) throw Error("Flyfish File Viewer can only be mounted in a browser DOM environment.");
7885
- let u = e.ownerDocument, d = Ec((a = r.options) == null ? void 0 : a.styleIsolation), f = d === "auto" || d === "shadow", p = e.shadowRoot, m = Al.get(e), h = !!(p && m === p), g = typeof e.attachShadow == "function" && !e.shadowRoot, _ = null, v = e;
7885
+ if (!ml()) throw Error("Flyfish File Viewer can only be mounted in a browser DOM environment.");
7886
+ let u = e.ownerDocument, d = Tc((a = r.options) == null ? void 0 : a.styleIsolation), f = d === "auto" || d === "shadow", p = e.shadowRoot, m = kl.get(e), h = !!(p && m === p), g = typeof e.attachShadow == "function" && !e.shadowRoot, _ = null, v = e;
7886
7887
  if (f && h && p) v = p;
7887
7888
  else if (f && g) try {
7888
- v = e.attachShadow({ mode: "open" }), Al.set(e, v);
7889
+ v = e.attachShadow({ mode: "open" }), kl.set(e, v);
7889
7890
  } catch (t) {
7890
7891
  v = e;
7891
7892
  }
@@ -7901,13 +7902,13 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7901
7902
  t.dataset.fileViewerLightDomSlot = "true", p.replaceChildren(t), v = e;
7902
7903
  }
7903
7904
  v.replaceChildren();
7904
- let y = Nc(v, jl, { adoptedStyleSheet: Cc(v) }), b = u.createElement("div");
7905
- b.className = "file-viewer-web-shell", Q(b, "shell");
7905
+ let y = Mc(v, Al, { adoptedStyleSheet: Sc(v) }), b = u.createElement("div");
7906
+ b.className = "file-viewer-web-shell", $(b, "shell");
7906
7907
  let x = u.createElement("div");
7907
- x.className = "file-viewer-web-toolbar", Q(x, "toolbar");
7908
+ x.className = "file-viewer-web-toolbar", $(x, "toolbar");
7908
7909
  let S = u.createElement("div");
7909
- S.className = "file-viewer-web-content", Q(S, "content"), S.dataset.viewerScrollContainer = "true", b.append(x, S), v.appendChild(b);
7910
- let C = !1, w = r, E = (c = (s = (o = u.defaultView) == null ? void 0 : o.matchMedia) == null ? void 0 : s.call(o, "(prefers-color-scheme: dark)")) == null ? null : c, D = (e) => E ? nl(e, E.matches) : nl(e), O = gl(w) ? _l(w) : null, k = null, A = /* @__PURE__ */ new Set(), j = {
7910
+ S.className = "file-viewer-web-content", $(S, "content"), S.dataset.viewerScrollContainer = "true", b.append(x, S), v.appendChild(b);
7911
+ let C = !1, w = r, E = (c = (s = (o = u.defaultView) == null ? void 0 : o.matchMedia) == null ? void 0 : s.call(o, "(prefers-color-scheme: dark)")) == null ? null : c, D = (e) => E ? tl(e, E.matches) : tl(e), O = hl(w) ? gl(w) : null, k = null, A = /* @__PURE__ */ new Set(), j = {
7911
7912
  loading: !1,
7912
7913
  ready: !1,
7913
7914
  error: null,
@@ -7920,21 +7921,16 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7920
7921
  viewState: null
7921
7922
  }, M = () => {
7922
7923
  var e;
7923
- return (e = j.lifecycle) != null && e.type ? j.lifecycle.type : O ? Ai(Tl(O)) : "";
7924
- }, ee = () => j.zoom || z.getZoomState() || kl, N = () => io(j.availability || z.getCapabilities() || Ol, ee()), P = () => n(n({}, j), {}, {
7924
+ return (e = j.lifecycle) != null && e.type ? j.lifecycle.type : O ? Ai(wl(O)) : "";
7925
+ }, ee = () => j.zoom || z.getZoomState() || Ol, N = () => ro(j.availability || z.getCapabilities() || Dl, ee()), P = () => n(n({}, j), {}, {
7925
7926
  availability: N(),
7926
7927
  search: j.search ? n(n({}, j.search), {}, { matches: [...j.search.matches] }) : null,
7927
7928
  zoom: j.zoom ? n({}, j.zoom) : null,
7928
7929
  location: j.location ? n({}, j.location) : null,
7929
- viewState: j.viewState ? n(n({}, j.viewState), {}, {
7930
- zoom: j.viewState.zoom ? n({}, j.viewState.zoom) : void 0,
7931
- scroll: j.viewState.scroll ? n({}, j.viewState.scroll) : void 0,
7932
- navigation: j.viewState.navigation ? n({}, j.viewState.navigation) : void 0,
7933
- extra: j.viewState.extra ? n({}, j.viewState.extra) : void 0
7934
- }) : null
7930
+ viewState: Z(j.viewState)
7935
7931
  }), F = () => {
7936
7932
  var e, t, n;
7937
- b.dataset.viewerTheme = el((e = w.options) == null ? void 0 : e.theme), b.dataset.viewerDensity = il((n = (t = w.options) == null ? void 0 : t.ui) == null ? void 0 : n.density), Sc(b, w.options);
7933
+ b.dataset.viewerTheme = $c((e = w.options) == null ? void 0 : e.theme), b.dataset.viewerDensity = rl((n = (t = w.options) == null ? void 0 : t.ui) == null ? void 0 : n.density), xc(b, w.options);
7938
7934
  }, I = null, L = "", te = (e, t) => {
7939
7935
  var n;
7940
7936
  if (e.search === !1 || t.search === !1 || !j.ready || j.loading || j.error || S.querySelector(".file-viewer-missing-renderer")) return !1;
@@ -7943,29 +7939,29 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7943
7939
  }, R = () => {
7944
7940
  if (C) return;
7945
7941
  F();
7946
- let e = w.options || {}, r = qo(e), i = N(), a = te(r, e), o = Jo(r, i, a), s = Yo(o), c = Zo(e, M()), l = j.loading || !!j.error, d = ee(), f = T(e);
7942
+ let e = w.options || {}, r = Ko(e), i = N(), a = te(r, e), o = qo(r, i, a), s = Jo(o), c = Xo(e, M()), l = j.loading || !!j.error, d = ee(), f = T(e);
7947
7943
  if (x.hidden = !s, x.dataset.toolbarPosition = c, x.replaceChildren(), !s) return;
7948
7944
  let p = () => {
7949
7945
  var e, n;
7950
7946
  if (!a) return;
7951
7947
  let r = j.search, i = (e = r == null ? void 0 : r.total) == null ? 0 : e, o = i > 0 ? ((n = r == null ? void 0 : r.currentIndex) == null ? -1 : n) + 1 : 0, s = u.createElement("form");
7952
- s.className = "file-viewer-web-toolbar-group file-viewer-web-search", Q(s, "toolbar-group"), s.setAttribute("role", "search"), s.setAttribute("aria-label", f("toolbar.search"));
7948
+ s.className = "file-viewer-web-toolbar-group file-viewer-web-search", $(s, "toolbar-group"), s.setAttribute("role", "search"), s.setAttribute("aria-label", f("toolbar.search"));
7953
7949
  let c = u.createElement("input");
7954
- c.type = "search", Q(c, "input"), c.value = L, c.placeholder = f("toolbar.searchPlaceholder"), c.title = f("toolbar.searchPlaceholder"), c.setAttribute("aria-label", f("toolbar.searchPlaceholder")), c.disabled = l, c.addEventListener("input", () => {
7950
+ c.type = "search", $(c, "input"), c.value = L, c.placeholder = f("toolbar.searchPlaceholder"), c.title = f("toolbar.searchPlaceholder"), c.setAttribute("aria-label", f("toolbar.searchPlaceholder")), c.disabled = l, c.addEventListener("input", () => {
7955
7951
  L = c.value;
7956
7952
  });
7957
7953
  let d = u.createElement("button");
7958
- d.type = "submit", Q(d, "button"), d.textContent = f("toolbar.search"), d.title = f("toolbar.search"), d.setAttribute("aria-label", f("toolbar.search")), d.disabled = l;
7959
- let p = $(u, "<", "file-viewer-web-icon-button", () => I == null ? void 0 : I.previousSearchResult());
7954
+ d.type = "submit", $(d, "button"), d.textContent = f("toolbar.search"), d.title = f("toolbar.search"), d.setAttribute("aria-label", f("toolbar.search")), d.disabled = l;
7955
+ let p = jl(u, "<", "file-viewer-web-icon-button", () => I == null ? void 0 : I.previousSearchResult());
7960
7956
  p.title = f("toolbar.searchPrevious"), p.setAttribute("aria-label", f("toolbar.searchPrevious")), p.disabled = l || i < 1;
7961
- let m = $(u, ">", "file-viewer-web-icon-button", () => I == null ? void 0 : I.nextSearchResult());
7957
+ let m = jl(u, ">", "file-viewer-web-icon-button", () => I == null ? void 0 : I.nextSearchResult());
7962
7958
  m.title = f("toolbar.searchNext"), m.setAttribute("aria-label", f("toolbar.searchNext")), m.disabled = l || i < 1;
7963
- let h = $(u, "x", "file-viewer-web-icon-button", t(function* () {
7959
+ let h = jl(u, "x", "file-viewer-web-icon-button", t(function* () {
7964
7960
  L = "", yield I == null ? void 0 : I.clearDocumentSearch();
7965
7961
  }));
7966
7962
  h.title = f("toolbar.searchClear"), h.setAttribute("aria-label", f("toolbar.searchClear")), h.disabled = l || !L && !(r != null && r.query);
7967
7963
  let g = u.createElement("span");
7968
- g.className = "file-viewer-web-search-count", Q(g, "toolbar-status"), g.textContent = `${o}/${i}`, g.setAttribute("aria-live", "polite"), s.addEventListener("submit", (e) => {
7964
+ g.className = "file-viewer-web-search-count", $(g, "toolbar-status"), g.textContent = `${o}/${i}`, g.setAttribute("aria-live", "polite"), s.addEventListener("submit", (e) => {
7969
7965
  e.preventDefault(), L = c.value;
7970
7966
  let t = L.trim();
7971
7967
  t ? I == null || I.searchDocument(t) : I == null || I.clearDocumentSearch();
@@ -7973,9 +7969,9 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7973
7969
  }, m = () => {
7974
7970
  if (!o.zoom) return;
7975
7971
  let e = u.createElement("div");
7976
- if (e.className = "file-viewer-web-toolbar-group", Q(e, "toolbar-group"), e.setAttribute("aria-label", f("toolbar.zoomGroup")), i.zoomOut) {
7977
- let t = $(u, "-", "file-viewer-web-icon-button", () => I == null ? void 0 : I.zoomOut());
7978
- t.title = f("toolbar.zoomOut"), t.setAttribute("aria-label", f("toolbar.zoomOut")), t.disabled = Xo({
7972
+ if (e.className = "file-viewer-web-toolbar-group", $(e, "toolbar-group"), e.setAttribute("aria-label", f("toolbar.zoomGroup")), i.zoomOut) {
7973
+ let t = jl(u, "-", "file-viewer-web-icon-button", () => I == null ? void 0 : I.zoomOut());
7974
+ t.title = f("toolbar.zoomOut"), t.setAttribute("aria-label", f("toolbar.zoomOut")), t.disabled = Yo({
7979
7975
  action: "canZoomOut",
7980
7976
  availability: i,
7981
7977
  toolbarDisabled: l,
@@ -7983,8 +7979,8 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7983
7979
  }), e.appendChild(t);
7984
7980
  }
7985
7981
  if (i.zoomReset) {
7986
- let t = $(u, d.label, "file-viewer-web-zoom-meter", () => I == null ? void 0 : I.resetZoom());
7987
- t.title = f("toolbar.zoomReset"), t.disabled = Xo({
7982
+ let t = jl(u, d.label, "file-viewer-web-zoom-meter", () => I == null ? void 0 : I.resetZoom());
7983
+ t.title = f("toolbar.zoomReset"), t.disabled = Yo({
7988
7984
  action: "canReset",
7989
7985
  availability: i,
7990
7986
  toolbarDisabled: l,
@@ -7992,8 +7988,8 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
7992
7988
  }), e.appendChild(t);
7993
7989
  } else e.appendChild(Ml(u, d.label, "file-viewer-web-zoom-meter"));
7994
7990
  if (i.zoomReset) {
7995
- let t = $(u, "1:1", "file-viewer-web-icon-button", () => I == null ? void 0 : I.resetZoom());
7996
- t.title = f("toolbar.zoomReset"), t.setAttribute("aria-label", f("toolbar.zoomReset")), t.disabled = Xo({
7991
+ let t = jl(u, "1:1", "file-viewer-web-icon-button", () => I == null ? void 0 : I.resetZoom());
7992
+ t.title = f("toolbar.zoomReset"), t.setAttribute("aria-label", f("toolbar.zoomReset")), t.disabled = Yo({
7997
7993
  action: "canReset",
7998
7994
  availability: i,
7999
7995
  toolbarDisabled: l,
@@ -8001,8 +7997,8 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
8001
7997
  }), e.appendChild(t);
8002
7998
  }
8003
7999
  if (i.zoomIn) {
8004
- let t = $(u, "+", "file-viewer-web-icon-button", () => I == null ? void 0 : I.zoomIn());
8005
- t.title = f("toolbar.zoomIn"), t.setAttribute("aria-label", f("toolbar.zoomIn")), t.disabled = Xo({
8000
+ let t = jl(u, "+", "file-viewer-web-icon-button", () => I == null ? void 0 : I.zoomIn());
8001
+ t.title = f("toolbar.zoomIn"), t.setAttribute("aria-label", f("toolbar.zoomIn")), t.disabled = Yo({
8006
8002
  action: "canZoomIn",
8007
8003
  availability: i,
8008
8004
  toolbarDisabled: l,
@@ -8012,13 +8008,13 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
8012
8008
  e.childElementCount && x.appendChild(e);
8013
8009
  }, h = (e, t, n, r) => {
8014
8010
  if (!e) return;
8015
- let i = $(u, t, "", r);
8011
+ let i = jl(u, t, "", r);
8016
8012
  i.title = n, i.disabled = l, x.appendChild(i);
8017
8013
  }, g = () => {
8018
8014
  if (!o.theme) return;
8019
- let r = D(e.theme), i = f(r === "dark" ? "toolbar.themeToLight" : "toolbar.themeToDark"), a = $(u, "", "file-viewer-web-icon-button file-viewer-web-theme-button", t(function* () {
8015
+ let r = D(e.theme), i = f(r === "dark" ? "toolbar.themeToLight" : "toolbar.themeToDark"), a = jl(u, "", "file-viewer-web-icon-button file-viewer-web-theme-button", t(function* () {
8020
8016
  var e;
8021
- let t = z.getViewState(), r = rl((e = w.options) == null ? void 0 : e.theme, E == null ? void 0 : E.matches);
8017
+ let t = z.getViewState(), r = nl((e = w.options) == null ? void 0 : e.theme, E == null ? void 0 : E.matches);
8022
8018
  w = n(n({}, w), {}, { options: n(n({}, w.options || {}), {}, { theme: r }) }), z.updateOptions({ theme: r }), ae({
8023
8019
  type: "theme-change",
8024
8020
  payload: r
@@ -8027,17 +8023,17 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
8027
8023
  source: "api"
8028
8024
  }));
8029
8025
  }));
8030
- Q(a, "theme-toggle"), Nl(a, r), a.title = i, a.setAttribute("aria-label", i), a.setAttribute("aria-pressed", String(r === "dark")), a.disabled = l, x.appendChild(a);
8026
+ $(a, "theme-toggle"), Nl(a, r), a.title = i, a.setAttribute("aria-label", i), a.setAttribute("aria-pressed", String(r === "dark")), a.disabled = l, x.appendChild(a);
8031
8027
  };
8032
- Wo(r).forEach((e) => {
8028
+ Uo(r).forEach((e) => {
8033
8029
  if (e === "search") p();
8034
8030
  else if (e === "zoom") m();
8035
8031
  else if (e === "download") h(o.download, f("toolbar.download"), f("toolbar.downloadTitle"), () => I == null ? void 0 : I.downloadOriginalFile());
8036
8032
  else if (e === "print") {
8037
8033
  if (!o.print) return;
8038
8034
  let e = u.createElement("div");
8039
- e.className = "file-viewer-web-print-menu", Q(e, "toolbar-group");
8040
- let n = $(u, f("toolbar.print"), "", () => {
8035
+ e.className = "file-viewer-web-print-menu", $(e, "toolbar-group");
8036
+ let n = jl(u, f("toolbar.print"), "", () => {
8041
8037
  e.dataset.open = e.dataset.open === "true" ? "false" : "true";
8042
8038
  });
8043
8039
  n.title = f("toolbar.printTitle"), n.setAttribute("aria-label", f("toolbar.printTitle")), n.setAttribute("aria-haspopup", "menu"), n.disabled = l;
@@ -8045,11 +8041,11 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
8045
8041
  r.className = "file-viewer-web-print-menu-panel", r.setAttribute("role", "menu");
8046
8042
  let i = () => {
8047
8043
  e.dataset.open = "false";
8048
- }, a = $(u, f("toolbar.printDirect"), "", t(function* () {
8044
+ }, a = jl(u, f("toolbar.printDirect"), "", t(function* () {
8049
8045
  i(), yield I == null ? void 0 : I.printRenderedHtml();
8050
8046
  }));
8051
8047
  a.title = f("toolbar.printTitle"), a.setAttribute("role", "menuitem"), a.disabled = l;
8052
- let s = $(u, f("toolbar.printMask"), "", t(function* () {
8048
+ let s = jl(u, f("toolbar.printMask"), "", t(function* () {
8053
8049
  i(), yield I == null ? void 0 : I.printWithMask();
8054
8050
  }));
8055
8051
  s.title = f("toolbar.printMaskTitle"), s.setAttribute("role", "menuitem"), s.disabled = l, r.append(a, s), e.append(n, r), e.addEventListener("focusout", (t) => {
@@ -8060,7 +8056,7 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
8060
8056
  });
8061
8057
  }, ne = null, re = () => {
8062
8058
  var e;
8063
- el((e = w.options) == null ? void 0 : e.theme) === "system" && (R(), ne == null || ne());
8059
+ $c((e = w.options) == null ? void 0 : e.theme) === "system" && (R(), ne == null || ne());
8064
8060
  }, ie = (e) => {
8065
8061
  var t;
8066
8062
  let n = P();
@@ -8068,7 +8064,7 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
8068
8064
  }, ae = (e) => {
8069
8065
  var t;
8070
8066
  j.lastEvent = e, e.type === "load-start" ? (j.loading = !0, j.ready = !1, j.error = null, j.lifecycle = e.payload, j.search = null, L = "") : e.type === "load-complete" ? (j.loading = !1, j.ready = !0, j.lifecycle = e.payload) : e.type === "unload-start" ? (j.loading = !0, j.ready = !1, j.lifecycle = e.payload) : e.type === "unload-complete" ? (j.loading = !1, j.ready = !1, j.lifecycle = e.payload) : e.type === "operation-availability-change" ? j.availability = e.payload : e.type === "search-change" ? (j.search = e.payload, L = e.payload.query) : e.type === "location-change" ? j.location = e.payload : e.type === "zoom-change" ? j.zoom = e.payload : e.type === "view-state-change" && (j.viewState = e.payload.state), (t = w.onEvent) == null || t.call(w, e), ie(e);
8071
- }, z = pl(S, {
8067
+ }, z = fl(S, {
8072
8068
  registry: i.registry,
8073
8069
  options: w.options,
8074
8070
  onEvent: ae
@@ -8083,13 +8079,13 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
8083
8079
  let n = k;
8084
8080
  try {
8085
8081
  j.loading = !0, j.error = null, ie();
8086
- let t = yield El(e, {
8082
+ let t = yield Tl(e, {
8087
8083
  fetchFile: i.fetchFile,
8088
8084
  signal: n == null ? void 0 : n.signal
8089
8085
  });
8090
8086
  return C || n != null && n.signal.aborted || k !== n ? null : yield z.load(t);
8091
8087
  } catch (r) {
8092
- if (Dl(r) && n != null && n.signal.aborted) return null;
8088
+ if (El(r) && n != null && n.signal.aborted) return null;
8093
8089
  throw j.loading = !1, j.ready = !1, j.error = r, ie(), (t = i.onError) == null || t.call(i, r, e), r;
8094
8090
  } finally {
8095
8091
  k === n && (k = null);
@@ -8110,16 +8106,16 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
8110
8106
  container: e,
8111
8107
  load(e) {
8112
8108
  return t(function* () {
8113
- C || (w = e, z.updateOptions(w.options || {}), R(), gl(w) && (yield oe(_l(w))));
8109
+ C || (w = e, z.updateOptions(w.options || {}), R(), hl(w) && (yield oe(gl(w))));
8114
8110
  })();
8115
8111
  },
8116
8112
  update() {
8117
8113
  return t(function* (e = {}) {
8118
8114
  var t;
8119
8115
  if (C) return;
8120
- let r = (t = e.options) == null ? w.options : t, i = xl(w.options, r);
8116
+ let r = (t = e.options) == null ? w.options : t, i = bl(w.options, r);
8121
8117
  w = n(n(n({}, w), e), {}, { options: r });
8122
- let a = gl(w) ? _l(w) : null, o = Sl(O, a), s = o && i ? z.getViewState() : null;
8118
+ let a = hl(w) ? gl(w) : null, o = xl(O, a), s = o && i ? z.getViewState() : null;
8123
8119
  z.updateOptions(w.options || {}), R(), (!o || i) && (a ? (yield oe(a)) && s && (yield z.applyViewState(s, {
8124
8120
  action: "restore",
8125
8121
  source: "api"
@@ -8139,55 +8135,55 @@ var hl = () => typeof window < "u" && typeof document < "u", gl = (e = {}) => !!
8139
8135
  return z;
8140
8136
  },
8141
8137
  downloadOriginalFile() {
8142
- return Z(z, (e) => e.download(), void 0);
8138
+ return Q(z, (e) => e.download(), void 0);
8143
8139
  },
8144
8140
  printRenderedHtml(e) {
8145
- return Z(z, (t) => t.print(e), void 0);
8141
+ return Q(z, (t) => t.print(e), void 0);
8146
8142
  },
8147
8143
  printWithMask(e) {
8148
- return Z(z, (t) => t.printWithMask(e), void 0);
8144
+ return Q(z, (t) => t.printWithMask(e), void 0);
8149
8145
  },
8150
8146
  exportRenderedHtml() {
8151
- return Z(z, (e) => e.exportHtml({ download: !0 }).then(() => void 0), void 0);
8147
+ return Q(z, (e) => e.exportHtml({ download: !0 }).then(() => void 0), void 0);
8152
8148
  },
8153
8149
  zoomIn() {
8154
- return Z(z, (e) => e.zoomIn(), null);
8150
+ return Q(z, (e) => e.zoomIn(), null);
8155
8151
  },
8156
8152
  zoomOut() {
8157
- return Z(z, (e) => e.zoomOut(), null);
8153
+ return Q(z, (e) => e.zoomOut(), null);
8158
8154
  },
8159
8155
  resetZoom() {
8160
- return Z(z, (e) => e.resetZoom(), null);
8156
+ return Q(z, (e) => e.resetZoom(), null);
8161
8157
  },
8162
8158
  fitToView(e) {
8163
- return Z(z, (t) => t.fitToView(e), null);
8159
+ return Q(z, (t) => t.fitToView(e), null);
8164
8160
  },
8165
8161
  getViewState() {
8166
8162
  return z.getViewState();
8167
8163
  },
8168
8164
  applyViewState(e, t) {
8169
- return Z(z, (n) => n.applyViewState(e, t), null);
8165
+ return Q(z, (n) => n.applyViewState(e, t), null);
8170
8166
  },
8171
8167
  searchDocument(e) {
8172
- return Z(z, (t) => t.search(e), null);
8168
+ return Q(z, (t) => t.search(e), null);
8173
8169
  },
8174
8170
  clearDocumentSearch() {
8175
- return Z(z, (e) => e.clearSearch(), null);
8171
+ return Q(z, (e) => e.clearSearch(), null);
8176
8172
  },
8177
8173
  nextSearchResult() {
8178
- return Z(z, (e) => e.nextSearchResult(), null);
8174
+ return Q(z, (e) => e.nextSearchResult(), null);
8179
8175
  },
8180
8176
  previousSearchResult() {
8181
- return Z(z, (e) => e.previousSearchResult(), null);
8177
+ return Q(z, (e) => e.previousSearchResult(), null);
8182
8178
  },
8183
8179
  collectDocumentAnchors() {
8184
- return Z(z, (e) => e.collectDocumentAnchors(), []);
8180
+ return Q(z, (e) => e.collectDocumentAnchors(), []);
8185
8181
  },
8186
8182
  scrollToAnchor(e) {
8187
- return Z(z, (t) => t.scrollToDocumentAnchor(e), !1);
8183
+ return Q(z, (t) => t.scrollToDocumentAnchor(e), !1);
8188
8184
  },
8189
8185
  scrollToLine(e) {
8190
- return Z(z, (t) => t.scrollToLine(e), !1);
8186
+ return Q(z, (t) => t.scrollToLine(e), !1);
8191
8187
  },
8192
8188
  getDocumentTextChunks() {
8193
8189
  return z.getDocumentTextChunks();