@univerjs-pro/docs-latex 1.0.0-insiders.20260707-70502d7
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/README.md +3 -0
- package/lib/cjs/facade.js +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/es/facade.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/facade.js +1 -0
- package/lib/index.js +1 -0
- package/lib/types/commands/latex.command.d.ts +4 -0
- package/lib/types/common/actions.d.ts +25 -0
- package/lib/types/common/const.d.ts +1 -0
- package/lib/types/common/metadata.d.ts +6 -0
- package/lib/types/common/type.d.ts +34 -0
- package/lib/types/config/config.d.ts +5 -0
- package/lib/types/controllers/docs-latex-resource.controller.d.ts +8 -0
- package/lib/types/facade/f-document-latex.d.ts +88 -0
- package/lib/types/facade/f-document.d.ts +89 -0
- package/lib/types/facade/index.d.ts +3 -0
- package/lib/types/facade/types.d.ts +86 -0
- package/lib/types/index.d.ts +8 -0
- package/lib/types/models/docs-latex-model.d.ts +18 -0
- package/lib/types/plugin.d.ts +14 -0
- package/lib/umd/facade.js +1 -0
- package/lib/umd/index.js +1 -0
- package/package.json +84 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _0x584de8=_0x48e6;(function(_0x20eb99,_0x1d7b89){var _0x2a042c=_0x48e6,_0xe9f944=_0x20eb99();while(!![]){try{var _0x36b04d=parseInt(_0x2a042c(0x9b))/0x1+-parseInt(_0x2a042c(0xd7))/0x2*(parseInt(_0x2a042c(0xd2))/0x3)+parseInt(_0x2a042c(0xb8))/0x4*(-parseInt(_0x2a042c(0xae))/0x5)+-parseInt(_0x2a042c(0xba))/0x6*(-parseInt(_0x2a042c(0xb0))/0x7)+parseInt(_0x2a042c(0xb6))/0x8*(-parseInt(_0x2a042c(0xcb))/0x9)+-parseInt(_0x2a042c(0xc3))/0xa+parseInt(_0x2a042c(0xd9))/0xb;if(_0x36b04d===_0x1d7b89)break;else _0xe9f944['push'](_0xe9f944['shift']());}catch(_0x520d09){_0xe9f944['push'](_0xe9f944['shift']());}}}(_0x8073,0x49037),Object[_0x584de8(0xa7)](exports,Symbol['toStringTag'],{'value':_0x584de8(0xa8)}));let e=require('@univerjs-pro/docs-latex'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function r(_0x2b11b2){'@babel/helpers - typeof';var _0x4a902d=_0x584de8;return r=typeof Symbol==_0x4a902d(0xa0)&&typeof Symbol[_0x4a902d(0xa6)]==_0x4a902d(0x98)?function(_0x27cf9e){return typeof _0x27cf9e;}:function(_0xb22545){var _0x248341=_0x4a902d;return _0xb22545&&typeof Symbol==_0x248341(0xa0)&&_0xb22545[_0x248341(0xa2)]===Symbol&&_0xb22545!==Symbol[_0x248341(0xc5)]?'symbol':typeof _0xb22545;},r(_0x2b11b2);}function i(_0x7fd9ab,_0x297223){var _0x228122=_0x584de8;if(r(_0x7fd9ab)!='object'||!_0x7fd9ab)return _0x7fd9ab;var _0x2b10f7=_0x7fd9ab[Symbol[_0x228122(0xb1)]];if(_0x2b10f7!==void 0x0){var _0x3ba959=_0x2b10f7[_0x228122(0xab)](_0x7fd9ab,_0x297223||_0x228122(0xcd));if(r(_0x3ba959)!=_0x228122(0xd1))return _0x3ba959;throw TypeError(_0x228122(0xa9));}return(_0x297223===_0x228122(0xbe)?String:Number)(_0x7fd9ab);}function a(_0x5a8ccd){var _0x4b7b87=_0x584de8,_0x3f9674=i(_0x5a8ccd,_0x4b7b87(0xbe));return r(_0x3f9674)=='symbol'?_0x3f9674:_0x3f9674+'';}function o(_0x4b7044,_0x513839,_0x29c817){var _0x19b0eb=_0x584de8;return(_0x513839=a(_0x513839))in _0x4b7044?Object[_0x19b0eb(0xa7)](_0x4b7044,_0x513839,{'value':_0x29c817,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4b7044[_0x513839]=_0x29c817,_0x4b7044;}function s(_0x5ef78c,_0x29ce0a){return function(_0x4c4f21,_0x3dc08e){_0x29ce0a(_0x4c4f21,_0x3dc08e,_0x5ef78c);};}function _0x48e6(_0xcdd1bc,_0x306ff7){_0xcdd1bc=_0xcdd1bc-0x93;var _0x807354=_0x8073();var _0x48e6af=_0x807354[_0xcdd1bc];return _0x48e6af;}function c(_0x30be79,_0x30f3ec,_0x4c6ee3,_0x53ec08){var _0x132f6f=_0x584de8,_0x5a5708=arguments[_0x132f6f(0x94)],_0xf36310=_0x5a5708<0x3?_0x30f3ec:_0x53ec08===null?_0x53ec08=Object[_0x132f6f(0xc4)](_0x30f3ec,_0x4c6ee3):_0x53ec08,_0x109ab7;if(typeof Reflect==_0x132f6f(0xd1)&&typeof Reflect[_0x132f6f(0xb5)]=='function')_0xf36310=Reflect['decorate'](_0x30be79,_0x30f3ec,_0x4c6ee3,_0x53ec08);else{for(var _0x3a6f9b=_0x30be79[_0x132f6f(0x94)]-0x1;_0x3a6f9b>=0x0;_0x3a6f9b--)(_0x109ab7=_0x30be79[_0x3a6f9b])&&(_0xf36310=(_0x5a5708<0x3?_0x109ab7(_0xf36310):_0x5a5708>0x3?_0x109ab7(_0x30f3ec,_0x4c6ee3,_0xf36310):_0x109ab7(_0x30f3ec,_0x4c6ee3))||_0xf36310);}return _0x5a5708>0x3&&_0xf36310&&Object[_0x132f6f(0xa7)](_0x30f3ec,_0x4c6ee3,_0xf36310),_0xf36310;}let l=class{constructor(_0xbc1c37,_0x5ba1cb,_0x5b2111){var _0x401977=_0x584de8;this[_0x401977(0xa3)]=_0xbc1c37,this[_0x401977(0xad)]=_0x5ba1cb,this[_0x401977(0xa4)]=_0x5b2111,o(this,_0x401977(0x9d),void 0x0),this[_0x401977(0x9d)]=this[_0x401977(0xa3)][_0x401977(0xbd)]();}['getId'](){var _0x2f0cb3=_0x584de8;return this[_0x2f0cb3(0xad)];}[_0x584de8(0x9a)](){var _0x4ed5f4=_0x584de8;let _0x2f1075=this[_0x4ed5f4(0xcc)]();return _0x2f1075?{'endIndex':_0x2f1075['endIndex'],'rangeId':_0x2f1075['rangeId'],'startIndex':_0x2f1075[_0x4ed5f4(0xac)]}:null;}[_0x584de8(0xb7)](){var _0x24fd8d=_0x584de8,_0x347926,_0x1a1eac;let _0x5cc421=this[_0x24fd8d(0xcc)](),_0x5d67ba=(_0x347926=this[_0x24fd8d(0x96)]()[_0x24fd8d(0x9e)])==null?void 0x0:_0x347926[_0x24fd8d(0xc9)];return!_0x5cc421||!_0x5d67ba?'':((_0x1a1eac=this[_0x24fd8d(0xa4)][_0x24fd8d(0xbc)](e['DocsLatexModel'])['getFormula'](this[_0x24fd8d(0x9d)],this[_0x24fd8d(0xad)]))==null?void 0x0:_0x1a1eac['latex'])||(0x0,e['getFormulaLatexFromRange'])(_0x5cc421,_0x5d67ba);}[_0x584de8(0xce)](){var _0x201ab9=_0x584de8;let _0x287c8b=(0x0,e[_0x201ab9(0xca)])(this['_injector'][_0x201ab9(0xbc)](e[_0x201ab9(0xc8)])[_0x201ab9(0xd6)](this[_0x201ab9(0x9d)],this[_0x201ab9(0xad)]));return _0x287c8b[_0x201ab9(0xa1)]?_0x287c8b:{..._0x287c8b,'latex':this['getLatex']()};}[_0x584de8(0xc6)](){var _0x227b34=_0x584de8;let _0x456653=this['getRange']();return _0x456653?{..._0x456653,'config':this[_0x227b34(0xce)](),'latex':this['getLatex'](),'type':_0x227b34(0xa1)}:null;}[_0x584de8(0xd8)](_0x44bed3){var _0x18bda4=_0x584de8;return this[_0x18bda4(0xa4)][_0x18bda4(0xbc)](t['ICommandService'])[_0x18bda4(0x97)](e[_0x18bda4(0xda)]['id'],{'latex':_0x44bed3[_0x18bda4(0xa1)],'properties':_0x44bed3[_0x18bda4(0xb4)],'rangeId':this['_rangeId'],'unitId':this[_0x18bda4(0x9d)]});}[_0x584de8(0x96)](){var _0x108b54=_0x584de8;return this[_0x108b54(0xa3)]['save']();}['_getCustomRange'](){var _0x56ec22=_0x584de8,_0xd7d5b0;return(_0xd7d5b0=this[_0x56ec22(0x96)]()[_0x56ec22(0x9e)])==null||(_0xd7d5b0=_0xd7d5b0[_0x56ec22(0xb3)])==null?void 0x0:_0xd7d5b0[_0x56ec22(0xa5)](_0xe5d53e=>_0xe5d53e[_0x56ec22(0xb9)]===this[_0x56ec22(0xad)]&&(0x0,e['isDocsLatexFormulaRange'])(_0xe5d53e));}};l=c([s(0x2,(0x0,t[_0x584de8(0x95)])(t[_0x584de8(0xd3)]))],l);var u=class extends n[_0x584de8(0xc2)]{[_0x584de8(0xd5)](){var _0x50914e=_0x584de8;return this[_0x50914e(0xbf)]()[_0x50914e(0xc7)](_0x903998=>this[_0x50914e(0x9f)](_0x903998[_0x50914e(0xb9)]));}[_0x584de8(0xaa)](_0x32226a){var _0xce6803=_0x584de8;return this['_getLatexRanges']()[_0xce6803(0xc1)](_0x1db486=>_0x1db486['rangeId']===_0x32226a)?this[_0xce6803(0x9f)](_0x32226a):null;}[_0x584de8(0xb2)](_0x2fb35b){var _0x16b95c=_0x584de8;let _0x12694f=this[_0x16b95c(0xbf)]()[_0x16b95c(0xa5)](_0x20237a=>_0x20237a[_0x16b95c(0xac)]<=_0x2fb35b&&_0x2fb35b<=_0x20237a[_0x16b95c(0x93)]);return _0x12694f?this['_createFDocumentLatex'](_0x12694f['rangeId']):null;}[_0x584de8(0xcf)](_0x2d3b18){var _0x3a754f=_0x584de8,_0x37e5b5;return(_0x37e5b5=this[_0x3a754f(0xc0)](_0x2d3b18)[0x0])==null?null:_0x37e5b5;}[_0x584de8(0xc0)](_0x385fc8){var _0x2afb16=_0x584de8;let _0x5dc1ff=typeof _0x385fc8==_0x2afb16(0xbe)?{'latex':_0x385fc8}:_0x385fc8;return this[_0x2afb16(0xd5)]()['filter'](_0x4e7be8=>!(_0x5dc1ff[_0x2afb16(0xb9)]&&_0x4e7be8['getId']()!==_0x5dc1ff['rangeId']||_0x5dc1ff['latex']&&!_0x4e7be8['getLatex']()[_0x2afb16(0xd4)](_0x5dc1ff[_0x2afb16(0xa1)])));}[_0x584de8(0xaf)](_0x3f9a74){var _0x5658c9=_0x584de8,_0x4d84f6;let _0x1bd4be=this[_0x5658c9(0xa4)][_0x5658c9(0xbc)](t['ICommandService']),_0x41a28b=(_0x4d84f6=_0x3f9a74['rangeId'])==null?(0x0,t['generateRandomId'])(0x6):_0x4d84f6;return _0x1bd4be[_0x5658c9(0x97)](e['InsertDocsLatexFormulaCommand']['id'],{..._0x3f9a74,'rangeId':_0x41a28b,'unitId':this[_0x5658c9(0xbd)]()})?this[_0x5658c9(0xaa)](_0x41a28b):null;}[_0x584de8(0xbf)](){var _0x4f82c6=_0x584de8,_0x242af3,_0x342332;return(_0x242af3=(_0x342332=this[_0x4f82c6(0xdb)]()[_0x4f82c6(0x9e)])==null||(_0x342332=_0x342332['customRanges'])==null?void 0x0:_0x342332['filter'](e[_0x4f82c6(0x99)]))==null?[]:_0x242af3;}[_0x584de8(0x9f)](_0x20777c){var _0x5377af=_0x584de8;return this[_0x5377af(0xa4)][_0x5377af(0xbb)](l,this,_0x20777c);}};function _0x8073(){var _0x19d109=['insertLatexFormula','112ZiqSNL','toPrimitive','getLatexFormulaAt','customRanges','properties','decorate','3456hbtyXC','getLatex','428bwAQuJ','rangeId','114936olNXCh','createInstance','get','getId','string','_getLatexRanges','findLatexFormulas','some','FDocument','1866930PjbPzR','getOwnPropertyDescriptor','prototype','describe','map','DocsLatexModel','dataStream','normalizeDocsLatexFormulaConfig','8145ubJOTZ','_getCustomRange','default','getConfig','findLatexFormulaByText','extend','object','145599dWuoWF','Injector','includes','getLatexFormulas','getFormula','10wrqzRl','update','8746936Gvbboi','UpdateDocsLatexFormulaCommand','save','endIndex','length','Inject','_getDocumentData','syncExecuteCommand','symbol','isDocsLatexFormulaRange','getRange','444425eePpVL','FDocumentLatex','_unitId','body','_createFDocumentLatex','function','latex','constructor','_document','_injector','find','iterator','defineProperty','Module','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','getLatexFormula','call','startIndex','_rangeId','19940IDkzHV'];_0x8073=function(){return _0x19d109;};return _0x8073();}n[_0x584de8(0xc2)][_0x584de8(0xd0)](u),Object[_0x584de8(0xa7)](exports,_0x584de8(0x9c),{'enumerable':!0x0,'get':function(){return l;}});
|
package/lib/cjs/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x5521bc=_0x5932;(function(_0x1c444e,_0x9ec024){const _0x318c28=_0x5932,_0x4b0dad=_0x1c444e();while(!![]){try{const _0x395576=parseInt(_0x318c28(0xf3))/0x1+parseInt(_0x318c28(0xf9))/0x2+parseInt(_0x318c28(0x130))/0x3*(parseInt(_0x318c28(0x147))/0x4)+parseInt(_0x318c28(0x11c))/0x5+-parseInt(_0x318c28(0x16b))/0x6*(parseInt(_0x318c28(0x12b))/0x7)+-parseInt(_0x318c28(0x14d))/0x8*(parseInt(_0x318c28(0x15f))/0x9)+parseInt(_0x318c28(0x10b))/0xa;if(_0x395576===_0x9ec024)break;else _0x4b0dad['push'](_0x4b0dad['shift']());}catch(_0x4defee){_0x4b0dad['push'](_0x4b0dad['shift']());}}}(_0x528a,0xaf6d9),Object[_0x5521bc(0x135)](exports,Symbol[_0x5521bc(0x12a)],{'value':_0x5521bc(0xfd)}));let e=require('@univerjs/core'),t=require('@univerjs/docs'),n=require('rxjs'),r=require('@univerjs-pro/license');const i={'displayMode':_0x5521bc(0x154),'kind':_0x5521bc(0x154)};function a(_0x1d98ab){return{...i,'latex':'',..._0x1d98ab};}function o(_0x284747){const _0x5c6d40=_0x5521bc;var _0x33410a;let _0x300d20=(_0x33410a=_0x284747==null?void 0x0:_0x284747[_0x5c6d40(0xfb)])==null?{}:_0x33410a;return{'formulas':Object['fromEntries'](Object['entries'](_0x300d20)[_0x5c6d40(0x148)](([_0x45243b,_0x4a4d49])=>[_0x45243b,a(_0x4a4d49)]))};}function s(_0x2db556,_0x16fa18,_0x3b98c8){const _0x3c38ba=_0x5521bc;let _0xf2b0a4=o(_0x2db556);return _0xf2b0a4['formulas'][_0x16fa18]=a({..._0xf2b0a4[_0x3c38ba(0xfb)][_0x16fa18],..._0x3b98c8}),_0xf2b0a4;}function c(_0x4829b0,_0x34c606){const _0x170081=_0x5521bc;let _0x66544e=o(_0x4829b0);return delete _0x66544e[_0x170081(0xfb)][_0x34c606],_0x66544e;}const l=_0x5521bc(0x170);function u(_0x48d9e5){const _0x29aaa2=_0x5521bc;var _0x29189e;let _0x28b092=j(_0x48d9e5[_0x29aaa2(0x116)]),_0x59d4ed=A(_0x28b092),{startOffset:_0x26c594,endOffset:_0x25b318}=v(_0x59d4ed,_0x48d9e5[_0x29aaa2(0x142)],_0x48d9e5[_0x29aaa2(0x10f)]),_0x102bea=s(_0x48d9e5['metadata'],_0x48d9e5[_0x29aaa2(0xe9)],{...i,..._0x48d9e5[_0x29aaa2(0x146)],'latex':_0x48d9e5[_0x29aaa2(0xf2)]}),_0x452520=h();return x(_0x59d4ed,_0x26c594,_0x25b318,_0x452520),_(_0x59d4ed,_0x26c594,_0x26c594+_0x452520[_0x29aaa2(0x139)]-0x1,_0x48d9e5[_0x29aaa2(0xe9)]),_0x59d4ed[_0x29aaa2(0x166)]=[...(_0x29189e=_0x59d4ed['customRanges'])==null?[]:_0x29189e,m(_0x48d9e5[_0x29aaa2(0xe9)],_0x26c594,_0x452520[_0x29aaa2(0x139)])][_0x29aaa2(0x105)]((_0x36e8ae,_0x934f90)=>_0x36e8ae['startIndex']-_0x934f90[_0x29aaa2(0xea)]),{'nextDocumentData':_0x28b092,'nextMetadata':_0x102bea,'cursorOffset':_0x26c594+_0x452520[_0x29aaa2(0x139)]};}function d(_0x11d074){const _0x2aa86f=_0x5521bc;var _0x4058a6,_0x322f4a,_0x4111e0;let _0x57becb=j(_0x11d074[_0x2aa86f(0x116)]),_0x47a6c7=A(_0x57becb),_0x2c0a74=(_0x4058a6=_0x47a6c7[_0x2aa86f(0x166)])==null?void 0x0:_0x4058a6['find'](_0x4e683e=>_0x4e683e['rangeId']===_0x11d074[_0x2aa86f(0xe9)]&&p(_0x4e683e));if(!_0x2c0a74)return null;let _0x5e7d19=_0x2c0a74[_0x2aa86f(0xea)],_0x524a9e=h();return x(_0x47a6c7,_0x2c0a74[_0x2aa86f(0xea)],_0x2c0a74[_0x2aa86f(0x107)]+0x1,_0x524a9e),_0x47a6c7[_0x2aa86f(0x166)]=[...(_0x322f4a=(_0x4111e0=_0x47a6c7[_0x2aa86f(0x166)])==null?void 0x0:_0x4111e0[_0x2aa86f(0x16c)](_0x4d1290=>_0x4d1290[_0x2aa86f(0xe9)]!==_0x11d074['rangeId']))==null?[]:_0x322f4a,m(_0x11d074['rangeId'],_0x5e7d19,_0x524a9e[_0x2aa86f(0x139)])][_0x2aa86f(0x105)]((_0x3b9663,_0x3253d6)=>_0x3b9663[_0x2aa86f(0xea)]-_0x3253d6[_0x2aa86f(0xea)]),{'nextDocumentData':_0x57becb,'nextMetadata':s(_0x11d074[_0x2aa86f(0xf0)],_0x11d074[_0x2aa86f(0xe9)],{..._0x11d074[_0x2aa86f(0x146)],'latex':_0x11d074[_0x2aa86f(0xf2)]}),'cursorOffset':_0x5e7d19+_0x524a9e[_0x2aa86f(0x139)]};}function f(_0x28dc04,_0x29edca){const _0x343cd2=_0x5521bc;if(!p(_0x28dc04))return'';let _0x326b4e=_0x29edca[_0x343cd2(0x124)](_0x28dc04[_0x343cd2(0xea)],_0x28dc04[_0x343cd2(0x107)]+0x1);return g(_0x326b4e)?'':_0x326b4e;}function p(_0x3e4fc1){const _0x258966=_0x5521bc;var _0x1f8845;return(_0x3e4fc1==null?void 0x0:_0x3e4fc1['rangeType'])===e['CustomRangeType'][_0x258966(0x125)]&&((_0x1f8845=_0x3e4fc1[_0x258966(0x146)])==null?void 0x0:_0x1f8845['kind'])===_0x258966(0x170);}function m(_0x595c8b,_0xff88d5,_0x2d58a4){const _0x525c9b=_0x5521bc;return{'startIndex':_0xff88d5,'endIndex':_0xff88d5+Math['max'](0x0,_0x2d58a4-0x1),'rangeId':_0x595c8b,'rangeType':e[_0x525c9b(0x113)]['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':l}};}function h(){return'i';}function g(_0xc78b04){const _0x42e379=_0x5521bc;return _0xc78b04[_0x42e379(0x139)]>0x0&&Array[_0x42e379(0xf7)](_0xc78b04)[_0x42e379(0x140)](_0x8a5358=>_0x8a5358==='i');}function _(_0xb34c9f,_0x14e98a,_0x18c36f,_0xca5383){const _0x5be322=_0x5521bc;var _0x57b277;_0xb34c9f[_0x5be322(0x166)]=(_0x57b277=_0xb34c9f[_0x5be322(0x166)])==null?void 0x0:_0x57b277[_0x5be322(0x16c)](_0x5e6e12=>_0x5e6e12[_0x5be322(0xe9)]===_0xca5383||!p(_0x5e6e12)?!0x0:_0x5e6e12[_0x5be322(0x107)]<_0x14e98a||_0x5e6e12[_0x5be322(0xea)]>_0x18c36f);}function v(_0x34d608,_0x27befb,_0x38e939){const _0x571284=_0x5521bc;let _0x4610d7=b(_0x34d608),_0x4b7ac5=_0x27befb==null?_0x4610d7:_0x27befb,_0xaed1c=_0x38e939==null?_0x4b7ac5:_0x38e939;return{'startOffset':y(Math['min'](_0x4b7ac5,_0xaed1c),_0x4610d7),'endOffset':y(Math[_0x571284(0x161)](_0x4b7ac5,_0xaed1c),_0x4610d7)};}function y(_0x28e09e,_0xd9e79e){const _0x5824c1=_0x5521bc;return Math[_0x5824c1(0x161)](0x0,Math['min'](_0x28e09e,_0xd9e79e));}function b(_0xf47320){const _0x238925=_0x5521bc;return _0xf47320[_0x238925(0x16f)]['endsWith'](e['DataStreamTreeTokenType']['SECTION_BREAK'])?Math[_0x238925(0x161)](0x0,_0xf47320['dataStream'][_0x238925(0x139)]-0x1):_0xf47320[_0x238925(0x16f)][_0x238925(0x139)];}function x(_0x2dc5a3,_0x377942,_0x4e4873,_0x38aa0b){_0x4e4873>_0x377942&&C(_0x2dc5a3,_0x377942,_0x4e4873),S(_0x2dc5a3,_0x377942,_0x38aa0b);}function S(_0xd71ddd,_0x20732f,_0x408872){const _0x5531e1=_0x5521bc;_0x408872&&(_0xd71ddd[_0x5531e1(0x16f)]=''+_0xd71ddd['dataStream'][_0x5531e1(0x124)](0x0,_0x20732f)+_0x408872+_0xd71ddd[_0x5531e1(0x16f)][_0x5531e1(0x124)](_0x20732f),w(_0xd71ddd,_0x20732f,_0x408872[_0x5531e1(0x139)]));}function C(_0x21b6db,_0x5d7cdd,_0x4f698f){const _0x26c092=_0x5521bc;let _0x3bbba8=_0x4f698f-_0x5d7cdd;_0x21b6db[_0x26c092(0x16f)]=''+_0x21b6db[_0x26c092(0x16f)]['slice'](0x0,_0x5d7cdd)+_0x21b6db[_0x26c092(0x16f)][_0x26c092(0x124)](_0x4f698f),ee(_0x21b6db,_0x5d7cdd,_0x3bbba8);}function w(_0x4518da,_0x10b966,_0x3bded9){const _0x11d536=_0x5521bc;_0x4518da[_0x11d536(0x10e)]=T(_0x4518da['paragraphs'],_0x10b966,_0x3bded9),_0x4518da[_0x11d536(0x171)]=T(_0x4518da[_0x11d536(0x171)],_0x10b966,_0x3bded9),_0x4518da[_0x11d536(0x11f)]=T(_0x4518da[_0x11d536(0x11f)],_0x10b966,_0x3bded9),_0x4518da[_0x11d536(0xf6)]=D(_0x4518da[_0x11d536(0xf6)],_0x10b966,_0x3bded9),_0x4518da['tables']=O(_0x4518da[_0x11d536(0x109)],_0x10b966,_0x3bded9),_0x4518da[_0x11d536(0x11d)]=O(_0x4518da[_0x11d536(0x11d)],_0x10b966,_0x3bded9),_0x4518da[_0x11d536(0x166)]=O(_0x4518da['customRanges'],_0x10b966,_0x3bded9),_0x4518da[_0x11d536(0xeb)]=O(_0x4518da[_0x11d536(0xeb)],_0x10b966,_0x3bded9),_0x4518da['blockRanges']=O(_0x4518da['blockRanges'],_0x10b966,_0x3bded9);}function ee(_0x3a285c,_0x48f308,_0x22da91){const _0x22db3b=_0x5521bc;var _0x78707b,_0x6feef5;_0x3a285c[_0x22db3b(0x10e)]=E(_0x3a285c[_0x22db3b(0x10e)],_0x48f308,_0x22da91),_0x3a285c[_0x22db3b(0x171)]=E(_0x3a285c['sectionBreaks'],_0x48f308,_0x22da91),_0x3a285c[_0x22db3b(0x11f)]=E(_0x3a285c['customBlocks'],_0x48f308,_0x22da91),_0x3a285c[_0x22db3b(0xf6)]=(_0x78707b=k((_0x6feef5=_0x3a285c[_0x22db3b(0xf6)])==null?void 0x0:_0x6feef5[_0x22db3b(0x148)](_0x3e3cb7=>({..._0x3e3cb7,'startIndex':_0x3e3cb7['st'],'endIndex':_0x3e3cb7['ed']})),_0x48f308,_0x22da91))==null?void 0x0:_0x78707b[_0x22db3b(0x148)](_0x531069=>{let {startIndex:_0x58c201,endIndex:_0x2639af,..._0x4ae0d5}=_0x531069;return{..._0x4ae0d5,'st':_0x58c201,'ed':_0x2639af};}),_0x3a285c[_0x22db3b(0x109)]=k(_0x3a285c[_0x22db3b(0x109)],_0x48f308,_0x22da91),_0x3a285c[_0x22db3b(0x11d)]=k(_0x3a285c['columnGroups'],_0x48f308,_0x22da91),_0x3a285c['customRanges']=k(_0x3a285c[_0x22db3b(0x166)],_0x48f308,_0x22da91),_0x3a285c[_0x22db3b(0xeb)]=k(_0x3a285c[_0x22db3b(0xeb)],_0x48f308,_0x22da91),_0x3a285c['blockRanges']=k(_0x3a285c[_0x22db3b(0x173)],_0x48f308,_0x22da91);}function T(_0x4cde96,_0x1ea3cc,_0x3ff028){const _0x2b3f16=_0x5521bc;return _0x4cde96==null?void 0x0:_0x4cde96[_0x2b3f16(0x148)](_0x2d0813=>_0x2d0813[_0x2b3f16(0xea)]>=_0x1ea3cc?{..._0x2d0813,'startIndex':_0x2d0813[_0x2b3f16(0xea)]+_0x3ff028}:_0x2d0813);}function E(_0xd084f1,_0x2004b9,_0x62bba4){const _0x354a69=_0x5521bc;let _0x80c261=_0x2004b9+_0x62bba4;return _0xd084f1==null?void 0x0:_0xd084f1[_0x354a69(0x148)](_0x2216c2=>_0x2216c2[_0x354a69(0xea)]>=_0x2004b9&&_0x2216c2[_0x354a69(0xea)]<_0x80c261?null:_0x2216c2[_0x354a69(0xea)]>=_0x80c261?{..._0x2216c2,'startIndex':_0x2216c2['startIndex']-_0x62bba4}:_0x2216c2)[_0x354a69(0x16c)](_0xff807b=>_0xff807b!=null);}function D(_0x2a9eae,_0x74ac81,_0x20d6bd){const _0x5e87f9=_0x5521bc;return _0x2a9eae==null?void 0x0:_0x2a9eae[_0x5e87f9(0x148)](_0x13cb9a=>_0x13cb9a['st']>=_0x74ac81?{..._0x13cb9a,'st':_0x13cb9a['st']+_0x20d6bd,'ed':_0x13cb9a['ed']+_0x20d6bd}:_0x13cb9a['ed']>_0x74ac81?{..._0x13cb9a,'ed':_0x13cb9a['ed']+_0x20d6bd}:_0x13cb9a);}function O(_0x2ab158,_0x2a3f6b,_0x421cb6){const _0x4cfdc8=_0x5521bc;return _0x2ab158==null?void 0x0:_0x2ab158[_0x4cfdc8(0x148)](_0x827376=>_0x827376[_0x4cfdc8(0xea)]>=_0x2a3f6b?{..._0x827376,'startIndex':_0x827376[_0x4cfdc8(0xea)]+_0x421cb6,'endIndex':_0x827376[_0x4cfdc8(0x107)]+_0x421cb6}:_0x827376[_0x4cfdc8(0x107)]>=_0x2a3f6b?{..._0x827376,'endIndex':_0x827376['endIndex']+_0x421cb6}:_0x827376);}function k(_0x5bb922,_0x15fc29,_0xee743){const _0x56c29e=_0x5521bc;let _0x36c734=_0x15fc29+_0xee743;return _0x5bb922==null?void 0x0:_0x5bb922[_0x56c29e(0x148)](_0xc0eb3f=>_0xc0eb3f['startIndex']>=_0x15fc29&&_0xc0eb3f[_0x56c29e(0x107)]<_0x36c734?null:_0xc0eb3f['startIndex']>=_0x36c734?{..._0xc0eb3f,'startIndex':_0xc0eb3f[_0x56c29e(0xea)]-_0xee743,'endIndex':_0xc0eb3f[_0x56c29e(0x107)]-_0xee743}:_0xc0eb3f[_0x56c29e(0x107)]>=_0x15fc29?{..._0xc0eb3f,'startIndex':_0xc0eb3f[_0x56c29e(0xea)]<_0x15fc29?_0xc0eb3f[_0x56c29e(0xea)]:_0x15fc29,'endIndex':Math[_0x56c29e(0x161)](_0x15fc29,_0xc0eb3f['endIndex']-_0xee743)}:_0xc0eb3f)[_0x56c29e(0x16c)](_0x5155f7=>_0x5155f7!=null);}function _0x528a(){const _0x44db8c=['clear','inline','docs-latex.config','@univerjs-pro/docs-latex','UniverDocsLatexPlugin','generateRandomId','symbol','ICommandService','setConfig','parse','selection','set','132147YagBBO','nextMetadata','max','prototype','UniverDocsPlugin','string','function','customRanges','_injector','forEach','getTextRanges','registerCommand','1164TqWlqK','filter','normalizeDocsLatexFormulaConfig','getOwnPropertyDescriptor','dataStream','univer-docs-latex-formula','sectionBreaks','pluginName','blockRanges','getUnitId','complete','docs-latex.command.update-formula','type','syncExecuteCommand','rangeId','startIndex','customDecorations','dispose','getUnit','CommandType','UNIVER_DOC','metadata','isHeaderFooterSelection','latex','1214537QrKDrl','next','registerPluginResource','textRuns','from','DOCS_LATEX_PLUGIN','482308xcNbru','deserialize','formulas','Document\x20body\x20is\x20required\x20to\x20insert\x20docs\x20latex\x20formulas.','Module','_resourceManagerService','deepClone','getInstance','isDocsLatexFormulaRange','JSONX','Inject','model','sort','reduce','endIndex','selectionManager','tables','unitId','849540ypzHXy','serialize','Tools','paragraphs','endOffset','_docsLatexModel','_configService','removeUnit','CustomRangeType','UniverLicensePlugin','object','documentData','Injector','_initResource','setFormula','Plugin','onStarting','4933530vJIoXe','columnGroups','_resources','customBlocks','getLatexFormulaPlaceholderText','DOCS_LATEX_CUSTOM_RANGE_KIND','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','compose','slice','CUSTOM','_setResource','normalizeDocsLatexMetadataResource','replaceOp','DependentOn','toStringTag','49084CQTIRF','body','iterator','UpdateDocsLatexFormulaCommand','UniverInstanceType','12zaMfLD','get','packageName','call','min','defineProperty','DOCS_LATEX_FORMULA_PLACEHOLDER','_config','DOC_LATEX_PLUGIN','length','commandService','cursorOffset','decorate','IResourceManagerService','previousDocumentData','_change$','every','InsertDocsLatexFormulaCommand','startOffset','toPrimitive','_commandService','default','properties','226948PXxnmt','map','defaultPluginConfig','docs-latex.command.insert-formula','nextDocumentData','COMMAND','368vUrfmG','add','asObservable','getFormula','delete','DocSelectionManagerService'];_0x528a=function(){return _0x44db8c;};return _0x528a();}function A(_0x4e4561){const _0x25b162=_0x5521bc;if(!_0x4e4561[_0x25b162(0x12c)])throw Error(_0x25b162(0xfc));return _0x4e4561[_0x25b162(0x12c)];}function j(_0x3d8685){const _0x1e7c30=_0x5521bc;return e[_0x1e7c30(0x10d)][_0x1e7c30(0xff)](_0x3d8685);}function M(_0x300a42){'@babel/helpers - typeof';const _0x3b7ba7=_0x5521bc;return M=typeof Symbol==_0x3b7ba7(0x165)&&typeof Symbol[_0x3b7ba7(0x12d)]==_0x3b7ba7(0x159)?function(_0x4d1dfb){return typeof _0x4d1dfb;}:function(_0x4db473){const _0x3e3526=_0x3b7ba7;return _0x4db473&&typeof Symbol==_0x3e3526(0x165)&&_0x4db473['constructor']===Symbol&&_0x4db473!==Symbol[_0x3e3526(0x162)]?'symbol':typeof _0x4db473;},M(_0x300a42);}function N(_0x35c6e3,_0x27c1a1){const _0xed6c44=_0x5521bc;if(M(_0x35c6e3)!=_0xed6c44(0x115)||!_0x35c6e3)return _0x35c6e3;var _0xafecd6=_0x35c6e3[Symbol[_0xed6c44(0x143)]];if(_0xafecd6!==void 0x0){var _0x37a717=_0xafecd6[_0xed6c44(0x133)](_0x35c6e3,_0x27c1a1||_0xed6c44(0x145));if(M(_0x37a717)!='object')return _0x37a717;throw TypeError(_0xed6c44(0x122));}return(_0x27c1a1===_0xed6c44(0x164)?String:Number)(_0x35c6e3);}function P(_0x4778b2){const _0x638a41=_0x5521bc;var _0x49e8ff=N(_0x4778b2,_0x638a41(0x164));return M(_0x49e8ff)=='symbol'?_0x49e8ff:_0x49e8ff+'';}function F(_0x1c7818,_0x11c40d,_0x143671){const _0x939338=_0x5521bc;return(_0x11c40d=P(_0x11c40d))in _0x1c7818?Object[_0x939338(0x135)](_0x1c7818,_0x11c40d,{'value':_0x143671,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1c7818[_0x11c40d]=_0x143671,_0x1c7818;}var I=class extends e['Disposable']{constructor(..._0x38e052){const _0x10af95=_0x5521bc;super(..._0x38e052),F(this,_0x10af95(0x11e),new Map()),F(this,_0x10af95(0x13f),new n['Subject']()),F(this,'change$',this['_change$'][_0x10af95(0x14f)]());}[_0x5521bc(0x150)](_0x1384ca,_0x5c0758){const _0x1146c9=_0x5521bc;return o(this['_resources'][_0x1146c9(0x131)](_0x1384ca))[_0x1146c9(0xfb)][_0x5c0758];}[_0x5521bc(0x119)](_0x7c4b64,_0x292113,_0x3d459f){const _0x447263=_0x5521bc;this[_0x447263(0x126)](_0x7c4b64,_0x292113,s(this[_0x447263(0x11e)][_0x447263(0x131)](_0x7c4b64),_0x292113,_0x3d459f));}['removeFormula'](_0x3f5c7d,_0x1322be){const _0x5a9f0c=_0x5521bc;this[_0x5a9f0c(0x126)](_0x3f5c7d,_0x1322be,c(this['_resources'][_0x5a9f0c(0x131)](_0x3f5c7d),_0x1322be));}[_0x5521bc(0x10c)](_0xf95194){const _0x324e60=_0x5521bc;return o(this[_0x324e60(0x11e)][_0x324e60(0x131)](_0xf95194));}[_0x5521bc(0xfa)](_0x133632,_0x34c254){const _0x44ef5e=_0x5521bc;this[_0x44ef5e(0x11e)]['set'](_0x133632,o(_0x34c254)),this[_0x44ef5e(0x13f)][_0x44ef5e(0xf4)]({'unitId':_0x133632});}[_0x5521bc(0x112)](_0x1f7355){const _0x55f5d5=_0x5521bc;this['_resources'][_0x55f5d5(0x151)](_0x1f7355),this['_change$'][_0x55f5d5(0xf4)]({'unitId':_0x1f7355});}[_0x5521bc(0xec)](){const _0x1bd3c7=_0x5521bc;super['dispose'](),this[_0x1bd3c7(0x11e)][_0x1bd3c7(0x153)](),this[_0x1bd3c7(0x13f)][_0x1bd3c7(0x175)]();}[_0x5521bc(0x126)](_0x7158d7,_0x2a0c88,_0x2d3405){const _0x3b3c2e=_0x5521bc;this[_0x3b3c2e(0x11e)][_0x3b3c2e(0x15e)](_0x7158d7,_0x2d3405),this[_0x3b3c2e(0x13f)][_0x3b3c2e(0xf4)]({'unitId':_0x7158d7,'rangeId':_0x2a0c88});}};const L={'id':_0x5521bc(0x14a),'type':e[_0x5521bc(0xee)][_0x5521bc(0x14c)],'handler':(_0x18f0d8,_0x3a4ab7)=>{const _0x21fd11=_0x5521bc;var _0x58ea77,_0x29fdb4;if(!(_0x3a4ab7!=null&&_0x3a4ab7[_0x21fd11(0xf2)]))return!0x1;let _0x239ae2=z(_0x18f0d8,_0x3a4ab7['unitId']);if(!_0x239ae2)return!0x1;let _0x46644e=(_0x58ea77=_0x3a4ab7[_0x21fd11(0x15d)])==null?B(_0x18f0d8):_0x58ea77;if((0x0,t[_0x21fd11(0xf1)])(_0x46644e))return!0x1;let _0x513cdf=V(_0x3a4ab7,_0x46644e),_0x55237e=u({'documentData':_0x239ae2[_0x21fd11(0x13e)],'endOffset':_0x513cdf==null?void 0x0:_0x513cdf[_0x21fd11(0x10f)],'latex':_0x3a4ab7[_0x21fd11(0xf2)],'metadata':_0x239ae2[_0x21fd11(0x104)][_0x21fd11(0x10c)](_0x239ae2[_0x21fd11(0x10a)]),'properties':_0x3a4ab7[_0x21fd11(0x146)],'rangeId':(_0x29fdb4=_0x3a4ab7[_0x21fd11(0xe9)])==null?(0x0,e[_0x21fd11(0x158)])(0x6):_0x29fdb4,'startOffset':_0x513cdf==null?void 0x0:_0x513cdf['startOffset']}),_0x5ce2dd=W(_0x239ae2[_0x21fd11(0x13a)],_0x239ae2['selectionManager'],_0x239ae2[_0x21fd11(0x10a)],_0x239ae2[_0x21fd11(0x13e)],_0x55237e[_0x21fd11(0x14b)],_0x55237e[_0x21fd11(0x13b)]);return _0x5ce2dd&&_0x55237e['nextMetadata']&&_0x239ae2[_0x21fd11(0x104)][_0x21fd11(0xfa)](_0x239ae2[_0x21fd11(0x10a)],_0x55237e[_0x21fd11(0x160)]),_0x5ce2dd;}},R={'id':_0x5521bc(0x176),'type':e[_0x5521bc(0xee)]['COMMAND'],'handler':(_0x2b2445,_0x3d00c6)=>{const _0x4844a3=_0x5521bc;if(!(_0x3d00c6!=null&&_0x3d00c6['rangeId'])||!_0x3d00c6[_0x4844a3(0xf2)])return!0x1;let _0x576c8b=z(_0x2b2445,_0x3d00c6[_0x4844a3(0x10a)]);if(!_0x576c8b)return!0x1;let _0x20c42b=d({'documentData':_0x576c8b[_0x4844a3(0x13e)],'latex':_0x3d00c6[_0x4844a3(0xf2)],'metadata':_0x576c8b[_0x4844a3(0x104)]['serialize'](_0x576c8b[_0x4844a3(0x10a)]),'properties':_0x3d00c6[_0x4844a3(0x146)],'rangeId':_0x3d00c6[_0x4844a3(0xe9)]});if(!_0x20c42b)return!0x1;let _0x414c86=W(_0x576c8b[_0x4844a3(0x13a)],_0x576c8b[_0x4844a3(0x108)],_0x576c8b[_0x4844a3(0x10a)],_0x576c8b[_0x4844a3(0x13e)],_0x20c42b[_0x4844a3(0x14b)],_0x20c42b[_0x4844a3(0x13b)]);return _0x414c86&&_0x20c42b['nextMetadata']&&_0x576c8b[_0x4844a3(0x104)]['deserialize'](_0x576c8b[_0x4844a3(0x10a)],_0x20c42b['nextMetadata']),_0x414c86;}};function z(_0x476511,_0x1242be){const _0x156036=_0x5521bc;let _0x5e3838=_0x476511['get'](e['IUniverInstanceService']),_0x3d814f=_0x1242be?_0x5e3838[_0x156036(0xed)](_0x1242be,e['UniverInstanceType'][_0x156036(0xef)]):_0x5e3838['getCurrentUnitOfType'](e['UniverInstanceType']['UNIVER_DOC']);return _0x3d814f?{'commandService':_0x476511[_0x156036(0x131)](e[_0x156036(0x15a)]),'model':_0x476511['get'](I),'previousDocumentData':_0x3d814f['getSnapshot'](),'selectionManager':_0x476511['get'](t[_0x156036(0x152)]),'unitId':_0x3d814f[_0x156036(0x174)]()}:null;}function B(_0xe05fab){const _0x20ecb6=_0x5521bc;var _0x1c20b1;return(_0x1c20b1=_0xe05fab[_0x20ecb6(0x131)](t[_0x20ecb6(0x152)])[_0x20ecb6(0x169)]())==null?void 0x0:_0x1c20b1[0x0];}function _0x5932(_0x2e360a,_0x286f3b){_0x2e360a=_0x2e360a-0xe9;const _0x528a23=_0x528a();let _0x593250=_0x528a23[_0x2e360a];return _0x593250;}function V(_0x5d6e73,_0xb48542){const _0x3cc1ed=_0x5521bc;var _0xddbcd8,_0x3d3fe4;let _0x497b8b=(_0xddbcd8=_0x5d6e73[_0x3cc1ed(0x142)])==null?_0xb48542==null?void 0x0:_0xb48542[_0x3cc1ed(0x142)]:_0xddbcd8,_0x5efda7=(_0x3d3fe4=_0x5d6e73[_0x3cc1ed(0x10f)])==null?_0xb48542==null?void 0x0:_0xb48542[_0x3cc1ed(0x10f)]:_0x3d3fe4;if(!(_0x497b8b==null||_0x5efda7==null))return{'endOffset':Math[_0x3cc1ed(0x161)](_0x497b8b,_0x5efda7),'startOffset':Math[_0x3cc1ed(0x134)](_0x497b8b,_0x5efda7)};}function H(_0x35f8e3,_0x4dfd8f){const _0x14db9b=_0x5521bc;var _0x15af9c,_0x240e2c,_0x26af8a,_0x46f970,_0x531fd9,_0x1ec65d,_0x5032d1,_0x2ed339,_0x133300,_0x5a9e10,_0x2aad07,_0xb0e9c2,_0x5aa6bc,_0x21af62,_0x400d87,_0x505838,_0x563f73,_0x5abbeb,_0x1ec378,_0x1a000b;let _0x395f1f=e['JSONX'][_0x14db9b(0x100)]();return[U(_0x395f1f,[_0x14db9b(0x12c),'dataStream'],(_0x15af9c=_0x35f8e3['body'])==null?void 0x0:_0x15af9c[_0x14db9b(0x16f)],(_0x240e2c=_0x4dfd8f['body'])==null?void 0x0:_0x240e2c['dataStream']),U(_0x395f1f,[_0x14db9b(0x12c),_0x14db9b(0x10e)],(_0x26af8a=_0x35f8e3[_0x14db9b(0x12c)])==null?void 0x0:_0x26af8a['paragraphs'],(_0x46f970=_0x4dfd8f['body'])==null?void 0x0:_0x46f970['paragraphs']),U(_0x395f1f,['body',_0x14db9b(0x171)],(_0x531fd9=_0x35f8e3[_0x14db9b(0x12c)])==null?void 0x0:_0x531fd9[_0x14db9b(0x171)],(_0x1ec65d=_0x4dfd8f[_0x14db9b(0x12c)])==null?void 0x0:_0x1ec65d[_0x14db9b(0x171)]),U(_0x395f1f,[_0x14db9b(0x12c),_0x14db9b(0xf6)],(_0x5032d1=_0x35f8e3[_0x14db9b(0x12c)])==null?void 0x0:_0x5032d1[_0x14db9b(0xf6)],(_0x2ed339=_0x4dfd8f[_0x14db9b(0x12c)])==null?void 0x0:_0x2ed339[_0x14db9b(0xf6)]),U(_0x395f1f,[_0x14db9b(0x12c),_0x14db9b(0x11f)],(_0x133300=_0x35f8e3[_0x14db9b(0x12c)])==null?void 0x0:_0x133300[_0x14db9b(0x11f)],(_0x5a9e10=_0x4dfd8f[_0x14db9b(0x12c)])==null?void 0x0:_0x5a9e10[_0x14db9b(0x11f)]),U(_0x395f1f,[_0x14db9b(0x12c),_0x14db9b(0x166)],(_0x2aad07=_0x35f8e3[_0x14db9b(0x12c)])==null?void 0x0:_0x2aad07[_0x14db9b(0x166)],(_0xb0e9c2=_0x4dfd8f[_0x14db9b(0x12c)])==null?void 0x0:_0xb0e9c2['customRanges']),U(_0x395f1f,['body',_0x14db9b(0xeb)],(_0x5aa6bc=_0x35f8e3['body'])==null?void 0x0:_0x5aa6bc[_0x14db9b(0xeb)],(_0x21af62=_0x4dfd8f['body'])==null?void 0x0:_0x21af62[_0x14db9b(0xeb)]),U(_0x395f1f,['body',_0x14db9b(0x109)],(_0x400d87=_0x35f8e3['body'])==null?void 0x0:_0x400d87[_0x14db9b(0x109)],(_0x505838=_0x4dfd8f[_0x14db9b(0x12c)])==null?void 0x0:_0x505838[_0x14db9b(0x109)]),U(_0x395f1f,[_0x14db9b(0x12c),_0x14db9b(0x11d)],(_0x563f73=_0x35f8e3[_0x14db9b(0x12c)])==null?void 0x0:_0x563f73[_0x14db9b(0x11d)],(_0x5abbeb=_0x4dfd8f[_0x14db9b(0x12c)])==null?void 0x0:_0x5abbeb[_0x14db9b(0x11d)]),U(_0x395f1f,['body',_0x14db9b(0x173)],(_0x1ec378=_0x35f8e3[_0x14db9b(0x12c)])==null?void 0x0:_0x1ec378['blockRanges'],(_0x1a000b=_0x4dfd8f[_0x14db9b(0x12c)])==null?void 0x0:_0x1a000b['blockRanges'])][_0x14db9b(0x16c)](Boolean)[_0x14db9b(0x106)]((_0x32742d,_0x35591e)=>e[_0x14db9b(0x102)][_0x14db9b(0x123)](_0x32742d,_0x35591e),null);}function U(_0x8a5ba2,_0x3579c9,_0x4d3d73,_0x5e5b7b){const _0x421e65=_0x5521bc;return e[_0x421e65(0x10d)]['diffValue'](_0x4d3d73,_0x5e5b7b)?null:_0x8a5ba2[_0x421e65(0x128)](_0x3579c9,_0x4d3d73,_0x5e5b7b);}function W(_0x3d76c0,_0x52ebdd,_0x1fbc4b,_0x3f5310,_0x1672b4,_0xcb96a){const _0x4d3e72=_0x5521bc;let _0x19df49=H(_0x3f5310,_0x1672b4);return _0x19df49?!!_0x3d76c0[_0x4d3e72(0x178)](t['RichTextEditingMutation']['id'],{'unitId':_0x1fbc4b,'actions':_0x19df49,'textRanges':[{'startOffset':_0xcb96a,'endOffset':_0xcb96a,'collapsed':!0x0}],'isEditing':!0x1}):(_0x52ebdd['replaceDocRanges']([{'startOffset':_0xcb96a,'endOffset':_0xcb96a}],{'unitId':_0x1fbc4b,'subUnitId':_0x1fbc4b},!0x1),!0x0);}const G=_0x5521bc(0x138),K=_0x5521bc(0x155),q={};var J=_0x5521bc(0x156),Y='1.0.0-insiders.20260707-70502d7';function X(_0x2ec917,_0x34bf3c){return function(_0x230495,_0x1f0d12){_0x34bf3c(_0x230495,_0x1f0d12,_0x2ec917);};}function Z(_0x35d9b6,_0x34ea25,_0x3a94e3,_0x194c6d){const _0x38ca94=_0x5521bc;var _0x4484ef=arguments[_0x38ca94(0x139)],_0x1f018c=_0x4484ef<0x3?_0x34ea25:_0x194c6d===null?_0x194c6d=Object[_0x38ca94(0x16e)](_0x34ea25,_0x3a94e3):_0x194c6d,_0x554ad3;if(typeof Reflect==_0x38ca94(0x115)&&typeof Reflect[_0x38ca94(0x13c)]==_0x38ca94(0x165))_0x1f018c=Reflect[_0x38ca94(0x13c)](_0x35d9b6,_0x34ea25,_0x3a94e3,_0x194c6d);else{for(var _0x1a11fd=_0x35d9b6[_0x38ca94(0x139)]-0x1;_0x1a11fd>=0x0;_0x1a11fd--)(_0x554ad3=_0x35d9b6[_0x1a11fd])&&(_0x1f018c=(_0x4484ef<0x3?_0x554ad3(_0x1f018c):_0x4484ef>0x3?_0x554ad3(_0x34ea25,_0x3a94e3,_0x1f018c):_0x554ad3(_0x34ea25,_0x3a94e3))||_0x1f018c);}return _0x4484ef>0x3&&_0x1f018c&&Object[_0x38ca94(0x135)](_0x34ea25,_0x3a94e3,_0x1f018c),_0x1f018c;}let Q=class extends e['Disposable']{constructor(_0x5dd516,_0x4dd3e0){const _0x42d610=_0x5521bc;super(),this[_0x42d610(0xfe)]=_0x5dd516,this[_0x42d610(0x110)]=_0x4dd3e0,this[_0x42d610(0x118)]();}[_0x5521bc(0x118)](){const _0x533f02=_0x5521bc;this['disposeWithMe'](this[_0x533f02(0xfe)][_0x533f02(0xf5)]({'pluginName':G,'businesses':[e[_0x533f02(0x12f)]['UNIVER_DOC']],'toJson':_0x2cbb79=>JSON['stringify'](this['_docsLatexModel'][_0x533f02(0x10c)](_0x2cbb79)),'parseJson':_0x213903=>o(JSON[_0x533f02(0x15c)](_0x213903)),'onLoad':(_0x3f529f,_0x44256a)=>this[_0x533f02(0x110)]['deserialize'](_0x3f529f,_0x44256a),'onUnLoad':_0x116b0f=>this[_0x533f02(0x110)][_0x533f02(0x112)](_0x116b0f)}));}};Q=Z([X(0x0,e[_0x5521bc(0x13d)]),X(0x1,(0x0,e[_0x5521bc(0x103)])(I))],Q);let $=class extends e[_0x5521bc(0x11a)]{constructor(_0x55e03e=q,_0x2a85c8,_0x1ee0e2,_0x511356){const _0x388f43=_0x5521bc;super(),this[_0x388f43(0x137)]=_0x55e03e,this[_0x388f43(0x167)]=_0x2a85c8,this[_0x388f43(0x144)]=_0x1ee0e2,this[_0x388f43(0x111)]=_0x511356;let {..._0x4ce68a}=(0x0,e['merge'])({},q,this[_0x388f43(0x137)]);this[_0x388f43(0x111)][_0x388f43(0x15b)](K,_0x4ce68a);}[_0x5521bc(0x11b)](){const _0x5416ba=_0x5521bc;this[_0x5416ba(0x167)][_0x5416ba(0x14e)]([I]),this[_0x5416ba(0x167)][_0x5416ba(0x14e)]([Q]),this[_0x5416ba(0x167)]['get'](I),this[_0x5416ba(0x167)][_0x5416ba(0x131)](Q),[L,R][_0x5416ba(0x168)](_0xe8e5c7=>this['disposeWithMe'](this['_commandService'][_0x5416ba(0x16a)](_0xe8e5c7)));}};F($,_0x5521bc(0x172),G),F($,_0x5521bc(0x132),J),F($,'version',Y),F($,_0x5521bc(0x177),e[_0x5521bc(0x12f)][_0x5521bc(0xef)]),$=Z([(0x0,e[_0x5521bc(0x129)])(r[_0x5521bc(0x114)],t[_0x5521bc(0x163)]),X(0x1,(0x0,e[_0x5521bc(0x103)])(e[_0x5521bc(0x117)])),X(0x2,e[_0x5521bc(0x15a)]),X(0x3,e['IConfigService'])],$),exports['DEFAULT_LATEX_FORMULA_PROPERTIES']=i,exports[_0x5521bc(0x121)]=l,exports[_0x5521bc(0x136)]='i',exports[_0x5521bc(0xf8)]=G,exports['DOCS_LATEX_PLUGIN_CONFIG_KEY']=K,exports['DocsLatexModel']=I,exports[_0x5521bc(0x141)]=L,Object['defineProperty'](exports,_0x5521bc(0x157),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x5521bc(0x12e)]=R,exports['buildInsertLatexFormulaActions']=u,exports['buildUpdateLatexFormulaActions']=d,exports[_0x5521bc(0x149)]=q,exports['getFormulaLatexFromRange']=f,exports[_0x5521bc(0x120)]=h,exports[_0x5521bc(0x101)]=p,exports[_0x5521bc(0x16d)]=a,exports[_0x5521bc(0x127)]=o;
|
package/lib/es/facade.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _0x2e1719=_0x3fb7;(function(_0x3e17ca,_0x18c22a){var _0x168605=_0x3fb7,_0x31dd12=_0x3e17ca();while(!![]){try{var _0x20967a=-parseInt(_0x168605(0x12b))/0x1+parseInt(_0x168605(0x135))/0x2*(-parseInt(_0x168605(0x136))/0x3)+parseInt(_0x168605(0x129))/0x4*(parseInt(_0x168605(0x14d))/0x5)+-parseInt(_0x168605(0x158))/0x6+parseInt(_0x168605(0x15a))/0x7+-parseInt(_0x168605(0x156))/0x8*(parseInt(_0x168605(0x159))/0x9)+parseInt(_0x168605(0x13c))/0xa*(parseInt(_0x168605(0x152))/0xb);if(_0x20967a===_0x18c22a)break;else _0x31dd12['push'](_0x31dd12['shift']());}catch(_0x4b12dc){_0x31dd12['push'](_0x31dd12['shift']());}}}(_0x13b7,0x506f5));import{DocsLatexModel as _0x39c016,InsertDocsLatexFormulaCommand as _0x5825ab,UpdateDocsLatexFormulaCommand as _0x3d6f89,getFormulaLatexFromRange as _0x10ce26,isDocsLatexFormulaRange as _0x262fc6,normalizeDocsLatexFormulaConfig as _0x5ca2eb}from'@univerjs-pro/docs-latex';import{ICommandService as _0x477e31,Inject as _0x20866c,Injector as _0x1712f8,generateRandomId as _0x110e22}from'@univerjs/core';import{FDocument as _0x102200}from'@univerjs/docs/facade';function d(_0x34ae0f){'@babel/helpers - typeof';var _0x22444d=_0x3fb7;return d=typeof Symbol==_0x22444d(0x137)&&typeof Symbol['iterator']==_0x22444d(0x15b)?function(_0x2d13e1){return typeof _0x2d13e1;}:function(_0xb99aa){var _0x5edba3=_0x22444d;return _0xb99aa&&typeof Symbol==_0x5edba3(0x137)&&_0xb99aa[_0x5edba3(0x14e)]===Symbol&&_0xb99aa!==Symbol[_0x5edba3(0x130)]?_0x5edba3(0x15b):typeof _0xb99aa;},d(_0x34ae0f);}function f(_0x195983,_0x4ad737){var _0x2d01fa=_0x3fb7;if(d(_0x195983)!='object'||!_0x195983)return _0x195983;var _0x44d694=_0x195983[Symbol[_0x2d01fa(0x13a)]];if(_0x44d694!==void 0x0){var _0x3a7994=_0x44d694['call'](_0x195983,_0x4ad737||_0x2d01fa(0x13f));if(d(_0x3a7994)!=_0x2d01fa(0x12d))return _0x3a7994;throw TypeError(_0x2d01fa(0x142));}return(_0x4ad737===_0x2d01fa(0x139)?String:Number)(_0x195983);}function _0x13b7(){var _0x57bb38=['getLatexFormulas','208918wSJluN','12CjAdoa','function','createInstance','string','toPrimitive','describe','101380UDUhcq','syncExecuteCommand','getConfig','default','rangeId','getRange','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_injector','body','getId','latex','decorate','defineProperty','_getCustomRange','some','_rangeId','includes','5dRQGSI','constructor','getFormula','extend','map','1133GqQXYe','getOwnPropertyDescriptor','findLatexFormulas','_document','12440DBKmch','_createFDocumentLatex','3870762EqMWtL','1143FDVXYZ','1524852syvLCc','symbol','getLatexFormulaAt','getLatexFormula','startIndex','save','customRanges','_unitId','update','dataStream','getLatex','find','1316572jcYulN','length','1284hzhcum','get','object','filter','_getLatexRanges','prototype','findLatexFormulaByText','_getDocumentData','endIndex'];_0x13b7=function(){return _0x57bb38;};return _0x13b7();}function _0x3fb7(_0x325c8a,_0x360a5a){_0x325c8a=_0x325c8a-0x125;var _0x13b711=_0x13b7();var _0x3fb70f=_0x13b711[_0x325c8a];return _0x3fb70f;}function p(_0x37eb3a){var _0x33c07b=_0x3fb7,_0x1cf336=f(_0x37eb3a,_0x33c07b(0x139));return d(_0x1cf336)==_0x33c07b(0x15b)?_0x1cf336:_0x1cf336+'';}function m(_0x43f80d,_0x11d363,_0x5d6530){var _0x569404=_0x3fb7;return(_0x11d363=p(_0x11d363))in _0x43f80d?Object[_0x569404(0x148)](_0x43f80d,_0x11d363,{'value':_0x5d6530,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x43f80d[_0x11d363]=_0x5d6530,_0x43f80d;}function h(_0x6ceccc,_0x337a33){return function(_0x3d3d4e,_0x148608){_0x337a33(_0x3d3d4e,_0x148608,_0x6ceccc);};}function g(_0x279ba2,_0x536553,_0x438118,_0x1ca9b0){var _0x50b9f7=_0x3fb7,_0x560fd1=arguments[_0x50b9f7(0x12a)],_0xf7d15a=_0x560fd1<0x3?_0x536553:_0x1ca9b0===null?_0x1ca9b0=Object[_0x50b9f7(0x153)](_0x536553,_0x438118):_0x1ca9b0,_0x11767b;if(typeof Reflect==_0x50b9f7(0x12d)&&typeof Reflect[_0x50b9f7(0x147)]==_0x50b9f7(0x137))_0xf7d15a=Reflect[_0x50b9f7(0x147)](_0x279ba2,_0x536553,_0x438118,_0x1ca9b0);else{for(var _0x567956=_0x279ba2[_0x50b9f7(0x12a)]-0x1;_0x567956>=0x0;_0x567956--)(_0x11767b=_0x279ba2[_0x567956])&&(_0xf7d15a=(_0x560fd1<0x3?_0x11767b(_0xf7d15a):_0x560fd1>0x3?_0x11767b(_0x536553,_0x438118,_0xf7d15a):_0x11767b(_0x536553,_0x438118))||_0xf7d15a);}return _0x560fd1>0x3&&_0xf7d15a&&Object[_0x50b9f7(0x148)](_0x536553,_0x438118,_0xf7d15a),_0xf7d15a;}let _=class{constructor(_0x917f7c,_0x5f4beb,_0x5aa10c){var _0x490c7d=_0x3fb7;this[_0x490c7d(0x155)]=_0x917f7c,this[_0x490c7d(0x14b)]=_0x5f4beb,this[_0x490c7d(0x143)]=_0x5aa10c,m(this,'_unitId',void 0x0),this[_0x490c7d(0x161)]=this[_0x490c7d(0x155)][_0x490c7d(0x145)]();}['getId'](){var _0x3b6a07=_0x3fb7;return this[_0x3b6a07(0x14b)];}[_0x2e1719(0x141)](){var _0x5da73a=_0x2e1719;let _0x49d809=this[_0x5da73a(0x149)]();return _0x49d809?{'endIndex':_0x49d809[_0x5da73a(0x133)],'rangeId':_0x49d809[_0x5da73a(0x140)],'startIndex':_0x49d809[_0x5da73a(0x15e)]}:null;}[_0x2e1719(0x127)](){var _0x5be2cd=_0x2e1719,_0x3258e3,_0x3b94db;let _0x2bc322=this['_getCustomRange'](),_0xca9979=(_0x3258e3=this[_0x5be2cd(0x132)]()['body'])==null?void 0x0:_0x3258e3[_0x5be2cd(0x126)];return!_0x2bc322||!_0xca9979?'':((_0x3b94db=this['_injector']['get'](_0x39c016)[_0x5be2cd(0x14f)](this[_0x5be2cd(0x161)],this[_0x5be2cd(0x14b)]))==null?void 0x0:_0x3b94db[_0x5be2cd(0x146)])||_0x10ce26(_0x2bc322,_0xca9979);}[_0x2e1719(0x13e)](){var _0x19cb59=_0x2e1719;let _0x4308a6=_0x5ca2eb(this[_0x19cb59(0x143)][_0x19cb59(0x12c)](_0x39c016)[_0x19cb59(0x14f)](this['_unitId'],this[_0x19cb59(0x14b)]));return _0x4308a6[_0x19cb59(0x146)]?_0x4308a6:{..._0x4308a6,'latex':this[_0x19cb59(0x127)]()};}[_0x2e1719(0x13b)](){var _0x21661c=_0x2e1719;let _0x2618f9=this[_0x21661c(0x141)]();return _0x2618f9?{..._0x2618f9,'config':this[_0x21661c(0x13e)](),'latex':this[_0x21661c(0x127)](),'type':'latex'}:null;}[_0x2e1719(0x125)](_0x23222e){var _0xfa498e=_0x2e1719;return this[_0xfa498e(0x143)][_0xfa498e(0x12c)](_0x477e31)[_0xfa498e(0x13d)](_0x3d6f89['id'],{'latex':_0x23222e[_0xfa498e(0x146)],'properties':_0x23222e['properties'],'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x2e1719(0x132)](){return this['_document']['save']();}['_getCustomRange'](){var _0x51731e=_0x2e1719,_0x7bdf3c;return(_0x7bdf3c=this[_0x51731e(0x132)]()[_0x51731e(0x144)])==null||(_0x7bdf3c=_0x7bdf3c[_0x51731e(0x160)])==null?void 0x0:_0x7bdf3c[_0x51731e(0x128)](_0x17236c=>_0x17236c[_0x51731e(0x140)]===this[_0x51731e(0x14b)]&&_0x262fc6(_0x17236c));}};_=g([h(0x2,_0x20866c(_0x1712f8))],_);var v=class extends _0x102200{[_0x2e1719(0x134)](){var _0x478bb7=_0x2e1719;return this[_0x478bb7(0x12f)]()[_0x478bb7(0x151)](_0x5bd187=>this[_0x478bb7(0x157)](_0x5bd187[_0x478bb7(0x140)]));}[_0x2e1719(0x15d)](_0x255533){var _0x230dd6=_0x2e1719;return this[_0x230dd6(0x12f)]()[_0x230dd6(0x14a)](_0x19ded0=>_0x19ded0[_0x230dd6(0x140)]===_0x255533)?this[_0x230dd6(0x157)](_0x255533):null;}[_0x2e1719(0x15c)](_0x12ae75){var _0x5fd448=_0x2e1719;let _0x8facdd=this[_0x5fd448(0x12f)]()[_0x5fd448(0x128)](_0x2e39c5=>_0x2e39c5[_0x5fd448(0x15e)]<=_0x12ae75&&_0x12ae75<=_0x2e39c5['endIndex']);return _0x8facdd?this['_createFDocumentLatex'](_0x8facdd[_0x5fd448(0x140)]):null;}[_0x2e1719(0x131)](_0x127b10){var _0x33539a;return(_0x33539a=this['findLatexFormulas'](_0x127b10)[0x0])==null?null:_0x33539a;}[_0x2e1719(0x154)](_0x1cd64f){var _0x2410fb=_0x2e1719;let _0x21c3a7=typeof _0x1cd64f==_0x2410fb(0x139)?{'latex':_0x1cd64f}:_0x1cd64f;return this[_0x2410fb(0x134)]()[_0x2410fb(0x12e)](_0x3e834a=>!(_0x21c3a7[_0x2410fb(0x140)]&&_0x3e834a['getId']()!==_0x21c3a7[_0x2410fb(0x140)]||_0x21c3a7['latex']&&!_0x3e834a['getLatex']()[_0x2410fb(0x14c)](_0x21c3a7[_0x2410fb(0x146)])));}['insertLatexFormula'](_0x507fb0){var _0x19e008=_0x2e1719,_0x1abb34;let _0x5cabe1=this[_0x19e008(0x143)]['get'](_0x477e31),_0x14999a=(_0x1abb34=_0x507fb0[_0x19e008(0x140)])==null?_0x110e22(0x6):_0x1abb34;return _0x5cabe1['syncExecuteCommand'](_0x5825ab['id'],{..._0x507fb0,'rangeId':_0x14999a,'unitId':this[_0x19e008(0x145)]()})?this['getLatexFormula'](_0x14999a):null;}[_0x2e1719(0x12f)](){var _0x3dd442=_0x2e1719,_0x1b40a9,_0x5b7e77;return(_0x1b40a9=(_0x5b7e77=this[_0x3dd442(0x15f)]()['body'])==null||(_0x5b7e77=_0x5b7e77[_0x3dd442(0x160)])==null?void 0x0:_0x5b7e77[_0x3dd442(0x12e)](_0x262fc6))==null?[]:_0x1b40a9;}[_0x2e1719(0x157)](_0x1eb2c0){var _0x21fc6b=_0x2e1719;return this['_injector'][_0x21fc6b(0x138)](_,this,_0x1eb2c0);}};_0x102200[_0x2e1719(0x150)](v);export{_ as FDocumentLatex};
|
package/lib/es/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x31cd75=_0x5276;(function(_0x3b6408,_0x4124db){const _0x2542f6=_0x5276,_0x244c57=_0x3b6408();while(!![]){try{const _0xfa503a=parseInt(_0x2542f6(0xcc))/0x1+parseInt(_0x2542f6(0xb1))/0x2+parseInt(_0x2542f6(0xd7))/0x3*(-parseInt(_0x2542f6(0xde))/0x4)+-parseInt(_0x2542f6(0xbc))/0x5+-parseInt(_0x2542f6(0xb2))/0x6+parseInt(_0x2542f6(0xf8))/0x7*(parseInt(_0x2542f6(0xdc))/0x8)+parseInt(_0x2542f6(0xce))/0x9;if(_0xfa503a===_0x4124db)break;else _0x244c57['push'](_0x244c57['shift']());}catch(_0x1abc67){_0x244c57['push'](_0x244c57['shift']());}}}(_0x10ed,0xdea7e));import{CommandType as _0x2720a4,CustomRangeType as _0x1f013e,DataStreamTreeTokenType as _0x3cf9ca,DependentOn as _0x8014fe,Disposable as _0x49f979,ICommandService as _0xf742fc,IConfigService as _0x19a7db,IResourceManagerService as _0x2dc1cc,IUniverInstanceService as _0xdb8d92,Inject as _0xc98c3c,Injector as _0x12e076,JSONX as _0x5f56bc,Plugin as _0x5bb7d3,Tools as _0x532491,UniverInstanceType as _0x21d30e,generateRandomId as _0x31c479,merge as _0x561e0d}from'@univerjs/core';function _0x5276(_0x613e1,_0x549c11){_0x613e1=_0x613e1-0xa6;const _0x10edaa=_0x10ed();let _0x527678=_0x10edaa[_0x613e1];return _0x527678;}import{DocSelectionManagerService as _0x3abd32,RichTextEditingMutation as _0x259164,UniverDocsPlugin as _0x5a7af5,isHeaderFooterSelection as _0x4484ee}from'@univerjs/docs';import{Subject as _0x1d6d30}from'rxjs';import{UniverLicensePlugin as _0x49963d}from'@univerjs-pro/license';const C={'displayMode':_0x31cd75(0xad),'kind':'inline'};function w(_0x193800){return{...C,'latex':'',..._0x193800};}function T(_0x12fe2b){const _0x2d033c=_0x31cd75;var _0x409c0f;let _0x41061d=(_0x409c0f=_0x12fe2b==null?void 0x0:_0x12fe2b['formulas'])==null?{}:_0x409c0f;return{'formulas':Object[_0x2d033c(0xe6)](Object[_0x2d033c(0x118)](_0x41061d)[_0x2d033c(0xb3)](([_0x4068b4,_0x2ae4d1])=>[_0x4068b4,w(_0x2ae4d1)]))};}function E(_0x20cd54,_0x317cd7,_0x4986ad){const _0x23725d=_0x31cd75;let _0x402948=T(_0x20cd54);return _0x402948['formulas'][_0x317cd7]=w({..._0x402948[_0x23725d(0xc6)][_0x317cd7],..._0x4986ad}),_0x402948;}function ee(_0x2f63f0,_0x3ed944){const _0x27f1ac=_0x31cd75;let _0x4d5200=T(_0x2f63f0);return delete _0x4d5200[_0x27f1ac(0xc6)][_0x3ed944],_0x4d5200;}const te='univer-docs-latex-formula',ne='i';function D(_0x3e545b){const _0x2a6263=_0x31cd75;var _0x59e421;let _0x9d31ca=R(_0x3e545b['documentData']),_0x3f1687=L(_0x9d31ca),{startOffset:_0x299b6c,endOffset:_0x52e8b3}=oe(_0x3f1687,_0x3e545b['startOffset'],_0x3e545b[_0x2a6263(0xa6)]),_0x356f99=E(_0x3e545b[_0x2a6263(0x10c)],_0x3e545b[_0x2a6263(0xc2)],{...C,..._0x3e545b[_0x2a6263(0x102)],'latex':_0x3e545b[_0x2a6263(0xda)]}),_0x25ecfc=j();return M(_0x3f1687,_0x299b6c,_0x52e8b3,_0x25ecfc),ae(_0x3f1687,_0x299b6c,_0x299b6c+_0x25ecfc[_0x2a6263(0xd6)]-0x1,_0x3e545b['rangeId']),_0x3f1687[_0x2a6263(0xee)]=[...(_0x59e421=_0x3f1687['customRanges'])==null?[]:_0x59e421,A(_0x3e545b[_0x2a6263(0xc2)],_0x299b6c,_0x25ecfc[_0x2a6263(0xd6)])]['sort']((_0x1f7912,_0x24ad50)=>_0x1f7912[_0x2a6263(0x104)]-_0x24ad50[_0x2a6263(0x104)]),{'nextDocumentData':_0x9d31ca,'nextMetadata':_0x356f99,'cursorOffset':_0x299b6c+_0x25ecfc['length']};}function O(_0x4f78a4){const _0x22114b=_0x31cd75;var _0x34605e,_0x55f972,_0x23cc54;let _0x44175e=R(_0x4f78a4['documentData']),_0x5bffbd=L(_0x44175e),_0x2627f8=(_0x34605e=_0x5bffbd[_0x22114b(0xee)])==null?void 0x0:_0x34605e[_0x22114b(0xdf)](_0x154952=>_0x154952[_0x22114b(0xc2)]===_0x4f78a4[_0x22114b(0xc2)]&&k(_0x154952));if(!_0x2627f8)return null;let _0x3ea7e7=_0x2627f8[_0x22114b(0x104)],_0x15fd4f=j();return M(_0x5bffbd,_0x2627f8[_0x22114b(0x104)],_0x2627f8[_0x22114b(0xff)]+0x1,_0x15fd4f),_0x5bffbd[_0x22114b(0xee)]=[...(_0x55f972=(_0x23cc54=_0x5bffbd['customRanges'])==null?void 0x0:_0x23cc54[_0x22114b(0xbe)](_0x3985f2=>_0x3985f2['rangeId']!==_0x4f78a4['rangeId']))==null?[]:_0x55f972,A(_0x4f78a4[_0x22114b(0xc2)],_0x3ea7e7,_0x15fd4f['length'])]['sort']((_0x5ef1e5,_0x181169)=>_0x5ef1e5[_0x22114b(0x104)]-_0x181169[_0x22114b(0x104)]),{'nextDocumentData':_0x44175e,'nextMetadata':E(_0x4f78a4[_0x22114b(0x10c)],_0x4f78a4[_0x22114b(0xc2)],{..._0x4f78a4['properties'],'latex':_0x4f78a4[_0x22114b(0xda)]}),'cursorOffset':_0x3ea7e7+_0x15fd4f['length']};}function re(_0x2e9b10,_0x1fa709){if(!k(_0x2e9b10))return'';let _0xd0f168=_0x1fa709['slice'](_0x2e9b10['startIndex'],_0x2e9b10['endIndex']+0x1);return ie(_0xd0f168)?'':_0xd0f168;}function k(_0x15f1f9){const _0x1d586a=_0x31cd75;var _0x22a7fd;return(_0x15f1f9==null?void 0x0:_0x15f1f9[_0x1d586a(0xa7)])===_0x1f013e['CUSTOM']&&((_0x22a7fd=_0x15f1f9[_0x1d586a(0x102)])==null?void 0x0:_0x22a7fd[_0x1d586a(0xe5)])===_0x1d586a(0xb8);}function A(_0x5be034,_0x142db2,_0x2ccc72){const _0x40c8eb=_0x31cd75;return{'startIndex':_0x142db2,'endIndex':_0x142db2+Math[_0x40c8eb(0xcd)](0x0,_0x2ccc72-0x1),'rangeId':_0x5be034,'rangeType':_0x1f013e[_0x40c8eb(0xc5)],'wholeEntity':!0x0,'properties':{'kind':te}};}function j(){return'i';}function ie(_0x51b961){const _0x35208e=_0x31cd75;return _0x51b961[_0x35208e(0xd6)]>0x0&&Array[_0x35208e(0x112)](_0x51b961)[_0x35208e(0x10e)](_0x3dc24c=>_0x3dc24c==='i');}function ae(_0x1133ff,_0x1e04ec,_0x291be5,_0x593c8b){const _0x30c0d7=_0x31cd75;var _0x1d13a9;_0x1133ff[_0x30c0d7(0xee)]=(_0x1d13a9=_0x1133ff[_0x30c0d7(0xee)])==null?void 0x0:_0x1d13a9[_0x30c0d7(0xbe)](_0x34d3bc=>_0x34d3bc[_0x30c0d7(0xc2)]===_0x593c8b||!k(_0x34d3bc)?!0x0:_0x34d3bc[_0x30c0d7(0xff)]<_0x1e04ec||_0x34d3bc[_0x30c0d7(0x104)]>_0x291be5);}function oe(_0x23abd3,_0x45bbce,_0xd8a9e6){const _0x29c615=_0x31cd75;let _0x31780b=ce(_0x23abd3),_0x21a899=_0x45bbce==null?_0x31780b:_0x45bbce,_0x49e9bc=_0xd8a9e6==null?_0x21a899:_0xd8a9e6;return{'startOffset':se(Math[_0x29c615(0x103)](_0x21a899,_0x49e9bc),_0x31780b),'endOffset':se(Math[_0x29c615(0xcd)](_0x21a899,_0x49e9bc),_0x31780b)};}function se(_0x5eabd8,_0x4007af){const _0x437c56=_0x31cd75;return Math['max'](0x0,Math[_0x437c56(0x103)](_0x5eabd8,_0x4007af));}function ce(_0x236a12){const _0x317a66=_0x31cd75;return _0x236a12['dataStream']['endsWith'](_0x3cf9ca[_0x317a66(0xd1)])?Math['max'](0x0,_0x236a12['dataStream']['length']-0x1):_0x236a12['dataStream'][_0x317a66(0xd6)];}function M(_0x45f207,_0x5afc99,_0x471219,_0x88cd73){_0x471219>_0x5afc99&&ue(_0x45f207,_0x5afc99,_0x471219),le(_0x45f207,_0x5afc99,_0x88cd73);}function le(_0x3eb50b,_0x446c52,_0x12aa83){const _0x35f48d=_0x31cd75;_0x12aa83&&(_0x3eb50b['dataStream']=''+_0x3eb50b[_0x35f48d(0xe8)][_0x35f48d(0xf7)](0x0,_0x446c52)+_0x12aa83+_0x3eb50b[_0x35f48d(0xe8)][_0x35f48d(0xf7)](_0x446c52),de(_0x3eb50b,_0x446c52,_0x12aa83[_0x35f48d(0xd6)]));}function ue(_0x391c42,_0x356b74,_0x3da9c1){const _0x3f30db=_0x31cd75;let _0x2cc940=_0x3da9c1-_0x356b74;_0x391c42[_0x3f30db(0xe8)]=''+_0x391c42[_0x3f30db(0xe8)][_0x3f30db(0xf7)](0x0,_0x356b74)+_0x391c42[_0x3f30db(0xe8)][_0x3f30db(0xf7)](_0x3da9c1),fe(_0x391c42,_0x356b74,_0x2cc940);}function de(_0x414325,_0x4ee105,_0x3df437){const _0x30f815=_0x31cd75;_0x414325['paragraphs']=N(_0x414325['paragraphs'],_0x4ee105,_0x3df437),_0x414325[_0x30f815(0x100)]=N(_0x414325['sectionBreaks'],_0x4ee105,_0x3df437),_0x414325[_0x30f815(0xfa)]=N(_0x414325[_0x30f815(0xfa)],_0x4ee105,_0x3df437),_0x414325[_0x30f815(0xf2)]=pe(_0x414325[_0x30f815(0xf2)],_0x4ee105,_0x3df437),_0x414325[_0x30f815(0xbb)]=F(_0x414325[_0x30f815(0xbb)],_0x4ee105,_0x3df437),_0x414325[_0x30f815(0x105)]=F(_0x414325[_0x30f815(0x105)],_0x4ee105,_0x3df437),_0x414325['customRanges']=F(_0x414325[_0x30f815(0xee)],_0x4ee105,_0x3df437),_0x414325['customDecorations']=F(_0x414325[_0x30f815(0xc8)],_0x4ee105,_0x3df437),_0x414325['blockRanges']=F(_0x414325[_0x30f815(0xa9)],_0x4ee105,_0x3df437);}function fe(_0x3889ee,_0x6fb92f,_0x13da13){const _0x4b16eb=_0x31cd75;var _0x235eb2,_0x10d0ed;_0x3889ee[_0x4b16eb(0xb9)]=P(_0x3889ee['paragraphs'],_0x6fb92f,_0x13da13),_0x3889ee[_0x4b16eb(0x100)]=P(_0x3889ee[_0x4b16eb(0x100)],_0x6fb92f,_0x13da13),_0x3889ee['customBlocks']=P(_0x3889ee[_0x4b16eb(0xfa)],_0x6fb92f,_0x13da13),_0x3889ee[_0x4b16eb(0xf2)]=(_0x235eb2=I((_0x10d0ed=_0x3889ee['textRuns'])==null?void 0x0:_0x10d0ed[_0x4b16eb(0xb3)](_0x5082d0=>({..._0x5082d0,'startIndex':_0x5082d0['st'],'endIndex':_0x5082d0['ed']})),_0x6fb92f,_0x13da13))==null?void 0x0:_0x235eb2[_0x4b16eb(0xb3)](_0x396d3d=>{let {startIndex:_0xeacd3,endIndex:_0x1f5682,..._0x5e6968}=_0x396d3d;return{..._0x5e6968,'st':_0xeacd3,'ed':_0x1f5682};}),_0x3889ee[_0x4b16eb(0xbb)]=I(_0x3889ee[_0x4b16eb(0xbb)],_0x6fb92f,_0x13da13),_0x3889ee[_0x4b16eb(0x105)]=I(_0x3889ee['columnGroups'],_0x6fb92f,_0x13da13),_0x3889ee['customRanges']=I(_0x3889ee[_0x4b16eb(0xee)],_0x6fb92f,_0x13da13),_0x3889ee[_0x4b16eb(0xc8)]=I(_0x3889ee['customDecorations'],_0x6fb92f,_0x13da13),_0x3889ee['blockRanges']=I(_0x3889ee[_0x4b16eb(0xa9)],_0x6fb92f,_0x13da13);}function N(_0x3d15e8,_0x239633,_0xe7b860){const _0x20886c=_0x31cd75;return _0x3d15e8==null?void 0x0:_0x3d15e8[_0x20886c(0xb3)](_0x2c688d=>_0x2c688d[_0x20886c(0x104)]>=_0x239633?{..._0x2c688d,'startIndex':_0x2c688d[_0x20886c(0x104)]+_0xe7b860}:_0x2c688d);}function P(_0x465294,_0x5b5593,_0x17c709){const _0x5d84a8=_0x31cd75;let _0x35d580=_0x5b5593+_0x17c709;return _0x465294==null?void 0x0:_0x465294[_0x5d84a8(0xb3)](_0x1bc940=>_0x1bc940[_0x5d84a8(0x104)]>=_0x5b5593&&_0x1bc940[_0x5d84a8(0x104)]<_0x35d580?null:_0x1bc940['startIndex']>=_0x35d580?{..._0x1bc940,'startIndex':_0x1bc940[_0x5d84a8(0x104)]-_0x17c709}:_0x1bc940)[_0x5d84a8(0xbe)](_0x4ca26a=>_0x4ca26a!=null);}function pe(_0x230382,_0x1b5242,_0x111dbb){const _0xc2ff4b=_0x31cd75;return _0x230382==null?void 0x0:_0x230382[_0xc2ff4b(0xb3)](_0xdf7024=>_0xdf7024['st']>=_0x1b5242?{..._0xdf7024,'st':_0xdf7024['st']+_0x111dbb,'ed':_0xdf7024['ed']+_0x111dbb}:_0xdf7024['ed']>_0x1b5242?{..._0xdf7024,'ed':_0xdf7024['ed']+_0x111dbb}:_0xdf7024);}function F(_0x4b54bc,_0x21c017,_0x2602ae){const _0x530acd=_0x31cd75;return _0x4b54bc==null?void 0x0:_0x4b54bc[_0x530acd(0xb3)](_0x175c1f=>_0x175c1f['startIndex']>=_0x21c017?{..._0x175c1f,'startIndex':_0x175c1f[_0x530acd(0x104)]+_0x2602ae,'endIndex':_0x175c1f[_0x530acd(0xff)]+_0x2602ae}:_0x175c1f[_0x530acd(0xff)]>=_0x21c017?{..._0x175c1f,'endIndex':_0x175c1f[_0x530acd(0xff)]+_0x2602ae}:_0x175c1f);}function I(_0x59be12,_0x1a8ec8,_0x40049c){const _0x2cf7b6=_0x31cd75;let _0x3eb45a=_0x1a8ec8+_0x40049c;return _0x59be12==null?void 0x0:_0x59be12[_0x2cf7b6(0xb3)](_0x2d8ff7=>_0x2d8ff7[_0x2cf7b6(0x104)]>=_0x1a8ec8&&_0x2d8ff7[_0x2cf7b6(0xff)]<_0x3eb45a?null:_0x2d8ff7[_0x2cf7b6(0x104)]>=_0x3eb45a?{..._0x2d8ff7,'startIndex':_0x2d8ff7[_0x2cf7b6(0x104)]-_0x40049c,'endIndex':_0x2d8ff7[_0x2cf7b6(0xff)]-_0x40049c}:_0x2d8ff7['endIndex']>=_0x1a8ec8?{..._0x2d8ff7,'startIndex':_0x2d8ff7['startIndex']<_0x1a8ec8?_0x2d8ff7[_0x2cf7b6(0x104)]:_0x1a8ec8,'endIndex':Math[_0x2cf7b6(0xcd)](_0x1a8ec8,_0x2d8ff7[_0x2cf7b6(0xff)]-_0x40049c)}:_0x2d8ff7)[_0x2cf7b6(0xbe)](_0x2408bc=>_0x2408bc!=null);}function L(_0x31f395){const _0x5b1930=_0x31cd75;if(!_0x31f395[_0x5b1930(0xec)])throw Error(_0x5b1930(0x119));return _0x31f395[_0x5b1930(0xec)];}function R(_0x370a90){const _0xa428=_0x31cd75;return _0x532491[_0xa428(0x10a)](_0x370a90);}function z(_0x206cf6){'@babel/helpers - typeof';const _0xc96d0e=_0x31cd75;return z=typeof Symbol==_0xc96d0e(0xd5)&&typeof Symbol['iterator']==_0xc96d0e(0xbd)?function(_0x421b11){return typeof _0x421b11;}:function(_0xacbcb7){const _0x597dc7=_0xc96d0e;return _0xacbcb7&&typeof Symbol==_0x597dc7(0xd5)&&_0xacbcb7[_0x597dc7(0x10b)]===Symbol&&_0xacbcb7!==Symbol[_0x597dc7(0xf1)]?'symbol':typeof _0xacbcb7;},z(_0x206cf6);}function me(_0xdbedda,_0x20014f){const _0x4f9be1=_0x31cd75;if(z(_0xdbedda)!=_0x4f9be1(0x110)||!_0xdbedda)return _0xdbedda;var _0x58b573=_0xdbedda[Symbol[_0x4f9be1(0xc0)]];if(_0x58b573!==void 0x0){var _0x293f5c=_0x58b573[_0x4f9be1(0xef)](_0xdbedda,_0x20014f||_0x4f9be1(0x111));if(z(_0x293f5c)!=_0x4f9be1(0x110))return _0x293f5c;throw TypeError(_0x4f9be1(0xcf));}return(_0x20014f===_0x4f9be1(0xfe)?String:Number)(_0xdbedda);}function he(_0x2c2700){const _0x2dcad1=_0x31cd75;var _0x2af7f8=me(_0x2c2700,_0x2dcad1(0xfe));return z(_0x2af7f8)==_0x2dcad1(0xbd)?_0x2af7f8:_0x2af7f8+'';}function _0x10ed(){const _0x341ac2=['endOffset','rangeType','type','blockRanges','reduce','change$','removeUnit','inline','_commandService','cursorOffset','@univerjs-pro/docs-latex','1810922PJoYJJ','3636012vIjXfg','map','pluginName','_injector','delete','deserialize','univer-docs-latex-formula','paragraphs','dispose','tables','7586290utLufS','symbol','filter','serialize','toPrimitive','nextMetadata','rangeId','getSnapshot','set','CUSTOM','formulas','add','customDecorations','COMMAND','getFormula','_change$','1303220CnPkoU','max','4679838XJriFH','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','syncExecuteCommand','SECTION_BREAK','getCurrentUnitOfType','getTextRanges','docs-latex.command.insert-formula','function','length','3gexGvr','decorate','asObservable','latex','commandService','5496bSaesd','docs-latex.config','5621636NCJBpq','find','_resourceManagerService','getUnitId','registerPluginResource','replaceOp','defineProperty','kind','fromEntries','setFormula','dataStream','_setResource','unitId','registerCommand','body','parse','customRanges','call','clear','prototype','textRuns','replaceDocRanges','selection','_docsLatexModel','disposeWithMe','slice','17444cpgrgj','diffValue','customBlocks','packageName','_configService','startOffset','string','endIndex','sectionBreaks','setConfig','properties','min','startIndex','columnGroups','1.0.0-insiders.20260707-70502d7','model','previousDocumentData','get','deepClone','constructor','metadata','UNIVER_DOC','every','nextDocumentData','object','default','from','_resources','getInstance','compose','removeFormula','_initResource','entries','Document\x20body\x20is\x20required\x20to\x20insert\x20docs\x20latex\x20formulas.','DOC_LATEX_PLUGIN'];_0x10ed=function(){return _0x341ac2;};return _0x10ed();}function B(_0x39b045,_0xe11c9e,_0x41135a){const _0x585391=_0x31cd75;return(_0xe11c9e=he(_0xe11c9e))in _0x39b045?Object[_0x585391(0xe4)](_0x39b045,_0xe11c9e,{'value':_0x41135a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x39b045[_0xe11c9e]=_0x41135a,_0x39b045;}var V=class extends _0x49f979{constructor(..._0x2aefdf){const _0x4364b0=_0x31cd75;super(..._0x2aefdf),B(this,_0x4364b0(0x113),new Map()),B(this,_0x4364b0(0xcb),new _0x1d6d30()),B(this,_0x4364b0(0xab),this[_0x4364b0(0xcb)][_0x4364b0(0xd9)]());}[_0x31cd75(0xca)](_0x4804d6,_0x3ea0bb){const _0x3e1af8=_0x31cd75;return T(this['_resources'][_0x3e1af8(0x109)](_0x4804d6))['formulas'][_0x3ea0bb];}[_0x31cd75(0xe7)](_0x39feb1,_0x207c1c,_0x5ad61d){const _0x13017c=_0x31cd75;this[_0x13017c(0xe9)](_0x39feb1,_0x207c1c,E(this['_resources'][_0x13017c(0x109)](_0x39feb1),_0x207c1c,_0x5ad61d));}[_0x31cd75(0x116)](_0xf2d896,_0x16d54d){const _0x4cde32=_0x31cd75;this[_0x4cde32(0xe9)](_0xf2d896,_0x16d54d,ee(this[_0x4cde32(0x113)][_0x4cde32(0x109)](_0xf2d896),_0x16d54d));}[_0x31cd75(0xbf)](_0x372478){const _0x1d2f1e=_0x31cd75;return T(this[_0x1d2f1e(0x113)][_0x1d2f1e(0x109)](_0x372478));}[_0x31cd75(0xb7)](_0x10c06c,_0x37c1ac){const _0x5d0f23=_0x31cd75;this[_0x5d0f23(0x113)][_0x5d0f23(0xc4)](_0x10c06c,T(_0x37c1ac)),this[_0x5d0f23(0xcb)]['next']({'unitId':_0x10c06c});}[_0x31cd75(0xac)](_0x444def){const _0x335be3=_0x31cd75;this[_0x335be3(0x113)][_0x335be3(0xb6)](_0x444def),this[_0x335be3(0xcb)]['next']({'unitId':_0x444def});}[_0x31cd75(0xba)](){const _0x5e9eec=_0x31cd75;super[_0x5e9eec(0xba)](),this[_0x5e9eec(0x113)][_0x5e9eec(0xf0)](),this[_0x5e9eec(0xcb)]['complete']();}[_0x31cd75(0xe9)](_0xf444a0,_0x513786,_0x17f6b3){const _0x230454=_0x31cd75;this[_0x230454(0x113)][_0x230454(0xc4)](_0xf444a0,_0x17f6b3),this['_change$']['next']({'unitId':_0xf444a0,'rangeId':_0x513786});}};const H={'id':_0x31cd75(0xd4),'type':_0x2720a4[_0x31cd75(0xc9)],'handler':(_0x302342,_0x106555)=>{const _0x338782=_0x31cd75;var _0x10c705,_0x2978cb;if(!(_0x106555!=null&&_0x106555['latex']))return!0x1;let _0x5ea2f0=W(_0x302342,_0x106555[_0x338782(0xea)]);if(!_0x5ea2f0)return!0x1;let _0x54de49=(_0x10c705=_0x106555[_0x338782(0xf4)])==null?ge(_0x302342):_0x10c705;if(_0x4484ee(_0x54de49))return!0x1;let _0x56bbf8=_e(_0x106555,_0x54de49),_0x1a5d24=D({'documentData':_0x5ea2f0[_0x338782(0x108)],'endOffset':_0x56bbf8==null?void 0x0:_0x56bbf8[_0x338782(0xa6)],'latex':_0x106555[_0x338782(0xda)],'metadata':_0x5ea2f0[_0x338782(0x107)]['serialize'](_0x5ea2f0[_0x338782(0xea)]),'properties':_0x106555[_0x338782(0x102)],'rangeId':(_0x2978cb=_0x106555['rangeId'])==null?_0x31c479(0x6):_0x2978cb,'startOffset':_0x56bbf8==null?void 0x0:_0x56bbf8[_0x338782(0xfd)]}),_0x219710=K(_0x5ea2f0[_0x338782(0xdb)],_0x5ea2f0['selectionManager'],_0x5ea2f0['unitId'],_0x5ea2f0[_0x338782(0x108)],_0x1a5d24[_0x338782(0x10f)],_0x1a5d24['cursorOffset']);return _0x219710&&_0x1a5d24[_0x338782(0xc1)]&&_0x5ea2f0[_0x338782(0x107)][_0x338782(0xb7)](_0x5ea2f0[_0x338782(0xea)],_0x1a5d24['nextMetadata']),_0x219710;}},U={'id':'docs-latex.command.update-formula','type':_0x2720a4[_0x31cd75(0xc9)],'handler':(_0x167724,_0x201fb8)=>{const _0x401896=_0x31cd75;if(!(_0x201fb8!=null&&_0x201fb8[_0x401896(0xc2)])||!_0x201fb8[_0x401896(0xda)])return!0x1;let _0x5f4471=W(_0x167724,_0x201fb8['unitId']);if(!_0x5f4471)return!0x1;let _0x26a064=O({'documentData':_0x5f4471['previousDocumentData'],'latex':_0x201fb8[_0x401896(0xda)],'metadata':_0x5f4471['model'][_0x401896(0xbf)](_0x5f4471[_0x401896(0xea)]),'properties':_0x201fb8[_0x401896(0x102)],'rangeId':_0x201fb8[_0x401896(0xc2)]});if(!_0x26a064)return!0x1;let _0x137538=K(_0x5f4471['commandService'],_0x5f4471['selectionManager'],_0x5f4471[_0x401896(0xea)],_0x5f4471['previousDocumentData'],_0x26a064[_0x401896(0x10f)],_0x26a064[_0x401896(0xaf)]);return _0x137538&&_0x26a064[_0x401896(0xc1)]&&_0x5f4471[_0x401896(0x107)][_0x401896(0xb7)](_0x5f4471[_0x401896(0xea)],_0x26a064[_0x401896(0xc1)]),_0x137538;}};function W(_0x1064db,_0x5da762){const _0x4a0c4e=_0x31cd75;let _0x402b15=_0x1064db[_0x4a0c4e(0x109)](_0xdb8d92),_0x44ac32=_0x5da762?_0x402b15['getUnit'](_0x5da762,_0x21d30e[_0x4a0c4e(0x10d)]):_0x402b15[_0x4a0c4e(0xd2)](_0x21d30e['UNIVER_DOC']);return _0x44ac32?{'commandService':_0x1064db[_0x4a0c4e(0x109)](_0xf742fc),'model':_0x1064db['get'](V),'previousDocumentData':_0x44ac32[_0x4a0c4e(0xc3)](),'selectionManager':_0x1064db[_0x4a0c4e(0x109)](_0x3abd32),'unitId':_0x44ac32[_0x4a0c4e(0xe1)]()}:null;}function ge(_0x510bb0){const _0x308079=_0x31cd75;var _0x3141ad;return(_0x3141ad=_0x510bb0[_0x308079(0x109)](_0x3abd32)[_0x308079(0xd3)]())==null?void 0x0:_0x3141ad[0x0];}function _e(_0x136ec7,_0x48168d){const _0x2c0dc0=_0x31cd75;var _0x3c640d,_0x4c9449;let _0x36ad1b=(_0x3c640d=_0x136ec7[_0x2c0dc0(0xfd)])==null?_0x48168d==null?void 0x0:_0x48168d[_0x2c0dc0(0xfd)]:_0x3c640d,_0x89b213=(_0x4c9449=_0x136ec7[_0x2c0dc0(0xa6)])==null?_0x48168d==null?void 0x0:_0x48168d[_0x2c0dc0(0xa6)]:_0x4c9449;if(!(_0x36ad1b==null||_0x89b213==null))return{'endOffset':Math[_0x2c0dc0(0xcd)](_0x36ad1b,_0x89b213),'startOffset':Math[_0x2c0dc0(0x103)](_0x36ad1b,_0x89b213)};}function ve(_0xd6322d,_0x2d1b16){const _0x3a74cf=_0x31cd75;var _0x38f0e0,_0x494cfb,_0x1b7adf,_0x1cf992,_0x21b435,_0x3dca00,_0x29e0a2,_0x346022,_0x486eb6,_0x26118f,_0x20b479,_0x40fdca,_0x55220c,_0x560687,_0x276fa8,_0x30abe8,_0x118493,_0x46c8d7,_0x340cf1,_0x8c2dee;let _0x1deae1=_0x5f56bc[_0x3a74cf(0x114)]();return[G(_0x1deae1,[_0x3a74cf(0xec),'dataStream'],(_0x38f0e0=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x38f0e0[_0x3a74cf(0xe8)],(_0x494cfb=_0x2d1b16['body'])==null?void 0x0:_0x494cfb['dataStream']),G(_0x1deae1,[_0x3a74cf(0xec),'paragraphs'],(_0x1b7adf=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x1b7adf[_0x3a74cf(0xb9)],(_0x1cf992=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x1cf992[_0x3a74cf(0xb9)]),G(_0x1deae1,['body',_0x3a74cf(0x100)],(_0x21b435=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x21b435[_0x3a74cf(0x100)],(_0x3dca00=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x3dca00[_0x3a74cf(0x100)]),G(_0x1deae1,['body',_0x3a74cf(0xf2)],(_0x29e0a2=_0xd6322d['body'])==null?void 0x0:_0x29e0a2['textRuns'],(_0x346022=_0x2d1b16['body'])==null?void 0x0:_0x346022[_0x3a74cf(0xf2)]),G(_0x1deae1,[_0x3a74cf(0xec),_0x3a74cf(0xfa)],(_0x486eb6=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x486eb6['customBlocks'],(_0x26118f=_0x2d1b16['body'])==null?void 0x0:_0x26118f[_0x3a74cf(0xfa)]),G(_0x1deae1,['body',_0x3a74cf(0xee)],(_0x20b479=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x20b479[_0x3a74cf(0xee)],(_0x40fdca=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x40fdca[_0x3a74cf(0xee)]),G(_0x1deae1,['body',_0x3a74cf(0xc8)],(_0x55220c=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x55220c[_0x3a74cf(0xc8)],(_0x560687=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x560687[_0x3a74cf(0xc8)]),G(_0x1deae1,['body',_0x3a74cf(0xbb)],(_0x276fa8=_0xd6322d['body'])==null?void 0x0:_0x276fa8[_0x3a74cf(0xbb)],(_0x30abe8=_0x2d1b16['body'])==null?void 0x0:_0x30abe8['tables']),G(_0x1deae1,['body',_0x3a74cf(0x105)],(_0x118493=_0xd6322d['body'])==null?void 0x0:_0x118493[_0x3a74cf(0x105)],(_0x46c8d7=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x46c8d7['columnGroups']),G(_0x1deae1,[_0x3a74cf(0xec),_0x3a74cf(0xa9)],(_0x340cf1=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x340cf1[_0x3a74cf(0xa9)],(_0x8c2dee=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x8c2dee[_0x3a74cf(0xa9)])]['filter'](Boolean)[_0x3a74cf(0xaa)]((_0x41b9a7,_0x57fb20)=>_0x5f56bc[_0x3a74cf(0x115)](_0x41b9a7,_0x57fb20),null);}function G(_0x5e029b,_0x3d8bdf,_0x4e979c,_0x4cbd8f){const _0x3eccd3=_0x31cd75;return _0x532491[_0x3eccd3(0xf9)](_0x4e979c,_0x4cbd8f)?null:_0x5e029b[_0x3eccd3(0xe3)](_0x3d8bdf,_0x4e979c,_0x4cbd8f);}function K(_0x373c7d,_0x2e45a7,_0x55d1c3,_0x108205,_0x223caf,_0x4a1682){const _0x3d5862=_0x31cd75;let _0x391dd4=ve(_0x108205,_0x223caf);return _0x391dd4?!!_0x373c7d[_0x3d5862(0xd0)](_0x259164['id'],{'unitId':_0x55d1c3,'actions':_0x391dd4,'textRanges':[{'startOffset':_0x4a1682,'endOffset':_0x4a1682,'collapsed':!0x0}],'isEditing':!0x1}):(_0x2e45a7[_0x3d5862(0xf3)]([{'startOffset':_0x4a1682,'endOffset':_0x4a1682}],{'unitId':_0x55d1c3,'subUnitId':_0x55d1c3},!0x1),!0x0);}const q=_0x31cd75(0x11a),J=_0x31cd75(0xdd),Y={};var ye=_0x31cd75(0xb0),be=_0x31cd75(0x106);function X(_0x2c0ff2,_0x5609db){return function(_0x61ca4,_0x469654){_0x5609db(_0x61ca4,_0x469654,_0x2c0ff2);};}function Z(_0x12eeca,_0x54b7de,_0x4aeecd,_0x262908){const _0x4a352e=_0x31cd75;var _0x5e457e=arguments['length'],_0x33a7f7=_0x5e457e<0x3?_0x54b7de:_0x262908===null?_0x262908=Object['getOwnPropertyDescriptor'](_0x54b7de,_0x4aeecd):_0x262908,_0x3d70a8;if(typeof Reflect==_0x4a352e(0x110)&&typeof Reflect[_0x4a352e(0xd8)]==_0x4a352e(0xd5))_0x33a7f7=Reflect[_0x4a352e(0xd8)](_0x12eeca,_0x54b7de,_0x4aeecd,_0x262908);else{for(var _0x4febca=_0x12eeca[_0x4a352e(0xd6)]-0x1;_0x4febca>=0x0;_0x4febca--)(_0x3d70a8=_0x12eeca[_0x4febca])&&(_0x33a7f7=(_0x5e457e<0x3?_0x3d70a8(_0x33a7f7):_0x5e457e>0x3?_0x3d70a8(_0x54b7de,_0x4aeecd,_0x33a7f7):_0x3d70a8(_0x54b7de,_0x4aeecd))||_0x33a7f7);}return _0x5e457e>0x3&&_0x33a7f7&&Object[_0x4a352e(0xe4)](_0x54b7de,_0x4aeecd,_0x33a7f7),_0x33a7f7;}let Q=class extends _0x49f979{constructor(_0x3adaac,_0x3c5687){const _0x22dcfb=_0x31cd75;super(),this[_0x22dcfb(0xe0)]=_0x3adaac,this[_0x22dcfb(0xf5)]=_0x3c5687,this[_0x22dcfb(0x117)]();}['_initResource'](){const _0x3e718d=_0x31cd75;this[_0x3e718d(0xf6)](this['_resourceManagerService'][_0x3e718d(0xe2)]({'pluginName':q,'businesses':[_0x21d30e[_0x3e718d(0x10d)]],'toJson':_0x5da459=>JSON['stringify'](this[_0x3e718d(0xf5)][_0x3e718d(0xbf)](_0x5da459)),'parseJson':_0x56b9f6=>T(JSON[_0x3e718d(0xed)](_0x56b9f6)),'onLoad':(_0x52767a,_0x55dff8)=>this[_0x3e718d(0xf5)][_0x3e718d(0xb7)](_0x52767a,_0x55dff8),'onUnLoad':_0x56faf8=>this['_docsLatexModel'][_0x3e718d(0xac)](_0x56faf8)}));}};Q=Z([X(0x0,_0x2dc1cc),X(0x1,_0xc98c3c(V))],Q);let $=class extends _0x5bb7d3{constructor(_0x10cd65=Y,_0x480fd9,_0x300aa1,_0x127255){const _0x45ccd3=_0x31cd75;super(),this['_config']=_0x10cd65,this[_0x45ccd3(0xb5)]=_0x480fd9,this[_0x45ccd3(0xae)]=_0x300aa1,this[_0x45ccd3(0xfc)]=_0x127255;let {..._0x22ac16}=_0x561e0d({},Y,this['_config']);this[_0x45ccd3(0xfc)][_0x45ccd3(0x101)](J,_0x22ac16);}['onStarting'](){const _0x384ce9=_0x31cd75;this['_injector']['add']([V]),this['_injector'][_0x384ce9(0xc7)]([Q]),this['_injector'][_0x384ce9(0x109)](V),this[_0x384ce9(0xb5)][_0x384ce9(0x109)](Q),[H,U]['forEach'](_0x2c6a49=>this[_0x384ce9(0xf6)](this[_0x384ce9(0xae)][_0x384ce9(0xeb)](_0x2c6a49)));}};B($,_0x31cd75(0xb4),q),B($,_0x31cd75(0xfb),ye),B($,'version',be),B($,_0x31cd75(0xa8),_0x21d30e[_0x31cd75(0x10d)]),$=Z([_0x8014fe(_0x49963d,_0x5a7af5),X(0x1,_0xc98c3c(_0x12e076)),X(0x2,_0xf742fc),X(0x3,_0x19a7db)],$);export{C as DEFAULT_LATEX_FORMULA_PROPERTIES,te as DOCS_LATEX_CUSTOM_RANGE_KIND,ne as DOCS_LATEX_FORMULA_PLACEHOLDER,q as DOCS_LATEX_PLUGIN,J as DOCS_LATEX_PLUGIN_CONFIG_KEY,V as DocsLatexModel,H as InsertDocsLatexFormulaCommand,$ as UniverDocsLatexPlugin,U as UpdateDocsLatexFormulaCommand,D as buildInsertLatexFormulaActions,O as buildUpdateLatexFormulaActions,Y as defaultPluginConfig,re as getFormulaLatexFromRange,j as getLatexFormulaPlaceholderText,k as isDocsLatexFormulaRange,w as normalizeDocsLatexFormulaConfig,T as normalizeDocsLatexMetadataResource};
|
package/lib/facade.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _0x2e1719=_0x3fb7;(function(_0x3e17ca,_0x18c22a){var _0x168605=_0x3fb7,_0x31dd12=_0x3e17ca();while(!![]){try{var _0x20967a=-parseInt(_0x168605(0x12b))/0x1+parseInt(_0x168605(0x135))/0x2*(-parseInt(_0x168605(0x136))/0x3)+parseInt(_0x168605(0x129))/0x4*(parseInt(_0x168605(0x14d))/0x5)+-parseInt(_0x168605(0x158))/0x6+parseInt(_0x168605(0x15a))/0x7+-parseInt(_0x168605(0x156))/0x8*(parseInt(_0x168605(0x159))/0x9)+parseInt(_0x168605(0x13c))/0xa*(parseInt(_0x168605(0x152))/0xb);if(_0x20967a===_0x18c22a)break;else _0x31dd12['push'](_0x31dd12['shift']());}catch(_0x4b12dc){_0x31dd12['push'](_0x31dd12['shift']());}}}(_0x13b7,0x506f5));import{DocsLatexModel as _0x39c016,InsertDocsLatexFormulaCommand as _0x5825ab,UpdateDocsLatexFormulaCommand as _0x3d6f89,getFormulaLatexFromRange as _0x10ce26,isDocsLatexFormulaRange as _0x262fc6,normalizeDocsLatexFormulaConfig as _0x5ca2eb}from'@univerjs-pro/docs-latex';import{ICommandService as _0x477e31,Inject as _0x20866c,Injector as _0x1712f8,generateRandomId as _0x110e22}from'@univerjs/core';import{FDocument as _0x102200}from'@univerjs/docs/facade';function d(_0x34ae0f){'@babel/helpers - typeof';var _0x22444d=_0x3fb7;return d=typeof Symbol==_0x22444d(0x137)&&typeof Symbol['iterator']==_0x22444d(0x15b)?function(_0x2d13e1){return typeof _0x2d13e1;}:function(_0xb99aa){var _0x5edba3=_0x22444d;return _0xb99aa&&typeof Symbol==_0x5edba3(0x137)&&_0xb99aa[_0x5edba3(0x14e)]===Symbol&&_0xb99aa!==Symbol[_0x5edba3(0x130)]?_0x5edba3(0x15b):typeof _0xb99aa;},d(_0x34ae0f);}function f(_0x195983,_0x4ad737){var _0x2d01fa=_0x3fb7;if(d(_0x195983)!='object'||!_0x195983)return _0x195983;var _0x44d694=_0x195983[Symbol[_0x2d01fa(0x13a)]];if(_0x44d694!==void 0x0){var _0x3a7994=_0x44d694['call'](_0x195983,_0x4ad737||_0x2d01fa(0x13f));if(d(_0x3a7994)!=_0x2d01fa(0x12d))return _0x3a7994;throw TypeError(_0x2d01fa(0x142));}return(_0x4ad737===_0x2d01fa(0x139)?String:Number)(_0x195983);}function _0x13b7(){var _0x57bb38=['getLatexFormulas','208918wSJluN','12CjAdoa','function','createInstance','string','toPrimitive','describe','101380UDUhcq','syncExecuteCommand','getConfig','default','rangeId','getRange','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_injector','body','getId','latex','decorate','defineProperty','_getCustomRange','some','_rangeId','includes','5dRQGSI','constructor','getFormula','extend','map','1133GqQXYe','getOwnPropertyDescriptor','findLatexFormulas','_document','12440DBKmch','_createFDocumentLatex','3870762EqMWtL','1143FDVXYZ','1524852syvLCc','symbol','getLatexFormulaAt','getLatexFormula','startIndex','save','customRanges','_unitId','update','dataStream','getLatex','find','1316572jcYulN','length','1284hzhcum','get','object','filter','_getLatexRanges','prototype','findLatexFormulaByText','_getDocumentData','endIndex'];_0x13b7=function(){return _0x57bb38;};return _0x13b7();}function _0x3fb7(_0x325c8a,_0x360a5a){_0x325c8a=_0x325c8a-0x125;var _0x13b711=_0x13b7();var _0x3fb70f=_0x13b711[_0x325c8a];return _0x3fb70f;}function p(_0x37eb3a){var _0x33c07b=_0x3fb7,_0x1cf336=f(_0x37eb3a,_0x33c07b(0x139));return d(_0x1cf336)==_0x33c07b(0x15b)?_0x1cf336:_0x1cf336+'';}function m(_0x43f80d,_0x11d363,_0x5d6530){var _0x569404=_0x3fb7;return(_0x11d363=p(_0x11d363))in _0x43f80d?Object[_0x569404(0x148)](_0x43f80d,_0x11d363,{'value':_0x5d6530,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x43f80d[_0x11d363]=_0x5d6530,_0x43f80d;}function h(_0x6ceccc,_0x337a33){return function(_0x3d3d4e,_0x148608){_0x337a33(_0x3d3d4e,_0x148608,_0x6ceccc);};}function g(_0x279ba2,_0x536553,_0x438118,_0x1ca9b0){var _0x50b9f7=_0x3fb7,_0x560fd1=arguments[_0x50b9f7(0x12a)],_0xf7d15a=_0x560fd1<0x3?_0x536553:_0x1ca9b0===null?_0x1ca9b0=Object[_0x50b9f7(0x153)](_0x536553,_0x438118):_0x1ca9b0,_0x11767b;if(typeof Reflect==_0x50b9f7(0x12d)&&typeof Reflect[_0x50b9f7(0x147)]==_0x50b9f7(0x137))_0xf7d15a=Reflect[_0x50b9f7(0x147)](_0x279ba2,_0x536553,_0x438118,_0x1ca9b0);else{for(var _0x567956=_0x279ba2[_0x50b9f7(0x12a)]-0x1;_0x567956>=0x0;_0x567956--)(_0x11767b=_0x279ba2[_0x567956])&&(_0xf7d15a=(_0x560fd1<0x3?_0x11767b(_0xf7d15a):_0x560fd1>0x3?_0x11767b(_0x536553,_0x438118,_0xf7d15a):_0x11767b(_0x536553,_0x438118))||_0xf7d15a);}return _0x560fd1>0x3&&_0xf7d15a&&Object[_0x50b9f7(0x148)](_0x536553,_0x438118,_0xf7d15a),_0xf7d15a;}let _=class{constructor(_0x917f7c,_0x5f4beb,_0x5aa10c){var _0x490c7d=_0x3fb7;this[_0x490c7d(0x155)]=_0x917f7c,this[_0x490c7d(0x14b)]=_0x5f4beb,this[_0x490c7d(0x143)]=_0x5aa10c,m(this,'_unitId',void 0x0),this[_0x490c7d(0x161)]=this[_0x490c7d(0x155)][_0x490c7d(0x145)]();}['getId'](){var _0x3b6a07=_0x3fb7;return this[_0x3b6a07(0x14b)];}[_0x2e1719(0x141)](){var _0x5da73a=_0x2e1719;let _0x49d809=this[_0x5da73a(0x149)]();return _0x49d809?{'endIndex':_0x49d809[_0x5da73a(0x133)],'rangeId':_0x49d809[_0x5da73a(0x140)],'startIndex':_0x49d809[_0x5da73a(0x15e)]}:null;}[_0x2e1719(0x127)](){var _0x5be2cd=_0x2e1719,_0x3258e3,_0x3b94db;let _0x2bc322=this['_getCustomRange'](),_0xca9979=(_0x3258e3=this[_0x5be2cd(0x132)]()['body'])==null?void 0x0:_0x3258e3[_0x5be2cd(0x126)];return!_0x2bc322||!_0xca9979?'':((_0x3b94db=this['_injector']['get'](_0x39c016)[_0x5be2cd(0x14f)](this[_0x5be2cd(0x161)],this[_0x5be2cd(0x14b)]))==null?void 0x0:_0x3b94db[_0x5be2cd(0x146)])||_0x10ce26(_0x2bc322,_0xca9979);}[_0x2e1719(0x13e)](){var _0x19cb59=_0x2e1719;let _0x4308a6=_0x5ca2eb(this[_0x19cb59(0x143)][_0x19cb59(0x12c)](_0x39c016)[_0x19cb59(0x14f)](this['_unitId'],this[_0x19cb59(0x14b)]));return _0x4308a6[_0x19cb59(0x146)]?_0x4308a6:{..._0x4308a6,'latex':this[_0x19cb59(0x127)]()};}[_0x2e1719(0x13b)](){var _0x21661c=_0x2e1719;let _0x2618f9=this[_0x21661c(0x141)]();return _0x2618f9?{..._0x2618f9,'config':this[_0x21661c(0x13e)](),'latex':this[_0x21661c(0x127)](),'type':'latex'}:null;}[_0x2e1719(0x125)](_0x23222e){var _0xfa498e=_0x2e1719;return this[_0xfa498e(0x143)][_0xfa498e(0x12c)](_0x477e31)[_0xfa498e(0x13d)](_0x3d6f89['id'],{'latex':_0x23222e[_0xfa498e(0x146)],'properties':_0x23222e['properties'],'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x2e1719(0x132)](){return this['_document']['save']();}['_getCustomRange'](){var _0x51731e=_0x2e1719,_0x7bdf3c;return(_0x7bdf3c=this[_0x51731e(0x132)]()[_0x51731e(0x144)])==null||(_0x7bdf3c=_0x7bdf3c[_0x51731e(0x160)])==null?void 0x0:_0x7bdf3c[_0x51731e(0x128)](_0x17236c=>_0x17236c[_0x51731e(0x140)]===this[_0x51731e(0x14b)]&&_0x262fc6(_0x17236c));}};_=g([h(0x2,_0x20866c(_0x1712f8))],_);var v=class extends _0x102200{[_0x2e1719(0x134)](){var _0x478bb7=_0x2e1719;return this[_0x478bb7(0x12f)]()[_0x478bb7(0x151)](_0x5bd187=>this[_0x478bb7(0x157)](_0x5bd187[_0x478bb7(0x140)]));}[_0x2e1719(0x15d)](_0x255533){var _0x230dd6=_0x2e1719;return this[_0x230dd6(0x12f)]()[_0x230dd6(0x14a)](_0x19ded0=>_0x19ded0[_0x230dd6(0x140)]===_0x255533)?this[_0x230dd6(0x157)](_0x255533):null;}[_0x2e1719(0x15c)](_0x12ae75){var _0x5fd448=_0x2e1719;let _0x8facdd=this[_0x5fd448(0x12f)]()[_0x5fd448(0x128)](_0x2e39c5=>_0x2e39c5[_0x5fd448(0x15e)]<=_0x12ae75&&_0x12ae75<=_0x2e39c5['endIndex']);return _0x8facdd?this['_createFDocumentLatex'](_0x8facdd[_0x5fd448(0x140)]):null;}[_0x2e1719(0x131)](_0x127b10){var _0x33539a;return(_0x33539a=this['findLatexFormulas'](_0x127b10)[0x0])==null?null:_0x33539a;}[_0x2e1719(0x154)](_0x1cd64f){var _0x2410fb=_0x2e1719;let _0x21c3a7=typeof _0x1cd64f==_0x2410fb(0x139)?{'latex':_0x1cd64f}:_0x1cd64f;return this[_0x2410fb(0x134)]()[_0x2410fb(0x12e)](_0x3e834a=>!(_0x21c3a7[_0x2410fb(0x140)]&&_0x3e834a['getId']()!==_0x21c3a7[_0x2410fb(0x140)]||_0x21c3a7['latex']&&!_0x3e834a['getLatex']()[_0x2410fb(0x14c)](_0x21c3a7[_0x2410fb(0x146)])));}['insertLatexFormula'](_0x507fb0){var _0x19e008=_0x2e1719,_0x1abb34;let _0x5cabe1=this[_0x19e008(0x143)]['get'](_0x477e31),_0x14999a=(_0x1abb34=_0x507fb0[_0x19e008(0x140)])==null?_0x110e22(0x6):_0x1abb34;return _0x5cabe1['syncExecuteCommand'](_0x5825ab['id'],{..._0x507fb0,'rangeId':_0x14999a,'unitId':this[_0x19e008(0x145)]()})?this['getLatexFormula'](_0x14999a):null;}[_0x2e1719(0x12f)](){var _0x3dd442=_0x2e1719,_0x1b40a9,_0x5b7e77;return(_0x1b40a9=(_0x5b7e77=this[_0x3dd442(0x15f)]()['body'])==null||(_0x5b7e77=_0x5b7e77[_0x3dd442(0x160)])==null?void 0x0:_0x5b7e77[_0x3dd442(0x12e)](_0x262fc6))==null?[]:_0x1b40a9;}[_0x2e1719(0x157)](_0x1eb2c0){var _0x21fc6b=_0x2e1719;return this['_injector'][_0x21fc6b(0x138)](_,this,_0x1eb2c0);}};_0x102200[_0x2e1719(0x150)](v);export{_ as FDocumentLatex};
|
package/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x31cd75=_0x5276;(function(_0x3b6408,_0x4124db){const _0x2542f6=_0x5276,_0x244c57=_0x3b6408();while(!![]){try{const _0xfa503a=parseInt(_0x2542f6(0xcc))/0x1+parseInt(_0x2542f6(0xb1))/0x2+parseInt(_0x2542f6(0xd7))/0x3*(-parseInt(_0x2542f6(0xde))/0x4)+-parseInt(_0x2542f6(0xbc))/0x5+-parseInt(_0x2542f6(0xb2))/0x6+parseInt(_0x2542f6(0xf8))/0x7*(parseInt(_0x2542f6(0xdc))/0x8)+parseInt(_0x2542f6(0xce))/0x9;if(_0xfa503a===_0x4124db)break;else _0x244c57['push'](_0x244c57['shift']());}catch(_0x1abc67){_0x244c57['push'](_0x244c57['shift']());}}}(_0x10ed,0xdea7e));import{CommandType as _0x2720a4,CustomRangeType as _0x1f013e,DataStreamTreeTokenType as _0x3cf9ca,DependentOn as _0x8014fe,Disposable as _0x49f979,ICommandService as _0xf742fc,IConfigService as _0x19a7db,IResourceManagerService as _0x2dc1cc,IUniverInstanceService as _0xdb8d92,Inject as _0xc98c3c,Injector as _0x12e076,JSONX as _0x5f56bc,Plugin as _0x5bb7d3,Tools as _0x532491,UniverInstanceType as _0x21d30e,generateRandomId as _0x31c479,merge as _0x561e0d}from'@univerjs/core';function _0x5276(_0x613e1,_0x549c11){_0x613e1=_0x613e1-0xa6;const _0x10edaa=_0x10ed();let _0x527678=_0x10edaa[_0x613e1];return _0x527678;}import{DocSelectionManagerService as _0x3abd32,RichTextEditingMutation as _0x259164,UniverDocsPlugin as _0x5a7af5,isHeaderFooterSelection as _0x4484ee}from'@univerjs/docs';import{Subject as _0x1d6d30}from'rxjs';import{UniverLicensePlugin as _0x49963d}from'@univerjs-pro/license';const C={'displayMode':_0x31cd75(0xad),'kind':'inline'};function w(_0x193800){return{...C,'latex':'',..._0x193800};}function T(_0x12fe2b){const _0x2d033c=_0x31cd75;var _0x409c0f;let _0x41061d=(_0x409c0f=_0x12fe2b==null?void 0x0:_0x12fe2b['formulas'])==null?{}:_0x409c0f;return{'formulas':Object[_0x2d033c(0xe6)](Object[_0x2d033c(0x118)](_0x41061d)[_0x2d033c(0xb3)](([_0x4068b4,_0x2ae4d1])=>[_0x4068b4,w(_0x2ae4d1)]))};}function E(_0x20cd54,_0x317cd7,_0x4986ad){const _0x23725d=_0x31cd75;let _0x402948=T(_0x20cd54);return _0x402948['formulas'][_0x317cd7]=w({..._0x402948[_0x23725d(0xc6)][_0x317cd7],..._0x4986ad}),_0x402948;}function ee(_0x2f63f0,_0x3ed944){const _0x27f1ac=_0x31cd75;let _0x4d5200=T(_0x2f63f0);return delete _0x4d5200[_0x27f1ac(0xc6)][_0x3ed944],_0x4d5200;}const te='univer-docs-latex-formula',ne='i';function D(_0x3e545b){const _0x2a6263=_0x31cd75;var _0x59e421;let _0x9d31ca=R(_0x3e545b['documentData']),_0x3f1687=L(_0x9d31ca),{startOffset:_0x299b6c,endOffset:_0x52e8b3}=oe(_0x3f1687,_0x3e545b['startOffset'],_0x3e545b[_0x2a6263(0xa6)]),_0x356f99=E(_0x3e545b[_0x2a6263(0x10c)],_0x3e545b[_0x2a6263(0xc2)],{...C,..._0x3e545b[_0x2a6263(0x102)],'latex':_0x3e545b[_0x2a6263(0xda)]}),_0x25ecfc=j();return M(_0x3f1687,_0x299b6c,_0x52e8b3,_0x25ecfc),ae(_0x3f1687,_0x299b6c,_0x299b6c+_0x25ecfc[_0x2a6263(0xd6)]-0x1,_0x3e545b['rangeId']),_0x3f1687[_0x2a6263(0xee)]=[...(_0x59e421=_0x3f1687['customRanges'])==null?[]:_0x59e421,A(_0x3e545b[_0x2a6263(0xc2)],_0x299b6c,_0x25ecfc[_0x2a6263(0xd6)])]['sort']((_0x1f7912,_0x24ad50)=>_0x1f7912[_0x2a6263(0x104)]-_0x24ad50[_0x2a6263(0x104)]),{'nextDocumentData':_0x9d31ca,'nextMetadata':_0x356f99,'cursorOffset':_0x299b6c+_0x25ecfc['length']};}function O(_0x4f78a4){const _0x22114b=_0x31cd75;var _0x34605e,_0x55f972,_0x23cc54;let _0x44175e=R(_0x4f78a4['documentData']),_0x5bffbd=L(_0x44175e),_0x2627f8=(_0x34605e=_0x5bffbd[_0x22114b(0xee)])==null?void 0x0:_0x34605e[_0x22114b(0xdf)](_0x154952=>_0x154952[_0x22114b(0xc2)]===_0x4f78a4[_0x22114b(0xc2)]&&k(_0x154952));if(!_0x2627f8)return null;let _0x3ea7e7=_0x2627f8[_0x22114b(0x104)],_0x15fd4f=j();return M(_0x5bffbd,_0x2627f8[_0x22114b(0x104)],_0x2627f8[_0x22114b(0xff)]+0x1,_0x15fd4f),_0x5bffbd[_0x22114b(0xee)]=[...(_0x55f972=(_0x23cc54=_0x5bffbd['customRanges'])==null?void 0x0:_0x23cc54[_0x22114b(0xbe)](_0x3985f2=>_0x3985f2['rangeId']!==_0x4f78a4['rangeId']))==null?[]:_0x55f972,A(_0x4f78a4[_0x22114b(0xc2)],_0x3ea7e7,_0x15fd4f['length'])]['sort']((_0x5ef1e5,_0x181169)=>_0x5ef1e5[_0x22114b(0x104)]-_0x181169[_0x22114b(0x104)]),{'nextDocumentData':_0x44175e,'nextMetadata':E(_0x4f78a4[_0x22114b(0x10c)],_0x4f78a4[_0x22114b(0xc2)],{..._0x4f78a4['properties'],'latex':_0x4f78a4[_0x22114b(0xda)]}),'cursorOffset':_0x3ea7e7+_0x15fd4f['length']};}function re(_0x2e9b10,_0x1fa709){if(!k(_0x2e9b10))return'';let _0xd0f168=_0x1fa709['slice'](_0x2e9b10['startIndex'],_0x2e9b10['endIndex']+0x1);return ie(_0xd0f168)?'':_0xd0f168;}function k(_0x15f1f9){const _0x1d586a=_0x31cd75;var _0x22a7fd;return(_0x15f1f9==null?void 0x0:_0x15f1f9[_0x1d586a(0xa7)])===_0x1f013e['CUSTOM']&&((_0x22a7fd=_0x15f1f9[_0x1d586a(0x102)])==null?void 0x0:_0x22a7fd[_0x1d586a(0xe5)])===_0x1d586a(0xb8);}function A(_0x5be034,_0x142db2,_0x2ccc72){const _0x40c8eb=_0x31cd75;return{'startIndex':_0x142db2,'endIndex':_0x142db2+Math[_0x40c8eb(0xcd)](0x0,_0x2ccc72-0x1),'rangeId':_0x5be034,'rangeType':_0x1f013e[_0x40c8eb(0xc5)],'wholeEntity':!0x0,'properties':{'kind':te}};}function j(){return'i';}function ie(_0x51b961){const _0x35208e=_0x31cd75;return _0x51b961[_0x35208e(0xd6)]>0x0&&Array[_0x35208e(0x112)](_0x51b961)[_0x35208e(0x10e)](_0x3dc24c=>_0x3dc24c==='i');}function ae(_0x1133ff,_0x1e04ec,_0x291be5,_0x593c8b){const _0x30c0d7=_0x31cd75;var _0x1d13a9;_0x1133ff[_0x30c0d7(0xee)]=(_0x1d13a9=_0x1133ff[_0x30c0d7(0xee)])==null?void 0x0:_0x1d13a9[_0x30c0d7(0xbe)](_0x34d3bc=>_0x34d3bc[_0x30c0d7(0xc2)]===_0x593c8b||!k(_0x34d3bc)?!0x0:_0x34d3bc[_0x30c0d7(0xff)]<_0x1e04ec||_0x34d3bc[_0x30c0d7(0x104)]>_0x291be5);}function oe(_0x23abd3,_0x45bbce,_0xd8a9e6){const _0x29c615=_0x31cd75;let _0x31780b=ce(_0x23abd3),_0x21a899=_0x45bbce==null?_0x31780b:_0x45bbce,_0x49e9bc=_0xd8a9e6==null?_0x21a899:_0xd8a9e6;return{'startOffset':se(Math[_0x29c615(0x103)](_0x21a899,_0x49e9bc),_0x31780b),'endOffset':se(Math[_0x29c615(0xcd)](_0x21a899,_0x49e9bc),_0x31780b)};}function se(_0x5eabd8,_0x4007af){const _0x437c56=_0x31cd75;return Math['max'](0x0,Math[_0x437c56(0x103)](_0x5eabd8,_0x4007af));}function ce(_0x236a12){const _0x317a66=_0x31cd75;return _0x236a12['dataStream']['endsWith'](_0x3cf9ca[_0x317a66(0xd1)])?Math['max'](0x0,_0x236a12['dataStream']['length']-0x1):_0x236a12['dataStream'][_0x317a66(0xd6)];}function M(_0x45f207,_0x5afc99,_0x471219,_0x88cd73){_0x471219>_0x5afc99&&ue(_0x45f207,_0x5afc99,_0x471219),le(_0x45f207,_0x5afc99,_0x88cd73);}function le(_0x3eb50b,_0x446c52,_0x12aa83){const _0x35f48d=_0x31cd75;_0x12aa83&&(_0x3eb50b['dataStream']=''+_0x3eb50b[_0x35f48d(0xe8)][_0x35f48d(0xf7)](0x0,_0x446c52)+_0x12aa83+_0x3eb50b[_0x35f48d(0xe8)][_0x35f48d(0xf7)](_0x446c52),de(_0x3eb50b,_0x446c52,_0x12aa83[_0x35f48d(0xd6)]));}function ue(_0x391c42,_0x356b74,_0x3da9c1){const _0x3f30db=_0x31cd75;let _0x2cc940=_0x3da9c1-_0x356b74;_0x391c42[_0x3f30db(0xe8)]=''+_0x391c42[_0x3f30db(0xe8)][_0x3f30db(0xf7)](0x0,_0x356b74)+_0x391c42[_0x3f30db(0xe8)][_0x3f30db(0xf7)](_0x3da9c1),fe(_0x391c42,_0x356b74,_0x2cc940);}function de(_0x414325,_0x4ee105,_0x3df437){const _0x30f815=_0x31cd75;_0x414325['paragraphs']=N(_0x414325['paragraphs'],_0x4ee105,_0x3df437),_0x414325[_0x30f815(0x100)]=N(_0x414325['sectionBreaks'],_0x4ee105,_0x3df437),_0x414325[_0x30f815(0xfa)]=N(_0x414325[_0x30f815(0xfa)],_0x4ee105,_0x3df437),_0x414325[_0x30f815(0xf2)]=pe(_0x414325[_0x30f815(0xf2)],_0x4ee105,_0x3df437),_0x414325[_0x30f815(0xbb)]=F(_0x414325[_0x30f815(0xbb)],_0x4ee105,_0x3df437),_0x414325[_0x30f815(0x105)]=F(_0x414325[_0x30f815(0x105)],_0x4ee105,_0x3df437),_0x414325['customRanges']=F(_0x414325[_0x30f815(0xee)],_0x4ee105,_0x3df437),_0x414325['customDecorations']=F(_0x414325[_0x30f815(0xc8)],_0x4ee105,_0x3df437),_0x414325['blockRanges']=F(_0x414325[_0x30f815(0xa9)],_0x4ee105,_0x3df437);}function fe(_0x3889ee,_0x6fb92f,_0x13da13){const _0x4b16eb=_0x31cd75;var _0x235eb2,_0x10d0ed;_0x3889ee[_0x4b16eb(0xb9)]=P(_0x3889ee['paragraphs'],_0x6fb92f,_0x13da13),_0x3889ee[_0x4b16eb(0x100)]=P(_0x3889ee[_0x4b16eb(0x100)],_0x6fb92f,_0x13da13),_0x3889ee['customBlocks']=P(_0x3889ee[_0x4b16eb(0xfa)],_0x6fb92f,_0x13da13),_0x3889ee[_0x4b16eb(0xf2)]=(_0x235eb2=I((_0x10d0ed=_0x3889ee['textRuns'])==null?void 0x0:_0x10d0ed[_0x4b16eb(0xb3)](_0x5082d0=>({..._0x5082d0,'startIndex':_0x5082d0['st'],'endIndex':_0x5082d0['ed']})),_0x6fb92f,_0x13da13))==null?void 0x0:_0x235eb2[_0x4b16eb(0xb3)](_0x396d3d=>{let {startIndex:_0xeacd3,endIndex:_0x1f5682,..._0x5e6968}=_0x396d3d;return{..._0x5e6968,'st':_0xeacd3,'ed':_0x1f5682};}),_0x3889ee[_0x4b16eb(0xbb)]=I(_0x3889ee[_0x4b16eb(0xbb)],_0x6fb92f,_0x13da13),_0x3889ee[_0x4b16eb(0x105)]=I(_0x3889ee['columnGroups'],_0x6fb92f,_0x13da13),_0x3889ee['customRanges']=I(_0x3889ee[_0x4b16eb(0xee)],_0x6fb92f,_0x13da13),_0x3889ee[_0x4b16eb(0xc8)]=I(_0x3889ee['customDecorations'],_0x6fb92f,_0x13da13),_0x3889ee['blockRanges']=I(_0x3889ee[_0x4b16eb(0xa9)],_0x6fb92f,_0x13da13);}function N(_0x3d15e8,_0x239633,_0xe7b860){const _0x20886c=_0x31cd75;return _0x3d15e8==null?void 0x0:_0x3d15e8[_0x20886c(0xb3)](_0x2c688d=>_0x2c688d[_0x20886c(0x104)]>=_0x239633?{..._0x2c688d,'startIndex':_0x2c688d[_0x20886c(0x104)]+_0xe7b860}:_0x2c688d);}function P(_0x465294,_0x5b5593,_0x17c709){const _0x5d84a8=_0x31cd75;let _0x35d580=_0x5b5593+_0x17c709;return _0x465294==null?void 0x0:_0x465294[_0x5d84a8(0xb3)](_0x1bc940=>_0x1bc940[_0x5d84a8(0x104)]>=_0x5b5593&&_0x1bc940[_0x5d84a8(0x104)]<_0x35d580?null:_0x1bc940['startIndex']>=_0x35d580?{..._0x1bc940,'startIndex':_0x1bc940[_0x5d84a8(0x104)]-_0x17c709}:_0x1bc940)[_0x5d84a8(0xbe)](_0x4ca26a=>_0x4ca26a!=null);}function pe(_0x230382,_0x1b5242,_0x111dbb){const _0xc2ff4b=_0x31cd75;return _0x230382==null?void 0x0:_0x230382[_0xc2ff4b(0xb3)](_0xdf7024=>_0xdf7024['st']>=_0x1b5242?{..._0xdf7024,'st':_0xdf7024['st']+_0x111dbb,'ed':_0xdf7024['ed']+_0x111dbb}:_0xdf7024['ed']>_0x1b5242?{..._0xdf7024,'ed':_0xdf7024['ed']+_0x111dbb}:_0xdf7024);}function F(_0x4b54bc,_0x21c017,_0x2602ae){const _0x530acd=_0x31cd75;return _0x4b54bc==null?void 0x0:_0x4b54bc[_0x530acd(0xb3)](_0x175c1f=>_0x175c1f['startIndex']>=_0x21c017?{..._0x175c1f,'startIndex':_0x175c1f[_0x530acd(0x104)]+_0x2602ae,'endIndex':_0x175c1f[_0x530acd(0xff)]+_0x2602ae}:_0x175c1f[_0x530acd(0xff)]>=_0x21c017?{..._0x175c1f,'endIndex':_0x175c1f[_0x530acd(0xff)]+_0x2602ae}:_0x175c1f);}function I(_0x59be12,_0x1a8ec8,_0x40049c){const _0x2cf7b6=_0x31cd75;let _0x3eb45a=_0x1a8ec8+_0x40049c;return _0x59be12==null?void 0x0:_0x59be12[_0x2cf7b6(0xb3)](_0x2d8ff7=>_0x2d8ff7[_0x2cf7b6(0x104)]>=_0x1a8ec8&&_0x2d8ff7[_0x2cf7b6(0xff)]<_0x3eb45a?null:_0x2d8ff7[_0x2cf7b6(0x104)]>=_0x3eb45a?{..._0x2d8ff7,'startIndex':_0x2d8ff7[_0x2cf7b6(0x104)]-_0x40049c,'endIndex':_0x2d8ff7[_0x2cf7b6(0xff)]-_0x40049c}:_0x2d8ff7['endIndex']>=_0x1a8ec8?{..._0x2d8ff7,'startIndex':_0x2d8ff7['startIndex']<_0x1a8ec8?_0x2d8ff7[_0x2cf7b6(0x104)]:_0x1a8ec8,'endIndex':Math[_0x2cf7b6(0xcd)](_0x1a8ec8,_0x2d8ff7[_0x2cf7b6(0xff)]-_0x40049c)}:_0x2d8ff7)[_0x2cf7b6(0xbe)](_0x2408bc=>_0x2408bc!=null);}function L(_0x31f395){const _0x5b1930=_0x31cd75;if(!_0x31f395[_0x5b1930(0xec)])throw Error(_0x5b1930(0x119));return _0x31f395[_0x5b1930(0xec)];}function R(_0x370a90){const _0xa428=_0x31cd75;return _0x532491[_0xa428(0x10a)](_0x370a90);}function z(_0x206cf6){'@babel/helpers - typeof';const _0xc96d0e=_0x31cd75;return z=typeof Symbol==_0xc96d0e(0xd5)&&typeof Symbol['iterator']==_0xc96d0e(0xbd)?function(_0x421b11){return typeof _0x421b11;}:function(_0xacbcb7){const _0x597dc7=_0xc96d0e;return _0xacbcb7&&typeof Symbol==_0x597dc7(0xd5)&&_0xacbcb7[_0x597dc7(0x10b)]===Symbol&&_0xacbcb7!==Symbol[_0x597dc7(0xf1)]?'symbol':typeof _0xacbcb7;},z(_0x206cf6);}function me(_0xdbedda,_0x20014f){const _0x4f9be1=_0x31cd75;if(z(_0xdbedda)!=_0x4f9be1(0x110)||!_0xdbedda)return _0xdbedda;var _0x58b573=_0xdbedda[Symbol[_0x4f9be1(0xc0)]];if(_0x58b573!==void 0x0){var _0x293f5c=_0x58b573[_0x4f9be1(0xef)](_0xdbedda,_0x20014f||_0x4f9be1(0x111));if(z(_0x293f5c)!=_0x4f9be1(0x110))return _0x293f5c;throw TypeError(_0x4f9be1(0xcf));}return(_0x20014f===_0x4f9be1(0xfe)?String:Number)(_0xdbedda);}function he(_0x2c2700){const _0x2dcad1=_0x31cd75;var _0x2af7f8=me(_0x2c2700,_0x2dcad1(0xfe));return z(_0x2af7f8)==_0x2dcad1(0xbd)?_0x2af7f8:_0x2af7f8+'';}function _0x10ed(){const _0x341ac2=['endOffset','rangeType','type','blockRanges','reduce','change$','removeUnit','inline','_commandService','cursorOffset','@univerjs-pro/docs-latex','1810922PJoYJJ','3636012vIjXfg','map','pluginName','_injector','delete','deserialize','univer-docs-latex-formula','paragraphs','dispose','tables','7586290utLufS','symbol','filter','serialize','toPrimitive','nextMetadata','rangeId','getSnapshot','set','CUSTOM','formulas','add','customDecorations','COMMAND','getFormula','_change$','1303220CnPkoU','max','4679838XJriFH','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','syncExecuteCommand','SECTION_BREAK','getCurrentUnitOfType','getTextRanges','docs-latex.command.insert-formula','function','length','3gexGvr','decorate','asObservable','latex','commandService','5496bSaesd','docs-latex.config','5621636NCJBpq','find','_resourceManagerService','getUnitId','registerPluginResource','replaceOp','defineProperty','kind','fromEntries','setFormula','dataStream','_setResource','unitId','registerCommand','body','parse','customRanges','call','clear','prototype','textRuns','replaceDocRanges','selection','_docsLatexModel','disposeWithMe','slice','17444cpgrgj','diffValue','customBlocks','packageName','_configService','startOffset','string','endIndex','sectionBreaks','setConfig','properties','min','startIndex','columnGroups','1.0.0-insiders.20260707-70502d7','model','previousDocumentData','get','deepClone','constructor','metadata','UNIVER_DOC','every','nextDocumentData','object','default','from','_resources','getInstance','compose','removeFormula','_initResource','entries','Document\x20body\x20is\x20required\x20to\x20insert\x20docs\x20latex\x20formulas.','DOC_LATEX_PLUGIN'];_0x10ed=function(){return _0x341ac2;};return _0x10ed();}function B(_0x39b045,_0xe11c9e,_0x41135a){const _0x585391=_0x31cd75;return(_0xe11c9e=he(_0xe11c9e))in _0x39b045?Object[_0x585391(0xe4)](_0x39b045,_0xe11c9e,{'value':_0x41135a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x39b045[_0xe11c9e]=_0x41135a,_0x39b045;}var V=class extends _0x49f979{constructor(..._0x2aefdf){const _0x4364b0=_0x31cd75;super(..._0x2aefdf),B(this,_0x4364b0(0x113),new Map()),B(this,_0x4364b0(0xcb),new _0x1d6d30()),B(this,_0x4364b0(0xab),this[_0x4364b0(0xcb)][_0x4364b0(0xd9)]());}[_0x31cd75(0xca)](_0x4804d6,_0x3ea0bb){const _0x3e1af8=_0x31cd75;return T(this['_resources'][_0x3e1af8(0x109)](_0x4804d6))['formulas'][_0x3ea0bb];}[_0x31cd75(0xe7)](_0x39feb1,_0x207c1c,_0x5ad61d){const _0x13017c=_0x31cd75;this[_0x13017c(0xe9)](_0x39feb1,_0x207c1c,E(this['_resources'][_0x13017c(0x109)](_0x39feb1),_0x207c1c,_0x5ad61d));}[_0x31cd75(0x116)](_0xf2d896,_0x16d54d){const _0x4cde32=_0x31cd75;this[_0x4cde32(0xe9)](_0xf2d896,_0x16d54d,ee(this[_0x4cde32(0x113)][_0x4cde32(0x109)](_0xf2d896),_0x16d54d));}[_0x31cd75(0xbf)](_0x372478){const _0x1d2f1e=_0x31cd75;return T(this[_0x1d2f1e(0x113)][_0x1d2f1e(0x109)](_0x372478));}[_0x31cd75(0xb7)](_0x10c06c,_0x37c1ac){const _0x5d0f23=_0x31cd75;this[_0x5d0f23(0x113)][_0x5d0f23(0xc4)](_0x10c06c,T(_0x37c1ac)),this[_0x5d0f23(0xcb)]['next']({'unitId':_0x10c06c});}[_0x31cd75(0xac)](_0x444def){const _0x335be3=_0x31cd75;this[_0x335be3(0x113)][_0x335be3(0xb6)](_0x444def),this[_0x335be3(0xcb)]['next']({'unitId':_0x444def});}[_0x31cd75(0xba)](){const _0x5e9eec=_0x31cd75;super[_0x5e9eec(0xba)](),this[_0x5e9eec(0x113)][_0x5e9eec(0xf0)](),this[_0x5e9eec(0xcb)]['complete']();}[_0x31cd75(0xe9)](_0xf444a0,_0x513786,_0x17f6b3){const _0x230454=_0x31cd75;this[_0x230454(0x113)][_0x230454(0xc4)](_0xf444a0,_0x17f6b3),this['_change$']['next']({'unitId':_0xf444a0,'rangeId':_0x513786});}};const H={'id':_0x31cd75(0xd4),'type':_0x2720a4[_0x31cd75(0xc9)],'handler':(_0x302342,_0x106555)=>{const _0x338782=_0x31cd75;var _0x10c705,_0x2978cb;if(!(_0x106555!=null&&_0x106555['latex']))return!0x1;let _0x5ea2f0=W(_0x302342,_0x106555[_0x338782(0xea)]);if(!_0x5ea2f0)return!0x1;let _0x54de49=(_0x10c705=_0x106555[_0x338782(0xf4)])==null?ge(_0x302342):_0x10c705;if(_0x4484ee(_0x54de49))return!0x1;let _0x56bbf8=_e(_0x106555,_0x54de49),_0x1a5d24=D({'documentData':_0x5ea2f0[_0x338782(0x108)],'endOffset':_0x56bbf8==null?void 0x0:_0x56bbf8[_0x338782(0xa6)],'latex':_0x106555[_0x338782(0xda)],'metadata':_0x5ea2f0[_0x338782(0x107)]['serialize'](_0x5ea2f0[_0x338782(0xea)]),'properties':_0x106555[_0x338782(0x102)],'rangeId':(_0x2978cb=_0x106555['rangeId'])==null?_0x31c479(0x6):_0x2978cb,'startOffset':_0x56bbf8==null?void 0x0:_0x56bbf8[_0x338782(0xfd)]}),_0x219710=K(_0x5ea2f0[_0x338782(0xdb)],_0x5ea2f0['selectionManager'],_0x5ea2f0['unitId'],_0x5ea2f0[_0x338782(0x108)],_0x1a5d24[_0x338782(0x10f)],_0x1a5d24['cursorOffset']);return _0x219710&&_0x1a5d24[_0x338782(0xc1)]&&_0x5ea2f0[_0x338782(0x107)][_0x338782(0xb7)](_0x5ea2f0[_0x338782(0xea)],_0x1a5d24['nextMetadata']),_0x219710;}},U={'id':'docs-latex.command.update-formula','type':_0x2720a4[_0x31cd75(0xc9)],'handler':(_0x167724,_0x201fb8)=>{const _0x401896=_0x31cd75;if(!(_0x201fb8!=null&&_0x201fb8[_0x401896(0xc2)])||!_0x201fb8[_0x401896(0xda)])return!0x1;let _0x5f4471=W(_0x167724,_0x201fb8['unitId']);if(!_0x5f4471)return!0x1;let _0x26a064=O({'documentData':_0x5f4471['previousDocumentData'],'latex':_0x201fb8[_0x401896(0xda)],'metadata':_0x5f4471['model'][_0x401896(0xbf)](_0x5f4471[_0x401896(0xea)]),'properties':_0x201fb8[_0x401896(0x102)],'rangeId':_0x201fb8[_0x401896(0xc2)]});if(!_0x26a064)return!0x1;let _0x137538=K(_0x5f4471['commandService'],_0x5f4471['selectionManager'],_0x5f4471[_0x401896(0xea)],_0x5f4471['previousDocumentData'],_0x26a064[_0x401896(0x10f)],_0x26a064[_0x401896(0xaf)]);return _0x137538&&_0x26a064[_0x401896(0xc1)]&&_0x5f4471[_0x401896(0x107)][_0x401896(0xb7)](_0x5f4471[_0x401896(0xea)],_0x26a064[_0x401896(0xc1)]),_0x137538;}};function W(_0x1064db,_0x5da762){const _0x4a0c4e=_0x31cd75;let _0x402b15=_0x1064db[_0x4a0c4e(0x109)](_0xdb8d92),_0x44ac32=_0x5da762?_0x402b15['getUnit'](_0x5da762,_0x21d30e[_0x4a0c4e(0x10d)]):_0x402b15[_0x4a0c4e(0xd2)](_0x21d30e['UNIVER_DOC']);return _0x44ac32?{'commandService':_0x1064db[_0x4a0c4e(0x109)](_0xf742fc),'model':_0x1064db['get'](V),'previousDocumentData':_0x44ac32[_0x4a0c4e(0xc3)](),'selectionManager':_0x1064db[_0x4a0c4e(0x109)](_0x3abd32),'unitId':_0x44ac32[_0x4a0c4e(0xe1)]()}:null;}function ge(_0x510bb0){const _0x308079=_0x31cd75;var _0x3141ad;return(_0x3141ad=_0x510bb0[_0x308079(0x109)](_0x3abd32)[_0x308079(0xd3)]())==null?void 0x0:_0x3141ad[0x0];}function _e(_0x136ec7,_0x48168d){const _0x2c0dc0=_0x31cd75;var _0x3c640d,_0x4c9449;let _0x36ad1b=(_0x3c640d=_0x136ec7[_0x2c0dc0(0xfd)])==null?_0x48168d==null?void 0x0:_0x48168d[_0x2c0dc0(0xfd)]:_0x3c640d,_0x89b213=(_0x4c9449=_0x136ec7[_0x2c0dc0(0xa6)])==null?_0x48168d==null?void 0x0:_0x48168d[_0x2c0dc0(0xa6)]:_0x4c9449;if(!(_0x36ad1b==null||_0x89b213==null))return{'endOffset':Math[_0x2c0dc0(0xcd)](_0x36ad1b,_0x89b213),'startOffset':Math[_0x2c0dc0(0x103)](_0x36ad1b,_0x89b213)};}function ve(_0xd6322d,_0x2d1b16){const _0x3a74cf=_0x31cd75;var _0x38f0e0,_0x494cfb,_0x1b7adf,_0x1cf992,_0x21b435,_0x3dca00,_0x29e0a2,_0x346022,_0x486eb6,_0x26118f,_0x20b479,_0x40fdca,_0x55220c,_0x560687,_0x276fa8,_0x30abe8,_0x118493,_0x46c8d7,_0x340cf1,_0x8c2dee;let _0x1deae1=_0x5f56bc[_0x3a74cf(0x114)]();return[G(_0x1deae1,[_0x3a74cf(0xec),'dataStream'],(_0x38f0e0=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x38f0e0[_0x3a74cf(0xe8)],(_0x494cfb=_0x2d1b16['body'])==null?void 0x0:_0x494cfb['dataStream']),G(_0x1deae1,[_0x3a74cf(0xec),'paragraphs'],(_0x1b7adf=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x1b7adf[_0x3a74cf(0xb9)],(_0x1cf992=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x1cf992[_0x3a74cf(0xb9)]),G(_0x1deae1,['body',_0x3a74cf(0x100)],(_0x21b435=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x21b435[_0x3a74cf(0x100)],(_0x3dca00=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x3dca00[_0x3a74cf(0x100)]),G(_0x1deae1,['body',_0x3a74cf(0xf2)],(_0x29e0a2=_0xd6322d['body'])==null?void 0x0:_0x29e0a2['textRuns'],(_0x346022=_0x2d1b16['body'])==null?void 0x0:_0x346022[_0x3a74cf(0xf2)]),G(_0x1deae1,[_0x3a74cf(0xec),_0x3a74cf(0xfa)],(_0x486eb6=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x486eb6['customBlocks'],(_0x26118f=_0x2d1b16['body'])==null?void 0x0:_0x26118f[_0x3a74cf(0xfa)]),G(_0x1deae1,['body',_0x3a74cf(0xee)],(_0x20b479=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x20b479[_0x3a74cf(0xee)],(_0x40fdca=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x40fdca[_0x3a74cf(0xee)]),G(_0x1deae1,['body',_0x3a74cf(0xc8)],(_0x55220c=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x55220c[_0x3a74cf(0xc8)],(_0x560687=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x560687[_0x3a74cf(0xc8)]),G(_0x1deae1,['body',_0x3a74cf(0xbb)],(_0x276fa8=_0xd6322d['body'])==null?void 0x0:_0x276fa8[_0x3a74cf(0xbb)],(_0x30abe8=_0x2d1b16['body'])==null?void 0x0:_0x30abe8['tables']),G(_0x1deae1,['body',_0x3a74cf(0x105)],(_0x118493=_0xd6322d['body'])==null?void 0x0:_0x118493[_0x3a74cf(0x105)],(_0x46c8d7=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x46c8d7['columnGroups']),G(_0x1deae1,[_0x3a74cf(0xec),_0x3a74cf(0xa9)],(_0x340cf1=_0xd6322d[_0x3a74cf(0xec)])==null?void 0x0:_0x340cf1[_0x3a74cf(0xa9)],(_0x8c2dee=_0x2d1b16[_0x3a74cf(0xec)])==null?void 0x0:_0x8c2dee[_0x3a74cf(0xa9)])]['filter'](Boolean)[_0x3a74cf(0xaa)]((_0x41b9a7,_0x57fb20)=>_0x5f56bc[_0x3a74cf(0x115)](_0x41b9a7,_0x57fb20),null);}function G(_0x5e029b,_0x3d8bdf,_0x4e979c,_0x4cbd8f){const _0x3eccd3=_0x31cd75;return _0x532491[_0x3eccd3(0xf9)](_0x4e979c,_0x4cbd8f)?null:_0x5e029b[_0x3eccd3(0xe3)](_0x3d8bdf,_0x4e979c,_0x4cbd8f);}function K(_0x373c7d,_0x2e45a7,_0x55d1c3,_0x108205,_0x223caf,_0x4a1682){const _0x3d5862=_0x31cd75;let _0x391dd4=ve(_0x108205,_0x223caf);return _0x391dd4?!!_0x373c7d[_0x3d5862(0xd0)](_0x259164['id'],{'unitId':_0x55d1c3,'actions':_0x391dd4,'textRanges':[{'startOffset':_0x4a1682,'endOffset':_0x4a1682,'collapsed':!0x0}],'isEditing':!0x1}):(_0x2e45a7[_0x3d5862(0xf3)]([{'startOffset':_0x4a1682,'endOffset':_0x4a1682}],{'unitId':_0x55d1c3,'subUnitId':_0x55d1c3},!0x1),!0x0);}const q=_0x31cd75(0x11a),J=_0x31cd75(0xdd),Y={};var ye=_0x31cd75(0xb0),be=_0x31cd75(0x106);function X(_0x2c0ff2,_0x5609db){return function(_0x61ca4,_0x469654){_0x5609db(_0x61ca4,_0x469654,_0x2c0ff2);};}function Z(_0x12eeca,_0x54b7de,_0x4aeecd,_0x262908){const _0x4a352e=_0x31cd75;var _0x5e457e=arguments['length'],_0x33a7f7=_0x5e457e<0x3?_0x54b7de:_0x262908===null?_0x262908=Object['getOwnPropertyDescriptor'](_0x54b7de,_0x4aeecd):_0x262908,_0x3d70a8;if(typeof Reflect==_0x4a352e(0x110)&&typeof Reflect[_0x4a352e(0xd8)]==_0x4a352e(0xd5))_0x33a7f7=Reflect[_0x4a352e(0xd8)](_0x12eeca,_0x54b7de,_0x4aeecd,_0x262908);else{for(var _0x4febca=_0x12eeca[_0x4a352e(0xd6)]-0x1;_0x4febca>=0x0;_0x4febca--)(_0x3d70a8=_0x12eeca[_0x4febca])&&(_0x33a7f7=(_0x5e457e<0x3?_0x3d70a8(_0x33a7f7):_0x5e457e>0x3?_0x3d70a8(_0x54b7de,_0x4aeecd,_0x33a7f7):_0x3d70a8(_0x54b7de,_0x4aeecd))||_0x33a7f7);}return _0x5e457e>0x3&&_0x33a7f7&&Object[_0x4a352e(0xe4)](_0x54b7de,_0x4aeecd,_0x33a7f7),_0x33a7f7;}let Q=class extends _0x49f979{constructor(_0x3adaac,_0x3c5687){const _0x22dcfb=_0x31cd75;super(),this[_0x22dcfb(0xe0)]=_0x3adaac,this[_0x22dcfb(0xf5)]=_0x3c5687,this[_0x22dcfb(0x117)]();}['_initResource'](){const _0x3e718d=_0x31cd75;this[_0x3e718d(0xf6)](this['_resourceManagerService'][_0x3e718d(0xe2)]({'pluginName':q,'businesses':[_0x21d30e[_0x3e718d(0x10d)]],'toJson':_0x5da459=>JSON['stringify'](this[_0x3e718d(0xf5)][_0x3e718d(0xbf)](_0x5da459)),'parseJson':_0x56b9f6=>T(JSON[_0x3e718d(0xed)](_0x56b9f6)),'onLoad':(_0x52767a,_0x55dff8)=>this[_0x3e718d(0xf5)][_0x3e718d(0xb7)](_0x52767a,_0x55dff8),'onUnLoad':_0x56faf8=>this['_docsLatexModel'][_0x3e718d(0xac)](_0x56faf8)}));}};Q=Z([X(0x0,_0x2dc1cc),X(0x1,_0xc98c3c(V))],Q);let $=class extends _0x5bb7d3{constructor(_0x10cd65=Y,_0x480fd9,_0x300aa1,_0x127255){const _0x45ccd3=_0x31cd75;super(),this['_config']=_0x10cd65,this[_0x45ccd3(0xb5)]=_0x480fd9,this[_0x45ccd3(0xae)]=_0x300aa1,this[_0x45ccd3(0xfc)]=_0x127255;let {..._0x22ac16}=_0x561e0d({},Y,this['_config']);this[_0x45ccd3(0xfc)][_0x45ccd3(0x101)](J,_0x22ac16);}['onStarting'](){const _0x384ce9=_0x31cd75;this['_injector']['add']([V]),this['_injector'][_0x384ce9(0xc7)]([Q]),this['_injector'][_0x384ce9(0x109)](V),this[_0x384ce9(0xb5)][_0x384ce9(0x109)](Q),[H,U]['forEach'](_0x2c6a49=>this[_0x384ce9(0xf6)](this[_0x384ce9(0xae)][_0x384ce9(0xeb)](_0x2c6a49)));}};B($,_0x31cd75(0xb4),q),B($,_0x31cd75(0xfb),ye),B($,'version',be),B($,_0x31cd75(0xa8),_0x21d30e[_0x31cd75(0x10d)]),$=Z([_0x8014fe(_0x49963d,_0x5a7af5),X(0x1,_0xc98c3c(_0x12e076)),X(0x2,_0xf742fc),X(0x3,_0x19a7db)],$);export{C as DEFAULT_LATEX_FORMULA_PROPERTIES,te as DOCS_LATEX_CUSTOM_RANGE_KIND,ne as DOCS_LATEX_FORMULA_PLACEHOLDER,q as DOCS_LATEX_PLUGIN,J as DOCS_LATEX_PLUGIN_CONFIG_KEY,V as DocsLatexModel,H as InsertDocsLatexFormulaCommand,$ as UniverDocsLatexPlugin,U as UpdateDocsLatexFormulaCommand,D as buildInsertLatexFormulaActions,O as buildUpdateLatexFormulaActions,Y as defaultPluginConfig,re as getFormulaLatexFromRange,j as getLatexFormulaPlaceholderText,k as isDocsLatexFormulaRange,w as normalizeDocsLatexFormulaConfig,T as normalizeDocsLatexMetadataResource};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ICommand } from '@univerjs/core';
|
|
2
|
+
import type { IDocsLatexInsertCommandParams, IDocsLatexUpdateCommandParams } from '../common/type';
|
|
3
|
+
export declare const InsertDocsLatexFormulaCommand: ICommand<IDocsLatexInsertCommandParams>;
|
|
4
|
+
export declare const UpdateDocsLatexFormulaCommand: ICommand<IDocsLatexUpdateCommandParams>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ICustomRange, IDocumentData } from '@univerjs/core';
|
|
2
|
+
import type { IDocsLatexActionBuildResult, IDocsLatexFormulaProperties, IDocsLatexMetadataResource } from './type';
|
|
3
|
+
export declare const DOCS_LATEX_CUSTOM_RANGE_KIND = "univer-docs-latex-formula";
|
|
4
|
+
export declare const DOCS_LATEX_FORMULA_PLACEHOLDER = "i";
|
|
5
|
+
export interface IInsertLatexFormulaActionParams {
|
|
6
|
+
documentData: IDocumentData;
|
|
7
|
+
metadata?: IDocsLatexMetadataResource;
|
|
8
|
+
rangeId: string;
|
|
9
|
+
latex: string;
|
|
10
|
+
startOffset?: number;
|
|
11
|
+
endOffset?: number;
|
|
12
|
+
properties?: Partial<IDocsLatexFormulaProperties>;
|
|
13
|
+
}
|
|
14
|
+
export interface IUpdateLatexFormulaActionParams {
|
|
15
|
+
documentData: IDocumentData;
|
|
16
|
+
metadata?: IDocsLatexMetadataResource;
|
|
17
|
+
rangeId: string;
|
|
18
|
+
latex: string;
|
|
19
|
+
properties?: Partial<IDocsLatexFormulaProperties>;
|
|
20
|
+
}
|
|
21
|
+
export declare function buildInsertLatexFormulaActions(params: IInsertLatexFormulaActionParams): IDocsLatexActionBuildResult;
|
|
22
|
+
export declare function buildUpdateLatexFormulaActions(params: IUpdateLatexFormulaActionParams): IDocsLatexActionBuildResult | null;
|
|
23
|
+
export declare function getFormulaLatexFromRange(range: ICustomRange, dataStream: string): string;
|
|
24
|
+
export declare function isDocsLatexFormulaRange(range: ICustomRange | undefined | null): range is ICustomRange;
|
|
25
|
+
export declare function getLatexFormulaPlaceholderText(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DOCS_LATEX_PLUGIN = "DOC_LATEX_PLUGIN";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IDocsLatexFormulaConfig, IDocsLatexFormulaProperties, IDocsLatexMetadataResource } from './type';
|
|
2
|
+
export declare const DEFAULT_LATEX_FORMULA_PROPERTIES: IDocsLatexFormulaProperties;
|
|
3
|
+
export declare function normalizeDocsLatexFormulaConfig(config?: Partial<IDocsLatexFormulaConfig> | null): IDocsLatexFormulaConfig;
|
|
4
|
+
export declare function normalizeDocsLatexMetadataResource(resource?: Partial<IDocsLatexMetadataResource> | null): IDocsLatexMetadataResource;
|
|
5
|
+
export declare function setLatexFormulaInMetadata(resource: IDocsLatexMetadataResource | undefined, rangeId: string, config: Partial<IDocsLatexFormulaConfig>): IDocsLatexMetadataResource;
|
|
6
|
+
export declare function removeLatexFormulaFromMetadata(resource: IDocsLatexMetadataResource | undefined, rangeId: string): IDocsLatexMetadataResource;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { IDocumentData, ITextRange } from '@univerjs/core';
|
|
2
|
+
export type DocsLatexFormulaKind = 'inline';
|
|
3
|
+
export type DocsLatexFormulaDisplayMode = 'inline';
|
|
4
|
+
export interface IDocsLatexFormulaProperties {
|
|
5
|
+
displayMode: DocsLatexFormulaDisplayMode;
|
|
6
|
+
kind: DocsLatexFormulaKind;
|
|
7
|
+
}
|
|
8
|
+
export interface IDocsLatexFormulaConfig extends IDocsLatexFormulaProperties {
|
|
9
|
+
latex: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IDocsLatexMetadataResource {
|
|
12
|
+
formulas: Record<string, IDocsLatexFormulaConfig>;
|
|
13
|
+
}
|
|
14
|
+
export interface IDocsLatexActionBuildResult {
|
|
15
|
+
nextDocumentData: IDocumentData;
|
|
16
|
+
nextMetadata?: IDocsLatexMetadataResource;
|
|
17
|
+
cursorOffset: number;
|
|
18
|
+
}
|
|
19
|
+
export interface IDocsLatexInsertCommandParams {
|
|
20
|
+
unitId?: string;
|
|
21
|
+
rangeId?: string;
|
|
22
|
+
latex: string;
|
|
23
|
+
startOffset?: number;
|
|
24
|
+
endOffset?: number;
|
|
25
|
+
selection?: ITextRange;
|
|
26
|
+
properties?: Partial<IDocsLatexFormulaProperties>;
|
|
27
|
+
}
|
|
28
|
+
export interface IDocsLatexUpdateCommandParams {
|
|
29
|
+
unitId?: string;
|
|
30
|
+
rangeId: string;
|
|
31
|
+
segmentId?: string;
|
|
32
|
+
latex: string;
|
|
33
|
+
properties?: Partial<IDocsLatexFormulaProperties>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Disposable, IResourceManagerService } from '@univerjs/core';
|
|
2
|
+
import { DocsLatexModel } from '../models/docs-latex-model';
|
|
3
|
+
export declare class DocsLatexResourceController extends Disposable {
|
|
4
|
+
private readonly _resourceManagerService;
|
|
5
|
+
private readonly _docsLatexModel;
|
|
6
|
+
constructor(_resourceManagerService: IResourceManagerService, _docsLatexModel: DocsLatexModel);
|
|
7
|
+
private _initResource;
|
|
8
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { IDocsLatexFormulaConfig } from '@univerjs-pro/docs-latex';
|
|
2
|
+
import type { FDocument } from '@univerjs/docs/facade';
|
|
3
|
+
import type { IDocsLatexInfo, IDocsLatexRange, IDocsLatexUpdateFacadeOptions } from './types';
|
|
4
|
+
import { Injector } from '@univerjs/core';
|
|
5
|
+
/**
|
|
6
|
+
* Facade object for a single LaTeX formula in a Univer document.
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
10
|
+
* const formula = fDocument?.findLatexFormulaByText('E=mc^2');
|
|
11
|
+
*
|
|
12
|
+
* console.log(formula?.getLatex());
|
|
13
|
+
* console.log(formula?.getConfig());
|
|
14
|
+
*
|
|
15
|
+
* formula?.update({ latex: '\\frac{a}{b}' });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class FDocumentLatex {
|
|
19
|
+
private _document;
|
|
20
|
+
private _rangeId;
|
|
21
|
+
protected readonly _injector: Injector;
|
|
22
|
+
private readonly _unitId;
|
|
23
|
+
constructor(_document: FDocument, _rangeId: string, _injector: Injector);
|
|
24
|
+
/**
|
|
25
|
+
* Returns the LaTeX formula range id.
|
|
26
|
+
* @returns {string} The custom range id that identifies this formula.
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const formula = univerAPI.getActiveDocument()?.getLatexFormulas()[0];
|
|
30
|
+
* console.log(formula?.getId());
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
getId(): string;
|
|
34
|
+
/**
|
|
35
|
+
* Returns this formula's document data-stream range.
|
|
36
|
+
* @returns {IDocsLatexRange | null} The formula range, or `null` if it no longer exists.
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const formula = univerAPI.getActiveDocument()?.findLatexFormulaByText('E=mc^2');
|
|
40
|
+
* console.log(formula?.getRange());
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
getRange(): IDocsLatexRange | null;
|
|
44
|
+
/**
|
|
45
|
+
* Returns the editable LaTeX source for this formula.
|
|
46
|
+
* @returns {string} The LaTeX source, or an empty string if the formula range is gone.
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const formula = univerAPI.getActiveDocument()?.findLatexFormulaByText('mc');
|
|
50
|
+
* console.log(formula?.getLatex());
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
getLatex(): string;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the normalized formula configuration.
|
|
56
|
+
* @returns {IDocsLatexFormulaConfig} The formula source and visual properties.
|
|
57
|
+
* @example
|
|
58
|
+
* ```ts
|
|
59
|
+
* const formula = univerAPI.getActiveDocument()?.findLatexFormulaByText('E=mc^2');
|
|
60
|
+
* console.log(formula?.getConfig().kind);
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
getConfig(): IDocsLatexFormulaConfig;
|
|
64
|
+
/**
|
|
65
|
+
* Returns an agent-friendly description of this formula.
|
|
66
|
+
* @returns {IDocsLatexInfo | null} The formula id, range, source, and config, or `null` if it no longer exists.
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const formula = univerAPI.getActiveDocument()?.getLatexFormulas()[0];
|
|
70
|
+
* console.log(formula?.describe());
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
describe(): IDocsLatexInfo | null;
|
|
74
|
+
/**
|
|
75
|
+
* Updates this formula's source and optional visual properties.
|
|
76
|
+
* @param {IDocsLatexUpdateFacadeOptions} options The replacement LaTeX source and property patch.
|
|
77
|
+
* @returns {boolean} Whether the update command succeeded.
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const formula = univerAPI.getActiveDocument()?.findLatexFormulaByText('E=mc^2');
|
|
81
|
+
* const success = formula?.update({ latex: '\\frac{a}{b}' });
|
|
82
|
+
* console.log(success);
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
update(options: IDocsLatexUpdateFacadeOptions): boolean;
|
|
86
|
+
private _getDocumentData;
|
|
87
|
+
private _getCustomRange;
|
|
88
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { IDocsLatexFindQuery, IDocsLatexInsertFacadeOptions } from './types';
|
|
2
|
+
import { FDocument } from '@univerjs/docs/facade';
|
|
3
|
+
import { FDocumentLatex } from './f-document-latex';
|
|
4
|
+
export interface IFDocumentLatexMixin {
|
|
5
|
+
/**
|
|
6
|
+
* Returns all LaTeX formulas in this document.
|
|
7
|
+
* @returns {FDocumentLatex[]} An array of formula facade objects, or an empty array if the document has none.
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const formulas = univerAPI.getActiveDocument()?.getLatexFormulas();
|
|
11
|
+
* console.log(formulas?.map((formula) => formula.getLatex()));
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
getLatexFormulas(): FDocumentLatex[];
|
|
15
|
+
/**
|
|
16
|
+
* Returns a LaTeX formula by its range id.
|
|
17
|
+
* @param {string} rangeId The formula custom range id.
|
|
18
|
+
* @returns {FDocumentLatex | null} The matching formula facade object, or `null` if no formula has that id.
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const formula = univerAPI.getActiveDocument()?.getLatexFormula('formula-range-id');
|
|
22
|
+
* console.log(formula?.describe());
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
getLatexFormula(rangeId: string): FDocumentLatex | null;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the LaTeX formula that contains a document data-stream offset.
|
|
28
|
+
* @param {number} offset The document data-stream offset.
|
|
29
|
+
* @returns {FDocumentLatex | null} The formula at the offset, or `null` if the offset is not inside a formula.
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const formula = univerAPI.getActiveDocument()?.getLatexFormulaAt(42);
|
|
33
|
+
* console.log(formula?.getLatex());
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
getLatexFormulaAt(offset: number): FDocumentLatex | null;
|
|
37
|
+
/**
|
|
38
|
+
* Finds the first LaTeX formula whose source contains the given text.
|
|
39
|
+
* @param {string} latex Text to search for inside formula source.
|
|
40
|
+
* @returns {FDocumentLatex | null} The first matching formula, or `null` if no match is found.
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const formula = univerAPI.getActiveDocument()?.findLatexFormulaByText('mc');
|
|
44
|
+
* console.log(formula?.getRange());
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
findLatexFormulaByText(latex: string): FDocumentLatex | null;
|
|
48
|
+
/**
|
|
49
|
+
* Finds LaTeX formulas by source text or range id.
|
|
50
|
+
* @param {string | IDocsLatexFindQuery} query A source-text query or a structured query.
|
|
51
|
+
* @returns {FDocumentLatex[]} Matching formula facade objects, or an empty array if no match is found.
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* const byText = univerAPI.getActiveDocument()?.findLatexFormulas('frac');
|
|
55
|
+
* const byId = univerAPI.getActiveDocument()?.findLatexFormulas({ rangeId: 'formula-range-id' });
|
|
56
|
+
* console.log(byText, byId);
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
findLatexFormulas(query: string | IDocsLatexFindQuery): FDocumentLatex[];
|
|
60
|
+
/**
|
|
61
|
+
* Inserts a LaTeX formula into this document.
|
|
62
|
+
* @param {IDocsLatexInsertFacadeOptions} options Formula source, optional range id, offsets, and visual properties.
|
|
63
|
+
* @returns {FDocumentLatex | null} The newly inserted formula facade object, or `null` if insertion failed.
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const formula = univerAPI.getActiveDocument()?.insertLatexFormula({
|
|
67
|
+
* latex: 'E=mc^2',
|
|
68
|
+
* startOffset: 10,
|
|
69
|
+
* endOffset: 10,
|
|
70
|
+
* });
|
|
71
|
+
* console.log(formula?.getId());
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
insertLatexFormula(options: IDocsLatexInsertFacadeOptions): FDocumentLatex | null;
|
|
75
|
+
}
|
|
76
|
+
export declare class FDocumentLatexMixin extends FDocument implements IFDocumentLatexMixin {
|
|
77
|
+
getLatexFormulas(): FDocumentLatex[];
|
|
78
|
+
getLatexFormula(rangeId: string): FDocumentLatex | null;
|
|
79
|
+
getLatexFormulaAt(offset: number): FDocumentLatex | null;
|
|
80
|
+
findLatexFormulaByText(latex: string): FDocumentLatex | null;
|
|
81
|
+
findLatexFormulas(query: string | IDocsLatexFindQuery): FDocumentLatex[];
|
|
82
|
+
insertLatexFormula(options: IDocsLatexInsertFacadeOptions): FDocumentLatex | null;
|
|
83
|
+
private _getLatexRanges;
|
|
84
|
+
private _createFDocumentLatex;
|
|
85
|
+
}
|
|
86
|
+
declare module '@univerjs/docs/facade' {
|
|
87
|
+
interface FDocument extends IFDocumentLatexMixin {
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import type { IDocsLatexFormulaConfig } from '@univerjs-pro/docs-latex';
|
|
2
|
+
/**
|
|
3
|
+
* Options for inserting a LaTeX formula through the document facade.
|
|
4
|
+
*/
|
|
5
|
+
export interface IDocsLatexInsertFacadeOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Optional custom range id. A random id is generated when omitted.
|
|
8
|
+
*/
|
|
9
|
+
rangeId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Editable LaTeX source to insert.
|
|
12
|
+
*/
|
|
13
|
+
latex: string;
|
|
14
|
+
/**
|
|
15
|
+
* Inclusive start offset in the document data stream.
|
|
16
|
+
*/
|
|
17
|
+
startOffset?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Exclusive end offset in the document data stream.
|
|
20
|
+
*/
|
|
21
|
+
endOffset?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Optional formula visual properties.
|
|
24
|
+
*/
|
|
25
|
+
properties?: Partial<Omit<IDocsLatexFormulaConfig, 'latex'>>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Options for updating an existing LaTeX formula through the formula facade.
|
|
29
|
+
*/
|
|
30
|
+
export interface IDocsLatexUpdateFacadeOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Replacement editable LaTeX source.
|
|
33
|
+
*/
|
|
34
|
+
latex: string;
|
|
35
|
+
/**
|
|
36
|
+
* Optional formula visual property patch.
|
|
37
|
+
*/
|
|
38
|
+
properties?: Partial<Omit<IDocsLatexFormulaConfig, 'latex'>>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Query used to search LaTeX formulas in a document.
|
|
42
|
+
*/
|
|
43
|
+
export interface IDocsLatexFindQuery {
|
|
44
|
+
/**
|
|
45
|
+
* Source text that must be contained in the formula.
|
|
46
|
+
*/
|
|
47
|
+
latex?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Custom range id to match exactly.
|
|
50
|
+
*/
|
|
51
|
+
rangeId?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Data-stream range for a LaTeX formula.
|
|
55
|
+
*/
|
|
56
|
+
export interface IDocsLatexRange {
|
|
57
|
+
/**
|
|
58
|
+
* Inclusive end index of the formula custom range.
|
|
59
|
+
*/
|
|
60
|
+
endIndex: number;
|
|
61
|
+
/**
|
|
62
|
+
* Custom range id of the formula.
|
|
63
|
+
*/
|
|
64
|
+
rangeId: string;
|
|
65
|
+
/**
|
|
66
|
+
* Inclusive start index of the formula custom range.
|
|
67
|
+
*/
|
|
68
|
+
startIndex: number;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Agent-friendly description of a LaTeX formula.
|
|
72
|
+
*/
|
|
73
|
+
export interface IDocsLatexInfo extends IDocsLatexRange {
|
|
74
|
+
/**
|
|
75
|
+
* Normalized formula configuration.
|
|
76
|
+
*/
|
|
77
|
+
config?: IDocsLatexFormulaConfig;
|
|
78
|
+
/**
|
|
79
|
+
* Editable LaTeX source.
|
|
80
|
+
*/
|
|
81
|
+
latex: string;
|
|
82
|
+
/**
|
|
83
|
+
* Stable discriminator for LaTeX formula descriptions.
|
|
84
|
+
*/
|
|
85
|
+
type: 'latex';
|
|
86
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { InsertDocsLatexFormulaCommand, UpdateDocsLatexFormulaCommand } from './commands/latex.command';
|
|
2
|
+
export { buildInsertLatexFormulaActions, buildUpdateLatexFormulaActions, DOCS_LATEX_CUSTOM_RANGE_KIND, DOCS_LATEX_FORMULA_PLACEHOLDER, getFormulaLatexFromRange, getLatexFormulaPlaceholderText, isDocsLatexFormulaRange, } from './common/actions';
|
|
3
|
+
export { DOCS_LATEX_PLUGIN } from './common/const';
|
|
4
|
+
export { DEFAULT_LATEX_FORMULA_PROPERTIES, normalizeDocsLatexFormulaConfig, normalizeDocsLatexMetadataResource } from './common/metadata';
|
|
5
|
+
export type { IDocsLatexFormulaConfig, IDocsLatexFormulaProperties, IDocsLatexInsertCommandParams, IDocsLatexMetadataResource, IDocsLatexUpdateCommandParams } from './common/type';
|
|
6
|
+
export { defaultPluginConfig, DOCS_LATEX_PLUGIN_CONFIG_KEY } from './config/config';
|
|
7
|
+
export { DocsLatexModel } from './models/docs-latex-model';
|
|
8
|
+
export { UniverDocsLatexPlugin } from './plugin';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IDocsLatexFormulaConfig, IDocsLatexMetadataResource } from '../common/type';
|
|
2
|
+
import { Disposable } from '@univerjs/core';
|
|
3
|
+
export declare class DocsLatexModel extends Disposable {
|
|
4
|
+
private readonly _resources;
|
|
5
|
+
private readonly _change$;
|
|
6
|
+
readonly change$: import("rxjs").Observable<{
|
|
7
|
+
unitId: string;
|
|
8
|
+
rangeId?: string;
|
|
9
|
+
}>;
|
|
10
|
+
getFormula(unitId: string, rangeId: string): IDocsLatexFormulaConfig | undefined;
|
|
11
|
+
setFormula(unitId: string, rangeId: string, config: Partial<IDocsLatexFormulaConfig>): void;
|
|
12
|
+
removeFormula(unitId: string, rangeId: string): void;
|
|
13
|
+
serialize(unitId: string): IDocsLatexMetadataResource;
|
|
14
|
+
deserialize(unitId: string, resource: IDocsLatexMetadataResource): void;
|
|
15
|
+
removeUnit(unitId: string): void;
|
|
16
|
+
dispose(): void;
|
|
17
|
+
private _setResource;
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IUniverDocsLatexConfig } from './config/config';
|
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
export declare class UniverDocsLatexPlugin extends Plugin {
|
|
4
|
+
private readonly _config;
|
|
5
|
+
readonly _injector: Injector;
|
|
6
|
+
private readonly _commandService;
|
|
7
|
+
private readonly _configService;
|
|
8
|
+
static pluginName: string;
|
|
9
|
+
static packageName: string;
|
|
10
|
+
static version: string;
|
|
11
|
+
static type: UniverInstanceType;
|
|
12
|
+
constructor(_config: IUniverDocsLatexConfig | undefined, _injector: Injector, _commandService: ICommandService, _configService: IConfigService);
|
|
13
|
+
onStarting(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x4551(_0x49317e,_0x5a9321){_0x49317e=_0x49317e-0x172;var _0x5c4479=_0x5c44();var _0x4551e3=_0x5c4479[_0x49317e];return _0x4551e3;}function _0x5c44(){var _0x1fe6a0=['describe','6001820Uguyoj','Inject','ICommandService','includes','symbol','942066bhFMHX','isDocsLatexFormulaRange','_injector','string','constructor','getFormula','decorate','find','syncExecuteCommand','customRanges','2053881AFlgtV','iterator','object','findLatexFormulaByText','body','insertLatexFormula','9ATEKWK','_getLatexRanges','some','findLatexFormulas','rangeId','getFormulaLatexFromRange','properties','toPrimitive','@univerjs/docs/facade','normalizeDocsLatexFormulaConfig','toStringTag','getRange','save','UniverDocsFacade','FDocumentLatex','35wLGisy','FDocument','startIndex','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_getDocumentData','prototype','exports','@univerjs/core','createInstance','getId','@univerjs-pro/docs-latex','getLatex','_unitId','Injector','getLatexFormulas','152998vDzkzi','map','function','length','12oSyMYI','DocsLatexModel','get','_rangeId','_getCustomRange','call','10QBUfwj','filter','_createFDocumentLatex','amd','getConfig','2486070kBzuBq','37415937bHDXQa','extend','getLatexFormula','Module','4gtMRvd','latex','27dFZAah','933392qUiQNk','defineProperty','_document','update'];_0x5c44=function(){return _0x1fe6a0;};return _0x5c44();}(function(_0x413785,_0x3464e4){var _0x1cd056=_0x4551,_0x33f9b0=_0x413785();while(!![]){try{var _0x18e3c2=parseInt(_0x1cd056(0x198))/0x1*(-parseInt(_0x1cd056(0x1b6))/0x2)+parseInt(_0x1cd056(0x192))/0x3*(-parseInt(_0x1cd056(0x17b))/0x4)+-parseInt(_0x1cd056(0x1c0))/0x5*(parseInt(_0x1cd056(0x188))/0x6)+parseInt(_0x1cd056(0x1a7))/0x7*(-parseInt(_0x1cd056(0x17e))/0x8)+-parseInt(_0x1cd056(0x17d))/0x9*(parseInt(_0x1cd056(0x176))/0xa)+parseInt(_0x1cd056(0x183))/0xb*(parseInt(_0x1cd056(0x1ba))/0xc)+parseInt(_0x1cd056(0x177))/0xd;if(_0x18e3c2===_0x3464e4)break;else _0x33f9b0['push'](_0x33f9b0['shift']());}catch(_0x2a9af1){_0x33f9b0['push'](_0x33f9b0['shift']());}}}(_0x5c44,0x6378e),function(_0xf88b7d,_0x26c774){var _0x978089=_0x4551;typeof exports==_0x978089(0x194)&&typeof module<'u'?_0x26c774(exports,require('@univerjs-pro/docs-latex'),require('@univerjs/core'),require('@univerjs/docs/facade')):typeof define==_0x978089(0x1b8)&&define[_0x978089(0x174)]?define([_0x978089(0x1ad),_0x978089(0x1b1),_0x978089(0x1ae),_0x978089(0x1a0)],_0x26c774):(_0xf88b7d=typeof globalThis<'u'?globalThis:_0xf88b7d||self,_0x26c774(_0xf88b7d['UniverProDocsLatexFacade']={},_0xf88b7d['UniverProDocsLatex'],_0xf88b7d['UniverCore'],_0xf88b7d[_0x978089(0x1a5)]));}(this,function(_0x72e48b,_0x104c97,_0x4d3121,_0x4be5c2){var _0x4da3c2=_0x4551;Object['defineProperty'](_0x72e48b,Symbol[_0x4da3c2(0x1a2)],{'value':_0x4da3c2(0x17a)});function _0x3243d9(_0x51612b){'@babel/helpers - typeof';var _0x1e9ff5=_0x4da3c2;return _0x3243d9=typeof Symbol==_0x1e9ff5(0x1b8)&&typeof Symbol[_0x1e9ff5(0x193)]==_0x1e9ff5(0x187)?function(_0x4c56aa){return typeof _0x4c56aa;}:function(_0x41435c){var _0x4e2eb2=_0x1e9ff5;return _0x41435c&&typeof Symbol==_0x4e2eb2(0x1b8)&&_0x41435c[_0x4e2eb2(0x18c)]===Symbol&&_0x41435c!==Symbol[_0x4e2eb2(0x1ac)]?_0x4e2eb2(0x187):typeof _0x41435c;},_0x3243d9(_0x51612b);}function _0x154ebc(_0xa7dc9b,_0xd139a4){var _0x19ac73=_0x4da3c2;if(_0x3243d9(_0xa7dc9b)!=_0x19ac73(0x194)||!_0xa7dc9b)return _0xa7dc9b;var _0x15332d=_0xa7dc9b[Symbol[_0x19ac73(0x19f)]];if(_0x15332d!==void 0x0){var _0x17f2a1=_0x15332d[_0x19ac73(0x1bf)](_0xa7dc9b,_0xd139a4||'default');if(_0x3243d9(_0x17f2a1)!=_0x19ac73(0x194))return _0x17f2a1;throw TypeError(_0x19ac73(0x1aa));}return(_0xd139a4===_0x19ac73(0x18b)?String:Number)(_0xa7dc9b);}function _0x4ce66a(_0x59de3e){var _0x1f52e9=_0x4da3c2,_0x846a66=_0x154ebc(_0x59de3e,_0x1f52e9(0x18b));return _0x3243d9(_0x846a66)=='symbol'?_0x846a66:_0x846a66+'';}function _0x583f04(_0x39656e,_0x237cda,_0x352029){return(_0x237cda=_0x4ce66a(_0x237cda))in _0x39656e?Object['defineProperty'](_0x39656e,_0x237cda,{'value':_0x352029,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x39656e[_0x237cda]=_0x352029,_0x39656e;}function _0x1f9ce7(_0xb2d1f0,_0x1db5ad){return function(_0x2f0972,_0x33e7db){_0x1db5ad(_0x2f0972,_0x33e7db,_0xb2d1f0);};}function _0x2e396f(_0x2d3eb0,_0x367943,_0x5d356c,_0x41cd17){var _0x2190a0=_0x4da3c2,_0x5bc327=arguments[_0x2190a0(0x1b9)],_0xc9d8f5=_0x5bc327<0x3?_0x367943:_0x41cd17===null?_0x41cd17=Object['getOwnPropertyDescriptor'](_0x367943,_0x5d356c):_0x41cd17,_0x42f630;if(typeof Reflect==_0x2190a0(0x194)&&typeof Reflect[_0x2190a0(0x18e)]==_0x2190a0(0x1b8))_0xc9d8f5=Reflect[_0x2190a0(0x18e)](_0x2d3eb0,_0x367943,_0x5d356c,_0x41cd17);else{for(var _0x15bdb1=_0x2d3eb0[_0x2190a0(0x1b9)]-0x1;_0x15bdb1>=0x0;_0x15bdb1--)(_0x42f630=_0x2d3eb0[_0x15bdb1])&&(_0xc9d8f5=(_0x5bc327<0x3?_0x42f630(_0xc9d8f5):_0x5bc327>0x3?_0x42f630(_0x367943,_0x5d356c,_0xc9d8f5):_0x42f630(_0x367943,_0x5d356c))||_0xc9d8f5);}return _0x5bc327>0x3&&_0xc9d8f5&&Object[_0x2190a0(0x17f)](_0x367943,_0x5d356c,_0xc9d8f5),_0xc9d8f5;}let _0xc635e3=class{constructor(_0x400d18,_0x75c824,_0x3bf93f){var _0x4f577c=_0x4da3c2;this[_0x4f577c(0x180)]=_0x400d18,this[_0x4f577c(0x1bd)]=_0x75c824,this['_injector']=_0x3bf93f,_0x583f04(this,'_unitId',void 0x0),this[_0x4f577c(0x1b3)]=this['_document'][_0x4f577c(0x1b0)]();}[_0x4da3c2(0x1b0)](){return this['_rangeId'];}[_0x4da3c2(0x1a3)](){var _0x3d0aeb=_0x4da3c2;let _0x555db6=this[_0x3d0aeb(0x1be)]();return _0x555db6?{'endIndex':_0x555db6['endIndex'],'rangeId':_0x555db6[_0x3d0aeb(0x19c)],'startIndex':_0x555db6[_0x3d0aeb(0x1a9)]}:null;}[_0x4da3c2(0x1b2)](){var _0x2b2dc1=_0x4da3c2,_0x31ec8d,_0x170a11;let _0x5242fd=this[_0x2b2dc1(0x1be)](),_0x4adeb6=(_0x31ec8d=this[_0x2b2dc1(0x1ab)]()['body'])==null?void 0x0:_0x31ec8d['dataStream'];return!_0x5242fd||!_0x4adeb6?'':((_0x170a11=this[_0x2b2dc1(0x18a)][_0x2b2dc1(0x1bc)](_0x104c97['DocsLatexModel'])[_0x2b2dc1(0x18d)](this[_0x2b2dc1(0x1b3)],this[_0x2b2dc1(0x1bd)]))==null?void 0x0:_0x170a11[_0x2b2dc1(0x17c)])||(0x0,_0x104c97[_0x2b2dc1(0x19d)])(_0x5242fd,_0x4adeb6);}['getConfig'](){var _0x596eb2=_0x4da3c2;let _0x7392ab=(0x0,_0x104c97[_0x596eb2(0x1a1)])(this[_0x596eb2(0x18a)][_0x596eb2(0x1bc)](_0x104c97[_0x596eb2(0x1bb)])[_0x596eb2(0x18d)](this[_0x596eb2(0x1b3)],this[_0x596eb2(0x1bd)]));return _0x7392ab[_0x596eb2(0x17c)]?_0x7392ab:{..._0x7392ab,'latex':this['getLatex']()};}[_0x4da3c2(0x182)](){var _0x3a10a8=_0x4da3c2;let _0x3bcd98=this[_0x3a10a8(0x1a3)]();return _0x3bcd98?{..._0x3bcd98,'config':this[_0x3a10a8(0x175)](),'latex':this[_0x3a10a8(0x1b2)](),'type':_0x3a10a8(0x17c)}:null;}[_0x4da3c2(0x181)](_0x2e159e){var _0x56e2b3=_0x4da3c2;return this[_0x56e2b3(0x18a)]['get'](_0x4d3121['ICommandService'])[_0x56e2b3(0x190)](_0x104c97['UpdateDocsLatexFormulaCommand']['id'],{'latex':_0x2e159e[_0x56e2b3(0x17c)],'properties':_0x2e159e[_0x56e2b3(0x19e)],'rangeId':this[_0x56e2b3(0x1bd)],'unitId':this['_unitId']});}['_getDocumentData'](){var _0x4a03fe=_0x4da3c2;return this[_0x4a03fe(0x180)][_0x4a03fe(0x1a4)]();}['_getCustomRange'](){var _0x1a9fe9=_0x4da3c2,_0x4f5862;return(_0x4f5862=this[_0x1a9fe9(0x1ab)]()[_0x1a9fe9(0x196)])==null||(_0x4f5862=_0x4f5862[_0x1a9fe9(0x191)])==null?void 0x0:_0x4f5862[_0x1a9fe9(0x18f)](_0xf1c64=>_0xf1c64[_0x1a9fe9(0x19c)]===this[_0x1a9fe9(0x1bd)]&&(0x0,_0x104c97[_0x1a9fe9(0x189)])(_0xf1c64));}};_0xc635e3=_0x2e396f([_0x1f9ce7(0x2,(0x0,_0x4d3121[_0x4da3c2(0x184)])(_0x4d3121[_0x4da3c2(0x1b4)]))],_0xc635e3);var _0x165889=class extends _0x4be5c2['FDocument']{[_0x4da3c2(0x1b5)](){var _0x4c50ab=_0x4da3c2;return this[_0x4c50ab(0x199)]()[_0x4c50ab(0x1b7)](_0x4f79b2=>this[_0x4c50ab(0x173)](_0x4f79b2[_0x4c50ab(0x19c)]));}[_0x4da3c2(0x179)](_0x450c33){var _0x40bcad=_0x4da3c2;return this['_getLatexRanges']()[_0x40bcad(0x19a)](_0x58544d=>_0x58544d[_0x40bcad(0x19c)]===_0x450c33)?this[_0x40bcad(0x173)](_0x450c33):null;}['getLatexFormulaAt'](_0x4ceb4f){var _0x53a923=_0x4da3c2;let _0x7fd6a9=this['_getLatexRanges']()[_0x53a923(0x18f)](_0x56d882=>_0x56d882[_0x53a923(0x1a9)]<=_0x4ceb4f&&_0x4ceb4f<=_0x56d882['endIndex']);return _0x7fd6a9?this['_createFDocumentLatex'](_0x7fd6a9[_0x53a923(0x19c)]):null;}[_0x4da3c2(0x195)](_0x2dd26c){var _0x56e59f=_0x4da3c2,_0x4b6846;return(_0x4b6846=this[_0x56e59f(0x19b)](_0x2dd26c)[0x0])==null?null:_0x4b6846;}[_0x4da3c2(0x19b)](_0x21848b){var _0x4a069f=_0x4da3c2;let _0x24295c=typeof _0x21848b==_0x4a069f(0x18b)?{'latex':_0x21848b}:_0x21848b;return this[_0x4a069f(0x1b5)]()[_0x4a069f(0x172)](_0xaabb60=>!(_0x24295c[_0x4a069f(0x19c)]&&_0xaabb60['getId']()!==_0x24295c[_0x4a069f(0x19c)]||_0x24295c[_0x4a069f(0x17c)]&&!_0xaabb60['getLatex']()[_0x4a069f(0x186)](_0x24295c[_0x4a069f(0x17c)])));}[_0x4da3c2(0x197)](_0x5bced){var _0x222307=_0x4da3c2,_0x34c6c7;let _0xa8e1da=this[_0x222307(0x18a)][_0x222307(0x1bc)](_0x4d3121[_0x222307(0x185)]),_0x26929d=(_0x34c6c7=_0x5bced['rangeId'])==null?(0x0,_0x4d3121['generateRandomId'])(0x6):_0x34c6c7;return _0xa8e1da['syncExecuteCommand'](_0x104c97['InsertDocsLatexFormulaCommand']['id'],{..._0x5bced,'rangeId':_0x26929d,'unitId':this[_0x222307(0x1b0)]()})?this['getLatexFormula'](_0x26929d):null;}[_0x4da3c2(0x199)](){var _0x4f2c16=_0x4da3c2,_0x11fe8e,_0x1e7b25;return(_0x11fe8e=(_0x1e7b25=this[_0x4f2c16(0x1a4)]()[_0x4f2c16(0x196)])==null||(_0x1e7b25=_0x1e7b25[_0x4f2c16(0x191)])==null?void 0x0:_0x1e7b25[_0x4f2c16(0x172)](_0x104c97[_0x4f2c16(0x189)]))==null?[]:_0x11fe8e;}[_0x4da3c2(0x173)](_0x141325){var _0x3afb55=_0x4da3c2;return this['_injector'][_0x3afb55(0x1af)](_0xc635e3,this,_0x141325);}};_0x4be5c2[_0x4da3c2(0x1a8)][_0x4da3c2(0x178)](_0x165889),Object['defineProperty'](_0x72e48b,_0x4da3c2(0x1a6),{'enumerable':!0x0,'get':function(){return _0xc635e3;}});}));
|
package/lib/umd/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x1f59(){const _0x5b9f4a=['prototype','Injector','UniverDocsPlugin','DocsLatexModel','CUSTOM','type','SECTION_BREAK','Document\x20body\x20is\x20required\x20to\x20insert\x20docs\x20latex\x20formulas.','filter','deserialize','RichTextEditingMutation','tables','kind','serialize','dispose','textRuns','nextMetadata','Tools','getFormulaLatexFromRange','compose','body','_commandService','clear','endOffset','defaultPluginConfig','_setResource','@univerjs-pro/license','getCurrentUnitOfType','commandService','paragraphs','registerPluginResource','_docsLatexModel','inline','asObservable','DocSelectionManagerService','buildInsertLatexFormulaActions','symbol','syncExecuteCommand','sort','exports','3okncZB','getFormula','selectionManager','1.0.0-insiders.20260707-70502d7','customDecorations','42mCQvXt','next','463005BpwHfA','Module','rxjs','UNIVER_DOC','selection','add','toStringTag','defineProperty','iterator','pluginName','docs-latex.command.update-formula','columnGroups','_change$','CommandType','_initResource','Plugin','packageName','customRanges','rangeType','blockRanges','_resources','set','min','_configService','UniverInstanceType','9827IUwlbr','normalizeDocsLatexMetadataResource','728007GWUGzm','properties','CustomRangeType','docs-latex.config','dataStream','DependentOn','UniverDocs','diffValue','reduce','get','rangeId','2893GXEOwD','12PKjDti','version','registerCommand','isHeaderFooterSelection','isDocsLatexFormulaRange','model','getTextRanges','IResourceManagerService','from','_config','320uISXMp','function','UniverLicensePlugin','removeUnit','startOffset','disposeWithMe','DEFAULT_LATEX_FORMULA_PROPERTIES','every','normalizeDocsLatexFormulaConfig','_injector','endIndex','setFormula','nextDocumentData','formulas','max','UniverCore','DOCS_LATEX_FORMULA_PLACEHOLDER','IConfigService','ICommandService','DOCS_LATEX_PLUGIN_CONFIG_KEY','514196tLarCi','object','removeFormula','@univerjs/core','change$','sectionBreaks','1085768tbeUgs','decorate','delete','toPrimitive','@univerjs/docs','call','buildUpdateLatexFormulaActions','startIndex','getInstance','128810bOKUuU','stringify','deepClone','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','latex','getOwnPropertyDescriptor','slice','documentData','forEach','getSnapshot','string','IUniverInstanceService','replaceOp','constructor','length','map','generateRandomId','replaceDocRanges','amd','InsertDocsLatexFormulaCommand','unitId','previousDocumentData','univer-docs-latex-formula','fromEntries','onStarting','entries','DataStreamTreeTokenType','COMMAND','customBlocks','_resourceManagerService','Inject','Subject'];_0x1f59=function(){return _0x5b9f4a;};return _0x1f59();}function _0x2c66(_0x4e9de0,_0xba0c20){_0x4e9de0=_0x4e9de0-0xdb;const _0x1f59aa=_0x1f59();let _0x2c66fd=_0x1f59aa[_0x4e9de0];return _0x2c66fd;}(function(_0x1f7812,_0x514066){const _0xec8b50=_0x2c66,_0x5c7739=_0x1f7812();while(!![]){try{const _0x24ea0d=parseInt(_0xec8b50(0xdd))/0x1*(parseInt(_0xec8b50(0x165))/0x2)+parseInt(_0xec8b50(0x160))/0x3*(parseInt(_0xec8b50(0x109))/0x4)+-parseInt(_0xec8b50(0x118))/0x5+-parseInt(_0xec8b50(0xeb))/0x6*(parseInt(_0xec8b50(0xdf))/0x7)+parseInt(_0xec8b50(0x10f))/0x8+-parseInt(_0xec8b50(0x167))/0x9+parseInt(_0xec8b50(0xf5))/0xa*(-parseInt(_0xec8b50(0xea))/0xb);if(_0x24ea0d===_0x514066)break;else _0x5c7739['push'](_0x5c7739['shift']());}catch(_0x78f633){_0x5c7739['push'](_0x5c7739['shift']());}}}(_0x1f59,0x2b374),function(_0xaab353,_0xbd0123){const _0x8efd22=_0x2c66;typeof exports=='object'&&typeof module<'u'?_0xbd0123(exports,require('@univerjs/core'),require('@univerjs/docs'),require('rxjs'),require('@univerjs-pro/license')):typeof define==_0x8efd22(0xf6)&&define[_0x8efd22(0x12a)]?define([_0x8efd22(0x15f),_0x8efd22(0x10c),_0x8efd22(0x113),_0x8efd22(0x169),_0x8efd22(0x152)],_0xbd0123):(_0xaab353=typeof globalThis<'u'?globalThis:_0xaab353||self,_0xbd0123(_0xaab353['UniverProDocsLatex']={},_0xaab353[_0x8efd22(0x104)],_0xaab353[_0x8efd22(0xe5)],_0xaab353[_0x8efd22(0x169)],_0xaab353['UniverProLicense']));}(this,function(_0x423a45,_0x4fa0b7,_0x458ca6,_0x53d927,_0x28db98){const _0x5303cb=_0x2c66;Object[_0x5303cb(0x16e)](_0x423a45,Symbol[_0x5303cb(0x16d)],{'value':_0x5303cb(0x168)});let _0x334ff9={'displayMode':_0x5303cb(0x158),'kind':_0x5303cb(0x158)};function _0x496149(_0x32c0f3){return{..._0x334ff9,'latex':'',..._0x32c0f3};}function _0x13748c(_0x15a290){const _0x146464=_0x5303cb;var _0x345966;let _0x5ca914=(_0x345966=_0x15a290==null?void 0x0:_0x15a290['formulas'])==null?{}:_0x345966;return{'formulas':Object[_0x146464(0x12f)](Object[_0x146464(0x131)](_0x5ca914)[_0x146464(0x127)](([_0x2986b9,_0x4283af])=>[_0x2986b9,_0x496149(_0x4283af)]))};}function _0x5e18c5(_0x32ef7f,_0x142236,_0x155d94){const _0x5d6d31=_0x5303cb;let _0x3e3f70=_0x13748c(_0x32ef7f);return _0x3e3f70[_0x5d6d31(0x102)][_0x142236]=_0x496149({..._0x3e3f70[_0x5d6d31(0x102)][_0x142236],..._0x155d94}),_0x3e3f70;}function _0x5af171(_0x3aab79,_0x342dc4){const _0x4bd130=_0x5303cb;let _0x4a8796=_0x13748c(_0x3aab79);return delete _0x4a8796[_0x4bd130(0x102)][_0x342dc4],_0x4a8796;}let _0x185e44=_0x5303cb(0x12e);function _0x82e8ec(_0x4eb8e5){const _0x2f140c=_0x5303cb;var _0x67cbff;let _0xb69685=_0x5668d5(_0x4eb8e5[_0x2f140c(0x11f)]),_0x50e647=_0x5bcac9(_0xb69685),{startOffset:_0x3803fa,endOffset:_0x4a0f2d}=_0xc2336a(_0x50e647,_0x4eb8e5[_0x2f140c(0xf9)],_0x4eb8e5[_0x2f140c(0x14f)]),_0x29ae02=_0x5e18c5(_0x4eb8e5['metadata'],_0x4eb8e5[_0x2f140c(0xe9)],{..._0x334ff9,..._0x4eb8e5[_0x2f140c(0xe0)],'latex':_0x4eb8e5['latex']}),_0x35cc71=_0x59f55d();return _0xef4b99(_0x50e647,_0x3803fa,_0x4a0f2d,_0x35cc71),_0x52295d(_0x50e647,_0x3803fa,_0x3803fa+_0x35cc71[_0x2f140c(0x126)]-0x1,_0x4eb8e5[_0x2f140c(0xe9)]),_0x50e647[_0x2f140c(0x178)]=[...(_0x67cbff=_0x50e647[_0x2f140c(0x178)])==null?[]:_0x67cbff,_0x39d229(_0x4eb8e5[_0x2f140c(0xe9)],_0x3803fa,_0x35cc71[_0x2f140c(0x126)])][_0x2f140c(0x15e)]((_0x47ba34,_0x452383)=>_0x47ba34[_0x2f140c(0x116)]-_0x452383['startIndex']),{'nextDocumentData':_0xb69685,'nextMetadata':_0x29ae02,'cursorOffset':_0x3803fa+_0x35cc71[_0x2f140c(0x126)]};}function _0x2abca2(_0x382e31){const _0x515938=_0x5303cb;var _0x1456f0,_0x4cf614,_0xe23631;let _0xf1b969=_0x5668d5(_0x382e31[_0x515938(0x11f)]),_0x4bc3e1=_0x5bcac9(_0xf1b969),_0x1275a9=(_0x1456f0=_0x4bc3e1[_0x515938(0x178)])==null?void 0x0:_0x1456f0['find'](_0x19049a=>_0x19049a[_0x515938(0xe9)]===_0x382e31['rangeId']&&_0x4e2fb9(_0x19049a));if(!_0x1275a9)return null;let _0x3e206b=_0x1275a9['startIndex'],_0x5b6cb5=_0x59f55d();return _0xef4b99(_0x4bc3e1,_0x1275a9[_0x515938(0x116)],_0x1275a9[_0x515938(0xff)]+0x1,_0x5b6cb5),_0x4bc3e1[_0x515938(0x178)]=[...(_0x4cf614=(_0xe23631=_0x4bc3e1[_0x515938(0x178)])==null?void 0x0:_0xe23631[_0x515938(0x140)](_0x26d4c2=>_0x26d4c2[_0x515938(0xe9)]!==_0x382e31[_0x515938(0xe9)]))==null?[]:_0x4cf614,_0x39d229(_0x382e31[_0x515938(0xe9)],_0x3e206b,_0x5b6cb5[_0x515938(0x126)])][_0x515938(0x15e)]((_0x2aaded,_0x3f5a97)=>_0x2aaded[_0x515938(0x116)]-_0x3f5a97[_0x515938(0x116)]),{'nextDocumentData':_0xf1b969,'nextMetadata':_0x5e18c5(_0x382e31['metadata'],_0x382e31[_0x515938(0xe9)],{..._0x382e31[_0x515938(0xe0)],'latex':_0x382e31[_0x515938(0x11c)]}),'cursorOffset':_0x3e206b+_0x5b6cb5['length']};}function _0x2ae3fe(_0x7cb30,_0x5520b4){const _0x2264e8=_0x5303cb;if(!_0x4e2fb9(_0x7cb30))return'';let _0x552155=_0x5520b4[_0x2264e8(0x11e)](_0x7cb30[_0x2264e8(0x116)],_0x7cb30[_0x2264e8(0xff)]+0x1);return _0x4cc14e(_0x552155)?'':_0x552155;}function _0x4e2fb9(_0x2baf00){const _0x2432de=_0x5303cb;var _0x4dc2a8;return(_0x2baf00==null?void 0x0:_0x2baf00[_0x2432de(0x179)])===_0x4fa0b7[_0x2432de(0xe1)][_0x2432de(0x13c)]&&((_0x4dc2a8=_0x2baf00[_0x2432de(0xe0)])==null?void 0x0:_0x4dc2a8[_0x2432de(0x144)])===_0x2432de(0x12e);}function _0x39d229(_0x55e938,_0x16a010,_0x3f3591){const _0x175d4d=_0x5303cb;return{'startIndex':_0x16a010,'endIndex':_0x16a010+Math[_0x175d4d(0x103)](0x0,_0x3f3591-0x1),'rangeId':_0x55e938,'rangeType':_0x4fa0b7['CustomRangeType'][_0x175d4d(0x13c)],'wholeEntity':!0x0,'properties':{'kind':_0x185e44}};}function _0x59f55d(){return'i';}function _0x4cc14e(_0x47933b){const _0x147146=_0x5303cb;return _0x47933b[_0x147146(0x126)]>0x0&&Array[_0x147146(0xf3)](_0x47933b)[_0x147146(0xfc)](_0x2d0bde=>_0x2d0bde==='i');}function _0x52295d(_0x57ef41,_0x227a19,_0x2d932e,_0x451d12){const _0x43449f=_0x5303cb;var _0x541af4;_0x57ef41['customRanges']=(_0x541af4=_0x57ef41[_0x43449f(0x178)])==null?void 0x0:_0x541af4[_0x43449f(0x140)](_0x4beabc=>_0x4beabc[_0x43449f(0xe9)]===_0x451d12||!_0x4e2fb9(_0x4beabc)?!0x0:_0x4beabc[_0x43449f(0xff)]<_0x227a19||_0x4beabc['startIndex']>_0x2d932e);}function _0xc2336a(_0x584a4a,_0x48d8d9,_0x6e9128){const _0x336173=_0x5303cb;let _0x203645=_0x3ebae5(_0x584a4a),_0x59d3e6=_0x48d8d9==null?_0x203645:_0x48d8d9,_0x229ea2=_0x6e9128==null?_0x59d3e6:_0x6e9128;return{'startOffset':_0x58847f(Math[_0x336173(0x17d)](_0x59d3e6,_0x229ea2),_0x203645),'endOffset':_0x58847f(Math[_0x336173(0x103)](_0x59d3e6,_0x229ea2),_0x203645)};}function _0x58847f(_0x362672,_0x3020ab){const _0xdde83f=_0x5303cb;return Math[_0xdde83f(0x103)](0x0,Math[_0xdde83f(0x17d)](_0x362672,_0x3020ab));}function _0x3ebae5(_0x2dde32){const _0x4d50e8=_0x5303cb;return _0x2dde32[_0x4d50e8(0xe3)]['endsWith'](_0x4fa0b7[_0x4d50e8(0x132)][_0x4d50e8(0x13e)])?Math[_0x4d50e8(0x103)](0x0,_0x2dde32['dataStream']['length']-0x1):_0x2dde32[_0x4d50e8(0xe3)][_0x4d50e8(0x126)];}function _0xef4b99(_0x44f5e3,_0x58ce7f,_0x5e592c,_0x5ddbed){_0x5e592c>_0x58ce7f&&_0x5da2c4(_0x44f5e3,_0x58ce7f,_0x5e592c),_0x1c39c3(_0x44f5e3,_0x58ce7f,_0x5ddbed);}function _0x1c39c3(_0x43cebb,_0x486a02,_0x193dc2){const _0x2707ae=_0x5303cb;_0x193dc2&&(_0x43cebb[_0x2707ae(0xe3)]=''+_0x43cebb['dataStream'][_0x2707ae(0x11e)](0x0,_0x486a02)+_0x193dc2+_0x43cebb[_0x2707ae(0xe3)][_0x2707ae(0x11e)](_0x486a02),_0x5e140e(_0x43cebb,_0x486a02,_0x193dc2['length']));}function _0x5da2c4(_0x47817e,_0x9e2b6d,_0x3da22a){const _0x48c2e3=_0x5303cb;let _0x5b5a13=_0x3da22a-_0x9e2b6d;_0x47817e[_0x48c2e3(0xe3)]=''+_0x47817e[_0x48c2e3(0xe3)]['slice'](0x0,_0x9e2b6d)+_0x47817e[_0x48c2e3(0xe3)]['slice'](_0x3da22a),_0x488e5a(_0x47817e,_0x9e2b6d,_0x5b5a13);}function _0x5e140e(_0xf83872,_0x3c1bbf,_0x620f01){const _0x1cb80a=_0x5303cb;_0xf83872['paragraphs']=_0x5824c8(_0xf83872[_0x1cb80a(0x155)],_0x3c1bbf,_0x620f01),_0xf83872['sectionBreaks']=_0x5824c8(_0xf83872[_0x1cb80a(0x10e)],_0x3c1bbf,_0x620f01),_0xf83872[_0x1cb80a(0x134)]=_0x5824c8(_0xf83872[_0x1cb80a(0x134)],_0x3c1bbf,_0x620f01),_0xf83872[_0x1cb80a(0x147)]=_0x273a0f(_0xf83872[_0x1cb80a(0x147)],_0x3c1bbf,_0x620f01),_0xf83872['tables']=_0x585e30(_0xf83872[_0x1cb80a(0x143)],_0x3c1bbf,_0x620f01),_0xf83872[_0x1cb80a(0x172)]=_0x585e30(_0xf83872[_0x1cb80a(0x172)],_0x3c1bbf,_0x620f01),_0xf83872['customRanges']=_0x585e30(_0xf83872[_0x1cb80a(0x178)],_0x3c1bbf,_0x620f01),_0xf83872['customDecorations']=_0x585e30(_0xf83872['customDecorations'],_0x3c1bbf,_0x620f01),_0xf83872[_0x1cb80a(0x17a)]=_0x585e30(_0xf83872[_0x1cb80a(0x17a)],_0x3c1bbf,_0x620f01);}function _0x488e5a(_0x4080ef,_0x2d0bb4,_0x13de8b){const _0x20975b=_0x5303cb;var _0x33c233,_0x530892;_0x4080ef[_0x20975b(0x155)]=_0x5750cd(_0x4080ef[_0x20975b(0x155)],_0x2d0bb4,_0x13de8b),_0x4080ef[_0x20975b(0x10e)]=_0x5750cd(_0x4080ef[_0x20975b(0x10e)],_0x2d0bb4,_0x13de8b),_0x4080ef[_0x20975b(0x134)]=_0x5750cd(_0x4080ef[_0x20975b(0x134)],_0x2d0bb4,_0x13de8b),_0x4080ef[_0x20975b(0x147)]=(_0x33c233=_0x2e006e((_0x530892=_0x4080ef[_0x20975b(0x147)])==null?void 0x0:_0x530892['map'](_0x4dec0c=>({..._0x4dec0c,'startIndex':_0x4dec0c['st'],'endIndex':_0x4dec0c['ed']})),_0x2d0bb4,_0x13de8b))==null?void 0x0:_0x33c233[_0x20975b(0x127)](_0x1c04e1=>{let {startIndex:_0x4f5e9b,endIndex:_0x46f43d,..._0x24ce44}=_0x1c04e1;return{..._0x24ce44,'st':_0x4f5e9b,'ed':_0x46f43d};}),_0x4080ef[_0x20975b(0x143)]=_0x2e006e(_0x4080ef[_0x20975b(0x143)],_0x2d0bb4,_0x13de8b),_0x4080ef[_0x20975b(0x172)]=_0x2e006e(_0x4080ef[_0x20975b(0x172)],_0x2d0bb4,_0x13de8b),_0x4080ef['customRanges']=_0x2e006e(_0x4080ef[_0x20975b(0x178)],_0x2d0bb4,_0x13de8b),_0x4080ef['customDecorations']=_0x2e006e(_0x4080ef[_0x20975b(0x164)],_0x2d0bb4,_0x13de8b),_0x4080ef['blockRanges']=_0x2e006e(_0x4080ef[_0x20975b(0x17a)],_0x2d0bb4,_0x13de8b);}function _0x5824c8(_0x2b029c,_0x1c34dc,_0x12deb6){const _0x242cbc=_0x5303cb;return _0x2b029c==null?void 0x0:_0x2b029c[_0x242cbc(0x127)](_0x2c8764=>_0x2c8764[_0x242cbc(0x116)]>=_0x1c34dc?{..._0x2c8764,'startIndex':_0x2c8764['startIndex']+_0x12deb6}:_0x2c8764);}function _0x5750cd(_0xfdac21,_0x3a379a,_0x7bae2f){const _0x5645cf=_0x5303cb;let _0x1a2b57=_0x3a379a+_0x7bae2f;return _0xfdac21==null?void 0x0:_0xfdac21['map'](_0x884d30=>_0x884d30[_0x5645cf(0x116)]>=_0x3a379a&&_0x884d30[_0x5645cf(0x116)]<_0x1a2b57?null:_0x884d30[_0x5645cf(0x116)]>=_0x1a2b57?{..._0x884d30,'startIndex':_0x884d30['startIndex']-_0x7bae2f}:_0x884d30)[_0x5645cf(0x140)](_0x5f3933=>_0x5f3933!=null);}function _0x273a0f(_0x5463ad,_0x1b53f6,_0x51c457){return _0x5463ad==null?void 0x0:_0x5463ad['map'](_0x26a948=>_0x26a948['st']>=_0x1b53f6?{..._0x26a948,'st':_0x26a948['st']+_0x51c457,'ed':_0x26a948['ed']+_0x51c457}:_0x26a948['ed']>_0x1b53f6?{..._0x26a948,'ed':_0x26a948['ed']+_0x51c457}:_0x26a948);}function _0x585e30(_0x384279,_0x17e1a3,_0x12c7ff){const _0x4f31c3=_0x5303cb;return _0x384279==null?void 0x0:_0x384279[_0x4f31c3(0x127)](_0x42f707=>_0x42f707['startIndex']>=_0x17e1a3?{..._0x42f707,'startIndex':_0x42f707[_0x4f31c3(0x116)]+_0x12c7ff,'endIndex':_0x42f707[_0x4f31c3(0xff)]+_0x12c7ff}:_0x42f707[_0x4f31c3(0xff)]>=_0x17e1a3?{..._0x42f707,'endIndex':_0x42f707[_0x4f31c3(0xff)]+_0x12c7ff}:_0x42f707);}function _0x2e006e(_0x3d863c,_0x142eb9,_0x5e72a6){const _0x36ca15=_0x5303cb;let _0x5c09db=_0x142eb9+_0x5e72a6;return _0x3d863c==null?void 0x0:_0x3d863c['map'](_0xbfc34c=>_0xbfc34c[_0x36ca15(0x116)]>=_0x142eb9&&_0xbfc34c['endIndex']<_0x5c09db?null:_0xbfc34c[_0x36ca15(0x116)]>=_0x5c09db?{..._0xbfc34c,'startIndex':_0xbfc34c[_0x36ca15(0x116)]-_0x5e72a6,'endIndex':_0xbfc34c[_0x36ca15(0xff)]-_0x5e72a6}:_0xbfc34c[_0x36ca15(0xff)]>=_0x142eb9?{..._0xbfc34c,'startIndex':_0xbfc34c[_0x36ca15(0x116)]<_0x142eb9?_0xbfc34c['startIndex']:_0x142eb9,'endIndex':Math[_0x36ca15(0x103)](_0x142eb9,_0xbfc34c[_0x36ca15(0xff)]-_0x5e72a6)}:_0xbfc34c)[_0x36ca15(0x140)](_0xccaca7=>_0xccaca7!=null);}function _0x5bcac9(_0x1b0ac9){const _0x384fde=_0x5303cb;if(!_0x1b0ac9['body'])throw Error(_0x384fde(0x13f));return _0x1b0ac9[_0x384fde(0x14c)];}function _0x5668d5(_0x8cc9f){const _0x580259=_0x5303cb;return _0x4fa0b7[_0x580259(0x149)][_0x580259(0x11a)](_0x8cc9f);}function _0x32a212(_0x48b646){'@babel/helpers - typeof';const _0x528103=_0x5303cb;return _0x32a212=typeof Symbol==_0x528103(0xf6)&&typeof Symbol[_0x528103(0x16f)]==_0x528103(0x15c)?function(_0x3afff2){return typeof _0x3afff2;}:function(_0x1cf2cc){const _0x560267=_0x528103;return _0x1cf2cc&&typeof Symbol=='function'&&_0x1cf2cc[_0x560267(0x125)]===Symbol&&_0x1cf2cc!==Symbol[_0x560267(0x138)]?_0x560267(0x15c):typeof _0x1cf2cc;},_0x32a212(_0x48b646);}function _0x1703c6(_0x35b326,_0x133ba7){const _0x4d2f32=_0x5303cb;if(_0x32a212(_0x35b326)!=_0x4d2f32(0x10a)||!_0x35b326)return _0x35b326;var _0x3722e2=_0x35b326[Symbol[_0x4d2f32(0x112)]];if(_0x3722e2!==void 0x0){var _0x111a77=_0x3722e2[_0x4d2f32(0x114)](_0x35b326,_0x133ba7||'default');if(_0x32a212(_0x111a77)!=_0x4d2f32(0x10a))return _0x111a77;throw TypeError(_0x4d2f32(0x11b));}return(_0x133ba7===_0x4d2f32(0x122)?String:Number)(_0x35b326);}function _0x5d75ce(_0x2c1afe){const _0x4c4b69=_0x5303cb;var _0x3f8225=_0x1703c6(_0x2c1afe,_0x4c4b69(0x122));return _0x32a212(_0x3f8225)=='symbol'?_0x3f8225:_0x3f8225+'';}function _0x32cefe(_0x4e917b,_0x5b8cb4,_0x5b87d6){const _0x451617=_0x5303cb;return(_0x5b8cb4=_0x5d75ce(_0x5b8cb4))in _0x4e917b?Object[_0x451617(0x16e)](_0x4e917b,_0x5b8cb4,{'value':_0x5b87d6,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4e917b[_0x5b8cb4]=_0x5b87d6,_0x4e917b;}var _0x148309=class extends _0x4fa0b7['Disposable']{constructor(..._0x17ed65){const _0x5dd8c3=_0x5303cb;super(..._0x17ed65),_0x32cefe(this,_0x5dd8c3(0x17b),new Map()),_0x32cefe(this,_0x5dd8c3(0x173),new _0x53d927[(_0x5dd8c3(0x137))]()),_0x32cefe(this,_0x5dd8c3(0x10d),this['_change$'][_0x5dd8c3(0x159)]());}[_0x5303cb(0x161)](_0x50e50b,_0x900da3){const _0x373ca2=_0x5303cb;return _0x13748c(this['_resources'][_0x373ca2(0xe8)](_0x50e50b))['formulas'][_0x900da3];}[_0x5303cb(0x100)](_0x15e3b4,_0x4864a2,_0x2e3733){const _0x89eb45=_0x5303cb;this[_0x89eb45(0x151)](_0x15e3b4,_0x4864a2,_0x5e18c5(this[_0x89eb45(0x17b)][_0x89eb45(0xe8)](_0x15e3b4),_0x4864a2,_0x2e3733));}[_0x5303cb(0x10b)](_0xa5aafb,_0x1afdfd){const _0x23d81a=_0x5303cb;this['_setResource'](_0xa5aafb,_0x1afdfd,_0x5af171(this[_0x23d81a(0x17b)][_0x23d81a(0xe8)](_0xa5aafb),_0x1afdfd));}[_0x5303cb(0x145)](_0x2357be){const _0x3b1baa=_0x5303cb;return _0x13748c(this['_resources'][_0x3b1baa(0xe8)](_0x2357be));}[_0x5303cb(0x141)](_0x59e4c6,_0x3efe90){const _0x4c1c47=_0x5303cb;this[_0x4c1c47(0x17b)][_0x4c1c47(0x17c)](_0x59e4c6,_0x13748c(_0x3efe90)),this[_0x4c1c47(0x173)][_0x4c1c47(0x166)]({'unitId':_0x59e4c6});}[_0x5303cb(0xf8)](_0x33c709){const _0x3a16e6=_0x5303cb;this['_resources'][_0x3a16e6(0x111)](_0x33c709),this['_change$'][_0x3a16e6(0x166)]({'unitId':_0x33c709});}['dispose'](){const _0x3caa41=_0x5303cb;super[_0x3caa41(0x146)](),this['_resources'][_0x3caa41(0x14e)](),this[_0x3caa41(0x173)]['complete']();}[_0x5303cb(0x151)](_0x55a6a9,_0x49bfca,_0x181a41){const _0x430d66=_0x5303cb;this['_resources'][_0x430d66(0x17c)](_0x55a6a9,_0x181a41),this['_change$'][_0x430d66(0x166)]({'unitId':_0x55a6a9,'rangeId':_0x49bfca});}};let _0xa4fa22={'id':'docs-latex.command.insert-formula','type':_0x4fa0b7['CommandType']['COMMAND'],'handler':(_0x2d846f,_0x16cee6)=>{const _0x550bdb=_0x5303cb;var _0x2937e6,_0x19425a;if(!(_0x16cee6!=null&&_0x16cee6[_0x550bdb(0x11c)]))return!0x1;let _0x4ca025=_0x449db6(_0x2d846f,_0x16cee6[_0x550bdb(0x12c)]);if(!_0x4ca025)return!0x1;let _0x7b34ae=(_0x2937e6=_0x16cee6[_0x550bdb(0x16b)])==null?_0x33977d(_0x2d846f):_0x2937e6;if((0x0,_0x458ca6[_0x550bdb(0xee)])(_0x7b34ae))return!0x1;let _0x5b8976=_0x1683a9(_0x16cee6,_0x7b34ae),_0x1d4db7=_0x82e8ec({'documentData':_0x4ca025[_0x550bdb(0x12d)],'endOffset':_0x5b8976==null?void 0x0:_0x5b8976[_0x550bdb(0x14f)],'latex':_0x16cee6[_0x550bdb(0x11c)],'metadata':_0x4ca025['model'][_0x550bdb(0x145)](_0x4ca025[_0x550bdb(0x12c)]),'properties':_0x16cee6['properties'],'rangeId':(_0x19425a=_0x16cee6[_0x550bdb(0xe9)])==null?(0x0,_0x4fa0b7[_0x550bdb(0x128)])(0x6):_0x19425a,'startOffset':_0x5b8976==null?void 0x0:_0x5b8976[_0x550bdb(0xf9)]}),_0xaa8055=_0x553170(_0x4ca025[_0x550bdb(0x154)],_0x4ca025['selectionManager'],_0x4ca025[_0x550bdb(0x12c)],_0x4ca025[_0x550bdb(0x12d)],_0x1d4db7[_0x550bdb(0x101)],_0x1d4db7['cursorOffset']);return _0xaa8055&&_0x1d4db7[_0x550bdb(0x148)]&&_0x4ca025['model'][_0x550bdb(0x141)](_0x4ca025[_0x550bdb(0x12c)],_0x1d4db7['nextMetadata']),_0xaa8055;}},_0x4206c0={'id':_0x5303cb(0x171),'type':_0x4fa0b7[_0x5303cb(0x174)][_0x5303cb(0x133)],'handler':(_0x4244e4,_0x4f70f5)=>{const _0x5129fc=_0x5303cb;if(!(_0x4f70f5!=null&&_0x4f70f5[_0x5129fc(0xe9)])||!_0x4f70f5[_0x5129fc(0x11c)])return!0x1;let _0x1abaca=_0x449db6(_0x4244e4,_0x4f70f5[_0x5129fc(0x12c)]);if(!_0x1abaca)return!0x1;let _0x206cb0=_0x2abca2({'documentData':_0x1abaca[_0x5129fc(0x12d)],'latex':_0x4f70f5[_0x5129fc(0x11c)],'metadata':_0x1abaca[_0x5129fc(0xf0)]['serialize'](_0x1abaca[_0x5129fc(0x12c)]),'properties':_0x4f70f5[_0x5129fc(0xe0)],'rangeId':_0x4f70f5[_0x5129fc(0xe9)]});if(!_0x206cb0)return!0x1;let _0x52bcd9=_0x553170(_0x1abaca[_0x5129fc(0x154)],_0x1abaca[_0x5129fc(0x162)],_0x1abaca['unitId'],_0x1abaca[_0x5129fc(0x12d)],_0x206cb0['nextDocumentData'],_0x206cb0['cursorOffset']);return _0x52bcd9&&_0x206cb0[_0x5129fc(0x148)]&&_0x1abaca[_0x5129fc(0xf0)][_0x5129fc(0x141)](_0x1abaca[_0x5129fc(0x12c)],_0x206cb0[_0x5129fc(0x148)]),_0x52bcd9;}};function _0x449db6(_0xaa281c,_0x1d9f30){const _0x2f638a=_0x5303cb;let _0x4ad263=_0xaa281c[_0x2f638a(0xe8)](_0x4fa0b7[_0x2f638a(0x123)]),_0x54af7f=_0x1d9f30?_0x4ad263['getUnit'](_0x1d9f30,_0x4fa0b7[_0x2f638a(0xdc)]['UNIVER_DOC']):_0x4ad263[_0x2f638a(0x153)](_0x4fa0b7['UniverInstanceType']['UNIVER_DOC']);return _0x54af7f?{'commandService':_0xaa281c[_0x2f638a(0xe8)](_0x4fa0b7['ICommandService']),'model':_0xaa281c['get'](_0x148309),'previousDocumentData':_0x54af7f[_0x2f638a(0x121)](),'selectionManager':_0xaa281c[_0x2f638a(0xe8)](_0x458ca6[_0x2f638a(0x15a)]),'unitId':_0x54af7f['getUnitId']()}:null;}function _0x33977d(_0x23a0d0){const _0x16f4ba=_0x5303cb;var _0x314d5f;return(_0x314d5f=_0x23a0d0[_0x16f4ba(0xe8)](_0x458ca6[_0x16f4ba(0x15a)])[_0x16f4ba(0xf1)]())==null?void 0x0:_0x314d5f[0x0];}function _0x1683a9(_0x4ecdcd,_0x26723d){const _0x2342da=_0x5303cb;var _0x7a3008,_0xec8638;let _0x3bf596=(_0x7a3008=_0x4ecdcd[_0x2342da(0xf9)])==null?_0x26723d==null?void 0x0:_0x26723d[_0x2342da(0xf9)]:_0x7a3008,_0x23f89f=(_0xec8638=_0x4ecdcd[_0x2342da(0x14f)])==null?_0x26723d==null?void 0x0:_0x26723d['endOffset']:_0xec8638;if(!(_0x3bf596==null||_0x23f89f==null))return{'endOffset':Math[_0x2342da(0x103)](_0x3bf596,_0x23f89f),'startOffset':Math[_0x2342da(0x17d)](_0x3bf596,_0x23f89f)};}function _0x2ed5b1(_0x7323d3,_0x2f6767){const _0x5cc9ef=_0x5303cb;var _0x5867c3,_0x2f3094,_0x19d3be,_0x48db16,_0x3a07a0,_0xa7585a,_0x3c1671,_0x2fcb28,_0x494b0c,_0x111df0,_0x203884,_0x154d9b,_0x2264fa,_0x9a232e,_0x5a52f4,_0x13ede9,_0x261ed5,_0x39f641,_0x4706aa,_0x27dbe7;let _0x23f51f=_0x4fa0b7['JSONX'][_0x5cc9ef(0x117)]();return[_0x3d771a(_0x23f51f,[_0x5cc9ef(0x14c),_0x5cc9ef(0xe3)],(_0x5867c3=_0x7323d3[_0x5cc9ef(0x14c)])==null?void 0x0:_0x5867c3[_0x5cc9ef(0xe3)],(_0x2f3094=_0x2f6767['body'])==null?void 0x0:_0x2f3094['dataStream']),_0x3d771a(_0x23f51f,[_0x5cc9ef(0x14c),'paragraphs'],(_0x19d3be=_0x7323d3[_0x5cc9ef(0x14c)])==null?void 0x0:_0x19d3be[_0x5cc9ef(0x155)],(_0x48db16=_0x2f6767['body'])==null?void 0x0:_0x48db16[_0x5cc9ef(0x155)]),_0x3d771a(_0x23f51f,[_0x5cc9ef(0x14c),'sectionBreaks'],(_0x3a07a0=_0x7323d3[_0x5cc9ef(0x14c)])==null?void 0x0:_0x3a07a0[_0x5cc9ef(0x10e)],(_0xa7585a=_0x2f6767[_0x5cc9ef(0x14c)])==null?void 0x0:_0xa7585a['sectionBreaks']),_0x3d771a(_0x23f51f,[_0x5cc9ef(0x14c),'textRuns'],(_0x3c1671=_0x7323d3[_0x5cc9ef(0x14c)])==null?void 0x0:_0x3c1671[_0x5cc9ef(0x147)],(_0x2fcb28=_0x2f6767[_0x5cc9ef(0x14c)])==null?void 0x0:_0x2fcb28[_0x5cc9ef(0x147)]),_0x3d771a(_0x23f51f,[_0x5cc9ef(0x14c),_0x5cc9ef(0x134)],(_0x494b0c=_0x7323d3[_0x5cc9ef(0x14c)])==null?void 0x0:_0x494b0c[_0x5cc9ef(0x134)],(_0x111df0=_0x2f6767[_0x5cc9ef(0x14c)])==null?void 0x0:_0x111df0['customBlocks']),_0x3d771a(_0x23f51f,[_0x5cc9ef(0x14c),'customRanges'],(_0x203884=_0x7323d3[_0x5cc9ef(0x14c)])==null?void 0x0:_0x203884[_0x5cc9ef(0x178)],(_0x154d9b=_0x2f6767[_0x5cc9ef(0x14c)])==null?void 0x0:_0x154d9b[_0x5cc9ef(0x178)]),_0x3d771a(_0x23f51f,[_0x5cc9ef(0x14c),_0x5cc9ef(0x164)],(_0x2264fa=_0x7323d3[_0x5cc9ef(0x14c)])==null?void 0x0:_0x2264fa['customDecorations'],(_0x9a232e=_0x2f6767[_0x5cc9ef(0x14c)])==null?void 0x0:_0x9a232e['customDecorations']),_0x3d771a(_0x23f51f,[_0x5cc9ef(0x14c),'tables'],(_0x5a52f4=_0x7323d3[_0x5cc9ef(0x14c)])==null?void 0x0:_0x5a52f4['tables'],(_0x13ede9=_0x2f6767['body'])==null?void 0x0:_0x13ede9[_0x5cc9ef(0x143)]),_0x3d771a(_0x23f51f,[_0x5cc9ef(0x14c),_0x5cc9ef(0x172)],(_0x261ed5=_0x7323d3['body'])==null?void 0x0:_0x261ed5[_0x5cc9ef(0x172)],(_0x39f641=_0x2f6767['body'])==null?void 0x0:_0x39f641[_0x5cc9ef(0x172)]),_0x3d771a(_0x23f51f,['body',_0x5cc9ef(0x17a)],(_0x4706aa=_0x7323d3[_0x5cc9ef(0x14c)])==null?void 0x0:_0x4706aa[_0x5cc9ef(0x17a)],(_0x27dbe7=_0x2f6767[_0x5cc9ef(0x14c)])==null?void 0x0:_0x27dbe7[_0x5cc9ef(0x17a)])][_0x5cc9ef(0x140)](Boolean)[_0x5cc9ef(0xe7)]((_0xff517c,_0x5f1dba)=>_0x4fa0b7['JSONX'][_0x5cc9ef(0x14b)](_0xff517c,_0x5f1dba),null);}function _0x3d771a(_0x3daa18,_0x4b9820,_0x4eb661,_0x36bf04){const _0x5299df=_0x5303cb;return _0x4fa0b7['Tools'][_0x5299df(0xe6)](_0x4eb661,_0x36bf04)?null:_0x3daa18[_0x5299df(0x124)](_0x4b9820,_0x4eb661,_0x36bf04);}function _0x553170(_0x52e1c9,_0x5f5c44,_0x14ed97,_0x16131a,_0x51f8af,_0x10868d){const _0x42e7b4=_0x5303cb;let _0x3712f5=_0x2ed5b1(_0x16131a,_0x51f8af);return _0x3712f5?!!_0x52e1c9[_0x42e7b4(0x15d)](_0x458ca6[_0x42e7b4(0x142)]['id'],{'unitId':_0x14ed97,'actions':_0x3712f5,'textRanges':[{'startOffset':_0x10868d,'endOffset':_0x10868d,'collapsed':!0x0}],'isEditing':!0x1}):(_0x5f5c44[_0x42e7b4(0x129)]([{'startOffset':_0x10868d,'endOffset':_0x10868d}],{'unitId':_0x14ed97,'subUnitId':_0x14ed97},!0x1),!0x0);}let _0x234203='DOC_LATEX_PLUGIN',_0x338ff6=_0x5303cb(0xe2),_0x389eaf={};var _0x442684='@univerjs-pro/docs-latex',_0x5515cf=_0x5303cb(0x163);function _0x14659d(_0x3c1489,_0x51a1fa){return function(_0x7e9285,_0x238af4){_0x51a1fa(_0x7e9285,_0x238af4,_0x3c1489);};}function _0x3f620c(_0x85ae0,_0x59ae4f,_0x4d40af,_0x43e410){const _0x3d2258=_0x5303cb;var _0x54eb5b=arguments[_0x3d2258(0x126)],_0x4685cd=_0x54eb5b<0x3?_0x59ae4f:_0x43e410===null?_0x43e410=Object[_0x3d2258(0x11d)](_0x59ae4f,_0x4d40af):_0x43e410,_0x3c7ac2;if(typeof Reflect=='object'&&typeof Reflect[_0x3d2258(0x110)]==_0x3d2258(0xf6))_0x4685cd=Reflect['decorate'](_0x85ae0,_0x59ae4f,_0x4d40af,_0x43e410);else{for(var _0x165358=_0x85ae0[_0x3d2258(0x126)]-0x1;_0x165358>=0x0;_0x165358--)(_0x3c7ac2=_0x85ae0[_0x165358])&&(_0x4685cd=(_0x54eb5b<0x3?_0x3c7ac2(_0x4685cd):_0x54eb5b>0x3?_0x3c7ac2(_0x59ae4f,_0x4d40af,_0x4685cd):_0x3c7ac2(_0x59ae4f,_0x4d40af))||_0x4685cd);}return _0x54eb5b>0x3&&_0x4685cd&&Object[_0x3d2258(0x16e)](_0x59ae4f,_0x4d40af,_0x4685cd),_0x4685cd;}let _0x31e8a4=class extends _0x4fa0b7['Disposable']{constructor(_0x57726f,_0x33615d){const _0x1e3480=_0x5303cb;super(),this[_0x1e3480(0x135)]=_0x57726f,this[_0x1e3480(0x157)]=_0x33615d,this[_0x1e3480(0x175)]();}['_initResource'](){const _0x525d7e=_0x5303cb;this[_0x525d7e(0xfa)](this['_resourceManagerService'][_0x525d7e(0x156)]({'pluginName':_0x234203,'businesses':[_0x4fa0b7[_0x525d7e(0xdc)][_0x525d7e(0x16a)]],'toJson':_0x21134a=>JSON[_0x525d7e(0x119)](this[_0x525d7e(0x157)][_0x525d7e(0x145)](_0x21134a)),'parseJson':_0x11ed56=>_0x13748c(JSON['parse'](_0x11ed56)),'onLoad':(_0x111d93,_0x17df41)=>this[_0x525d7e(0x157)]['deserialize'](_0x111d93,_0x17df41),'onUnLoad':_0x59c994=>this[_0x525d7e(0x157)][_0x525d7e(0xf8)](_0x59c994)}));}};_0x31e8a4=_0x3f620c([_0x14659d(0x0,_0x4fa0b7[_0x5303cb(0xf2)]),_0x14659d(0x1,(0x0,_0x4fa0b7[_0x5303cb(0x136)])(_0x148309))],_0x31e8a4);let _0x25948b=class extends _0x4fa0b7[_0x5303cb(0x176)]{constructor(_0x130203=_0x389eaf,_0x1f4b1b,_0x23e2d5,_0x3eecae){const _0x115a15=_0x5303cb;super(),this['_config']=_0x130203,this[_0x115a15(0xfe)]=_0x1f4b1b,this[_0x115a15(0x14d)]=_0x23e2d5,this[_0x115a15(0xdb)]=_0x3eecae;let {..._0x7eace8}=(0x0,_0x4fa0b7['merge'])({},_0x389eaf,this[_0x115a15(0xf4)]);this[_0x115a15(0xdb)]['setConfig'](_0x338ff6,_0x7eace8);}[_0x5303cb(0x130)](){const _0x5f53e3=_0x5303cb;this[_0x5f53e3(0xfe)]['add']([_0x148309]),this['_injector'][_0x5f53e3(0x16c)]([_0x31e8a4]),this['_injector'][_0x5f53e3(0xe8)](_0x148309),this[_0x5f53e3(0xfe)][_0x5f53e3(0xe8)](_0x31e8a4),[_0xa4fa22,_0x4206c0][_0x5f53e3(0x120)](_0x1d2251=>this['disposeWithMe'](this[_0x5f53e3(0x14d)][_0x5f53e3(0xed)](_0x1d2251)));}};_0x32cefe(_0x25948b,_0x5303cb(0x170),_0x234203),_0x32cefe(_0x25948b,_0x5303cb(0x177),_0x442684),_0x32cefe(_0x25948b,_0x5303cb(0xec),_0x5515cf),_0x32cefe(_0x25948b,_0x5303cb(0x13d),_0x4fa0b7[_0x5303cb(0xdc)][_0x5303cb(0x16a)]),_0x25948b=_0x3f620c([(0x0,_0x4fa0b7[_0x5303cb(0xe4)])(_0x28db98[_0x5303cb(0xf7)],_0x458ca6[_0x5303cb(0x13a)]),_0x14659d(0x1,(0x0,_0x4fa0b7[_0x5303cb(0x136)])(_0x4fa0b7[_0x5303cb(0x139)])),_0x14659d(0x2,_0x4fa0b7[_0x5303cb(0x107)]),_0x14659d(0x3,_0x4fa0b7[_0x5303cb(0x106)])],_0x25948b),_0x423a45[_0x5303cb(0xfb)]=_0x334ff9,_0x423a45['DOCS_LATEX_CUSTOM_RANGE_KIND']=_0x185e44,_0x423a45[_0x5303cb(0x105)]='i',_0x423a45['DOCS_LATEX_PLUGIN']=_0x234203,_0x423a45[_0x5303cb(0x108)]=_0x338ff6,_0x423a45[_0x5303cb(0x13b)]=_0x148309,_0x423a45[_0x5303cb(0x12b)]=_0xa4fa22,Object[_0x5303cb(0x16e)](_0x423a45,'UniverDocsLatexPlugin',{'enumerable':!0x0,'get':function(){return _0x25948b;}}),_0x423a45['UpdateDocsLatexFormulaCommand']=_0x4206c0,_0x423a45[_0x5303cb(0x15b)]=_0x82e8ec,_0x423a45[_0x5303cb(0x115)]=_0x2abca2,_0x423a45[_0x5303cb(0x150)]=_0x389eaf,_0x423a45[_0x5303cb(0x14a)]=_0x2ae3fe,_0x423a45['getLatexFormulaPlaceholderText']=_0x59f55d,_0x423a45[_0x5303cb(0xef)]=_0x4e2fb9,_0x423a45[_0x5303cb(0xfd)]=_0x496149,_0x423a45[_0x5303cb(0xde)]=_0x13748c;}));
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@univerjs-pro/docs-latex",
|
|
3
|
+
"version": "1.0.0-insiders.20260707-70502d7",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "LaTeX formula model integration for Univer Docs.",
|
|
6
|
+
"author": "DreamNum Co., Ltd. <developer@univer.ai>",
|
|
7
|
+
"funding": {
|
|
8
|
+
"type": "opencollective",
|
|
9
|
+
"url": "https://opencollective.com/univer"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://univer.ai",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/dream-num/univer"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/dream-num/univer/issues"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"univer",
|
|
21
|
+
"univer-pro",
|
|
22
|
+
"docs",
|
|
23
|
+
"latex",
|
|
24
|
+
"plugin"
|
|
25
|
+
],
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"import": "./lib/es/index.js",
|
|
29
|
+
"require": "./lib/cjs/index.js",
|
|
30
|
+
"types": "./lib/types/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./*": {
|
|
33
|
+
"import": "./lib/es/*",
|
|
34
|
+
"require": "./lib/cjs/*",
|
|
35
|
+
"types": "./lib/types/index.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./facade": {
|
|
38
|
+
"import": "./lib/es/facade.js",
|
|
39
|
+
"require": "./lib/cjs/facade.js",
|
|
40
|
+
"types": "./lib/types/facade/index.d.ts"
|
|
41
|
+
},
|
|
42
|
+
"./lib/facade": {
|
|
43
|
+
"import": "./lib/es/facade.js",
|
|
44
|
+
"require": "./lib/cjs/facade.js",
|
|
45
|
+
"types": "./lib/types/facade/index.d.ts"
|
|
46
|
+
},
|
|
47
|
+
"./lib/*": "./lib/*"
|
|
48
|
+
},
|
|
49
|
+
"main": "./lib/es/index.js",
|
|
50
|
+
"types": "./lib/types/index.d.ts",
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"directories": {
|
|
55
|
+
"lib": "lib"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"lib"
|
|
59
|
+
],
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"rxjs": ">=7.0.0"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@univerjs-pro/license": "1.0.0-insiders.20260707-70502d7",
|
|
65
|
+
"@univerjs/core": "1.0.0-insiders.20260707-70502d7",
|
|
66
|
+
"@univerjs/docs": "1.0.0-insiders.20260707-70502d7"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"rxjs": "7.8.2",
|
|
70
|
+
"typescript": "^6.0.3",
|
|
71
|
+
"vitest": "^4.1.9",
|
|
72
|
+
"@univerjs-infra/shared": "1.0.0-alpha.2"
|
|
73
|
+
},
|
|
74
|
+
"scripts": {
|
|
75
|
+
"test": "vitest run",
|
|
76
|
+
"test:watch": "vitest",
|
|
77
|
+
"coverage": "vitest run --coverage",
|
|
78
|
+
"typecheck": "tsc --noEmit",
|
|
79
|
+
"build:bundle": "univer-cli build",
|
|
80
|
+
"build:types": "tsc -p tsconfig.node.json",
|
|
81
|
+
"build": "pnpm run build:bundle && pnpm run build:types"
|
|
82
|
+
},
|
|
83
|
+
"module": "./lib/es/index.js"
|
|
84
|
+
}
|