@univerjs/find-replace 0.6.6 → 0.6.7

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/lib/es/index.js CHANGED
@@ -1,22 +1,22 @@
1
- var st = Object.defineProperty;
2
- var at = (t, e, n) => e in t ? st(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var o = (t, e, n) => at(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { createIdentifier as ot, Inject as D, Injector as X, IContextService as ee, Disposable as te, DisposableCollection as ct, toDisposable as L, IUniverInstanceService as pe, ICommandService as k, CommandType as b, LocaleService as j, FOCUSING_SHEET as ge, EDITOR_ACTIVATED as _e, UniverInstanceType as lt, RxDisposable as dt, IConfigService as ht, Plugin as ut, merge as ft } from "@univerjs/core";
5
- import { IConfirmService as pt, IMessageService as me, useDependency as v, useObservable as x, ILayoutService as ve, KeyCode as C, MetaKeys as y, getMenuHiddenObservable as gt, MenuItemType as _t, RibbonStartGroup as mt, IMenuManagerService as vt, IShortcutService as St, IDialogService as Ct, ComponentManager as Rt } from "@univerjs/ui";
6
- import { throttleTime as Mt, BehaviorSubject as P, combineLatest as Se, debounceTime as bt, Subject as Ce, fromEvent as It, map as yt, takeUntil as oe } from "rxjs";
7
- import { MessageType as N, InputWithSlot as Ft, Pager as Dt, Button as $, FormLayout as M, Input as xt, Select as H, FormDualColumnLayout as ce, Checkbox as le } from "@univerjs/design";
8
- import { RENDER_RAW_FORMULA_KEY as Pt } from "@univerjs/engine-render";
9
- import { jsx as l, jsxs as I, Fragment as A } from "react/jsx-runtime";
10
- import { forwardRef as G, useRef as q, createElement as Re, useCallback as u, useEffect as w, useMemo as ie, useImperativeHandle as Tt } from "react";
11
- const Et = "find-replace.config", de = {};
12
- var g = function() {
13
- return g = Object.assign || function(t) {
1
+ var rt = Object.defineProperty;
2
+ var st = (t, e, n) => e in t ? rt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var o = (t, e, n) => st(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { createIdentifier as at, Inject as D, Injector as Q, IContextService as X, Disposable as ee, DisposableCollection as ot, toDisposable as A, IUniverInstanceService as fe, ICommandService as W, CommandType as b, LocaleService as B, FOCUSING_SHEET as pe, EDITOR_ACTIVATED as _e, UniverInstanceType as ct, RxDisposable as lt, IConfigService as dt, Plugin as ht, merge as ut } from "@univerjs/core";
5
+ import { IConfirmService as ft, IMessageService as ge, useDependency as v, useObservable as x, ILayoutService as me, KeyCode as C, MetaKeys as y, getMenuHiddenObservable as pt, MenuItemType as _t, RibbonStartGroup as gt, IMenuManagerService as mt, IShortcutService as vt, IDialogService as St, ComponentManager as Ct } from "@univerjs/ui";
6
+ import { throttleTime as Mt, BehaviorSubject as P, combineLatest as ve, debounceTime as Rt, Subject as Se, fromEvent as bt, map as It, takeUntil as ae } from "rxjs";
7
+ import { MessageType as N, InputWithSlot as yt, Pager as Ft, FormLayout as R, Input as Dt, Select as V, FormDualColumnLayout as oe, Checkbox as ce, Button as G } from "@univerjs/design";
8
+ import { RENDER_RAW_FORMULA_KEY as xt } from "@univerjs/engine-render";
9
+ import { jsx as l, jsxs as I, Fragment as $ } from "react/jsx-runtime";
10
+ import { forwardRef as j, useRef as K, createElement as Ce, useCallback as u, useEffect as L, useMemo as te, useImperativeHandle as Pt } from "react";
11
+ const Tt = "find-replace.config", le = {};
12
+ var _ = function() {
13
+ return _ = Object.assign || function(t) {
14
14
  for (var e, n = 1, i = arguments.length; n < i; n++) {
15
15
  e = arguments[n];
16
16
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]);
17
17
  }
18
18
  return t;
19
- }, g.apply(this, arguments);
19
+ }, _.apply(this, arguments);
20
20
  }, Ot = function(t, e) {
21
21
  var n = {};
22
22
  for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
@@ -24,17 +24,17 @@ var g = function() {
24
24
  for (var r = 0, i = Object.getOwnPropertySymbols(t); r < i.length; r++)
25
25
  e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, i[r]) && (n[i[r]] = t[i[r]]);
26
26
  return n;
27
- }, Me = G(function(t, e) {
28
- var n = t.icon, i = t.id, r = t.className, s = t.extend, a = Ot(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), d = q("_".concat(At()));
29
- return be(n, "".concat(i), { defIds: n.defIds, idSuffix: d.current }, g({ ref: e, className: c }, a), s);
27
+ }, Me = j(function(t, e) {
28
+ var n = t.icon, i = t.id, r = t.className, s = t.extend, a = Ot(t, ["icon", "id", "className", "extend"]), c = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), d = K("_".concat($t()));
29
+ return Re(n, "".concat(i), { defIds: n.defIds, idSuffix: d.current }, _({ ref: e, className: c }, a), s);
30
30
  });
31
- function be(t, e, n, i, r) {
32
- return Re(t.tag, g(g({ key: e }, Nt(t, n, r)), i), ($t(t, n).children || []).map(function(s, a) {
33
- return be(s, "".concat(e, "-").concat(t.tag, "-").concat(a), n, void 0, r);
31
+ function Re(t, e, n, i, r) {
32
+ return Ce(t.tag, _(_({ key: e }, Et(t, n, r)), i), (Nt(t, n).children || []).map(function(s, a) {
33
+ return Re(s, "".concat(e, "-").concat(t.tag, "-").concat(a), n, void 0, r);
34
34
  }));
35
35
  }
36
- function Nt(t, e, n) {
37
- var i = g({}, t.attrs);
36
+ function Et(t, e, n) {
37
+ var i = _({}, t.attrs);
38
38
  n != null && n.colorChannel1 && i.fill === "colorChannel1" && (i.fill = n.colorChannel1), t.tag === "mask" && i.id && (i.id = i.id + e.idSuffix), Object.entries(i).forEach(function(s) {
39
39
  var a = s[0], c = s[1];
40
40
  a === "mask" && typeof c == "string" && (i[a] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
@@ -45,37 +45,37 @@ function Nt(t, e, n) {
45
45
  typeof c == "string" && (i[a] = c.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
46
46
  })), i;
47
47
  }
48
- function $t(t, e) {
48
+ function Nt(t, e) {
49
49
  var n, i = e.defIds;
50
- return !i || i.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? g(g({}, t), { children: t.children.map(function(r) {
51
- return typeof r.attrs.id == "string" && i && i.indexOf(r.attrs.id) > -1 ? g(g({}, r), { attrs: g(g({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
50
+ return !i || i.length === 0 ? t : t.tag === "defs" && (!((n = t.children) === null || n === void 0) && n.length) ? _(_({}, t), { children: t.children.map(function(r) {
51
+ return typeof r.attrs.id == "string" && i && i.indexOf(r.attrs.id) > -1 ? _(_({}, r), { attrs: _(_({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
52
52
  }) }) : t;
53
53
  }
54
- function At() {
54
+ function $t() {
55
55
  return Math.random().toString(36).substring(2, 8);
56
56
  }
57
57
  Me.displayName = "UniverIcon";
58
- var Lt = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.71899 1.36938C4.37604 1.36938 1.66602 4.07941 1.66602 7.42236C1.66602 10.7653 4.37604 13.4753 7.71899 13.4753C9.16744 13.4753 10.4971 12.9666 11.5389 12.118L13.6598 14.4109C13.8848 14.6542 14.2644 14.669 14.5077 14.444C14.7509 14.219 14.7657 13.8393 14.5407 13.5961L12.3906 11.2716C13.2536 10.2254 13.772 8.88442 13.772 7.42236C13.772 4.07941 11.0619 1.36938 7.71899 1.36938ZM2.86602 7.42236C2.86602 4.74215 5.03878 2.56938 7.71899 2.56938C10.3992 2.56938 12.572 4.74215 12.572 7.42236C12.572 10.1026 10.3992 12.2753 7.71899 12.2753C5.03878 12.2753 2.86602 10.1026 2.86602 7.42236Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ie = G(function(t, e) {
59
- return Re(Me, Object.assign({}, t, {
58
+ var At = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.71899 1.36938C4.37604 1.36938 1.66602 4.07941 1.66602 7.42236C1.66602 10.7653 4.37604 13.4753 7.71899 13.4753C9.16744 13.4753 10.4971 12.9666 11.5389 12.118L13.6598 14.4109C13.8848 14.6542 14.2644 14.669 14.5077 14.444C14.7509 14.219 14.7657 13.8393 14.5407 13.5961L12.3906 11.2716C13.2536 10.2254 13.772 8.88442 13.772 7.42236C13.772 4.07941 11.0619 1.36938 7.71899 1.36938ZM2.86602 7.42236C2.86602 4.74215 5.03878 2.56938 7.71899 2.56938C10.3992 2.56938 12.572 4.74215 12.572 7.42236C12.572 10.1026 10.3992 12.2753 7.71899 12.2753C5.03878 12.2753 2.86602 10.1026 2.86602 7.42236Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, be = j(function(t, e) {
59
+ return Ce(Me, Object.assign({}, t, {
60
60
  id: "search-single",
61
61
  ref: e,
62
- icon: Lt
62
+ icon: At
63
63
  }));
64
64
  });
65
- Ie.displayName = "SearchSingle";
66
- const ye = "FIND_REPLACE_INPUT_FOCUS", Fe = "FIND_REPLACE_DIALOG_FOCUS", De = "FIND_REPLACE_REPLACE_REVEALED";
67
- var wt = Object.getOwnPropertyDescriptor, xe = (t, e, n, i) => {
68
- for (var r = i > 1 ? void 0 : i ? wt(e, n) : e, s = t.length - 1, a; s >= 0; s--)
65
+ be.displayName = "SearchSingle";
66
+ const Ie = "FIND_REPLACE_INPUT_FOCUS", ye = "FIND_REPLACE_DIALOG_FOCUS", Fe = "FIND_REPLACE_REPLACE_REVEALED";
67
+ var Lt = Object.getOwnPropertyDescriptor, De = (t, e, n, i) => {
68
+ for (var r = i > 1 ? void 0 : i ? Lt(e, n) : e, s = t.length - 1, a; s >= 0; s--)
69
69
  (a = t[s]) && (r = a(r) || r);
70
70
  return r;
71
- }, U = (t, e) => (n, i) => e(n, i, t);
72
- class Mi extends te {
71
+ }, w = (t, e) => (n, i) => e(n, i, t);
72
+ class mi extends ee {
73
73
  }
74
- const _ = ot("find-replace.service");
75
- function Ut(t) {
74
+ const g = at("find-replace.service");
75
+ function wt(t) {
76
76
  return typeof t.findString < "u" || typeof t.inputtingFindString < "u" || typeof t.findDirection < "u" || typeof t.matchesTheWholeCell < "u" || typeof t.caseSensitive < "u" || typeof t.findScope < "u" || typeof t.findBy < "u";
77
77
  }
78
- let z = class extends te {
78
+ let q = class extends ee {
79
79
  constructor(e, n, i, r) {
80
80
  super();
81
81
  o(this, "currentMatch$", new P(null));
@@ -89,7 +89,7 @@ let z = class extends te {
89
89
  this._state = e, this._providers = n, this._univerInstanceService = i, this._commandService = r, this.disposeWithMe(
90
90
  this._state.stateUpdates$.pipe(Mt(200, void 0, { leading: !0, trailing: !0 })).subscribe(async (s) => {
91
91
  const a = this._state.state;
92
- Ut(s) && (a.findString !== "" && !a.replaceRevealed ? (await this._startSearching(), this._state.changeState({ findCompleted: !0 })) : s.replaceRevealed !== !0 && this._stopSearching());
92
+ wt(s) && (a.findString !== "" && !a.replaceRevealed ? (await this._startSearching(), this._state.changeState({ findCompleted: !0 })) : s.replaceRevealed !== !0 && this._stopSearching());
93
93
  })
94
94
  );
95
95
  }
@@ -97,7 +97,7 @@ let z = class extends te {
97
97
  return this._findModels.length > 0;
98
98
  }
99
99
  dispose() {
100
- super.dispose(), this._stopSearching(), this.currentMatch$.complete(), this.replaceables$.complete(), this._state.changeState({ ...ne(), revealed: !1 });
100
+ super.dispose(), this._stopSearching(), this.currentMatch$.complete(), this.replaceables$.complete(), this._state.changeState({ ...ie(), revealed: !1 });
101
101
  }
102
102
  async start() {
103
103
  if (!this._state.findString)
@@ -137,14 +137,14 @@ let z = class extends te {
137
137
  }
138
138
  // When a document's content changes, we should reset all matches and try to move to the next match.
139
139
  _subscribeToModelsChanges(e) {
140
- const n = this._currentSearchingDisposables = new ct(), i = Se(e.map((r) => r.matchesUpdate$)).pipe(bt(220)).subscribe(([...r]) => {
140
+ const n = this._currentSearchingDisposables = new ot(), i = ve(e.map((r) => r.matchesUpdate$)).pipe(Rt(220)).subscribe(([...r]) => {
141
141
  const s = this._matches = r.flat();
142
142
  s.length ? (this._moveToInitialMatch(this._findModels, !0), this._state.changeState({ matchesCount: s.length }), this.replaceables$.next(s.filter((a) => a.replaceable))) : (this._state.changeState({ matchesCount: 0, matchesPosition: 0 }), this.replaceables$.next([]));
143
143
  });
144
- e.forEach((r) => n.add(L(r.activelyChangingMatch$.subscribe((s) => {
144
+ e.forEach((r) => n.add(A(r.activelyChangingMatch$.subscribe((s) => {
145
145
  const a = this._matches.findIndex((c) => c === s);
146
146
  this._state.changeState({ matchesPosition: a + 1 });
147
- })))), n.add(L(i));
147
+ })))), n.add(A(i));
148
148
  }
149
149
  async replace() {
150
150
  return this._matchingModel ? this._matchingModel.replace(this._state.replaceString) : !1;
@@ -218,12 +218,12 @@ let z = class extends te {
218
218
  return this._moveToNextUnitMatch(r), 0;
219
219
  }
220
220
  };
221
- z = xe([
222
- U(2, pe),
223
- U(3, k)
224
- ], z);
225
- var Y = /* @__PURE__ */ ((t) => (t.ROW = "row", t.COLUMN = "column", t))(Y || {}), Z = /* @__PURE__ */ ((t) => (t.VALUE = "value", t.FORMULA = "formula", t))(Z || {}), J = /* @__PURE__ */ ((t) => (t.SUBUNIT = "subunit", t.UNIT = "unit", t))(J || {});
226
- function ne() {
221
+ q = De([
222
+ w(2, fe),
223
+ w(3, W)
224
+ ], q);
225
+ var z = /* @__PURE__ */ ((t) => (t.ROW = "row", t.COLUMN = "column", t))(z || {}), Y = /* @__PURE__ */ ((t) => (t.VALUE = "value", t.FORMULA = "formula", t))(Y || {}), Z = /* @__PURE__ */ ((t) => (t.SUBUNIT = "subunit", t.UNIT = "unit", t))(Z || {});
226
+ function ie() {
227
227
  return {
228
228
  caseSensitive: !1,
229
229
  findBy: "value",
@@ -240,11 +240,11 @@ function ne() {
240
240
  revealed: !0
241
241
  };
242
242
  }
243
- class Bt {
243
+ class Ut {
244
244
  constructor() {
245
- o(this, "_stateUpdates$", new Ce());
245
+ o(this, "_stateUpdates$", new Se());
246
246
  o(this, "stateUpdates$", this._stateUpdates$.asObservable());
247
- o(this, "_state$", new P(ne()));
247
+ o(this, "_state$", new P(ie()));
248
248
  o(this, "state$", this._state$.asObservable());
249
249
  o(this, "_findString", "");
250
250
  o(this, "_inputtingFindString", "");
@@ -322,17 +322,17 @@ class Bt {
322
322
  }), this._stateUpdates$.next(i));
323
323
  }
324
324
  }
325
- let Q = class extends te {
325
+ let J = class extends ee {
326
326
  constructor(e, n) {
327
327
  super();
328
328
  o(this, "_providers", /* @__PURE__ */ new Set());
329
- o(this, "_state", new Bt());
329
+ o(this, "_state", new Ut());
330
330
  o(this, "_model");
331
331
  o(this, "_currentMatch$", new P(null));
332
332
  o(this, "currentMatch$", this._currentMatch$.asObservable());
333
333
  o(this, "_replaceables$", new P([]));
334
334
  o(this, "replaceables$", this._replaceables$.asObservable());
335
- o(this, "_focusSignal$", new Ce());
335
+ o(this, "_focusSignal$", new Se());
336
336
  o(this, "focusSignal$", this._focusSignal$.asObservable());
337
337
  this._injector = e, this._contextService = n;
338
338
  }
@@ -415,8 +415,8 @@ let Q = class extends te {
415
415
  start(e = !1) {
416
416
  if (this._providers.size === 0)
417
417
  return !1;
418
- this._model = this._injector.createInstance(z, this._state, this._providers), this._model.currentMatch$.subscribe((i) => this._currentMatch$.next(i)), this._model.replaceables$.subscribe((i) => this._replaceables$.next(i));
419
- const n = ne();
418
+ this._model = this._injector.createInstance(q, this._state, this._providers), this._model.currentMatch$.subscribe((i) => this._currentMatch$.next(i)), this._model.replaceables$.subscribe((i) => this._replaceables$.next(i));
419
+ const n = ie();
420
420
  return e && (n.replaceRevealed = !0), this._state.changeState(n), this._toggleRevealReplace(e), !0;
421
421
  }
422
422
  find() {
@@ -428,28 +428,28 @@ let Q = class extends te {
428
428
  (e = this._model) == null || e.dispose(), this._model = null, this._toggleDisplayRawFormula(!1), this._toggleRevealReplace(!1);
429
429
  }
430
430
  registerFindReplaceProvider(e) {
431
- return this._providers.add(e), L(() => this._providers.delete(e));
431
+ return this._providers.add(e), A(() => this._providers.delete(e));
432
432
  }
433
433
  _toggleRevealReplace(e) {
434
- this._contextService.setContextValue(De, e);
434
+ this._contextService.setContextValue(Fe, e);
435
435
  }
436
436
  _toggleDisplayRawFormula(e) {
437
- this._contextService.setContextValue(Pt, e);
437
+ this._contextService.setContextValue(xt, e);
438
438
  }
439
439
  };
440
- Q = xe([
441
- U(0, D(X)),
442
- U(1, ee)
443
- ], Q);
444
- const Pe = {
440
+ J = De([
441
+ w(0, D(Q)),
442
+ w(1, X)
443
+ ], J);
444
+ const xe = {
445
445
  id: "ui.command.replace-current-match",
446
446
  type: b.COMMAND,
447
- handler: (t) => t.get(_).replace()
448
- }, Wt = "CONFIRM_REPLACE_ALL", Te = {
447
+ handler: (t) => t.get(g).replace()
448
+ }, Wt = "CONFIRM_REPLACE_ALL", Pe = {
449
449
  id: "ui.command.replace-all-matches",
450
450
  type: b.COMMAND,
451
451
  handler: async (t) => {
452
- const e = t.get(pt), n = t.get(j), i = t.get(me);
452
+ const e = t.get(ft), n = t.get(B), i = t.get(ge);
453
453
  if (!await e.confirm({
454
454
  id: Wt,
455
455
  title: { title: n.t("find-replace.replace.confirm.title") },
@@ -457,7 +457,7 @@ const Pe = {
457
457
  confirmText: n.t("button.confirm")
458
458
  }))
459
459
  return !1;
460
- const s = await t.get(_).replaceAll(), { success: a, failure: c } = s;
460
+ const s = await t.get(g).replaceAll(), { success: a, failure: c } = s;
461
461
  return c > 0 ? (a === 0 ? i.show({
462
462
  type: N.Error,
463
463
  content: n.t("find-replace.replace.all-failure")
@@ -473,43 +473,38 @@ const Pe = {
473
473
  id: "ui.operation.open-find-dialog",
474
474
  type: b.OPERATION,
475
475
  handler: (t) => {
476
- const e = t.get(_);
476
+ const e = t.get(g);
477
477
  return e.revealed ? e.focusFindInput() : e.start(), !0;
478
478
  }
479
- }, re = {
479
+ }, ne = {
480
480
  id: "ui.operation.open-replace-dialog",
481
481
  type: b.OPERATION,
482
482
  handler: (t) => {
483
- const e = t.get(_);
483
+ const e = t.get(g);
484
484
  return e.revealed ? e.replaceRevealed ? e.focusFindInput() : e.revealReplace() : e.start(!0), !0;
485
485
  }
486
- }, Ee = {
486
+ }, Te = {
487
487
  type: b.OPERATION,
488
488
  id: "ui.operation.go-to-next-match",
489
- handler: (t) => (t.get(_).moveToNextMatch(), !0)
489
+ handler: (t) => (t.get(g).moveToNextMatch(), !0)
490
490
  }, Oe = {
491
491
  type: b.OPERATION,
492
492
  id: "ui.operation.go-to-previous-match",
493
- handler: (t) => (t.get(_).moveToPreviousMatch(), !0)
494
- }, Ne = {
493
+ handler: (t) => (t.get(g).moveToPreviousMatch(), !0)
494
+ }, Ee = {
495
495
  type: b.OPERATION,
496
496
  id: "ui.operation.focus-selection",
497
- handler: (t) => (t.get(_).focusSelection(), !0)
498
- }, kt = "univer-find-replace-dialog-container", jt = "univer-find-replace-expand-container", Gt = "univer-find-replace-buttons-group", Vt = "univer-find-replace-buttons-group-right", B = {
499
- findReplaceDialogContainer: kt,
500
- findReplaceExpandContainer: jt,
501
- findReplaceButtonsGroup: Gt,
502
- findReplaceButtonsGroupRight: Vt
497
+ handler: (t) => (t.get(g).focusSelection(), !0)
503
498
  };
504
- function $e(t) {
499
+ function Ne(t) {
505
500
  const { findCompleted: e, localeService: n, matchesCount: i, matchesPosition: r, findString: s, findReplaceService: a, onChange: c, ...d } = t, f = e && i === 0 ? n.t("find-replace.dialog.no-result") : i === 0 ? " " : void 0;
506
501
  return /* @__PURE__ */ l(
507
- Ft,
502
+ yt,
508
503
  {
509
504
  autoFocus: !0,
510
505
  placeholder: n.t("find-replace.dialog.find-placeholder"),
511
506
  slot: /* @__PURE__ */ l(
512
- Dt,
507
+ Ft,
513
508
  {
514
509
  loop: !0,
515
510
  text: f,
@@ -526,7 +521,7 @@ function $e(t) {
526
521
  }
527
522
  );
528
523
  }
529
- function Ae(t, e) {
524
+ function $e(t, e) {
530
525
  const n = u(() => {
531
526
  var r;
532
527
  (r = document.querySelector(".univer-find-input input")) == null || r.focus();
@@ -534,18 +529,18 @@ function Ae(t, e) {
534
529
  const r = document.querySelectorAll(".univer-find-replace-dialog-container .univer-select-selection-search-input");
535
530
  return Array.from(r).some((s) => s === document.activeElement);
536
531
  }, []);
537
- return Tt(e, () => ({ focus: n, selectHasFocus: i })), w(() => {
532
+ return Pt(e, () => ({ focus: n, selectHasFocus: i })), L(() => {
538
533
  const r = t.focusSignal$.subscribe(() => n());
539
534
  return () => r.unsubscribe();
540
535
  }, [t, n]), { focus: n, selectHasFocus: i };
541
536
  }
542
- const Ht = G(function(e, n) {
543
- const i = v(j), r = v(_), s = v(k), a = x(r.state$, void 0, !0), { findCompleted: c, findString: d, matchesCount: S, matchesPosition: f } = a, p = u(() => {
544
- s.executeCommand(re.id);
545
- }, [s]), O = u((R) => r.changeFindString(R), [r]);
546
- return Ae(r, n), /* @__PURE__ */ I(A, { children: [
537
+ const Bt = j(function(e, n) {
538
+ const i = v(B), r = v(g), s = v(W), a = x(r.state$, void 0, !0), { findCompleted: c, findString: d, matchesCount: S, matchesPosition: f } = a, p = u(() => {
539
+ s.executeCommand(ne.id);
540
+ }, [s]), E = u((M) => r.changeFindString(M), [r]);
541
+ return $e(r, n), /* @__PURE__ */ I($, { children: [
547
542
  /* @__PURE__ */ l(
548
- $e,
543
+ Ne,
549
544
  {
550
545
  findCompleted: c,
551
546
  className: "univer-find-input",
@@ -554,87 +549,97 @@ const Ht = G(function(e, n) {
554
549
  findReplaceService: r,
555
550
  localeService: i,
556
551
  findString: d,
557
- onChange: O
552
+ onChange: E
558
553
  }
559
554
  ),
560
- /* @__PURE__ */ l("div", { className: B.findReplaceExpandContainer, children: /* @__PURE__ */ l($, { type: "text", size: "small", onClick: p, children: i.t("find-replace.dialog.advanced-finding") }) })
555
+ /* @__PURE__ */ l("div", { className: "univer-mt-4 univer-text-center", children: /* @__PURE__ */ l(
556
+ "a",
557
+ {
558
+ className: `
559
+ univer-cursor-pointer univer-text-sm univer-text-primary-500 univer-transition-colors
560
+ hover:univer-text-primary-500/80
561
+ `,
562
+ onClick: p,
563
+ children: i.t("find-replace.dialog.advanced-finding")
564
+ }
565
+ ) })
561
566
  ] });
562
- }), Kt = G(function(e, n) {
563
- const i = v(_), r = v(j), s = v(k), a = v(me), c = x(i.currentMatch$, void 0, !0), d = x(i.replaceables$, void 0, !0), S = x(i.state$, void 0, !0), {
567
+ }), jt = j(function(e, n) {
568
+ const i = v(g), r = v(B), s = v(W), a = v(ge), c = x(i.currentMatch$, void 0, !0), d = x(i.replaceables$, void 0, !0), S = x(i.state$, void 0, !0), {
564
569
  matchesCount: f,
565
570
  matchesPosition: p,
566
- findString: O,
567
- inputtingFindString: R,
568
- replaceString: Ue,
569
- caseSensitive: Be,
571
+ findString: E,
572
+ inputtingFindString: M,
573
+ replaceString: we,
574
+ caseSensitive: Ue,
570
575
  matchesTheWholeCell: We,
571
- findDirection: ke,
576
+ findDirection: Be,
572
577
  findScope: je,
573
- findBy: Ge,
574
- findCompleted: V
575
- } = S, Ve = R.length === 0, He = f === 0 || !(c != null && c.replaceable), Ke = d.length === 0, qe = u(
578
+ findBy: ke,
579
+ findCompleted: k
580
+ } = S, Ve = M.length === 0, Ge = f === 0 || !(c != null && c.replaceable), He = d.length === 0, Ke = u(
576
581
  (h) => i.changeInputtingFindString(h),
577
582
  [i]
578
- ), ze = u(
583
+ ), qe = u(
579
584
  (h) => i.changeReplaceString(h),
580
585
  [i]
581
- ), { focus: Ye } = Ae(i, n), Ze = u(() => {
582
- O === R ? i.moveToNextMatch() : (i.changeFindString(R), i.find());
583
- }, [O, R, i]), Je = u(() => s.executeCommand(Pe.id), [s]), Qe = u(async () => {
584
- await s.executeCommand(Te.id), Ye();
585
- }, [s]), Xe = u((h) => {
586
+ ), { focus: ze } = $e(i, n), Ye = u(() => {
587
+ E === M ? i.moveToNextMatch() : (i.changeFindString(M), i.find());
588
+ }, [E, M, i]), Ze = u(() => s.executeCommand(xe.id), [s]), Je = u(async () => {
589
+ await s.executeCommand(Pe.id), ze();
590
+ }, [s]), Qe = u((h) => {
586
591
  i.changeFindDirection(h);
587
- }, [i]), et = u((h) => {
592
+ }, [i]), Xe = u((h) => {
588
593
  i.changeFindScope(h);
589
- }, [i]), tt = u((h) => {
594
+ }, [i]), et = u((h) => {
590
595
  i.changeFindBy(h);
591
- }, [i]), it = zt(r), nt = Yt(r), rt = Zt(r);
592
- return w(() => {
593
- V && f === 0 && a.show({
596
+ }, [i]), tt = Vt(r), it = Gt(r), nt = Ht(r);
597
+ return L(() => {
598
+ k && f === 0 && a.show({
594
599
  content: r.t("find-replace.dialog.no-match"),
595
600
  type: N.Warning,
596
601
  duration: 5e3
597
602
  });
598
- }, [V, f, a, r]), /* @__PURE__ */ I(A, { children: [
599
- /* @__PURE__ */ l(M, { label: r.t("find-replace.dialog.find"), children: /* @__PURE__ */ l(
600
- $e,
603
+ }, [k, f, a, r]), /* @__PURE__ */ I($, { children: [
604
+ /* @__PURE__ */ l(R, { label: r.t("find-replace.dialog.find"), children: /* @__PURE__ */ l(
605
+ Ne,
601
606
  {
602
- findCompleted: V,
607
+ findCompleted: k,
603
608
  className: "univer-find-input",
604
609
  matchesCount: f,
605
610
  matchesPosition: p,
606
611
  findReplaceService: i,
607
612
  localeService: r,
608
- findString: R,
609
- onChange: qe
613
+ findString: M,
614
+ onChange: Ke
610
615
  }
611
616
  ) }),
612
- /* @__PURE__ */ l(M, { label: r.t("find-replace.dialog.replace"), children: /* @__PURE__ */ l(
613
- xt,
617
+ /* @__PURE__ */ l(R, { label: r.t("find-replace.dialog.replace"), children: /* @__PURE__ */ l(
618
+ Dt,
614
619
  {
615
620
  placeholder: r.t("find-replace.dialog.replace-placeholder"),
616
- value: Ue,
617
- onChange: (h) => ze(h)
621
+ value: we,
622
+ onChange: (h) => qe(h)
618
623
  }
619
624
  ) }),
620
- /* @__PURE__ */ l(M, { label: r.t("find-replace.dialog.find-direction.title"), children: /* @__PURE__ */ l(H, { value: ke, options: nt, onChange: Xe }) }),
621
- /* @__PURE__ */ l(ce, { children: /* @__PURE__ */ I(A, { children: [
622
- /* @__PURE__ */ l(M, { label: r.t("find-replace.dialog.find-scope.title"), children: /* @__PURE__ */ l(H, { value: je, options: it, onChange: et }) }),
623
- /* @__PURE__ */ l(M, { label: r.t("find-replace.dialog.find-by.title"), children: /* @__PURE__ */ l(H, { value: Ge, options: rt, onChange: tt }) })
625
+ /* @__PURE__ */ l(R, { label: r.t("find-replace.dialog.find-direction.title"), children: /* @__PURE__ */ l(V, { value: Be, options: it, onChange: Qe }) }),
626
+ /* @__PURE__ */ l(oe, { children: /* @__PURE__ */ I($, { children: [
627
+ /* @__PURE__ */ l(R, { label: r.t("find-replace.dialog.find-scope.title"), children: /* @__PURE__ */ l(V, { value: je, options: tt, onChange: Xe }) }),
628
+ /* @__PURE__ */ l(R, { label: r.t("find-replace.dialog.find-by.title"), children: /* @__PURE__ */ l(V, { value: ke, options: nt, onChange: et }) })
624
629
  ] }) }),
625
- /* @__PURE__ */ l(ce, { children: /* @__PURE__ */ I(A, { children: [
626
- /* @__PURE__ */ l(M, { children: /* @__PURE__ */ l(
627
- le,
630
+ /* @__PURE__ */ l(oe, { children: /* @__PURE__ */ I($, { children: [
631
+ /* @__PURE__ */ l(R, { children: /* @__PURE__ */ l(
632
+ ce,
628
633
  {
629
- checked: Be,
634
+ checked: Ue,
630
635
  onChange: (h) => {
631
636
  i.changeCaseSensitive(h);
632
637
  },
633
638
  children: r.t("find-replace.dialog.case-sensitive")
634
639
  }
635
640
  ) }),
636
- /* @__PURE__ */ l(M, { children: /* @__PURE__ */ l(
637
- le,
641
+ /* @__PURE__ */ l(R, { children: /* @__PURE__ */ l(
642
+ ce,
638
643
  {
639
644
  checked: We,
640
645
  onChange: (h) => {
@@ -644,158 +649,158 @@ const Ht = G(function(e, n) {
644
649
  }
645
650
  ) })
646
651
  ] }) }),
647
- /* @__PURE__ */ I("div", { className: B.findReplaceButtonsGroup, children: [
648
- /* @__PURE__ */ l($, { type: "primary", onClick: Ze, disabled: Ve, children: r.t("find-replace.dialog.find") }),
649
- /* @__PURE__ */ I("span", { className: B.findReplaceButtonsGroupRight, children: [
650
- /* @__PURE__ */ l($, { disabled: He, onClick: Je, children: r.t("find-replace.dialog.replace") }),
651
- /* @__PURE__ */ l($, { disabled: Ke, onClick: Qe, children: r.t("find-replace.dialog.replace-all") })
652
+ /* @__PURE__ */ I("div", { className: "univer-mt-6 univer-flex univer-justify-between", children: [
653
+ /* @__PURE__ */ l(G, { type: "primary", onClick: Ye, disabled: Ve, children: r.t("find-replace.dialog.find") }),
654
+ /* @__PURE__ */ I("span", { className: "univer-inline-flex univer-gap-2", children: [
655
+ /* @__PURE__ */ l(G, { disabled: Ge, onClick: Ze, children: r.t("find-replace.dialog.replace") }),
656
+ /* @__PURE__ */ l(G, { disabled: He, onClick: Je, children: r.t("find-replace.dialog.replace-all") })
652
657
  ] })
653
658
  ] })
654
659
  ] });
655
660
  });
656
- function qt() {
657
- const t = v(_), e = v(ve), n = v(ee), i = x(t.state$, void 0, !0), r = q(null);
658
- w(() => {
661
+ function kt() {
662
+ const t = v(g), e = v(me), n = v(X), i = x(t.state$, void 0, !0), r = K(null);
663
+ L(() => {
659
664
  let d;
660
665
  return r.current && (d = e.registerContainerElement(r.current)), () => d == null ? void 0 : d.dispose();
661
666
  }, [e]);
662
- const s = q(null), a = u(
663
- (d) => n.setContextValue(Fe, d),
667
+ const s = K(null), a = u(
668
+ (d) => n.setContextValue(ye, d),
664
669
  [n]
665
670
  ), c = u(
666
- (d) => n.setContextValue(ye, d),
671
+ (d) => n.setContextValue(Ie, d),
667
672
  [n]
668
673
  );
669
- return w(() => {
674
+ return L(() => {
670
675
  var S;
671
- const d = It(document, "focusin").subscribe((f) => {
676
+ const d = bt(document, "focusin").subscribe((f) => {
672
677
  var p;
673
678
  f.target && ((p = r.current) != null && p.contains(f.target)) ? a(!0) : a(!1), !s.current || !s.current.selectHasFocus() ? c(!0) : c(!1);
674
679
  });
675
680
  return (S = s.current) == null || S.focus(), a(!0), c(!0), () => {
676
681
  d.unsubscribe(), a(!1);
677
682
  };
678
- }, [a, c]), /* @__PURE__ */ l("div", { className: B.findReplaceDialogContainer, ref: r, children: i.replaceRevealed ? /* @__PURE__ */ l(Kt, { ref: s }) : /* @__PURE__ */ l(Ht, { ref: s }) });
683
+ }, [a, c]), /* @__PURE__ */ l("div", { ref: r, children: i.replaceRevealed ? /* @__PURE__ */ l(jt, { ref: s }) : /* @__PURE__ */ l(Bt, { ref: s }) });
679
684
  }
680
- function zt(t) {
685
+ function Vt(t) {
681
686
  const e = t.getCurrentLocale();
682
- return ie(() => [
683
- { label: t.t("find-replace.dialog.find-scope.current-sheet"), value: J.SUBUNIT },
684
- { label: t.t("find-replace.dialog.find-scope.workbook"), value: J.UNIT }
687
+ return te(() => [
688
+ { label: t.t("find-replace.dialog.find-scope.current-sheet"), value: Z.SUBUNIT },
689
+ { label: t.t("find-replace.dialog.find-scope.workbook"), value: Z.UNIT }
685
690
  ], [e]);
686
691
  }
687
- function Yt(t) {
692
+ function Gt(t) {
688
693
  const e = t.getCurrentLocale();
689
- return ie(() => [
690
- { label: t.t("find-replace.dialog.find-direction.row"), value: Y.ROW },
691
- { label: t.t("find-replace.dialog.find-direction.column"), value: Y.COLUMN }
694
+ return te(() => [
695
+ { label: t.t("find-replace.dialog.find-direction.row"), value: z.ROW },
696
+ { label: t.t("find-replace.dialog.find-direction.column"), value: z.COLUMN }
692
697
  ], [e]);
693
698
  }
694
- function Zt(t) {
699
+ function Ht(t) {
695
700
  const e = t.getCurrentLocale();
696
- return ie(() => [
697
- { label: t.t("find-replace.dialog.find-by.value"), value: Z.VALUE },
698
- { label: t.t("find-replace.dialog.find-by.formula"), value: Z.FORMULA }
701
+ return te(() => [
702
+ { label: t.t("find-replace.dialog.find-by.value"), value: Y.VALUE },
703
+ { label: t.t("find-replace.dialog.find-by.formula"), value: Y.FORMULA }
699
704
  ], [e]);
700
705
  }
701
706
  function F(t) {
707
+ return t.getContextValue(ye);
708
+ }
709
+ function Kt(t) {
702
710
  return t.getContextValue(Fe);
703
711
  }
704
- function Jt(t) {
705
- return t.getContextValue(De);
712
+ function Ae(t) {
713
+ return t.getContextValue(Ie);
706
714
  }
707
- function Le(t) {
708
- return t.getContextValue(ye);
715
+ const O = "7_find-replace-shortcuts";
716
+ function re(t) {
717
+ return t.getContextValue(pe);
709
718
  }
710
- const E = "7_find-replace-shortcuts";
711
719
  function se(t) {
712
- return t.getContextValue(ge);
713
- }
714
- function ae(t) {
715
720
  return !t.getContextValue(_e);
716
721
  }
717
- const Qt = {
722
+ const qt = {
718
723
  id: T.id,
719
724
  description: "find-replace.shortcut.open-find-dialog",
720
725
  binding: C.F | y.CTRL_COMMAND,
721
- group: E,
726
+ group: O,
722
727
  preconditions(t) {
723
- return !F(t) && se(t) && ae(t);
728
+ return !F(t) && re(t) && se(t);
724
729
  }
725
- }, Xt = {
730
+ }, zt = {
726
731
  id: T.id,
727
732
  description: "find-replace.shortcut.open-find-dialog",
728
733
  binding: C.F | y.CTRL_COMMAND,
729
734
  mac: C.F | y.MAC_CTRL,
730
735
  preconditions(t) {
731
- return !F(t) && se(t) && ae(t);
736
+ return !F(t) && re(t) && se(t);
732
737
  }
733
- }, ei = {
734
- id: re.id,
738
+ }, Yt = {
739
+ id: ne.id,
735
740
  description: "find-replace.shortcut.open-replace-dialog",
736
741
  binding: C.H | y.CTRL_COMMAND,
737
742
  mac: C.H | y.MAC_CTRL,
738
- group: E,
743
+ group: O,
739
744
  preconditions(t) {
740
- return se(t) && ae(t) && (!F(t) || !Jt(t));
745
+ return re(t) && se(t) && (!F(t) || !Kt(t));
741
746
  }
742
- }, ti = {
743
- id: Ee.id,
747
+ }, Zt = {
748
+ id: Te.id,
744
749
  description: "find-replace.shortcut.go-to-next-match",
745
750
  binding: C.ENTER,
746
- group: E,
751
+ group: O,
747
752
  priority: 1e3,
748
753
  preconditions(t) {
749
- return Le(t) && F(t);
754
+ return Ae(t) && F(t);
750
755
  }
751
- }, ii = {
756
+ }, Jt = {
752
757
  id: Oe.id,
753
758
  description: "find-replace.shortcut.go-to-previous-match",
754
759
  binding: C.ENTER | y.SHIFT,
755
- group: E,
760
+ group: O,
756
761
  priority: 1e3,
757
762
  preconditions(t) {
758
- return Le(t) && F(t);
763
+ return Ae(t) && F(t);
759
764
  }
760
- }, ni = {
761
- id: Ne.id,
765
+ }, Qt = {
766
+ id: Ee.id,
762
767
  description: "find-replace.shortcut.focus-selection",
763
768
  binding: C.ESC,
764
- group: E,
769
+ group: O,
765
770
  priority: 1e3,
766
771
  preconditions(t) {
767
772
  return F(t);
768
773
  }
769
774
  };
770
- function ri(t) {
771
- const e = t.get(ee);
775
+ function Xt(t) {
776
+ const e = t.get(X);
772
777
  return {
773
778
  id: T.id,
774
779
  icon: "SearchIcon",
775
780
  tooltip: "find-replace.toolbar",
776
781
  type: _t.BUTTON,
777
- hidden$: gt(t, lt.UNIVER_SHEET),
778
- disabled$: Se([
782
+ hidden$: pt(t, ct.UNIVER_SHEET),
783
+ disabled$: ve([
779
784
  e.subscribeContextValue$(_e),
780
- e.subscribeContextValue$(ge)
781
- ]).pipe(yt(([n, i]) => n || !i))
785
+ e.subscribeContextValue$(pe)
786
+ ]).pipe(It(([n, i]) => n || !i))
782
787
  };
783
788
  }
784
- const si = {
785
- [mt.OTHERS]: {
789
+ const ei = {
790
+ [gt.OTHERS]: {
786
791
  [T.id]: {
787
792
  order: 2,
788
- menuItemFactory: ri
793
+ menuItemFactory: Xt
789
794
  }
790
795
  }
791
796
  };
792
- var ai = Object.getOwnPropertyDescriptor, oi = (t, e, n, i) => {
793
- for (var r = i > 1 ? void 0 : i ? ai(e, n) : e, s = t.length - 1, a; s >= 0; s--)
797
+ var ti = Object.getOwnPropertyDescriptor, ii = (t, e, n, i) => {
798
+ for (var r = i > 1 ? void 0 : i ? ti(e, n) : e, s = t.length - 1, a; s >= 0; s--)
794
799
  (a = t[s]) && (r = a(r) || r);
795
800
  return r;
796
801
  }, m = (t, e) => (n, i) => e(n, i, t);
797
- const he = "DESKTOP_FIND_REPLACE_DIALOG", we = 350, ci = 20, li = -90;
798
- let W = class extends dt {
802
+ const de = "DESKTOP_FIND_REPLACE_DIALOG", Le = 350, ni = 20, ri = -90;
803
+ let U = class extends lt {
799
804
  constructor(e, n, i, r, s, a, c, d, S, f) {
800
805
  super();
801
806
  o(this, "_closingListenerDisposable");
@@ -808,112 +813,112 @@ let W = class extends dt {
808
813
  _initCommands() {
809
814
  [
810
815
  T,
811
- re,
812
- Ee,
813
- Oe,
816
+ ne,
814
817
  Te,
818
+ Oe,
815
819
  Pe,
816
- Ne
820
+ xe,
821
+ Ee
817
822
  ].forEach((e) => {
818
823
  this.disposeWithMe(this._commandService.registerCommand(e));
819
824
  });
820
825
  }
821
826
  _initShortcuts() {
822
827
  [
823
- ei,
824
- Qt,
825
- Xt,
826
- ii,
827
- ti,
828
- ni
828
+ Yt,
829
+ qt,
830
+ zt,
831
+ Jt,
832
+ Zt,
833
+ Qt
829
834
  ].forEach((e) => this.disposeWithMe(this._shortcutService.registerShortcut(e)));
830
835
  }
831
836
  _initUI() {
832
- this.disposeWithMe(this._componentManager.register("FindReplaceDialog", qt)), this.disposeWithMe(this._componentManager.register("SearchIcon", Ie)), this._menuManagerService.mergeMenu(si), this._findReplaceService.stateUpdates$.pipe(oe(this.dispose$)).subscribe((e) => {
837
+ this.disposeWithMe(this._componentManager.register("FindReplaceDialog", kt)), this.disposeWithMe(this._componentManager.register("SearchIcon", be)), this._menuManagerService.mergeMenu(ei), this._findReplaceService.stateUpdates$.pipe(ae(this.dispose$)).subscribe((e) => {
833
838
  e.revealed === !0 && this._openPanel();
834
839
  });
835
840
  }
836
841
  _openPanel() {
837
842
  this._dialogService.open({
838
- id: he,
843
+ id: de,
839
844
  draggable: !0,
840
- width: we,
845
+ width: Le,
841
846
  title: { title: this._localeService.t("find-replace.dialog.title") },
842
847
  children: { label: "FindReplaceDialog" },
843
848
  destroyOnClose: !0,
844
- defaultPosition: di(),
849
+ defaultPosition: si(),
845
850
  preservePositionOnDestroy: !0,
846
851
  onClose: () => this.closePanel()
847
- }), this._closingListenerDisposable = L(this._univerInstanceService.focused$.pipe(oe(this.dispose$)).subscribe((e) => {
852
+ }), this._closingListenerDisposable = A(this._univerInstanceService.focused$.pipe(ae(this.dispose$)).subscribe((e) => {
848
853
  (!e || !this._univerInstanceService.getUniverSheetInstance(e)) && this.closePanel();
849
854
  }));
850
855
  }
851
856
  closePanel() {
852
- this._closingListenerDisposable && (this._closingListenerDisposable.dispose(), this._closingListenerDisposable = null, this._dialogService.close(he), this._findReplaceService.terminate(), queueMicrotask(() => this._layoutService.focus()));
857
+ this._closingListenerDisposable && (this._closingListenerDisposable.dispose(), this._closingListenerDisposable = null, this._dialogService.close(de), this._findReplaceService.terminate(), queueMicrotask(() => this._layoutService.focus()));
853
858
  }
854
859
  };
855
- W = oi([
856
- m(0, pe),
857
- m(1, vt),
858
- m(2, St),
859
- m(3, k),
860
- m(4, _),
861
- m(5, Ct),
862
- m(6, ve),
863
- m(7, D(j)),
864
- m(8, D(Rt)),
865
- m(9, D(X))
866
- ], W);
867
- function di() {
860
+ U = ii([
861
+ m(0, fe),
862
+ m(1, mt),
863
+ m(2, vt),
864
+ m(3, W),
865
+ m(4, g),
866
+ m(5, St),
867
+ m(6, me),
868
+ m(7, D(B)),
869
+ m(8, D(Ct)),
870
+ m(9, D(Q))
871
+ ], U);
872
+ function si() {
868
873
  const { innerWidth: t } = window;
869
- return { x: (t - we) / 2 - ci, y: li };
874
+ return { x: (t - Le) / 2 - ni, y: ri };
870
875
  }
871
- var hi = Object.getOwnPropertyDescriptor, ui = (t, e, n, i) => {
872
- for (var r = i > 1 ? void 0 : i ? hi(e, n) : e, s = t.length - 1, a; s >= 0; s--)
876
+ var ai = Object.getOwnPropertyDescriptor, oi = (t, e, n, i) => {
877
+ for (var r = i > 1 ? void 0 : i ? ai(e, n) : e, s = t.length - 1, a; s >= 0; s--)
873
878
  (a = t[s]) && (r = a(r) || r);
874
879
  return r;
875
- }, ue = (t, e) => (n, i) => e(n, i, t);
876
- const fi = "UNIVER_FIND_REPLACE_PLUGIN";
877
- var K;
878
- let fe = (K = class extends ut {
879
- constructor(t = de, e, n) {
880
+ }, he = (t, e) => (n, i) => e(n, i, t);
881
+ const ci = "UNIVER_FIND_REPLACE_PLUGIN";
882
+ var H;
883
+ let ue = (H = class extends ht {
884
+ constructor(t = le, e, n) {
880
885
  super(), this._config = t, this._injector = e, this._configService = n;
881
- const { ...i } = ft(
886
+ const { ...i } = ut(
882
887
  {},
883
- de,
888
+ le,
884
889
  this._config
885
890
  );
886
- this._configService.setConfig(Et, i);
891
+ this._configService.setConfig(Tt, i);
887
892
  }
888
893
  onStarting() {
889
894
  [
890
- [W],
891
- [_, { useClass: Q }]
895
+ [U],
896
+ [g, { useClass: J }]
892
897
  ].forEach((t) => this._injector.add(t));
893
898
  }
894
899
  onRendered() {
895
- this._injector.get(W);
900
+ this._injector.get(U);
896
901
  }
897
- }, o(K, "pluginName", fi), K);
898
- fe = ui([
899
- ue(1, D(X)),
900
- ue(2, ht)
901
- ], fe);
902
+ }, o(H, "pluginName", ci), H);
903
+ ue = oi([
904
+ he(1, D(Q)),
905
+ he(2, dt)
906
+ ], ue);
902
907
  export {
903
- Z as FindBy,
904
- Y as FindDirection,
905
- Mi as FindModel,
906
- W as FindReplaceController,
907
- z as FindReplaceModel,
908
- Bt as FindReplaceState,
909
- J as FindScope,
910
- Ee as GoToNextMatchOperation,
908
+ Y as FindBy,
909
+ z as FindDirection,
910
+ mi as FindModel,
911
+ U as FindReplaceController,
912
+ q as FindReplaceModel,
913
+ Ut as FindReplaceState,
914
+ Z as FindScope,
915
+ Te as GoToNextMatchOperation,
911
916
  Oe as GoToPreviousMatchOperation,
912
- _ as IFindReplaceService,
917
+ g as IFindReplaceService,
913
918
  T as OpenFindDialogOperation,
914
- re as OpenReplaceDialogOperation,
915
- Te as ReplaceAllMatchesCommand,
916
- Pe as ReplaceCurrentMatchCommand,
917
- fe as UniverFindReplacePlugin,
918
- ne as createInitFindReplaceState
919
+ ne as OpenReplaceDialogOperation,
920
+ Pe as ReplaceAllMatchesCommand,
921
+ xe as ReplaceCurrentMatchCommand,
922
+ ue as UniverFindReplacePlugin,
923
+ ie as createInitFindReplaceState
919
924
  };