@ckeditor/ckeditor5-footnotes 47.2.0-alpha.3 → 47.2.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.
@@ -2,4 +2,4 @@
2
2
  /*!
3
3
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var t={14:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),r=o.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},450:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=o(f),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:p,references:1})}r.push(f)}return r}function i(t,e){var o=e.domAPI(e);o.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var s=n(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=o(s[r]);e[a].references--}for(var c=n(t,i),l=0;l<s.length;l++){var u=o(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},774:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=o(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},945:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),r=o.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>Q,FootnotesClipboard:()=>_,FootnotesEditing:()=>v,FootnotesProperties:()=>Pt,FootnotesPropertiesEditing:()=>mt,FootnotesPropertiesUI:()=>Ct,FootnotesStartCommand:()=>ft,FootnotesStyleCommand:()=>at,FootnotesTracker:()=>h,FootnotesUI:()=>Y,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);function r(){const t=["delete","createRangeOn","push","_model","clear","flat","2374920Duyiku","attributes","add","_getElementKey","nodeAfter","getChanges","1748817sStsfU","element","$graveyard","rootName","1Mxrevv","slice","9yeIroA","reset","type","from","position","set","getElementKey","710902bCyzqc","17305BtTzFL","values","_elementName","626260uvRIhI","4089127azncwM","4ZmCrYE","13090jtrVcx","$text","getItems","_trackedElements","name","insert","length","6JyQxjG","remove","has","4044eoVAtZ","root","elementName","get"];return(r=function(){return t})()}function a(t,e){const o=r();return(a=function(t,e){return o[t-=271]})(t,e)}const c=a;!function(t){const e=a,o=t();for(;;)try{if(318595===parseInt(e(305))/1*(parseInt(e(314))/2)+-parseInt(e(301))/3+parseInt(e(274))/4*(parseInt(e(315))/5)+-parseInt(e(282))/6*(-parseInt(e(273))/7)+-parseInt(e(295))/8*(-parseInt(e(307))/9)+parseInt(e(272))/10+parseInt(e(275))/11*(-parseInt(e(285))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(r);class l{[c(292)];[c(271)];[c(298)];[c(278)]=new Map;constructor(t,e){const o=c;this[o(292)]=t,this[o(271)]=e[o(287)],this[o(298)]=e[o(313)]}[c(308)](){const t=c;this[t(278)][t(293)]()}[c(300)](t){const e=c,o=new Set,n=new Map;for(const i of t){if(e(280)===i[e(309)]&&e(276)!==i[e(279)]&&i[e(311)][e(299)]){const t=this[e(292)][e(290)](i[e(311)][e(299)]);for(const o of t[e(277)]()){if(!o.is(e(302),this[e(271)]))continue;const t=this[e(298)](o);n[e(284)](t)||n[e(312)](t,[]),n[e(288)](t)[e(291)](o)}}if(e(283)===i[e(309)]&&i[e(279)]===this[e(271)]){const t=this[e(298)]({getAttribute:t=>i[e(296)][e(288)](t)});o[e(297)](t)}}for(const[t,n]of this[e(278)])e(303)===n[e(286)][e(304)]&&o[e(297)](t);for(const t of o)this[e(278)][e(289)](t);for(const[t,o]of n)this[e(278)][e(312)](t,o[o[e(281)]-1]);const i=new Set;for(const[t,s]of n)o[e(284)](t)&&(i[e(297)](s[0]),s[e(281)]>1?n[e(312)](t,s[e(306)](1)):n[e(289)](t),o[e(289)](t));return{removed:Array[e(310)](o),inserted:Array[e(310)](n[e(316)]())[e(294)](),moved:Array[e(310)](i)}}}const u=d;function f(){const t=["init","setFootnoteFormatter","remove","22YhaBOF","getFootnotesDefinitionsObjectElement","createElement","_ensureFootnotesReferencesHaveProperOrder","_updateFootnoteRefCounter","_sortFootnoteDefinitions","min","createRangeOn","_footnoteDefsContainerTracker","add","getChildren","indexOf","registerPostFixer","_handleFootnoteDefinitionsChanges","77xMDuhs","compareWith","enqueueChange","6502528HNVEFl","differ","rootName","from","_updateFootnotesCounters","move","footnoteCounter","footnoteId","_handleFootnotesDefinitionsObjectSync","high","$graveyard","low","footnotesDefinitions","pluginName","isOfficialPlugin","has","append","map","_handleFootnotesDefinitionsObjectChanges","childCount","_ensureFootnotesDefinitionsContainerExists","editor","footnoteRef","find","getAttribute","footnoteInlineContent","splice","definition","paragraph","parent","_handleMovedFootnoteReference","getChanges","unshift","listenTo","isPremiumPlugin","getFootnotesFormatter","length","singleton","setAttribute","model","_footnoteRefsTracker","99icGCil","_footnotes","FootnotesTracker","change:data","168495DMtoXo","_footnotesDefinitions","reset","_footnoteDefsTracker","isEqual","config","some","reference","document","push","_handleRemoveFootnoteReferenceById","4CtxCza","insert","getRootNames","createRangeIn","footnotes.multiBlock","197148VPUSYD","end","root","_footnoteFormatter","after","_handleFootnoteReferencesChanges","671170anbjdx","footnoteDefinition","1496265uvPwyt","findIndex","12221979VFBuNQ","createPositionAt","_handleInsertedFootnoteReference","before","set","getFootnote","get","_insertEmptyFootnotesDefinitionsContainer","createPositionBefore","getFootnotes","497230DeiNMB"];return(f=function(){return t})()}function d(t,e){const o=f();return(d=function(t,e){return o[t-=345]})(t,e)}!function(t){const e=d,o=t();for(;;)try{if(496454===-parseInt(e(387))/1+-parseInt(e(391))/2*(-parseInt(e(351))/3)+parseInt(e(362))/4*(-parseInt(e(375))/5)+-parseInt(e(367))/6*(parseInt(e(405))/7)+-parseInt(e(408))/8+-parseInt(e(347))/9*(-parseInt(e(373))/10)+parseInt(e(377))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(f);class h extends t.Plugin{[u(348)]=[];[u(352)]=null;[u(370)]=null;[u(399)];[u(346)];[u(354)];static get[u(421)](){return u(349)}static get[u(422)](){return!0}static get[u(442)](){return!0}constructor(t){const e=u;super(t),this[e(399)]=new l(this[e(429)][e(345)],{elementName:e(420),getElementKey:()=>e(445)}),this[e(346)]=new l(this[e(429)][e(345)],{elementName:e(430),getElementKey:t=>t[e(432)](e(415))}),this[e(354)]=new l(this[e(429)][e(345)],{elementName:e(374),getElementKey:t=>t[e(432)](e(415))})}[u(388)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(359)][t(403)](e=>{const n=t,i=o[n(359)][n(409)][n(439)]();let s=!1;return this[n(426)](e,i)&&(s=!0),this[n(404)](e,i)&&(s=!0),this[n(372)](e,i)&&(s=!0),this[n(394)](e)&&(s=!0),this[n(416)](e)&&(s=!0),this[n(396)](e)&&(s=!0),s}),this[t(441)](o[t(359)],t(350),()=>{const e=t;o[e(407)]({isUndoable:!1},t=>{this[e(428)](t)})},{priority:t(419)}),this[t(441)](n,t(381),()=>{const e=t;this[e(348)]=[],this[e(399)][e(353)](),this[e(346)][e(353)](),this[e(354)][e(353)]()},{priority:t(417)})}[u(392)](){return this[u(352)]}[u(382)](t){const e=u;return this[e(348)][e(431)](e=>e.id===t)||null}[u(386)](){const t=u;return Array[t(411)](this[t(348)])}[u(443)](){return this[u(370)]}[u(389)](t){this[u(370)]=t}[u(412)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(348)][o(444)];i++)this[o(395)](t,i)&&(n=!0);return n}[u(384)](t,e){const o=u,n=t[o(393)](o(420),{});return t[o(424)](n,e),this[o(352)]=n,n}[u(428)](t){const e=u;if(!this[e(348)][e(444)]||this[e(352)])return;const o=this[e(348)][0][e(358)][e(369)],n=this[e(384)](t,o);for(const o of this[e(348)])o[e(435)][e(437)]||t[e(363)](o[e(435)],n,e(368));this[e(412)](t)}[u(426)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(399)][o(439)](e);if(r[o(444)]&&(this[o(352)]=r[0]),i[o(444)])if(i[o(444)]>1||this[o(352)]&&i[o(357)](t=>t!==this[o(352)])){const e=t[o(393)](o(420),{}),s=[];this[o(352)]&&s[o(360)](this[o(352)]),s[o(360)](...i),t[o(363)](e,s[0],o(380));for(const n of s)t[o(413)](t[o(365)](n),t[o(378)](e,o(368))),t[o(390)](n);this[o(352)]=e,this[o(412)](t),n=!0}else this[o(352)]=i[0];if(s[o(444)]&&o(418)===this[o(352)]?.[o(369)][o(410)]){for(const e of this[o(348)])t[o(390)](e[o(358)]),n=!0;this[o(348)]=[],this[o(352)]=null}return n}[u(404)](t,e){const o=u;let n=!1;const i=this[o(429)][o(356)][o(383)](o(366)),{inserted:s,moved:r}=this[o(354)][o(439)](e);for(const e of[...r,...s]){const s=e[o(432)](o(415)),r=this[o(382)](s);r&&(r[o(435)]=e),p(t,i,e)&&(n=!0)}return n}[u(372)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(346)][o(439)](e);for(const e of i)this[o(361)](t,e)&&(n=!0);for(const e of s)this[o(379)](t,e)&&(n=!0);for(const e of r)this[o(438)](t,e)&&(n=!0);return n}[u(416)](t){const e=u;if(!this[e(352)])return!1;let o=!1;if(this[e(352)][e(427)]!==this[e(348)][e(444)]){const n=[];for(const t of this[e(352)][e(401)]()){const i=t[e(432)](e(415));this[e(382)](i)||(n[e(440)](t),o=!0)}for(const o of n)t[e(390)](o)}const n=new Set,i=[];for(const t of this[e(352)][e(401)]()){const s=t[e(432)](e(415));n[e(423)](s)?(i[e(440)](t),o=!0):n[e(400)](s)}for(const o of i)t[e(390)](o);return this[e(352)][e(427)]||(t[e(390)](this[e(352)]),this[e(352)]=null,o=!0),o}[u(379)](t,e){const o=u;if(this[o(348)][o(431)](t=>t[o(358)]===e))return!1;let n=!1;const i=e[o(432)](o(415)),s=this[o(348)][o(376)](t=>t.id===i);-1!==s&&(t[o(390)](this[o(348)][s][o(358)]),this[o(348)][o(434)](s,1),n=!0);let r=this[o(352)]?function(t,e){const n=o;for(const o of t[n(401)]())if(o[n(432)](n(415))===e)return o;return null}(this[o(352)],i):null;r||(r=t[o(393)](o(374),{footnoteId:i}),this[o(352)]&&(t[o(363)](r,this[o(352)],o(368)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(429)][o(345)],this[o(348)],e);this[o(348)][o(434)](c,0,a);let l=c;return-1!==s&&(l=Math[o(397)](c,s)),this[o(412)](t,l)&&(n=!0),n}[u(361)](t,e){const o=u,n=this[o(348)][o(376)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(348)][n];return o(418)!==s[o(435)][o(369)][o(410)]&&(t[o(390)](s[o(435)]),i=!0),this[o(348)][o(434)](n,1),this[o(412)](t,n)&&(i=!0),i}[u(438)](t,e){const o=u,n=e[o(432)](o(415)),i=this[o(348)][o(376)](t=>t.id===n),s=this[o(348)][i];let r=!1;s[o(358)]=e,this[o(348)][o(434)](i,1);const a=m(this[o(429)][o(345)],this[o(348)],e);return this[o(348)][o(434)](a,0,s),this[o(412)](t,Math[o(397)](i,a))&&(r=!0),r}[u(395)](t,e){const o=u;if(!this[o(352)])return!1;const n=this[o(348)][e];let i;return i=this[o(370)]?this[o(370)]({footnote:n,container:this[o(352)],digits:String(this[o(348)][o(444)])[o(444)],value:e+1}):String(e+1),n[o(358)][o(432)](o(414))!=i&&(t[o(446)](o(414),i,n[o(358)]),!0)}[u(396)](t){const e=u;if(!this[e(352)]||this[e(348)][e(444)]<2)return!1;if(function(t,o){const n=e;if(t[n(444)]!==o[n(444)])return!1;for(let e=0;e<t[n(444)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(348)][e(425)](t=>t.id),Array[e(411)](this[e(352)][e(401)]())[e(425)](t=>t[e(432)](e(415)))))return!1;let o=!1;for(let n=0;n<this[e(348)][e(444)];n++){const i=this[e(348)][n],s=t[e(385)](i[e(435)]),r=t[e(378)](this[e(352)],n);s[e(355)](r)||(t[e(413)](t[e(398)](i[e(435)]),r),o=!0)}return o}[u(394)](t){const e=u;if(!this[e(348)][e(444)])return!1;const{model:o}=this[e(429)];let n=!1;for(let i=0;i<this[e(348)][e(444)]-1;i++){const s=this[e(348)][i],r=this[e(348)][i+1],a=o[e(385)](s[e(358)]),c=o[e(385)](r[e(358)]);e(371)===a[e(406)](c)&&(this[e(438)](t,s[e(358)]),i=-1,n=!0)}return n}}function p(t,e,o){const n=u;if(o[n(427)])return!1;const i=n(e?436:433);return t[n(363)](t[n(393)](i),o),!0}function m(t,e,o){const n=u;if(0===e[n(444)])return 0;const i=t[n(385)](o);for(let o=0;o<e[n(444)];o++){const s=e[o],r=t[n(385)](s[n(358)]);if(n(380)===i[n(406)](r))return o}const s=o[n(369)];let r=-1;for(let t=e[n(444)]-1;t>=0;t--)if(e[t][n(358)][n(369)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(359)][n(364)](),c=a[n(402)](s[n(410)]),l=a[c+1];if(l)for(let t=0;t<e[n(444)];t++)if(e[t][n(358)][n(369)][n(410)]===l)return t;return e[n(444)]}function g(t,e){const o=w();return(g=function(t,e){return o[t-=140]})(t,e)}function w(){const t=["test","16bkVhUG","451OIidXu","50810LaseaJ","insertObject","insert-footnote-command-executed-with-invalid-id","getItems","editor","FootnotesEditing","createElement","model","29604IAsMlY","refresh","isObject","6805771phhZJO","_moveSelectionToFootnoteDefinition","_getPositionToInsertFootnote","isEnabled","getFirstRange","825064NUxdDG","checkChild","get","isBlock","document","765AUhpmG","selection","string","footnoteId","change","88126SihQha","990296hlKUlJ","plugins","execute","footnoteRef","3mhluII","end","length","10611441yUerUa"];return(w=function(){return t})()}const y=g;!function(t){const e=g,o=t();for(;;)try{if(715930===parseInt(e(150))/1*(parseInt(e(160))/2)+-parseInt(e(155))/3*(-parseInt(e(151))/4)+parseInt(e(145))/5*(-parseInt(e(170))/6)+-parseInt(e(173))/7+parseInt(e(140))/8+parseInt(e(158))/9+-parseInt(e(162))/10*(-parseInt(e(161))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(w);class b extends t.Command{[y(171)](){const t=y,e=this[t(166)][t(169)][t(144)][t(146)],o=this[t(175)](e);this[t(176)]=!!o}[y(153)](t){const e=y,{editor:o}=this,{model:n}=o,{selection:s}=n[e(144)],r=this[e(175)](s);if(!r)return;const a=o[e(152)][e(142)](e(167)),c=t?.[e(148)]??(0,i.uid)();!function(t){const o=e;return o(147)==typeof t&&t[o(157)]>0&&!/\s/[o(159)](t)&&!/^\d/[o(159)](t)}(c)?(0,i.logWarning)(e(164)):(n[e(149)](t=>{const o=e,i=t[o(168)](o(154),{footnoteId:c});n[o(163)](i,r,null)}),a[e(174)](c))}[y(175)](t){const e=y,{model:o}=this[e(166)],{schema:n}=o,i=t[e(177)]();for(const t of i[e(165)]())if(n[e(143)](t)||n[e(172)](t))return null;const s=i[e(156)];return n[e(141)](s,e(154))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[h]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),o=window[m([68,97,116,101])][m([110,111,119])](),n=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{n[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=n[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;n[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),o[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function o(t){for(let o=0;o<t[m([108,101,110,103,116,104])];o++){const n=t[m([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function h(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function p(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let o=m([117]);for(let n=0;n<t[m([108,101,110,103,116,104])];n+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,n[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=p,n[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&o()?e:null;function o(){const t=e[m([106,116,105])],o=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),n={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete n[m([118,99])],f(n)==o}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),n[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function p(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(n){a(n)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),n=h(d(window[m([77,97,116,104])][m([99,101,105,108])](o/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,n)}function r(){const e=m([108,108,99,116,45])+d(f(t)),o=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return o?window[m([112,97,114,115,101,73,110,116])](h(o),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,o)=>{t[m([116,104,101,110])](e,o),window[m([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,o)=>{if(o[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const n=a[m([115,112,108,105,116])](m([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=l(e);o&&o[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(n),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+o),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1761955200;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](o))return!0;const n=o[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=n[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(n[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>n[m([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[m([80,114,111,109,105,115,101])])((t,o)=>{e[m([116,104,101,110])](t,o),p[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},o)}):e||p||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(h).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),o.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(h).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(i.reference,"on")}),o.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:o,editing:n}=t,{t:i}=t.locale;o.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:o})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;o.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of n.view.createRangeIn(i))t.is("$textProxy")?o.consume(t.textNode,{name:!0}):t.is("element")&&o.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),o.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),o.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:o})=>{const n=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,o),o,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",n)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:o}=t.locale,{conversion:n}=t;n.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),n.for("upcast").add(t=>{t.on("element:ol",(t,e,o)=>{const n=e.viewItem;if(!n.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!o.consumable.consume(n,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=o.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,o)=>{const n=e.viewItem;n.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&o.consumable.consume(n,{name:!0,classes:"footnotes-divider"})})}),n.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>x(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=x(n,{"data-footnotes-list-label":o("Footnotes")}),s=(0,e.toWidget)(i,n,{hasSelectionHandle:!0,label:o("Footnotes")});return n.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:o}=t,n=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,o)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!o.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=o.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!o.safeInsert(r,e.modelCursor))return;o.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(o.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),o.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(n)o.convertChildren(a,r);else{const t=o.writer.createElement("footnoteInlineContent");o.writer.insert(t,r),o.convertChildren(a,t)}o.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,o)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const o=t.document.differ,n=new Set;for(const t of o.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&n.add(e)}for(const t of n.values()){const o=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of o)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const o=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:o,t:n}=t,i=t.model.document.selection;t.keystrokes.set("Ctrl+Alt+F","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Alt+F"}]}),this.listenTo(o.view.document,"enter",(t,e)=>{const o=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(o){const n=o.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(n),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let o=!1;this.listenTo(e.view.document,"pointerdown",(t,n)=>{const{target:i}=n,s=e.view.document.selection;o=!!(i?.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n?.is("element","a"))return;if(n.parent?.is("element","sup")&&n.parent.hasClass("footnote")&&!o)return void e.preventDefault();let i=n.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:o})=>{if(!k(e))return null;if(!t)return o.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const o=e.toViewElement(t);return!!o&&k(t)!==o.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function x(t,e={}){const o=t.createEmptyElement("hr",{class:"footnotes-divider"}),n=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[o,n])}function E(t,e){const o=t.getAttribute("footnoteId"),n=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+o},function(t){const e=this.toDomElement(t);return e.textContent=n,e}),s=e.createContainerElement("sup",{id:"ref-"+o,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function P(t,o,n,{dataPipeline:i}={}){const{t:s}=n,r=t.getAttribute("footnoteId"),a=o.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?o.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(o.createEditableElement("div",{class:"footnote-content"}),o,{label:s("Footnote content.")});return o.insert(o.createPositionAt(c,0),o.createSlot()),o.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var A=o(331);const S=D;function D(t,e){const o=T();return(D=function(t,e){return o[t-=177]})(t,e)}!function(t){const e=D,o=t();for(;;)try{if(992938===-parseInt(e(242))/1*(parseInt(e(202))/2)+parseInt(e(201))/3+parseInt(e(249))/4*(-parseInt(e(184))/5)+parseInt(e(197))/6+parseInt(e(183))/7*(parseInt(e(222))/8)+-parseInt(e(186))/9+parseInt(e(236))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(T);class _ extends t.Plugin{static get[S(190)](){return S(233)}static get[S(216)](){return[v,A.ClipboardPipeline]}static get[S(226)](){return!0}static get[S(187)](){return!0}[S(243)](){this[S(185)]()}[S(185)](){const t=S;this[t(228)](),this[t(215)]()}[S(228)](){const t=S,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(207)](A.ClipboardPipeline),s=o[t(207)](h);this[t(244)](i,t(199),(o,i)=>{const r=t,a=L(n[r(245)](i[r(225)]));if(!a[r(178)])return;const c=s[r(237)](),l=a[r(232)]((t,o)=>{const n=r,i=c[n(194)](t=>t.id===o);if(i){const o=e[n(240)][n(177)](i[n(218)],{isClipboardPipeline:!0}),s=e[n(240)][n(219)][n(230)](o);t[i.id]=s}return t},Object[r(189)](null));i[r(204)][r(231)](r(224),JSON[r(210)](l))})}[S(215)](){const t=S,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(213)],r=n[t(207)](A.ClipboardPipeline),a=n[t(207)](h);let c=null;this[t(244)](s[t(200)],t(206),(e,o)=>{const n=t,i=o[n(204)][n(188)](n(224));c=i?JSON[n(221)](i):null}),this[t(244)](r,t(235),(n,s)=>{const r=t,l=s[r(203)]===this[r(252)].id;l&&r(247)===s[r(251)]||o[r(211)](t=>{const n=r;let u=a[n(229)]();const f=!!u&&Array[n(182)](o[n(200)][n(234)][n(196)]())[n(227)](u);if(u&&!f&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(245)](e))n.is(o(214),o(217))&&i[o(192)](n);for(const e of i)t[o(246)](e)}(t,s[n(225)]),!c)return;const{selection:d}=o[n(200)],h=d[n(208)]()[n(241)];u&&!f||(u=function(t,e){const o=n;for(const{item:n}of t[o(245)](e))if(n.is(o(214),o(217)))return n;return null}(t,s[n(225)]),u||=a[n(179)](t,h));const p=Array[n(182)](d[n(239)]())[n(181)](L),m=function(t,e,o){const s=n,r=Object[s(189)](null);for(const{item:n}of t[s(245)](e))if(n.is(s(214),s(212))){const e=n[s(193)](s(250));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(238)](s(250),r[e],n)}return r}(t,s[n(225)],t=>{const e=n;return!l||!!a[e(180)](t)&&!p[e(227)](t)});for(const[o,i]of Object[n(220)](c)){const s=m[o]||o,r=t[n(191)](n(248),{footnoteId:s}),a=e[n(240)][n(219)][n(177)](i),c=e[n(240)][n(195)](a,r);t[n(209)](c,r),t[n(205)](r,u,n(198))}c=null})})}}function T(){const t=["content","isOfficialPlugin","includes","_handleCopyFootnotesDefinitions","getFootnotesDefinitionsObjectElement","toData","setData","reduce","FootnotesClipboard","selection","contentInsertion","3776420ulreOb","getFootnotes","setAttribute","getRanges","data","root","38pmcUrB","init","listenTo","createRangeIn","remove","drop","footnoteDefinition","39868tXkAlG","footnoteId","method","editor","toView","length","_insertEmptyFootnotesDefinitionsContainer","getFootnote","flatMap","from","28ytGqvc","810dVmwRw","_defineClipboardIntegration","10633671eugvYa","isPremiumPlugin","getData","create","pluginName","createElement","push","getAttribute","find","toModel","getSelectedBlocks","4610718joUHUP","end","outputTransformation","document","5490270ODXmEl","16018AgNQaM","sourceEditorId","dataTransfer","insert","clipboardInput","get","getFirstRange","append","stringify","change","footnoteRef","editing","element","_handlePasteFootnotesDefinitions","requires","footnotesDefinitions","definition","htmlProcessor","entries","parse","2234536wALjiV","add","application/ckeditor5-footnotes"];return(T=function(){return t})()}function L(t){const e=S,o=new Set;for(const{item:n}of t)n.is(e(214),e(212))&&o[e(223)](n[e(193)](e(250)));return Array[e(182)](o)}var V=o(311),O=o(355),N=o(450),R=o.n(N),K=o(774),M=o.n(K),j=o(265),U=o.n(j),B=o(410),z=o.n(B),W=o(238),H=o.n(W),J=o(14),X={attributes:{"data-cke":!0}};X.setAttributes=z(),X.insert=U().bind(null,"head"),X.domAPI=M(),X.insertStyleElement=H();R()(J.A,X);J.A&&J.A.locals&&J.A.locals;class Y extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",G(t,V.ButtonView)),e.add("menuBar:insertFootnote",G(t,V.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const o=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in o){const n=e,i=o[n];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&o._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function G(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof V.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:O.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}var q=Z;function $(){var t=["478872BfnnoU","85mleAln","4126jYjiKn","742516DJXODU","5048GKbzsg","pluginName","2077075lAuzFx","1629184IEmfSH","84pxdpfB","isOfficialPlugin","requires","34674BwYbet","Footnotes","isPremiumPlugin"];return($=function(){return t})()}function Z(t,e){var o=$();return(Z=function(t,e){return o[t-=444]})(t,e)}!function(t){for(var e=Z,o=t();;)try{if(204133===-parseInt(e(457))/1+-parseInt(e(445))/2*(-parseInt(e(449))/3)+parseInt(e(444))/4+parseInt(e(456))/5*(parseInt(e(452))/6)+-parseInt(e(447))/7+parseInt(e(448))/8+-parseInt(e(455))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}($);class Q extends t.Plugin{static get[q(446)](){return q(453)}static get[q(451)](){return[v,_,Y]}static get[q(450)](){return!0}static get[q(454)](){return!0}}const tt=et;function et(t,e){const o=nt();return(et=function(t,e){return o[t-=171]})(t,e)}!function(t){const e=et,o=t();for(;;)try{if(211557===parseInt(e(187))/1*(-parseInt(e(184))/2)+-parseInt(e(172))/3*(-parseInt(e(173))/4)+parseInt(e(186))/5+parseInt(e(174))/6+parseInt(e(181))/7+parseInt(e(171))/8+-parseInt(e(178))/9*(parseInt(e(185))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(nt);const ot=[tt(177),tt(183),tt(179),tt(188),tt(176),tt(175),tt(182),tt(180)];function nt(){const t=["459292uPZcFr","1341732wKKIHr","upper-alpha","lower-alpha","decimal","9iUHuvX","lower-latin","upper-roman","2552795muEnCU","lower-roman","decimal-leading-zero","46kjWVUv","5849930rZOGih","1231810sLRVet","8980ogXYRZ","upper-latin","428784bdpNER","3UyMHIw"];return(nt=function(){return t})()}function it(){const t=["54pHptne","setAttribute","get","plugins","8265702otOdOc","getFootnotesDefinitionsObjectElement","execute","22909678XjzQAX","getAttribute","value","model","_updateFootnotesCounters","127356bQeJov","6695367vFWojD","9789qyezJu","1114368TiPWJp","refresh","1330177xXUQAT","isEnabled","footnotesListStyle","10LoKZUh","105OJQJxi","586yiHMrN","change","includes"];return(it=function(){return t})()}function st(t,e){const o=it();return(st=function(t,e){return o[t-=345]})(t,e)}const rt=st;!function(t){const e=st,o=t();for(;;)try{if(879721===-parseInt(e(351))/1+parseInt(e(356))/2*(-parseInt(e(348))/3)+-parseInt(e(346))/4*(-parseInt(e(355))/5)+-parseInt(e(363))/6+parseInt(e(347))/7+-parseInt(e(349))/8*(-parseInt(e(359))/9)+parseInt(e(354))/10*(parseInt(e(366))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(it);class at extends t.Command{[rt(350)](){const t=rt,{editor:e}=this,o=e[t(362)][t(361)](h)[t(364)]();this[t(352)]=!!o,this[t(368)]=o?.[t(367)](t(353))??null}[rt(365)]({value:t}){const e=rt,{editor:o}=this,n=o[e(362)][e(361)](h),i=n[e(364)]();i&&ot[e(358)](t)&&o[e(369)][e(357)](o=>{const s=e;o[s(360)](s(353),t,i),n[s(345)](o)})}}function ct(t,e){const o=lt();return(ct=function(t,e){return o[t-=193]})(t,e)}function lt(){const t=["6811469aOaPEI","362968YyqEgb","_updateFootnotesCounters","refresh","66TzYPsv","176804FzhABW","model","12969ipVPMX","footnotesListStart","1006853zBiBvc","4869210wmVoog","2dlXYNe","54xwmBWY","change","isInteger","get","plugins","getFootnotesDefinitionsObjectElement","6JpcYPj","39192zdymUm","execute","7229380fzaiEg","value","getAttribute","setAttribute","isEnabled"];return(lt=function(){return t})()}const ut=ct;!function(t){const e=ct,o=t();for(;;)try{if(942972===-parseInt(e(199))/1*(-parseInt(e(201))/2)+parseInt(e(194))/3*(-parseInt(e(195))/4)+-parseInt(e(200))/5+-parseInt(e(208))/6*(parseInt(e(216))/7)+-parseInt(e(217))/8*(parseInt(e(202))/9)+-parseInt(e(211))/10+parseInt(e(197))/11*(parseInt(e(209))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(lt);class ft extends t.Command{[ut(193)](){const t=ut,{editor:e}=this,o=e[t(206)][t(205)](h)[t(207)]();this[t(215)]=!!o,this[t(212)]=o?.[t(213)](t(198))??null}[ut(210)]({value:t}){const e=ut,{editor:o}=this,n=o[e(206)][e(205)](h),i=n[e(207)]();i&&Number[e(204)](t)&&o[e(196)][e(203)](o=>{const s=e;o[s(214)](s(198),t,i),n[s(218)](o)})}}const dt=pt;function ht(){const t=["document","padStart","plugins","964028YBIUEh","_defineFormatter","modelCursor","getItems","139982GMaAhz","decimal","floor","model","consumable","element","list-style-type","config","mapper","footnotes-list","_defineSchema","footnotesListStyle","_getDefaultListStyle","isNaN","8904CVtPUB","item","setAttribute","getChanges","972333jeMmlJ","attribute:footnotesListStyle:footnotesDefinitions","isOfficialPlugin","max","decimal-leading-zero","_getDefaultStartIndex","503208nPPPKx","hasClass","upper-latin","attribute:footnotesListStart:footnotesDefinitions","_definePostfixer","checkAttribute","init","writer","setStyle","getAttribute","isPremiumPlugin","upper-alpha","lower-alpha","hasAttribute","$text","_updateFootnotesCounters","lower-latin","for","name","requires","1246KNKWtK","_formatFootnoteListValue","differ","upper-roman","element:ol","downcast","footnotesDefinitions","pluginName","738180URPCyb","createRangeOn","removeStyle","define","registerPostFixer","toUpperCase","extend","toLowerCase","parseInt","setFootnoteFormatter","lower-roman","consume","add","footnotesStart","schema","commands","footnotesStyle","fromCharCode","start","toViewElement","editor","footnotes.footnotesProperties.defaultStartIndex","footnotesListStart","nodeAfter","from","2434095kuvFsm","type","_defineConverters","getStyle","get","find","upcast","removeAttribute","viewItem","parent","footnotes.footnotesProperties.defaultListStyle","position","insert","getChildren","FootnotesPropertiesEditing"];return(ht=function(){return t})()}function pt(t,e){const o=ht();return(pt=function(t,e){return o[t-=192]})(t,e)}!function(t){const e=pt,o=t();for(;;)try{if(266202===parseInt(e(249))/1+parseInt(e(202))/2+-parseInt(e(267))/3+parseInt(e(245))/4+-parseInt(e(227))/5+-parseInt(e(263))/6*(-parseInt(e(194))/7)+parseInt(e(273))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ht);class mt extends t.Plugin{static get[dt(201)](){return dt(241)}static get[dt(193)](){return[v,h]}static get[dt(269)](){return!0}static get[dt(283)](){return!0}[dt(279)](){const t=dt,{editor:e}=this;e[t(256)][t(205)](t(237),t(250)),e[t(256)][t(205)](t(223),1),e[t(217)][t(214)](t(218),new at(e)),e[t(217)][t(214)](t(215),new ft(e)),this[t(259)](),this[t(229)](),this[t(246)](),this[t(277)]()}[dt(259)](){const t=dt,{editor:e}=this,{schema:o}=e[t(252)];o[t(208)](t(200),{allowAttributes:[t(260),t(224)]})}[dt(229)](){const t=dt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(290)](t(233))[t(214)](e=>{const o=t;e.on(o(198),(t,e,n)=>{const s=o,r=e[s(235)],a=e[s(247)]?.[s(236)];r[s(274)](s(258))&&a?.is(s(254),s(200))&&(function(t,e,o,n){const i=s;if(!n[i(278)](e,i(224)))return;let r=1;const a=o[i(253)][i(213)](t,{attributes:i(220)});if(a){const e=Number[i(210)](t[i(282)](i(220)),10);Number[i(262)](e)||(r=e)}!a&&e[i(286)](i(224))||o[i(280)][i(265)](i(224),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(278)](e,i(260)))return;let r=i(250),a=!1;if(o[i(253)][i(213)](t,{attributes:i(228)})){const e={1:i(250),a:i(285),A:i(284),i:i(212),I:i(197)}[t[i(282)](i(228))];e&&(r=e),a=!0}o[i(253)][i(213)](t,{styles:i(255)})&&(r=t[i(230)](i(255)),a=!0),!a&&e[i(286)](i(260))||o[i(280)][i(265)](i(260),r,e)}(r,a,n,i))})}),o[t(290)](t(199))[t(214)](e=>{const o=t;e.on(o(276),(t,e,n)=>{const i=o;if(!n[i(253)][i(213)](e[i(264)],t[i(192)]))return;const s=gt(e[i(264)],n[i(257)]),{attributeNewValue:r}=e;null==r||1===r?n[i(280)][i(234)](i(220),s):n[i(280)][i(265)](i(220),String(r),s)}),e.on(o(268),(t,e,n)=>{const i=o;if(!n[i(253)][i(213)](e[i(264)],t[i(192)]))return;const s=gt(e[i(264)],n[i(257)]),{attributeNewValue:r}=e;r&&i(250)!==r?n[i(280)][i(281)](i(255),r,s):n[i(280)][i(204)](i(255),s)})})}[dt(277)](){const t=dt,{editor:e}=this,{model:o}=e,n=e[t(244)][t(231)](h),i=this[t(261)](),s=this[t(272)]();o[t(242)][t(206)](e=>{const r=t,a=o[r(242)][r(196)][r(266)]();let c=!1;for(const t of a){if(r(239)!==t[r(228)]||r(287)===t[r(192)])continue;const n=o[r(203)](t[r(238)][r(225)]);for(const t of n[r(248)]())t.is(r(254),r(200))&&(!t[r(286)](r(224))&&o[r(216)][r(278)](t,r(224))&&(e[r(265)](r(224),s,t),c=!0),!t[r(286)](r(260))&&o[r(216)][r(278)](t,r(260))&&(e[r(265)](r(260),i,t),c=!0))}return c&&n[r(288)](e),c})}[dt(246)](){const t=dt,{editor:e}=this;e[t(244)][t(231)](h)[t(211)](e=>this[t(195)](e))}[dt(261)](){const t=dt;return this[t(222)][t(256)][t(231)](t(237))}[dt(272)](){const t=dt;return this[t(222)][t(256)][t(231)](t(223))}[dt(195)]({container:t,value:e,digits:o}){const n=dt,i=t[n(282)](n(260)),s=t[n(282)](n(224)),r=Math[n(251)](e)+(s??1)-1;switch(i){case n(271):return function(t,e){const o=n;return String(t)[o(243)](e,"0")}(r,Math[n(270)](2,o));case n(285):case n(289):return wt(r,!1);case n(284):case n(275):return wt(r,!0);case n(212):return bt(r,!1);case n(197):return bt(r,!0);default:return String(r)}}}function gt(t,e){const o=dt,n=e[o(221)](t);return Array[o(226)](n[o(240)]())[o(232)](t=>t.is(o(254),"ol")&&t[o(274)](o(258)))}function wt(t,e){const o=dt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(219)](97+t)+n,i=Math[o(251)]((i-1)/26)}return e?n[o(207)]():n}const yt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function bt(t,e){const o=dt;let n="",i=t;for(const{value:t,numeral:e}of yt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(209)]()}class vt extends V.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new V.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new V.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,o),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,V.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const o=new V.View(this.locale);return o.children=o.createCollection(),o.children.addMany(t),o.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:o.children}),o.children.delegate("execute").to(this),o.focus=function(){for(const t of this.children)if(t instanceof V.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},o.focusTracker=new i.FocusTracker,o.keystrokes=new i.KeystrokeHandler,o.render(),o.keystrokes.listenTo(o.element),this.children.add(o),o}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),o=[e],n=new V.CollapsibleView(this.locale,o);return n.set({label:t("Footnotes properties"),isCollapsed:!0}),n.buttonView.bind("isEnabled").toMany(o,"isEnabled",(...t)=>t.some(t=>t)),n.buttonView.on("change:isEnabled",(t,e,o)=>{o||(n.isCollapsed=!0)}),this.children.add(n),[e,n]}_createStartIndexPropertyView(){const{t}=this.locale,e=new V.LabeledFieldView(this.locale,V.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const o=e.fieldView.element,n=o.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid footnotes start index value."):o.checkValidity()?this.fire("footnotesListStart",{startIndex:n}):e.errorText=t(n<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var It=o(945),kt={attributes:{"data-cke":!0}};kt.setAttributes=z(),kt.insert=U().bind(null,"head"),kt.domAPI=M(),kt.insertStyleElement=H();R()(It.A,kt);It.A&&It.A.locals&&It.A.locals;class Ct extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[V.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var o;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(o=t,t=>{const{t:e}=t,n=o.commands.get("footnotesStyle"),i=(0,V.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(n,"isEnabled"),s.set({label:e("Footnotes style"),icon:O.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:o}=t.locale,n=o("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:O.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:O.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:O.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:O.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:O.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:O.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:o,icon:n,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new V.ButtonView(e);return a.set({label:o,icon:n,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new vt(t.locale,{styleGridAriaLabel:n,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=V.BalloonPanelView;n.register("footnotesDefinitions",{ariaLabel:o("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}var Ft=Et;function xt(){var t=["4505501xAcBpy","pluginName","FootnotesProperties","isPremiumPlugin","24oGvWaV","5249flDJwG","14907hbiGkJ","13610PUkrYh","9559uUnxCv","78pJRscy","isOfficialPlugin","requires","806570NIgJWC","658RJxSzc","4705212lkCnTd","232TXmssO","5368653epPuMj","24hlMBUb"];return(xt=function(){return t})()}function Et(t,e){var o=xt();return(Et=function(t,e){return o[t-=436]})(t,e)}!function(t){for(var e=Et,o=t();;)try{if(942712===parseInt(e(445))/1*(-parseInt(e(453))/2)+parseInt(e(446))/3*(-parseInt(e(437))/4)+parseInt(e(452))/5*(-parseInt(e(439))/6)+parseInt(e(440))/7+parseInt(e(444))/8*(parseInt(e(438))/9)+parseInt(e(447))/10*(-parseInt(e(448))/11)+-parseInt(e(436))/12*(-parseInt(e(449))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(xt);class Pt extends t.Plugin{static get[Ft(441)](){return Ft(442)}static get[Ft(451)](){return[mt,Ct]}static get[Ft(450)](){return!0}static get[Ft(443)](){return!0}}function At(t,e){var o=St();return(At=function(t,e){return o[t-=336]})(t,e)}function St(){var t=["120086DkZXYI","5910FDsdWN","595MbMSCW","10944LWVUkf","2890890prFnOh","316312FHKLqq","985197UDaYVd","1889928jYvPri","450EQjCMZ","9ErvRHS"];return(St=function(){return t})()}!function(t){for(var e=At,o=t();;)try{if(201855===parseInt(e(345))/1+-parseInt(e(340))/2+parseInt(e(336))/3+-parseInt(e(343))/4*(parseInt(e(338))/5)+parseInt(e(341))/6*(-parseInt(e(342))/7)+parseInt(e(337))/8*(parseInt(e(339))/9)+-parseInt(e(344))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(St)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
5
+ */(()=>{var t={14:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),r=o.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},450:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=o(f),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:p,references:1})}r.push(f)}return r}function i(t,e){var o=e.domAPI(e);o.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var s=n(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=o(s[r]);e[a].references--}for(var c=n(t,i),l=0;l<s.length;l++){var u=o(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},774:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=o(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},945:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),r=o.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>Q,FootnotesClipboard:()=>_,FootnotesEditing:()=>v,FootnotesProperties:()=>Pt,FootnotesPropertiesEditing:()=>mt,FootnotesPropertiesUI:()=>Ct,FootnotesStartCommand:()=>ft,FootnotesStyleCommand:()=>at,FootnotesTracker:()=>h,FootnotesUI:()=>Y,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);function r(){const t=["delete","createRangeOn","push","_model","clear","flat","2374920Duyiku","attributes","add","_getElementKey","nodeAfter","getChanges","1748817sStsfU","element","$graveyard","rootName","1Mxrevv","slice","9yeIroA","reset","type","from","position","set","getElementKey","710902bCyzqc","17305BtTzFL","values","_elementName","626260uvRIhI","4089127azncwM","4ZmCrYE","13090jtrVcx","$text","getItems","_trackedElements","name","insert","length","6JyQxjG","remove","has","4044eoVAtZ","root","elementName","get"];return(r=function(){return t})()}function a(t,e){const o=r();return(a=function(t,e){return o[t-=271]})(t,e)}const c=a;!function(t){const e=a,o=t();for(;;)try{if(318595===parseInt(e(305))/1*(parseInt(e(314))/2)+-parseInt(e(301))/3+parseInt(e(274))/4*(parseInt(e(315))/5)+-parseInt(e(282))/6*(-parseInt(e(273))/7)+-parseInt(e(295))/8*(-parseInt(e(307))/9)+parseInt(e(272))/10+parseInt(e(275))/11*(-parseInt(e(285))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(r);class l{[c(292)];[c(271)];[c(298)];[c(278)]=new Map;constructor(t,e){const o=c;this[o(292)]=t,this[o(271)]=e[o(287)],this[o(298)]=e[o(313)]}[c(308)](){const t=c;this[t(278)][t(293)]()}[c(300)](t){const e=c,o=new Set,n=new Map;for(const i of t){if(e(280)===i[e(309)]&&e(276)!==i[e(279)]&&i[e(311)][e(299)]){const t=this[e(292)][e(290)](i[e(311)][e(299)]);for(const o of t[e(277)]()){if(!o.is(e(302),this[e(271)]))continue;const t=this[e(298)](o);n[e(284)](t)||n[e(312)](t,[]),n[e(288)](t)[e(291)](o)}}if(e(283)===i[e(309)]&&i[e(279)]===this[e(271)]){const t=this[e(298)]({getAttribute:t=>i[e(296)][e(288)](t)});o[e(297)](t)}}for(const[t,n]of this[e(278)])e(303)===n[e(286)][e(304)]&&o[e(297)](t);for(const t of o)this[e(278)][e(289)](t);for(const[t,o]of n)this[e(278)][e(312)](t,o[o[e(281)]-1]);const i=new Set;for(const[t,s]of n)o[e(284)](t)&&(i[e(297)](s[0]),s[e(281)]>1?n[e(312)](t,s[e(306)](1)):n[e(289)](t),o[e(289)](t));return{removed:Array[e(310)](o),inserted:Array[e(310)](n[e(316)]())[e(294)](),moved:Array[e(310)](i)}}}const u=d;function f(){const t=["init","setFootnoteFormatter","remove","22YhaBOF","getFootnotesDefinitionsObjectElement","createElement","_ensureFootnotesReferencesHaveProperOrder","_updateFootnoteRefCounter","_sortFootnoteDefinitions","min","createRangeOn","_footnoteDefsContainerTracker","add","getChildren","indexOf","registerPostFixer","_handleFootnoteDefinitionsChanges","77xMDuhs","compareWith","enqueueChange","6502528HNVEFl","differ","rootName","from","_updateFootnotesCounters","move","footnoteCounter","footnoteId","_handleFootnotesDefinitionsObjectSync","high","$graveyard","low","footnotesDefinitions","pluginName","isOfficialPlugin","has","append","map","_handleFootnotesDefinitionsObjectChanges","childCount","_ensureFootnotesDefinitionsContainerExists","editor","footnoteRef","find","getAttribute","footnoteInlineContent","splice","definition","paragraph","parent","_handleMovedFootnoteReference","getChanges","unshift","listenTo","isPremiumPlugin","getFootnotesFormatter","length","singleton","setAttribute","model","_footnoteRefsTracker","99icGCil","_footnotes","FootnotesTracker","change:data","168495DMtoXo","_footnotesDefinitions","reset","_footnoteDefsTracker","isEqual","config","some","reference","document","push","_handleRemoveFootnoteReferenceById","4CtxCza","insert","getRootNames","createRangeIn","footnotes.multiBlock","197148VPUSYD","end","root","_footnoteFormatter","after","_handleFootnoteReferencesChanges","671170anbjdx","footnoteDefinition","1496265uvPwyt","findIndex","12221979VFBuNQ","createPositionAt","_handleInsertedFootnoteReference","before","set","getFootnote","get","_insertEmptyFootnotesDefinitionsContainer","createPositionBefore","getFootnotes","497230DeiNMB"];return(f=function(){return t})()}function d(t,e){const o=f();return(d=function(t,e){return o[t-=345]})(t,e)}!function(t){const e=d,o=t();for(;;)try{if(496454===-parseInt(e(387))/1+-parseInt(e(391))/2*(-parseInt(e(351))/3)+parseInt(e(362))/4*(-parseInt(e(375))/5)+-parseInt(e(367))/6*(parseInt(e(405))/7)+-parseInt(e(408))/8+-parseInt(e(347))/9*(-parseInt(e(373))/10)+parseInt(e(377))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(f);class h extends t.Plugin{[u(348)]=[];[u(352)]=null;[u(370)]=null;[u(399)];[u(346)];[u(354)];static get[u(421)](){return u(349)}static get[u(422)](){return!0}static get[u(442)](){return!0}constructor(t){const e=u;super(t),this[e(399)]=new l(this[e(429)][e(345)],{elementName:e(420),getElementKey:()=>e(445)}),this[e(346)]=new l(this[e(429)][e(345)],{elementName:e(430),getElementKey:t=>t[e(432)](e(415))}),this[e(354)]=new l(this[e(429)][e(345)],{elementName:e(374),getElementKey:t=>t[e(432)](e(415))})}[u(388)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(359)][t(403)](e=>{const n=t,i=o[n(359)][n(409)][n(439)]();let s=!1;return this[n(426)](e,i)&&(s=!0),this[n(404)](e,i)&&(s=!0),this[n(372)](e,i)&&(s=!0),this[n(394)](e)&&(s=!0),this[n(416)](e)&&(s=!0),this[n(396)](e)&&(s=!0),s}),this[t(441)](o[t(359)],t(350),()=>{const e=t;o[e(407)]({isUndoable:!1},t=>{this[e(428)](t)})},{priority:t(419)}),this[t(441)](n,t(381),()=>{const e=t;this[e(348)]=[],this[e(399)][e(353)](),this[e(346)][e(353)](),this[e(354)][e(353)]()},{priority:t(417)})}[u(392)](){return this[u(352)]}[u(382)](t){const e=u;return this[e(348)][e(431)](e=>e.id===t)||null}[u(386)](){const t=u;return Array[t(411)](this[t(348)])}[u(443)](){return this[u(370)]}[u(389)](t){this[u(370)]=t}[u(412)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(348)][o(444)];i++)this[o(395)](t,i)&&(n=!0);return n}[u(384)](t,e){const o=u,n=t[o(393)](o(420),{});return t[o(424)](n,e),this[o(352)]=n,n}[u(428)](t){const e=u;if(!this[e(348)][e(444)]||this[e(352)])return;const o=this[e(348)][0][e(358)][e(369)],n=this[e(384)](t,o);for(const o of this[e(348)])o[e(435)][e(437)]||t[e(363)](o[e(435)],n,e(368));this[e(412)](t)}[u(426)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(399)][o(439)](e);if(r[o(444)]&&(this[o(352)]=r[0]),i[o(444)])if(i[o(444)]>1||this[o(352)]&&i[o(357)](t=>t!==this[o(352)])){const e=t[o(393)](o(420),{}),s=[];this[o(352)]&&s[o(360)](this[o(352)]),s[o(360)](...i),t[o(363)](e,s[0],o(380));for(const n of s)t[o(413)](t[o(365)](n),t[o(378)](e,o(368))),t[o(390)](n);this[o(352)]=e,this[o(412)](t),n=!0}else this[o(352)]=i[0];if(s[o(444)]&&o(418)===this[o(352)]?.[o(369)][o(410)]){for(const e of this[o(348)])t[o(390)](e[o(358)]),n=!0;this[o(348)]=[],this[o(352)]=null}return n}[u(404)](t,e){const o=u;let n=!1;const i=this[o(429)][o(356)][o(383)](o(366)),{inserted:s,moved:r}=this[o(354)][o(439)](e);for(const e of[...r,...s]){const s=e[o(432)](o(415)),r=this[o(382)](s);r&&(r[o(435)]=e),p(t,i,e)&&(n=!0)}return n}[u(372)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(346)][o(439)](e);for(const e of i)this[o(361)](t,e)&&(n=!0);for(const e of s)this[o(379)](t,e)&&(n=!0);for(const e of r)this[o(438)](t,e)&&(n=!0);return n}[u(416)](t){const e=u;if(!this[e(352)])return!1;let o=!1;if(this[e(352)][e(427)]!==this[e(348)][e(444)]){const n=[];for(const t of this[e(352)][e(401)]()){const i=t[e(432)](e(415));this[e(382)](i)||(n[e(440)](t),o=!0)}for(const o of n)t[e(390)](o)}const n=new Set,i=[];for(const t of this[e(352)][e(401)]()){const s=t[e(432)](e(415));n[e(423)](s)?(i[e(440)](t),o=!0):n[e(400)](s)}for(const o of i)t[e(390)](o);return this[e(352)][e(427)]||(t[e(390)](this[e(352)]),this[e(352)]=null,o=!0),o}[u(379)](t,e){const o=u;if(this[o(348)][o(431)](t=>t[o(358)]===e))return!1;let n=!1;const i=e[o(432)](o(415)),s=this[o(348)][o(376)](t=>t.id===i);-1!==s&&(t[o(390)](this[o(348)][s][o(358)]),this[o(348)][o(434)](s,1),n=!0);let r=this[o(352)]?function(t,e){const n=o;for(const o of t[n(401)]())if(o[n(432)](n(415))===e)return o;return null}(this[o(352)],i):null;r||(r=t[o(393)](o(374),{footnoteId:i}),this[o(352)]&&(t[o(363)](r,this[o(352)],o(368)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(429)][o(345)],this[o(348)],e);this[o(348)][o(434)](c,0,a);let l=c;return-1!==s&&(l=Math[o(397)](c,s)),this[o(412)](t,l)&&(n=!0),n}[u(361)](t,e){const o=u,n=this[o(348)][o(376)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(348)][n];return o(418)!==s[o(435)][o(369)][o(410)]&&(t[o(390)](s[o(435)]),i=!0),this[o(348)][o(434)](n,1),this[o(412)](t,n)&&(i=!0),i}[u(438)](t,e){const o=u,n=e[o(432)](o(415)),i=this[o(348)][o(376)](t=>t.id===n),s=this[o(348)][i];let r=!1;s[o(358)]=e,this[o(348)][o(434)](i,1);const a=m(this[o(429)][o(345)],this[o(348)],e);return this[o(348)][o(434)](a,0,s),this[o(412)](t,Math[o(397)](i,a))&&(r=!0),r}[u(395)](t,e){const o=u;if(!this[o(352)])return!1;const n=this[o(348)][e];let i;return i=this[o(370)]?this[o(370)]({footnote:n,container:this[o(352)],digits:String(this[o(348)][o(444)])[o(444)],value:e+1}):String(e+1),n[o(358)][o(432)](o(414))!=i&&(t[o(446)](o(414),i,n[o(358)]),!0)}[u(396)](t){const e=u;if(!this[e(352)]||this[e(348)][e(444)]<2)return!1;if(function(t,o){const n=e;if(t[n(444)]!==o[n(444)])return!1;for(let e=0;e<t[n(444)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(348)][e(425)](t=>t.id),Array[e(411)](this[e(352)][e(401)]())[e(425)](t=>t[e(432)](e(415)))))return!1;let o=!1;for(let n=0;n<this[e(348)][e(444)];n++){const i=this[e(348)][n],s=t[e(385)](i[e(435)]),r=t[e(378)](this[e(352)],n);s[e(355)](r)||(t[e(413)](t[e(398)](i[e(435)]),r),o=!0)}return o}[u(394)](t){const e=u;if(!this[e(348)][e(444)])return!1;const{model:o}=this[e(429)];let n=!1;for(let i=0;i<this[e(348)][e(444)]-1;i++){const s=this[e(348)][i],r=this[e(348)][i+1],a=o[e(385)](s[e(358)]),c=o[e(385)](r[e(358)]);e(371)===a[e(406)](c)&&(this[e(438)](t,s[e(358)]),i=-1,n=!0)}return n}}function p(t,e,o){const n=u;if(o[n(427)])return!1;const i=n(e?436:433);return t[n(363)](t[n(393)](i),o),!0}function m(t,e,o){const n=u;if(0===e[n(444)])return 0;const i=t[n(385)](o);for(let o=0;o<e[n(444)];o++){const s=e[o],r=t[n(385)](s[n(358)]);if(n(380)===i[n(406)](r))return o}const s=o[n(369)];let r=-1;for(let t=e[n(444)]-1;t>=0;t--)if(e[t][n(358)][n(369)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(359)][n(364)](),c=a[n(402)](s[n(410)]),l=a[c+1];if(l)for(let t=0;t<e[n(444)];t++)if(e[t][n(358)][n(369)][n(410)]===l)return t;return e[n(444)]}function g(t,e){const o=w();return(g=function(t,e){return o[t-=140]})(t,e)}function w(){const t=["test","16bkVhUG","451OIidXu","50810LaseaJ","insertObject","insert-footnote-command-executed-with-invalid-id","getItems","editor","FootnotesEditing","createElement","model","29604IAsMlY","refresh","isObject","6805771phhZJO","_moveSelectionToFootnoteDefinition","_getPositionToInsertFootnote","isEnabled","getFirstRange","825064NUxdDG","checkChild","get","isBlock","document","765AUhpmG","selection","string","footnoteId","change","88126SihQha","990296hlKUlJ","plugins","execute","footnoteRef","3mhluII","end","length","10611441yUerUa"];return(w=function(){return t})()}const y=g;!function(t){const e=g,o=t();for(;;)try{if(715930===parseInt(e(150))/1*(parseInt(e(160))/2)+-parseInt(e(155))/3*(-parseInt(e(151))/4)+parseInt(e(145))/5*(-parseInt(e(170))/6)+-parseInt(e(173))/7+parseInt(e(140))/8+parseInt(e(158))/9+-parseInt(e(162))/10*(-parseInt(e(161))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(w);class b extends t.Command{[y(171)](){const t=y,e=this[t(166)][t(169)][t(144)][t(146)],o=this[t(175)](e);this[t(176)]=!!o}[y(153)](t){const e=y,{editor:o}=this,{model:n}=o,{selection:s}=n[e(144)],r=this[e(175)](s);if(!r)return;const a=o[e(152)][e(142)](e(167)),c=t?.[e(148)]??(0,i.uid)();!function(t){const o=e;return o(147)==typeof t&&t[o(157)]>0&&!/\s/[o(159)](t)&&!/^\d/[o(159)](t)}(c)?(0,i.logWarning)(e(164)):(n[e(149)](t=>{const o=e,i=t[o(168)](o(154),{footnoteId:c});n[o(163)](i,r,null)}),a[e(174)](c))}[y(175)](t){const e=y,{model:o}=this[e(166)],{schema:n}=o,i=t[e(177)]();for(const t of i[e(165)]())if(n[e(143)](t)||n[e(172)](t))return null;const s=i[e(156)];return n[e(141)](s,e(154))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[h]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),o=window[m([68,97,116,101])][m([110,111,119])](),n=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{n[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=n[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;n[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),o[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function o(t){for(let o=0;o<t[m([108,101,110,103,116,104])];o++){const n=t[m([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function h(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function p(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let o=m([117]);for(let n=0;n<t[m([108,101,110,103,116,104])];n+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,n[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=p,n[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&o()?e:null;function o(){const t=e[m([106,116,105])],o=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),n={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete n[m([118,99])],f(n)==o}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),n[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function p(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(n){a(n)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),n=h(d(window[m([77,97,116,104])][m([99,101,105,108])](o/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,n)}function r(){const e=m([108,108,99,116,45])+d(f(t)),o=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return o?window[m([112,97,114,115,101,73,110,116])](h(o),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,o)=>{t[m([116,104,101,110])](e,o),window[m([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,o)=>{if(o[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const n=a[m([115,112,108,105,116])](m([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=l(e);o&&o[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(n),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+o),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1762128e3;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](o))return!0;const n=o[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=n[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(n[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>n[m([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[m([80,114,111,109,105,115,101])])((t,o)=>{e[m([116,104,101,110])](t,o),p[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},o)}):e||p||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(h).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),o.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(h).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(i.reference,"on")}),o.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:o,editing:n}=t,{t:i}=t.locale;o.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:o})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;o.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of n.view.createRangeIn(i))t.is("$textProxy")?o.consume(t.textNode,{name:!0}):t.is("element")&&o.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),o.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),o.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:o})=>{const n=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,o),o,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",n)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:o}=t.locale,{conversion:n}=t;n.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),n.for("upcast").add(t=>{t.on("element:ol",(t,e,o)=>{const n=e.viewItem;if(!n.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!o.consumable.consume(n,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=o.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,o)=>{const n=e.viewItem;n.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&o.consumable.consume(n,{name:!0,classes:"footnotes-divider"})})}),n.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>x(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=x(n,{"data-footnotes-list-label":o("Footnotes")}),s=(0,e.toWidget)(i,n,{hasSelectionHandle:!0,label:o("Footnotes")});return n.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:o}=t,n=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,o)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!o.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=o.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!o.safeInsert(r,e.modelCursor))return;o.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(o.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),o.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(n)o.convertChildren(a,r);else{const t=o.writer.createElement("footnoteInlineContent");o.writer.insert(t,r),o.convertChildren(a,t)}o.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,o)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const o=t.document.differ,n=new Set;for(const t of o.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&n.add(e)}for(const t of n.values()){const o=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of o)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const o=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:o,t:n}=t,i=t.model.document.selection;t.keystrokes.set("Ctrl+Alt+F","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Alt+F"}]}),this.listenTo(o.view.document,"enter",(t,e)=>{const o=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(o){const n=o.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(n),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let o=!1;this.listenTo(e.view.document,"pointerdown",(t,n)=>{const{target:i}=n,s=e.view.document.selection;o=!!(i?.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n?.is("element","a"))return;if(n.parent?.is("element","sup")&&n.parent.hasClass("footnote")&&!o)return void e.preventDefault();let i=n.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:o})=>{if(!k(e))return null;if(!t)return o.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const o=e.toViewElement(t);return!!o&&k(t)!==o.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function x(t,e={}){const o=t.createEmptyElement("hr",{class:"footnotes-divider"}),n=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[o,n])}function E(t,e){const o=t.getAttribute("footnoteId"),n=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+o},function(t){const e=this.toDomElement(t);return e.textContent=n,e}),s=e.createContainerElement("sup",{id:"ref-"+o,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function P(t,o,n,{dataPipeline:i}={}){const{t:s}=n,r=t.getAttribute("footnoteId"),a=o.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?o.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(o.createEditableElement("div",{class:"footnote-content"}),o,{label:s("Footnote content.")});return o.insert(o.createPositionAt(c,0),o.createSlot()),o.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var A=o(331);const S=D;function D(t,e){const o=T();return(D=function(t,e){return o[t-=177]})(t,e)}!function(t){const e=D,o=t();for(;;)try{if(992938===-parseInt(e(242))/1*(parseInt(e(202))/2)+parseInt(e(201))/3+parseInt(e(249))/4*(-parseInt(e(184))/5)+parseInt(e(197))/6+parseInt(e(183))/7*(parseInt(e(222))/8)+-parseInt(e(186))/9+parseInt(e(236))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(T);class _ extends t.Plugin{static get[S(190)](){return S(233)}static get[S(216)](){return[v,A.ClipboardPipeline]}static get[S(226)](){return!0}static get[S(187)](){return!0}[S(243)](){this[S(185)]()}[S(185)](){const t=S;this[t(228)](),this[t(215)]()}[S(228)](){const t=S,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(207)](A.ClipboardPipeline),s=o[t(207)](h);this[t(244)](i,t(199),(o,i)=>{const r=t,a=L(n[r(245)](i[r(225)]));if(!a[r(178)])return;const c=s[r(237)](),l=a[r(232)]((t,o)=>{const n=r,i=c[n(194)](t=>t.id===o);if(i){const o=e[n(240)][n(177)](i[n(218)],{isClipboardPipeline:!0}),s=e[n(240)][n(219)][n(230)](o);t[i.id]=s}return t},Object[r(189)](null));i[r(204)][r(231)](r(224),JSON[r(210)](l))})}[S(215)](){const t=S,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(213)],r=n[t(207)](A.ClipboardPipeline),a=n[t(207)](h);let c=null;this[t(244)](s[t(200)],t(206),(e,o)=>{const n=t,i=o[n(204)][n(188)](n(224));c=i?JSON[n(221)](i):null}),this[t(244)](r,t(235),(n,s)=>{const r=t,l=s[r(203)]===this[r(252)].id;l&&r(247)===s[r(251)]||o[r(211)](t=>{const n=r;let u=a[n(229)]();const f=!!u&&Array[n(182)](o[n(200)][n(234)][n(196)]())[n(227)](u);if(u&&!f&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(245)](e))n.is(o(214),o(217))&&i[o(192)](n);for(const e of i)t[o(246)](e)}(t,s[n(225)]),!c)return;const{selection:d}=o[n(200)],h=d[n(208)]()[n(241)];u&&!f||(u=function(t,e){const o=n;for(const{item:n}of t[o(245)](e))if(n.is(o(214),o(217)))return n;return null}(t,s[n(225)]),u||=a[n(179)](t,h));const p=Array[n(182)](d[n(239)]())[n(181)](L),m=function(t,e,o){const s=n,r=Object[s(189)](null);for(const{item:n}of t[s(245)](e))if(n.is(s(214),s(212))){const e=n[s(193)](s(250));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(238)](s(250),r[e],n)}return r}(t,s[n(225)],t=>{const e=n;return!l||!!a[e(180)](t)&&!p[e(227)](t)});for(const[o,i]of Object[n(220)](c)){const s=m[o]||o,r=t[n(191)](n(248),{footnoteId:s}),a=e[n(240)][n(219)][n(177)](i),c=e[n(240)][n(195)](a,r);t[n(209)](c,r),t[n(205)](r,u,n(198))}c=null})})}}function T(){const t=["content","isOfficialPlugin","includes","_handleCopyFootnotesDefinitions","getFootnotesDefinitionsObjectElement","toData","setData","reduce","FootnotesClipboard","selection","contentInsertion","3776420ulreOb","getFootnotes","setAttribute","getRanges","data","root","38pmcUrB","init","listenTo","createRangeIn","remove","drop","footnoteDefinition","39868tXkAlG","footnoteId","method","editor","toView","length","_insertEmptyFootnotesDefinitionsContainer","getFootnote","flatMap","from","28ytGqvc","810dVmwRw","_defineClipboardIntegration","10633671eugvYa","isPremiumPlugin","getData","create","pluginName","createElement","push","getAttribute","find","toModel","getSelectedBlocks","4610718joUHUP","end","outputTransformation","document","5490270ODXmEl","16018AgNQaM","sourceEditorId","dataTransfer","insert","clipboardInput","get","getFirstRange","append","stringify","change","footnoteRef","editing","element","_handlePasteFootnotesDefinitions","requires","footnotesDefinitions","definition","htmlProcessor","entries","parse","2234536wALjiV","add","application/ckeditor5-footnotes"];return(T=function(){return t})()}function L(t){const e=S,o=new Set;for(const{item:n}of t)n.is(e(214),e(212))&&o[e(223)](n[e(193)](e(250)));return Array[e(182)](o)}var V=o(311),O=o(355),N=o(450),R=o.n(N),K=o(774),M=o.n(K),j=o(265),U=o.n(j),B=o(410),z=o.n(B),W=o(238),H=o.n(W),J=o(14),X={attributes:{"data-cke":!0}};X.setAttributes=z(),X.insert=U().bind(null,"head"),X.domAPI=M(),X.insertStyleElement=H();R()(J.A,X);J.A&&J.A.locals&&J.A.locals;class Y extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",G(t,V.ButtonView)),e.add("menuBar:insertFootnote",G(t,V.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const o=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in o){const n=e,i=o[n];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&o._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function G(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof V.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:O.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}var q=Z;function $(){var t=["478872BfnnoU","85mleAln","4126jYjiKn","742516DJXODU","5048GKbzsg","pluginName","2077075lAuzFx","1629184IEmfSH","84pxdpfB","isOfficialPlugin","requires","34674BwYbet","Footnotes","isPremiumPlugin"];return($=function(){return t})()}function Z(t,e){var o=$();return(Z=function(t,e){return o[t-=444]})(t,e)}!function(t){for(var e=Z,o=t();;)try{if(204133===-parseInt(e(457))/1+-parseInt(e(445))/2*(-parseInt(e(449))/3)+parseInt(e(444))/4+parseInt(e(456))/5*(parseInt(e(452))/6)+-parseInt(e(447))/7+parseInt(e(448))/8+-parseInt(e(455))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}($);class Q extends t.Plugin{static get[q(446)](){return q(453)}static get[q(451)](){return[v,_,Y]}static get[q(450)](){return!0}static get[q(454)](){return!0}}const tt=et;function et(t,e){const o=nt();return(et=function(t,e){return o[t-=171]})(t,e)}!function(t){const e=et,o=t();for(;;)try{if(211557===parseInt(e(187))/1*(-parseInt(e(184))/2)+-parseInt(e(172))/3*(-parseInt(e(173))/4)+parseInt(e(186))/5+parseInt(e(174))/6+parseInt(e(181))/7+parseInt(e(171))/8+-parseInt(e(178))/9*(parseInt(e(185))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(nt);const ot=[tt(177),tt(183),tt(179),tt(188),tt(176),tt(175),tt(182),tt(180)];function nt(){const t=["459292uPZcFr","1341732wKKIHr","upper-alpha","lower-alpha","decimal","9iUHuvX","lower-latin","upper-roman","2552795muEnCU","lower-roman","decimal-leading-zero","46kjWVUv","5849930rZOGih","1231810sLRVet","8980ogXYRZ","upper-latin","428784bdpNER","3UyMHIw"];return(nt=function(){return t})()}function it(){const t=["54pHptne","setAttribute","get","plugins","8265702otOdOc","getFootnotesDefinitionsObjectElement","execute","22909678XjzQAX","getAttribute","value","model","_updateFootnotesCounters","127356bQeJov","6695367vFWojD","9789qyezJu","1114368TiPWJp","refresh","1330177xXUQAT","isEnabled","footnotesListStyle","10LoKZUh","105OJQJxi","586yiHMrN","change","includes"];return(it=function(){return t})()}function st(t,e){const o=it();return(st=function(t,e){return o[t-=345]})(t,e)}const rt=st;!function(t){const e=st,o=t();for(;;)try{if(879721===-parseInt(e(351))/1+parseInt(e(356))/2*(-parseInt(e(348))/3)+-parseInt(e(346))/4*(-parseInt(e(355))/5)+-parseInt(e(363))/6+parseInt(e(347))/7+-parseInt(e(349))/8*(-parseInt(e(359))/9)+parseInt(e(354))/10*(parseInt(e(366))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(it);class at extends t.Command{[rt(350)](){const t=rt,{editor:e}=this,o=e[t(362)][t(361)](h)[t(364)]();this[t(352)]=!!o,this[t(368)]=o?.[t(367)](t(353))??null}[rt(365)]({value:t}){const e=rt,{editor:o}=this,n=o[e(362)][e(361)](h),i=n[e(364)]();i&&ot[e(358)](t)&&o[e(369)][e(357)](o=>{const s=e;o[s(360)](s(353),t,i),n[s(345)](o)})}}function ct(t,e){const o=lt();return(ct=function(t,e){return o[t-=193]})(t,e)}function lt(){const t=["6811469aOaPEI","362968YyqEgb","_updateFootnotesCounters","refresh","66TzYPsv","176804FzhABW","model","12969ipVPMX","footnotesListStart","1006853zBiBvc","4869210wmVoog","2dlXYNe","54xwmBWY","change","isInteger","get","plugins","getFootnotesDefinitionsObjectElement","6JpcYPj","39192zdymUm","execute","7229380fzaiEg","value","getAttribute","setAttribute","isEnabled"];return(lt=function(){return t})()}const ut=ct;!function(t){const e=ct,o=t();for(;;)try{if(942972===-parseInt(e(199))/1*(-parseInt(e(201))/2)+parseInt(e(194))/3*(-parseInt(e(195))/4)+-parseInt(e(200))/5+-parseInt(e(208))/6*(parseInt(e(216))/7)+-parseInt(e(217))/8*(parseInt(e(202))/9)+-parseInt(e(211))/10+parseInt(e(197))/11*(parseInt(e(209))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(lt);class ft extends t.Command{[ut(193)](){const t=ut,{editor:e}=this,o=e[t(206)][t(205)](h)[t(207)]();this[t(215)]=!!o,this[t(212)]=o?.[t(213)](t(198))??null}[ut(210)]({value:t}){const e=ut,{editor:o}=this,n=o[e(206)][e(205)](h),i=n[e(207)]();i&&Number[e(204)](t)&&o[e(196)][e(203)](o=>{const s=e;o[s(214)](s(198),t,i),n[s(218)](o)})}}const dt=pt;function ht(){const t=["document","padStart","plugins","964028YBIUEh","_defineFormatter","modelCursor","getItems","139982GMaAhz","decimal","floor","model","consumable","element","list-style-type","config","mapper","footnotes-list","_defineSchema","footnotesListStyle","_getDefaultListStyle","isNaN","8904CVtPUB","item","setAttribute","getChanges","972333jeMmlJ","attribute:footnotesListStyle:footnotesDefinitions","isOfficialPlugin","max","decimal-leading-zero","_getDefaultStartIndex","503208nPPPKx","hasClass","upper-latin","attribute:footnotesListStart:footnotesDefinitions","_definePostfixer","checkAttribute","init","writer","setStyle","getAttribute","isPremiumPlugin","upper-alpha","lower-alpha","hasAttribute","$text","_updateFootnotesCounters","lower-latin","for","name","requires","1246KNKWtK","_formatFootnoteListValue","differ","upper-roman","element:ol","downcast","footnotesDefinitions","pluginName","738180URPCyb","createRangeOn","removeStyle","define","registerPostFixer","toUpperCase","extend","toLowerCase","parseInt","setFootnoteFormatter","lower-roman","consume","add","footnotesStart","schema","commands","footnotesStyle","fromCharCode","start","toViewElement","editor","footnotes.footnotesProperties.defaultStartIndex","footnotesListStart","nodeAfter","from","2434095kuvFsm","type","_defineConverters","getStyle","get","find","upcast","removeAttribute","viewItem","parent","footnotes.footnotesProperties.defaultListStyle","position","insert","getChildren","FootnotesPropertiesEditing"];return(ht=function(){return t})()}function pt(t,e){const o=ht();return(pt=function(t,e){return o[t-=192]})(t,e)}!function(t){const e=pt,o=t();for(;;)try{if(266202===parseInt(e(249))/1+parseInt(e(202))/2+-parseInt(e(267))/3+parseInt(e(245))/4+-parseInt(e(227))/5+-parseInt(e(263))/6*(-parseInt(e(194))/7)+parseInt(e(273))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ht);class mt extends t.Plugin{static get[dt(201)](){return dt(241)}static get[dt(193)](){return[v,h]}static get[dt(269)](){return!0}static get[dt(283)](){return!0}[dt(279)](){const t=dt,{editor:e}=this;e[t(256)][t(205)](t(237),t(250)),e[t(256)][t(205)](t(223),1),e[t(217)][t(214)](t(218),new at(e)),e[t(217)][t(214)](t(215),new ft(e)),this[t(259)](),this[t(229)](),this[t(246)](),this[t(277)]()}[dt(259)](){const t=dt,{editor:e}=this,{schema:o}=e[t(252)];o[t(208)](t(200),{allowAttributes:[t(260),t(224)]})}[dt(229)](){const t=dt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(290)](t(233))[t(214)](e=>{const o=t;e.on(o(198),(t,e,n)=>{const s=o,r=e[s(235)],a=e[s(247)]?.[s(236)];r[s(274)](s(258))&&a?.is(s(254),s(200))&&(function(t,e,o,n){const i=s;if(!n[i(278)](e,i(224)))return;let r=1;const a=o[i(253)][i(213)](t,{attributes:i(220)});if(a){const e=Number[i(210)](t[i(282)](i(220)),10);Number[i(262)](e)||(r=e)}!a&&e[i(286)](i(224))||o[i(280)][i(265)](i(224),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(278)](e,i(260)))return;let r=i(250),a=!1;if(o[i(253)][i(213)](t,{attributes:i(228)})){const e={1:i(250),a:i(285),A:i(284),i:i(212),I:i(197)}[t[i(282)](i(228))];e&&(r=e),a=!0}o[i(253)][i(213)](t,{styles:i(255)})&&(r=t[i(230)](i(255)),a=!0),!a&&e[i(286)](i(260))||o[i(280)][i(265)](i(260),r,e)}(r,a,n,i))})}),o[t(290)](t(199))[t(214)](e=>{const o=t;e.on(o(276),(t,e,n)=>{const i=o;if(!n[i(253)][i(213)](e[i(264)],t[i(192)]))return;const s=gt(e[i(264)],n[i(257)]),{attributeNewValue:r}=e;null==r||1===r?n[i(280)][i(234)](i(220),s):n[i(280)][i(265)](i(220),String(r),s)}),e.on(o(268),(t,e,n)=>{const i=o;if(!n[i(253)][i(213)](e[i(264)],t[i(192)]))return;const s=gt(e[i(264)],n[i(257)]),{attributeNewValue:r}=e;r&&i(250)!==r?n[i(280)][i(281)](i(255),r,s):n[i(280)][i(204)](i(255),s)})})}[dt(277)](){const t=dt,{editor:e}=this,{model:o}=e,n=e[t(244)][t(231)](h),i=this[t(261)](),s=this[t(272)]();o[t(242)][t(206)](e=>{const r=t,a=o[r(242)][r(196)][r(266)]();let c=!1;for(const t of a){if(r(239)!==t[r(228)]||r(287)===t[r(192)])continue;const n=o[r(203)](t[r(238)][r(225)]);for(const t of n[r(248)]())t.is(r(254),r(200))&&(!t[r(286)](r(224))&&o[r(216)][r(278)](t,r(224))&&(e[r(265)](r(224),s,t),c=!0),!t[r(286)](r(260))&&o[r(216)][r(278)](t,r(260))&&(e[r(265)](r(260),i,t),c=!0))}return c&&n[r(288)](e),c})}[dt(246)](){const t=dt,{editor:e}=this;e[t(244)][t(231)](h)[t(211)](e=>this[t(195)](e))}[dt(261)](){const t=dt;return this[t(222)][t(256)][t(231)](t(237))}[dt(272)](){const t=dt;return this[t(222)][t(256)][t(231)](t(223))}[dt(195)]({container:t,value:e,digits:o}){const n=dt,i=t[n(282)](n(260)),s=t[n(282)](n(224)),r=Math[n(251)](e)+(s??1)-1;switch(i){case n(271):return function(t,e){const o=n;return String(t)[o(243)](e,"0")}(r,Math[n(270)](2,o));case n(285):case n(289):return wt(r,!1);case n(284):case n(275):return wt(r,!0);case n(212):return bt(r,!1);case n(197):return bt(r,!0);default:return String(r)}}}function gt(t,e){const o=dt,n=e[o(221)](t);return Array[o(226)](n[o(240)]())[o(232)](t=>t.is(o(254),"ol")&&t[o(274)](o(258)))}function wt(t,e){const o=dt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(219)](97+t)+n,i=Math[o(251)]((i-1)/26)}return e?n[o(207)]():n}const yt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function bt(t,e){const o=dt;let n="",i=t;for(const{value:t,numeral:e}of yt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(209)]()}class vt extends V.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new V.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new V.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,o),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,V.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const o=new V.View(this.locale);return o.children=o.createCollection(),o.children.addMany(t),o.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:o.children}),o.children.delegate("execute").to(this),o.focus=function(){for(const t of this.children)if(t instanceof V.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},o.focusTracker=new i.FocusTracker,o.keystrokes=new i.KeystrokeHandler,o.render(),o.keystrokes.listenTo(o.element),this.children.add(o),o}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),o=[e],n=new V.CollapsibleView(this.locale,o);return n.set({label:t("Footnotes properties"),isCollapsed:!0}),n.buttonView.bind("isEnabled").toMany(o,"isEnabled",(...t)=>t.some(t=>t)),n.buttonView.on("change:isEnabled",(t,e,o)=>{o||(n.isCollapsed=!0)}),this.children.add(n),[e,n]}_createStartIndexPropertyView(){const{t}=this.locale,e=new V.LabeledFieldView(this.locale,V.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const o=e.fieldView.element,n=o.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid footnotes start index value."):o.checkValidity()?this.fire("footnotesListStart",{startIndex:n}):e.errorText=t(n<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var It=o(945),kt={attributes:{"data-cke":!0}};kt.setAttributes=z(),kt.insert=U().bind(null,"head"),kt.domAPI=M(),kt.insertStyleElement=H();R()(It.A,kt);It.A&&It.A.locals&&It.A.locals;class Ct extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[V.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var o;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(o=t,t=>{const{t:e}=t,n=o.commands.get("footnotesStyle"),i=(0,V.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(n,"isEnabled"),s.set({label:e("Footnotes style"),icon:O.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:o}=t.locale,n=o("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:O.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:O.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:O.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:O.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:O.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:O.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:o,icon:n,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new V.ButtonView(e);return a.set({label:o,icon:n,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new vt(t.locale,{styleGridAriaLabel:n,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=V.BalloonPanelView;n.register("footnotesDefinitions",{ariaLabel:o("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}var Ft=Et;function xt(){var t=["4505501xAcBpy","pluginName","FootnotesProperties","isPremiumPlugin","24oGvWaV","5249flDJwG","14907hbiGkJ","13610PUkrYh","9559uUnxCv","78pJRscy","isOfficialPlugin","requires","806570NIgJWC","658RJxSzc","4705212lkCnTd","232TXmssO","5368653epPuMj","24hlMBUb"];return(xt=function(){return t})()}function Et(t,e){var o=xt();return(Et=function(t,e){return o[t-=436]})(t,e)}!function(t){for(var e=Et,o=t();;)try{if(942712===parseInt(e(445))/1*(-parseInt(e(453))/2)+parseInt(e(446))/3*(-parseInt(e(437))/4)+parseInt(e(452))/5*(-parseInt(e(439))/6)+parseInt(e(440))/7+parseInt(e(444))/8*(parseInt(e(438))/9)+parseInt(e(447))/10*(-parseInt(e(448))/11)+-parseInt(e(436))/12*(-parseInt(e(449))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(xt);class Pt extends t.Plugin{static get[Ft(441)](){return Ft(442)}static get[Ft(451)](){return[mt,Ct]}static get[Ft(450)](){return!0}static get[Ft(443)](){return!0}}function At(t,e){var o=St();return(At=function(t,e){return o[t-=336]})(t,e)}function St(){var t=["120086DkZXYI","5910FDsdWN","595MbMSCW","10944LWVUkf","2890890prFnOh","316312FHKLqq","985197UDaYVd","1889928jYvPri","450EQjCMZ","9ErvRHS"];return(St=function(){return t})()}!function(t){for(var e=At,o=t();;)try{if(201855===parseInt(e(345))/1+-parseInt(e(340))/2+parseInt(e(336))/3+-parseInt(e(343))/4*(parseInt(e(338))/5)+parseInt(e(341))/6*(-parseInt(e(342))/7)+parseInt(e(337))/8*(parseInt(e(339))/9)+-parseInt(e(344))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(St)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
package/dist/index.js CHANGED
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x56a762,Command as _0x38f340}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x5146b1,isWidget as _0x5eb282,toWidgetEditable as _0x4e9961,WidgetToolbarRepository as _0x4f9f42}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0xf15334,logWarning as _0x54d84b,FocusTracker as ot,KeystrokeHandler as rt,global as nt}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x4f0f0b,ClickObserver as _0x52d689}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x5e5846}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x40f8a5,ButtonView as _0x35adf5,View as _0x1f29a4,ViewCollection as _0x497dc,FocusCycler as _0x3ace6d,addKeyboardHandlingForGrid as tt,CollapsibleView as st,LabeledFieldView as it,createLabeledInputNumber as et,ContextualBalloon as _0x30e4c4,BalloonPanelView as _0xa53207,createDropdown as _0x49d87f}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x4985ca,IconListStyleDecimal as _0x504c91,IconListStyleDecimalLeadingZero as _0x22f7ed,IconListStyleLowerRoman as _0x3b396a,IconListStyleUpperRoman as _0x48cf64,IconListStyleLowerLatin as _0x5efb33,IconListStyleUpperLatin as _0xe36eb3}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x1d7dd7,_0x511b90){this['_model']=_0x1d7dd7,this['_elementName']=_0x511b90['elementName'],this['_getElementKey']=_0x511b90['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0xe4a65a){const _0x2d841d=new Set(),_0x83daf3=new Map();for(const _0x50089e of _0xe4a65a){if('insert'===_0x50089e['type']&&'$text'!==_0x50089e['name']&&_0x50089e['position']['nodeAfter']){const _0x81d637=this['_model']['createRangeOn'](_0x50089e['position']['nodeAfter']);for(const _0x8bbded of _0x81d637['getItems']()){if(!_0x8bbded['is']('element',this['_elementName']))continue;const _0x969947=this['_getElementKey'](_0x8bbded);_0x83daf3['has'](_0x969947)||_0x83daf3['set'](_0x969947,[]),_0x83daf3['get'](_0x969947)['push'](_0x8bbded);}}if('remove'===_0x50089e['type']&&_0x50089e['name']===this['_elementName']){const _0x5999a1=this['_getElementKey']({'getAttribute':_0x268049=>_0x50089e['attributes']['get'](_0x268049)});_0x2d841d['add'](_0x5999a1);}}for(const [_0x389de2,_0x5b74f0]of this['_trackedElements'])'$graveyard'===_0x5b74f0['root']['rootName']&&_0x2d841d['add'](_0x389de2);for(const _0x124751 of _0x2d841d)this['_trackedElements']['delete'](_0x124751);for(const [_0xa9fa2b,_0x5a9c2d]of _0x83daf3)this['_trackedElements']['set'](_0xa9fa2b,_0x5a9c2d[_0x5a9c2d['length']-0x1]);const _0x57f768=new Set();for(const [_0x33faee,_0x40fdfe]of _0x83daf3)_0x2d841d['has'](_0x33faee)&&(_0x57f768['add'](_0x40fdfe[0x0]),_0x40fdfe['length']>0x1?_0x83daf3['set'](_0x33faee,_0x40fdfe['slice'](0x1)):_0x83daf3['delete'](_0x33faee),_0x2d841d['delete'](_0x33faee));return{'removed':Array['from'](_0x2d841d),'inserted':Array['from'](_0x83daf3['values']())['flat'](),'moved':Array['from'](_0x57f768)};}}class c extends _0x56a762{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ed30e){super(_0x4ed30e),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x30706c=>_0x30706c['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x174bd6=>_0x174bd6['getAttribute']('footnoteId')});}['init'](){const {editor:_0x220b91}=this,{model:_0x3ed425,data:_0x4f2abe}=_0x220b91;_0x3ed425['document']['registerPostFixer'](_0x36138f=>{const _0x52440a=_0x3ed425['document']['differ']['getChanges']();let _0x112d79=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x36138f,_0x52440a)&&(_0x112d79=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x36138f,_0x52440a)&&(_0x112d79=!0x0),this['_handleFootnoteReferencesChanges'](_0x36138f,_0x52440a)&&(_0x112d79=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x36138f)&&(_0x112d79=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x36138f)&&(_0x112d79=!0x0),this['_sortFootnoteDefinitions'](_0x36138f)&&(_0x112d79=!0x0),_0x112d79;}),this['listenTo'](_0x3ed425['document'],'change:data',()=>{_0x3ed425['enqueueChange']({'isUndoable':!0x1},_0x4bf76e=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x4bf76e);});},{'priority':'low'}),this['listenTo'](_0x4f2abe,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x52ebac){return this['_footnotes']['find'](_0xe978f2=>_0xe978f2['id']===_0x52ebac)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x35bc6e){this['_footnoteFormatter']=_0x35bc6e;}['_updateFootnotesCounters'](_0x3cd7ee,_0x5c8e1e=0x0){let _0x3b0d6a=!0x1;for(let _0x192d0b=_0x5c8e1e;_0x192d0b<this['_footnotes']['length'];_0x192d0b++)this['_updateFootnoteRefCounter'](_0x3cd7ee,_0x192d0b)&&(_0x3b0d6a=!0x0);return _0x3b0d6a;}['_insertEmptyFootnotesDefinitionsContainer'](_0x4f720e,_0x46e983){const _0x4638e3=_0x4f720e['createElement']('footnotesDefinitions',{});return _0x4f720e['append'](_0x4638e3,_0x46e983),this['_footnotesDefinitions']=_0x4638e3,_0x4638e3;}['_ensureFootnotesDefinitionsContainerExists'](_0x21291f){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x169fd4=this['_footnotes'][0x0]['reference']['root'],_0x42f0d9=this['_insertEmptyFootnotesDefinitionsContainer'](_0x21291f,_0x169fd4);for(const _0x489442 of this['_footnotes'])_0x489442['definition']['parent']||_0x21291f['insert'](_0x489442['definition'],_0x42f0d9,'end');this['_updateFootnotesCounters'](_0x21291f);}['_handleFootnotesDefinitionsObjectChanges'](_0x3c217b,_0x37bed8){let _0x5d0866=!0x1;const {inserted:_0x4df4ac,removed:_0x117181,moved:_0x1a89fe}=this['_footnoteDefsContainerTracker']['getChanges'](_0x37bed8);if(_0x1a89fe['length']&&(this['_footnotesDefinitions']=_0x1a89fe[0x0]),_0x4df4ac['length']){if(_0x4df4ac['length']>0x1||this['_footnotesDefinitions']&&_0x4df4ac['some'](_0xe2a28a=>_0xe2a28a!==this['_footnotesDefinitions'])){const _0x2b95cc=_0x3c217b['createElement']('footnotesDefinitions',{}),_0x32d9cc=[];this['_footnotesDefinitions']&&_0x32d9cc['push'](this['_footnotesDefinitions']),_0x32d9cc['push'](..._0x4df4ac),_0x3c217b['insert'](_0x2b95cc,_0x32d9cc[0x0],'before');for(const _0x4a5733 of _0x32d9cc)_0x3c217b['move'](_0x3c217b['createRangeIn'](_0x4a5733),_0x3c217b['createPositionAt'](_0x2b95cc,'end')),_0x3c217b['remove'](_0x4a5733);this['_footnotesDefinitions']=_0x2b95cc,this['_updateFootnotesCounters'](_0x3c217b),_0x5d0866=!0x0;}else this['_footnotesDefinitions']=_0x4df4ac[0x0];}if(_0x117181['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x35e7df of this['_footnotes'])_0x3c217b['remove'](_0x35e7df['reference']),_0x5d0866=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x5d0866;}['_handleFootnoteDefinitionsChanges'](_0x28f87e,_0x25dc04){let _0x1ac492=!0x1;const _0xab187=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x54a4ec,moved:_0x4188a5}=this['_footnoteDefsTracker']['getChanges'](_0x25dc04);for(const _0x185056 of[..._0x4188a5,..._0x54a4ec]){const _0x132fe2=_0x185056['getAttribute']('footnoteId'),_0x19a8f1=this['getFootnote'](_0x132fe2);_0x19a8f1&&(_0x19a8f1['definition']=_0x185056),_(_0x28f87e,_0xab187,_0x185056)&&(_0x1ac492=!0x0);}return _0x1ac492;}['_handleFootnoteReferencesChanges'](_0x5f1d1e,_0x49bcd4){let _0x43b4f9=!0x1;const {removed:_0x59da72,inserted:_0x304739,moved:_0x5d4720}=this['_footnoteRefsTracker']['getChanges'](_0x49bcd4);for(const _0x294bd1 of _0x59da72)this['_handleRemoveFootnoteReferenceById'](_0x5f1d1e,_0x294bd1)&&(_0x43b4f9=!0x0);for(const _0x40f2d8 of _0x304739)this['_handleInsertedFootnoteReference'](_0x5f1d1e,_0x40f2d8)&&(_0x43b4f9=!0x0);for(const _0x31a96c of _0x5d4720)this['_handleMovedFootnoteReference'](_0x5f1d1e,_0x31a96c)&&(_0x43b4f9=!0x0);return _0x43b4f9;}['_handleFootnotesDefinitionsObjectSync'](_0x59b8a1){if(!this['_footnotesDefinitions'])return!0x1;let _0x1188f5=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x38271b=[];for(const _0x22a1ee of this['_footnotesDefinitions']['getChildren']()){const _0x11f564=_0x22a1ee['getAttribute']('footnoteId');this['getFootnote'](_0x11f564)||(_0x38271b['unshift'](_0x22a1ee),_0x1188f5=!0x0);}for(const _0x77c3f2 of _0x38271b)_0x59b8a1['remove'](_0x77c3f2);}const _0x26a615=new Set(),_0x512aec=[];for(const _0x493f17 of this['_footnotesDefinitions']['getChildren']()){const _0x3a34ae=_0x493f17['getAttribute']('footnoteId');_0x26a615['has'](_0x3a34ae)?(_0x512aec['unshift'](_0x493f17),_0x1188f5=!0x0):_0x26a615['add'](_0x3a34ae);}for(const _0x4c33e8 of _0x512aec)_0x59b8a1['remove'](_0x4c33e8);return this['_footnotesDefinitions']['childCount']||(_0x59b8a1['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x1188f5=!0x0),_0x1188f5;}['_handleInsertedFootnoteReference'](_0x2486d9,_0x511551){if(this['_footnotes']['find'](_0x5bb741=>_0x5bb741['reference']===_0x511551))return!0x1;let _0x5e3aa8=!0x1;const _0x3344f3=_0x511551['getAttribute']('footnoteId'),_0x414d8c=this['_footnotes']['findIndex'](_0x5d1200=>_0x5d1200['id']===_0x3344f3);-0x1!==_0x414d8c&&(_0x2486d9['remove'](this['_footnotes'][_0x414d8c]['reference']),this['_footnotes']['splice'](_0x414d8c,0x1),_0x5e3aa8=!0x0);let _0xacf78e=this['_footnotesDefinitions']?function(_0x6783ea,_0x15a654){for(const _0x1ad667 of _0x6783ea['getChildren']())if(_0x1ad667['getAttribute']('footnoteId')===_0x15a654)return _0x1ad667;return null;}(this['_footnotesDefinitions'],_0x3344f3):null;_0xacf78e||(_0xacf78e=_0x2486d9['createElement']('footnoteDefinition',{'footnoteId':_0x3344f3}),this['_footnotesDefinitions']&&(_0x2486d9['insert'](_0xacf78e,this['_footnotesDefinitions'],'end'),_0x5e3aa8=!0x0));const _0x26a0d5={'id':_0x3344f3,'reference':_0x511551,'definition':_0xacf78e},_0x5dab27=I(this['editor']['model'],this['_footnotes'],_0x511551);this['_footnotes']['splice'](_0x5dab27,0x0,_0x26a0d5);let _0x5adff8=_0x5dab27;return-0x1!==_0x414d8c&&(_0x5adff8=Math['min'](_0x5dab27,_0x414d8c)),this['_updateFootnotesCounters'](_0x2486d9,_0x5adff8)&&(_0x5e3aa8=!0x0),_0x5e3aa8;}['_handleRemoveFootnoteReferenceById'](_0x5450f6,_0x236594){const _0x1a18fa=this['_footnotes']['findIndex'](_0x1e3984=>_0x1e3984['id']===_0x236594);if(-0x1===_0x1a18fa)return!0x1;let _0x355a2c=!0x1;const _0x11093a=this['_footnotes'][_0x1a18fa];return'$graveyard'!==_0x11093a['definition']['root']['rootName']&&(_0x5450f6['remove'](_0x11093a['definition']),_0x355a2c=!0x0),this['_footnotes']['splice'](_0x1a18fa,0x1),this['_updateFootnotesCounters'](_0x5450f6,_0x1a18fa)&&(_0x355a2c=!0x0),_0x355a2c;}['_handleMovedFootnoteReference'](_0xbb8283,_0x1567dd){const _0x56a3e8=_0x1567dd['getAttribute']('footnoteId'),_0x17386e=this['_footnotes']['findIndex'](_0x6800e8=>_0x6800e8['id']===_0x56a3e8),_0xe63cc5=this['_footnotes'][_0x17386e];let _0x36fc9b=!0x1;_0xe63cc5['reference']=_0x1567dd,this['_footnotes']['splice'](_0x17386e,0x1);const _0x5bc1f4=I(this['editor']['model'],this['_footnotes'],_0x1567dd);return this['_footnotes']['splice'](_0x5bc1f4,0x0,_0xe63cc5),this['_updateFootnotesCounters'](_0xbb8283,Math['min'](_0x17386e,_0x5bc1f4))&&(_0x36fc9b=!0x0),_0x36fc9b;}['_updateFootnoteRefCounter'](_0x51a673,_0x224752){if(!this['_footnotesDefinitions'])return!0x1;const _0x6b9980=this['_footnotes'][_0x224752];let _0x4850f0;return _0x4850f0=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x6b9980,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x224752+0x1}):String(_0x224752+0x1),_0x6b9980['reference']['getAttribute']('footnoteCounter')!=_0x4850f0&&(_0x51a673['setAttribute']('footnoteCounter',_0x4850f0,_0x6b9980['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x1ffd00){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x3abadb,_0x5ea10e){if(_0x3abadb['length']!==_0x5ea10e['length'])return!0x1;for(let _0x4f2df9=0x0;_0x4f2df9<_0x3abadb['length'];_0x4f2df9++)if(_0x3abadb[_0x4f2df9]!==_0x5ea10e[_0x4f2df9])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x4c1a2f=>_0x4c1a2f['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x366d55=>_0x366d55['getAttribute']('footnoteId'))))return!0x1;let _0x4a2340=!0x1;for(let _0x4779b2=0x0;_0x4779b2<this['_footnotes']['length'];_0x4779b2++){const _0x255327=this['_footnotes'][_0x4779b2],_0x36cd23=_0x1ffd00['createPositionBefore'](_0x255327['definition']),_0x253858=_0x1ffd00['createPositionAt'](this['_footnotesDefinitions'],_0x4779b2);_0x36cd23['isEqual'](_0x253858)||(_0x1ffd00['move'](_0x1ffd00['createRangeOn'](_0x255327['definition']),_0x253858),_0x4a2340=!0x0);}return _0x4a2340;}['_ensureFootnotesReferencesHaveProperOrder'](_0x1b6199){if(!this['_footnotes']['length'])return!0x1;const {model:_0x373ab6}=this['editor'];let _0x175cd6=!0x1;for(let _0x599252=0x0;_0x599252<this['_footnotes']['length']-0x1;_0x599252++){const _0x5c25cd=this['_footnotes'][_0x599252],_0x29e767=this['_footnotes'][_0x599252+0x1],_0x1de4fe=_0x373ab6['createPositionBefore'](_0x5c25cd['reference']),_0x55cb10=_0x373ab6['createPositionBefore'](_0x29e767['reference']);'after'===_0x1de4fe['compareWith'](_0x55cb10)&&(this['_handleMovedFootnoteReference'](_0x1b6199,_0x5c25cd['reference']),_0x599252=-0x1,_0x175cd6=!0x0);}return _0x175cd6;}}function _(_0x53a2e3,_0x16a442,_0x177b19){if(_0x177b19['childCount'])return!0x1;const _0x445a27=_0x16a442?'paragraph':'footnoteInlineContent';return _0x53a2e3['insert'](_0x53a2e3['createElement'](_0x445a27),_0x177b19),!0x0;}function I(_0xe58a58,_0x355785,_0x48adb9){if(0x0===_0x355785['length'])return 0x0;const _0x3b4d79=_0xe58a58['createPositionBefore'](_0x48adb9);for(let _0x2e342f=0x0;_0x2e342f<_0x355785['length'];_0x2e342f++){const _0x553eda=_0x355785[_0x2e342f],_0x3096fd=_0xe58a58['createPositionBefore'](_0x553eda['reference']);if('before'===_0x3b4d79['compareWith'](_0x3096fd))return _0x2e342f;}const _0x3c57c4=_0x48adb9['root'];let _0x515270=-0x1;for(let _0x5617f7=_0x355785['length']-0x1;_0x5617f7>=0x0;_0x5617f7--)if(_0x355785[_0x5617f7]['reference']['root']===_0x3c57c4){_0x515270=_0x5617f7;break;}if(-0x1!==_0x515270)return _0x515270+0x1;const _0x5caeda=_0xe58a58['document']['getRootNames'](),_0x34281c=_0x5caeda['indexOf'](_0x3c57c4['rootName']),_0x2d5d3d=_0x5caeda[_0x34281c+0x1];if(_0x2d5d3d){for(let _0x358f53=0x0;_0x358f53<_0x355785['length'];_0x358f53++)if(_0x355785[_0x358f53]['reference']['root']['rootName']===_0x2d5d3d)return _0x358f53;}return _0x355785['length'];}class m extends _0x38f340{['refresh'](){const _0x3bcba9=this['editor']['model']['document']['selection'],_0x4da242=this['_getPositionToInsertFootnote'](_0x3bcba9);this['isEnabled']=!!_0x4da242;}['execute'](_0x5e58f5){const {editor:_0x1c43a5}=this,{model:_0x3da633}=_0x1c43a5,{selection:_0x11f046}=_0x3da633['document'],_0x423afb=this['_getPositionToInsertFootnote'](_0x11f046);if(!_0x423afb)return;const _0x24cc41=_0x1c43a5['plugins']['get']('FootnotesEditing'),_0x166101=_0x5e58f5?.['footnoteId']??_0xf15334();!function(_0x4185d6){return'string'==typeof _0x4185d6&&_0x4185d6['length']>0x0&&!/\s/['test'](_0x4185d6)&&!/^\d/['test'](_0x4185d6);}(_0x166101)?_0x54d84b('insert-footnote-command-executed-with-invalid-id'):(_0x3da633['change'](_0x4a6939=>{const _0xb38211=_0x4a6939['createElement']('footnoteRef',{'footnoteId':_0x166101});_0x3da633['insertObject'](_0xb38211,_0x423afb,null);}),_0x24cc41['_moveSelectionToFootnoteDefinition'](_0x166101));}['_getPositionToInsertFootnote'](_0x23f667){const {model:_0x47318d}=this['editor'],{schema:_0x3fcf36}=_0x47318d,_0x1f6824=_0x23f667['getFirstRange']();for(const _0x1ddf32 of _0x1f6824['getItems']())if(_0x3fcf36['isBlock'](_0x1ddf32)||_0x3fcf36['isObject'](_0x1ddf32))return null;const _0x223e80=_0x1f6824['end'];return _0x3fcf36['checkChild'](_0x223e80,'footnoteRef')?_0x223e80:null;}}class r extends _0x56a762{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x200b42}=this;_0x200b42['config']['define']('footnotes.multiBlock',!0x0),_0x200b42['commands']['add']('insertFootnote',new m(_0x200b42)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x5c07db){const _0x3c7b3b=_0x52b546([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x26d189=0x47a28506,_0x2d2d74=0x47a5f2de^_0x26d189,_0x2c6032=window[_0x52b546([0x44,0x61,0x74,0x65])][_0x52b546([0x6e,0x6f,0x77])](),_0x4f62f1=_0x5c07db[_0x52b546([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3efe33=new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ac399=>{_0x4f62f1[_0x52b546([0x6f,0x6e,0x63,0x65])](_0x52b546([0x72,0x65,0x61,0x64,0x79]),_0x2ac399);}),_0x5b624b={[_0x52b546([0x6b,0x74,0x79])]:_0x52b546([0x45,0x43]),[_0x52b546([0x75,0x73,0x65])]:_0x52b546([0x73,0x69,0x67]),[_0x52b546([0x63,0x72,0x76])]:_0x52b546([0x50,0x2d,0x32,0x35,0x36]),[_0x52b546([0x78])]:_0x52b546([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x52b546([0x79])]:_0x52b546([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x52b546([0x61,0x6c,0x67])]:_0x52b546([0x45,0x53,0x32,0x35,0x36])},_0x153a4d=_0x4f62f1[_0x52b546([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x52b546([0x67,0x65,0x74])](_0x52b546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1b5ad5(){let _0x7c3b8,_0x1980cc=null,_0x29b078=null;try{if(_0x153a4d==_0x52b546([0x47,0x50,0x4c]))return _0x52b546([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x7c3b8=_0x482716(),!_0x7c3b8)return _0x52b546([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x7c3b8[_0x52b546([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x29b078=_0x34d404(_0x7c3b8[_0x52b546([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x7c3b8[_0x52b546([0x6a,0x74,0x69])])),await _0x2da2c8()?_0x2700df()?_0x2e2895()?_0x52b546([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x225d92()?(_0x7c3b8[_0x52b546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52b546([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1980cc=_0x470f4c(_0x52b546([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x7c3b8[_0x52b546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52b546([0x74,0x72,0x69,0x61,0x6c])&&(_0x1980cc=_0x470f4c(_0x52b546([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x38dda9()):_0x52b546([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x52b546([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x52b546([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x52b546([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2e2895(){const _0x46ac74=[_0x52b546([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x52b546([0x74,0x72,0x69,0x61,0x6c])][_0x52b546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7c3b8[_0x52b546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2c6032/0x3e8:0xe10*_0x2d2d74;return _0x7c3b8[_0x52b546([0x65,0x78,0x70])]<_0x46ac74;}function _0x2700df(){const _0x386d14=_0x7c3b8[_0x52b546([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x386d14&&(!!_0x386d14[_0x52b546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52b546([0x2a]))||!!_0x386d14[_0x52b546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52b546([0x46,0x4f,0x4f])));}function _0x225d92(){const _0x19a3a0=_0x7c3b8[_0x52b546([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x19a3a0||0x0==_0x19a3a0[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x561e65}=new URL(window[_0x52b546([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x19a3a0[_0x52b546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x561e65))return!0x0;const _0x252011=_0x561e65[_0x52b546([0x73,0x70,0x6c,0x69,0x74])](_0x52b546([0x2e]));return _0x19a3a0[_0x52b546([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x308a6c=>_0x308a6c[_0x52b546([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52b546([0x2a])))[_0x52b546([0x6d,0x61,0x70])](_0x2e2cfd=>_0x2e2cfd[_0x52b546([0x73,0x70,0x6c,0x69,0x74])](_0x52b546([0x2e])))[_0x52b546([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x316592=>_0x316592[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x252011[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x52b546([0x6d,0x61,0x70])](_0x5a9fcb=>Array(_0x252011[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5a9fcb[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x52b546([0x66,0x69,0x6c,0x6c])](_0x5a9fcb[0x0]===_0x52b546([0x2a])?_0x52b546([0x2a]):'')[_0x52b546([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5a9fcb))[_0x52b546([0x73,0x6f,0x6d,0x65])](_0x5385bb=>_0x252011[_0x52b546([0x65,0x76,0x65,0x72,0x79])]((_0x447438,_0x29c0ac)=>_0x5385bb[_0x29c0ac]===_0x447438||_0x5385bb[_0x29c0ac]===_0x52b546([0x2a])));}function _0x38dda9(){return _0x1980cc&&_0x29b078?new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1f9aad,_0x229515)=>{_0x1980cc[_0x52b546([0x74,0x68,0x65,0x6e])](_0x1f9aad,_0x229515),_0x29b078[_0x52b546([0x74,0x68,0x65,0x6e])](_0x4bf5ae=>{_0x4bf5ae!=_0x52b546([0x56,0x61,0x6c,0x69,0x64])&&_0x1f9aad(_0x4bf5ae);},_0x229515);}):_0x1980cc||_0x29b078||_0x52b546([0x56,0x61,0x6c,0x69,0x64]);}}function _0x34d404(_0x54acde,_0x2ec77e){return new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x282da0=>{if(_0x2af8c8())return _0x282da0(_0x52b546([0x56,0x61,0x6c,0x69,0x64]));_0x226341(),_0x4f62f1[_0x52b546([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x52b546([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x19636b=!0x1;const _0x224540=_0xf15334();function _0x5075c9(_0x2a4fc2){return!!_0x2a4fc2&&(typeof _0x2a4fc2===_0x52b546([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2a4fc2===_0x52b546([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2a4fc2[_0x52b546([0x74,0x68,0x65,0x6e])]===_0x52b546([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2a4fc2[_0x52b546([0x63,0x61,0x74,0x63,0x68])]===_0x52b546([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x52a19f(_0xacd30){_0xc0f77b(_0xacd30)[_0x52b546([0x74,0x68,0x65,0x6e])](_0x9a1d25=>{if(!_0x9a1d25||_0x9a1d25[_0x52b546([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x52b546([0x6f,0x6b]))return _0x52b546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5d6ba3(_0x470e38(_0x224540+_0x2ec77e))!=_0x9a1d25[_0x52b546([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x52b546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x52b546([0x56,0x61,0x6c,0x69,0x64]);})[_0x52b546([0x74,0x68,0x65,0x6e])](_0x3cd196=>(_0x4f68fd(),_0x3cd196),()=>{const _0x470a48=_0x49a606();return null==_0x470a48?(_0x4f68fd(),_0x52b546([0x56,0x61,0x6c,0x69,0x64])):_0x52b546(_0x2c6032-_0x470a48>(0x63ae0106^_0x26d189)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x52b546([0x74,0x68,0x65,0x6e])](_0x282da0)[_0x52b546([0x63,0x61,0x74,0x63,0x68])](()=>{_0x282da0(_0x52b546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x33adce=0x47946b86^_0x26d189;function _0x4f68fd(){const _0x36a8bf=_0x52b546([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d6ba3(_0x470e38(_0x54acde)),_0x20feb8=_0x165829(_0x5d6ba3(window[_0x52b546([0x4d,0x61,0x74,0x68])][_0x52b546([0x63,0x65,0x69,0x6c])](_0x2c6032/_0x33adce)));window[_0x52b546([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52b546([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x36a8bf,_0x20feb8);}function _0x49a606(){const _0x30be26=_0x52b546([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d6ba3(_0x470e38(_0x54acde)),_0x59d0f9=window[_0x52b546([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52b546([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30be26);return _0x59d0f9?window[_0x52b546([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x165829(_0x59d0f9),0x10)*_0x33adce:null;}function _0xc0f77b(_0x1fa97a){return new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x170a0e,_0x944e6a)=>{_0x1fa97a[_0x52b546([0x74,0x68,0x65,0x6e])](_0x170a0e,_0x944e6a),window[_0x52b546([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x944e6a,0x47a351c6^_0x26d189);});}}_0x4f62f1[_0x52b546([0x6f,0x6e])](_0x52b546([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4d6863,_0x2c8b03)=>{if(_0x2c8b03[0x0]!=_0x54acde)return _0x282da0(_0x52b546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2c8b03[0x1]={..._0x2c8b03[0x1],[_0x52b546([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x224540};},{[_0x52b546([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52b546([0x68,0x69,0x67,0x68])}),_0x4f62f1[_0x52b546([0x6f,0x6e])](_0x52b546([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x9b2a2f=>{_0x5075c9(_0x9b2a2f[_0x52b546([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x19636b=!0x0,_0x52a19f(_0x9b2a2f[_0x52b546([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x52b546([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52b546([0x6c,0x6f,0x77])}),_0x3efe33[_0x52b546([0x74,0x68,0x65,0x6e])](()=>{_0x19636b||_0x282da0(_0x52b546([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2af8c8(){return _0x4f62f1[_0x52b546([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52b546([0x76,0x69,0x65,0x77])][_0x52b546([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x52b546([0x61,0x75,0x74,0x6f]);}function _0x226341(){_0x4f62f1[_0x52b546([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52b546([0x76,0x69,0x65,0x77])][_0x52b546([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x52b546([0x61,0x75,0x74,0x6f]);}}function _0x470f4c(_0x33b8a8){const _0x253cfc=[new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3af25e=>setTimeout(_0x3af25e,0x47abbbca^_0x26d189)),_0x3efe33[_0x52b546([0x74,0x68,0x65,0x6e])](()=>new window[(_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3369eb=>{let _0x166ea1=0x0;_0x4f62f1[_0x52b546([0x6d,0x6f,0x64,0x65,0x6c])][_0x52b546([0x6f,0x6e])](_0x52b546([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4e624b,_0x4f7570)=>{_0x4f7570[0x0][_0x52b546([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x166ea1++,_0x166ea1==(0x47a284fe^_0x26d189)&&(_0x3369eb(),_0x4e624b[_0x52b546([0x6f,0x66,0x66])]());});}))];return window[_0x52b546([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x52b546([0x72,0x61,0x63,0x65])](_0x253cfc)[_0x52b546([0x74,0x68,0x65,0x6e])](()=>_0x33b8a8);}async function _0x49b39a(){await _0x3efe33,_0x4f62f1[_0x52b546([0x6d,0x6f,0x64,0x65,0x6c])][_0x52b546([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x18d321,_0x4f62f1[_0x52b546([0x6d,0x6f,0x64,0x65,0x6c])][_0x52b546([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x18d321,_0x4f62f1[_0x52b546([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x52b546([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1a9778(_0x5db7c2){const _0x225b75=_0x17c742();_0x4f62f1[_0x225b75]=_0x52b546([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5db7c2,_0x5db7c2!=_0x52b546([0x56,0x61,0x6c,0x69,0x64])&&_0x49b39a();}function _0x17c742(){const _0x4ffdfd=window[_0x52b546([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x52b546([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x52b546([0x6e,0x6f,0x77])]())[_0x52b546([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x52b546([0x2e]),'');let _0x2dab41=_0x52b546([0x75]);for(let _0x41ebcf=0x0;_0x41ebcf<_0x4ffdfd[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x41ebcf+=0x2){let _0x551055=window[_0x52b546([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ffdfd[_0x52b546([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x41ebcf,_0x41ebcf+0x2));_0x551055>=_0x3c7b3b[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x551055-=_0x3c7b3b[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2dab41+=_0x3c7b3b[_0x551055];}return _0x2dab41;}function _0x482716(){const _0xe44605=_0x153a4d[_0x52b546([0x73,0x70,0x6c,0x69,0x74])](_0x52b546([0x2e]));if(0x3!=_0xe44605[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3051e9(_0xe44605[0x1]);function _0x3051e9(_0x479442){const _0x127f84=_0x5db59d(_0x479442);return _0x127f84&&_0x32c3da()?_0x127f84:null;function _0x32c3da(){const _0x5512c7=_0x127f84[_0x52b546([0x6a,0x74,0x69])],_0x32494e=window[_0x52b546([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5512c7[_0x52b546([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5512c7[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x520363={..._0x127f84,[_0x52b546([0x6a,0x74,0x69])]:_0x5512c7[_0x52b546([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5512c7[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x520363[_0x52b546([0x76,0x63])],_0x470e38(_0x520363)==_0x32494e;}}}async function _0x2da2c8(){let _0x1f62f5=!0x0;try{const _0x146df4=_0x153a4d[_0x52b546([0x73,0x70,0x6c,0x69,0x74])](_0x52b546([0x2e])),[_0x39e2ad,_0x381cdd,_0x19dc5d]=_0x146df4;return _0xa4f7(_0x39e2ad),await _0xc9768a(_0x39e2ad,_0x381cdd,_0x19dc5d),_0x1f62f5;}catch{return!0x1;}function _0xa4f7(_0x29fca3){const _0x219e7d=_0x5db59d(_0x29fca3);_0x219e7d&&_0x219e7d[_0x52b546([0x61,0x6c,0x67])]==_0x52b546([0x45,0x53,0x32,0x35,0x36])||(_0x1f62f5=!0x1);}async function _0xc9768a(_0x5c8f62,_0x243ad5,_0x3e0ec4){const _0x24f0d5=window[_0x52b546([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x52b546([0x66,0x72,0x6f,0x6d])](_0xc8b10b(_0x3e0ec4),_0x5a2427=>_0x5a2427[_0x52b546([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x522532=new window[(_0x52b546([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x52b546([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5c8f62+_0x52b546([0x2e])+_0x243ad5),_0xa8a21d=window[_0x52b546([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x52b546([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xa8a21d)return;const _0x4667b6=await _0xa8a21d[_0x52b546([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x52b546([0x6a,0x77,0x6b]),_0x5b624b,{[_0x52b546([0x6e,0x61,0x6d,0x65])]:_0x52b546([0x45,0x43,0x44,0x53,0x41]),[_0x52b546([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x52b546([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x52b546([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xa8a21d[_0x52b546([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x52b546([0x6e,0x61,0x6d,0x65])]:_0x52b546([0x45,0x43,0x44,0x53,0x41]),[_0x52b546([0x68,0x61,0x73,0x68])]:{[_0x52b546([0x6e,0x61,0x6d,0x65])]:_0x52b546([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4667b6,_0x24f0d5,_0x522532)||(_0x1f62f5=!0x1);}}function _0x5db59d(_0x5d6489){return _0x5d6489[_0x52b546([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x52b546([0x65,0x79]))?JSON[_0x52b546([0x70,0x61,0x72,0x73,0x65])](_0xc8b10b(_0x5d6489)):null;}function _0xc8b10b(_0x223640){return window[_0x52b546([0x61,0x74,0x6f,0x62])](_0x223640[_0x52b546([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x52b546([0x2b]))[_0x52b546([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x52b546([0x2f])));}function _0x470e38(_0x2acb3f){let _0x2547b6=0x1505;function _0x1cae76(_0x54e87c){for(let _0x170497=0x0;_0x170497<_0x54e87c[_0x52b546([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x170497++){const _0x512849=_0x54e87c[_0x52b546([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x170497);_0x2547b6=(_0x2547b6<<0x5)+_0x2547b6+_0x512849,_0x2547b6&=_0x2547b6;}}function _0x93d434(_0x172ccb){Array[_0x52b546([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x172ccb)?_0x172ccb[_0x52b546([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x93d434):_0x172ccb&&typeof _0x172ccb==_0x52b546([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x52b546([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x172ccb)[_0x52b546([0x73,0x6f,0x72,0x74])]()[_0x52b546([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x304a93,_0x1284ed])=>{_0x1cae76(_0x304a93),_0x93d434(_0x1284ed);}):_0x1cae76(window[_0x52b546([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x172ccb));}return _0x93d434(_0x2acb3f),_0x2547b6>>>0x0;}function _0x5d6ba3(_0x4bb5d3){return _0x4bb5d3[_0x52b546([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x52b546([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x52b546([0x30]));}function _0x165829(_0x24cd17){return _0x24cd17[_0x52b546([0x73,0x70,0x6c,0x69,0x74])]('')[_0x52b546([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x52b546([0x6a,0x6f,0x69,0x6e])]('');}function _0x18d321(){}function _0x52b546(_0x216244){return _0x216244['map'](_0x556c78=>String['fromCharCode'](_0x556c78))['join']('');}_0x1a9778(await _0x1b5ad5());}(this);}['_moveSelectionToFootnoteDefinition'](_0x236b1b){const {plugins:_0x2141dc,editing:_0x207ad7,model:_0x26bf0a}=this['editor'],_0x1118fb=_0x2141dc['get'](c)['getFootnote'](_0x236b1b);return!!_0x1118fb&&(_0x26bf0a['change'](_0x34deb2=>{_0x34deb2['setSelection'](_0x34deb2['createPositionAt'](_0x1118fb['definition'],'end'));}),_0x207ad7['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0xa39d0d){const {plugins:_0x33cf9c,editing:_0x535ad6,model:_0x2a9d81}=this['editor'],_0x488fac=_0x33cf9c['get'](c)['getFootnote'](_0xa39d0d);return!!_0x488fac&&(_0x2a9d81['change'](_0x50ed84=>{_0x50ed84['setSelection'](_0x488fac['reference'],'on');}),_0x535ad6['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x3feab5}=this['editor']['model'],_0x44a2b9=this['editor']['config']['get']('footnotes.multiBlock');_0x3feab5['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x3feab5['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x3feab5['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x44a2b9?_0x3feab5['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x3feab5['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x3feab5['addChildCheck'](_0x12ec79=>{for(const _0x4d6cc0 of _0x12ec79)if('footnoteDefinition'===_0x4d6cc0['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0xba472f}=this,{conversion:_0x433a83,editing:_0x1c5caf}=_0xba472f,{t:t}=_0xba472f['locale'];_0x433a83['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x3a25b6,{writer:_0x11c49c,consumable:_0x642966})=>{const _0x1ec8c1=_0x3a25b6['getChild'](0x0);if(!_0x1ec8c1||!_0x1ec8c1['is']('element','a'))return null;const _0x3d6caa=_0x1ec8c1['getAttribute']('href')||'';if(!_0x3d6caa['startsWith']('#'))return null;const _0x292577=_0x3d6caa['replace'](/^#/,'');if(!_0x292577)return null;_0x642966['consume'](_0x1ec8c1,{'name':!0x0,'attributes':['href']});for(const {item:_0x5d714e}of _0x1c5caf['view']['createRangeIn'](_0x1ec8c1))_0x5d714e['is']('$textProxy')?_0x642966['consume'](_0x5d714e['textNode'],{'name':!0x0}):_0x5d714e['is']('element')&&_0x642966['consume'](_0x5d714e,{'name':!0x0});return _0x11c49c['createElement']('footnoteRef',{'footnoteId':_0x292577});}}),_0x433a83['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x850f10,{writer:_0x4f0fb1})=>D(_0x850f10,_0x4f0fb1)}),_0x433a83['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x2b52a8,{writer:_0x373cc4})=>{const _0x32df26=_0x2b52a8['getAttribute']('footnoteCounter');return _0x5146b1(D(_0x2b52a8,_0x373cc4),_0x373cc4,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x32df26)});}});}['_defineDefinitionsConverters'](){const {editor:_0x4768be}=this,{t:t}=_0x4768be['locale'],{conversion:_0x331deb}=_0x4768be;_0x331deb['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x331deb['for']('upcast')['add'](_0x4ffa0e=>{_0x4ffa0e['on']('element:ol',(_0x5e013b,_0x4a08ea,_0x5832ca)=>{const _0x5d9aed=_0x4a08ea['viewItem'];if(!_0x5d9aed['hasClass']('footnotes-list')||!_0x4a08ea['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x5832ca['consumable']['consume'](_0x5d9aed,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x33bc7b,modelCursor:_0x1d326d}=_0x5832ca['convertChildren'](_0x4a08ea['viewItem'],_0x4a08ea['modelCursor']);_0x4a08ea['modelRange']=_0x33bc7b,_0x4a08ea['modelCursor']=_0x1d326d;}),_0x4ffa0e['on']('element:hr',(_0x44493f,_0x125c23,_0x540f29)=>{const _0x484cc5=_0x125c23['viewItem'];_0x484cc5['hasClass']('footnotes-divider')&&_0x125c23['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x540f29['consumable']['consume'](_0x484cc5,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x331deb['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x186e5c,{writer:_0x13fab7})=>v(_0x13fab7)}),_0x331deb['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x24ac02,{writer:_0x21153a})=>{const _0x479c48=v(_0x21153a,{'data-footnotes-list-label':t('Footnotes')}),_0x3f8934=_0x5146b1(_0x479c48,_0x21153a,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x21153a['setCustomProperty']('footnotesDefinitions',!0x0,_0x3f8934),_0x3f8934;}});}['_defineDefinitionConverters'](){const {editor:_0x49a7f9}=this,{conversion:_0x34b6fa,locale:_0x6589ad}=_0x49a7f9,_0x2914db=_0x49a7f9['config']['get']('footnotes.multiBlock');_0x34b6fa['for']('upcast')['add'](_0x4a09c4=>{_0x4a09c4['on']('element:li',(_0x42606a,_0x410f3c,_0x5b8493)=>{const _0x15cabb=_0x410f3c['viewItem'];if(!_0x15cabb['hasClass']('footnote-definition')||!_0x15cabb['getAttribute']('id'))return;const _0x49c95f=_0x15cabb['parent'];if(!_0x49c95f['is']('element','ol')||!_0x49c95f['hasClass']('footnotes-list'))return;if(!_0x5b8493['consumable']['test'](_0x15cabb,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x31f926=_0x5b8493['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x15cabb['getAttribute']('id')});if(!_0x5b8493['safeInsert'](_0x31f926,_0x410f3c['modelCursor']))return;_0x5b8493['consumable']['consume'](_0x15cabb,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x482f96=Array['from'](_0x15cabb['getChildren']())['find'](_0x308a48=>_0x308a48['is']('element')&&_0x308a48['hasClass']('footnote-content'));for(const _0x94a91e of _0x15cabb['getChildren']())_0x94a91e['is']('element')&&(_0x5b8493['consumable']['consume'](_0x94a91e,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x5b8493['consumable']['consume'](_0x94a91e,{'name':!0x0,'classes':'footnote-content'}));if(_0x482f96){if(_0x2914db)_0x5b8493['convertChildren'](_0x482f96,_0x31f926);else{const _0x5e134a=_0x5b8493['writer']['createElement']('footnoteInlineContent');_0x5b8493['writer']['insert'](_0x5e134a,_0x31f926),_0x5b8493['convertChildren'](_0x482f96,_0x5e134a);}}_0x5b8493['updateConversionResult'](_0x31f926,_0x410f3c);});}),_0x34b6fa['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x5429e9,{writer:_0x1adc00})=>b(_0x5429e9,_0x1adc00,_0x6589ad,{'dataPipeline':!0x0})}),_0x34b6fa['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x2c3476,{writer:_0x587ce7})=>b(_0x2c3476,_0x587ce7,_0x6589ad)});}['_defineBogusParagraphConverters'](){const {editor:_0x396f29}=this,{conversion:_0x5663a8}=_0x396f29;_0x396f29['config']['get']('footnotes.multiBlock')?(_0x5663a8['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':h(),'converterPriority':'high'}),_0x5663a8['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':h({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x396f29['model']['document'],'change:data',()=>{!function(_0x53b415,_0x55411e){const _0x36a8a4=_0x53b415['document']['differ'],_0x206aff=new Set();for(const _0x4df5c9 of _0x36a8a4['getChanges']()){const _0x4d1b17='attribute'==_0x4df5c9['type']?_0x4df5c9['range']['start']['parent']:_0x4df5c9['position']['parent'];_0x4d1b17['is']('element','footnoteDefinition')&&_0x206aff['add'](_0x4d1b17);}for(const _0x450ba3 of _0x206aff['values']()){const _0x17db26=Array['from'](_0x450ba3['getChildren']())['filter'](_0x12e661=>g(_0x12e661,_0x55411e['mapper']));for(const _0x270728 of _0x17db26)_0x55411e['reconvertItem'](_0x270728);}}(_0x396f29['model'],_0x396f29['editing']);})):(_0x5663a8['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':h()}),_0x5663a8['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x4fa8e0,{writer:_0x300558})=>{const _0x5b3a1a=_0x300558['createContainerElement']('span');return _0x300558['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x5b3a1a),_0x5b3a1a;}}));}['_defineKeyboardHandlers'](){const {editor:_0x64e386}=this,{editing:_0x5216fd,t:t}=_0x64e386,_0x427267=_0x64e386['model']['document']['selection'];_0x64e386['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x64e386['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x5216fd['view']['document'],'enter',(_0x44e625,_0x143992)=>{const _0x2caacf=function(_0x41089e){const _0x257925=_0x41089e['getSelectedElement']();if(_0x257925?.['is']('element','footnoteRef'))return _0x257925;return null;}(_0x427267);if(_0x2caacf){const _0x1bcab5=_0x2caacf['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x1bcab5),_0x143992['preventDefault'](),_0x44e625['stop']();}},{'context':_0x5eb282});}['_defineClickHandlers'](){const {editor:_0x4ac713}=this,{editing:_0x27d39c}=_0x4ac713;_0x4ac713['editing']['view']['addObserver'](_0x4f0f0b),_0x4ac713['editing']['view']['addObserver'](_0x52d689);let _0x63e20b=!0x1;this['listenTo'](_0x27d39c['view']['document'],'pointerdown',(_0x3b0903,_0xea3868)=>{const {target:_0x5e851c}=_0xea3868,_0x3797a4=_0x27d39c['view']['document']['selection'];_0x63e20b=!!(_0x5e851c?.['is']('element','a')&&_0x5e851c['parent']?.['is']('element','sup')&&_0x5e851c['parent']['hasClass']('footnote'))&&_0x3797a4['getSelectedElement']()===_0x5e851c['parent'];},{'priority':'high'}),this['listenTo'](_0x27d39c['view']['document'],'click',(_0x4efdb1,_0x43fde7)=>{const {target:_0x1320ca}=_0x43fde7;if(!_0x1320ca?.['is']('element','a'))return;if(_0x1320ca['parent']?.['is']('element','sup')&&_0x1320ca['parent']['hasClass']('footnote')&&!_0x63e20b)return void _0x43fde7['preventDefault']();let _0x705e80=_0x1320ca['getAttribute']('href');if(!_0x705e80?.['startsWith']('#'))return;_0x705e80=_0x705e80['slice'](0x1);let _0x1775ce=!0x1;(_0x705e80['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x705e80['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x705e80))&&(_0x1775ce=!0x0),_0x1775ce&&(_0x43fde7['preventDefault'](),_0x4efdb1['stop']());},{'priority':'high','context':'$capture'});}}function h({dataPipeline:_0x238f95}={}){return(_0x496c01,{writer:_0x2929fb})=>{if(!p(_0x496c01))return null;if(!_0x238f95)return _0x2929fb['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x398be9=_0x2929fb['createContainerElement']('p');return _0x2929fb['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x398be9),_0x398be9;};}function p(_0x383f39){const {parent:_0x50119d}=_0x383f39;if(!_0x50119d?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x50119d['childCount'])return!0x1;for(const _0x35bad9 of _0x383f39['getAttributeKeys']())if(!_0x35bad9['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x35bad9)return!0x1;return!0x0;}function g(_0x3025ba,_0x5a7de9){if(!_0x3025ba['is']('element','paragraph'))return!0x1;const _0x407c0a=_0x5a7de9['toViewElement'](_0x3025ba);return!!_0x407c0a&&p(_0x3025ba)!==_0x407c0a['is']('element','span');}function J(_0x545bbf){return _0x5eb282(_0x545bbf)&&_0x545bbf['is']('containerElement')&&!!_0x545bbf['getCustomProperty']('footnotesDefinitions');}function v(_0x16077e,_0x516bb4={}){const _0x44cb9d=_0x16077e['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x44c56d=_0x16077e['createContainerElement']('ol',{'class':'footnotes-list'},_0x16077e['createSlot']());return _0x16077e['createContainerElement']('div',{'class':'footnotes',..._0x516bb4},[_0x44cb9d,_0x44c56d]);}function D(_0x40e6af,_0x4b7521){const _0x4dce87=_0x40e6af['getAttribute']('footnoteId'),_0xe18edb=_0x40e6af['getAttribute']('footnoteCounter'),_0x379b3c=_0x4b7521['createUIElement']('a',{'href':'#'+_0x4dce87},function(_0x3e4815){const _0x302c12=this['toDomElement'](_0x3e4815);return _0x302c12['textContent']=_0xe18edb,_0x302c12;}),_0x411cbe=_0x4b7521['createContainerElement']('sup',{'id':'ref-'+_0x4dce87,'class':'footnote'},[_0x379b3c]);return _0x411cbe['getFillerOffset']=()=>null,_0x411cbe;}function b(_0x4a35ae,_0x359242,_0x53337b,{dataPipeline:_0xc3735f}={}){const {t:t}=_0x53337b,_0x45d3d6=_0x4a35ae['getAttribute']('footnoteId'),_0x2f748a=_0x359242['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x45d3d6},function(_0x55fdff){const _0x238629=this['toDomElement'](_0x55fdff);return _0x238629['innerText']='^',_0x238629;}),_0x7af18c=_0xc3735f?_0x359242['createContainerElement']('div',{'class':'footnote-content'}):_0x4e9961(_0x359242['createEditableElement']('div',{'class':'footnote-content'}),_0x359242,{'label':t('Footnote\x20content.')});return _0x359242['insert'](_0x359242['createPositionAt'](_0x7af18c,0x0),_0x359242['createSlot']()),_0x359242['createContainerElement']('li',{'class':'footnote-definition','id':_0x45d3d6},[_0x2f748a,_0x7af18c]);}class e extends _0x56a762{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x5e5846];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x2e4b7c}=this,{plugins:_0x3fd431,model:_0x9aff68}=_0x2e4b7c,_0x4c2590=_0x3fd431['get'](_0x5e5846),_0x4b3888=_0x3fd431['get'](c);this['listenTo'](_0x4c2590,'outputTransformation',(_0x57ed36,_0x388922)=>{const _0x40387f=f(_0x9aff68['createRangeIn'](_0x388922['content']));if(!_0x40387f['length'])return;const _0x2a0e5b=_0x4b3888['getFootnotes'](),_0x5a8925=_0x40387f['reduce']((_0x54b1d2,_0x5131fa)=>{const _0x3dd5a4=_0x2a0e5b['find'](_0x5f5d97=>_0x5f5d97['id']===_0x5131fa);if(_0x3dd5a4){const _0x33a326=_0x2e4b7c['data']['toView'](_0x3dd5a4['definition'],{'isClipboardPipeline':!0x0}),_0x2e28b4=_0x2e4b7c['data']['htmlProcessor']['toData'](_0x33a326);_0x54b1d2[_0x3dd5a4['id']]=_0x2e28b4;}return _0x54b1d2;},Object['create'](null));_0x388922['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x5a8925));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x1f27d9}=this,{model:_0x5b3c2e,plugins:_0x1e8156}=_0x1f27d9,{view:_0x1d2e1b}=_0x1f27d9['editing'],_0x322718=_0x1e8156['get'](_0x5e5846),_0x1dbae3=_0x1e8156['get'](c);let _0x37eab6=null;this['listenTo'](_0x1d2e1b['document'],'clipboardInput',(_0x13669b,_0x1585ec)=>{const _0x20583a=_0x1585ec['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x37eab6=_0x20583a?JSON['parse'](_0x20583a):null;}),this['listenTo'](_0x322718,'contentInsertion',(_0x4c1c81,_0x3c1756)=>{const _0x4c06d9=_0x3c1756['sourceEditorId']===this['editor']['id'];_0x4c06d9&&'drop'===_0x3c1756['method']||_0x5b3c2e['change'](_0x1976d1=>{let _0x4ab337=_0x1dbae3['getFootnotesDefinitionsObjectElement']();const _0x3d44f4=!!_0x4ab337&&Array['from'](_0x5b3c2e['document']['selection']['getSelectedBlocks']())['includes'](_0x4ab337);if(_0x4ab337&&!_0x3d44f4&&function(_0x3e193e,_0x15c945){const _0x2a6e2c=[];for(const {item:_0x10d5c4}of _0x3e193e['createRangeIn'](_0x15c945))_0x10d5c4['is']('element','footnotesDefinitions')&&_0x2a6e2c['push'](_0x10d5c4);for(const _0x43d0ec of _0x2a6e2c)_0x3e193e['remove'](_0x43d0ec);}(_0x1976d1,_0x3c1756['content']),!_0x37eab6)return;const {selection:_0x2fa83a}=_0x5b3c2e['document'],_0x5ce5b8=_0x2fa83a['getFirstRange']()['root'];_0x4ab337&&!_0x3d44f4||(_0x4ab337=function(_0x45675a,_0x4d4ed9){for(const {item:_0x417690}of _0x45675a['createRangeIn'](_0x4d4ed9))if(_0x417690['is']('element','footnotesDefinitions'))return _0x417690;return null;}(_0x1976d1,_0x3c1756['content']),_0x4ab337||=_0x1dbae3['_insertEmptyFootnotesDefinitionsContainer'](_0x1976d1,_0x5ce5b8));const _0x5c8db0=Array['from'](_0x2fa83a['getRanges']())['flatMap'](f),_0x59c2f8=function(_0x31e62a,_0x1156cf,_0x4db79d){const _0xf3b518=Object['create'](null);for(const {item:_0x31b84f}of _0x31e62a['createRangeIn'](_0x1156cf))if(_0x31b84f['is']('element','footnoteRef')){const _0x29e7e6=_0x31b84f['getAttribute']('footnoteId');if(!_0x4db79d(_0x29e7e6))continue;_0xf3b518[_0x29e7e6]||(_0xf3b518[_0x29e7e6]=_0xf15334()),_0x31e62a['setAttribute']('footnoteId',_0xf3b518[_0x29e7e6],_0x31b84f);}return _0xf3b518;}(_0x1976d1,_0x3c1756['content'],_0x3bdfa1=>{if(!_0x4c06d9)return!0x0;return!!_0x1dbae3['getFootnote'](_0x3bdfa1)&&!_0x5c8db0['includes'](_0x3bdfa1);});for(const [_0x54faee,_0x24387d]of Object['entries'](_0x37eab6)){const _0xf3edae=_0x59c2f8[_0x54faee]||_0x54faee,_0x21b5f1=_0x1976d1['createElement']('footnoteDefinition',{'footnoteId':_0xf3edae}),_0x55d722=_0x1f27d9['data']['htmlProcessor']['toView'](_0x24387d),_0x2e7b83=_0x1f27d9['data']['toModel'](_0x55d722,_0x21b5f1);_0x1976d1['append'](_0x2e7b83,_0x21b5f1),_0x1976d1['insert'](_0x21b5f1,_0x4ab337,'end');}_0x37eab6=null;});});}}function f(_0x3a70ec){const _0x253429=new Set();for(const {item:_0xe51152}of _0x3a70ec)_0xe51152['is']('element','footnoteRef')&&_0x253429['add'](_0xe51152['getAttribute']('footnoteId'));return Array['from'](_0x253429);}class i extends _0x56a762{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2bf228}=this,{componentFactory:_0x22863a}=_0x2bf228['ui'];_0x22863a['add']('insertFootnote',x(_0x2bf228,_0x35adf5)),_0x22863a['add']('menuBar:insertFootnote',x(_0x2bf228,_0x40f8a5)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x580cce=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xc3a8d2;for(const _0x23b4d9 in _0x580cce){const _0x22d340=_0x23b4d9,_0x2d2562=_0x580cce[_0x22d340];if('footnotesLicenseKeyValid'==_0x2d2562||'footnotesLicenseKeyInvalid'==_0x2d2562||'footnotesLicenseKeyExpired'==_0x2d2562||'footnotesLicenseKeyDomainLimit'==_0x2d2562||'footnotesLicenseKeyNotAllowed'==_0x2d2562||'footnotesLicenseKeyEvaluationLimit'==_0x2d2562||'footnotesLicenseKeyTrialLimit'==_0x2d2562||'footnotesLicenseKeyUsageLimit'==_0x2d2562){delete _0x580cce[_0x22d340],_0xc3a8d2=_0x2d2562,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0xc3a8d2&&_0x580cce['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0xc3a8d2&&_0x580cce['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0xc3a8d2&&_0x580cce['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0xc3a8d2&&_0x580cce['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0xc3a8d2&&_0x580cce['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0xc3a8d2&&_0x580cce['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0xc3a8d2&&_0x580cce['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function x(_0x51e01b,_0x11ce53){const _0x16dfe7=_0x51e01b['commands']['get']('insertFootnote');return _0x191678=>{const {t:t}=_0x191678,_0x7464ae=new _0x11ce53(_0x191678),_0x9a36f0=_0x7464ae instanceof _0x40f8a5;return _0x7464ae['bind']('isEnabled')['to'](_0x16dfe7,'isEnabled'),_0x7464ae['set']({'label':t(_0x9a36f0?'Footnote':'Insert\x20footnote'),'icon':_0x4985ca,'tooltip':!0x0}),_0x7464ae['on']('execute',()=>{_0x16dfe7['execute'](),_0x51e01b['editing']['view']['focus']();}),_0x7464ae;};}class lt extends _0x56a762{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const Q=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x38f340{['refresh'](){const {editor:_0x32f39e}=this,_0x4ab7c9=_0x32f39e['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x4ab7c9,this['value']=_0x4ab7c9?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0xaa589d}){const {editor:_0x183ae8}=this,_0xaf94a2=_0x183ae8['plugins']['get'](c),_0x13ede3=_0xaf94a2['getFootnotesDefinitionsObjectElement']();_0x13ede3&&Q['includes'](_0xaa589d)&&_0x183ae8['model']['change'](_0x5242eb=>{_0x5242eb['setAttribute']('footnotesListStyle',_0xaa589d,_0x13ede3),_0xaf94a2['_updateFootnotesCounters'](_0x5242eb);});}}class C extends _0x38f340{['refresh'](){const {editor:_0xc21867}=this,_0x4c64fc=_0xc21867['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x4c64fc,this['value']=_0x4c64fc?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x4e399b}){const {editor:_0x3b99cd}=this,_0xe2c582=_0x3b99cd['plugins']['get'](c),_0x24ff79=_0xe2c582['getFootnotesDefinitionsObjectElement']();_0x24ff79&&Number['isInteger'](_0x4e399b)&&_0x3b99cd['model']['change'](_0x7c61ae=>{_0x7c61ae['setAttribute']('footnotesListStart',_0x4e399b,_0x24ff79),_0xe2c582['_updateFootnotesCounters'](_0x7c61ae);});}}class P extends _0x56a762{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1beea7}=this;_0x1beea7['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x1beea7['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x1beea7['commands']['add']('footnotesStyle',new S(_0x1beea7)),_0x1beea7['commands']['add']('footnotesStart',new C(_0x1beea7)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x28a1ed}=this,{schema:_0x2c81cd}=_0x28a1ed['model'];_0x2c81cd['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x278def}=this,{conversion:_0x169ff4,model:_0x43d784}=_0x278def,{schema:_0x47a0ce}=_0x43d784;_0x169ff4['for']('upcast')['add'](_0x869bdf=>{_0x869bdf['on']('element:ol',(_0x103784,_0x3c087a,_0xc1d041)=>{const _0xe10bd4=_0x3c087a['viewItem'],_0x17ecd9=_0x3c087a['modelCursor']?.['parent'];_0xe10bd4['hasClass']('footnotes-list')&&_0x17ecd9?.['is']('element','footnotesDefinitions')&&(function(_0x26e364,_0x4e1b7e,_0x405ffe,_0x46c4a9){if(!_0x46c4a9['checkAttribute'](_0x4e1b7e,'footnotesListStart'))return;let _0x311bd6=0x1;const _0x662a8d=_0x405ffe['consumable']['consume'](_0x26e364,{'attributes':'start'});if(_0x662a8d){const _0x3e2480=Number['parseInt'](_0x26e364['getAttribute']('start'),0xa);Number['isNaN'](_0x3e2480)||(_0x311bd6=_0x3e2480);}!_0x662a8d&&_0x4e1b7e['hasAttribute']('footnotesListStart')||_0x405ffe['writer']['setAttribute']('footnotesListStart',_0x311bd6,_0x4e1b7e);}(_0xe10bd4,_0x17ecd9,_0xc1d041,_0x47a0ce),function(_0x2f2dcf,_0x8cec10,_0x1bff81,_0x44bfb1){if(!_0x44bfb1['checkAttribute'](_0x8cec10,'footnotesListStyle'))return;let _0x26fc4f='decimal',_0x205ccb=!0x1;if(_0x1bff81['consumable']['consume'](_0x2f2dcf,{'attributes':'type'})){const _0x4c31cd={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x2f2dcf['getAttribute']('type')];_0x4c31cd&&(_0x26fc4f=_0x4c31cd),_0x205ccb=!0x0;}_0x1bff81['consumable']['consume'](_0x2f2dcf,{'styles':'list-style-type'})&&(_0x26fc4f=_0x2f2dcf['getStyle']('list-style-type'),_0x205ccb=!0x0),!_0x205ccb&&_0x8cec10['hasAttribute']('footnotesListStyle')||_0x1bff81['writer']['setAttribute']('footnotesListStyle',_0x26fc4f,_0x8cec10);}(_0xe10bd4,_0x17ecd9,_0xc1d041,_0x47a0ce));});}),_0x169ff4['for']('downcast')['add'](_0x17d1e5=>{_0x17d1e5['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x5e9ba3,_0xc2c24c,_0x5455f5)=>{if(!_0x5455f5['consumable']['consume'](_0xc2c24c['item'],_0x5e9ba3['name']))return;const _0x1aab70=M(_0xc2c24c['item'],_0x5455f5['mapper']),{attributeNewValue:_0x540ff2}=_0xc2c24c;null==_0x540ff2||0x1===_0x540ff2?_0x5455f5['writer']['removeAttribute']('start',_0x1aab70):_0x5455f5['writer']['setAttribute']('start',String(_0x540ff2),_0x1aab70);}),_0x17d1e5['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x3aef3d,_0x517d69,_0x13059d)=>{if(!_0x13059d['consumable']['consume'](_0x517d69['item'],_0x3aef3d['name']))return;const _0x2b8b49=M(_0x517d69['item'],_0x13059d['mapper']),{attributeNewValue:_0x5093e5}=_0x517d69;_0x5093e5&&'decimal'!==_0x5093e5?_0x13059d['writer']['setStyle']('list-style-type',_0x5093e5,_0x2b8b49):_0x13059d['writer']['removeStyle']('list-style-type',_0x2b8b49);});});}['_definePostfixer'](){const {editor:_0x918f79}=this,{model:_0x1921ea}=_0x918f79,_0x1907db=_0x918f79['plugins']['get'](c),_0x3549cc=this['_getDefaultListStyle'](),_0x3a2c33=this['_getDefaultStartIndex']();_0x1921ea['document']['registerPostFixer'](_0x3af1ec=>{const _0x52ba4c=_0x1921ea['document']['differ']['getChanges']();let _0x2ec13d=!0x1;for(const _0x3b7639 of _0x52ba4c){if('insert'!==_0x3b7639['type']||'$text'===_0x3b7639['name'])continue;const _0x2b8561=_0x1921ea['createRangeOn'](_0x3b7639['position']['nodeAfter']);for(const _0x55cfe4 of _0x2b8561['getItems']())_0x55cfe4['is']('element','footnotesDefinitions')&&(!_0x55cfe4['hasAttribute']('footnotesListStart')&&_0x1921ea['schema']['checkAttribute'](_0x55cfe4,'footnotesListStart')&&(_0x3af1ec['setAttribute']('footnotesListStart',_0x3a2c33,_0x55cfe4),_0x2ec13d=!0x0),!_0x55cfe4['hasAttribute']('footnotesListStyle')&&_0x1921ea['schema']['checkAttribute'](_0x55cfe4,'footnotesListStyle')&&(_0x3af1ec['setAttribute']('footnotesListStyle',_0x3549cc,_0x55cfe4),_0x2ec13d=!0x0));}return _0x2ec13d&&_0x1907db['_updateFootnotesCounters'](_0x3af1ec),_0x2ec13d;});}['_defineFormatter'](){const {editor:_0x618bb8}=this;_0x618bb8['plugins']['get'](c)['setFootnoteFormatter'](_0x26f77e=>this['_formatFootnoteListValue'](_0x26f77e));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x41005a,value:_0x3a633a,digits:_0x2cece0}){const _0x66416c=_0x41005a['getAttribute']('footnotesListStyle'),_0x4e7394=_0x41005a['getAttribute']('footnotesListStart'),_0x303d06=Math['floor'](_0x3a633a)+(_0x4e7394??0x1)-0x1;switch(_0x66416c){case'decimal-leading-zero':return function(_0x4720ad,_0xfe4e2b){return String(_0x4720ad)['padStart'](_0xfe4e2b,'0');}(_0x303d06,Math['max'](0x2,_0x2cece0));case'lower-alpha':case'lower-latin':return N(_0x303d06,!0x1);case'upper-alpha':case'upper-latin':return N(_0x303d06,!0x0);case'lower-roman':return X(_0x303d06,!0x1);case'upper-roman':return X(_0x303d06,!0x0);default:return String(_0x303d06);}}}function M(_0x153fa9,_0x51cacd){const _0x20db70=_0x51cacd['toViewElement'](_0x153fa9);return Array['from'](_0x20db70['getChildren']())['find'](_0x4a0a4f=>_0x4a0a4f['is']('element','ol')&&_0x4a0a4f['hasClass']('footnotes-list'));}function N(_0x475031,_0x38041c){let _0x2e8197='',_0x2a61c1=_0x475031;for(;_0x2a61c1>0x0;){const _0x40887a=(_0x2a61c1-0x1)%0x1a;_0x2e8197=String['fromCharCode'](0x61+_0x40887a)+_0x2e8197,_0x2a61c1=Math['floor']((_0x2a61c1-0x1)/0x1a);}return _0x38041c?_0x2e8197['toUpperCase']():_0x2e8197;}const V=[{'value':0x3e8,'numeral':'M'},{'value':0x384,'numeral':'CM'},{'value':0x1f4,'numeral':'D'},{'value':0x190,'numeral':'CD'},{'value':0x64,'numeral':'C'},{'value':0x5a,'numeral':'XC'},{'value':0x32,'numeral':'L'},{'value':0x28,'numeral':'XL'},{'value':0xa,'numeral':'X'},{'value':0x9,'numeral':'IX'},{'value':0x5,'numeral':'V'},{'value':0x4,'numeral':'IV'},{'value':0x1,'numeral':'I'}];function X(_0x2d10e6,_0x5834ef){let _0x29d22b='',_0x3f19a4=_0x2d10e6;for(const {value:_0x57a0ef,numeral:_0x42f407}of V)for(;_0x3f19a4>=_0x57a0ef;)_0x29d22b+=_0x42f407,_0x3f19a4-=_0x57a0ef;return _0x5834ef?_0x29d22b:_0x29d22b['toLowerCase']();}class H extends _0x1f29a4{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new ot();['keystrokes']=new rt();['focusables']=new _0x497dc();['focusCycler'];constructor(_0x52c070,{styleButtonViews:_0x36dde7,styleGridAriaLabel:_0x1cb196}){super(_0x52c070),(this['focusCycler']=new _0x3ace6d({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x36dde7,_0x1cb196),[this['startIndexFieldView'],this['additionalProperties']]=this['_appendAdditionalPropertiesCollapsibleView'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-footnotes-definitions-properties']},'children':this['children']}));}['render'](){if(super['render'](),this['stylesView']){this['focusables']['add'](this['stylesView']),this['focusTracker']['add'](this['stylesView']['element']);for(const _0x5dbc09 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x5dbc09['element']);tt({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>nt['window']['getComputedStyle'](this['stylesView']['element'])['getPropertyValue']('grid-template-columns')['split']('\x20')['length'],'uiLanguageDirection':this['locale']&&this['locale']['uiLanguageDirection']});}if(this['startIndexFieldView']){this['focusables']['add'](this['startIndexFieldView']),this['focusTracker']['add'](this['startIndexFieldView']['element']);const _0x5f03ea=_0x3d0875=>_0x3d0875['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5f03ea),this['keystrokes']['set']('arrowleft',_0x5f03ea),this['keystrokes']['set']('arrowup',_0x5f03ea),this['keystrokes']['set']('arrowdown',_0x5f03ea);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x431c49,_0x285fa2){const _0x30392d=new _0x1f29a4(this['locale']);return _0x30392d['children']=_0x30392d['createCollection'](),_0x30392d['children']['addMany'](_0x431c49),_0x30392d['setTemplate']({'tag':'div','attributes':{'aria-label':_0x285fa2,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x30392d['children']}),_0x30392d['children']['delegate']('execute')['to'](this),_0x30392d['focus']=function(){for(const _0x5de662 of this['children'])if(_0x5de662 instanceof _0x35adf5&&_0x5de662['isOn'])return void _0x5de662['focus']();this['children']['first']['focus']();},_0x30392d['focusTracker']=new ot(),_0x30392d['keystrokes']=new rt(),_0x30392d['render'](),_0x30392d['keystrokes']['listenTo'](_0x30392d['element']),this['children']['add'](_0x30392d),_0x30392d;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x51da7d=this['_createStartIndexPropertyView'](),_0x5093cc=[_0x51da7d],_0x406d0d=new st(this['locale'],_0x5093cc);return _0x406d0d['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x406d0d['buttonView']['bind']('isEnabled')['toMany'](_0x5093cc,'isEnabled',(..._0x931ec8)=>_0x931ec8['some'](_0x1937b1=>_0x1937b1)),_0x406d0d['buttonView']['on']('change:isEnabled',(_0xe319c7,_0x1b17c0,_0x38f845)=>{_0x38f845||(_0x406d0d['isCollapsed']=!0x0);}),this['children']['add'](_0x406d0d),[_0x51da7d,_0x406d0d];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x115cad=new it(this['locale'],et);return _0x115cad['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x115cad['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x115cad['fieldView']['on']('input',()=>{const _0x297a07=_0x115cad['fieldView']['element'],_0x6c35d6=_0x297a07['valueAsNumber'];Number['isNaN'](_0x6c35d6)?_0x115cad['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x297a07['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x6c35d6}):_0x115cad['errorText']=t(_0x6c35d6<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x115cad;}}class j extends _0x56a762{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x30e4c4,_0x4f9f42];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4e7d72}=this,{componentFactory:_0x26d242}=_0x4e7d72['ui'];_0x4e7d72['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x26d242['add']('footnotesStyle',function(_0x25d168){return _0x5a3e0d=>{const {t:t}=_0x5a3e0d,_0x1a2650=_0x25d168['commands']['get']('footnotesStyle'),_0x47c8de=_0x49d87f(_0x5a3e0d),{buttonView:_0x2faee6}=_0x47c8de;return _0x47c8de['class']='ck-footnotes-styles-dropdown',_0x47c8de['bind']('isEnabled')['to'](_0x1a2650,'isEnabled'),_0x2faee6['set']({'label':t('Footnotes\x20style'),'icon':_0x4985ca,'tooltip':!0x0}),_0x47c8de['once']('change:isOpen',()=>{const _0x213e09=function({editor:_0x2e11ca,dropdownView:_0x1e3f1e}){const {t:t}=_0x2e11ca['locale'],_0xdcf102=t('Footnotes\x20definitions\x20styles'),_0x3661c1=function(_0xd59ced){const t=_0xd59ced['locale']['t'],_0x134b4d=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x504c91},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x22f7ed},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x3b396a},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x48cf64},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x5efb33},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0xe36eb3}];return _0x134b4d['map'](function(_0x4eec5a){const _0x43294c=_0x4eec5a['locale'];return({label:_0x163012,icon:_0x587623,tooltip:_0x1eb9b7,style:_0x218a2b})=>{const _0x13a84a=_0x4eec5a['commands']['get']('footnotesStyle'),_0x87f95b=new _0x35adf5(_0x43294c);return _0x87f95b['set']({'label':_0x163012,'icon':_0x587623,'tooltip':_0x1eb9b7}),_0x87f95b['bind']('isOn')['to'](_0x13a84a,'value',_0x4b8080=>_0x4b8080===_0x218a2b),_0x87f95b['bind']('isEnabled')['to'](_0x13a84a,'isEnabled'),_0x87f95b['on']('execute',()=>{_0x4eec5a['execute']('footnotesStyle',{'value':_0x218a2b}),_0x4eec5a['editing']['view']['focus']();}),_0x87f95b;};}(_0xd59ced));}(_0x2e11ca),_0x1784a5=new H(_0x2e11ca['locale'],{'styleGridAriaLabel':_0xdcf102,'styleButtonViews':_0x3661c1});return _0x1784a5['delegate']('execute')['to'](_0x1e3f1e),_0x1784a5['on']('footnotesListStart',(_0x2a3fd1,_0x25eb28)=>{_0x2e11ca['execute']('footnotesStart',{'value':_0x25eb28['startIndex']});}),_0x1784a5;}({'editor':_0x25d168,'dropdownView':_0x47c8de});_0x47c8de['panelView']['children']['add'](_0x213e09);}),_0x47c8de;};}(_0x4e7d72));}['afterInit'](){const {editor:_0x20312c}=this,{t:t}=_0x20312c['locale'],_0x194c8e=_0x20312c['plugins']['get'](_0x4f9f42),{defaultPositions:_0x597f21}=_0xa53207;_0x194c8e['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x20312c['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x5b21a7=>{let _0x2f7fbc=_0x5b21a7['getFirstPosition']()?.['parent'];return _0x2f7fbc?.['is']('$text')&&(_0x2f7fbc=_0x2f7fbc['parent']),_0x2f7fbc?.['is']('element')?_0x2f7fbc['findAncestor'](J):null;},'positions':[_0x597f21['southArrowNorth'],_0x597f21['southArrowNorthMiddleWest'],_0x597f21['southArrowNorthMiddleEast'],_0x597f21['southArrowNorthWest'],_0x597f21['southArrowNorthEast'],_0x597f21['northArrowSouth'],_0x597f21['northArrowSouthMiddleWest'],_0x597f21['northArrowSouthMiddleEast'],_0x597f21['northArrowSouthWest'],_0x597f21['northArrowSouthEast'],_0x597f21['viewportStickyNorth']]});}}class ft extends _0x56a762{static get['pluginName'](){return'FootnotesProperties';}static get['requires'](){return[P,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{lt as Footnotes,e as FootnotesClipboard,r as FootnotesEditing,ft as FootnotesProperties,P as FootnotesPropertiesEditing,j as FootnotesPropertiesUI,C as FootnotesStartCommand,S as FootnotesStyleCommand,c as FootnotesTracker,i as FootnotesUI,m as InsertFootnoteCommand};
23
+ import{Plugin as _0x38bf2a,Command as _0x2c5759}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x3a58b1,isWidget as _0xb7cd91,toWidgetEditable as _0x3215bc,WidgetToolbarRepository as _0x2b4c2f}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x2c6977,logWarning as _0xc317f4,FocusTracker as ot,KeystrokeHandler as rt,global as nt}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x3069c7,ClickObserver as _0x20e72a}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x48e04d}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x40c2d8,ButtonView as _0x96c644,View as _0x57adf2,ViewCollection as _0x442327,FocusCycler as _0x15f841,addKeyboardHandlingForGrid as tt,CollapsibleView as st,LabeledFieldView as it,createLabeledInputNumber as et,ContextualBalloon as _0x1dce9d,BalloonPanelView as _0x45d10e,createDropdown as _0x1cbc3a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x3f27de,IconListStyleDecimal as _0x367a65,IconListStyleDecimalLeadingZero as _0x1b36b1,IconListStyleLowerRoman as _0x5bbf1c,IconListStyleUpperRoman as _0xfa3859,IconListStyleLowerLatin as _0x34c741,IconListStyleUpperLatin as _0x32d945}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x446ef8,_0x55efb8){this['_model']=_0x446ef8,this['_elementName']=_0x55efb8['elementName'],this['_getElementKey']=_0x55efb8['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x12f896){const _0xddf40a=new Set(),_0x44378b=new Map();for(const _0x2a0592 of _0x12f896){if('insert'===_0x2a0592['type']&&'$text'!==_0x2a0592['name']&&_0x2a0592['position']['nodeAfter']){const _0x509b15=this['_model']['createRangeOn'](_0x2a0592['position']['nodeAfter']);for(const _0x288ec5 of _0x509b15['getItems']()){if(!_0x288ec5['is']('element',this['_elementName']))continue;const _0x820d5e=this['_getElementKey'](_0x288ec5);_0x44378b['has'](_0x820d5e)||_0x44378b['set'](_0x820d5e,[]),_0x44378b['get'](_0x820d5e)['push'](_0x288ec5);}}if('remove'===_0x2a0592['type']&&_0x2a0592['name']===this['_elementName']){const _0x1f2db3=this['_getElementKey']({'getAttribute':_0x4e2ed2=>_0x2a0592['attributes']['get'](_0x4e2ed2)});_0xddf40a['add'](_0x1f2db3);}}for(const [_0x8f336f,_0x3d2f63]of this['_trackedElements'])'$graveyard'===_0x3d2f63['root']['rootName']&&_0xddf40a['add'](_0x8f336f);for(const _0x31cf04 of _0xddf40a)this['_trackedElements']['delete'](_0x31cf04);for(const [_0x328b3f,_0x29829f]of _0x44378b)this['_trackedElements']['set'](_0x328b3f,_0x29829f[_0x29829f['length']-0x1]);const _0x73b808=new Set();for(const [_0x4ed6fd,_0x99fdee]of _0x44378b)_0xddf40a['has'](_0x4ed6fd)&&(_0x73b808['add'](_0x99fdee[0x0]),_0x99fdee['length']>0x1?_0x44378b['set'](_0x4ed6fd,_0x99fdee['slice'](0x1)):_0x44378b['delete'](_0x4ed6fd),_0xddf40a['delete'](_0x4ed6fd));return{'removed':Array['from'](_0xddf40a),'inserted':Array['from'](_0x44378b['values']())['flat'](),'moved':Array['from'](_0x73b808)};}}class c extends _0x38bf2a{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d94e3){super(_0x1d94e3),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x3d0497=>_0x3d0497['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x553264=>_0x553264['getAttribute']('footnoteId')});}['init'](){const {editor:_0x10d379}=this,{model:_0x2dbe8e,data:_0x392807}=_0x10d379;_0x2dbe8e['document']['registerPostFixer'](_0x1d5c79=>{const _0x128ead=_0x2dbe8e['document']['differ']['getChanges']();let _0x45f214=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x1d5c79,_0x128ead)&&(_0x45f214=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x1d5c79,_0x128ead)&&(_0x45f214=!0x0),this['_handleFootnoteReferencesChanges'](_0x1d5c79,_0x128ead)&&(_0x45f214=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x1d5c79)&&(_0x45f214=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x1d5c79)&&(_0x45f214=!0x0),this['_sortFootnoteDefinitions'](_0x1d5c79)&&(_0x45f214=!0x0),_0x45f214;}),this['listenTo'](_0x2dbe8e['document'],'change:data',()=>{_0x2dbe8e['enqueueChange']({'isUndoable':!0x1},_0x552744=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x552744);});},{'priority':'low'}),this['listenTo'](_0x392807,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x2fc68f){return this['_footnotes']['find'](_0x4668ea=>_0x4668ea['id']===_0x2fc68f)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x43dcd4){this['_footnoteFormatter']=_0x43dcd4;}['_updateFootnotesCounters'](_0x103253,_0x396c5b=0x0){let _0x3b02e4=!0x1;for(let _0x591cad=_0x396c5b;_0x591cad<this['_footnotes']['length'];_0x591cad++)this['_updateFootnoteRefCounter'](_0x103253,_0x591cad)&&(_0x3b02e4=!0x0);return _0x3b02e4;}['_insertEmptyFootnotesDefinitionsContainer'](_0x513990,_0x2d286c){const _0x33fcc7=_0x513990['createElement']('footnotesDefinitions',{});return _0x513990['append'](_0x33fcc7,_0x2d286c),this['_footnotesDefinitions']=_0x33fcc7,_0x33fcc7;}['_ensureFootnotesDefinitionsContainerExists'](_0x30a6d4){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x283e30=this['_footnotes'][0x0]['reference']['root'],_0xe94c80=this['_insertEmptyFootnotesDefinitionsContainer'](_0x30a6d4,_0x283e30);for(const _0x3b2b37 of this['_footnotes'])_0x3b2b37['definition']['parent']||_0x30a6d4['insert'](_0x3b2b37['definition'],_0xe94c80,'end');this['_updateFootnotesCounters'](_0x30a6d4);}['_handleFootnotesDefinitionsObjectChanges'](_0x1a5157,_0x47d361){let _0x30fc7c=!0x1;const {inserted:_0x4ed9bd,removed:_0x613da3,moved:_0x43f98d}=this['_footnoteDefsContainerTracker']['getChanges'](_0x47d361);if(_0x43f98d['length']&&(this['_footnotesDefinitions']=_0x43f98d[0x0]),_0x4ed9bd['length']){if(_0x4ed9bd['length']>0x1||this['_footnotesDefinitions']&&_0x4ed9bd['some'](_0x45e032=>_0x45e032!==this['_footnotesDefinitions'])){const _0x414c14=_0x1a5157['createElement']('footnotesDefinitions',{}),_0x324bc1=[];this['_footnotesDefinitions']&&_0x324bc1['push'](this['_footnotesDefinitions']),_0x324bc1['push'](..._0x4ed9bd),_0x1a5157['insert'](_0x414c14,_0x324bc1[0x0],'before');for(const _0x524839 of _0x324bc1)_0x1a5157['move'](_0x1a5157['createRangeIn'](_0x524839),_0x1a5157['createPositionAt'](_0x414c14,'end')),_0x1a5157['remove'](_0x524839);this['_footnotesDefinitions']=_0x414c14,this['_updateFootnotesCounters'](_0x1a5157),_0x30fc7c=!0x0;}else this['_footnotesDefinitions']=_0x4ed9bd[0x0];}if(_0x613da3['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x54a690 of this['_footnotes'])_0x1a5157['remove'](_0x54a690['reference']),_0x30fc7c=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x30fc7c;}['_handleFootnoteDefinitionsChanges'](_0x441369,_0x1d39e6){let _0x49f3a5=!0x1;const _0x44fcc0=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x2dfab9,moved:_0x1874c7}=this['_footnoteDefsTracker']['getChanges'](_0x1d39e6);for(const _0x492786 of[..._0x1874c7,..._0x2dfab9]){const _0x2d234d=_0x492786['getAttribute']('footnoteId'),_0xfbb294=this['getFootnote'](_0x2d234d);_0xfbb294&&(_0xfbb294['definition']=_0x492786),_(_0x441369,_0x44fcc0,_0x492786)&&(_0x49f3a5=!0x0);}return _0x49f3a5;}['_handleFootnoteReferencesChanges'](_0x36a7e5,_0x3cc62a){let _0x51d8f4=!0x1;const {removed:_0x202785,inserted:_0x241dbe,moved:_0x121fd9}=this['_footnoteRefsTracker']['getChanges'](_0x3cc62a);for(const _0x2eb2a6 of _0x202785)this['_handleRemoveFootnoteReferenceById'](_0x36a7e5,_0x2eb2a6)&&(_0x51d8f4=!0x0);for(const _0x4ec304 of _0x241dbe)this['_handleInsertedFootnoteReference'](_0x36a7e5,_0x4ec304)&&(_0x51d8f4=!0x0);for(const _0x35ed9b of _0x121fd9)this['_handleMovedFootnoteReference'](_0x36a7e5,_0x35ed9b)&&(_0x51d8f4=!0x0);return _0x51d8f4;}['_handleFootnotesDefinitionsObjectSync'](_0x5ef297){if(!this['_footnotesDefinitions'])return!0x1;let _0x4825eb=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x36b797=[];for(const _0x2e9eb2 of this['_footnotesDefinitions']['getChildren']()){const _0xca7839=_0x2e9eb2['getAttribute']('footnoteId');this['getFootnote'](_0xca7839)||(_0x36b797['unshift'](_0x2e9eb2),_0x4825eb=!0x0);}for(const _0x2910aa of _0x36b797)_0x5ef297['remove'](_0x2910aa);}const _0x35c235=new Set(),_0x7a2757=[];for(const _0x49ded5 of this['_footnotesDefinitions']['getChildren']()){const _0x5749e3=_0x49ded5['getAttribute']('footnoteId');_0x35c235['has'](_0x5749e3)?(_0x7a2757['unshift'](_0x49ded5),_0x4825eb=!0x0):_0x35c235['add'](_0x5749e3);}for(const _0x5eb23d of _0x7a2757)_0x5ef297['remove'](_0x5eb23d);return this['_footnotesDefinitions']['childCount']||(_0x5ef297['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x4825eb=!0x0),_0x4825eb;}['_handleInsertedFootnoteReference'](_0x2924c1,_0x432ec6){if(this['_footnotes']['find'](_0x52a60f=>_0x52a60f['reference']===_0x432ec6))return!0x1;let _0x2bd28a=!0x1;const _0x593fe5=_0x432ec6['getAttribute']('footnoteId'),_0x24c6d5=this['_footnotes']['findIndex'](_0x374102=>_0x374102['id']===_0x593fe5);-0x1!==_0x24c6d5&&(_0x2924c1['remove'](this['_footnotes'][_0x24c6d5]['reference']),this['_footnotes']['splice'](_0x24c6d5,0x1),_0x2bd28a=!0x0);let _0x2e93dc=this['_footnotesDefinitions']?function(_0x36d59f,_0x45edb5){for(const _0x336103 of _0x36d59f['getChildren']())if(_0x336103['getAttribute']('footnoteId')===_0x45edb5)return _0x336103;return null;}(this['_footnotesDefinitions'],_0x593fe5):null;_0x2e93dc||(_0x2e93dc=_0x2924c1['createElement']('footnoteDefinition',{'footnoteId':_0x593fe5}),this['_footnotesDefinitions']&&(_0x2924c1['insert'](_0x2e93dc,this['_footnotesDefinitions'],'end'),_0x2bd28a=!0x0));const _0x308687={'id':_0x593fe5,'reference':_0x432ec6,'definition':_0x2e93dc},_0x5414e8=I(this['editor']['model'],this['_footnotes'],_0x432ec6);this['_footnotes']['splice'](_0x5414e8,0x0,_0x308687);let _0x5a0f7c=_0x5414e8;return-0x1!==_0x24c6d5&&(_0x5a0f7c=Math['min'](_0x5414e8,_0x24c6d5)),this['_updateFootnotesCounters'](_0x2924c1,_0x5a0f7c)&&(_0x2bd28a=!0x0),_0x2bd28a;}['_handleRemoveFootnoteReferenceById'](_0x587fd5,_0x5c466c){const _0x37c923=this['_footnotes']['findIndex'](_0x31ea8f=>_0x31ea8f['id']===_0x5c466c);if(-0x1===_0x37c923)return!0x1;let _0xd4ca49=!0x1;const _0x52d133=this['_footnotes'][_0x37c923];return'$graveyard'!==_0x52d133['definition']['root']['rootName']&&(_0x587fd5['remove'](_0x52d133['definition']),_0xd4ca49=!0x0),this['_footnotes']['splice'](_0x37c923,0x1),this['_updateFootnotesCounters'](_0x587fd5,_0x37c923)&&(_0xd4ca49=!0x0),_0xd4ca49;}['_handleMovedFootnoteReference'](_0x12ca28,_0x1d05cc){const _0x55f7bb=_0x1d05cc['getAttribute']('footnoteId'),_0x4a92c6=this['_footnotes']['findIndex'](_0x1fdde4=>_0x1fdde4['id']===_0x55f7bb),_0x18a60a=this['_footnotes'][_0x4a92c6];let _0x55e59f=!0x1;_0x18a60a['reference']=_0x1d05cc,this['_footnotes']['splice'](_0x4a92c6,0x1);const _0xacee7b=I(this['editor']['model'],this['_footnotes'],_0x1d05cc);return this['_footnotes']['splice'](_0xacee7b,0x0,_0x18a60a),this['_updateFootnotesCounters'](_0x12ca28,Math['min'](_0x4a92c6,_0xacee7b))&&(_0x55e59f=!0x0),_0x55e59f;}['_updateFootnoteRefCounter'](_0x80f1d2,_0x1ac083){if(!this['_footnotesDefinitions'])return!0x1;const _0x1d2d33=this['_footnotes'][_0x1ac083];let _0x29e546;return _0x29e546=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x1d2d33,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x1ac083+0x1}):String(_0x1ac083+0x1),_0x1d2d33['reference']['getAttribute']('footnoteCounter')!=_0x29e546&&(_0x80f1d2['setAttribute']('footnoteCounter',_0x29e546,_0x1d2d33['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x4b3f85){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x525e59,_0x37dc39){if(_0x525e59['length']!==_0x37dc39['length'])return!0x1;for(let _0x1a3861=0x0;_0x1a3861<_0x525e59['length'];_0x1a3861++)if(_0x525e59[_0x1a3861]!==_0x37dc39[_0x1a3861])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x2fc506=>_0x2fc506['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x10cd14=>_0x10cd14['getAttribute']('footnoteId'))))return!0x1;let _0x371cd9=!0x1;for(let _0x158c10=0x0;_0x158c10<this['_footnotes']['length'];_0x158c10++){const _0x38eb9c=this['_footnotes'][_0x158c10],_0x517a56=_0x4b3f85['createPositionBefore'](_0x38eb9c['definition']),_0x5d298e=_0x4b3f85['createPositionAt'](this['_footnotesDefinitions'],_0x158c10);_0x517a56['isEqual'](_0x5d298e)||(_0x4b3f85['move'](_0x4b3f85['createRangeOn'](_0x38eb9c['definition']),_0x5d298e),_0x371cd9=!0x0);}return _0x371cd9;}['_ensureFootnotesReferencesHaveProperOrder'](_0x2d51f9){if(!this['_footnotes']['length'])return!0x1;const {model:_0x273ece}=this['editor'];let _0x140522=!0x1;for(let _0x107718=0x0;_0x107718<this['_footnotes']['length']-0x1;_0x107718++){const _0x48bfc3=this['_footnotes'][_0x107718],_0x4157dc=this['_footnotes'][_0x107718+0x1],_0x596105=_0x273ece['createPositionBefore'](_0x48bfc3['reference']),_0x5e2d51=_0x273ece['createPositionBefore'](_0x4157dc['reference']);'after'===_0x596105['compareWith'](_0x5e2d51)&&(this['_handleMovedFootnoteReference'](_0x2d51f9,_0x48bfc3['reference']),_0x107718=-0x1,_0x140522=!0x0);}return _0x140522;}}function _(_0x5bbab5,_0x44dea4,_0x2d1326){if(_0x2d1326['childCount'])return!0x1;const _0x3e8b3f=_0x44dea4?'paragraph':'footnoteInlineContent';return _0x5bbab5['insert'](_0x5bbab5['createElement'](_0x3e8b3f),_0x2d1326),!0x0;}function I(_0x1c4726,_0x33e8e6,_0xa0270e){if(0x0===_0x33e8e6['length'])return 0x0;const _0x5309cc=_0x1c4726['createPositionBefore'](_0xa0270e);for(let _0x1e9be5=0x0;_0x1e9be5<_0x33e8e6['length'];_0x1e9be5++){const _0x34c7ed=_0x33e8e6[_0x1e9be5],_0x182f9f=_0x1c4726['createPositionBefore'](_0x34c7ed['reference']);if('before'===_0x5309cc['compareWith'](_0x182f9f))return _0x1e9be5;}const _0x3321f3=_0xa0270e['root'];let _0x34afba=-0x1;for(let _0x35cb99=_0x33e8e6['length']-0x1;_0x35cb99>=0x0;_0x35cb99--)if(_0x33e8e6[_0x35cb99]['reference']['root']===_0x3321f3){_0x34afba=_0x35cb99;break;}if(-0x1!==_0x34afba)return _0x34afba+0x1;const _0x28015b=_0x1c4726['document']['getRootNames'](),_0x3903b7=_0x28015b['indexOf'](_0x3321f3['rootName']),_0xaa56a9=_0x28015b[_0x3903b7+0x1];if(_0xaa56a9){for(let _0x1e9f78=0x0;_0x1e9f78<_0x33e8e6['length'];_0x1e9f78++)if(_0x33e8e6[_0x1e9f78]['reference']['root']['rootName']===_0xaa56a9)return _0x1e9f78;}return _0x33e8e6['length'];}class m extends _0x2c5759{['refresh'](){const _0x220f45=this['editor']['model']['document']['selection'],_0x15da60=this['_getPositionToInsertFootnote'](_0x220f45);this['isEnabled']=!!_0x15da60;}['execute'](_0x2e8c8c){const {editor:_0x339dca}=this,{model:_0x3946b3}=_0x339dca,{selection:_0x50653e}=_0x3946b3['document'],_0x53401d=this['_getPositionToInsertFootnote'](_0x50653e);if(!_0x53401d)return;const _0x21e3d9=_0x339dca['plugins']['get']('FootnotesEditing'),_0xe3bbbb=_0x2e8c8c?.['footnoteId']??_0x2c6977();!function(_0x1a27f8){return'string'==typeof _0x1a27f8&&_0x1a27f8['length']>0x0&&!/\s/['test'](_0x1a27f8)&&!/^\d/['test'](_0x1a27f8);}(_0xe3bbbb)?_0xc317f4('insert-footnote-command-executed-with-invalid-id'):(_0x3946b3['change'](_0x2f66ef=>{const _0x375466=_0x2f66ef['createElement']('footnoteRef',{'footnoteId':_0xe3bbbb});_0x3946b3['insertObject'](_0x375466,_0x53401d,null);}),_0x21e3d9['_moveSelectionToFootnoteDefinition'](_0xe3bbbb));}['_getPositionToInsertFootnote'](_0x28c6ff){const {model:_0x91e6e}=this['editor'],{schema:_0x2a808b}=_0x91e6e,_0x3488a1=_0x28c6ff['getFirstRange']();for(const _0x4efd67 of _0x3488a1['getItems']())if(_0x2a808b['isBlock'](_0x4efd67)||_0x2a808b['isObject'](_0x4efd67))return null;const _0x5e8e11=_0x3488a1['end'];return _0x2a808b['checkChild'](_0x5e8e11,'footnoteRef')?_0x5e8e11:null;}}class r extends _0x38bf2a{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x7af19d}=this;_0x7af19d['config']['define']('footnotes.multiBlock',!0x0),_0x7af19d['commands']['add']('insertFootnote',new m(_0x7af19d)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x139d5d){const _0x172b37=_0x4cdab4([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x3706ec=0x47a28506,_0x5c3a43=0x47a5fd0e^_0x3706ec,_0x55c3ee=window[_0x4cdab4([0x44,0x61,0x74,0x65])][_0x4cdab4([0x6e,0x6f,0x77])](),_0x5992f1=_0x139d5d[_0x4cdab4([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x143ce8=new window[(_0x4cdab4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b706b=>{_0x5992f1[_0x4cdab4([0x6f,0x6e,0x63,0x65])](_0x4cdab4([0x72,0x65,0x61,0x64,0x79]),_0x4b706b);}),_0x1a5756={[_0x4cdab4([0x6b,0x74,0x79])]:_0x4cdab4([0x45,0x43]),[_0x4cdab4([0x75,0x73,0x65])]:_0x4cdab4([0x73,0x69,0x67]),[_0x4cdab4([0x63,0x72,0x76])]:_0x4cdab4([0x50,0x2d,0x32,0x35,0x36]),[_0x4cdab4([0x78])]:_0x4cdab4([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x4cdab4([0x79])]:_0x4cdab4([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x4cdab4([0x61,0x6c,0x67])]:_0x4cdab4([0x45,0x53,0x32,0x35,0x36])},_0x3ee4f9=_0x5992f1[_0x4cdab4([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4cdab4([0x67,0x65,0x74])](_0x4cdab4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x41a11a(){let _0x1e4ef6,_0x53b3b0=null,_0x9b12a=null;try{if(_0x3ee4f9==_0x4cdab4([0x47,0x50,0x4c]))return _0x4cdab4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1e4ef6=_0x39f519(),!_0x1e4ef6)return _0x4cdab4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1e4ef6[_0x4cdab4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x9b12a=_0x3aea30(_0x1e4ef6[_0x4cdab4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1e4ef6[_0x4cdab4([0x6a,0x74,0x69])])),await _0x5acf37()?_0x5c6722()?_0x359ee1()?_0x4cdab4([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2a15ad()?(_0x1e4ef6[_0x4cdab4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4cdab4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x53b3b0=_0x2a7cb6(_0x4cdab4([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1e4ef6[_0x4cdab4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4cdab4([0x74,0x72,0x69,0x61,0x6c])&&(_0x53b3b0=_0x2a7cb6(_0x4cdab4([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2ddfae()):_0x4cdab4([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4cdab4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4cdab4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4cdab4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x359ee1(){const _0x16a506=[_0x4cdab4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4cdab4([0x74,0x72,0x69,0x61,0x6c])][_0x4cdab4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1e4ef6[_0x4cdab4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x55c3ee/0x3e8:0xe10*_0x5c3a43;return _0x1e4ef6[_0x4cdab4([0x65,0x78,0x70])]<_0x16a506;}function _0x5c6722(){const _0x34e5df=_0x1e4ef6[_0x4cdab4([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x34e5df&&(!!_0x34e5df[_0x4cdab4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4cdab4([0x2a]))||!!_0x34e5df[_0x4cdab4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4cdab4([0x46,0x4f,0x4f])));}function _0x2a15ad(){const _0x2976cf=_0x1e4ef6[_0x4cdab4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2976cf||0x0==_0x2976cf[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x102071}=new URL(window[_0x4cdab4([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2976cf[_0x4cdab4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x102071))return!0x0;const _0x346d70=_0x102071[_0x4cdab4([0x73,0x70,0x6c,0x69,0x74])](_0x4cdab4([0x2e]));return _0x2976cf[_0x4cdab4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x30f358=>_0x30f358[_0x4cdab4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4cdab4([0x2a])))[_0x4cdab4([0x6d,0x61,0x70])](_0x14de76=>_0x14de76[_0x4cdab4([0x73,0x70,0x6c,0x69,0x74])](_0x4cdab4([0x2e])))[_0x4cdab4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1485ce=>_0x1485ce[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x346d70[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4cdab4([0x6d,0x61,0x70])](_0x1c61fc=>Array(_0x346d70[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1c61fc[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4cdab4([0x66,0x69,0x6c,0x6c])](_0x1c61fc[0x0]===_0x4cdab4([0x2a])?_0x4cdab4([0x2a]):'')[_0x4cdab4([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1c61fc))[_0x4cdab4([0x73,0x6f,0x6d,0x65])](_0x308f01=>_0x346d70[_0x4cdab4([0x65,0x76,0x65,0x72,0x79])]((_0x2d3cbc,_0x4828de)=>_0x308f01[_0x4828de]===_0x2d3cbc||_0x308f01[_0x4828de]===_0x4cdab4([0x2a])));}function _0x2ddfae(){return _0x53b3b0&&_0x9b12a?new window[(_0x4cdab4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x348888,_0x1fd578)=>{_0x53b3b0[_0x4cdab4([0x74,0x68,0x65,0x6e])](_0x348888,_0x1fd578),_0x9b12a[_0x4cdab4([0x74,0x68,0x65,0x6e])](_0x3288ab=>{_0x3288ab!=_0x4cdab4([0x56,0x61,0x6c,0x69,0x64])&&_0x348888(_0x3288ab);},_0x1fd578);}):_0x53b3b0||_0x9b12a||_0x4cdab4([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3aea30(_0x148f88,_0x2c4e59){return new window[(_0x4cdab4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58d35d=>{if(_0x528b7c())return _0x58d35d(_0x4cdab4([0x56,0x61,0x6c,0x69,0x64]));_0x5cc11d(),_0x5992f1[_0x4cdab4([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4cdab4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x216d01=!0x1;const _0x509cb0=_0x2c6977();function _0x2da8bf(_0x1abc90){return!!_0x1abc90&&(typeof _0x1abc90===_0x4cdab4([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1abc90===_0x4cdab4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1abc90[_0x4cdab4([0x74,0x68,0x65,0x6e])]===_0x4cdab4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1abc90[_0x4cdab4([0x63,0x61,0x74,0x63,0x68])]===_0x4cdab4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3832ef(_0x56a2c0){_0x4adcfe(_0x56a2c0)[_0x4cdab4([0x74,0x68,0x65,0x6e])](_0x1cc9ee=>{if(!_0x1cc9ee||_0x1cc9ee[_0x4cdab4([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4cdab4([0x6f,0x6b]))return _0x4cdab4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2d229e(_0x3e26e7(_0x509cb0+_0x2c4e59))!=_0x1cc9ee[_0x4cdab4([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4cdab4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4cdab4([0x56,0x61,0x6c,0x69,0x64]);})[_0x4cdab4([0x74,0x68,0x65,0x6e])](_0x366b94=>(_0x4926cf(),_0x366b94),()=>{const _0x55e0da=_0x43a09f();return null==_0x55e0da?(_0x4926cf(),_0x4cdab4([0x56,0x61,0x6c,0x69,0x64])):_0x4cdab4(_0x55c3ee-_0x55e0da>(0x63ae0106^_0x3706ec)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4cdab4([0x74,0x68,0x65,0x6e])](_0x58d35d)[_0x4cdab4([0x63,0x61,0x74,0x63,0x68])](()=>{_0x58d35d(_0x4cdab4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3c6662=0x47946b86^_0x3706ec;function _0x4926cf(){const _0x628711=_0x4cdab4([0x6c,0x6c,0x63,0x74,0x2d])+_0x2d229e(_0x3e26e7(_0x148f88)),_0x2dcd42=_0x43f753(_0x2d229e(window[_0x4cdab4([0x4d,0x61,0x74,0x68])][_0x4cdab4([0x63,0x65,0x69,0x6c])](_0x55c3ee/_0x3c6662)));window[_0x4cdab4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4cdab4([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x628711,_0x2dcd42);}function _0x43a09f(){const _0x5a2649=_0x4cdab4([0x6c,0x6c,0x63,0x74,0x2d])+_0x2d229e(_0x3e26e7(_0x148f88)),_0x3469d7=window[_0x4cdab4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4cdab4([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5a2649);return _0x3469d7?window[_0x4cdab4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x43f753(_0x3469d7),0x10)*_0x3c6662:null;}function _0x4adcfe(_0x21aa46){return new window[(_0x4cdab4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2180d5,_0x34db72)=>{_0x21aa46[_0x4cdab4([0x74,0x68,0x65,0x6e])](_0x2180d5,_0x34db72),window[_0x4cdab4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x34db72,0x47a351c6^_0x3706ec);});}}_0x5992f1[_0x4cdab4([0x6f,0x6e])](_0x4cdab4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2f7309,_0x191984)=>{if(_0x191984[0x0]!=_0x148f88)return _0x58d35d(_0x4cdab4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x191984[0x1]={..._0x191984[0x1],[_0x4cdab4([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x509cb0};},{[_0x4cdab4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4cdab4([0x68,0x69,0x67,0x68])}),_0x5992f1[_0x4cdab4([0x6f,0x6e])](_0x4cdab4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4df746=>{_0x2da8bf(_0x4df746[_0x4cdab4([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x216d01=!0x0,_0x3832ef(_0x4df746[_0x4cdab4([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4cdab4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4cdab4([0x6c,0x6f,0x77])}),_0x143ce8[_0x4cdab4([0x74,0x68,0x65,0x6e])](()=>{_0x216d01||_0x58d35d(_0x4cdab4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x528b7c(){return _0x5992f1[_0x4cdab4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4cdab4([0x76,0x69,0x65,0x77])][_0x4cdab4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4cdab4([0x61,0x75,0x74,0x6f]);}function _0x5cc11d(){_0x5992f1[_0x4cdab4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4cdab4([0x76,0x69,0x65,0x77])][_0x4cdab4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4cdab4([0x61,0x75,0x74,0x6f]);}}function _0x2a7cb6(_0x2ecba2){const _0x3a9784=[new window[(_0x4cdab4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x28c516=>setTimeout(_0x28c516,0x47abbbca^_0x3706ec)),_0x143ce8[_0x4cdab4([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4cdab4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d236e=>{let _0x2f7fd8=0x0;_0x5992f1[_0x4cdab4([0x6d,0x6f,0x64,0x65,0x6c])][_0x4cdab4([0x6f,0x6e])](_0x4cdab4([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x44923e,_0x39eb27)=>{_0x39eb27[0x0][_0x4cdab4([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2f7fd8++,_0x2f7fd8==(0x47a284fe^_0x3706ec)&&(_0x3d236e(),_0x44923e[_0x4cdab4([0x6f,0x66,0x66])]());});}))];return window[_0x4cdab4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4cdab4([0x72,0x61,0x63,0x65])](_0x3a9784)[_0x4cdab4([0x74,0x68,0x65,0x6e])](()=>_0x2ecba2);}async function _0x17b890(){await _0x143ce8,_0x5992f1[_0x4cdab4([0x6d,0x6f,0x64,0x65,0x6c])][_0x4cdab4([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x27321e,_0x5992f1[_0x4cdab4([0x6d,0x6f,0x64,0x65,0x6c])][_0x4cdab4([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x27321e,_0x5992f1[_0x4cdab4([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4cdab4([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x508174(_0x8a5892){const _0x138565=_0x36ec86();_0x5992f1[_0x138565]=_0x4cdab4([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x8a5892,_0x8a5892!=_0x4cdab4([0x56,0x61,0x6c,0x69,0x64])&&_0x17b890();}function _0x36ec86(){const _0x2a2c78=window[_0x4cdab4([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4cdab4([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4cdab4([0x6e,0x6f,0x77])]())[_0x4cdab4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4cdab4([0x2e]),'');let _0x568170=_0x4cdab4([0x75]);for(let _0x328ba4=0x0;_0x328ba4<_0x2a2c78[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x328ba4+=0x2){let _0x33871b=window[_0x4cdab4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2a2c78[_0x4cdab4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x328ba4,_0x328ba4+0x2));_0x33871b>=_0x172b37[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x33871b-=_0x172b37[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x568170+=_0x172b37[_0x33871b];}return _0x568170;}function _0x39f519(){const _0x4122a3=_0x3ee4f9[_0x4cdab4([0x73,0x70,0x6c,0x69,0x74])](_0x4cdab4([0x2e]));if(0x3!=_0x4122a3[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4e2ce5(_0x4122a3[0x1]);function _0x4e2ce5(_0x32a28a){const _0x5705f9=_0x317b92(_0x32a28a);return _0x5705f9&&_0x2122ef()?_0x5705f9:null;function _0x2122ef(){const _0x5d88b7=_0x5705f9[_0x4cdab4([0x6a,0x74,0x69])],_0xff7dd7=window[_0x4cdab4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d88b7[_0x4cdab4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5d88b7[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x30157={..._0x5705f9,[_0x4cdab4([0x6a,0x74,0x69])]:_0x5d88b7[_0x4cdab4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5d88b7[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x30157[_0x4cdab4([0x76,0x63])],_0x3e26e7(_0x30157)==_0xff7dd7;}}}async function _0x5acf37(){let _0x2dc78f=!0x0;try{const _0x4ca1b4=_0x3ee4f9[_0x4cdab4([0x73,0x70,0x6c,0x69,0x74])](_0x4cdab4([0x2e])),[_0x3112f3,_0x58dba5,_0x1b977b]=_0x4ca1b4;return _0x5eecf6(_0x3112f3),await _0x379e49(_0x3112f3,_0x58dba5,_0x1b977b),_0x2dc78f;}catch{return!0x1;}function _0x5eecf6(_0x6737c9){const _0x301b2d=_0x317b92(_0x6737c9);_0x301b2d&&_0x301b2d[_0x4cdab4([0x61,0x6c,0x67])]==_0x4cdab4([0x45,0x53,0x32,0x35,0x36])||(_0x2dc78f=!0x1);}async function _0x379e49(_0x53680e,_0x91f2aa,_0x376d50){const _0x5b8144=window[_0x4cdab4([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4cdab4([0x66,0x72,0x6f,0x6d])](_0x8a179d(_0x376d50),_0x14c2e8=>_0x14c2e8[_0x4cdab4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x21f6a1=new window[(_0x4cdab4([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4cdab4([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x53680e+_0x4cdab4([0x2e])+_0x91f2aa),_0x3dfa50=window[_0x4cdab4([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4cdab4([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3dfa50)return;const _0x242474=await _0x3dfa50[_0x4cdab4([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4cdab4([0x6a,0x77,0x6b]),_0x1a5756,{[_0x4cdab4([0x6e,0x61,0x6d,0x65])]:_0x4cdab4([0x45,0x43,0x44,0x53,0x41]),[_0x4cdab4([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4cdab4([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4cdab4([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3dfa50[_0x4cdab4([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4cdab4([0x6e,0x61,0x6d,0x65])]:_0x4cdab4([0x45,0x43,0x44,0x53,0x41]),[_0x4cdab4([0x68,0x61,0x73,0x68])]:{[_0x4cdab4([0x6e,0x61,0x6d,0x65])]:_0x4cdab4([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x242474,_0x5b8144,_0x21f6a1)||(_0x2dc78f=!0x1);}}function _0x317b92(_0x423eb9){return _0x423eb9[_0x4cdab4([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4cdab4([0x65,0x79]))?JSON[_0x4cdab4([0x70,0x61,0x72,0x73,0x65])](_0x8a179d(_0x423eb9)):null;}function _0x8a179d(_0x2375fd){return window[_0x4cdab4([0x61,0x74,0x6f,0x62])](_0x2375fd[_0x4cdab4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4cdab4([0x2b]))[_0x4cdab4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4cdab4([0x2f])));}function _0x3e26e7(_0x2283ac){let _0x199511=0x1505;function _0x580660(_0x16144f){for(let _0x57f337=0x0;_0x57f337<_0x16144f[_0x4cdab4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x57f337++){const _0x483069=_0x16144f[_0x4cdab4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x57f337);_0x199511=(_0x199511<<0x5)+_0x199511+_0x483069,_0x199511&=_0x199511;}}function _0x4b12d8(_0x1b50e2){Array[_0x4cdab4([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1b50e2)?_0x1b50e2[_0x4cdab4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4b12d8):_0x1b50e2&&typeof _0x1b50e2==_0x4cdab4([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4cdab4([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1b50e2)[_0x4cdab4([0x73,0x6f,0x72,0x74])]()[_0x4cdab4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x20f97b,_0x5a93c9])=>{_0x580660(_0x20f97b),_0x4b12d8(_0x5a93c9);}):_0x580660(window[_0x4cdab4([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1b50e2));}return _0x4b12d8(_0x2283ac),_0x199511>>>0x0;}function _0x2d229e(_0x1cca58){return _0x1cca58[_0x4cdab4([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4cdab4([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4cdab4([0x30]));}function _0x43f753(_0x2f800b){return _0x2f800b[_0x4cdab4([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4cdab4([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4cdab4([0x6a,0x6f,0x69,0x6e])]('');}function _0x27321e(){}function _0x4cdab4(_0x58fd82){return _0x58fd82['map'](_0x50accc=>String['fromCharCode'](_0x50accc))['join']('');}_0x508174(await _0x41a11a());}(this);}['_moveSelectionToFootnoteDefinition'](_0x311f24){const {plugins:_0x5205cd,editing:_0xb4750e,model:_0x428b69}=this['editor'],_0x1a53d9=_0x5205cd['get'](c)['getFootnote'](_0x311f24);return!!_0x1a53d9&&(_0x428b69['change'](_0x483ab3=>{_0x483ab3['setSelection'](_0x483ab3['createPositionAt'](_0x1a53d9['definition'],'end'));}),_0xb4750e['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x374e2d){const {plugins:_0x348c68,editing:_0x3c8a5d,model:_0x4d8775}=this['editor'],_0x4f57ff=_0x348c68['get'](c)['getFootnote'](_0x374e2d);return!!_0x4f57ff&&(_0x4d8775['change'](_0x5c2cdb=>{_0x5c2cdb['setSelection'](_0x4f57ff['reference'],'on');}),_0x3c8a5d['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x4458ce}=this['editor']['model'],_0x4240e7=this['editor']['config']['get']('footnotes.multiBlock');_0x4458ce['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x4458ce['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x4458ce['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x4240e7?_0x4458ce['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x4458ce['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x4458ce['addChildCheck'](_0x9ebe6a=>{for(const _0x459f78 of _0x9ebe6a)if('footnoteDefinition'===_0x459f78['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x218b20}=this,{conversion:_0x4d877a,editing:_0x16b084}=_0x218b20,{t:t}=_0x218b20['locale'];_0x4d877a['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x594f05,{writer:_0x3ef22e,consumable:_0x3023b7})=>{const _0x137d97=_0x594f05['getChild'](0x0);if(!_0x137d97||!_0x137d97['is']('element','a'))return null;const _0x1f74bd=_0x137d97['getAttribute']('href')||'';if(!_0x1f74bd['startsWith']('#'))return null;const _0x5a096d=_0x1f74bd['replace'](/^#/,'');if(!_0x5a096d)return null;_0x3023b7['consume'](_0x137d97,{'name':!0x0,'attributes':['href']});for(const {item:_0x4f2fb3}of _0x16b084['view']['createRangeIn'](_0x137d97))_0x4f2fb3['is']('$textProxy')?_0x3023b7['consume'](_0x4f2fb3['textNode'],{'name':!0x0}):_0x4f2fb3['is']('element')&&_0x3023b7['consume'](_0x4f2fb3,{'name':!0x0});return _0x3ef22e['createElement']('footnoteRef',{'footnoteId':_0x5a096d});}}),_0x4d877a['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x2f431a,{writer:_0x15deb7})=>D(_0x2f431a,_0x15deb7)}),_0x4d877a['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0xab921e,{writer:_0x1e05a6})=>{const _0x4b5e9b=_0xab921e['getAttribute']('footnoteCounter');return _0x3a58b1(D(_0xab921e,_0x1e05a6),_0x1e05a6,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x4b5e9b)});}});}['_defineDefinitionsConverters'](){const {editor:_0x19b9f4}=this,{t:t}=_0x19b9f4['locale'],{conversion:_0xc4811c}=_0x19b9f4;_0xc4811c['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0xc4811c['for']('upcast')['add'](_0x52edaa=>{_0x52edaa['on']('element:ol',(_0xebc976,_0x41f6fb,_0x116fcb)=>{const _0x2c89dd=_0x41f6fb['viewItem'];if(!_0x2c89dd['hasClass']('footnotes-list')||!_0x41f6fb['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x116fcb['consumable']['consume'](_0x2c89dd,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x222e10,modelCursor:_0x42dee9}=_0x116fcb['convertChildren'](_0x41f6fb['viewItem'],_0x41f6fb['modelCursor']);_0x41f6fb['modelRange']=_0x222e10,_0x41f6fb['modelCursor']=_0x42dee9;}),_0x52edaa['on']('element:hr',(_0xada71a,_0x40c257,_0x579c49)=>{const _0x264117=_0x40c257['viewItem'];_0x264117['hasClass']('footnotes-divider')&&_0x40c257['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x579c49['consumable']['consume'](_0x264117,{'name':!0x0,'classes':'footnotes-divider'});});}),_0xc4811c['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x344b51,{writer:_0xecb9aa})=>v(_0xecb9aa)}),_0xc4811c['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x50be87,{writer:_0x592485})=>{const _0x279613=v(_0x592485,{'data-footnotes-list-label':t('Footnotes')}),_0x10903a=_0x3a58b1(_0x279613,_0x592485,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x592485['setCustomProperty']('footnotesDefinitions',!0x0,_0x10903a),_0x10903a;}});}['_defineDefinitionConverters'](){const {editor:_0xe24279}=this,{conversion:_0x45b157,locale:_0x1c07ff}=_0xe24279,_0x1c0019=_0xe24279['config']['get']('footnotes.multiBlock');_0x45b157['for']('upcast')['add'](_0x51b88f=>{_0x51b88f['on']('element:li',(_0x4616d2,_0x584425,_0x32a84d)=>{const _0xe3c412=_0x584425['viewItem'];if(!_0xe3c412['hasClass']('footnote-definition')||!_0xe3c412['getAttribute']('id'))return;const _0x3e4213=_0xe3c412['parent'];if(!_0x3e4213['is']('element','ol')||!_0x3e4213['hasClass']('footnotes-list'))return;if(!_0x32a84d['consumable']['test'](_0xe3c412,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x44f85e=_0x32a84d['writer']['createElement']('footnoteDefinition',{'footnoteId':_0xe3c412['getAttribute']('id')});if(!_0x32a84d['safeInsert'](_0x44f85e,_0x584425['modelCursor']))return;_0x32a84d['consumable']['consume'](_0xe3c412,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x44f593=Array['from'](_0xe3c412['getChildren']())['find'](_0x34db59=>_0x34db59['is']('element')&&_0x34db59['hasClass']('footnote-content'));for(const _0x488829 of _0xe3c412['getChildren']())_0x488829['is']('element')&&(_0x32a84d['consumable']['consume'](_0x488829,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x32a84d['consumable']['consume'](_0x488829,{'name':!0x0,'classes':'footnote-content'}));if(_0x44f593){if(_0x1c0019)_0x32a84d['convertChildren'](_0x44f593,_0x44f85e);else{const _0x342e3b=_0x32a84d['writer']['createElement']('footnoteInlineContent');_0x32a84d['writer']['insert'](_0x342e3b,_0x44f85e),_0x32a84d['convertChildren'](_0x44f593,_0x342e3b);}}_0x32a84d['updateConversionResult'](_0x44f85e,_0x584425);});}),_0x45b157['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x5ed162,{writer:_0x39a64c})=>b(_0x5ed162,_0x39a64c,_0x1c07ff,{'dataPipeline':!0x0})}),_0x45b157['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x50e76b,{writer:_0x481935})=>b(_0x50e76b,_0x481935,_0x1c07ff)});}['_defineBogusParagraphConverters'](){const {editor:_0x3dd021}=this,{conversion:_0x31d26a}=_0x3dd021;_0x3dd021['config']['get']('footnotes.multiBlock')?(_0x31d26a['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':h(),'converterPriority':'high'}),_0x31d26a['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':h({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x3dd021['model']['document'],'change:data',()=>{!function(_0x4cdbe0,_0x435b01){const _0x369bf0=_0x4cdbe0['document']['differ'],_0x350fab=new Set();for(const _0x5584d4 of _0x369bf0['getChanges']()){const _0x43abf7='attribute'==_0x5584d4['type']?_0x5584d4['range']['start']['parent']:_0x5584d4['position']['parent'];_0x43abf7['is']('element','footnoteDefinition')&&_0x350fab['add'](_0x43abf7);}for(const _0x2a79d3 of _0x350fab['values']()){const _0x7ab9bd=Array['from'](_0x2a79d3['getChildren']())['filter'](_0x3437e5=>g(_0x3437e5,_0x435b01['mapper']));for(const _0x532571 of _0x7ab9bd)_0x435b01['reconvertItem'](_0x532571);}}(_0x3dd021['model'],_0x3dd021['editing']);})):(_0x31d26a['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':h()}),_0x31d26a['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x479f04,{writer:_0x202675})=>{const _0x48674e=_0x202675['createContainerElement']('span');return _0x202675['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x48674e),_0x48674e;}}));}['_defineKeyboardHandlers'](){const {editor:_0x34eb77}=this,{editing:_0x229efa,t:t}=_0x34eb77,_0x33a2dc=_0x34eb77['model']['document']['selection'];_0x34eb77['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x34eb77['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x229efa['view']['document'],'enter',(_0xca3b49,_0x177626)=>{const _0x7eed56=function(_0x303aa0){const _0x3b26ec=_0x303aa0['getSelectedElement']();if(_0x3b26ec?.['is']('element','footnoteRef'))return _0x3b26ec;return null;}(_0x33a2dc);if(_0x7eed56){const _0x1ca2dc=_0x7eed56['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x1ca2dc),_0x177626['preventDefault'](),_0xca3b49['stop']();}},{'context':_0xb7cd91});}['_defineClickHandlers'](){const {editor:_0x2ac5fb}=this,{editing:_0x9552e9}=_0x2ac5fb;_0x2ac5fb['editing']['view']['addObserver'](_0x3069c7),_0x2ac5fb['editing']['view']['addObserver'](_0x20e72a);let _0x189cfa=!0x1;this['listenTo'](_0x9552e9['view']['document'],'pointerdown',(_0x24843c,_0x2f68c9)=>{const {target:_0x4bdf2d}=_0x2f68c9,_0xc57f20=_0x9552e9['view']['document']['selection'];_0x189cfa=!!(_0x4bdf2d?.['is']('element','a')&&_0x4bdf2d['parent']?.['is']('element','sup')&&_0x4bdf2d['parent']['hasClass']('footnote'))&&_0xc57f20['getSelectedElement']()===_0x4bdf2d['parent'];},{'priority':'high'}),this['listenTo'](_0x9552e9['view']['document'],'click',(_0x47b64a,_0x2f56d6)=>{const {target:_0x1fe9bf}=_0x2f56d6;if(!_0x1fe9bf?.['is']('element','a'))return;if(_0x1fe9bf['parent']?.['is']('element','sup')&&_0x1fe9bf['parent']['hasClass']('footnote')&&!_0x189cfa)return void _0x2f56d6['preventDefault']();let _0x66c686=_0x1fe9bf['getAttribute']('href');if(!_0x66c686?.['startsWith']('#'))return;_0x66c686=_0x66c686['slice'](0x1);let _0x310d78=!0x1;(_0x66c686['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x66c686['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x66c686))&&(_0x310d78=!0x0),_0x310d78&&(_0x2f56d6['preventDefault'](),_0x47b64a['stop']());},{'priority':'high','context':'$capture'});}}function h({dataPipeline:_0x1e7587}={}){return(_0x30aedb,{writer:_0xf3c444})=>{if(!p(_0x30aedb))return null;if(!_0x1e7587)return _0xf3c444['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x1cfc8c=_0xf3c444['createContainerElement']('p');return _0xf3c444['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x1cfc8c),_0x1cfc8c;};}function p(_0x32af6d){const {parent:_0x53a4de}=_0x32af6d;if(!_0x53a4de?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x53a4de['childCount'])return!0x1;for(const _0x5c4c99 of _0x32af6d['getAttributeKeys']())if(!_0x5c4c99['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x5c4c99)return!0x1;return!0x0;}function g(_0x2df32f,_0x42d630){if(!_0x2df32f['is']('element','paragraph'))return!0x1;const _0x226788=_0x42d630['toViewElement'](_0x2df32f);return!!_0x226788&&p(_0x2df32f)!==_0x226788['is']('element','span');}function J(_0x5725d4){return _0xb7cd91(_0x5725d4)&&_0x5725d4['is']('containerElement')&&!!_0x5725d4['getCustomProperty']('footnotesDefinitions');}function v(_0x4642c1,_0x17634a={}){const _0x3a2460=_0x4642c1['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x16b6aa=_0x4642c1['createContainerElement']('ol',{'class':'footnotes-list'},_0x4642c1['createSlot']());return _0x4642c1['createContainerElement']('div',{'class':'footnotes',..._0x17634a},[_0x3a2460,_0x16b6aa]);}function D(_0xa787c9,_0x3b4320){const _0x393075=_0xa787c9['getAttribute']('footnoteId'),_0x57d444=_0xa787c9['getAttribute']('footnoteCounter'),_0x58932d=_0x3b4320['createUIElement']('a',{'href':'#'+_0x393075},function(_0x30d277){const _0x2c9de8=this['toDomElement'](_0x30d277);return _0x2c9de8['textContent']=_0x57d444,_0x2c9de8;}),_0x26f2b4=_0x3b4320['createContainerElement']('sup',{'id':'ref-'+_0x393075,'class':'footnote'},[_0x58932d]);return _0x26f2b4['getFillerOffset']=()=>null,_0x26f2b4;}function b(_0x445723,_0x7c87bc,_0x5594fc,{dataPipeline:_0x4a4eac}={}){const {t:t}=_0x5594fc,_0x1454d2=_0x445723['getAttribute']('footnoteId'),_0x5e35d1=_0x7c87bc['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x1454d2},function(_0x29c4ae){const _0x3daa94=this['toDomElement'](_0x29c4ae);return _0x3daa94['innerText']='^',_0x3daa94;}),_0x434ad2=_0x4a4eac?_0x7c87bc['createContainerElement']('div',{'class':'footnote-content'}):_0x3215bc(_0x7c87bc['createEditableElement']('div',{'class':'footnote-content'}),_0x7c87bc,{'label':t('Footnote\x20content.')});return _0x7c87bc['insert'](_0x7c87bc['createPositionAt'](_0x434ad2,0x0),_0x7c87bc['createSlot']()),_0x7c87bc['createContainerElement']('li',{'class':'footnote-definition','id':_0x1454d2},[_0x5e35d1,_0x434ad2]);}class e extends _0x38bf2a{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x48e04d];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x376597}=this,{plugins:_0x218591,model:_0x5bbbca}=_0x376597,_0x3308bf=_0x218591['get'](_0x48e04d),_0x531f76=_0x218591['get'](c);this['listenTo'](_0x3308bf,'outputTransformation',(_0x1a55e1,_0x531cb7)=>{const _0x12be99=f(_0x5bbbca['createRangeIn'](_0x531cb7['content']));if(!_0x12be99['length'])return;const _0x26e56d=_0x531f76['getFootnotes'](),_0xcbe05=_0x12be99['reduce']((_0x2383cd,_0x3ed267)=>{const _0x4c3c13=_0x26e56d['find'](_0xec6eec=>_0xec6eec['id']===_0x3ed267);if(_0x4c3c13){const _0x2ff44d=_0x376597['data']['toView'](_0x4c3c13['definition'],{'isClipboardPipeline':!0x0}),_0xa58e31=_0x376597['data']['htmlProcessor']['toData'](_0x2ff44d);_0x2383cd[_0x4c3c13['id']]=_0xa58e31;}return _0x2383cd;},Object['create'](null));_0x531cb7['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0xcbe05));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x55b6bb}=this,{model:_0x3fba2f,plugins:_0x20bb27}=_0x55b6bb,{view:_0x255dbe}=_0x55b6bb['editing'],_0x25e7b9=_0x20bb27['get'](_0x48e04d),_0x4e01c4=_0x20bb27['get'](c);let _0x4a3c43=null;this['listenTo'](_0x255dbe['document'],'clipboardInput',(_0x36674a,_0x555e41)=>{const _0x4a811b=_0x555e41['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x4a3c43=_0x4a811b?JSON['parse'](_0x4a811b):null;}),this['listenTo'](_0x25e7b9,'contentInsertion',(_0x2dba6b,_0xeccdca)=>{const _0x5c2b78=_0xeccdca['sourceEditorId']===this['editor']['id'];_0x5c2b78&&'drop'===_0xeccdca['method']||_0x3fba2f['change'](_0x36ea21=>{let _0x1a65aa=_0x4e01c4['getFootnotesDefinitionsObjectElement']();const _0x19f9bc=!!_0x1a65aa&&Array['from'](_0x3fba2f['document']['selection']['getSelectedBlocks']())['includes'](_0x1a65aa);if(_0x1a65aa&&!_0x19f9bc&&function(_0x320716,_0x4bbe1e){const _0x19706e=[];for(const {item:_0x2d2c2d}of _0x320716['createRangeIn'](_0x4bbe1e))_0x2d2c2d['is']('element','footnotesDefinitions')&&_0x19706e['push'](_0x2d2c2d);for(const _0x41dfbd of _0x19706e)_0x320716['remove'](_0x41dfbd);}(_0x36ea21,_0xeccdca['content']),!_0x4a3c43)return;const {selection:_0x28b146}=_0x3fba2f['document'],_0x3bd757=_0x28b146['getFirstRange']()['root'];_0x1a65aa&&!_0x19f9bc||(_0x1a65aa=function(_0x14242f,_0x36fea0){for(const {item:_0x5df591}of _0x14242f['createRangeIn'](_0x36fea0))if(_0x5df591['is']('element','footnotesDefinitions'))return _0x5df591;return null;}(_0x36ea21,_0xeccdca['content']),_0x1a65aa||=_0x4e01c4['_insertEmptyFootnotesDefinitionsContainer'](_0x36ea21,_0x3bd757));const _0x3140ba=Array['from'](_0x28b146['getRanges']())['flatMap'](f),_0x45c75e=function(_0x30e9ee,_0x30a1c4,_0x23de3d){const _0x332add=Object['create'](null);for(const {item:_0x18bfee}of _0x30e9ee['createRangeIn'](_0x30a1c4))if(_0x18bfee['is']('element','footnoteRef')){const _0x405dda=_0x18bfee['getAttribute']('footnoteId');if(!_0x23de3d(_0x405dda))continue;_0x332add[_0x405dda]||(_0x332add[_0x405dda]=_0x2c6977()),_0x30e9ee['setAttribute']('footnoteId',_0x332add[_0x405dda],_0x18bfee);}return _0x332add;}(_0x36ea21,_0xeccdca['content'],_0x6ae7d=>{if(!_0x5c2b78)return!0x0;return!!_0x4e01c4['getFootnote'](_0x6ae7d)&&!_0x3140ba['includes'](_0x6ae7d);});for(const [_0x50c3bc,_0x3162b1]of Object['entries'](_0x4a3c43)){const _0x44720d=_0x45c75e[_0x50c3bc]||_0x50c3bc,_0x542408=_0x36ea21['createElement']('footnoteDefinition',{'footnoteId':_0x44720d}),_0x1821fe=_0x55b6bb['data']['htmlProcessor']['toView'](_0x3162b1),_0x494d16=_0x55b6bb['data']['toModel'](_0x1821fe,_0x542408);_0x36ea21['append'](_0x494d16,_0x542408),_0x36ea21['insert'](_0x542408,_0x1a65aa,'end');}_0x4a3c43=null;});});}}function f(_0x2e5341){const _0x42953d=new Set();for(const {item:_0x177cc2}of _0x2e5341)_0x177cc2['is']('element','footnoteRef')&&_0x42953d['add'](_0x177cc2['getAttribute']('footnoteId'));return Array['from'](_0x42953d);}class i extends _0x38bf2a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x25bdda}=this,{componentFactory:_0x46b467}=_0x25bdda['ui'];_0x46b467['add']('insertFootnote',x(_0x25bdda,_0x96c644)),_0x46b467['add']('menuBar:insertFootnote',x(_0x25bdda,_0x40c2d8)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x586ac2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x52c0df;for(const _0x41e217 in _0x586ac2){const _0x2b92ac=_0x41e217,_0x23bc60=_0x586ac2[_0x2b92ac];if('footnotesLicenseKeyValid'==_0x23bc60||'footnotesLicenseKeyInvalid'==_0x23bc60||'footnotesLicenseKeyExpired'==_0x23bc60||'footnotesLicenseKeyDomainLimit'==_0x23bc60||'footnotesLicenseKeyNotAllowed'==_0x23bc60||'footnotesLicenseKeyEvaluationLimit'==_0x23bc60||'footnotesLicenseKeyTrialLimit'==_0x23bc60||'footnotesLicenseKeyUsageLimit'==_0x23bc60){delete _0x586ac2[_0x2b92ac],_0x52c0df=_0x23bc60,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x52c0df&&_0x586ac2['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x52c0df&&_0x586ac2['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x52c0df&&_0x586ac2['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x52c0df&&_0x586ac2['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x52c0df&&_0x586ac2['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x52c0df&&_0x586ac2['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x52c0df&&_0x586ac2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function x(_0xcce4ba,_0x2d2c17){const _0x4fc6c3=_0xcce4ba['commands']['get']('insertFootnote');return _0x29578e=>{const {t:t}=_0x29578e,_0x77497b=new _0x2d2c17(_0x29578e),_0x552e7b=_0x77497b instanceof _0x40c2d8;return _0x77497b['bind']('isEnabled')['to'](_0x4fc6c3,'isEnabled'),_0x77497b['set']({'label':t(_0x552e7b?'Footnote':'Insert\x20footnote'),'icon':_0x3f27de,'tooltip':!0x0}),_0x77497b['on']('execute',()=>{_0x4fc6c3['execute'](),_0xcce4ba['editing']['view']['focus']();}),_0x77497b;};}class lt extends _0x38bf2a{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const Q=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x2c5759{['refresh'](){const {editor:_0x543623}=this,_0x3499df=_0x543623['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x3499df,this['value']=_0x3499df?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x3255e3}){const {editor:_0x3cf7f5}=this,_0x22d33b=_0x3cf7f5['plugins']['get'](c),_0x3d271f=_0x22d33b['getFootnotesDefinitionsObjectElement']();_0x3d271f&&Q['includes'](_0x3255e3)&&_0x3cf7f5['model']['change'](_0x388a68=>{_0x388a68['setAttribute']('footnotesListStyle',_0x3255e3,_0x3d271f),_0x22d33b['_updateFootnotesCounters'](_0x388a68);});}}class C extends _0x2c5759{['refresh'](){const {editor:_0x4b10d5}=this,_0x23d25c=_0x4b10d5['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x23d25c,this['value']=_0x23d25c?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x5593f5}){const {editor:_0x408ccb}=this,_0x20749f=_0x408ccb['plugins']['get'](c),_0x2f33d7=_0x20749f['getFootnotesDefinitionsObjectElement']();_0x2f33d7&&Number['isInteger'](_0x5593f5)&&_0x408ccb['model']['change'](_0x14b171=>{_0x14b171['setAttribute']('footnotesListStart',_0x5593f5,_0x2f33d7),_0x20749f['_updateFootnotesCounters'](_0x14b171);});}}class P extends _0x38bf2a{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x216695}=this;_0x216695['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x216695['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x216695['commands']['add']('footnotesStyle',new S(_0x216695)),_0x216695['commands']['add']('footnotesStart',new C(_0x216695)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x1f300e}=this,{schema:_0x14db4b}=_0x1f300e['model'];_0x14db4b['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x1c962f}=this,{conversion:_0x60ebe2,model:_0x57cd67}=_0x1c962f,{schema:_0x1b47d7}=_0x57cd67;_0x60ebe2['for']('upcast')['add'](_0x3519f7=>{_0x3519f7['on']('element:ol',(_0x532c6c,_0x5f2173,_0x81dd7a)=>{const _0x3ea6b6=_0x5f2173['viewItem'],_0x574194=_0x5f2173['modelCursor']?.['parent'];_0x3ea6b6['hasClass']('footnotes-list')&&_0x574194?.['is']('element','footnotesDefinitions')&&(function(_0x4a3b2b,_0xe3d162,_0x4995da,_0x3e03af){if(!_0x3e03af['checkAttribute'](_0xe3d162,'footnotesListStart'))return;let _0x197726=0x1;const _0x3d708e=_0x4995da['consumable']['consume'](_0x4a3b2b,{'attributes':'start'});if(_0x3d708e){const _0xa7d56a=Number['parseInt'](_0x4a3b2b['getAttribute']('start'),0xa);Number['isNaN'](_0xa7d56a)||(_0x197726=_0xa7d56a);}!_0x3d708e&&_0xe3d162['hasAttribute']('footnotesListStart')||_0x4995da['writer']['setAttribute']('footnotesListStart',_0x197726,_0xe3d162);}(_0x3ea6b6,_0x574194,_0x81dd7a,_0x1b47d7),function(_0x44a63c,_0x22d3ba,_0x42271b,_0x12c480){if(!_0x12c480['checkAttribute'](_0x22d3ba,'footnotesListStyle'))return;let _0x45bc07='decimal',_0x45d56d=!0x1;if(_0x42271b['consumable']['consume'](_0x44a63c,{'attributes':'type'})){const _0x31f1d5={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x44a63c['getAttribute']('type')];_0x31f1d5&&(_0x45bc07=_0x31f1d5),_0x45d56d=!0x0;}_0x42271b['consumable']['consume'](_0x44a63c,{'styles':'list-style-type'})&&(_0x45bc07=_0x44a63c['getStyle']('list-style-type'),_0x45d56d=!0x0),!_0x45d56d&&_0x22d3ba['hasAttribute']('footnotesListStyle')||_0x42271b['writer']['setAttribute']('footnotesListStyle',_0x45bc07,_0x22d3ba);}(_0x3ea6b6,_0x574194,_0x81dd7a,_0x1b47d7));});}),_0x60ebe2['for']('downcast')['add'](_0x4bc7d6=>{_0x4bc7d6['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x478fdc,_0x1ccf3c,_0x1cc7ca)=>{if(!_0x1cc7ca['consumable']['consume'](_0x1ccf3c['item'],_0x478fdc['name']))return;const _0x4511ec=M(_0x1ccf3c['item'],_0x1cc7ca['mapper']),{attributeNewValue:_0x42c83a}=_0x1ccf3c;null==_0x42c83a||0x1===_0x42c83a?_0x1cc7ca['writer']['removeAttribute']('start',_0x4511ec):_0x1cc7ca['writer']['setAttribute']('start',String(_0x42c83a),_0x4511ec);}),_0x4bc7d6['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x22675a,_0x5641bd,_0x59db2c)=>{if(!_0x59db2c['consumable']['consume'](_0x5641bd['item'],_0x22675a['name']))return;const _0x22b62f=M(_0x5641bd['item'],_0x59db2c['mapper']),{attributeNewValue:_0x2421cc}=_0x5641bd;_0x2421cc&&'decimal'!==_0x2421cc?_0x59db2c['writer']['setStyle']('list-style-type',_0x2421cc,_0x22b62f):_0x59db2c['writer']['removeStyle']('list-style-type',_0x22b62f);});});}['_definePostfixer'](){const {editor:_0x31cad6}=this,{model:_0x476a06}=_0x31cad6,_0x376675=_0x31cad6['plugins']['get'](c),_0x4a4e3c=this['_getDefaultListStyle'](),_0x1c6b24=this['_getDefaultStartIndex']();_0x476a06['document']['registerPostFixer'](_0x2dcecd=>{const _0x4d10be=_0x476a06['document']['differ']['getChanges']();let _0x4883cd=!0x1;for(const _0x1781c1 of _0x4d10be){if('insert'!==_0x1781c1['type']||'$text'===_0x1781c1['name'])continue;const _0x109c2e=_0x476a06['createRangeOn'](_0x1781c1['position']['nodeAfter']);for(const _0x128575 of _0x109c2e['getItems']())_0x128575['is']('element','footnotesDefinitions')&&(!_0x128575['hasAttribute']('footnotesListStart')&&_0x476a06['schema']['checkAttribute'](_0x128575,'footnotesListStart')&&(_0x2dcecd['setAttribute']('footnotesListStart',_0x1c6b24,_0x128575),_0x4883cd=!0x0),!_0x128575['hasAttribute']('footnotesListStyle')&&_0x476a06['schema']['checkAttribute'](_0x128575,'footnotesListStyle')&&(_0x2dcecd['setAttribute']('footnotesListStyle',_0x4a4e3c,_0x128575),_0x4883cd=!0x0));}return _0x4883cd&&_0x376675['_updateFootnotesCounters'](_0x2dcecd),_0x4883cd;});}['_defineFormatter'](){const {editor:_0x5a80a0}=this;_0x5a80a0['plugins']['get'](c)['setFootnoteFormatter'](_0x208b15=>this['_formatFootnoteListValue'](_0x208b15));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x58e727,value:_0x41ccc3,digits:_0xaccb9e}){const _0x5c2f0a=_0x58e727['getAttribute']('footnotesListStyle'),_0x56be6e=_0x58e727['getAttribute']('footnotesListStart'),_0x1a6782=Math['floor'](_0x41ccc3)+(_0x56be6e??0x1)-0x1;switch(_0x5c2f0a){case'decimal-leading-zero':return function(_0x4f7b31,_0x406e3c){return String(_0x4f7b31)['padStart'](_0x406e3c,'0');}(_0x1a6782,Math['max'](0x2,_0xaccb9e));case'lower-alpha':case'lower-latin':return N(_0x1a6782,!0x1);case'upper-alpha':case'upper-latin':return N(_0x1a6782,!0x0);case'lower-roman':return X(_0x1a6782,!0x1);case'upper-roman':return X(_0x1a6782,!0x0);default:return String(_0x1a6782);}}}function M(_0x48ce0a,_0x3caad2){const _0x455fd8=_0x3caad2['toViewElement'](_0x48ce0a);return Array['from'](_0x455fd8['getChildren']())['find'](_0x1b08c1=>_0x1b08c1['is']('element','ol')&&_0x1b08c1['hasClass']('footnotes-list'));}function N(_0x4fc5b7,_0x171440){let _0x43a8f1='',_0x8d20c0=_0x4fc5b7;for(;_0x8d20c0>0x0;){const _0x22453e=(_0x8d20c0-0x1)%0x1a;_0x43a8f1=String['fromCharCode'](0x61+_0x22453e)+_0x43a8f1,_0x8d20c0=Math['floor']((_0x8d20c0-0x1)/0x1a);}return _0x171440?_0x43a8f1['toUpperCase']():_0x43a8f1;}const V=[{'value':0x3e8,'numeral':'M'},{'value':0x384,'numeral':'CM'},{'value':0x1f4,'numeral':'D'},{'value':0x190,'numeral':'CD'},{'value':0x64,'numeral':'C'},{'value':0x5a,'numeral':'XC'},{'value':0x32,'numeral':'L'},{'value':0x28,'numeral':'XL'},{'value':0xa,'numeral':'X'},{'value':0x9,'numeral':'IX'},{'value':0x5,'numeral':'V'},{'value':0x4,'numeral':'IV'},{'value':0x1,'numeral':'I'}];function X(_0x3b6324,_0x32e913){let _0x4c27aa='',_0x96dc21=_0x3b6324;for(const {value:_0x181a3a,numeral:_0x2db307}of V)for(;_0x96dc21>=_0x181a3a;)_0x4c27aa+=_0x2db307,_0x96dc21-=_0x181a3a;return _0x32e913?_0x4c27aa:_0x4c27aa['toLowerCase']();}class H extends _0x57adf2{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new ot();['keystrokes']=new rt();['focusables']=new _0x442327();['focusCycler'];constructor(_0x3638bb,{styleButtonViews:_0x7ff5a9,styleGridAriaLabel:_0x5ca645}){super(_0x3638bb),(this['focusCycler']=new _0x15f841({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x7ff5a9,_0x5ca645),[this['startIndexFieldView'],this['additionalProperties']]=this['_appendAdditionalPropertiesCollapsibleView'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-footnotes-definitions-properties']},'children':this['children']}));}['render'](){if(super['render'](),this['stylesView']){this['focusables']['add'](this['stylesView']),this['focusTracker']['add'](this['stylesView']['element']);for(const _0x467af3 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x467af3['element']);tt({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>nt['window']['getComputedStyle'](this['stylesView']['element'])['getPropertyValue']('grid-template-columns')['split']('\x20')['length'],'uiLanguageDirection':this['locale']&&this['locale']['uiLanguageDirection']});}if(this['startIndexFieldView']){this['focusables']['add'](this['startIndexFieldView']),this['focusTracker']['add'](this['startIndexFieldView']['element']);const _0x512316=_0x525337=>_0x525337['stopPropagation']();this['keystrokes']['set']('arrowright',_0x512316),this['keystrokes']['set']('arrowleft',_0x512316),this['keystrokes']['set']('arrowup',_0x512316),this['keystrokes']['set']('arrowdown',_0x512316);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0xdfa912,_0x5a129e){const _0x197a78=new _0x57adf2(this['locale']);return _0x197a78['children']=_0x197a78['createCollection'](),_0x197a78['children']['addMany'](_0xdfa912),_0x197a78['setTemplate']({'tag':'div','attributes':{'aria-label':_0x5a129e,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x197a78['children']}),_0x197a78['children']['delegate']('execute')['to'](this),_0x197a78['focus']=function(){for(const _0x24983c of this['children'])if(_0x24983c instanceof _0x96c644&&_0x24983c['isOn'])return void _0x24983c['focus']();this['children']['first']['focus']();},_0x197a78['focusTracker']=new ot(),_0x197a78['keystrokes']=new rt(),_0x197a78['render'](),_0x197a78['keystrokes']['listenTo'](_0x197a78['element']),this['children']['add'](_0x197a78),_0x197a78;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x3cf024=this['_createStartIndexPropertyView'](),_0x4c5c23=[_0x3cf024],_0x2735df=new st(this['locale'],_0x4c5c23);return _0x2735df['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x2735df['buttonView']['bind']('isEnabled')['toMany'](_0x4c5c23,'isEnabled',(..._0x3c7710)=>_0x3c7710['some'](_0x2af5a6=>_0x2af5a6)),_0x2735df['buttonView']['on']('change:isEnabled',(_0x307b80,_0x23da35,_0x5b54a6)=>{_0x5b54a6||(_0x2735df['isCollapsed']=!0x0);}),this['children']['add'](_0x2735df),[_0x3cf024,_0x2735df];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x9c834b=new it(this['locale'],et);return _0x9c834b['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x9c834b['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x9c834b['fieldView']['on']('input',()=>{const _0xbed530=_0x9c834b['fieldView']['element'],_0x55716a=_0xbed530['valueAsNumber'];Number['isNaN'](_0x55716a)?_0x9c834b['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0xbed530['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x55716a}):_0x9c834b['errorText']=t(_0x55716a<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x9c834b;}}class j extends _0x38bf2a{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x1dce9d,_0x2b4c2f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4f245e}=this,{componentFactory:_0x3fc2fd}=_0x4f245e['ui'];_0x4f245e['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x3fc2fd['add']('footnotesStyle',function(_0x69e34f){return _0x3f19ba=>{const {t:t}=_0x3f19ba,_0x403e73=_0x69e34f['commands']['get']('footnotesStyle'),_0x39b06b=_0x1cbc3a(_0x3f19ba),{buttonView:_0x5f2213}=_0x39b06b;return _0x39b06b['class']='ck-footnotes-styles-dropdown',_0x39b06b['bind']('isEnabled')['to'](_0x403e73,'isEnabled'),_0x5f2213['set']({'label':t('Footnotes\x20style'),'icon':_0x3f27de,'tooltip':!0x0}),_0x39b06b['once']('change:isOpen',()=>{const _0xa137e7=function({editor:_0x845e2a,dropdownView:_0x2d98c2}){const {t:t}=_0x845e2a['locale'],_0x28aa40=t('Footnotes\x20definitions\x20styles'),_0x4140ef=function(_0x3bf35c){const t=_0x3bf35c['locale']['t'],_0x3a3578=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x367a65},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x1b36b1},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x5bbf1c},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0xfa3859},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x34c741},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x32d945}];return _0x3a3578['map'](function(_0xb45705){const _0x57a77e=_0xb45705['locale'];return({label:_0x491c32,icon:_0x1aef1b,tooltip:_0x49f236,style:_0xe71d0c})=>{const _0x29c000=_0xb45705['commands']['get']('footnotesStyle'),_0x22daa7=new _0x96c644(_0x57a77e);return _0x22daa7['set']({'label':_0x491c32,'icon':_0x1aef1b,'tooltip':_0x49f236}),_0x22daa7['bind']('isOn')['to'](_0x29c000,'value',_0xaa4b3c=>_0xaa4b3c===_0xe71d0c),_0x22daa7['bind']('isEnabled')['to'](_0x29c000,'isEnabled'),_0x22daa7['on']('execute',()=>{_0xb45705['execute']('footnotesStyle',{'value':_0xe71d0c}),_0xb45705['editing']['view']['focus']();}),_0x22daa7;};}(_0x3bf35c));}(_0x845e2a),_0x24afe1=new H(_0x845e2a['locale'],{'styleGridAriaLabel':_0x28aa40,'styleButtonViews':_0x4140ef});return _0x24afe1['delegate']('execute')['to'](_0x2d98c2),_0x24afe1['on']('footnotesListStart',(_0x217b10,_0x701361)=>{_0x845e2a['execute']('footnotesStart',{'value':_0x701361['startIndex']});}),_0x24afe1;}({'editor':_0x69e34f,'dropdownView':_0x39b06b});_0x39b06b['panelView']['children']['add'](_0xa137e7);}),_0x39b06b;};}(_0x4f245e));}['afterInit'](){const {editor:_0x155979}=this,{t:t}=_0x155979['locale'],_0x1966ed=_0x155979['plugins']['get'](_0x2b4c2f),{defaultPositions:_0x529939}=_0x45d10e;_0x1966ed['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x155979['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0xb880d=>{let _0x4f56c7=_0xb880d['getFirstPosition']()?.['parent'];return _0x4f56c7?.['is']('$text')&&(_0x4f56c7=_0x4f56c7['parent']),_0x4f56c7?.['is']('element')?_0x4f56c7['findAncestor'](J):null;},'positions':[_0x529939['southArrowNorth'],_0x529939['southArrowNorthMiddleWest'],_0x529939['southArrowNorthMiddleEast'],_0x529939['southArrowNorthWest'],_0x529939['southArrowNorthEast'],_0x529939['northArrowSouth'],_0x529939['northArrowSouthMiddleWest'],_0x529939['northArrowSouthMiddleEast'],_0x529939['northArrowSouthWest'],_0x529939['northArrowSouthEast'],_0x529939['viewportStickyNorth']]});}}class ft extends _0x38bf2a{static get['pluginName'](){return'FootnotesProperties';}static get['requires'](){return[P,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{lt as Footnotes,e as FootnotesClipboard,r as FootnotesEditing,ft as FootnotesProperties,P as FootnotesPropertiesEditing,j as FootnotesPropertiesUI,C as FootnotesStartCommand,S as FootnotesStyleCommand,c as FootnotesTracker,i as FootnotesUI,m as InsertFootnoteCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-footnotes",
3
- "version": "47.2.0-alpha.3",
3
+ "version": "47.2.0-alpha.5",
4
4
  "description": "The footnotes feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -23,14 +23,14 @@
23
23
  "type": "module",
24
24
  "main": "src/index.js",
25
25
  "dependencies": {
26
- "@ckeditor/ckeditor5-core": "47.2.0-alpha.3",
27
- "@ckeditor/ckeditor5-ui": "47.2.0-alpha.3",
28
- "@ckeditor/ckeditor5-engine": "47.2.0-alpha.3",
29
- "@ckeditor/ckeditor5-icons": "47.2.0-alpha.3",
30
- "@ckeditor/ckeditor5-widget": "47.2.0-alpha.3",
31
- "@ckeditor/ckeditor5-clipboard": "47.2.0-alpha.3",
32
- "@ckeditor/ckeditor5-utils": "47.2.0-alpha.3",
33
- "ckeditor5": "47.2.0-alpha.3"
26
+ "@ckeditor/ckeditor5-core": "47.2.0-alpha.5",
27
+ "@ckeditor/ckeditor5-ui": "47.2.0-alpha.5",
28
+ "@ckeditor/ckeditor5-engine": "47.2.0-alpha.5",
29
+ "@ckeditor/ckeditor5-icons": "47.2.0-alpha.5",
30
+ "@ckeditor/ckeditor5-widget": "47.2.0-alpha.5",
31
+ "@ckeditor/ckeditor5-clipboard": "47.2.0-alpha.5",
32
+ "@ckeditor/ckeditor5-utils": "47.2.0-alpha.5",
33
+ "ckeditor5": "47.2.0-alpha.5"
34
34
  },
35
35
  "license": "SEE LICENSE IN LICENSE.md",
36
36
  "author": "CKSource (http://cksource.com/)",
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x4ce6db}from'ckeditor5/src/core.js';import{isWidget as _0x34233c,toWidget as _0x122ab5,toWidgetEditable as _0x20bc47}from'ckeditor5/src/widget.js';import{uid as _0x37b42b}from'ckeditor5/src/utils.js';import{PointerObserver as _0x31f6aa,ClickObserver as _0x2800aa}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x1d30f2}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x37ffc9}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x4ce6db{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x1d30f2];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5f0efd}=this;_0x5f0efd['config']['define']('footnotes.multiBlock',!0x0),_0x5f0efd['commands']['add']('insertFootnote',new _0x37ffc9(_0x5f0efd)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x21ec02){const _0x4ecf05=_0x37fbc4([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x3a6fb8=0x47a28506,_0x22f279=0x47a5f2de^_0x3a6fb8,_0xcafe52=window[_0x37fbc4([0x44,0x61,0x74,0x65])][_0x37fbc4([0x6e,0x6f,0x77])](),_0x5d16f1=_0x21ec02[_0x37fbc4([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x455157=new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x523d68=>{_0x5d16f1[_0x37fbc4([0x6f,0x6e,0x63,0x65])](_0x37fbc4([0x72,0x65,0x61,0x64,0x79]),_0x523d68);}),_0xf441b2={[_0x37fbc4([0x6b,0x74,0x79])]:_0x37fbc4([0x45,0x43]),[_0x37fbc4([0x75,0x73,0x65])]:_0x37fbc4([0x73,0x69,0x67]),[_0x37fbc4([0x63,0x72,0x76])]:_0x37fbc4([0x50,0x2d,0x32,0x35,0x36]),[_0x37fbc4([0x78])]:_0x37fbc4([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x37fbc4([0x79])]:_0x37fbc4([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x37fbc4([0x61,0x6c,0x67])]:_0x37fbc4([0x45,0x53,0x32,0x35,0x36])},_0x5a2323=_0x5d16f1[_0x37fbc4([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x37fbc4([0x67,0x65,0x74])](_0x37fbc4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5494a1(){let _0x22d418,_0x57424d=null,_0x2ba7e6=null;try{if(_0x5a2323==_0x37fbc4([0x47,0x50,0x4c]))return _0x37fbc4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x22d418=_0x1fe955(),!_0x22d418)return _0x37fbc4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x22d418[_0x37fbc4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2ba7e6=_0x1248b6(_0x22d418[_0x37fbc4([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x22d418[_0x37fbc4([0x6a,0x74,0x69])])),await _0x5c5c11()?_0x485695()?_0x347b1b()?_0x37fbc4([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x526dc9()?(_0x22d418[_0x37fbc4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x37fbc4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x57424d=_0xf696af(_0x37fbc4([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x22d418[_0x37fbc4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x37fbc4([0x74,0x72,0x69,0x61,0x6c])&&(_0x57424d=_0xf696af(_0x37fbc4([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x336536()):_0x37fbc4([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x37fbc4([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x37fbc4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x37fbc4([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x347b1b(){const _0x10edae=[_0x37fbc4([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x37fbc4([0x74,0x72,0x69,0x61,0x6c])][_0x37fbc4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22d418[_0x37fbc4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xcafe52/0x3e8:0xe10*_0x22f279;return _0x22d418[_0x37fbc4([0x65,0x78,0x70])]<_0x10edae;}function _0x485695(){const _0x897789=_0x22d418[_0x37fbc4([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x897789&&(!!_0x897789[_0x37fbc4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37fbc4([0x2a]))||!!_0x897789[_0x37fbc4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37fbc4([0x46,0x4f,0x4f])));}function _0x526dc9(){const _0x25ced6=_0x22d418[_0x37fbc4([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x25ced6||0x0==_0x25ced6[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x431ecb}=new URL(window[_0x37fbc4([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x25ced6[_0x37fbc4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x431ecb))return!0x0;const _0x5b3440=_0x431ecb[_0x37fbc4([0x73,0x70,0x6c,0x69,0x74])](_0x37fbc4([0x2e]));return _0x25ced6[_0x37fbc4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x51f5dd=>_0x51f5dd[_0x37fbc4([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37fbc4([0x2a])))[_0x37fbc4([0x6d,0x61,0x70])](_0x14996b=>_0x14996b[_0x37fbc4([0x73,0x70,0x6c,0x69,0x74])](_0x37fbc4([0x2e])))[_0x37fbc4([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1bc735=>_0x1bc735[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5b3440[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x37fbc4([0x6d,0x61,0x70])](_0x50f6fe=>Array(_0x5b3440[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x50f6fe[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x37fbc4([0x66,0x69,0x6c,0x6c])](_0x50f6fe[0x0]===_0x37fbc4([0x2a])?_0x37fbc4([0x2a]):'')[_0x37fbc4([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x50f6fe))[_0x37fbc4([0x73,0x6f,0x6d,0x65])](_0x2ae578=>_0x5b3440[_0x37fbc4([0x65,0x76,0x65,0x72,0x79])]((_0x27839f,_0x3886f0)=>_0x2ae578[_0x3886f0]===_0x27839f||_0x2ae578[_0x3886f0]===_0x37fbc4([0x2a])));}function _0x336536(){return _0x57424d&&_0x2ba7e6?new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5654b3,_0x293cdf)=>{_0x57424d[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x5654b3,_0x293cdf),_0x2ba7e6[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x3a1608=>{_0x3a1608!=_0x37fbc4([0x56,0x61,0x6c,0x69,0x64])&&_0x5654b3(_0x3a1608);},_0x293cdf);}):_0x57424d||_0x2ba7e6||_0x37fbc4([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1248b6(_0x5f56f9,_0x1e0800){return new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x410dd0=>{if(_0x34d8c7())return _0x410dd0(_0x37fbc4([0x56,0x61,0x6c,0x69,0x64]));_0x57d0e6(),_0x5d16f1[_0x37fbc4([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x37fbc4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3c910c=!0x1;const _0x27f3db=_0x37b42b();function _0x3a6ce7(_0x1cec22){return!!_0x1cec22&&(typeof _0x1cec22===_0x37fbc4([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1cec22===_0x37fbc4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1cec22[_0x37fbc4([0x74,0x68,0x65,0x6e])]===_0x37fbc4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1cec22[_0x37fbc4([0x63,0x61,0x74,0x63,0x68])]===_0x37fbc4([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x13781f(_0x2b2f31){_0x50f043(_0x2b2f31)[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x235c2e=>{if(!_0x235c2e||_0x235c2e[_0x37fbc4([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x37fbc4([0x6f,0x6b]))return _0x37fbc4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x30d3d7(_0x2b1182(_0x27f3db+_0x1e0800))!=_0x235c2e[_0x37fbc4([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x37fbc4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x37fbc4([0x56,0x61,0x6c,0x69,0x64]);})[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x3d3c38=>(_0xe58cbf(),_0x3d3c38),()=>{const _0x2dd30f=_0x530e70();return null==_0x2dd30f?(_0xe58cbf(),_0x37fbc4([0x56,0x61,0x6c,0x69,0x64])):_0x37fbc4(_0xcafe52-_0x2dd30f>(0x63ae0106^_0x3a6fb8)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x410dd0)[_0x37fbc4([0x63,0x61,0x74,0x63,0x68])](()=>{_0x410dd0(_0x37fbc4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1d1f07=0x47946b86^_0x3a6fb8;function _0xe58cbf(){const _0x340614=_0x37fbc4([0x6c,0x6c,0x63,0x74,0x2d])+_0x30d3d7(_0x2b1182(_0x5f56f9)),_0x4894a4=_0x146c72(_0x30d3d7(window[_0x37fbc4([0x4d,0x61,0x74,0x68])][_0x37fbc4([0x63,0x65,0x69,0x6c])](_0xcafe52/_0x1d1f07)));window[_0x37fbc4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37fbc4([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x340614,_0x4894a4);}function _0x530e70(){const _0x3d363d=_0x37fbc4([0x6c,0x6c,0x63,0x74,0x2d])+_0x30d3d7(_0x2b1182(_0x5f56f9)),_0x5280aa=window[_0x37fbc4([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37fbc4([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3d363d);return _0x5280aa?window[_0x37fbc4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x146c72(_0x5280aa),0x10)*_0x1d1f07:null;}function _0x50f043(_0x297e44){return new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x7fdc4d,_0x127979)=>{_0x297e44[_0x37fbc4([0x74,0x68,0x65,0x6e])](_0x7fdc4d,_0x127979),window[_0x37fbc4([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x127979,0x47a351c6^_0x3a6fb8);});}}_0x5d16f1[_0x37fbc4([0x6f,0x6e])](_0x37fbc4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2ad1c9,_0x47a0e1)=>{if(_0x47a0e1[0x0]!=_0x5f56f9)return _0x410dd0(_0x37fbc4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x47a0e1[0x1]={..._0x47a0e1[0x1],[_0x37fbc4([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x27f3db};},{[_0x37fbc4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37fbc4([0x68,0x69,0x67,0x68])}),_0x5d16f1[_0x37fbc4([0x6f,0x6e])](_0x37fbc4([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x402d95=>{_0x3a6ce7(_0x402d95[_0x37fbc4([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3c910c=!0x0,_0x13781f(_0x402d95[_0x37fbc4([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x37fbc4([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37fbc4([0x6c,0x6f,0x77])}),_0x455157[_0x37fbc4([0x74,0x68,0x65,0x6e])](()=>{_0x3c910c||_0x410dd0(_0x37fbc4([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x34d8c7(){return _0x5d16f1[_0x37fbc4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37fbc4([0x76,0x69,0x65,0x77])][_0x37fbc4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x37fbc4([0x61,0x75,0x74,0x6f]);}function _0x57d0e6(){_0x5d16f1[_0x37fbc4([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37fbc4([0x76,0x69,0x65,0x77])][_0x37fbc4([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x37fbc4([0x61,0x75,0x74,0x6f]);}}function _0xf696af(_0xe4be0d){const _0x35654c=[new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f48b0=>setTimeout(_0x2f48b0,0x47abbbca^_0x3a6fb8)),_0x455157[_0x37fbc4([0x74,0x68,0x65,0x6e])](()=>new window[(_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ab7a1=>{let _0x205436=0x0;_0x5d16f1[_0x37fbc4([0x6d,0x6f,0x64,0x65,0x6c])][_0x37fbc4([0x6f,0x6e])](_0x37fbc4([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4e7103,_0x5d2a66)=>{_0x5d2a66[0x0][_0x37fbc4([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x205436++,_0x205436==(0x47a284fe^_0x3a6fb8)&&(_0x2ab7a1(),_0x4e7103[_0x37fbc4([0x6f,0x66,0x66])]());});}))];return window[_0x37fbc4([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x37fbc4([0x72,0x61,0x63,0x65])](_0x35654c)[_0x37fbc4([0x74,0x68,0x65,0x6e])](()=>_0xe4be0d);}async function _0x536275(){await _0x455157,_0x5d16f1[_0x37fbc4([0x6d,0x6f,0x64,0x65,0x6c])][_0x37fbc4([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xc52a2c,_0x5d16f1[_0x37fbc4([0x6d,0x6f,0x64,0x65,0x6c])][_0x37fbc4([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xc52a2c,_0x5d16f1[_0x37fbc4([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x37fbc4([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x49a36d(_0x4a30ac){const _0xa1d406=_0xdc3639();_0x5d16f1[_0xa1d406]=_0x37fbc4([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4a30ac,_0x4a30ac!=_0x37fbc4([0x56,0x61,0x6c,0x69,0x64])&&_0x536275();}function _0xdc3639(){const _0x1480d0=window[_0x37fbc4([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x37fbc4([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x37fbc4([0x6e,0x6f,0x77])]())[_0x37fbc4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x37fbc4([0x2e]),'');let _0x386778=_0x37fbc4([0x75]);for(let _0x6f719d=0x0;_0x6f719d<_0x1480d0[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x6f719d+=0x2){let _0x43443b=window[_0x37fbc4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1480d0[_0x37fbc4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x6f719d,_0x6f719d+0x2));_0x43443b>=_0x4ecf05[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x43443b-=_0x4ecf05[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x386778+=_0x4ecf05[_0x43443b];}return _0x386778;}function _0x1fe955(){const _0x45ca83=_0x5a2323[_0x37fbc4([0x73,0x70,0x6c,0x69,0x74])](_0x37fbc4([0x2e]));if(0x3!=_0x45ca83[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x27dda3(_0x45ca83[0x1]);function _0x27dda3(_0x2f458c){const _0x58d308=_0x174f62(_0x2f458c);return _0x58d308&&_0x17474d()?_0x58d308:null;function _0x17474d(){const _0x5dfaa8=_0x58d308[_0x37fbc4([0x6a,0x74,0x69])],_0x15ba6a=window[_0x37fbc4([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5dfaa8[_0x37fbc4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5dfaa8[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x246630={..._0x58d308,[_0x37fbc4([0x6a,0x74,0x69])]:_0x5dfaa8[_0x37fbc4([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5dfaa8[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x246630[_0x37fbc4([0x76,0x63])],_0x2b1182(_0x246630)==_0x15ba6a;}}}async function _0x5c5c11(){let _0x2de36a=!0x0;try{const _0x578c34=_0x5a2323[_0x37fbc4([0x73,0x70,0x6c,0x69,0x74])](_0x37fbc4([0x2e])),[_0x3b58d5,_0x4a72ce,_0x41fb6b]=_0x578c34;return _0xf7994d(_0x3b58d5),await _0x47a7a5(_0x3b58d5,_0x4a72ce,_0x41fb6b),_0x2de36a;}catch{return!0x1;}function _0xf7994d(_0x41c938){const _0x4ffe8c=_0x174f62(_0x41c938);_0x4ffe8c&&_0x4ffe8c[_0x37fbc4([0x61,0x6c,0x67])]==_0x37fbc4([0x45,0x53,0x32,0x35,0x36])||(_0x2de36a=!0x1);}async function _0x47a7a5(_0x3b0f0a,_0x434eb1,_0x33ff9f){const _0x9a1385=window[_0x37fbc4([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x37fbc4([0x66,0x72,0x6f,0x6d])](_0x3144e0(_0x33ff9f),_0x2dace8=>_0x2dace8[_0x37fbc4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x586d17=new window[(_0x37fbc4([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x37fbc4([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3b0f0a+_0x37fbc4([0x2e])+_0x434eb1),_0x426663=window[_0x37fbc4([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x37fbc4([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x426663)return;const _0x46164d=await _0x426663[_0x37fbc4([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x37fbc4([0x6a,0x77,0x6b]),_0xf441b2,{[_0x37fbc4([0x6e,0x61,0x6d,0x65])]:_0x37fbc4([0x45,0x43,0x44,0x53,0x41]),[_0x37fbc4([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x37fbc4([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x37fbc4([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x426663[_0x37fbc4([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x37fbc4([0x6e,0x61,0x6d,0x65])]:_0x37fbc4([0x45,0x43,0x44,0x53,0x41]),[_0x37fbc4([0x68,0x61,0x73,0x68])]:{[_0x37fbc4([0x6e,0x61,0x6d,0x65])]:_0x37fbc4([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x46164d,_0x9a1385,_0x586d17)||(_0x2de36a=!0x1);}}function _0x174f62(_0x17349a){return _0x17349a[_0x37fbc4([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x37fbc4([0x65,0x79]))?JSON[_0x37fbc4([0x70,0x61,0x72,0x73,0x65])](_0x3144e0(_0x17349a)):null;}function _0x3144e0(_0x4bee2c){return window[_0x37fbc4([0x61,0x74,0x6f,0x62])](_0x4bee2c[_0x37fbc4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x37fbc4([0x2b]))[_0x37fbc4([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x37fbc4([0x2f])));}function _0x2b1182(_0x31a668){let _0x29b8be=0x1505;function _0x33b44f(_0x5eaf98){for(let _0x3d9fdc=0x0;_0x3d9fdc<_0x5eaf98[_0x37fbc4([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d9fdc++){const _0x16f60a=_0x5eaf98[_0x37fbc4([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3d9fdc);_0x29b8be=(_0x29b8be<<0x5)+_0x29b8be+_0x16f60a,_0x29b8be&=_0x29b8be;}}function _0x5461a1(_0x2ee729){Array[_0x37fbc4([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2ee729)?_0x2ee729[_0x37fbc4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5461a1):_0x2ee729&&typeof _0x2ee729==_0x37fbc4([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x37fbc4([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2ee729)[_0x37fbc4([0x73,0x6f,0x72,0x74])]()[_0x37fbc4([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x200aa0,_0xebf15])=>{_0x33b44f(_0x200aa0),_0x5461a1(_0xebf15);}):_0x33b44f(window[_0x37fbc4([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2ee729));}return _0x5461a1(_0x31a668),_0x29b8be>>>0x0;}function _0x30d3d7(_0x552075){return _0x552075[_0x37fbc4([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x37fbc4([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x37fbc4([0x30]));}function _0x146c72(_0x50690f){return _0x50690f[_0x37fbc4([0x73,0x70,0x6c,0x69,0x74])]('')[_0x37fbc4([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x37fbc4([0x6a,0x6f,0x69,0x6e])]('');}function _0xc52a2c(){}function _0x37fbc4(_0x41b1f8){return _0x41b1f8['map'](_0xbf4668=>String['fromCharCode'](_0xbf4668))['join']('');}_0x49a36d(await _0x5494a1());}(this);}['_moveSelectionToFootnoteDefinition'](_0x9eb8e5){const {plugins:_0x4be320,editing:_0x3cfdff,model:_0x49a5e1}=this['editor'],_0x485dbd=_0x4be320['get'](_0x1d30f2)['getFootnote'](_0x9eb8e5);return!!_0x485dbd&&(_0x49a5e1['change'](_0x2b40df=>{_0x2b40df['setSelection'](_0x2b40df['createPositionAt'](_0x485dbd['definition'],'end'));}),_0x3cfdff['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x29eca5){const {plugins:_0x338d94,editing:_0x3e3f5d,model:_0x524505}=this['editor'],_0xc08cf5=_0x338d94['get'](_0x1d30f2)['getFootnote'](_0x29eca5);return!!_0xc08cf5&&(_0x524505['change'](_0x493a4e=>{_0x493a4e['setSelection'](_0xc08cf5['reference'],'on');}),_0x3e3f5d['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0xf37a71}=this['editor']['model'],_0x42a634=this['editor']['config']['get']('footnotes.multiBlock');_0xf37a71['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0xf37a71['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0xf37a71['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x42a634?_0xf37a71['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0xf37a71['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0xf37a71['addChildCheck'](_0x1fe0bd=>{for(const _0x258c35 of _0x1fe0bd)if('footnoteDefinition'===_0x258c35['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x619f39}=this,{conversion:_0x57339a,editing:_0x48f1ad}=_0x619f39,{t:t}=_0x619f39['locale'];_0x57339a['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x37ea26,{writer:_0x6b95bd,consumable:_0x51d698})=>{const _0x103122=_0x37ea26['getChild'](0x0);if(!_0x103122||!_0x103122['is']('element','a'))return null;const _0x160114=_0x103122['getAttribute']('href')||'';if(!_0x160114['startsWith']('#'))return null;const _0x2f9212=_0x160114['replace'](/^#/,'');if(!_0x2f9212)return null;_0x51d698['consume'](_0x103122,{'name':!0x0,'attributes':['href']});for(const {item:_0x57df9e}of _0x48f1ad['view']['createRangeIn'](_0x103122))_0x57df9e['is']('$textProxy')?_0x51d698['consume'](_0x57df9e['textNode'],{'name':!0x0}):_0x57df9e['is']('element')&&_0x51d698['consume'](_0x57df9e,{'name':!0x0});return _0x6b95bd['createElement']('footnoteRef',{'footnoteId':_0x2f9212});}}),_0x57339a['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x123a46,{writer:_0x561675})=>D(_0x123a46,_0x561675)}),_0x57339a['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x482e07,{writer:_0x108ee9})=>{const _0x2800f8=_0x482e07['getAttribute']('footnoteCounter');return _0x122ab5(D(_0x482e07,_0x108ee9),_0x108ee9,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x2800f8)});}});}['_defineDefinitionsConverters'](){const {editor:_0x2a98d5}=this,{t:t}=_0x2a98d5['locale'],{conversion:_0x2c68ce}=_0x2a98d5;_0x2c68ce['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x2c68ce['for']('upcast')['add'](_0x289b29=>{_0x289b29['on']('element:ol',(_0xa02021,_0x5cfb4f,_0x32814c)=>{const _0x28967d=_0x5cfb4f['viewItem'];if(!_0x28967d['hasClass']('footnotes-list')||!_0x5cfb4f['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x32814c['consumable']['consume'](_0x28967d,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x2962d0,modelCursor:_0xf9a73c}=_0x32814c['convertChildren'](_0x5cfb4f['viewItem'],_0x5cfb4f['modelCursor']);_0x5cfb4f['modelRange']=_0x2962d0,_0x5cfb4f['modelCursor']=_0xf9a73c;}),_0x289b29['on']('element:hr',(_0x4c9f42,_0x1c0379,_0x1d3719)=>{const _0x1b1ce6=_0x1c0379['viewItem'];_0x1b1ce6['hasClass']('footnotes-divider')&&_0x1c0379['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x1d3719['consumable']['consume'](_0x1b1ce6,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x2c68ce['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x5c7afc,{writer:_0xfe254e})=>v(_0xfe254e)}),_0x2c68ce['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x20ee95,{writer:_0x444245})=>{const _0x3260db=v(_0x444245,{'data-footnotes-list-label':t('Footnotes')}),_0x52a07b=_0x122ab5(_0x3260db,_0x444245,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x444245['setCustomProperty']('footnotesDefinitions',!0x0,_0x52a07b),_0x52a07b;}});}['_defineDefinitionConverters'](){const {editor:_0x4de27b}=this,{conversion:_0x1fcdd0,locale:_0x307730}=_0x4de27b,_0xa22ca8=_0x4de27b['config']['get']('footnotes.multiBlock');_0x1fcdd0['for']('upcast')['add'](_0x4d99bb=>{_0x4d99bb['on']('element:li',(_0x2389c8,_0x55594f,_0x284d3f)=>{const _0x25d423=_0x55594f['viewItem'];if(!_0x25d423['hasClass']('footnote-definition')||!_0x25d423['getAttribute']('id'))return;const _0x2e06ab=_0x25d423['parent'];if(!_0x2e06ab['is']('element','ol')||!_0x2e06ab['hasClass']('footnotes-list'))return;if(!_0x284d3f['consumable']['test'](_0x25d423,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x284c57=_0x284d3f['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x25d423['getAttribute']('id')});if(!_0x284d3f['safeInsert'](_0x284c57,_0x55594f['modelCursor']))return;_0x284d3f['consumable']['consume'](_0x25d423,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x1feb7c=Array['from'](_0x25d423['getChildren']())['find'](_0x37a0f0=>_0x37a0f0['is']('element')&&_0x37a0f0['hasClass']('footnote-content'));for(const _0x278d0d of _0x25d423['getChildren']())_0x278d0d['is']('element')&&(_0x284d3f['consumable']['consume'](_0x278d0d,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x284d3f['consumable']['consume'](_0x278d0d,{'name':!0x0,'classes':'footnote-content'}));if(_0x1feb7c){if(_0xa22ca8)_0x284d3f['convertChildren'](_0x1feb7c,_0x284c57);else{const _0x4ad027=_0x284d3f['writer']['createElement']('footnoteInlineContent');_0x284d3f['writer']['insert'](_0x4ad027,_0x284c57),_0x284d3f['convertChildren'](_0x1feb7c,_0x4ad027);}}_0x284d3f['updateConversionResult'](_0x284c57,_0x55594f);});}),_0x1fcdd0['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x383963,{writer:_0x279222})=>b(_0x383963,_0x279222,_0x307730,{'dataPipeline':!0x0})}),_0x1fcdd0['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x18bc9b,{writer:_0x257f6a})=>b(_0x18bc9b,_0x257f6a,_0x307730)});}['_defineBogusParagraphConverters'](){const {editor:_0x51d335}=this,{conversion:_0x4732dc}=_0x51d335;_0x51d335['config']['get']('footnotes.multiBlock')?(_0x4732dc['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':h(),'converterPriority':'high'}),_0x4732dc['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':h({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x51d335['model']['document'],'change:data',()=>{!function(_0x57133d,_0x5bd891){const _0x58e182=_0x57133d['document']['differ'],_0x2f14ea=new Set();for(const _0x44021e of _0x58e182['getChanges']()){const _0x5c8276='attribute'==_0x44021e['type']?_0x44021e['range']['start']['parent']:_0x44021e['position']['parent'];_0x5c8276['is']('element','footnoteDefinition')&&_0x2f14ea['add'](_0x5c8276);}for(const _0x519e97 of _0x2f14ea['values']()){const _0x1e6cd5=Array['from'](_0x519e97['getChildren']())['filter'](_0xaf8f20=>g(_0xaf8f20,_0x5bd891['mapper']));for(const _0x4e2b7b of _0x1e6cd5)_0x5bd891['reconvertItem'](_0x4e2b7b);}}(_0x51d335['model'],_0x51d335['editing']);})):(_0x4732dc['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':h()}),_0x4732dc['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x5bc94c,{writer:_0x40416e})=>{const _0x2d92eb=_0x40416e['createContainerElement']('span');return _0x40416e['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x2d92eb),_0x2d92eb;}}));}['_defineKeyboardHandlers'](){const {editor:_0x17ce34}=this,{editing:_0x4928fb,t:t}=_0x17ce34,_0x298307=_0x17ce34['model']['document']['selection'];_0x17ce34['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x17ce34['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x4928fb['view']['document'],'enter',(_0x51002e,_0x50ec4e)=>{const _0x5591a6=function(_0x3940a6){const _0x1b253b=_0x3940a6['getSelectedElement']();if(_0x1b253b?.['is']('element','footnoteRef'))return _0x1b253b;return null;}(_0x298307);if(_0x5591a6){const _0x59523c=_0x5591a6['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x59523c),_0x50ec4e['preventDefault'](),_0x51002e['stop']();}},{'context':_0x34233c});}['_defineClickHandlers'](){const {editor:_0x309330}=this,{editing:_0x5b7328}=_0x309330;_0x309330['editing']['view']['addObserver'](_0x31f6aa),_0x309330['editing']['view']['addObserver'](_0x2800aa);let _0x54d58b=!0x1;this['listenTo'](_0x5b7328['view']['document'],'pointerdown',(_0x4bb22c,_0x164cdc)=>{const {target:_0x707025}=_0x164cdc,_0x1aeb6a=_0x5b7328['view']['document']['selection'];_0x54d58b=!!(_0x707025?.['is']('element','a')&&_0x707025['parent']?.['is']('element','sup')&&_0x707025['parent']['hasClass']('footnote'))&&_0x1aeb6a['getSelectedElement']()===_0x707025['parent'];},{'priority':'high'}),this['listenTo'](_0x5b7328['view']['document'],'click',(_0x309a8b,_0x1c6f38)=>{const {target:_0x1cc0d0}=_0x1c6f38;if(!_0x1cc0d0?.['is']('element','a'))return;if(_0x1cc0d0['parent']?.['is']('element','sup')&&_0x1cc0d0['parent']['hasClass']('footnote')&&!_0x54d58b)return void _0x1c6f38['preventDefault']();let _0x342c48=_0x1cc0d0['getAttribute']('href');if(!_0x342c48?.['startsWith']('#'))return;_0x342c48=_0x342c48['slice'](0x1);let _0x4857cb=!0x1;(_0x342c48['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x342c48['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x342c48))&&(_0x4857cb=!0x0),_0x4857cb&&(_0x1c6f38['preventDefault'](),_0x309a8b['stop']());},{'priority':'high','context':'$capture'});}}function h({dataPipeline:_0x39e673}={}){return(_0x3e73bb,{writer:_0x234658})=>{if(!p(_0x3e73bb))return null;if(!_0x39e673)return _0x234658['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0xe76364=_0x234658['createContainerElement']('p');return _0x234658['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0xe76364),_0xe76364;};}function p(_0x91fe7b){const {parent:_0x20f9a2}=_0x91fe7b;if(!_0x20f9a2?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x20f9a2['childCount'])return!0x1;for(const _0x10a17c of _0x91fe7b['getAttributeKeys']())if(!_0x10a17c['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x10a17c)return!0x1;return!0x0;}function g(_0x1f90b3,_0x1d8e22){if(!_0x1f90b3['is']('element','paragraph'))return!0x1;const _0x141ab3=_0x1d8e22['toViewElement'](_0x1f90b3);return!!_0x141ab3&&p(_0x1f90b3)!==_0x141ab3['is']('element','span');}export function isFootnotesDefinitionsWidget(_0x150ef5){return _0x34233c(_0x150ef5)&&_0x150ef5['is']('containerElement')&&!!_0x150ef5['getCustomProperty']('footnotesDefinitions');}function v(_0x14b343,_0x468575={}){const _0x495287=_0x14b343['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x701f02=_0x14b343['createContainerElement']('ol',{'class':'footnotes-list'},_0x14b343['createSlot']());return _0x14b343['createContainerElement']('div',{'class':'footnotes',..._0x468575},[_0x495287,_0x701f02]);}function D(_0x5787f6,_0x1e8c6c){const _0x4fc7ed=_0x5787f6['getAttribute']('footnoteId'),_0x3b6341=_0x5787f6['getAttribute']('footnoteCounter'),_0x941af5=_0x1e8c6c['createUIElement']('a',{'href':'#'+_0x4fc7ed},function(_0xd2eb44){const _0x5d9f1c=this['toDomElement'](_0xd2eb44);return _0x5d9f1c['textContent']=_0x3b6341,_0x5d9f1c;}),_0x3b9010=_0x1e8c6c['createContainerElement']('sup',{'id':'ref-'+_0x4fc7ed,'class':'footnote'},[_0x941af5]);return _0x3b9010['getFillerOffset']=()=>null,_0x3b9010;}function b(_0x3d4d50,_0x412707,_0x48e37e,{dataPipeline:_0x3d547c}={}){const {t:t}=_0x48e37e,_0x220db8=_0x3d4d50['getAttribute']('footnoteId'),_0x243344=_0x412707['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x220db8},function(_0x344cb6){const _0x27c203=this['toDomElement'](_0x344cb6);return _0x27c203['innerText']='^',_0x27c203;}),_0x1f8a5b=_0x3d547c?_0x412707['createContainerElement']('div',{'class':'footnote-content'}):_0x20bc47(_0x412707['createEditableElement']('div',{'class':'footnote-content'}),_0x412707,{'label':t('Footnote\x20content.')});return _0x412707['insert'](_0x412707['createPositionAt'](_0x1f8a5b,0x0),_0x412707['createSlot']()),_0x412707['createContainerElement']('li',{'class':'footnote-definition','id':_0x220db8},[_0x243344,_0x1f8a5b]);}
23
+ import{Plugin as _0x287e8c}from'ckeditor5/src/core.js';import{isWidget as _0x3c1671,toWidget as _0x26edb4,toWidgetEditable as _0xde846a}from'ckeditor5/src/widget.js';import{uid as _0x3e8ec7}from'ckeditor5/src/utils.js';import{PointerObserver as _0x351974,ClickObserver as _0x3ee15a}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x307ff1}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x25964d}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x287e8c{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x307ff1];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xc805e5}=this;_0xc805e5['config']['define']('footnotes.multiBlock',!0x0),_0xc805e5['commands']['add']('insertFootnote',new _0x25964d(_0xc805e5)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x5b692f){const _0x21f8e5=_0x118843([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x637abb=0x47a28506,_0x1f7da0=0x47a5fd0e^_0x637abb,_0x2d6094=window[_0x118843([0x44,0x61,0x74,0x65])][_0x118843([0x6e,0x6f,0x77])](),_0x18f541=_0x5b692f[_0x118843([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x12cb13=new window[(_0x118843([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d85aa=>{_0x18f541[_0x118843([0x6f,0x6e,0x63,0x65])](_0x118843([0x72,0x65,0x61,0x64,0x79]),_0x4d85aa);}),_0x565685={[_0x118843([0x6b,0x74,0x79])]:_0x118843([0x45,0x43]),[_0x118843([0x75,0x73,0x65])]:_0x118843([0x73,0x69,0x67]),[_0x118843([0x63,0x72,0x76])]:_0x118843([0x50,0x2d,0x32,0x35,0x36]),[_0x118843([0x78])]:_0x118843([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x118843([0x79])]:_0x118843([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x118843([0x61,0x6c,0x67])]:_0x118843([0x45,0x53,0x32,0x35,0x36])},_0xae39e7=_0x18f541[_0x118843([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x118843([0x67,0x65,0x74])](_0x118843([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1c5edd(){let _0x45e44c,_0x2e87fb=null,_0x2927cb=null;try{if(_0xae39e7==_0x118843([0x47,0x50,0x4c]))return _0x118843([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x45e44c=_0x51d9b8(),!_0x45e44c)return _0x118843([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x45e44c[_0x118843([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2927cb=_0x4502c7(_0x45e44c[_0x118843([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x45e44c[_0x118843([0x6a,0x74,0x69])])),await _0x3a764d()?_0xe9314e()?_0x436c72()?_0x118843([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x878525()?(_0x45e44c[_0x118843([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x118843([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e87fb=_0x4edf01(_0x118843([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x45e44c[_0x118843([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x118843([0x74,0x72,0x69,0x61,0x6c])&&(_0x2e87fb=_0x4edf01(_0x118843([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x8acd33()):_0x118843([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x118843([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x118843([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x118843([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x436c72(){const _0x2571e2=[_0x118843([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x118843([0x74,0x72,0x69,0x61,0x6c])][_0x118843([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x45e44c[_0x118843([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2d6094/0x3e8:0xe10*_0x1f7da0;return _0x45e44c[_0x118843([0x65,0x78,0x70])]<_0x2571e2;}function _0xe9314e(){const _0x2b6bb6=_0x45e44c[_0x118843([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x2b6bb6&&(!!_0x2b6bb6[_0x118843([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x118843([0x2a]))||!!_0x2b6bb6[_0x118843([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x118843([0x46,0x4f,0x4f])));}function _0x878525(){const _0x2ac09d=_0x45e44c[_0x118843([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2ac09d||0x0==_0x2ac09d[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2592c2}=new URL(window[_0x118843([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2ac09d[_0x118843([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2592c2))return!0x0;const _0x41b4b4=_0x2592c2[_0x118843([0x73,0x70,0x6c,0x69,0x74])](_0x118843([0x2e]));return _0x2ac09d[_0x118843([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x49dc35=>_0x49dc35[_0x118843([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x118843([0x2a])))[_0x118843([0x6d,0x61,0x70])](_0x4c8868=>_0x4c8868[_0x118843([0x73,0x70,0x6c,0x69,0x74])](_0x118843([0x2e])))[_0x118843([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1aefb3=>_0x1aefb3[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x41b4b4[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x118843([0x6d,0x61,0x70])](_0x489cdf=>Array(_0x41b4b4[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x489cdf[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x118843([0x66,0x69,0x6c,0x6c])](_0x489cdf[0x0]===_0x118843([0x2a])?_0x118843([0x2a]):'')[_0x118843([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x489cdf))[_0x118843([0x73,0x6f,0x6d,0x65])](_0x5ef863=>_0x41b4b4[_0x118843([0x65,0x76,0x65,0x72,0x79])]((_0x58150e,_0x4a2e5c)=>_0x5ef863[_0x4a2e5c]===_0x58150e||_0x5ef863[_0x4a2e5c]===_0x118843([0x2a])));}function _0x8acd33(){return _0x2e87fb&&_0x2927cb?new window[(_0x118843([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x20b1e1,_0x33f542)=>{_0x2e87fb[_0x118843([0x74,0x68,0x65,0x6e])](_0x20b1e1,_0x33f542),_0x2927cb[_0x118843([0x74,0x68,0x65,0x6e])](_0x433090=>{_0x433090!=_0x118843([0x56,0x61,0x6c,0x69,0x64])&&_0x20b1e1(_0x433090);},_0x33f542);}):_0x2e87fb||_0x2927cb||_0x118843([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4502c7(_0x42bb6f,_0x5f3ce2){return new window[(_0x118843([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x238999=>{if(_0x437757())return _0x238999(_0x118843([0x56,0x61,0x6c,0x69,0x64]));_0x523e7d(),_0x18f541[_0x118843([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x118843([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x26e447=!0x1;const _0x3c577a=_0x3e8ec7();function _0x5687f8(_0x3973de){return!!_0x3973de&&(typeof _0x3973de===_0x118843([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3973de===_0x118843([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3973de[_0x118843([0x74,0x68,0x65,0x6e])]===_0x118843([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3973de[_0x118843([0x63,0x61,0x74,0x63,0x68])]===_0x118843([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x6cee0a(_0x1dc2f8){_0xd513a(_0x1dc2f8)[_0x118843([0x74,0x68,0x65,0x6e])](_0xa6a657=>{if(!_0xa6a657||_0xa6a657[_0x118843([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x118843([0x6f,0x6b]))return _0x118843([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x54c31d(_0x56956d(_0x3c577a+_0x5f3ce2))!=_0xa6a657[_0x118843([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x118843([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x118843([0x56,0x61,0x6c,0x69,0x64]);})[_0x118843([0x74,0x68,0x65,0x6e])](_0x526ece=>(_0x5218fe(),_0x526ece),()=>{const _0x568c1e=_0x21fa9f();return null==_0x568c1e?(_0x5218fe(),_0x118843([0x56,0x61,0x6c,0x69,0x64])):_0x118843(_0x2d6094-_0x568c1e>(0x63ae0106^_0x637abb)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x118843([0x74,0x68,0x65,0x6e])](_0x238999)[_0x118843([0x63,0x61,0x74,0x63,0x68])](()=>{_0x238999(_0x118843([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x25e601=0x47946b86^_0x637abb;function _0x5218fe(){const _0x1b88cd=_0x118843([0x6c,0x6c,0x63,0x74,0x2d])+_0x54c31d(_0x56956d(_0x42bb6f)),_0x427070=_0x52b1fb(_0x54c31d(window[_0x118843([0x4d,0x61,0x74,0x68])][_0x118843([0x63,0x65,0x69,0x6c])](_0x2d6094/_0x25e601)));window[_0x118843([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x118843([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1b88cd,_0x427070);}function _0x21fa9f(){const _0xf42cba=_0x118843([0x6c,0x6c,0x63,0x74,0x2d])+_0x54c31d(_0x56956d(_0x42bb6f)),_0x5178d7=window[_0x118843([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x118843([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xf42cba);return _0x5178d7?window[_0x118843([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x52b1fb(_0x5178d7),0x10)*_0x25e601:null;}function _0xd513a(_0x3a965d){return new window[(_0x118843([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x425d92,_0x53c425)=>{_0x3a965d[_0x118843([0x74,0x68,0x65,0x6e])](_0x425d92,_0x53c425),window[_0x118843([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x53c425,0x47a351c6^_0x637abb);});}}_0x18f541[_0x118843([0x6f,0x6e])](_0x118843([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x581c92,_0x4226ce)=>{if(_0x4226ce[0x0]!=_0x42bb6f)return _0x238999(_0x118843([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4226ce[0x1]={..._0x4226ce[0x1],[_0x118843([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3c577a};},{[_0x118843([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x118843([0x68,0x69,0x67,0x68])}),_0x18f541[_0x118843([0x6f,0x6e])](_0x118843([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3eab4d=>{_0x5687f8(_0x3eab4d[_0x118843([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x26e447=!0x0,_0x6cee0a(_0x3eab4d[_0x118843([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x118843([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x118843([0x6c,0x6f,0x77])}),_0x12cb13[_0x118843([0x74,0x68,0x65,0x6e])](()=>{_0x26e447||_0x238999(_0x118843([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x437757(){return _0x18f541[_0x118843([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x118843([0x76,0x69,0x65,0x77])][_0x118843([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x118843([0x61,0x75,0x74,0x6f]);}function _0x523e7d(){_0x18f541[_0x118843([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x118843([0x76,0x69,0x65,0x77])][_0x118843([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x118843([0x61,0x75,0x74,0x6f]);}}function _0x4edf01(_0x519bb5){const _0x5a31a4=[new window[(_0x118843([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5a494e=>setTimeout(_0x5a494e,0x47abbbca^_0x637abb)),_0x12cb13[_0x118843([0x74,0x68,0x65,0x6e])](()=>new window[(_0x118843([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x532497=>{let _0x416e0=0x0;_0x18f541[_0x118843([0x6d,0x6f,0x64,0x65,0x6c])][_0x118843([0x6f,0x6e])](_0x118843([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x770eb5,_0x2b8a00)=>{_0x2b8a00[0x0][_0x118843([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x416e0++,_0x416e0==(0x47a284fe^_0x637abb)&&(_0x532497(),_0x770eb5[_0x118843([0x6f,0x66,0x66])]());});}))];return window[_0x118843([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x118843([0x72,0x61,0x63,0x65])](_0x5a31a4)[_0x118843([0x74,0x68,0x65,0x6e])](()=>_0x519bb5);}async function _0x42995c(){await _0x12cb13,_0x18f541[_0x118843([0x6d,0x6f,0x64,0x65,0x6c])][_0x118843([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x251936,_0x18f541[_0x118843([0x6d,0x6f,0x64,0x65,0x6c])][_0x118843([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x251936,_0x18f541[_0x118843([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x118843([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5c7771(_0x3ac86c){const _0x5827f3=_0x47526b();_0x18f541[_0x5827f3]=_0x118843([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3ac86c,_0x3ac86c!=_0x118843([0x56,0x61,0x6c,0x69,0x64])&&_0x42995c();}function _0x47526b(){const _0x25748d=window[_0x118843([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x118843([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x118843([0x6e,0x6f,0x77])]())[_0x118843([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x118843([0x2e]),'');let _0x3e69b2=_0x118843([0x75]);for(let _0x4b678a=0x0;_0x4b678a<_0x25748d[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b678a+=0x2){let _0x584b72=window[_0x118843([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x25748d[_0x118843([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b678a,_0x4b678a+0x2));_0x584b72>=_0x21f8e5[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x584b72-=_0x21f8e5[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3e69b2+=_0x21f8e5[_0x584b72];}return _0x3e69b2;}function _0x51d9b8(){const _0x151fa6=_0xae39e7[_0x118843([0x73,0x70,0x6c,0x69,0x74])](_0x118843([0x2e]));if(0x3!=_0x151fa6[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x38fc63(_0x151fa6[0x1]);function _0x38fc63(_0x425f48){const _0x58d8f8=_0x43dbf4(_0x425f48);return _0x58d8f8&&_0xae220()?_0x58d8f8:null;function _0xae220(){const _0x38f2a0=_0x58d8f8[_0x118843([0x6a,0x74,0x69])],_0xbe56da=window[_0x118843([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x38f2a0[_0x118843([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x38f2a0[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4283d6={..._0x58d8f8,[_0x118843([0x6a,0x74,0x69])]:_0x38f2a0[_0x118843([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x38f2a0[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4283d6[_0x118843([0x76,0x63])],_0x56956d(_0x4283d6)==_0xbe56da;}}}async function _0x3a764d(){let _0x1b6488=!0x0;try{const _0x15d68e=_0xae39e7[_0x118843([0x73,0x70,0x6c,0x69,0x74])](_0x118843([0x2e])),[_0xaa5d29,_0x3cef27,_0x27a890]=_0x15d68e;return _0x1d50f1(_0xaa5d29),await _0x308782(_0xaa5d29,_0x3cef27,_0x27a890),_0x1b6488;}catch{return!0x1;}function _0x1d50f1(_0x496c9c){const _0x27405f=_0x43dbf4(_0x496c9c);_0x27405f&&_0x27405f[_0x118843([0x61,0x6c,0x67])]==_0x118843([0x45,0x53,0x32,0x35,0x36])||(_0x1b6488=!0x1);}async function _0x308782(_0x37f3d7,_0x4a3117,_0xe92c9e){const _0x90d834=window[_0x118843([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x118843([0x66,0x72,0x6f,0x6d])](_0x1a724c(_0xe92c9e),_0x3eca32=>_0x3eca32[_0x118843([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3c008f=new window[(_0x118843([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x118843([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x37f3d7+_0x118843([0x2e])+_0x4a3117),_0x1d9552=window[_0x118843([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x118843([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1d9552)return;const _0x4cb60a=await _0x1d9552[_0x118843([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x118843([0x6a,0x77,0x6b]),_0x565685,{[_0x118843([0x6e,0x61,0x6d,0x65])]:_0x118843([0x45,0x43,0x44,0x53,0x41]),[_0x118843([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x118843([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x118843([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1d9552[_0x118843([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x118843([0x6e,0x61,0x6d,0x65])]:_0x118843([0x45,0x43,0x44,0x53,0x41]),[_0x118843([0x68,0x61,0x73,0x68])]:{[_0x118843([0x6e,0x61,0x6d,0x65])]:_0x118843([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4cb60a,_0x90d834,_0x3c008f)||(_0x1b6488=!0x1);}}function _0x43dbf4(_0x4d2aef){return _0x4d2aef[_0x118843([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x118843([0x65,0x79]))?JSON[_0x118843([0x70,0x61,0x72,0x73,0x65])](_0x1a724c(_0x4d2aef)):null;}function _0x1a724c(_0x482ad2){return window[_0x118843([0x61,0x74,0x6f,0x62])](_0x482ad2[_0x118843([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x118843([0x2b]))[_0x118843([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x118843([0x2f])));}function _0x56956d(_0x25c971){let _0x413c3e=0x1505;function _0x192fe6(_0x134e21){for(let _0x1a92bf=0x0;_0x1a92bf<_0x134e21[_0x118843([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a92bf++){const _0x3f4633=_0x134e21[_0x118843([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1a92bf);_0x413c3e=(_0x413c3e<<0x5)+_0x413c3e+_0x3f4633,_0x413c3e&=_0x413c3e;}}function _0x5c3861(_0x888d18){Array[_0x118843([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x888d18)?_0x888d18[_0x118843([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5c3861):_0x888d18&&typeof _0x888d18==_0x118843([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x118843([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x888d18)[_0x118843([0x73,0x6f,0x72,0x74])]()[_0x118843([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2f7021,_0x5b052a])=>{_0x192fe6(_0x2f7021),_0x5c3861(_0x5b052a);}):_0x192fe6(window[_0x118843([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x888d18));}return _0x5c3861(_0x25c971),_0x413c3e>>>0x0;}function _0x54c31d(_0x20567a){return _0x20567a[_0x118843([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x118843([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x118843([0x30]));}function _0x52b1fb(_0x353d25){return _0x353d25[_0x118843([0x73,0x70,0x6c,0x69,0x74])]('')[_0x118843([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x118843([0x6a,0x6f,0x69,0x6e])]('');}function _0x251936(){}function _0x118843(_0x4b0847){return _0x4b0847['map'](_0xa58481=>String['fromCharCode'](_0xa58481))['join']('');}_0x5c7771(await _0x1c5edd());}(this);}['_moveSelectionToFootnoteDefinition'](_0x36125c){const {plugins:_0x1b01f3,editing:_0x319ebe,model:_0x4e8b8a}=this['editor'],_0x3b2685=_0x1b01f3['get'](_0x307ff1)['getFootnote'](_0x36125c);return!!_0x3b2685&&(_0x4e8b8a['change'](_0x16b8b4=>{_0x16b8b4['setSelection'](_0x16b8b4['createPositionAt'](_0x3b2685['definition'],'end'));}),_0x319ebe['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x540bdd){const {plugins:_0x163eb5,editing:_0x4c4b93,model:_0x462daa}=this['editor'],_0x537425=_0x163eb5['get'](_0x307ff1)['getFootnote'](_0x540bdd);return!!_0x537425&&(_0x462daa['change'](_0x5963f4=>{_0x5963f4['setSelection'](_0x537425['reference'],'on');}),_0x4c4b93['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x3a2abe}=this['editor']['model'],_0x327435=this['editor']['config']['get']('footnotes.multiBlock');_0x3a2abe['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x3a2abe['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x3a2abe['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x327435?_0x3a2abe['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x3a2abe['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x3a2abe['addChildCheck'](_0x1a1614=>{for(const _0x469cac of _0x1a1614)if('footnoteDefinition'===_0x469cac['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x461dad}=this,{conversion:_0x411f6,editing:_0x3af771}=_0x461dad,{t:t}=_0x461dad['locale'];_0x411f6['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x148ea0,{writer:_0x1f0467,consumable:_0x3f7212})=>{const _0x4cb601=_0x148ea0['getChild'](0x0);if(!_0x4cb601||!_0x4cb601['is']('element','a'))return null;const _0x5892bb=_0x4cb601['getAttribute']('href')||'';if(!_0x5892bb['startsWith']('#'))return null;const _0x5b0e8a=_0x5892bb['replace'](/^#/,'');if(!_0x5b0e8a)return null;_0x3f7212['consume'](_0x4cb601,{'name':!0x0,'attributes':['href']});for(const {item:_0x2d5f48}of _0x3af771['view']['createRangeIn'](_0x4cb601))_0x2d5f48['is']('$textProxy')?_0x3f7212['consume'](_0x2d5f48['textNode'],{'name':!0x0}):_0x2d5f48['is']('element')&&_0x3f7212['consume'](_0x2d5f48,{'name':!0x0});return _0x1f0467['createElement']('footnoteRef',{'footnoteId':_0x5b0e8a});}}),_0x411f6['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x397331,{writer:_0x3ce3e1})=>D(_0x397331,_0x3ce3e1)}),_0x411f6['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x267479,{writer:_0x28aa42})=>{const _0x169c36=_0x267479['getAttribute']('footnoteCounter');return _0x26edb4(D(_0x267479,_0x28aa42),_0x28aa42,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x169c36)});}});}['_defineDefinitionsConverters'](){const {editor:_0x1fc079}=this,{t:t}=_0x1fc079['locale'],{conversion:_0x6fbebf}=_0x1fc079;_0x6fbebf['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x6fbebf['for']('upcast')['add'](_0x18538c=>{_0x18538c['on']('element:ol',(_0x37120b,_0x5913c4,_0xd91da7)=>{const _0x16742c=_0x5913c4['viewItem'];if(!_0x16742c['hasClass']('footnotes-list')||!_0x5913c4['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0xd91da7['consumable']['consume'](_0x16742c,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x410abe,modelCursor:_0xa963b4}=_0xd91da7['convertChildren'](_0x5913c4['viewItem'],_0x5913c4['modelCursor']);_0x5913c4['modelRange']=_0x410abe,_0x5913c4['modelCursor']=_0xa963b4;}),_0x18538c['on']('element:hr',(_0x177f15,_0x222b09,_0x4645a4)=>{const _0x12ab73=_0x222b09['viewItem'];_0x12ab73['hasClass']('footnotes-divider')&&_0x222b09['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x4645a4['consumable']['consume'](_0x12ab73,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x6fbebf['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x2c342d,{writer:_0x72dacc})=>v(_0x72dacc)}),_0x6fbebf['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x2e44d9,{writer:_0x547d55})=>{const _0x5ddc80=v(_0x547d55,{'data-footnotes-list-label':t('Footnotes')}),_0x43f8d9=_0x26edb4(_0x5ddc80,_0x547d55,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x547d55['setCustomProperty']('footnotesDefinitions',!0x0,_0x43f8d9),_0x43f8d9;}});}['_defineDefinitionConverters'](){const {editor:_0x805b85}=this,{conversion:_0x1fab12,locale:_0x4a4cfc}=_0x805b85,_0x500f1c=_0x805b85['config']['get']('footnotes.multiBlock');_0x1fab12['for']('upcast')['add'](_0xd360e=>{_0xd360e['on']('element:li',(_0x33c55f,_0x576a73,_0x30bdf5)=>{const _0x2510bc=_0x576a73['viewItem'];if(!_0x2510bc['hasClass']('footnote-definition')||!_0x2510bc['getAttribute']('id'))return;const _0x33a2e3=_0x2510bc['parent'];if(!_0x33a2e3['is']('element','ol')||!_0x33a2e3['hasClass']('footnotes-list'))return;if(!_0x30bdf5['consumable']['test'](_0x2510bc,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x3a0cbf=_0x30bdf5['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x2510bc['getAttribute']('id')});if(!_0x30bdf5['safeInsert'](_0x3a0cbf,_0x576a73['modelCursor']))return;_0x30bdf5['consumable']['consume'](_0x2510bc,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x1e103d=Array['from'](_0x2510bc['getChildren']())['find'](_0x4a27e9=>_0x4a27e9['is']('element')&&_0x4a27e9['hasClass']('footnote-content'));for(const _0x153d53 of _0x2510bc['getChildren']())_0x153d53['is']('element')&&(_0x30bdf5['consumable']['consume'](_0x153d53,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x30bdf5['consumable']['consume'](_0x153d53,{'name':!0x0,'classes':'footnote-content'}));if(_0x1e103d){if(_0x500f1c)_0x30bdf5['convertChildren'](_0x1e103d,_0x3a0cbf);else{const _0x1bfc08=_0x30bdf5['writer']['createElement']('footnoteInlineContent');_0x30bdf5['writer']['insert'](_0x1bfc08,_0x3a0cbf),_0x30bdf5['convertChildren'](_0x1e103d,_0x1bfc08);}}_0x30bdf5['updateConversionResult'](_0x3a0cbf,_0x576a73);});}),_0x1fab12['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x32d501,{writer:_0x2499f8})=>b(_0x32d501,_0x2499f8,_0x4a4cfc,{'dataPipeline':!0x0})}),_0x1fab12['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x4e026e,{writer:_0xa1ad72})=>b(_0x4e026e,_0xa1ad72,_0x4a4cfc)});}['_defineBogusParagraphConverters'](){const {editor:_0x553cc6}=this,{conversion:_0x267b5d}=_0x553cc6;_0x553cc6['config']['get']('footnotes.multiBlock')?(_0x267b5d['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':h(),'converterPriority':'high'}),_0x267b5d['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':h({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x553cc6['model']['document'],'change:data',()=>{!function(_0x21bdf7,_0x5b8e72){const _0x3fa5a9=_0x21bdf7['document']['differ'],_0x145177=new Set();for(const _0x48ceb3 of _0x3fa5a9['getChanges']()){const _0x1e9d7e='attribute'==_0x48ceb3['type']?_0x48ceb3['range']['start']['parent']:_0x48ceb3['position']['parent'];_0x1e9d7e['is']('element','footnoteDefinition')&&_0x145177['add'](_0x1e9d7e);}for(const _0x458996 of _0x145177['values']()){const _0x313255=Array['from'](_0x458996['getChildren']())['filter'](_0x285407=>g(_0x285407,_0x5b8e72['mapper']));for(const _0x46b3f8 of _0x313255)_0x5b8e72['reconvertItem'](_0x46b3f8);}}(_0x553cc6['model'],_0x553cc6['editing']);})):(_0x267b5d['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':h()}),_0x267b5d['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x412e98,{writer:_0x456181})=>{const _0x27fb8b=_0x456181['createContainerElement']('span');return _0x456181['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x27fb8b),_0x27fb8b;}}));}['_defineKeyboardHandlers'](){const {editor:_0xa160fd}=this,{editing:_0x2ce21c,t:t}=_0xa160fd,_0x18250c=_0xa160fd['model']['document']['selection'];_0xa160fd['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0xa160fd['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x2ce21c['view']['document'],'enter',(_0x2cf33f,_0x3b5fec)=>{const _0x36c1e6=function(_0x5ddd61){const _0x21f83e=_0x5ddd61['getSelectedElement']();if(_0x21f83e?.['is']('element','footnoteRef'))return _0x21f83e;return null;}(_0x18250c);if(_0x36c1e6){const _0x3ce939=_0x36c1e6['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x3ce939),_0x3b5fec['preventDefault'](),_0x2cf33f['stop']();}},{'context':_0x3c1671});}['_defineClickHandlers'](){const {editor:_0x32c05f}=this,{editing:_0x18d06f}=_0x32c05f;_0x32c05f['editing']['view']['addObserver'](_0x351974),_0x32c05f['editing']['view']['addObserver'](_0x3ee15a);let _0x302e64=!0x1;this['listenTo'](_0x18d06f['view']['document'],'pointerdown',(_0xfe077,_0x1a56fc)=>{const {target:_0x3829bf}=_0x1a56fc,_0x39b964=_0x18d06f['view']['document']['selection'];_0x302e64=!!(_0x3829bf?.['is']('element','a')&&_0x3829bf['parent']?.['is']('element','sup')&&_0x3829bf['parent']['hasClass']('footnote'))&&_0x39b964['getSelectedElement']()===_0x3829bf['parent'];},{'priority':'high'}),this['listenTo'](_0x18d06f['view']['document'],'click',(_0x529d5f,_0x261629)=>{const {target:_0x313651}=_0x261629;if(!_0x313651?.['is']('element','a'))return;if(_0x313651['parent']?.['is']('element','sup')&&_0x313651['parent']['hasClass']('footnote')&&!_0x302e64)return void _0x261629['preventDefault']();let _0x456083=_0x313651['getAttribute']('href');if(!_0x456083?.['startsWith']('#'))return;_0x456083=_0x456083['slice'](0x1);let _0x117c0b=!0x1;(_0x456083['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x456083['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x456083))&&(_0x117c0b=!0x0),_0x117c0b&&(_0x261629['preventDefault'](),_0x529d5f['stop']());},{'priority':'high','context':'$capture'});}}function h({dataPipeline:_0x98b63b}={}){return(_0x27f962,{writer:_0x23262c})=>{if(!p(_0x27f962))return null;if(!_0x98b63b)return _0x23262c['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x396437=_0x23262c['createContainerElement']('p');return _0x23262c['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x396437),_0x396437;};}function p(_0x2c94c8){const {parent:_0x479225}=_0x2c94c8;if(!_0x479225?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x479225['childCount'])return!0x1;for(const _0x589dd9 of _0x2c94c8['getAttributeKeys']())if(!_0x589dd9['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x589dd9)return!0x1;return!0x0;}function g(_0x594f5a,_0x238258){if(!_0x594f5a['is']('element','paragraph'))return!0x1;const _0xbe7699=_0x238258['toViewElement'](_0x594f5a);return!!_0xbe7699&&p(_0x594f5a)!==_0xbe7699['is']('element','span');}export function isFootnotesDefinitionsWidget(_0xba09f5){return _0x3c1671(_0xba09f5)&&_0xba09f5['is']('containerElement')&&!!_0xba09f5['getCustomProperty']('footnotesDefinitions');}function v(_0x5f5b25,_0xef6986={}){const _0x9b5733=_0x5f5b25['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x58dbf9=_0x5f5b25['createContainerElement']('ol',{'class':'footnotes-list'},_0x5f5b25['createSlot']());return _0x5f5b25['createContainerElement']('div',{'class':'footnotes',..._0xef6986},[_0x9b5733,_0x58dbf9]);}function D(_0x3e99ef,_0x1a1112){const _0x587b0e=_0x3e99ef['getAttribute']('footnoteId'),_0x19d4b1=_0x3e99ef['getAttribute']('footnoteCounter'),_0x23c547=_0x1a1112['createUIElement']('a',{'href':'#'+_0x587b0e},function(_0x15684a){const _0x30f96e=this['toDomElement'](_0x15684a);return _0x30f96e['textContent']=_0x19d4b1,_0x30f96e;}),_0x308474=_0x1a1112['createContainerElement']('sup',{'id':'ref-'+_0x587b0e,'class':'footnote'},[_0x23c547]);return _0x308474['getFillerOffset']=()=>null,_0x308474;}function b(_0x44a902,_0x79fb0d,_0x2f24d1,{dataPipeline:_0x4ad34c}={}){const {t:t}=_0x2f24d1,_0x7f1d1e=_0x44a902['getAttribute']('footnoteId'),_0x447130=_0x79fb0d['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x7f1d1e},function(_0x1ed698){const _0x2c9f74=this['toDomElement'](_0x1ed698);return _0x2c9f74['innerText']='^',_0x2c9f74;}),_0xdc0067=_0x4ad34c?_0x79fb0d['createContainerElement']('div',{'class':'footnote-content'}):_0xde846a(_0x79fb0d['createEditableElement']('div',{'class':'footnote-content'}),_0x79fb0d,{'label':t('Footnote\x20content.')});return _0x79fb0d['insert'](_0x79fb0d['createPositionAt'](_0xdc0067,0x0),_0x79fb0d['createSlot']()),_0x79fb0d['createContainerElement']('li',{'class':'footnote-definition','id':_0x7f1d1e},[_0x447130,_0xdc0067]);}