@univerjs-pro/docs-code 1.0.0-alpha.1 → 1.0.0-alpha.3
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 +7 -1
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/commands/code.command.d.ts +40 -0
- package/lib/types/common/actions.d.ts +48 -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 +15 -0
- package/lib/types/config/config.d.ts +5 -0
- package/lib/types/controllers/docs-code-resource.controller.d.ts +8 -0
- package/lib/types/facade/f-document-code.d.ts +150 -0
- package/lib/types/facade/f-document.d.ts +132 -0
- package/lib/types/facade/index.d.ts +3 -0
- package/lib/types/facade/types.d.ts +26 -0
- package/lib/types/index.d.ts +8 -0
- package/lib/types/models/docs-code-model.d.ts +18 -0
- package/lib/types/plugin.d.ts +14 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +6 -6
package/lib/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x13b9b5=_0xe05e;(function(_0x1aca92,_0x4d48ea){var _0x39f633=_0xe05e,_0x4f23fb=_0x1aca92();while(!![]){try{var _0x6cda75=parseInt(_0x39f633(0x18d))/0x1+parseInt(_0x39f633(0x185))/0x2*(-parseInt(_0x39f633(0x1a0))/0x3)+parseInt(_0x39f633(0x1ae))/0x4*(parseInt(_0x39f633(0x17e))/0x5)+parseInt(_0x39f633(0x189))/0x6*(parseInt(_0x39f633(0x187))/0x7)+-parseInt(_0x39f633(0x19f))/0x8*(-parseInt(_0x39f633(0x1b2))/0x9)+-parseInt(_0x39f633(0x1b6))/0xa*(parseInt(_0x39f633(0x17b))/0xb)+-parseInt(_0x39f633(0x17f))/0xc;if(_0x6cda75===_0x4d48ea)break;else _0x4f23fb['push'](_0x4f23fb['shift']());}catch(_0x4eb3ba){_0x4f23fb['push'](_0x4f23fb['shift']());}}}(_0x1227,0x8889a));import{DocsCodeCancelEmptyParagraphCommand as _0x43121c,DocsCodeExitCommand as _0x227b78,DocsCodeInsertCommand as _0x19049a,DocsCodeModel as _0x317f80,DocsCodeUpdateCommand as _0xa7f6d0,normalizeDocsCodeConfig as _0x249552}from'@univerjs-pro/docs-code';import{DataStreamTreeTokenType as _0x2dbdf7,DocumentBlockRangeType as _0x4df84b,ICommandService as _0x593bc2,Inject as _0x33b9d8,Injector as _0xa34ccd,generateRandomId as _0xeecacd}from'@univerjs/core';import{FDocument as _0x29e282}from'@univerjs/docs/facade';function p(_0x101e6b){'@babel/helpers - typeof';var _0x4575dc=_0xe05e;return p=typeof Symbol==_0x4575dc(0x1af)&&typeof Symbol['iterator']=='symbol'?function(_0x50e854){return typeof _0x50e854;}:function(_0x4df84a){var _0x389846=_0x4575dc;return _0x4df84a&&typeof Symbol==_0x389846(0x1af)&&_0x4df84a[_0x389846(0x1b0)]===Symbol&&_0x4df84a!==Symbol[_0x389846(0x1b1)]?_0x389846(0x1a8):typeof _0x4df84a;},p(_0x101e6b);}function m(_0x5a8f8a,_0x491895){var _0x5562ca=_0xe05e;if(p(_0x5a8f8a)!=_0x5562ca(0x179)||!_0x5a8f8a)return _0x5a8f8a;var _0x3a92f9=_0x5a8f8a[Symbol['toPrimitive']];if(_0x3a92f9!==void 0x0){var _0x57d9b6=_0x3a92f9[_0x5562ca(0x180)](_0x5a8f8a,_0x491895||_0x5562ca(0x1a5));if(p(_0x57d9b6)!=_0x5562ca(0x179))return _0x57d9b6;throw TypeError(_0x5562ca(0x19c));}return(_0x491895===_0x5562ca(0x190)?String:Number)(_0x5a8f8a);}function h(_0x14c418){var _0x3740c0=_0xe05e,_0x90c01f=m(_0x14c418,_0x3740c0(0x190));return p(_0x90c01f)==_0x3740c0(0x1a8)?_0x90c01f:_0x90c01f+'';}function g(_0x40a584,_0x75b4dd,_0x2417f3){var _0x1dfc20=_0xe05e;return(_0x75b4dd=h(_0x75b4dd))in _0x40a584?Object[_0x1dfc20(0x196)](_0x40a584,_0x75b4dd,{'value':_0x2417f3,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x40a584[_0x75b4dd]=_0x2417f3,_0x40a584;}function _0x1227(){var _0x5a166d=['_getBlockRange','syncExecuteCommand','28330GmbhnM','decorate','from','some','includes','getId','PARAGRAPH','getCode','object','blockRanges','3586hcmCOj','text','_unitId','3355FfOFvG','3880548GPaDcX','call','_document','findCodes','createInstance','blockId','2gwXRxf','getKey','22281cKEDqV','length','426vBOhvK','_createFDocumentCode','filter','extend','248175BaVBwm','getConfig','save','string','endIndex','_getDocumentData','cancelEmptyParagraph','get','config','defineProperty','CODE','getType','_blockId','BLOCK_END','getRange','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','paragraph','exitCode','7631056sNBjjj','61287mczrPU','describe','blockType','_getBlockRanges','body','default','exit','find','symbol','getText','BLOCK_START','map','_injector','startIndex','2376wKQqYW','function','constructor','prototype','9noLGHd','SECTION_BREAK'];_0x1227=function(){return _0x5a166d;};return _0x1227();}function _(_0x24aabb,_0x218973){return function(_0x59f4ab,_0x4e280b){_0x218973(_0x59f4ab,_0x4e280b,_0x24aabb);};}function v(_0x2cc221,_0x33dc2a,_0x57ce93,_0x202e9a){var _0x4708a2=_0xe05e,_0x4887f2=arguments[_0x4708a2(0x188)],_0x413f8a=_0x4887f2<0x3?_0x33dc2a:_0x202e9a===null?_0x202e9a=Object['getOwnPropertyDescriptor'](_0x33dc2a,_0x57ce93):_0x202e9a,_0x316bd4;if(typeof Reflect==_0x4708a2(0x179)&&typeof Reflect[_0x4708a2(0x1b7)]=='function')_0x413f8a=Reflect[_0x4708a2(0x1b7)](_0x2cc221,_0x33dc2a,_0x57ce93,_0x202e9a);else{for(var _0xfed88b=_0x2cc221[_0x4708a2(0x188)]-0x1;_0xfed88b>=0x0;_0xfed88b--)(_0x316bd4=_0x2cc221[_0xfed88b])&&(_0x413f8a=(_0x4887f2<0x3?_0x316bd4(_0x413f8a):_0x4887f2>0x3?_0x316bd4(_0x33dc2a,_0x57ce93,_0x413f8a):_0x316bd4(_0x33dc2a,_0x57ce93))||_0x413f8a);}return _0x4887f2>0x3&&_0x413f8a&&Object['defineProperty'](_0x33dc2a,_0x57ce93,_0x413f8a),_0x413f8a;}function _0xe05e(_0x534f69,_0x3fa108){_0x534f69=_0x534f69-0x176;var _0x122778=_0x1227();var _0xe05ea6=_0x122778[_0x534f69];return _0xe05ea6;}let y=class{constructor(_0x2bae20,_0x128ba0,_0x175393){var _0x8fdd1c=_0xe05e;this[_0x8fdd1c(0x181)]=_0x2bae20,this[_0x8fdd1c(0x199)]=_0x128ba0,this[_0x8fdd1c(0x1ac)]=_0x175393,g(this,_0x8fdd1c(0x17d),void 0x0),this[_0x8fdd1c(0x17d)]=this[_0x8fdd1c(0x181)]['getId']();}['getId'](){var _0x5767c1=_0xe05e;return this[_0x5767c1(0x199)];}[_0x13b9b5(0x19b)](){var _0x35d72d=_0x13b9b5;let _0x5a3235=this[_0x35d72d(0x1b4)]();return _0x5a3235?{'blockId':_0x5a3235[_0x35d72d(0x184)],'endIndex':_0x5a3235[_0x35d72d(0x191)],'startIndex':_0x5a3235[_0x35d72d(0x1ad)]}:null;}['getText'](){var _0x598430=_0x13b9b5,_0x47bf03;let _0x13c9dc=this[_0x598430(0x1b4)](),_0x4e2505=(_0x47bf03=this[_0x598430(0x192)]()[_0x598430(0x1a4)])==null?void 0x0:_0x47bf03['dataStream'];return!_0x13c9dc||!_0x4e2505?'':b(_0x4e2505['slice'](_0x13c9dc['startIndex']+0x1,_0x13c9dc[_0x598430(0x191)]));}[_0x13b9b5(0x1a1)](){var _0x557286=_0x13b9b5;let _0x56e0e2=this[_0x557286(0x19b)]();return _0x56e0e2?{..._0x56e0e2,'config':this[_0x557286(0x18e)](),'text':this[_0x557286(0x1a9)](),'type':_0x4df84b['CODE']}:null;}[_0x13b9b5(0x18e)](){var _0x58788f=_0x13b9b5;return _0x249552(this[_0x58788f(0x1ac)][_0x58788f(0x194)](_0x317f80)['getCodeConfig'](this[_0x58788f(0x17d)],this['_blockId']));}['updateConfig'](_0x3c44dc){var _0xd4f098=_0x13b9b5;return this['_injector']['get'](_0x593bc2)[_0xd4f098(0x1b5)](_0xa7f6d0['id'],{'blockId':this[_0xd4f098(0x199)],'config':_0x3c44dc[_0xd4f098(0x195)],'unitId':this[_0xd4f098(0x17d)]});}[_0x13b9b5(0x1a6)](_0x57b48c){var _0x503cbf=_0x13b9b5;return this[_0x503cbf(0x1ac)]['get'](_0x593bc2)[_0x503cbf(0x1b5)](_0x227b78['id'],{'cursorOffset':_0x57b48c,'unitId':this[_0x503cbf(0x17d)]});}[_0x13b9b5(0x193)](_0x12a500={}){var _0x559450=_0x13b9b5;return this['_injector']['get'](_0x593bc2)['syncExecuteCommand'](_0x43121c['id'],{..._0x12a500,'unitId':this[_0x559450(0x17d)]});}[_0x13b9b5(0x192)](){var _0x1d7a38=_0x13b9b5;return this[_0x1d7a38(0x181)][_0x1d7a38(0x18f)]();}['_getBlockRange'](){var _0x2d07a1=_0x13b9b5,_0x5a6793;let _0x5d4d35=(_0x5a6793=this[_0x2d07a1(0x192)]()['body'])==null||(_0x5a6793=_0x5a6793[_0x2d07a1(0x17a)])==null?void 0x0:_0x5a6793[_0x2d07a1(0x1a7)](_0x1b3780=>_0x1b3780['blockId']===this[_0x2d07a1(0x199)]&&_0x1b3780[_0x2d07a1(0x1a2)]===_0x4df84b[_0x2d07a1(0x197)]);return _0x5d4d35==null?null:_0x5d4d35;}};y=v([_(0x2,_0x33b9d8(_0xa34ccd))],y);function b(_0x33a668){var _0x468592=_0x13b9b5;return Array[_0x468592(0x1b8)](_0x33a668)[_0x468592(0x1ab)](_0x871d31=>_0x871d31===_0x2dbdf7[_0x468592(0x177)]?'\x0a':_0x871d31)[_0x468592(0x18b)](_0x1ce9bd=>_0x1ce9bd!==_0x2dbdf7[_0x468592(0x1aa)]&&_0x1ce9bd!==_0x2dbdf7[_0x468592(0x19a)]&&_0x1ce9bd!==_0x2dbdf7[_0x468592(0x1b3)])['join']('')['replace'](/\n$/,'');}var x=class extends _0x29e282{['getCodes'](){var _0x1c0bc7=_0x13b9b5;return this[_0x1c0bc7(0x1a3)]()[_0x1c0bc7(0x18b)](_0x47f5a8=>_0x47f5a8[_0x1c0bc7(0x1a2)]===_0x4df84b['CODE'])[_0x1c0bc7(0x1ab)](_0x5c62b5=>this[_0x1c0bc7(0x18a)](_0x5c62b5[_0x1c0bc7(0x184)]));}[_0x13b9b5(0x178)](_0x2b5a8a){var _0x1034f8=_0x13b9b5;return this[_0x1034f8(0x1a3)]()[_0x1034f8(0x1b9)](_0x3e6bcc=>_0x3e6bcc[_0x1034f8(0x184)]===_0x2b5a8a&&_0x3e6bcc[_0x1034f8(0x1a2)]===_0x4df84b[_0x1034f8(0x197)])?this[_0x1034f8(0x18a)](_0x2b5a8a):null;}['getCodeAt'](_0x70ee62){var _0x1c2084=_0x13b9b5;let _0x5627cd=this[_0x1c2084(0x1a3)]()[_0x1c2084(0x1a7)](_0x147d27=>_0x147d27['blockType']===_0x4df84b[_0x1c2084(0x197)]&&_0x147d27[_0x1c2084(0x1ad)]<=_0x70ee62&&_0x70ee62<=_0x147d27[_0x1c2084(0x191)]);return _0x5627cd?this[_0x1c2084(0x18a)](_0x5627cd[_0x1c2084(0x184)]):null;}['findCodeByText'](_0x53db5d){var _0x28e3af=_0x13b9b5,_0x20617e;return(_0x20617e=this[_0x28e3af(0x182)](_0x53db5d)[0x0])==null?null:_0x20617e;}[_0x13b9b5(0x182)](_0x35a31e){var _0x477ebe=_0x13b9b5;let _0x5329d1=typeof _0x35a31e==_0x477ebe(0x190)?{'text':_0x35a31e}:_0x35a31e;return this['getCodes']()[_0x477ebe(0x18b)](_0x42dad2=>!(_0x5329d1[_0x477ebe(0x184)]&&_0x42dad2['getId']()!==_0x5329d1[_0x477ebe(0x184)]||_0x5329d1['text']&&!_0x42dad2[_0x477ebe(0x1a9)]()[_0x477ebe(0x1ba)](_0x5329d1[_0x477ebe(0x17c)])));}['insertCode'](_0x3e88eb={},_0x4ddb38={}){var _0x19f55b=_0x13b9b5,_0x1baf31;let _0x341aa8=this['_injector'][_0x19f55b(0x194)](_0x593bc2),_0x59467b=S(_0x3e88eb)?{..._0x4ddb38,...C(_0x3e88eb)}:_0x3e88eb,_0xc80b0d=(_0x1baf31=_0x59467b[_0x19f55b(0x184)])==null?_0xeecacd(0x6):_0x1baf31;return _0x341aa8[_0x19f55b(0x1b5)](_0x19049a['id'],{..._0x59467b,'blockId':_0xc80b0d,'unitId':this['getId']()})?this[_0x19f55b(0x18a)](_0xc80b0d):null;}[_0x13b9b5(0x19e)](_0x4c9e17){var _0x1ec007=_0x13b9b5;return this[_0x1ec007(0x1ac)]['get'](_0x593bc2)[_0x1ec007(0x1b5)](_0x227b78['id'],{'cursorOffset':_0x4c9e17,'unitId':this[_0x1ec007(0x176)]()});}['cancelEmptyCodeParagraph'](_0xafc974={}){var _0x246820=_0x13b9b5;return this[_0x246820(0x1ac)]['get'](_0x593bc2)[_0x246820(0x1b5)](_0x43121c['id'],{..._0xafc974,'unitId':this[_0x246820(0x176)]()});}['_getBlockRanges'](){var _0x5ce413=_0x13b9b5,_0x3919aa,_0x5a7000;return(_0x3919aa=(_0x5a7000=this['save']()[_0x5ce413(0x1a4)])==null?void 0x0:_0x5a7000['blockRanges'])==null?[]:_0x3919aa;}[_0x13b9b5(0x18a)](_0x478f88){var _0x29e9e1=_0x13b9b5;return this[_0x29e9e1(0x1ac)][_0x29e9e1(0x183)](y,this,_0x478f88);}};function S(_0x1d4a06){var _0x145e75=_0x13b9b5;return typeof _0x1d4a06==_0x145e75(0x179)&&!!_0x1d4a06&&typeof _0x1d4a06[_0x145e75(0x186)]=='function'&&typeof _0x1d4a06[_0x145e75(0x19b)]=='function'&&typeof _0x1d4a06[_0x145e75(0x198)]==_0x145e75(0x1af)&&_0x1d4a06[_0x145e75(0x198)]()===_0x145e75(0x19d);}function C(_0x54462d){var _0x309448=_0x13b9b5;return _0x54462d[_0x309448(0x19b)]();}_0x29e282[_0x13b9b5(0x18c)](x);export{y as FDocumentCode};
|
|
1
|
+
var _0x21f9d7=_0xb3b5;(function(_0x136a9d,_0x31ea9f){var _0x50bfd4=_0xb3b5,_0x184fa1=_0x136a9d();while(!![]){try{var _0x709443=parseInt(_0x50bfd4(0x120))/0x1*(-parseInt(_0x50bfd4(0x12a))/0x2)+-parseInt(_0x50bfd4(0x132))/0x3+-parseInt(_0x50bfd4(0x14d))/0x4+parseInt(_0x50bfd4(0x122))/0x5*(parseInt(_0x50bfd4(0x14e))/0x6)+-parseInt(_0x50bfd4(0x15b))/0x7+-parseInt(_0x50bfd4(0x135))/0x8+parseInt(_0x50bfd4(0x15a))/0x9*(parseInt(_0x50bfd4(0x14f))/0xa);if(_0x709443===_0x31ea9f)break;else _0x184fa1['push'](_0x184fa1['shift']());}catch(_0x3839ba){_0x184fa1['push'](_0x184fa1['shift']());}}}(_0x3526,0x2db36));import{DocsCodeInsertCommand as _0x358215,DocsCodeModel as _0x2c79a4,DocsCodeRemoveCommand as _0x14fe8e,DocsCodeUnwrapCommand as _0x306de8,DocsCodeUpdateCommand as _0x2beb5e,normalizeDocsCodeConfig as _0x5fefb0}from'@univerjs-pro/docs-code';import{DataStreamTreeTokenType as _0x47506a,DocumentBlockRangeType as _0x326870,ICommandService as _0xf58cc2,Inject as _0x52ea02,Injector as _0x1bd855,generateRandomId as _0x5a8ddf}from'@univerjs/core';import{FDocument as _0x15d3c3,isParagraphFacade as _0xd81cbb}from'@univerjs/docs/facade';function m(_0x2f8da7){'@babel/helpers - typeof';var _0x2d81fc=_0xb3b5;return m=typeof Symbol==_0x2d81fc(0x121)&&typeof Symbol[_0x2d81fc(0x11e)]=='symbol'?function(_0x230299){return typeof _0x230299;}:function(_0x4dbcbd){var _0x195734=_0x2d81fc;return _0x4dbcbd&&typeof Symbol=='function'&&_0x4dbcbd[_0x195734(0x157)]===Symbol&&_0x4dbcbd!==Symbol[_0x195734(0x131)]?'symbol':typeof _0x4dbcbd;},m(_0x2f8da7);}function h(_0x51cd06,_0x3cc9ac){var _0x20a5bd=_0xb3b5;if(m(_0x51cd06)!=_0x20a5bd(0x151)||!_0x51cd06)return _0x51cd06;var _0x2655db=_0x51cd06[Symbol[_0x20a5bd(0x153)]];if(_0x2655db!==void 0x0){var _0x125e76=_0x2655db[_0x20a5bd(0x15f)](_0x51cd06,_0x3cc9ac||_0x20a5bd(0x144));if(m(_0x125e76)!=_0x20a5bd(0x151))return _0x125e76;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x3cc9ac===_0x20a5bd(0x154)?String:Number)(_0x51cd06);}function g(_0x183bcc){var _0x4d59f3=_0xb3b5,_0x11e962=h(_0x183bcc,_0x4d59f3(0x154));return m(_0x11e962)==_0x4d59f3(0x145)?_0x11e962:_0x11e962+'';}function _(_0x31e481,_0x4ae7c7,_0x5ef65b){var _0x88a71e=_0xb3b5;return(_0x4ae7c7=g(_0x4ae7c7))in _0x31e481?Object[_0x88a71e(0x150)](_0x31e481,_0x4ae7c7,{'value':_0x5ef65b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x31e481[_0x4ae7c7]=_0x5ef65b,_0x31e481;}function v(_0x4d5b7c,_0x1becb7){return function(_0x78bb4f,_0xc1aeb9){_0x1becb7(_0x78bb4f,_0xc1aeb9,_0x4d5b7c);};}function y(_0x3024ad,_0x27d792,_0x4b9583,_0x461185){var _0x4863eb=_0xb3b5,_0x2656fd=arguments[_0x4863eb(0x139)],_0x154067=_0x2656fd<0x3?_0x27d792:_0x461185===null?_0x461185=Object[_0x4863eb(0x123)](_0x27d792,_0x4b9583):_0x461185,_0x2e7e7e;if(typeof Reflect==_0x4863eb(0x151)&&typeof Reflect['decorate']==_0x4863eb(0x121))_0x154067=Reflect['decorate'](_0x3024ad,_0x27d792,_0x4b9583,_0x461185);else{for(var _0x3dad05=_0x3024ad[_0x4863eb(0x139)]-0x1;_0x3dad05>=0x0;_0x3dad05--)(_0x2e7e7e=_0x3024ad[_0x3dad05])&&(_0x154067=(_0x2656fd<0x3?_0x2e7e7e(_0x154067):_0x2656fd>0x3?_0x2e7e7e(_0x27d792,_0x4b9583,_0x154067):_0x2e7e7e(_0x27d792,_0x4b9583))||_0x154067);}return _0x2656fd>0x3&&_0x154067&&Object[_0x4863eb(0x150)](_0x27d792,_0x4b9583,_0x154067),_0x154067;}function _0xb3b5(_0x2a70b7,_0xd90a04){_0x2a70b7=_0x2a70b7-0x11e;var _0x3526c9=_0x3526();var _0xb3b53c=_0x3526c9[_0x2a70b7];return _0xb3b53c;}let b=class{constructor(_0xb06171,_0x6655fb,_0x2745b7){var _0x480a89=_0xb3b5;this[_0x480a89(0x148)]=_0xb06171,this[_0x480a89(0x13b)]=_0x6655fb,this['_injector']=_0x2745b7,_(this,_0x480a89(0x126),void 0x0),this[_0x480a89(0x126)]=this[_0x480a89(0x148)]['getId']();}[_0x21f9d7(0x15e)](){var _0x232a36=_0x21f9d7;return this[_0x232a36(0x13b)];}[_0x21f9d7(0x129)](){var _0x2104b6=_0x21f9d7;let _0x1d1a4b=this[_0x2104b6(0x124)]();return _0x1d1a4b?{'blockId':_0x1d1a4b[_0x2104b6(0x12b)],'endIndex':_0x1d1a4b['endIndex'],'startIndex':_0x1d1a4b[_0x2104b6(0x137)]}:null;}['getText'](){var _0x26bf9a=_0x21f9d7,_0x37a64d;let _0x2b6d8d=this[_0x26bf9a(0x124)](),_0x3cdeb4=(_0x37a64d=this['_getDocumentData']()[_0x26bf9a(0x11f)])==null?void 0x0:_0x37a64d[_0x26bf9a(0x14c)];return!_0x2b6d8d||!_0x3cdeb4?'':x(_0x3cdeb4[_0x26bf9a(0x14b)](_0x2b6d8d['startIndex']+0x1,_0x2b6d8d['endIndex']));}['describe'](){var _0x38ff75=_0x21f9d7;let _0x3cabf8=this['getRange']();return _0x3cabf8?{..._0x3cabf8,'config':this[_0x38ff75(0x14a)](),'text':this[_0x38ff75(0x152)](),'type':_0x326870[_0x38ff75(0x12d)]}:null;}[_0x21f9d7(0x14a)](){var _0x2216c8=_0x21f9d7;return _0x5fefb0(this['_injector']['get'](_0x2c79a4)[_0x2216c8(0x133)](this[_0x2216c8(0x126)],this['_blockId']));}['updateConfig'](_0x35e2db){var _0x32b7c4=_0x21f9d7;return this[_0x32b7c4(0x13c)][_0x32b7c4(0x160)](_0xf58cc2)['syncExecuteCommand'](_0x2beb5e['id'],{'blockId':this[_0x32b7c4(0x13b)],'config':_0x35e2db['config'],'unitId':this['_unitId']});}[_0x21f9d7(0x127)](){var _0x2e08bd=_0x21f9d7;return this['_injector'][_0x2e08bd(0x160)](_0xf58cc2)['syncExecuteCommand'](_0x306de8['id'],{'blockId':this[_0x2e08bd(0x13b)],'unitId':this['_unitId']});}[_0x21f9d7(0x13d)](){var _0x14f7c3=_0x21f9d7;return this[_0x14f7c3(0x13c)][_0x14f7c3(0x160)](_0xf58cc2)[_0x14f7c3(0x143)](_0x14fe8e['id'],{'blockId':this[_0x14f7c3(0x13b)],'unitId':this[_0x14f7c3(0x126)]});}['_getBlockRange'](){var _0x2bf91c=_0x21f9d7,_0x144953;let _0x1857d3=(_0x144953=this[_0x2bf91c(0x125)]()[_0x2bf91c(0x11f)])==null||(_0x144953=_0x144953[_0x2bf91c(0x149)])==null?void 0x0:_0x144953[_0x2bf91c(0x12c)](_0x434605=>_0x434605[_0x2bf91c(0x12b)]===this[_0x2bf91c(0x13b)]&&_0x434605[_0x2bf91c(0x161)]===_0x326870[_0x2bf91c(0x12d)]);return _0x1857d3==null?null:_0x1857d3;}['_getDocumentData'](){var _0x25d7ef=_0x21f9d7;return this[_0x25d7ef(0x148)][_0x25d7ef(0x141)]();}};b=y([v(0x2,_0x52ea02(_0x1bd855))],b);function x(_0x17e6ee){var _0x45e2dd=_0x21f9d7;return Array[_0x45e2dd(0x147)](_0x17e6ee)['map'](_0x44986f=>_0x44986f===_0x47506a[_0x45e2dd(0x146)]?'\x0a':_0x44986f)[_0x45e2dd(0x128)](_0x3e07de=>_0x3e07de!==_0x47506a[_0x45e2dd(0x142)]&&_0x3e07de!==_0x47506a[_0x45e2dd(0x140)]&&_0x3e07de!==_0x47506a[_0x45e2dd(0x15c)])['join']('')['replace'](/\n$/,'');}var S=class extends _0x15d3c3{['getCodes'](){var _0x5a0bf2=_0x21f9d7;return this['_getBlockRanges']()[_0x5a0bf2(0x128)](_0x5799ac=>_0x5799ac['blockType']===_0x326870[_0x5a0bf2(0x12d)])[_0x5a0bf2(0x15d)](_0x22c4b3=>this['_createFDocumentCode'](_0x22c4b3[_0x5a0bf2(0x12b)]));}['getCode'](_0x4a239f){var _0x2e589d=_0x21f9d7;return this[_0x2e589d(0x156)]()[_0x2e589d(0x155)](_0x1704b9=>_0x1704b9[_0x2e589d(0x12b)]===_0x4a239f&&_0x1704b9['blockType']===_0x326870['CODE'])?this[_0x2e589d(0x136)](_0x4a239f):null;}[_0x21f9d7(0x13e)](_0x44f076){var _0x5d2538=_0x21f9d7;let _0x22b50d=this[_0x5d2538(0x156)]()[_0x5d2538(0x12c)](_0x3071e1=>_0x3071e1[_0x5d2538(0x161)]===_0x326870[_0x5d2538(0x12d)]&&_0x3071e1[_0x5d2538(0x137)]<=_0x44f076&&_0x44f076<=_0x3071e1[_0x5d2538(0x13a)]);return _0x22b50d?this['_createFDocumentCode'](_0x22b50d[_0x5d2538(0x12b)]):null;}[_0x21f9d7(0x158)](_0x496073){var _0x269eba=_0x21f9d7,_0x280215;return(_0x280215=this[_0x269eba(0x134)](_0x496073)[0x0])==null?null:_0x280215;}[_0x21f9d7(0x134)](_0x192539){var _0x8ef4c8=_0x21f9d7;let _0x31f59e=typeof _0x192539==_0x8ef4c8(0x154)?{'text':_0x192539}:_0x192539;return this[_0x8ef4c8(0x13f)]()[_0x8ef4c8(0x128)](_0x3f0a99=>!(_0x31f59e[_0x8ef4c8(0x12b)]&&_0x3f0a99[_0x8ef4c8(0x15e)]()!==_0x31f59e[_0x8ef4c8(0x12b)]||_0x31f59e[_0x8ef4c8(0x12e)]&&!_0x3f0a99[_0x8ef4c8(0x152)]()[_0x8ef4c8(0x12f)](_0x31f59e[_0x8ef4c8(0x12e)])));}['insertCode'](_0x4d6ced={},_0x28945d={}){var _0x2a1411=_0x21f9d7,_0x5f5bf3;let _0x4e7db5=this['_injector'][_0x2a1411(0x160)](_0xf58cc2),_0x1cd93e=_0xd81cbb(_0x4d6ced)?{..._0x28945d,..._0x4d6ced[_0x2a1411(0x129)]()}:_0x4d6ced,_0x3f295f=(_0x5f5bf3=_0x1cd93e[_0x2a1411(0x12b)])==null?_0x5a8ddf(0x6):_0x5f5bf3;return _0x4e7db5['syncExecuteCommand'](_0x358215['id'],{..._0x1cd93e,'blockId':_0x3f295f,'unitId':this['getId']()})?this[_0x2a1411(0x138)](_0x3f295f):null;}[_0x21f9d7(0x156)](){var _0x3f33f9=_0x21f9d7,_0x5a6c54,_0x17967b;return(_0x5a6c54=(_0x17967b=this[_0x3f33f9(0x141)]()[_0x3f33f9(0x11f)])==null?void 0x0:_0x17967b['blockRanges'])==null?[]:_0x5a6c54;}[_0x21f9d7(0x136)](_0x5784bc){var _0x3e52a0=_0x21f9d7;return this[_0x3e52a0(0x13c)][_0x3e52a0(0x130)](b,this,_0x5784bc);}};_0x15d3c3[_0x21f9d7(0x159)](S);export{b as FDocumentCode};function _0x3526(){var _0x293c7f=['423504XmfxQd','_createFDocumentCode','startIndex','getCode','length','endIndex','_blockId','_injector','remove','getCodeAt','getCodes','BLOCK_END','save','BLOCK_START','syncExecuteCommand','default','symbol','PARAGRAPH','from','_document','blockRanges','getConfig','slice','dataStream','629052eEHgMb','6YvIucP','109290BuciWC','defineProperty','object','getText','toPrimitive','string','some','_getBlockRanges','constructor','findCodeByText','extend','531obTGlT','1285620AmwrXG','SECTION_BREAK','map','getId','call','get','blockType','iterator','body','474lqBRDi','function','275895nPWnNL','getOwnPropertyDescriptor','_getBlockRange','_getDocumentData','_unitId','unwrap','filter','getRange','238vARCbV','blockId','find','CODE','text','includes','createInstance','prototype','187599pqvFFB','getCodeConfig','findCodes'];_0x3526=function(){return _0x293c7f;};return _0x3526();}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4a8a2d=_0x28c9;(function(_0x33c0ef,_0x4e7947){const _0x4b3364=_0x28c9,_0x3719a4=_0x33c0ef();while(!![]){try{const _0x5996e2=-parseInt(_0x4b3364(0x1d9))/0x1*(-parseInt(_0x4b3364(0x1ce))/0x2)+parseInt(_0x4b3364(0x203))/0x3*(-parseInt(_0x4b3364(0x208))/0x4)+parseInt(_0x4b3364(0x1b6))/0x5*(-parseInt(_0x4b3364(0x22d))/0x6)+parseInt(_0x4b3364(0x209))/0x7*(-parseInt(_0x4b3364(0x1b9))/0x8)+parseInt(_0x4b3364(0x231))/0x9+-parseInt(_0x4b3364(0x21b))/0xa+parseInt(_0x4b3364(0x1d0))/0xb*(parseInt(_0x4b3364(0x1e8))/0xc);if(_0x5996e2===_0x4e7947)break;else _0x3719a4['push'](_0x3719a4['shift']());}catch(_0x59c62f){_0x3719a4['push'](_0x3719a4['shift']());}}}(_0x58a1,0x5beda));import{BuildTextUtils as _0x24fe28,CommandType as _0x20b98a,DataStreamTreeTokenType as _0x3ba019,DependentOn as _0xb86e0,Disposable as _0x3e8f03,DocumentBlockRangeType as _0x54e1d3,ICommandService as _0x3735ed,IConfigService as _0x42560c,IResourceManagerService as _0x3f714d,IUniverInstanceService as _0x3abeac,Inject as _0x4628b1,Injector as _0x531f72,JSONX as _0x2387fb,Plugin as _0x5357ad,Tools as _0xb48f1,UniverInstanceType as _0x2bb6f5,createParagraphId as _0x34e429,generateRandomId as _0x97c26f,merge as _0x3de4b6}from'@univerjs/core';import{DocContentInsertService as _0x2040aa,DocSelectionManagerService as _0x291a89,RichTextEditingMutation as _0x4297bb,UniverDocsPlugin as _0x1f5d37}from'@univerjs/docs';import{Subject as _0x363e20}from'rxjs';import{UniverLicensePlugin as _0x141bd9}from'@univerjs-pro/license';const S={'language':_0x4a8a2d(0x1f2),'showLineNumbers':!0x1,'tabSize':0x4,'wrap':!0x0};function C(_0x485bad){return{...S,..._0x485bad};}function w(_0x194da7){const _0x516533=_0x4a8a2d;var _0x1d5729;let _0x5a3d1f=(_0x1d5729=_0x194da7==null?void 0x0:_0x194da7['codes'])==null?{}:_0x1d5729;return{'codes':Object['fromEntries'](Object['entries'](_0x5a3d1f)[_0x516533(0x1c6)](([_0x23b746,_0x4926ac])=>[_0x23b746,C(_0x4926ac)]))};}function T(_0x56bf6f,_0x2b78f7,_0x2c447a){const _0x52d863=_0x4a8a2d;let _0xdb2ca7=w(_0x56bf6f);return _0xdb2ca7[_0x52d863(0x1cb)][_0x2b78f7]=C({..._0xdb2ca7['codes'][_0x2b78f7],..._0x2c447a}),_0xdb2ca7;}function re(_0x5c91e9,_0x22410c){let _0x2653fb=w(_0x5c91e9);return delete _0x2653fb['codes'][_0x22410c],_0x2653fb;}const ie=_0x4a8a2d(0x1f8);function ae(_0x151d84){const _0x5a812b=_0x4a8a2d;var _0x36a4f9,_0xafde3b,_0x5a0ce7;let _0x167a80=D(_0x151d84[_0x5a812b(0x21a)]),_0x24b65b=O(_0x167a80),_0x5d4611=se(_0x151d84[_0x5a812b(0x20a)],_0x151d84['endOffset']),_0x298645=_0x5d4611?(_0x36a4f9=_0x24b65b[_0x5a812b(0x1c1)])==null?void 0x0:_0x36a4f9[_0x5a812b(0x23a)](_0xbcb53=>_0xbcb53['startIndex']===_0x5d4611[_0x5a812b(0x20a)]&&_0xbcb53[_0x5a812b(0x1bd)]+0x1===_0x5d4611[_0x5a812b(0x227)]):void 0x0,{startOffset:_0x5ca80c,endOffset:_0x1ebe75}=_0x298645?_0x5d4611:ye(_0x24b65b,_0x151d84[_0x5a812b(0x20a)],_0x151d84[_0x5a812b(0x227)]),_0x50afb5=Se(_0x24b65b,_0x5ca80c,_0x1ebe75),_0x34c30c=(_0xafde3b=_0x298645==null?void 0x0:_0x298645['blockId'])==null?_0x151d84[_0x5a812b(0x1e4)]:_0xafde3b,_0x1606b8=T(_0x151d84[_0x5a812b(0x1bc)],_0x34c30c,{...S,..._0x151d84[_0x5a812b(0x211)]});if(_0x298645)return _0x298645[_0x5a812b(0x1f4)]=_0x54e1d3[_0x5a812b(0x200)],oe(_0x24b65b,_0x5ca80c,_0x1ebe75),he(_0x24b65b,_0x5ca80c,_0x1ebe75,_0x50afb5),M(_0x24b65b,_0x298645),{'nextDocumentData':_0x167a80,'nextMetadata':_0x1606b8,'cursorOffset':_0x5ca80c+0x1};if(_0x5ca80c===_0x1ebe75){var _0x5cbb11,_0x5960e9;let _0x3e4e1c=''+_0x3ba019[_0x5a812b(0x234)]+_0x3ba019[_0x5a812b(0x225)]+_0x3ba019['BLOCK_END'];N(_0x24b65b,_0x5ca80c,_0x3e4e1c,{'paragraphs':[{'startIndex':0x1,'paragraphId':_0x34e429(new Set((_0x5cbb11=_0x24b65b[_0x5a812b(0x1ba)])==null?void 0x0:_0x5cbb11[_0x5a812b(0x1c6)](_0x2926b2=>_0x2926b2[_0x5a812b(0x20e)]))),'paragraphStyle':E(!0x0,!0x0,_0x50afb5)}],'blockRanges':[{'blockId':_0x34c30c,'blockType':_0x54e1d3['CODE'],'startIndex':0x0,'endIndex':_0x3e4e1c['length']-0x1}]});let _0x564362=(_0x5960e9=_0x24b65b[_0x5a812b(0x1c1)])==null?void 0x0:_0x5960e9[_0x5a812b(0x23a)](_0x319a88=>_0x319a88[_0x5a812b(0x1e4)]===_0x34c30c);return _0x564362&&M(_0x24b65b,_0x564362),{'nextDocumentData':_0x167a80,'nextMetadata':_0x1606b8,'cursorOffset':_0x5ca80c+0x1};}N(_0x24b65b,_0x1ebe75,_0x3ba019['BLOCK_END']),N(_0x24b65b,_0x5ca80c,_0x3ba019[_0x5a812b(0x234)]),he(_0x24b65b,_0x5ca80c,_0x1ebe75+0x1,_0x50afb5);let _0x5e3282={'blockId':_0x34c30c,'blockType':_0x54e1d3[_0x5a812b(0x200)],'startIndex':_0x5ca80c,'endIndex':_0x1ebe75+0x1};return _0x24b65b[_0x5a812b(0x1c1)]=[...(_0x5a0ce7=_0x24b65b[_0x5a812b(0x1c1)])==null?[]:_0x5a0ce7,_0x5e3282]['sort']((_0x3d9679,_0x323898)=>_0x3d9679[_0x5a812b(0x1f0)]-_0x323898[_0x5a812b(0x1f0)]),M(_0x24b65b,_0x5e3282),{'nextDocumentData':_0x167a80,'nextMetadata':_0x1606b8,'cursorOffset':_0x5ca80c+0x1};}function oe(_0x211db4,_0x314088,_0x431e22){const _0x15e86d=_0x4a8a2d;var _0x17578a;((_0x17578a=_0x211db4['paragraphs'])==null?[]:_0x17578a)['filter'](_0x553339=>_0x553339['startIndex']>_0x314088&&_0x553339[_0x15e86d(0x1f0)]<_0x431e22)['forEach'](_0x2a3de8=>{const _0x3b2a5f=_0x15e86d;var _0x4bbc9f;let _0x156109={...(_0x4bbc9f=_0x2a3de8[_0x3b2a5f(0x22c)])==null?{}:_0x4bbc9f};delete _0x156109['spaceAbove'],delete _0x156109[_0x3b2a5f(0x1ca)],_0x2a3de8[_0x3b2a5f(0x22c)]=_0x156109;});}function se(_0x457e64,_0x248d17){return _0x457e64==null||_0x248d17==null||_0x457e64===_0x248d17?null:{'startOffset':Math['min'](_0x457e64,_0x248d17),'endOffset':Math['max'](_0x457e64,_0x248d17)};}function ce(_0x3858ad){const _0x591bfa=_0x4a8a2d;return{'nextDocumentData':D(_0x3858ad[_0x591bfa(0x21a)]),'nextMetadata':T(_0x3858ad[_0x591bfa(0x1bc)],_0x3858ad['blockId'],_0x3858ad[_0x591bfa(0x211)]),'cursorOffset':0x0};}function le(_0x10af95){const _0x50aa72=_0x4a8a2d;var _0x5aa243,_0x357c42;let _0x2d332a=D(_0x10af95[_0x50aa72(0x21a)]),_0x414cf5=O(_0x2d332a),_0x1a8ea0=me(_0x414cf5,_0x10af95[_0x50aa72(0x1f6)]);if(!_0x1a8ea0)return null;let _0x2e6234=_e(_0x414cf5,_0x1a8ea0),_0x7f904f=_0x2e6234[_0x2e6234[_0x50aa72(0x1dd)]-0x1];if(!_0x7f904f||!ve(_0x414cf5,_0x1a8ea0,_0x7f904f)||_0x10af95[_0x50aa72(0x1f6)]<_0x7f904f[_0x50aa72(0x1f0)])return null;let _0x45fcd5=A(_0x414cf5,_0x1a8ea0,_0x7f904f);if(_0x45fcd5>=_0x1a8ea0[_0x50aa72(0x1bd)])return null;_0x414cf5[_0x50aa72(0x23c)]=[_0x414cf5[_0x50aa72(0x23c)][_0x50aa72(0x1f5)](0x0,_0x45fcd5),_0x3ba019[_0x50aa72(0x1e7)],_0x414cf5[_0x50aa72(0x23c)][_0x50aa72(0x1f5)](_0x45fcd5,_0x1a8ea0[_0x50aa72(0x1bd)]),_0x414cf5[_0x50aa72(0x23c)][_0x50aa72(0x1f5)](_0x1a8ea0[_0x50aa72(0x1bd)]+0x1)]['join'](''),R(_0x414cf5['paragraphs'],_0x45fcd5,_0x1a8ea0['endIndex'],0x1),R(_0x414cf5[_0x50aa72(0x207)],_0x45fcd5,_0x1a8ea0['endIndex'],0x1),R(_0x414cf5[_0x50aa72(0x1cf)],_0x45fcd5,_0x1a8ea0[_0x50aa72(0x1bd)],0x1),ke(_0x414cf5[_0x50aa72(0x206)],_0x45fcd5,_0x1a8ea0[_0x50aa72(0x1bd)],0x1),z(_0x414cf5[_0x50aa72(0x1ee)],_0x45fcd5,_0x1a8ea0['endIndex'],0x1),z(_0x414cf5[_0x50aa72(0x1d8)],_0x45fcd5,_0x1a8ea0['endIndex'],0x1),z(_0x414cf5[_0x50aa72(0x238)],_0x45fcd5,_0x1a8ea0[_0x50aa72(0x1bd)],0x1),(_0x5aa243=_0x414cf5[_0x50aa72(0x1c1)])==null||_0x5aa243[_0x50aa72(0x1e2)](_0x3caec1=>{const _0x3ec7c3=_0x50aa72;_0x3caec1===_0x1a8ea0||_0x3caec1['blockId']===_0x1a8ea0[_0x3ec7c3(0x1e4)]?_0x3caec1[_0x3ec7c3(0x1bd)]=_0x45fcd5:_0x3caec1[_0x3ec7c3(0x1f0)]>=_0x45fcd5&&_0x3caec1[_0x3ec7c3(0x1f0)]<_0x1a8ea0[_0x3ec7c3(0x1bd)]&&(_0x3caec1['startIndex']+=0x1,_0x3caec1[_0x3ec7c3(0x1bd)]+=0x1);});let _0x39bb51=_e(_0x414cf5,{..._0x1a8ea0,'endIndex':_0x45fcd5});_0x39bb51[_0x50aa72(0x1e2)]((_0x57dc22,_0x30959e)=>{const _0x35497c=_0x50aa72;var _0x1005ac;_0x57dc22['paragraphStyle']={...(_0x1005ac=_0x57dc22[_0x35497c(0x22c)])==null?{}:_0x1005ac,...E(_0x30959e===0x0,_0x30959e===_0x39bb51[_0x35497c(0x1dd)]-0x1)};});let _0xeeca1e=(_0x357c42=_0x414cf5[_0x50aa72(0x1ba)])==null?void 0x0:_0x357c42[_0x50aa72(0x23a)](_0x10901d=>_0x10901d[_0x50aa72(0x1f0)]===_0x45fcd5+0x1);return _0xeeca1e&&(_0xeeca1e['paragraphStyle']=ge(_0xeeca1e[_0x50aa72(0x22c)])),{'nextDocumentData':_0x2d332a,'cursorOffset':_0x45fcd5+0x1};}function ue(_0x4943b5){const _0x211f64=_0x4a8a2d;let _0xb19ded=D(_0x4943b5[_0x211f64(0x21a)]),_0x35cf1b=O(_0xb19ded),_0x525eeb=me(_0x35cf1b,_0x4943b5['cursorOffset']);return _0x525eeb&&de(_0xb19ded,_0x35cf1b,_0x525eeb,_0x4943b5[_0x211f64(0x1f6)],_0x4943b5[_0x211f64(0x1e1)])||null;}function de(_0x15ca94,_0x30a6c0,_0x1ecfa2,_0x15aedb,_0x5c2c1f){const _0x46d349=_0x4a8a2d;let _0x288034=we(_0x30a6c0,_0x1ecfa2,_0x15aedb,_0x5c2c1f);if(!_0x288034)return null;let _0x207bd1=_0x288034[_0x46d349(0x1d3)]-0x1;return Te(_0x30a6c0,_0x288034[_0x46d349(0x1c9)][_0x46d349(0x1f0)],_0x288034[_0x46d349(0x1c9)][_0x46d349(0x1f0)]+0x1),{'nextDocumentData':_0x15ca94,'cursorOffset':_0x207bd1};}function fe(_0x25af29,_0x1a0d81){const _0x414408=_0x4a8a2d;var _0x189422;return _0x25af29==null||(_0x189422=_0x25af29[_0x414408(0x1c1)])==null?void 0x0:_0x189422[_0x414408(0x23a)](_0x1fd816=>_0x1fd816[_0x414408(0x1f4)]===_0x54e1d3[_0x414408(0x200)]&&_0x1fd816[_0x414408(0x1f0)]<=_0x1a0d81&&_0x1a0d81<=_0x1fd816[_0x414408(0x1bd)]);}function pe(_0x2b27b0){const _0x2b45b7=_0x4a8a2d;var _0x188ec0;let _0xc4f97d=_0x2b27b0['documentData'][_0x2b45b7(0x22f)];if(!_0xc4f97d)return!0x1;let _0x3ac209=_0x2b27b0['direction']===_0x2b45b7(0x1eb)?_0x2b27b0[_0x2b45b7(0x1f6)]-0x1:_0x2b27b0['cursorOffset'],_0x6406aa=_0x2b27b0[_0x2b45b7(0x1c5)]===_0x2b45b7(0x22a)?_0x2b27b0[_0x2b45b7(0x1f6)]+0x1:_0x3ac209;return((_0x188ec0=_0xc4f97d[_0x2b45b7(0x1c1)])==null?[]:_0x188ec0)[_0x2b45b7(0x236)](_0x12d4ad=>_0x12d4ad[_0x2b45b7(0x1f4)]===_0x54e1d3[_0x2b45b7(0x200)]?_0x3ac209===_0x12d4ad[_0x2b45b7(0x1f0)]||_0x3ac209===_0x12d4ad[_0x2b45b7(0x1bd)]||_0x6406aa===_0x12d4ad[_0x2b45b7(0x1f0)]||_0x6406aa===_0x12d4ad[_0x2b45b7(0x1bd)]:!0x1);}function me(_0x13fc4e,_0x5a78e7){const _0x5f297a=_0x4a8a2d;var _0x3395f0;return(_0x3395f0=_0x13fc4e[_0x5f297a(0x1c1)])==null?void 0x0:_0x3395f0['find'](_0x5a8b18=>{const _0x13c31d=_0x5f297a;let _0x38c79f=j(_0x13fc4e,_0x5a8b18);return _0x5a8b18['blockType']===_0x54e1d3[_0x13c31d(0x200)]&&_0x5a8b18['startIndex']<=_0x5a78e7&&_0x5a78e7<=_0x38c79f+0x2;});}function E(_0x17e584,_0x241c84,_0x51e922=!0x1){return{'indentEnd':{'v':0x14},'indentStart':{'v':0x14},..._0x17e584&&_0x51e922?{'spaceAbove':{'v':0x8}}:{},'textStyle':{'ff':ie,'fs':0xc}};}function he(_0x56028c,_0x34f293,_0x19ed8c,_0x36d47a=!0x1){const _0x506ac7=_0x4a8a2d;var _0x166610;let _0x401af5=((_0x166610=_0x56028c[_0x506ac7(0x1ba)])==null?[]:_0x166610)[_0x506ac7(0x233)](_0x5c7d6c=>_0x5c7d6c[_0x506ac7(0x1f0)]>_0x34f293&&_0x5c7d6c[_0x506ac7(0x1f0)]<_0x19ed8c);_0x401af5[_0x506ac7(0x1e2)]((_0xa56718,_0x263a05)=>{const _0x67f467=_0x506ac7;var _0x24e661;_0xa56718[_0x67f467(0x22c)]={...(_0x24e661=_0xa56718[_0x67f467(0x22c)])==null?{}:_0x24e661,...E(_0x263a05===0x0,_0x263a05===_0x401af5[_0x67f467(0x1dd)]-0x1,_0x36d47a)};});}function ge(_0x1d5cf3){const _0xbd2508=_0x4a8a2d;var _0x1d1447,_0x4e09f6;let _0x2a8721={..._0x1d5cf3==null?{}:_0x1d5cf3};return delete _0x2a8721[_0xbd2508(0x20c)],delete _0x2a8721['indentStart'],delete _0x2a8721[_0xbd2508(0x217)],delete _0x2a8721[_0xbd2508(0x1ca)],((_0x1d1447=_0x2a8721[_0xbd2508(0x1e5)])==null?void 0x0:_0x1d1447['ff'])===ie&&((_0x4e09f6=_0x2a8721['textStyle'])==null?void 0x0:_0x4e09f6['fs'])===0xc&&delete _0x2a8721[_0xbd2508(0x1e5)],_0x2a8721;}function _e(_0x268343,_0x4e7bc4){const _0x218459=_0x4a8a2d;var _0x2c1244;let _0x556d85=j(_0x268343,_0x4e7bc4);return((_0x2c1244=_0x268343[_0x218459(0x1ba)])==null?[]:_0x2c1244)[_0x218459(0x233)](_0x5822ff=>_0x5822ff[_0x218459(0x1f0)]>_0x4e7bc4[_0x218459(0x1f0)]&&_0x5822ff['startIndex']<_0x556d85);}function _0x28c9(_0x1e6757,_0x175dbf){_0x1e6757=_0x1e6757-0x1b6;const _0x58a183=_0x58a1();let _0x28c9d9=_0x58a183[_0x1e6757];return _0x28c9d9;}function ve(_0x76282b,_0x5ef0eb,_0x5ed3f2){const _0x254cec=_0x4a8a2d;let _0x2afe1d=A(_0x76282b,_0x5ef0eb,_0x5ed3f2),_0x5c9d23=_0x76282b[_0x254cec(0x23c)][_0x254cec(0x1f5)](_0x2afe1d,_0x5ed3f2[_0x254cec(0x1f0)]);return Array[_0x254cec(0x214)](_0x5c9d23)[_0x254cec(0x1bf)](_0x339f88=>_0x339f88===_0x3ba019[_0x254cec(0x234)]||_0x339f88===_0x3ba019[_0x254cec(0x1e7)]);}function D(_0x156523){const _0x4521c6=_0x4a8a2d;return _0xb48f1[_0x4521c6(0x1d2)](_0x156523);}function O(_0x1bf3c9){const _0x17ba9a=_0x4a8a2d;if(!_0x1bf3c9[_0x17ba9a(0x22f)])throw Error(_0x17ba9a(0x224));return _0x1bf3c9['body'];}function ye(_0x4bf66a,_0x108f21,_0x262c76){const _0x3d4f6c=_0x4a8a2d;if(_0x108f21==null||_0x262c76==null){let _0x2dee3f=xe(_0x4bf66a);return{'startOffset':_0x2dee3f,'endOffset':_0x2dee3f};}let _0x37d761=Math[_0x3d4f6c(0x235)](_0x108f21,_0x262c76),_0x442582=Math['max'](_0x108f21,_0x262c76);if(_0x37d761===_0x442582){let _0x5f373a=be(_0x4bf66a,_0x37d761);return{'startOffset':_0x5f373a,'endOffset':_0x5f373a};}return Ce(_0x4bf66a,_0x37d761,_0x442582);}function be(_0x4cd764,_0x276e03){const _0x5ec11e=_0x4a8a2d;return _0x276e03===0x0&&_0x4cd764[_0x5ec11e(0x23c)][0x0]===_0x3ba019[_0x5ec11e(0x225)]?0x1:_0x276e03;}function xe(_0x5539f0){const _0x449468=_0x4a8a2d;return _0x5539f0[_0x449468(0x23c)][_0x449468(0x21f)](_0x3ba019['SECTION_BREAK'])?Math[_0x449468(0x1e6)](0x0,_0x5539f0[_0x449468(0x23c)][_0x449468(0x1dd)]-0x1):_0x5539f0['dataStream'][_0x449468(0x1dd)];}function Se(_0x423855,_0x463210,_0x3896b8){const _0x1b3077=_0x4a8a2d;var _0x2e80e0;let _0x4e426e=Math[_0x1b3077(0x235)](_0x463210,_0x3896b8),_0x2fc2d5=Math[_0x1b3077(0x1e6)](_0x463210,_0x3896b8);return!!((_0x2e80e0=_0x423855[_0x1b3077(0x1ee)])!=null&&_0x2e80e0['some'](_0x2804c0=>_0x4e426e>_0x2804c0[_0x1b3077(0x1f0)]&&_0x4e426e<_0x2804c0[_0x1b3077(0x1bd)]||_0x2fc2d5>_0x2804c0[_0x1b3077(0x1f0)]&&_0x2fc2d5<_0x2804c0[_0x1b3077(0x1bd)]||_0x4e426e<=_0x2804c0[_0x1b3077(0x1f0)]&&_0x2fc2d5>=_0x2804c0[_0x1b3077(0x1bd)]));}function Ce(_0x4cc54b,_0x268161,_0x4880cb){const _0xc2e62c=_0x4a8a2d;var _0x4b1804,_0x157733;let _0x4e865c=[...(_0x4b1804=_0x4cc54b[_0xc2e62c(0x1ba)])==null?[]:_0x4b1804][_0xc2e62c(0x239)]((_0xb1769b,_0x5753db)=>_0xb1769b[_0xc2e62c(0x1f0)]-_0x5753db[_0xc2e62c(0x1f0)]),_0x3d4eff=_0x4e865c['find']((_0x5c92cd,_0x29a26e)=>(_0x29a26e===0x0?0x0:_0x4e865c[_0x29a26e-0x1][_0xc2e62c(0x1f0)]+0x1)<=_0x268161&&_0x268161<=_0x5c92cd['startIndex']),_0x1ed691=(_0x157733=_0x4e865c[_0xc2e62c(0x23a)](_0x211e54=>_0x211e54[_0xc2e62c(0x1f0)]>=_0x4880cb-0x1))==null?_0x4e865c[_0x4e865c[_0xc2e62c(0x1dd)]-0x1]:_0x157733;return{'startOffset':_0x3d4eff?k(_0x4e865c,_0x3d4eff):_0x268161,'endOffset':_0x1ed691?_0x1ed691['startIndex']+0x1:_0x4880cb};}function k(_0x157ccd,_0x170084){const _0x34c4ed=_0x4a8a2d;let _0x393940=_0x157ccd[_0x34c4ed(0x240)](_0x170084);return _0x393940>0x0?_0x157ccd[_0x393940-0x1]['startIndex']+0x1:0x0;}function A(_0x658122,_0x58c33d,_0x451dfa){const _0xe8904b=_0x4a8a2d;var _0x8e9a25;return Math[_0xe8904b(0x1e6)](k((_0x8e9a25=_0x658122['paragraphs'])==null?[]:_0x8e9a25,_0x451dfa),_0x58c33d[_0xe8904b(0x1f0)]+0x1);}function j(_0x54b102,_0x5a480f){const _0x8d5fec=_0x4a8a2d;return _0x54b102[_0x8d5fec(0x23c)][_0x5a480f[_0x8d5fec(0x1bd)]]===_0x3ba019['BLOCK_END']?_0x5a480f[_0x8d5fec(0x1bd)]:_0x54b102[_0x8d5fec(0x23c)][_0x5a480f['endIndex']+0x1]===_0x3ba019['BLOCK_END']?_0x5a480f[_0x8d5fec(0x1bd)]+0x1:_0x5a480f[_0x8d5fec(0x1bd)];}function we(_0x1734d9,_0x450943,_0x2df09c,_0x498a00){const _0x20b679=_0x4a8a2d;var _0x48b7c9,_0x4a2a5d;let _0x12fe04=j(_0x1734d9,_0x450943),_0x41149c=((_0x48b7c9=_0x1734d9[_0x20b679(0x1ba)])==null?[]:_0x48b7c9)[_0x20b679(0x23a)](_0x41061b=>_0x41061b[_0x20b679(0x1f0)]===_0x12fe04+0x1);if(!_0x41149c||_0x498a00!=null&&_0x41149c[_0x20b679(0x1f0)]!==_0x498a00||_0x2df09c<_0x12fe04||_0x2df09c>_0x41149c[_0x20b679(0x1f0)]+0x1||_0x1734d9[_0x20b679(0x23c)][_0x41149c['startIndex']]!==_0x3ba019[_0x20b679(0x225)])return null;let _0x1eca3f=k((_0x4a2a5d=_0x1734d9[_0x20b679(0x1ba)])==null?[]:_0x4a2a5d,_0x41149c),_0x454819=_0x1734d9['dataStream']['slice'](_0x1eca3f,_0x41149c[_0x20b679(0x1f0)]);return Array[_0x20b679(0x214)](_0x454819)[_0x20b679(0x1bf)](_0x37a77b=>_0x37a77b===_0x3ba019[_0x20b679(0x1e7)])?{'paragraph':_0x41149c,'endTokenOffset':_0x12fe04}:null;}function M(_0x5d7221,_0x2a40b1){const _0x3b0637=_0x4a8a2d;var _0x517a07;let _0x2c4705=j(_0x5d7221,_0x2a40b1),_0x4a4b84=_0x5d7221[_0x3b0637(0x23c)][_0x2c4705+0x1];_0x4a4b84!==_0x3ba019[_0x3b0637(0x229)]&&_0x4a4b84!==void 0x0||N(_0x5d7221,_0x2c4705+0x1,_0x3ba019[_0x3b0637(0x225)],{'paragraphs':[{'startIndex':0x0,'paragraphId':_0x34e429(new Set((_0x517a07=_0x5d7221[_0x3b0637(0x1ba)])==null?void 0x0:_0x517a07[_0x3b0637(0x1c6)](_0x3cb5a9=>_0x3cb5a9[_0x3b0637(0x20e)])))}]});}function N(_0xa0396,_0x5e4e9d,_0x5b6d4b,_0x3bb9ec={}){const _0x59ca28=_0x4a8a2d;var _0x1b15f9,_0x4545c4;if(_0x5b6d4b){if(_0xa0396[_0x59ca28(0x23c)]=''+_0xa0396[_0x59ca28(0x23c)]['slice'](0x0,_0x5e4e9d)+_0x5b6d4b+_0xa0396['dataStream'][_0x59ca28(0x1f5)](_0x5e4e9d),Ee(_0xa0396,_0x5e4e9d,_0x5b6d4b[_0x59ca28(0x1dd)]),(_0x1b15f9=_0x3bb9ec[_0x59ca28(0x1ba)])!=null&&_0x1b15f9[_0x59ca28(0x1dd)]){var _0x8d59fb;_0xa0396[_0x59ca28(0x1ba)]=[...(_0x8d59fb=_0xa0396[_0x59ca28(0x1ba)])==null?[]:_0x8d59fb,..._0x3bb9ec[_0x59ca28(0x1ba)][_0x59ca28(0x1c6)](_0x1ffea9=>({..._0x1ffea9,'startIndex':_0x1ffea9['startIndex']+_0x5e4e9d}))][_0x59ca28(0x239)]((_0x545a50,_0x41062d)=>_0x545a50[_0x59ca28(0x1f0)]-_0x41062d[_0x59ca28(0x1f0)]);}if((_0x4545c4=_0x3bb9ec[_0x59ca28(0x1c1)])!=null&&_0x4545c4[_0x59ca28(0x1dd)]){var _0x172fc1;_0xa0396['blockRanges']=[...(_0x172fc1=_0xa0396['blockRanges'])==null?[]:_0x172fc1,..._0x3bb9ec['blockRanges'][_0x59ca28(0x1c6)](_0x19853b=>({..._0x19853b,'startIndex':_0x19853b[_0x59ca28(0x1f0)]+_0x5e4e9d,'endIndex':_0x19853b[_0x59ca28(0x1bd)]+_0x5e4e9d}))][_0x59ca28(0x239)]((_0x2c1261,_0x53f498)=>_0x2c1261['startIndex']-_0x53f498[_0x59ca28(0x1f0)]);}}}function Te(_0x2259ad,_0x121220,_0x434c54){const _0x3ad431=_0x4a8a2d;let _0x14ae8e=_0x434c54-_0x121220;_0x2259ad[_0x3ad431(0x23c)]=''+_0x2259ad[_0x3ad431(0x23c)][_0x3ad431(0x1f5)](0x0,_0x121220)+_0x2259ad[_0x3ad431(0x23c)][_0x3ad431(0x1f5)](_0x434c54),De(_0x2259ad,_0x121220,_0x14ae8e);}function Ee(_0x43e9e3,_0x20a3ac,_0x26447c){const _0x1c8892=_0x4a8a2d;_0x43e9e3[_0x1c8892(0x1ba)]=P(_0x43e9e3[_0x1c8892(0x1ba)],_0x20a3ac,_0x26447c),_0x43e9e3[_0x1c8892(0x207)]=P(_0x43e9e3['sectionBreaks'],_0x20a3ac,_0x26447c),_0x43e9e3['customBlocks']=P(_0x43e9e3['customBlocks'],_0x20a3ac,_0x26447c),_0x43e9e3[_0x1c8892(0x206)]=Oe(_0x43e9e3[_0x1c8892(0x206)],_0x20a3ac,_0x26447c),_0x43e9e3['tables']=I(_0x43e9e3[_0x1c8892(0x1ee)],_0x20a3ac,_0x26447c),_0x43e9e3['customRanges']=I(_0x43e9e3[_0x1c8892(0x1d8)],_0x20a3ac,_0x26447c),_0x43e9e3['customDecorations']=I(_0x43e9e3[_0x1c8892(0x238)],_0x20a3ac,_0x26447c),_0x43e9e3['blockRanges']=I(_0x43e9e3['blockRanges'],_0x20a3ac,_0x26447c);}function De(_0x4d91c1,_0x384706,_0x3ecd85){const _0x28ae70=_0x4a8a2d;var _0x702ce5,_0x5b34b0;_0x4d91c1[_0x28ae70(0x1ba)]=F(_0x4d91c1['paragraphs'],_0x384706,_0x3ecd85),_0x4d91c1[_0x28ae70(0x207)]=F(_0x4d91c1[_0x28ae70(0x207)],_0x384706,_0x3ecd85),_0x4d91c1[_0x28ae70(0x1cf)]=F(_0x4d91c1[_0x28ae70(0x1cf)],_0x384706,_0x3ecd85),_0x4d91c1[_0x28ae70(0x206)]=(_0x702ce5=L((_0x5b34b0=_0x4d91c1['textRuns'])==null?void 0x0:_0x5b34b0[_0x28ae70(0x1c6)](_0x1eab75=>({..._0x1eab75,'startIndex':_0x1eab75['st'],'endIndex':_0x1eab75['ed']})),_0x384706,_0x3ecd85))==null?void 0x0:_0x702ce5[_0x28ae70(0x1c6)](_0x2fea58=>{let {startIndex:_0x444451,endIndex:_0x560dd9,..._0x3146b5}=_0x2fea58;return{..._0x3146b5,'st':_0x444451,'ed':_0x560dd9};}),_0x4d91c1[_0x28ae70(0x1ee)]=L(_0x4d91c1[_0x28ae70(0x1ee)],_0x384706,_0x3ecd85),_0x4d91c1[_0x28ae70(0x1d8)]=L(_0x4d91c1['customRanges'],_0x384706,_0x3ecd85),_0x4d91c1[_0x28ae70(0x238)]=L(_0x4d91c1[_0x28ae70(0x238)],_0x384706,_0x3ecd85),_0x4d91c1['blockRanges']=L(_0x4d91c1[_0x28ae70(0x1c1)],_0x384706,_0x3ecd85);}function P(_0x16c736,_0x4b4b4f,_0x192f08){const _0x2688de=_0x4a8a2d;return _0x16c736==null?void 0x0:_0x16c736[_0x2688de(0x1c6)](_0x5a1173=>_0x5a1173[_0x2688de(0x1f0)]>=_0x4b4b4f?{..._0x5a1173,'startIndex':_0x5a1173['startIndex']+_0x192f08}:_0x5a1173);}function F(_0x2912ba,_0x46d1f3,_0x424aee){const _0x44c81d=_0x4a8a2d;let _0x5b7f66=_0x46d1f3+_0x424aee;return _0x2912ba==null?void 0x0:_0x2912ba[_0x44c81d(0x1c6)](_0x52dc9e=>_0x52dc9e[_0x44c81d(0x1f0)]>=_0x46d1f3&&_0x52dc9e['startIndex']<_0x5b7f66?null:_0x52dc9e[_0x44c81d(0x1f0)]>=_0x5b7f66?{..._0x52dc9e,'startIndex':_0x52dc9e['startIndex']-_0x424aee}:_0x52dc9e)['filter'](_0x415221=>_0x415221!=null);}function Oe(_0x32df01,_0x537bf2,_0x8b8d1d){const _0x5ba742=_0x4a8a2d;return _0x32df01==null?void 0x0:_0x32df01[_0x5ba742(0x1c6)](_0x273a88=>_0x273a88['st']>=_0x537bf2?{..._0x273a88,'st':_0x273a88['st']+_0x8b8d1d,'ed':_0x273a88['ed']+_0x8b8d1d}:_0x273a88['ed']>_0x537bf2?{..._0x273a88,'ed':_0x273a88['ed']+_0x8b8d1d}:_0x273a88);}function I(_0x9b9d4a,_0x2a7633,_0x26d93f){const _0x427625=_0x4a8a2d;return _0x9b9d4a==null?void 0x0:_0x9b9d4a[_0x427625(0x1c6)](_0x3389d8=>_0x3389d8[_0x427625(0x1f0)]>=_0x2a7633?{..._0x3389d8,'startIndex':_0x3389d8[_0x427625(0x1f0)]+_0x26d93f,'endIndex':_0x3389d8[_0x427625(0x1bd)]+_0x26d93f}:_0x3389d8['endIndex']>=_0x2a7633?{..._0x3389d8,'endIndex':_0x3389d8['endIndex']+_0x26d93f}:_0x3389d8);}function L(_0x45d6fa,_0x377e73,_0x3d5f6b){const _0x2ff15a=_0x4a8a2d;let _0xfa2d64=_0x377e73+_0x3d5f6b;return _0x45d6fa==null?void 0x0:_0x45d6fa['map'](_0x1fc5ec=>_0x1fc5ec[_0x2ff15a(0x1f0)]>=_0x377e73&&_0x1fc5ec[_0x2ff15a(0x1bd)]<_0xfa2d64?null:_0x1fc5ec[_0x2ff15a(0x1f0)]>=_0xfa2d64?{..._0x1fc5ec,'startIndex':_0x1fc5ec[_0x2ff15a(0x1f0)]-_0x3d5f6b,'endIndex':_0x1fc5ec[_0x2ff15a(0x1bd)]-_0x3d5f6b}:_0x1fc5ec[_0x2ff15a(0x1bd)]>=_0x377e73?{..._0x1fc5ec,'startIndex':_0x1fc5ec['startIndex']<_0x377e73?_0x1fc5ec['startIndex']:_0x377e73,'endIndex':Math[_0x2ff15a(0x1e6)](_0x377e73,_0x1fc5ec[_0x2ff15a(0x1bd)]-_0x3d5f6b)}:_0x1fc5ec)[_0x2ff15a(0x233)](_0x3ef21a=>_0x3ef21a!=null);}function R(_0x2cc2fc,_0x576234,_0x24ca3d,_0x3f855e){_0x2cc2fc==null||_0x2cc2fc['forEach'](_0x1afc45=>{const _0x20e3aa=_0x28c9;_0x1afc45['startIndex']>=_0x576234&&_0x1afc45[_0x20e3aa(0x1f0)]<_0x24ca3d&&(_0x1afc45['startIndex']+=_0x3f855e);});}function ke(_0x15bea0,_0x17e830,_0x34f1e9,_0x2ec254){const _0x21e132=_0x4a8a2d;_0x15bea0==null||_0x15bea0[_0x21e132(0x1e2)](_0x2fce1=>{_0x2fce1['st']>=_0x17e830&&_0x2fce1['st']<_0x34f1e9?(_0x2fce1['st']+=_0x2ec254,_0x2fce1['ed']+=_0x2ec254):_0x2fce1['ed']>_0x17e830&&_0x2fce1['ed']<_0x34f1e9&&(_0x2fce1['ed']+=_0x2ec254);});}function z(_0x5223e9,_0x379138,_0x114465,_0x48f290){const _0x324870=_0x4a8a2d;_0x5223e9==null||_0x5223e9[_0x324870(0x1e2)](_0x1df7b6=>{const _0x4bd01a=_0x324870;_0x1df7b6[_0x4bd01a(0x1f0)]>=_0x379138&&_0x1df7b6[_0x4bd01a(0x1f0)]<_0x114465?(_0x1df7b6['startIndex']+=_0x48f290,_0x1df7b6[_0x4bd01a(0x1bd)]+=_0x48f290):_0x1df7b6[_0x4bd01a(0x1bd)]>_0x379138&&_0x1df7b6[_0x4bd01a(0x1bd)]<_0x114465&&(_0x1df7b6[_0x4bd01a(0x1bd)]+=_0x48f290);});}function B(_0x2fd0e3){'@babel/helpers - typeof';const _0x21d23d=_0x4a8a2d;return B=typeof Symbol==_0x21d23d(0x1ed)&&typeof Symbol[_0x21d23d(0x1d6)]==_0x21d23d(0x1da)?function(_0x1121ff){return typeof _0x1121ff;}:function(_0x2808c1){const _0x148d96=_0x21d23d;return _0x2808c1&&typeof Symbol==_0x148d96(0x1ed)&&_0x2808c1['constructor']===Symbol&&_0x2808c1!==Symbol[_0x148d96(0x1be)]?_0x148d96(0x1da):typeof _0x2808c1;},B(_0x2fd0e3);}function Ae(_0x115f91,_0x302b6e){const _0x4b03d7=_0x4a8a2d;if(B(_0x115f91)!=_0x4b03d7(0x1d5)||!_0x115f91)return _0x115f91;var _0x3817bf=_0x115f91[Symbol[_0x4b03d7(0x1ea)]];if(_0x3817bf!==void 0x0){var _0x525c6a=_0x3817bf[_0x4b03d7(0x1c8)](_0x115f91,_0x302b6e||_0x4b03d7(0x20b));if(B(_0x525c6a)!=_0x4b03d7(0x1d5))return _0x525c6a;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x302b6e===_0x4b03d7(0x1d1)?String:Number)(_0x115f91);}function je(_0x562264){const _0x12b482=_0x4a8a2d;var _0x59f815=Ae(_0x562264,_0x12b482(0x1d1));return B(_0x59f815)==_0x12b482(0x1da)?_0x59f815:_0x59f815+'';}function V(_0x4ebb82,_0x29783a,_0x4cb423){const _0x464628=_0x4a8a2d;return(_0x29783a=je(_0x29783a))in _0x4ebb82?Object[_0x464628(0x1c7)](_0x4ebb82,_0x29783a,{'value':_0x4cb423,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4ebb82[_0x29783a]=_0x4cb423,_0x4ebb82;}function _0x58a1(){const _0x37f8b9=['docs-code.command.insert-below','delete','complete','indexOf','_change$','5jqMxib','_setResource','deserialize','568DROgGU','paragraphs','COMMAND','metadata','endIndex','prototype','every','clear','blockRanges','previousDocumentData','getCurrentUnitOfType','onStarting','direction','map','defineProperty','call','paragraph','spaceBelow','codes','add','_configService','298dROuVY','customBlocks','11fodUEz','string','deepClone','endTokenOffset','range','object','iterator','UNIVER_DOC','customRanges','3587CfVInx','symbol','compose','change$','length','_resourceManagerService','getUniverDocInstance','dispose','paragraphStartIndex','forEach','unitId','blockId','textStyle','max','BLOCK_END','7708764WElStu','parse','toPrimitive','left','disposeWithMe','function','tables','nextMetadata','startIndex','removeCode','javascript','decorate','blockType','slice','cursorOffset','get','monospace','version','docs-code.config','syncExecuteCommand','_commandService','nextDocumentData','model','1.0.0-alpha.1','CODE','docs-code.command.update','pluginName','6jDpmHI','consumeInsertRange','_docsCodeModel','textRuns','sectionBreaks','166872RqxqjD','6398PYBhkJ','startOffset','default','indentEnd','_config','paragraphId','setCodeConfig','_resources','config','docs-code.command.exit','getBody','from','getSnapshot','serialize','spaceAbove','@univerjs-pro/docs-code','removeUnit','documentData','3285870weuPcy','docs-code.command.insert','docs-code.command.cancel-empty-paragraph','DOC_CODE_PLUGIN','endsWith','replaceOp','getCodeConfig','registerPluginResource','set','Document\x20body\x20is\x20required','PARAGRAPH','commandService','endOffset','getParagraphsInRange','SECTION_BREAK','right','stringify','paragraphStyle','4385586ZIZPEr','getTextRanges','body','next','3667734fUoyDX','registerCommand','filter','BLOCK_START','min','some','_injector','customDecorations','sort','find','type','dataStream'];_0x58a1=function(){return _0x37f8b9;};return _0x58a1();}var H=class extends _0x3e8f03{constructor(..._0x202d30){const _0x8ee9e0=_0x4a8a2d;super(..._0x202d30),V(this,_0x8ee9e0(0x210),new Map()),V(this,'_change$',new _0x363e20()),V(this,_0x8ee9e0(0x1dc),this[_0x8ee9e0(0x241)]['asObservable']());}[_0x4a8a2d(0x221)](_0x197643,_0x58a620){const _0x27ca2e=_0x4a8a2d;return w(this[_0x27ca2e(0x210)][_0x27ca2e(0x1f7)](_0x197643))[_0x27ca2e(0x1cb)][_0x58a620];}[_0x4a8a2d(0x20f)](_0x4853b5,_0x5aaa34,_0x26ee93){const _0x449b87=_0x4a8a2d;this['_setResource'](_0x4853b5,_0x5aaa34,T(this[_0x449b87(0x210)][_0x449b87(0x1f7)](_0x4853b5),_0x5aaa34,_0x26ee93));}[_0x4a8a2d(0x1f1)](_0xf6e12d,_0x3861a5){const _0x34b295=_0x4a8a2d;this['_setResource'](_0xf6e12d,_0x3861a5,re(this[_0x34b295(0x210)][_0x34b295(0x1f7)](_0xf6e12d),_0x3861a5));}[_0x4a8a2d(0x216)](_0x388db7){const _0x5bfda3=_0x4a8a2d;return w(this[_0x5bfda3(0x210)]['get'](_0x388db7));}[_0x4a8a2d(0x1b8)](_0xe49eb4,_0x7cea61){const _0x24eff5=_0x4a8a2d;this[_0x24eff5(0x210)][_0x24eff5(0x223)](_0xe49eb4,w(_0x7cea61)),this[_0x24eff5(0x241)][_0x24eff5(0x230)]({'unitId':_0xe49eb4});}[_0x4a8a2d(0x219)](_0x102cca){const _0x439e75=_0x4a8a2d;this[_0x439e75(0x210)][_0x439e75(0x23e)](_0x102cca),this[_0x439e75(0x241)][_0x439e75(0x230)]({'unitId':_0x102cca});}[_0x4a8a2d(0x1e0)](){const _0x478bdc=_0x4a8a2d;super[_0x478bdc(0x1e0)](),this[_0x478bdc(0x210)][_0x478bdc(0x1c0)](),this[_0x478bdc(0x241)][_0x478bdc(0x23f)]();}[_0x4a8a2d(0x1b7)](_0x1838bc,_0x1d97c0,_0x1fad4f){const _0x3891a1=_0x4a8a2d;this['_resources'][_0x3891a1(0x223)](_0x1838bc,_0x1fad4f),this[_0x3891a1(0x241)][_0x3891a1(0x230)]({'unitId':_0x1838bc,'blockId':_0x1d97c0});}};const Me={'id':_0x4a8a2d(0x23d),'type':_0x20b98a[_0x4a8a2d(0x1bb)],'handler':_0x525534=>{const _0x3d5255=_0x4a8a2d;let _0x2442b9=Le(_0x525534);if(_0x2442b9)return _0x525534[_0x3d5255(0x1f7)](_0x3735ed)[_0x3d5255(0x1fb)](U['id'],{'startOffset':_0x2442b9[_0x3d5255(0x20a)],'endOffset':_0x2442b9[_0x3d5255(0x227)],'unitId':_0x2442b9[_0x3d5255(0x1e3)]});let _0x40b8a6=Re(_0x525534);if(!_0x40b8a6)return!0x1;let _0x630a60=_0x40b8a6[_0x3d5255(0x1f0)]+0x1;return _0x525534[_0x3d5255(0x1f7)](_0x3735ed)[_0x3d5255(0x1fb)](U['id'],{'startOffset':_0x630a60,'endOffset':_0x630a60});}},Ne={'id':'docs-code.command.consume-boundary-delete','type':_0x20b98a['COMMAND'],'handler':()=>!0x0},U={'id':_0x4a8a2d(0x21c),'type':_0x20b98a[_0x4a8a2d(0x1bb)],'handler':(_0x34e2fe,_0x11462e)=>{const _0x2f3080=_0x4a8a2d;var _0x55fe22,_0x46f79f,_0x5e0193;let _0x5b75bf=W(_0x34e2fe,_0x11462e==null?void 0x0:_0x11462e['unitId']);if(!_0x5b75bf)return!0x1;let _0x8f5b5d=G(_0x34e2fe),_0x3c869f=ae({'blockId':(_0x55fe22=_0x11462e==null?void 0x0:_0x11462e[_0x2f3080(0x1e4)])==null?_0x97c26f(0x6):_0x55fe22,'config':_0x11462e==null?void 0x0:_0x11462e[_0x2f3080(0x211)],'documentData':_0x5b75bf[_0x2f3080(0x1c2)],'endOffset':(_0x46f79f=_0x11462e==null?void 0x0:_0x11462e[_0x2f3080(0x227)])==null?_0x8f5b5d==null?void 0x0:_0x8f5b5d[_0x2f3080(0x227)]:_0x46f79f,'metadata':_0x5b75bf['model'][_0x2f3080(0x216)](_0x5b75bf[_0x2f3080(0x1e3)]),'startOffset':(_0x5e0193=_0x11462e==null?void 0x0:_0x11462e['startOffset'])==null?_0x8f5b5d==null?void 0x0:_0x8f5b5d[_0x2f3080(0x20a)]:_0x5e0193}),_0x25363b=q(_0x5b75bf[_0x2f3080(0x226)],_0x5b75bf[_0x2f3080(0x1e3)],_0x5b75bf[_0x2f3080(0x1c2)],_0x3c869f[_0x2f3080(0x1fd)],_0x3c869f[_0x2f3080(0x1f6)]);return _0x25363b&&_0x3c869f[_0x2f3080(0x1ef)]&&_0x5b75bf[_0x2f3080(0x1fe)][_0x2f3080(0x1b8)](_0x5b75bf[_0x2f3080(0x1e3)],_0x3c869f['nextMetadata']),_0x25363b;}},Pe={'id':_0x4a8a2d(0x201),'type':_0x20b98a[_0x4a8a2d(0x1bb)],'handler':(_0x596b59,_0x2a5246)=>{const _0x2dad1b=_0x4a8a2d;if(!_0x2a5246)return!0x1;let _0x447ca0=W(_0x596b59,_0x2a5246[_0x2dad1b(0x1e3)]);if(!_0x447ca0)return!0x1;let _0x1ec4e5=ce({'blockId':_0x2a5246[_0x2dad1b(0x1e4)],'config':_0x2a5246['config'],'documentData':_0x447ca0[_0x2dad1b(0x1c2)],'metadata':_0x447ca0[_0x2dad1b(0x1fe)][_0x2dad1b(0x216)](_0x447ca0['unitId'])});return _0x1ec4e5[_0x2dad1b(0x1ef)]&&_0x447ca0['model'][_0x2dad1b(0x1b8)](_0x447ca0['unitId'],_0x1ec4e5[_0x2dad1b(0x1ef)]),!0x0;}},Fe={'id':_0x4a8a2d(0x212),'type':_0x20b98a[_0x4a8a2d(0x1bb)],'handler':(_0x510efd,_0xbfa146)=>{const _0x594323=_0x4a8a2d;var _0x4b464b,_0x4ad761;let _0x48a69b=W(_0x510efd,_0xbfa146==null?void 0x0:_0xbfa146[_0x594323(0x1e3)]);if(!_0x48a69b)return!0x1;let _0x3dacad=(_0x4b464b=_0xbfa146==null?void 0x0:_0xbfa146[_0x594323(0x1f6)])==null?(_0x4ad761=G(_0x510efd))==null?void 0x0:_0x4ad761[_0x594323(0x20a)]:_0x4b464b;if(_0x3dacad==null)return!0x1;let _0x1067fe=le({'cursorOffset':_0x3dacad,'documentData':_0x48a69b['previousDocumentData']});return _0x1067fe?q(_0x48a69b[_0x594323(0x226)],_0x48a69b[_0x594323(0x1e3)],_0x48a69b[_0x594323(0x1c2)],_0x1067fe[_0x594323(0x1fd)],_0x1067fe[_0x594323(0x1f6)]):!0x1;}},Ie={'id':_0x4a8a2d(0x21d),'type':_0x20b98a['COMMAND'],'handler':(_0x561e74,_0x45fa69)=>{const _0x4da7e9=_0x4a8a2d;var _0x599ff8,_0x542500;let _0x5727a7=W(_0x561e74,_0x45fa69==null?void 0x0:_0x45fa69[_0x4da7e9(0x1e3)]);if(!_0x5727a7)return!0x1;let _0xd602b7=(_0x599ff8=_0x45fa69==null?void 0x0:_0x45fa69[_0x4da7e9(0x1f6)])==null?(_0x542500=G(_0x561e74))==null?void 0x0:_0x542500['startOffset']:_0x599ff8;if(_0xd602b7==null)return!0x1;let _0x2c0745=ue({'cursorOffset':_0xd602b7,'documentData':_0x5727a7['previousDocumentData'],'paragraphStartIndex':_0x45fa69==null?void 0x0:_0x45fa69['paragraphStartIndex']});return _0x2c0745?q(_0x5727a7[_0x4da7e9(0x226)],_0x5727a7[_0x4da7e9(0x1e3)],_0x5727a7[_0x4da7e9(0x1c2)],_0x2c0745['nextDocumentData'],_0x2c0745[_0x4da7e9(0x1f6)]):!0x1;}};function W(_0x482f3b,_0x9a475b){const _0x58afea=_0x4a8a2d;let _0x4faac0=_0x482f3b['get'](_0x3abeac),_0xaaf406=_0x9a475b?_0x4faac0[_0x58afea(0x1df)](_0x9a475b):_0x4faac0[_0x58afea(0x1c3)](_0x2bb6f5[_0x58afea(0x1d7)]);return _0xaaf406?{'commandService':_0x482f3b['get'](_0x3735ed),'model':_0x482f3b['get'](H),'previousDocumentData':_0xaaf406[_0x58afea(0x215)](),'unitId':_0xaaf406['getUnitId']()}:null;}function G(_0x48d8e5){const _0x7c73c4=_0x4a8a2d;var _0x1f4ac0;return(_0x1f4ac0=_0x48d8e5[_0x7c73c4(0x1f7)](_0x291a89)[_0x7c73c4(0x22e)]())==null?void 0x0:_0x1f4ac0[0x0];}function Le(_0x50f484){const _0x335578=_0x4a8a2d;var _0x4d0fb4;let _0x5c46dc=(_0x4d0fb4=_0x50f484[_0x335578(0x1f7)](_0x3abeac)[_0x335578(0x1c3)](_0x2bb6f5[_0x335578(0x1d7)]))==null?void 0x0:_0x4d0fb4['getUnitId']();try{return _0x50f484['get'](_0x2040aa)[_0x335578(0x204)](_0x5c46dc);}catch{return null;}}function Re(_0xc8d4b2){const _0x459600=_0x4a8a2d;var _0x66885,_0x360e57,_0x1eb2a3;let _0x5323c3=G(_0xc8d4b2);if(!_0x5323c3)return null;let _0x1ddf43=_0xc8d4b2[_0x459600(0x1f7)](_0x3abeac)['getCurrentUnitOfType'](_0x2bb6f5[_0x459600(0x1d7)]),_0x5dc10f=_0x1ddf43==null?void 0x0:_0x1ddf43[_0x459600(0x213)]();return _0x5dc10f?(_0x66885=_0x24fe28[_0x459600(0x1d4)][_0x459600(0x228)](_0x5323c3,(_0x360e57=_0x5dc10f['paragraphs'])==null?[]:_0x360e57,(_0x1eb2a3=_0x5dc10f[_0x459600(0x23c)])==null?'':_0x1eb2a3)[0x0])==null?null:_0x66885:null;}function ze(_0x48f164,_0x5d6c01){const _0x2758ca=_0x4a8a2d;var _0x93d0eb,_0x24ac7b,_0x5bd531,_0xe97b8e,_0x1a541c,_0x428a1d,_0x206213,_0x371f1f,_0x104ccd,_0x3d1e1a,_0x2a8cfb,_0x3c555b,_0x19f2e1,_0x23c305,_0x3c760e,_0x399b81,_0xfc1a60,_0x147f97;let _0x59a6ac=_0x2387fb['getInstance']();return[K(_0x59a6ac,[_0x2758ca(0x22f),_0x2758ca(0x23c)],(_0x93d0eb=_0x48f164[_0x2758ca(0x22f)])==null?void 0x0:_0x93d0eb['dataStream'],(_0x24ac7b=_0x5d6c01[_0x2758ca(0x22f)])==null?void 0x0:_0x24ac7b['dataStream']),K(_0x59a6ac,[_0x2758ca(0x22f),_0x2758ca(0x1ba)],(_0x5bd531=_0x48f164[_0x2758ca(0x22f)])==null?void 0x0:_0x5bd531[_0x2758ca(0x1ba)],(_0xe97b8e=_0x5d6c01[_0x2758ca(0x22f)])==null?void 0x0:_0xe97b8e[_0x2758ca(0x1ba)]),K(_0x59a6ac,[_0x2758ca(0x22f),'sectionBreaks'],(_0x1a541c=_0x48f164[_0x2758ca(0x22f)])==null?void 0x0:_0x1a541c[_0x2758ca(0x207)],(_0x428a1d=_0x5d6c01[_0x2758ca(0x22f)])==null?void 0x0:_0x428a1d[_0x2758ca(0x207)]),K(_0x59a6ac,['body','textRuns'],(_0x206213=_0x48f164[_0x2758ca(0x22f)])==null?void 0x0:_0x206213[_0x2758ca(0x206)],(_0x371f1f=_0x5d6c01[_0x2758ca(0x22f)])==null?void 0x0:_0x371f1f[_0x2758ca(0x206)]),K(_0x59a6ac,[_0x2758ca(0x22f),_0x2758ca(0x1cf)],(_0x104ccd=_0x48f164[_0x2758ca(0x22f)])==null?void 0x0:_0x104ccd[_0x2758ca(0x1cf)],(_0x3d1e1a=_0x5d6c01['body'])==null?void 0x0:_0x3d1e1a[_0x2758ca(0x1cf)]),K(_0x59a6ac,['body','customRanges'],(_0x2a8cfb=_0x48f164[_0x2758ca(0x22f)])==null?void 0x0:_0x2a8cfb[_0x2758ca(0x1d8)],(_0x3c555b=_0x5d6c01[_0x2758ca(0x22f)])==null?void 0x0:_0x3c555b[_0x2758ca(0x1d8)]),K(_0x59a6ac,[_0x2758ca(0x22f),_0x2758ca(0x238)],(_0x19f2e1=_0x48f164['body'])==null?void 0x0:_0x19f2e1[_0x2758ca(0x238)],(_0x23c305=_0x5d6c01[_0x2758ca(0x22f)])==null?void 0x0:_0x23c305[_0x2758ca(0x238)]),K(_0x59a6ac,['body',_0x2758ca(0x1ee)],(_0x3c760e=_0x48f164[_0x2758ca(0x22f)])==null?void 0x0:_0x3c760e[_0x2758ca(0x1ee)],(_0x399b81=_0x5d6c01['body'])==null?void 0x0:_0x399b81['tables']),K(_0x59a6ac,[_0x2758ca(0x22f),_0x2758ca(0x1c1)],(_0xfc1a60=_0x48f164[_0x2758ca(0x22f)])==null?void 0x0:_0xfc1a60['blockRanges'],(_0x147f97=_0x5d6c01['body'])==null?void 0x0:_0x147f97['blockRanges'])][_0x2758ca(0x233)](Boolean)['reduce']((_0x30a948,_0x36800f)=>_0x2387fb[_0x2758ca(0x1db)](_0x30a948,_0x36800f),null);}function K(_0x496e0e,_0xabeaeb,_0x3cfa55,_0x2dd681){const _0x1b2a92=_0x4a8a2d;return _0xb48f1['diffValue'](_0x3cfa55,_0x2dd681)?null:_0x496e0e[_0x1b2a92(0x220)](_0xabeaeb,_0x3cfa55,_0x2dd681);}function q(_0x1c7168,_0x258537,_0x42aba6,_0x47945c,_0x5aac27){const _0x4ca4d8=_0x4a8a2d;let _0x55ea90=ze(_0x42aba6,_0x47945c);return _0x55ea90?!!_0x1c7168[_0x4ca4d8(0x1fb)](_0x4297bb['id'],{'unitId':_0x258537,'actions':_0x55ea90,'textRanges':[{'startOffset':_0x5aac27,'endOffset':_0x5aac27,'collapsed':!0x0}],'isEditing':!0x1}):!0x1;}const J=_0x4a8a2d(0x21e);var Be=_0x4a8a2d(0x218),Ve=_0x4a8a2d(0x1ff);const Y={};function X(_0x51a0d7,_0x4f288e){return function(_0xc2b95e,_0xe780a8){_0x4f288e(_0xc2b95e,_0xe780a8,_0x51a0d7);};}function Z(_0xb42bea,_0x307348,_0x399d74,_0x5b84c7){const _0x3fbc82=_0x4a8a2d;var _0x5d394d=arguments[_0x3fbc82(0x1dd)],_0x1b366b=_0x5d394d<0x3?_0x307348:_0x5b84c7===null?_0x5b84c7=Object['getOwnPropertyDescriptor'](_0x307348,_0x399d74):_0x5b84c7,_0x1b2d90;if(typeof Reflect==_0x3fbc82(0x1d5)&&typeof Reflect[_0x3fbc82(0x1f3)]==_0x3fbc82(0x1ed))_0x1b366b=Reflect['decorate'](_0xb42bea,_0x307348,_0x399d74,_0x5b84c7);else{for(var _0x552881=_0xb42bea[_0x3fbc82(0x1dd)]-0x1;_0x552881>=0x0;_0x552881--)(_0x1b2d90=_0xb42bea[_0x552881])&&(_0x1b366b=(_0x5d394d<0x3?_0x1b2d90(_0x1b366b):_0x5d394d>0x3?_0x1b2d90(_0x307348,_0x399d74,_0x1b366b):_0x1b2d90(_0x307348,_0x399d74))||_0x1b366b);}return _0x5d394d>0x3&&_0x1b366b&&Object[_0x3fbc82(0x1c7)](_0x307348,_0x399d74,_0x1b366b),_0x1b366b;}let Q=class extends _0x3e8f03{constructor(_0x525000,_0x5307ab){const _0x527ba6=_0x4a8a2d;super(),this[_0x527ba6(0x1de)]=_0x525000,this[_0x527ba6(0x205)]=_0x5307ab,this['_initResource']();}['_initResource'](){const _0x138310=_0x4a8a2d;this['disposeWithMe'](this[_0x138310(0x1de)][_0x138310(0x222)]({'pluginName':J,'businesses':[_0x2bb6f5['UNIVER_DOC']],'toJson':_0x756b90=>JSON[_0x138310(0x22b)](this['_docsCodeModel'][_0x138310(0x216)](_0x756b90)),'parseJson':_0x326414=>w(JSON[_0x138310(0x1e9)](_0x326414)),'onLoad':(_0x3bb989,_0x9d9c94)=>this[_0x138310(0x205)][_0x138310(0x1b8)](_0x3bb989,_0x9d9c94),'onUnLoad':_0x1fb262=>this[_0x138310(0x205)][_0x138310(0x219)](_0x1fb262)}));}};Q=Z([X(0x0,_0x3f714d),X(0x1,_0x4628b1(H))],Q);let $=class extends _0x5357ad{constructor(_0x44a0c7=Y,_0x299616,_0x10514f,_0x5e69cf){const _0x4b2ffc=_0x4a8a2d;super(),this[_0x4b2ffc(0x20d)]=_0x44a0c7,this['_injector']=_0x299616,this[_0x4b2ffc(0x1fc)]=_0x10514f,this[_0x4b2ffc(0x1cd)]=_0x5e69cf;let {..._0x1fb70a}=_0x3de4b6({},Y,this[_0x4b2ffc(0x20d)]);this['_configService']['setConfig'](_0x4b2ffc(0x1fa),_0x1fb70a);}[_0x4a8a2d(0x1c4)](){const _0x41fbe=_0x4a8a2d;this[_0x41fbe(0x237)][_0x41fbe(0x1cc)]([H]),this[_0x41fbe(0x237)]['add']([Q]),this[_0x41fbe(0x237)][_0x41fbe(0x1f7)](H),this[_0x41fbe(0x237)][_0x41fbe(0x1f7)](Q),[U,Me,Pe,Fe,Ie,Ne][_0x41fbe(0x1e2)](_0x4ae732=>this[_0x41fbe(0x1ec)](this[_0x41fbe(0x1fc)][_0x41fbe(0x232)](_0x4ae732)));}};V($,_0x4a8a2d(0x202),J),V($,'packageName',Be),V($,_0x4a8a2d(0x1f9),Ve),V($,_0x4a8a2d(0x23b),_0x2bb6f5[_0x4a8a2d(0x1d7)]),$=Z([_0xb86e0(_0x141bd9,_0x1f5d37),X(0x1,_0x4628b1(_0x531f72)),X(0x2,_0x3735ed),X(0x3,_0x42560c)],$);export{S as DEFAULT_CODE_CONFIG,J as DOCS_CODE_PLUGIN,Ie as DocsCodeCancelEmptyParagraphCommand,Ne as DocsCodeConsumeBoundaryDeleteCommand,Fe as DocsCodeExitCommand,Me as DocsCodeInsertBelowCommand,U as DocsCodeInsertCommand,H as DocsCodeModel,Pe as DocsCodeUpdateCommand,$ as UniverDocsCodePlugin,ue as buildCancelEmptyCodeParagraphActions,le as buildExitCodeActions,ae as buildInsertCodeActions,ce as buildUpdateCodeActions,fe as findCodeRangeAtOffset,pe as isCodeBoundaryDelete,C as normalizeDocsCodeConfig};
|
|
1
|
+
const _0x44848c=_0x2b86;(function(_0x2e2ed8,_0x3155ce){const _0xb2ba41=_0x2b86,_0x461920=_0x2e2ed8();while(!![]){try{const _0x4e6558=-parseInt(_0xb2ba41(0xa6))/0x1+parseInt(_0xb2ba41(0xae))/0x2*(parseInt(_0xb2ba41(0xef))/0x3)+-parseInt(_0xb2ba41(0x100))/0x4+-parseInt(_0xb2ba41(0xbf))/0x5*(-parseInt(_0xb2ba41(0xc8))/0x6)+parseInt(_0xb2ba41(0xd8))/0x7*(parseInt(_0xb2ba41(0xee))/0x8)+parseInt(_0xb2ba41(0x7c))/0x9+parseInt(_0xb2ba41(0xc5))/0xa*(-parseInt(_0xb2ba41(0xd9))/0xb);if(_0x4e6558===_0x3155ce)break;else _0x461920['push'](_0x461920['shift']());}catch(_0x519da8){_0x461920['push'](_0x461920['shift']());}}}(_0x36fb,0x7d801));import{BuildTextUtils as _0x2aa63d,CommandType as _0x2f4978,DataStreamTreeTokenType as _0x272a0f,DependentOn as _0x1c14e5,Disposable as _0x7a2bfc,DocumentBlockRangeType as _0x45cc53,ICommandService as _0x10119a,IConfigService as _0x1d5c59,IResourceManagerService as _0x23d35f,IUniverInstanceService as _0x228d50,Inject as _0x163407,Injector as _0x445227,JSONX as _0x2d3193,Plugin as _0x495660,TextX as _0x11e4b5,UniverInstanceType as _0x108364,containsInteriorInsertionOffset as _0x50cd86,containsStreamIndex as _0x33e1b3,createParagraphId as _0x2aebf8,generateRandomId as _0x4842c7,getBlockRangeInterval as _0x3fa12e,getBodySliceForTextXAction as _0x50fffd,getParagraphContentStartOffset as _0x4fb420,getParagraphContentStartOffsets as _0x2a5ac0,getParagraphFollowingBlockOffset as _0x491f6d,getSingleDataStreamChange as _0x168f93,intersectsOperationalIntervals as _0x457fb0,merge as _0x55c09c,shiftExclusiveRangeOnDelete as _0x242fdb,shiftExclusiveRangeOnInsert as _0x4cf68,shiftInclusiveRangeOnDelete as _0x28b2df,shiftInclusiveRangeOnInsert as _0x30604c}from'@univerjs/core';import{DocContentInsertService as _0x22ba41,DocSelectionManagerService as _0x3a7722,RichTextEditingMutation as _0x28d3f9,UniverDocsPlugin as _0x4d0ee5,isHeaderFooterSelection as _0x452170}from'@univerjs/docs';import{Subject as _0x500c1a}from'rxjs';import{UniverLicensePlugin as _0x355b25}from'@univerjs-pro/license';const be={'language':'javascript','showLineNumbers':!0x1,'tabSize':0x4,'wrap':!0x0};function y(_0x6ca718){return{...be,..._0x6ca718};}function b(_0x3a3c41){const _0x2ed787=_0x2b86;var _0x459190;let _0x2ea3e6=(_0x459190=_0x3a3c41==null?void 0x0:_0x3a3c41[_0x2ed787(0xb7)])==null?{}:_0x459190;return{'codes':Object[_0x2ed787(0xe9)](Object['entries'](_0x2ea3e6)[_0x2ed787(0x108)](([_0x489708,_0x18fbbb])=>[_0x489708,y(_0x18fbbb)]))};}function x(_0x192a4d,_0xf8f51c,_0x4ff642){const _0x161177=_0x2b86;let _0x29ca68=b(_0x192a4d);return _0x29ca68[_0x161177(0xb7)][_0xf8f51c]=y({..._0x29ca68[_0x161177(0xb7)][_0xf8f51c],..._0x4ff642}),_0x29ca68;}function S(_0x571bcc,_0x3505a5){const _0x19d81f=_0x2b86;let _0x33ad57=b(_0x571bcc);return delete _0x33ad57[_0x19d81f(0xb7)][_0x3505a5],_0x33ad57;}const xe=_0x44848c(0xa8);var C=class extends Error{constructor(_0x1e82a4=_0x44848c(0xc1)){super(_0x1e82a4);}};function Se(_0x40053f){const _0x568947=_0x44848c;var _0x3dc9cc,_0x487325,_0x23823e;let _0xa92936=T(_0x40053f[_0x568947(0x7d)]),_0x2a4971=D(_0xa92936),_0x56d492=we(_0x40053f['startOffset'],_0x40053f['endOffset']),_0x46c524=_0x56d492?(_0x3dc9cc=_0x2a4971[_0x568947(0x104)])==null?void 0x0:_0x3dc9cc[_0x568947(0xea)](_0x6aa186=>{const _0x568a57=_0x568947;let _0x42d121=_0x3fa12e(_0x6aa186);return _0x42d121[_0x568a57(0xd4)]===_0x56d492['startOffset']&&_0x42d121[_0x568a57(0x83)]===_0x56d492['endOffset'];}):void 0x0,{startOffset:_0x2f64fa,endOffset:_0x3a0da8}=_0x46c524?_0x56d492:ze(_0x2a4971,_0x40053f[_0x568947(0xd4)],_0x40053f[_0x568947(0x83)],_0x40053f[_0x568947(0xda)]);if(!_0x46c524&&Te(_0x2a4971,_0x2f64fa,_0x3a0da8))throw new C(_0x568947(0xf0));let _0x7019ca=He(_0x2a4971,_0x2f64fa,_0x3a0da8),_0x1483a8=(_0x487325=_0x46c524==null?void 0x0:_0x46c524[_0x568947(0xc9)])==null?_0x40053f[_0x568947(0xc9)]:_0x487325,_0x59b12f=x(_0x40053f['metadata'],_0x1483a8,{...be,..._0x40053f[_0x568947(0xb2)]});if(_0x46c524)return _0x46c524[_0x568947(0xc0)]=_0x45cc53[_0x568947(0x10f)],Ce(_0x2a4971,_0x2f64fa,_0x3a0da8),Pe(_0x2a4971,_0x2f64fa,_0x3a0da8,_0x7019ca),A(_0x2a4971,_0x46c524),{'nextDocumentData':_0xa92936,'nextMetadata':_0x59b12f,'cursorOffset':_0x2f64fa+0x1};if(_0x2f64fa===_0x3a0da8){var _0x534edd,_0x273867;let _0x36f723=''+_0x272a0f[_0x568947(0xcb)]+_0x272a0f['PARAGRAPH']+_0x272a0f[_0x568947(0xdd)];j(_0x2a4971,_0x2f64fa,_0x36f723,{'paragraphs':[{'startIndex':0x1,'paragraphId':_0x2aebf8(new Set((_0x534edd=_0x2a4971[_0x568947(0xd3)])==null?void 0x0:_0x534edd[_0x568947(0x108)](_0x36aeed=>_0x36aeed[_0x568947(0x10e)]))),'paragraphStyle':Ne(!0x0,!0x0,_0x7019ca)}],'blockRanges':[{'blockId':_0x1483a8,'blockType':_0x45cc53[_0x568947(0x10f)],'startIndex':0x0,'endIndex':_0x36f723[_0x568947(0x112)]-0x1}]});let _0x5f2a12=(_0x273867=_0x2a4971['blockRanges'])==null?void 0x0:_0x273867[_0x568947(0xea)](_0x27ff3d=>_0x27ff3d['blockId']===_0x1483a8);return _0x5f2a12&&A(_0x2a4971,_0x5f2a12),{'nextDocumentData':_0xa92936,'nextMetadata':_0x59b12f,'cursorOffset':_0x2f64fa+0x1};}j(_0x2a4971,_0x3a0da8,_0x272a0f[_0x568947(0xdd)]),j(_0x2a4971,_0x2f64fa,_0x272a0f['BLOCK_START']),Pe(_0x2a4971,_0x2f64fa,_0x3a0da8+0x1,_0x7019ca);let _0x4ecc09={'blockId':_0x1483a8,'blockType':_0x45cc53[_0x568947(0x10f)],'startIndex':_0x2f64fa,'endIndex':_0x3a0da8+0x1};return _0x2a4971[_0x568947(0x104)]=[...(_0x23823e=_0x2a4971[_0x568947(0x104)])==null?[]:_0x23823e,_0x4ecc09][_0x568947(0x87)]((_0x34a9c5,_0x2c48f3)=>_0x34a9c5[_0x568947(0xa2)]-_0x2c48f3[_0x568947(0xa2)]),A(_0x2a4971,_0x4ecc09),{'nextDocumentData':_0xa92936,'nextMetadata':_0x59b12f,'cursorOffset':_0x2f64fa+0x1};}function Ce(_0x14b509,_0x532915,_0x4ff522){const _0x2065fa=_0x44848c;var _0x43739a;((_0x43739a=_0x14b509[_0x2065fa(0xd3)])==null?[]:_0x43739a)[_0x2065fa(0x89)](_0x30b50a=>_0x30b50a[_0x2065fa(0xa2)]>_0x532915&&_0x30b50a[_0x2065fa(0xa2)]<_0x4ff522)[_0x2065fa(0x109)](_0xd465ab=>{const _0xbcc94b=_0x2065fa;var _0x5058f4;let _0x2030f9={...(_0x5058f4=_0xd465ab['paragraphStyle'])==null?{}:_0x5058f4};delete _0x2030f9['spaceAbove'],delete _0x2030f9[_0xbcc94b(0xe6)],_0xd465ab['paragraphStyle']=_0x2030f9;});}function we(_0xd46e92,_0x3f70ad){return _0xd46e92==null||_0x3f70ad==null||_0xd46e92===_0x3f70ad?null:{'startOffset':Math['min'](_0xd46e92,_0x3f70ad),'endOffset':Math['max'](_0xd46e92,_0x3f70ad)};}function Te(_0xede0bf,_0x448b00,_0x3728fb){const _0x431334=_0x44848c;var _0x20ba8d;return((_0x20ba8d=_0xede0bf[_0x431334(0x104)])==null?[]:_0x20ba8d)[_0x431334(0x8a)](_0x31f125=>{let _0x30ef4c=_0x3fa12e(_0x31f125);return _0x448b00===_0x3728fb?_0x50cd86(_0x30ef4c,_0x448b00):_0x457fb0(_0x30ef4c,{'startOffset':_0x448b00,'endOffset':_0x3728fb});});}function Ee(_0x549f41){const _0x3ee1f9=_0x44848c;return{'nextDocumentData':T(_0x549f41[_0x3ee1f9(0x7d)]),'nextMetadata':x(_0x549f41[_0x3ee1f9(0xcd)],_0x549f41['blockId'],_0x549f41['config']),'cursorOffset':0x0};}function w(_0xced359){const _0x3dbaa2=_0x44848c;let _0x54d3ed=T(_0xced359[_0x3dbaa2(0x7d)]),_0x1650b3=D(_0x54d3ed),_0x13f3f1=Ae(_0x1650b3,_0xced359[_0x3dbaa2(0xc9)]);if(!_0x13f3f1)return null;let _0x35aacd=Le(_0x1650b3,_0x13f3f1);return{'nextDocumentData':_0x54d3ed,'nextMetadata':S(_0xced359['metadata'],_0xced359[_0x3dbaa2(0xc9)]),'cursorOffset':_0x35aacd};}function De(_0x4bd561){const _0x4314d9=_0x44848c;var _0x45d425;let _0x528969=T(_0x4bd561[_0x4314d9(0x7d)]),_0x587218=D(_0x528969),_0x345e4b=Ae(_0x587218,_0x4bd561[_0x4314d9(0xc9)]);if(!_0x345e4b)return null;let _0x5dcd6f=_0x3fa12e(_0x345e4b);return M(_0x587218,_0x5dcd6f['startOffset'],_0x5dcd6f['endOffset']),_0x587218['blockRanges']=(_0x45d425=_0x587218[_0x4314d9(0x104)])==null?void 0x0:_0x45d425[_0x4314d9(0x89)](_0x440875=>_0x440875['blockId']!==_0x4bd561[_0x4314d9(0xc9)]),{'nextDocumentData':_0x528969,'nextMetadata':S(_0x4bd561['metadata'],_0x4bd561[_0x4314d9(0xc9)]),'cursorOffset':_0x345e4b[_0x4314d9(0xa2)]};}function Oe(_0x427c95){const _0x28967f=_0x44848c;let _0x29f7a1=T(_0x427c95[_0x28967f(0x7d)]),_0x6e6451=D(_0x29f7a1),_0x5227aa=Me(_0x6e6451,_0x427c95[_0x28967f(0xc2)]);return _0x5227aa&&ke(_0x29f7a1,_0x6e6451,_0x5227aa,_0x427c95['cursorOffset'],_0x427c95[_0x28967f(0xed)])||null;}function ke(_0x4b8865,_0x56d693,_0x2c9ec6,_0x519a86,_0x88b0db){const _0x51f3a0=_0x44848c;let _0x481f94=Je(_0x56d693,_0x2c9ec6,_0x519a86,_0x88b0db);if(!_0x481f94)return null;let _0x112b22=_0x481f94['endTokenOffset']-0x1;return M(_0x56d693,_0x481f94[_0x51f3a0(0xb8)][_0x51f3a0(0xa2)],_0x481f94['paragraph'][_0x51f3a0(0xa2)]+0x1),{'nextDocumentData':_0x4b8865,'cursorOffset':_0x112b22};}function Ae(_0x1f1ad6,_0x35c581){const _0x534150=_0x44848c;var _0x32fe89;return _0x1f1ad6==null||(_0x32fe89=_0x1f1ad6['blockRanges'])==null?void 0x0:_0x32fe89[_0x534150(0xea)](_0x24e8e0=>_0x24e8e0[_0x534150(0xc0)]===_0x45cc53['CODE']&&_0x24e8e0['blockId']===_0x35c581);}function je(_0x22a5af){const _0x36bbaa=_0x44848c;var _0x52ce38;let _0x289c0d=_0x22a5af[_0x36bbaa(0x7d)][_0x36bbaa(0xf3)];if(!_0x289c0d)return!0x1;let _0x14afd6=_0x22a5af['direction']===_0x36bbaa(0xde)?_0x22a5af['cursorOffset']-0x1:_0x22a5af[_0x36bbaa(0xc2)],_0x4f0501=_0x22a5af[_0x36bbaa(0xf1)]===_0x36bbaa(0xeb)?_0x22a5af['cursorOffset']+0x1:_0x14afd6;return((_0x52ce38=_0x289c0d[_0x36bbaa(0x104)])==null?[]:_0x52ce38)['some'](_0x2507a0=>_0x2507a0[_0x36bbaa(0xc0)]===_0x45cc53[_0x36bbaa(0x10f)]?_0x14afd6===_0x2507a0[_0x36bbaa(0xa2)]||_0x14afd6===_0x2507a0[_0x36bbaa(0xad)]||_0x4f0501===_0x2507a0[_0x36bbaa(0xa2)]||_0x4f0501===_0x2507a0[_0x36bbaa(0xad)]:!0x1);}function _0x2b86(_0x106b44,_0x3a6a88){_0x106b44=_0x106b44-0x7b;const _0x36fb94=_0x36fb();let _0x2b86a4=_0x36fb94[_0x106b44];return _0x2b86a4;}function Me(_0x8d24ee,_0x4d0341){const _0x3c5653=_0x44848c;var _0x3f80ef;return(_0x3f80ef=_0x8d24ee[_0x3c5653(0x104)])==null?void 0x0:_0x3f80ef[_0x3c5653(0xea)](_0xe7b08e=>{const _0x22e361=_0x3c5653;let _0x5910ad=k(_0xe7b08e);return _0xe7b08e['blockType']===_0x45cc53[_0x22e361(0x10f)]&&_0xe7b08e[_0x22e361(0xa2)]<=_0x4d0341&&_0x4d0341<=_0x5910ad+0x2;});}function Ne(_0x95d821,_0x3fe9ae,_0x3811c4=!0x1){return{'indentEnd':{'v':0x14},'indentStart':{'v':0x14},..._0x95d821&&_0x3811c4?{'spaceAbove':{'v':0x8}}:{},'textStyle':{'ff':xe,'fs':0xc}};}function Pe(_0x5a85ea,_0x3a8e76,_0x2e2914,_0x1542c2=!0x1){const _0x3b87f7=_0x44848c;var _0x14706b;let _0x17c524=((_0x14706b=_0x5a85ea[_0x3b87f7(0xd3)])==null?[]:_0x14706b)[_0x3b87f7(0x89)](_0x519e5d=>_0x519e5d[_0x3b87f7(0xa2)]>_0x3a8e76&&_0x519e5d['startIndex']<_0x2e2914);_0x17c524[_0x3b87f7(0x109)]((_0x53455f,_0x27aab8)=>{const _0x1a2176=_0x3b87f7;var _0x8873cc;_0x53455f[_0x1a2176(0x97)]={...(_0x8873cc=_0x53455f[_0x1a2176(0x97)])==null?{}:_0x8873cc,...Ne(_0x27aab8===0x0,_0x27aab8===_0x17c524[_0x1a2176(0x112)]-0x1,_0x1542c2)};});}function Fe(_0x3bb403){const _0x2df59d=_0x44848c;var _0x260162,_0x4788dd;let _0x373730={..._0x3bb403==null?{}:_0x3bb403};return delete _0x373730['indentEnd'],delete _0x373730['indentStart'],delete _0x373730[_0x2df59d(0x90)],delete _0x373730[_0x2df59d(0xe6)],((_0x260162=_0x373730[_0x2df59d(0xb5)])==null?void 0x0:_0x260162['ff'])===xe&&((_0x4788dd=_0x373730[_0x2df59d(0xb5)])==null?void 0x0:_0x4788dd['fs'])===0xc&&delete _0x373730[_0x2df59d(0xb5)],_0x373730;}function Ie(_0x3d8b6b,_0x1d1e9a){const _0x119781=_0x44848c;var _0xeed05c;let _0x628833=k(_0x1d1e9a);return((_0xeed05c=_0x3d8b6b['paragraphs'])==null?[]:_0xeed05c)[_0x119781(0x89)](_0x43cb5b=>_0x43cb5b[_0x119781(0xa2)]>_0x1d1e9a[_0x119781(0xa2)]&&_0x43cb5b[_0x119781(0xa2)]<_0x628833);}function Le(_0x35e377,_0x3270fa){const _0x5989ef=_0x44848c;var _0x2339ba;let _0x324a29=k(_0x3270fa);return Ie(_0x35e377,_0x3270fa)['forEach'](_0x301245=>{const _0x374b59=_0x2b86;_0x301245[_0x374b59(0x97)]=Fe(_0x301245[_0x374b59(0x97)]);}),M(_0x35e377,_0x324a29,_0x324a29+0x1),M(_0x35e377,_0x3270fa[_0x5989ef(0xa2)],_0x3270fa['startIndex']+0x1),_0x35e377[_0x5989ef(0x104)]=(_0x2339ba=_0x35e377['blockRanges'])==null?void 0x0:_0x2339ba[_0x5989ef(0x89)](_0x218680=>_0x218680[_0x5989ef(0xc9)]!==_0x3270fa['blockId']),_0x3270fa[_0x5989ef(0xa2)];}function T(_0x12bdc1){const _0x1a7628=_0x44848c;return{..._0x12bdc1,'body':_0x12bdc1[_0x1a7628(0xf3)]?Re(_0x12bdc1['body']):_0x12bdc1[_0x1a7628(0xf3)]};}function Re(_0x24a94f){const _0x5ed366=_0x44848c;var _0x41405d,_0x2dfcf1,_0x2b83ba,_0x3cbb9b,_0x2608aa,_0x38f4b,_0x18396f,_0x1ce3f3,_0xaddfa1;return{..._0x24a94f,'paragraphs':(_0x41405d=_0x24a94f[_0x5ed366(0xd3)])==null?void 0x0:_0x41405d[_0x5ed366(0x108)](_0x11ff2e=>({..._0x11ff2e,'bullet':E(_0x11ff2e[_0x5ed366(0xac)]),'paragraphStyle':E(_0x11ff2e['paragraphStyle'])})),'sectionBreaks':(_0x2dfcf1=_0x24a94f[_0x5ed366(0xf2)])==null?void 0x0:_0x2dfcf1[_0x5ed366(0x108)](_0x50241f=>({..._0x50241f})),'textRuns':(_0x2b83ba=_0x24a94f[_0x5ed366(0xb4)])==null?void 0x0:_0x2b83ba[_0x5ed366(0x108)](_0x5397ae=>({..._0x5397ae})),'tables':(_0x3cbb9b=_0x24a94f['tables'])==null?void 0x0:_0x3cbb9b[_0x5ed366(0x108)](_0x3487ef=>({..._0x3487ef})),'columnGroups':(_0x2608aa=_0x24a94f[_0x5ed366(0x106)])==null?void 0x0:_0x2608aa[_0x5ed366(0x108)](_0x1ecf1c=>{const _0x5bf908=_0x5ed366;var _0x1f9e3d;return{..._0x1ecf1c,'columns':(_0x1f9e3d=_0x1ecf1c[_0x5bf908(0xfc)])==null?void 0x0:_0x1f9e3d[_0x5bf908(0x108)](_0xd271b4=>E(_0xd271b4))};}),'blockRanges':(_0x38f4b=_0x24a94f[_0x5ed366(0x104)])==null?void 0x0:_0x38f4b[_0x5ed366(0x108)](_0x53cd0f=>({..._0x53cd0f})),'customRanges':(_0x18396f=_0x24a94f[_0x5ed366(0xe5)])==null?void 0x0:_0x18396f['map'](_0x370577=>({..._0x370577})),'customDecorations':(_0x1ce3f3=_0x24a94f[_0x5ed366(0xd7)])==null?void 0x0:_0x1ce3f3[_0x5ed366(0x108)](_0x5453c3=>({..._0x5453c3})),'customBlocks':(_0xaddfa1=_0x24a94f[_0x5ed366(0x99)])==null?void 0x0:_0xaddfa1[_0x5ed366(0x108)](_0x25cfd5=>({..._0x25cfd5}))};}function E(_0x5a7a19){const _0x13a983=_0x44848c;return Array[_0x13a983(0x101)](_0x5a7a19)?_0x5a7a19[_0x13a983(0x108)](_0x590cf2=>E(_0x590cf2)):!_0x5a7a19||typeof _0x5a7a19!=_0x13a983(0x9f)?_0x5a7a19:Object[_0x13a983(0xe9)](Object[_0x13a983(0xb1)](_0x5a7a19)[_0x13a983(0x108)](([_0x468a16,_0x2ac242])=>[_0x468a16,E(_0x2ac242)]));}function D(_0xfd151e){const _0x571c8e=_0x44848c;if(!_0xfd151e[_0x571c8e(0xf3)])throw Error(_0x571c8e(0x84));return _0xfd151e[_0x571c8e(0xf3)];}function ze(_0x180835,_0x1f4f4c,_0x2d1eec,_0x25989f='convert-paragraph'){const _0x2e9632=_0x44848c;if(_0x1f4f4c==null||_0x2d1eec==null){let _0xc2e7db=Ve(_0x180835);return{'startOffset':_0xc2e7db,'endOffset':_0xc2e7db};}let _0x34c5b4=Math[_0x2e9632(0x96)](_0x1f4f4c,_0x2d1eec),_0x5445c1=Math[_0x2e9632(0xfd)](_0x1f4f4c,_0x2d1eec),_0x8c7f3d=Ke(_0x180835,_0x34c5b4,_0x5445c1);return _0x34c5b4===_0x5445c1?_0x25989f===_0x2e9632(0x8e)?{'startOffset':_0x34c5b4,'endOffset':_0x5445c1}:Be(_0x180835,_0x34c5b4,_0x8c7f3d):Ue(_0x180835,_0x34c5b4,_0x5445c1,_0x8c7f3d);}function Be(_0x3366f7,_0x253cb2,_0x11e17){const _0x2055a8=_0x44848c;let _0x5640e8=We(_0x3366f7,_0x253cb2);if(_0x5640e8){let _0x37c2e2=O(_0x3366f7,_0x5640e8,_0x11e17);if(_0x37c2e2<_0x5640e8[_0x2055a8(0xa2)])return{'startOffset':_0x37c2e2,'endOffset':_0x11e17?Math[_0x2055a8(0x96)](_0x5640e8['startIndex']+0x1,_0x11e17['endOffset']):_0x5640e8['startIndex']+0x1};}let _0x1ad0bf=_0x253cb2===0x0&&_0x3366f7[_0x2055a8(0x114)][0x0]===_0x272a0f['PARAGRAPH']?0x1:_0x253cb2;return{'startOffset':_0x1ad0bf,'endOffset':_0x1ad0bf};}function Ve(_0x4937ab){const _0x18f8de=_0x44848c;return _0x4937ab[_0x18f8de(0x114)][_0x18f8de(0x119)](_0x272a0f[_0x18f8de(0x116)])?Math[_0x18f8de(0xfd)](0x0,_0x4937ab[_0x18f8de(0x114)]['length']-0x1):_0x4937ab[_0x18f8de(0x114)][_0x18f8de(0x112)];}function He(_0x3bd8dd,_0x12ef98,_0x48de42){const _0x4c41b0=_0x44848c;var _0xfdd18b;let _0x254835=Math['min'](_0x12ef98,_0x48de42),_0x4137bb=Math['max'](_0x12ef98,_0x48de42);return!!((_0xfdd18b=_0x3bd8dd[_0x4c41b0(0xfb)])!=null&&_0xfdd18b[_0x4c41b0(0x8a)](_0x3da091=>_0x254835>_0x3da091[_0x4c41b0(0xa2)]&&_0x254835<_0x3da091[_0x4c41b0(0xad)]||_0x4137bb>_0x3da091[_0x4c41b0(0xa2)]&&_0x4137bb<_0x3da091[_0x4c41b0(0xad)]||_0x254835<=_0x3da091[_0x4c41b0(0xa2)]&&_0x4137bb>=_0x3da091[_0x4c41b0(0xad)]));}function Ue(_0x4eaf9d,_0x3d64e1,_0x325673,_0x3340ef){const _0x4f59d5=_0x44848c;var _0x4b3e56,_0x31c271;let _0x5a6179=[...(_0x4b3e56=_0x4eaf9d[_0x4f59d5(0xd3)])==null?[]:_0x4b3e56][_0x4f59d5(0x87)]((_0x466e65,_0x3c5777)=>_0x466e65[_0x4f59d5(0xa2)]-_0x3c5777['startIndex']),_0x276f3d=_0x2a5ac0(_0x4eaf9d),_0x2e9f40=_0x5a6179['find'](_0x47c731=>O(_0x4eaf9d,_0x47c731,_0x3340ef,_0x276f3d)<=_0x3d64e1&&_0x3d64e1<=_0x47c731[_0x4f59d5(0xa2)]),_0x488598=(_0x31c271=_0x5a6179['find'](_0x62a9a=>_0x62a9a[_0x4f59d5(0xa2)]>=_0x325673-0x1))==null?_0x5a6179[_0x5a6179[_0x4f59d5(0x112)]-0x1]:_0x31c271;return{'startOffset':_0x2e9f40?O(_0x4eaf9d,_0x2e9f40,_0x3340ef,_0x276f3d):_0x3d64e1,'endOffset':_0x488598?Ge(_0x488598,_0x3340ef):_0x325673};}function We(_0x441c53,_0x1ac5ae){const _0x24814a=_0x44848c;var _0x246986;let _0x499ca0=[...(_0x246986=_0x441c53[_0x24814a(0xd3)])==null?[]:_0x246986][_0x24814a(0x87)]((_0x54eff0,_0x35885c)=>_0x54eff0[_0x24814a(0xa2)]-_0x35885c[_0x24814a(0xa2)]),_0x461df8=_0x2a5ac0(_0x441c53);return _0x499ca0[_0x24814a(0xea)](_0x5696d5=>{const _0x3b2ef2=_0x24814a;var _0xcd9d76;return((_0xcd9d76=_0x461df8[_0x3b2ef2(0x7b)](_0x5696d5[_0x3b2ef2(0xa2)]))==null?0x0:_0xcd9d76)<=_0x1ac5ae&&_0x1ac5ae<=_0x5696d5[_0x3b2ef2(0xa2)];});}function O(_0x1fcf5e,_0x5776db,_0x269139,_0x3f47a9){const _0xd48e81=_0x44848c;var _0x5731de;let _0x4ab08c=(_0x5731de=_0x3f47a9==null?void 0x0:_0x3f47a9[_0xd48e81(0x7b)](_0x5776db['startIndex']))==null?_0x4fb420(_0x1fcf5e,_0x5776db):_0x5731de;return _0x269139?Math['max'](_0x4ab08c,_0x269139[_0xd48e81(0xd4)]):_0x4ab08c;}function Ge(_0x2f66db,_0x519003){const _0x5081db=_0x44848c;let _0x4a180b=_0x2f66db[_0x5081db(0xa2)]+0x1;return _0x519003?Math[_0x5081db(0x96)](_0x4a180b,_0x519003['endOffset']):_0x4a180b;}function Ke(_0x50acb8,_0x32b592,_0x1f742e){const _0x2ceb62=_0x44848c;let _0x3b7999=qe(_0x50acb8,_0x32b592),_0x54ac6e=qe(_0x50acb8,_0x32b592===_0x1f742e?_0x1f742e:Math[_0x2ceb62(0xfd)](_0x32b592,_0x1f742e-0x1));if(!(!_0x3b7999&&!_0x54ac6e)){if(!_0x3b7999||!_0x54ac6e||_0x3b7999['startTokenOffset']!==_0x54ac6e[_0x2ceb62(0xd6)]||_0x3b7999[_0x2ceb62(0xa7)]!==_0x54ac6e[_0x2ceb62(0xa7)])throw new C();return _0x3b7999;}}function qe(_0x4728e1,_0x413bc5){const _0x3a4491=_0x44848c;let _0xfc23ed=_0x4728e1[_0x3a4491(0x114)],_0x4527f6=-0x1;for(let _0x5a2fe7=Math['min'](_0x413bc5,_0xfc23ed[_0x3a4491(0x112)]-0x1);_0x5a2fe7>=0x0;_0x5a2fe7--){let _0x6cbd00=_0xfc23ed[_0x5a2fe7];if(_0x6cbd00===_0x272a0f['TABLE_CELL_END'])return;if(_0x6cbd00===_0x272a0f['TABLE_CELL_START']){_0x4527f6=_0x5a2fe7;break;}}if(_0x4527f6<0x0)return;let _0x2e563e=_0xfc23ed[_0x3a4491(0xf5)](_0x272a0f[_0x3a4491(0x9d)],_0x4527f6+0x1);if(!(_0x2e563e<0x0||_0x413bc5<_0x4527f6+0x1||_0x413bc5>_0x2e563e-0x1))return{'startOffset':_0x4527f6+0x1,'endOffset':Math[_0x3a4491(0xfd)](_0x4527f6+0x1,_0x2e563e-0x1),'startTokenOffset':_0x4527f6,'endTokenOffset':_0x2e563e};}function k(_0x19df24){const _0x9df44b=_0x44848c;return _0x3fa12e(_0x19df24)[_0x9df44b(0x83)]-0x1;}function Je(_0x6c02bf,_0x2fcd37,_0x2918c3,_0x45ba6d){const _0x6d0d7e=_0x44848c;var _0x3521b0;let _0x435701=k(_0x2fcd37),_0x4d3cb9=((_0x3521b0=_0x6c02bf[_0x6d0d7e(0xd3)])==null?[]:_0x3521b0)[_0x6d0d7e(0xea)](_0x9881dd=>_0x9881dd[_0x6d0d7e(0xa2)]===_0x435701+0x1);if(!_0x4d3cb9||_0x45ba6d!=null&&_0x4d3cb9['startIndex']!==_0x45ba6d||_0x2918c3!=null&&(_0x2918c3<_0x435701||_0x2918c3>_0x4d3cb9[_0x6d0d7e(0xa2)]+0x1)||_0x6c02bf['dataStream'][_0x4d3cb9[_0x6d0d7e(0xa2)]]!==_0x272a0f['PARAGRAPH'])return null;let _0x14c6c0=_0x4fb420(_0x6c02bf,_0x4d3cb9),_0x12afa8=_0x6c02bf[_0x6d0d7e(0x114)][_0x6d0d7e(0x93)](_0x14c6c0,_0x4d3cb9[_0x6d0d7e(0xa2)]);return Array[_0x6d0d7e(0xbc)](_0x12afa8)[_0x6d0d7e(0xab)](_0x124f0f=>_0x124f0f===_0x272a0f[_0x6d0d7e(0xdd)])?{'paragraph':_0x4d3cb9,'endTokenOffset':_0x435701}:null;}function A(_0x12ee5d,_0x4a45c3){const _0x46e8f8=_0x44848c;var _0x30bf05;let _0x1317df=k(_0x4a45c3),_0x292972=_0x12ee5d['dataStream'][_0x1317df+0x1];_0x292972!==_0x272a0f[_0x46e8f8(0x116)]&&_0x292972!==void 0x0||j(_0x12ee5d,_0x1317df+0x1,_0x272a0f[_0x46e8f8(0xc6)],{'paragraphs':[{'startIndex':0x0,'paragraphId':_0x2aebf8(new Set((_0x30bf05=_0x12ee5d[_0x46e8f8(0xd3)])==null?void 0x0:_0x30bf05[_0x46e8f8(0x108)](_0x572aa7=>_0x572aa7['paragraphId'])))}]});}function j(_0x1e2df0,_0xd517cc,_0x5301bc,_0x3fee64={}){const _0x5cc9a5=_0x44848c;var _0xd003f5,_0x7adca0;if(_0x5301bc){if(_0x1e2df0[_0x5cc9a5(0x114)]=''+_0x1e2df0[_0x5cc9a5(0x114)][_0x5cc9a5(0x93)](0x0,_0xd517cc)+_0x5301bc+_0x1e2df0[_0x5cc9a5(0x114)][_0x5cc9a5(0x93)](_0xd517cc),Ye(_0x1e2df0,_0xd517cc,_0x5301bc[_0x5cc9a5(0x112)]),(_0xd003f5=_0x3fee64[_0x5cc9a5(0xd3)])!=null&&_0xd003f5['length']){var _0x5e3df0;_0x1e2df0['paragraphs']=[...(_0x5e3df0=_0x1e2df0[_0x5cc9a5(0xd3)])==null?[]:_0x5e3df0,..._0x3fee64[_0x5cc9a5(0xd3)][_0x5cc9a5(0x108)](_0x1f982e=>({..._0x1f982e,'startIndex':_0x1f982e[_0x5cc9a5(0xa2)]+_0xd517cc}))][_0x5cc9a5(0x87)]((_0x5b4b93,_0x530ddf)=>_0x5b4b93[_0x5cc9a5(0xa2)]-_0x530ddf[_0x5cc9a5(0xa2)]);}if((_0x7adca0=_0x3fee64['blockRanges'])!=null&&_0x7adca0[_0x5cc9a5(0x112)]){var _0x399954;_0x1e2df0['blockRanges']=[...(_0x399954=_0x1e2df0['blockRanges'])==null?[]:_0x399954,..._0x3fee64[_0x5cc9a5(0x104)][_0x5cc9a5(0x108)](_0x4d240b=>({..._0x4d240b,'startIndex':_0x4d240b[_0x5cc9a5(0xa2)]+_0xd517cc,'endIndex':_0x4d240b[_0x5cc9a5(0xad)]+_0xd517cc}))][_0x5cc9a5(0x87)]((_0x2fc813,_0xca34e1)=>_0x2fc813[_0x5cc9a5(0xa2)]-_0xca34e1[_0x5cc9a5(0xa2)]);}}}function M(_0x350b50,_0x534630,_0x580f05){const _0x127859=_0x44848c;let _0x3a45b9=_0x580f05-_0x534630;_0x350b50[_0x127859(0x114)]=''+_0x350b50[_0x127859(0x114)]['slice'](0x0,_0x534630)+_0x350b50[_0x127859(0x114)][_0x127859(0x93)](_0x580f05),Xe(_0x350b50,_0x534630,_0x3a45b9);}function Ye(_0x179520,_0x9ae3fe,_0x3fdf78){const _0x442b5a=_0x44848c;_0x179520[_0x442b5a(0xd3)]=N(_0x179520[_0x442b5a(0xd3)],_0x9ae3fe,_0x3fdf78),_0x179520[_0x442b5a(0xf2)]=N(_0x179520[_0x442b5a(0xf2)],_0x9ae3fe,_0x3fdf78),_0x179520[_0x442b5a(0x99)]=N(_0x179520[_0x442b5a(0x99)],_0x9ae3fe,_0x3fdf78),_0x179520[_0x442b5a(0xb4)]=Ze(_0x179520[_0x442b5a(0xb4)],_0x9ae3fe,_0x3fdf78),_0x179520[_0x442b5a(0xfb)]=Qe(_0x179520[_0x442b5a(0xfb)],_0x9ae3fe,_0x3fdf78),_0x179520['columnGroups']=F(_0x179520[_0x442b5a(0x106)],_0x9ae3fe,_0x3fdf78),_0x179520[_0x442b5a(0xe5)]=F(_0x179520[_0x442b5a(0xe5)],_0x9ae3fe,_0x3fdf78),_0x179520[_0x442b5a(0xd7)]=F(_0x179520[_0x442b5a(0xd7)],_0x9ae3fe,_0x3fdf78),_0x179520['blockRanges']=F(_0x179520[_0x442b5a(0x104)],_0x9ae3fe,_0x3fdf78);}function Xe(_0x3e1122,_0x5c9cdc,_0x87823b){const _0x377159=_0x44848c;var _0x4ba97f,_0x444785;_0x3e1122['paragraphs']=P(_0x3e1122[_0x377159(0xd3)],_0x5c9cdc,_0x87823b),_0x3e1122['sectionBreaks']=P(_0x3e1122[_0x377159(0xf2)],_0x5c9cdc,_0x87823b),_0x3e1122[_0x377159(0x99)]=P(_0x3e1122[_0x377159(0x99)],_0x5c9cdc,_0x87823b),_0x3e1122[_0x377159(0xb4)]=(_0x4ba97f=$e((_0x444785=_0x3e1122[_0x377159(0xb4)])==null?void 0x0:_0x444785['map'](_0x389722=>({..._0x389722,'startIndex':_0x389722['st'],'endIndex':_0x389722['ed']})),_0x5c9cdc,_0x87823b))==null?void 0x0:_0x4ba97f[_0x377159(0x108)](_0x26f9a9=>{let {startIndex:_0x43a07b,endIndex:_0xaa1497,..._0x4f4a92}=_0x26f9a9;return{..._0x4f4a92,'st':_0x43a07b,'ed':_0xaa1497};}),_0x3e1122[_0x377159(0xfb)]=$e(_0x3e1122[_0x377159(0xfb)],_0x5c9cdc,_0x87823b),_0x3e1122[_0x377159(0x106)]=I(_0x3e1122[_0x377159(0x106)],_0x5c9cdc,_0x87823b),_0x3e1122[_0x377159(0xe5)]=I(_0x3e1122['customRanges'],_0x5c9cdc,_0x87823b),_0x3e1122['customDecorations']=I(_0x3e1122[_0x377159(0xd7)],_0x5c9cdc,_0x87823b),_0x3e1122[_0x377159(0x104)]=I(_0x3e1122['blockRanges'],_0x5c9cdc,_0x87823b);}function N(_0x8a9766,_0x1380ee,_0x55a8c9){const _0x576510=_0x44848c;return _0x8a9766==null?void 0x0:_0x8a9766[_0x576510(0x108)](_0x10affe=>_0x10affe['startIndex']>=_0x1380ee?{..._0x10affe,'startIndex':_0x10affe[_0x576510(0xa2)]+_0x55a8c9}:_0x10affe);}function P(_0x20938d,_0x5b671e,_0x1dbe2a){const _0x7c26d2=_0x44848c;let _0x2acc43=_0x5b671e+_0x1dbe2a;return _0x20938d==null?void 0x0:_0x20938d[_0x7c26d2(0x108)](_0x56ee6f=>_0x56ee6f[_0x7c26d2(0xa2)]>=_0x5b671e&&_0x56ee6f[_0x7c26d2(0xa2)]<_0x2acc43?null:_0x56ee6f['startIndex']>=_0x2acc43?{..._0x56ee6f,'startIndex':_0x56ee6f[_0x7c26d2(0xa2)]-_0x1dbe2a}:_0x56ee6f)[_0x7c26d2(0x89)](_0x429c14=>_0x429c14!=null);}function Ze(_0x4b5ad7,_0x566212,_0x1a9c0a){const _0xd77172=_0x44848c;return _0x4b5ad7==null?void 0x0:_0x4b5ad7[_0xd77172(0x108)](_0x3f0945=>_0x3f0945['st']>=_0x566212?{..._0x3f0945,'st':_0x3f0945['st']+_0x1a9c0a,'ed':_0x3f0945['ed']+_0x1a9c0a}:_0x3f0945['ed']>_0x566212?{..._0x3f0945,'ed':_0x3f0945['ed']+_0x1a9c0a}:_0x3f0945);}function F(_0x49f6ed,_0x13f033,_0x419612){const _0x4f3d2e=_0x44848c;return _0x49f6ed==null?void 0x0:_0x49f6ed[_0x4f3d2e(0x108)](_0x41e204=>_0x30604c(_0x41e204,_0x13f033,_0x419612));}function Qe(_0x31aa05,_0x1497b5,_0x129d41){return _0x31aa05==null?void 0x0:_0x31aa05['map'](_0x37e12d=>_0x4cf68(_0x37e12d,_0x1497b5,_0x129d41));}function I(_0x4a65f6,_0x4c1c18,_0x5962b6){const _0x288f0d=_0x44848c;return _0x4a65f6==null?void 0x0:_0x4a65f6[_0x288f0d(0x108)](_0x5da08c=>_0x28b2df(_0x5da08c,_0x4c1c18,_0x5962b6))[_0x288f0d(0x89)](_0xcb50fd=>_0xcb50fd!=null);}function $e(_0x5e1324,_0x158946,_0x656914){const _0x58d3b2=_0x44848c;return _0x5e1324==null?void 0x0:_0x5e1324[_0x58d3b2(0x108)](_0x55aec5=>_0x242fdb(_0x55aec5,_0x158946,_0x656914))['filter'](_0x2cc388=>_0x2cc388!=null);}function L(_0xd35733){'@babel/helpers - typeof';const _0x9bb945=_0x44848c;return L=typeof Symbol=='function'&&typeof Symbol[_0x9bb945(0xd1)]==_0x9bb945(0xdb)?function(_0x53aa59){return typeof _0x53aa59;}:function(_0x3c0d21){const _0xa06401=_0x9bb945;return _0x3c0d21&&typeof Symbol==_0xa06401(0xf8)&&_0x3c0d21[_0xa06401(0xb0)]===Symbol&&_0x3c0d21!==Symbol[_0xa06401(0x7e)]?_0xa06401(0xdb):typeof _0x3c0d21;},L(_0xd35733);}function et(_0x342dbc,_0x13e97c){const _0x4262bb=_0x44848c;if(L(_0x342dbc)!='object'||!_0x342dbc)return _0x342dbc;var _0x44fe32=_0x342dbc[Symbol[_0x4262bb(0xdc)]];if(_0x44fe32!==void 0x0){var _0x4a6b5=_0x44fe32[_0x4262bb(0xe0)](_0x342dbc,_0x13e97c||_0x4262bb(0xbd));if(L(_0x4a6b5)!=_0x4262bb(0x9f))return _0x4a6b5;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x13e97c===_0x4262bb(0x115)?String:Number)(_0x342dbc);}function tt(_0x3a6b60){const _0xd6c046=_0x44848c;var _0x5a7d9e=et(_0x3a6b60,'string');return L(_0x5a7d9e)==_0xd6c046(0xdb)?_0x5a7d9e:_0x5a7d9e+'';}function R(_0x2a2dd9,_0x31e1ab,_0xce998f){const _0x10b4ab=_0x44848c;return(_0x31e1ab=tt(_0x31e1ab))in _0x2a2dd9?Object[_0x10b4ab(0x107)](_0x2a2dd9,_0x31e1ab,{'value':_0xce998f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2a2dd9[_0x31e1ab]=_0xce998f,_0x2a2dd9;}var z=class extends _0x7a2bfc{constructor(..._0x4f55f3){const _0x43fc9b=_0x44848c;super(..._0x4f55f3),R(this,_0x43fc9b(0xa5),new Map()),R(this,'_change$',new _0x500c1a()),R(this,_0x43fc9b(0xba),this['_change$'][_0x43fc9b(0x8b)]());}[_0x44848c(0x95)](_0x1ab508,_0x22e61e){const _0xf2db1=_0x44848c;return b(this['_resources'][_0xf2db1(0x7b)](_0x1ab508))[_0xf2db1(0xb7)][_0x22e61e];}[_0x44848c(0x9e)](_0x3739fe,_0xd746d6,_0x53a110){const _0x3f7e06=_0x44848c;this['_setResource'](_0x3739fe,_0xd746d6,x(this[_0x3f7e06(0xa5)]['get'](_0x3739fe),_0xd746d6,_0x53a110));}[_0x44848c(0x98)](_0x256ad0,_0x5982de){const _0x1d684f=_0x44848c;this[_0x1d684f(0xa1)](_0x256ad0,_0x5982de,S(this[_0x1d684f(0xa5)][_0x1d684f(0x7b)](_0x256ad0),_0x5982de));}[_0x44848c(0x113)](_0x15f8fb){const _0x4de54b=_0x44848c;return b(this[_0x4de54b(0xa5)][_0x4de54b(0x7b)](_0x15f8fb));}[_0x44848c(0xa3)](_0x2d1bbf,_0x120133){const _0x1a1d37=_0x44848c;this['_resources'][_0x1a1d37(0x7f)](_0x2d1bbf,b(_0x120133)),this[_0x1a1d37(0xe8)][_0x1a1d37(0xe1)]({'unitId':_0x2d1bbf});}[_0x44848c(0xf6)](_0x1e1919){const _0x1cbb9e=_0x44848c;this[_0x1cbb9e(0xa5)][_0x1cbb9e(0xf4)](_0x1e1919),this[_0x1cbb9e(0xe8)][_0x1cbb9e(0xe1)]({'unitId':_0x1e1919});}[_0x44848c(0x117)](){const _0x29c4a0=_0x44848c;super[_0x29c4a0(0x117)](),this[_0x29c4a0(0xa5)][_0x29c4a0(0xbb)](),this[_0x29c4a0(0xe8)]['complete']();}['_setResource'](_0x384c1c,_0xf47477,_0x27582e){const _0x400377=_0x44848c;this[_0x400377(0xa5)][_0x400377(0x7f)](_0x384c1c,_0x27582e),this[_0x400377(0xe8)]['next']({'unitId':_0x384c1c,'blockId':_0xf47477});}};const nt={'id':'docs-code.command.insert-below','type':_0x2f4978[_0x44848c(0xb3)],'handler':_0x3eb485=>{const _0x1f355c=_0x44848c;var _0x5a0b7e;if(_0x452170(G(_0x3eb485)))return!0x1;let _0x1973f1=lt(_0x3eb485);if(_0x1973f1)return _0x3eb485[_0x1f355c(0x7b)](_0x10119a)['syncExecuteCommand'](B['id'],{'startOffset':_0x1973f1[_0x1f355c(0xd4)],'endOffset':_0x1973f1[_0x1f355c(0x83)],'insertionMode':_0x1f355c(0x8e),'unitId':_0x1973f1[_0x1f355c(0x102)]});let _0x196475=ut(_0x3eb485);if(!_0x196475)return!0x1;let _0x276688=(_0x5a0b7e=_0x3eb485[_0x1f355c(0x7b)](_0x228d50)[_0x1f355c(0xa4)](_0x108364[_0x1f355c(0xe3)]))==null?void 0x0:_0x5a0b7e[_0x1f355c(0xe2)](),_0x1f86da=_0x276688?_0x491f6d(_0x276688,_0x196475):_0x196475[_0x1f355c(0xa2)]+0x1;return _0x3eb485['get'](_0x10119a)[_0x1f355c(0xaa)](B['id'],{'startOffset':_0x1f86da,'endOffset':_0x1f86da});}},rt={'id':'docs-code.command.consume-boundary-delete','type':_0x2f4978[_0x44848c(0xb3)],'handler':()=>!0x0},B={'id':'docs-code.command.insert','type':_0x2f4978[_0x44848c(0xb3)],'handler':(_0x3e7c02,_0x5be642)=>{const _0x403f49=_0x44848c;var _0x93b122;let _0x168c4c=W(_0x3e7c02,_0x5be642==null?void 0x0:_0x5be642[_0x403f49(0x102)]);if(!_0x168c4c)return!0x1;let _0x1726dc=G(_0x3e7c02);if(_0x452170(_0x1726dc))return!0x1;let _0x5dcf25=_0x168c4c['model'][_0x403f49(0x113)](_0x168c4c['unitId']),_0x44a9a4=ot(_0x5be642,_0x1726dc),_0x368175=st(_0x168c4c[_0x403f49(0xd2)],_0x44a9a4);if(_0x368175){if(_0x368175[_0x403f49(0xc0)]!==_0x45cc53['CODE'])return!0x1;let _0x44d240=w({'blockId':_0x368175[_0x403f49(0xc9)],'documentData':_0x168c4c[_0x403f49(0xd2)],'metadata':_0x5dcf25});if(!_0x44d240)return!0x1;let _0xbb3047=J(_0x168c4c[_0x403f49(0xfe)],_0x168c4c['selectionManager'],_0x168c4c['unitId'],_0x168c4c[_0x403f49(0xd2)],_0x44d240[_0x403f49(0x9a)],B['id'],_0x44d240[_0x403f49(0xc2)]);return _0xbb3047&&_0x44d240[_0x403f49(0x8f)]&&_0x168c4c[_0x403f49(0x80)]['deserialize'](_0x168c4c['unitId'],_0x44d240[_0x403f49(0x8f)]),_0xbb3047;}let _0x1f6d34=(_0x93b122=_0x5be642==null?void 0x0:_0x5be642[_0x403f49(0xc9)])==null?_0x4842c7(0x6):_0x93b122,_0x4da029;try{_0x4da029=Se({'blockId':_0x1f6d34,'config':_0x5be642==null?void 0x0:_0x5be642['config'],'documentData':_0x168c4c[_0x403f49(0xd2)],'endOffset':_0x44a9a4==null?void 0x0:_0x44a9a4[_0x403f49(0x83)],'insertionMode':_0x5be642==null?void 0x0:_0x5be642[_0x403f49(0xda)],'metadata':_0x5dcf25,'startOffset':_0x44a9a4==null?void 0x0:_0x44a9a4[_0x403f49(0xd4)]});}catch(_0x423a47){if(_0x423a47 instanceof C)return!0x1;throw _0x423a47;}let _0x7aefee=J(_0x168c4c[_0x403f49(0xfe)],_0x168c4c[_0x403f49(0xc3)],_0x168c4c[_0x403f49(0x102)],_0x168c4c[_0x403f49(0xd2)],_0x4da029[_0x403f49(0x9a)],B['id'],_0x4da029['cursorOffset']);return _0x7aefee&&_0x4da029[_0x403f49(0x8f)]&&_0x168c4c[_0x403f49(0x80)][_0x403f49(0xa3)](_0x168c4c[_0x403f49(0x102)],_0x4da029[_0x403f49(0x8f)]),_0x7aefee;}},it={'id':_0x44848c(0xfa),'type':_0x2f4978[_0x44848c(0xb3)],'handler':(_0x49b092,_0x1d0cf6)=>{const _0x220f71=_0x44848c;if(!_0x1d0cf6)return!0x1;let _0x5871b4=W(_0x49b092,_0x1d0cf6['unitId']);if(!_0x5871b4)return!0x1;let _0x1aad8e=Ee({'blockId':_0x1d0cf6[_0x220f71(0xc9)],'config':_0x1d0cf6[_0x220f71(0xb2)],'documentData':_0x5871b4[_0x220f71(0xd2)],'metadata':_0x5871b4['model']['serialize'](_0x5871b4[_0x220f71(0x102)])});return _0x1aad8e[_0x220f71(0x8f)]&&_0x5871b4['model']['deserialize'](_0x5871b4[_0x220f71(0x102)],_0x1aad8e[_0x220f71(0x8f)]),!0x0;}},at={'id':_0x44848c(0xb6),'type':_0x2f4978['COMMAND'],'handler':(_0x338e1b,_0x261ad4)=>V['handler'](_0x338e1b,_0x261ad4)},V={'id':'docs-code.command.unwrap','type':_0x2f4978[_0x44848c(0xb3)],'handler':(_0x31339c,_0xb79927)=>{const _0x416bdc=_0x44848c;if(!_0xb79927)return!0x1;let _0x3f247f=W(_0x31339c,_0xb79927==null?void 0x0:_0xb79927[_0x416bdc(0x102)]);if(!_0x3f247f)return!0x1;let _0xf5a750=w({'blockId':_0xb79927['blockId'],'documentData':_0x3f247f['previousDocumentData'],'metadata':_0x3f247f[_0x416bdc(0x80)]['serialize'](_0x3f247f[_0x416bdc(0x102)])});if(!_0xf5a750)return!0x1;let _0x2d47b7=J(_0x3f247f[_0x416bdc(0xfe)],_0x3f247f[_0x416bdc(0xc3)],_0x3f247f['unitId'],_0x3f247f['previousDocumentData'],_0xf5a750[_0x416bdc(0x9a)],V['id'],_0xf5a750[_0x416bdc(0xc2)]);return _0x2d47b7&&_0xf5a750['nextMetadata']&&_0x3f247f['model'][_0x416bdc(0xa3)](_0x3f247f['unitId'],_0xf5a750[_0x416bdc(0x8f)]),_0x2d47b7;}},H={'id':'docs-code.command.remove','type':_0x2f4978['COMMAND'],'handler':(_0xf4e004,_0x4cc8f1)=>{const _0x4d996f=_0x44848c;if(!_0x4cc8f1)return!0x1;let _0x98b307=W(_0xf4e004,_0x4cc8f1==null?void 0x0:_0x4cc8f1[_0x4d996f(0x102)]);if(!_0x98b307)return!0x1;let _0x4504df=De({'blockId':_0x4cc8f1[_0x4d996f(0xc9)],'documentData':_0x98b307['previousDocumentData'],'metadata':_0x98b307[_0x4d996f(0x80)]['serialize'](_0x98b307[_0x4d996f(0x102)])});if(!_0x4504df)return!0x1;let _0x3c70e3=J(_0x98b307[_0x4d996f(0xfe)],_0x98b307['selectionManager'],_0x98b307['unitId'],_0x98b307['previousDocumentData'],_0x4504df[_0x4d996f(0x9a)],H['id'],_0x4504df[_0x4d996f(0xc2)]);return _0x3c70e3&&_0x4504df['nextMetadata']&&_0x98b307[_0x4d996f(0x80)]['deserialize'](_0x98b307[_0x4d996f(0x102)],_0x4504df[_0x4d996f(0x8f)]),_0x3c70e3;}},U={'id':_0x44848c(0xe4),'type':_0x2f4978['COMMAND'],'handler':(_0x236cc1,_0x13cd41)=>{const _0x3254d7=_0x44848c;var _0x47d12d,_0x448c14;let _0x1bd501=W(_0x236cc1,_0x13cd41==null?void 0x0:_0x13cd41[_0x3254d7(0x102)]);if(!_0x1bd501)return!0x1;let _0xb33155=(_0x47d12d=_0x13cd41==null?void 0x0:_0x13cd41[_0x3254d7(0xc2)])==null?(_0x448c14=G(_0x236cc1))==null?void 0x0:_0x448c14[_0x3254d7(0xd4)]:_0x47d12d;if(_0xb33155==null)return!0x1;let _0x55f5c9=Oe({'cursorOffset':_0xb33155,'documentData':_0x1bd501[_0x3254d7(0xd2)],'paragraphStartIndex':_0x13cd41==null?void 0x0:_0x13cd41[_0x3254d7(0xed)]});return _0x55f5c9?J(_0x1bd501[_0x3254d7(0xfe)],_0x1bd501[_0x3254d7(0xc3)],_0x1bd501[_0x3254d7(0x102)],_0x1bd501[_0x3254d7(0xd2)],_0x55f5c9[_0x3254d7(0x9a)],U['id'],_0x55f5c9[_0x3254d7(0xc2)]):!0x1;}};function W(_0x3defb9,_0x462a00){const _0x2f73c5=_0x44848c;let _0x288436=_0x3defb9[_0x2f73c5(0x7b)](_0x228d50),_0x1923c4=_0x462a00?_0x288436[_0x2f73c5(0x86)](_0x462a00,_0x108364['UNIVER_DOC']):_0x288436[_0x2f73c5(0xa4)](_0x108364[_0x2f73c5(0xe3)]);return _0x1923c4?{'commandService':_0x3defb9['get'](_0x10119a),'model':_0x3defb9[_0x2f73c5(0x7b)](z),'previousDocumentData':_0x1923c4[_0x2f73c5(0x94)](),'selectionManager':_0x3defb9[_0x2f73c5(0x7b)](_0x3a7722),'unitId':_0x1923c4['getUnitId']()}:null;}function G(_0x3af64a){const _0x1948e5=_0x44848c;var _0x2f45fa;return(_0x2f45fa=_0x3af64a[_0x1948e5(0x7b)](_0x3a7722)[_0x1948e5(0xc4)]())==null?void 0x0:_0x2f45fa[0x0];}function ot(_0x4f5d11,_0x2e6e43){const _0x29e93f=_0x44848c;var _0x37ea43,_0xdd683b;let _0x4fd650=(_0x37ea43=_0x4f5d11==null?void 0x0:_0x4f5d11[_0x29e93f(0xd4)])==null?_0x2e6e43==null?void 0x0:_0x2e6e43[_0x29e93f(0xd4)]:_0x37ea43,_0x2d41a5=(_0xdd683b=_0x4f5d11==null?void 0x0:_0x4f5d11[_0x29e93f(0x83)])==null?_0x2e6e43==null?void 0x0:_0x2e6e43[_0x29e93f(0x83)]:_0xdd683b;if(!(_0x4fd650==null||_0x2d41a5==null))return{'endOffset':Math[_0x29e93f(0xfd)](_0x4fd650,_0x2d41a5),'startOffset':Math[_0x29e93f(0x96)](_0x4fd650,_0x2d41a5)};}function st(_0x50f21a,_0xf4d36c){const _0x337d8b=_0x44848c;var _0x3cb228;if(!_0xf4d36c)return;let _0x42e934=ct(_0xf4d36c);return(_0x3cb228=_0x50f21a[_0x337d8b(0xf3)])==null||(_0x3cb228=_0x3cb228[_0x337d8b(0x104)])==null?void 0x0:_0x3cb228[_0x337d8b(0xea)](_0x257bd6=>{const _0x35395e=_0x337d8b;let _0x227c5d=_0x3fa12e(_0x257bd6);return _0xf4d36c[_0x35395e(0xd4)]===_0xf4d36c['endOffset']?_0x50cd86(_0x227c5d,_0x42e934):_0x33e1b3(_0x227c5d,_0x42e934);});}function ct(_0x4edd3c){const _0x3cb09b=_0x44848c;return _0x4edd3c[_0x3cb09b(0xd4)]===_0x4edd3c[_0x3cb09b(0x83)]?_0x4edd3c[_0x3cb09b(0xd4)]:_0x4edd3c[_0x3cb09b(0xd4)]+0x1;}function lt(_0x1a1667){const _0x4edc74=_0x44848c;var _0x43eb6e;let _0x5bd7a5=(_0x43eb6e=_0x1a1667[_0x4edc74(0x7b)](_0x228d50)[_0x4edc74(0xa4)](_0x108364[_0x4edc74(0xe3)]))==null?void 0x0:_0x43eb6e['getUnitId']();try{return _0x1a1667[_0x4edc74(0x7b)](_0x22ba41)['consumeInsertRange'](_0x5bd7a5);}catch{return null;}}function ut(_0x3fd692){const _0x24b04f=_0x44848c;var _0x3b0273,_0x45cbc1,_0x4a31e1;let _0x371f37=G(_0x3fd692);if(!_0x371f37)return null;let _0x2bc1fb=_0x3fd692[_0x24b04f(0x7b)](_0x228d50)[_0x24b04f(0xa4)](_0x108364[_0x24b04f(0xe3)]),_0x49d7d8=_0x2bc1fb==null?void 0x0:_0x2bc1fb[_0x24b04f(0xe2)]();return _0x49d7d8?(_0x3b0273=_0x2aa63d[_0x24b04f(0xf9)][_0x24b04f(0xd0)](_0x371f37,(_0x45cbc1=_0x49d7d8[_0x24b04f(0xd3)])==null?[]:_0x45cbc1,(_0x4a31e1=_0x49d7d8[_0x24b04f(0x114)])==null?'':_0x4a31e1)[0x0])==null?null:_0x3b0273:null;}function _0x36fb(){const _0x14eeb8=['every','bullet','endIndex','126128jkikke','start','constructor','entries','config','COMMAND','textRuns','textStyle','docs-code.command.exit','codes','paragraph','stringify','change$','clear','from','default','removeOp','50RpVggO','blockType','Insert\x20range\x20cannot\x20cross\x20table\x20cell\x20boundaries','cursorOffset','selectionManager','getTextRanges','77570XMlPmt','PARAGRAPH','insertOp','270780fuDgeQ','blockId','version','BLOCK_START','_config','metadata','_initResource','push','getParagraphsInRange','iterator','previousDocumentData','paragraphs','startOffset','getOwnPropertyDescriptor','startTokenOffset','customDecorations','4935161FbcLeg','1177VcvZvv','insertionMode','symbol','toPrimitive','BLOCK_END','left','reduce','call','next','getBody','UNIVER_DOC','docs-code.command.cancel-empty-paragraph','customRanges','spaceBelow','_commandService','_change$','fromEntries','find','right','getInstance','paragraphStartIndex','8wUWfEm','39YMdXKt','Insert\x20range\x20cannot\x20overlap\x20an\x20existing\x20document\x20block','direction','sectionBreaks','body','delete','indexOf','removeUnit','1.0.0-alpha.3','function','range','docs-code.command.update','tables','columns','max','commandService','add','2379732LHMqYT','isArray','unitId','pluginName','blockRanges','_injector','columnGroups','defineProperty','map','forEach','_configService','keys','retain','DOC_CODE_PLUGIN','paragraphId','CODE','registerCommand','insert','length','serialize','dataStream','string','SECTION_BREAK','dispose','onStarting','endsWith','get','4132017osOSvt','documentData','prototype','set','model','packageName','_docsCodeModel','endOffset','Document\x20body\x20is\x20required','deleteLength','getUnit','sort','insertLength','filter','some','asObservable','replaceOp','decorate','insert-new','nextMetadata','spaceAbove','disposeWithMe','editOp','slice','getSnapshot','getCodeConfig','min','paragraphStyle','removeCode','customBlocks','nextDocumentData','compose','_resourceManagerService','TABLE_CELL_END','setCodeConfig','object','replaceDocRanges','_setResource','startIndex','deserialize','getCurrentUnitOfType','_resources','496287JWqAHm','endTokenOffset','monospace','parse','syncExecuteCommand'];_0x36fb=function(){return _0x14eeb8;};return _0x36fb();}function dt(_0x3618c5,_0x33a169){const _0x3ca187=_0x44848c;let _0xf70c5a=_0x3618c5[_0x3ca187(0xf3)],_0x8b199c=_0x33a169[_0x3ca187(0xf3)],_0x4b7a2=_0x168f93(_0xf70c5a,_0x8b199c);return[_0x4b7a2&&_0x8b199c?ft(_0x8b199c,_0x4b7a2):null,_0x4b7a2?null:pt(_0xf70c5a,_0x8b199c)][_0x3ca187(0x89)](Boolean)[_0x3ca187(0xdf)]((_0x435e4d,_0x52e0e8)=>_0x2d3193[_0x3ca187(0x9b)](_0x435e4d,_0x52e0e8),null);}function ft(_0x310107,_0x45c654){const _0x47fcb9=_0x44848c;let _0x54ff3c=new _0x11e4b5();return _0x54ff3c[_0x47fcb9(0x10c)](_0x45c654[_0x47fcb9(0xaf)]),_0x45c654[_0x47fcb9(0x88)]>0x0&&_0x54ff3c[_0x47fcb9(0x111)](_0x45c654[_0x47fcb9(0x88)],_0x50fffd(_0x310107,_0x45c654[_0x47fcb9(0xaf)],_0x45c654[_0x47fcb9(0xaf)]+_0x45c654[_0x47fcb9(0x88)],!0x1)),_0x45c654[_0x47fcb9(0x85)]>0x0&&_0x54ff3c[_0x47fcb9(0xf4)](_0x45c654[_0x47fcb9(0x85)]),_0x2d3193[_0x47fcb9(0xec)]()[_0x47fcb9(0x92)](_0x54ff3c['serialize'](),['body']);}function pt(_0x15d238,_0x5d53f1){const _0x9a7238=_0x44848c;let _0x5dfc8e=[],_0xb68056=_0x15d238?ht(_0x15d238):void 0x0,_0x1c2e25=_0x5d53f1?ht(_0x5d53f1):void 0x0;for(let _0x14be7b of mt)K(_0x2d3193[_0x9a7238(0xec)](),[_0x9a7238(0xf3),_0x14be7b],_0xb68056==null?void 0x0:_0xb68056[_0x14be7b],_0x1c2e25==null?void 0x0:_0x1c2e25[_0x14be7b],_0x5dfc8e);return _0x5dfc8e[_0x9a7238(0xdf)]((_0x4a4fbb,_0x13290b)=>_0x2d3193[_0x9a7238(0x9b)](_0x4a4fbb,_0x13290b),null);}const mt=[_0x44848c(0xd3),_0x44848c(0xf2),_0x44848c(0xfb),_0x44848c(0x106),_0x44848c(0x104),'customBlocks','customRanges',_0x44848c(0xd7),'textRuns'];function ht(_0xf115e5){return _0xf115e5;}function K(_0x51dad3,_0x3f973,_0x3e5db0,_0x47a8d5,_0x8ca65d){const _0x83dcc1=_0x44848c;if(!q(_0x3e5db0,_0x47a8d5)){if(_0x3e5db0==null){_0x8ca65d['push'](_0x51dad3['insertOp'](_0x3f973,_0x47a8d5));return;}if(_0x47a8d5==null){_0x8ca65d[_0x83dcc1(0xcf)](_0x51dad3['removeOp'](_0x3f973,_0x3e5db0));return;}if(Array[_0x83dcc1(0x101)](_0x3e5db0)&&Array[_0x83dcc1(0x101)](_0x47a8d5)){gt(_0x51dad3,_0x3f973,_0x3e5db0,_0x47a8d5,_0x8ca65d);return;}if(_t(_0x3e5db0)&&_t(_0x47a8d5)){new Set([...Object['keys'](_0x3e5db0),...Object[_0x83dcc1(0x10b)](_0x47a8d5)])['forEach'](_0x296cfd=>{K(_0x51dad3,[..._0x3f973,_0x296cfd],_0x3e5db0[_0x296cfd],_0x47a8d5[_0x296cfd],_0x8ca65d);});return;}_0x8ca65d[_0x83dcc1(0xcf)](_0x51dad3[_0x83dcc1(0x8c)](_0x3f973,_0x3e5db0,_0x47a8d5));}}function gt(_0x580e9a,_0xda42a1,_0x6badaa,_0x25d4e7,_0x3e1658){const _0x1664b2=_0x44848c;if(_0x6badaa[_0x1664b2(0x112)]===_0x25d4e7['length']){_0x6badaa[_0x1664b2(0x109)]((_0x488ac9,_0x89a2e1)=>K(_0x580e9a,[..._0xda42a1,_0x89a2e1],_0x488ac9,_0x25d4e7[_0x89a2e1],_0x3e1658));return;}let _0x114790=0x0;for(;_0x114790<_0x6badaa[_0x1664b2(0x112)]&&_0x114790<_0x25d4e7[_0x1664b2(0x112)]&&q(_0x6badaa[_0x114790],_0x25d4e7[_0x114790]);)_0x114790++;let _0x5aaf6e=_0x6badaa[_0x1664b2(0x112)]-0x1,_0x2e9fbb=_0x25d4e7['length']-0x1;for(;_0x5aaf6e>=_0x114790&&_0x2e9fbb>=_0x114790&&q(_0x6badaa[_0x5aaf6e],_0x25d4e7[_0x2e9fbb]);)_0x5aaf6e--,_0x2e9fbb--;for(let _0x1b5573=_0x5aaf6e;_0x1b5573>=_0x114790;_0x1b5573--)_0x3e1658[_0x1664b2(0xcf)](_0x580e9a[_0x1664b2(0xbe)]([..._0xda42a1,_0x1b5573],_0x6badaa[_0x1b5573]));for(let _0x3ef64d=_0x114790;_0x3ef64d<=_0x2e9fbb;_0x3ef64d++)_0x3e1658['push'](_0x580e9a[_0x1664b2(0xc7)]([..._0xda42a1,_0x3ef64d],_0x25d4e7[_0x3ef64d]));}function _t(_0x405f48){const _0x45d71b=_0x44848c;return typeof _0x405f48==_0x45d71b(0x9f)&&!!_0x405f48&&!Array[_0x45d71b(0x101)](_0x405f48);}function q(_0x25f78b,_0x33b9f3){const _0x270655=_0x44848c;return JSON[_0x270655(0xb9)](_0x25f78b)===JSON[_0x270655(0xb9)](_0x33b9f3);}function J(_0x5b897c,_0x56063e,_0x558797,_0x4c24b0,_0x20937d,_0x348a60,_0x38b2d4){const _0x446093=_0x44848c;let _0x17b33a=dt(_0x4c24b0,_0x20937d);return _0x17b33a?!!_0x5b897c[_0x446093(0xaa)](_0x28d3f9['id'],{'unitId':_0x558797,'actions':_0x17b33a,'textRanges':[{'startOffset':_0x38b2d4,'endOffset':_0x38b2d4,'collapsed':!0x0}],'isEditing':!0x1,'trigger':_0x348a60}):(_0x56063e[_0x446093(0xa0)]([{'startOffset':_0x38b2d4,'endOffset':_0x38b2d4}],{'unitId':_0x558797,'subUnitId':_0x558797},!0x1),!0x0);}const Y=_0x44848c(0x10d);var vt='@univerjs-pro/docs-code',yt=_0x44848c(0xf7);const bt={};function X(_0x35c651,_0xcce8a){return function(_0x20342a,_0x56166f){_0xcce8a(_0x20342a,_0x56166f,_0x35c651);};}function Z(_0x1c3fb2,_0x5246ad,_0x59c7f8,_0x521bdc){const _0x155b3c=_0x44848c;var _0x3bb2f0=arguments[_0x155b3c(0x112)],_0x26ec61=_0x3bb2f0<0x3?_0x5246ad:_0x521bdc===null?_0x521bdc=Object[_0x155b3c(0xd5)](_0x5246ad,_0x59c7f8):_0x521bdc,_0x3ee76b;if(typeof Reflect==_0x155b3c(0x9f)&&typeof Reflect[_0x155b3c(0x8d)]==_0x155b3c(0xf8))_0x26ec61=Reflect[_0x155b3c(0x8d)](_0x1c3fb2,_0x5246ad,_0x59c7f8,_0x521bdc);else{for(var _0x3d0e00=_0x1c3fb2[_0x155b3c(0x112)]-0x1;_0x3d0e00>=0x0;_0x3d0e00--)(_0x3ee76b=_0x1c3fb2[_0x3d0e00])&&(_0x26ec61=(_0x3bb2f0<0x3?_0x3ee76b(_0x26ec61):_0x3bb2f0>0x3?_0x3ee76b(_0x5246ad,_0x59c7f8,_0x26ec61):_0x3ee76b(_0x5246ad,_0x59c7f8))||_0x26ec61);}return _0x3bb2f0>0x3&&_0x26ec61&&Object['defineProperty'](_0x5246ad,_0x59c7f8,_0x26ec61),_0x26ec61;}let Q=class extends _0x7a2bfc{constructor(_0x5855ac,_0x407b10){const _0x4a0a76=_0x44848c;super(),this[_0x4a0a76(0x9c)]=_0x5855ac,this[_0x4a0a76(0x82)]=_0x407b10,this[_0x4a0a76(0xce)]();}[_0x44848c(0xce)](){const _0x37fd07=_0x44848c;this[_0x37fd07(0x91)](this[_0x37fd07(0x9c)]['registerPluginResource']({'pluginName':Y,'businesses':[_0x108364['UNIVER_DOC']],'toJson':_0x3628f8=>JSON['stringify'](this[_0x37fd07(0x82)]['serialize'](_0x3628f8)),'parseJson':_0x421dc3=>b(JSON[_0x37fd07(0xa9)](_0x421dc3)),'onLoad':(_0x736311,_0x5e7626)=>this[_0x37fd07(0x82)][_0x37fd07(0xa3)](_0x736311,_0x5e7626),'onUnLoad':_0x2b7cc6=>this['_docsCodeModel'][_0x37fd07(0xf6)](_0x2b7cc6)}));}};Q=Z([X(0x0,_0x23d35f),X(0x1,_0x163407(z))],Q);let $=class extends _0x495660{constructor(_0x3e7145=bt,_0x2f71be,_0x50a248,_0xb2d6f0){const _0x54fd2c=_0x44848c;super(),this[_0x54fd2c(0xcc)]=_0x3e7145,this[_0x54fd2c(0x105)]=_0x2f71be,this[_0x54fd2c(0xe7)]=_0x50a248,this[_0x54fd2c(0x10a)]=_0xb2d6f0;let {..._0x463c4c}=_0x55c09c({},bt,this[_0x54fd2c(0xcc)]);this['_configService']['setConfig']('docs-code.config',_0x463c4c);}[_0x44848c(0x118)](){const _0x4926e7=_0x44848c;this[_0x4926e7(0x105)][_0x4926e7(0xff)]([z]),this['_injector'][_0x4926e7(0xff)]([Q]),this[_0x4926e7(0x105)][_0x4926e7(0x7b)](z),this[_0x4926e7(0x105)][_0x4926e7(0x7b)](Q),[B,nt,it,V,H,at,U,rt][_0x4926e7(0x109)](_0x558a34=>this[_0x4926e7(0x91)](this[_0x4926e7(0xe7)][_0x4926e7(0x110)](_0x558a34)));}};R($,_0x44848c(0x103),Y),R($,_0x44848c(0x81),vt),R($,_0x44848c(0xca),yt),R($,'type',_0x108364[_0x44848c(0xe3)]),$=Z([_0x1c14e5(_0x355b25,_0x4d0ee5),X(0x1,_0x163407(_0x445227)),X(0x2,_0x10119a),X(0x3,_0x1d5c59)],$);export{Y as DOCS_CODE_PLUGIN,U as DocsCodeCancelEmptyParagraphCommand,rt as DocsCodeConsumeBoundaryDeleteCommand,nt as DocsCodeInsertBelowCommand,B as DocsCodeInsertCommand,z as DocsCodeModel,H as DocsCodeRemoveCommand,V as DocsCodeUnwrapCommand,it as DocsCodeUpdateCommand,$ as UniverDocsCodePlugin,Oe as buildCancelEmptyCodeParagraphActions,je as isCodeBoundaryDelete,y as normalizeDocsCodeConfig};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ICommand } from '@univerjs/core';
|
|
2
|
+
import type { IDocsCodeConfig } from '../common/type';
|
|
3
|
+
export interface IDocsCodeInsertCommandParams {
|
|
4
|
+
unitId?: string;
|
|
5
|
+
blockId?: string;
|
|
6
|
+
startOffset?: number;
|
|
7
|
+
endOffset?: number;
|
|
8
|
+
insertionMode?: 'convert-paragraph' | 'insert-new';
|
|
9
|
+
config?: Partial<IDocsCodeConfig>;
|
|
10
|
+
}
|
|
11
|
+
export interface IDocsCodeUpdateCommandParams {
|
|
12
|
+
unitId?: string;
|
|
13
|
+
blockId: string;
|
|
14
|
+
config: Partial<IDocsCodeConfig>;
|
|
15
|
+
}
|
|
16
|
+
export interface IDocsCodeExitCommandParams {
|
|
17
|
+
unitId?: string;
|
|
18
|
+
blockId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IDocsCodeUnwrapCommandParams {
|
|
21
|
+
unitId?: string;
|
|
22
|
+
blockId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface IDocsCodeRemoveCommandParams {
|
|
25
|
+
unitId?: string;
|
|
26
|
+
blockId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface IDocsCodeCancelEmptyParagraphCommandParams {
|
|
29
|
+
unitId?: string;
|
|
30
|
+
cursorOffset?: number;
|
|
31
|
+
paragraphStartIndex?: number;
|
|
32
|
+
}
|
|
33
|
+
export declare const DocsCodeInsertBelowCommand: ICommand;
|
|
34
|
+
export declare const DocsCodeConsumeBoundaryDeleteCommand: ICommand;
|
|
35
|
+
export declare const DocsCodeInsertCommand: ICommand<IDocsCodeInsertCommandParams>;
|
|
36
|
+
export declare const DocsCodeUpdateCommand: ICommand<IDocsCodeUpdateCommandParams>;
|
|
37
|
+
export declare const DocsCodeExitCommand: ICommand<IDocsCodeExitCommandParams>;
|
|
38
|
+
export declare const DocsCodeUnwrapCommand: ICommand<IDocsCodeUnwrapCommandParams>;
|
|
39
|
+
export declare const DocsCodeRemoveCommand: ICommand<IDocsCodeRemoveCommandParams>;
|
|
40
|
+
export declare const DocsCodeCancelEmptyParagraphCommand: ICommand<IDocsCodeCancelEmptyParagraphCommandParams>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { IDocumentBlockRange, IDocumentBody, IDocumentData } from '@univerjs/core';
|
|
2
|
+
import type { IDocsCodeActionBuildResult, IDocsCodeConfig, IDocsCodeMetadataResource } from './type';
|
|
3
|
+
export declare class InvalidInsertRangeError extends Error {
|
|
4
|
+
constructor(message?: string);
|
|
5
|
+
}
|
|
6
|
+
export interface IInsertCodeActionParams {
|
|
7
|
+
documentData: IDocumentData;
|
|
8
|
+
metadata?: IDocsCodeMetadataResource;
|
|
9
|
+
blockId: string;
|
|
10
|
+
startOffset?: number;
|
|
11
|
+
endOffset?: number;
|
|
12
|
+
insertionMode?: 'convert-paragraph' | 'insert-new';
|
|
13
|
+
config?: Partial<IDocsCodeConfig>;
|
|
14
|
+
}
|
|
15
|
+
export interface IUpdateCodeActionParams {
|
|
16
|
+
documentData: IDocumentData;
|
|
17
|
+
metadata?: IDocsCodeMetadataResource;
|
|
18
|
+
blockId: string;
|
|
19
|
+
config: Partial<IDocsCodeConfig>;
|
|
20
|
+
}
|
|
21
|
+
export interface IExitCodeActionParams {
|
|
22
|
+
documentData: IDocumentData;
|
|
23
|
+
metadata?: IDocsCodeMetadataResource;
|
|
24
|
+
blockId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IRemoveCodeActionParams {
|
|
27
|
+
documentData: IDocumentData;
|
|
28
|
+
metadata?: IDocsCodeMetadataResource;
|
|
29
|
+
blockId: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ICancelEmptyCodeParagraphActionParams {
|
|
32
|
+
documentData: IDocumentData;
|
|
33
|
+
cursorOffset: number;
|
|
34
|
+
paragraphStartIndex?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface ICodeBoundaryDeleteParams {
|
|
37
|
+
documentData: IDocumentData;
|
|
38
|
+
cursorOffset: number;
|
|
39
|
+
direction: 'left' | 'right';
|
|
40
|
+
}
|
|
41
|
+
export declare function buildInsertCodeActions(params: IInsertCodeActionParams): IDocsCodeActionBuildResult;
|
|
42
|
+
export declare function buildUpdateCodeActions(params: IUpdateCodeActionParams): IDocsCodeActionBuildResult;
|
|
43
|
+
export declare function buildExitCodeActions(params: IExitCodeActionParams): IDocsCodeActionBuildResult | null;
|
|
44
|
+
export declare function buildRemoveCodeActions(params: IRemoveCodeActionParams): IDocsCodeActionBuildResult | null;
|
|
45
|
+
export declare function buildCancelEmptyCodeParagraphActions(params: ICancelEmptyCodeParagraphActionParams): IDocsCodeActionBuildResult | null;
|
|
46
|
+
export declare function findCodeRangeAtOffset(body: IDocumentBody | undefined, offset: number): IDocumentBlockRange | undefined;
|
|
47
|
+
export declare function findCodeRangeById(body: IDocumentBody | undefined, blockId: string): IDocumentBlockRange | undefined;
|
|
48
|
+
export declare function isCodeBoundaryDelete(params: ICodeBoundaryDeleteParams): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DOCS_CODE_PLUGIN = "DOC_CODE_PLUGIN";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IDocsCodeConfig, IDocsCodeMetadataResource } from './type';
|
|
2
|
+
export declare const DEFAULT_CODE_CONFIG: IDocsCodeConfig;
|
|
3
|
+
export declare function normalizeDocsCodeConfig(config?: Partial<IDocsCodeConfig> | null): IDocsCodeConfig;
|
|
4
|
+
export declare function normalizeDocsCodeMetadataResource(resource?: Partial<IDocsCodeMetadataResource> | null): IDocsCodeMetadataResource;
|
|
5
|
+
export declare function setCodeConfigInMetadata(resource: IDocsCodeMetadataResource | undefined, blockId: string, config: Partial<IDocsCodeConfig>): IDocsCodeMetadataResource;
|
|
6
|
+
export declare function removeCodeConfigFromMetadata(resource: IDocsCodeMetadataResource | undefined, blockId: string): IDocsCodeMetadataResource;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IDocumentData } from '@univerjs/core';
|
|
2
|
+
export interface IDocsCodeConfig {
|
|
3
|
+
language: string;
|
|
4
|
+
showLineNumbers: boolean;
|
|
5
|
+
tabSize: number;
|
|
6
|
+
wrap: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface IDocsCodeMetadataResource {
|
|
9
|
+
codes: Record<string, IDocsCodeConfig>;
|
|
10
|
+
}
|
|
11
|
+
export interface IDocsCodeActionBuildResult {
|
|
12
|
+
nextDocumentData: IDocumentData;
|
|
13
|
+
nextMetadata?: IDocsCodeMetadataResource;
|
|
14
|
+
cursorOffset: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Disposable, IResourceManagerService } from '@univerjs/core';
|
|
2
|
+
import { DocsCodeModel } from '../models/docs-code-model';
|
|
3
|
+
export declare class DocsCodeResourceController extends Disposable {
|
|
4
|
+
private readonly _resourceManagerService;
|
|
5
|
+
private readonly _docsCodeModel;
|
|
6
|
+
constructor(_resourceManagerService: IResourceManagerService, _docsCodeModel: DocsCodeModel);
|
|
7
|
+
private _initResource;
|
|
8
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { IDocsCodeConfig } from '@univerjs-pro/docs-code';
|
|
2
|
+
import type { FDocument } from '@univerjs/docs/facade';
|
|
3
|
+
import type { IDocsCodeInfo, IDocsCodeRange, IDocsCodeUpdateFacadeOptions } from './types';
|
|
4
|
+
import { Injector } from '@univerjs/core';
|
|
5
|
+
/**
|
|
6
|
+
* Facade object for a single docs code block.
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
10
|
+
* const codes = fDocument.getCodes();
|
|
11
|
+
* console.log(codes);
|
|
12
|
+
*
|
|
13
|
+
* const code = fDocument.findCodeByText('function');
|
|
14
|
+
* console.log(code?.getText());
|
|
15
|
+
* console.log(code?.getConfig());
|
|
16
|
+
*
|
|
17
|
+
* code?.updateConfig({ language: 'javascript', lineNumbers: true });
|
|
18
|
+
* console.log(code?.describe());
|
|
19
|
+
*
|
|
20
|
+
* code?.unwrap();
|
|
21
|
+
* code?.remove();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class FDocumentCode {
|
|
25
|
+
private _document;
|
|
26
|
+
private _blockId;
|
|
27
|
+
protected readonly _injector: Injector;
|
|
28
|
+
private readonly _unitId;
|
|
29
|
+
constructor(_document: FDocument, _blockId: string, _injector: Injector);
|
|
30
|
+
/**
|
|
31
|
+
* Returns the code block id.
|
|
32
|
+
* @returns {string} The code block range id.
|
|
33
|
+
* @example
|
|
34
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
35
|
+
* const codes = fDocument.getCodes();
|
|
36
|
+
*
|
|
37
|
+
* // Get the id of the first code block.
|
|
38
|
+
* if (codes.length > 0) {
|
|
39
|
+
* const code = codes[0];
|
|
40
|
+
* console.log(code.getId());
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
getId(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the code block range in the document data stream.
|
|
47
|
+
* @returns {IDocsCodeRange | null} The code range, or `null` if it no longer exists.
|
|
48
|
+
* @example
|
|
49
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
50
|
+
* const codes = fDocument.getCodes();
|
|
51
|
+
*
|
|
52
|
+
* // Get the range of the first code block.
|
|
53
|
+
* if (codes.length > 0) {
|
|
54
|
+
* const code = codes[0];
|
|
55
|
+
* console.log(code.getRange());
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
getRange(): IDocsCodeRange | null;
|
|
60
|
+
/**
|
|
61
|
+
* Returns plain text inside the code.
|
|
62
|
+
* @returns {string} The code text with block tokens removed.
|
|
63
|
+
* @example
|
|
64
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
65
|
+
* const code = fDocument.findCodeByText('function');
|
|
66
|
+
*
|
|
67
|
+
* if (code) {
|
|
68
|
+
* console.log(code.getText());
|
|
69
|
+
* }
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
getText(): string;
|
|
73
|
+
/**
|
|
74
|
+
* Returns an agent-friendly description of the code.
|
|
75
|
+
* @returns {IDocsCodeInfo | null} The code id, range, and text, or `null` if it no longer exists.
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
79
|
+
* const code = fDocument.findCodeByText('function');
|
|
80
|
+
*
|
|
81
|
+
* if (code) {
|
|
82
|
+
* console.log(code.describe());
|
|
83
|
+
* }
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
describe(): IDocsCodeInfo | null;
|
|
87
|
+
/**
|
|
88
|
+
* Returns the code block configuration.
|
|
89
|
+
* @returns {IDocsCodeConfig} Language, wrapping, line number, and tab-size settings.
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
93
|
+
* const code = fDocument.findCodeByText('function');
|
|
94
|
+
*
|
|
95
|
+
* if (code) {
|
|
96
|
+
* console.log(code.getConfig());
|
|
97
|
+
* }
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
getConfig(): IDocsCodeConfig;
|
|
101
|
+
/**
|
|
102
|
+
* Updates the code block configuration.
|
|
103
|
+
* @param {IDocsCodeUpdateFacadeOptions} options Code block configuration patch.
|
|
104
|
+
* @returns {boolean} Whether the update command succeeded.
|
|
105
|
+
* @example
|
|
106
|
+
* ```ts
|
|
107
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
108
|
+
* const code = fDocument.findCodeByText('function');
|
|
109
|
+
*
|
|
110
|
+
* if (code) {
|
|
111
|
+
* code.updateConfig({ config: { language: 'typescript' } });
|
|
112
|
+
* }
|
|
113
|
+
* ```
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
updateConfig(options: IDocsCodeUpdateFacadeOptions): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Unwraps this code block by removing only the code block formatting.
|
|
119
|
+
* @returns {boolean} Whether the code block formatting was removed.
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
123
|
+
* const code = fDocument.findCodeByText('function');
|
|
124
|
+
*
|
|
125
|
+
* if (code) {
|
|
126
|
+
* // Remove code block formatting from this block.
|
|
127
|
+
* const success = code.unwrap();
|
|
128
|
+
* console.log(success);
|
|
129
|
+
* }
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
unwrap(): boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Removes this code block and its content.
|
|
135
|
+
* @returns {boolean} Whether the code block was removed.
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* const fDocument = univerAPI.getActiveDocument();
|
|
139
|
+
* const code = fDocument.findCodeByText('function');
|
|
140
|
+
*
|
|
141
|
+
* if (code) {
|
|
142
|
+
* const success = code.remove();
|
|
143
|
+
* console.log(success);
|
|
144
|
+
* }
|
|
145
|
+
* ```
|
|
146
|
+
*/
|
|
147
|
+
remove(): boolean;
|
|
148
|
+
private _getBlockRange;
|
|
149
|
+
private _getDocumentData;
|
|
150
|
+
}
|