@ckeditor/ckeditor5-document-outline 48.3.0-alpha.0 → 48.3.0-alpha.1
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/dist/index.js +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as _0x4ec52c,Plugin as _0x464a3a}from'@ckeditor/ckeditor5-core';import{debounce as _0x31503c,throttle as _0x586193}from'es-toolkit/compat';import{ModelText as _0x345c52,ModelTreeWalker as _0x45f338}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0x16bb33,Rect as _0x23e40b,diff as _0x15f264,diffToChanges as _0x3cace0,global as _0x565fe4,priorities as _0x15bf35,scrollAncestorsToShowTarget as _0x548d1e,uid as _0x8d5b21}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x123b34,MenuBarMenuListItemButtonView as _0x3b1daf,View as _0x2529f8}from'@ckeditor/ckeditor5-ui';import{Widget as _0x1bc01e,toWidget as _0x49ab46}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x204e27}from'@ckeditor/ckeditor5-icons';function b(_0x4f7808){let _0x37531c='';for(const _0x1760b1 of _0x4f7808['getChildren']())_0x1760b1 instanceof _0x345c52&&(_0x37531c+=_0x1760b1['data']);return _0x37531c;}var I=class extends _0x464a3a{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];['init'](){const _0x158f6e=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0x2aff7a=[];_0x158f6e['model']['document']['on']('change',_0x31503c(()=>{const _0x4f2d7e=_0x2aff7a;_0x2aff7a=this['_getOutlineDefinitions']();const _0x5d226b=_0x3cace0(_0x15f264(_0x4f2d7e,_0x2aff7a,(_0x32ac72,_0x3c0231)=>_0x32ac72['level']===_0x3c0231['level']&&_0x32ac72['text']===_0x3c0231['text']&&_0x32ac72['modelElement']===_0x3c0231['modelElement']),_0x2aff7a),_0x34305d=this['_getActiveHeading'](),_0x309808=_0x2aff7a['findIndex'](_0x580503=>_0x580503['modelElement']===_0x34305d);_0x5d226b['length']&&this['fire']('change',{'outlineDefinitions':_0x2aff7a,'activeItemIndex':_0x309808,'outlineChanges':_0x5d226b}),this['fire']('activeItemIndex',{'index':_0x309808});},0xfa,{'leading':!0x0,'trailing':!0x0}));}['afterInit'](){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}['_getOutlineDefinitions'](){const _0x33afde=this['editor'],_0x3d668e=[],_0x3f5235=this['_headingNames'];for(const _0x3c5f38 of _0x33afde['model']['document']['getRootNames']())_0x81c3b4(_0x33afde['model']['document']['getRoot'](_0x3c5f38));function _0x81c3b4(_0x46a43c){for(const _0x38f91e of _0x46a43c['getChildren']())_0x38f91e['is']('element')&&(_0x3f5235['includes'](_0x38f91e['name'])&&_0x3d668e['push']({'level':_0x3f5235['indexOf'](_0x38f91e['name'])+0x1,'text':b(_0x38f91e),'modelElement':_0x38f91e}),_0x81c3b4(_0x38f91e));}return _0x3d668e;}['_getActiveHeading'](){const _0x2cb3ac=new _0x45f338({'direction':'backward','startPosition':this['editor']['model']['document']['selection']['getFirstPosition']()});for(const _0x48d5c5 of _0x2cb3ac)if(_0x48d5c5['item']['is']('element')&&this['_headingNames']['includes'](_0x48d5c5['item']['name']))return _0x48d5c5['item'];}['_getHeadingNames'](){const _0x33aec8=this['editor']['config']['get']('documentOutline.headings');return _0x33aec8||function(_0x39ee30){const _0x482390=_0x39ee30['config']['get']('heading.options');return _0x482390?_0x482390['reduce']((_0x2cb0b7,_0x4706f8)=>('paragraph'!==_0x4706f8['model']&&_0x2cb0b7['push'](_0x4706f8['model']),_0x2cb0b7),[]):_0x39ee30['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}['_deriveHeadingElementsFromConversion'](){const _0x2e1e6c=this['editor'],_0xd29d1e=['h1','h2','h3','h4','h5','h6'],_0x33b4ea=[];for(const _0x102dd1 of _0xd29d1e){const _0x5a7128=_0x2e1e6c['editing']['view']['domConverter']['domToView'](document['createElement'](_0x102dd1)),_0x383a66=_0x2e1e6c['data']['toModel'](_0x5a7128)['getChild'](0x0);_0x383a66?.['is']('element')&&_0x33b4ea['push'](_0x383a66['name']);}this['_headingNames']=_0x33b4ea;}};function L(_0x3582dc,_0x4d1456){const t=_0x3582dc['t'];switch(_0x4d1456){case'Empty\x20heading':return t('Empty\x20heading');case'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.':return t('Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.');case'No\x20headings\x20were\x20found\x20in\x20the\x20document.':return t('No\x20headings\x20were\x20found\x20in\x20the\x20document.');case'Table\x20of\x20contents':return t('Table\x20of\x20contents');default:return _0x4d1456;}}var C=class extends _0x2529f8{constructor(_0x180149,_0x40dcb2=!0x1){super(_0x180149);const _0x2d7794=this['bindTemplate'],_0x64f8d6=_0x40dcb2?'['+L(_0x180149,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x1f06f4=>!_0x1f06f4),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x2d7794['to']('level',_0x5723e2=>'ck-document-outline__item_level-'+_0x5723e2),_0x2d7794['if']('isActive','ck-document-outline__item_active'),_0x2d7794['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x2d7794['to']('text')},'children':[{'text':_0x2d7794['to']('text',_0x190e6f=>_0x190e6f||_0x64f8d6)}],'on':{'click':_0x2d7794['to']('click')}});}},_=class extends _0x2529f8{['items'];['documentOutlineContainer'];['showEmptyHeadingText'];constructor(_0x188a48,_0x4a52eb=!0x1,_0x3a82f8){super(_0x188a48),this['showEmptyHeadingText']=_0x4a52eb,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0x3a82f8,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x44714f,_0x1cd6f6,_0x5ce786,_0x26e9c7)=>{this['_setActiveItem'](_0x26e9c7,_0x5ce786);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x188a48['contentLanguageDirection'],'data-document-outline-empty-placeholder':L(_0x188a48,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x536323){_0x536323['forEach'](_0x5925e9=>{'insert'==_0x5925e9['type']?this['_insertItem'](_0x5925e9['index'],..._0x5925e9['values']):'delete'==_0x5925e9['type']&&this['_deleteItem'](_0x5925e9['index'],_0x5925e9['howMany']);});}['_setActiveItem'](_0x1ed1ac,_0x225500){if(-0x1!==_0x1ed1ac){const _0x434c3c=this['items']['get'](_0x1ed1ac);_0x434c3c&&(_0x434c3c['isActive']=!0x1);}-0x1!==_0x225500&&(this['items']['get'](_0x225500)['isActive']=!0x0,this['_scrollToItem'](_0x225500));}['_insertItem'](_0x4365b9,..._0x45e6f2){const _0xd9b163=_0x45e6f2['map']((_0x5834ed,_0x192598)=>{const _0x59ff30=new C(this['locale'],this['showEmptyHeadingText']);return _0x59ff30['text']=_0x5834ed['text'],_0x59ff30['level']=_0x5834ed['level'],_0x4365b9+_0x192598===this['activeItemIndex']&&(_0x59ff30['isActive']=!0x0),_0x59ff30;});this['items']['addMany'](_0xd9b163,_0x4365b9);}['_deleteItem'](_0x29087d,_0x514800){do{this['items']['remove'](_0x29087d);}while(--_0x514800);}['_handleItemClick'](_0x577628){const _0x2a9d1f=this['items']['getIndex'](_0x577628['source']);this['fire']('itemSelected',_0x2a9d1f);}['_scrollToItem'](_0x31bbad){_0x548d1e(this['items']['get'](_0x31bbad)['element'],0x14,this['documentOutlineContainer']);}['destroy'](){super['destroy'](),this['element']['remove']();}},x=class extends _0x464a3a{['view'];['_currentOutlineDefinitions'];['_updateActiveDefinitionFromViewportThrottled'];static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ee879){super(_0x3ee879),this['view']=new _(_0x3ee879['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x586193(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}['init'](){const _0x1b31d3=this['editor'],_0x5628ea=_0x1b31d3['plugins']['get']('DocumentOutlineUtils');let _0x161689=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x1b31d3['config']['get']('documentOutline.container'))throw new _0x16bb33('document-outline-container-not-provided',{'editor':_0x1b31d3});_0x1b31d3['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0x5628ea['on']('change',this['_handleOutlineChange']['bind'](this)),_0x5628ea['on']('activeItemIndex',(_0x3ffd72,{index:_0x24e63d})=>this['_setActiveViewItem'](_0x24e63d)),this['view']['on']('itemSelected',(_0x14c941,_0x2642a4)=>{_0x161689=!0x0,this['_handleItemSelected'](_0x2642a4);}),this['view']['listenTo'](_0x565fe4['document'],'scroll',()=>{_0x161689?_0x161689=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();},{'useCapture':!0x0}),this['view']['listenTo'](_0x565fe4['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}['afterInit'](){!async function(_0x53a625){const _0x53079c='aWxlPG0A3CDdHBsZEqwULojOrgMXVTRvu1bI2487ptzJKQeihfNkYS9n6y5mcF',_0x12b76c=0x78de0,_0xef4dc5=window['Date']['now'](),_0x559dab=_0x53a625['editor'],_0x6b633=new window['Promise'](_0x3f0af5=>{_0x559dab['once']('ready',_0x3f0af5);}),_0x472d5d={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x90ae36=_0x559dab['config']['get']('licenseKey');async function _0x215e55(){let _0x24e8d9,_0x34cfa6=null,_0x5c3f85=null;try{return'GPL'==_0x90ae36?'NotAllowed':(_0x24e8d9=_0x12b978(),_0x24e8d9?(_0x24e8d9['usageEndpoint']&&(_0x5c3f85=_0x1d3515(_0x24e8d9['usageEndpoint'],_0x24e8d9['jti'])),await _0x7a1403()?_0x190048()?_0x2ce7b3()?'Expired':_0x577c40()?('evaluation'==_0x24e8d9['licenseType']&&(_0x34cfa6=_0x25a7f8('EvaluationLimit')),await _0xee395a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2ce7b3(){const _0x15bab3=['evaluation','trial']['includes'](_0x24e8d9['licenseType'])?_0xef4dc5/0x3e8:0xe10*_0x12b76c;return _0x24e8d9['exp']<_0x15bab3;}function _0x190048(){const _0x56b385=_0x24e8d9['features'];return!!_0x56b385&&(!!_0x56b385['includes']('*')||(!!_0x56b385['includes']('DO')||(!!_0x56b385['includes']('PP')||!(!_0x56b385['includes']('TRILIUM')||!_0x5dd56b()))));}function _0x577c40(){const _0x5230b5=_0x24e8d9['licensedHosts'];if(!_0x5230b5||0x0==_0x5230b5['length'])return!0x0;const {hostname:_0x1c36cb}=new URL(window['location']['href']);if(_0x5230b5['includes'](_0x1c36cb))return!0x0;const _0x46e464=_0x1c36cb['split']('.');return _0x5230b5['filter'](_0x19bffd=>_0x19bffd['includes']('*'))['map'](_0xe8b4d4=>_0xe8b4d4['split']('.'))['filter'](_0x2f796e=>_0x2f796e['length']<=_0x46e464['length'])['map'](_0x4b692e=>Array(_0x46e464['length']-_0x4b692e['length'])['fill']('*'===_0x4b692e[0x0]?'*':'')['concat'](_0x4b692e))['some'](_0x375dba=>_0x46e464['every']((_0x10aa41,_0x2be36b)=>_0x375dba[_0x2be36b]===_0x10aa41||'*'===_0x375dba[_0x2be36b]));}function _0xee395a(){return _0x34cfa6&&_0x5c3f85?new window['Promise']((_0x23023b,_0x32e948)=>{_0x34cfa6['then'](_0x23023b,_0x32e948),_0x5c3f85['then'](_0x38d32d=>{'Valid'!=_0x38d32d&&_0x23023b(_0x38d32d);},_0x32e948);}):_0x34cfa6||_0x5c3f85||'Valid';}}function _0x1d3515(_0x22fa06,_0x4ea46d){return new window['Promise'](_0x36a02d=>{if(_0x2ea93f())return _0x36a02d('Valid');_0x486396(),_0x559dab['decorate']('_sendUsageRequest');let _0x41d2a4=!0x1;const _0x2cdffc=_0x8d5b21();function _0x1a276f(_0x5c6d12){return!!_0x5c6d12&&('object'==typeof _0x5c6d12||'function'==typeof _0x5c6d12)&&'function'==typeof _0x5c6d12['then']&&'function'==typeof _0x5c6d12['catch'];}function _0x52b6a4(_0x30eabf){_0x2f95d8(_0x30eabf)['then'](_0x89604a=>_0x89604a&&'ok'==_0x89604a['status']?_0x294239(_0x191e04(_0x2cdffc+_0x4ea46d))!=_0x89604a['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2e2da4=>(_0xace23(),_0x2e2da4),()=>{const _0x112278=_0x5e453d();return null==_0x112278?(_0xace23(),'Valid'):_0xef4dc5-_0x112278>0x240c8400?'UsageLimit':'Valid';})['then'](_0x36a02d)['catch'](()=>{_0x36a02d('UsageLimit');});const _0x27b589=0x36ee80;function _0xace23(){const _0x46f78e='llct-'+_0x294239(_0x191e04(_0x22fa06)),_0x4684f8=_0x1c351d(_0x294239(window['Math']['ceil'](_0xef4dc5/_0x27b589)));window['localStorage']['setItem'](_0x46f78e,_0x4684f8);}function _0x5e453d(){const _0x337b6c='llct-'+_0x294239(_0x191e04(_0x22fa06)),_0x4fa50b=window['localStorage']['getItem'](_0x337b6c);return _0x4fa50b?window['parseInt'](_0x1c351d(_0x4fa50b),0x10)*_0x27b589:null;}function _0x2f95d8(_0x3658e0){return new window['Promise']((_0x2bb8bb,_0x22fe70)=>{_0x3658e0['then'](_0x2bb8bb,_0x22fe70),window['setTimeout'](_0x22fe70,0x1d4c0);});}}_0x559dab['on']('_sendUsageRequest',(_0x4436a7,_0x16dd80)=>{if(_0x16dd80[0x0]!=_0x22fa06)return _0x36a02d('UsageLimit');_0x16dd80[0x1]={..._0x16dd80[0x1],'requestId':_0x2cdffc};},{'priority':'high'}),_0x559dab['on']('_sendUsageRequest',_0x325c09=>{_0x1a276f(_0x325c09['return'])&&(_0x41d2a4=!0x0,_0x52b6a4(_0x325c09['return']));},{'priority':'low'}),_0x6b633['then'](()=>{_0x41d2a4||_0x36a02d('UsageLimit');});});function _0x2ea93f(){return'auto'==_0x559dab['editing']['view']['_overlayModeHint'];}function _0x486396(){_0x559dab['editing']['view']['_overlayModeHint']='auto';}}function _0x25a7f8(_0x1d4890){const _0x385dc2=[new window['Promise'](_0xa07dce=>setTimeout(_0xa07dce,0x93ecc)),_0x6b633['then'](()=>new window['Promise'](_0x563986=>{let _0x11a948=0x0;_0x559dab['model']['on']('applyOperation',(_0x5c2e14,_0x44768f)=>{_0x44768f[0x0]['isDocumentOperation']&&_0x11a948++,0x5e8==_0x11a948&&(_0x563986(),_0x5c2e14['off']());});}))];return window['Promise']['race'](_0x385dc2)['then'](()=>_0x1d4890);}async function _0x5d0062(){await _0x6b633,_0x559dab['model']['change']=_0x27977f,_0x559dab['model']['enqueueChange']=_0x27977f,_0x559dab['enableReadOnlyMode']('model');}function _0x5dd56b(){return window['glob']&&window['glob']['triliumVersion'];}function _0x4412b0(_0x2bde25){const _0x513067=_0x50cfca();_0x559dab[_0x513067]='documentOutlineLicenseKey'+_0x2bde25,'Valid'!=_0x2bde25&&_0x5d0062();}function _0x50cfca(){const _0x1693d6=window['String'](window['performance']['now']())['replace']('.','');let _0x1a3bf0='a';for(let _0x3b40ec=0x0;_0x3b40ec<_0x1693d6['length'];_0x3b40ec+=0x2){let _0x51007d=window['parseInt'](_0x1693d6['substring'](_0x3b40ec,_0x3b40ec+0x2));_0x51007d>=0x3e&&(_0x51007d-=0x3e),_0x1a3bf0+=_0x53079c[_0x51007d];}return _0x1a3bf0;}function _0x12b978(){const _0x50239c=_0x90ae36['split']('.');if(0x3!=_0x50239c['length'])return null;return _0x424571(_0x50239c[0x1]);function _0x424571(_0x408bcc){const _0x4b5c7b=_0x4e29a2(_0x408bcc);return _0x4b5c7b&&_0x3d773c()?_0x4b5c7b:null;function _0x3d773c(){const _0x209b37=_0x4b5c7b['jti'],_0x324bbd=window['parseInt'](_0x209b37['substring'](_0x209b37['length']-0x8),0x10),_0x44e8ef={..._0x4b5c7b,'jti':_0x209b37['substring'](0x0,_0x209b37['length']-0x8)};return delete _0x44e8ef['vc'],_0x191e04(_0x44e8ef)==_0x324bbd;}}}async function _0x7a1403(){let _0xa88012=!0x0;try{const [_0x511a57,_0x398e8b,_0x5b6dbc]=_0x90ae36['split']('.');return _0xf6ace8(_0x511a57),await _0x44868d(_0x511a57,_0x398e8b,_0x5b6dbc),_0xa88012;}catch{return!0x1;}function _0xf6ace8(_0x3df43f){const _0xba5590=_0x4e29a2(_0x3df43f);_0xba5590&&'ES256'==_0xba5590['alg']||(_0xa88012=!0x1);}async function _0x44868d(_0x5932a2,_0x401b0d,_0x51af8c){const _0x38b395=window['Uint8Array']['from'](_0x5d26b3(_0x51af8c),_0x2b1481=>_0x2b1481['charCodeAt'](0x0)),_0x2260c3=new window['TextEncoder']()['encode'](_0x5932a2+'.'+_0x401b0d),_0x12d3c5=window['crypto']['subtle'];if(!_0x12d3c5)return;const _0x4da3d6=await _0x12d3c5['importKey']('jwk',_0x472d5d,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x12d3c5['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4da3d6,_0x38b395,_0x2260c3)||(_0xa88012=!0x1);}}function _0x4e29a2(_0x523d2c){return _0x523d2c['startsWith']('ey')?JSON['parse'](_0x5d26b3(_0x523d2c)):null;}function _0x5d26b3(_0x3bc502){return window['atob'](_0x3bc502['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x191e04(_0x305d64){let _0x109900=0x1505;function _0x27edd3(_0x5ba319){for(let _0x21eb32=0x0;_0x21eb32<_0x5ba319['length'];_0x21eb32++){const _0x18c32f=_0x5ba319['charCodeAt'](_0x21eb32);_0x109900=(_0x109900<<0x5)+_0x109900+_0x18c32f,_0x109900&=_0x109900;}}function _0x4e16e4(_0x34f70b){Array['isArray'](_0x34f70b)?_0x34f70b['forEach'](_0x4e16e4):_0x34f70b&&'object'==typeof _0x34f70b?Object['entries'](_0x34f70b)['sort']()['forEach'](([_0x3852d2,_0x2af0c7])=>{_0x27edd3(_0x3852d2),_0x4e16e4(_0x2af0c7);}):_0x27edd3(window['String'](_0x34f70b));}return _0x4e16e4(_0x305d64),_0x109900>>>0x0;}function _0x294239(_0x5ccd6e){return _0x5ccd6e['toString'](0x10)['padStart'](0x8,'0');}function _0x1c351d(_0x2bac5e){return _0x2bac5e['split']('')['reverse']()['join']('');}function _0x27977f(){}_0x4412b0(await _0x215e55());}(this);}['destroy'](){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}['_handleOutlineChange'](_0x41bf0c,{outlineDefinitions:_0x487e4c,outlineChanges:_0x490228}){this['_currentOutlineDefinitions']=_0x487e4c,this['view']['sync'](_0x490228);}['_setActiveViewItem'](_0x424889){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0x424889]&&(this['view']['activeItemIndex']=_0x424889);}['_handleItemSelected'](_0x5d367c){const _0x3efad1=this['_currentOutlineDefinitions'][_0x5d367c]['modelElement'];this['editor']['model']['change'](_0x391c06=>{_0x391c06['setSelection'](_0x3efad1,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x5d367c);}['_updateActiveDefinitionOnViewportChange'](){const _0x38eca3=this['editor'];let _0x5159c5;for(const _0x2dde65 of _0x38eca3['model']['document']['getRootNames']()){const _0x3e34b6=_0x38eca3['editing']['view']['getDomRoot'](_0x2dde65),_0x4f1564=_0x3e34b6&&new _0x23e40b(_0x3e34b6)['getVisible']();if(_0x4f1564){const _0xbd4202=new _0x23e40b(_0x565fe4['window'])['getIntersection'](_0x4f1564);_0xbd4202&&(_0x5159c5=_0xbd4202['top']+0.25*_0xbd4202['height']);}}if(void 0x0===_0x5159c5)return;const _0x1674b3=k(_0x38eca3['editing'],this['_currentOutlineDefinitions'],_0x5159c5);_0x1674b3?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0x1674b3)):this['_setActiveViewItem'](-0x1);}};function k(_0xcfaddc,_0x274d54,_0x23060e,_0xf70980=0x0,_0x79c2b8=_0x274d54['length']-0x1){const _0x497dc0=Math['floor'](_0xf70980+(_0x79c2b8-_0xf70980)/0x2);if(_0x79c2b8>=_0xf70980){const _0x515132=_0x274d54[_0x497dc0],_0x290c79=_0xcfaddc['mapper']['toViewElement'](_0x515132['modelElement']);return _0x290c79?new _0x23e40b(_0xcfaddc['view']['domConverter']['mapViewToDom'](_0x290c79))['bottom']>_0x23060e?k(_0xcfaddc,_0x274d54,_0x23060e,_0xf70980,_0x497dc0-0x1):k(_0xcfaddc,_0x274d54,_0x23060e,_0x497dc0+0x1,_0x79c2b8):null;}return _0x497dc0<0x0?null:_0x274d54[_0x497dc0];}var E=class extends _0x464a3a{['licenseKey'];['_licenseKeyCheckInterval'];static get['requires'](){return[I,x];}static get['pluginName'](){return'DocumentOutline';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x85f5d8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1ed149;for(const _0x3f260f in _0x85f5d8){const _0x356ead=_0x3f260f,_0x126b8f=_0x85f5d8[_0x356ead];if('documentOutlineLicenseKeyValid'==_0x126b8f||'documentOutlineLicenseKeyInvalid'==_0x126b8f||'documentOutlineLicenseKeyExpired'==_0x126b8f||'documentOutlineLicenseKeyDomainLimit'==_0x126b8f||'documentOutlineLicenseKeyNotAllowed'==_0x126b8f||'documentOutlineLicenseKeyEvaluationLimit'==_0x126b8f||'documentOutlineLicenseKeyUsageLimit'==_0x126b8f){delete _0x85f5d8[_0x356ead],_0x1ed149=_0x126b8f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0x1ed149&&_0x85f5d8['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0x1ed149&&_0x85f5d8['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0x1ed149&&_0x85f5d8['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0x1ed149&&_0x85f5d8['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0x1ed149&&_0x85f5d8['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0x1ed149&&_0x85f5d8['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},K=class extends _0x4ec52c{['execute'](){this['editor']['model']['change'](_0x439efd=>{this['editor']['model']['insertObject'](_0x439efd['createElement']('tableOfContents'));});}['refresh'](){const _0x527b98=this['editor']['model'],_0xbf64ad=_0x527b98['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0xbf64ad&&_0x527b98['schema']['findAllowedParent'](_0xbf64ad,'tableOfContents'));}},A=class extends _0x464a3a{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){const _0x19c04f=this['editor'];if(_0x19c04f['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0x49bb30,modelNames:_0x1481c8}=function(_0x4ab1e1){const _0x21393d=new Set(),_0x4e8e3b=new Set();if(!_0x4ab1e1)return{'viewNames':_0x21393d,'modelNames':_0x4e8e3b};for(const _0x1d6a57 of _0x4ab1e1){if('paragraph'===_0x1d6a57['model'])continue;const _0x2f898a='string'==typeof _0x1d6a57['view']?_0x1d6a57['view']:_0x1d6a57['view']['name'];_0x21393d['add'](_0x2f898a),_0x4e8e3b['add'](_0x1d6a57['model']);}return _0x21393d['has']('h1')||(_0x21393d['add']('h1'),_0x4e8e3b['add']('heading1')),{'viewNames':_0x21393d,'modelNames':_0x4e8e3b};}(this['editor']['config']['get']('heading.options'));for(const _0xd81ee1 of _0x49bb30)this['_customUpcastHeadingsConversion'](_0xd81ee1);for(const _0x382ab2 of _0x1481c8)this['_customDataDowncastHeadingsConversion'](_0x382ab2),_0x19c04f['model']['schema']['isRegistered'](_0x382ab2)&&_0x19c04f['model']['schema']['extend'](_0x382ab2,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x1481c8);}['_customUpcastHeadingsConversion'](_0x44df6a){this['editor']['conversion']['for']('upcast')['add'](_0x3571be=>_0x3571be['on']('element:'+_0x44df6a,(_0x3d9aa4,_0x4bbafc,_0x1ae474)=>{const {consumable:_0xb37ade,writer:_0x48d9c2}=_0x1ae474,_0x1296f1=_0x4bbafc['viewItem']['getAttribute']('id'),_0x19ce1c=_0x4bbafc['modelRange']?.['getContainedElement']();if(_0x19ce1c)return _0x1296f1&&_0x1296f1['length']||_0x19ce1c['hasAttribute']('headingId')?void(_0xb37ade['consume'](_0x4bbafc['viewItem'],{'attributes':['id']})&&_0x48d9c2['setAttribute']('headingId',_0x1296f1,_0x19ce1c)):(_0xb37ade['consume'](_0x4bbafc['viewItem'],{'attributes':['id']}),void _0x48d9c2['setAttribute']('headingId',_0x8d5b21(),_0x19ce1c));},{'priority':_0x15bf35['get']('low')+0.5}));}['_customDataDowncastHeadingsConversion'](_0x3880ab){this['editor']['conversion']['for']('downcast')['add'](_0x5103d4=>_0x5103d4['on']('attribute:headingId:'+_0x3880ab,(_0x4a37c7,_0x570966,_0x8bd5a8)=>{if(!_0x8bd5a8['consumable']['consume'](_0x570966['item'],_0x4a37c7['name']))return;const _0x464ca9=_0x570966['item']['getAttribute']('headingId'),_0x455254=_0x8bd5a8['mapper']['toViewElement'](_0x570966['item']);_0x8bd5a8['writer']['setAttribute']('id',_0x464ca9,_0x455254);}));}['_registerHeadingIdAttributePostfixer'](_0x4e5653){const _0x2ac76f=this['editor'],_0x181cac=new Set(),_0x2982c3=new Set();function _0x59bb9b(_0xdf7ac7,_0x36a65f){const _0xe696e0=_0x8d5b21();return _0x2982c3['add'](_0xe696e0),_0xdf7ac7['setAttribute']('headingId',_0xe696e0,_0x36a65f),_0xe696e0;}function _0x1b07f4(_0x18eddb,_0x162966){_0x18eddb['removeAttribute']('headingId',_0x162966);}_0x2ac76f['model']['document']['registerPostFixer'](_0x5b6fc5=>{const _0x367156=_0x2ac76f['model']['document']['differ']['getChanges']();let _0x23bcbd=!0x1;for(const _0x193b9d of _0x367156)if('insert'==_0x193b9d['type']&&_0x193b9d['name']){if(_0x4e5653['has'](_0x193b9d['name'])){const _0x2166b7=_0x193b9d['attributes']['get']('headingId');'string'==typeof _0x2166b7?_0x181cac['has'](_0x2166b7)?(_0x59bb9b(_0x5b6fc5,_0x193b9d['position']['nodeAfter']),_0x23bcbd=!0x0):_0x2982c3['add'](_0x2166b7):(_0x59bb9b(_0x5b6fc5,_0x193b9d['position']['nodeAfter']),_0x23bcbd=!0x0);}else'string'==typeof _0x193b9d['attributes']['get']('headingId')&&(_0x1b07f4(_0x5b6fc5,_0x193b9d['position']['nodeAfter']),_0x23bcbd=!0x0);}else{if('remove'==_0x193b9d['type']){const _0x3bb198=_0x193b9d['attributes']['get']('headingId');'string'==typeof _0x3bb198&&_0x181cac['delete'](_0x3bb198);}}return _0x23bcbd;}),_0x2ac76f['model']['document']['on']('change',()=>{_0x2982c3['forEach'](_0x140005=>_0x181cac['add'](_0x140005)),_0x2982c3['clear']();});}},N=class extends _0x464a3a{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1bc01e,I,A];}['_currentOutlineDefinitions'];['_tableOfContentsElements'];['_headingIdModelAttributeName'];constructor(_0x649544){super(_0x649544),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}['init'](){const _0x38fab1=this['editor'],_0x59290b=_0x38fab1['editing']['view']['document'];_0x38fab1['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0x38fab1['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x59290b,'click',(_0x247031,_0x3ade20)=>{if(!_0x3ade20['target'])return;const _0x105164=_0x3ade20['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0x105164)&&(_0x3ade20['domEvent']['preventDefault'](),_0x247031['stop'](),this['_handleScrollToHeading'](_0x105164));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0x38fab1['commands']['add']('insertTableOfContents',new K(_0x38fab1));const _0x35b7ad=_0x38fab1['config']['get']('tableOfContents.headings');_0x35b7ad&&_0x35b7ad['length']?this['listenTo'](_0x38fab1['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0x35b7ad),this['_updateTableOfContentsElements']();}):_0x38fab1['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0xb30544,_0x33f54b)=>{this['_currentOutlineDefinitions']=_0x33f54b['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0x38fab1['model']['document'],'change',()=>{this['_trackNewToCElements']();});}['afterInit'](){!async function(_0x5ca1e1){const _0x156491='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x5f4c0e=0x78de0,_0x9289e1=window['Date']['now'](),_0x9b2c8=_0x5ca1e1['editor'],_0x255380=new window['Promise'](_0x8e4c08=>{_0x9b2c8['once']('ready',_0x8e4c08);}),_0x5e1892={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x14b7ed=_0x9b2c8['config']['get']('licenseKey');async function _0xe5c1a9(){let _0x2d5c85,_0x24e848=null,_0x436f22=null;try{return'GPL'==_0x14b7ed?'NotAllowed':(_0x2d5c85=_0x146c3c(),_0x2d5c85?(_0x2d5c85['usageEndpoint']&&(_0x436f22=_0x3dbe4e(_0x2d5c85['usageEndpoint'],_0x2d5c85['jti'])),await _0x279c48()?_0x590018()?_0x2c6400()?'Expired':_0x313359()?('evaluation'==_0x2d5c85['licenseType']&&(_0x24e848=_0x4965fd('EvaluationLimit')),await _0x3cb66f()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2c6400(){const _0x242bac=['evaluation','trial']['includes'](_0x2d5c85['licenseType'])?_0x9289e1/0x3e8:0xe10*_0x5f4c0e;return _0x2d5c85['exp']<_0x242bac;}function _0x590018(){const _0x596b98=_0x2d5c85['features'];return!!_0x596b98&&(!!_0x596b98['includes']('*')||(!!_0x596b98['includes']('TOC')||(!!_0x596b98['includes']('PP')||!(!_0x596b98['includes']('TRILIUM')||!_0x2452ee()))));}function _0x313359(){const _0x3e16fa=_0x2d5c85['licensedHosts'];if(!_0x3e16fa||0x0==_0x3e16fa['length'])return!0x0;const {hostname:_0x419a17}=new URL(window['location']['href']);if(_0x3e16fa['includes'](_0x419a17))return!0x0;const _0x199b30=_0x419a17['split']('.');return _0x3e16fa['filter'](_0xdc6da7=>_0xdc6da7['includes']('*'))['map'](_0x538a31=>_0x538a31['split']('.'))['filter'](_0x31e806=>_0x31e806['length']<=_0x199b30['length'])['map'](_0x4c2a64=>Array(_0x199b30['length']-_0x4c2a64['length'])['fill']('*'===_0x4c2a64[0x0]?'*':'')['concat'](_0x4c2a64))['some'](_0x1599dd=>_0x199b30['every']((_0x523dfd,_0x4bc3b0)=>_0x1599dd[_0x4bc3b0]===_0x523dfd||'*'===_0x1599dd[_0x4bc3b0]));}function _0x3cb66f(){return _0x24e848&&_0x436f22?new window['Promise']((_0x2ee80b,_0x53042d)=>{_0x24e848['then'](_0x2ee80b,_0x53042d),_0x436f22['then'](_0xa425a8=>{'Valid'!=_0xa425a8&&_0x2ee80b(_0xa425a8);},_0x53042d);}):_0x24e848||_0x436f22||'Valid';}}function _0x3dbe4e(_0x5a95b9,_0x26a4d9){return new window['Promise'](_0xd57d20=>{if(_0x543154())return _0xd57d20('Valid');_0x5ad6f5(),_0x9b2c8['decorate']('_sendUsageRequest');let _0x180fa3=!0x1;const _0x11ed29=_0x8d5b21();function _0x519898(_0x288215){return!!_0x288215&&('object'==typeof _0x288215||'function'==typeof _0x288215)&&'function'==typeof _0x288215['then']&&'function'==typeof _0x288215['catch'];}function _0x52c172(_0x2e6873){_0x31cac9(_0x2e6873)['then'](_0xac641e=>_0xac641e&&'ok'==_0xac641e['status']?_0xcc1d4f(_0x3f03d5(_0x11ed29+_0x26a4d9))!=_0xac641e['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0xa324d2=>(_0x5d8f06(),_0xa324d2),()=>{const _0x3794f6=_0x222bed();return null==_0x3794f6?(_0x5d8f06(),'Valid'):_0x9289e1-_0x3794f6>0x240c8400?'UsageLimit':'Valid';})['then'](_0xd57d20)['catch'](()=>{_0xd57d20('UsageLimit');});const _0x5cb359=0x36ee80;function _0x5d8f06(){const _0x1e5043='llct-'+_0xcc1d4f(_0x3f03d5(_0x5a95b9)),_0x31891e=_0x45d0d1(_0xcc1d4f(window['Math']['ceil'](_0x9289e1/_0x5cb359)));window['localStorage']['setItem'](_0x1e5043,_0x31891e);}function _0x222bed(){const _0x24e615='llct-'+_0xcc1d4f(_0x3f03d5(_0x5a95b9)),_0x76b19c=window['localStorage']['getItem'](_0x24e615);return _0x76b19c?window['parseInt'](_0x45d0d1(_0x76b19c),0x10)*_0x5cb359:null;}function _0x31cac9(_0x531a55){return new window['Promise']((_0x5e5db8,_0x5e2b15)=>{_0x531a55['then'](_0x5e5db8,_0x5e2b15),window['setTimeout'](_0x5e2b15,0x1d4c0);});}}_0x9b2c8['on']('_sendUsageRequest',(_0x4b8364,_0x4d05b7)=>{if(_0x4d05b7[0x0]!=_0x5a95b9)return _0xd57d20('UsageLimit');_0x4d05b7[0x1]={..._0x4d05b7[0x1],'requestId':_0x11ed29};},{'priority':'high'}),_0x9b2c8['on']('_sendUsageRequest',_0xb1fbc3=>{_0x519898(_0xb1fbc3['return'])&&(_0x180fa3=!0x0,_0x52c172(_0xb1fbc3['return']));},{'priority':'low'}),_0x255380['then'](()=>{_0x180fa3||_0xd57d20('UsageLimit');});});function _0x543154(){return'auto'==_0x9b2c8['editing']['view']['_overlayModeHint'];}function _0x5ad6f5(){_0x9b2c8['editing']['view']['_overlayModeHint']='auto';}}function _0x4965fd(_0x4ae6d3){const _0x3f1a8b=[new window['Promise'](_0x56c04f=>setTimeout(_0x56c04f,0x93ecc)),_0x255380['then'](()=>new window['Promise'](_0x20d084=>{let _0xa1282=0x0;_0x9b2c8['model']['on']('applyOperation',(_0x36d072,_0x42fb69)=>{_0x42fb69[0x0]['isDocumentOperation']&&_0xa1282++,0x5e8==_0xa1282&&(_0x20d084(),_0x36d072['off']());});}))];return window['Promise']['race'](_0x3f1a8b)['then'](()=>_0x4ae6d3);}async function _0x271a70(){await _0x255380,_0x9b2c8['model']['change']=_0x1b96ea,_0x9b2c8['model']['enqueueChange']=_0x1b96ea,_0x9b2c8['enableReadOnlyMode']('model');}function _0x2452ee(){return window['glob']&&window['glob']['triliumVersion'];}function _0x36a180(_0x3a2c34){const _0x110a3f=_0x36d6de();_0x9b2c8[_0x110a3f]='tableOfContentsLicenseKey'+_0x3a2c34,'Valid'!=_0x3a2c34&&_0x271a70();}function _0x36d6de(){const _0x1adf7c=window['String'](window['performance']['now']())['replace']('.','');let _0x2cd65b='m';for(let _0x3d44ca=0x0;_0x3d44ca<_0x1adf7c['length'];_0x3d44ca+=0x2){let _0x381391=window['parseInt'](_0x1adf7c['substring'](_0x3d44ca,_0x3d44ca+0x2));_0x381391>=0x3e&&(_0x381391-=0x3e),_0x2cd65b+=_0x156491[_0x381391];}return _0x2cd65b;}function _0x146c3c(){const _0x4b72a2=_0x14b7ed['split']('.');if(0x3!=_0x4b72a2['length'])return null;return _0x4c76b0(_0x4b72a2[0x1]);function _0x4c76b0(_0xab9449){const _0x187e88=_0x18dbbe(_0xab9449);return _0x187e88&&_0x1831af()?_0x187e88:null;function _0x1831af(){const _0x583548=_0x187e88['jti'],_0x2941f4=window['parseInt'](_0x583548['substring'](_0x583548['length']-0x8),0x10),_0x586007={..._0x187e88,'jti':_0x583548['substring'](0x0,_0x583548['length']-0x8)};return delete _0x586007['vc'],_0x3f03d5(_0x586007)==_0x2941f4;}}}async function _0x279c48(){let _0x2a2522=!0x0;try{const [_0x467c31,_0x2a064b,_0x14a2d6]=_0x14b7ed['split']('.');return _0x527636(_0x467c31),await _0x147897(_0x467c31,_0x2a064b,_0x14a2d6),_0x2a2522;}catch{return!0x1;}function _0x527636(_0x54f728){const _0x33cfa3=_0x18dbbe(_0x54f728);_0x33cfa3&&'ES256'==_0x33cfa3['alg']||(_0x2a2522=!0x1);}async function _0x147897(_0x452e69,_0x3bc17a,_0x1557c9){const _0x2c66d3=window['Uint8Array']['from'](_0x454a76(_0x1557c9),_0x361908=>_0x361908['charCodeAt'](0x0)),_0x4857aa=new window['TextEncoder']()['encode'](_0x452e69+'.'+_0x3bc17a),_0x4e5931=window['crypto']['subtle'];if(!_0x4e5931)return;const _0x3dd3cf=await _0x4e5931['importKey']('jwk',_0x5e1892,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4e5931['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3dd3cf,_0x2c66d3,_0x4857aa)||(_0x2a2522=!0x1);}}function _0x18dbbe(_0xbe335c){return _0xbe335c['startsWith']('ey')?JSON['parse'](_0x454a76(_0xbe335c)):null;}function _0x454a76(_0x84b113){return window['atob'](_0x84b113['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x3f03d5(_0x595b18){let _0x22dd7b=0x1505;function _0x1854d6(_0x5e19dc){for(let _0x15c13a=0x0;_0x15c13a<_0x5e19dc['length'];_0x15c13a++){const _0x58348c=_0x5e19dc['charCodeAt'](_0x15c13a);_0x22dd7b=(_0x22dd7b<<0x5)+_0x22dd7b+_0x58348c,_0x22dd7b&=_0x22dd7b;}}function _0x393a10(_0x48fc94){Array['isArray'](_0x48fc94)?_0x48fc94['forEach'](_0x393a10):_0x48fc94&&'object'==typeof _0x48fc94?Object['entries'](_0x48fc94)['sort']()['forEach'](([_0x5628d5,_0x23aa3b])=>{_0x1854d6(_0x5628d5),_0x393a10(_0x23aa3b);}):_0x1854d6(window['String'](_0x48fc94));}return _0x393a10(_0x595b18),_0x22dd7b>>>0x0;}function _0xcc1d4f(_0x249a28){return _0x249a28['toString'](0x10)['padStart'](0x8,'0');}function _0x45d0d1(_0x59cc52){return _0x59cc52['split']('')['reverse']()['join']('');}function _0x1b96ea(){}_0x36a180(await _0xe5c1a9());}(this);}['_updateTableOfContentsElements'](){this['_tableOfContentsElements']['forEach'](_0x2e6232=>{'$graveyard'!==_0x2e6232['rootName']&&this['editor']['editing']['reconvertItem'](_0x2e6232);});}['_trackNewToCElements'](){for(const _0x391795 of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x391795['type']||'tableOfContents'!==_0x391795['name'])return;this['_tableOfContentsElements']['add'](_0x391795['position']['nodeAfter']);}}['_getOutlineDefinitions'](_0x4eeb13){const _0x3a8ef3=this['editor'],_0x35727c=[];for(const _0x2be758 of _0x3a8ef3['model']['document']['getRootNames']())_0x398d85(_0x3a8ef3['model']['document']['getRoot'](_0x2be758));function _0x398d85(_0x25022d){for(const _0x3e29ef of _0x25022d['getChildren']())_0x3e29ef['is']('element')&&(_0x4eeb13['includes'](_0x3e29ef['name'])&&_0x35727c['push']({'level':_0x4eeb13['indexOf'](_0x3e29ef['name'])+0x1,'text':b(_0x3e29ef),'modelElement':_0x3e29ef}),_0x398d85(_0x3e29ef));}return _0x35727c;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}['_defineConverters'](){const _0x3dd656=this['editor']['conversion'];_0x3dd656['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x3dd656['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x4df076,{writer:_0x7361ae})=>this['_createTableOfContents'](_0x7361ae,!0x0)}),_0x3dd656['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x17e525,{writer:_0x336c42})=>(this['_tableOfContentsElements']['add'](_0x17e525),_0x49ab46(this['_createTableOfContents'](_0x336c42),_0x336c42,{'label':L(this['editor']['locale'],'Table\x20of\x20contents')}))}),this['editor']['data']['registerRawContentMatcher']({'name':'div','classes':'table-of-contents'}),this['editor']['editing']['mapper']['on']('viewToModelPosition',this['_redirectMapper'](),{'priority':'high'});}['_createTableOfContents'](_0x5ca1d7,_0x102593=!0x1){const {locale:_0x3f2b8f}=this['editor'],_0x116768=_0x5ca1d7['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0x102593&&{'data-table-of-contents-label':L(_0x3f2b8f,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0x102593&&_0x5ca1d7['insert'](_0x5ca1d7['createPositionAt'](_0x116768,'end'),_0x5ca1d7['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x5ca1d7['createText'](L(_0x3f2b8f,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0x360b59=_0x102593?'':'['+L(_0x3f2b8f,'Empty\x20heading')+']';let _0x1106b5=_0x116768;return this['_currentOutlineDefinitions']['forEach']((_0x316061,_0x4e5c58,_0x2e4380)=>{const _0x342564=this['editor']['model']['hasContent'](_0x316061['modelElement'],{'ignoreWhitespaces':!0x0}),_0x4d11de=_0x342564?_0x316061['text']:_0x360b59,_0x57a578=_0x316061['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0x2a6e74=_0x5ca1d7['createContainerElement']('a',{'href':'#'+_0x57a578,...!_0x102593&&{'tabindex':'-1'}},[_0x5ca1d7['createText'](_0x4d11de)]),_0x2fca0f=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x5ca1d7['setCustomProperty']('tableOfContentsHeadingIndex',_0x4e5c58,_0x2a6e74);const _0xba389a=_0x5ca1d7['createContainerElement']('li',null,[_0x342564||!_0x102593&&_0x2fca0f?_0x2a6e74:_0x5ca1d7['createText']('')]),_0x50eb4e=_0x4e5c58?_0x2e4380[_0x4e5c58-0x1]['level']:0x0,_0x315124=Math['abs'](_0x316061['level']-_0x50eb4e);if(_0x316061['level']>_0x50eb4e){const _0x35f519=P(_0xba389a,_0x315124,_0x5ca1d7);_0x5ca1d7['insert'](_0x5ca1d7['createPositionAt'](_0x1106b5,'end'),_0x35f519);}else{const _0x590965=function(_0x2db7fa,_0x9a57cf){return _0x2db7fa['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0x2232be=>_0x2232be['is']('element','ol'))[_0x9a57cf];}(_0x1106b5,_0x315124);_0x5ca1d7['insert'](_0x5ca1d7['createPositionAt'](_0x590965,'end'),_0xba389a);}_0x1106b5=_0xba389a;}),_0x116768;}['_handleScrollToHeading'](_0x19c93c){const _0x5dc6b4=this['_currentOutlineDefinitions'][_0x19c93c]['modelElement'];this['editor']['model']['change'](_0x191c4c=>{_0x191c4c['setSelection'](_0x5dc6b4,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}['_redirectMapper'](){return(_0x15d044,_0x2821ea)=>{const _0x1f4d0c=_0x2821ea['mapper'],_0x4bb686=_0x1f4d0c['findMappedViewAncestor'](_0x2821ea['viewPosition']),_0x54a366=_0x1f4d0c['toModelElement'](_0x4bb686);_0x54a366['is']('element','tableOfContents')&&(_0x2821ea['modelPosition']=this['editor']['model']['createPositionAt'](_0x54a366,0x0),_0x15d044['stop']());};}};function P(_0x2c0c07,_0x5e4c66,_0x8c5e81){return 0x1===_0x5e4c66?_0x8c5e81['createContainerElement']('ol',null,[_0x2c0c07]):_0x8c5e81['createContainerElement']('ol',null,[_0x8c5e81['createContainerElement']('li',null,[P(_0x2c0c07,_0x5e4c66-0x1,_0x8c5e81)])]);}var U=class extends _0x464a3a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x2ebce6=this['editor'];_0x2ebce6['ui']['componentFactory']['add']('tableOfContents',()=>{const _0x34f617=this['_createButton'](_0x123b34);return _0x34f617['tooltip']=!0x0,_0x34f617;}),_0x2ebce6['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0x3b1daf)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x19eaa8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1da1dc;for(const _0x1d8f50 in _0x19eaa8){const _0x196494=_0x1d8f50,_0x2fd2a6=_0x19eaa8[_0x196494];if('tableOfContentsLicenseKeyValid'==_0x2fd2a6||'tableOfContentsLicenseKeyInvalid'==_0x2fd2a6||'tableOfContentsLicenseKeyExpired'==_0x2fd2a6||'tableOfContentsLicenseKeyDomainLimit'==_0x2fd2a6||'tableOfContentsLicenseKeyNotAllowed'==_0x2fd2a6||'tableOfContentsLicenseKeyEvaluationLimit'==_0x2fd2a6||'tableOfContentsLicenseKeyUsageLimit'==_0x2fd2a6){delete _0x19eaa8[_0x196494],_0x1da1dc=_0x2fd2a6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0x1da1dc&&_0x19eaa8['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0x1da1dc&&_0x19eaa8['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0x1da1dc&&_0x19eaa8['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0x1da1dc&&_0x19eaa8['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0x1da1dc&&_0x19eaa8['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0x1da1dc&&_0x19eaa8['_showLicenseError']('usageLimit');},0x3e8);}['_createButton'](_0x55ffb4){const _0x1f38d5=this['editor'],_0x17b8b6=_0x1f38d5['locale'],_0x2b0c0b=_0x1f38d5['commands']['get']('insertTableOfContents'),_0x42f9d9=new _0x55ffb4(_0x17b8b6);return _0x42f9d9['set']({'label':L(_0x17b8b6,'Table\x20of\x20contents'),'icon':_0x204e27}),_0x42f9d9['bind']('isEnabled')['to'](_0x2b0c0b,'isEnabled'),this['listenTo'](_0x42f9d9,'execute',()=>{_0x1f38d5['execute']('insertTableOfContents'),_0x1f38d5['editing']['view']['focus']();}),_0x42f9d9;}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},D=class extends _0x464a3a{static get['requires'](){return[N,U];}static get['pluginName'](){return'TableOfContents';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{E as DocumentOutline,x as DocumentOutlineUI,I as DocumentOutlineUtils,A as HeadingId,D as TableOfContents,K as TableOfContentsCommand,N as TableOfContentsEditing,U as TableOfContentsUI};
|
|
23
|
+
import{Command as _0x3335d0,Plugin as _0x548b1f}from'@ckeditor/ckeditor5-core';import{debounce as _0x43c5a8,throttle as _0x709743}from'es-toolkit/compat';import{ModelText as _0x4a040b,ModelTreeWalker as _0x222346}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0x3345a9,Rect as _0x4de28e,diff as _0x5299b8,diffToChanges as _0xdf80ec,global as _0x587805,priorities as _0x5e30bf,scrollAncestorsToShowTarget as _0x259d2c,uid as _0x1c535f}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x258ddc,MenuBarMenuListItemButtonView as _0x1b5155,View as _0x50178f}from'@ckeditor/ckeditor5-ui';import{Widget as _0x3092e2,toWidget as _0x1b7424}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x38c57b}from'@ckeditor/ckeditor5-icons';function b(_0xd62201){let _0x5ab25e='';for(const _0x5433c6 of _0xd62201['getChildren']())_0x5433c6 instanceof _0x4a040b&&(_0x5ab25e+=_0x5433c6['data']);return _0x5ab25e;}var I=class extends _0x548b1f{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];['init'](){const _0x446219=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0xc6a75b=[];_0x446219['model']['document']['on']('change',_0x43c5a8(()=>{const _0x5e3f83=_0xc6a75b;_0xc6a75b=this['_getOutlineDefinitions']();const _0x55ad33=_0xdf80ec(_0x5299b8(_0x5e3f83,_0xc6a75b,(_0x4ac888,_0x13a9b2)=>_0x4ac888['level']===_0x13a9b2['level']&&_0x4ac888['text']===_0x13a9b2['text']&&_0x4ac888['modelElement']===_0x13a9b2['modelElement']),_0xc6a75b),_0x58fef5=this['_getActiveHeading'](),_0x1ccecc=_0xc6a75b['findIndex'](_0x224a6e=>_0x224a6e['modelElement']===_0x58fef5);_0x55ad33['length']&&this['fire']('change',{'outlineDefinitions':_0xc6a75b,'activeItemIndex':_0x1ccecc,'outlineChanges':_0x55ad33}),this['fire']('activeItemIndex',{'index':_0x1ccecc});},0xfa,{'leading':!0x0,'trailing':!0x0}));}['afterInit'](){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}['_getOutlineDefinitions'](){const _0x2a66f3=this['editor'],_0x183c39=[],_0x1a38cb=this['_headingNames'];for(const _0xd2bfee of _0x2a66f3['model']['document']['getRootNames']())_0x16e6d6(_0x2a66f3['model']['document']['getRoot'](_0xd2bfee));function _0x16e6d6(_0x105fa8){for(const _0x530151 of _0x105fa8['getChildren']())_0x530151['is']('element')&&(_0x1a38cb['includes'](_0x530151['name'])&&_0x183c39['push']({'level':_0x1a38cb['indexOf'](_0x530151['name'])+0x1,'text':b(_0x530151),'modelElement':_0x530151}),_0x16e6d6(_0x530151));}return _0x183c39;}['_getActiveHeading'](){const _0x1081ff=new _0x222346({'direction':'backward','startPosition':this['editor']['model']['document']['selection']['getFirstPosition']()});for(const _0xad3738 of _0x1081ff)if(_0xad3738['item']['is']('element')&&this['_headingNames']['includes'](_0xad3738['item']['name']))return _0xad3738['item'];}['_getHeadingNames'](){const _0xbd807b=this['editor']['config']['get']('documentOutline.headings');return _0xbd807b||function(_0x4cf935){const _0x1f52da=_0x4cf935['config']['get']('heading.options');return _0x1f52da?_0x1f52da['reduce']((_0x59b758,_0x1a028b)=>('paragraph'!==_0x1a028b['model']&&_0x59b758['push'](_0x1a028b['model']),_0x59b758),[]):_0x4cf935['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}['_deriveHeadingElementsFromConversion'](){const _0x12b4ec=this['editor'],_0x3f736a=['h1','h2','h3','h4','h5','h6'],_0xf31f98=[];for(const _0x22ace9 of _0x3f736a){const _0x55b18b=_0x12b4ec['editing']['view']['domConverter']['domToView'](document['createElement'](_0x22ace9)),_0x4c1971=_0x12b4ec['data']['toModel'](_0x55b18b)['getChild'](0x0);_0x4c1971?.['is']('element')&&_0xf31f98['push'](_0x4c1971['name']);}this['_headingNames']=_0xf31f98;}};function L(_0x1f03f6,_0x15fa22){const t=_0x1f03f6['t'];switch(_0x15fa22){case'Empty\x20heading':return t('Empty\x20heading');case'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.':return t('Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.');case'No\x20headings\x20were\x20found\x20in\x20the\x20document.':return t('No\x20headings\x20were\x20found\x20in\x20the\x20document.');case'Table\x20of\x20contents':return t('Table\x20of\x20contents');default:return _0x15fa22;}}var C=class extends _0x50178f{constructor(_0x8d9d6f,_0x2fe077=!0x1){super(_0x8d9d6f);const _0x9ee740=this['bindTemplate'],_0x453025=_0x2fe077?'['+L(_0x8d9d6f,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x3d52ca=>!_0x3d52ca),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x9ee740['to']('level',_0x5e13be=>'ck-document-outline__item_level-'+_0x5e13be),_0x9ee740['if']('isActive','ck-document-outline__item_active'),_0x9ee740['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x9ee740['to']('text')},'children':[{'text':_0x9ee740['to']('text',_0x4835a8=>_0x4835a8||_0x453025)}],'on':{'click':_0x9ee740['to']('click')}});}},_=class extends _0x50178f{['items'];['documentOutlineContainer'];['showEmptyHeadingText'];constructor(_0x3bac5d,_0x46550a=!0x1,_0x5b43b4){super(_0x3bac5d),this['showEmptyHeadingText']=_0x46550a,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0x5b43b4,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0xde4336,_0x50de44,_0x242f4b,_0x3645d0)=>{this['_setActiveItem'](_0x3645d0,_0x242f4b);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x3bac5d['contentLanguageDirection'],'data-document-outline-empty-placeholder':L(_0x3bac5d,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x263c53){_0x263c53['forEach'](_0x2cc1de=>{'insert'==_0x2cc1de['type']?this['_insertItem'](_0x2cc1de['index'],..._0x2cc1de['values']):'delete'==_0x2cc1de['type']&&this['_deleteItem'](_0x2cc1de['index'],_0x2cc1de['howMany']);});}['_setActiveItem'](_0x46de0b,_0x14f0e9){if(-0x1!==_0x46de0b){const _0x1b27d9=this['items']['get'](_0x46de0b);_0x1b27d9&&(_0x1b27d9['isActive']=!0x1);}-0x1!==_0x14f0e9&&(this['items']['get'](_0x14f0e9)['isActive']=!0x0,this['_scrollToItem'](_0x14f0e9));}['_insertItem'](_0x36c2d6,..._0x530aa2){const _0x42efb4=_0x530aa2['map']((_0x57a8b7,_0x4eb8ae)=>{const _0x127fae=new C(this['locale'],this['showEmptyHeadingText']);return _0x127fae['text']=_0x57a8b7['text'],_0x127fae['level']=_0x57a8b7['level'],_0x36c2d6+_0x4eb8ae===this['activeItemIndex']&&(_0x127fae['isActive']=!0x0),_0x127fae;});this['items']['addMany'](_0x42efb4,_0x36c2d6);}['_deleteItem'](_0x3d1fb7,_0x58a66d){do{this['items']['remove'](_0x3d1fb7);}while(--_0x58a66d);}['_handleItemClick'](_0x1aeda4){const _0x3378db=this['items']['getIndex'](_0x1aeda4['source']);this['fire']('itemSelected',_0x3378db);}['_scrollToItem'](_0x4f0339){_0x259d2c(this['items']['get'](_0x4f0339)['element'],0x14,this['documentOutlineContainer']);}['destroy'](){super['destroy'](),this['element']['remove']();}},x=class extends _0x548b1f{['view'];['_currentOutlineDefinitions'];['_updateActiveDefinitionFromViewportThrottled'];static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1cf582){super(_0x1cf582),this['view']=new _(_0x1cf582['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x709743(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}['init'](){const _0x371616=this['editor'],_0x3feb32=_0x371616['plugins']['get']('DocumentOutlineUtils');let _0x5223c5=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x371616['config']['get']('documentOutline.container'))throw new _0x3345a9('document-outline-container-not-provided',{'editor':_0x371616});_0x371616['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0x3feb32['on']('change',this['_handleOutlineChange']['bind'](this)),_0x3feb32['on']('activeItemIndex',(_0x18f786,{index:_0x4e1d4c})=>this['_setActiveViewItem'](_0x4e1d4c)),this['view']['on']('itemSelected',(_0x5b9301,_0x2abe53)=>{_0x5223c5=!0x0,this['_handleItemSelected'](_0x2abe53);}),this['view']['listenTo'](_0x587805['document'],'scroll',()=>{_0x5223c5?_0x5223c5=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();},{'useCapture':!0x0}),this['view']['listenTo'](_0x587805['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}['afterInit'](){!async function(_0xccf265){const _0x59a236='aWxlPG0A3CDdHBsZEqwULojOrgMXVTRvu1bI2487ptzJKQeihfNkYS9n6y5mcF',_0x4e6e2c=0x78df8,_0x28b24b=window['Date']['now'](),_0x9c5532=_0xccf265['editor'],_0x139a75=new window['Promise'](_0xcb865b=>{_0x9c5532['once']('ready',_0xcb865b);}),_0x426a55={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x4a6b1e=_0x9c5532['config']['get']('licenseKey');async function _0x5479b8(){let _0x4830da,_0x7b8104=null,_0x278768=null;try{return'GPL'==_0x4a6b1e?'NotAllowed':(_0x4830da=_0x4b8dbb(),_0x4830da?(_0x4830da['usageEndpoint']&&(_0x278768=_0x64e941(_0x4830da['usageEndpoint'],_0x4830da['jti'])),await _0x2dbdba()?_0x5d7ddd()?_0x1fe64e()?'Expired':_0x21601e()?('evaluation'==_0x4830da['licenseType']&&(_0x7b8104=_0x15a335('EvaluationLimit')),await _0x1dfd65()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1fe64e(){const _0x53af0d=['evaluation','trial']['includes'](_0x4830da['licenseType'])?_0x28b24b/0x3e8:0xe10*_0x4e6e2c;return _0x4830da['exp']<_0x53af0d;}function _0x5d7ddd(){const _0x4a4e73=_0x4830da['features'];return!!_0x4a4e73&&(!!_0x4a4e73['includes']('*')||(!!_0x4a4e73['includes']('DO')||(!!_0x4a4e73['includes']('PP')||!(!_0x4a4e73['includes']('TRILIUM')||!_0x565f15()))));}function _0x21601e(){const _0x44fcd4=_0x4830da['licensedHosts'];if(!_0x44fcd4||0x0==_0x44fcd4['length'])return!0x0;const {hostname:_0x298f53}=new URL(window['location']['href']);if(_0x44fcd4['includes'](_0x298f53))return!0x0;const _0x116f2b=_0x298f53['split']('.');return _0x44fcd4['filter'](_0x399a30=>_0x399a30['includes']('*'))['map'](_0xb40e3c=>_0xb40e3c['split']('.'))['filter'](_0xd0c3d0=>_0xd0c3d0['length']<=_0x116f2b['length'])['map'](_0x1f91a3=>Array(_0x116f2b['length']-_0x1f91a3['length'])['fill']('*'===_0x1f91a3[0x0]?'*':'')['concat'](_0x1f91a3))['some'](_0x19e20c=>_0x116f2b['every']((_0x1f7ce4,_0x2dedd5)=>_0x19e20c[_0x2dedd5]===_0x1f7ce4||'*'===_0x19e20c[_0x2dedd5]));}function _0x1dfd65(){return _0x7b8104&&_0x278768?new window['Promise']((_0x1482a5,_0x501590)=>{_0x7b8104['then'](_0x1482a5,_0x501590),_0x278768['then'](_0x2acb67=>{'Valid'!=_0x2acb67&&_0x1482a5(_0x2acb67);},_0x501590);}):_0x7b8104||_0x278768||'Valid';}}function _0x64e941(_0x186dd4,_0x169154){return new window['Promise'](_0x48d0fb=>{if(_0x4c7ac8())return _0x48d0fb('Valid');_0x4a062f(),_0x9c5532['decorate']('_sendUsageRequest');let _0x54eaf1=!0x1;const _0x3873f0=_0x1c535f();function _0x53bf5f(_0x38c088){return!!_0x38c088&&('object'==typeof _0x38c088||'function'==typeof _0x38c088)&&'function'==typeof _0x38c088['then']&&'function'==typeof _0x38c088['catch'];}function _0x1f0952(_0x5dd6b1){_0x4f6b6b(_0x5dd6b1)['then'](_0x22c558=>_0x22c558&&'ok'==_0x22c558['status']?_0x21086c(_0x4af66e(_0x3873f0+_0x169154))!=_0x22c558['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x16bf60=>(_0x5c1b83(),_0x16bf60),()=>{const _0x4e7fe5=_0x2ec05d();return null==_0x4e7fe5?(_0x5c1b83(),'Valid'):_0x28b24b-_0x4e7fe5>0x240c8400?'UsageLimit':'Valid';})['then'](_0x48d0fb)['catch'](()=>{_0x48d0fb('UsageLimit');});const _0x520573=0x36ee80;function _0x5c1b83(){const _0x4d155d='llct-'+_0x21086c(_0x4af66e(_0x186dd4)),_0x338229=_0x15d9c5(_0x21086c(window['Math']['ceil'](_0x28b24b/_0x520573)));window['localStorage']['setItem'](_0x4d155d,_0x338229);}function _0x2ec05d(){const _0x42cb34='llct-'+_0x21086c(_0x4af66e(_0x186dd4)),_0x272076=window['localStorage']['getItem'](_0x42cb34);return _0x272076?window['parseInt'](_0x15d9c5(_0x272076),0x10)*_0x520573:null;}function _0x4f6b6b(_0x10e8f3){return new window['Promise']((_0x53a242,_0x3664b9)=>{_0x10e8f3['then'](_0x53a242,_0x3664b9),window['setTimeout'](_0x3664b9,0x1d4c0);});}}_0x9c5532['on']('_sendUsageRequest',(_0x4a864a,_0x433806)=>{if(_0x433806[0x0]!=_0x186dd4)return _0x48d0fb('UsageLimit');_0x433806[0x1]={..._0x433806[0x1],'requestId':_0x3873f0};},{'priority':'high'}),_0x9c5532['on']('_sendUsageRequest',_0x3103d0=>{_0x53bf5f(_0x3103d0['return'])&&(_0x54eaf1=!0x0,_0x1f0952(_0x3103d0['return']));},{'priority':'low'}),_0x139a75['then'](()=>{_0x54eaf1||_0x48d0fb('UsageLimit');});});function _0x4c7ac8(){return'auto'==_0x9c5532['editing']['view']['_overlayModeHint'];}function _0x4a062f(){_0x9c5532['editing']['view']['_overlayModeHint']='auto';}}function _0x15a335(_0x12f0fc){const _0x130ce2=[new window['Promise'](_0x4e4873=>setTimeout(_0x4e4873,0x93ecc)),_0x139a75['then'](()=>new window['Promise'](_0x32ec10=>{let _0x1127d3=0x0;_0x9c5532['model']['on']('applyOperation',(_0x4195dc,_0x88cfd8)=>{_0x88cfd8[0x0]['isDocumentOperation']&&_0x1127d3++,0x5e8==_0x1127d3&&(_0x32ec10(),_0x4195dc['off']());});}))];return window['Promise']['race'](_0x130ce2)['then'](()=>_0x12f0fc);}async function _0x2b69c9(){await _0x139a75,_0x9c5532['model']['change']=_0x15c5c2,_0x9c5532['model']['enqueueChange']=_0x15c5c2,_0x9c5532['enableReadOnlyMode']('model');}function _0x565f15(){return window['glob']&&window['glob']['triliumVersion'];}function _0x4c8b8e(_0x5b238d){const _0x493e85=_0x1e22c6();_0x9c5532[_0x493e85]='documentOutlineLicenseKey'+_0x5b238d,'Valid'!=_0x5b238d&&_0x2b69c9();}function _0x1e22c6(){const _0x679ce4=window['String'](window['performance']['now']())['replace']('.','');let _0x34987a='a';for(let _0x8db829=0x0;_0x8db829<_0x679ce4['length'];_0x8db829+=0x2){let _0x1ff633=window['parseInt'](_0x679ce4['substring'](_0x8db829,_0x8db829+0x2));_0x1ff633>=0x3e&&(_0x1ff633-=0x3e),_0x34987a+=_0x59a236[_0x1ff633];}return _0x34987a;}function _0x4b8dbb(){const _0x2a7ccd=_0x4a6b1e['split']('.');if(0x3!=_0x2a7ccd['length'])return null;return _0x5b09c1(_0x2a7ccd[0x1]);function _0x5b09c1(_0x4927c0){const _0x19ca82=_0x3ed057(_0x4927c0);return _0x19ca82&&_0x1ad1f6()?_0x19ca82:null;function _0x1ad1f6(){const _0x12ca29=_0x19ca82['jti'],_0x568667=window['parseInt'](_0x12ca29['substring'](_0x12ca29['length']-0x8),0x10),_0x1288a7={..._0x19ca82,'jti':_0x12ca29['substring'](0x0,_0x12ca29['length']-0x8)};return delete _0x1288a7['vc'],_0x4af66e(_0x1288a7)==_0x568667;}}}async function _0x2dbdba(){let _0x5dfe77=!0x0;try{const [_0x33797e,_0x9242be,_0x398685]=_0x4a6b1e['split']('.');return _0x46ce17(_0x33797e),await _0x29099b(_0x33797e,_0x9242be,_0x398685),_0x5dfe77;}catch{return!0x1;}function _0x46ce17(_0x356bc4){const _0xfb80c4=_0x3ed057(_0x356bc4);_0xfb80c4&&'ES256'==_0xfb80c4['alg']||(_0x5dfe77=!0x1);}async function _0x29099b(_0x4d2f50,_0x397d52,_0x4771fd){const _0xe1879=window['Uint8Array']['from'](_0x2af3b9(_0x4771fd),_0x440144=>_0x440144['charCodeAt'](0x0)),_0x24f0be=new window['TextEncoder']()['encode'](_0x4d2f50+'.'+_0x397d52),_0x5178b6=window['crypto']['subtle'];if(!_0x5178b6)return;const _0x2f06e0=await _0x5178b6['importKey']('jwk',_0x426a55,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5178b6['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2f06e0,_0xe1879,_0x24f0be)||(_0x5dfe77=!0x1);}}function _0x3ed057(_0x5ee585){return _0x5ee585['startsWith']('ey')?JSON['parse'](_0x2af3b9(_0x5ee585)):null;}function _0x2af3b9(_0x1c2f6e){return window['atob'](_0x1c2f6e['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4af66e(_0x3fcafa){let _0x190a1e=0x1505;function _0x26b99e(_0x362fba){for(let _0x17fb8f=0x0;_0x17fb8f<_0x362fba['length'];_0x17fb8f++){const _0x424e38=_0x362fba['charCodeAt'](_0x17fb8f);_0x190a1e=(_0x190a1e<<0x5)+_0x190a1e+_0x424e38,_0x190a1e&=_0x190a1e;}}function _0x6d74e3(_0x168947){Array['isArray'](_0x168947)?_0x168947['forEach'](_0x6d74e3):_0x168947&&'object'==typeof _0x168947?Object['entries'](_0x168947)['sort']()['forEach'](([_0xad97b5,_0x25aecd])=>{_0x26b99e(_0xad97b5),_0x6d74e3(_0x25aecd);}):_0x26b99e(window['String'](_0x168947));}return _0x6d74e3(_0x3fcafa),_0x190a1e>>>0x0;}function _0x21086c(_0x10b514){return _0x10b514['toString'](0x10)['padStart'](0x8,'0');}function _0x15d9c5(_0x1940aa){return _0x1940aa['split']('')['reverse']()['join']('');}function _0x15c5c2(){}_0x4c8b8e(await _0x5479b8());}(this);}['destroy'](){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}['_handleOutlineChange'](_0xf1102a,{outlineDefinitions:_0x3544ae,outlineChanges:_0x4322b5}){this['_currentOutlineDefinitions']=_0x3544ae,this['view']['sync'](_0x4322b5);}['_setActiveViewItem'](_0x5f33aa){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0x5f33aa]&&(this['view']['activeItemIndex']=_0x5f33aa);}['_handleItemSelected'](_0x131209){const _0x435339=this['_currentOutlineDefinitions'][_0x131209]['modelElement'];this['editor']['model']['change'](_0x636b51=>{_0x636b51['setSelection'](_0x435339,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x131209);}['_updateActiveDefinitionOnViewportChange'](){const _0x302bd5=this['editor'];let _0x539ccb;for(const _0xb1c376 of _0x302bd5['model']['document']['getRootNames']()){const _0x2e583e=_0x302bd5['editing']['view']['getDomRoot'](_0xb1c376),_0x54386e=_0x2e583e&&new _0x4de28e(_0x2e583e)['getVisible']();if(_0x54386e){const _0xdb0c5b=new _0x4de28e(_0x587805['window'])['getIntersection'](_0x54386e);_0xdb0c5b&&(_0x539ccb=_0xdb0c5b['top']+0.25*_0xdb0c5b['height']);}}if(void 0x0===_0x539ccb)return;const _0x1e902d=k(_0x302bd5['editing'],this['_currentOutlineDefinitions'],_0x539ccb);_0x1e902d?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0x1e902d)):this['_setActiveViewItem'](-0x1);}};function k(_0x4fe048,_0xb1bc73,_0x340cbe,_0x22fad5=0x0,_0x2813e5=_0xb1bc73['length']-0x1){const _0x2e4b0e=Math['floor'](_0x22fad5+(_0x2813e5-_0x22fad5)/0x2);if(_0x2813e5>=_0x22fad5){const _0x9038bb=_0xb1bc73[_0x2e4b0e],_0x4bfe0d=_0x4fe048['mapper']['toViewElement'](_0x9038bb['modelElement']);return _0x4bfe0d?new _0x4de28e(_0x4fe048['view']['domConverter']['mapViewToDom'](_0x4bfe0d))['bottom']>_0x340cbe?k(_0x4fe048,_0xb1bc73,_0x340cbe,_0x22fad5,_0x2e4b0e-0x1):k(_0x4fe048,_0xb1bc73,_0x340cbe,_0x2e4b0e+0x1,_0x2813e5):null;}return _0x2e4b0e<0x0?null:_0xb1bc73[_0x2e4b0e];}var E=class extends _0x548b1f{['licenseKey'];['_licenseKeyCheckInterval'];static get['requires'](){return[I,x];}static get['pluginName'](){return'DocumentOutline';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3c6189=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x15e8cd;for(const _0x322ce3 in _0x3c6189){const _0x8b7e99=_0x322ce3,_0x5f25f2=_0x3c6189[_0x8b7e99];if('documentOutlineLicenseKeyValid'==_0x5f25f2||'documentOutlineLicenseKeyInvalid'==_0x5f25f2||'documentOutlineLicenseKeyExpired'==_0x5f25f2||'documentOutlineLicenseKeyDomainLimit'==_0x5f25f2||'documentOutlineLicenseKeyNotAllowed'==_0x5f25f2||'documentOutlineLicenseKeyEvaluationLimit'==_0x5f25f2||'documentOutlineLicenseKeyUsageLimit'==_0x5f25f2){delete _0x3c6189[_0x8b7e99],_0x15e8cd=_0x5f25f2,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0x15e8cd&&_0x3c6189['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0x15e8cd&&_0x3c6189['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0x15e8cd&&_0x3c6189['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0x15e8cd&&_0x3c6189['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0x15e8cd&&_0x3c6189['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0x15e8cd&&_0x3c6189['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},K=class extends _0x3335d0{['execute'](){this['editor']['model']['change'](_0x4db49b=>{this['editor']['model']['insertObject'](_0x4db49b['createElement']('tableOfContents'));});}['refresh'](){const _0x2f6787=this['editor']['model'],_0x27310d=_0x2f6787['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0x27310d&&_0x2f6787['schema']['findAllowedParent'](_0x27310d,'tableOfContents'));}},A=class extends _0x548b1f{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){const _0x2f0a63=this['editor'];if(_0x2f0a63['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0x17afd3,modelNames:_0x1e9733}=function(_0x942c90){const _0x28319f=new Set(),_0x37d58e=new Set();if(!_0x942c90)return{'viewNames':_0x28319f,'modelNames':_0x37d58e};for(const _0x57e682 of _0x942c90){if('paragraph'===_0x57e682['model'])continue;const _0x5c1fb6='string'==typeof _0x57e682['view']?_0x57e682['view']:_0x57e682['view']['name'];_0x28319f['add'](_0x5c1fb6),_0x37d58e['add'](_0x57e682['model']);}return _0x28319f['has']('h1')||(_0x28319f['add']('h1'),_0x37d58e['add']('heading1')),{'viewNames':_0x28319f,'modelNames':_0x37d58e};}(this['editor']['config']['get']('heading.options'));for(const _0x366736 of _0x17afd3)this['_customUpcastHeadingsConversion'](_0x366736);for(const _0x46d452 of _0x1e9733)this['_customDataDowncastHeadingsConversion'](_0x46d452),_0x2f0a63['model']['schema']['isRegistered'](_0x46d452)&&_0x2f0a63['model']['schema']['extend'](_0x46d452,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x1e9733);}['_customUpcastHeadingsConversion'](_0x3a38c3){this['editor']['conversion']['for']('upcast')['add'](_0x45e469=>_0x45e469['on']('element:'+_0x3a38c3,(_0x13dd43,_0x5b185a,_0x1b8883)=>{const {consumable:_0x59d1a3,writer:_0x453174}=_0x1b8883,_0x5e4af8=_0x5b185a['viewItem']['getAttribute']('id'),_0x2142b9=_0x5b185a['modelRange']?.['getContainedElement']();if(_0x2142b9)return _0x5e4af8&&_0x5e4af8['length']||_0x2142b9['hasAttribute']('headingId')?void(_0x59d1a3['consume'](_0x5b185a['viewItem'],{'attributes':['id']})&&_0x453174['setAttribute']('headingId',_0x5e4af8,_0x2142b9)):(_0x59d1a3['consume'](_0x5b185a['viewItem'],{'attributes':['id']}),void _0x453174['setAttribute']('headingId',_0x1c535f(),_0x2142b9));},{'priority':_0x5e30bf['get']('low')+0.5}));}['_customDataDowncastHeadingsConversion'](_0x4f01f6){this['editor']['conversion']['for']('downcast')['add'](_0x52c0b4=>_0x52c0b4['on']('attribute:headingId:'+_0x4f01f6,(_0x506390,_0x520959,_0x2465dc)=>{if(!_0x2465dc['consumable']['consume'](_0x520959['item'],_0x506390['name']))return;const _0x31e530=_0x520959['item']['getAttribute']('headingId'),_0x304d1d=_0x2465dc['mapper']['toViewElement'](_0x520959['item']);_0x2465dc['writer']['setAttribute']('id',_0x31e530,_0x304d1d);}));}['_registerHeadingIdAttributePostfixer'](_0xf0d51){const _0x56ca84=this['editor'],_0x1ddfb7=new Set(),_0x1a4157=new Set();function _0x475112(_0x548ee0,_0x51cdcd){const _0x5ed70e=_0x1c535f();return _0x1a4157['add'](_0x5ed70e),_0x548ee0['setAttribute']('headingId',_0x5ed70e,_0x51cdcd),_0x5ed70e;}function _0x10f1cd(_0x34cb71,_0x39108b){_0x34cb71['removeAttribute']('headingId',_0x39108b);}_0x56ca84['model']['document']['registerPostFixer'](_0x350d9c=>{const _0xba626d=_0x56ca84['model']['document']['differ']['getChanges']();let _0xbd36cd=!0x1;for(const _0x3af1ae of _0xba626d)if('insert'==_0x3af1ae['type']&&_0x3af1ae['name']){if(_0xf0d51['has'](_0x3af1ae['name'])){const _0x1fa495=_0x3af1ae['attributes']['get']('headingId');'string'==typeof _0x1fa495?_0x1ddfb7['has'](_0x1fa495)?(_0x475112(_0x350d9c,_0x3af1ae['position']['nodeAfter']),_0xbd36cd=!0x0):_0x1a4157['add'](_0x1fa495):(_0x475112(_0x350d9c,_0x3af1ae['position']['nodeAfter']),_0xbd36cd=!0x0);}else'string'==typeof _0x3af1ae['attributes']['get']('headingId')&&(_0x10f1cd(_0x350d9c,_0x3af1ae['position']['nodeAfter']),_0xbd36cd=!0x0);}else{if('remove'==_0x3af1ae['type']){const _0x530dc8=_0x3af1ae['attributes']['get']('headingId');'string'==typeof _0x530dc8&&_0x1ddfb7['delete'](_0x530dc8);}}return _0xbd36cd;}),_0x56ca84['model']['document']['on']('change',()=>{_0x1a4157['forEach'](_0x5d4d9f=>_0x1ddfb7['add'](_0x5d4d9f)),_0x1a4157['clear']();});}},N=class extends _0x548b1f{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3092e2,I,A];}['_currentOutlineDefinitions'];['_tableOfContentsElements'];['_headingIdModelAttributeName'];constructor(_0x2d1121){super(_0x2d1121),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}['init'](){const _0x158df4=this['editor'],_0x5eef2b=_0x158df4['editing']['view']['document'];_0x158df4['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0x158df4['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x5eef2b,'click',(_0x572de1,_0x442e32)=>{if(!_0x442e32['target'])return;const _0x40502b=_0x442e32['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0x40502b)&&(_0x442e32['domEvent']['preventDefault'](),_0x572de1['stop'](),this['_handleScrollToHeading'](_0x40502b));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0x158df4['commands']['add']('insertTableOfContents',new K(_0x158df4));const _0xf289d7=_0x158df4['config']['get']('tableOfContents.headings');_0xf289d7&&_0xf289d7['length']?this['listenTo'](_0x158df4['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0xf289d7),this['_updateTableOfContentsElements']();}):_0x158df4['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0x232550,_0x47710e)=>{this['_currentOutlineDefinitions']=_0x47710e['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0x158df4['model']['document'],'change',()=>{this['_trackNewToCElements']();});}['afterInit'](){!async function(_0x5f2b4c){const _0x259847='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x356aa3=0x78df8,_0x11c3d9=window['Date']['now'](),_0x37ec31=_0x5f2b4c['editor'],_0xa788cd=new window['Promise'](_0x34edee=>{_0x37ec31['once']('ready',_0x34edee);}),_0x558fa0={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x29e881=_0x37ec31['config']['get']('licenseKey');async function _0x3ce014(){let _0x3941c6,_0x56dff0=null,_0x6195aa=null;try{return'GPL'==_0x29e881?'NotAllowed':(_0x3941c6=_0x45862f(),_0x3941c6?(_0x3941c6['usageEndpoint']&&(_0x6195aa=_0x578606(_0x3941c6['usageEndpoint'],_0x3941c6['jti'])),await _0x18b281()?_0x4d3cac()?_0x19369f()?'Expired':_0x444f23()?('evaluation'==_0x3941c6['licenseType']&&(_0x56dff0=_0x2976c5('EvaluationLimit')),await _0x585287()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x19369f(){const _0x30a20b=['evaluation','trial']['includes'](_0x3941c6['licenseType'])?_0x11c3d9/0x3e8:0xe10*_0x356aa3;return _0x3941c6['exp']<_0x30a20b;}function _0x4d3cac(){const _0x28022b=_0x3941c6['features'];return!!_0x28022b&&(!!_0x28022b['includes']('*')||(!!_0x28022b['includes']('TOC')||(!!_0x28022b['includes']('PP')||!(!_0x28022b['includes']('TRILIUM')||!_0x224348()))));}function _0x444f23(){const _0xe6bea5=_0x3941c6['licensedHosts'];if(!_0xe6bea5||0x0==_0xe6bea5['length'])return!0x0;const {hostname:_0x262ee4}=new URL(window['location']['href']);if(_0xe6bea5['includes'](_0x262ee4))return!0x0;const _0x458bed=_0x262ee4['split']('.');return _0xe6bea5['filter'](_0x1d36b5=>_0x1d36b5['includes']('*'))['map'](_0x277cdb=>_0x277cdb['split']('.'))['filter'](_0x4ac895=>_0x4ac895['length']<=_0x458bed['length'])['map'](_0x44f8f2=>Array(_0x458bed['length']-_0x44f8f2['length'])['fill']('*'===_0x44f8f2[0x0]?'*':'')['concat'](_0x44f8f2))['some'](_0x2d55d6=>_0x458bed['every']((_0x489f01,_0x4f0fad)=>_0x2d55d6[_0x4f0fad]===_0x489f01||'*'===_0x2d55d6[_0x4f0fad]));}function _0x585287(){return _0x56dff0&&_0x6195aa?new window['Promise']((_0x48c5f6,_0x48c40f)=>{_0x56dff0['then'](_0x48c5f6,_0x48c40f),_0x6195aa['then'](_0x55d01b=>{'Valid'!=_0x55d01b&&_0x48c5f6(_0x55d01b);},_0x48c40f);}):_0x56dff0||_0x6195aa||'Valid';}}function _0x578606(_0x233146,_0xfc425f){return new window['Promise'](_0x240472=>{if(_0x2a4008())return _0x240472('Valid');_0x318b7c(),_0x37ec31['decorate']('_sendUsageRequest');let _0x54e0de=!0x1;const _0x143f26=_0x1c535f();function _0x3bf56a(_0x475d7a){return!!_0x475d7a&&('object'==typeof _0x475d7a||'function'==typeof _0x475d7a)&&'function'==typeof _0x475d7a['then']&&'function'==typeof _0x475d7a['catch'];}function _0x4cb00d(_0x130994){_0x32e748(_0x130994)['then'](_0x472658=>_0x472658&&'ok'==_0x472658['status']?_0x5e0b56(_0x182f45(_0x143f26+_0xfc425f))!=_0x472658['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x13d74c=>(_0x4058b4(),_0x13d74c),()=>{const _0x2fb690=_0x130d4f();return null==_0x2fb690?(_0x4058b4(),'Valid'):_0x11c3d9-_0x2fb690>0x240c8400?'UsageLimit':'Valid';})['then'](_0x240472)['catch'](()=>{_0x240472('UsageLimit');});const _0x4f86c6=0x36ee80;function _0x4058b4(){const _0x1cb729='llct-'+_0x5e0b56(_0x182f45(_0x233146)),_0x3ffd49=_0x7ffc39(_0x5e0b56(window['Math']['ceil'](_0x11c3d9/_0x4f86c6)));window['localStorage']['setItem'](_0x1cb729,_0x3ffd49);}function _0x130d4f(){const _0x532998='llct-'+_0x5e0b56(_0x182f45(_0x233146)),_0x80ef1=window['localStorage']['getItem'](_0x532998);return _0x80ef1?window['parseInt'](_0x7ffc39(_0x80ef1),0x10)*_0x4f86c6:null;}function _0x32e748(_0x1ae736){return new window['Promise']((_0x108958,_0x432c94)=>{_0x1ae736['then'](_0x108958,_0x432c94),window['setTimeout'](_0x432c94,0x1d4c0);});}}_0x37ec31['on']('_sendUsageRequest',(_0x4f0baa,_0x2a1ad4)=>{if(_0x2a1ad4[0x0]!=_0x233146)return _0x240472('UsageLimit');_0x2a1ad4[0x1]={..._0x2a1ad4[0x1],'requestId':_0x143f26};},{'priority':'high'}),_0x37ec31['on']('_sendUsageRequest',_0x9784f4=>{_0x3bf56a(_0x9784f4['return'])&&(_0x54e0de=!0x0,_0x4cb00d(_0x9784f4['return']));},{'priority':'low'}),_0xa788cd['then'](()=>{_0x54e0de||_0x240472('UsageLimit');});});function _0x2a4008(){return'auto'==_0x37ec31['editing']['view']['_overlayModeHint'];}function _0x318b7c(){_0x37ec31['editing']['view']['_overlayModeHint']='auto';}}function _0x2976c5(_0x1ac009){const _0x1003eb=[new window['Promise'](_0x35f870=>setTimeout(_0x35f870,0x93ecc)),_0xa788cd['then'](()=>new window['Promise'](_0x4aa944=>{let _0x479a66=0x0;_0x37ec31['model']['on']('applyOperation',(_0x3b5571,_0x48be2a)=>{_0x48be2a[0x0]['isDocumentOperation']&&_0x479a66++,0x5e8==_0x479a66&&(_0x4aa944(),_0x3b5571['off']());});}))];return window['Promise']['race'](_0x1003eb)['then'](()=>_0x1ac009);}async function _0x4263a7(){await _0xa788cd,_0x37ec31['model']['change']=_0x1d5eac,_0x37ec31['model']['enqueueChange']=_0x1d5eac,_0x37ec31['enableReadOnlyMode']('model');}function _0x224348(){return window['glob']&&window['glob']['triliumVersion'];}function _0x5b4906(_0x2d0708){const _0x4d867b=_0x37777b();_0x37ec31[_0x4d867b]='tableOfContentsLicenseKey'+_0x2d0708,'Valid'!=_0x2d0708&&_0x4263a7();}function _0x37777b(){const _0x5bad0f=window['String'](window['performance']['now']())['replace']('.','');let _0x35c0dd='m';for(let _0xdd059f=0x0;_0xdd059f<_0x5bad0f['length'];_0xdd059f+=0x2){let _0x2823b4=window['parseInt'](_0x5bad0f['substring'](_0xdd059f,_0xdd059f+0x2));_0x2823b4>=0x3e&&(_0x2823b4-=0x3e),_0x35c0dd+=_0x259847[_0x2823b4];}return _0x35c0dd;}function _0x45862f(){const _0x48a824=_0x29e881['split']('.');if(0x3!=_0x48a824['length'])return null;return _0x556cb0(_0x48a824[0x1]);function _0x556cb0(_0x3a16e5){const _0x1eaa54=_0x3690e6(_0x3a16e5);return _0x1eaa54&&_0x4a0178()?_0x1eaa54:null;function _0x4a0178(){const _0x4d53a2=_0x1eaa54['jti'],_0x234654=window['parseInt'](_0x4d53a2['substring'](_0x4d53a2['length']-0x8),0x10),_0x2d76e6={..._0x1eaa54,'jti':_0x4d53a2['substring'](0x0,_0x4d53a2['length']-0x8)};return delete _0x2d76e6['vc'],_0x182f45(_0x2d76e6)==_0x234654;}}}async function _0x18b281(){let _0x2b4660=!0x0;try{const [_0x3b0d00,_0x35f8f2,_0x476902]=_0x29e881['split']('.');return _0x4341d6(_0x3b0d00),await _0xf34652(_0x3b0d00,_0x35f8f2,_0x476902),_0x2b4660;}catch{return!0x1;}function _0x4341d6(_0x16b091){const _0x54b35c=_0x3690e6(_0x16b091);_0x54b35c&&'ES256'==_0x54b35c['alg']||(_0x2b4660=!0x1);}async function _0xf34652(_0x96e5ca,_0x20eed5,_0x1fe302){const _0x58767e=window['Uint8Array']['from'](_0x4fe51e(_0x1fe302),_0x10f19c=>_0x10f19c['charCodeAt'](0x0)),_0x59f370=new window['TextEncoder']()['encode'](_0x96e5ca+'.'+_0x20eed5),_0x5c31bc=window['crypto']['subtle'];if(!_0x5c31bc)return;const _0x19777c=await _0x5c31bc['importKey']('jwk',_0x558fa0,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x5c31bc['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x19777c,_0x58767e,_0x59f370)||(_0x2b4660=!0x1);}}function _0x3690e6(_0x3126c9){return _0x3126c9['startsWith']('ey')?JSON['parse'](_0x4fe51e(_0x3126c9)):null;}function _0x4fe51e(_0x2f1e15){return window['atob'](_0x2f1e15['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x182f45(_0x3efb3e){let _0x9bde45=0x1505;function _0x8d3c27(_0xde8135){for(let _0x5376f2=0x0;_0x5376f2<_0xde8135['length'];_0x5376f2++){const _0x128f4e=_0xde8135['charCodeAt'](_0x5376f2);_0x9bde45=(_0x9bde45<<0x5)+_0x9bde45+_0x128f4e,_0x9bde45&=_0x9bde45;}}function _0x29197c(_0x1878a2){Array['isArray'](_0x1878a2)?_0x1878a2['forEach'](_0x29197c):_0x1878a2&&'object'==typeof _0x1878a2?Object['entries'](_0x1878a2)['sort']()['forEach'](([_0x5a1d9c,_0x42526a])=>{_0x8d3c27(_0x5a1d9c),_0x29197c(_0x42526a);}):_0x8d3c27(window['String'](_0x1878a2));}return _0x29197c(_0x3efb3e),_0x9bde45>>>0x0;}function _0x5e0b56(_0x34524a){return _0x34524a['toString'](0x10)['padStart'](0x8,'0');}function _0x7ffc39(_0x3935cf){return _0x3935cf['split']('')['reverse']()['join']('');}function _0x1d5eac(){}_0x5b4906(await _0x3ce014());}(this);}['_updateTableOfContentsElements'](){this['_tableOfContentsElements']['forEach'](_0x11417f=>{'$graveyard'!==_0x11417f['rootName']&&this['editor']['editing']['reconvertItem'](_0x11417f);});}['_trackNewToCElements'](){for(const _0x55fd7f of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x55fd7f['type']||'tableOfContents'!==_0x55fd7f['name'])return;this['_tableOfContentsElements']['add'](_0x55fd7f['position']['nodeAfter']);}}['_getOutlineDefinitions'](_0x7e9da0){const _0x5137f0=this['editor'],_0x57eef6=[];for(const _0x339b6b of _0x5137f0['model']['document']['getRootNames']())_0xf1018(_0x5137f0['model']['document']['getRoot'](_0x339b6b));function _0xf1018(_0x5dd156){for(const _0x5267e1 of _0x5dd156['getChildren']())_0x5267e1['is']('element')&&(_0x7e9da0['includes'](_0x5267e1['name'])&&_0x57eef6['push']({'level':_0x7e9da0['indexOf'](_0x5267e1['name'])+0x1,'text':b(_0x5267e1),'modelElement':_0x5267e1}),_0xf1018(_0x5267e1));}return _0x57eef6;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}['_defineConverters'](){const _0x2290f5=this['editor']['conversion'];_0x2290f5['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x2290f5['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x1ddeb9,{writer:_0x3839ae})=>this['_createTableOfContents'](_0x3839ae,!0x0)}),_0x2290f5['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x5e4c87,{writer:_0x332f4c})=>(this['_tableOfContentsElements']['add'](_0x5e4c87),_0x1b7424(this['_createTableOfContents'](_0x332f4c),_0x332f4c,{'label':L(this['editor']['locale'],'Table\x20of\x20contents')}))}),this['editor']['data']['registerRawContentMatcher']({'name':'div','classes':'table-of-contents'}),this['editor']['editing']['mapper']['on']('viewToModelPosition',this['_redirectMapper'](),{'priority':'high'});}['_createTableOfContents'](_0x4d8f53,_0x45da8b=!0x1){const {locale:_0x47ab3b}=this['editor'],_0x56c958=_0x4d8f53['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0x45da8b&&{'data-table-of-contents-label':L(_0x47ab3b,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0x45da8b&&_0x4d8f53['insert'](_0x4d8f53['createPositionAt'](_0x56c958,'end'),_0x4d8f53['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x4d8f53['createText'](L(_0x47ab3b,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0x3aed99=_0x45da8b?'':'['+L(_0x47ab3b,'Empty\x20heading')+']';let _0x5cf335=_0x56c958;return this['_currentOutlineDefinitions']['forEach']((_0x4846f2,_0x37351b,_0xa96352)=>{const _0x22ceb5=this['editor']['model']['hasContent'](_0x4846f2['modelElement'],{'ignoreWhitespaces':!0x0}),_0x15e85d=_0x22ceb5?_0x4846f2['text']:_0x3aed99,_0x234161=_0x4846f2['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0x850550=_0x4d8f53['createContainerElement']('a',{'href':'#'+_0x234161,...!_0x45da8b&&{'tabindex':'-1'}},[_0x4d8f53['createText'](_0x15e85d)]),_0x472c50=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x4d8f53['setCustomProperty']('tableOfContentsHeadingIndex',_0x37351b,_0x850550);const _0x3b67cc=_0x4d8f53['createContainerElement']('li',null,[_0x22ceb5||!_0x45da8b&&_0x472c50?_0x850550:_0x4d8f53['createText']('')]),_0x10362e=_0x37351b?_0xa96352[_0x37351b-0x1]['level']:0x0,_0x29b473=Math['abs'](_0x4846f2['level']-_0x10362e);if(_0x4846f2['level']>_0x10362e){const _0x337949=P(_0x3b67cc,_0x29b473,_0x4d8f53);_0x4d8f53['insert'](_0x4d8f53['createPositionAt'](_0x5cf335,'end'),_0x337949);}else{const _0x47e183=function(_0x228edf,_0x2414e7){return _0x228edf['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0x25eb52=>_0x25eb52['is']('element','ol'))[_0x2414e7];}(_0x5cf335,_0x29b473);_0x4d8f53['insert'](_0x4d8f53['createPositionAt'](_0x47e183,'end'),_0x3b67cc);}_0x5cf335=_0x3b67cc;}),_0x56c958;}['_handleScrollToHeading'](_0x2139f1){const _0xaf8e76=this['_currentOutlineDefinitions'][_0x2139f1]['modelElement'];this['editor']['model']['change'](_0x5afce2=>{_0x5afce2['setSelection'](_0xaf8e76,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}['_redirectMapper'](){return(_0x644cc0,_0x50c0d9)=>{const _0x2376f6=_0x50c0d9['mapper'],_0x3b3b74=_0x2376f6['findMappedViewAncestor'](_0x50c0d9['viewPosition']),_0x1965b6=_0x2376f6['toModelElement'](_0x3b3b74);_0x1965b6['is']('element','tableOfContents')&&(_0x50c0d9['modelPosition']=this['editor']['model']['createPositionAt'](_0x1965b6,0x0),_0x644cc0['stop']());};}};function P(_0x384122,_0x24fcb4,_0x3f0686){return 0x1===_0x24fcb4?_0x3f0686['createContainerElement']('ol',null,[_0x384122]):_0x3f0686['createContainerElement']('ol',null,[_0x3f0686['createContainerElement']('li',null,[P(_0x384122,_0x24fcb4-0x1,_0x3f0686)])]);}var U=class extends _0x548b1f{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x4d64ab=this['editor'];_0x4d64ab['ui']['componentFactory']['add']('tableOfContents',()=>{const _0xb1cd15=this['_createButton'](_0x258ddc);return _0xb1cd15['tooltip']=!0x0,_0xb1cd15;}),_0x4d64ab['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0x1b5155)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x276c3b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x56daa7;for(const _0x3e453d in _0x276c3b){const _0x332d0e=_0x3e453d,_0x523b14=_0x276c3b[_0x332d0e];if('tableOfContentsLicenseKeyValid'==_0x523b14||'tableOfContentsLicenseKeyInvalid'==_0x523b14||'tableOfContentsLicenseKeyExpired'==_0x523b14||'tableOfContentsLicenseKeyDomainLimit'==_0x523b14||'tableOfContentsLicenseKeyNotAllowed'==_0x523b14||'tableOfContentsLicenseKeyEvaluationLimit'==_0x523b14||'tableOfContentsLicenseKeyUsageLimit'==_0x523b14){delete _0x276c3b[_0x332d0e],_0x56daa7=_0x523b14,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0x56daa7&&_0x276c3b['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0x56daa7&&_0x276c3b['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0x56daa7&&_0x276c3b['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0x56daa7&&_0x276c3b['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0x56daa7&&_0x276c3b['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0x56daa7&&_0x276c3b['_showLicenseError']('usageLimit');},0x3e8);}['_createButton'](_0x6f5ed8){const _0xa0f0e=this['editor'],_0x2687bf=_0xa0f0e['locale'],_0x1f40d8=_0xa0f0e['commands']['get']('insertTableOfContents'),_0x171189=new _0x6f5ed8(_0x2687bf);return _0x171189['set']({'label':L(_0x2687bf,'Table\x20of\x20contents'),'icon':_0x38c57b}),_0x171189['bind']('isEnabled')['to'](_0x1f40d8,'isEnabled'),this['listenTo'](_0x171189,'execute',()=>{_0xa0f0e['execute']('insertTableOfContents'),_0xa0f0e['editing']['view']['focus']();}),_0x171189;}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},D=class extends _0x548b1f{static get['requires'](){return[N,U];}static get['pluginName'](){return'TableOfContents';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{E as DocumentOutline,x as DocumentOutlineUI,I as DocumentOutlineUtils,A as HeadingId,D as TableOfContents,K as TableOfContentsCommand,N as TableOfContentsEditing,U as TableOfContentsUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-document-outline",
|
|
3
|
-
"version": "48.3.0-alpha.
|
|
3
|
+
"version": "48.3.0-alpha.1",
|
|
4
4
|
"description": "Document outline feature for CKEditor 5.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"./package.json": "./package.json"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ckeditor/ckeditor5-core": "48.3.0-alpha.
|
|
25
|
-
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.
|
|
26
|
-
"@ckeditor/ckeditor5-heading": "48.3.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-widget": "48.3.0-alpha.
|
|
24
|
+
"@ckeditor/ckeditor5-core": "48.3.0-alpha.1",
|
|
25
|
+
"@ckeditor/ckeditor5-engine": "48.3.0-alpha.1",
|
|
26
|
+
"@ckeditor/ckeditor5-heading": "48.3.0-alpha.1",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "48.3.0-alpha.1",
|
|
28
|
+
"@ckeditor/ckeditor5-ui": "48.3.0-alpha.1",
|
|
29
|
+
"@ckeditor/ckeditor5-utils": "48.3.0-alpha.1",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "48.3.0-alpha.1",
|
|
31
31
|
"es-toolkit": "1.45.1"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|