@univerjs-pro/sheets-mcp 0.15.0 → 0.15.1-insiders.20260117-8ce4a01

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.
@@ -1,4 +1,4 @@
1
- import { IFormulaUsage, IFormulaUsageAsA1 } from '@univerjs-pro/sheets-mcp';
1
+ import { IFormulaUsage, IFormulaUsageAsA1, IGetSizeUsagesOptions, IGetStyleUsagesOptions, ISizeUsageGrouped, ISizeUsageGroupedAsA1, IStyleUsage, IStyleUsageAsA1 } from '@univerjs-pro/sheets-mcp';
2
2
  import { FRange } from '@univerjs/sheets/facade';
3
3
  /**
4
4
  * @ignore
@@ -30,10 +30,82 @@ export interface IFRangeSheetsMCP {
30
30
  * ```
31
31
  */
32
32
  getFormulaUsagesAsA1(): Promise<IFormulaUsageAsA1[]>;
33
+ /**
34
+ * Get all style usages in the range
35
+ * @param options options for filtering style properties and max count
36
+ * @returns An array of style usages
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const workbook = univerAPI.getActiveWorkbook()
41
+ * const sheet = workbook.getActiveSheet()
42
+ * const range = sheet.getRangeByA1('A1:C10')
43
+ * const usages = range.getStyleUsages();
44
+ * // or filter by specific properties
45
+ * const usagesFiltered = range.getStyleUsages({ properties: ['fontSize', 'fontFamily', 'width'] });
46
+ * // or limit results
47
+ * const usagesLimited = range.getStyleUsages({ maxCount: 100 });
48
+ * ```
49
+ */
50
+ getStyleUsages(options?: IGetStyleUsagesOptions): IStyleUsage[];
51
+ /**
52
+ * Get all style usages in the range in A1 notation
53
+ * @param options options for filtering style properties and max count
54
+ * @returns An array of style usages in A1 notation
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const workbook = univerAPI.getActiveWorkbook()
59
+ * const sheet = workbook.getActiveSheet()
60
+ * const range = sheet.getRangeByA1('A1:C10')
61
+ * const usagesA1 = range.getStyleUsagesAsA1();
62
+ * // or filter by specific properties
63
+ * const usagesA1Filtered = range.getStyleUsagesAsA1({ properties: ['fontSize', 'fontFamily', 'height'] });
64
+ * // or limit results
65
+ * const usagesA1Limited = range.getStyleUsagesAsA1({ maxCount: 100 });
66
+ * ```
67
+ */
68
+ getStyleUsagesAsA1(options?: IGetStyleUsagesOptions): IStyleUsageAsA1[];
69
+ /**
70
+ * Get all row height and column width usages in the range
71
+ * @param options options for max count
72
+ * @returns Grouped size usages with widths and heights
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const workbook = univerAPI.getActiveWorkbook()
77
+ * const sheet = workbook.getActiveSheet()
78
+ * const range = sheet.getRangeByA1('A1:C10')
79
+ * const usages = range.getSizeUsages();
80
+ * // or limit results
81
+ * const usagesLimited = range.getSizeUsages({ maxCount: 100 });
82
+ * ```
83
+ */
84
+ getSizeUsages(options?: IGetSizeUsagesOptions): ISizeUsageGrouped;
85
+ /**
86
+ * Get all row height and column width usages in the range in A1 notation
87
+ * @param options options for max count
88
+ * @returns Grouped size usages in A1 notation with widths and heights
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * const workbook = univerAPI.getActiveWorkbook()
93
+ * const sheet = workbook.getActiveSheet()
94
+ * const range = sheet.getRangeByA1('A1:C10')
95
+ * const usagesA1 = range.getSizeUsagesAsA1();
96
+ * // or limit results
97
+ * const usagesA1Limited = range.getSizeUsagesAsA1({ maxCount: 100 });
98
+ * ```
99
+ */
100
+ getSizeUsagesAsA1(options?: IGetSizeUsagesOptions): ISizeUsageGroupedAsA1;
33
101
  }
34
102
  export declare class FRangeSheetsMCP extends FRange implements IFRangeSheetsMCP {
35
103
  getFormulaUsages(): Promise<IFormulaUsage[]>;
36
104
  getFormulaUsagesAsA1(): Promise<IFormulaUsageAsA1[]>;
105
+ getStyleUsages(options?: IGetStyleUsagesOptions): IStyleUsage[];
106
+ getStyleUsagesAsA1(options?: IGetStyleUsagesOptions): IStyleUsageAsA1[];
107
+ getSizeUsages(options?: IGetSizeUsagesOptions): ISizeUsageGrouped;
108
+ getSizeUsagesAsA1(options?: IGetSizeUsagesOptions): ISizeUsageGroupedAsA1;
37
109
  }
