@univerjs-pro/sheets-mcp 1.0.0-alpha.1 → 1.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +11 -11
package/lib/es/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x468bf4=_0x10be;(function(_0x5aab05,_0x376aec){const _0x273452=_0x10be,_0x484bf0=_0x5aab05();while(!![]){try{const _0x510602=parseInt(_0x273452(0x1f8))/0x1*(parseInt(_0x273452(0x1ea))/0x2)+parseInt(_0x273452(0x216))/0x3*(-parseInt(_0x273452(0x205))/0x4)+-parseInt(_0x273452(0x207))/0x5+-parseInt(_0x273452(0x1f5))/0x6*(parseInt(_0x273452(0x202))/0x7)+parseInt(_0x273452(0x221))/0x8+parseInt(_0x273452(0x1eb))/0x9+parseInt(_0x273452(0x219))/0xa;if(_0x510602===_0x376aec)break;else _0x484bf0['push'](_0x484bf0['shift']());}catch(_0x5cd698){_0x484bf0['push'](_0x484bf0['shift']());}}}(_0xc20c,0x1ee08));import{FUniver as _0x348eea}from'@univerjs/core/facade';import'@univerjs/sheets-formula/facade';import'@univerjs/sheets-data-validation/facade';import{FRange as _0x104a62,FWorkbook as _0x1db477,FWorksheet as _0x1dc84d}from'@univerjs/sheets/facade';import{FormulaDataModel as _0x107ca9,serializeRangeWithSheet as _0x1ecd6f}from'@univerjs/engine-formula';import{IFormulaUsageAnalyzer as _0x329834,ISizeUsageAnalyzer as _0x151c6d,IStyleUsageAnalyzer as _0x2cc0bc,formulaToA1 as _0x227383,styleToA1 as _0x5cac53}from'@univerjs-pro/sheets-mcp';import{getIntersectRange as _0xacd82e}from'@univerjs/core';function _0xc20c(){const _0x5a180b=['endColumn','5689050BmugJL','filledRanges','getCellDataGrid','defineProperty','AND','length','getAllSizeUsages','searchCells','425496thIKlu','getRowHeight','extend','toA1','formula','visibleOnly','getCellRaw','map','get','getColumnWidth','getAllDataValidationErrorAsync','getName','getRectAreaData','getAllStyleUsages','getUnitId','getStyleUsages','getCellMatrix','warn','toLowerCase','forValue','indexOf','rawValue','startRow','getAllFormulaUsages','getSheets','getSheetId','182njObLb','865458cSbZqK','getSizeUsagesAsA1','getRange','body','getAllFormulaError','firstOccurrence','displayValue','_formulaDataModel','filter','\x20not\x20found.\x20Skipping.','11922CqFeRB','getLintErrors','_worksheet','292MpVfrj','getValue','getSizeUsages','_workbook','_cellMatchesSearch','getMaxColumns','moveFormulaRefOffset','getMaxRows','getWorkbook','every','742tTCPay','getFormulaUsagesAsA1','toString','24tnkLpe','endRow','832630OHuUwv','_collectRectAreaData','getRectArea','getRowManager','updateConfig','Sheet\x20with\x20ID\x20','trim','getColVisible','getFormulaUsages','_isMatch','includes','_injector','startColumn','getStyleUsagesAsA1','dataStream','120603raFnYA','push'];_0xc20c=function(){return _0x5a180b;};return _0xc20c();}var f=class extends _0x348eea{async[_0x468bf4(0x1f6)](){const _0x46061f=_0x468bf4;return this['getActiveWorkbook']()[_0x46061f(0x1f6)]();}};_0x348eea['extend'](f);var p=class extends _0x1db477{['_initialize'](){const _0x554927=_0x468bf4;Object[_0x554927(0x21c)](this,_0x554927(0x1f2),{'get'(){const _0xeb9b40=_0x554927;return this[_0xeb9b40(0x212)][_0xeb9b40(0x229)](_0x107ca9);}});}[_0x468bf4(0x220)](_0x1dfacf,_0x45c50a={}){const _0x2185f4=_0x468bf4;let {caseSensitive:_0x42555d=!0x1,matchEntireCell:_0x4561db=!0x1,specificRanges:_0x5fdf1b,specificTypes:_0x592a98,searchMultipleTextsCondition:_0x28b487='OR'}=_0x45c50a,_0x23ea69=(Array['isArray'](_0x1dfacf)?_0x1dfacf:[_0x1dfacf])['map'](_0x184137=>_0x184137[_0x2185f4(0x20d)]())[_0x2185f4(0x1f3)](_0x5be2bb=>_0x5be2bb);if(_0x42555d||(_0x23ea69=_0x23ea69['map'](_0x4deedb=>_0x4deedb['toLowerCase']())),_0x23ea69[_0x2185f4(0x21e)]===0x0)return[];let _0x27114f={'caseSensitive':_0x42555d,'matchEntireCell':_0x4561db,'searchMultipleTextsCondition':_0x28b487,'isSearchByRawValue':!_0x592a98||_0x592a98['includes'](_0x2185f4(0x1e5)),'isSearchByDisplayValue':!_0x592a98||_0x592a98[_0x2185f4(0x211)](_0x2185f4(0x1f1)),'isSearchByFormula':!_0x592a98||_0x592a98[_0x2185f4(0x211)](_0x2185f4(0x225))},_0x2e6cee=this[_0x2185f4(0x200)](),_0x5623ce=[];if(_0x5fdf1b)for(let {sheetId:_0x2e0102,ranges:_0x226a51}of _0x5fdf1b){let _0x143b79=_0x2e6cee['getSheetBySheetId'](_0x2e0102);if(!_0x143b79){console[_0x2185f4(0x1e1)](_0x2185f4(0x20c)+_0x2e0102+_0x2185f4(0x1f4));continue;}let _0x40b598=_0x143b79['getCellMatrix']();if(_0x226a51&&_0x226a51[_0x2185f4(0x21e)]>0x0){for(let _0x1d14b1 of _0x226a51)for(let _0x57d526=_0x1d14b1[_0x2185f4(0x1e6)];_0x57d526<=_0x1d14b1[_0x2185f4(0x206)];_0x57d526++)for(let _0x58b231=_0x1d14b1['startColumn'];_0x58b231<=_0x1d14b1[_0x2185f4(0x218)];_0x58b231++){let _0x4a7339=_0x40b598[_0x2185f4(0x1f9)](_0x57d526,_0x58b231);if(!_0x4a7339)continue;let _0x4fcce9=this[_0x2185f4(0x1fc)](_0x4a7339,_0x23ea69,{..._0x27114f,'worksheet':_0x143b79,'row':_0x57d526,'col':_0x58b231});_0x4fcce9&&_0x5623ce[_0x2185f4(0x217)]({..._0x4fcce9,'sheetId':_0x143b79['getSheetId']()});}}else _0x40b598[_0x2185f4(0x1e3)]((_0x569b94,_0x2e1f6b,_0x1c4b6c)=>{const _0x5f592d=_0x2185f4;if(_0x1c4b6c){let _0x309b95=this[_0x5f592d(0x1fc)](_0x1c4b6c,_0x23ea69,{..._0x27114f,'worksheet':_0x143b79,'row':_0x569b94,'col':_0x2e1f6b});_0x309b95&&_0x5623ce['push']({..._0x309b95,'sheetId':_0x143b79[_0x5f592d(0x1e9)]()});}});}else{let _0x47f80c=_0x2e6cee[_0x2185f4(0x1e8)]();for(let _0x33bfec of _0x47f80c)_0x33bfec[_0x2185f4(0x1e0)]()['forValue']((_0x5279d5,_0x4a07de,_0x5a7e62)=>{const _0x535430=_0x2185f4;if(_0x5a7e62){let _0x261bf0=this[_0x535430(0x1fc)](_0x5a7e62,_0x23ea69,{..._0x27114f,'worksheet':_0x33bfec,'row':_0x5279d5,'col':_0x4a07de});_0x261bf0&&_0x5623ce['push']({..._0x261bf0,'sheetId':_0x33bfec[_0x535430(0x1e9)]()});}});}return _0x5623ce;}[_0x468bf4(0x1fc)](_0x2d0efe,_0x11fe3f,_0x6c6202){const _0x41e7a8=_0x468bf4;let {caseSensitive:_0x3c682d,matchEntireCell:_0x3d3f8b,searchMultipleTextsCondition:_0x234cb2,isSearchByRawValue:_0x3cec13,isSearchByDisplayValue:_0x22a2de,isSearchByFormula:_0x108924,worksheet:_0x36fbc6,row:_0x46d074,col:_0x4b0f5e}=_0x6c6202;if(_0x3cec13){var _0x42b341;let _0x36f664=((_0x42b341=_0x2d0efe['p'])==null||(_0x42b341=_0x42b341[_0x41e7a8(0x1ee)])==null?void 0x0:_0x42b341[_0x41e7a8(0x215)])||_0x2d0efe['v'];if(_0x36f664){let _0x196a43=_0x3c682d?_0x36f664['toString']():_0x36f664[_0x41e7a8(0x204)]()[_0x41e7a8(0x1e2)]();if(this['_isMatch'](_0x196a43,_0x11fe3f,_0x3d3f8b,_0x234cb2))return{'row':_0x46d074,'col':_0x4b0f5e,'reference':_0x1ecd6f(_0x36fbc6['getName'](),{'startRow':_0x46d074,'endRow':_0x46d074,'startColumn':_0x4b0f5e,'endColumn':_0x4b0f5e}),'cellData':{..._0x2d0efe,'rawValue':_0x36f664}};}}if(_0x108924&&(_0x2d0efe['f']||_0x2d0efe['si'])){let _0x2911d2=this[_0x41e7a8(0x1f2)]['getFormulaStringByCell'](_0x46d074,_0x4b0f5e,_0x36fbc6[_0x41e7a8(0x1e9)](),this[_0x41e7a8(0x200)]()[_0x41e7a8(0x1de)]());if(_0x2911d2){let _0x5d45aa=_0x3c682d?_0x2911d2:_0x2911d2['toLowerCase']();if(this[_0x41e7a8(0x210)](_0x5d45aa,_0x11fe3f,_0x3d3f8b,_0x234cb2))return{'row':_0x46d074,'col':_0x4b0f5e,'reference':_0x1ecd6f(_0x36fbc6['getName'](),{'startRow':_0x46d074,'endRow':_0x46d074,'startColumn':_0x4b0f5e,'endColumn':_0x4b0f5e}),'cellData':{..._0x2d0efe,'formulaString':_0x2911d2}};}}if(_0x22a2de){var _0x51ef17;let _0x46fc75=(_0x51ef17=_0x2d0efe['p'])==null||(_0x51ef17=_0x51ef17[_0x41e7a8(0x1ee)])==null?void 0x0:_0x51ef17['dataStream'];if(!_0x46fc75){var _0x506b2f;_0x46fc75=(_0x506b2f=_0x36fbc6['getCell'](_0x46d074,_0x4b0f5e))==null?void 0x0:_0x506b2f['v'];}if(_0x46fc75){let _0x3499d1=_0x3c682d?_0x46fc75[_0x41e7a8(0x204)]():_0x46fc75[_0x41e7a8(0x204)]()[_0x41e7a8(0x1e2)]();if(this[_0x41e7a8(0x210)](_0x3499d1,_0x11fe3f,_0x3d3f8b,_0x234cb2))return{'row':_0x46d074,'col':_0x4b0f5e,'reference':_0x1ecd6f(_0x36fbc6[_0x41e7a8(0x22c)](),{'startRow':_0x46d074,'endRow':_0x46d074,'startColumn':_0x4b0f5e,'endColumn':_0x4b0f5e}),'cellData':{..._0x2d0efe,'displayValue':_0x46fc75[_0x41e7a8(0x204)]()}};}}return!0x1;}[_0x468bf4(0x210)](_0x244850,_0x4c793c,_0x47a1a9,_0x4d3532){const _0x36ff9e=_0x468bf4;return _0x4c793c[_0x36ff9e(0x21e)]>0x1&&_0x4d3532===_0x36ff9e(0x21d)?_0x4c793c[_0x36ff9e(0x201)](_0x524635=>_0x47a1a9?_0x244850===_0x524635:_0x244850[_0x36ff9e(0x1e4)](_0x524635)>-0x1):_0x4c793c['some'](_0x3c8d7d=>_0x47a1a9?_0x244850===_0x3c8d7d:_0x244850['indexOf'](_0x3c8d7d)>-0x1);}};_0x1db477['extend'](p);var m=class extends _0x1db477{async[_0x468bf4(0x1f6)](){const _0x21fa6f=_0x468bf4;return{'formulaErrors':this[_0x21fa6f(0x1ef)](),'dataValidationErrors':await this[_0x21fa6f(0x22b)]()};}};_0x1db477[_0x468bf4(0x223)](m);var h=class extends _0x1dc84d{async[_0x468bf4(0x20f)](){const _0x44ac84=_0x468bf4;let _0x345ed2=this[_0x44ac84(0x212)]['get'](_0x329834),_0x5cfb4c=this[_0x44ac84(0x1ed)](0x0,0x0,this[_0x44ac84(0x1ff)](),this[_0x44ac84(0x1fd)]())[_0x44ac84(0x21b)]();return await _0x345ed2[_0x44ac84(0x1e7)](_0x5cfb4c);}async[_0x468bf4(0x203)](){const _0x31de5f=_0x468bf4;return(await this[_0x31de5f(0x20f)]())['map'](_0x227383);}[_0x468bf4(0x1df)](_0x2abeb3){const _0x30e1d7=_0x468bf4;let _0x328d09=this['_injector']['get'](_0x2cc0bc),_0x2504fd=this[_0x30e1d7(0x1ed)](0x0,0x0,this[_0x30e1d7(0x1ff)](),this[_0x30e1d7(0x1fd)]())[_0x30e1d7(0x21b)]();return _0x328d09[_0x30e1d7(0x20b)](_0x2abeb3),_0x328d09[_0x30e1d7(0x1dd)](_0x2504fd,this[_0x30e1d7(0x1fb)],this['_worksheet']);}[_0x468bf4(0x214)](_0x55e8e1){const _0x5485c5=_0x468bf4;return this[_0x5485c5(0x1df)](_0x55e8e1)['map'](_0x5cac53);}['getSizeUsages'](_0x8a8618){const _0x582379=_0x468bf4;let _0x209476=this['_injector'][_0x582379(0x229)](_0x151c6d);return _0x209476['updateConfig'](_0x8a8618),_0x209476[_0x582379(0x21f)](this[_0x582379(0x1f7)]);}[_0x468bf4(0x1ec)](_0x4e4bb3){const _0x347d5f=_0x468bf4;let _0x2c16cb=this[_0x347d5f(0x212)]['get'](_0x151c6d);_0x2c16cb['updateConfig'](_0x4e4bb3);let _0x5dfdd9=_0x2c16cb['getAllSizeUsages'](this[_0x347d5f(0x1f7)]);return _0x2c16cb[_0x347d5f(0x224)](_0x5dfdd9);}};_0x1dc84d[_0x468bf4(0x223)](h);var g=class extends _0x104a62{[_0x468bf4(0x208)](_0x547f0a){const _0x2582b5=_0x468bf4;var _0x415bbf;let _0x22e1fa=(_0x415bbf=_0x547f0a==null?void 0x0:_0x547f0a[_0x2582b5(0x226)])==null?!0x0:_0x415bbf,_0x2d14f7=this[_0x2582b5(0x1ed)](),_0x30f3c6=this['_worksheet'][_0x2582b5(0x20a)](),_0x526f6b=this[_0x2582b5(0x1f7)]['getColumnManager'](),_0x2cf057={},_0x119abd=0x0;for(let _0x3d0e55=_0x2d14f7[_0x2582b5(0x1e6)];_0x3d0e55<=_0x2d14f7[_0x2582b5(0x206)];_0x3d0e55++){let _0x49dd0e=_0x30f3c6[_0x2582b5(0x222)](_0x3d0e55),_0x167bb1=!_0x22e1fa||this[_0x2582b5(0x1f7)]['getRowVisible'](_0x3d0e55)?_0x49dd0e:0x0;_0x119abd+=_0x167bb1,_0x2cf057[_0x3d0e55]={'h':_0x167bb1};}let _0x30bff6={},_0x3e66c3=0x0;for(let _0x15f508=_0x2d14f7[_0x2582b5(0x213)];_0x15f508<=_0x2d14f7['endColumn'];_0x15f508++){let _0x265947=_0x526f6b[_0x2582b5(0x22a)](_0x15f508),_0x376e40=!_0x22e1fa||this['_worksheet'][_0x2582b5(0x20e)](_0x15f508)?_0x265947:0x0;_0x3e66c3+=_0x376e40,_0x30bff6[_0x15f508]={'w':_0x376e40};}return{'w':_0x3e66c3,'h':_0x119abd,'rowData':_0x2cf057,'columnData':_0x30bff6};}async['getFormulaUsages'](){const _0x4c2a0e=_0x468bf4;let _0x2f328c=this[_0x4c2a0e(0x212)]['get'](_0x329834),_0x47eb8c=(({startRow:_0x32bd96,endRow:_0x1f0b34,startColumn:_0x2c169a,endColumn:_0x43bc9f})=>{const _0x4f7cbb=_0x4c2a0e;let _0x56cfcb=[];for(let _0x1c9c6f=_0x32bd96;_0x1c9c6f<=_0x1f0b34;_0x1c9c6f++){let _0x36a37f=[];for(let _0x21d7e2=_0x2c169a;_0x21d7e2<=_0x43bc9f;_0x21d7e2++)_0x36a37f[_0x4f7cbb(0x217)](this[_0x4f7cbb(0x1f7)][_0x4f7cbb(0x227)](_0x1c9c6f,_0x21d7e2));_0x56cfcb['push'](_0x36a37f);}return _0x56cfcb;})({'startRow':0x0,'endRow':this[_0x4c2a0e(0x1f7)]['getMaxRows'](),'startColumn':0x0,'endColumn':this[_0x4c2a0e(0x1f7)][_0x4c2a0e(0x1fd)]()}),_0x3655c3=await _0x2f328c['getAllFormulaUsages'](_0x47eb8c),_0x2d4c83=this[_0x4c2a0e(0x1ed)](),_0x31226d=[];for(let _0x453179=0x0;_0x453179<_0x3655c3[_0x4c2a0e(0x21e)];_0x453179++){let _0x2bf560=_0x3655c3[_0x453179],_0x3ffcd0=_0x2bf560[_0x4c2a0e(0x21a)],_0x9e3b92=[];for(let _0x250cd1=0x0;_0x250cd1<_0x3ffcd0['length'];_0x250cd1++){let _0x37add4=_0x3ffcd0[_0x250cd1],_0x2c4aa6=_0xacd82e(_0x37add4,_0x2d4c83);_0x2c4aa6&&_0x9e3b92['push'](_0x2c4aa6);}if(_0x9e3b92[_0x4c2a0e(0x21e)]>0x0){if(_0x2bf560['filledRanges']=_0x9e3b92,!(_0x2bf560['firstOccurrence']['startRow']>=_0x2d4c83['startRow']&&_0x2bf560['firstOccurrence'][_0x4c2a0e(0x1e6)]<=_0x2d4c83['endRow']&&_0x2bf560['firstOccurrence'][_0x4c2a0e(0x213)]>=_0x2d4c83[_0x4c2a0e(0x213)]&&_0x2bf560['firstOccurrence']['startColumn']<=_0x2d4c83['endColumn'])){let _0x117355=_0x9e3b92[0x0],_0x2ccd3b=_0x117355[_0x4c2a0e(0x1e6)]-_0x2bf560['firstOccurrence'][_0x4c2a0e(0x1e6)],_0xaa4d1f=_0x117355[_0x4c2a0e(0x213)]-_0x2bf560[_0x4c2a0e(0x1f0)]['startColumn'];_0x2bf560[_0x4c2a0e(0x225)]=await _0x2f328c[_0x4c2a0e(0x1fe)](_0x2bf560[_0x4c2a0e(0x225)],_0xaa4d1f,_0x2ccd3b),_0x2bf560[_0x4c2a0e(0x1f0)]={'startRow':_0x117355['startRow'],'endRow':_0x117355[_0x4c2a0e(0x1e6)],'startColumn':_0x117355[_0x4c2a0e(0x213)],'endColumn':_0x117355[_0x4c2a0e(0x213)]};}_0x31226d[_0x4c2a0e(0x217)](_0x2bf560);}}return _0x31226d;}async['getFormulaUsagesAsA1'](){const _0x38edbb=_0x468bf4;return(await this[_0x38edbb(0x20f)]())[_0x38edbb(0x228)](_0x227383);}['getStyleUsages'](_0x344072){const _0x13253d=_0x468bf4;let _0x4baa31=this[_0x13253d(0x212)][_0x13253d(0x229)](_0x2cc0bc),_0x303a9a=(({startRow:_0x287e9e,endRow:_0x2e7ca6,startColumn:_0x2635f1,endColumn:_0x11b5c3})=>{const _0x10ce83=_0x13253d;let _0x2c4a29=[];for(let _0x3d2fde=_0x287e9e;_0x3d2fde<=_0x2e7ca6;_0x3d2fde++){let _0x499780=[];for(let _0x39c898=_0x2635f1;_0x39c898<=_0x11b5c3;_0x39c898++)_0x499780['push'](this[_0x10ce83(0x1f7)][_0x10ce83(0x227)](_0x3d2fde,_0x39c898));_0x2c4a29['push'](_0x499780);}return _0x2c4a29;})({'startRow':0x0,'endRow':this[_0x13253d(0x1f7)][_0x13253d(0x1ff)](),'startColumn':0x0,'endColumn':this[_0x13253d(0x1f7)][_0x13253d(0x1fd)]()});_0x4baa31['updateConfig'](_0x344072);let _0x4fa918=_0x4baa31[_0x13253d(0x1dd)](_0x303a9a,this[_0x13253d(0x1fb)],this[_0x13253d(0x1f7)]),_0xc77ea8=this['getRange'](),_0x3f14ad=[];for(let _0x1086cc=0x0;_0x1086cc<_0x4fa918[_0x13253d(0x21e)];_0x1086cc++){let _0x4738df=_0x4fa918[_0x1086cc],_0x5c7381=_0x4738df[_0x13253d(0x21a)],_0x590e92=[];for(let _0x418118=0x0;_0x418118<_0x5c7381[_0x13253d(0x21e)];_0x418118++){let _0x194b5b=_0x5c7381[_0x418118],_0x4c18bd=_0xacd82e(_0x194b5b,_0xc77ea8);_0x4c18bd&&_0x590e92[_0x13253d(0x217)](_0x4c18bd);}_0x590e92[_0x13253d(0x21e)]>0x0&&(_0x4738df[_0x13253d(0x21a)]=_0x590e92,_0x3f14ad['push'](_0x4738df));}return _0x3f14ad;}[_0x468bf4(0x214)](_0x200841){const _0x28310d=_0x468bf4;return this[_0x28310d(0x1df)](_0x200841)[_0x28310d(0x228)](_0x5cac53);}[_0x468bf4(0x1fa)](_0x458bc8){const _0x511aa4=_0x468bf4;let _0x1d21c5=this['_injector'][_0x511aa4(0x229)](_0x151c6d),_0x573806=this[_0x511aa4(0x1ed)]();return _0x1d21c5[_0x511aa4(0x20b)](_0x458bc8),_0x1d21c5[_0x511aa4(0x21f)](this[_0x511aa4(0x1f7)],_0x573806['startRow'],_0x573806[_0x511aa4(0x206)],_0x573806[_0x511aa4(0x213)],_0x573806['endColumn']);}['getSizeUsagesAsA1'](_0x2b7214){const _0x4ef488=_0x468bf4;let _0x27a9b3=this[_0x4ef488(0x1fa)](_0x2b7214);return this[_0x4ef488(0x212)]['get'](_0x151c6d)[_0x4ef488(0x224)](_0x27a9b3);}[_0x468bf4(0x209)](_0x3ea427){const _0x5a2a3a=_0x468bf4;let _0x1b3f4b=this[_0x5a2a3a(0x208)](_0x3ea427);return{'w':_0x1b3f4b['w'],'h':_0x1b3f4b['h']};}[_0x468bf4(0x1dc)](_0x238809){return this['_collectRectAreaData'](_0x238809);}};function _0x10be(_0x28e2d0,_0x2a9aaa){_0x28e2d0=_0x28e2d0-0x1dc;const _0xc20c23=_0xc20c();let _0x10beca=_0xc20c23[_0x28e2d0];return _0x10beca;}_0x104a62['extend'](g);export{};
|
|
1
|
+
const _0xcc393f=_0x57b5;(function(_0x158c47,_0x53be2e){const _0x1ec5dc=_0x57b5,_0x1993ca=_0x158c47();while(!![]){try{const _0x2f80c8=parseInt(_0x1ec5dc(0x163))/0x1*(parseInt(_0x1ec5dc(0x15f))/0x2)+-parseInt(_0x1ec5dc(0x145))/0x3*(parseInt(_0x1ec5dc(0x149))/0x4)+parseInt(_0x1ec5dc(0x136))/0x5+-parseInt(_0x1ec5dc(0x121))/0x6+parseInt(_0x1ec5dc(0x127))/0x7+parseInt(_0x1ec5dc(0x160))/0x8*(parseInt(_0x1ec5dc(0x159))/0x9)+-parseInt(_0x1ec5dc(0x155))/0xa;if(_0x2f80c8===_0x53be2e)break;else _0x1993ca['push'](_0x1993ca['shift']());}catch(_0x465feb){_0x1993ca['push'](_0x1993ca['shift']());}}}(_0x31cc,0xd84bd));import{FUniver as _0x58c7f5}from'@univerjs/core/facade';import'@univerjs/sheets-formula/facade';function _0x57b5(_0x27581d,_0x7454dc){_0x27581d=_0x27581d-0x117;const _0x31ccf7=_0x31cc();let _0x57b51c=_0x31ccf7[_0x27581d];return _0x57b51c;}import'@univerjs/sheets-data-validation/facade';import{FRange as _0x129bde,FWorkbook as _0x19e2dd,FWorksheet as _0x12fffe}from'@univerjs/sheets/facade';import{FormulaDataModel as _0xe2c488,serializeRangeWithSheet as _0x18bacd}from'@univerjs/engine-formula';import{IFormulaUsageAnalyzer as _0x15d9fd,ISizeUsageAnalyzer as _0x2b9e7d,IStyleUsageAnalyzer as _0x4b7451,formulaToA1 as _0x161f1a,styleToA1 as _0x21b04b}from'@univerjs-pro/sheets-mcp';import{getIntersectRange as _0x535ec4}from'@univerjs/core';var f=class extends _0x58c7f5{async[_0xcc393f(0x150)](){const _0x299ad6=_0xcc393f;return this[_0x299ad6(0x147)]()['getLintErrors']();}};_0x58c7f5['extend'](f);var p=class extends _0x19e2dd{[_0xcc393f(0x15b)](){Object['defineProperty'](this,'_formulaDataModel',{'get'(){const _0x4e2d30=_0x57b5;return this['_injector'][_0x4e2d30(0x12e)](_0xe2c488);}});}[_0xcc393f(0x11a)](_0x5de7f2,_0x58984a={}){const _0x31f31f=_0xcc393f;let {caseSensitive:_0x59412e=!0x1,matchEntireCell:_0x24946c=!0x1,specificRanges:_0x3af594,specificTypes:_0x445841,searchMultipleTextsCondition:_0x37a8c7='OR'}=_0x58984a,_0x294b2c=(Array[_0x31f31f(0x124)](_0x5de7f2)?_0x5de7f2:[_0x5de7f2])[_0x31f31f(0x134)](_0x5e50d8=>_0x5e50d8['trim']())['filter'](_0x14cf43=>_0x14cf43);if(_0x59412e||(_0x294b2c=_0x294b2c['map'](_0x350d04=>_0x350d04[_0x31f31f(0x166)]())),_0x294b2c[_0x31f31f(0x13c)]===0x0)return[];let _0x19f458={'caseSensitive':_0x59412e,'matchEntireCell':_0x24946c,'searchMultipleTextsCondition':_0x37a8c7,'isSearchByRawValue':!_0x445841||_0x445841[_0x31f31f(0x12a)](_0x31f31f(0x165)),'isSearchByDisplayValue':!_0x445841||_0x445841[_0x31f31f(0x12a)](_0x31f31f(0x156)),'isSearchByFormula':!_0x445841||_0x445841[_0x31f31f(0x12a)](_0x31f31f(0x12c))},_0x2076bc=this[_0x31f31f(0x135)](),_0x41a792=[];if(_0x3af594)for(let {sheetId:_0x18a978,ranges:_0x152e4a}of _0x3af594){let _0x12d3ab=_0x2076bc['getSheetBySheetId'](_0x18a978);if(!_0x12d3ab){console['warn'](_0x31f31f(0x13d)+_0x18a978+'\x20not\x20found.\x20Skipping.');continue;}let _0x8f50a9=_0x12d3ab[_0x31f31f(0x120)]();if(_0x152e4a&&_0x152e4a['length']>0x0){for(let _0x2a0884 of _0x152e4a)for(let _0x547f39=_0x2a0884[_0x31f31f(0x11e)];_0x547f39<=_0x2a0884['endRow'];_0x547f39++)for(let _0x4925ca=_0x2a0884[_0x31f31f(0x146)];_0x4925ca<=_0x2a0884['endColumn'];_0x4925ca++){let _0x1c3ca5=_0x8f50a9[_0x31f31f(0x13a)](_0x547f39,_0x4925ca);if(!_0x1c3ca5)continue;let _0x4d7490=this[_0x31f31f(0x157)](_0x1c3ca5,_0x294b2c,{..._0x19f458,'worksheet':_0x12d3ab,'row':_0x547f39,'col':_0x4925ca});_0x4d7490&&_0x41a792[_0x31f31f(0x15c)]({..._0x4d7490,'sheetId':_0x12d3ab[_0x31f31f(0x161)]()});}}else _0x8f50a9[_0x31f31f(0x137)]((_0xbf586d,_0x372234,_0x5dd014)=>{const _0x49423c=_0x31f31f;if(_0x5dd014){let _0xe4c11c=this[_0x49423c(0x157)](_0x5dd014,_0x294b2c,{..._0x19f458,'worksheet':_0x12d3ab,'row':_0xbf586d,'col':_0x372234});_0xe4c11c&&_0x41a792['push']({..._0xe4c11c,'sheetId':_0x12d3ab[_0x49423c(0x161)]()});}});}else{let _0x1f91a0=_0x2076bc[_0x31f31f(0x139)]();for(let _0x6c7ae7 of _0x1f91a0)_0x6c7ae7[_0x31f31f(0x120)]()[_0x31f31f(0x137)]((_0x2fb166,_0x5486fd,_0x5e16a9)=>{const _0x386bc9=_0x31f31f;if(_0x5e16a9){let _0x59db78=this[_0x386bc9(0x157)](_0x5e16a9,_0x294b2c,{..._0x19f458,'worksheet':_0x6c7ae7,'row':_0x2fb166,'col':_0x5486fd});_0x59db78&&_0x41a792[_0x386bc9(0x15c)]({..._0x59db78,'sheetId':_0x6c7ae7['getSheetId']()});}});}return _0x41a792;}[_0xcc393f(0x157)](_0x51fa20,_0x12ebbf,_0x183781){const _0x3045b2=_0xcc393f;let {caseSensitive:_0x34296d,matchEntireCell:_0x5a2fbd,searchMultipleTextsCondition:_0x3646a5,isSearchByRawValue:_0x59fe79,isSearchByDisplayValue:_0x36774c,isSearchByFormula:_0x459947,worksheet:_0x71667,row:_0x3e22f9,col:_0x5a9274}=_0x183781;if(_0x59fe79){var _0x309cf5;let _0x11c071=((_0x309cf5=_0x51fa20['p'])==null||(_0x309cf5=_0x309cf5[_0x3045b2(0x14c)])==null?void 0x0:_0x309cf5['dataStream'])||_0x51fa20['v'];if(_0x11c071){let _0x56c401=_0x34296d?_0x11c071['toString']():_0x11c071[_0x3045b2(0x158)]()['toLowerCase']();if(this['_isMatch'](_0x56c401,_0x12ebbf,_0x5a2fbd,_0x3646a5))return{'row':_0x3e22f9,'col':_0x5a9274,'reference':_0x18bacd(_0x71667[_0x3045b2(0x122)](),{'startRow':_0x3e22f9,'endRow':_0x3e22f9,'startColumn':_0x5a9274,'endColumn':_0x5a9274}),'cellData':{..._0x51fa20,'rawValue':_0x11c071}};}}if(_0x459947&&(_0x51fa20['f']||_0x51fa20['si'])){let _0x38c9f9=this[_0x3045b2(0x138)][_0x3045b2(0x142)](_0x3e22f9,_0x5a9274,_0x71667['getSheetId'](),this[_0x3045b2(0x135)]()[_0x3045b2(0x11b)]());if(_0x38c9f9){let _0x2ee34a=_0x34296d?_0x38c9f9:_0x38c9f9[_0x3045b2(0x166)]();if(this[_0x3045b2(0x132)](_0x2ee34a,_0x12ebbf,_0x5a2fbd,_0x3646a5))return{'row':_0x3e22f9,'col':_0x5a9274,'reference':_0x18bacd(_0x71667['getName'](),{'startRow':_0x3e22f9,'endRow':_0x3e22f9,'startColumn':_0x5a9274,'endColumn':_0x5a9274}),'cellData':{..._0x51fa20,'formulaString':_0x38c9f9}};}}if(_0x36774c){var _0x4f79f4;let _0x3584c6=(_0x4f79f4=_0x51fa20['p'])==null||(_0x4f79f4=_0x4f79f4[_0x3045b2(0x14c)])==null?void 0x0:_0x4f79f4[_0x3045b2(0x13e)];if(!_0x3584c6){var _0x321216;_0x3584c6=(_0x321216=_0x71667['getCell'](_0x3e22f9,_0x5a9274))==null?void 0x0:_0x321216['v'];}if(_0x3584c6){let _0x1b211e=_0x34296d?_0x3584c6[_0x3045b2(0x158)]():_0x3584c6[_0x3045b2(0x158)]()[_0x3045b2(0x166)]();if(this[_0x3045b2(0x132)](_0x1b211e,_0x12ebbf,_0x5a2fbd,_0x3646a5))return{'row':_0x3e22f9,'col':_0x5a9274,'reference':_0x18bacd(_0x71667[_0x3045b2(0x122)](),{'startRow':_0x3e22f9,'endRow':_0x3e22f9,'startColumn':_0x5a9274,'endColumn':_0x5a9274}),'cellData':{..._0x51fa20,'displayValue':_0x3584c6[_0x3045b2(0x158)]()}};}}return!0x1;}[_0xcc393f(0x132)](_0x5d2c3e,_0x595f00,_0x2fc8c0,_0x32eaf5){const _0x4e2636=_0xcc393f;return _0x595f00[_0x4e2636(0x13c)]>0x1&&_0x32eaf5===_0x4e2636(0x153)?_0x595f00[_0x4e2636(0x128)](_0x104443=>_0x2fc8c0?_0x5d2c3e===_0x104443:_0x5d2c3e[_0x4e2636(0x11f)](_0x104443)>-0x1):_0x595f00[_0x4e2636(0x11d)](_0x7833d6=>_0x2fc8c0?_0x5d2c3e===_0x7833d6:_0x5d2c3e[_0x4e2636(0x11f)](_0x7833d6)>-0x1);}};_0x19e2dd[_0xcc393f(0x14e)](p);var m=class extends _0x19e2dd{async[_0xcc393f(0x150)](){const _0x52e0ec=_0xcc393f;return{'formulaErrors':this[_0x52e0ec(0x14d)](),'dataValidationErrors':await this[_0x52e0ec(0x11c)]()};}};_0x19e2dd[_0xcc393f(0x14e)](m);function _0x31cc(){const _0x533312=['some','startRow','indexOf','getCellMatrix','7539072mCNgdI','getName','getSizeUsages','isArray','visibleOnly','getStyleUsages','3092481bSvFVE','every','getRectAreaData','includes','getRange','formula','getRowManager','get','updateConfig','getRectArea','_worksheet','_isMatch','_injector','map','getWorkbook','7861340FPZpaR','forValue','_formulaDataModel','getSheets','getValue','_workbook','length','Sheet\x20with\x20ID\x20','dataStream','endRow','getColVisible','getCellRaw','getFormulaStringByCell','getStyleUsagesAsA1','getColumnWidth','1491135OMvtQr','startColumn','getActiveWorkbook','getRowVisible','12GLaySy','moveFormulaRefOffset','getAllFormulaUsages','body','getAllFormulaError','extend','getFormulaUsagesAsA1','getLintErrors','getFormulaUsages','getAllStyleUsages','AND','filledRanges','14263920mvWxbg','displayValue','_cellMatchesSearch','toString','81wEIwZr','_collectRectAreaData','_initialize','push','getMaxColumns','firstOccurrence','86978KFpWzK','1509136SeabBQ','getSheetId','getCellDataGrid','31PDtdjl','getMaxRows','rawValue','toLowerCase','toA1','endColumn','getAllSizeUsages','getSizeUsagesAsA1','searchCells','getUnitId','getAllDataValidationErrorAsync'];_0x31cc=function(){return _0x533312;};return _0x31cc();}var h=class extends _0x12fffe{async[_0xcc393f(0x151)](){const _0x1721e9=_0xcc393f;let _0x1fbadb=this['_injector'][_0x1721e9(0x12e)](_0x15d9fd),_0x1d99db=this[_0x1721e9(0x12b)](0x0,0x0,this[_0x1721e9(0x164)](),this['getMaxColumns']())[_0x1721e9(0x162)]();return await _0x1fbadb[_0x1721e9(0x14b)](_0x1d99db);}async[_0xcc393f(0x14f)](){const _0x576690=_0xcc393f;return(await this[_0x576690(0x151)]())[_0x576690(0x134)](_0x161f1a);}[_0xcc393f(0x126)](_0x28d07a){const _0x5e433a=_0xcc393f;let _0x3815ee=this['_injector'][_0x5e433a(0x12e)](_0x4b7451),_0x4744f3=this[_0x5e433a(0x12b)](0x0,0x0,this[_0x5e433a(0x164)](),this[_0x5e433a(0x15d)]())[_0x5e433a(0x162)]();return _0x3815ee[_0x5e433a(0x12f)](_0x28d07a),_0x3815ee[_0x5e433a(0x152)](_0x4744f3,this[_0x5e433a(0x13b)],this[_0x5e433a(0x131)]);}[_0xcc393f(0x143)](_0x43a26f){const _0xb5a335=_0xcc393f;return this['getStyleUsages'](_0x43a26f)[_0xb5a335(0x134)](_0x21b04b);}[_0xcc393f(0x123)](_0x44dba3){const _0x18ce3f=_0xcc393f;let _0x18619f=this[_0x18ce3f(0x133)][_0x18ce3f(0x12e)](_0x2b9e7d);return _0x18619f[_0x18ce3f(0x12f)](_0x44dba3),_0x18619f[_0x18ce3f(0x118)](this['_worksheet']);}[_0xcc393f(0x119)](_0x5a98d4){const _0x14c18f=_0xcc393f;let _0x5be7d3=this['_injector']['get'](_0x2b9e7d);_0x5be7d3[_0x14c18f(0x12f)](_0x5a98d4);let _0x451757=_0x5be7d3[_0x14c18f(0x118)](this['_worksheet']);return _0x5be7d3[_0x14c18f(0x167)](_0x451757);}};_0x12fffe[_0xcc393f(0x14e)](h);var g=class extends _0x129bde{[_0xcc393f(0x15a)](_0x5510d4){const _0x5712e1=_0xcc393f;var _0xd71c03;let _0x3f8f0b=(_0xd71c03=_0x5510d4==null?void 0x0:_0x5510d4[_0x5712e1(0x125)])==null?!0x0:_0xd71c03,_0x40c29c=this[_0x5712e1(0x12b)](),_0x26c3e8=this['_worksheet'][_0x5712e1(0x12d)](),_0x1c112d=this['_worksheet']['getColumnManager'](),_0x36067e={},_0x535dea=0x0;for(let _0x4b3801=_0x40c29c[_0x5712e1(0x11e)];_0x4b3801<=_0x40c29c[_0x5712e1(0x13f)];_0x4b3801++){let _0x2c3d6e=_0x26c3e8['getRowHeight'](_0x4b3801),_0x2ff1a6=!_0x3f8f0b||this[_0x5712e1(0x131)][_0x5712e1(0x148)](_0x4b3801)?_0x2c3d6e:0x0;_0x535dea+=_0x2ff1a6,_0x36067e[_0x4b3801]={'h':_0x2ff1a6};}let _0x499960={},_0xc1d38=0x0;for(let _0x1904ac=_0x40c29c[_0x5712e1(0x146)];_0x1904ac<=_0x40c29c[_0x5712e1(0x117)];_0x1904ac++){let _0x4c5341=_0x1c112d[_0x5712e1(0x144)](_0x1904ac),_0x2b5e0c=!_0x3f8f0b||this['_worksheet'][_0x5712e1(0x140)](_0x1904ac)?_0x4c5341:0x0;_0xc1d38+=_0x2b5e0c,_0x499960[_0x1904ac]={'w':_0x2b5e0c};}return{'w':_0xc1d38,'h':_0x535dea,'rowData':_0x36067e,'columnData':_0x499960};}async[_0xcc393f(0x151)](){const _0x42e778=_0xcc393f;let _0xc6708=this[_0x42e778(0x133)]['get'](_0x15d9fd),_0x13d7b2=(({startRow:_0x68c59a,endRow:_0x539942,startColumn:_0x820141,endColumn:_0x278e04})=>{const _0x832474=_0x42e778;let _0x14b234=[];for(let _0x439b84=_0x68c59a;_0x439b84<=_0x539942;_0x439b84++){let _0x42ccc7=[];for(let _0x1f524d=_0x820141;_0x1f524d<=_0x278e04;_0x1f524d++)_0x42ccc7[_0x832474(0x15c)](this[_0x832474(0x131)]['getCellRaw'](_0x439b84,_0x1f524d));_0x14b234[_0x832474(0x15c)](_0x42ccc7);}return _0x14b234;})({'startRow':0x0,'endRow':this[_0x42e778(0x131)][_0x42e778(0x164)](),'startColumn':0x0,'endColumn':this[_0x42e778(0x131)][_0x42e778(0x15d)]()}),_0x225703=await _0xc6708[_0x42e778(0x14b)](_0x13d7b2),_0x1908bd=this[_0x42e778(0x12b)](),_0x22c15c=[];for(let _0x134bb3=0x0;_0x134bb3<_0x225703[_0x42e778(0x13c)];_0x134bb3++){let _0xebd6f3=_0x225703[_0x134bb3],_0x12de4d=_0xebd6f3['filledRanges'],_0x15ece2=[];for(let _0x14a187=0x0;_0x14a187<_0x12de4d[_0x42e778(0x13c)];_0x14a187++){let _0x1e8712=_0x12de4d[_0x14a187],_0x4a4f6e=_0x535ec4(_0x1e8712,_0x1908bd);_0x4a4f6e&&_0x15ece2['push'](_0x4a4f6e);}if(_0x15ece2[_0x42e778(0x13c)]>0x0){if(_0xebd6f3[_0x42e778(0x154)]=_0x15ece2,!(_0xebd6f3[_0x42e778(0x15e)][_0x42e778(0x11e)]>=_0x1908bd['startRow']&&_0xebd6f3[_0x42e778(0x15e)][_0x42e778(0x11e)]<=_0x1908bd[_0x42e778(0x13f)]&&_0xebd6f3[_0x42e778(0x15e)][_0x42e778(0x146)]>=_0x1908bd['startColumn']&&_0xebd6f3[_0x42e778(0x15e)][_0x42e778(0x146)]<=_0x1908bd[_0x42e778(0x117)])){let _0x360291=_0x15ece2[0x0],_0x247bc5=_0x360291[_0x42e778(0x11e)]-_0xebd6f3[_0x42e778(0x15e)][_0x42e778(0x11e)],_0x56b94a=_0x360291[_0x42e778(0x146)]-_0xebd6f3[_0x42e778(0x15e)][_0x42e778(0x146)];_0xebd6f3[_0x42e778(0x12c)]=await _0xc6708[_0x42e778(0x14a)](_0xebd6f3[_0x42e778(0x12c)],_0x56b94a,_0x247bc5),_0xebd6f3[_0x42e778(0x15e)]={'startRow':_0x360291[_0x42e778(0x11e)],'endRow':_0x360291[_0x42e778(0x11e)],'startColumn':_0x360291[_0x42e778(0x146)],'endColumn':_0x360291['startColumn']};}_0x22c15c['push'](_0xebd6f3);}}return _0x22c15c;}async[_0xcc393f(0x14f)](){const _0x5c425f=_0xcc393f;return(await this[_0x5c425f(0x151)]())[_0x5c425f(0x134)](_0x161f1a);}[_0xcc393f(0x126)](_0x5569cb){const _0x2264e5=_0xcc393f;let _0x24aa09=this[_0x2264e5(0x133)][_0x2264e5(0x12e)](_0x4b7451),_0x3a644b=(({startRow:_0x534560,endRow:_0x49dcb9,startColumn:_0x4897e3,endColumn:_0xa1ac4b})=>{const _0x23d632=_0x2264e5;let _0x3e6651=[];for(let _0x3b75d1=_0x534560;_0x3b75d1<=_0x49dcb9;_0x3b75d1++){let _0x13df90=[];for(let _0x25b577=_0x4897e3;_0x25b577<=_0xa1ac4b;_0x25b577++)_0x13df90['push'](this['_worksheet'][_0x23d632(0x141)](_0x3b75d1,_0x25b577));_0x3e6651[_0x23d632(0x15c)](_0x13df90);}return _0x3e6651;})({'startRow':0x0,'endRow':this[_0x2264e5(0x131)]['getMaxRows'](),'startColumn':0x0,'endColumn':this[_0x2264e5(0x131)][_0x2264e5(0x15d)]()});_0x24aa09['updateConfig'](_0x5569cb);let _0x3e3aae=_0x24aa09[_0x2264e5(0x152)](_0x3a644b,this[_0x2264e5(0x13b)],this[_0x2264e5(0x131)]),_0x555f71=this['getRange'](),_0x2348f1=[];for(let _0x2e44c0=0x0;_0x2e44c0<_0x3e3aae[_0x2264e5(0x13c)];_0x2e44c0++){let _0x2f45ba=_0x3e3aae[_0x2e44c0],_0xf99cc9=_0x2f45ba[_0x2264e5(0x154)],_0x2fafa1=[];for(let _0x56323a=0x0;_0x56323a<_0xf99cc9[_0x2264e5(0x13c)];_0x56323a++){let _0x160f57=_0xf99cc9[_0x56323a],_0x5e93ab=_0x535ec4(_0x160f57,_0x555f71);_0x5e93ab&&_0x2fafa1['push'](_0x5e93ab);}_0x2fafa1[_0x2264e5(0x13c)]>0x0&&(_0x2f45ba[_0x2264e5(0x154)]=_0x2fafa1,_0x2348f1[_0x2264e5(0x15c)](_0x2f45ba));}return _0x2348f1;}['getStyleUsagesAsA1'](_0x40cfc4){return this['getStyleUsages'](_0x40cfc4)['map'](_0x21b04b);}[_0xcc393f(0x123)](_0x4c2ce3){const _0x1bbaf2=_0xcc393f;let _0x28abd0=this[_0x1bbaf2(0x133)]['get'](_0x2b9e7d),_0xd1cb30=this[_0x1bbaf2(0x12b)]();return _0x28abd0[_0x1bbaf2(0x12f)](_0x4c2ce3),_0x28abd0[_0x1bbaf2(0x118)](this[_0x1bbaf2(0x131)],_0xd1cb30[_0x1bbaf2(0x11e)],_0xd1cb30[_0x1bbaf2(0x13f)],_0xd1cb30['startColumn'],_0xd1cb30[_0x1bbaf2(0x117)]);}[_0xcc393f(0x119)](_0x48c40b){const _0x12a301=_0xcc393f;let _0x1f7897=this['getSizeUsages'](_0x48c40b);return this[_0x12a301(0x133)][_0x12a301(0x12e)](_0x2b9e7d)[_0x12a301(0x167)](_0x1f7897);}[_0xcc393f(0x130)](_0x3b73ff){const _0x28045d=_0xcc393f;let _0x2f0a74=this[_0x28045d(0x15a)](_0x3b73ff);return{'w':_0x2f0a74['w'],'h':_0x2f0a74['h']};}[_0xcc393f(0x129)](_0x4c83be){const _0xa6d81c=_0xcc393f;return this[_0xa6d81c(0x15a)](_0x4c83be);}};_0x129bde['extend'](g);export{};
|