@ckeditor/ckeditor5-document-outline 49.0.0-alpha.3 → 49.0.0-alpha.5
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 _0x392b4a,Plugin as _0x4c8b3e}from'@ckeditor/ckeditor5-core';import{debounce as _0xed0d34,throttle as _0x2faa83}from'es-toolkit/compat';import{ModelText as _0x335900,ModelTreeWalker as _0x5af666}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0x4fae0f,Rect as _0x584338,diff as _0x46a626,diffToChanges as _0x397844,global as _0x289f00,listenToShadowRoots as _0x4030fe,priorities as _0x5bf6ba,scrollAncestorsToShowTarget as _0x4a2ede,uid as _0x2783d6}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x257805,MenuBarMenuListItemButtonView as _0x30c5c0,View as _0xe55380}from'@ckeditor/ckeditor5-ui';import{Widget as _0x1b094c,toWidget as _0x2cb5e5}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x2c6465}from'@ckeditor/ckeditor5-icons';function I(_0x2a2f01){let _0x4e39a6='';for(const _0xdb2aae of _0x2a2f01['getChildren']())_0xdb2aae instanceof _0x335900&&(_0x4e39a6+=_0xdb2aae['data']);return _0x4e39a6;}var L=class extends _0x4c8b3e{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];init(){const _0x49fc8e=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0x3d5be8=[];_0x49fc8e['model']['document']['on']('change',_0xed0d34(()=>{const _0x1a7a34=_0x3d5be8;_0x3d5be8=this['_getOutlineDefinitions']();const _0x58d416=_0x46a626(_0x1a7a34,_0x3d5be8,(_0x4fd234,_0x94893d)=>_0x4fd234['level']===_0x94893d['level']&&_0x4fd234['text']===_0x94893d['text']&&_0x4fd234['modelElement']===_0x94893d['modelElement']),_0x574e50=_0x397844(_0x58d416,_0x3d5be8),_0x4786c2=this['_getActiveHeading'](),_0x64082b=_0x3d5be8['findIndex'](_0x4fb9e6=>_0x4fb9e6['modelElement']===_0x4786c2);_0x574e50['length']&&this['fire']('change',{'outlineDefinitions':_0x3d5be8,'activeItemIndex':_0x64082b,'outlineChanges':_0x574e50}),this['fire']('activeItemIndex',{'index':_0x64082b});},0xfa,{'leading':!0x0,'trailing':!0x0}));}afterInit(){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}_getOutlineDefinitions(){const _0x378e9d=this['editor'],_0x57e7dd=[],_0x5c3803=this['_headingNames'];for(const _0x476308 of _0x378e9d['model']['document']['getRootNames']())_0x33c788(_0x378e9d['model']['document']['getRoot'](_0x476308));function _0x33c788(_0x460699){for(const _0x4c514c of _0x460699['getChildren']())_0x4c514c['is']('element')&&(_0x5c3803['includes'](_0x4c514c['name'])&&_0x57e7dd['push']({'level':_0x5c3803['indexOf'](_0x4c514c['name'])+0x1,'text':I(_0x4c514c),'modelElement':_0x4c514c}),_0x33c788(_0x4c514c));}return _0x57e7dd;}_getActiveHeading(){const _0x46712d=this['editor']['model']['document']['selection']['getFirstPosition'](),_0x20da31=new _0x5af666({'direction':'backward','startPosition':_0x46712d});for(const _0x4d6db4 of _0x20da31)if(_0x4d6db4['item']['is']('element')&&this['_headingNames']['includes'](_0x4d6db4['item']['name']))return _0x4d6db4['item'];}_getHeadingNames(){const _0x3aceee=this['editor']['config']['get']('documentOutline.headings');return _0x3aceee||function(_0x2d604a){const _0x501b98=_0x2d604a['config']['get']('heading.options');return _0x501b98?_0x501b98['reduce']((_0x513636,_0x553046)=>('paragraph'!==_0x553046['model']&&_0x513636['push'](_0x553046['model']),_0x513636),[]):_0x2d604a['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}_deriveHeadingElementsFromConversion(){const _0x9453cd=this['editor'],_0x149540=['h1','h2','h3','h4','h5','h6'],_0x48c6c0=[];for(const _0x8507c0 of _0x149540){const _0x5dee52=_0x9453cd['editing']['view']['domConverter']['domToView'](document['createElement'](_0x8507c0)),_0x448e5a=_0x9453cd['data']['toModel'](_0x5dee52)['getChild'](0x0);_0x448e5a?.['is']('element')&&_0x48c6c0['push'](_0x448e5a['name']);}this['_headingNames']=_0x48c6c0;}};function C(_0x144e33,_0xd41790){const t=_0x144e33['t'];switch(_0xd41790){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 _0xd41790;}}var _=class extends _0xe55380{constructor(_0x11ab29,_0x180de6=!0x1){super(_0x11ab29);const _0x46ac02=this['bindTemplate'],_0x31b5df=_0x180de6?'['+C(_0x11ab29,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x194b08=>!_0x194b08),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x46ac02['to']('level',_0x4e6405=>'ck-document-outline__item_level-'+_0x4e6405),_0x46ac02['if']('isActive','ck-document-outline__item_active'),_0x46ac02['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x46ac02['to']('text')},'children':[{'text':_0x46ac02['to']('text',_0x551b46=>_0x551b46||_0x31b5df)}],'on':{'click':_0x46ac02['to']('click')}});}},k=class extends _0xe55380{items;documentOutlineContainer;showEmptyHeadingText;constructor(_0x4f8113,_0xac4cbb=!0x1,_0x2e78f2){super(_0x4f8113),this['showEmptyHeadingText']=_0xac4cbb,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0x2e78f2,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x1be7df,_0x54e5f6,_0x5584d5,_0x30c66c)=>{this['_setActiveItem'](_0x30c66c,_0x5584d5);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x4f8113['contentLanguageDirection'],'data-document-outline-empty-placeholder':C(_0x4f8113,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x123024){_0x123024['forEach'](_0x32976c=>{'insert'==_0x32976c['type']?this['_insertItem'](_0x32976c['index'],..._0x32976c['values']):'delete'==_0x32976c['type']&&this['_deleteItem'](_0x32976c['index'],_0x32976c['howMany']);});}_setActiveItem(_0x11cc29,_0x21c555){if(-0x1!==_0x11cc29){const _0xa57cf7=this['items']['get'](_0x11cc29);_0xa57cf7&&(_0xa57cf7['isActive']=!0x1);}-0x1!==_0x21c555&&(this['items']['get'](_0x21c555)['isActive']=!0x0,this['_scrollToItem'](_0x21c555));}_insertItem(_0x6b2059,..._0xa53596){const _0x21f2c9=_0xa53596['map']((_0x913fe9,_0x254d3b)=>{const _0x380c12=new _(this['locale'],this['showEmptyHeadingText']);return _0x380c12['text']=_0x913fe9['text'],_0x380c12['level']=_0x913fe9['level'],_0x6b2059+_0x254d3b===this['activeItemIndex']&&(_0x380c12['isActive']=!0x0),_0x380c12;});this['items']['addMany'](_0x21f2c9,_0x6b2059);}_deleteItem(_0x3b295f,_0x4afb3d){do{this['items']['remove'](_0x3b295f);}while(--_0x4afb3d);}_handleItemClick(_0x7c3dda){const _0x1cd522=this['items']['getIndex'](_0x7c3dda['source']);this['fire']('itemSelected',_0x1cd522);}_scrollToItem(_0x2360e3){_0x4a2ede(this['items']['get'](_0x2360e3)['element'],0x14,this['documentOutlineContainer']);}destroy(){super['destroy'](),this['element']['remove']();}},x=class extends _0x4c8b3e{['view'];_currentOutlineDefinitions;_updateActiveDefinitionFromViewportThrottled;static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4fdeb6){super(_0x4fdeb6),this['view']=new k(_0x4fdeb6['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x2faa83(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}init(){const _0x507eef=this['editor'],_0x42d9c2=_0x507eef['plugins']['get']('DocumentOutlineUtils');let _0x209ab1=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x507eef['config']['get']('documentOutline.container'))throw new _0x4fae0f('document-outline-container-not-provided',{'editor':_0x507eef});_0x507eef['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0x42d9c2['on']('change',this['_handleOutlineChange']['bind'](this)),_0x42d9c2['on']('activeItemIndex',(_0x2aded7,{index:_0x48ddd4})=>this['_setActiveViewItem'](_0x48ddd4)),this['view']['on']('itemSelected',(_0x544152,_0x2364c6)=>{_0x209ab1=!0x0,this['_handleItemSelected'](_0x2364c6);});const _0x5bf29c=()=>{_0x209ab1?_0x209ab1=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();};this['view']['listenTo'](_0x289f00['document'],'scroll',_0x5bf29c,{'useCapture':!0x0}),_0x4030fe(_0x507eef['ui']['shadowRootRegistry'],{'emitter':this['view'],'event':'scroll','callback':_0x5bf29c,'listenerOptions':{'useCapture':!0x0}}),this['view']['listenTo'](_0x289f00['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}afterInit(){!async function(_0x52bf6e){const _0x3448f7='uizTdvyBIa4RKsnOYmEXGMfjehwJQqbPSCk7DtZgF58Lxl29Ho6cAUW1pV3Nr0',_0x48d2fe=0x79758,_0x5c3b63={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x5d9e51(_0x2b6834){const _0x40b1a6=new window['Promise'](_0x2998d9=>{_0x2b6834['once']('ready',_0x2998d9);}),_0x672b1e=window['Date']['now'](),_0x3d68d4=_0x2b6834['config']['get']('licenseKey');async function _0x22e2a6(){let _0x1807a7,_0x24a1c6=null,_0x1429cb=null;try{return'GPL'==_0x3d68d4?'NotAllowed':(_0x1807a7=_0x1cea89(),_0x1807a7?(_0x1807a7['usageEndpoint']&&(_0x1429cb=_0x59f31e(_0x1807a7['usageEndpoint'],_0x1807a7['jti'])),await _0x18e748()?_0x3fb760()?_0x42b50d()?'Expired':_0x4e79ca()?('evaluation'==_0x1807a7['licenseType']&&(_0x24a1c6=_0x1398e0('EvaluationLimit')),await _0x1ee588()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x42b50d(){const _0x5c128a=['evaluation','trial']['includes'](_0x1807a7['licenseType'])?_0x672b1e/0x3e8:0xe10*_0x48d2fe;return _0x1807a7['exp']<_0x5c128a;}function _0x3fb760(){const _0x250186=_0x1807a7['features'];return!!_0x250186&&(!!_0x250186['includes']('*')||(!!_0x250186['includes']('DO')||(!!_0x250186['includes']('PP')||!(!_0x250186['includes']('TRILIUM')||!_0x8639f7()))));}function _0x4e79ca(){const _0x3d908c=_0x1807a7['licensedHosts'];if(!_0x3d908c||0x0==_0x3d908c['length'])return!0x0;const {hostname:_0x13efb1}=new URL(window['location']['href']);if(_0x3d908c['includes'](_0x13efb1))return!0x0;const _0x2a0990=_0x13efb1['split']('.');return _0x3d908c['filter'](_0x2fe8fb=>_0x2fe8fb['includes']('*'))['map'](_0x136928=>_0x136928['split']('.'))['filter'](_0x1c0c05=>_0x1c0c05['length']<=_0x2a0990['length'])['map'](_0x244587=>Array(_0x2a0990['length']-_0x244587['length'])['fill']('*'===_0x244587[0x0]?'*':'')['concat'](_0x244587))['some'](_0x3747c3=>_0x2a0990['every']((_0x611b35,_0x426d4f)=>_0x3747c3[_0x426d4f]===_0x611b35||'*'===_0x3747c3[_0x426d4f]));}function _0x1ee588(){return _0x24a1c6&&_0x1429cb?new window['Promise']((_0x4be5bc,_0x3ecd05)=>{_0x24a1c6['then'](_0x4be5bc,_0x3ecd05),_0x1429cb['then'](_0x1a7683=>{'Valid'!=_0x1a7683&&_0x4be5bc(_0x1a7683);},_0x3ecd05);}):_0x24a1c6||_0x1429cb||'Valid';}}function _0x59f31e(_0x1c0239,_0x3d9212){return new window['Promise'](_0x1262de=>{if(_0x469398())return _0x1262de('Valid');_0x1c46ba(),_0x2b6834['decorate']('_sendUsageRequest');let _0x30bf54=!0x1;const _0x2ed3d4=_0x2783d6();function _0x3f8596(_0xe7747d){return!!_0xe7747d&&('object'==typeof _0xe7747d||'function'==typeof _0xe7747d)&&'function'==typeof _0xe7747d['then']&&'function'==typeof _0xe7747d['catch'];}function _0x2cff08(_0x1fcc1f){_0x156e7b(_0x1fcc1f)['then'](_0x58e54f=>_0x58e54f&&'ok'==_0x58e54f['status']?_0x521282(_0x1926d2(_0x2ed3d4+_0x3d9212))!=_0x58e54f['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x5cec43=>(_0x2dc839(),_0x5cec43),()=>{const _0x1da952=_0x3d19ff();return null==_0x1da952?(_0x2dc839(),'Valid'):_0x672b1e-_0x1da952>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1262de)['catch'](()=>{_0x1262de('UsageLimit');});const _0x53277e=0x36ee80;function _0x2dc839(){const _0x4eabf8='llct-'+_0x521282(_0x1926d2(_0x1c0239)),_0x356aa2=_0x30c46e(_0x521282(window['Math']['ceil'](_0x672b1e/_0x53277e)));window['localStorage']['setItem'](_0x4eabf8,_0x356aa2);}function _0x3d19ff(){const _0x3f9ef3='llct-'+_0x521282(_0x1926d2(_0x1c0239)),_0x6746da=window['localStorage']['getItem'](_0x3f9ef3);return _0x6746da?window['parseInt'](_0x30c46e(_0x6746da),0x10)*_0x53277e:null;}function _0x156e7b(_0x3ac2fe){return new window['Promise']((_0x403117,_0x27db2a)=>{_0x3ac2fe['then'](_0x403117,_0x27db2a),window['setTimeout'](_0x27db2a,0x1d4c0);});}}_0x2b6834['on']('_sendUsageRequest',(_0x515d12,_0x2aeb9b)=>{if(_0x2aeb9b[0x0]!=_0x1c0239)return _0x1262de('UsageLimit');_0x2aeb9b[0x1]={..._0x2aeb9b[0x1],'requestId':_0x2ed3d4};},{'priority':'high'}),_0x2b6834['on']('_sendUsageRequest',_0x5a2085=>{_0x3f8596(_0x5a2085['return'])&&(_0x30bf54=!0x0,_0x2cff08(_0x5a2085['return']));},{'priority':'low'}),_0x40b1a6['then'](()=>{_0x30bf54||_0x1262de('UsageLimit');});});function _0x469398(){return'auto'==_0x2b6834['editing']['view']['_overlayModeHint'];}function _0x1c46ba(){_0x2b6834['editing']['view']['_overlayModeHint']='auto';}}function _0x1398e0(_0x569a89){const _0x377099=[new window['Promise'](_0x526048=>setTimeout(_0x526048,0x93ecc)),_0x40b1a6['then'](()=>new window['Promise'](_0x3d68b2=>{let _0xffd17b=0x0;_0x2b6834['model']['on']('applyOperation',(_0xd9f9e5,_0x255b2b)=>{_0x255b2b[0x0]['isDocumentOperation']&&_0xffd17b++,0x5e8==_0xffd17b&&(_0x3d68b2(),_0xd9f9e5['off']());});}))];return window['Promise']['race'](_0x377099)['then'](()=>_0x569a89);}async function _0xd003f6(){await _0x40b1a6,_0x2b6834['model']['change']=_0x5879ac,_0x2b6834['model']['enqueueChange']=_0x5879ac,_0x2b6834['enableReadOnlyMode']('model');}function _0x8639f7(){return window['glob']&&window['glob']['triliumVersion'];}function _0x9e957f(_0x14e383){const _0x1dc1b1=_0x26ec54();_0x2b6834[_0x1dc1b1]='documentOutlineLicenseKey'+_0x14e383,'Valid'!=_0x14e383&&_0xd003f6();}function _0x26ec54(){const _0x5d4740=window['String'](window['performance']['now']())['replace']('.','');let _0x25a600='u';for(let _0x36f1aa=0x0;_0x36f1aa<_0x5d4740['length'];_0x36f1aa+=0x2){let _0x5665e2=window['parseInt'](_0x5d4740['substring'](_0x36f1aa,_0x36f1aa+0x2));_0x5665e2>=0x3e&&(_0x5665e2-=0x3e),_0x25a600+=_0x3448f7[_0x5665e2];}return _0x25a600;}function _0x1cea89(){const _0x1c368c=_0x3d68d4['split']('.');if(0x3!=_0x1c368c['length'])return null;return _0x37c601(_0x1c368c[0x1]);function _0x37c601(_0x4c7374){const _0x5a1dd1=_0x1623cf(_0x4c7374);return _0x5a1dd1&&_0x5839f3()?_0x5a1dd1:null;function _0x5839f3(){const _0x5e7578=_0x5a1dd1['jti'],_0x4ee2cb=window['parseInt'](_0x5e7578['substring'](_0x5e7578['length']-0x8),0x10),_0x25d68b={..._0x5a1dd1,'jti':_0x5e7578['substring'](0x0,_0x5e7578['length']-0x8)};return delete _0x25d68b['vc'],_0x1926d2(_0x25d68b)==_0x4ee2cb;}}}async function _0x18e748(){let _0x27c16f=!0x0;try{const [_0xe8f4ed,_0x3d9099,_0x3cbf7d]=_0x3d68d4['split']('.');return _0x2091da(_0xe8f4ed),await _0x5b113f(_0xe8f4ed,_0x3d9099,_0x3cbf7d),_0x27c16f;}catch{return!0x1;}function _0x2091da(_0x4c7a0e){const _0x3cc03a=_0x1623cf(_0x4c7a0e);_0x3cc03a&&'ES256'==_0x3cc03a['alg']||(_0x27c16f=!0x1);}async function _0x5b113f(_0x1f19eb,_0x2a3399,_0x3b94e5){const _0x3b6153=window['Uint8Array']['from'](_0x506418(_0x3b94e5),_0x25bfd8=>_0x25bfd8['charCodeAt'](0x0)),_0x539934=new window['TextEncoder']()['encode'](_0x1f19eb+'.'+_0x2a3399),_0x8b79be=window['crypto']['subtle'];if(!_0x8b79be)return;const _0x18ef47=await _0x8b79be['importKey']('jwk',_0x5c3b63,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x8b79be['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x18ef47,_0x3b6153,_0x539934)||(_0x27c16f=!0x1);}}function _0x1623cf(_0x4c71e9){return _0x4c71e9['startsWith']('ey')?JSON['parse'](_0x506418(_0x4c71e9)):null;}function _0x506418(_0x325068){return window['atob'](_0x325068['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1926d2(_0x5754fc){let _0x3cf839=0x1505;function _0x51a1cd(_0x27a4dc){for(let _0x4622ee=0x0;_0x4622ee<_0x27a4dc['length'];_0x4622ee++){const _0x3a8adb=_0x27a4dc['charCodeAt'](_0x4622ee);_0x3cf839=(_0x3cf839<<0x5)+_0x3cf839+_0x3a8adb,_0x3cf839&=_0x3cf839;}}function _0x320529(_0x551111){Array['isArray'](_0x551111)?_0x551111['forEach'](_0x320529):_0x551111&&'object'==typeof _0x551111?Object['entries'](_0x551111)['sort']()['forEach'](([_0x5f1a23,_0x5746da])=>{_0x51a1cd(_0x5f1a23),_0x320529(_0x5746da);}):_0x51a1cd(window['String'](_0x551111));}return _0x320529(_0x5754fc),_0x3cf839>>>0x0;}function _0x521282(_0x1211a8){return _0x1211a8['toString'](0x10)['padStart'](0x8,'0');}function _0x30c46e(_0x55dde9){return _0x55dde9['split']('')['reverse']()['join']('');}function _0x5879ac(){}_0x9e957f(await _0x22e2a6());}_0x5d9e51(_0x52bf6e['editor']);}(this);}destroy(){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}_handleOutlineChange(_0x2243ff,{outlineDefinitions:_0x5ff007,outlineChanges:_0x10af1d}){this['_currentOutlineDefinitions']=_0x5ff007,this['view']['sync'](_0x10af1d);}_setActiveViewItem(_0x4e6304){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0x4e6304]&&(this['view']['activeItemIndex']=_0x4e6304);}_handleItemSelected(_0x4b12af){const _0x5e438a=this['_currentOutlineDefinitions'][_0x4b12af]['modelElement'];this['editor']['model']['change'](_0x31c6bd=>{_0x31c6bd['setSelection'](_0x5e438a,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x4b12af);}_updateActiveDefinitionOnViewportChange(){const _0x488ac8=this['editor'];let _0x289af7;for(const _0x19a7a6 of _0x488ac8['model']['document']['getRootNames']()){const _0x5a1765=_0x488ac8['editing']['view']['getDomRoot'](_0x19a7a6),_0x4e7b6c=_0x5a1765&&new _0x584338(_0x5a1765)['getVisible']();if(_0x4e7b6c){const _0x387519=new _0x584338(_0x289f00['window'])['getIntersection'](_0x4e7b6c);_0x387519&&(_0x289af7=_0x387519['top']+0.25*_0x387519['height']);}}if(void 0x0===_0x289af7)return;const _0x40d629=E(_0x488ac8['editing'],this['_currentOutlineDefinitions'],_0x289af7);_0x40d629?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0x40d629)):this['_setActiveViewItem'](-0x1);}};function E(_0x13f89d,_0x1c5b72,_0x1cd9d4,_0x19ddee=0x0,_0x47a1d3=_0x1c5b72['length']-0x1){const _0x41c970=Math['floor'](_0x19ddee+(_0x47a1d3-_0x19ddee)/0x2);if(_0x47a1d3>=_0x19ddee){const _0x237c73=_0x1c5b72[_0x41c970],_0x85985c=_0x13f89d['mapper']['toViewElement'](_0x237c73['modelElement']);if(!_0x85985c)return null;const _0xa6d8b7=_0x13f89d['view']['domConverter']['mapViewToDom'](_0x85985c);return new _0x584338(_0xa6d8b7)['bottom']>_0x1cd9d4?E(_0x13f89d,_0x1c5b72,_0x1cd9d4,_0x19ddee,_0x41c970-0x1):E(_0x13f89d,_0x1c5b72,_0x1cd9d4,_0x41c970+0x1,_0x47a1d3);}return _0x41c970<0x0?null:_0x1c5b72[_0x41c970];}var K=class extends _0x4c8b3e{['licenseKey'];_licenseKeyCheckInterval;static get requires(){return[L,x];}static get['pluginName'](){return'DocumentOutline';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x57ee71=[this['editor']];for(const _0x4c9745 of _0x57ee71){let _0x47fcf3;for(const _0xf3c4a4 in _0x4c9745){const _0x7752d1=_0xf3c4a4,_0x3086ef=_0x4c9745[_0x7752d1];if('documentOutlineLicenseKeyValid'==_0x3086ef||'documentOutlineLicenseKeyInvalid'==_0x3086ef||'documentOutlineLicenseKeyExpired'==_0x3086ef||'documentOutlineLicenseKeyDomainLimit'==_0x3086ef||'documentOutlineLicenseKeyNotAllowed'==_0x3086ef||'documentOutlineLicenseKeyEvaluationLimit'==_0x3086ef||'documentOutlineLicenseKeyUsageLimit'==_0x3086ef){delete _0x4c9745[_0x7752d1],_0x47fcf3=_0x3086ef,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0x47fcf3&&_0x4c9745['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0x47fcf3&&_0x4c9745['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0x47fcf3&&_0x4c9745['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0x47fcf3&&_0x4c9745['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0x47fcf3&&_0x4c9745['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0x47fcf3&&_0x4c9745['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},A=class extends _0x392b4a{execute(){this['editor']['model']['change'](_0x331a50=>{this['editor']['model']['insertObject'](_0x331a50['createElement']('tableOfContents'));});}['refresh'](){const _0x1292b4=this['editor']['model'],_0x158ed8=_0x1292b4['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0x158ed8&&_0x1292b4['schema']['findAllowedParent'](_0x158ed8,'tableOfContents'));}},N=class extends _0x4c8b3e{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}afterInit(){const _0x1619b7=this['editor'];if(_0x1619b7['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0xd9c19a,modelNames:_0x3fbd63}=function(_0x53fe11){const _0x37a712=new Set(['h1','h2','h3','h4','h5','h6']),_0x38f003=new Set(['heading1','heading2','heading3','heading4','heading5','heading6','htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']);if(!_0x53fe11)return{'viewNames':_0x37a712,'modelNames':_0x38f003};for(const _0xbcc45e of _0x53fe11){if('paragraph'===_0xbcc45e['model'])continue;const _0x18289e='string'==typeof _0xbcc45e['view']?_0xbcc45e['view']:_0xbcc45e['view']['name'];_0x37a712['add'](_0x18289e),_0x38f003['add'](_0xbcc45e['model']);}return{'viewNames':_0x37a712,'modelNames':_0x38f003};}(this['editor']['config']['get']('heading.options'));for(const _0x45fab1 of _0xd9c19a)this['_customUpcastHeadingsConversion'](_0x45fab1);for(const _0x42f590 of _0x3fbd63)this['_customDataDowncastHeadingsConversion'](_0x42f590),_0x1619b7['model']['schema']['isRegistered'](_0x42f590)&&_0x1619b7['model']['schema']['extend'](_0x42f590,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x3fbd63);}_customUpcastHeadingsConversion(_0x3fd0f8){this['editor']['conversion']['for']('upcast')['add'](_0x317a6f=>_0x317a6f['on']('element:'+_0x3fd0f8,(_0x49ec2c,_0x5f4152,_0x3e4311)=>{const {consumable:_0x3dbda6,writer:_0x3dc42a}=_0x3e4311,_0x303df6=_0x5f4152['viewItem']['getAttribute']('id'),_0x369f48=_0x5f4152['modelRange']?.['getContainedElement']();if(_0x369f48)return _0x303df6&&_0x303df6['length']||_0x369f48['hasAttribute']('headingId')?void(_0x3dbda6['consume'](_0x5f4152['viewItem'],{'attributes':['id']})&&_0x3dc42a['setAttribute']('headingId',_0x303df6,_0x369f48)):(_0x3dbda6['consume'](_0x5f4152['viewItem'],{'attributes':['id']}),void _0x3dc42a['setAttribute']('headingId',_0x2783d6(),_0x369f48));},{'priority':_0x5bf6ba['get']('low')+0.5}));}_customDataDowncastHeadingsConversion(_0x4fbc06){this['editor']['conversion']['for']('downcast')['add'](_0x8c226a=>_0x8c226a['on']('attribute:headingId:'+_0x4fbc06,(_0x188e44,_0x4f293d,_0x441583)=>{if(!_0x441583['consumable']['consume'](_0x4f293d['item'],_0x188e44['name']))return;const _0x155bcc=_0x4f293d['item']['getAttribute']('headingId'),_0x10196f=_0x441583['mapper']['toViewElement'](_0x4f293d['item']);_0x441583['writer']['setAttribute']('id',_0x155bcc,_0x10196f);}));}_registerHeadingIdAttributePostfixer(_0x49f795){const _0x12f13d=this['editor'],_0x3e0975=new Set(),_0x48ab0a=new Set();function _0x2b0cf6(_0x397c0e,_0x51fa1f){const _0x2b5c17=_0x2783d6();return _0x48ab0a['add'](_0x2b5c17),_0x397c0e['setAttribute']('headingId',_0x2b5c17,_0x51fa1f),_0x2b5c17;}function _0x530751(_0x4d344d,_0x360518){_0x4d344d['removeAttribute']('headingId',_0x360518);}_0x12f13d['model']['document']['registerPostFixer'](_0x231229=>{const _0x30c7bf=_0x12f13d['model']['document']['differ']['getChanges']();let _0x9c8f7=!0x1;for(const _0x13bc88 of _0x30c7bf)if('insert'==_0x13bc88['type']&&_0x13bc88['name']){if(_0x49f795['has'](_0x13bc88['name'])){const _0x90f673=_0x13bc88['attributes']['get']('headingId');'string'==typeof _0x90f673?_0x3e0975['has'](_0x90f673)?(_0x2b0cf6(_0x231229,_0x13bc88['position']['nodeAfter']),_0x9c8f7=!0x0):_0x48ab0a['add'](_0x90f673):(_0x2b0cf6(_0x231229,_0x13bc88['position']['nodeAfter']),_0x9c8f7=!0x0);}else'string'==typeof _0x13bc88['attributes']['get']('headingId')&&(_0x530751(_0x231229,_0x13bc88['position']['nodeAfter']),_0x9c8f7=!0x0);}else{if('remove'==_0x13bc88['type']){const _0x54de06=_0x13bc88['attributes']['get']('headingId');'string'==typeof _0x54de06&&_0x3e0975['delete'](_0x54de06);}}return _0x9c8f7;}),_0x12f13d['model']['document']['on']('change',()=>{_0x48ab0a['forEach'](_0x490778=>_0x3e0975['add'](_0x490778)),_0x48ab0a['clear']();});}},D=class extends _0x4c8b3e{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x1b094c,L,N];}_currentOutlineDefinitions;_tableOfContentsElements;_headingIdModelAttributeName;constructor(_0x9961a7){super(_0x9961a7),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}init(){const _0x23b7cd=this['editor'],_0x31ff0e=_0x23b7cd['editing']['view']['document'];_0x23b7cd['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0x23b7cd['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x31ff0e,'click',(_0x58330f,_0x587f94)=>{if(!_0x587f94['target'])return;const _0x4a218f=_0x587f94['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0x4a218f)&&(_0x587f94['domEvent']['preventDefault'](),_0x58330f['stop'](),this['_handleScrollToHeading'](_0x4a218f));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0x23b7cd['commands']['add']('insertTableOfContents',new A(_0x23b7cd));const _0x35728a=_0x23b7cd['config']['get']('tableOfContents.headings');_0x35728a&&_0x35728a['length']?this['listenTo'](_0x23b7cd['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0x35728a),this['_updateTableOfContentsElements']();}):_0x23b7cd['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0x2db10f,_0x58bd0f)=>{this['_currentOutlineDefinitions']=_0x58bd0f['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0x23b7cd['model']['document'],'change',()=>{this['_trackNewToCElements']();});}afterInit(){!async function(_0x212d69){const _0x4ef031='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x24f97f=0x79758,_0x53ae80={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x42c65d(_0x44ca56){const _0xe1a09f=new window['Promise'](_0x18222b=>{_0x44ca56['once']('ready',_0x18222b);}),_0x1190d6=window['Date']['now'](),_0x3ef05c=_0x44ca56['config']['get']('licenseKey');async function _0x59f875(){let _0x9109b5,_0x204e53=null,_0x21c70c=null;try{return'GPL'==_0x3ef05c?'NotAllowed':(_0x9109b5=_0x2f74ba(),_0x9109b5?(_0x9109b5['usageEndpoint']&&(_0x21c70c=_0x22c30c(_0x9109b5['usageEndpoint'],_0x9109b5['jti'])),await _0x47a4c5()?_0x20312b()?_0x11af3c()?'Expired':_0x19708e()?('evaluation'==_0x9109b5['licenseType']&&(_0x204e53=_0x4871ac('EvaluationLimit')),await _0x24bcc8()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x11af3c(){const _0x151490=['evaluation','trial']['includes'](_0x9109b5['licenseType'])?_0x1190d6/0x3e8:0xe10*_0x24f97f;return _0x9109b5['exp']<_0x151490;}function _0x20312b(){const _0x52264e=_0x9109b5['features'];return!!_0x52264e&&(!!_0x52264e['includes']('*')||(!!_0x52264e['includes']('TOC')||(!!_0x52264e['includes']('PP')||!(!_0x52264e['includes']('TRILIUM')||!_0x4ae705()))));}function _0x19708e(){const _0x4afae4=_0x9109b5['licensedHosts'];if(!_0x4afae4||0x0==_0x4afae4['length'])return!0x0;const {hostname:_0x50f2db}=new URL(window['location']['href']);if(_0x4afae4['includes'](_0x50f2db))return!0x0;const _0x59f70d=_0x50f2db['split']('.');return _0x4afae4['filter'](_0x53977d=>_0x53977d['includes']('*'))['map'](_0x2deece=>_0x2deece['split']('.'))['filter'](_0x391cb5=>_0x391cb5['length']<=_0x59f70d['length'])['map'](_0x3500f1=>Array(_0x59f70d['length']-_0x3500f1['length'])['fill']('*'===_0x3500f1[0x0]?'*':'')['concat'](_0x3500f1))['some'](_0x2d2ce4=>_0x59f70d['every']((_0x25700e,_0x4a78b5)=>_0x2d2ce4[_0x4a78b5]===_0x25700e||'*'===_0x2d2ce4[_0x4a78b5]));}function _0x24bcc8(){return _0x204e53&&_0x21c70c?new window['Promise']((_0x40d489,_0x32b939)=>{_0x204e53['then'](_0x40d489,_0x32b939),_0x21c70c['then'](_0x1b2e44=>{'Valid'!=_0x1b2e44&&_0x40d489(_0x1b2e44);},_0x32b939);}):_0x204e53||_0x21c70c||'Valid';}}function _0x22c30c(_0x56763b,_0x18e5d9){return new window['Promise'](_0x4dc850=>{if(_0x5def73())return _0x4dc850('Valid');_0x55d3e1(),_0x44ca56['decorate']('_sendUsageRequest');let _0x36b86d=!0x1;const _0x3a6be4=_0x2783d6();function _0x2ff773(_0x14d0cb){return!!_0x14d0cb&&('object'==typeof _0x14d0cb||'function'==typeof _0x14d0cb)&&'function'==typeof _0x14d0cb['then']&&'function'==typeof _0x14d0cb['catch'];}function _0x574010(_0x188fac){_0x285e35(_0x188fac)['then'](_0x313ca9=>_0x313ca9&&'ok'==_0x313ca9['status']?_0x17fa6d(_0x4f4bec(_0x3a6be4+_0x18e5d9))!=_0x313ca9['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x558f97=>(_0x174a6b(),_0x558f97),()=>{const _0x5d1a6d=_0x262d8c();return null==_0x5d1a6d?(_0x174a6b(),'Valid'):_0x1190d6-_0x5d1a6d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x4dc850)['catch'](()=>{_0x4dc850('UsageLimit');});const _0x564cd8=0x36ee80;function _0x174a6b(){const _0x44736d='llct-'+_0x17fa6d(_0x4f4bec(_0x56763b)),_0x54609b=_0xa7e5b1(_0x17fa6d(window['Math']['ceil'](_0x1190d6/_0x564cd8)));window['localStorage']['setItem'](_0x44736d,_0x54609b);}function _0x262d8c(){const _0x4a63a4='llct-'+_0x17fa6d(_0x4f4bec(_0x56763b)),_0x37c6f6=window['localStorage']['getItem'](_0x4a63a4);return _0x37c6f6?window['parseInt'](_0xa7e5b1(_0x37c6f6),0x10)*_0x564cd8:null;}function _0x285e35(_0xc3901e){return new window['Promise']((_0x1b77cc,_0x105601)=>{_0xc3901e['then'](_0x1b77cc,_0x105601),window['setTimeout'](_0x105601,0x1d4c0);});}}_0x44ca56['on']('_sendUsageRequest',(_0x2df257,_0x1518c0)=>{if(_0x1518c0[0x0]!=_0x56763b)return _0x4dc850('UsageLimit');_0x1518c0[0x1]={..._0x1518c0[0x1],'requestId':_0x3a6be4};},{'priority':'high'}),_0x44ca56['on']('_sendUsageRequest',_0xfb0b1f=>{_0x2ff773(_0xfb0b1f['return'])&&(_0x36b86d=!0x0,_0x574010(_0xfb0b1f['return']));},{'priority':'low'}),_0xe1a09f['then'](()=>{_0x36b86d||_0x4dc850('UsageLimit');});});function _0x5def73(){return'auto'==_0x44ca56['editing']['view']['_overlayModeHint'];}function _0x55d3e1(){_0x44ca56['editing']['view']['_overlayModeHint']='auto';}}function _0x4871ac(_0x530997){const _0x401f11=[new window['Promise'](_0x3e96d3=>setTimeout(_0x3e96d3,0x93ecc)),_0xe1a09f['then'](()=>new window['Promise'](_0x51be7f=>{let _0x3c9a26=0x0;_0x44ca56['model']['on']('applyOperation',(_0x14c948,_0x520fd0)=>{_0x520fd0[0x0]['isDocumentOperation']&&_0x3c9a26++,0x5e8==_0x3c9a26&&(_0x51be7f(),_0x14c948['off']());});}))];return window['Promise']['race'](_0x401f11)['then'](()=>_0x530997);}async function _0x3b18c6(){await _0xe1a09f,_0x44ca56['model']['change']=_0x15d402,_0x44ca56['model']['enqueueChange']=_0x15d402,_0x44ca56['enableReadOnlyMode']('model');}function _0x4ae705(){return window['glob']&&window['glob']['triliumVersion'];}function _0xff25f2(_0x1e836b){const _0x2987e3=_0x3cb324();_0x44ca56[_0x2987e3]='tableOfContentsLicenseKey'+_0x1e836b,'Valid'!=_0x1e836b&&_0x3b18c6();}function _0x3cb324(){const _0x1d2e56=window['String'](window['performance']['now']())['replace']('.','');let _0x554945='D';for(let _0x5622e1=0x0;_0x5622e1<_0x1d2e56['length'];_0x5622e1+=0x2){let _0x3df65a=window['parseInt'](_0x1d2e56['substring'](_0x5622e1,_0x5622e1+0x2));_0x3df65a>=0x3e&&(_0x3df65a-=0x3e),_0x554945+=_0x4ef031[_0x3df65a];}return _0x554945;}function _0x2f74ba(){const _0x47f03a=_0x3ef05c['split']('.');if(0x3!=_0x47f03a['length'])return null;return _0x239933(_0x47f03a[0x1]);function _0x239933(_0x5442f9){const _0x36ca50=_0x2e58b6(_0x5442f9);return _0x36ca50&&_0x412718()?_0x36ca50:null;function _0x412718(){const _0x3a225a=_0x36ca50['jti'],_0x4b1ee1=window['parseInt'](_0x3a225a['substring'](_0x3a225a['length']-0x8),0x10),_0xeccbe2={..._0x36ca50,'jti':_0x3a225a['substring'](0x0,_0x3a225a['length']-0x8)};return delete _0xeccbe2['vc'],_0x4f4bec(_0xeccbe2)==_0x4b1ee1;}}}async function _0x47a4c5(){let _0x576714=!0x0;try{const [_0x448856,_0x2f286b,_0x4cb838]=_0x3ef05c['split']('.');return _0x345525(_0x448856),await _0xcf70f4(_0x448856,_0x2f286b,_0x4cb838),_0x576714;}catch{return!0x1;}function _0x345525(_0x516c6f){const _0x4d7092=_0x2e58b6(_0x516c6f);_0x4d7092&&'ES256'==_0x4d7092['alg']||(_0x576714=!0x1);}async function _0xcf70f4(_0x34af78,_0x10c2fc,_0x13cba4){const _0xed38b9=window['Uint8Array']['from'](_0x3e5aff(_0x13cba4),_0x340e10=>_0x340e10['charCodeAt'](0x0)),_0x23f265=new window['TextEncoder']()['encode'](_0x34af78+'.'+_0x10c2fc),_0xf129c4=window['crypto']['subtle'];if(!_0xf129c4)return;const _0x558f1c=await _0xf129c4['importKey']('jwk',_0x53ae80,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0xf129c4['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x558f1c,_0xed38b9,_0x23f265)||(_0x576714=!0x1);}}function _0x2e58b6(_0x276e80){return _0x276e80['startsWith']('ey')?JSON['parse'](_0x3e5aff(_0x276e80)):null;}function _0x3e5aff(_0x43f7f9){return window['atob'](_0x43f7f9['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4f4bec(_0x45da58){let _0x11ad42=0x1505;function _0x288b23(_0x64a4f){for(let _0x12b322=0x0;_0x12b322<_0x64a4f['length'];_0x12b322++){const _0x2a1452=_0x64a4f['charCodeAt'](_0x12b322);_0x11ad42=(_0x11ad42<<0x5)+_0x11ad42+_0x2a1452,_0x11ad42&=_0x11ad42;}}function _0x1b318c(_0x3cc86b){Array['isArray'](_0x3cc86b)?_0x3cc86b['forEach'](_0x1b318c):_0x3cc86b&&'object'==typeof _0x3cc86b?Object['entries'](_0x3cc86b)['sort']()['forEach'](([_0x411b33,_0x14bf38])=>{_0x288b23(_0x411b33),_0x1b318c(_0x14bf38);}):_0x288b23(window['String'](_0x3cc86b));}return _0x1b318c(_0x45da58),_0x11ad42>>>0x0;}function _0x17fa6d(_0x1cc3af){return _0x1cc3af['toString'](0x10)['padStart'](0x8,'0');}function _0xa7e5b1(_0x401b61){return _0x401b61['split']('')['reverse']()['join']('');}function _0x15d402(){}_0xff25f2(await _0x59f875());}_0x42c65d(_0x212d69['editor']);}(this);}_updateTableOfContentsElements(){this['_tableOfContentsElements']['forEach'](_0x7b24=>{'$graveyard'!==_0x7b24['rootName']&&this['editor']['editing']['reconvertItem'](_0x7b24);});}_trackNewToCElements(){for(const _0x49f525 of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x49f525['type']||'tableOfContents'!==_0x49f525['name'])return;this['_tableOfContentsElements']['add'](_0x49f525['position']['nodeAfter']);}}_getOutlineDefinitions(_0x1bf512){const _0x402005=this['editor'],_0x152ae9=[];for(const _0x4b52e7 of _0x402005['model']['document']['getRootNames']())_0x18d03c(_0x402005['model']['document']['getRoot'](_0x4b52e7));function _0x18d03c(_0x1dc263){for(const _0x1ff11c of _0x1dc263['getChildren']())_0x1ff11c['is']('element')&&(_0x1bf512['includes'](_0x1ff11c['name'])&&_0x152ae9['push']({'level':_0x1bf512['indexOf'](_0x1ff11c['name'])+0x1,'text':I(_0x1ff11c),'modelElement':_0x1ff11c}),_0x18d03c(_0x1ff11c));}return _0x152ae9;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}_defineConverters(){const _0x14e0d1=this['editor']['conversion'];_0x14e0d1['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x14e0d1['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x2607f3,{writer:_0x1df02b})=>this['_createTableOfContents'](_0x1df02b,!0x0)}),_0x14e0d1['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x28399a,{writer:_0x51056f})=>{this['_tableOfContentsElements']['add'](_0x28399a);const _0xdf054a=this['_createTableOfContents'](_0x51056f);return _0x2cb5e5(_0xdf054a,_0x51056f,{'label':C(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(_0x2355e9,_0x4d3635=!0x1){const {locale:_0x3b60a0}=this['editor'],_0x47cb35=_0x2355e9['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0x4d3635&&{'data-table-of-contents-label':C(_0x3b60a0,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0x4d3635&&_0x2355e9['insert'](_0x2355e9['createPositionAt'](_0x47cb35,'end'),_0x2355e9['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x2355e9['createText'](C(_0x3b60a0,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0x393007=_0x4d3635?'':'['+C(_0x3b60a0,'Empty\x20heading')+']';let _0x5583e4=_0x47cb35;return this['_currentOutlineDefinitions']['forEach']((_0x2b0859,_0x4618f3,_0x541516)=>{const _0x1b9253=this['editor']['model']['hasContent'](_0x2b0859['modelElement'],{'ignoreWhitespaces':!0x0}),_0x56c3f4=_0x1b9253?_0x2b0859['text']:_0x393007,_0x426fb5=_0x2b0859['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0xd4c281=_0x2355e9['createContainerElement']('a',{'href':'#'+_0x426fb5,...!_0x4d3635&&{'tabindex':'-1'}},[_0x2355e9['createText'](_0x56c3f4)]),_0x4e3bf6=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x2355e9['setCustomProperty']('tableOfContentsHeadingIndex',_0x4618f3,_0xd4c281);const _0x15e903=_0x2355e9['createContainerElement']('li',null,[_0x1b9253||!_0x4d3635&&_0x4e3bf6?_0xd4c281:_0x2355e9['createText']('')]),_0x2d2f57=_0x4618f3?_0x541516[_0x4618f3-0x1]['level']:0x0,_0x33bd6b=Math['abs'](_0x2b0859['level']-_0x2d2f57);if(_0x2b0859['level']>_0x2d2f57){const _0x2e674b=H(_0x15e903,_0x33bd6b,_0x2355e9);_0x2355e9['insert'](_0x2355e9['createPositionAt'](_0x5583e4,'end'),_0x2e674b);}else{const _0x4d7f63=function(_0x36d36f,_0x2eac24){return _0x36d36f['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0xa909b1=>_0xa909b1['is']('element','ol'))[_0x2eac24];}(_0x5583e4,_0x33bd6b);_0x2355e9['insert'](_0x2355e9['createPositionAt'](_0x4d7f63,'end'),_0x15e903);}_0x5583e4=_0x15e903;}),_0x47cb35;}['_handleScrollToHeading'](_0x5660b8){const _0x3b6bbb=this['_currentOutlineDefinitions'][_0x5660b8]['modelElement'];this['editor']['model']['change'](_0x5b1c19=>{_0x5b1c19['setSelection'](_0x3b6bbb,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}_redirectMapper(){return(_0x1332b9,_0x283a51)=>{const _0x116dea=_0x283a51['mapper'],_0x694302=_0x116dea['findMappedViewAncestor'](_0x283a51['viewPosition']),_0x4c21c6=_0x116dea['toModelElement'](_0x694302);_0x4c21c6['is']('element','tableOfContents')&&(_0x283a51['modelPosition']=this['editor']['model']['createPositionAt'](_0x4c21c6,0x0),_0x1332b9['stop']());};}};function H(_0x249256,_0x121990,_0x703af9){return 0x1===_0x121990?_0x703af9['createContainerElement']('ol',null,[_0x249256]):_0x703af9['createContainerElement']('ol',null,[_0x703af9['createContainerElement']('li',null,[H(_0x249256,_0x121990-0x1,_0x703af9)])]);}var P=class extends _0x4c8b3e{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x365598=this['editor'];_0x365598['ui']['componentFactory']['add']('tableOfContents',()=>{const _0x244500=this['_createButton'](_0x257805);return _0x244500['tooltip']=!0x0,_0x244500;}),_0x365598['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0x30c5c0)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x645967=[this['editor']];for(const _0x12c7cc of _0x645967){let _0x3defac;for(const _0x57a5b4 in _0x12c7cc){const _0x4efe90=_0x57a5b4,_0x2100c0=_0x12c7cc[_0x4efe90];if('tableOfContentsLicenseKeyValid'==_0x2100c0||'tableOfContentsLicenseKeyInvalid'==_0x2100c0||'tableOfContentsLicenseKeyExpired'==_0x2100c0||'tableOfContentsLicenseKeyDomainLimit'==_0x2100c0||'tableOfContentsLicenseKeyNotAllowed'==_0x2100c0||'tableOfContentsLicenseKeyEvaluationLimit'==_0x2100c0||'tableOfContentsLicenseKeyUsageLimit'==_0x2100c0){delete _0x12c7cc[_0x4efe90],_0x3defac=_0x2100c0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0x3defac&&_0x12c7cc['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0x3defac&&_0x12c7cc['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0x3defac&&_0x12c7cc['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0x3defac&&_0x12c7cc['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0x3defac&&_0x12c7cc['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0x3defac&&_0x12c7cc['_showLicenseError']('usageLimit');}},0x3e8);}_createButton(_0xaede21){const _0x470f0d=this['editor'],_0x5aca66=_0x470f0d['locale'],_0xd844f5=_0x470f0d['commands']['get']('insertTableOfContents'),_0x56b78c=new _0xaede21(_0x5aca66);return _0x56b78c['set']({'label':C(_0x5aca66,'Table\x20of\x20contents'),'icon':_0x2c6465}),_0x56b78c['bind']('isEnabled')['to'](_0xd844f5,'isEnabled'),this['listenTo'](_0x56b78c,'execute',()=>{_0x470f0d['execute']('insertTableOfContents'),_0x470f0d['editing']['view']['focus']();}),_0x56b78c;}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},U=class extends _0x4c8b3e{static get requires(){return[D,P];}static get['pluginName'](){return'TableOfContents';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{K as DocumentOutline,x as DocumentOutlineUI,L as DocumentOutlineUtils,N as HeadingId,U as TableOfContents,A as TableOfContentsCommand,D as TableOfContentsEditing,P as TableOfContentsUI};
|
|
23
|
+
import{Command as _0x30257a,Plugin as _0xe076e8}from'@ckeditor/ckeditor5-core';import{debounce as _0x387239,throttle as _0x3bda0b}from'es-toolkit/compat';import{ModelText as _0xf6297c,ModelTreeWalker as _0x5a8500}from'@ckeditor/ckeditor5-engine';import{CKEditorError as _0x51f806,Rect as _0x298f9a,diff as _0x32c10e,diffToChanges as _0x36f3b4,global as _0x32869f,listenToShadowRoots as _0x491987,priorities as _0x47b44a,scrollAncestorsToShowTarget as _0x11e78d,uid as _0x26e2cf}from'@ckeditor/ckeditor5-utils';import{ButtonView as _0x1bea1f,MenuBarMenuListItemButtonView as _0x22d6e0,View as _0x241df4}from'@ckeditor/ckeditor5-ui';import{Widget as _0x500037,toWidget as _0x2afbbe}from'@ckeditor/ckeditor5-widget';import{IconTableOfContents as _0x24aea3}from'@ckeditor/ckeditor5-icons';function I(_0x4184b4){let _0x3763b4='';for(const _0x133a53 of _0x4184b4['getChildren']())_0x133a53 instanceof _0xf6297c&&(_0x3763b4+=_0x133a53['data']);return _0x3763b4;}var L=class extends _0xe076e8{static get['pluginName'](){return'DocumentOutlineUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_headingNames']=[];init(){const _0x216f2c=this['editor'];this['_headingNames']=this['_getHeadingNames']();let _0x4ed0e9=[];_0x216f2c['model']['document']['on']('change',_0x387239(()=>{const _0x2d24a6=_0x4ed0e9;_0x4ed0e9=this['_getOutlineDefinitions']();const _0x20dd7c=_0x32c10e(_0x2d24a6,_0x4ed0e9,(_0x595439,_0x544451)=>_0x595439['level']===_0x544451['level']&&_0x595439['text']===_0x544451['text']&&_0x595439['modelElement']===_0x544451['modelElement']),_0x319b43=_0x36f3b4(_0x20dd7c,_0x4ed0e9),_0x4e1802=this['_getActiveHeading'](),_0x554de1=_0x4ed0e9['findIndex'](_0x5aedf7=>_0x5aedf7['modelElement']===_0x4e1802);_0x319b43['length']&&this['fire']('change',{'outlineDefinitions':_0x4ed0e9,'activeItemIndex':_0x554de1,'outlineChanges':_0x319b43}),this['fire']('activeItemIndex',{'index':_0x554de1});},0xfa,{'leading':!0x0,'trailing':!0x0}));}afterInit(){this['_headingNames']['length']||this['_deriveHeadingElementsFromConversion']();}_getOutlineDefinitions(){const _0x4626b2=this['editor'],_0x2195f2=[],_0xc02263=this['_headingNames'];for(const _0x2ce1bf of _0x4626b2['model']['document']['getRootNames']())_0x5e1eaa(_0x4626b2['model']['document']['getRoot'](_0x2ce1bf));function _0x5e1eaa(_0x3f0092){for(const _0x34e287 of _0x3f0092['getChildren']())_0x34e287['is']('element')&&(_0xc02263['includes'](_0x34e287['name'])&&_0x2195f2['push']({'level':_0xc02263['indexOf'](_0x34e287['name'])+0x1,'text':I(_0x34e287),'modelElement':_0x34e287}),_0x5e1eaa(_0x34e287));}return _0x2195f2;}_getActiveHeading(){const _0x5b8fa6=this['editor']['model']['document']['selection']['getFirstPosition'](),_0x190192=new _0x5a8500({'direction':'backward','startPosition':_0x5b8fa6});for(const _0x4c6e92 of _0x190192)if(_0x4c6e92['item']['is']('element')&&this['_headingNames']['includes'](_0x4c6e92['item']['name']))return _0x4c6e92['item'];}_getHeadingNames(){const _0x31be3f=this['editor']['config']['get']('documentOutline.headings');return _0x31be3f||function(_0x1b51b7){const _0x5a3499=_0x1b51b7['config']['get']('heading.options');return _0x5a3499?_0x5a3499['reduce']((_0x901e3d,_0x11aa62)=>('paragraph'!==_0x11aa62['model']&&_0x901e3d['push'](_0x11aa62['model']),_0x901e3d),[]):_0x1b51b7['plugins']['has']('GeneralHtmlSupport')?['htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']:[];}(this['editor']);}_deriveHeadingElementsFromConversion(){const _0x311fae=this['editor'],_0x46a1fd=['h1','h2','h3','h4','h5','h6'],_0x134642=[];for(const _0x589ef0 of _0x46a1fd){const _0x4e4906=_0x311fae['editing']['view']['domConverter']['domToView'](document['createElement'](_0x589ef0)),_0x2abb45=_0x311fae['data']['toModel'](_0x4e4906)['getChild'](0x0);_0x2abb45?.['is']('element')&&_0x134642['push'](_0x2abb45['name']);}this['_headingNames']=_0x134642;}};function C(_0x23de62,_0x3f11cd){const t=_0x23de62['t'];switch(_0x3f11cd){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 _0x3f11cd;}}var _=class extends _0x241df4{constructor(_0x3ed3bc,_0x37157a=!0x1){super(_0x3ed3bc);const _0x12b01c=this['bindTemplate'],_0x27b979=_0x37157a?'['+C(_0x3ed3bc,'Empty\x20heading')+']':'';this['set']('text',''),this['set']('level',0x1),this['set']('isActive',!0x1),this['bind']('isEmpty')['to'](this,'text',_0x12803c=>!_0x12803c),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline__item',_0x12b01c['to']('level',_0x597ddb=>'ck-document-outline__item_level-'+_0x597ddb),_0x12b01c['if']('isActive','ck-document-outline__item_active'),_0x12b01c['if']('isEmpty','ck-document-outline__item_empty')],'title':_0x12b01c['to']('text')},'children':[{'text':_0x12b01c['to']('text',_0x4911ea=>_0x4911ea||_0x27b979)}],'on':{'click':_0x12b01c['to']('click')}});}},k=class extends _0x241df4{items;documentOutlineContainer;showEmptyHeadingText;constructor(_0x2ba7f2,_0x307b43=!0x1,_0x5ad666){super(_0x2ba7f2),this['showEmptyHeadingText']=_0x307b43,this['set']('activeItemIndex',-0x1),this['documentOutlineContainer']=_0x5ad666,this['items']=this['createCollection'](),this['items']['delegate']('click')['to'](this),this['on']('click',this['_handleItemClick']['bind'](this)),this['on']('change:activeItemIndex',(_0x19b770,_0x56db06,_0x4631b1,_0x571ccf)=>{this['_setActiveItem'](_0x571ccf,_0x4631b1);}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-document-outline'],'dir':_0x2ba7f2['contentLanguageDirection'],'data-document-outline-empty-placeholder':C(_0x2ba7f2,'Editor\x20headings\x20will\x20appear\x20here\x20as\x20you\x20type.'),'tabindex':-0x1},'children':this['items']});}['sync'](_0x391c5b){_0x391c5b['forEach'](_0x19b229=>{'insert'==_0x19b229['type']?this['_insertItem'](_0x19b229['index'],..._0x19b229['values']):'delete'==_0x19b229['type']&&this['_deleteItem'](_0x19b229['index'],_0x19b229['howMany']);});}_setActiveItem(_0x5d26d3,_0x28c4c0){if(-0x1!==_0x5d26d3){const _0x2ee3c0=this['items']['get'](_0x5d26d3);_0x2ee3c0&&(_0x2ee3c0['isActive']=!0x1);}-0x1!==_0x28c4c0&&(this['items']['get'](_0x28c4c0)['isActive']=!0x0,this['_scrollToItem'](_0x28c4c0));}_insertItem(_0x18252a,..._0x4ff57c){const _0x15a5d5=_0x4ff57c['map']((_0x422057,_0x2aa8cc)=>{const _0x28805b=new _(this['locale'],this['showEmptyHeadingText']);return _0x28805b['text']=_0x422057['text'],_0x28805b['level']=_0x422057['level'],_0x18252a+_0x2aa8cc===this['activeItemIndex']&&(_0x28805b['isActive']=!0x0),_0x28805b;});this['items']['addMany'](_0x15a5d5,_0x18252a);}_deleteItem(_0xbba70b,_0x1c794e){do{this['items']['remove'](_0xbba70b);}while(--_0x1c794e);}_handleItemClick(_0x3f1faa){const _0x511773=this['items']['getIndex'](_0x3f1faa['source']);this['fire']('itemSelected',_0x511773);}_scrollToItem(_0x251a58){_0x11e78d(this['items']['get'](_0x251a58)['element'],0x14,this['documentOutlineContainer']);}destroy(){super['destroy'](),this['element']['remove']();}},x=class extends _0xe076e8{['view'];_currentOutlineDefinitions;_updateActiveDefinitionFromViewportThrottled;static get['pluginName'](){return'DocumentOutlineUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8ed11){super(_0x8ed11),this['view']=new k(_0x8ed11['locale'],this['editor']['config']['get']('documentOutline.showEmptyHeadings'),this['editor']['config']['get']('documentOutline.container')),this['_currentOutlineDefinitions']=[],this['_updateActiveDefinitionFromViewportThrottled']=_0x3bda0b(this['_updateActiveDefinitionOnViewportChange']['bind'](this),0x64);}init(){const _0x140fde=this['editor'],_0x3be95e=_0x140fde['plugins']['get']('DocumentOutlineUtils');let _0x51325c=!0x1;if(this['view']['render'](),this['editor']['ui']['focusTracker']['add'](this['view']['element']),!_0x140fde['config']['get']('documentOutline.container'))throw new _0x51f806('document-outline-container-not-provided',{'editor':_0x140fde});_0x140fde['config']['get']('documentOutline.container')['appendChild'](this['view']['element']),_0x3be95e['on']('change',this['_handleOutlineChange']['bind'](this)),_0x3be95e['on']('activeItemIndex',(_0x29c242,{index:_0x521988})=>this['_setActiveViewItem'](_0x521988)),this['view']['on']('itemSelected',(_0x36dce1,_0xc135c1)=>{_0x51325c=!0x0,this['_handleItemSelected'](_0xc135c1);});const _0x1f7ddf=()=>{_0x51325c?_0x51325c=!0x1:this['_updateActiveDefinitionFromViewportThrottled']();};this['view']['listenTo'](_0x32869f['document'],'scroll',_0x1f7ddf,{'useCapture':!0x0}),_0x491987(_0x140fde['ui']['shadowRootRegistry'],{'emitter':this['view'],'event':'scroll','callback':_0x1f7ddf,'listenerOptions':{'useCapture':!0x0}}),this['view']['listenTo'](_0x32869f['window'],'resize',this['_updateActiveDefinitionFromViewportThrottled'],{'useCapture':!0x0});}afterInit(){!async function(_0x32bf73){const _0x1145be='uizTdvyBIa4RKsnOYmEXGMfjehwJQqbPSCk7DtZgF58Lxl29Ho6cAUW1pV3Nr0',_0x3ff68d=0x79788,_0x321900={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0xb3270e(_0x390c79){const _0x2acc6d=new window['Promise'](_0x46e55e=>{_0x390c79['once']('ready',_0x46e55e);}),_0x19ba38=window['Date']['now'](),_0x1fd461=_0x390c79['config']['get']('licenseKey');async function _0x5f087a(){let _0x3fcc12,_0x1b0cdb=null,_0x3396f5=null;try{return'GPL'==_0x1fd461?'NotAllowed':(_0x3fcc12=_0x1b2eb0(),_0x3fcc12?(_0x3fcc12['usageEndpoint']&&(_0x3396f5=_0xadafce(_0x3fcc12['usageEndpoint'],_0x3fcc12['jti'])),await _0x324524()?_0x831d5()?_0x1ab59c()?'Expired':_0x1f551a()?('evaluation'==_0x3fcc12['licenseType']&&(_0x1b0cdb=_0x823481('EvaluationLimit')),await _0x2e5c04()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x1ab59c(){const _0x1c4183=['evaluation','trial']['includes'](_0x3fcc12['licenseType'])?_0x19ba38/0x3e8:0xe10*_0x3ff68d;return _0x3fcc12['exp']<_0x1c4183;}function _0x831d5(){const _0x354bcb=_0x3fcc12['features'];return!!_0x354bcb&&(!!_0x354bcb['includes']('*')||(!!_0x354bcb['includes']('DO')||(!!_0x354bcb['includes']('PP')||!(!_0x354bcb['includes']('TRILIUM')||!_0x2b77bd()))));}function _0x1f551a(){const _0x29bf42=_0x3fcc12['licensedHosts'];if(!_0x29bf42||0x0==_0x29bf42['length'])return!0x0;const {hostname:_0x5b35df}=new URL(window['location']['href']);if(_0x29bf42['includes'](_0x5b35df))return!0x0;const _0x272ed1=_0x5b35df['split']('.');return _0x29bf42['filter'](_0x33692d=>_0x33692d['includes']('*'))['map'](_0x53ecb5=>_0x53ecb5['split']('.'))['filter'](_0x10e95c=>_0x10e95c['length']<=_0x272ed1['length'])['map'](_0xed2b7b=>Array(_0x272ed1['length']-_0xed2b7b['length'])['fill']('*'===_0xed2b7b[0x0]?'*':'')['concat'](_0xed2b7b))['some'](_0x307610=>_0x272ed1['every']((_0x4ef074,_0x1f79ec)=>_0x307610[_0x1f79ec]===_0x4ef074||'*'===_0x307610[_0x1f79ec]));}function _0x2e5c04(){return _0x1b0cdb&&_0x3396f5?new window['Promise']((_0x18c9cb,_0x4c9668)=>{_0x1b0cdb['then'](_0x18c9cb,_0x4c9668),_0x3396f5['then'](_0x2f1cb8=>{'Valid'!=_0x2f1cb8&&_0x18c9cb(_0x2f1cb8);},_0x4c9668);}):_0x1b0cdb||_0x3396f5||'Valid';}}function _0xadafce(_0x31bbb5,_0x5cde08){return new window['Promise'](_0xacf5ab=>{if(_0x21ba55())return _0xacf5ab('Valid');_0x585d2c(),_0x390c79['decorate']('_sendUsageRequest');let _0x33fc85=!0x1;const _0x17a502=_0x26e2cf();function _0x4f7588(_0x4b67d0){return!!_0x4b67d0&&('object'==typeof _0x4b67d0||'function'==typeof _0x4b67d0)&&'function'==typeof _0x4b67d0['then']&&'function'==typeof _0x4b67d0['catch'];}function _0x3d7f0b(_0x53eb75){_0x45f780(_0x53eb75)['then'](_0x11b1da=>_0x11b1da&&'ok'==_0x11b1da['status']?_0xdbb48f(_0x1c08fd(_0x17a502+_0x5cde08))!=_0x11b1da['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x250deb=>(_0x507c65(),_0x250deb),()=>{const _0x12ab3b=_0x3f41c1();return null==_0x12ab3b?(_0x507c65(),'Valid'):_0x19ba38-_0x12ab3b>0x240c8400?'UsageLimit':'Valid';})['then'](_0xacf5ab)['catch'](()=>{_0xacf5ab('UsageLimit');});const _0x3fe532=0x36ee80;function _0x507c65(){const _0x443c7f='llct-'+_0xdbb48f(_0x1c08fd(_0x31bbb5)),_0x2f43b5=_0x2901fc(_0xdbb48f(window['Math']['ceil'](_0x19ba38/_0x3fe532)));window['localStorage']['setItem'](_0x443c7f,_0x2f43b5);}function _0x3f41c1(){const _0x34e703='llct-'+_0xdbb48f(_0x1c08fd(_0x31bbb5)),_0x5eb78c=window['localStorage']['getItem'](_0x34e703);return _0x5eb78c?window['parseInt'](_0x2901fc(_0x5eb78c),0x10)*_0x3fe532:null;}function _0x45f780(_0x270643){return new window['Promise']((_0x42a518,_0x5c92ed)=>{_0x270643['then'](_0x42a518,_0x5c92ed),window['setTimeout'](_0x5c92ed,0x1d4c0);});}}_0x390c79['on']('_sendUsageRequest',(_0x1124f7,_0x2607a8)=>{if(_0x2607a8[0x0]!=_0x31bbb5)return _0xacf5ab('UsageLimit');_0x2607a8[0x1]={..._0x2607a8[0x1],'requestId':_0x17a502};},{'priority':'high'}),_0x390c79['on']('_sendUsageRequest',_0x1f711d=>{_0x4f7588(_0x1f711d['return'])&&(_0x33fc85=!0x0,_0x3d7f0b(_0x1f711d['return']));},{'priority':'low'}),_0x2acc6d['then'](()=>{_0x33fc85||_0xacf5ab('UsageLimit');});});function _0x21ba55(){return'auto'==_0x390c79['editing']['view']['_overlayModeHint'];}function _0x585d2c(){_0x390c79['editing']['view']['_overlayModeHint']='auto';}}function _0x823481(_0x58b754){const _0x322217=[new window['Promise'](_0x373e3e=>setTimeout(_0x373e3e,0x93ecc)),_0x2acc6d['then'](()=>new window['Promise'](_0x53ccb6=>{let _0x186d8e=0x0;_0x390c79['model']['on']('applyOperation',(_0xe5e27,_0x283af6)=>{_0x283af6[0x0]['isDocumentOperation']&&_0x186d8e++,0x5e8==_0x186d8e&&(_0x53ccb6(),_0xe5e27['off']());});}))];return window['Promise']['race'](_0x322217)['then'](()=>_0x58b754);}async function _0x41685d(){await _0x2acc6d,_0x390c79['model']['change']=_0x5b9354,_0x390c79['model']['enqueueChange']=_0x5b9354,_0x390c79['enableReadOnlyMode']('model');}function _0x2b77bd(){return window['glob']&&window['glob']['triliumVersion'];}function _0xd08b2e(_0x9757b2){const _0x1a1a3e=_0x2b79ca();_0x390c79[_0x1a1a3e]='documentOutlineLicenseKey'+_0x9757b2,'Valid'!=_0x9757b2&&_0x41685d();}function _0x2b79ca(){const _0x1c2a7a=window['String'](window['performance']['now']())['replace']('.','');let _0x144b21='u';for(let _0x47806f=0x0;_0x47806f<_0x1c2a7a['length'];_0x47806f+=0x2){let _0x53b6b6=window['parseInt'](_0x1c2a7a['substring'](_0x47806f,_0x47806f+0x2));_0x53b6b6>=0x3e&&(_0x53b6b6-=0x3e),_0x144b21+=_0x1145be[_0x53b6b6];}return _0x144b21;}function _0x1b2eb0(){const _0x2e04fd=_0x1fd461['split']('.');if(0x3!=_0x2e04fd['length'])return null;return _0x36c661(_0x2e04fd[0x1]);function _0x36c661(_0x8efe93){const _0x374a2c=_0x42c5a9(_0x8efe93);return _0x374a2c&&_0x562ae0()?_0x374a2c:null;function _0x562ae0(){const _0xa8b99c=_0x374a2c['jti'],_0x18ef79=window['parseInt'](_0xa8b99c['substring'](_0xa8b99c['length']-0x8),0x10),_0x5c0615={..._0x374a2c,'jti':_0xa8b99c['substring'](0x0,_0xa8b99c['length']-0x8)};return delete _0x5c0615['vc'],_0x1c08fd(_0x5c0615)==_0x18ef79;}}}async function _0x324524(){let _0x43fc60=!0x0;try{const [_0x3b9f6d,_0x40e09b,_0x28be98]=_0x1fd461['split']('.');return _0x2d8629(_0x3b9f6d),await _0xea1930(_0x3b9f6d,_0x40e09b,_0x28be98),_0x43fc60;}catch{return!0x1;}function _0x2d8629(_0x4637e7){const _0x245f21=_0x42c5a9(_0x4637e7);_0x245f21&&'ES256'==_0x245f21['alg']||(_0x43fc60=!0x1);}async function _0xea1930(_0x3a72f0,_0x3b1b00,_0x3ebb0a){const _0x58035b=window['Uint8Array']['from'](_0x39f6a1(_0x3ebb0a),_0x234196=>_0x234196['charCodeAt'](0x0)),_0x16cb29=new window['TextEncoder']()['encode'](_0x3a72f0+'.'+_0x3b1b00),_0x33e93a=window['crypto']['subtle'];if(!_0x33e93a)return;const _0x49e1f1=await _0x33e93a['importKey']('jwk',_0x321900,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x33e93a['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x49e1f1,_0x58035b,_0x16cb29)||(_0x43fc60=!0x1);}}function _0x42c5a9(_0x1d50b4){return _0x1d50b4['startsWith']('ey')?JSON['parse'](_0x39f6a1(_0x1d50b4)):null;}function _0x39f6a1(_0xfee47f){return window['atob'](_0xfee47f['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1c08fd(_0x8ed15e){let _0x4dcc1d=0x1505;function _0x3f6033(_0x48dfbe){for(let _0x349d88=0x0;_0x349d88<_0x48dfbe['length'];_0x349d88++){const _0x3df62b=_0x48dfbe['charCodeAt'](_0x349d88);_0x4dcc1d=(_0x4dcc1d<<0x5)+_0x4dcc1d+_0x3df62b,_0x4dcc1d&=_0x4dcc1d;}}function _0x3e9f3a(_0x3cfc0b){Array['isArray'](_0x3cfc0b)?_0x3cfc0b['forEach'](_0x3e9f3a):_0x3cfc0b&&'object'==typeof _0x3cfc0b?Object['entries'](_0x3cfc0b)['sort']()['forEach'](([_0x2bcc01,_0x2c6dcd])=>{_0x3f6033(_0x2bcc01),_0x3e9f3a(_0x2c6dcd);}):_0x3f6033(window['String'](_0x3cfc0b));}return _0x3e9f3a(_0x8ed15e),_0x4dcc1d>>>0x0;}function _0xdbb48f(_0x478b37){return _0x478b37['toString'](0x10)['padStart'](0x8,'0');}function _0x2901fc(_0x1d0de3){return _0x1d0de3['split']('')['reverse']()['join']('');}function _0x5b9354(){}_0xd08b2e(await _0x5f087a());}_0xb3270e(_0x32bf73['editor']);}(this);}destroy(){super['destroy'](),this['view']['destroy'](),this['_updateActiveDefinitionFromViewportThrottled']['cancel']();}_handleOutlineChange(_0x491b2a,{outlineDefinitions:_0x1f646d,outlineChanges:_0x599bf4}){this['_currentOutlineDefinitions']=_0x1f646d,this['view']['sync'](_0x599bf4);}_setActiveViewItem(_0x30a991){this['_currentOutlineDefinitions']['length']&&this['_currentOutlineDefinitions'][_0x30a991]&&(this['view']['activeItemIndex']=_0x30a991);}_handleItemSelected(_0x1e3745){const _0x1d1913=this['_currentOutlineDefinitions'][_0x1e3745]['modelElement'];this['editor']['model']['change'](_0x1fabe7=>{_0x1fabe7['setSelection'](_0x1d1913,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0}),this['editor']['editing']['view']['focus'](),this['_setActiveViewItem'](_0x1e3745);}_updateActiveDefinitionOnViewportChange(){const _0x2945ec=this['editor'];let _0x5bb606;for(const _0x4fbb87 of _0x2945ec['model']['document']['getRootNames']()){const _0xa0754=_0x2945ec['editing']['view']['getDomRoot'](_0x4fbb87),_0xb898bd=_0xa0754&&new _0x298f9a(_0xa0754)['getVisible']();if(_0xb898bd){const _0x10331a=new _0x298f9a(_0x32869f['window'])['getIntersection'](_0xb898bd);_0x10331a&&(_0x5bb606=_0x10331a['top']+0.25*_0x10331a['height']);}}if(void 0x0===_0x5bb606)return;const _0x1f681e=E(_0x2945ec['editing'],this['_currentOutlineDefinitions'],_0x5bb606);_0x1f681e?this['_setActiveViewItem'](this['_currentOutlineDefinitions']['indexOf'](_0x1f681e)):this['_setActiveViewItem'](-0x1);}};function E(_0x1546fb,_0x369c10,_0x46e9d5,_0x1d7abf=0x0,_0xebbe81=_0x369c10['length']-0x1){const _0x2c17e6=Math['floor'](_0x1d7abf+(_0xebbe81-_0x1d7abf)/0x2);if(_0xebbe81>=_0x1d7abf){const _0x365255=_0x369c10[_0x2c17e6],_0x42be69=_0x1546fb['mapper']['toViewElement'](_0x365255['modelElement']);if(!_0x42be69)return null;const _0x4f9055=_0x1546fb['view']['domConverter']['mapViewToDom'](_0x42be69);return new _0x298f9a(_0x4f9055)['bottom']>_0x46e9d5?E(_0x1546fb,_0x369c10,_0x46e9d5,_0x1d7abf,_0x2c17e6-0x1):E(_0x1546fb,_0x369c10,_0x46e9d5,_0x2c17e6+0x1,_0xebbe81);}return _0x2c17e6<0x0?null:_0x369c10[_0x2c17e6];}var K=class extends _0xe076e8{['licenseKey'];_licenseKeyCheckInterval;static get requires(){return[L,x];}static get['pluginName'](){return'DocumentOutline';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x35706e=[this['editor']];for(const _0x28c623 of _0x35706e){let _0x1615b4;for(const _0x17fa70 in _0x28c623){const _0x4a5a1f=_0x17fa70,_0x1b3321=_0x28c623[_0x4a5a1f];if('documentOutlineLicenseKeyValid'==_0x1b3321||'documentOutlineLicenseKeyInvalid'==_0x1b3321||'documentOutlineLicenseKeyExpired'==_0x1b3321||'documentOutlineLicenseKeyDomainLimit'==_0x1b3321||'documentOutlineLicenseKeyNotAllowed'==_0x1b3321||'documentOutlineLicenseKeyEvaluationLimit'==_0x1b3321||'documentOutlineLicenseKeyUsageLimit'==_0x1b3321){delete _0x28c623[_0x4a5a1f],_0x1615b4=_0x1b3321,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'documentOutlineLicenseKeyInvalid'==_0x1615b4&&_0x28c623['_showLicenseError']('invalid'),'documentOutlineLicenseKeyExpired'==_0x1615b4&&_0x28c623['_showLicenseError']('expired'),'documentOutlineLicenseKeyDomainLimit'==_0x1615b4&&_0x28c623['_showLicenseError']('domainLimit'),'documentOutlineLicenseKeyNotAllowed'==_0x1615b4&&_0x28c623['_showLicenseError']('featureNotAllowed','DocumentOutline'),'documentOutlineLicenseKeyEvaluationLimit'==_0x1615b4&&_0x28c623['_showLicenseError']('evaluationLimit'),'documentOutlineLicenseKeyUsageLimit'==_0x1615b4&&_0x28c623['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},A=class extends _0x30257a{execute(){this['editor']['model']['change'](_0x6d4f4e=>{this['editor']['model']['insertObject'](_0x6d4f4e['createElement']('tableOfContents'));});}['refresh'](){const _0x471d52=this['editor']['model'],_0x2a61bc=_0x471d52['document']['selection']['getFirstPosition']();this['isEnabled']=null!==(_0x2a61bc&&_0x471d52['schema']['findAllowedParent'](_0x2a61bc,'tableOfContents'));}},N=class extends _0xe076e8{static get['pluginName'](){return'HeadingId';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}afterInit(){const _0x4bfbe6=this['editor'];if(_0x4bfbe6['config']['get']('headingId.modelAttributeName'))return;const {viewNames:_0x5c7fc9,modelNames:_0x473260}=function(_0xfd51ed){const _0x23615b=new Set(['h1','h2','h3','h4','h5','h6']),_0x43bdb4=new Set(['heading1','heading2','heading3','heading4','heading5','heading6','htmlH1','htmlH2','htmlH3','htmlH4','htmlH5','htmlH6']);if(!_0xfd51ed)return{'viewNames':_0x23615b,'modelNames':_0x43bdb4};for(const _0x13b5ec of _0xfd51ed){if('paragraph'===_0x13b5ec['model'])continue;const _0x111eaf='string'==typeof _0x13b5ec['view']?_0x13b5ec['view']:_0x13b5ec['view']['name'];_0x23615b['add'](_0x111eaf),_0x43bdb4['add'](_0x13b5ec['model']);}return{'viewNames':_0x23615b,'modelNames':_0x43bdb4};}(this['editor']['config']['get']('heading.options'));for(const _0x13d575 of _0x5c7fc9)this['_customUpcastHeadingsConversion'](_0x13d575);for(const _0x196eb1 of _0x473260)this['_customDataDowncastHeadingsConversion'](_0x196eb1),_0x4bfbe6['model']['schema']['isRegistered'](_0x196eb1)&&_0x4bfbe6['model']['schema']['extend'](_0x196eb1,{'allowAttributes':'headingId'});this['_registerHeadingIdAttributePostfixer'](_0x473260);}_customUpcastHeadingsConversion(_0x35b7d2){this['editor']['conversion']['for']('upcast')['add'](_0x1d2d0a=>_0x1d2d0a['on']('element:'+_0x35b7d2,(_0x1bfa1b,_0x1930e0,_0x493c5a)=>{const {consumable:_0x20e6bb,writer:_0x150657}=_0x493c5a,_0x3a4e6b=_0x1930e0['viewItem']['getAttribute']('id'),_0xf54134=_0x1930e0['modelRange']?.['getContainedElement']();if(_0xf54134)return _0x3a4e6b&&_0x3a4e6b['length']||_0xf54134['hasAttribute']('headingId')?void(_0x20e6bb['consume'](_0x1930e0['viewItem'],{'attributes':['id']})&&_0x150657['setAttribute']('headingId',_0x3a4e6b,_0xf54134)):(_0x20e6bb['consume'](_0x1930e0['viewItem'],{'attributes':['id']}),void _0x150657['setAttribute']('headingId',_0x26e2cf(),_0xf54134));},{'priority':_0x47b44a['get']('low')+0.5}));}_customDataDowncastHeadingsConversion(_0x385507){this['editor']['conversion']['for']('downcast')['add'](_0x5e37ce=>_0x5e37ce['on']('attribute:headingId:'+_0x385507,(_0x57f068,_0x1a09d8,_0x215c16)=>{if(!_0x215c16['consumable']['consume'](_0x1a09d8['item'],_0x57f068['name']))return;const _0x358dc0=_0x1a09d8['item']['getAttribute']('headingId'),_0x3e9df3=_0x215c16['mapper']['toViewElement'](_0x1a09d8['item']);_0x215c16['writer']['setAttribute']('id',_0x358dc0,_0x3e9df3);}));}_registerHeadingIdAttributePostfixer(_0x34e55d){const _0x5c470e=this['editor'],_0x5348ad=new Set(),_0x9beb00=new Set();function _0x2527b9(_0x417332,_0xec4906){const _0x2ca500=_0x26e2cf();return _0x9beb00['add'](_0x2ca500),_0x417332['setAttribute']('headingId',_0x2ca500,_0xec4906),_0x2ca500;}function _0x4ba3a2(_0x29f8f1,_0x52e4b2){_0x29f8f1['removeAttribute']('headingId',_0x52e4b2);}_0x5c470e['model']['document']['registerPostFixer'](_0x49ff50=>{const _0x132bb0=_0x5c470e['model']['document']['differ']['getChanges']();let _0x4dba91=!0x1;for(const _0x212f88 of _0x132bb0)if('insert'==_0x212f88['type']&&_0x212f88['name']){if(_0x34e55d['has'](_0x212f88['name'])){const _0x17abb6=_0x212f88['attributes']['get']('headingId');'string'==typeof _0x17abb6?_0x5348ad['has'](_0x17abb6)?(_0x2527b9(_0x49ff50,_0x212f88['position']['nodeAfter']),_0x4dba91=!0x0):_0x9beb00['add'](_0x17abb6):(_0x2527b9(_0x49ff50,_0x212f88['position']['nodeAfter']),_0x4dba91=!0x0);}else'string'==typeof _0x212f88['attributes']['get']('headingId')&&(_0x4ba3a2(_0x49ff50,_0x212f88['position']['nodeAfter']),_0x4dba91=!0x0);}else{if('remove'==_0x212f88['type']){const _0x4338f6=_0x212f88['attributes']['get']('headingId');'string'==typeof _0x4338f6&&_0x5348ad['delete'](_0x4338f6);}}return _0x4dba91;}),_0x5c470e['model']['document']['on']('change',()=>{_0x9beb00['forEach'](_0x5907b0=>_0x5348ad['add'](_0x5907b0)),_0x9beb00['clear']();});}},D=class extends _0xe076e8{static get['pluginName'](){return'TableOfContentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[_0x500037,L,N];}_currentOutlineDefinitions;_tableOfContentsElements;_headingIdModelAttributeName;constructor(_0x461672){super(_0x461672),this['_currentOutlineDefinitions']=[],this['_tableOfContentsElements']=new Set(),this['_headingIdModelAttributeName']='headingId';}init(){const _0x292081=this['editor'],_0x10104b=_0x292081['editing']['view']['document'];_0x292081['config']['get']('headingId.modelAttributeName')&&(this['_headingIdModelAttributeName']=_0x292081['config']['get']('headingId.modelAttributeName')),this['listenTo'](_0x10104b,'click',(_0x45e050,_0x17fca1)=>{if(!_0x17fca1['target'])return;const _0x5e8ba7=_0x17fca1['target']['getCustomProperty']('tableOfContentsHeadingIndex');Number['isInteger'](_0x5e8ba7)&&(_0x17fca1['domEvent']['preventDefault'](),_0x45e050['stop'](),this['_handleScrollToHeading'](_0x5e8ba7));},{'priority':'high','context':'$capture'}),this['_defineSchema'](),this['_defineConverters'](),_0x292081['commands']['add']('insertTableOfContents',new A(_0x292081));const _0x1bc3f2=_0x292081['config']['get']('tableOfContents.headings');_0x1bc3f2&&_0x1bc3f2['length']?this['listenTo'](_0x292081['model']['document'],'change:data',()=>{this['_currentOutlineDefinitions']=this['_getOutlineDefinitions'](_0x1bc3f2),this['_updateTableOfContentsElements']();}):_0x292081['plugins']['get']('DocumentOutlineUtils')['on']('change',(_0x4d7327,_0x478b0d)=>{this['_currentOutlineDefinitions']=_0x478b0d['outlineDefinitions'],this['_updateTableOfContentsElements']();}),this['listenTo'](_0x292081['model']['document'],'change',()=>{this['_trackNewToCElements']();});}afterInit(){!async function(_0x3e3072){const _0x2f921='DUA610emL4Q2kjVIvGMHgWT3uySnzPEw79oZJiCrbstcXKq85NhdfaFRxBlpOY',_0x4c42bd=0x79788,_0x2d3442={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x538c10(_0x1a8a16){const _0x4fd84f=new window['Promise'](_0x15d854=>{_0x1a8a16['once']('ready',_0x15d854);}),_0x257138=window['Date']['now'](),_0x3ff285=_0x1a8a16['config']['get']('licenseKey');async function _0x3aeda1(){let _0x4e3f0f,_0x5314f0=null,_0x420c3c=null;try{return'GPL'==_0x3ff285?'NotAllowed':(_0x4e3f0f=_0x5b5c50(),_0x4e3f0f?(_0x4e3f0f['usageEndpoint']&&(_0x420c3c=_0x50e1e4(_0x4e3f0f['usageEndpoint'],_0x4e3f0f['jti'])),await _0x1639c2()?_0xb0188d()?_0x388765()?'Expired':_0x4ca9ed()?('evaluation'==_0x4e3f0f['licenseType']&&(_0x5314f0=_0x19d92f('EvaluationLimit')),await _0x288830()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x388765(){const _0x2f2f32=['evaluation','trial']['includes'](_0x4e3f0f['licenseType'])?_0x257138/0x3e8:0xe10*_0x4c42bd;return _0x4e3f0f['exp']<_0x2f2f32;}function _0xb0188d(){const _0x5ede46=_0x4e3f0f['features'];return!!_0x5ede46&&(!!_0x5ede46['includes']('*')||(!!_0x5ede46['includes']('TOC')||(!!_0x5ede46['includes']('PP')||!(!_0x5ede46['includes']('TRILIUM')||!_0x37dbd4()))));}function _0x4ca9ed(){const _0x1fb12d=_0x4e3f0f['licensedHosts'];if(!_0x1fb12d||0x0==_0x1fb12d['length'])return!0x0;const {hostname:_0x50a248}=new URL(window['location']['href']);if(_0x1fb12d['includes'](_0x50a248))return!0x0;const _0x112222=_0x50a248['split']('.');return _0x1fb12d['filter'](_0x5db29a=>_0x5db29a['includes']('*'))['map'](_0x4866b2=>_0x4866b2['split']('.'))['filter'](_0x35cafd=>_0x35cafd['length']<=_0x112222['length'])['map'](_0xd996a3=>Array(_0x112222['length']-_0xd996a3['length'])['fill']('*'===_0xd996a3[0x0]?'*':'')['concat'](_0xd996a3))['some'](_0x5d836b=>_0x112222['every']((_0x4413c5,_0x1af26c)=>_0x5d836b[_0x1af26c]===_0x4413c5||'*'===_0x5d836b[_0x1af26c]));}function _0x288830(){return _0x5314f0&&_0x420c3c?new window['Promise']((_0x4e3fbc,_0x475835)=>{_0x5314f0['then'](_0x4e3fbc,_0x475835),_0x420c3c['then'](_0x295083=>{'Valid'!=_0x295083&&_0x4e3fbc(_0x295083);},_0x475835);}):_0x5314f0||_0x420c3c||'Valid';}}function _0x50e1e4(_0x1d1a4a,_0x3921f4){return new window['Promise'](_0x40c3c6=>{if(_0x3fd22b())return _0x40c3c6('Valid');_0x5003dd(),_0x1a8a16['decorate']('_sendUsageRequest');let _0x2c7d6e=!0x1;const _0x71170d=_0x26e2cf();function _0x3a57a0(_0x2013a9){return!!_0x2013a9&&('object'==typeof _0x2013a9||'function'==typeof _0x2013a9)&&'function'==typeof _0x2013a9['then']&&'function'==typeof _0x2013a9['catch'];}function _0x2a2627(_0x29506b){_0x1bb758(_0x29506b)['then'](_0x341f8c=>_0x341f8c&&'ok'==_0x341f8c['status']?_0xb3b170(_0x44c69d(_0x71170d+_0x3921f4))!=_0x341f8c['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x112ad0=>(_0xd747a6(),_0x112ad0),()=>{const _0x555c91=_0x1edd1f();return null==_0x555c91?(_0xd747a6(),'Valid'):_0x257138-_0x555c91>0x240c8400?'UsageLimit':'Valid';})['then'](_0x40c3c6)['catch'](()=>{_0x40c3c6('UsageLimit');});const _0x2c6fe2=0x36ee80;function _0xd747a6(){const _0x39d3c6='llct-'+_0xb3b170(_0x44c69d(_0x1d1a4a)),_0x425504=_0x18d892(_0xb3b170(window['Math']['ceil'](_0x257138/_0x2c6fe2)));window['localStorage']['setItem'](_0x39d3c6,_0x425504);}function _0x1edd1f(){const _0x3a1100='llct-'+_0xb3b170(_0x44c69d(_0x1d1a4a)),_0x4dc201=window['localStorage']['getItem'](_0x3a1100);return _0x4dc201?window['parseInt'](_0x18d892(_0x4dc201),0x10)*_0x2c6fe2:null;}function _0x1bb758(_0x3c4daa){return new window['Promise']((_0xcd2048,_0x4a39a7)=>{_0x3c4daa['then'](_0xcd2048,_0x4a39a7),window['setTimeout'](_0x4a39a7,0x1d4c0);});}}_0x1a8a16['on']('_sendUsageRequest',(_0x5aa72a,_0x3a2bdc)=>{if(_0x3a2bdc[0x0]!=_0x1d1a4a)return _0x40c3c6('UsageLimit');_0x3a2bdc[0x1]={..._0x3a2bdc[0x1],'requestId':_0x71170d};},{'priority':'high'}),_0x1a8a16['on']('_sendUsageRequest',_0x2b2890=>{_0x3a57a0(_0x2b2890['return'])&&(_0x2c7d6e=!0x0,_0x2a2627(_0x2b2890['return']));},{'priority':'low'}),_0x4fd84f['then'](()=>{_0x2c7d6e||_0x40c3c6('UsageLimit');});});function _0x3fd22b(){return'auto'==_0x1a8a16['editing']['view']['_overlayModeHint'];}function _0x5003dd(){_0x1a8a16['editing']['view']['_overlayModeHint']='auto';}}function _0x19d92f(_0x53a4a2){const _0x278f7b=[new window['Promise'](_0x664d58=>setTimeout(_0x664d58,0x93ecc)),_0x4fd84f['then'](()=>new window['Promise'](_0x2039e5=>{let _0x1eef35=0x0;_0x1a8a16['model']['on']('applyOperation',(_0x3038e6,_0x586cbd)=>{_0x586cbd[0x0]['isDocumentOperation']&&_0x1eef35++,0x5e8==_0x1eef35&&(_0x2039e5(),_0x3038e6['off']());});}))];return window['Promise']['race'](_0x278f7b)['then'](()=>_0x53a4a2);}async function _0x15ca61(){await _0x4fd84f,_0x1a8a16['model']['change']=_0x293b52,_0x1a8a16['model']['enqueueChange']=_0x293b52,_0x1a8a16['enableReadOnlyMode']('model');}function _0x37dbd4(){return window['glob']&&window['glob']['triliumVersion'];}function _0xd59a21(_0x4d43c4){const _0x19c2ce=_0x1924de();_0x1a8a16[_0x19c2ce]='tableOfContentsLicenseKey'+_0x4d43c4,'Valid'!=_0x4d43c4&&_0x15ca61();}function _0x1924de(){const _0x19fbdc=window['String'](window['performance']['now']())['replace']('.','');let _0x2ff951='D';for(let _0x45e31a=0x0;_0x45e31a<_0x19fbdc['length'];_0x45e31a+=0x2){let _0x5ab9ea=window['parseInt'](_0x19fbdc['substring'](_0x45e31a,_0x45e31a+0x2));_0x5ab9ea>=0x3e&&(_0x5ab9ea-=0x3e),_0x2ff951+=_0x2f921[_0x5ab9ea];}return _0x2ff951;}function _0x5b5c50(){const _0x1ae829=_0x3ff285['split']('.');if(0x3!=_0x1ae829['length'])return null;return _0x488dd1(_0x1ae829[0x1]);function _0x488dd1(_0x5163dd){const _0x430208=_0x1d3f41(_0x5163dd);return _0x430208&&_0x4a2e61()?_0x430208:null;function _0x4a2e61(){const _0x21a2b4=_0x430208['jti'],_0x3ec115=window['parseInt'](_0x21a2b4['substring'](_0x21a2b4['length']-0x8),0x10),_0x39365c={..._0x430208,'jti':_0x21a2b4['substring'](0x0,_0x21a2b4['length']-0x8)};return delete _0x39365c['vc'],_0x44c69d(_0x39365c)==_0x3ec115;}}}async function _0x1639c2(){let _0x1752d8=!0x0;try{const [_0x355d94,_0x2afc71,_0x34ab20]=_0x3ff285['split']('.');return _0x138704(_0x355d94),await _0x52f77b(_0x355d94,_0x2afc71,_0x34ab20),_0x1752d8;}catch{return!0x1;}function _0x138704(_0x159bf4){const _0x5cea34=_0x1d3f41(_0x159bf4);_0x5cea34&&'ES256'==_0x5cea34['alg']||(_0x1752d8=!0x1);}async function _0x52f77b(_0xfc62a7,_0x3a74af,_0x2c6895){const _0x4d9a50=window['Uint8Array']['from'](_0x421170(_0x2c6895),_0x4481c=>_0x4481c['charCodeAt'](0x0)),_0x4567d4=new window['TextEncoder']()['encode'](_0xfc62a7+'.'+_0x3a74af),_0x317df4=window['crypto']['subtle'];if(!_0x317df4)return;const _0x46df71=await _0x317df4['importKey']('jwk',_0x2d3442,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x317df4['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x46df71,_0x4d9a50,_0x4567d4)||(_0x1752d8=!0x1);}}function _0x1d3f41(_0x154635){return _0x154635['startsWith']('ey')?JSON['parse'](_0x421170(_0x154635)):null;}function _0x421170(_0x199afa){return window['atob'](_0x199afa['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x44c69d(_0x52d5e5){let _0x3c9e93=0x1505;function _0x485913(_0x4ca744){for(let _0x48f708=0x0;_0x48f708<_0x4ca744['length'];_0x48f708++){const _0x159407=_0x4ca744['charCodeAt'](_0x48f708);_0x3c9e93=(_0x3c9e93<<0x5)+_0x3c9e93+_0x159407,_0x3c9e93&=_0x3c9e93;}}function _0x188b0f(_0x4516ba){Array['isArray'](_0x4516ba)?_0x4516ba['forEach'](_0x188b0f):_0x4516ba&&'object'==typeof _0x4516ba?Object['entries'](_0x4516ba)['sort']()['forEach'](([_0x1af559,_0x1b033c])=>{_0x485913(_0x1af559),_0x188b0f(_0x1b033c);}):_0x485913(window['String'](_0x4516ba));}return _0x188b0f(_0x52d5e5),_0x3c9e93>>>0x0;}function _0xb3b170(_0x224075){return _0x224075['toString'](0x10)['padStart'](0x8,'0');}function _0x18d892(_0x34a27e){return _0x34a27e['split']('')['reverse']()['join']('');}function _0x293b52(){}_0xd59a21(await _0x3aeda1());}_0x538c10(_0x3e3072['editor']);}(this);}_updateTableOfContentsElements(){this['_tableOfContentsElements']['forEach'](_0x23ebd9=>{'$graveyard'!==_0x23ebd9['rootName']&&this['editor']['editing']['reconvertItem'](_0x23ebd9);});}_trackNewToCElements(){for(const _0x4159b5 of this['editor']['model']['document']['differ']['getChanges']({'includeChangesInGraveyard':!0x0})){if('insert'!==_0x4159b5['type']||'tableOfContents'!==_0x4159b5['name'])return;this['_tableOfContentsElements']['add'](_0x4159b5['position']['nodeAfter']);}}_getOutlineDefinitions(_0x5f6547){const _0x1a699a=this['editor'],_0x5939d9=[];for(const _0x379b3b of _0x1a699a['model']['document']['getRootNames']())_0x5ee5ab(_0x1a699a['model']['document']['getRoot'](_0x379b3b));function _0x5ee5ab(_0x2a348b){for(const _0x58f776 of _0x2a348b['getChildren']())_0x58f776['is']('element')&&(_0x5f6547['includes'](_0x58f776['name'])&&_0x5939d9['push']({'level':_0x5f6547['indexOf'](_0x58f776['name'])+0x1,'text':I(_0x58f776),'modelElement':_0x58f776}),_0x5ee5ab(_0x58f776));}return _0x5939d9;}['_defineSchema'](){this['editor']['model']['schema']['register']('tableOfContents',{'inheritAllFrom':'$blockObject'});}_defineConverters(){const _0x20b495=this['editor']['conversion'];_0x20b495['for']('upcast')['elementToElement']({'model':'tableOfContents','view':{'name':'div','classes':'table-of-contents'}}),_0x20b495['for']('dataDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x104a62,{writer:_0x47400e})=>this['_createTableOfContents'](_0x47400e,!0x0)}),_0x20b495['for']('editingDowncast')['elementToStructure']({'model':'tableOfContents','view':(_0x486559,{writer:_0x4a5480})=>{this['_tableOfContentsElements']['add'](_0x486559);const _0x10e520=this['_createTableOfContents'](_0x4a5480);return _0x2afbbe(_0x10e520,_0x4a5480,{'label':C(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(_0x381558,_0x1009d2=!0x1){const {locale:_0x1536d2}=this['editor'],_0x5dedaa=_0x381558['createContainerElement']('div',{'class':'table-of-contents'+(0x0===this['_currentOutlineDefinitions']['length']?'\x20table-of-contents_empty':''),...!_0x1009d2&&{'data-table-of-contents-label':C(_0x1536d2,'Table\x20of\x20contents')}});0x0===this['_currentOutlineDefinitions']['length']&&!0x1===_0x1009d2&&_0x381558['insert'](_0x381558['createPositionAt'](_0x5dedaa,'end'),_0x381558['createContainerElement']('p',{'class':'table-of-contents__placeholder'},[_0x381558['createText'](C(_0x1536d2,'No\x20headings\x20were\x20found\x20in\x20the\x20document.'))]));const _0x52474e=_0x1009d2?'':'['+C(_0x1536d2,'Empty\x20heading')+']';let _0x55a5e5=_0x5dedaa;return this['_currentOutlineDefinitions']['forEach']((_0x44bfee,_0x3fd68f,_0x50ce28)=>{const _0x260c35=this['editor']['model']['hasContent'](_0x44bfee['modelElement'],{'ignoreWhitespaces':!0x0}),_0x1d24ec=_0x260c35?_0x44bfee['text']:_0x52474e,_0x4f3abd=_0x44bfee['modelElement']['getAttribute'](this['_headingIdModelAttributeName']),_0x5058ff=_0x381558['createContainerElement']('a',{'href':'#'+_0x4f3abd,...!_0x1009d2&&{'tabindex':'-1'}},[_0x381558['createText'](_0x1d24ec)]),_0x586338=this['editor']['config']['get']('documentOutline.showEmptyHeadings');_0x381558['setCustomProperty']('tableOfContentsHeadingIndex',_0x3fd68f,_0x5058ff);const _0x20cdda=_0x381558['createContainerElement']('li',null,[_0x260c35||!_0x1009d2&&_0x586338?_0x5058ff:_0x381558['createText']('')]),_0x5e7fc2=_0x3fd68f?_0x50ce28[_0x3fd68f-0x1]['level']:0x0,_0x2c11d7=Math['abs'](_0x44bfee['level']-_0x5e7fc2);if(_0x44bfee['level']>_0x5e7fc2){const _0x12da3b=H(_0x20cdda,_0x2c11d7,_0x381558);_0x381558['insert'](_0x381558['createPositionAt'](_0x55a5e5,'end'),_0x12da3b);}else{const _0x231319=function(_0xf047a2,_0x1ea77a){return _0xf047a2['getAncestors']({'includeSelf':!0x0,'parentFirst':!0x0})['filter'](_0x29d8d6=>_0x29d8d6['is']('element','ol'))[_0x1ea77a];}(_0x55a5e5,_0x2c11d7);_0x381558['insert'](_0x381558['createPositionAt'](_0x231319,'end'),_0x20cdda);}_0x55a5e5=_0x20cdda;}),_0x5dedaa;}['_handleScrollToHeading'](_0x3671a7){const _0x3cd2aa=this['_currentOutlineDefinitions'][_0x3671a7]['modelElement'];this['editor']['model']['change'](_0x4c60cf=>{_0x4c60cf['setSelection'](_0x3cd2aa,0x0);}),this['editor']['editing']['view']['scrollToTheSelection']({'alignToTop':!0x0,'forceScroll':!0x0});}_redirectMapper(){return(_0x2a270f,_0x331aee)=>{const _0x56853b=_0x331aee['mapper'],_0x614fc=_0x56853b['findMappedViewAncestor'](_0x331aee['viewPosition']),_0x3bd0a1=_0x56853b['toModelElement'](_0x614fc);_0x3bd0a1['is']('element','tableOfContents')&&(_0x331aee['modelPosition']=this['editor']['model']['createPositionAt'](_0x3bd0a1,0x0),_0x2a270f['stop']());};}};function H(_0x3dc2ec,_0x3e2715,_0x202fde){return 0x1===_0x3e2715?_0x202fde['createContainerElement']('ol',null,[_0x3dc2ec]):_0x202fde['createContainerElement']('ol',null,[_0x202fde['createContainerElement']('li',null,[H(_0x3dc2ec,_0x3e2715-0x1,_0x202fde)])]);}var P=class extends _0xe076e8{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'TableOfContentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}init(){const _0x2f7922=this['editor'];_0x2f7922['ui']['componentFactory']['add']('tableOfContents',()=>{const _0x61f5f2=this['_createButton'](_0x1bea1f);return _0x61f5f2['tooltip']=!0x0,_0x61f5f2;}),_0x2f7922['ui']['componentFactory']['add']('menuBar:tableOfContents',()=>this['_createButton'](_0x22d6e0)),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x2773c7=[this['editor']];for(const _0x18a2bf of _0x2773c7){let _0xdf737;for(const _0x4927a0 in _0x18a2bf){const _0x54e503=_0x4927a0,_0x48dbb0=_0x18a2bf[_0x54e503];if('tableOfContentsLicenseKeyValid'==_0x48dbb0||'tableOfContentsLicenseKeyInvalid'==_0x48dbb0||'tableOfContentsLicenseKeyExpired'==_0x48dbb0||'tableOfContentsLicenseKeyDomainLimit'==_0x48dbb0||'tableOfContentsLicenseKeyNotAllowed'==_0x48dbb0||'tableOfContentsLicenseKeyEvaluationLimit'==_0x48dbb0||'tableOfContentsLicenseKeyUsageLimit'==_0x48dbb0){delete _0x18a2bf[_0x54e503],_0xdf737=_0x48dbb0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'tableOfContentsLicenseKeyInvalid'==_0xdf737&&_0x18a2bf['_showLicenseError']('invalid'),'tableOfContentsLicenseKeyExpired'==_0xdf737&&_0x18a2bf['_showLicenseError']('expired'),'tableOfContentsLicenseKeyDomainLimit'==_0xdf737&&_0x18a2bf['_showLicenseError']('domainLimit'),'tableOfContentsLicenseKeyNotAllowed'==_0xdf737&&_0x18a2bf['_showLicenseError']('featureNotAllowed','TableOfContents'),'tableOfContentsLicenseKeyEvaluationLimit'==_0xdf737&&_0x18a2bf['_showLicenseError']('evaluationLimit'),'tableOfContentsLicenseKeyUsageLimit'==_0xdf737&&_0x18a2bf['_showLicenseError']('usageLimit');}},0x3e8);}_createButton(_0x1e4750){const _0x5005c0=this['editor'],_0x23ab29=_0x5005c0['locale'],_0x4e6a88=_0x5005c0['commands']['get']('insertTableOfContents'),_0x5b1099=new _0x1e4750(_0x23ab29);return _0x5b1099['set']({'label':C(_0x23ab29,'Table\x20of\x20contents'),'icon':_0x24aea3}),_0x5b1099['bind']('isEnabled')['to'](_0x4e6a88,'isEnabled'),this['listenTo'](_0x5b1099,'execute',()=>{_0x5005c0['execute']('insertTableOfContents'),_0x5005c0['editing']['view']['focus']();}),_0x5b1099;}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}},U=class extends _0xe076e8{static get requires(){return[D,P];}static get['pluginName'](){return'TableOfContents';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{K as DocumentOutline,x as DocumentOutlineUI,L as DocumentOutlineUtils,N as HeadingId,U as TableOfContents,A as TableOfContentsCommand,D as TableOfContentsEditing,P as TableOfContentsUI};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-document-outline",
|
|
3
|
-
"version": "49.0.0-alpha.
|
|
3
|
+
"version": "49.0.0-alpha.5",
|
|
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": "49.0.0-alpha.
|
|
25
|
-
"@ckeditor/ckeditor5-engine": "49.0.0-alpha.
|
|
26
|
-
"@ckeditor/ckeditor5-heading": "49.0.0-alpha.
|
|
27
|
-
"@ckeditor/ckeditor5-icons": "49.0.0-alpha.
|
|
28
|
-
"@ckeditor/ckeditor5-ui": "49.0.0-alpha.
|
|
29
|
-
"@ckeditor/ckeditor5-utils": "49.0.0-alpha.
|
|
30
|
-
"@ckeditor/ckeditor5-widget": "49.0.0-alpha.
|
|
24
|
+
"@ckeditor/ckeditor5-core": "49.0.0-alpha.5",
|
|
25
|
+
"@ckeditor/ckeditor5-engine": "49.0.0-alpha.5",
|
|
26
|
+
"@ckeditor/ckeditor5-heading": "49.0.0-alpha.5",
|
|
27
|
+
"@ckeditor/ckeditor5-icons": "49.0.0-alpha.5",
|
|
28
|
+
"@ckeditor/ckeditor5-ui": "49.0.0-alpha.5",
|
|
29
|
+
"@ckeditor/ckeditor5-utils": "49.0.0-alpha.5",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "49.0.0-alpha.5",
|
|
31
31
|
"es-toolkit": "1.52.0"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|