38
110
  declare module '@univerjs/sheets/facade' {
39
111
  interface FRange extends IFRangeSheetsMCP {
@@ -1,4 +1,4 @@
1
- import { IFormulaUsage, IFormulaUsageAsA1 } from '@univerjs-pro/sheets-mcp';
1
+ import { IFormulaUsage, IFormulaUsageAsA1, IGetSizeUsagesOptions, IGetStyleUsagesOptions, ISizeUsageGrouped, ISizeUsageGroupedAsA1, IStyleUsage, IStyleUsageAsA1 } from '@univerjs-pro/sheets-mcp';
2
2
  import { FWorksheet } from '@univerjs/sheets/facade';
3
3
  /**
4
4
  * @ignore
@@ -28,10 +28,78 @@ export interface IFWorksheetSheetsMCP {
28
28
  * ```
29
29
  */
30
30
  getFormulaUsagesAsA1(): Promise<IFormulaUsageAsA1[]>;
31
+ /**
32
+ * Get all style usages in the worksheet
33
+ * @param options options for filtering style properties and max count
34
+ * @returns An array of style usages
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const workbook = univerAPI.getActiveWorkbook()
39
+ * const sheet = workbook.getActiveSheet()
40
+ * const usages = sheet.getStyleUsages();
41
+ * // or filter by specific properties
42
+ * const usagesFiltered = sheet.getStyleUsages({ properties: ['fontSize', 'fontFamily', 'width'] });
43
+ * // or limit results
44
+ * const usagesLimited = sheet.getStyleUsages({ maxCount: 100 });
45
+ * ```
46
+ */
47
+ getStyleUsages(options?: IGetStyleUsagesOptions): IStyleUsage[];
48
+ /**
49
+ * Get all style usages in the worksheet in A1 notation
50
+ * @param options options for filtering style properties and max count
51
+ * @returns An array of style usages in A1 notation
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const workbook = univerAPI.getActiveWorkbook()
56
+ * const sheet = workbook.getActiveSheet()
57
+ * const usagesA1 = sheet.getStyleUsagesAsA1();
58
+ * // or filter by specific properties
59
+ * const usagesA1Filtered = sheet.getStyleUsagesAsA1({ properties: ['fontSize', 'fontFamily', 'height'] });
60
+ * // or limit results
61
+ * const usagesA1Limited = sheet.getStyleUsagesAsA1({ maxCount: 100 });
62
+ * ```
63
+ */
64
+ getStyleUsagesAsA1(options?: IGetStyleUsagesOptions): IStyleUsageAsA1[];
65
+ /**
66
+ * Get all row height and column width usages in the worksheet
67
+ * @param options options for max count
68
+ * @returns Grouped size usages with widths and heights
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const workbook = univerAPI.getActiveWorkbook()
73
+ * const sheet = workbook.getActiveSheet()
74
+ * const usages = sheet.getSizeUsages();
75
+ * // or limit results
76
+ * const usagesLimited = sheet.getSizeUsages({ maxCount: 100 });
77
+ * ```
78
+ */
79
+ getSizeUsages(options?: IGetSizeUsagesOptions): ISizeUsageGrouped;
80
+ /**
81
+ * Get all row height and column width usages in the worksheet in A1 notation
82
+ * @param options options for max count
83
+ * @returns Grouped size usages in A1 notation with widths and heights
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * const workbook = univerAPI.getActiveWorkbook()
88
+ * const sheet = workbook.getActiveSheet()
89
+ * const usagesA1 = sheet.getSizeUsagesAsA1();
90
+ * // or limit results
91
+ * const usagesA1Limited = sheet.getSizeUsagesAsA1({ maxCount: 100 });
92
+ * ```
93
+ */
94
+ getSizeUsagesAsA1(options?: IGetSizeUsagesOptions): ISizeUsageGroupedAsA1;
31
95
  }
32
96
  export declare class FWorksheetSheetsMCP extends FWorksheet implements IFWorksheetSheetsMCP {
33
97
  getFormulaUsages(): Promise<IFormulaUsage[]>;
34
98
  getFormulaUsagesAsA1(): Promise<IFormulaUsageAsA1[]>;
99
+ getStyleUsages(options?: IGetStyleUsagesOptions): IStyleUsage[];
100
+ getStyleUsagesAsA1(options?: IGetStyleUsagesOptions): IStyleUsageAsA1[];
101
+ getSizeUsages(options?: IGetSizeUsagesOptions): ISizeUsageGrouped;
102
+ getSizeUsagesAsA1(options?: IGetSizeUsagesOptions): ISizeUsageGroupedAsA1;
35
103
  }
36
104
  declare module '@univerjs/sheets/facade' {
37
105
  interface FWorksheet extends IFWorksheetSheetsMCP {
@@ -1,3 +1,6 @@
1
1
  export { UniverSheetMCPPlugin } from './plugin';
2
- export { type IFormulaUsage, IFormulaUsageAnalyzer, type IFormulaUsageAsA1, toA1 } from './services/formula-analysis.service';
2
+ export { CellUsageAnalyzer, getA1Notation, type ICellUsage, ICellUsageAnalyzer, type ICellUsageAsA1, type IDataExtractorCondition, } from './services/cell-usage-analyzer.service';
3
+ export { toA1 as formulaToA1, type IFormulaUsage, IFormulaUsageAnalyzer, type IFormulaUsageAsA1 } from './services/formula-analysis.service';
4
+ export { type IGetSizeUsagesOptions, ISizeUsageAnalyzer, type ISizeUsageColumn, type ISizeUsageColumnAsA1, type ISizeUsageGrouped, type ISizeUsageGroupedAsA1, type ISizeUsageRow, type ISizeUsageRowAsA1, SizeUsageAnalyzer, } from './services/size-analysis.service';
5
+ export { type IGetStyleUsagesOptions, type IStyleConfig, type IStyleUsage, IStyleUsageAnalyzer, type IStyleUsageAsA1, toA1 as styleToA1, StyleUsageAnalyzer, } from './services/style-analysis.service';
3
6
  export * from './tools';
@@ -0,0 +1,68 @@
1
+ import { ICellData, IRange, Nullable } from '@univerjs/core';
2
+ /**
3
+ * Generic cell usage data interface
4
+ */
5
+ export interface ICellUsage {
6
+ /**
7
+ * Hash of the data for identifying identical data
8
+ */
9
+ dataHash: string;
10
+ /**
11
+ * First occurrence location of the data
12
+ */
13
+ firstOccurrence: IRange;
14
+ /**
15
+ * All cell ranges containing this data
16
+ */
17
+ filledRanges: IRange[];
18
+ }
19
+ /**
20
+ * A1 format cell usage data
21
+ */
22
+ export interface ICellUsageAsA1 {
23
+ /**
24
+ * Hash of the data for identifying identical data
25
+ */
26
+ dataHash: string;
27
+ /**
28
+ * First occurrence location in A1 notation
29
+ */
30
+ firstOccurrence: string;
31
+ /**
32
+ * All cell ranges in A1 notation (comma separated)
33
+ */
34
+ filledRanges: string;
35
+ }
36
+ /**
37
+ * Data extractor condition - defines how to extract and identify data from cells
38
+ */
39
+ export interface IDataExtractorCondition {
40
+ /**
41
+ * Extract data from a cell
42
+ * @param cell cell data
43
+ * @returns extracted data, null if no relevant data
44
+ */
45
+ getData(cell: Nullable<ICellData>): ICellData | null;
46
+ /**
47
+ * Generate hash for extracted data (used for data grouping)
48
+ * @param data extracted data
49
+ * @param rowIndex optional row index for position-dependent hashing
50
+ * @param columnIndex optional column index for position-dependent hashing
51
+ * @returns hash string, empty string means ignore this cell
52
+ */
53
+ getHash(data: Nullable<ICellData>, rowIndex?: number, columnIndex?: number): string;
54
+ }
55
+ /**
56
+ * Convert rectangle coordinates to A1 notation
57
+ */
58
+ export declare function getA1Notation([r1, r2, c1, c2]: [number, number, number, number]): string;
59
+ export declare const ICellUsageAnalyzer: import('@wendellhu/redi').IdentifierDecorator<CellUsageAnalyzer>;
60
+ export declare class CellUsageAnalyzer {
61
+ /**
62
+ * Analyze cell data matrix to find all data usage patterns
63
+ * @param data cell data matrix
64
+ * @param condition data extraction condition
65
+ * @returns array of cell usage data
66
+ */
67
+ getAllCellUsages(data: Nullable<ICellData>[][], condition: IDataExtractorCondition): ICellUsage[];
68
+ }
@@ -0,0 +1,118 @@
1
+ import { IColumnRange, IRowRange, Worksheet } from '@univerjs/core';
2
+ /**
3
+ * Options for getSizeUsages methods
4
+ */
5
+ export interface IGetSizeUsagesOptions {
6
+ /**
7
+ * Maximum number of results to return for both widths and heights. Default is 200.
8
+ * @example
9
+ * ```ts
10
+ * { maxCount: 100 }
11
+ * ```
12
+ */
13
+ maxCount?: number;
14
+ }
15
+ /**
16
+ * Single column width usage item
17
+ */
18
+ export interface ISizeUsageColumn {
19
+ /**
20
+ * The width value in pixels
21
+ */
22
+ value: number;
23
+ /**
24
+ * The column ranges with this width
25
+ */
26
+ ranges: IColumnRange[];
27
+ }
28
+ /**
29
+ * Single row height usage item
30
+ */
31
+ export interface ISizeUsageRow {
32
+ /**
33
+ * The height value in pixels
34
+ */
35
+ value: number;
36
+ /**
37
+ * The row ranges with this height
38
+ */
39
+ ranges: IRowRange[];
40
+ }
41
+ /**
42
+ * A1 format column width usage item
43
+ */
44
+ export interface ISizeUsageColumnAsA1 {
45
+ /**
46
+ * The width value in pixels
47
+ */
48
+ value: number;
49
+ /**
50
+ * The column ranges in A1 notation (comma separated)
51
+ * @example "A:C, E:T"
52
+ */
53
+ ranges: string;
54
+ }
55
+ /**
56
+ * A1 format row height usage item
57
+ */
58
+ export interface ISizeUsageRowAsA1 {
59
+ /**
60
+ * The height value in pixels
61
+ */
62
+ value: number;
63
+ /**
64
+ * The row ranges in A1 notation (comma separated)
65
+ * @example "1:1, 3:5000"
66
+ */
67
+ ranges: string;
68
+ }
69
+ /**
70
+ * Grouped size usage results
71
+ */
72
+ export interface ISizeUsageGrouped {
73
+ /**
74
+ * Column width usages grouped by width value
75
+ */
76
+ widths: ISizeUsageColumn[];
77
+ /**
78
+ * Row height usages grouped by height value
79
+ */
80
+ heights: ISizeUsageRow[];
81
+ }
82
+ /**
83
+ * A1 format grouped size usage results
84
+ */
85
+ export interface ISizeUsageGroupedAsA1 {
86
+ /**
87
+ * Column width usages in A1 notation
88
+ */
89
+ widths: ISizeUsageColumnAsA1[];
90
+ /**
91
+ * Row height usages in A1 notation
92
+ */
93
+ heights: ISizeUsageRowAsA1[];
94
+ }
95
+ export declare const ISizeUsageAnalyzer: import('@wendellhu/redi').IdentifierDecorator<SizeUsageAnalyzer>;
96
+ /**
97
+ * Size usage analyzer - aggregates row heights and column widths
98
+ */
99
+ export declare class SizeUsageAnalyzer {
100
+ private _maxCount?;
101
+ /**
102
+ * Update config based on options
103
+ */
104
+ updateConfig(options?: IGetSizeUsagesOptions): void;
105
+ /**
106
+ * Get all size usages from a worksheet
107
+ * @param worksheet The worksheet to analyze
108
+ * @param startRow Start row index (inclusive)
109
+ * @param endRow End row index (inclusive)
110
+ * @param startColumn Start column index (inclusive)
111
+ * @param endColumn End column index (inclusive)
112
+ */
113
+ getAllSizeUsages(worksheet: Worksheet, startRow?: number, endRow?: number, startColumn?: number, endColumn?: number): ISizeUsageGrouped;
114
+ /**
115
+ * Convert ISizeUsageGrouped to A1 format
116
+ */
117
+ toA1(grouped: ISizeUsageGrouped): ISizeUsageGroupedAsA1;
118
+ }
@@ -0,0 +1,93 @@
1
+ import { ICellData, IRange, Nullable, Workbook, Worksheet } from '@univerjs/core';
2
+ import { CellUsageAnalyzer } from './cell-usage-analyzer.service';
3
+ /**
4
+ * Interface for style usage information
5
+ */
6
+ export interface IStyleUsage {
7
+ /**
8
+ * The style hash - a compact string representation of the style
9
+ */
10
+ styleHash: string;
11
+ /**
12
+ * The filled ranges of cells with this style, including the first occurrence
13
+ */
14
+ filledRanges: IRange[];
15
+ }
16
+ /**
17
+ * Interface for style usage information in A1 notation
18
+ */
19
+ export interface IStyleUsageAsA1 {
20
+ /**
21
+ * The style hash - a compact string representation of the style
22
+ */
23
+ styleHash: string;
24
+ /**
25
+ * The filled ranges of cells with this style in A1 notation, including the first occurrence
26
+ */
27
+ filledRanges: string;
28
+ }
29
+ /**
30
+ * Style extractor configuration
31
+ */
32
+ export interface IStyleConfig {
33
+ fontFamily?: boolean;
34
+ fontSize?: boolean;
35
+ bold?: boolean;
36
+ italic?: boolean;
37
+ fontColor?: boolean;
38
+ backgroundColor?: boolean;
39
+ width?: boolean;
40
+ height?: boolean;
41
+ horizontalAlign?: boolean;
42
+ verticalAlign?: boolean;
43
+ underline?: boolean;
44
+ strikethrough?: boolean;
45
+ numberFormat?: boolean;
46
+ }
47
+ /**
48
+ * Options for getStyleUsages methods
49
+ */
50
+ export interface IGetStyleUsagesOptions {
51
+ /**
52
+ * Filter which style properties to include.
53
+ * When specified, only these properties will be analyzed (whitelist mode).
54
+ * Unsupported properties are ignored.
55
+ * @example
56
+ * ```ts
57
+ * { properties: ['fontSize', 'fontFamily', 'width'] }
58
+ * ```
59
+ */
60
+ properties?: Array<keyof IStyleConfig>;
61
+ /**
62
+ * Maximum number of results to return. Default is 200.
63
+ * When specified, the return value will include a `hasMore` property indicating if more results exist.
64
+ * @example
65
+ * ```ts
66
+ * { maxCount: 100 }
67
+ * ```
68
+ */
69
+ maxCount?: number;
70
+ }
71
+ /**
72
+ * Convert IStyleUsage to A1 format
73
+ */
74
+ export declare function toA1(usage: IStyleUsage): IStyleUsageAsA1;
75
+ export declare const IStyleUsageAnalyzer: import('@wendellhu/redi').IdentifierDecorator<StyleUsageAnalyzer>;
76
+ /**
77
+ * Style usage analyzer - based on generic CellUsageAnalyzer
78
+ */
79
+ export declare class StyleUsageAnalyzer extends CellUsageAnalyzer {
80
+ private _config;
81
+ private _maxCount?;
82
+ constructor(config?: IStyleConfig);
83
+ /**
84
+ * Update config based on options
85
+ * @param options options for getStyleUsages
86
+ */
87
+ updateConfig(options?: IGetStyleUsagesOptions): void;
88
+ /**
89
+ * Get all style usages from cell data matrix
90
+ * @returns array of style usages with omitted count on last item if truncated
91
+ */
92
+ getAllStyleUsages(data: Nullable<ICellData>[][], workbook: Workbook, worksheet?: Worksheet): IStyleUsage[];
93
+ }
@@ -1,6 +1,6 @@
1
1
  import { Injector, ICommandService } from '@univerjs/core';
2
+ import { z } from '@univerjs-pro/mcp';
2
3
  import { SheetInterceptorService } from '@univerjs/sheets';
3
- import { z } from 'zod';
4
4
  /**
5
5
  * Get UniverAPI instance from globalThis (temporary implementation)
6
6
  */
@@ -1,5 +1,4 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
2
- import { z } from 'zod';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
3
2
  export declare const ZodConditionalFormatRuleSchema: z.ZodObject<{
4
3
  rule_id: z.ZodOptional<z.ZodString>;
5
4
  range: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,5 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
2
2
  import { DataValidationOperator } from '@univerjs/core';
3
- import { z } from 'zod';
4
3
  export declare const dataValidationRuleSchema: z.ZodObject<{
5
4
  rule_id: z.ZodOptional<z.ZodString>;
6
5
  range_a1: z.ZodString;
@@ -1,5 +1,4 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
2
- import { z } from 'zod';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
3
2
  export declare const batchRangeDataItemSchema: z.ZodObject<{
4
3
  range: z.ZodString;
5
4
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
@@ -1,5 +1,4 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
2
- import { z } from 'zod';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
3
2
  export declare const insertRowOperationSchema: z.ZodObject<{
4
3
  position: z.ZodNumber;
5
4
  how_many: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -1,5 +1,4 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
2
- import { z } from 'zod';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
3
2
  export declare const renameSheetOperationSchema: z.ZodObject<{
4
3
  old_name: z.ZodString;
5
4
  new_name: z.ZodString;
@@ -1,5 +1,4 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
2
- import { z } from 'zod';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
3
2
  export declare const cellDimensionRequestSchema: z.ZodObject<{
4
3
  range: z.ZodString;
5
4
  width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x270e(_0x25a9a8,_0x4ebd29){_0x25a9a8=_0x25a9a8-0xfc;const _0x4c03b8=_0x4c03();let _0x270e06=_0x4c03b8[_0x25a9a8];return _0x270e06;}(function(_0x54fcff,_0x3d2606){const _0x4809fb=_0x270e,_0x1ca270=_0x54fcff();while(!![]){try{const _0x21ee12=-parseInt(_0x4809fb(0x126))/0x1+parseInt(_0x4809fb(0x12c))/0x2+-parseInt(_0x4809fb(0x114))/0x3*(parseInt(_0x4809fb(0x129))/0x4)+parseInt(_0x4809fb(0x10a))/0x5*(-parseInt(_0x4809fb(0x11a))/0x6)+-parseInt(_0x4809fb(0x104))/0x7+parseInt(_0x4809fb(0x102))/0x8*(-parseInt(_0x4809fb(0x117))/0x9)+parseInt(_0x4809fb(0x128))/0xa;if(_0x21ee12===_0x3d2606)break;else _0x1ca270['push'](_0x1ca270['shift']());}catch(_0x459f39){_0x1ca270['push'](_0x1ca270['shift']());}}}(_0x4c03,0x208e5),function(_0x1b261b,_0x1fa00c){const _0x383faf=_0x270e;typeof exports==_0x383faf(0x106)&&typeof module<'u'?_0x1fa00c(require('@univerjs/core/facade'),require('@univerjs/sheets-formula/facade'),require('@univerjs/sheets-data-validation/facade'),require('@univerjs/sheets/facade'),require('@univerjs-pro/sheets-mcp'),require('@univerjs/core')):typeof define=='function'&&define[_0x383faf(0x127)]?define(['@univerjs/core/facade',_0x383faf(0x107),_0x383faf(0x101),_0x383faf(0x111),_0x383faf(0xfc),_0x383faf(0x110)],_0x1fa00c):(_0x1b261b=typeof globalThis<'u'?globalThis:_0x1b261b||self,_0x1fa00c(_0x1b261b[_0x383faf(0x105)],_0x1b261b[_0x383faf(0x123)],_0x1b261b[_0x383faf(0x11c)],_0x1b261b['UniverSheetsFacade'],_0x1b261b[_0x383faf(0x121)],_0x1b261b['UniverCore']));}(this,function(_0x7b4515,_0x2c5679,_0x443634,_0x36ad82,_0xe029bb,_0x27bb7b){'use strict';const _0x46e52b=_0x270e;class _0x2a81be extends _0x7b4515[_0x46e52b(0x11e)]{async[_0x46e52b(0x119)](){const _0x588e45=_0x46e52b;return this[_0x588e45(0x113)]()['getLintErrors']();}}_0x7b4515[_0x46e52b(0x11e)][_0x46e52b(0x10e)](_0x2a81be);class _0x461ac4 extends _0x36ad82[_0x46e52b(0x12a)]{async[_0x46e52b(0x119)](){const _0x553e80=_0x46e52b,_0x1ff7d5=this[_0x553e80(0x11f)](),_0x38d180=await this['getAllDataValidationErrorAsync']();return{'formulaErrors':_0x1ff7d5,'dataValidationErrors':_0x38d180};}}_0x36ad82[_0x46e52b(0x12a)]['extend'](_0x461ac4);class _0x8cbf1 extends _0x36ad82['FWorksheet']{async[_0x46e52b(0x108)](){const _0x2902ae=_0x46e52b,_0x3d18d2=this[_0x2902ae(0x10c)][_0x2902ae(0x122)](_0xe029bb[_0x2902ae(0x120)]),_0x240905=this[_0x2902ae(0xfe)](0x0,0x0,this['getMaxRows'](),this['getMaxColumns']())[_0x2902ae(0x11d)]();return await _0x3d18d2[_0x2902ae(0x115)](_0x240905);}async['getFormulaUsagesAsA1'](){const _0x5140f7=_0x46e52b;return(await this[_0x5140f7(0x108)]())[_0x5140f7(0xff)](_0xe029bb[_0x5140f7(0x10d)]);}}_0x36ad82['FWorksheet'][_0x46e52b(0x10e)](_0x8cbf1);class _0x4b9bb0 extends _0x36ad82['FRange']{async[_0x46e52b(0x108)](){const _0xb7a7fd=_0x46e52b,_0x5b84cf=this[_0xb7a7fd(0x10c)][_0xb7a7fd(0x122)](_0xe029bb[_0xb7a7fd(0x120)]),_0x234dbf=(({startRow:_0x56b870,endRow:_0x470e3a,startColumn:_0x2cf1b4,endColumn:_0x23efb9})=>{const _0x14b9bc=_0xb7a7fd,_0x2340f1=[];for(let _0xc94af5=_0x56b870;_0xc94af5<=_0x470e3a;_0xc94af5++){const _0x2153a3=[];for(let _0x25ca0c=_0x2cf1b4;_0x25ca0c<=_0x23efb9;_0x25ca0c++)_0x2153a3[_0x14b9bc(0x112)](this['_worksheet'][_0x14b9bc(0x11b)](_0xc94af5,_0x25ca0c));_0x2340f1['push'](_0x2153a3);}return _0x2340f1;})({'startRow':0x0,'endRow':this['_worksheet'][_0xb7a7fd(0x10f)](),'startColumn':0x0,'endColumn':this['_worksheet'][_0xb7a7fd(0x103)]()}),_0x42f5f9=await _0x5b84cf[_0xb7a7fd(0x115)](_0x234dbf),_0x2993cb=this[_0xb7a7fd(0xfe)](),_0x12246e=[];for(let _0x3f369f=0x0;_0x3f369f<_0x42f5f9[_0xb7a7fd(0x10b)];_0x3f369f++){const _0xb5f39e=_0x42f5f9[_0x3f369f],_0x33e982=_0xb5f39e['filledRanges'],_0xc9b3f6=[];for(let _0x5315f7=0x0;_0x5315f7<_0x33e982[_0xb7a7fd(0x10b)];_0x5315f7++){const _0x3ea9a6=_0x33e982[_0x5315f7],_0xd17610=_0x27bb7b['getIntersectRange'](_0x3ea9a6,_0x2993cb);_0xd17610&&_0xc9b3f6[_0xb7a7fd(0x112)](_0xd17610);}if(_0xc9b3f6[_0xb7a7fd(0x10b)]>0x0){if(_0xb5f39e['filledRanges']=_0xc9b3f6,!(_0xb5f39e['firstOccurrence'][_0xb7a7fd(0x100)]>=_0x2993cb[_0xb7a7fd(0x100)]&&_0xb5f39e[_0xb7a7fd(0x125)]['startRow']<=_0x2993cb[_0xb7a7fd(0x118)]&&_0xb5f39e[_0xb7a7fd(0x125)][_0xb7a7fd(0xfd)]>=_0x2993cb[_0xb7a7fd(0xfd)]&&_0xb5f39e['firstOccurrence'][_0xb7a7fd(0xfd)]<=_0x2993cb[_0xb7a7fd(0x116)])){const _0x1f138c=_0xc9b3f6[0x0],_0x650d23=_0x1f138c[_0xb7a7fd(0x100)]-_0xb5f39e[_0xb7a7fd(0x125)][_0xb7a7fd(0x100)],_0x492db7=_0x1f138c['startColumn']-_0xb5f39e[_0xb7a7fd(0x125)]['startColumn'];_0xb5f39e['formula']=await _0x5b84cf[_0xb7a7fd(0x124)](_0xb5f39e[_0xb7a7fd(0x109)],_0x492db7,_0x650d23),_0xb5f39e[_0xb7a7fd(0x125)]={'startRow':_0x1f138c['startRow'],'endRow':_0x1f138c[_0xb7a7fd(0x100)],'startColumn':_0x1f138c[_0xb7a7fd(0xfd)],'endColumn':_0x1f138c[_0xb7a7fd(0xfd)]};}_0x12246e[_0xb7a7fd(0x112)](_0xb5f39e);}}return _0x12246e;}async['getFormulaUsagesAsA1'](){const _0x9a86d4=_0x46e52b;return(await this[_0x9a86d4(0x108)]())[_0x9a86d4(0xff)](_0xe029bb[_0x9a86d4(0x10d)]);}}_0x36ad82[_0x46e52b(0x12b)][_0x46e52b(0x10e)](_0x4b9bb0);}));function _0x4c03(){const _0x49662c=['UniverSheetsDataValidationFacade','getCellDataGrid','FUniver','getAllFormulaError','IFormulaUsageAnalyzer','UniverProSheetsMcp','get','UniverSheetsFormulaFacade','moveFormulaRefOffset','firstOccurrence','156453zLfEAa','amd','8642740wCJCQD','15672UHzxDg','FWorkbook','FRange','146652sTlkgp','@univerjs-pro/sheets-mcp','startColumn','getRange','map','startRow','@univerjs/sheets-data-validation/facade','768088EhbVIw','getMaxColumns','1803956jbLeQB','UniverCoreFacade','object','@univerjs/sheets-formula/facade','getFormulaUsages','formula','1060GDuksx','length','_injector','toA1','extend','getMaxRows','@univerjs/core','@univerjs/sheets/facade','push','getActiveWorkbook','114LzgEZR','getAllFormulaUsages','endColumn','18JbulZV','endRow','getLintErrors','1392aVXAqc','getCellRaw'];_0x4c03=function(){return _0x49662c;};return _0x4c03();}
1
+ (function(_0x5cb13c,_0x3d7ee4){const _0x36fe64=_0x1aa0,_0x499204=_0x5cb13c();while(!![]){try{const _0x427f6f=parseInt(_0x36fe64(0x213))/0x1+parseInt(_0x36fe64(0x203))/0x2+-parseInt(_0x36fe64(0x21e))/0x3+-parseInt(_0x36fe64(0x1f3))/0x4*(parseInt(_0x36fe64(0x222))/0x5)+parseInt(_0x36fe64(0x201))/0x6+parseInt(_0x36fe64(0x20f))/0x7*(parseInt(_0x36fe64(0x20c))/0x8)+-parseInt(_0x36fe64(0x20b))/0x9;if(_0x427f6f===_0x3d7ee4)break;else _0x499204['push'](_0x499204['shift']());}catch(_0x1c2695){_0x499204['push'](_0x499204['shift']());}}}(_0x5624,0x21ec9),function(_0x331586,_0x11d3d5){const _0x13dc5d=_0x1aa0;typeof exports==_0x13dc5d(0x1f6)&&typeof module<'u'?_0x11d3d5(require('@univerjs/core/facade'),require('@univerjs/sheets-formula/facade'),require('@univerjs/sheets-data-validation/facade'),require('@univerjs/sheets/facade'),require('@univerjs-pro/sheets-mcp'),require('@univerjs/core')):typeof define==_0x13dc5d(0x22c)&&define[_0x13dc5d(0x209)]?define([_0x13dc5d(0x228),_0x13dc5d(0x1fd),_0x13dc5d(0x22e),_0x13dc5d(0x225),_0x13dc5d(0x1f9),_0x13dc5d(0x216)],_0x11d3d5):(_0x331586=typeof globalThis<'u'?globalThis:_0x331586||self,_0x11d3d5(_0x331586[_0x13dc5d(0x1f4)],_0x331586[_0x13dc5d(0x205)],_0x331586[_0x13dc5d(0x200)],_0x331586[_0x13dc5d(0x1f0)],_0x331586[_0x13dc5d(0x21d)],_0x331586['UniverCore']));}(this,function(_0x2c0bcc,_0x46b493,_0x335492,_0x3e0864,_0x50044b,_0x216c83){'use strict';const _0x190f91=_0x1aa0;class _0xb9e405 extends _0x2c0bcc[_0x190f91(0x204)]{async[_0x190f91(0x208)](){const _0x16fbad=_0x190f91;return this['getActiveWorkbook']()[_0x16fbad(0x208)]();}}_0x2c0bcc[_0x190f91(0x204)][_0x190f91(0x212)](_0xb9e405);class _0x52e267 extends _0x3e0864[_0x190f91(0x210)]{async[_0x190f91(0x208)](){const _0x255f8a=_0x190f91,_0xfc5b13=this[_0x255f8a(0x1f2)](),_0x47d2e9=await this['getAllDataValidationErrorAsync']();return{'formulaErrors':_0xfc5b13,'dataValidationErrors':_0x47d2e9};}}_0x3e0864['FWorkbook'][_0x190f91(0x212)](_0x52e267);class _0x1b8df8 extends _0x3e0864[_0x190f91(0x20e)]{async['getFormulaUsages'](){const _0x1387cc=_0x190f91,_0x4adf13=this[_0x1387cc(0x1f1)][_0x1387cc(0x215)](_0x50044b[_0x1387cc(0x21f)]),_0x7b65ac=this[_0x1387cc(0x1f5)](0x0,0x0,this[_0x1387cc(0x229)](),this[_0x1387cc(0x226)]())[_0x1387cc(0x221)]();return await _0x4adf13['getAllFormulaUsages'](_0x7b65ac);}async[_0x190f91(0x227)](){const _0xa6586f=_0x190f91;return(await this[_0xa6586f(0x22b)]())[_0xa6586f(0x20d)](_0x50044b[_0xa6586f(0x219)]);}[_0x190f91(0x214)](_0x4304cb){const _0x24a1d2=_0x190f91,_0x47c86e=this[_0x24a1d2(0x1f1)][_0x24a1d2(0x215)](_0x50044b[_0x24a1d2(0x1ef)]),_0x2da78f=this[_0x24a1d2(0x1f5)](0x0,0x0,this[_0x24a1d2(0x229)](),this[_0x24a1d2(0x226)]())[_0x24a1d2(0x221)]();return _0x47c86e[_0x24a1d2(0x206)](_0x4304cb),_0x47c86e[_0x24a1d2(0x22a)](_0x2da78f,this['_workbook'],this[_0x24a1d2(0x202)]);}['getStyleUsagesAsA1'](_0x12cdf8){const _0x52ba96=_0x190f91;return this['getStyleUsages'](_0x12cdf8)[_0x52ba96(0x20d)](_0x50044b['styleToA1']);}[_0x190f91(0x223)](_0x3d6869){const _0x443cee=_0x190f91,_0x2f934b=this[_0x443cee(0x1f1)][_0x443cee(0x215)](_0x50044b[_0x443cee(0x22d)]);return _0x2f934b[_0x443cee(0x206)](_0x3d6869),_0x2f934b[_0x443cee(0x20a)](this['_worksheet']);}[_0x190f91(0x1fb)](_0x4c1f1e){const _0x3a885f=_0x190f91,_0x3ebd63=this['_injector'][_0x3a885f(0x215)](_0x50044b[_0x3a885f(0x22d)]);_0x3ebd63[_0x3a885f(0x206)](_0x4c1f1e);const _0xd0263c=_0x3ebd63[_0x3a885f(0x20a)](this[_0x3a885f(0x202)]);return _0x3ebd63[_0x3a885f(0x211)](_0xd0263c);}}_0x3e0864[_0x190f91(0x20e)][_0x190f91(0x212)](_0x1b8df8);class _0x3610d6 extends _0x3e0864['FRange']{async[_0x190f91(0x22b)](){const _0x11640d=_0x190f91,_0x212ef6=this[_0x11640d(0x1f1)][_0x11640d(0x215)](_0x50044b['IFormulaUsageAnalyzer']),_0x7cc13c=(({startRow:_0x3135f7,endRow:_0x45ef22,startColumn:_0x52bcab,endColumn:_0x19da2b})=>{const _0xd8b848=_0x11640d,_0x5c085c=[];for(let _0x343011=_0x3135f7;_0x343011<=_0x45ef22;_0x343011++){const _0x49fc7e=[];for(let _0x5dcdb4=_0x52bcab;_0x5dcdb4<=_0x19da2b;_0x5dcdb4++)_0x49fc7e['push'](this[_0xd8b848(0x202)]['getCellRaw'](_0x343011,_0x5dcdb4));_0x5c085c[_0xd8b848(0x22f)](_0x49fc7e);}return _0x5c085c;})({'startRow':0x0,'endRow':this[_0x11640d(0x202)]['getMaxRows'](),'startColumn':0x0,'endColumn':this[_0x11640d(0x202)]['getMaxColumns']()}),_0x27905b=await _0x212ef6['getAllFormulaUsages'](_0x7cc13c),_0xac0b85=this[_0x11640d(0x1f5)](),_0x4f6d26=[];for(let _0x389e8c=0x0;_0x389e8c<_0x27905b[_0x11640d(0x1fa)];_0x389e8c++){const _0x5382c1=_0x27905b[_0x389e8c],_0x39f8ce=_0x5382c1[_0x11640d(0x1f7)],_0x7ea249=[];for(let _0x5e1b69=0x0;_0x5e1b69<_0x39f8ce['length'];_0x5e1b69++){const _0x51911b=_0x39f8ce[_0x5e1b69],_0x1d923f=_0x216c83[_0x11640d(0x21c)](_0x51911b,_0xac0b85);_0x1d923f&&_0x7ea249[_0x11640d(0x22f)](_0x1d923f);}if(_0x7ea249[_0x11640d(0x1fa)]>0x0){if(_0x5382c1[_0x11640d(0x1f7)]=_0x7ea249,!(_0x5382c1[_0x11640d(0x217)]['startRow']>=_0xac0b85[_0x11640d(0x207)]&&_0x5382c1[_0x11640d(0x217)][_0x11640d(0x207)]<=_0xac0b85[_0x11640d(0x1fc)]&&_0x5382c1[_0x11640d(0x217)][_0x11640d(0x1ff)]>=_0xac0b85[_0x11640d(0x1ff)]&&_0x5382c1['firstOccurrence'][_0x11640d(0x1ff)]<=_0xac0b85['endColumn'])){const _0xdb52c0=_0x7ea249[0x0],_0x2f7b4c=_0xdb52c0[_0x11640d(0x207)]-_0x5382c1[_0x11640d(0x217)][_0x11640d(0x207)],_0x10d915=_0xdb52c0[_0x11640d(0x1ff)]-_0x5382c1['firstOccurrence'][_0x11640d(0x1ff)];_0x5382c1[_0x11640d(0x218)]=await _0x212ef6[_0x11640d(0x21a)](_0x5382c1[_0x11640d(0x218)],_0x10d915,_0x2f7b4c),_0x5382c1[_0x11640d(0x217)]={'startRow':_0xdb52c0[_0x11640d(0x207)],'endRow':_0xdb52c0[_0x11640d(0x207)],'startColumn':_0xdb52c0[_0x11640d(0x1ff)],'endColumn':_0xdb52c0[_0x11640d(0x1ff)]};}_0x4f6d26['push'](_0x5382c1);}}return _0x4f6d26;}async[_0x190f91(0x227)](){const _0x345594=_0x190f91;return(await this['getFormulaUsages']())[_0x345594(0x20d)](_0x50044b[_0x345594(0x219)]);}[_0x190f91(0x214)](_0x50fae3){const _0x2eee25=_0x190f91,_0x307bea=this[_0x2eee25(0x1f1)][_0x2eee25(0x215)](_0x50044b[_0x2eee25(0x1ef)]),_0x7e7be7=(({startRow:_0x54efae,endRow:_0x4b88f0,startColumn:_0x45924d,endColumn:_0x45459f})=>{const _0x36e8d7=_0x2eee25,_0x2db557=[];for(let _0x544545=_0x54efae;_0x544545<=_0x4b88f0;_0x544545++){const _0x13d596=[];for(let _0x924081=_0x45924d;_0x924081<=_0x45459f;_0x924081++)_0x13d596[_0x36e8d7(0x22f)](this['_worksheet'][_0x36e8d7(0x220)](_0x544545,_0x924081));_0x2db557[_0x36e8d7(0x22f)](_0x13d596);}return _0x2db557;})({'startRow':0x0,'endRow':this[_0x2eee25(0x202)]['getMaxRows'](),'startColumn':0x0,'endColumn':this[_0x2eee25(0x202)][_0x2eee25(0x226)]()});_0x307bea['updateConfig'](_0x50fae3);const _0xfacca7=_0x307bea[_0x2eee25(0x22a)](_0x7e7be7,this[_0x2eee25(0x1fe)],this['_worksheet']),_0x4c503f=this['getRange'](),_0x4875bf=[];for(let _0x4de238=0x0;_0x4de238<_0xfacca7[_0x2eee25(0x1fa)];_0x4de238++){const _0xc6dc5f=_0xfacca7[_0x4de238],_0x5258c9=_0xc6dc5f[_0x2eee25(0x1f7)],_0x384ccf=[];for(let _0x262b47=0x0;_0x262b47<_0x5258c9['length'];_0x262b47++){const _0x21ef99=_0x5258c9[_0x262b47],_0x1bd268=_0x216c83[_0x2eee25(0x21c)](_0x21ef99,_0x4c503f);_0x1bd268&&_0x384ccf['push'](_0x1bd268);}_0x384ccf['length']>0x0&&(_0xc6dc5f[_0x2eee25(0x1f7)]=_0x384ccf,_0x4875bf[_0x2eee25(0x22f)](_0xc6dc5f));}return _0x4875bf;}[_0x190f91(0x1ee)](_0x502524){const _0x2b832c=_0x190f91;return this[_0x2b832c(0x214)](_0x502524)[_0x2b832c(0x20d)](_0x50044b[_0x2b832c(0x224)]);}[_0x190f91(0x223)](_0x39ece0){const _0x271550=_0x190f91,_0x21c74b=this['_injector']['get'](_0x50044b[_0x271550(0x22d)]),_0x1d55d7=this['getRange']();return _0x21c74b[_0x271550(0x206)](_0x39ece0),_0x21c74b[_0x271550(0x20a)](this[_0x271550(0x202)],_0x1d55d7[_0x271550(0x207)],_0x1d55d7['endRow'],_0x1d55d7['startColumn'],_0x1d55d7[_0x271550(0x21b)]);}['getSizeUsagesAsA1'](_0x5e0488){const _0x288f62=_0x190f91,_0xf5ba58=this['getSizeUsages'](_0x5e0488);return this['_injector']['get'](_0x50044b[_0x288f62(0x22d)])[_0x288f62(0x211)](_0xf5ba58);}}_0x3e0864[_0x190f91(0x1f8)]['extend'](_0x3610d6);}));function _0x1aa0(_0x5cd04e,_0x158a5e){_0x5cd04e=_0x5cd04e-0x1ee;const _0x56246d=_0x5624();let _0x1aa089=_0x56246d[_0x5cd04e];return _0x1aa089;}function _0x5624(){const _0x4a10ad=['UniverSheetsFacade','_injector','getAllFormulaError','4SlotEp','UniverCoreFacade','getRange','object','filledRanges','FRange','@univerjs-pro/sheets-mcp','length','getSizeUsagesAsA1','endRow','@univerjs/sheets-formula/facade','_workbook','startColumn','UniverSheetsDataValidationFacade','1170588gUWEqo','_worksheet','324886aDITYd','FUniver','UniverSheetsFormulaFacade','updateConfig','startRow','getLintErrors','amd','getAllSizeUsages','3789252XiJVKm','8GgMgWO','map','FWorksheet','1345211MNwdOO','FWorkbook','toA1','extend','176502qHxcJz','getStyleUsages','get','@univerjs/core','firstOccurrence','formula','formulaToA1','moveFormulaRefOffset','endColumn','getIntersectRange','UniverProSheetsMcp','442692dENHhU','IFormulaUsageAnalyzer','getCellRaw','getCellDataGrid','93355WbUYuA','getSizeUsages','styleToA1','@univerjs/sheets/facade','getMaxColumns','getFormulaUsagesAsA1','@univerjs/core/facade','getMaxRows','getAllStyleUsages','getFormulaUsages','function','ISizeUsageAnalyzer','@univerjs/sheets-data-validation/facade','push','getStyleUsagesAsA1','IStyleUsageAnalyzer'];_0x5624=function(){return _0x4a10ad;};return _0x5624();}