image-pii-redactor 0.5.1 → 0.5.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.
@@ -75,7 +75,7 @@ const { is: xs, defineProperty: Cs, getOwnPropertyDescriptor: $s, getOwnProperty
75
75
  return n;
76
76
  } }, $r = (e, t) => !xs(e, t), Xr = { attribute: !0, type: String, converter: wn, reflect: !1, useDefault: !1, hasChanged: $r };
77
77
  Symbol.metadata ??= Symbol("metadata"), $n.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
- let pt = class extends HTMLElement {
78
+ let gt = class extends HTMLElement {
79
79
  static addInitializer(t) {
80
80
  this._$Ei(), (this.l ??= []).push(t);
81
81
  }
@@ -256,15 +256,15 @@ let pt = class extends HTMLElement {
256
256
  firstUpdated(t) {
257
257
  }
258
258
  };
259
- pt.elementStyles = [], pt.shadowRootOptions = { mode: "open" }, pt[It("elementProperties")] = /* @__PURE__ */ new Map(), pt[It("finalized")] = /* @__PURE__ */ new Map(), Es?.({ ReactiveElement: pt }), ($n.reactiveElementVersions ??= []).push("2.1.2");
259
+ gt.elementStyles = [], gt.shadowRootOptions = { mode: "open" }, gt[It("elementProperties")] = /* @__PURE__ */ new Map(), gt[It("finalized")] = /* @__PURE__ */ new Map(), Es?.({ ReactiveElement: gt }), ($n.reactiveElementVersions ??= []).push("2.1.2");
260
260
  /**
261
261
  * @license
262
262
  * Copyright 2017 Google LLC
263
263
  * SPDX-License-Identifier: BSD-3-Clause
264
264
  */
265
- const Nr = globalThis, Yr = (e) => e, Pn = Nr.trustedTypes, eo = Pn ? Pn.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ga = "$lit$", ze = `lit$${Math.random().toFixed(9).slice(2)}$`, ma = "?" + ze, Ds = `<${ma}>`, et = document, Ht = () => et.createComment(""), Gt = (e) => e === null || typeof e != "object" && typeof e != "function", jr = Array.isArray, Os = (e) => jr(e) || typeof e?.[Symbol.iterator] == "function", Dn = `[
265
+ const Nr = globalThis, Yr = (e) => e, Pn = Nr.trustedTypes, eo = Pn ? Pn.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, ga = "$lit$", ze = `lit$${Math.random().toFixed(9).slice(2)}$`, ma = "?" + ze, Ds = `<${ma}>`, tt = document, Ht = () => tt.createComment(""), Gt = (e) => e === null || typeof e != "object" && typeof e != "function", jr = Array.isArray, Os = (e) => jr(e) || typeof e?.[Symbol.iterator] == "function", Dn = `[
266
266
  \f\r]`, Ct = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, to = /-->/g, no = />/g, We = RegExp(`>|${Dn}(?:([^\\s"'>=/]+)(${Dn}*=${Dn}*(?:[^
267
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ro = /'/g, oo = /"/g, ba = /^(?:script|style|textarea|title)$/i, ya = (e) => (t, ...n) => ({ _$litType$: e, strings: t, values: n }), se = ya(1), kn = ya(2), vt = Symbol.for("lit-noChange"), N = Symbol.for("lit-nothing"), io = /* @__PURE__ */ new WeakMap(), Qe = et.createTreeWalker(et, 129);
267
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ro = /'/g, oo = /"/g, ba = /^(?:script|style|textarea|title)$/i, ya = (e) => (t, ...n) => ({ _$litType$: e, strings: t, values: n }), se = ya(1), kn = ya(2), wt = Symbol.for("lit-noChange"), j = Symbol.for("lit-nothing"), io = /* @__PURE__ */ new WeakMap(), Ze = tt.createTreeWalker(tt, 129);
268
268
  function va(e, t) {
269
269
  if (!jr(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
270
  return eo !== void 0 ? eo.createHTML(t) : t;
@@ -287,11 +287,11 @@ class Ft {
287
287
  this.parts = [];
288
288
  let i = 0, a = 0;
289
289
  const s = t.length - 1, u = this.parts, [c, l] = Hs(t, n);
290
- if (this.el = Ft.createElement(c, r), Qe.currentNode = this.el.content, n === 2 || n === 3) {
290
+ if (this.el = Ft.createElement(c, r), Ze.currentNode = this.el.content, n === 2 || n === 3) {
291
291
  const h = this.el.content.firstChild;
292
292
  h.replaceWith(...h.childNodes);
293
293
  }
294
- for (; (o = Qe.nextNode()) !== null && u.length < s; ) {
294
+ for (; (o = Ze.nextNode()) !== null && u.length < s; ) {
295
295
  if (o.nodeType === 1) {
296
296
  if (o.hasAttributes()) for (const h of o.getAttributeNames()) if (h.endsWith(ga)) {
297
297
  const d = l[a++], m = o.getAttribute(h).split(ze), M = /([.?@])?(.*)/.exec(d);
@@ -301,7 +301,7 @@ class Ft {
301
301
  const h = o.textContent.split(ze), d = h.length - 1;
302
302
  if (d > 0) {
303
303
  o.textContent = Pn ? Pn.emptyScript : "";
304
- for (let m = 0; m < d; m++) o.append(h[m], Ht()), Qe.nextNode(), u.push({ type: 2, index: ++i });
304
+ for (let m = 0; m < d; m++) o.append(h[m], Ht()), Ze.nextNode(), u.push({ type: 2, index: ++i });
305
305
  o.append(h[d], Ht());
306
306
  }
307
307
  }
@@ -314,15 +314,15 @@ class Ft {
314
314
  }
315
315
  }
316
316
  static createElement(t, n) {
317
- const r = et.createElement("template");
317
+ const r = tt.createElement("template");
318
318
  return r.innerHTML = t, r;
319
319
  }
320
320
  }
321
- function wt(e, t, n = e, r) {
322
- if (t === vt) return t;
321
+ function Pt(e, t, n = e, r) {
322
+ if (t === wt) return t;
323
323
  let o = r !== void 0 ? n._$Co?.[r] : n._$Cl;
324
324
  const i = Gt(t) ? void 0 : t._$litDirective$;
325
- return o?.constructor !== i && (o?._$AO?.(!1), i === void 0 ? o = void 0 : (o = new i(e), o._$AT(e, n, r)), r !== void 0 ? (n._$Co ??= [])[r] = o : n._$Cl = o), o !== void 0 && (t = wt(e, o._$AS(e, t.values), o, r)), t;
325
+ return o?.constructor !== i && (o?._$AO?.(!1), i === void 0 ? o = void 0 : (o = new i(e), o._$AT(e, n, r)), r !== void 0 ? (n._$Co ??= [])[r] = o : n._$Cl = o), o !== void 0 && (t = Pt(e, o._$AS(e, t.values), o, r)), t;
326
326
  }
327
327
  class Gs {
328
328
  constructor(t, n) {
@@ -335,17 +335,17 @@ class Gs {
335
335
  return this._$AM._$AU;
336
336
  }
337
337
  u(t) {
338
- const { el: { content: n }, parts: r } = this._$AD, o = (t?.creationScope ?? et).importNode(n, !0);
339
- Qe.currentNode = o;
340
- let i = Qe.nextNode(), a = 0, s = 0, u = r[0];
338
+ const { el: { content: n }, parts: r } = this._$AD, o = (t?.creationScope ?? tt).importNode(n, !0);
339
+ Ze.currentNode = o;
340
+ let i = Ze.nextNode(), a = 0, s = 0, u = r[0];
341
341
  for (; u !== void 0; ) {
342
342
  if (a === u.index) {
343
343
  let c;
344
344
  u.type === 2 ? c = new Tr(i, i.nextSibling, this, t) : u.type === 1 ? c = new u.ctor(i, u.name, u.strings, this, t) : u.type === 6 && (c = new Bs(i, this, t)), this._$AV.push(c), u = r[++s];
345
345
  }
346
- a !== u?.index && (i = Qe.nextNode(), a++);
346
+ a !== u?.index && (i = Ze.nextNode(), a++);
347
347
  }
348
- return Qe.currentNode = et, o;
348
+ return Ze.currentNode = tt, o;
349
349
  }
350
350
  p(t) {
351
351
  let n = 0;
@@ -357,7 +357,7 @@ let Tr = class wa {
357
357
  return this._$AM?._$AU ?? this._$Cv;
358
358
  }
359
359
  constructor(t, n, r, o) {
360
- this.type = 2, this._$AH = N, this._$AN = void 0, this._$AA = t, this._$AB = n, this._$AM = r, this.options = o, this._$Cv = o?.isConnected ?? !0;
360
+ this.type = 2, this._$AH = j, this._$AN = void 0, this._$AA = t, this._$AB = n, this._$AM = r, this.options = o, this._$Cv = o?.isConnected ?? !0;
361
361
  }
362
362
  get parentNode() {
363
363
  let t = this._$AA.parentNode;
@@ -371,7 +371,7 @@ let Tr = class wa {
371
371
  return this._$AB;
372
372
  }
373
373
  _$AI(t, n = this) {
374
- t = wt(this, t, n), Gt(t) ? t === N || t == null || t === "" ? (this._$AH !== N && this._$AR(), this._$AH = N) : t !== this._$AH && t !== vt && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Os(t) ? this.k(t) : this._(t);
374
+ t = Pt(this, t, n), Gt(t) ? t === j || t == null || t === "" ? (this._$AH !== j && this._$AR(), this._$AH = j) : t !== this._$AH && t !== wt && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Os(t) ? this.k(t) : this._(t);
375
375
  }
376
376
  O(t) {
377
377
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -380,7 +380,7 @@ let Tr = class wa {
380
380
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
381
381
  }
382
382
  _(t) {
383
- this._$AH !== N && Gt(this._$AH) ? this._$AA.nextSibling.data = t : this.T(et.createTextNode(t)), this._$AH = t;
383
+ this._$AH !== j && Gt(this._$AH) ? this._$AA.nextSibling.data = t : this.T(tt.createTextNode(t)), this._$AH = t;
384
384
  }
385
385
  $(t) {
386
386
  const { values: n, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Ft.createElement(va(r.h, r.h[0]), this.options)), r);
@@ -419,21 +419,21 @@ class Nn {
419
419
  return this._$AM._$AU;
420
420
  }
421
421
  constructor(t, n, r, o, i) {
422
- this.type = 1, this._$AH = N, this._$AN = void 0, this.element = t, this.name = n, this._$AM = o, this.options = i, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = N;
422
+ this.type = 1, this._$AH = j, this._$AN = void 0, this.element = t, this.name = n, this._$AM = o, this.options = i, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = j;
423
423
  }
424
424
  _$AI(t, n = this, r, o) {
425
425
  const i = this.strings;
426
426
  let a = !1;
427
- if (i === void 0) t = wt(this, t, n, 0), a = !Gt(t) || t !== this._$AH && t !== vt, a && (this._$AH = t);
427
+ if (i === void 0) t = Pt(this, t, n, 0), a = !Gt(t) || t !== this._$AH && t !== wt, a && (this._$AH = t);
428
428
  else {
429
429
  const s = t;
430
430
  let u, c;
431
- for (t = i[0], u = 0; u < i.length - 1; u++) c = wt(this, s[r + u], n, u), c === vt && (c = this._$AH[u]), a ||= !Gt(c) || c !== this._$AH[u], c === N ? t = N : t !== N && (t += (c ?? "") + i[u + 1]), this._$AH[u] = c;
431
+ for (t = i[0], u = 0; u < i.length - 1; u++) c = Pt(this, s[r + u], n, u), c === wt && (c = this._$AH[u]), a ||= !Gt(c) || c !== this._$AH[u], c === j ? t = j : t !== j && (t += (c ?? "") + i[u + 1]), this._$AH[u] = c;
432
432
  }
433
433
  a && !o && this.j(t);
434
434
  }
435
435
  j(t) {
436
- t === N ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
436
+ t === j ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
437
437
  }
438
438
  }
439
439
  class Fs extends Nn {
@@ -441,7 +441,7 @@ class Fs extends Nn {
441
441
  super(...arguments), this.type = 3;
442
442
  }
443
443
  j(t) {
444
- this.element[this.name] = t === N ? void 0 : t;
444
+ this.element[this.name] = t === j ? void 0 : t;
445
445
  }
446
446
  }
447
447
  class Ss extends Nn {
@@ -449,7 +449,7 @@ class Ss extends Nn {
449
449
  super(...arguments), this.type = 4;
450
450
  }
451
451
  j(t) {
452
- this.element.toggleAttribute(this.name, !!t && t !== N);
452
+ this.element.toggleAttribute(this.name, !!t && t !== j);
453
453
  }
454
454
  }
455
455
  class zs extends Nn {
@@ -457,8 +457,8 @@ class zs extends Nn {
457
457
  super(t, n, r, o, i), this.type = 5;
458
458
  }
459
459
  _$AI(t, n = this) {
460
- if ((t = wt(this, t, n, 0) ?? N) === vt) return;
461
- const r = this._$AH, o = t === N && r !== N || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, i = t !== N && (r === N || o);
460
+ if ((t = Pt(this, t, n, 0) ?? j) === wt) return;
461
+ const r = this._$AH, o = t === j && r !== j || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, i = t !== j && (r === j || o);
462
462
  o && this.element.removeEventListener(this.name, this, r), i && this.element.addEventListener(this.name, this, t), this._$AH = t;
463
463
  }
464
464
  handleEvent(t) {
@@ -473,7 +473,7 @@ class Bs {
473
473
  return this._$AM._$AU;
474
474
  }
475
475
  _$AI(t) {
476
- wt(this, t);
476
+ Pt(this, t);
477
477
  }
478
478
  }
479
479
  const Vs = Nr.litHtmlPolyfillSupport;
@@ -493,7 +493,7 @@ const Ms = (e, t, n) => {
493
493
  * SPDX-License-Identifier: BSD-3-Clause
494
494
  */
495
495
  const Ir = globalThis;
496
- let Et = class extends pt {
496
+ let Et = class extends gt {
497
497
  constructor() {
498
498
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
499
499
  }
@@ -512,7 +512,7 @@ let Et = class extends pt {
512
512
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
513
513
  }
514
514
  render() {
515
- return vt;
515
+ return wt;
516
516
  }
517
517
  };
518
518
  Et._$litElement$ = !0, Et.finalized = !0, Ir.litElementHydrateSupport?.({ LitElement: Et });
@@ -555,7 +555,7 @@ const Ks = { attribute: !0, type: String, converter: wn, reflect: !1, hasChanged
555
555
  }
556
556
  throw Error("Unsupported decorator location: " + r);
557
557
  };
558
- function kt(e) {
558
+ function rt(e) {
559
559
  return (t, n) => typeof n == "object" ? _s(e, t, n) : ((r, o, i) => {
560
560
  const a = o.hasOwnProperty(i);
561
561
  return o.constructor.createProperty(i, r), a ? Object.getOwnPropertyDescriptor(o, i) : void 0;
@@ -567,7 +567,7 @@ function kt(e) {
567
567
  * SPDX-License-Identifier: BSD-3-Clause
568
568
  */
569
569
  function J(e) {
570
- return kt({ ...e, state: !0, attribute: !1 });
570
+ return rt({ ...e, state: !0, attribute: !1 });
571
571
  }
572
572
  /**
573
573
  * @license
@@ -1191,16 +1191,16 @@ async function ru(e, t = "eng", n) {
1191
1191
  for (let S = 0; S < m.length; S++) {
1192
1192
  const En = m[S].words ?? [];
1193
1193
  for (let Jt = 0; Jt < En.length; Jt++) {
1194
- const it = En[Jt], Ut = it.text, vs = d, ws = d + Ut.length;
1194
+ const st = En[Jt], Ut = st.text, vs = d, ws = d + Ut.length;
1195
1195
  l.push({
1196
1196
  text: Ut,
1197
1197
  bbox: {
1198
- x0: it.bbox.x0,
1199
- y0: it.bbox.y0,
1200
- x1: it.bbox.x1,
1201
- y1: it.bbox.y1
1198
+ x0: st.bbox.x0,
1199
+ y0: st.bbox.y0,
1200
+ x1: st.bbox.x1,
1201
+ y1: st.bbox.y1
1202
1202
  },
1203
- confidence: it.confidence,
1203
+ confidence: st.confidence,
1204
1204
  charStart: vs,
1205
1205
  charEnd: ws,
1206
1206
  lineIndex: S
@@ -1209,8 +1209,8 @@ async function ru(e, t = "eng", n) {
1209
1209
  S < m.length - 1 && (h += `
1210
1210
  `, d += 1);
1211
1211
  }
1212
- const M = c.data, ot = M.imageWidth ?? a, ys = M.imageHeight ?? s;
1213
- return { fullText: h, words: l, imageWidth: ot, imageHeight: ys };
1212
+ const M = c.data, at = M.imageWidth ?? a, ys = M.imageHeight ?? s;
1213
+ return { fullText: h, words: l, imageWidth: at, imageHeight: ys };
1214
1214
  }
1215
1215
  function ou(e, t, n) {
1216
1216
  return e.filter((r) => r.charStart < n && r.charEnd > t);
@@ -1224,18 +1224,18 @@ let iu = () => new Worker(new URL(
1224
1224
  }), Ie = null, Er = 0;
1225
1225
  function au() {
1226
1226
  return Ie || (Ie = iu(), Ie.onmessage = (e) => {
1227
- const t = e.data, n = Re.get(t.id);
1228
- n && (t.type === "PROGRESS" ? n.onProgress?.(t.event) : t.type === "RESULT" ? (Re.delete(t.id), n.resolve(t.entities)) : t.type === "DONE" ? (Re.delete(t.id), n.resolve(void 0)) : t.type === "ERROR" && (Re.delete(t.id), n.reject(new Error(t.message))));
1227
+ const t = e.data, n = qe.get(t.id);
1228
+ n && (t.type === "PROGRESS" ? n.onProgress?.(t.event) : t.type === "RESULT" ? (qe.delete(t.id), n.resolve(t.entities)) : t.type === "DONE" ? (qe.delete(t.id), n.resolve(void 0)) : t.type === "ERROR" && (qe.delete(t.id), n.reject(new Error(t.message))));
1229
1229
  }, Ie.onerror = (e) => {
1230
- for (const [t, n] of Re)
1231
- n.reject(new Error(`NER worker crashed: ${e.message}`)), Re.delete(t);
1230
+ for (const [t, n] of qe)
1231
+ n.reject(new Error(`NER worker crashed: ${e.message}`)), qe.delete(t);
1232
1232
  Ie = null;
1233
1233
  }), Ie;
1234
1234
  }
1235
- const Re = /* @__PURE__ */ new Map();
1235
+ const qe = /* @__PURE__ */ new Map();
1236
1236
  function Dr(e, t) {
1237
1237
  return new Promise((n, r) => {
1238
- Re.set(e.id, { resolve: n, reject: r, onProgress: t }), au().postMessage(e);
1238
+ qe.set(e.id, { resolve: n, reject: r, onProgress: t }), au().postMessage(e);
1239
1239
  });
1240
1240
  }
1241
1241
  async function su(e, t, n = 0.7, r) {
@@ -1743,7 +1743,7 @@ const Hu = function(e) {
1743
1743
  Array.prototype.splice.apply(e, r);
1744
1744
  }
1745
1745
  return e;
1746
- }, yt = function(e) {
1746
+ }, vt = function(e) {
1747
1747
  const t = / $/, n = /[-–—]/, r = e[e.length - 1];
1748
1748
  r && !t.test(r.post) && !n.test(r.post) && (r.post += " ");
1749
1749
  }, fo = (e, t, n) => {
@@ -1764,10 +1764,10 @@ const Hu = function(e) {
1764
1764
  o.tags.has("ProperNoun") || o.tags.has("Acronym") || ho(o.text) && o.text.length > 1 && (o.text = Lu(o.text));
1765
1765
  }, Ku = function(e, t, n, r) {
1766
1766
  const [o, i, a] = t;
1767
- i === 0 || a === r[o].length ? yt(n) : (yt(n), yt([e[t[1]]])), Wu(e, i, n), xa(e, i, n);
1767
+ i === 0 || a === r[o].length ? vt(n) : (vt(n), vt([e[t[1]]])), Wu(e, i, n), xa(e, i, n);
1768
1768
  }, _u = function(e, t, n, r) {
1769
1769
  const [o, , i] = t, a = (r[o] || []).length;
1770
- i < a ? (fo(e, i, n), yt(n)) : a === i && (yt(e), fo(e, i, n), r[o + 1] && (n[n.length - 1].post += " ")), xa(e, t[2], n), t[4] = n[n.length - 1].id;
1770
+ i < a ? (fo(e, i, n), vt(n)) : a === i && (vt(e), fo(e, i, n), r[o + 1] && (n[n.length - 1].post += " ")), xa(e, t[2], n), t[4] = n[n.length - 1].id;
1771
1771
  };
1772
1772
  let $t = 0;
1773
1773
  const po = (e) => (e = e.length < 3 ? "0" + e : e, e.length < 3 ? "0" + e : e), Ca = function(e) {
@@ -1797,7 +1797,7 @@ const po = (e) => (e = e.length < 3 ? "0" + e : e, e.length < 3 ? "0" + e : e),
1797
1797
  });
1798
1798
  const s = t.toView(i);
1799
1799
  return t.ptrs = a, s.compute(["id", "index", "freeze", "lexicon"]), s.world.compute.preTagger && s.compute("preTagger"), s.compute("unfreeze"), s;
1800
- }, tt = {
1800
+ }, nt = {
1801
1801
  insertAfter: function(e) {
1802
1802
  return bo(e, this, !1);
1803
1803
  },
@@ -1805,9 +1805,9 @@ const po = (e) => (e = e.length < 3 ? "0" + e : e, e.length < 3 ? "0" + e : e),
1805
1805
  return bo(e, this, !0);
1806
1806
  }
1807
1807
  };
1808
- tt.append = tt.insertAfter;
1809
- tt.prepend = tt.insertBefore;
1810
- tt.insert = tt.insertAfter;
1808
+ nt.append = nt.insertAfter;
1809
+ nt.prepend = nt.insertBefore;
1810
+ nt.insert = nt.insertAfter;
1811
1811
  const Ru = /\$[0-9a-z]+/g, Or = {}, qu = (e) => /^\p{Lu}[\p{Ll}'’]/u.test(e) || /^\p{Lu}$/u.test(e), Qu = (e) => e.replace(/^\p{Ll}/u, (t) => t.toUpperCase()), Zu = (e) => e.replace(/^\p{Lu}/u, (t) => t.toLowerCase()), Xu = function(e, t, n) {
1812
1812
  return e.forEach((r) => {
1813
1813
  const o = t(r);
@@ -2039,7 +2039,7 @@ const rc = (e, t) => e.normal < t.normal ? -1 : e.normal > t.normal ? 1 : 0, oc
2039
2039
  }, wc = function() {
2040
2040
  let e = this.ptrs;
2041
2041
  return !e || e.length < 1 ? this : (e = e.map((t) => t.slice(0, 3)), this.ptrs = e, this);
2042
- }, Pc = { harden: vc, soften: wc }, kc = Object.assign({}, Vu, tt, Or, or, St, gc, yc, Pc), Ac = function(e) {
2042
+ }, Pc = { harden: vc, soften: wc }, kc = Object.assign({}, Vu, nt, Or, or, St, gc, yc, Pc), Ac = function(e) {
2043
2043
  Object.assign(e.prototype, kc);
2044
2044
  }, xc = {
2045
2045
  id: function(e) {
@@ -2269,9 +2269,9 @@ const rc = (e, t) => e.normal < t.normal ? -1 : e.normal > t.normal ? 1 : 0, oc
2269
2269
  if (a[l] !== void 0 && s[u + 1]) {
2270
2270
  const h = u + a[l] - 1;
2271
2271
  for (let d = h; d > u; d -= 1) {
2272
- const m = s.slice(u, d + 1), M = m.map((ot) => ot.machine || ot.normal).join(" ");
2272
+ const m = s.slice(u, d + 1), M = m.map((at) => at.machine || at.normal).join(" ");
2273
2273
  if (i.hasOwnProperty(M) === !0) {
2274
- o(m, i[M], t, !1, "1-frozen-multi-lexicon"), m.forEach((ot) => ot.frozen = !0);
2274
+ o(m, i[M], t, !1, "1-frozen-multi-lexicon"), m.forEach((at) => at.frozen = !0);
2275
2275
  continue;
2276
2276
  }
2277
2277
  }
@@ -2621,15 +2621,15 @@ const vl = {
2621
2621
  }, Gr = (e, t, n) => typeof e == "string" || Dl(e) ? t.match(e, n) : e || t.none(), Fr = function(e, t) {
2622
2622
  const [n, r, o] = e;
2623
2623
  return t.document[n] && t.document[n][r] && (e[3] = e[3] || t.document[n][r].id, t.document[n][o - 1] && (e[4] = e[4] || t.document[n][o - 1].id)), e;
2624
- }, Pt = {};
2625
- Pt.splitOn = function(e, t) {
2624
+ }, kt = {};
2625
+ kt.splitOn = function(e, t) {
2626
2626
  const { splitAll: n } = this.methods.one.pointer, r = Gr(e, this, t).fullPointer, o = n(this.fullPointer, r);
2627
2627
  let i = [];
2628
2628
  return o.forEach((a) => {
2629
2629
  i.push(a.passthrough), i.push(a.before), i.push(a.match), i.push(a.after);
2630
2630
  }), i = i.filter((a) => a), i = i.map((a) => Fr(a, this)), this.update(i);
2631
2631
  };
2632
- Pt.splitBefore = function(e, t) {
2632
+ kt.splitBefore = function(e, t) {
2633
2633
  const { splitAll: n } = this.methods.one.pointer, r = Gr(e, this, t).fullPointer, o = n(this.fullPointer, r);
2634
2634
  for (let a = 0; a < o.length; a += 1)
2635
2635
  !o[a].after && o[a + 1] && o[a + 1].before && o[a].match && o[a].match[0] === o[a + 1].before[0] && (o[a].after = o[a + 1].before, delete o[a + 1].before);
@@ -2638,14 +2638,14 @@ Pt.splitBefore = function(e, t) {
2638
2638
  i.push(a.passthrough), i.push(a.before), a.match && a.after ? i.push(Ia(a.match, a.after)) : i.push(a.match);
2639
2639
  }), i = i.filter((a) => a), i = i.map((a) => Fr(a, this)), this.update(i);
2640
2640
  };
2641
- Pt.splitAfter = function(e, t) {
2641
+ kt.splitAfter = function(e, t) {
2642
2642
  const { splitAll: n } = this.methods.one.pointer, r = Gr(e, this, t).fullPointer, o = n(this.fullPointer, r);
2643
2643
  let i = [];
2644
2644
  return o.forEach((a) => {
2645
2645
  i.push(a.passthrough), a.before && a.match ? i.push(Ia(a.before, a.match)) : (i.push(a.before), i.push(a.match)), i.push(a.after);
2646
2646
  }), i = i.filter((a) => a), i = i.map((a) => Fr(a, this)), this.update(i);
2647
2647
  };
2648
- Pt.split = Pt.splitAfter;
2648
+ kt.split = kt.splitAfter;
2649
2649
  const Ol = function(e, t) {
2650
2650
  return !e || !t || e[0] !== t[0] ? !1 : e[2] === t[1];
2651
2651
  }, jo = function(e, t, n) {
@@ -2668,7 +2668,7 @@ const Ol = function(e, t) {
2668
2668
  join: function() {
2669
2669
  return jo(this);
2670
2670
  }
2671
- }, ye = Object.assign({}, Cl, El, Pt, Hl);
2671
+ }, ye = Object.assign({}, Cl, El, kt, Hl);
2672
2672
  ye.lookBehind = ye.before;
2673
2673
  ye.lookBefore = ye.before;
2674
2674
  ye.lookAhead = ye.after;
@@ -2692,23 +2692,23 @@ const Gl = function(e) {
2692
2692
  return n.forEach((o) => {
2693
2693
  Bl(o) || To(o) ? r.push(o) : r = r.concat(o.split(zl));
2694
2694
  }), r = Io(r), r;
2695
- }, Eo = /\{([0-9]+)?(, *[0-9]*)?\}/, Do = /&&/, Ml = new RegExp(/^<\s*(\S+)\s*>/), Oo = (e) => e.charAt(0).toUpperCase() + e.substring(1), ue = (e) => e.charAt(e.length - 1), te = (e) => e.charAt(0), gt = (e) => e.substring(1), mt = (e) => e.substring(0, e.length - 1), Nt = function(e) {
2696
- return e = gt(e), e = mt(e), e;
2695
+ }, Eo = /\{([0-9]+)?(, *[0-9]*)?\}/, Do = /&&/, Ml = new RegExp(/^<\s*(\S+)\s*>/), Oo = (e) => e.charAt(0).toUpperCase() + e.substring(1), ue = (e) => e.charAt(e.length - 1), te = (e) => e.charAt(0), mt = (e) => e.substring(1), bt = (e) => e.substring(0, e.length - 1), Nt = function(e) {
2696
+ return e = mt(e), e = bt(e), e;
2697
2697
  }, Ea = function(e, t) {
2698
2698
  const n = {};
2699
2699
  for (let r = 0; r < 2; r += 1) {
2700
- if (ue(e) === "$" && (n.end = !0, e = mt(e)), te(e) === "^" && (n.start = !0, e = gt(e)), ue(e) === "?" && (n.optional = !0, e = mt(e)), (te(e) === "[" || ue(e) === "]") && (n.group = null, te(e) === "[" && (n.groupStart = !0), ue(e) === "]" && (n.groupEnd = !0), e = e.replace(/^\[/, ""), e = e.replace(/\]$/, ""), te(e) === "<")) {
2700
+ if (ue(e) === "$" && (n.end = !0, e = bt(e)), te(e) === "^" && (n.start = !0, e = mt(e)), ue(e) === "?" && (n.optional = !0, e = bt(e)), (te(e) === "[" || ue(e) === "]") && (n.group = null, te(e) === "[" && (n.groupStart = !0), ue(e) === "]" && (n.groupEnd = !0), e = e.replace(/^\[/, ""), e = e.replace(/\]$/, ""), te(e) === "<")) {
2701
2701
  const o = Ml.exec(e);
2702
2702
  o.length >= 2 && (n.group = o[1], e = e.replace(o[0], ""));
2703
2703
  }
2704
- if (ue(e) === "+" && (n.greedy = !0, e = mt(e)), e !== "*" && ue(e) === "*" && e !== "\\*" && (n.greedy = !0, e = mt(e)), te(e) === "!" && (n.negative = !0, e = gt(e)), te(e) === "~" && ue(e) === "~" && e.length > 2 && (e = Nt(e), n.fuzzy = !0, n.min = t.fuzzy || 0.85, /\(/.test(e) === !1))
2704
+ if (ue(e) === "+" && (n.greedy = !0, e = bt(e)), e !== "*" && ue(e) === "*" && e !== "\\*" && (n.greedy = !0, e = bt(e)), te(e) === "!" && (n.negative = !0, e = mt(e)), te(e) === "~" && ue(e) === "~" && e.length > 2 && (e = Nt(e), n.fuzzy = !0, n.min = t.fuzzy || 0.85, /\(/.test(e) === !1))
2705
2705
  return n.word = e, n;
2706
2706
  if (te(e) === "/" && ue(e) === "/")
2707
2707
  return e = Nt(e), t.caseSensitive && (n.use = "text"), n.regex = new RegExp(e), n;
2708
2708
  if (Eo.test(e) === !0 && (e = e.replace(Eo, (o, i, a) => (a === void 0 ? (n.min = Number(i), n.max = Number(i)) : (a = a.replace(/, */, ""), i === void 0 ? (n.min = 0, n.max = Number(a)) : (n.min = Number(i), n.max = Number(a || 999))), n.greedy = !0, n.min || (n.optional = !0), ""))), te(e) === "(" && ue(e) === ")") {
2709
- Do.test(e) ? (n.choices = e.split(Do), n.operator = "and") : (n.choices = e.split("|"), n.operator = "or"), n.choices[0] = gt(n.choices[0]);
2709
+ Do.test(e) ? (n.choices = e.split(Do), n.operator = "and") : (n.choices = e.split("|"), n.operator = "or"), n.choices[0] = mt(n.choices[0]);
2710
2710
  const o = n.choices.length - 1;
2711
- n.choices[o] = mt(n.choices[o]), n.choices = n.choices.map((i) => i.trim()), n.choices = n.choices.filter((i) => i), n.choices = n.choices.map((i) => i.split(/ /g).map((a) => Ea(a, t))), e = "";
2711
+ n.choices[o] = bt(n.choices[o]), n.choices = n.choices.map((i) => i.trim()), n.choices = n.choices.filter((i) => i), n.choices = n.choices.map((i) => i.split(/ /g).map((a) => Ea(a, t))), e = "";
2712
2712
  }
2713
2713
  if (te(e) === "{" && ue(e) === "}") {
2714
2714
  if (e = Nt(e), n.root = e, /\//.test(e)) {
@@ -2722,7 +2722,7 @@ const Gl = function(e) {
2722
2722
  if (te(e) === "%" && ue(e) === "%")
2723
2723
  return e = Nt(e), n.switch = e, n;
2724
2724
  }
2725
- return te(e) === "#" ? (n.tag = gt(e), n.tag = Oo(n.tag), n) : te(e) === "@" ? (n.method = gt(e), n) : e === "." ? (n.anything = !0, n) : e === "*" ? (n.anything = !0, n.greedy = !0, n.optional = !0, n) : (e && (e = e.replace("\\*", "*"), e = e.replace("\\.", "."), t.caseSensitive ? n.use = "text" : e = e.toLowerCase(), n.word = e), n);
2725
+ return te(e) === "#" ? (n.tag = mt(e), n.tag = Oo(n.tag), n) : te(e) === "@" ? (n.method = mt(e), n) : e === "." ? (n.anything = !0, n) : e === "*" ? (n.anything = !0, n.greedy = !0, n.optional = !0, n) : (e && (e = e.replace("\\*", "*"), e = e.replace("\\.", "."), t.caseSensitive ? n.use = "text" : e = e.toLowerCase(), n.word = e), n);
2726
2726
  }, Ll = /[a-z0-9][-–—][a-z]/i, Wl = function(e, t) {
2727
2727
  const n = t.model.one.prefixes;
2728
2728
  for (let r = e.length - 1; r >= 0; r -= 1) {
@@ -3243,7 +3243,7 @@ const rh = function(e, t) {
3243
3243
  t.hasOwnProperty(a.id) && (r += t[a.id].join("")), r += a.pre || "", r += a.text || "", n.hasOwnProperty(a.id) && (r += n[a.id].join("")), r += a.post || "";
3244
3244
  }
3245
3245
  }), r;
3246
- }, Ih = { html: Th }, Ha = /[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/, ar = /^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/, Eh = /[,:;)('"\u201D\]]/, Dh = /^[-–—]$/, Oh = / /, qe = function(e, t, n = !0) {
3246
+ }, Ih = { html: Th }, Ha = /[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/, ar = /^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/, Eh = /[,:;)('"\u201D\]]/, Dh = /^[-–—]$/, Oh = / /, Qe = function(e, t, n = !0) {
3247
3247
  let r = "";
3248
3248
  return e.forEach((o) => {
3249
3249
  let i = o.pre || "", a = o.post || "";
@@ -3256,7 +3256,7 @@ const rh = function(e, t) {
3256
3256
  if (!e || !e[0] || !e[0][0])
3257
3257
  return n;
3258
3258
  for (let r = 0; r < e.length; r += 1)
3259
- n += qe(e[r], t, !0);
3259
+ n += Qe(e[r], t, !0);
3260
3260
  if (t.keepSpace || (n = n.trim()), t.keepEndPunct === !1) {
3261
3261
  e[0][0].tags.has("Emoticon") || (n = n.replace(ar, ""));
3262
3262
  const r = e[e.length - 1];
@@ -3297,18 +3297,18 @@ const rh = function(e, t) {
3297
3297
  Le.clean = Le.normal;
3298
3298
  Le.reduced = Le.root;
3299
3299
  const Ga = [];
3300
- let Ze = 0;
3301
- for (; Ze < 64; )
3302
- Ga[Ze] = 0 | Math.sin(++Ze % Math.PI) * 4294967296;
3300
+ let Xe = 0;
3301
+ for (; Xe < 64; )
3302
+ Ga[Xe] = 0 | Math.sin(++Xe % Math.PI) * 4294967296;
3303
3303
  const zr = function(e) {
3304
3304
  let t, n, r, o = decodeURI(encodeURI(e)) + "€", i = o.length;
3305
3305
  const a = [t = 1732584193, n = 4023233417, ~t, ~n], s = [];
3306
3306
  for (e = --i / 4 + 2 | 15, s[--e] = i * 8; ~i; )
3307
3307
  s[i >> 2] |= o.charCodeAt(i) << 8 * i--;
3308
- for (Ze = o = 0; Ze < e; Ze += 16) {
3308
+ for (Xe = o = 0; Xe < e; Xe += 16) {
3309
3309
  for (i = a; o < 64; i = [
3310
3310
  r = i[3],
3311
- t + ((r = i[0] + [t & n | ~t & r, r & t | ~r & n, t ^ n ^ r, n ^ (t | ~r)][i = o >> 4] + Ga[o] + ~~s[Ze | [o, 5 * o + 1, 3 * o + 5, 7 * o][i] & 15]) << (i = [7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21][4 * i + o++ % 4]) | r >>> -i),
3311
+ t + ((r = i[0] + [t & n | ~t & r, r & t | ~r & n, t ^ n ^ r, n ^ (t | ~r)][i = o >> 4] + Ga[o] + ~~s[Xe | [o, 5 * o + 1, 3 * o + 5, 7 * o][i] & 15]) << (i = [7, 12, 17, 22, 5, 9, 14, 20, 4, 11, 16, 23, 6, 10, 15, 21][4 * i + o++ % 4]) | r >>> -i),
3312
3312
  t,
3313
3313
  n
3314
3314
  ])
@@ -3324,12 +3324,12 @@ const zr = function(e) {
3324
3324
  }, Bo = { case: "none", unicode: "some", form: "machine", punctuation: "some" }, Vn = function(e, t) {
3325
3325
  return Object.assign({}, e, t);
3326
3326
  }, Oe = {
3327
- text: (e) => qe(e, { keepPunct: !0 }, !1),
3328
- normal: (e) => qe(e, Vn(Le.normal, { keepPunct: !0 }), !1),
3329
- implicit: (e) => qe(e, Vn(Le.implicit, { keepPunct: !0 }), !1),
3330
- machine: (e) => qe(e, Bo, !1),
3331
- root: (e) => qe(e, Vn(Bo, { form: "root" }), !1),
3332
- hash: (e) => zr(qe(e, { keepPunct: !0 }, !1)),
3327
+ text: (e) => Qe(e, { keepPunct: !0 }, !1),
3328
+ normal: (e) => Qe(e, Vn(Le.normal, { keepPunct: !0 }), !1),
3329
+ implicit: (e) => Qe(e, Vn(Le.implicit, { keepPunct: !0 }), !1),
3330
+ machine: (e) => Qe(e, Bo, !1),
3331
+ root: (e) => Qe(e, Vn(Bo, { form: "root" }), !1),
3332
+ hash: (e) => zr(Qe(e, { keepPunct: !0 }, !1)),
3333
3333
  offset: (e) => {
3334
3334
  const t = Oe.text(e).length;
3335
3335
  return {
@@ -4116,7 +4116,7 @@ const Ka = function(e) {
4116
4116
  Ka.prototype.plugin = function(e) {
4117
4117
  e(this);
4118
4118
  };
4119
- const at = {
4119
+ const ut = {
4120
4120
  Noun: "blue",
4121
4121
  Verb: "green",
4122
4122
  Negative: "green",
@@ -4129,12 +4129,12 @@ const at = {
4129
4129
  Hyphenated: "cyan",
4130
4130
  Adverb: "cyan"
4131
4131
  }, Ud = function(e) {
4132
- if (at.hasOwnProperty(e.id))
4133
- return at[e.id];
4134
- if (at.hasOwnProperty(e.is))
4135
- return at[e.is];
4136
- const t = e._cache.parents.find((n) => at[n]);
4137
- return at[t];
4132
+ if (ut.hasOwnProperty(e.id))
4133
+ return ut[e.id];
4134
+ if (ut.hasOwnProperty(e.is))
4135
+ return ut[e.is];
4136
+ const t = e._cache.parents.find((n) => ut[n]);
4137
+ return ut[t];
4138
4138
  }, Rd = function(e) {
4139
4139
  const t = {};
4140
4140
  return e.forEach((n) => {
@@ -5249,26 +5249,26 @@ const qa = {
5249
5249
  Verb: "true¦born,cannot,gonna,has,keep tabs,msg",
5250
5250
  "Person|Verb": "true¦b8ch7dr6foster,gra5ja9lan4ma2ni9ollie,p1rob,s0wade;kip,pike,t5ue;at,eg,ier2;ck,r0;k,shal;ce;ce,nt;ew;ase,u1;iff,l1ob,u0;ck;aze,ossom",
5251
5251
  "Person|Date": "true¦a2j0sep;an0une;!uary;p0ugust,v0;ril"
5252
- }, Xe = 36, hr = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", ti = hr.split("").reduce(function(e, t, n) {
5252
+ }, Ye = 36, hr = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", ti = hr.split("").reduce(function(e, t, n) {
5253
5253
  return e[t] = n, e;
5254
5254
  }, {}), Bp = function(e) {
5255
5255
  if (hr[e] !== void 0)
5256
5256
  return hr[e];
5257
- let t = 1, n = Xe, r = "";
5258
- for (; e >= n; e -= n, t++, n *= Xe)
5257
+ let t = 1, n = Ye, r = "";
5258
+ for (; e >= n; e -= n, t++, n *= Ye)
5259
5259
  ;
5260
5260
  for (; t--; ) {
5261
- const o = e % Xe;
5262
- r = String.fromCharCode((o < 10 ? 48 : 55) + o) + r, e = (e - o) / Xe;
5261
+ const o = e % Ye;
5262
+ r = String.fromCharCode((o < 10 ? 48 : 55) + o) + r, e = (e - o) / Ye;
5263
5263
  }
5264
5264
  return r;
5265
5265
  }, Vp = function(e) {
5266
5266
  if (ti[e] !== void 0)
5267
5267
  return ti[e];
5268
- let t = 0, n = 1, r = Xe, o = 1;
5269
- for (; n < e.length; t += r, n++, r *= Xe)
5268
+ let t = 0, n = 1, r = Ye, o = 1;
5269
+ for (; n < e.length; t += r, n++, r *= Ye)
5270
5270
  ;
5271
- for (let i = e.length - 1; i >= 0; i--, o *= Xe) {
5271
+ for (let i = e.length - 1; i >= 0; i--, o *= Ye) {
5272
5272
  let a = e.charCodeAt(i) - 48;
5273
5273
  a > 10 && (a -= 7), t += a * o;
5274
5274
  }
@@ -6509,26 +6509,26 @@ const f = "Singular", H = {
6509
6509
  afterTags: Object.assign({}, Ve.afterTags, H.afterTags, Xt.afterTags),
6510
6510
  beforeWords: Object.assign({}, Ve.beforeWords, H.beforeWords, Xt.beforeWords),
6511
6511
  afterWords: Object.assign({}, Ve.afterWords, H.afterWords, Xt.afterWords)
6512
- }, st = "Singular", Ke = "Infinitive", ag = {
6512
+ }, ct = "Singular", Ke = "Infinitive", ag = {
6513
6513
  beforeTags: Object.assign({}, Z.beforeTags, H.beforeTags, {
6514
6514
  // Noun: undefined
6515
- Adjective: st,
6515
+ Adjective: ct,
6516
6516
  //great name
6517
- Particle: st
6517
+ Particle: ct
6518
6518
  //brought under control
6519
6519
  }),
6520
6520
  afterTags: Object.assign({}, Z.afterTags, H.afterTags, {
6521
6521
  ProperNoun: Ke,
6522
6522
  Gerund: Ke,
6523
6523
  Adjective: Ke,
6524
- Copula: st
6524
+ Copula: ct
6525
6525
  }),
6526
6526
  beforeWords: Object.assign({}, Z.beforeWords, H.beforeWords, {
6527
6527
  // is time
6528
- is: st,
6529
- was: st,
6528
+ is: ct,
6529
+ was: ct,
6530
6530
  //balance of power
6531
- of: st,
6531
+ of: ct,
6532
6532
  have: null
6533
6533
  //have cash
6534
6534
  }),
@@ -6592,43 +6592,43 @@ const f = "Singular", H = {
6592
6592
  wanted: x
6593
6593
  // and:true, //sue and jeff
6594
6594
  }
6595
- }, E = "Month", sg = "Person", Yt = {
6595
+ }, D = "Month", sg = "Person", Yt = {
6596
6596
  beforeTags: {
6597
- Date: E,
6598
- Value: E
6597
+ Date: D,
6598
+ Value: D
6599
6599
  },
6600
6600
  afterTags: {
6601
- Date: E,
6602
- Value: E
6601
+ Date: D,
6602
+ Value: D
6603
6603
  },
6604
6604
  beforeWords: {
6605
- by: E,
6606
- in: E,
6607
- on: E,
6608
- during: E,
6609
- after: E,
6610
- before: E,
6611
- between: E,
6612
- until: E,
6613
- til: E,
6614
- sometime: E,
6615
- of: E,
6605
+ by: D,
6606
+ in: D,
6607
+ on: D,
6608
+ during: D,
6609
+ after: D,
6610
+ before: D,
6611
+ between: D,
6612
+ until: D,
6613
+ til: D,
6614
+ sometime: D,
6615
+ of: D,
6616
6616
  //5th of april
6617
- this: E,
6617
+ this: D,
6618
6618
  //this april
6619
- next: E,
6620
- last: E,
6621
- previous: E,
6622
- following: E,
6619
+ next: D,
6620
+ last: D,
6621
+ previous: D,
6622
+ following: D,
6623
6623
  with: sg
6624
6624
  // for: p,
6625
6625
  },
6626
6626
  afterWords: {
6627
- sometime: E,
6628
- in: E,
6629
- of: E,
6630
- until: E,
6631
- the: E
6627
+ sometime: D,
6628
+ in: D,
6629
+ of: D,
6630
+ until: D,
6631
+ the: D
6632
6632
  //june the 4th
6633
6633
  }
6634
6634
  }, ug = {
@@ -6703,7 +6703,7 @@ const f = "Singular", H = {
6703
6703
  long: ce
6704
6704
  //foot long
6705
6705
  }
6706
- }, bt = {
6706
+ }, yt = {
6707
6707
  "Actor|Verb": Yp,
6708
6708
  "Adj|Gerund": eg,
6709
6709
  "Adj|Noun": tg,
@@ -6721,13 +6721,13 @@ const f = "Singular", H = {
6721
6721
  const n = Object.keys(e).reduce((r, o) => (r[o] = e[o] === "Infinitive" ? "PresentTense" : "Plural", r), {});
6722
6722
  return Object.assign(n, t);
6723
6723
  };
6724
- bt["Plural|Verb"] = {
6725
- beforeWords: tn(bt["Noun|Verb"].beforeWords, {
6724
+ yt["Plural|Verb"] = {
6725
+ beforeWords: tn(yt["Noun|Verb"].beforeWords, {
6726
6726
  had: "Plural",
6727
6727
  //had tears
6728
6728
  have: "Plural"
6729
6729
  }),
6730
- afterWords: tn(bt["Noun|Verb"].afterWords, {
6730
+ afterWords: tn(yt["Noun|Verb"].afterWords, {
6731
6731
  his: "PresentTense",
6732
6732
  her: "PresentTense",
6733
6733
  its: "PresentTense",
@@ -6738,7 +6738,7 @@ bt["Plural|Verb"] = {
6738
6738
  by: "PresentTense"
6739
6739
  //it works by
6740
6740
  }),
6741
- beforeTags: tn(bt["Noun|Verb"].beforeTags, {
6741
+ beforeTags: tn(yt["Noun|Verb"].beforeTags, {
6742
6742
  Conjunction: "PresentTense",
6743
6743
  //and changes
6744
6744
  Noun: void 0,
@@ -6746,7 +6746,7 @@ bt["Plural|Verb"] = {
6746
6746
  ProperNoun: "PresentTense"
6747
6747
  //john plays
6748
6748
  }),
6749
- afterTags: tn(bt["Noun|Verb"].afterTags, {
6749
+ afterTags: tn(yt["Noun|Verb"].afterTags, {
6750
6750
  Gerund: "Plural",
6751
6751
  //ice caps disappearing
6752
6752
  Noun: "PresentTense",
@@ -6755,7 +6755,7 @@ bt["Plural|Verb"] = {
6755
6755
  //changes seven gears
6756
6756
  })
6757
6757
  };
6758
- const A = "Adjective", L = "Infinitive", _e = "PresentTense", w = "Singular", W = "PastTense", ut = "Adverb", ne = "Plural", G = "Actor", nn = "Verb", q = "Noun", pg = "ProperNoun", fe = "LastName", ri = "Modal", C = "Place", Wn = "Participle", gg = [
6758
+ const A = "Adjective", L = "Infinitive", _e = "PresentTense", w = "Singular", W = "PastTense", lt = "Adverb", ne = "Plural", G = "Actor", nn = "Verb", q = "Noun", pg = "ProperNoun", fe = "LastName", ri = "Modal", C = "Place", Wn = "Participle", gg = [
6759
6759
  null,
6760
6760
  null,
6761
6761
  {
@@ -6763,7 +6763,7 @@ const A = "Adjective", L = "Infinitive", _e = "PresentTense", w = "Singular", W
6763
6763
  ea: w,
6764
6764
  ia: q,
6765
6765
  ic: A,
6766
- ly: ut,
6766
+ ly: lt,
6767
6767
  "'n": nn,
6768
6768
  "'t": nn
6769
6769
  },
@@ -6772,7 +6772,7 @@ const A = "Adjective", L = "Infinitive", _e = "PresentTense", w = "Singular", W
6772
6772
  oed: W,
6773
6773
  ued: W,
6774
6774
  xed: W,
6775
- " so": ut,
6775
+ " so": lt,
6776
6776
  "'ll": ri,
6777
6777
  "'re": "Copula",
6778
6778
  azy: A,
@@ -6842,7 +6842,7 @@ const A = "Adjective", L = "Infinitive", _e = "PresentTense", w = "Singular", W
6842
6842
  wner: w,
6843
6843
  //owner
6844
6844
  fies: _e,
6845
- fore: ut,
6845
+ fore: lt,
6846
6846
  gate: L,
6847
6847
  gone: A,
6848
6848
  ices: ne,
@@ -6936,7 +6936,7 @@ const A = "Adjective", L = "Infinitive", _e = "PresentTense", w = "Singular", W
6936
6936
  ances: ne,
6937
6937
  bound: A,
6938
6938
  ettes: ne,
6939
- fully: ut,
6939
+ fully: lt,
6940
6940
  ishes: _e,
6941
6941
  ities: ne,
6942
6942
  marek: fe,
@@ -6949,8 +6949,8 @@ const A = "Adjective", L = "Infinitive", _e = "PresentTense", w = "Singular", W
6949
6949
  tches: _e,
6950
6950
  tieth: "Ordinal",
6951
6951
  tures: ne,
6952
- wards: ut,
6953
- where: ut,
6952
+ wards: lt,
6953
+ where: lt,
6954
6954
  archy: q,
6955
6955
  pathy: q,
6956
6956
  opoly: q,
@@ -7282,7 +7282,7 @@ const A = "Adjective", L = "Infinitive", _e = "PresentTense", w = "Singular", W
7282
7282
  ["who", T],
7283
7283
  ["jr", "Person"]
7284
7284
  ]
7285
- }, nt = {
7285
+ }, ot = {
7286
7286
  Comparative: {
7287
7287
  fwd: "3:ser,ier¦1er:h,t,f,l,n¦1r:e¦2er:ss,or,om",
7288
7288
  both: "3er:ver,ear,alm¦3ner:hin¦3ter:lat¦2mer:im¦2er:ng,rm,mb¦2ber:ib¦2ger:ig¦1er:w,p,k,d¦ier:y",
@@ -7375,9 +7375,9 @@ const A = "Adjective", L = "Infinitive", _e = "PresentTense", w = "Singular", W
7375
7375
  }, sn = function(e) {
7376
7376
  let t = kg(e);
7377
7377
  return Object.keys(t).reduce((n, r) => (n[r] = Ag(r, t[r]), n), {});
7378
- }, rt = function(e = {}) {
7378
+ }, it = function(e = {}) {
7379
7379
  return typeof e == "string" && (e = JSON.parse(e)), e.fwd = sn(e.fwd || ""), e.both = sn(e.both || ""), e.rev = sn(e.rev || ""), e.ex = sn(e.ex || ""), e;
7380
- }, Qa = rt(nt.PastTense), Za = rt(nt.PresentTense), Xa = rt(nt.Gerund), Ya = rt(nt.Participle), xg = xt(Qa), Cg = xt(Za), $g = xt(Xa), Ng = xt(Ya), es = rt(nt.Comparative), ts = rt(nt.Superlative), jg = xt(es), Tg = xt(ts), Ig = rt(nt.AdjToNoun), ns = {
7380
+ }, Qa = it(ot.PastTense), Za = it(ot.PresentTense), Xa = it(ot.Gerund), Ya = it(ot.Participle), xg = xt(Qa), Cg = xt(Za), $g = xt(Xa), Ng = xt(Ya), es = it(ot.Comparative), ts = it(ot.Superlative), jg = xt(es), Tg = xt(ts), Ig = it(ot.AdjToNoun), ns = {
7381
7381
  fromPast: Qa,
7382
7382
  fromPresent: Za,
7383
7383
  fromGerund: Xa,
@@ -7917,7 +7917,7 @@ const A = "Adjective", L = "Infinitive", _e = "PresentTense", w = "Singular", W
7917
7917
  const o = rs(e, t);
7918
7918
  return o !== e && n.push(o), n;
7919
7919
  }, zg = { toPlural: In, toSingular: rs, all: Sg };
7920
- let Ye = {
7920
+ let et = {
7921
7921
  Gerund: ["ing"],
7922
7922
  Actor: ["erer"],
7923
7923
  Infinitive: [
@@ -8002,13 +8002,13 @@ let Ye = {
8002
8002
  ],
8003
8003
  Participle: ["ken", "wn"]
8004
8004
  };
8005
- Ye = Object.keys(Ye).reduce((e, t) => (Ye[t].forEach((n) => e[n] = t), e), {});
8005
+ et = Object.keys(et).reduce((e, t) => (et[t].forEach((n) => e[n] = t), e), {});
8006
8006
  const os = function(e) {
8007
8007
  const t = e.substring(e.length - 3);
8008
- if (Ye.hasOwnProperty(t) === !0)
8009
- return Ye[t];
8008
+ if (et.hasOwnProperty(t) === !0)
8009
+ return et[t];
8010
8010
  const n = e.substring(e.length - 2);
8011
- return Ye.hasOwnProperty(n) === !0 ? Ye[n] : e.substring(e.length - 1) === "s" ? "PresentTense" : null;
8011
+ return et.hasOwnProperty(n) === !0 ? et[n] : e.substring(e.length - 1) === "s" ? "PresentTense" : null;
8012
8012
  }, Bg = function(e, t) {
8013
8013
  let n = "", r = {};
8014
8014
  t.one && t.one.prefixes && (r = t.one.prefixes);
@@ -8556,7 +8556,7 @@ let br = {
8556
8556
  regexText: Dg,
8557
8557
  regexNumbers: Og,
8558
8558
  switches: fr,
8559
- clues: bt,
8559
+ clues: yt,
8560
8560
  uncountable: {},
8561
8561
  orgWords: Hg,
8562
8562
  placeWords: Gg
@@ -11278,7 +11278,7 @@ v.plugin(q0);
11278
11278
  v.plugin(D1);
11279
11279
  v.plugin(F1);
11280
11280
  v.plugin(K1);
11281
- const ct = function(e) {
11281
+ const ht = function(e) {
11282
11282
  const { fromComparative: t, fromSuperlative: n } = e.methods.two.transform.adjective, r = e.text("normal");
11283
11283
  return e.has("#Comparative") ? t(r, e.model) : e.has("#Superlative") ? n(r, e.model) : r;
11284
11284
  }, _1 = function(e) {
@@ -11289,7 +11289,7 @@ const ct = function(e) {
11289
11289
  json(r = {}) {
11290
11290
  const { toAdverb: o, toNoun: i, toSuperlative: a, toComparative: s } = this.methods.two.transform.adjective;
11291
11291
  return r.normal = !0, this.map((u) => {
11292
- const c = u.toView().json(r)[0] || {}, l = ct(u);
11292
+ const c = u.toView().json(r)[0] || {}, l = ht(u);
11293
11293
  return c.adjective = {
11294
11294
  adverb: o(l, this.model),
11295
11295
  noun: i(l, this.model),
@@ -11304,7 +11304,7 @@ const ct = function(e) {
11304
11304
  conjugate(r) {
11305
11305
  const { toComparative: o, toSuperlative: i, toNoun: a, toAdverb: s } = this.methods.two.transform.adjective;
11306
11306
  return this.getNth(r).map((u) => {
11307
- const c = ct(u);
11307
+ const c = ht(u);
11308
11308
  return {
11309
11309
  Adjective: c,
11310
11310
  Comparative: o(c, this.model),
@@ -11317,28 +11317,28 @@ const ct = function(e) {
11317
11317
  toComparative(r) {
11318
11318
  const { toComparative: o } = this.methods.two.transform.adjective;
11319
11319
  return this.getNth(r).map((i) => {
11320
- const a = ct(i), s = o(a, this.model);
11320
+ const a = ht(i), s = o(a, this.model);
11321
11321
  return i.replaceWith(s);
11322
11322
  });
11323
11323
  }
11324
11324
  toSuperlative(r) {
11325
11325
  const { toSuperlative: o } = this.methods.two.transform.adjective;
11326
11326
  return this.getNth(r).map((i) => {
11327
- const a = ct(i), s = o(a, this.model);
11327
+ const a = ht(i), s = o(a, this.model);
11328
11328
  return i.replaceWith(s);
11329
11329
  });
11330
11330
  }
11331
11331
  toAdverb(r) {
11332
11332
  const { toAdverb: o } = this.methods.two.transform.adjective;
11333
11333
  return this.getNth(r).map((i) => {
11334
- const a = ct(i), s = o(a, this.model);
11334
+ const a = ht(i), s = o(a, this.model);
11335
11335
  return i.replaceWith(s);
11336
11336
  });
11337
11337
  }
11338
11338
  toNoun(r) {
11339
11339
  const { toNoun: o } = this.methods.two.transform.adjective;
11340
11340
  return this.getNth(r).map((i) => {
11341
- const a = ct(i), s = o(a, this.model);
11341
+ const a = ht(i), s = o(a, this.model);
11342
11342
  return i.replaceWith(s);
11343
11343
  });
11344
11344
  }
@@ -13129,7 +13129,7 @@ const Ob = {
13129
13129
  negative: ev(t),
13130
13130
  phrasal: tv(n)
13131
13131
  };
13132
- }, ge = { tense: "PresentTense" }, fn = { conditional: !0 }, $e = { tense: "FutureTense" }, lt = { progressive: !0 }, K = { tense: "PastTense" }, ht = { complete: !0, progressive: !1 }, Fe = { passive: !0 }, nv = { plural: !0 }, rv = { plural: !1 }, ov = function(e) {
13132
+ }, ge = { tense: "PresentTense" }, fn = { conditional: !0 }, $e = { tense: "FutureTense" }, dt = { progressive: !0 }, K = { tense: "PastTense" }, ft = { complete: !0, progressive: !1 }, Fe = { passive: !0 }, nv = { plural: !0 }, rv = { plural: !1 }, ov = function(e) {
13133
13133
  const t = {};
13134
13134
  return e.forEach((n) => {
13135
13135
  Object.assign(t, n);
@@ -13176,45 +13176,45 @@ const Ob = {
13176
13176
  // === Progressive ===
13177
13177
  "present-progressive": [
13178
13178
  // he is walking
13179
- ["^(is|are|am) #Gerund$", [ge, lt]]
13179
+ ["^(is|are|am) #Gerund$", [ge, dt]]
13180
13180
  ],
13181
13181
  "past-progressive": [
13182
13182
  // he was walking
13183
- ["^(was|were) #Gerund$", [K, lt]]
13183
+ ["^(was|were) #Gerund$", [K, dt]]
13184
13184
  ],
13185
13185
  "future-progressive": [
13186
13186
  // he will be
13187
- ["^will be #Gerund$", [$e, lt]]
13187
+ ["^will be #Gerund$", [$e, dt]]
13188
13188
  ],
13189
13189
  // === Perfect ===
13190
13190
  "present-perfect": [
13191
13191
  // he has walked
13192
- ["^(has|have) #PastTense$", [K, ht]]
13192
+ ["^(has|have) #PastTense$", [K, ft]]
13193
13193
  //past?
13194
13194
  ],
13195
13195
  "past-perfect": [
13196
13196
  // he had walked
13197
- ["^had #PastTense$", [K, ht]],
13197
+ ["^had #PastTense$", [K, ft]],
13198
13198
  // had been to see
13199
- ["^had #PastTense to #Infinitive", [K, ht]]
13199
+ ["^had #PastTense to #Infinitive", [K, ft]]
13200
13200
  ],
13201
13201
  "future-perfect": [
13202
13202
  // he will have
13203
- ["^will have #PastTense$", [$e, ht]]
13203
+ ["^will have #PastTense$", [$e, ft]]
13204
13204
  ],
13205
13205
  // === Progressive-perfect ===
13206
13206
  "present-perfect-progressive": [
13207
13207
  // he has been walking
13208
- ["^(has|have) been #Gerund$", [K, lt]]
13208
+ ["^(has|have) been #Gerund$", [K, dt]]
13209
13209
  //present?
13210
13210
  ],
13211
13211
  "past-perfect-progressive": [
13212
13212
  // he had been
13213
- ["^had been #Gerund$", [K, lt]]
13213
+ ["^had been #Gerund$", [K, dt]]
13214
13214
  ],
13215
13215
  "future-perfect-progressive": [
13216
13216
  // will have been
13217
- ["^will have been #Gerund$", [$e, lt]]
13217
+ ["^will have been #Gerund$", [$e, dt]]
13218
13218
  ],
13219
13219
  // ==== Passive ===
13220
13220
  "passive-past": [
@@ -13257,11 +13257,11 @@ const Ob = {
13257
13257
  // he did walk
13258
13258
  ["^did #Infinitive$", [K, rv]],
13259
13259
  // used to walk
13260
- ["^used to #Infinitive$", [K, ht]]
13260
+ ["^used to #Infinitive$", [K, ft]]
13261
13261
  ],
13262
13262
  "auxiliary-present": [
13263
13263
  // we do walk
13264
- ["^(does|do) #Infinitive$", [ge, ht, nv]]
13264
+ ["^(does|do) #Infinitive$", [ge, ft, nv]]
13265
13265
  ],
13266
13266
  // === modals ===
13267
13267
  "modal-past": [
@@ -13529,7 +13529,7 @@ const iv = function(e, t) {
13529
13529
  // 'gerund-phrase': noop,
13530
13530
  }, mv = function(e, t, n) {
13531
13531
  return ia.hasOwnProperty(n) ? (e = ia[n](e, t), e.fullSentence().compute(["tagger", "chunks"]), e) : (e = kr(e, t), e.fullSentence().compute(["tagger", "chunks"]), e);
13532
- }, Ee = { tags: !0 }, dt = (e, t) => {
13532
+ }, Ee = { tags: !0 }, pt = (e, t) => {
13533
13533
  const { conjugate: n, toInfinitive: r } = e.methods.two.transform.verb, o = t.root;
13534
13534
  let i = o.text("normal");
13535
13535
  return i = r(i, e.model, ae(o)), Dt(e) === !1 && (i = n(i, e.model).PresentTense), o.has("#Copula") && (i = Ot(e)), i && (e = e.replace(o, i, Ee), e.not("#Particle").tag("PresentTense")), e;
@@ -13543,7 +13543,7 @@ const iv = function(e, t) {
13543
13543
  return o = n(o, e.model, ae(r)), o && (e = e.replace(t.root, o, Ee)), e;
13544
13544
  }, sa = {
13545
13545
  // walk
13546
- infinitive: dt,
13546
+ infinitive: pt,
13547
13547
  // he walks -> he walked
13548
13548
  "simple-present": (e, t) => {
13549
13549
  const { conjugate: n } = e.methods.two.transform.verb, { root: r } = t;
@@ -13554,11 +13554,11 @@ const iv = function(e, t) {
13554
13554
  const a = r.text("normal"), s = n(a, e.model).PresentTense;
13555
13555
  a !== s && e.replace(r, s, Ee);
13556
13556
  } else
13557
- return dt(e, t);
13557
+ return pt(e, t);
13558
13558
  return e;
13559
13559
  },
13560
13560
  // he walked
13561
- "simple-past": dt,
13561
+ "simple-past": pt,
13562
13562
  // he will walk -> he walked
13563
13563
  "simple-future": (e, t) => {
13564
13564
  const { root: n, auxiliary: r } = t;
@@ -13566,7 +13566,7 @@ const iv = function(e, t) {
13566
13566
  const o = Ot(e);
13567
13567
  e.replace(n, o), e = e.remove("will"), e.replace("not " + o, o + " not");
13568
13568
  } else
13569
- dt(e, t), e = e.remove("will");
13569
+ pt(e, t), e = e.remove("will");
13570
13570
  return e;
13571
13571
  },
13572
13572
  // is walking ->
@@ -13579,7 +13579,7 @@ const iv = function(e, t) {
13579
13579
  // will be walking -> is walking
13580
13580
  "future-progressive": (e) => (e.match("will").insertBefore("is"), e.remove("be"), e.remove("will")),
13581
13581
  // has walked -> (?)
13582
- "present-perfect": (e, t) => (dt(e, t), e = e.remove("(have|had|has)"), e),
13582
+ "present-perfect": (e, t) => (pt(e, t), e = e.remove("(have|had|has)"), e),
13583
13583
  // had walked -> has walked
13584
13584
  "past-perfect": (e, t) => {
13585
13585
  const r = we(e).subject;
@@ -13626,7 +13626,7 @@ const iv = function(e, t) {
13626
13626
  // must have walked
13627
13627
  "modal-past": (e, t) => (bv(e, t), e.remove("have")),
13628
13628
  // started looking
13629
- "gerund-phrase": (e, t) => (t.root = t.root.not("#Gerund$"), dt(e, t), e.remove("(will|have)")),
13629
+ "gerund-phrase": (e, t) => (t.root = t.root.not("#Gerund$"), pt(e, t), e.remove("(will|have)")),
13630
13630
  // wanted to walk
13631
13631
  "want-infinitive": (e, t) => {
13632
13632
  let n = "wants";
@@ -14163,7 +14163,7 @@ const Uv = {
14163
14163
  USERNAME: "Username",
14164
14164
  IP_ADDRESS: "IP address",
14165
14165
  MANUAL: "Manual redaction"
14166
- }, ft = {
14166
+ }, Re = {
14167
14167
  lang: "eng",
14168
14168
  nerModel: "onnx-community/multilang-pii-ner-ONNX",
14169
14169
  maxFileSize: 20 * 1024 * 1024,
@@ -14173,14 +14173,24 @@ const Uv = {
14173
14173
  useCompromise: !0,
14174
14174
  memoryMode: "auto"
14175
14175
  };
14176
- var Rv = Object.defineProperty, qv = Object.getOwnPropertyDescriptor, D = (e, t, n, r) => {
14176
+ var Rv = Object.defineProperty, qv = Object.getOwnPropertyDescriptor, E = (e, t, n, r) => {
14177
14177
  for (var o = r > 1 ? void 0 : r ? qv(t, n) : t, i = e.length - 1, a; i >= 0; i--)
14178
14178
  (a = e[i]) && (o = (r ? a(t, n, o) : a(o)) || o);
14179
14179
  return r && o && Rv(t, n, o), o;
14180
14180
  };
14181
- let j = class extends Et {
14181
+ let N = class extends Et {
14182
14182
  constructor() {
14183
- super(...arguments), this.lang = ft.lang, this.nerModel = ft.nerModel, this.maxFileSize = ft.maxFileSize, this.minConfidence = ft.minConfidence, this.useRegex = ft.useRegex, this.phase = "idle", this.progress = 0, this.progressMessage = "", this.errorMessage = "", this.imageUrl = "", this.imageWidth = 0, this.imageHeight = 0, this.redactions = [], this.entities = [], this.ocrResult = null, this.dragOver = !1, this.isDrawing = !1, this.drawMode = !1, this.drawStart = null, this.drawCurrent = null, this.networkRequestCount = 0, this.redactedBlob = null, this.modelCached = !1, this.imageFile = null, this.imageElement = null, this.undoStack = [], this.perfObserver = null;
14183
+ super(...arguments), this.lang = Re.lang, this.nerModel = Re.nerModel, this.maxFileSize = Re.maxFileSize, this.minConfidence = Re.minConfidence, this.useRegex = Re.useRegex, this.useCompromise = Re.useCompromise, this.phase = "idle", this.progress = 0, this.progressMessage = "", this.errorMessage = "", this.imageUrl = "", this.imageWidth = 0, this.imageHeight = 0, this.redactions = [], this.entities = [], this.ocrResult = null, this.dragOver = !1, this.isDrawing = !1, this.drawMode = !1, this.drawStart = null, this.drawCurrent = null, this.networkRequestCount = 0, this.redactedBlob = null, this.modelCached = !1, this.imageFile = null, this.imageElement = null, this.undoStack = [], this.perfObserver = null;
14184
+ }
14185
+ // --- Pipeline config (derived from public properties) ---
14186
+ get pipelineConfig() {
14187
+ return {
14188
+ lang: this.lang,
14189
+ nerModel: this.nerModel,
14190
+ minConfidence: this.minConfidence,
14191
+ useRegex: this.useRegex,
14192
+ useCompromise: this.useCompromise
14193
+ };
14184
14194
  }
14185
14195
  connectedCallback() {
14186
14196
  if (super.connectedCallback(), typeof PerformanceObserver < "u") {
@@ -14228,12 +14238,12 @@ let j = class extends Et {
14228
14238
  return se`
14229
14239
  <div class="container">
14230
14240
  ${this.renderTrustBanner()}
14231
- ${this.phase === "idle" ? this.renderDropZone() : N}
14232
- ${this.phase === "loading" || this.phase === "ocr" || this.phase === "detecting" ? this.renderProgress() : N}
14233
- ${this.phase === "reviewing" ? this.renderEditor() : N}
14234
- ${this.phase === "exporting" ? this.renderProgress() : N}
14235
- ${this.phase === "done" ? this.renderDone() : N}
14236
- ${this.errorMessage ? this.renderError() : N}
14241
+ ${this.phase === "idle" ? this.renderDropZone() : j}
14242
+ ${this.phase === "loading" || this.phase === "ocr" || this.phase === "detecting" ? this.renderProgress() : j}
14243
+ ${this.phase === "reviewing" ? this.renderEditor() : j}
14244
+ ${this.phase === "exporting" ? this.renderProgress() : j}
14245
+ ${this.phase === "done" ? this.renderDone() : j}
14246
+ ${this.errorMessage ? this.renderError() : j}
14237
14247
  </div>
14238
14248
  `;
14239
14249
  }
@@ -14363,7 +14373,7 @@ let j = class extends Et {
14363
14373
  width=${Math.abs(this.drawCurrent.x - this.drawStart.x)}
14364
14374
  height=${Math.abs(this.drawCurrent.y - this.drawStart.y)}
14365
14375
  />
14366
- ` : N}
14376
+ ` : j}
14367
14377
  </svg>
14368
14378
  </div>
14369
14379
  </div>
@@ -14411,7 +14421,7 @@ let j = class extends Et {
14411
14421
  Network requests to AI model host: 0 — served from local cache.
14412
14422
  </p>` : se`<p class="done-network">
14413
14423
  Network requests to AI model host: ${this.networkRequestCount}.
14414
- ${this.modelCached ? se`Model is now cached — next time will be 0.` : N}
14424
+ ${this.modelCached ? se`Model is now cached — next time will be 0.` : j}
14415
14425
  </p>`;
14416
14426
  return se`
14417
14427
  <div class="done">
@@ -14420,7 +14430,7 @@ let j = class extends Et {
14420
14430
  <button class="primary" @click=${this.handleDownload}>
14421
14431
  Download
14422
14432
  </button>
14423
- ${e ? se`<button @click=${this.handleShare}>Share</button>` : N}
14433
+ ${e ? se`<button @click=${this.handleShare}>Share</button>` : j}
14424
14434
  <button @click=${this.reset}>Redact another</button>
14425
14435
  </div>
14426
14436
  ${t}
@@ -14447,7 +14457,7 @@ let j = class extends Et {
14447
14457
  n && this.processFile(n), t.value = "";
14448
14458
  }
14449
14459
  async processFile(e) {
14450
- if (!ft.acceptedTypes.includes(e.type)) {
14460
+ if (!Re.acceptedTypes.includes(e.type)) {
14451
14461
  this.errorMessage = `Unsupported file type: ${e.type}. Please use PNG, JPEG, or WebP.`;
14452
14462
  return;
14453
14463
  }
@@ -14459,17 +14469,12 @@ let j = class extends Et {
14459
14469
  try {
14460
14470
  const t = await this.loadImage(this.imageUrl);
14461
14471
  this.imageElement = t, this.imageWidth = t.naturalWidth, this.imageHeight = t.naturalHeight;
14462
- const n = {
14463
- lang: this.lang,
14464
- nerModel: this.nerModel,
14465
- minConfidence: this.minConfidence,
14466
- useRegex: this.useRegex
14467
- }, r = await _v(
14472
+ const n = await _v(
14468
14473
  e,
14469
- n,
14470
- (o) => this.handleProgress(o)
14474
+ this.pipelineConfig,
14475
+ (r) => this.handleProgress(r)
14471
14476
  );
14472
- this.ocrResult = r.ocr, this.entities = r.entities, this.redactions = r.redactions, this.undoStack = [], this.phase = "reviewing", this.checkModelCached();
14477
+ this.ocrResult = n.ocr, this.entities = n.entities, this.redactions = n.redactions, this.undoStack = [], this.phase = "reviewing", this.checkModelCached();
14473
14478
  } catch (t) {
14474
14479
  console.error("Pipeline error:", t), this.errorMessage = t instanceof Error ? t.message : "An unexpected error occurred.", this.phase = "idle";
14475
14480
  }
@@ -14618,82 +14623,85 @@ let j = class extends Et {
14618
14623
  this.imageWidth = t.naturalWidth, this.imageHeight = t.naturalHeight;
14619
14624
  }
14620
14625
  };
14621
- j.styles = Rs;
14622
- D([
14623
- kt({ type: String })
14624
- ], j.prototype, "lang", 2);
14625
- D([
14626
- kt({ type: String, attribute: "ner-model" })
14627
- ], j.prototype, "nerModel", 2);
14628
- D([
14629
- kt({ type: Number, attribute: "max-file-size" })
14630
- ], j.prototype, "maxFileSize", 2);
14631
- D([
14632
- kt({ type: Number, attribute: "min-confidence" })
14633
- ], j.prototype, "minConfidence", 2);
14634
- D([
14635
- kt({ type: Boolean, attribute: "use-regex" })
14636
- ], j.prototype, "useRegex", 2);
14637
- D([
14626
+ N.styles = Rs;
14627
+ E([
14628
+ rt({ type: String })
14629
+ ], N.prototype, "lang", 2);
14630
+ E([
14631
+ rt({ type: String, attribute: "ner-model" })
14632
+ ], N.prototype, "nerModel", 2);
14633
+ E([
14634
+ rt({ type: Number, attribute: "max-file-size" })
14635
+ ], N.prototype, "maxFileSize", 2);
14636
+ E([
14637
+ rt({ type: Number, attribute: "min-confidence" })
14638
+ ], N.prototype, "minConfidence", 2);
14639
+ E([
14640
+ rt({ type: Boolean, attribute: "use-regex" })
14641
+ ], N.prototype, "useRegex", 2);
14642
+ E([
14643
+ rt({ type: Boolean, attribute: "use-compromise" })
14644
+ ], N.prototype, "useCompromise", 2);
14645
+ E([
14638
14646
  J()
14639
- ], j.prototype, "phase", 2);
14640
- D([
14647
+ ], N.prototype, "phase", 2);
14648
+ E([
14641
14649
  J()
14642
- ], j.prototype, "progress", 2);
14643
- D([
14650
+ ], N.prototype, "progress", 2);
14651
+ E([
14644
14652
  J()
14645
- ], j.prototype, "progressMessage", 2);
14646
- D([
14653
+ ], N.prototype, "progressMessage", 2);
14654
+ E([
14647
14655
  J()
14648
- ], j.prototype, "errorMessage", 2);
14649
- D([
14656
+ ], N.prototype, "errorMessage", 2);
14657
+ E([
14650
14658
  J()
14651
- ], j.prototype, "imageUrl", 2);
14652
- D([
14659
+ ], N.prototype, "imageUrl", 2);
14660
+ E([
14653
14661
  J()
14654
- ], j.prototype, "imageWidth", 2);
14655
- D([
14662
+ ], N.prototype, "imageWidth", 2);
14663
+ E([
14656
14664
  J()
14657
- ], j.prototype, "imageHeight", 2);
14658
- D([
14665
+ ], N.prototype, "imageHeight", 2);
14666
+ E([
14659
14667
  J()
14660
- ], j.prototype, "redactions", 2);
14661
- D([
14668
+ ], N.prototype, "redactions", 2);
14669
+ E([
14662
14670
  J()
14663
- ], j.prototype, "entities", 2);
14664
- D([
14671
+ ], N.prototype, "entities", 2);
14672
+ E([
14665
14673
  J()
14666
- ], j.prototype, "ocrResult", 2);
14667
- D([
14674
+ ], N.prototype, "ocrResult", 2);
14675
+ E([
14668
14676
  J()
14669
- ], j.prototype, "dragOver", 2);
14670
- D([
14677
+ ], N.prototype, "dragOver", 2);
14678
+ E([
14671
14679
  J()
14672
- ], j.prototype, "isDrawing", 2);
14673
- D([
14680
+ ], N.prototype, "isDrawing", 2);
14681
+ E([
14674
14682
  J()
14675
- ], j.prototype, "drawMode", 2);
14676
- D([
14683
+ ], N.prototype, "drawMode", 2);
14684
+ E([
14677
14685
  J()
14678
- ], j.prototype, "drawStart", 2);
14679
- D([
14686
+ ], N.prototype, "drawStart", 2);
14687
+ E([
14680
14688
  J()
14681
- ], j.prototype, "drawCurrent", 2);
14682
- D([
14689
+ ], N.prototype, "drawCurrent", 2);
14690
+ E([
14683
14691
  J()
14684
- ], j.prototype, "networkRequestCount", 2);
14685
- D([
14692
+ ], N.prototype, "networkRequestCount", 2);
14693
+ E([
14686
14694
  J()
14687
- ], j.prototype, "redactedBlob", 2);
14688
- D([
14695
+ ], N.prototype, "redactedBlob", 2);
14696
+ E([
14689
14697
  J()
14690
- ], j.prototype, "modelCached", 2);
14691
- D([
14698
+ ], N.prototype, "modelCached", 2);
14699
+ E([
14692
14700
  Us(".file-input")
14693
- ], j.prototype, "fileInput", 2);
14694
- j = D([
14701
+ ], N.prototype, "fileInput", 2);
14702
+ N = E([
14695
14703
  Ws("pii-redactor")
14696
- ], j);
14704
+ ], N);
14697
14705
  async function ew(e = {}) {
14698
14706
  if (!("serviceWorker" in navigator) || !navigator.serviceWorker)
14699
14707
  return null;
@@ -14717,8 +14725,8 @@ async function tw() {
14717
14725
  }
14718
14726
  export {
14719
14727
  Zs as DARK_THRESHOLD,
14720
- ft as DEFAULT_CONFIG,
14721
- j as PiiRedactor,
14728
+ Re as DEFAULT_CONFIG,
14729
+ N as PiiRedactor,
14722
14730
  _v as analyzeImage,
14723
14731
  eu as computeAverageLuminance,
14724
14732
  su as detectPiiNer,