@ckeditor/ckeditor5-footnotes 47.4.0-alpha.6 → 47.4.0

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-2026, CKSource Holding sp. z o.o. All rights reserved.
4
4
  * For licensing, see LICENSE.md.
5
- */(()=>{var t={102: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)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),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},297: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)}}}},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")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},728:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),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},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779: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}},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")},929: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}}}},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:()=>$,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>Pt,FootnotesPropertiesEditing:()=>mt,FootnotesPropertiesUI:()=>Ft,FootnotesStartCommand:()=>dt,FootnotesStyleCommand:()=>ct,FootnotesTracker:()=>d,FootnotesUI:()=>Q,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);const r=a;function a(t,e){const o=c();return(a=function(t,e){return o[t-=252]})(t,e)}function c(){const t=["426uhQFzV","24016NbITqf","flat","name","_model","has","slice","root","element","$text","values","remove","insert","_getElementKey","elementName","173954RYZYRJ","506992eDIaTP","12rVgxsW","delete","22455158wXvuzx","78205NDiAml","get","nodeAfter","$graveyard","getItems","7930260ULDDAs","_elementName","type","position","attributes","set","length","createRangeOn","10Qhkocc","42VtqCmk","_trackedElements","rootName","798MkmcOz","add","373022WQKyaY","getElementKey","push","getChanges","reset","from","clear"];return(c=function(){return t})()}!function(t){const e=a,o=t();for(;;)try{if(806548===-parseInt(e(257))/1+-parseInt(e(279))/2+-parseInt(e(255))/3*(-parseInt(e(265))/4)+-parseInt(e(284))/5*(parseInt(e(264))/6)+parseInt(e(252))/7*(-parseInt(e(280))/8)+parseInt(e(289))/9*(-parseInt(e(297))/10)+parseInt(e(283))/11*(parseInt(e(281))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(c);class l{[r(268)];[r(290)];[r(277)];[r(253)]=new Map;constructor(t,e){const o=r;this[o(268)]=t,this[o(290)]=e[o(278)],this[o(277)]=e[o(258)]}[r(261)](){const t=r;this[t(253)][t(263)]()}[r(260)](t){const e=r,o=new Set,n=new Map;for(const i of t){if(e(276)===i[e(291)]&&e(273)!==i[e(267)]&&i[e(292)][e(286)]){const t=this[e(268)][e(296)](i[e(292)][e(286)]);for(const o of t[e(288)]()){if(!o.is(e(272),this[e(290)]))continue;const t=this[e(277)](o);n[e(269)](t)||n[e(294)](t,[]),n[e(285)](t)[e(259)](o)}}if(e(275)===i[e(291)]&&i[e(267)]===this[e(290)]){const t=this[e(277)]({getAttribute:t=>i[e(293)][e(285)](t)});o[e(256)](t)}}for(const[t,n]of this[e(253)])e(287)===n[e(271)][e(254)]&&o[e(256)](t);for(const t of o)this[e(253)][e(282)](t);for(const[t,o]of n)this[e(253)][e(294)](t,o[o[e(295)]-1]);const i=new Set;for(const[t,s]of n)o[e(269)](t)&&(i[e(256)](s[0]),s[e(295)]>1?n[e(294)](t,s[e(270)](1)):n[e(282)](t),o[e(282)](t));return{removed:Array[e(262)](o),inserted:Array[e(262)](n[e(274)]())[e(266)](),moved:Array[e(262)](i)}}}const u=f;function f(t,e){const o=m();return(f=function(t,e){return o[t-=107]})(t,e)}!function(t){const e=f,o=t();for(;;)try{if(958333===-parseInt(e(143))/1*(parseInt(e(144))/2)+parseInt(e(172))/3+-parseInt(e(152))/4+parseInt(e(197))/5+parseInt(e(178))/6+parseInt(e(114))/7+-parseInt(e(179))/8*(parseInt(e(163))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(m);class d extends t.Plugin{[u(122)]=[];[u(110)]=null;[u(194)]=null;[u(135)];[u(124)];[u(107)];static get[u(185)](){return u(156)}static get[u(165)](){return!0}static get[u(141)](){return!0}constructor(t){const e=u;super(t),this[e(135)]=new l(this[e(201)][e(117)],{elementName:e(191),getElementKey:()=>e(138)}),this[e(124)]=new l(this[e(201)][e(117)],{elementName:e(167),getElementKey:t=>t[e(189)](e(145))}),this[e(107)]=new l(this[e(201)][e(117)],{elementName:e(131),getElementKey:t=>t[e(189)](e(145))})}[u(153)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(204)][t(109)](e=>{const n=t,i=o[n(204)][n(125)][n(198)]();let s=!1;return this[n(142)](e,i)&&(s=!0),this[n(206)](e,i)&&(s=!0),this[n(133)](e,i)&&(s=!0),this[n(136)](e)&&(s=!0),this[n(174)](e)&&(s=!0),this[n(159)](e)&&(s=!0),s}),this[t(171)](o[t(204)],t(164),()=>{const e=t;o[e(123)]({isUndoable:!1},t=>{this[e(199)](t)})},{priority:t(200)}),this[t(171)](n,t(119),()=>{const e=t;this[e(122)]=[],this[e(135)][e(146)](),this[e(124)][e(146)](),this[e(107)][e(146)]()},{priority:t(129)})}[u(118)](){return this[u(110)]}[u(158)](t){const e=u;return this[e(122)][e(203)](e=>e.id===t)||null}[u(150)](){const t=u;return Array[t(187)](this[t(122)])}[u(115)](){return this[u(194)]}[u(192)](t){this[u(194)]=t}[u(183)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(122)][o(173)];i++)this[o(188)](t,i)&&(n=!0);return n}[u(130)](t,e){const o=u,n=t[o(176)](o(191),{});return t[o(132)](n,e),this[o(110)]=n,n}[u(199)](t){const e=u;if(!this[e(122)][e(173)]||this[e(110)])return;const o=this[e(122)][0][e(169)][e(127)],n=this[e(130)](t,o);for(const o of this[e(122)])o[e(175)][e(195)]||t[e(148)](o[e(175)],n,e(162));this[e(183)](t)}[u(142)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(135)][o(198)](e);if(r[o(173)]&&(this[o(110)]=r[0]),i[o(173)])if(i[o(173)]>1||this[o(110)]&&i[o(151)](t=>t!==this[o(110)])){const e=t[o(176)](o(191),{}),s=[];this[o(110)]&&s[o(184)](this[o(110)]),s[o(184)](...i),t[o(148)](e,s[0],o(182));for(const n of s)t[o(155)](t[o(160)](n),t[o(137)](e,o(162))),t[o(170)](n);this[o(110)]=e,this[o(183)](t),n=!0}else this[o(110)]=i[0];if(s[o(173)]&&o(193)===this[o(110)]?.[o(127)][o(190)]){for(const e of this[o(122)])t[o(170)](e[o(169)]),n=!0;this[o(122)]=[],this[o(110)]=null}return n}[u(206)](t,e){const o=u;let n=!1;const i=this[o(201)][o(147)][o(112)](o(161)),{inserted:s,moved:r}=this[o(107)][o(198)](e);for(const e of[...r,...s]){const s=e[o(189)](o(145)),r=this[o(158)](s);r&&(r[o(175)]=e),h(t,i,e)&&(n=!0)}return n}[u(133)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(124)][o(198)](e);for(const e of i)this[o(149)](t,e)&&(n=!0);for(const e of s)this[o(154)](t,e)&&(n=!0);for(const e of r)this[o(126)](t,e)&&(n=!0);return n}[u(174)](t){const e=u;if(!this[e(110)])return!1;let o=!1;if(this[e(110)][e(113)]!==this[e(122)][e(173)]){const n=[];for(const t of this[e(110)][e(111)]()){const i=t[e(189)](e(145));this[e(158)](i)||(n[e(196)](t),o=!0)}for(const o of n)t[e(170)](o)}const n=new Set,i=[];for(const t of this[e(110)][e(111)]()){const s=t[e(189)](e(145));n[e(128)](s)?(i[e(196)](t),o=!0):n[e(116)](s)}for(const o of i)t[e(170)](o);return this[e(110)][e(113)]||(t[e(170)](this[e(110)]),this[e(110)]=null,o=!0),o}[u(154)](t,e){const o=u;if(this[o(122)][o(203)](t=>t[o(169)]===e))return!1;let n=!1;const i=e[o(189)](o(145)),s=this[o(122)][o(202)](t=>t.id===i);-1!==s&&(t[o(170)](this[o(122)][s][o(169)]),this[o(122)][o(181)](s,1),n=!0);let r=this[o(110)]?function(t,e){const n=o;for(const o of t[n(111)]())if(o[n(189)](n(145))===e)return o;return null}(this[o(110)],i):null;r||(r=t[o(176)](o(131),{footnoteId:i}),this[o(110)]&&(t[o(148)](r,this[o(110)],o(162)),n=!0));const a={id:i,reference:e,definition:r},c=p(this[o(201)][o(117)],this[o(122)],e);this[o(122)][o(181)](c,0,a);let l=c;return-1!==s&&(l=Math[o(177)](c,s)),this[o(183)](t,l)&&(n=!0),n}[u(149)](t,e){const o=u,n=this[o(122)][o(202)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(122)][n];return o(193)!==s[o(175)][o(127)][o(190)]&&(t[o(170)](s[o(175)]),i=!0),this[o(122)][o(181)](n,1),this[o(183)](t,n)&&(i=!0),i}[u(126)](t,e){const o=u,n=e[o(189)](o(145)),i=this[o(122)][o(202)](t=>t.id===n),s=this[o(122)][i];let r=!1;s[o(169)]=e,this[o(122)][o(181)](i,1);const a=p(this[o(201)][o(117)],this[o(122)],e);return this[o(122)][o(181)](a,0,s),this[o(183)](t,Math[o(177)](i,a))&&(r=!0),r}[u(188)](t,e){const o=u;if(!this[o(110)])return!1;const n=this[o(122)][e];let i;return i=this[o(194)]?this[o(194)]({footnote:n,container:this[o(110)],digits:String(this[o(122)][o(173)])[o(173)],value:e+1}):String(e+1),n[o(169)][o(189)](o(186))!=i&&(t[o(120)](o(186),i,n[o(169)]),!0)}[u(159)](t){const e=u;if(!this[e(110)]||this[e(122)][e(173)]<2)return!1;if(function(t,o){const n=e;if(t[n(173)]!==o[n(173)])return!1;for(let e=0;e<t[n(173)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(122)][e(108)](t=>t.id),Array[e(187)](this[e(110)][e(111)]())[e(108)](t=>t[e(189)](e(145)))))return!1;let o=!1;for(let n=0;n<this[e(122)][e(173)];n++){const i=this[e(122)][n],s=t[e(134)](i[e(175)]),r=t[e(137)](this[e(110)],n);s[e(168)](r)||(t[e(155)](t[e(140)](i[e(175)]),r),o=!0)}return o}[u(136)](t){const e=u;if(!this[e(122)][e(173)])return!1;const{model:o}=this[e(201)];let n=!1;for(let i=0;i<this[e(122)][e(173)]-1;i++){const s=this[e(122)][i],r=this[e(122)][i+1],a=o[e(134)](s[e(169)]),c=o[e(134)](r[e(169)]);e(205)===a[e(180)](c)&&(this[e(126)](t,s[e(169)]),i=-1,n=!0)}return n}}function h(t,e,o){const n=u;if(o[n(113)])return!1;const i=n(e?139:121);return t[n(148)](t[n(176)](i),o),!0}function p(t,e,o){const n=u;if(0===e[n(173)])return 0;const i=t[n(134)](o);for(let o=0;o<e[n(173)];o++){const s=e[o],r=t[n(134)](s[n(169)]);if(n(182)===i[n(180)](r))return o}const s=o[n(127)];let r=-1;for(let t=e[n(173)]-1;t>=0;t--)if(e[t][n(169)][n(127)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(204)][n(166)](),c=a[n(157)](s[n(190)]),l=a[c+1];if(l)for(let t=0;t<e[n(173)];t++)if(e[t][n(169)][n(127)][n(190)]===l)return t;return e[n(173)]}function m(){const t=["min","3410316liksdd","11401224LLAmgw","compareWith","splice","before","_updateFootnotesCounters","push","pluginName","footnoteCounter","from","_updateFootnoteRefCounter","getAttribute","rootName","footnotesDefinitions","setFootnoteFormatter","$graveyard","_footnoteFormatter","parent","unshift","5103665QFqXuN","getChanges","_ensureFootnotesDefinitionsContainerExists","low","editor","findIndex","find","document","after","_handleFootnoteDefinitionsChanges","_footnoteDefsTracker","map","registerPostFixer","_footnotesDefinitions","getChildren","get","childCount","6851838JUfYwH","getFootnotesFormatter","add","model","getFootnotesDefinitionsObjectElement","set","setAttribute","footnoteInlineContent","_footnotes","enqueueChange","_footnoteRefsTracker","differ","_handleMovedFootnoteReference","root","has","high","_insertEmptyFootnotesDefinitionsContainer","footnoteDefinition","append","_handleFootnoteReferencesChanges","createPositionBefore","_footnoteDefsContainerTracker","_ensureFootnotesReferencesHaveProperOrder","createPositionAt","singleton","paragraph","createRangeOn","isPremiumPlugin","_handleFootnotesDefinitionsObjectChanges","1zJaSqP","727930jayqtD","footnoteId","reset","config","insert","_handleRemoveFootnoteReferenceById","getFootnotes","some","595876XJPuvE","init","_handleInsertedFootnoteReference","move","FootnotesTracker","indexOf","getFootnote","_sortFootnoteDefinitions","createRangeIn","footnotes.multiBlock","end","9iKEoVQ","change:data","isOfficialPlugin","getRootNames","footnoteRef","isEqual","reference","remove","listenTo","985401PUPURx","length","_handleFootnotesDefinitionsObjectSync","definition","createElement"];return(m=function(){return t})()}const g=y;function w(){const t=["end","isEnabled","getItems","checkChild","length","insertObject","plugins","278433uhTkWV","footnoteRef","execute","insert-footnote-command-executed-with-invalid-id","_getPositionToInsertFootnote","document","isObject","3298743IxQCYa","341220reQbIv","949764TGlKrV","refresh","2kIxAza","change","get","222430WuXWIi","FootnotesEditing","616563stmOVs","editor","string","getFirstRange","isBlock","createElement","5517750WiTYSq","model","selection","footnoteId","_moveSelectionToFootnoteDefinition","test","56GyxJMp"];return(w=function(){return t})()}function y(t,e){const o=w();return(y=function(t,e){return o[t-=304]})(t,e)}!function(t){const e=y,o=t();for(;;)try{if(462695===-parseInt(e(327))/1*(parseInt(e(338))/2)+-parseInt(e(336))/3+parseInt(e(335))/4+parseInt(e(305))/5+parseInt(e(313))/6+-parseInt(e(334))/7+-parseInt(e(319))/8*(-parseInt(e(307))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(w);class b extends t.Command{[g(337)](){const t=g,e=this[t(308)][t(314)][t(332)][t(315)],o=this[t(331)](e);this[t(321)]=!!o}[g(329)](t){const e=g,{editor:o}=this,{model:n}=o,{selection:s}=n[e(332)],r=this[e(331)](s);if(!r)return;const a=o[e(326)][e(304)](e(306)),c=t?.[e(316)]??(0,i.uid)();!function(t){const o=e;return o(309)==typeof t&&t[o(324)]>0&&!/\s/[o(318)](t)&&!/^\d/[o(318)](t)}(c)?(0,i.logWarning)(e(330)):(n[e(339)](t=>{const o=e,i=t[o(312)](o(328),{footnoteId:c});n[o(325)](i,r,null)}),a[e(317)](c))}[g(331)](t){const e=g,{model:o}=this[e(308)],{schema:n}=o,i=t[e(310)]();for(const t of i[e(322)]())if(n[e(311)](t)||n[e(333)](t))return null;const s=i[e(320)];return n[e(323)](s,e(328))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}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=p([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[p([68,97,116,101])][p([110,111,119])](),n=t[p([101,100,105,116,111,114])],s=new(window[p([80,114,111,109,105,115,101])])(t=>{n[p([111,110,99,101])](p([114,101,97,100,121]),t)}),r={[p([107,116,121])]:p([69,67]),[p([117,115,101])]:p([115,105,103]),[p([99,114,118])]:p([80,45,50,53,54]),[p([120])]:p([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]),[p([121])]:p([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]),[p([97,108,103])]:p([69,83,50,53,54])},a=n[p([99,111,110,102,105,103])][p([103,101,116])](p([108,105,99,101,110,115,101,75,101,121]));function c(t){return t[p([115,116,97,114,116,115,87,105,116,104])](p([101,121]))?JSON[p([112,97,114,115,101])](l(t)):null}function l(t){return window[p([97,116,111,98])](t[p([114,101,112,108,97,99,101])](/-/g,p([43]))[p([114,101,112,108,97,99,101])](/_/g,p([47])))}function u(t){let e=5381;function o(t){for(let o=0;o<t[p([108,101,110,103,116,104])];o++){const n=t[p([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[p([105,115,65,114,114,97,121])](e)?e[p([102,111,114,69,97,99,104])](t):e&&typeof e==p([111,98,106,101,99,116])?Object[p([101,110,116,114,105,101,115])](e)[p([115,111,114,116])]()[p([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[p([83,116,114,105,110,103])](e))}(t),e>>>0}function f(t){return t[p([116,111,83,116,114,105,110,103])](16)[p([112,97,100,83,116,97,114,116])](8,p([48]))}function d(t){return t[p([115,112,108,105,116])]("")[p([114,101,118,101,114,115,101])]()[p([106,111,105,110])]("")}function h(){}function p(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[p([83,116,114,105,110,103])](window[p([112,101,114,102,111,114,109,97,110,99,101])][p([110,111,119])]())[p([114,101,112,108,97,99,101])](p([46]),"");let o=p([117]);for(let n=0;n<t[p([108,101,110,103,116,104])];n+=2){let i=window[p([112,97,114,115,101,73,110,116])](t[p([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[p([108,101,110,103,116,104])]&&(i-=e[p([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=p([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=p([86,97,108,105,100])&&async function(){await s,n[p([109,111,100,101,108])][p([99,104,97,110,103,101])]=h,n[p([109,111,100,101,108])][p([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,n[p([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](p([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==p([71,80,76])?p([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[p([115,112,108,105,116])](p([46]));return 3!=t[p([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=c(t);return e&&o()?e:null;function o(){const t=e[p([106,116,105])],o=window[p([112,97,114,115,101,73,110,116])](t[p([115,117,98,115,116,114,105,110,103])](t[p([108,101,110,103,116,104])]-8),16),n={...e,[p([106,116,105])]:t[p([115,117,98,115,116,114,105,110,103])](0,t[p([108,101,110,103,116,104])]-8)};return delete n[p([118,99])],u(n)==o}}}(),t?(t[p([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[p([80,114,111,109,105,115,101])])(c=>{if(r())return c(p([86,97,108,105,100]));a(),n[p([100,101,99,111,114,97,116,101])](p([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const h=(0,i.uid)();function m(t){return!!t&&(typeof t===p([111,98,106,101,99,116])||typeof t===p([102,117,110,99,116,105,111,110]))&&typeof t[p([116,104,101,110])]===p([102,117,110,99,116,105,111,110])&&typeof t[p([99,97,116,99,104])]===p([102,117,110,99,116,105,111,110])}function g(n){a(n)[p([116,104,101,110])](t=>t&&t[p([115,116,97,116,117,115])]==p([111,107])?f(u(h+e))!=t[p([118,101,114,105,102,105,99,97,116,105,111,110])]?p([85,115,97,103,101,76,105,109,105,116]):p([86,97,108,105,100]):p([85,115,97,103,101,76,105,109,105,116]))[p([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),p([86,97,108,105,100])):p(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[p([116,104,101,110])](c)[p([99,97,116,99,104])](()=>{c(p([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=p([108,108,99,116,45])+f(u(t)),n=d(f(window[p([77,97,116,104])][p([99,101,105,108])](o/i)));window[p([108,111,99,97,108,83,116,111,114,97,103,101])][p([115,101,116,73,116,101,109])](e,n)}function r(){const e=p([108,108,99,116,45])+f(u(t)),o=window[p([108,111,99,97,108,83,116,111,114,97,103,101])][p([103,101,116,73,116,101,109])](e);return o?window[p([112,97,114,115,101,73,110,116])](d(o),16)*i:null}function a(t){return new(window[p([80,114,111,109,105,115,101])])((e,o)=>{t[p([116,104,101,110])](e,o),window[p([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[p([111,110])](p([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(p([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[p([114,101,113,117,101,115,116,73,100])]:h}},{[p([112,114,105,111,114,105,116,121])]:p([104,105,103,104])}),n[p([111,110])](p([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{m(t[p([114,101,116,117,114,110])])&&(l=!0,g(t[p([114,101,116,117,114,110])]))},{[p([112,114,105,111,114,105,116,121])]:p([108,111,119])}),s[p([116,104,101,110])](()=>{l||c(p([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[p([101,100,105,116,105,110,103])][p([118,105,101,119])][p([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==p([97,117,116,111])}function a(){n[p([101,100,105,116,105,110,103])][p([118,105,101,119])][p([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=p([97,117,116,111])}}(t[p([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[p([106,116,105])])),await async function(){let t=!0;try{const n=a[p([115,112,108,105,116])](p([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=c(e);o&&o[p([97,108,103])]==p([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[p([85,105,110,116,56,65,114,114,97,121])][p([102,114,111,109])](l(n),t=>t[p([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[p([84,101,120,116,69,110,99,111,100,101,114])]))[p([101,110,99,111,100,101])](e+p([46])+o),a=window[p([99,114,121,112,116,111])][p([115,117,98,116,108,101])];if(!a)return;const c=await a[p([105,109,112,111,114,116,75,101,121])](p([106,119,107]),r,{[p([110,97,109,101])]:p([69,67,68,83,65]),[p([110,97,109,101,100,67,117,114,118,101])]:p([80,45,50,53,54])},!1,[p([118,101,114,105,102,121])]);await a[p([118,101,114,105,102,121])]({[p([110,97,109,101])]:p([69,67,68,83,65]),[p([104,97,115,104])]:{[p([110,97,109,101])]:p([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[p([102,101,97,116,117,114,101,115])];return!(!e||!e[p([105,110,99,108,117,100,101,115])](p([42]))&&!e[p([105,110,99,108,117,100,101,115])](p([70,79,79])))}()?function(){const e=[p([101,118,97,108,117,97,116,105,111,110]),p([116,114,105,97,108])][p([105,110,99,108,117,100,101,115])](t[p([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1768348800;return t[p([101,120,112])]<e}()?p([69,120,112,105,114,101,100]):function(){const e=t[p([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[p([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[p([108,111,99,97,116,105,111,110])].href);if(e[p([105,110,99,108,117,100,101,115])](o))return!0;const n=o[p([115,112,108,105,116])](p([46]));return e[p([102,105,108,116,101,114])](t=>t[p([105,110,99,108,117,100,101,115])](p([42])))[p([109,97,112])](t=>t[p([115,112,108,105,116])](p([46])))[p([102,105,108,116,101,114])](t=>t[p([108,101,110,103,116,104])]<=n[p([108,101,110,103,116,104])])[p([109,97,112])](t=>Array(n[p([108,101,110,103,116,104])]-t[p([108,101,110,103,116,104])])[p([102,105,108,108])](t[0]===p([42])?p([42]):"")[p([99,111,110,99,97,116])](t))[p([115,111,109,101])](t=>n[p([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===p([42])))}()?(t[p([108,105,99,101,110,115,101,84,121,112,101])]==p([101,118,97,108,117,97,116,105,111,110])&&(e=function(t){const e=[new(window[p([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[p([116,104,101,110])](()=>new(window[p([80,114,111,109,105,115,101])])(t=>{let e=0;n[p([109,111,100,101,108])][p([111,110])](p([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][p([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,1512==e&&(t(),o[p([111,102,102])]())})}))];return window[p([80,114,111,109,105,115,101])][p([114,97,99,101])](e)[p([116,104,101,110])](()=>t)}(p([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),await(e&&h?new(window[p([80,114,111,109,105,115,101])])((t,o)=>{e[p([116,104,101,110])](t,o),h[p([116,104,101,110])](e=>{e!=p([86,97,108,105,100])&&t(e)},o)}):e||h||p([86,97,108,105,100]))):p([68,111,109,97,105,110,76,105,109,105,116]):p([78,111,116,65,108,108,111,119,101,100]):p([73,110,118,97,108,105,100])):p([73,110,118,97,108,105,100]))}catch{return p([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).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(d).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})=>S(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(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 S(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 P=o(331);const T=L;function A(){const t=["getFootnote","cloneElement","keys","1583676Uydcgz","create","hasAttribute","string","config","sourceEditorId","contentInsertion","getAttribute","getFootnotes","_handlePasteFootnotesDefinitions","getRanges","includes","2361030qRZLOB","isPremiumPlugin","getFootnotesDefinitionsObjectElement","footnotes.multiBlock","_handleCopyFootnotesDefinitions","createElement","isOfficialPlugin","element","3300200MhcJIl","find","insert","flatMap","getFirstRange","toView","_insertEmptyFootnotesDefinitionsContainer","application/ckeditor5-footnotes","end","toData","stringify","clipboardInput","requires","document","entries","selection","FootnotesClipboard","add","from","getChildren","5609980RJBTuv","footnoteId","650736HkbuUq","push","listenTo","_defineClipboardIntegration","18iORJbG","parse","reduce","7jnWRlq","footnoteRef","footnoteInlineContent","root","editing","setData","remove","toModel","data","content","1617478QXnAly","append","outputTransformation","change","setAttribute","footnotesDefinitions","footnoteDefinition","definition","createRangeIn","htmlProcessor","80208tnJdwv","get","pluginName","editor","dataTransfer","length","1YKWXhm","method","getSelectedBlocks","init","getData","drop"];return(A=function(){return t})()}!function(t){const e=L,o=t();for(;;)try{if(828131===parseInt(e(258))/1*(parseInt(e(326))/2)+parseInt(e(336))/3+parseInt(e(287))/4+-parseInt(e(307))/5+parseInt(e(267))/6*(-parseInt(e(316))/7)+parseInt(e(309))/8+parseInt(e(313))/9*(parseInt(e(279))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(A);class D extends t.Plugin{static get[T(338)](){return T(303)}static get[T(299)](){return[v,P.ClipboardPipeline]}static get[T(285)](){return!0}static get[T(280)](){return!0}[T(261)](){this[T(312)]()}[T(312)](){const t=T;this[t(283)](),this[t(276)]()}[T(283)](){const t=T,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(337)](P.ClipboardPipeline),s=o[t(337)](d);this[t(311)](i,t(328),(o,i)=>{const r=t,a=V(n[r(334)](i[r(325)]));if(!a[r(257)])return;const c=s[r(275)](),l=a[r(315)]((t,o)=>{const n=r,i=c[n(288)](t=>t.id===o);if(i){const o=e[n(324)][n(292)](i[n(333)],{isClipboardPipeline:!0}),s=e[n(324)][n(335)][n(296)](o);t[i.id]=s}return t},Object[r(268)](null));i[r(340)][r(321)](r(294),JSON[r(297)](l))})}[T(276)](){const t=T,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(320)],r=n[t(337)](P.ClipboardPipeline),a=n[t(337)](d),c=e[t(271)][t(337)](t(282));let l=null;this[t(311)](s[t(300)],t(298),(e,o)=>{const n=t,i=o[n(340)][n(262)](n(294));l=i?JSON[n(314)](i):null}),this[t(311)](r,t(273),(n,s)=>{const r=t,u=s[r(272)]===this[r(339)].id;u&&r(263)===s[r(259)]||o[r(329)](t=>{const n=r;let f=a[n(281)]();const d=!!f&&Array[n(305)](o[n(300)][n(302)][n(260)]())[n(278)](f);if(!l&&function(t){const e=n;for(const{item:o}of t)if(o.is(e(286),e(317)))return!0;return!1}(o[n(334)](s[n(325)]))&&(l=function(t,e){const o=n,i=_(t,e);if(!i)return null;const s=Object[o(268)](null);for(const e of i[o(306)]())e.is(o(286),o(332))&&e[o(269)](o(308))&&(s[e[o(274)](o(308))]=t[o(265)](e,!0));return Object[o(266)](s)[o(257)]?s:null}(t,s[n(325)])),(f&&!d||!f&&!l)&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(334)](e))n.is(o(286),o(331))&&i[o(310)](n);for(const e of i)t[o(322)](e)}(t,s[n(325)]),!l)return;const{selection:h}=o[n(300)],p=h[n(291)]()[n(319)];f&&!d||(f=_(t,s[n(325)]),f||=a[n(293)](t,p));const m=Array[n(305)](h[n(277)]())[n(290)](V),g=function(t,e,o){const s=n,r=Object[s(268)](null);for(const{item:n}of t[s(334)](e))if(n.is(s(286),s(317))){const e=n[s(274)](s(308));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(330)](s(308),r[e],n)}return r}(t,s[n(325)],t=>{const e=n;return!u||!!a[e(264)](t)&&!m[e(278)](t)});for(const[o,i]of Object[n(301)](l)){const s=g[o]||o;let r;if(n(270)!=typeof i)r=i,s!==o&&t[n(330)](n(308),s,r);else{r=t[n(284)](n(332),{footnoteId:s});const o=e[n(324)][n(335)][n(292)](i);let a;if(c)a=e[n(324)][n(323)](o,r);else{a=t[n(284)](n(318));const i=e[n(324)][n(323)](o,a);t[n(289)](i,a)}t[n(327)](a,r)}t[n(289)](r,f,n(295))}l=null})})}}function _(t,e){const o=T;for(const{item:n}of t[o(334)](e))if(n.is(o(286),o(331)))return n;return null}function L(t,e){const o=A();return(L=function(t,e){return o[t-=257]})(t,e)}function V(t){const e=T,o=new Set;for(const{item:n}of t)n.is(e(286),e(317))&&o[e(304)](n[e(274)](e(308)));return Array[e(305)](o)}var R=o(311),O=o(355),N=o(929),K=o.n(N),j=o(297),M=o.n(j),z=o(102),W=o.n(z),U=o(123),B=o.n(U),q=o(741),J=o.n(q),H=o(728),X={attributes:{"data-cke":!0}};X.setAttributes=B(),X.insert=W().bind(null,"head"),X.domAPI=M(),X.insertStyleElement=J();K()(H.A,X);H.A&&H.A.locals&&H.A.locals;class Q 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",Y(t,R.ButtonView)),e.add("menuBar:insertFootnote",Y(t,R.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||"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"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function Y(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof R.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 G=Z;function Z(t,e){var o=tt();return(Z=function(t,e){return o[t-=141]})(t,e)}!function(t){for(var e=Z,o=t();;)try{if(860224===parseInt(e(151))/1*(parseInt(e(148))/2)+-parseInt(e(143))/3+-parseInt(e(149))/4*(parseInt(e(154))/5)+parseInt(e(144))/6+parseInt(e(152))/7+-parseInt(e(147))/8+parseInt(e(155))/9*(parseInt(e(153))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(tt);class $ extends t.Plugin{static get[G(146)](){return G(141)}static get[G(150)](){return[v,D,Q]}static get[G(142)](){return!0}static get[G(145)](){return!0}}function tt(){var t=["Footnotes","isOfficialPlugin","1415373sVlQEZ","7357134VztLSm","isPremiumPlugin","pluginName","7595808jkXYaF","10042YAsQji","6376596rxAtYx","requires","167zYQXjw","8977759bsrkUY","5284070ghYpWa","5lTntmw","9rqsmhD"];return(tt=function(){return t})()}function et(t,e){const o=nt();return(et=function(t,e){return o[t-=468]})(t,e)}const ot=et;function nt(){const t=["decimal-leading-zero","1048forjmr","upper-latin","7764SIsESk","11qCgNWj","upper-roman","65lqHORW","lower-roman","18416RVzNxh","46819152PnMVfK","decimal","lower-latin","160956gUbgXw","upper-alpha","lower-alpha","3906taGbfu","5602830EuwMQL","9aDEfRW","2329453Koetkb","35718IHpiyw"];return(nt=function(){return t})()}!function(t){const e=et,o=t();for(;;)try{if(684497===-parseInt(e(479))/1*(parseInt(e(474))/2)+parseInt(e(485))/3*(-parseInt(e(483))/4)+-parseInt(e(468))/5*(-parseInt(e(481))/6)+-parseInt(e(480))/7+-parseInt(e(470))/8*(parseInt(e(477))/9)+-parseInt(e(478))/10*(parseInt(e(486))/11)+parseInt(e(471))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(nt);const it=[ot(472),ot(482),ot(473),ot(484),ot(476),ot(475),ot(469),ot(487)],st=at;function rt(){const t=["plugins","_updateFootnotesCounters","getAttribute","341444FTVKdg","30XvisGp","execute","change","2wStUqm","includes","setAttribute","isEnabled","footnotesListStyle","1285624EcJWJu","getFootnotesDefinitionsObjectElement","6079700mRljTs","value","9OIGfVN","9535559MbWPCz","model","16204sTvZID","refresh","116578JoSWVH","2494887eZswOM","1135yPeEaD","get"];return(rt=function(){return t})()}function at(t,e){const o=rt();return(at=function(t,e){return o[t-=272]})(t,e)}!function(t){const e=at,o=t();for(;;)try{if(765724===parseInt(e(289))/1+-parseInt(e(293))/2*(parseInt(e(283))/3)+parseInt(e(280))/4*(parseInt(e(284))/5)+parseInt(e(290))/6*(-parseInt(e(282))/7)+parseInt(e(273))/8*(parseInt(e(277))/9)+-parseInt(e(275))/10+parseInt(e(278))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(rt);class ct extends t.Command{[st(281)](){const t=st,{editor:e}=this,o=e[t(286)][t(285)](d)[t(274)]();this[t(296)]=!!o,this[t(276)]=o?.[t(288)](t(272))??null}[st(291)]({value:t}){const e=st,{editor:o}=this,n=o[e(286)][e(285)](d),i=n[e(274)]();i&&it[e(294)](t)&&o[e(279)][e(292)](o=>{const s=e;o[s(295)](s(272),t,i),n[s(287)](o)})}}const lt=ft;function ut(){const t=["change","refresh","isInteger","get","getFootnotesDefinitionsObjectElement","getAttribute","24VXJzls","2749572oVuVeo","2146916tzTIHX","1085611HEeDSM","setAttribute","2589534lIBzgD","9104056Jrxefo","value","1114795Yzqvcb","plugins","3LJbpoM","isEnabled","execute","_updateFootnotesCounters","2506284JeFZKV","footnotesListStart","model"];return(ut=function(){return t})()}function ft(t,e){const o=ut();return(ft=function(t,e){return o[t-=364]})(t,e)}!function(t){const e=ft,o=t();for(;;)try{if(965659===-parseInt(e(386))/1+parseInt(e(385))/2+-parseInt(e(370))/3*(-parseInt(e(374))/4)+-parseInt(e(368))/5*(parseInt(e(383))/6)+parseInt(e(384))/7+parseInt(e(366))/8+-parseInt(e(365))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ut);class dt extends t.Command{[lt(378)](){const t=lt,{editor:e}=this,o=e[t(369)][t(380)](d)[t(381)]();this[t(371)]=!!o,this[t(367)]=o?.[t(382)](t(375))??null}[lt(372)]({value:t}){const e=lt,{editor:o}=this,n=o[e(369)][e(380)](d),i=n[e(381)]();i&&Number[e(379)](t)&&o[e(376)][e(377)](o=>{const s=e;o[s(364)](s(375),t,i),n[s(373)](o)})}}const ht=pt;function pt(t,e){const o=bt();return(pt=function(t,e){return o[t-=120]})(t,e)}!function(t){const e=pt,o=t();for(;;)try{if(981307===parseInt(e(215))/1*(-parseInt(e(134))/2)+parseInt(e(154))/3*(parseInt(e(140))/4)+-parseInt(e(142))/5*(parseInt(e(125))/6)+parseInt(e(184))/7+parseInt(e(148))/8*(parseInt(e(167))/9)+-parseInt(e(159))/10+parseInt(e(203))/11*(parseInt(e(202))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(bt);class mt extends t.Plugin{static get[ht(197)](){return ht(162)}static get[ht(193)](){return[v,d]}static get[ht(155)](){return!0}static get[ht(182)](){return!0}[ht(214)](){const t=ht,{editor:e}=this;e[t(168)][t(178)](t(194),t(198)),e[t(168)][t(178)](t(195),1),e[t(124)][t(135)](t(137),new ct(e)),e[t(124)][t(135)](t(166),new dt(e)),this[t(126)](),this[t(181)](),this[t(153)](),this[t(220)]()}[ht(126)](){const t=ht,{editor:e}=this,{schema:o}=e[t(216)];o[t(123)](t(149),{allowAttributes:[t(196),t(144)]})}[ht(181)](){const t=ht,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(160)](t(191))[t(135)](e=>{const o=t;e.on(o(188),(t,e,n)=>{const s=o,r=e[s(143)],a=e[s(189)]?.[s(147)];r[s(139)](s(192))&&a?.is(s(163),s(149))&&(function(t,e,o,n){const i=s;if(!n[i(205)](e,i(144)))return;let r=1;const a=o[i(165)][i(146)](t,{attributes:i(210)});if(a){const e=Number[i(219)](t[i(170)](i(210)),10);Number[i(187)](e)||(r=e)}!a&&e[i(207)](i(144))||o[i(171)][i(204)](i(144),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(205)](e,i(196)))return;let r=i(198),a=!1;if(o[i(165)][i(146)](t,{attributes:i(206)})){const e={1:i(198),a:i(130),A:i(158),i:i(209),I:i(212)}[t[i(170)](i(206))];e&&(r=e),a=!0}o[i(165)][i(146)](t,{styles:i(164)})&&(r=function(t){const e=i;switch(t){case e(130):return e(174);case e(158):return e(180);default:return t}}(t[i(211)](i(164))),a=!0),!a&&e[i(207)](i(196))||o[i(171)][i(204)](i(196),r,e)}(r,a,n,i))})}),o[t(160)](t(145))[t(135)](e=>{const o=t;e.on(o(157),(t,e,n)=>{const i=o;if(!n[i(165)][i(146)](e[i(132)],t[i(221)]))return;const s=gt(e[i(132)],n[i(185)]),{attributeNewValue:r}=e;null==r||1===r?n[i(171)][i(175)](i(210),s):n[i(171)][i(204)](i(210),String(r),s)}),e.on(o(120),(t,e,n)=>{const i=o;if(!n[i(165)][i(146)](e[i(132)],t[i(221)]))return;const s=gt(e[i(132)],n[i(185)]),{attributeNewValue:r}=e;r&&i(198)!==r?n[i(171)][i(208)](i(164),r,s):n[i(171)][i(217)](i(164),s)})})}[ht(220)](){const t=ht,{editor:e}=this,{model:o}=e,n=e[t(183)][t(190)](d),i=this[t(129)](),s=this[t(138)]();o[t(128)][t(218)](e=>{const r=t,a=o[r(128)][r(213)][r(133)]();let c=!1;for(const t of a){if(r(200)!==t[r(206)]||r(141)===t[r(221)])continue;const n=o[r(179)](t[r(150)][r(152)]);for(const t of n[r(201)]())t.is(r(163),r(149))&&(!t[r(207)](r(144))&&o[r(151)][r(205)](t,r(144))&&(e[r(204)](r(144),s,t),c=!0),!t[r(207)](r(196))&&o[r(151)][r(205)](t,r(196))&&(e[r(204)](r(196),i,t),c=!0))}return c&&n[r(173)](e),c})}[ht(153)](){const t=ht,{editor:e}=this;e[t(183)][t(190)](d)[t(199)](e=>this[t(156)](e))}[ht(129)](){const t=ht;return this[t(222)][t(168)][t(190)](t(194))}[ht(138)](){const t=ht;return this[t(222)][t(168)][t(190)](t(195))}[ht(156)]({container:t,value:e,digits:o}){const n=ht,i=t[n(170)](n(196)),s=t[n(170)](n(144)),r=Math[n(131)](e)+(s??1)-1;switch(i){case n(176):return function(t,e){const o=n;return String(t)[o(136)](e,"0")}(r,Math[n(177)](2,o));case n(130):case n(174):return wt(r,!1);case n(158):case n(180):return wt(r,!0);case n(209):return vt(r,!1);case n(212):return vt(r,!0);default:return String(r)}}}function gt(t,e){const o=ht,n=e[o(186)](t);return Array[o(127)](n[o(169)]())[o(122)](t=>t.is(o(163),"ol")&&t[o(139)](o(192)))}function wt(t,e){const o=ht;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(172)](97+t)+n,i=Math[o(131)]((i-1)/26)}return e?n[o(161)]():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(){const t=["removeStyle","registerPostFixer","parseInt","_definePostfixer","name","editor","attribute:footnotesListStyle:footnotesDefinitions","toLowerCase","find","extend","commands","2388yBnGvr","_defineSchema","from","document","_getDefaultListStyle","lower-alpha","floor","item","getChanges","46lQpDuw","add","padStart","footnotesStyle","_getDefaultStartIndex","hasClass","28AuUOMK","$text","5275QiJPst","viewItem","footnotesListStart","downcast","consume","parent","6936izkgpz","footnotesDefinitions","position","schema","nodeAfter","_defineFormatter","394737oJXSlv","isOfficialPlugin","_formatFootnoteListValue","attribute:footnotesListStart:footnotesDefinitions","upper-alpha","15785370LhZugj","for","toUpperCase","FootnotesPropertiesEditing","element","list-style-type","consumable","footnotesStart","18918pTuweR","config","getChildren","getAttribute","writer","fromCharCode","_updateFootnotesCounters","lower-latin","removeAttribute","decimal-leading-zero","max","define","createRangeOn","upper-latin","_defineConverters","isPremiumPlugin","plugins","5410307kWSpHs","mapper","toViewElement","isNaN","element:ol","modelCursor","get","upcast","footnotes-list","requires","footnotes.footnotesProperties.defaultListStyle","footnotes.footnotesProperties.defaultStartIndex","footnotesListStyle","pluginName","decimal","setFootnoteFormatter","insert","getItems","906420piIsfQ","187eCPGjd","setAttribute","checkAttribute","type","hasAttribute","setStyle","lower-roman","start","getStyle","upper-roman","differ","init","79163UnMWwV","model"];return(bt=function(){return t})()}function vt(t,e){const o=ht;let n="",i=t;for(const{value:t,numeral:e}of yt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(121)]()}class It extends R.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new R.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new R.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,R.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 R.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 R.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 R.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 R.LabeledFieldView(this.locale,R.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 kt=o(291),Ct={attributes:{"data-cke":!0}};Ct.setAttributes=B(),Ct.insert=W().bind(null,"head"),Ct.domAPI=M(),Ct.insertStyleElement=J();K()(kt.A,Ct);kt.A&&kt.A.locals&&kt.A.locals;class Ft extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[R.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,R.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 R.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 It(t.locale,{styleGridAriaLabel:n,styleButtonViews:i}),r=t.commands.get("footnotesStart");return s.startIndexFieldView.bind("isEnabled").to(r),s.startIndexFieldView.fieldView.bind("value").to(r),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s.delegate("execute").to(e),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}=R.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 xt=St;function Et(){var t=["78962rPgtyx","pluginName","161184VLXaWD","902718FnzaQn","3932580jpxsYk","24eEuxhg","2922KZqJQF","35021dPjyqt","requires","18Uwokgh","FootnotesProperties","344gxrNKd","168615hFpaJx","isPremiumPlugin","isOfficialPlugin"];return(Et=function(){return t})()}function St(t,e){var o=Et();return(St=function(t,e){return o[t-=164]})(t,e)}!function(t){for(var e=St,o=t();;)try{if(128508===parseInt(e(176))/1+-parseInt(e(172))/2*(parseInt(e(167))/3)+parseInt(e(178))/4+parseInt(e(173))/5*(-parseInt(e(170))/6)+-parseInt(e(168))/7*(parseInt(e(166))/8)+-parseInt(e(164))/9+parseInt(e(165))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Et);class Pt extends t.Plugin{static get[xt(177)](){return xt(171)}static get[xt(169)](){return[mt,Ft]}static get[xt(175)](){return!0}static get[xt(174)](){return!0}}function Tt(t,e){var o=At();return(Tt=function(t,e){return o[t-=371]})(t,e)}function At(){var t=["2182146rwhpmI","216498AgVZaW","5125764ZouscI","11SquqzX","6nswLGq","1137224dlUgzZ","734820InmtzT","5427185iAuLGp","9RaMtxU","1877664YRvMJr"];return(At=function(){return t})()}!function(t){for(var e=Tt,o=t();;)try{if(669281===parseInt(e(372))/1*(-parseInt(e(380))/2)+parseInt(e(379))/3+-parseInt(e(378))/4+parseInt(e(376))/5*(parseInt(e(373))/6)+parseInt(e(371))/7+parseInt(e(374))/8*(-parseInt(e(377))/9)+-parseInt(e(375))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(At)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
5
+ */(()=>{var t={102: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)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),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},297: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)}}}},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")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},728:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),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},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779: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}},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")},929: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}}}},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:()=>$,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>St,FootnotesPropertiesEditing:()=>mt,FootnotesPropertiesUI:()=>Ft,FootnotesStartCommand:()=>ft,FootnotesStyleCommand:()=>ct,FootnotesTracker:()=>d,FootnotesUI:()=>Y,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);const r=a;function a(t,e){const o=c();return(a=function(t,e){return o[t-=252]})(t,e)}function c(){const t=["426uhQFzV","24016NbITqf","flat","name","_model","has","slice","root","element","$text","values","remove","insert","_getElementKey","elementName","173954RYZYRJ","506992eDIaTP","12rVgxsW","delete","22455158wXvuzx","78205NDiAml","get","nodeAfter","$graveyard","getItems","7930260ULDDAs","_elementName","type","position","attributes","set","length","createRangeOn","10Qhkocc","42VtqCmk","_trackedElements","rootName","798MkmcOz","add","373022WQKyaY","getElementKey","push","getChanges","reset","from","clear"];return(c=function(){return t})()}!function(t){const e=a,o=t();for(;;)try{if(806548===-parseInt(e(257))/1+-parseInt(e(279))/2+-parseInt(e(255))/3*(-parseInt(e(265))/4)+-parseInt(e(284))/5*(parseInt(e(264))/6)+parseInt(e(252))/7*(-parseInt(e(280))/8)+parseInt(e(289))/9*(-parseInt(e(297))/10)+parseInt(e(283))/11*(parseInt(e(281))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(c);class l{[r(268)];[r(290)];[r(277)];[r(253)]=new Map;constructor(t,e){const o=r;this[o(268)]=t,this[o(290)]=e[o(278)],this[o(277)]=e[o(258)]}[r(261)](){const t=r;this[t(253)][t(263)]()}[r(260)](t){const e=r,o=new Set,n=new Map;for(const i of t){if(e(276)===i[e(291)]&&e(273)!==i[e(267)]&&i[e(292)][e(286)]){const t=this[e(268)][e(296)](i[e(292)][e(286)]);for(const o of t[e(288)]()){if(!o.is(e(272),this[e(290)]))continue;const t=this[e(277)](o);n[e(269)](t)||n[e(294)](t,[]),n[e(285)](t)[e(259)](o)}}if(e(275)===i[e(291)]&&i[e(267)]===this[e(290)]){const t=this[e(277)]({getAttribute:t=>i[e(293)][e(285)](t)});o[e(256)](t)}}for(const[t,n]of this[e(253)])e(287)===n[e(271)][e(254)]&&o[e(256)](t);for(const t of o)this[e(253)][e(282)](t);for(const[t,o]of n)this[e(253)][e(294)](t,o[o[e(295)]-1]);const i=new Set;for(const[t,s]of n)o[e(269)](t)&&(i[e(256)](s[0]),s[e(295)]>1?n[e(294)](t,s[e(270)](1)):n[e(282)](t),o[e(282)](t));return{removed:Array[e(262)](o),inserted:Array[e(262)](n[e(274)]())[e(266)](),moved:Array[e(262)](i)}}}const u=f;function f(t,e){const o=m();return(f=function(t,e){return o[t-=107]})(t,e)}!function(t){const e=f,o=t();for(;;)try{if(958333===-parseInt(e(143))/1*(parseInt(e(144))/2)+parseInt(e(172))/3+-parseInt(e(152))/4+parseInt(e(197))/5+parseInt(e(178))/6+parseInt(e(114))/7+-parseInt(e(179))/8*(parseInt(e(163))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(m);class d extends t.Plugin{[u(122)]=[];[u(110)]=null;[u(194)]=null;[u(135)];[u(124)];[u(107)];static get[u(185)](){return u(156)}static get[u(165)](){return!0}static get[u(141)](){return!0}constructor(t){const e=u;super(t),this[e(135)]=new l(this[e(201)][e(117)],{elementName:e(191),getElementKey:()=>e(138)}),this[e(124)]=new l(this[e(201)][e(117)],{elementName:e(167),getElementKey:t=>t[e(189)](e(145))}),this[e(107)]=new l(this[e(201)][e(117)],{elementName:e(131),getElementKey:t=>t[e(189)](e(145))})}[u(153)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(204)][t(109)](e=>{const n=t,i=o[n(204)][n(125)][n(198)]();let s=!1;return this[n(142)](e,i)&&(s=!0),this[n(206)](e,i)&&(s=!0),this[n(133)](e,i)&&(s=!0),this[n(136)](e)&&(s=!0),this[n(174)](e)&&(s=!0),this[n(159)](e)&&(s=!0),s}),this[t(171)](o[t(204)],t(164),()=>{const e=t;o[e(123)]({isUndoable:!1},t=>{this[e(199)](t)})},{priority:t(200)}),this[t(171)](n,t(119),()=>{const e=t;this[e(122)]=[],this[e(135)][e(146)](),this[e(124)][e(146)](),this[e(107)][e(146)]()},{priority:t(129)})}[u(118)](){return this[u(110)]}[u(158)](t){const e=u;return this[e(122)][e(203)](e=>e.id===t)||null}[u(150)](){const t=u;return Array[t(187)](this[t(122)])}[u(115)](){return this[u(194)]}[u(192)](t){this[u(194)]=t}[u(183)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(122)][o(173)];i++)this[o(188)](t,i)&&(n=!0);return n}[u(130)](t,e){const o=u,n=t[o(176)](o(191),{});return t[o(132)](n,e),this[o(110)]=n,n}[u(199)](t){const e=u;if(!this[e(122)][e(173)]||this[e(110)])return;const o=this[e(122)][0][e(169)][e(127)],n=this[e(130)](t,o);for(const o of this[e(122)])o[e(175)][e(195)]||t[e(148)](o[e(175)],n,e(162));this[e(183)](t)}[u(142)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(135)][o(198)](e);if(r[o(173)]&&(this[o(110)]=r[0]),i[o(173)])if(i[o(173)]>1||this[o(110)]&&i[o(151)](t=>t!==this[o(110)])){const e=t[o(176)](o(191),{}),s=[];this[o(110)]&&s[o(184)](this[o(110)]),s[o(184)](...i),t[o(148)](e,s[0],o(182));for(const n of s)t[o(155)](t[o(160)](n),t[o(137)](e,o(162))),t[o(170)](n);this[o(110)]=e,this[o(183)](t),n=!0}else this[o(110)]=i[0];if(s[o(173)]&&o(193)===this[o(110)]?.[o(127)][o(190)]){for(const e of this[o(122)])t[o(170)](e[o(169)]),n=!0;this[o(122)]=[],this[o(110)]=null}return n}[u(206)](t,e){const o=u;let n=!1;const i=this[o(201)][o(147)][o(112)](o(161)),{inserted:s,moved:r}=this[o(107)][o(198)](e);for(const e of[...r,...s]){const s=e[o(189)](o(145)),r=this[o(158)](s);r&&(r[o(175)]=e),h(t,i,e)&&(n=!0)}return n}[u(133)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(124)][o(198)](e);for(const e of i)this[o(149)](t,e)&&(n=!0);for(const e of s)this[o(154)](t,e)&&(n=!0);for(const e of r)this[o(126)](t,e)&&(n=!0);return n}[u(174)](t){const e=u;if(!this[e(110)])return!1;let o=!1;if(this[e(110)][e(113)]!==this[e(122)][e(173)]){const n=[];for(const t of this[e(110)][e(111)]()){const i=t[e(189)](e(145));this[e(158)](i)||(n[e(196)](t),o=!0)}for(const o of n)t[e(170)](o)}const n=new Set,i=[];for(const t of this[e(110)][e(111)]()){const s=t[e(189)](e(145));n[e(128)](s)?(i[e(196)](t),o=!0):n[e(116)](s)}for(const o of i)t[e(170)](o);return this[e(110)][e(113)]||(t[e(170)](this[e(110)]),this[e(110)]=null,o=!0),o}[u(154)](t,e){const o=u;if(this[o(122)][o(203)](t=>t[o(169)]===e))return!1;let n=!1;const i=e[o(189)](o(145)),s=this[o(122)][o(202)](t=>t.id===i);-1!==s&&(t[o(170)](this[o(122)][s][o(169)]),this[o(122)][o(181)](s,1),n=!0);let r=this[o(110)]?function(t,e){const n=o;for(const o of t[n(111)]())if(o[n(189)](n(145))===e)return o;return null}(this[o(110)],i):null;r||(r=t[o(176)](o(131),{footnoteId:i}),this[o(110)]&&(t[o(148)](r,this[o(110)],o(162)),n=!0));const a={id:i,reference:e,definition:r},c=p(this[o(201)][o(117)],this[o(122)],e);this[o(122)][o(181)](c,0,a);let l=c;return-1!==s&&(l=Math[o(177)](c,s)),this[o(183)](t,l)&&(n=!0),n}[u(149)](t,e){const o=u,n=this[o(122)][o(202)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(122)][n];return o(193)!==s[o(175)][o(127)][o(190)]&&(t[o(170)](s[o(175)]),i=!0),this[o(122)][o(181)](n,1),this[o(183)](t,n)&&(i=!0),i}[u(126)](t,e){const o=u,n=e[o(189)](o(145)),i=this[o(122)][o(202)](t=>t.id===n),s=this[o(122)][i];let r=!1;s[o(169)]=e,this[o(122)][o(181)](i,1);const a=p(this[o(201)][o(117)],this[o(122)],e);return this[o(122)][o(181)](a,0,s),this[o(183)](t,Math[o(177)](i,a))&&(r=!0),r}[u(188)](t,e){const o=u;if(!this[o(110)])return!1;const n=this[o(122)][e];let i;return i=this[o(194)]?this[o(194)]({footnote:n,container:this[o(110)],digits:String(this[o(122)][o(173)])[o(173)],value:e+1}):String(e+1),n[o(169)][o(189)](o(186))!=i&&(t[o(120)](o(186),i,n[o(169)]),!0)}[u(159)](t){const e=u;if(!this[e(110)]||this[e(122)][e(173)]<2)return!1;if(function(t,o){const n=e;if(t[n(173)]!==o[n(173)])return!1;for(let e=0;e<t[n(173)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(122)][e(108)](t=>t.id),Array[e(187)](this[e(110)][e(111)]())[e(108)](t=>t[e(189)](e(145)))))return!1;let o=!1;for(let n=0;n<this[e(122)][e(173)];n++){const i=this[e(122)][n],s=t[e(134)](i[e(175)]),r=t[e(137)](this[e(110)],n);s[e(168)](r)||(t[e(155)](t[e(140)](i[e(175)]),r),o=!0)}return o}[u(136)](t){const e=u;if(!this[e(122)][e(173)])return!1;const{model:o}=this[e(201)];let n=!1;for(let i=0;i<this[e(122)][e(173)]-1;i++){const s=this[e(122)][i],r=this[e(122)][i+1],a=o[e(134)](s[e(169)]),c=o[e(134)](r[e(169)]);e(205)===a[e(180)](c)&&(this[e(126)](t,s[e(169)]),i=-1,n=!0)}return n}}function h(t,e,o){const n=u;if(o[n(113)])return!1;const i=n(e?139:121);return t[n(148)](t[n(176)](i),o),!0}function p(t,e,o){const n=u;if(0===e[n(173)])return 0;const i=t[n(134)](o);for(let o=0;o<e[n(173)];o++){const s=e[o],r=t[n(134)](s[n(169)]);if(n(182)===i[n(180)](r))return o}const s=o[n(127)];let r=-1;for(let t=e[n(173)]-1;t>=0;t--)if(e[t][n(169)][n(127)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(204)][n(166)](),c=a[n(157)](s[n(190)]),l=a[c+1];if(l)for(let t=0;t<e[n(173)];t++)if(e[t][n(169)][n(127)][n(190)]===l)return t;return e[n(173)]}function m(){const t=["min","3410316liksdd","11401224LLAmgw","compareWith","splice","before","_updateFootnotesCounters","push","pluginName","footnoteCounter","from","_updateFootnoteRefCounter","getAttribute","rootName","footnotesDefinitions","setFootnoteFormatter","$graveyard","_footnoteFormatter","parent","unshift","5103665QFqXuN","getChanges","_ensureFootnotesDefinitionsContainerExists","low","editor","findIndex","find","document","after","_handleFootnoteDefinitionsChanges","_footnoteDefsTracker","map","registerPostFixer","_footnotesDefinitions","getChildren","get","childCount","6851838JUfYwH","getFootnotesFormatter","add","model","getFootnotesDefinitionsObjectElement","set","setAttribute","footnoteInlineContent","_footnotes","enqueueChange","_footnoteRefsTracker","differ","_handleMovedFootnoteReference","root","has","high","_insertEmptyFootnotesDefinitionsContainer","footnoteDefinition","append","_handleFootnoteReferencesChanges","createPositionBefore","_footnoteDefsContainerTracker","_ensureFootnotesReferencesHaveProperOrder","createPositionAt","singleton","paragraph","createRangeOn","isPremiumPlugin","_handleFootnotesDefinitionsObjectChanges","1zJaSqP","727930jayqtD","footnoteId","reset","config","insert","_handleRemoveFootnoteReferenceById","getFootnotes","some","595876XJPuvE","init","_handleInsertedFootnoteReference","move","FootnotesTracker","indexOf","getFootnote","_sortFootnoteDefinitions","createRangeIn","footnotes.multiBlock","end","9iKEoVQ","change:data","isOfficialPlugin","getRootNames","footnoteRef","isEqual","reference","remove","listenTo","985401PUPURx","length","_handleFootnotesDefinitionsObjectSync","definition","createElement"];return(m=function(){return t})()}const g=w;function w(t,e){const o=y();return(w=function(t,e){return o[t-=307]})(t,e)}function y(){const t=["5PbPYgt","document","createElement","footnoteRef","refresh","179484rbjGrP","get","editor","72wzdTwg","10vkExOa","400TcDrmf","48201zfACfh","isObject","checkChild","test","5616128WoaYcv","3412926eIJPvr","35KfToMC","insert-footnote-command-executed-with-invalid-id","end","isEnabled","change","selection","17883JEFvVu","2879252QcdWpR","plugins","getItems","_getPositionToInsertFootnote","execute","isBlock","FootnotesEditing","1656498aqwSlk","insertObject","length","model","getFirstRange","string","footnoteId","_moveSelectionToFootnoteDefinition"];return(y=function(){return t})()}!function(t){const e=w,o=t();for(;;)try{if(762019===-parseInt(e(321))/1+-parseInt(e(325))/2*(-parseInt(e(327))/3)+-parseInt(e(340))/4*(-parseInt(e(316))/5)+parseInt(e(308))/6*(parseInt(e(333))/7)+parseInt(e(331))/8+-parseInt(e(339))/9*(parseInt(e(326))/10)+-parseInt(e(332))/11*(parseInt(e(324))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(y);class b extends t.Command{[g(320)](){const t=g,e=this[t(323)][t(311)][t(317)][t(338)],o=this[t(343)](e);this[t(336)]=!!o}[g(344)](t){const e=g,{editor:o}=this,{model:n}=o,{selection:s}=n[e(317)],r=this[e(343)](s);if(!r)return;const a=o[e(341)][e(322)](e(307)),c=t?.[e(314)]??(0,i.uid)();!function(t){const o=e;return o(313)==typeof t&&t[o(310)]>0&&!/\s/[o(330)](t)&&!/^\d/[o(330)](t)}(c)?(0,i.logWarning)(e(334)):(n[e(337)](t=>{const o=e,i=t[o(318)](o(319),{footnoteId:c});n[o(309)](i,r,null)}),a[e(315)](c))}[g(343)](t){const e=g,{model:o}=this[e(323)],{schema:n}=o,i=t[e(312)]();for(const t of i[e(342)]())if(n[e(345)](t)||n[e(328)](t))return null;const s=i[e(335)];return n[e(329)](s,e(319))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}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=p([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[p([68,97,116,101])][p([110,111,119])](),n=t[p([101,100,105,116,111,114])],s=new(window[p([80,114,111,109,105,115,101])])(t=>{n[p([111,110,99,101])](p([114,101,97,100,121]),t)}),r={[p([107,116,121])]:p([69,67]),[p([117,115,101])]:p([115,105,103]),[p([99,114,118])]:p([80,45,50,53,54]),[p([120])]:p([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]),[p([121])]:p([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]),[p([97,108,103])]:p([69,83,50,53,54])},a=n[p([99,111,110,102,105,103])][p([103,101,116])](p([108,105,99,101,110,115,101,75,101,121]));function c(t){return t[p([115,116,97,114,116,115,87,105,116,104])](p([101,121]))?JSON[p([112,97,114,115,101])](l(t)):null}function l(t){return window[p([97,116,111,98])](t[p([114,101,112,108,97,99,101])](/-/g,p([43]))[p([114,101,112,108,97,99,101])](/_/g,p([47])))}function u(t){let e=5381;function o(t){for(let o=0;o<t[p([108,101,110,103,116,104])];o++){const n=t[p([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[p([105,115,65,114,114,97,121])](e)?e[p([102,111,114,69,97,99,104])](t):e&&typeof e==p([111,98,106,101,99,116])?Object[p([101,110,116,114,105,101,115])](e)[p([115,111,114,116])]()[p([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[p([83,116,114,105,110,103])](e))}(t),e>>>0}function f(t){return t[p([116,111,83,116,114,105,110,103])](16)[p([112,97,100,83,116,97,114,116])](8,p([48]))}function d(t){return t[p([115,112,108,105,116])]("")[p([114,101,118,101,114,115,101])]()[p([106,111,105,110])]("")}function h(){}function p(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[p([83,116,114,105,110,103])](window[p([112,101,114,102,111,114,109,97,110,99,101])][p([110,111,119])]())[p([114,101,112,108,97,99,101])](p([46]),"");let o=p([117]);for(let n=0;n<t[p([108,101,110,103,116,104])];n+=2){let i=window[p([112,97,114,115,101,73,110,116])](t[p([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[p([108,101,110,103,116,104])]&&(i-=e[p([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=p([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=p([86,97,108,105,100])&&async function(){await s,n[p([109,111,100,101,108])][p([99,104,97,110,103,101])]=h,n[p([109,111,100,101,108])][p([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,n[p([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](p([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==p([71,80,76])?p([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[p([115,112,108,105,116])](p([46]));return 3!=t[p([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=c(t);return e&&o()?e:null;function o(){const t=e[p([106,116,105])],o=window[p([112,97,114,115,101,73,110,116])](t[p([115,117,98,115,116,114,105,110,103])](t[p([108,101,110,103,116,104])]-8),16),n={...e,[p([106,116,105])]:t[p([115,117,98,115,116,114,105,110,103])](0,t[p([108,101,110,103,116,104])]-8)};return delete n[p([118,99])],u(n)==o}}}(),t?(t[p([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[p([80,114,111,109,105,115,101])])(c=>{if(r())return c(p([86,97,108,105,100]));a(),n[p([100,101,99,111,114,97,116,101])](p([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const h=(0,i.uid)();function m(t){return!!t&&(typeof t===p([111,98,106,101,99,116])||typeof t===p([102,117,110,99,116,105,111,110]))&&typeof t[p([116,104,101,110])]===p([102,117,110,99,116,105,111,110])&&typeof t[p([99,97,116,99,104])]===p([102,117,110,99,116,105,111,110])}function g(n){a(n)[p([116,104,101,110])](t=>t&&t[p([115,116,97,116,117,115])]==p([111,107])?f(u(h+e))!=t[p([118,101,114,105,102,105,99,97,116,105,111,110])]?p([85,115,97,103,101,76,105,109,105,116]):p([86,97,108,105,100]):p([85,115,97,103,101,76,105,109,105,116]))[p([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),p([86,97,108,105,100])):p(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[p([116,104,101,110])](c)[p([99,97,116,99,104])](()=>{c(p([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=p([108,108,99,116,45])+f(u(t)),n=d(f(window[p([77,97,116,104])][p([99,101,105,108])](o/i)));window[p([108,111,99,97,108,83,116,111,114,97,103,101])][p([115,101,116,73,116,101,109])](e,n)}function r(){const e=p([108,108,99,116,45])+f(u(t)),o=window[p([108,111,99,97,108,83,116,111,114,97,103,101])][p([103,101,116,73,116,101,109])](e);return o?window[p([112,97,114,115,101,73,110,116])](d(o),16)*i:null}function a(t){return new(window[p([80,114,111,109,105,115,101])])((e,o)=>{t[p([116,104,101,110])](e,o),window[p([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[p([111,110])](p([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(p([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[p([114,101,113,117,101,115,116,73,100])]:h}},{[p([112,114,105,111,114,105,116,121])]:p([104,105,103,104])}),n[p([111,110])](p([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{m(t[p([114,101,116,117,114,110])])&&(l=!0,g(t[p([114,101,116,117,114,110])]))},{[p([112,114,105,111,114,105,116,121])]:p([108,111,119])}),s[p([116,104,101,110])](()=>{l||c(p([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[p([101,100,105,116,105,110,103])][p([118,105,101,119])][p([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==p([97,117,116,111])}function a(){n[p([101,100,105,116,105,110,103])][p([118,105,101,119])][p([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=p([97,117,116,111])}}(t[p([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[p([106,116,105])])),await async function(){let t=!0;try{const n=a[p([115,112,108,105,116])](p([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=c(e);o&&o[p([97,108,103])]==p([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[p([85,105,110,116,56,65,114,114,97,121])][p([102,114,111,109])](l(n),t=>t[p([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[p([84,101,120,116,69,110,99,111,100,101,114])]))[p([101,110,99,111,100,101])](e+p([46])+o),a=window[p([99,114,121,112,116,111])][p([115,117,98,116,108,101])];if(!a)return;const c=await a[p([105,109,112,111,114,116,75,101,121])](p([106,119,107]),r,{[p([110,97,109,101])]:p([69,67,68,83,65]),[p([110,97,109,101,100,67,117,114,118,101])]:p([80,45,50,53,54])},!1,[p([118,101,114,105,102,121])]);await a[p([118,101,114,105,102,121])]({[p([110,97,109,101])]:p([69,67,68,83,65]),[p([104,97,115,104])]:{[p([110,97,109,101])]:p([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[p([102,101,97,116,117,114,101,115])];return!(!e||!e[p([105,110,99,108,117,100,101,115])](p([42]))&&!e[p([105,110,99,108,117,100,101,115])](p([70,79,79])))}()?function(){const e=[p([101,118,97,108,117,97,116,105,111,110]),p([116,114,105,97,108])][p([105,110,99,108,117,100,101,115])](t[p([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1768348800;return t[p([101,120,112])]<e}()?p([69,120,112,105,114,101,100]):function(){const e=t[p([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[p([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[p([108,111,99,97,116,105,111,110])].href);if(e[p([105,110,99,108,117,100,101,115])](o))return!0;const n=o[p([115,112,108,105,116])](p([46]));return e[p([102,105,108,116,101,114])](t=>t[p([105,110,99,108,117,100,101,115])](p([42])))[p([109,97,112])](t=>t[p([115,112,108,105,116])](p([46])))[p([102,105,108,116,101,114])](t=>t[p([108,101,110,103,116,104])]<=n[p([108,101,110,103,116,104])])[p([109,97,112])](t=>Array(n[p([108,101,110,103,116,104])]-t[p([108,101,110,103,116,104])])[p([102,105,108,108])](t[0]===p([42])?p([42]):"")[p([99,111,110,99,97,116])](t))[p([115,111,109,101])](t=>n[p([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===p([42])))}()?(t[p([108,105,99,101,110,115,101,84,121,112,101])]==p([101,118,97,108,117,97,116,105,111,110])&&(e=function(t){const e=[new(window[p([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[p([116,104,101,110])](()=>new(window[p([80,114,111,109,105,115,101])])(t=>{let e=0;n[p([109,111,100,101,108])][p([111,110])](p([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][p([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,1512==e&&(t(),o[p([111,102,102])]())})}))];return window[p([80,114,111,109,105,115,101])][p([114,97,99,101])](e)[p([116,104,101,110])](()=>t)}(p([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),await(e&&h?new(window[p([80,114,111,109,105,115,101])])((t,o)=>{e[p([116,104,101,110])](t,o),h[p([116,104,101,110])](e=>{e!=p([86,97,108,105,100])&&t(e)},o)}):e||h||p([86,97,108,105,100]))):p([68,111,109,97,105,110,76,105,109,105,116]):p([78,111,116,65,108,108,111,119,101,100]):p([73,110,118,97,108,105,100])):p([73,110,118,97,108,105,100]))}catch{return p([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).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(d).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 S=o(331);const T=L;function A(){const t=["getFootnote","cloneElement","keys","1583676Uydcgz","create","hasAttribute","string","config","sourceEditorId","contentInsertion","getAttribute","getFootnotes","_handlePasteFootnotesDefinitions","getRanges","includes","2361030qRZLOB","isPremiumPlugin","getFootnotesDefinitionsObjectElement","footnotes.multiBlock","_handleCopyFootnotesDefinitions","createElement","isOfficialPlugin","element","3300200MhcJIl","find","insert","flatMap","getFirstRange","toView","_insertEmptyFootnotesDefinitionsContainer","application/ckeditor5-footnotes","end","toData","stringify","clipboardInput","requires","document","entries","selection","FootnotesClipboard","add","from","getChildren","5609980RJBTuv","footnoteId","650736HkbuUq","push","listenTo","_defineClipboardIntegration","18iORJbG","parse","reduce","7jnWRlq","footnoteRef","footnoteInlineContent","root","editing","setData","remove","toModel","data","content","1617478QXnAly","append","outputTransformation","change","setAttribute","footnotesDefinitions","footnoteDefinition","definition","createRangeIn","htmlProcessor","80208tnJdwv","get","pluginName","editor","dataTransfer","length","1YKWXhm","method","getSelectedBlocks","init","getData","drop"];return(A=function(){return t})()}!function(t){const e=L,o=t();for(;;)try{if(828131===parseInt(e(258))/1*(parseInt(e(326))/2)+parseInt(e(336))/3+parseInt(e(287))/4+-parseInt(e(307))/5+parseInt(e(267))/6*(-parseInt(e(316))/7)+parseInt(e(309))/8+parseInt(e(313))/9*(parseInt(e(279))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(A);class D extends t.Plugin{static get[T(338)](){return T(303)}static get[T(299)](){return[v,S.ClipboardPipeline]}static get[T(285)](){return!0}static get[T(280)](){return!0}[T(261)](){this[T(312)]()}[T(312)](){const t=T;this[t(283)](),this[t(276)]()}[T(283)](){const t=T,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(337)](S.ClipboardPipeline),s=o[t(337)](d);this[t(311)](i,t(328),(o,i)=>{const r=t,a=V(n[r(334)](i[r(325)]));if(!a[r(257)])return;const c=s[r(275)](),l=a[r(315)]((t,o)=>{const n=r,i=c[n(288)](t=>t.id===o);if(i){const o=e[n(324)][n(292)](i[n(333)],{isClipboardPipeline:!0}),s=e[n(324)][n(335)][n(296)](o);t[i.id]=s}return t},Object[r(268)](null));i[r(340)][r(321)](r(294),JSON[r(297)](l))})}[T(276)](){const t=T,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(320)],r=n[t(337)](S.ClipboardPipeline),a=n[t(337)](d),c=e[t(271)][t(337)](t(282));let l=null;this[t(311)](s[t(300)],t(298),(e,o)=>{const n=t,i=o[n(340)][n(262)](n(294));l=i?JSON[n(314)](i):null}),this[t(311)](r,t(273),(n,s)=>{const r=t,u=s[r(272)]===this[r(339)].id;u&&r(263)===s[r(259)]||o[r(329)](t=>{const n=r;let f=a[n(281)]();const d=!!f&&Array[n(305)](o[n(300)][n(302)][n(260)]())[n(278)](f);if(!l&&function(t){const e=n;for(const{item:o}of t)if(o.is(e(286),e(317)))return!0;return!1}(o[n(334)](s[n(325)]))&&(l=function(t,e){const o=n,i=_(t,e);if(!i)return null;const s=Object[o(268)](null);for(const e of i[o(306)]())e.is(o(286),o(332))&&e[o(269)](o(308))&&(s[e[o(274)](o(308))]=t[o(265)](e,!0));return Object[o(266)](s)[o(257)]?s:null}(t,s[n(325)])),(f&&!d||!f&&!l)&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(334)](e))n.is(o(286),o(331))&&i[o(310)](n);for(const e of i)t[o(322)](e)}(t,s[n(325)]),!l)return;const{selection:h}=o[n(300)],p=h[n(291)]()[n(319)];f&&!d||(f=_(t,s[n(325)]),f||=a[n(293)](t,p));const m=Array[n(305)](h[n(277)]())[n(290)](V),g=function(t,e,o){const s=n,r=Object[s(268)](null);for(const{item:n}of t[s(334)](e))if(n.is(s(286),s(317))){const e=n[s(274)](s(308));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(330)](s(308),r[e],n)}return r}(t,s[n(325)],t=>{const e=n;return!u||!!a[e(264)](t)&&!m[e(278)](t)});for(const[o,i]of Object[n(301)](l)){const s=g[o]||o;let r;if(n(270)!=typeof i)r=i,s!==o&&t[n(330)](n(308),s,r);else{r=t[n(284)](n(332),{footnoteId:s});const o=e[n(324)][n(335)][n(292)](i);let a;if(c)a=e[n(324)][n(323)](o,r);else{a=t[n(284)](n(318));const i=e[n(324)][n(323)](o,a);t[n(289)](i,a)}t[n(327)](a,r)}t[n(289)](r,f,n(295))}l=null})})}}function _(t,e){const o=T;for(const{item:n}of t[o(334)](e))if(n.is(o(286),o(331)))return n;return null}function L(t,e){const o=A();return(L=function(t,e){return o[t-=257]})(t,e)}function V(t){const e=T,o=new Set;for(const{item:n}of t)n.is(e(286),e(317))&&o[e(304)](n[e(274)](e(308)));return Array[e(305)](o)}var R=o(311),N=o(355),O=o(929),K=o.n(O),j=o(297),M=o.n(j),z=o(102),U=o.n(z),B=o(123),W=o.n(B),q=o(741),J=o.n(q),H=o(728),X={attributes:{"data-cke":!0}};X.setAttributes=W(),X.insert=U().bind(null,"head"),X.domAPI=M(),X.insertStyleElement=J();K()(H.A,X);H.A&&H.A.locals&&H.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",Q(t,R.ButtonView)),e.add("menuBar:insertFootnote",Q(t,R.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||"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"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function Q(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof R.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:N.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}var Z=G;function G(t,e){var o=tt();return(G=function(t,e){return o[t-=141]})(t,e)}!function(t){for(var e=G,o=t();;)try{if(860224===parseInt(e(151))/1*(parseInt(e(148))/2)+-parseInt(e(143))/3+-parseInt(e(149))/4*(parseInt(e(154))/5)+parseInt(e(144))/6+parseInt(e(152))/7+-parseInt(e(147))/8+parseInt(e(155))/9*(parseInt(e(153))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(tt);class $ extends t.Plugin{static get[Z(146)](){return Z(141)}static get[Z(150)](){return[v,D,Y]}static get[Z(142)](){return!0}static get[Z(145)](){return!0}}function tt(){var t=["Footnotes","isOfficialPlugin","1415373sVlQEZ","7357134VztLSm","isPremiumPlugin","pluginName","7595808jkXYaF","10042YAsQji","6376596rxAtYx","requires","167zYQXjw","8977759bsrkUY","5284070ghYpWa","5lTntmw","9rqsmhD"];return(tt=function(){return t})()}function et(t,e){const o=nt();return(et=function(t,e){return o[t-=468]})(t,e)}const ot=et;function nt(){const t=["decimal-leading-zero","1048forjmr","upper-latin","7764SIsESk","11qCgNWj","upper-roman","65lqHORW","lower-roman","18416RVzNxh","46819152PnMVfK","decimal","lower-latin","160956gUbgXw","upper-alpha","lower-alpha","3906taGbfu","5602830EuwMQL","9aDEfRW","2329453Koetkb","35718IHpiyw"];return(nt=function(){return t})()}!function(t){const e=et,o=t();for(;;)try{if(684497===-parseInt(e(479))/1*(parseInt(e(474))/2)+parseInt(e(485))/3*(-parseInt(e(483))/4)+-parseInt(e(468))/5*(-parseInt(e(481))/6)+-parseInt(e(480))/7+-parseInt(e(470))/8*(parseInt(e(477))/9)+-parseInt(e(478))/10*(parseInt(e(486))/11)+parseInt(e(471))/12)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(nt);const it=[ot(472),ot(482),ot(473),ot(484),ot(476),ot(475),ot(469),ot(487)],st=at;function rt(){const t=["2624844aFkJkn","_updateFootnotesCounters","getAttribute","8xttDyN","isEnabled","get","execute","6871802ezIKOa","516DxnbKr","getFootnotesDefinitionsObjectElement","plugins","44440hUYZvy","789921qVybSG","refresh","62280iLXjKg","value","setAttribute","2439IkjaBz","model","1073544ocvKCS","includes","1196276ywZxJd","footnotesListStyle","change"];return(rt=function(){return t})()}function at(t,e){const o=rt();return(at=function(t,e){return o[t-=118]})(t,e)}!function(t){const e=at,o=t();for(;;)try{if(549602===parseInt(e(138))/1+-parseInt(e(121))/2+-parseInt(e(126))/3+-parseInt(e(123))/4+parseInt(e(137))/5*(parseInt(e(134))/6)+parseInt(e(133))/7*(-parseInt(e(129))/8)+parseInt(e(119))/9*(parseInt(e(140))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(rt);class ct extends t.Command{[st(139)](){const t=st,{editor:e}=this,o=e[t(136)][t(131)](d)[t(135)]();this[t(130)]=!!o,this[t(141)]=o?.[t(128)](t(124))??null}[st(132)]({value:t}){const e=st,{editor:o}=this,n=o[e(136)][e(131)](d),i=n[e(135)]();i&&it[e(122)](t)&&o[e(120)][e(125)](o=>{const s=e;o[s(118)](s(124),t,i),n[s(127)](o)})}}const lt=ut;function ut(t,e){const o=dt();return(ut=function(t,e){return o[t-=381]})(t,e)}!function(t){const e=ut,o=t();for(;;)try{if(444012===-parseInt(e(381))/1*(-parseInt(e(394))/2)+parseInt(e(385))/3*(parseInt(e(391))/4)+parseInt(e(403))/5+-parseInt(e(397))/6+-parseInt(e(404))/7*(-parseInt(e(388))/8)+parseInt(e(398))/9+parseInt(e(402))/10*(-parseInt(e(383))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(dt);class ft extends t.Command{[lt(384)](){const t=lt,{editor:e}=this,o=e[t(382)][t(401)](d)[t(396)]();this[t(390)]=!!o,this[t(386)]=o?.[t(400)](t(399))??null}[lt(405)]({value:t}){const e=lt,{editor:o}=this,n=o[e(382)][e(401)](d),i=n[e(396)]();i&&Number[e(393)](t)&&o[e(387)][e(392)](o=>{const s=e;o[s(389)](s(399),t,i),n[s(395)](o)})}}function dt(){const t=["28yhNsTc","change","isInteger","276344ZMtIxI","_updateFootnotesCounters","getFootnotesDefinitionsObjectElement","2005182TScfuD","5744142xCMYxv","footnotesListStart","getAttribute","get","283980IZaIHE","1570985GlmNje","3252081KKPqfw","execute","4JHkPoG","plugins","627IXsDYv","refresh","183081BvWCrZ","value","model","8UsLuwX","setAttribute","isEnabled"];return(dt=function(){return t})()}const ht=pt;function pt(t,e){const o=bt();return(pt=function(t,e){return o[t-=120]})(t,e)}!function(t){const e=pt,o=t();for(;;)try{if(981307===parseInt(e(215))/1*(-parseInt(e(134))/2)+parseInt(e(154))/3*(parseInt(e(140))/4)+-parseInt(e(142))/5*(parseInt(e(125))/6)+parseInt(e(184))/7+parseInt(e(148))/8*(parseInt(e(167))/9)+-parseInt(e(159))/10+parseInt(e(203))/11*(parseInt(e(202))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(bt);class mt extends t.Plugin{static get[ht(197)](){return ht(162)}static get[ht(193)](){return[v,d]}static get[ht(155)](){return!0}static get[ht(182)](){return!0}[ht(214)](){const t=ht,{editor:e}=this;e[t(168)][t(178)](t(194),t(198)),e[t(168)][t(178)](t(195),1),e[t(124)][t(135)](t(137),new ct(e)),e[t(124)][t(135)](t(166),new ft(e)),this[t(126)](),this[t(181)](),this[t(153)](),this[t(220)]()}[ht(126)](){const t=ht,{editor:e}=this,{schema:o}=e[t(216)];o[t(123)](t(149),{allowAttributes:[t(196),t(144)]})}[ht(181)](){const t=ht,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(160)](t(191))[t(135)](e=>{const o=t;e.on(o(188),(t,e,n)=>{const s=o,r=e[s(143)],a=e[s(189)]?.[s(147)];r[s(139)](s(192))&&a?.is(s(163),s(149))&&(function(t,e,o,n){const i=s;if(!n[i(205)](e,i(144)))return;let r=1;const a=o[i(165)][i(146)](t,{attributes:i(210)});if(a){const e=Number[i(219)](t[i(170)](i(210)),10);Number[i(187)](e)||(r=e)}!a&&e[i(207)](i(144))||o[i(171)][i(204)](i(144),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(205)](e,i(196)))return;let r=i(198),a=!1;if(o[i(165)][i(146)](t,{attributes:i(206)})){const e={1:i(198),a:i(130),A:i(158),i:i(209),I:i(212)}[t[i(170)](i(206))];e&&(r=e),a=!0}o[i(165)][i(146)](t,{styles:i(164)})&&(r=function(t){const e=i;switch(t){case e(130):return e(174);case e(158):return e(180);default:return t}}(t[i(211)](i(164))),a=!0),!a&&e[i(207)](i(196))||o[i(171)][i(204)](i(196),r,e)}(r,a,n,i))})}),o[t(160)](t(145))[t(135)](e=>{const o=t;e.on(o(157),(t,e,n)=>{const i=o;if(!n[i(165)][i(146)](e[i(132)],t[i(221)]))return;const s=gt(e[i(132)],n[i(185)]),{attributeNewValue:r}=e;null==r||1===r?n[i(171)][i(175)](i(210),s):n[i(171)][i(204)](i(210),String(r),s)}),e.on(o(120),(t,e,n)=>{const i=o;if(!n[i(165)][i(146)](e[i(132)],t[i(221)]))return;const s=gt(e[i(132)],n[i(185)]),{attributeNewValue:r}=e;r&&i(198)!==r?n[i(171)][i(208)](i(164),r,s):n[i(171)][i(217)](i(164),s)})})}[ht(220)](){const t=ht,{editor:e}=this,{model:o}=e,n=e[t(183)][t(190)](d),i=this[t(129)](),s=this[t(138)]();o[t(128)][t(218)](e=>{const r=t,a=o[r(128)][r(213)][r(133)]();let c=!1;for(const t of a){if(r(200)!==t[r(206)]||r(141)===t[r(221)])continue;const n=o[r(179)](t[r(150)][r(152)]);for(const t of n[r(201)]())t.is(r(163),r(149))&&(!t[r(207)](r(144))&&o[r(151)][r(205)](t,r(144))&&(e[r(204)](r(144),s,t),c=!0),!t[r(207)](r(196))&&o[r(151)][r(205)](t,r(196))&&(e[r(204)](r(196),i,t),c=!0))}return c&&n[r(173)](e),c})}[ht(153)](){const t=ht,{editor:e}=this;e[t(183)][t(190)](d)[t(199)](e=>this[t(156)](e))}[ht(129)](){const t=ht;return this[t(222)][t(168)][t(190)](t(194))}[ht(138)](){const t=ht;return this[t(222)][t(168)][t(190)](t(195))}[ht(156)]({container:t,value:e,digits:o}){const n=ht,i=t[n(170)](n(196)),s=t[n(170)](n(144)),r=Math[n(131)](e)+(s??1)-1;switch(i){case n(176):return function(t,e){const o=n;return String(t)[o(136)](e,"0")}(r,Math[n(177)](2,o));case n(130):case n(174):return wt(r,!1);case n(158):case n(180):return wt(r,!0);case n(209):return vt(r,!1);case n(212):return vt(r,!0);default:return String(r)}}}function gt(t,e){const o=ht,n=e[o(186)](t);return Array[o(127)](n[o(169)]())[o(122)](t=>t.is(o(163),"ol")&&t[o(139)](o(192)))}function wt(t,e){const o=ht;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(172)](97+t)+n,i=Math[o(131)]((i-1)/26)}return e?n[o(161)]():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(){const t=["removeStyle","registerPostFixer","parseInt","_definePostfixer","name","editor","attribute:footnotesListStyle:footnotesDefinitions","toLowerCase","find","extend","commands","2388yBnGvr","_defineSchema","from","document","_getDefaultListStyle","lower-alpha","floor","item","getChanges","46lQpDuw","add","padStart","footnotesStyle","_getDefaultStartIndex","hasClass","28AuUOMK","$text","5275QiJPst","viewItem","footnotesListStart","downcast","consume","parent","6936izkgpz","footnotesDefinitions","position","schema","nodeAfter","_defineFormatter","394737oJXSlv","isOfficialPlugin","_formatFootnoteListValue","attribute:footnotesListStart:footnotesDefinitions","upper-alpha","15785370LhZugj","for","toUpperCase","FootnotesPropertiesEditing","element","list-style-type","consumable","footnotesStart","18918pTuweR","config","getChildren","getAttribute","writer","fromCharCode","_updateFootnotesCounters","lower-latin","removeAttribute","decimal-leading-zero","max","define","createRangeOn","upper-latin","_defineConverters","isPremiumPlugin","plugins","5410307kWSpHs","mapper","toViewElement","isNaN","element:ol","modelCursor","get","upcast","footnotes-list","requires","footnotes.footnotesProperties.defaultListStyle","footnotes.footnotesProperties.defaultStartIndex","footnotesListStyle","pluginName","decimal","setFootnoteFormatter","insert","getItems","906420piIsfQ","187eCPGjd","setAttribute","checkAttribute","type","hasAttribute","setStyle","lower-roman","start","getStyle","upper-roman","differ","init","79163UnMWwV","model"];return(bt=function(){return t})()}function vt(t,e){const o=ht;let n="",i=t;for(const{value:t,numeral:e}of yt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(121)]()}class It extends R.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new R.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new R.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,R.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 R.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 R.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 R.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 R.LabeledFieldView(this.locale,R.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 kt=o(291),Ct={attributes:{"data-cke":!0}};Ct.setAttributes=W(),Ct.insert=U().bind(null,"head"),Ct.domAPI=M(),Ct.insertStyleElement=J();K()(kt.A,Ct);kt.A&&kt.A.locals&&kt.A.locals;class Ft extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[R.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,R.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:N.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:N.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:N.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:N.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:N.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:N.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:N.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 R.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 It(t.locale,{styleGridAriaLabel:n,styleButtonViews:i}),r=t.commands.get("footnotesStart");return s.startIndexFieldView.bind("isEnabled").to(r),s.startIndexFieldView.fieldView.bind("value").to(r),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s.delegate("execute").to(e),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}=R.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 xt=Pt;function Et(){var t=["78962rPgtyx","pluginName","161184VLXaWD","902718FnzaQn","3932580jpxsYk","24eEuxhg","2922KZqJQF","35021dPjyqt","requires","18Uwokgh","FootnotesProperties","344gxrNKd","168615hFpaJx","isPremiumPlugin","isOfficialPlugin"];return(Et=function(){return t})()}function Pt(t,e){var o=Et();return(Pt=function(t,e){return o[t-=164]})(t,e)}!function(t){for(var e=Pt,o=t();;)try{if(128508===parseInt(e(176))/1+-parseInt(e(172))/2*(parseInt(e(167))/3)+parseInt(e(178))/4+parseInt(e(173))/5*(-parseInt(e(170))/6)+-parseInt(e(168))/7*(parseInt(e(166))/8)+-parseInt(e(164))/9+parseInt(e(165))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Et);class St extends t.Plugin{static get[xt(177)](){return xt(171)}static get[xt(169)](){return[mt,Ft]}static get[xt(175)](){return!0}static get[xt(174)](){return!0}}function Tt(t,e){var o=At();return(Tt=function(t,e){return o[t-=371]})(t,e)}function At(){var t=["2182146rwhpmI","216498AgVZaW","5125764ZouscI","11SquqzX","6nswLGq","1137224dlUgzZ","734820InmtzT","5427185iAuLGp","9RaMtxU","1877664YRvMJr"];return(At=function(){return t})()}!function(t){for(var e=Tt,o=t();;)try{if(669281===parseInt(e(372))/1*(-parseInt(e(380))/2)+parseInt(e(379))/3+-parseInt(e(378))/4+parseInt(e(376))/5*(parseInt(e(373))/6)+parseInt(e(371))/7+parseInt(e(374))/8*(-parseInt(e(377))/9)+-parseInt(e(375))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(At)})(),(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 _0xbda463,Command as _0x7b2849}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x25beaf,isWidget as _0x20247d,toWidgetEditable as _0x3848fd,WidgetToolbarRepository as _0x3c578e}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x2aee84,logWarning as _0x26e2ed,FocusTracker as rt,KeystrokeHandler as nt,global as at}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x26a296,ClickObserver as _0x3c2747}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x1d5283}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x37aab7,ButtonView as _0x228e8a,View as _0x3afb27,ViewCollection as _0x31d3b1,FocusCycler as tt,addKeyboardHandlingForGrid as st,CollapsibleView as it,LabeledFieldView as et,createLabeledInputNumber as ot,ContextualBalloon as _0x1a9cc0,BalloonPanelView as _0x2cd6ae,createDropdown as _0x2bbf50}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x33a085,IconListStyleDecimal as _0x427384,IconListStyleDecimalLeadingZero as _0xe96110,IconListStyleLowerRoman as _0x5667cf,IconListStyleUpperRoman as _0x42d2a1,IconListStyleLowerLatin as _0x30bb87,IconListStyleUpperLatin as _0xe98f80}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0xcfc255,_0x3b884d){this['_model']=_0xcfc255,this['_elementName']=_0x3b884d['elementName'],this['_getElementKey']=_0x3b884d['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x312fea){const _0x1c54ee=new Set(),_0x180110=new Map();for(const _0x11e398 of _0x312fea){if('insert'===_0x11e398['type']&&'$text'!==_0x11e398['name']&&_0x11e398['position']['nodeAfter']){const _0x3a13c1=this['_model']['createRangeOn'](_0x11e398['position']['nodeAfter']);for(const _0x23563c of _0x3a13c1['getItems']()){if(!_0x23563c['is']('element',this['_elementName']))continue;const _0x1c1ab4=this['_getElementKey'](_0x23563c);_0x180110['has'](_0x1c1ab4)||_0x180110['set'](_0x1c1ab4,[]),_0x180110['get'](_0x1c1ab4)['push'](_0x23563c);}}if('remove'===_0x11e398['type']&&_0x11e398['name']===this['_elementName']){const _0x2f09d8=this['_getElementKey']({'getAttribute':_0x3b0204=>_0x11e398['attributes']['get'](_0x3b0204)});_0x1c54ee['add'](_0x2f09d8);}}for(const [_0x12b83d,_0x300d5b]of this['_trackedElements'])'$graveyard'===_0x300d5b['root']['rootName']&&_0x1c54ee['add'](_0x12b83d);for(const _0x4faafe of _0x1c54ee)this['_trackedElements']['delete'](_0x4faafe);for(const [_0x3b86b7,_0x515aa9]of _0x180110)this['_trackedElements']['set'](_0x3b86b7,_0x515aa9[_0x515aa9['length']-0x1]);const _0x4f1359=new Set();for(const [_0x3f7748,_0x32ad1a]of _0x180110)_0x1c54ee['has'](_0x3f7748)&&(_0x4f1359['add'](_0x32ad1a[0x0]),_0x32ad1a['length']>0x1?_0x180110['set'](_0x3f7748,_0x32ad1a['slice'](0x1)):_0x180110['delete'](_0x3f7748),_0x1c54ee['delete'](_0x3f7748));return{'removed':Array['from'](_0x1c54ee),'inserted':Array['from'](_0x180110['values']())['flat'](),'moved':Array['from'](_0x4f1359)};}}class f extends _0xbda463{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2e76a2){super(_0x2e76a2),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x315e33=>_0x315e33['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x145c81=>_0x145c81['getAttribute']('footnoteId')});}['init'](){const {editor:_0x400e62}=this,{model:_0x5d3b03,data:_0x5dccdc}=_0x400e62;_0x5d3b03['document']['registerPostFixer'](_0x3c9180=>{const _0x133279=_0x5d3b03['document']['differ']['getChanges']();let _0x738cf=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x3c9180,_0x133279)&&(_0x738cf=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x3c9180,_0x133279)&&(_0x738cf=!0x0),this['_handleFootnoteReferencesChanges'](_0x3c9180,_0x133279)&&(_0x738cf=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x3c9180)&&(_0x738cf=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x3c9180)&&(_0x738cf=!0x0),this['_sortFootnoteDefinitions'](_0x3c9180)&&(_0x738cf=!0x0),_0x738cf;}),this['listenTo'](_0x5d3b03['document'],'change:data',()=>{_0x5d3b03['enqueueChange']({'isUndoable':!0x1},_0x2cdea3=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x2cdea3);});},{'priority':'low'}),this['listenTo'](_0x5dccdc,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x55e41f){return this['_footnotes']['find'](_0x35a287=>_0x35a287['id']===_0x55e41f)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0xa2a941){this['_footnoteFormatter']=_0xa2a941;}['_updateFootnotesCounters'](_0x2e4a7f,_0x4d07a7=0x0){let _0x81fca9=!0x1;for(let _0x145f28=_0x4d07a7;_0x145f28<this['_footnotes']['length'];_0x145f28++)this['_updateFootnoteRefCounter'](_0x2e4a7f,_0x145f28)&&(_0x81fca9=!0x0);return _0x81fca9;}['_insertEmptyFootnotesDefinitionsContainer'](_0x4d0a2f,_0x54260c){const _0x1c5870=_0x4d0a2f['createElement']('footnotesDefinitions',{});return _0x4d0a2f['append'](_0x1c5870,_0x54260c),this['_footnotesDefinitions']=_0x1c5870,_0x1c5870;}['_ensureFootnotesDefinitionsContainerExists'](_0x431803){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x440004=this['_footnotes'][0x0]['reference']['root'],_0x580795=this['_insertEmptyFootnotesDefinitionsContainer'](_0x431803,_0x440004);for(const _0x3445ca of this['_footnotes'])_0x3445ca['definition']['parent']||_0x431803['insert'](_0x3445ca['definition'],_0x580795,'end');this['_updateFootnotesCounters'](_0x431803);}['_handleFootnotesDefinitionsObjectChanges'](_0x3fd83a,_0x115e3b){let _0x11e157=!0x1;const {inserted:_0x16b0f5,removed:_0x27adda,moved:_0x49c9c3}=this['_footnoteDefsContainerTracker']['getChanges'](_0x115e3b);if(_0x49c9c3['length']&&(this['_footnotesDefinitions']=_0x49c9c3[0x0]),_0x16b0f5['length']){if(_0x16b0f5['length']>0x1||this['_footnotesDefinitions']&&_0x16b0f5['some'](_0x73ea6c=>_0x73ea6c!==this['_footnotesDefinitions'])){const _0x37c219=_0x3fd83a['createElement']('footnotesDefinitions',{}),_0x3fc041=[];this['_footnotesDefinitions']&&_0x3fc041['push'](this['_footnotesDefinitions']),_0x3fc041['push'](..._0x16b0f5),_0x3fd83a['insert'](_0x37c219,_0x3fc041[0x0],'before');for(const _0x7f960e of _0x3fc041)_0x3fd83a['move'](_0x3fd83a['createRangeIn'](_0x7f960e),_0x3fd83a['createPositionAt'](_0x37c219,'end')),_0x3fd83a['remove'](_0x7f960e);this['_footnotesDefinitions']=_0x37c219,this['_updateFootnotesCounters'](_0x3fd83a),_0x11e157=!0x0;}else this['_footnotesDefinitions']=_0x16b0f5[0x0];}if(_0x27adda['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x33edc7 of this['_footnotes'])_0x3fd83a['remove'](_0x33edc7['reference']),_0x11e157=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x11e157;}['_handleFootnoteDefinitionsChanges'](_0x58678b,_0x35e9cc){let _0x50a835=!0x1;const _0x2e3143=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x5ea625,moved:_0x32da37}=this['_footnoteDefsTracker']['getChanges'](_0x35e9cc);for(const _0x3eb9c4 of[..._0x32da37,..._0x5ea625]){const _0x2557e4=_0x3eb9c4['getAttribute']('footnoteId'),_0x1b2248=this['getFootnote'](_0x2557e4);_0x1b2248&&(_0x1b2248['definition']=_0x3eb9c4),_(_0x58678b,_0x2e3143,_0x3eb9c4)&&(_0x50a835=!0x0);}return _0x50a835;}['_handleFootnoteReferencesChanges'](_0x188b55,_0x26e5ba){let _0x17cea3=!0x1;const {removed:_0x1b77fc,inserted:_0x4222e0,moved:_0x3917b3}=this['_footnoteRefsTracker']['getChanges'](_0x26e5ba);for(const _0x5fd1e7 of _0x1b77fc)this['_handleRemoveFootnoteReferenceById'](_0x188b55,_0x5fd1e7)&&(_0x17cea3=!0x0);for(const _0x470358 of _0x4222e0)this['_handleInsertedFootnoteReference'](_0x188b55,_0x470358)&&(_0x17cea3=!0x0);for(const _0x3c65f4 of _0x3917b3)this['_handleMovedFootnoteReference'](_0x188b55,_0x3c65f4)&&(_0x17cea3=!0x0);return _0x17cea3;}['_handleFootnotesDefinitionsObjectSync'](_0x11f5d0){if(!this['_footnotesDefinitions'])return!0x1;let _0x582695=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x10dbbb=[];for(const _0x4b4b71 of this['_footnotesDefinitions']['getChildren']()){const _0x40d544=_0x4b4b71['getAttribute']('footnoteId');this['getFootnote'](_0x40d544)||(_0x10dbbb['unshift'](_0x4b4b71),_0x582695=!0x0);}for(const _0x368c5e of _0x10dbbb)_0x11f5d0['remove'](_0x368c5e);}const _0x5c9548=new Set(),_0x17a6a0=[];for(const _0x1af725 of this['_footnotesDefinitions']['getChildren']()){const _0x15854a=_0x1af725['getAttribute']('footnoteId');_0x5c9548['has'](_0x15854a)?(_0x17a6a0['unshift'](_0x1af725),_0x582695=!0x0):_0x5c9548['add'](_0x15854a);}for(const _0x58cd80 of _0x17a6a0)_0x11f5d0['remove'](_0x58cd80);return this['_footnotesDefinitions']['childCount']||(_0x11f5d0['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x582695=!0x0),_0x582695;}['_handleInsertedFootnoteReference'](_0x4868cd,_0x34711b){if(this['_footnotes']['find'](_0x3d1e5f=>_0x3d1e5f['reference']===_0x34711b))return!0x1;let _0x504b2f=!0x1;const _0x487a6c=_0x34711b['getAttribute']('footnoteId'),_0x5b00be=this['_footnotes']['findIndex'](_0xbae65f=>_0xbae65f['id']===_0x487a6c);-0x1!==_0x5b00be&&(_0x4868cd['remove'](this['_footnotes'][_0x5b00be]['reference']),this['_footnotes']['splice'](_0x5b00be,0x1),_0x504b2f=!0x0);let _0x2e3c45=this['_footnotesDefinitions']?function(_0x3893df,_0x354574){for(const _0x4e0576 of _0x3893df['getChildren']())if(_0x4e0576['getAttribute']('footnoteId')===_0x354574)return _0x4e0576;return null;}(this['_footnotesDefinitions'],_0x487a6c):null;_0x2e3c45||(_0x2e3c45=_0x4868cd['createElement']('footnoteDefinition',{'footnoteId':_0x487a6c}),this['_footnotesDefinitions']&&(_0x4868cd['insert'](_0x2e3c45,this['_footnotesDefinitions'],'end'),_0x504b2f=!0x0));const _0x236ab8={'id':_0x487a6c,'reference':_0x34711b,'definition':_0x2e3c45},_0x2cf543=I(this['editor']['model'],this['_footnotes'],_0x34711b);this['_footnotes']['splice'](_0x2cf543,0x0,_0x236ab8);let _0x52234c=_0x2cf543;return-0x1!==_0x5b00be&&(_0x52234c=Math['min'](_0x2cf543,_0x5b00be)),this['_updateFootnotesCounters'](_0x4868cd,_0x52234c)&&(_0x504b2f=!0x0),_0x504b2f;}['_handleRemoveFootnoteReferenceById'](_0x4be2c9,_0x171513){const _0x165e1f=this['_footnotes']['findIndex'](_0x419b1c=>_0x419b1c['id']===_0x171513);if(-0x1===_0x165e1f)return!0x1;let _0x294fa9=!0x1;const _0x4b9848=this['_footnotes'][_0x165e1f];return'$graveyard'!==_0x4b9848['definition']['root']['rootName']&&(_0x4be2c9['remove'](_0x4b9848['definition']),_0x294fa9=!0x0),this['_footnotes']['splice'](_0x165e1f,0x1),this['_updateFootnotesCounters'](_0x4be2c9,_0x165e1f)&&(_0x294fa9=!0x0),_0x294fa9;}['_handleMovedFootnoteReference'](_0x29fe0a,_0x435aa3){const _0x578fbf=_0x435aa3['getAttribute']('footnoteId'),_0x11900d=this['_footnotes']['findIndex'](_0x34897f=>_0x34897f['id']===_0x578fbf),_0x177ed6=this['_footnotes'][_0x11900d];let _0x4f5158=!0x1;_0x177ed6['reference']=_0x435aa3,this['_footnotes']['splice'](_0x11900d,0x1);const _0xf89bb5=I(this['editor']['model'],this['_footnotes'],_0x435aa3);return this['_footnotes']['splice'](_0xf89bb5,0x0,_0x177ed6),this['_updateFootnotesCounters'](_0x29fe0a,Math['min'](_0x11900d,_0xf89bb5))&&(_0x4f5158=!0x0),_0x4f5158;}['_updateFootnoteRefCounter'](_0x10002b,_0x358949){if(!this['_footnotesDefinitions'])return!0x1;const _0x2a48eb=this['_footnotes'][_0x358949];let _0x5824dd;return _0x5824dd=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x2a48eb,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x358949+0x1}):String(_0x358949+0x1),_0x2a48eb['reference']['getAttribute']('footnoteCounter')!=_0x5824dd&&(_0x10002b['setAttribute']('footnoteCounter',_0x5824dd,_0x2a48eb['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x1c6e8a){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x6a9de6,_0x10b7ab){if(_0x6a9de6['length']!==_0x10b7ab['length'])return!0x1;for(let _0x5c34a8=0x0;_0x5c34a8<_0x6a9de6['length'];_0x5c34a8++)if(_0x6a9de6[_0x5c34a8]!==_0x10b7ab[_0x5c34a8])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x5ec94c=>_0x5ec94c['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x537f2d=>_0x537f2d['getAttribute']('footnoteId'))))return!0x1;let _0x40bbff=!0x1;for(let _0x5f7d75=0x0;_0x5f7d75<this['_footnotes']['length'];_0x5f7d75++){const _0x52fb13=this['_footnotes'][_0x5f7d75],_0x4a1012=_0x1c6e8a['createPositionBefore'](_0x52fb13['definition']),_0x494549=_0x1c6e8a['createPositionAt'](this['_footnotesDefinitions'],_0x5f7d75);_0x4a1012['isEqual'](_0x494549)||(_0x1c6e8a['move'](_0x1c6e8a['createRangeOn'](_0x52fb13['definition']),_0x494549),_0x40bbff=!0x0);}return _0x40bbff;}['_ensureFootnotesReferencesHaveProperOrder'](_0x40cab1){if(!this['_footnotes']['length'])return!0x1;const {model:_0x4c2713}=this['editor'];let _0x2b4d27=!0x1;for(let _0x166119=0x0;_0x166119<this['_footnotes']['length']-0x1;_0x166119++){const _0x4ba6a9=this['_footnotes'][_0x166119],_0x74bbb5=this['_footnotes'][_0x166119+0x1],_0x4230b3=_0x4c2713['createPositionBefore'](_0x4ba6a9['reference']),_0x3091e9=_0x4c2713['createPositionBefore'](_0x74bbb5['reference']);'after'===_0x4230b3['compareWith'](_0x3091e9)&&(this['_handleMovedFootnoteReference'](_0x40cab1,_0x4ba6a9['reference']),_0x166119=-0x1,_0x2b4d27=!0x0);}return _0x2b4d27;}}function _(_0x53e25b,_0x4951df,_0x4d7899){if(_0x4d7899['childCount'])return!0x1;const _0x3335a1=_0x4951df?'paragraph':'footnoteInlineContent';return _0x53e25b['insert'](_0x53e25b['createElement'](_0x3335a1),_0x4d7899),!0x0;}function I(_0x29b0d8,_0x59f634,_0x2a8cfd){if(0x0===_0x59f634['length'])return 0x0;const _0x5833ca=_0x29b0d8['createPositionBefore'](_0x2a8cfd);for(let _0x4e6f61=0x0;_0x4e6f61<_0x59f634['length'];_0x4e6f61++){const _0x16f5ba=_0x59f634[_0x4e6f61],_0x2cb3b7=_0x29b0d8['createPositionBefore'](_0x16f5ba['reference']);if('before'===_0x5833ca['compareWith'](_0x2cb3b7))return _0x4e6f61;}const _0x1dd6e6=_0x2a8cfd['root'];let _0x453c07=-0x1;for(let _0x3f8eda=_0x59f634['length']-0x1;_0x3f8eda>=0x0;_0x3f8eda--)if(_0x59f634[_0x3f8eda]['reference']['root']===_0x1dd6e6){_0x453c07=_0x3f8eda;break;}if(-0x1!==_0x453c07)return _0x453c07+0x1;const _0x165182=_0x29b0d8['document']['getRootNames'](),_0x376e62=_0x165182['indexOf'](_0x1dd6e6['rootName']),_0x43f440=_0x165182[_0x376e62+0x1];if(_0x43f440){for(let _0x346cbc=0x0;_0x346cbc<_0x59f634['length'];_0x346cbc++)if(_0x59f634[_0x346cbc]['reference']['root']['rootName']===_0x43f440)return _0x346cbc;}return _0x59f634['length'];}class h extends _0x7b2849{['refresh'](){const _0x59e816=this['editor']['model']['document']['selection'],_0x3699bc=this['_getPositionToInsertFootnote'](_0x59e816);this['isEnabled']=!!_0x3699bc;}['execute'](_0x4a0465){const {editor:_0x433cf5}=this,{model:_0xd66bd7}=_0x433cf5,{selection:_0x5905e4}=_0xd66bd7['document'],_0x54c878=this['_getPositionToInsertFootnote'](_0x5905e4);if(!_0x54c878)return;const _0x203046=_0x433cf5['plugins']['get']('FootnotesEditing'),_0x4a9a06=_0x4a0465?.['footnoteId']??_0x2aee84();!function(_0xe0419a){return'string'==typeof _0xe0419a&&_0xe0419a['length']>0x0&&!/\s/['test'](_0xe0419a)&&!/^\d/['test'](_0xe0419a);}(_0x4a9a06)?_0x26e2ed('insert-footnote-command-executed-with-invalid-id'):(_0xd66bd7['change'](_0x17d02a=>{const _0x57184b=_0x17d02a['createElement']('footnoteRef',{'footnoteId':_0x4a9a06});_0xd66bd7['insertObject'](_0x57184b,_0x54c878,null);}),_0x203046['_moveSelectionToFootnoteDefinition'](_0x4a9a06));}['_getPositionToInsertFootnote'](_0x403596){const {model:_0x3992f8}=this['editor'],{schema:_0x4c4e2e}=_0x3992f8,_0x363093=_0x403596['getFirstRange']();for(const _0x31046d of _0x363093['getItems']())if(_0x4c4e2e['isBlock'](_0x31046d)||_0x4c4e2e['isObject'](_0x31046d))return null;const _0x57ac47=_0x363093['end'];return _0x4c4e2e['checkChild'](_0x57ac47,'footnoteRef')?_0x57ac47:null;}}class r extends _0xbda463{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x448c25}=this;_0x448c25['config']['define']('footnotes.multiBlock',!0x0),_0x448c25['commands']['add']('insertFootnote',new h(_0x448c25)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x27b461){const _0x236aa6=_0x3081a3([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]),_0xdb3df7=0x47a28506,_0xa144b9=0x47a5fbce^_0xdb3df7,_0x16f412=window[_0x3081a3([0x44,0x61,0x74,0x65])][_0x3081a3([0x6e,0x6f,0x77])](),_0x10c3a1=_0x27b461[_0x3081a3([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x101a6f=new window[(_0x3081a3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4df9ef=>{_0x10c3a1[_0x3081a3([0x6f,0x6e,0x63,0x65])](_0x3081a3([0x72,0x65,0x61,0x64,0x79]),_0x4df9ef);}),_0x2e03b7={[_0x3081a3([0x6b,0x74,0x79])]:_0x3081a3([0x45,0x43]),[_0x3081a3([0x75,0x73,0x65])]:_0x3081a3([0x73,0x69,0x67]),[_0x3081a3([0x63,0x72,0x76])]:_0x3081a3([0x50,0x2d,0x32,0x35,0x36]),[_0x3081a3([0x78])]:_0x3081a3([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]),[_0x3081a3([0x79])]:_0x3081a3([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]),[_0x3081a3([0x61,0x6c,0x67])]:_0x3081a3([0x45,0x53,0x32,0x35,0x36])},_0x43469c=_0x10c3a1[_0x3081a3([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3081a3([0x67,0x65,0x74])](_0x3081a3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x29e85f(){let _0x2a612e,_0x34f491=null,_0x3e47e5=null;try{if(_0x43469c==_0x3081a3([0x47,0x50,0x4c]))return _0x3081a3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2a612e=_0x5c7e14(),!_0x2a612e)return _0x3081a3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2a612e[_0x3081a3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3e47e5=_0x256bf7(_0x2a612e[_0x3081a3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2a612e[_0x3081a3([0x6a,0x74,0x69])])),await _0x1e70df()?_0x5b595()?_0x5f3bb6()?_0x3081a3([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xa3df86()?(_0x2a612e[_0x3081a3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3081a3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x34f491=_0x138408(_0x3081a3([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x491568()):_0x3081a3([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3081a3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3081a3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3081a3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5f3bb6(){const _0x3c06ae=[_0x3081a3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3081a3([0x74,0x72,0x69,0x61,0x6c])][_0x3081a3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2a612e[_0x3081a3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x16f412/0x3e8:0xe10*_0xa144b9;return _0x2a612e[_0x3081a3([0x65,0x78,0x70])]<_0x3c06ae;}function _0x5b595(){const _0x120c00=_0x2a612e[_0x3081a3([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x120c00&&(!!_0x120c00[_0x3081a3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3081a3([0x2a]))||!!_0x120c00[_0x3081a3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3081a3([0x46,0x4f,0x4f])));}function _0xa3df86(){const _0x4c5c12=_0x2a612e[_0x3081a3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4c5c12||0x0==_0x4c5c12[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x382b9e}=new URL(window[_0x3081a3([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4c5c12[_0x3081a3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x382b9e))return!0x0;const _0x56eee3=_0x382b9e[_0x3081a3([0x73,0x70,0x6c,0x69,0x74])](_0x3081a3([0x2e]));return _0x4c5c12[_0x3081a3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e5709=>_0x1e5709[_0x3081a3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3081a3([0x2a])))[_0x3081a3([0x6d,0x61,0x70])](_0x26784f=>_0x26784f[_0x3081a3([0x73,0x70,0x6c,0x69,0x74])](_0x3081a3([0x2e])))[_0x3081a3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4309e0=>_0x4309e0[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x56eee3[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3081a3([0x6d,0x61,0x70])](_0x63b729=>Array(_0x56eee3[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x63b729[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3081a3([0x66,0x69,0x6c,0x6c])](_0x63b729[0x0]===_0x3081a3([0x2a])?_0x3081a3([0x2a]):'')[_0x3081a3([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x63b729))[_0x3081a3([0x73,0x6f,0x6d,0x65])](_0x3f609e=>_0x56eee3[_0x3081a3([0x65,0x76,0x65,0x72,0x79])]((_0x148f26,_0x527dba)=>_0x3f609e[_0x527dba]===_0x148f26||_0x3f609e[_0x527dba]===_0x3081a3([0x2a])));}function _0x491568(){return _0x34f491&&_0x3e47e5?new window[(_0x3081a3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x37caf7,_0x27da37)=>{_0x34f491[_0x3081a3([0x74,0x68,0x65,0x6e])](_0x37caf7,_0x27da37),_0x3e47e5[_0x3081a3([0x74,0x68,0x65,0x6e])](_0x154040=>{_0x154040!=_0x3081a3([0x56,0x61,0x6c,0x69,0x64])&&_0x37caf7(_0x154040);},_0x27da37);}):_0x34f491||_0x3e47e5||_0x3081a3([0x56,0x61,0x6c,0x69,0x64]);}}function _0x256bf7(_0x147dc1,_0x52a06d){return new window[(_0x3081a3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x539e35=>{if(_0x307cf4())return _0x539e35(_0x3081a3([0x56,0x61,0x6c,0x69,0x64]));_0x5d8ded(),_0x10c3a1[_0x3081a3([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3081a3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5d61ea=!0x1;const _0x20b3fb=_0x2aee84();function _0x4a216a(_0xd806fa){return!!_0xd806fa&&(typeof _0xd806fa===_0x3081a3([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xd806fa===_0x3081a3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xd806fa[_0x3081a3([0x74,0x68,0x65,0x6e])]===_0x3081a3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xd806fa[_0x3081a3([0x63,0x61,0x74,0x63,0x68])]===_0x3081a3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x214b19(_0xd15440){_0x373ebe(_0xd15440)[_0x3081a3([0x74,0x68,0x65,0x6e])](_0x307297=>{if(!_0x307297||_0x307297[_0x3081a3([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3081a3([0x6f,0x6b]))return _0x3081a3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x522262(_0x238d5f(_0x20b3fb+_0x52a06d))!=_0x307297[_0x3081a3([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3081a3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3081a3([0x56,0x61,0x6c,0x69,0x64]);})[_0x3081a3([0x74,0x68,0x65,0x6e])](_0x329a1f=>(_0xd38813(),_0x329a1f),()=>{const _0x6120c4=_0x51d5bc();return null==_0x6120c4?(_0xd38813(),_0x3081a3([0x56,0x61,0x6c,0x69,0x64])):_0x3081a3(_0x16f412-_0x6120c4>(0x63ae0106^_0xdb3df7)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3081a3([0x74,0x68,0x65,0x6e])](_0x539e35)[_0x3081a3([0x63,0x61,0x74,0x63,0x68])](()=>{_0x539e35(_0x3081a3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x46b4ca=0x47946b86^_0xdb3df7;function _0xd38813(){const _0x474a7f=_0x3081a3([0x6c,0x6c,0x63,0x74,0x2d])+_0x522262(_0x238d5f(_0x147dc1)),_0x12063c=_0x434a5b(_0x522262(window[_0x3081a3([0x4d,0x61,0x74,0x68])][_0x3081a3([0x63,0x65,0x69,0x6c])](_0x16f412/_0x46b4ca)));window[_0x3081a3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3081a3([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x474a7f,_0x12063c);}function _0x51d5bc(){const _0x3b0bb3=_0x3081a3([0x6c,0x6c,0x63,0x74,0x2d])+_0x522262(_0x238d5f(_0x147dc1)),_0x364ca8=window[_0x3081a3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3081a3([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b0bb3);return _0x364ca8?window[_0x3081a3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x434a5b(_0x364ca8),0x10)*_0x46b4ca:null;}function _0x373ebe(_0x1eb26d){return new window[(_0x3081a3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x24b976,_0x377502)=>{_0x1eb26d[_0x3081a3([0x74,0x68,0x65,0x6e])](_0x24b976,_0x377502),window[_0x3081a3([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x377502,0x47a351c6^_0xdb3df7);});}}_0x10c3a1[_0x3081a3([0x6f,0x6e])](_0x3081a3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5e4dcf,_0x39c54f)=>{if(_0x39c54f[0x0]!=_0x147dc1)return _0x539e35(_0x3081a3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x39c54f[0x1]={..._0x39c54f[0x1],[_0x3081a3([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x20b3fb};},{[_0x3081a3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3081a3([0x68,0x69,0x67,0x68])}),_0x10c3a1[_0x3081a3([0x6f,0x6e])](_0x3081a3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3884e6=>{_0x4a216a(_0x3884e6[_0x3081a3([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5d61ea=!0x0,_0x214b19(_0x3884e6[_0x3081a3([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3081a3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3081a3([0x6c,0x6f,0x77])}),_0x101a6f[_0x3081a3([0x74,0x68,0x65,0x6e])](()=>{_0x5d61ea||_0x539e35(_0x3081a3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x307cf4(){return _0x10c3a1[_0x3081a3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3081a3([0x76,0x69,0x65,0x77])][_0x3081a3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3081a3([0x61,0x75,0x74,0x6f]);}function _0x5d8ded(){_0x10c3a1[_0x3081a3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3081a3([0x76,0x69,0x65,0x77])][_0x3081a3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3081a3([0x61,0x75,0x74,0x6f]);}}function _0x138408(_0x13b57e){const _0x48868f=[new window[(_0x3081a3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d36cb=>setTimeout(_0x3d36cb,0x47abbbca^_0xdb3df7)),_0x101a6f[_0x3081a3([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3081a3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2d4446=>{let _0x4f6bc5=0x0;_0x10c3a1[_0x3081a3([0x6d,0x6f,0x64,0x65,0x6c])][_0x3081a3([0x6f,0x6e])](_0x3081a3([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5be6d9,_0x4c21dc)=>{_0x4c21dc[0x0][_0x3081a3([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4f6bc5++,_0x4f6bc5==(0x47a280ee^_0xdb3df7)&&(_0x2d4446(),_0x5be6d9[_0x3081a3([0x6f,0x66,0x66])]());});}))];return window[_0x3081a3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3081a3([0x72,0x61,0x63,0x65])](_0x48868f)[_0x3081a3([0x74,0x68,0x65,0x6e])](()=>_0x13b57e);}async function _0x105975(){await _0x101a6f,_0x10c3a1[_0x3081a3([0x6d,0x6f,0x64,0x65,0x6c])][_0x3081a3([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3fed84,_0x10c3a1[_0x3081a3([0x6d,0x6f,0x64,0x65,0x6c])][_0x3081a3([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3fed84,_0x10c3a1[_0x3081a3([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3081a3([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4416f4(_0x124c81){const _0x50b616=_0xe137b();_0x10c3a1[_0x50b616]=_0x3081a3([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x124c81,_0x124c81!=_0x3081a3([0x56,0x61,0x6c,0x69,0x64])&&_0x105975();}function _0xe137b(){const _0x418897=window[_0x3081a3([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3081a3([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3081a3([0x6e,0x6f,0x77])]())[_0x3081a3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3081a3([0x2e]),'');let _0x4c362c=_0x3081a3([0x75]);for(let _0x5e5e82=0x0;_0x5e5e82<_0x418897[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5e5e82+=0x2){let _0x50dbae=window[_0x3081a3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x418897[_0x3081a3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5e5e82,_0x5e5e82+0x2));_0x50dbae>=_0x236aa6[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x50dbae-=_0x236aa6[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4c362c+=_0x236aa6[_0x50dbae];}return _0x4c362c;}function _0x5c7e14(){const _0x5d7f8f=_0x43469c[_0x3081a3([0x73,0x70,0x6c,0x69,0x74])](_0x3081a3([0x2e]));if(0x3!=_0x5d7f8f[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1357c0(_0x5d7f8f[0x1]);function _0x1357c0(_0x283375){const _0x209b18=_0x59fb72(_0x283375);return _0x209b18&&_0x5c3036()?_0x209b18:null;function _0x5c3036(){const _0x3ab756=_0x209b18[_0x3081a3([0x6a,0x74,0x69])],_0x8e4723=window[_0x3081a3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3ab756[_0x3081a3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3ab756[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xf09719={..._0x209b18,[_0x3081a3([0x6a,0x74,0x69])]:_0x3ab756[_0x3081a3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3ab756[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xf09719[_0x3081a3([0x76,0x63])],_0x238d5f(_0xf09719)==_0x8e4723;}}}async function _0x1e70df(){let _0x1a4058=!0x0;try{const _0x453a94=_0x43469c[_0x3081a3([0x73,0x70,0x6c,0x69,0x74])](_0x3081a3([0x2e])),[_0x5768ff,_0x4a17d1,_0x3bbe80]=_0x453a94;return _0x2d095a(_0x5768ff),await _0x4a1293(_0x5768ff,_0x4a17d1,_0x3bbe80),_0x1a4058;}catch{return!0x1;}function _0x2d095a(_0x5929f1){const _0x3a200f=_0x59fb72(_0x5929f1);_0x3a200f&&_0x3a200f[_0x3081a3([0x61,0x6c,0x67])]==_0x3081a3([0x45,0x53,0x32,0x35,0x36])||(_0x1a4058=!0x1);}async function _0x4a1293(_0x10e871,_0x34e399,_0x37dd2f){const _0x51326f=window[_0x3081a3([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3081a3([0x66,0x72,0x6f,0x6d])](_0x3dd7a0(_0x37dd2f),_0x148a6c=>_0x148a6c[_0x3081a3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3669a6=new window[(_0x3081a3([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3081a3([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x10e871+_0x3081a3([0x2e])+_0x34e399),_0x517491=window[_0x3081a3([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3081a3([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x517491)return;const _0x4ec0b5=await _0x517491[_0x3081a3([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3081a3([0x6a,0x77,0x6b]),_0x2e03b7,{[_0x3081a3([0x6e,0x61,0x6d,0x65])]:_0x3081a3([0x45,0x43,0x44,0x53,0x41]),[_0x3081a3([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3081a3([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3081a3([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x517491[_0x3081a3([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3081a3([0x6e,0x61,0x6d,0x65])]:_0x3081a3([0x45,0x43,0x44,0x53,0x41]),[_0x3081a3([0x68,0x61,0x73,0x68])]:{[_0x3081a3([0x6e,0x61,0x6d,0x65])]:_0x3081a3([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4ec0b5,_0x51326f,_0x3669a6)||(_0x1a4058=!0x1);}}function _0x59fb72(_0x5ee941){return _0x5ee941[_0x3081a3([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3081a3([0x65,0x79]))?JSON[_0x3081a3([0x70,0x61,0x72,0x73,0x65])](_0x3dd7a0(_0x5ee941)):null;}function _0x3dd7a0(_0x36927b){return window[_0x3081a3([0x61,0x74,0x6f,0x62])](_0x36927b[_0x3081a3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3081a3([0x2b]))[_0x3081a3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3081a3([0x2f])));}function _0x238d5f(_0x2a4f66){let _0x4fa652=0x1505;function _0x3b8411(_0x422a49){for(let _0x4e13ef=0x0;_0x4e13ef<_0x422a49[_0x3081a3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4e13ef++){const _0x3e41d4=_0x422a49[_0x3081a3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4e13ef);_0x4fa652=(_0x4fa652<<0x5)+_0x4fa652+_0x3e41d4,_0x4fa652&=_0x4fa652;}}function _0x34ee27(_0x38efa2){Array[_0x3081a3([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x38efa2)?_0x38efa2[_0x3081a3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x34ee27):_0x38efa2&&typeof _0x38efa2==_0x3081a3([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3081a3([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x38efa2)[_0x3081a3([0x73,0x6f,0x72,0x74])]()[_0x3081a3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x213738,_0x29cdf0])=>{_0x3b8411(_0x213738),_0x34ee27(_0x29cdf0);}):_0x3b8411(window[_0x3081a3([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x38efa2));}return _0x34ee27(_0x2a4f66),_0x4fa652>>>0x0;}function _0x522262(_0x5b0918){return _0x5b0918[_0x3081a3([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3081a3([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3081a3([0x30]));}function _0x434a5b(_0x23240c){return _0x23240c[_0x3081a3([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3081a3([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3081a3([0x6a,0x6f,0x69,0x6e])]('');}function _0x3fed84(){}function _0x3081a3(_0xabde28){return _0xabde28['map'](_0x17bd17=>String['fromCharCode'](_0x17bd17))['join']('');}_0x4416f4(await _0x29e85f());}(this);}['_moveSelectionToFootnoteDefinition'](_0x4e2b65){const {plugins:_0x4aa793,editing:_0xec3269,model:_0x315f1b}=this['editor'],_0x3d3ad8=_0x4aa793['get'](f)['getFootnote'](_0x4e2b65);return!!_0x3d3ad8&&(_0x315f1b['change'](_0xe90408=>{_0xe90408['setSelection'](_0xe90408['createPositionAt'](_0x3d3ad8['definition'],'end'));}),_0xec3269['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x5b3046){const {plugins:_0x18746b,editing:_0x11bd99,model:_0x5a03d3}=this['editor'],_0x3a8701=_0x18746b['get'](f)['getFootnote'](_0x5b3046);return!!_0x3a8701&&(_0x5a03d3['change'](_0x3b319e=>{_0x3b319e['setSelection'](_0x3a8701['reference'],'on');}),_0x11bd99['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x1b74b7}=this['editor']['model'],_0x3e61b5=this['editor']['config']['get']('footnotes.multiBlock');_0x1b74b7['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x1b74b7['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x1b74b7['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x3e61b5?_0x1b74b7['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x1b74b7['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x1b74b7['addChildCheck'](_0xa8f139=>{for(const _0x38939f of _0xa8f139)if('footnoteDefinition'===_0x38939f['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x1a15a2}=this,{conversion:_0x3d0ee4,editing:_0x33c7b2}=_0x1a15a2,{t:t}=_0x1a15a2['locale'];_0x3d0ee4['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0xb6ecb5,{writer:_0x57d821,consumable:_0x3384aa})=>{const _0x173629=_0xb6ecb5['getChild'](0x0);if(!_0x173629||!_0x173629['is']('element','a'))return null;const _0x38ea6d=_0x173629['getAttribute']('href')||'';if(!_0x38ea6d['startsWith']('#'))return null;const _0x2aaa73=_0x38ea6d['replace'](/^#/,'');if(!_0x2aaa73)return null;_0x3384aa['consume'](_0x173629,{'name':!0x0,'attributes':['href']});for(const {item:_0xfd0e6d}of _0x33c7b2['view']['createRangeIn'](_0x173629))_0xfd0e6d['is']('$textProxy')?_0x3384aa['consume'](_0xfd0e6d['textNode'],{'name':!0x0}):_0xfd0e6d['is']('element')&&_0x3384aa['consume'](_0xfd0e6d,{'name':!0x0});return _0x57d821['createElement']('footnoteRef',{'footnoteId':_0x2aaa73});}}),_0x3d0ee4['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x3c476b,{writer:_0x598028})=>b(_0x3c476b,_0x598028)}),_0x3d0ee4['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x2ed0f9,{writer:_0x2bcfbd})=>{const _0x9641da=_0x2ed0f9['getAttribute']('footnoteCounter');return _0x25beaf(b(_0x2ed0f9,_0x2bcfbd),_0x2bcfbd,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x9641da)});}});}['_defineDefinitionsConverters'](){const {editor:_0x537163}=this,{t:t}=_0x537163['locale'],{conversion:_0x17052c}=_0x537163;_0x17052c['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x17052c['for']('upcast')['add'](_0x1ea347=>{_0x1ea347['on']('element:ol',(_0x3fbd89,_0x3063af,_0x35662b)=>{const _0x6e5043=_0x3063af['viewItem'];if(!_0x6e5043['hasClass']('footnotes-list')||!_0x3063af['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x35662b['consumable']['consume'](_0x6e5043,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x55e87b,modelCursor:_0x5be155}=_0x35662b['convertChildren'](_0x3063af['viewItem'],_0x3063af['modelCursor']);_0x3063af['modelRange']=_0x55e87b,_0x3063af['modelCursor']=_0x5be155;}),_0x1ea347['on']('element:hr',(_0x5a13f5,_0x179412,_0x301de2)=>{const _0x1e998b=_0x179412['viewItem'];_0x1e998b['hasClass']('footnotes-divider')&&_0x179412['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x301de2['consumable']['consume'](_0x1e998b,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x17052c['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x521193,{writer:_0x36534f})=>D(_0x36534f)}),_0x17052c['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x24f959,{writer:_0x54cfd5})=>{const _0x2fe5d9=D(_0x54cfd5,{'data-footnotes-list-label':t('Footnotes')}),_0x181126=_0x25beaf(_0x2fe5d9,_0x54cfd5,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x54cfd5['setCustomProperty']('footnotesDefinitions',!0x0,_0x181126),_0x181126;}});}['_defineDefinitionConverters'](){const {editor:_0x2e8fb8}=this,{conversion:_0x1b8dfd,locale:_0x487881}=_0x2e8fb8,_0x544d84=_0x2e8fb8['config']['get']('footnotes.multiBlock');_0x1b8dfd['for']('upcast')['add'](_0x1d8a36=>{_0x1d8a36['on']('element:li',(_0x2a6d25,_0x39d96f,_0x5457be)=>{const _0x5eebae=_0x39d96f['viewItem'];if(!_0x5eebae['hasClass']('footnote-definition')||!_0x5eebae['getAttribute']('id'))return;const _0x329074=_0x5eebae['parent'];if(!_0x329074['is']('element','ol')||!_0x329074['hasClass']('footnotes-list'))return;if(!_0x5457be['consumable']['test'](_0x5eebae,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x506ce5=_0x5457be['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x5eebae['getAttribute']('id')});if(!_0x5457be['safeInsert'](_0x506ce5,_0x39d96f['modelCursor']))return;_0x5457be['consumable']['consume'](_0x5eebae,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x50acc9=Array['from'](_0x5eebae['getChildren']())['find'](_0x9480da=>_0x9480da['is']('element')&&_0x9480da['hasClass']('footnote-content'));for(const _0x533cc3 of _0x5eebae['getChildren']())_0x533cc3['is']('element')&&(_0x5457be['consumable']['consume'](_0x533cc3,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x5457be['consumable']['consume'](_0x533cc3,{'name':!0x0,'classes':'footnote-content'}));if(_0x50acc9){if(_0x544d84)_0x5457be['convertChildren'](_0x50acc9,_0x506ce5);else{const _0x10000e=_0x5457be['writer']['createElement']('footnoteInlineContent');_0x5457be['writer']['insert'](_0x10000e,_0x506ce5),_0x5457be['convertChildren'](_0x50acc9,_0x10000e);}}_0x5457be['updateConversionResult'](_0x506ce5,_0x39d96f);});}),_0x1b8dfd['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x47df21,{writer:_0x2d0c68})=>y(_0x47df21,_0x2d0c68,_0x487881,{'dataPipeline':!0x0})}),_0x1b8dfd['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x2453aa,{writer:_0x1c377f})=>y(_0x2453aa,_0x1c377f,_0x487881)});}['_defineBogusParagraphConverters'](){const {editor:_0x485260}=this,{conversion:_0x15591f}=_0x485260;_0x485260['config']['get']('footnotes.multiBlock')?(_0x15591f['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':p(),'converterPriority':'high'}),_0x15591f['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':p({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x485260['model']['document'],'change:data',()=>{!function(_0xaf2659,_0x3170af){const _0x27bfd1=_0xaf2659['document']['differ'],_0x5ecc02=new Set();for(const _0x3cf4f9 of _0x27bfd1['getChanges']()){const _0x211d9e='attribute'==_0x3cf4f9['type']?_0x3cf4f9['range']['start']['parent']:_0x3cf4f9['position']['parent'];_0x211d9e['is']('element','footnoteDefinition')&&_0x5ecc02['add'](_0x211d9e);}for(const _0x52a82a of _0x5ecc02['values']()){const _0x325f33=Array['from'](_0x52a82a['getChildren']())['filter'](_0x2efd44=>v(_0x2efd44,_0x3170af['mapper']));for(const _0x4d377c of _0x325f33)_0x3170af['reconvertItem'](_0x4d377c);}}(_0x485260['model'],_0x485260['editing']);})):(_0x15591f['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':p()}),_0x15591f['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x5ea50e,{writer:_0x3131d1})=>{const _0x49a9bf=_0x3131d1['createContainerElement']('span');return _0x3131d1['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x49a9bf),_0x49a9bf;}}));}['_defineKeyboardHandlers'](){const {editor:_0x4007fa}=this,{editing:_0x3394eb,t:t}=_0x4007fa,_0x29c824=_0x4007fa['model']['document']['selection'];_0x4007fa['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x4007fa['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x3394eb['view']['document'],'enter',(_0x2ed0e5,_0x3c8774)=>{const _0x1bd2e2=function(_0xd1dc05){const _0x755b3=_0xd1dc05['getSelectedElement']();if(_0x755b3?.['is']('element','footnoteRef'))return _0x755b3;return null;}(_0x29c824);if(_0x1bd2e2){const _0x1b8517=_0x1bd2e2['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x1b8517),_0x3c8774['preventDefault'](),_0x2ed0e5['stop']();}},{'context':_0x20247d});}['_defineClickHandlers'](){const {editor:_0x1810fd}=this,{editing:_0x4e05cb}=_0x1810fd;_0x1810fd['editing']['view']['addObserver'](_0x26a296),_0x1810fd['editing']['view']['addObserver'](_0x3c2747);let _0x8586b6=!0x1;this['listenTo'](_0x4e05cb['view']['document'],'pointerdown',(_0x5875e7,_0x5217cf)=>{const {target:_0x361d91}=_0x5217cf,_0x50fdd9=_0x4e05cb['view']['document']['selection'];_0x8586b6=!!(_0x361d91?.['is']('element','a')&&_0x361d91['parent']?.['is']('element','sup')&&_0x361d91['parent']['hasClass']('footnote'))&&_0x50fdd9['getSelectedElement']()===_0x361d91['parent'];},{'priority':'high'}),this['listenTo'](_0x4e05cb['view']['document'],'click',(_0x4a2b64,_0x4e34de)=>{const {target:_0x32ab8c}=_0x4e34de;if(!_0x32ab8c?.['is']('element','a'))return;if(_0x32ab8c['parent']?.['is']('element','sup')&&_0x32ab8c['parent']['hasClass']('footnote')&&!_0x8586b6)return void _0x4e34de['preventDefault']();let _0x2cba89=_0x32ab8c['getAttribute']('href');if(!_0x2cba89?.['startsWith']('#'))return;_0x2cba89=_0x2cba89['slice'](0x1);let _0x30c2fe=!0x1;(_0x2cba89['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x2cba89['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x2cba89))&&(_0x30c2fe=!0x0),_0x30c2fe&&(_0x4e34de['preventDefault'](),_0x4a2b64['stop']());},{'priority':'high','context':'$capture'});}}function p({dataPipeline:_0x57c40f}={}){return(_0x5b9ba8,{writer:_0x25e695})=>{if(!g(_0x5b9ba8))return null;if(!_0x57c40f)return _0x25e695['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x1b09ff=_0x25e695['createContainerElement']('p');return _0x25e695['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x1b09ff),_0x1b09ff;};}function g(_0x31f7ec){const {parent:_0x27a18f}=_0x31f7ec;if(!_0x27a18f?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x27a18f['childCount'])return!0x1;for(const _0x58d754 of _0x31f7ec['getAttributeKeys']())if(!_0x58d754['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x58d754)return!0x1;return!0x0;}function v(_0xfca681,_0x2a4bb7){if(!_0xfca681['is']('element','paragraph'))return!0x1;const _0x21742c=_0x2a4bb7['toViewElement'](_0xfca681);return!!_0x21742c&&g(_0xfca681)!==_0x21742c['is']('element','span');}function Q(_0x469d1){return _0x20247d(_0x469d1)&&_0x469d1['is']('containerElement')&&!!_0x469d1['getCustomProperty']('footnotesDefinitions');}function D(_0xdbfe04,_0x521617={}){const _0x386084=_0xdbfe04['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x2d4a66=_0xdbfe04['createContainerElement']('ol',{'class':'footnotes-list'},_0xdbfe04['createSlot']());return _0xdbfe04['createContainerElement']('div',{'class':'footnotes',..._0x521617},[_0x386084,_0x2d4a66]);}function b(_0x173d84,_0x95516e){const _0x118045=_0x173d84['getAttribute']('footnoteId'),_0x274387=_0x173d84['getAttribute']('footnoteCounter'),_0x50dc6a=_0x95516e['createUIElement']('a',{'href':'#'+_0x118045},function(_0x171083){const _0x3eb39b=this['toDomElement'](_0x171083);return _0x3eb39b['textContent']=_0x274387,_0x3eb39b;}),_0x5d02f9=_0x95516e['createContainerElement']('sup',{'id':'ref-'+_0x118045,'class':'footnote'},[_0x50dc6a]);return _0x5d02f9['getFillerOffset']=()=>null,_0x5d02f9;}function y(_0x3d03eb,_0x8fdce,_0x557b77,{dataPipeline:_0x208d7a}={}){const {t:t}=_0x557b77,_0x3e0472=_0x3d03eb['getAttribute']('footnoteId'),_0x45abba=_0x8fdce['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x3e0472},function(_0x3cb697){const _0x344cba=this['toDomElement'](_0x3cb697);return _0x344cba['innerText']='^',_0x344cba;}),_0x2fb18c=_0x208d7a?_0x8fdce['createContainerElement']('div',{'class':'footnote-content'}):_0x3848fd(_0x8fdce['createEditableElement']('div',{'class':'footnote-content'}),_0x8fdce,{'label':t('Footnote\x20content.')});return _0x8fdce['insert'](_0x8fdce['createPositionAt'](_0x2fb18c,0x0),_0x8fdce['createSlot']()),_0x8fdce['createContainerElement']('li',{'class':'footnote-definition','id':_0x3e0472},[_0x45abba,_0x2fb18c]);}class e extends _0xbda463{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x1d5283];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x850971}=this,{plugins:_0x1897f4,model:_0x25ad85}=_0x850971,_0x5d837b=_0x1897f4['get'](_0x1d5283),_0x346536=_0x1897f4['get'](f);this['listenTo'](_0x5d837b,'outputTransformation',(_0x9a2aa5,_0x1f09c6)=>{const _0x419625=l(_0x25ad85['createRangeIn'](_0x1f09c6['content']));if(!_0x419625['length'])return;const _0x2f9f6a=_0x346536['getFootnotes'](),_0x445f80=_0x419625['reduce']((_0x1d99c9,_0x3690de)=>{const _0x211bb8=_0x2f9f6a['find'](_0x584ab4=>_0x584ab4['id']===_0x3690de);if(_0x211bb8){const _0x438839=_0x850971['data']['toView'](_0x211bb8['definition'],{'isClipboardPipeline':!0x0}),_0x1fcd05=_0x850971['data']['htmlProcessor']['toData'](_0x438839);_0x1d99c9[_0x211bb8['id']]=_0x1fcd05;}return _0x1d99c9;},Object['create'](null));_0x1f09c6['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x445f80));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x318cb0}=this,{model:_0x2dc797,plugins:_0x2457e4}=_0x318cb0,{view:_0x367c44}=_0x318cb0['editing'],_0x353d78=_0x2457e4['get'](_0x1d5283),_0x5f14c5=_0x2457e4['get'](f),_0x4897fc=_0x318cb0['config']['get']('footnotes.multiBlock');let _0x30155f=null;this['listenTo'](_0x367c44['document'],'clipboardInput',(_0x3bbf19,_0x2fcdea)=>{const _0x1ad19e=_0x2fcdea['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x30155f=_0x1ad19e?JSON['parse'](_0x1ad19e):null;}),this['listenTo'](_0x353d78,'contentInsertion',(_0x1172e1,_0x1168e1)=>{const _0x30345a=_0x1168e1['sourceEditorId']===this['editor']['id'];_0x30345a&&'drop'===_0x1168e1['method']||_0x2dc797['change'](_0x73c11c=>{let _0x5a5f24=_0x5f14c5['getFootnotesDefinitionsObjectElement']();const _0xc9ef99=!!_0x5a5f24&&Array['from'](_0x2dc797['document']['selection']['getSelectedBlocks']())['includes'](_0x5a5f24);if(!_0x30155f&&function(_0x3aa636){for(const {item:_0x27702e}of _0x3aa636)if(_0x27702e['is']('element','footnoteRef'))return!0x0;return!0x1;}(_0x2dc797['createRangeIn'](_0x1168e1['content']))&&(_0x30155f=function(_0x103213,_0x421990){const _0x32edde=c(_0x103213,_0x421990);if(!_0x32edde)return null;const _0x53906b=Object['create'](null);for(const _0x139611 of _0x32edde['getChildren']())_0x139611['is']('element','footnoteDefinition')&&_0x139611['hasAttribute']('footnoteId')&&(_0x53906b[_0x139611['getAttribute']('footnoteId')]=_0x103213['cloneElement'](_0x139611,!0x0));return Object['keys'](_0x53906b)['length']?_0x53906b:null;}(_0x73c11c,_0x1168e1['content'])),(_0x5a5f24&&!_0xc9ef99||!_0x5a5f24&&!_0x30155f)&&function(_0xebe47a,_0x550c86){const _0x5a3dd5=[];for(const {item:_0xe2c811}of _0xebe47a['createRangeIn'](_0x550c86))_0xe2c811['is']('element','footnotesDefinitions')&&_0x5a3dd5['push'](_0xe2c811);for(const _0x1c07dc of _0x5a3dd5)_0xebe47a['remove'](_0x1c07dc);}(_0x73c11c,_0x1168e1['content']),!_0x30155f)return;const {selection:_0x4f24d8}=_0x2dc797['document'],_0x5b16ab=_0x4f24d8['getFirstRange']()['root'];_0x5a5f24&&!_0xc9ef99||(_0x5a5f24=c(_0x73c11c,_0x1168e1['content']),_0x5a5f24||=_0x5f14c5['_insertEmptyFootnotesDefinitionsContainer'](_0x73c11c,_0x5b16ab));const _0x17f83f=Array['from'](_0x4f24d8['getRanges']())['flatMap'](l),_0x5a34bc=function(_0x2d46e3,_0xf03201,_0x5ebdb5){const _0x158db8=Object['create'](null);for(const {item:_0x26fbd4}of _0x2d46e3['createRangeIn'](_0xf03201))if(_0x26fbd4['is']('element','footnoteRef')){const _0x48f16f=_0x26fbd4['getAttribute']('footnoteId');if(!_0x5ebdb5(_0x48f16f))continue;_0x158db8[_0x48f16f]||(_0x158db8[_0x48f16f]=_0x2aee84()),_0x2d46e3['setAttribute']('footnoteId',_0x158db8[_0x48f16f],_0x26fbd4);}return _0x158db8;}(_0x73c11c,_0x1168e1['content'],_0x5eb06b=>{if(!_0x30345a)return!0x0;return!!_0x5f14c5['getFootnote'](_0x5eb06b)&&!_0x17f83f['includes'](_0x5eb06b);});for(const [_0x21d4e1,_0x4a56b6]of Object['entries'](_0x30155f)){const _0x44b540=_0x5a34bc[_0x21d4e1]||_0x21d4e1;let _0x3d0a4b;if('string'!=typeof _0x4a56b6)_0x3d0a4b=_0x4a56b6,_0x44b540!==_0x21d4e1&&_0x73c11c['setAttribute']('footnoteId',_0x44b540,_0x3d0a4b);else{_0x3d0a4b=_0x73c11c['createElement']('footnoteDefinition',{'footnoteId':_0x44b540});const _0x43251e=_0x318cb0['data']['htmlProcessor']['toView'](_0x4a56b6);let _0x56d839;if(_0x4897fc)_0x56d839=_0x318cb0['data']['toModel'](_0x43251e,_0x3d0a4b);else{_0x56d839=_0x73c11c['createElement']('footnoteInlineContent');const _0x356b1f=_0x318cb0['data']['toModel'](_0x43251e,_0x56d839);_0x73c11c['insert'](_0x356b1f,_0x56d839);}_0x73c11c['append'](_0x56d839,_0x3d0a4b);}_0x73c11c['insert'](_0x3d0a4b,_0x5a5f24,'end');}_0x30155f=null;});});}}function c(_0x4c9146,_0x483756){for(const {item:_0x579de2}of _0x4c9146['createRangeIn'](_0x483756))if(_0x579de2['is']('element','footnotesDefinitions'))return _0x579de2;return null;}function l(_0x389969){const _0x1157b7=new Set();for(const {item:_0x34c424}of _0x389969)_0x34c424['is']('element','footnoteRef')&&_0x1157b7['add'](_0x34c424['getAttribute']('footnoteId'));return Array['from'](_0x1157b7);}class i extends _0xbda463{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x13ed8c}=this,{componentFactory:_0x114208}=_0x13ed8c['ui'];_0x114208['add']('insertFootnote',E(_0x13ed8c,_0x228e8a)),_0x114208['add']('menuBar:insertFootnote',E(_0x13ed8c,_0x37aab7)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x42b0f6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xa2e070;for(const _0x3b42a1 in _0x42b0f6){const _0x32553c=_0x3b42a1,_0x2fd598=_0x42b0f6[_0x32553c];if('footnotesLicenseKeyValid'==_0x2fd598||'footnotesLicenseKeyInvalid'==_0x2fd598||'footnotesLicenseKeyExpired'==_0x2fd598||'footnotesLicenseKeyDomainLimit'==_0x2fd598||'footnotesLicenseKeyNotAllowed'==_0x2fd598||'footnotesLicenseKeyEvaluationLimit'==_0x2fd598||'footnotesLicenseKeyUsageLimit'==_0x2fd598){delete _0x42b0f6[_0x32553c],_0xa2e070=_0x2fd598,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0xa2e070&&_0x42b0f6['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0xa2e070&&_0x42b0f6['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0xa2e070&&_0x42b0f6['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0xa2e070&&_0x42b0f6['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0xa2e070&&_0x42b0f6['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyUsageLimit'==_0xa2e070&&_0x42b0f6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function E(_0x4fe48e,_0x556d8c){const _0x3ea0b3=_0x4fe48e['commands']['get']('insertFootnote');return _0x22e25b=>{const {t:t}=_0x22e25b,_0x23409b=new _0x556d8c(_0x22e25b),_0xf676d5=_0x23409b instanceof _0x37aab7;return _0x23409b['bind']('isEnabled')['to'](_0x3ea0b3,'isEnabled'),_0x23409b['set']({'label':t(_0xf676d5?'Footnote':'Insert\x20footnote'),'icon':_0x33a085,'tooltip':!0x0}),_0x23409b['on']('execute',()=>{_0x3ea0b3['execute'](),_0x4fe48e['editing']['view']['focus']();}),_0x23409b;};}class lt extends _0xbda463{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const W=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x7b2849{['refresh'](){const {editor:_0xae2133}=this,_0x21ce6d=_0xae2133['plugins']['get'](f)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x21ce6d,this['value']=_0x21ce6d?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x3e7732}){const {editor:_0x8e40c5}=this,_0x4f523b=_0x8e40c5['plugins']['get'](f),_0x3fc3bc=_0x4f523b['getFootnotesDefinitionsObjectElement']();_0x3fc3bc&&W['includes'](_0x3e7732)&&_0x8e40c5['model']['change'](_0x565539=>{_0x565539['setAttribute']('footnotesListStyle',_0x3e7732,_0x3fc3bc),_0x4f523b['_updateFootnotesCounters'](_0x565539);});}}class C extends _0x7b2849{['refresh'](){const {editor:_0x2471bc}=this,_0x3dd496=_0x2471bc['plugins']['get'](f)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x3dd496,this['value']=_0x3dd496?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x516ed8}){const {editor:_0x17a62d}=this,_0x37bb43=_0x17a62d['plugins']['get'](f),_0x539714=_0x37bb43['getFootnotesDefinitionsObjectElement']();_0x539714&&Number['isInteger'](_0x516ed8)&&_0x17a62d['model']['change'](_0x45c388=>{_0x45c388['setAttribute']('footnotesListStart',_0x516ed8,_0x539714),_0x37bb43['_updateFootnotesCounters'](_0x45c388);});}}class P extends _0xbda463{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x303a21}=this;_0x303a21['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x303a21['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x303a21['commands']['add']('footnotesStyle',new S(_0x303a21)),_0x303a21['commands']['add']('footnotesStart',new C(_0x303a21)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x26cf41}=this,{schema:_0x194738}=_0x26cf41['model'];_0x194738['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x455296}=this,{conversion:_0x46eaa2,model:_0x52b040}=_0x455296,{schema:_0x1d1c6a}=_0x52b040;_0x46eaa2['for']('upcast')['add'](_0x599bff=>{_0x599bff['on']('element:ol',(_0x2365ae,_0x4b3a23,_0x2df20a)=>{const _0x390ce8=_0x4b3a23['viewItem'],_0x27d907=_0x4b3a23['modelCursor']?.['parent'];_0x390ce8['hasClass']('footnotes-list')&&_0x27d907?.['is']('element','footnotesDefinitions')&&(function(_0xd7dd1,_0x3fa5aa,_0x414d9d,_0x405aef){if(!_0x405aef['checkAttribute'](_0x3fa5aa,'footnotesListStart'))return;let _0xcb92de=0x1;const _0x198687=_0x414d9d['consumable']['consume'](_0xd7dd1,{'attributes':'start'});if(_0x198687){const _0x5c8bb0=Number['parseInt'](_0xd7dd1['getAttribute']('start'),0xa);Number['isNaN'](_0x5c8bb0)||(_0xcb92de=_0x5c8bb0);}!_0x198687&&_0x3fa5aa['hasAttribute']('footnotesListStart')||_0x414d9d['writer']['setAttribute']('footnotesListStart',_0xcb92de,_0x3fa5aa);}(_0x390ce8,_0x27d907,_0x2df20a,_0x1d1c6a),function(_0x2fb234,_0x1db463,_0x5d1d4f,_0x5d8122){if(!_0x5d8122['checkAttribute'](_0x1db463,'footnotesListStyle'))return;let _0x4f1e32='decimal',_0x4b7307=!0x1;if(_0x5d1d4f['consumable']['consume'](_0x2fb234,{'attributes':'type'})){const _0x26b2ad={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x2fb234['getAttribute']('type')];_0x26b2ad&&(_0x4f1e32=_0x26b2ad),_0x4b7307=!0x0;}_0x5d1d4f['consumable']['consume'](_0x2fb234,{'styles':'list-style-type'})&&(_0x4f1e32=function(_0x20b233){switch(_0x20b233){case'lower-alpha':return'lower-latin';case'upper-alpha':return'upper-latin';default:return _0x20b233;}}(_0x2fb234['getStyle']('list-style-type')),_0x4b7307=!0x0),!_0x4b7307&&_0x1db463['hasAttribute']('footnotesListStyle')||_0x5d1d4f['writer']['setAttribute']('footnotesListStyle',_0x4f1e32,_0x1db463);}(_0x390ce8,_0x27d907,_0x2df20a,_0x1d1c6a));});}),_0x46eaa2['for']('downcast')['add'](_0x23b2ea=>{_0x23b2ea['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x368b37,_0x500883,_0x4dc8bf)=>{if(!_0x4dc8bf['consumable']['consume'](_0x500883['item'],_0x368b37['name']))return;const _0x5bb8f1=M(_0x500883['item'],_0x4dc8bf['mapper']),{attributeNewValue:_0x4e5319}=_0x500883;null==_0x4e5319||0x1===_0x4e5319?_0x4dc8bf['writer']['removeAttribute']('start',_0x5bb8f1):_0x4dc8bf['writer']['setAttribute']('start',String(_0x4e5319),_0x5bb8f1);}),_0x23b2ea['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x259d0e,_0x366b4b,_0x5d719c)=>{if(!_0x5d719c['consumable']['consume'](_0x366b4b['item'],_0x259d0e['name']))return;const _0x3d2e48=M(_0x366b4b['item'],_0x5d719c['mapper']),{attributeNewValue:_0x209d4d}=_0x366b4b;_0x209d4d&&'decimal'!==_0x209d4d?_0x5d719c['writer']['setStyle']('list-style-type',_0x209d4d,_0x3d2e48):_0x5d719c['writer']['removeStyle']('list-style-type',_0x3d2e48);});});}['_definePostfixer'](){const {editor:_0x50d2d3}=this,{model:_0x498803}=_0x50d2d3,_0x3b5834=_0x50d2d3['plugins']['get'](f),_0x5af9ff=this['_getDefaultListStyle'](),_0x1efca1=this['_getDefaultStartIndex']();_0x498803['document']['registerPostFixer'](_0x36a5c=>{const _0x27cca0=_0x498803['document']['differ']['getChanges']();let _0x5b9323=!0x1;for(const _0x4a1887 of _0x27cca0){if('insert'!==_0x4a1887['type']||'$text'===_0x4a1887['name'])continue;const _0x180f0f=_0x498803['createRangeOn'](_0x4a1887['position']['nodeAfter']);for(const _0x3d6e51 of _0x180f0f['getItems']())_0x3d6e51['is']('element','footnotesDefinitions')&&(!_0x3d6e51['hasAttribute']('footnotesListStart')&&_0x498803['schema']['checkAttribute'](_0x3d6e51,'footnotesListStart')&&(_0x36a5c['setAttribute']('footnotesListStart',_0x1efca1,_0x3d6e51),_0x5b9323=!0x0),!_0x3d6e51['hasAttribute']('footnotesListStyle')&&_0x498803['schema']['checkAttribute'](_0x3d6e51,'footnotesListStyle')&&(_0x36a5c['setAttribute']('footnotesListStyle',_0x5af9ff,_0x3d6e51),_0x5b9323=!0x0));}return _0x5b9323&&_0x3b5834['_updateFootnotesCounters'](_0x36a5c),_0x5b9323;});}['_defineFormatter'](){const {editor:_0x5a48ed}=this;_0x5a48ed['plugins']['get'](f)['setFootnoteFormatter'](_0x2153a0=>this['_formatFootnoteListValue'](_0x2153a0));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x458681,value:_0x3c463d,digits:_0x5eaf23}){const _0x1c0bce=_0x458681['getAttribute']('footnotesListStyle'),_0x5e62d9=_0x458681['getAttribute']('footnotesListStart'),_0x58626c=Math['floor'](_0x3c463d)+(_0x5e62d9??0x1)-0x1;switch(_0x1c0bce){case'decimal-leading-zero':return function(_0x33755d,_0xeafe15){return String(_0x33755d)['padStart'](_0xeafe15,'0');}(_0x58626c,Math['max'](0x2,_0x5eaf23));case'lower-alpha':case'lower-latin':return N(_0x58626c,!0x1);case'upper-alpha':case'upper-latin':return N(_0x58626c,!0x0);case'lower-roman':return X(_0x58626c,!0x1);case'upper-roman':return X(_0x58626c,!0x0);default:return String(_0x58626c);}}}function M(_0x5befcb,_0x326e3c){const _0x32ecd0=_0x326e3c['toViewElement'](_0x5befcb);return Array['from'](_0x32ecd0['getChildren']())['find'](_0x26d577=>_0x26d577['is']('element','ol')&&_0x26d577['hasClass']('footnotes-list'));}function N(_0x640d5b,_0x7c48b6){let _0x2ac831='',_0x19cd4e=_0x640d5b;for(;_0x19cd4e>0x0;){const _0xa7168b=(_0x19cd4e-0x1)%0x1a;_0x2ac831=String['fromCharCode'](0x61+_0xa7168b)+_0x2ac831,_0x19cd4e=Math['floor']((_0x19cd4e-0x1)/0x1a);}return _0x7c48b6?_0x2ac831['toUpperCase']():_0x2ac831;}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(_0x375bb0,_0x40d5ab){let _0x1c3f19='',_0x474147=_0x375bb0;for(const {value:_0x444612,numeral:_0x3e7e06}of V)for(;_0x474147>=_0x444612;)_0x1c3f19+=_0x3e7e06,_0x474147-=_0x444612;return _0x40d5ab?_0x1c3f19:_0x1c3f19['toLowerCase']();}class J extends _0x3afb27{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new rt();['keystrokes']=new nt();['focusables']=new _0x31d3b1();['focusCycler'];constructor(_0xb9e02f,{styleButtonViews:_0x52484e,styleGridAriaLabel:_0x4f16e3}){super(_0xb9e02f),(this['focusCycler']=new tt({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x52484e,_0x4f16e3),[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 _0x46624c of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x46624c['element']);st({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>at['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 _0x2bb72e=_0x22f8f3=>_0x22f8f3['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2bb72e),this['keystrokes']['set']('arrowleft',_0x2bb72e),this['keystrokes']['set']('arrowup',_0x2bb72e),this['keystrokes']['set']('arrowdown',_0x2bb72e);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x2c9a1d,_0x3fec60){const _0x2c6166=new _0x3afb27(this['locale']);return _0x2c6166['children']=_0x2c6166['createCollection'](),_0x2c6166['children']['addMany'](_0x2c9a1d),_0x2c6166['setTemplate']({'tag':'div','attributes':{'aria-label':_0x3fec60,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x2c6166['children']}),_0x2c6166['children']['delegate']('execute')['to'](this),_0x2c6166['focus']=function(){for(const _0x3cf0dd of this['children'])if(_0x3cf0dd instanceof _0x228e8a&&_0x3cf0dd['isOn'])return void _0x3cf0dd['focus']();this['children']['first']['focus']();},_0x2c6166['focusTracker']=new rt(),_0x2c6166['keystrokes']=new nt(),_0x2c6166['render'](),_0x2c6166['keystrokes']['listenTo'](_0x2c6166['element']),this['children']['add'](_0x2c6166),_0x2c6166;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x392f5b=this['_createStartIndexPropertyView'](),_0x368279=[_0x392f5b],_0x4725fa=new it(this['locale'],_0x368279);return _0x4725fa['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x4725fa['buttonView']['bind']('isEnabled')['toMany'](_0x368279,'isEnabled',(..._0x48c666)=>_0x48c666['some'](_0x51bddd=>_0x51bddd)),_0x4725fa['buttonView']['on']('change:isEnabled',(_0x4b90d6,_0x2ce2f5,_0x1f08b3)=>{_0x1f08b3||(_0x4725fa['isCollapsed']=!0x0);}),this['children']['add'](_0x4725fa),[_0x392f5b,_0x4725fa];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x2c31e1=new et(this['locale'],ot);return _0x2c31e1['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x2c31e1['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x2c31e1['fieldView']['on']('input',()=>{const _0x29cca2=_0x2c31e1['fieldView']['element'],_0x55360d=_0x29cca2['valueAsNumber'];Number['isNaN'](_0x55360d)?_0x2c31e1['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x29cca2['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x55360d}):_0x2c31e1['errorText']=t(_0x55360d<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x2c31e1;}}class j extends _0xbda463{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x1a9cc0,_0x3c578e];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2ae279}=this,{componentFactory:_0x42aa7c}=_0x2ae279['ui'];_0x2ae279['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x42aa7c['add']('footnotesStyle',function(_0x12bd94){return _0x423688=>{const {t:t}=_0x423688,_0x3e0196=_0x12bd94['commands']['get']('footnotesStyle'),_0x30f035=_0x2bbf50(_0x423688),{buttonView:_0x2dd9ec}=_0x30f035;return _0x30f035['class']='ck-footnotes-styles-dropdown',_0x30f035['bind']('isEnabled')['to'](_0x3e0196,'isEnabled'),_0x2dd9ec['set']({'label':t('Footnotes\x20style'),'icon':_0x33a085,'tooltip':!0x0}),_0x30f035['once']('change:isOpen',()=>{const _0x4ecf4b=function({editor:_0x49f25a,dropdownView:_0x2a54ba}){const {t:t}=_0x49f25a['locale'],_0x3b0737=t('Footnotes\x20definitions\x20styles'),_0x585e83=function(_0x49cc1d){const t=_0x49cc1d['locale']['t'],_0x12fa7e=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x427384},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0xe96110},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x5667cf},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x42d2a1},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x30bb87},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0xe98f80}];return _0x12fa7e['map'](function(_0x56daf9){const _0x3e68ef=_0x56daf9['locale'];return({label:_0x23e33b,icon:_0x583af1,tooltip:_0x250b4f,style:_0x1fbe57})=>{const _0x489c71=_0x56daf9['commands']['get']('footnotesStyle'),_0x3bd8a2=new _0x228e8a(_0x3e68ef);return _0x3bd8a2['set']({'label':_0x23e33b,'icon':_0x583af1,'tooltip':_0x250b4f}),_0x3bd8a2['bind']('isOn')['to'](_0x489c71,'value',_0x463499=>_0x463499===_0x1fbe57),_0x3bd8a2['bind']('isEnabled')['to'](_0x489c71,'isEnabled'),_0x3bd8a2['on']('execute',()=>{_0x56daf9['execute']('footnotesStyle',{'value':_0x1fbe57}),_0x56daf9['editing']['view']['focus']();}),_0x3bd8a2;};}(_0x49cc1d));}(_0x49f25a),_0x4256a0=new J(_0x49f25a['locale'],{'styleGridAriaLabel':_0x3b0737,'styleButtonViews':_0x585e83}),_0x30ae9b=_0x49f25a['commands']['get']('footnotesStart');return _0x4256a0['startIndexFieldView']['bind']('isEnabled')['to'](_0x30ae9b),_0x4256a0['startIndexFieldView']['fieldView']['bind']('value')['to'](_0x30ae9b),_0x4256a0['on']('footnotesListStart',(_0x26636d,_0x5c4b5f)=>{_0x49f25a['execute']('footnotesStart',{'value':_0x5c4b5f['startIndex']});}),_0x4256a0['delegate']('execute')['to'](_0x2a54ba),_0x4256a0;}({'editor':_0x12bd94,'dropdownView':_0x30f035});_0x30f035['panelView']['children']['add'](_0x4ecf4b);}),_0x30f035;};}(_0x2ae279));}['afterInit'](){const {editor:_0x297ae4}=this,{t:t}=_0x297ae4['locale'],_0x3eb61d=_0x297ae4['plugins']['get'](_0x3c578e),{defaultPositions:_0x377a6c}=_0x2cd6ae;_0x3eb61d['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x297ae4['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x3a9907=>{let _0x1c4b1c=_0x3a9907['getFirstPosition']()?.['parent'];return _0x1c4b1c?.['is']('$text')&&(_0x1c4b1c=_0x1c4b1c['parent']),_0x1c4b1c?.['is']('element')?_0x1c4b1c['findAncestor'](Q):null;},'positions':[_0x377a6c['southArrowNorth'],_0x377a6c['southArrowNorthMiddleWest'],_0x377a6c['southArrowNorthMiddleEast'],_0x377a6c['southArrowNorthWest'],_0x377a6c['southArrowNorthEast'],_0x377a6c['northArrowSouth'],_0x377a6c['northArrowSouthMiddleWest'],_0x377a6c['northArrowSouthMiddleEast'],_0x377a6c['northArrowSouthWest'],_0x377a6c['northArrowSouthEast'],_0x377a6c['viewportStickyNorth']]});}}class ft extends _0xbda463{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,f as FootnotesTracker,i as FootnotesUI,h as InsertFootnoteCommand};
23
+ import{Plugin as _0x28ad1a,Command as _0x5958dd}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x405142,isWidget as _0xf54cfb,toWidgetEditable as _0x26e123,WidgetToolbarRepository as _0x46b3ea}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x1ab937,logWarning as _0x45e170,FocusTracker as rt,KeystrokeHandler as nt,global as at}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x43b852,ClickObserver as _0xef81ac}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x9bd623}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x4770d4,ButtonView as _0x386d83,View as _0x36d4e0,ViewCollection as _0x121f84,FocusCycler as tt,addKeyboardHandlingForGrid as st,CollapsibleView as it,LabeledFieldView as et,createLabeledInputNumber as ot,ContextualBalloon as _0xdfabb8,BalloonPanelView as _0x3b35f0,createDropdown as _0x297dae}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x3c632d,IconListStyleDecimal as _0x45c6ef,IconListStyleDecimalLeadingZero as _0x2fdb02,IconListStyleLowerRoman as _0x2fd9e2,IconListStyleUpperRoman as _0x511099,IconListStyleLowerLatin as _0x45b2e7,IconListStyleUpperLatin as _0x12d59a}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x3cde04,_0x170f5e){this['_model']=_0x3cde04,this['_elementName']=_0x170f5e['elementName'],this['_getElementKey']=_0x170f5e['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x15b2e0){const _0x3dc075=new Set(),_0x539e02=new Map();for(const _0x3daa50 of _0x15b2e0){if('insert'===_0x3daa50['type']&&'$text'!==_0x3daa50['name']&&_0x3daa50['position']['nodeAfter']){const _0x427016=this['_model']['createRangeOn'](_0x3daa50['position']['nodeAfter']);for(const _0x2d55ac of _0x427016['getItems']()){if(!_0x2d55ac['is']('element',this['_elementName']))continue;const _0x34312a=this['_getElementKey'](_0x2d55ac);_0x539e02['has'](_0x34312a)||_0x539e02['set'](_0x34312a,[]),_0x539e02['get'](_0x34312a)['push'](_0x2d55ac);}}if('remove'===_0x3daa50['type']&&_0x3daa50['name']===this['_elementName']){const _0x34633a=this['_getElementKey']({'getAttribute':_0x318347=>_0x3daa50['attributes']['get'](_0x318347)});_0x3dc075['add'](_0x34633a);}}for(const [_0x2ff0d8,_0x30bf89]of this['_trackedElements'])'$graveyard'===_0x30bf89['root']['rootName']&&_0x3dc075['add'](_0x2ff0d8);for(const _0x5babe5 of _0x3dc075)this['_trackedElements']['delete'](_0x5babe5);for(const [_0x22d388,_0x23822e]of _0x539e02)this['_trackedElements']['set'](_0x22d388,_0x23822e[_0x23822e['length']-0x1]);const _0x1124d9=new Set();for(const [_0x32851d,_0x47b793]of _0x539e02)_0x3dc075['has'](_0x32851d)&&(_0x1124d9['add'](_0x47b793[0x0]),_0x47b793['length']>0x1?_0x539e02['set'](_0x32851d,_0x47b793['slice'](0x1)):_0x539e02['delete'](_0x32851d),_0x3dc075['delete'](_0x32851d));return{'removed':Array['from'](_0x3dc075),'inserted':Array['from'](_0x539e02['values']())['flat'](),'moved':Array['from'](_0x1124d9)};}}class f extends _0x28ad1a{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ed50f){super(_0x2ed50f),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x20bb66=>_0x20bb66['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x2c2b9f=>_0x2c2b9f['getAttribute']('footnoteId')});}['init'](){const {editor:_0x22a848}=this,{model:_0x44f8cc,data:_0x2f17f9}=_0x22a848;_0x44f8cc['document']['registerPostFixer'](_0x63cfa8=>{const _0x3f2021=_0x44f8cc['document']['differ']['getChanges']();let _0x1b01d3=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x63cfa8,_0x3f2021)&&(_0x1b01d3=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x63cfa8,_0x3f2021)&&(_0x1b01d3=!0x0),this['_handleFootnoteReferencesChanges'](_0x63cfa8,_0x3f2021)&&(_0x1b01d3=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x63cfa8)&&(_0x1b01d3=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x63cfa8)&&(_0x1b01d3=!0x0),this['_sortFootnoteDefinitions'](_0x63cfa8)&&(_0x1b01d3=!0x0),_0x1b01d3;}),this['listenTo'](_0x44f8cc['document'],'change:data',()=>{_0x44f8cc['enqueueChange']({'isUndoable':!0x1},_0x12a011=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x12a011);});},{'priority':'low'}),this['listenTo'](_0x2f17f9,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x4057ac){return this['_footnotes']['find'](_0x234fbf=>_0x234fbf['id']===_0x4057ac)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x5e4a8e){this['_footnoteFormatter']=_0x5e4a8e;}['_updateFootnotesCounters'](_0x1a5d73,_0x46e7ac=0x0){let _0x396d67=!0x1;for(let _0x4cfefa=_0x46e7ac;_0x4cfefa<this['_footnotes']['length'];_0x4cfefa++)this['_updateFootnoteRefCounter'](_0x1a5d73,_0x4cfefa)&&(_0x396d67=!0x0);return _0x396d67;}['_insertEmptyFootnotesDefinitionsContainer'](_0x1351a4,_0x10c5d4){const _0x493107=_0x1351a4['createElement']('footnotesDefinitions',{});return _0x1351a4['append'](_0x493107,_0x10c5d4),this['_footnotesDefinitions']=_0x493107,_0x493107;}['_ensureFootnotesDefinitionsContainerExists'](_0x1bc8da){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x9f1838=this['_footnotes'][0x0]['reference']['root'],_0x102e6d=this['_insertEmptyFootnotesDefinitionsContainer'](_0x1bc8da,_0x9f1838);for(const _0x1a16fa of this['_footnotes'])_0x1a16fa['definition']['parent']||_0x1bc8da['insert'](_0x1a16fa['definition'],_0x102e6d,'end');this['_updateFootnotesCounters'](_0x1bc8da);}['_handleFootnotesDefinitionsObjectChanges'](_0x67c91,_0x1a1ea5){let _0x4d29b1=!0x1;const {inserted:_0x3c3570,removed:_0x311f15,moved:_0xbdc6cc}=this['_footnoteDefsContainerTracker']['getChanges'](_0x1a1ea5);if(_0xbdc6cc['length']&&(this['_footnotesDefinitions']=_0xbdc6cc[0x0]),_0x3c3570['length']){if(_0x3c3570['length']>0x1||this['_footnotesDefinitions']&&_0x3c3570['some'](_0x36b037=>_0x36b037!==this['_footnotesDefinitions'])){const _0x445564=_0x67c91['createElement']('footnotesDefinitions',{}),_0x35cf51=[];this['_footnotesDefinitions']&&_0x35cf51['push'](this['_footnotesDefinitions']),_0x35cf51['push'](..._0x3c3570),_0x67c91['insert'](_0x445564,_0x35cf51[0x0],'before');for(const _0x3d8e85 of _0x35cf51)_0x67c91['move'](_0x67c91['createRangeIn'](_0x3d8e85),_0x67c91['createPositionAt'](_0x445564,'end')),_0x67c91['remove'](_0x3d8e85);this['_footnotesDefinitions']=_0x445564,this['_updateFootnotesCounters'](_0x67c91),_0x4d29b1=!0x0;}else this['_footnotesDefinitions']=_0x3c3570[0x0];}if(_0x311f15['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x2e0d65 of this['_footnotes'])_0x67c91['remove'](_0x2e0d65['reference']),_0x4d29b1=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x4d29b1;}['_handleFootnoteDefinitionsChanges'](_0x17d400,_0x4a76ed){let _0xd752e2=!0x1;const _0x4436d5=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x4b9c22,moved:_0x172850}=this['_footnoteDefsTracker']['getChanges'](_0x4a76ed);for(const _0x102a11 of[..._0x172850,..._0x4b9c22]){const _0x3655c9=_0x102a11['getAttribute']('footnoteId'),_0x449bd0=this['getFootnote'](_0x3655c9);_0x449bd0&&(_0x449bd0['definition']=_0x102a11),_(_0x17d400,_0x4436d5,_0x102a11)&&(_0xd752e2=!0x0);}return _0xd752e2;}['_handleFootnoteReferencesChanges'](_0x26b595,_0x2bdda2){let _0xbe4610=!0x1;const {removed:_0x562551,inserted:_0x25940a,moved:_0x36942c}=this['_footnoteRefsTracker']['getChanges'](_0x2bdda2);for(const _0x177dd3 of _0x562551)this['_handleRemoveFootnoteReferenceById'](_0x26b595,_0x177dd3)&&(_0xbe4610=!0x0);for(const _0x299229 of _0x25940a)this['_handleInsertedFootnoteReference'](_0x26b595,_0x299229)&&(_0xbe4610=!0x0);for(const _0x5b2944 of _0x36942c)this['_handleMovedFootnoteReference'](_0x26b595,_0x5b2944)&&(_0xbe4610=!0x0);return _0xbe4610;}['_handleFootnotesDefinitionsObjectSync'](_0x33394c){if(!this['_footnotesDefinitions'])return!0x1;let _0x4a30c6=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x5bc239=[];for(const _0x4b5408 of this['_footnotesDefinitions']['getChildren']()){const _0x4fb00f=_0x4b5408['getAttribute']('footnoteId');this['getFootnote'](_0x4fb00f)||(_0x5bc239['unshift'](_0x4b5408),_0x4a30c6=!0x0);}for(const _0xe8a7da of _0x5bc239)_0x33394c['remove'](_0xe8a7da);}const _0x1d1f4f=new Set(),_0x400659=[];for(const _0x201690 of this['_footnotesDefinitions']['getChildren']()){const _0x14984b=_0x201690['getAttribute']('footnoteId');_0x1d1f4f['has'](_0x14984b)?(_0x400659['unshift'](_0x201690),_0x4a30c6=!0x0):_0x1d1f4f['add'](_0x14984b);}for(const _0x585d90 of _0x400659)_0x33394c['remove'](_0x585d90);return this['_footnotesDefinitions']['childCount']||(_0x33394c['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x4a30c6=!0x0),_0x4a30c6;}['_handleInsertedFootnoteReference'](_0x5b220b,_0x5198d2){if(this['_footnotes']['find'](_0x8a70ac=>_0x8a70ac['reference']===_0x5198d2))return!0x1;let _0x4f1a43=!0x1;const _0x20bb7f=_0x5198d2['getAttribute']('footnoteId'),_0x465914=this['_footnotes']['findIndex'](_0x55a912=>_0x55a912['id']===_0x20bb7f);-0x1!==_0x465914&&(_0x5b220b['remove'](this['_footnotes'][_0x465914]['reference']),this['_footnotes']['splice'](_0x465914,0x1),_0x4f1a43=!0x0);let _0x38163c=this['_footnotesDefinitions']?function(_0x57a29d,_0x5674cb){for(const _0x464196 of _0x57a29d['getChildren']())if(_0x464196['getAttribute']('footnoteId')===_0x5674cb)return _0x464196;return null;}(this['_footnotesDefinitions'],_0x20bb7f):null;_0x38163c||(_0x38163c=_0x5b220b['createElement']('footnoteDefinition',{'footnoteId':_0x20bb7f}),this['_footnotesDefinitions']&&(_0x5b220b['insert'](_0x38163c,this['_footnotesDefinitions'],'end'),_0x4f1a43=!0x0));const _0x54aa43={'id':_0x20bb7f,'reference':_0x5198d2,'definition':_0x38163c},_0x361401=I(this['editor']['model'],this['_footnotes'],_0x5198d2);this['_footnotes']['splice'](_0x361401,0x0,_0x54aa43);let _0x3790bf=_0x361401;return-0x1!==_0x465914&&(_0x3790bf=Math['min'](_0x361401,_0x465914)),this['_updateFootnotesCounters'](_0x5b220b,_0x3790bf)&&(_0x4f1a43=!0x0),_0x4f1a43;}['_handleRemoveFootnoteReferenceById'](_0x342df9,_0x51383a){const _0x35f414=this['_footnotes']['findIndex'](_0x4318a5=>_0x4318a5['id']===_0x51383a);if(-0x1===_0x35f414)return!0x1;let _0x31fc3c=!0x1;const _0x172ab3=this['_footnotes'][_0x35f414];return'$graveyard'!==_0x172ab3['definition']['root']['rootName']&&(_0x342df9['remove'](_0x172ab3['definition']),_0x31fc3c=!0x0),this['_footnotes']['splice'](_0x35f414,0x1),this['_updateFootnotesCounters'](_0x342df9,_0x35f414)&&(_0x31fc3c=!0x0),_0x31fc3c;}['_handleMovedFootnoteReference'](_0x5717de,_0x4743ce){const _0x46a6f5=_0x4743ce['getAttribute']('footnoteId'),_0x1f7db6=this['_footnotes']['findIndex'](_0x400675=>_0x400675['id']===_0x46a6f5),_0x1153fe=this['_footnotes'][_0x1f7db6];let _0x378773=!0x1;_0x1153fe['reference']=_0x4743ce,this['_footnotes']['splice'](_0x1f7db6,0x1);const _0x1cf82a=I(this['editor']['model'],this['_footnotes'],_0x4743ce);return this['_footnotes']['splice'](_0x1cf82a,0x0,_0x1153fe),this['_updateFootnotesCounters'](_0x5717de,Math['min'](_0x1f7db6,_0x1cf82a))&&(_0x378773=!0x0),_0x378773;}['_updateFootnoteRefCounter'](_0x6d68e0,_0x4eeec5){if(!this['_footnotesDefinitions'])return!0x1;const _0x4807ec=this['_footnotes'][_0x4eeec5];let _0x301068;return _0x301068=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x4807ec,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x4eeec5+0x1}):String(_0x4eeec5+0x1),_0x4807ec['reference']['getAttribute']('footnoteCounter')!=_0x301068&&(_0x6d68e0['setAttribute']('footnoteCounter',_0x301068,_0x4807ec['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x4aa10d){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x297bb4,_0x4cc2e5){if(_0x297bb4['length']!==_0x4cc2e5['length'])return!0x1;for(let _0x2b60dd=0x0;_0x2b60dd<_0x297bb4['length'];_0x2b60dd++)if(_0x297bb4[_0x2b60dd]!==_0x4cc2e5[_0x2b60dd])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x384b6b=>_0x384b6b['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x2c5107=>_0x2c5107['getAttribute']('footnoteId'))))return!0x1;let _0x5b55f6=!0x1;for(let _0x15ac8c=0x0;_0x15ac8c<this['_footnotes']['length'];_0x15ac8c++){const _0x3d95a6=this['_footnotes'][_0x15ac8c],_0x2f74f2=_0x4aa10d['createPositionBefore'](_0x3d95a6['definition']),_0x217691=_0x4aa10d['createPositionAt'](this['_footnotesDefinitions'],_0x15ac8c);_0x2f74f2['isEqual'](_0x217691)||(_0x4aa10d['move'](_0x4aa10d['createRangeOn'](_0x3d95a6['definition']),_0x217691),_0x5b55f6=!0x0);}return _0x5b55f6;}['_ensureFootnotesReferencesHaveProperOrder'](_0x189a37){if(!this['_footnotes']['length'])return!0x1;const {model:_0x2d6f6e}=this['editor'];let _0x244115=!0x1;for(let _0x214924=0x0;_0x214924<this['_footnotes']['length']-0x1;_0x214924++){const _0x208879=this['_footnotes'][_0x214924],_0x561c7c=this['_footnotes'][_0x214924+0x1],_0x4bf9f9=_0x2d6f6e['createPositionBefore'](_0x208879['reference']),_0x4235f8=_0x2d6f6e['createPositionBefore'](_0x561c7c['reference']);'after'===_0x4bf9f9['compareWith'](_0x4235f8)&&(this['_handleMovedFootnoteReference'](_0x189a37,_0x208879['reference']),_0x214924=-0x1,_0x244115=!0x0);}return _0x244115;}}function _(_0x26f5fb,_0x547ded,_0x50c12e){if(_0x50c12e['childCount'])return!0x1;const _0x5e40ee=_0x547ded?'paragraph':'footnoteInlineContent';return _0x26f5fb['insert'](_0x26f5fb['createElement'](_0x5e40ee),_0x50c12e),!0x0;}function I(_0x32e346,_0xfa9e21,_0x5b7419){if(0x0===_0xfa9e21['length'])return 0x0;const _0x8ffc9f=_0x32e346['createPositionBefore'](_0x5b7419);for(let _0xaf7995=0x0;_0xaf7995<_0xfa9e21['length'];_0xaf7995++){const _0x516855=_0xfa9e21[_0xaf7995],_0x177fe4=_0x32e346['createPositionBefore'](_0x516855['reference']);if('before'===_0x8ffc9f['compareWith'](_0x177fe4))return _0xaf7995;}const _0x11376a=_0x5b7419['root'];let _0xc055a7=-0x1;for(let _0x573549=_0xfa9e21['length']-0x1;_0x573549>=0x0;_0x573549--)if(_0xfa9e21[_0x573549]['reference']['root']===_0x11376a){_0xc055a7=_0x573549;break;}if(-0x1!==_0xc055a7)return _0xc055a7+0x1;const _0x42681c=_0x32e346['document']['getRootNames'](),_0xa19060=_0x42681c['indexOf'](_0x11376a['rootName']),_0x235691=_0x42681c[_0xa19060+0x1];if(_0x235691){for(let _0x300093=0x0;_0x300093<_0xfa9e21['length'];_0x300093++)if(_0xfa9e21[_0x300093]['reference']['root']['rootName']===_0x235691)return _0x300093;}return _0xfa9e21['length'];}class h extends _0x5958dd{['refresh'](){const _0xa2f7e2=this['editor']['model']['document']['selection'],_0x57873b=this['_getPositionToInsertFootnote'](_0xa2f7e2);this['isEnabled']=!!_0x57873b;}['execute'](_0x33b9ef){const {editor:_0x4a71cd}=this,{model:_0x1a51c7}=_0x4a71cd,{selection:_0x40e9d9}=_0x1a51c7['document'],_0x5dcb94=this['_getPositionToInsertFootnote'](_0x40e9d9);if(!_0x5dcb94)return;const _0x1d9d08=_0x4a71cd['plugins']['get']('FootnotesEditing'),_0x415aad=_0x33b9ef?.['footnoteId']??_0x1ab937();!function(_0x3aebc9){return'string'==typeof _0x3aebc9&&_0x3aebc9['length']>0x0&&!/\s/['test'](_0x3aebc9)&&!/^\d/['test'](_0x3aebc9);}(_0x415aad)?_0x45e170('insert-footnote-command-executed-with-invalid-id'):(_0x1a51c7['change'](_0x3f35fd=>{const _0x4ef75e=_0x3f35fd['createElement']('footnoteRef',{'footnoteId':_0x415aad});_0x1a51c7['insertObject'](_0x4ef75e,_0x5dcb94,null);}),_0x1d9d08['_moveSelectionToFootnoteDefinition'](_0x415aad));}['_getPositionToInsertFootnote'](_0x5e6835){const {model:_0x443f2a}=this['editor'],{schema:_0x1a4252}=_0x443f2a,_0x5aa1b0=_0x5e6835['getFirstRange']();for(const _0x4fcd53 of _0x5aa1b0['getItems']())if(_0x1a4252['isBlock'](_0x4fcd53)||_0x1a4252['isObject'](_0x4fcd53))return null;const _0x45004f=_0x5aa1b0['end'];return _0x1a4252['checkChild'](_0x45004f,'footnoteRef')?_0x45004f:null;}}class r extends _0x28ad1a{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x31f1af}=this;_0x31f1af['config']['define']('footnotes.multiBlock',!0x0),_0x31f1af['commands']['add']('insertFootnote',new h(_0x31f1af)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x3720ec){const _0x219d10=_0xe0ebb6([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]),_0x46dd1f=0x47a28506,_0x1b7a6d=0x47a5fbce^_0x46dd1f,_0x14330c=window[_0xe0ebb6([0x44,0x61,0x74,0x65])][_0xe0ebb6([0x6e,0x6f,0x77])](),_0x2f1fa7=_0x3720ec[_0xe0ebb6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x347f70=new window[(_0xe0ebb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe6f244=>{_0x2f1fa7[_0xe0ebb6([0x6f,0x6e,0x63,0x65])](_0xe0ebb6([0x72,0x65,0x61,0x64,0x79]),_0xe6f244);}),_0x2bc2a2={[_0xe0ebb6([0x6b,0x74,0x79])]:_0xe0ebb6([0x45,0x43]),[_0xe0ebb6([0x75,0x73,0x65])]:_0xe0ebb6([0x73,0x69,0x67]),[_0xe0ebb6([0x63,0x72,0x76])]:_0xe0ebb6([0x50,0x2d,0x32,0x35,0x36]),[_0xe0ebb6([0x78])]:_0xe0ebb6([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]),[_0xe0ebb6([0x79])]:_0xe0ebb6([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]),[_0xe0ebb6([0x61,0x6c,0x67])]:_0xe0ebb6([0x45,0x53,0x32,0x35,0x36])},_0x553e95=_0x2f1fa7[_0xe0ebb6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xe0ebb6([0x67,0x65,0x74])](_0xe0ebb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xe20372(){let _0x161bdf,_0x497b83=null,_0x43a7f4=null;try{if(_0x553e95==_0xe0ebb6([0x47,0x50,0x4c]))return _0xe0ebb6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x161bdf=_0x49c3d9(),!_0x161bdf)return _0xe0ebb6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x161bdf[_0xe0ebb6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x43a7f4=_0x4f299f(_0x161bdf[_0xe0ebb6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x161bdf[_0xe0ebb6([0x6a,0x74,0x69])])),await _0x5aa891()?_0x2361cd()?_0x5593f7()?_0xe0ebb6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x710867()?(_0x161bdf[_0xe0ebb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xe0ebb6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x497b83=_0x12bf4b(_0xe0ebb6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x31af84()):_0xe0ebb6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xe0ebb6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xe0ebb6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xe0ebb6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5593f7(){const _0x1b1267=[_0xe0ebb6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xe0ebb6([0x74,0x72,0x69,0x61,0x6c])][_0xe0ebb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x161bdf[_0xe0ebb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x14330c/0x3e8:0xe10*_0x1b7a6d;return _0x161bdf[_0xe0ebb6([0x65,0x78,0x70])]<_0x1b1267;}function _0x2361cd(){const _0x274213=_0x161bdf[_0xe0ebb6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x274213&&(!!_0x274213[_0xe0ebb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe0ebb6([0x2a]))||!!_0x274213[_0xe0ebb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe0ebb6([0x46,0x4f,0x4f])));}function _0x710867(){const _0x2898c8=_0x161bdf[_0xe0ebb6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2898c8||0x0==_0x2898c8[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x15fb2d}=new URL(window[_0xe0ebb6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2898c8[_0xe0ebb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15fb2d))return!0x0;const _0x574fc6=_0x15fb2d[_0xe0ebb6([0x73,0x70,0x6c,0x69,0x74])](_0xe0ebb6([0x2e]));return _0x2898c8[_0xe0ebb6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xb39dbf=>_0xb39dbf[_0xe0ebb6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe0ebb6([0x2a])))[_0xe0ebb6([0x6d,0x61,0x70])](_0x4d7bd2=>_0x4d7bd2[_0xe0ebb6([0x73,0x70,0x6c,0x69,0x74])](_0xe0ebb6([0x2e])))[_0xe0ebb6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4fabc2=>_0x4fabc2[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x574fc6[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xe0ebb6([0x6d,0x61,0x70])](_0x4f8a88=>Array(_0x574fc6[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4f8a88[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xe0ebb6([0x66,0x69,0x6c,0x6c])](_0x4f8a88[0x0]===_0xe0ebb6([0x2a])?_0xe0ebb6([0x2a]):'')[_0xe0ebb6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4f8a88))[_0xe0ebb6([0x73,0x6f,0x6d,0x65])](_0x1270ff=>_0x574fc6[_0xe0ebb6([0x65,0x76,0x65,0x72,0x79])]((_0x60ad94,_0xa02373)=>_0x1270ff[_0xa02373]===_0x60ad94||_0x1270ff[_0xa02373]===_0xe0ebb6([0x2a])));}function _0x31af84(){return _0x497b83&&_0x43a7f4?new window[(_0xe0ebb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15694c,_0x170103)=>{_0x497b83[_0xe0ebb6([0x74,0x68,0x65,0x6e])](_0x15694c,_0x170103),_0x43a7f4[_0xe0ebb6([0x74,0x68,0x65,0x6e])](_0x295b1b=>{_0x295b1b!=_0xe0ebb6([0x56,0x61,0x6c,0x69,0x64])&&_0x15694c(_0x295b1b);},_0x170103);}):_0x497b83||_0x43a7f4||_0xe0ebb6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4f299f(_0x480db7,_0x1a7f98){return new window[(_0xe0ebb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36c693=>{if(_0x206b35())return _0x36c693(_0xe0ebb6([0x56,0x61,0x6c,0x69,0x64]));_0xc2747c(),_0x2f1fa7[_0xe0ebb6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xe0ebb6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x356087=!0x1;const _0x45820a=_0x1ab937();function _0x232ae8(_0x34ce34){return!!_0x34ce34&&(typeof _0x34ce34===_0xe0ebb6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x34ce34===_0xe0ebb6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x34ce34[_0xe0ebb6([0x74,0x68,0x65,0x6e])]===_0xe0ebb6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x34ce34[_0xe0ebb6([0x63,0x61,0x74,0x63,0x68])]===_0xe0ebb6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xab29a2(_0x4dd6ad){_0x568743(_0x4dd6ad)[_0xe0ebb6([0x74,0x68,0x65,0x6e])](_0x41b75f=>{if(!_0x41b75f||_0x41b75f[_0xe0ebb6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xe0ebb6([0x6f,0x6b]))return _0xe0ebb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5730ce(_0x2b6c5b(_0x45820a+_0x1a7f98))!=_0x41b75f[_0xe0ebb6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xe0ebb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xe0ebb6([0x56,0x61,0x6c,0x69,0x64]);})[_0xe0ebb6([0x74,0x68,0x65,0x6e])](_0x4b5188=>(_0x5e70bd(),_0x4b5188),()=>{const _0x5bbdd1=_0x447db9();return null==_0x5bbdd1?(_0x5e70bd(),_0xe0ebb6([0x56,0x61,0x6c,0x69,0x64])):_0xe0ebb6(_0x14330c-_0x5bbdd1>(0x63ae0106^_0x46dd1f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xe0ebb6([0x74,0x68,0x65,0x6e])](_0x36c693)[_0xe0ebb6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x36c693(_0xe0ebb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x59840c=0x47946b86^_0x46dd1f;function _0x5e70bd(){const _0x4c01da=_0xe0ebb6([0x6c,0x6c,0x63,0x74,0x2d])+_0x5730ce(_0x2b6c5b(_0x480db7)),_0x5bba4d=_0x504ef9(_0x5730ce(window[_0xe0ebb6([0x4d,0x61,0x74,0x68])][_0xe0ebb6([0x63,0x65,0x69,0x6c])](_0x14330c/_0x59840c)));window[_0xe0ebb6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xe0ebb6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4c01da,_0x5bba4d);}function _0x447db9(){const _0x513973=_0xe0ebb6([0x6c,0x6c,0x63,0x74,0x2d])+_0x5730ce(_0x2b6c5b(_0x480db7)),_0x38fdf4=window[_0xe0ebb6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xe0ebb6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x513973);return _0x38fdf4?window[_0xe0ebb6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x504ef9(_0x38fdf4),0x10)*_0x59840c:null;}function _0x568743(_0x24a68e){return new window[(_0xe0ebb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15ad6c,_0x64a213)=>{_0x24a68e[_0xe0ebb6([0x74,0x68,0x65,0x6e])](_0x15ad6c,_0x64a213),window[_0xe0ebb6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x64a213,0x47a351c6^_0x46dd1f);});}}_0x2f1fa7[_0xe0ebb6([0x6f,0x6e])](_0xe0ebb6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xeaa13a,_0x579df4)=>{if(_0x579df4[0x0]!=_0x480db7)return _0x36c693(_0xe0ebb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x579df4[0x1]={..._0x579df4[0x1],[_0xe0ebb6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x45820a};},{[_0xe0ebb6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xe0ebb6([0x68,0x69,0x67,0x68])}),_0x2f1fa7[_0xe0ebb6([0x6f,0x6e])](_0xe0ebb6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xbbab21=>{_0x232ae8(_0xbbab21[_0xe0ebb6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x356087=!0x0,_0xab29a2(_0xbbab21[_0xe0ebb6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xe0ebb6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xe0ebb6([0x6c,0x6f,0x77])}),_0x347f70[_0xe0ebb6([0x74,0x68,0x65,0x6e])](()=>{_0x356087||_0x36c693(_0xe0ebb6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x206b35(){return _0x2f1fa7[_0xe0ebb6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xe0ebb6([0x76,0x69,0x65,0x77])][_0xe0ebb6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xe0ebb6([0x61,0x75,0x74,0x6f]);}function _0xc2747c(){_0x2f1fa7[_0xe0ebb6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xe0ebb6([0x76,0x69,0x65,0x77])][_0xe0ebb6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xe0ebb6([0x61,0x75,0x74,0x6f]);}}function _0x12bf4b(_0x29c13e){const _0x5eddfb=[new window[(_0xe0ebb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x572de0=>setTimeout(_0x572de0,0x47abbbca^_0x46dd1f)),_0x347f70[_0xe0ebb6([0x74,0x68,0x65,0x6e])](()=>new window[(_0xe0ebb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e7324=>{let _0x343599=0x0;_0x2f1fa7[_0xe0ebb6([0x6d,0x6f,0x64,0x65,0x6c])][_0xe0ebb6([0x6f,0x6e])](_0xe0ebb6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x49db1c,_0x15fc65)=>{_0x15fc65[0x0][_0xe0ebb6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x343599++,_0x343599==(0x47a280ee^_0x46dd1f)&&(_0x3e7324(),_0x49db1c[_0xe0ebb6([0x6f,0x66,0x66])]());});}))];return window[_0xe0ebb6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xe0ebb6([0x72,0x61,0x63,0x65])](_0x5eddfb)[_0xe0ebb6([0x74,0x68,0x65,0x6e])](()=>_0x29c13e);}async function _0x522eb7(){await _0x347f70,_0x2f1fa7[_0xe0ebb6([0x6d,0x6f,0x64,0x65,0x6c])][_0xe0ebb6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xda0562,_0x2f1fa7[_0xe0ebb6([0x6d,0x6f,0x64,0x65,0x6c])][_0xe0ebb6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xda0562,_0x2f1fa7[_0xe0ebb6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xe0ebb6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1219c4(_0x20ca78){const _0x505fe6=_0x5bf642();_0x2f1fa7[_0x505fe6]=_0xe0ebb6([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x20ca78,_0x20ca78!=_0xe0ebb6([0x56,0x61,0x6c,0x69,0x64])&&_0x522eb7();}function _0x5bf642(){const _0x5c9f32=window[_0xe0ebb6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xe0ebb6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xe0ebb6([0x6e,0x6f,0x77])]())[_0xe0ebb6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xe0ebb6([0x2e]),'');let _0x539193=_0xe0ebb6([0x75]);for(let _0x9803ec=0x0;_0x9803ec<_0x5c9f32[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x9803ec+=0x2){let _0x2d3fea=window[_0xe0ebb6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c9f32[_0xe0ebb6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x9803ec,_0x9803ec+0x2));_0x2d3fea>=_0x219d10[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2d3fea-=_0x219d10[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x539193+=_0x219d10[_0x2d3fea];}return _0x539193;}function _0x49c3d9(){const _0x5b85b6=_0x553e95[_0xe0ebb6([0x73,0x70,0x6c,0x69,0x74])](_0xe0ebb6([0x2e]));if(0x3!=_0x5b85b6[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3c5663(_0x5b85b6[0x1]);function _0x3c5663(_0x38371d){const _0x391958=_0xdcd297(_0x38371d);return _0x391958&&_0x6fa3a5()?_0x391958:null;function _0x6fa3a5(){const _0x1b6355=_0x391958[_0xe0ebb6([0x6a,0x74,0x69])],_0x416b0b=window[_0xe0ebb6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b6355[_0xe0ebb6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b6355[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4d0c8d={..._0x391958,[_0xe0ebb6([0x6a,0x74,0x69])]:_0x1b6355[_0xe0ebb6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b6355[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4d0c8d[_0xe0ebb6([0x76,0x63])],_0x2b6c5b(_0x4d0c8d)==_0x416b0b;}}}async function _0x5aa891(){let _0x46e5d3=!0x0;try{const _0x3fae45=_0x553e95[_0xe0ebb6([0x73,0x70,0x6c,0x69,0x74])](_0xe0ebb6([0x2e])),[_0x160bb5,_0x1ab6b8,_0xcce21f]=_0x3fae45;return _0x20b851(_0x160bb5),await _0x4a70ae(_0x160bb5,_0x1ab6b8,_0xcce21f),_0x46e5d3;}catch{return!0x1;}function _0x20b851(_0x563aea){const _0x3a2a0d=_0xdcd297(_0x563aea);_0x3a2a0d&&_0x3a2a0d[_0xe0ebb6([0x61,0x6c,0x67])]==_0xe0ebb6([0x45,0x53,0x32,0x35,0x36])||(_0x46e5d3=!0x1);}async function _0x4a70ae(_0x1af075,_0x4ff14c,_0x4667e7){const _0x1c4135=window[_0xe0ebb6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xe0ebb6([0x66,0x72,0x6f,0x6d])](_0x2364f4(_0x4667e7),_0xf53afe=>_0xf53afe[_0xe0ebb6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2d19da=new window[(_0xe0ebb6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xe0ebb6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1af075+_0xe0ebb6([0x2e])+_0x4ff14c),_0x597d7f=window[_0xe0ebb6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xe0ebb6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x597d7f)return;const _0x32b5fa=await _0x597d7f[_0xe0ebb6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xe0ebb6([0x6a,0x77,0x6b]),_0x2bc2a2,{[_0xe0ebb6([0x6e,0x61,0x6d,0x65])]:_0xe0ebb6([0x45,0x43,0x44,0x53,0x41]),[_0xe0ebb6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xe0ebb6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xe0ebb6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x597d7f[_0xe0ebb6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xe0ebb6([0x6e,0x61,0x6d,0x65])]:_0xe0ebb6([0x45,0x43,0x44,0x53,0x41]),[_0xe0ebb6([0x68,0x61,0x73,0x68])]:{[_0xe0ebb6([0x6e,0x61,0x6d,0x65])]:_0xe0ebb6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x32b5fa,_0x1c4135,_0x2d19da)||(_0x46e5d3=!0x1);}}function _0xdcd297(_0x206a7f){return _0x206a7f[_0xe0ebb6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xe0ebb6([0x65,0x79]))?JSON[_0xe0ebb6([0x70,0x61,0x72,0x73,0x65])](_0x2364f4(_0x206a7f)):null;}function _0x2364f4(_0x33fda0){return window[_0xe0ebb6([0x61,0x74,0x6f,0x62])](_0x33fda0[_0xe0ebb6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xe0ebb6([0x2b]))[_0xe0ebb6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xe0ebb6([0x2f])));}function _0x2b6c5b(_0x6c9649){let _0x3777dd=0x1505;function _0x38b12b(_0xa9a202){for(let _0x107593=0x0;_0x107593<_0xa9a202[_0xe0ebb6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x107593++){const _0x4a1256=_0xa9a202[_0xe0ebb6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x107593);_0x3777dd=(_0x3777dd<<0x5)+_0x3777dd+_0x4a1256,_0x3777dd&=_0x3777dd;}}function _0x5f0ff1(_0x10216e){Array[_0xe0ebb6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x10216e)?_0x10216e[_0xe0ebb6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5f0ff1):_0x10216e&&typeof _0x10216e==_0xe0ebb6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xe0ebb6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x10216e)[_0xe0ebb6([0x73,0x6f,0x72,0x74])]()[_0xe0ebb6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5ef582,_0x8cd6c7])=>{_0x38b12b(_0x5ef582),_0x5f0ff1(_0x8cd6c7);}):_0x38b12b(window[_0xe0ebb6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x10216e));}return _0x5f0ff1(_0x6c9649),_0x3777dd>>>0x0;}function _0x5730ce(_0x265a87){return _0x265a87[_0xe0ebb6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xe0ebb6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xe0ebb6([0x30]));}function _0x504ef9(_0x59062d){return _0x59062d[_0xe0ebb6([0x73,0x70,0x6c,0x69,0x74])]('')[_0xe0ebb6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xe0ebb6([0x6a,0x6f,0x69,0x6e])]('');}function _0xda0562(){}function _0xe0ebb6(_0x1d58c8){return _0x1d58c8['map'](_0xad237e=>String['fromCharCode'](_0xad237e))['join']('');}_0x1219c4(await _0xe20372());}(this);}['_moveSelectionToFootnoteDefinition'](_0x53ed46){const {plugins:_0x963b9,editing:_0x15accf,model:_0x2fe0b4}=this['editor'],_0x3b6d70=_0x963b9['get'](f)['getFootnote'](_0x53ed46);return!!_0x3b6d70&&(_0x2fe0b4['change'](_0x4ae48a=>{_0x4ae48a['setSelection'](_0x4ae48a['createPositionAt'](_0x3b6d70['definition'],'end'));}),_0x15accf['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x276b77){const {plugins:_0x17db92,editing:_0x6b99c8,model:_0x835613}=this['editor'],_0x98290=_0x17db92['get'](f)['getFootnote'](_0x276b77);return!!_0x98290&&(_0x835613['change'](_0x5a845b=>{_0x5a845b['setSelection'](_0x98290['reference'],'on');}),_0x6b99c8['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x1fb0b8}=this['editor']['model'],_0x228f81=this['editor']['config']['get']('footnotes.multiBlock');_0x1fb0b8['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x1fb0b8['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x1fb0b8['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x228f81?_0x1fb0b8['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x1fb0b8['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x1fb0b8['addChildCheck'](_0x3da2f0=>{for(const _0x4074c0 of _0x3da2f0)if('footnoteDefinition'===_0x4074c0['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x2c2495}=this,{conversion:_0xca0be,editing:_0x3287c7}=_0x2c2495,{t:t}=_0x2c2495['locale'];_0xca0be['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0xcb1658,{writer:_0x2107fa,consumable:_0x24df64})=>{const _0x1efe2a=_0xcb1658['getChild'](0x0);if(!_0x1efe2a||!_0x1efe2a['is']('element','a'))return null;const _0x2a6519=_0x1efe2a['getAttribute']('href')||'';if(!_0x2a6519['startsWith']('#'))return null;const _0x2b20bd=_0x2a6519['replace'](/^#/,'');if(!_0x2b20bd)return null;_0x24df64['consume'](_0x1efe2a,{'name':!0x0,'attributes':['href']});for(const {item:_0x18f35d}of _0x3287c7['view']['createRangeIn'](_0x1efe2a))_0x18f35d['is']('$textProxy')?_0x24df64['consume'](_0x18f35d['textNode'],{'name':!0x0}):_0x18f35d['is']('element')&&_0x24df64['consume'](_0x18f35d,{'name':!0x0});return _0x2107fa['createElement']('footnoteRef',{'footnoteId':_0x2b20bd});}}),_0xca0be['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x3c06cc,{writer:_0x2fe39e})=>b(_0x3c06cc,_0x2fe39e)}),_0xca0be['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x551a17,{writer:_0x1f5ada})=>{const _0x453a50=_0x551a17['getAttribute']('footnoteCounter');return _0x405142(b(_0x551a17,_0x1f5ada),_0x1f5ada,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x453a50)});}});}['_defineDefinitionsConverters'](){const {editor:_0x5efc36}=this,{t:t}=_0x5efc36['locale'],{conversion:_0x8c10de}=_0x5efc36;_0x8c10de['for']('upcast')['elementToElement']({'view':{'name':'div','classes':'footnotes'},'model':'footnotesDefinitions'}),_0x8c10de['for']('upcast')['add'](_0x127ce8=>{_0x127ce8['on']('element:ol',(_0xdc4420,_0x334128,_0x1c4ef8)=>{const _0x5368ee=_0x334128['viewItem'];if(!_0x5368ee['hasClass']('footnotes-list')||!_0x334128['modelCursor']['parent']?.['is']('element','footnotesDefinitions'))return;if(!_0x1c4ef8['consumable']['consume'](_0x5368ee,{'name':!0x0,'classes':'footnotes-list'}))return;const {modelRange:_0x1bf772,modelCursor:_0x5a37cb}=_0x1c4ef8['convertChildren'](_0x334128['viewItem'],_0x334128['modelCursor']);_0x334128['modelRange']=_0x1bf772,_0x334128['modelCursor']=_0x5a37cb;}),_0x127ce8['on']('element:hr',(_0x185edf,_0x379e74,_0x56b97f)=>{const _0x54155d=_0x379e74['viewItem'];_0x54155d['hasClass']('footnotes-divider')&&_0x379e74['modelCursor']['parent']?.['is']('element','footnotesDefinitions')&&_0x56b97f['consumable']['consume'](_0x54155d,{'name':!0x0,'classes':'footnotes-divider'});});}),_0x8c10de['for']('dataDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x144f4c,{writer:_0x5353bb})=>D(_0x5353bb)}),_0x8c10de['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x1a6773,{writer:_0x5c9729})=>{const _0x28cb2f=D(_0x5c9729,{'data-footnotes-list-label':t('Footnotes')}),_0x23d529=_0x405142(_0x28cb2f,_0x5c9729,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x5c9729['setCustomProperty']('footnotesDefinitions',!0x0,_0x23d529),_0x23d529;}});}['_defineDefinitionConverters'](){const {editor:_0xe95795}=this,{conversion:_0x2afb3d,locale:_0x446b9c}=_0xe95795,_0x1d06c0=_0xe95795['config']['get']('footnotes.multiBlock');_0x2afb3d['for']('upcast')['add'](_0x46beb1=>{_0x46beb1['on']('element:li',(_0x4f2b02,_0x24df7a,_0x1e9aa7)=>{const _0x20b854=_0x24df7a['viewItem'];if(!_0x20b854['hasClass']('footnote-definition')||!_0x20b854['getAttribute']('id'))return;const _0xbfe084=_0x20b854['parent'];if(!_0xbfe084['is']('element','ol')||!_0xbfe084['hasClass']('footnotes-list'))return;if(!_0x1e9aa7['consumable']['test'](_0x20b854,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x284e41=_0x1e9aa7['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x20b854['getAttribute']('id')});if(!_0x1e9aa7['safeInsert'](_0x284e41,_0x24df7a['modelCursor']))return;_0x1e9aa7['consumable']['consume'](_0x20b854,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x126177=Array['from'](_0x20b854['getChildren']())['find'](_0x10600b=>_0x10600b['is']('element')&&_0x10600b['hasClass']('footnote-content'));for(const _0x4a43f5 of _0x20b854['getChildren']())_0x4a43f5['is']('element')&&(_0x1e9aa7['consumable']['consume'](_0x4a43f5,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x1e9aa7['consumable']['consume'](_0x4a43f5,{'name':!0x0,'classes':'footnote-content'}));if(_0x126177){if(_0x1d06c0)_0x1e9aa7['convertChildren'](_0x126177,_0x284e41);else{const _0x5762da=_0x1e9aa7['writer']['createElement']('footnoteInlineContent');_0x1e9aa7['writer']['insert'](_0x5762da,_0x284e41),_0x1e9aa7['convertChildren'](_0x126177,_0x5762da);}}_0x1e9aa7['updateConversionResult'](_0x284e41,_0x24df7a);});}),_0x2afb3d['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x4ae993,{writer:_0x5cb251})=>y(_0x4ae993,_0x5cb251,_0x446b9c,{'dataPipeline':!0x0})}),_0x2afb3d['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x2f0090,{writer:_0x20eb0a})=>y(_0x2f0090,_0x20eb0a,_0x446b9c)});}['_defineBogusParagraphConverters'](){const {editor:_0x422130}=this,{conversion:_0x1f9d48}=_0x422130;_0x422130['config']['get']('footnotes.multiBlock')?(_0x1f9d48['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':p(),'converterPriority':'high'}),_0x1f9d48['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':p({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x422130['model']['document'],'change:data',()=>{!function(_0x3c9bda,_0x15009c){const _0x13c71b=_0x3c9bda['document']['differ'],_0x46e813=new Set();for(const _0x1177a1 of _0x13c71b['getChanges']()){const _0x12a9fc='attribute'==_0x1177a1['type']?_0x1177a1['range']['start']['parent']:_0x1177a1['position']['parent'];_0x12a9fc['is']('element','footnoteDefinition')&&_0x46e813['add'](_0x12a9fc);}for(const _0x599ce8 of _0x46e813['values']()){const _0x4f1d5c=Array['from'](_0x599ce8['getChildren']())['filter'](_0x18123e=>v(_0x18123e,_0x15009c['mapper']));for(const _0x30b71c of _0x4f1d5c)_0x15009c['reconvertItem'](_0x30b71c);}}(_0x422130['model'],_0x422130['editing']);})):(_0x1f9d48['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':p()}),_0x1f9d48['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x2d3388,{writer:_0x8de8e2})=>{const _0x5781da=_0x8de8e2['createContainerElement']('span');return _0x8de8e2['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x5781da),_0x5781da;}}));}['_defineKeyboardHandlers'](){const {editor:_0x50c849}=this,{editing:_0x3f8b2b,t:t}=_0x50c849,_0xfd7bd8=_0x50c849['model']['document']['selection'];_0x50c849['keystrokes']['set']('Ctrl+Alt+F','insertFootnote'),_0x50c849['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+F'}]}),this['listenTo'](_0x3f8b2b['view']['document'],'enter',(_0x3f2d55,_0x36a018)=>{const _0x49f464=function(_0x1fb7c2){const _0x5f5488=_0x1fb7c2['getSelectedElement']();if(_0x5f5488?.['is']('element','footnoteRef'))return _0x5f5488;return null;}(_0xfd7bd8);if(_0x49f464){const _0x3ea80f=_0x49f464['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x3ea80f),_0x36a018['preventDefault'](),_0x3f2d55['stop']();}},{'context':_0xf54cfb});}['_defineClickHandlers'](){const {editor:_0x47a930}=this,{editing:_0x17280b}=_0x47a930;_0x47a930['editing']['view']['addObserver'](_0x43b852),_0x47a930['editing']['view']['addObserver'](_0xef81ac);let _0x46996d=!0x1;this['listenTo'](_0x17280b['view']['document'],'pointerdown',(_0x2feb2f,_0xaa3967)=>{const {target:_0xd3495f}=_0xaa3967,_0x458a0d=_0x17280b['view']['document']['selection'];_0x46996d=!!(_0xd3495f?.['is']('element','a')&&_0xd3495f['parent']?.['is']('element','sup')&&_0xd3495f['parent']['hasClass']('footnote'))&&_0x458a0d['getSelectedElement']()===_0xd3495f['parent'];},{'priority':'high'}),this['listenTo'](_0x17280b['view']['document'],'click',(_0x339847,_0x5bb4c2)=>{const {target:_0x41ec74}=_0x5bb4c2;if(!_0x41ec74?.['is']('element','a'))return;if(_0x41ec74['parent']?.['is']('element','sup')&&_0x41ec74['parent']['hasClass']('footnote')&&!_0x46996d)return void _0x5bb4c2['preventDefault']();let _0x395181=_0x41ec74['getAttribute']('href');if(!_0x395181?.['startsWith']('#'))return;_0x395181=_0x395181['slice'](0x1);let _0x1b3180=!0x1;(_0x395181['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x395181['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x395181))&&(_0x1b3180=!0x0),_0x1b3180&&(_0x5bb4c2['preventDefault'](),_0x339847['stop']());},{'priority':'high','context':'$capture'});}}function p({dataPipeline:_0x126e80}={}){return(_0x4f6760,{writer:_0x269eb2})=>{if(!g(_0x4f6760))return null;if(!_0x126e80)return _0x269eb2['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x58d1e0=_0x269eb2['createContainerElement']('p');return _0x269eb2['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x58d1e0),_0x58d1e0;};}function g(_0x3ddb40){const {parent:_0x18c1e3}=_0x3ddb40;if(!_0x18c1e3?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x18c1e3['childCount'])return!0x1;for(const _0x33206d of _0x3ddb40['getAttributeKeys']())if(!_0x33206d['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x33206d)return!0x1;return!0x0;}function v(_0x1ba55d,_0x4b4ca4){if(!_0x1ba55d['is']('element','paragraph'))return!0x1;const _0x5cd640=_0x4b4ca4['toViewElement'](_0x1ba55d);return!!_0x5cd640&&g(_0x1ba55d)!==_0x5cd640['is']('element','span');}function H(_0x45ef1b){return _0xf54cfb(_0x45ef1b)&&_0x45ef1b['is']('containerElement')&&!!_0x45ef1b['getCustomProperty']('footnotesDefinitions');}function D(_0x222d53,_0x1e033b={}){const _0x34373c=_0x222d53['createEmptyElement']('hr',{'class':'footnotes-divider'}),_0x2f01ed=_0x222d53['createContainerElement']('ol',{'class':'footnotes-list'},_0x222d53['createSlot']());return _0x222d53['createContainerElement']('div',{'class':'footnotes',..._0x1e033b},[_0x34373c,_0x2f01ed]);}function b(_0x161398,_0x184110){const _0xca572a=_0x161398['getAttribute']('footnoteId'),_0x25c9ab=_0x161398['getAttribute']('footnoteCounter'),_0x50754a=_0x184110['createUIElement']('a',{'href':'#'+_0xca572a},function(_0x374f9f){const _0x2eca9c=this['toDomElement'](_0x374f9f);return _0x2eca9c['textContent']=_0x25c9ab,_0x2eca9c;}),_0x23c5e1=_0x184110['createContainerElement']('sup',{'id':'ref-'+_0xca572a,'class':'footnote'},[_0x50754a]);return _0x23c5e1['getFillerOffset']=()=>null,_0x23c5e1;}function y(_0x4ea9b7,_0xc70fbf,_0x14da9e,{dataPipeline:_0x156a66}={}){const {t:t}=_0x14da9e,_0x18e694=_0x4ea9b7['getAttribute']('footnoteId'),_0x21062b=_0xc70fbf['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x18e694},function(_0x1e80b4){const _0xd8753e=this['toDomElement'](_0x1e80b4);return _0xd8753e['innerText']='^',_0xd8753e;}),_0x231deb=_0x156a66?_0xc70fbf['createContainerElement']('div',{'class':'footnote-content'}):_0x26e123(_0xc70fbf['createEditableElement']('div',{'class':'footnote-content'}),_0xc70fbf,{'label':t('Footnote\x20content.')});return _0xc70fbf['insert'](_0xc70fbf['createPositionAt'](_0x231deb,0x0),_0xc70fbf['createSlot']()),_0xc70fbf['createContainerElement']('li',{'class':'footnote-definition','id':_0x18e694},[_0x21062b,_0x231deb]);}class e extends _0x28ad1a{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x9bd623];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x22dd89}=this,{plugins:_0x4e980a,model:_0x58ebea}=_0x22dd89,_0x5f3574=_0x4e980a['get'](_0x9bd623),_0x35b1fa=_0x4e980a['get'](f);this['listenTo'](_0x5f3574,'outputTransformation',(_0x43ab5c,_0x1277ec)=>{const _0x4f7e28=l(_0x58ebea['createRangeIn'](_0x1277ec['content']));if(!_0x4f7e28['length'])return;const _0xdb609a=_0x35b1fa['getFootnotes'](),_0xc3464b=_0x4f7e28['reduce']((_0x1dc44f,_0x23656c)=>{const _0x1c494b=_0xdb609a['find'](_0x21b99a=>_0x21b99a['id']===_0x23656c);if(_0x1c494b){const _0x560a7d=_0x22dd89['data']['toView'](_0x1c494b['definition'],{'isClipboardPipeline':!0x0}),_0x2e3b95=_0x22dd89['data']['htmlProcessor']['toData'](_0x560a7d);_0x1dc44f[_0x1c494b['id']]=_0x2e3b95;}return _0x1dc44f;},Object['create'](null));_0x1277ec['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0xc3464b));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x20d00c}=this,{model:_0x2bd059,plugins:_0x4b5bd8}=_0x20d00c,{view:_0x5deb28}=_0x20d00c['editing'],_0x1e553b=_0x4b5bd8['get'](_0x9bd623),_0x5bd2a8=_0x4b5bd8['get'](f),_0x1e8b9e=_0x20d00c['config']['get']('footnotes.multiBlock');let _0x535b47=null;this['listenTo'](_0x5deb28['document'],'clipboardInput',(_0x42453c,_0x274468)=>{const _0xc6a294=_0x274468['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x535b47=_0xc6a294?JSON['parse'](_0xc6a294):null;}),this['listenTo'](_0x1e553b,'contentInsertion',(_0xb0ac58,_0x551487)=>{const _0x3549dd=_0x551487['sourceEditorId']===this['editor']['id'];_0x3549dd&&'drop'===_0x551487['method']||_0x2bd059['change'](_0x4920bb=>{let _0x2399e1=_0x5bd2a8['getFootnotesDefinitionsObjectElement']();const _0x1e723f=!!_0x2399e1&&Array['from'](_0x2bd059['document']['selection']['getSelectedBlocks']())['includes'](_0x2399e1);if(!_0x535b47&&function(_0x1ec493){for(const {item:_0x5e09f4}of _0x1ec493)if(_0x5e09f4['is']('element','footnoteRef'))return!0x0;return!0x1;}(_0x2bd059['createRangeIn'](_0x551487['content']))&&(_0x535b47=function(_0x2113e0,_0x15e62b){const _0x13dfd4=c(_0x2113e0,_0x15e62b);if(!_0x13dfd4)return null;const _0x3485ca=Object['create'](null);for(const _0x3d0d72 of _0x13dfd4['getChildren']())_0x3d0d72['is']('element','footnoteDefinition')&&_0x3d0d72['hasAttribute']('footnoteId')&&(_0x3485ca[_0x3d0d72['getAttribute']('footnoteId')]=_0x2113e0['cloneElement'](_0x3d0d72,!0x0));return Object['keys'](_0x3485ca)['length']?_0x3485ca:null;}(_0x4920bb,_0x551487['content'])),(_0x2399e1&&!_0x1e723f||!_0x2399e1&&!_0x535b47)&&function(_0xc42973,_0x4b10bf){const _0x2c0512=[];for(const {item:_0x24a632}of _0xc42973['createRangeIn'](_0x4b10bf))_0x24a632['is']('element','footnotesDefinitions')&&_0x2c0512['push'](_0x24a632);for(const _0x2a088b of _0x2c0512)_0xc42973['remove'](_0x2a088b);}(_0x4920bb,_0x551487['content']),!_0x535b47)return;const {selection:_0x41bc7f}=_0x2bd059['document'],_0x3c4f61=_0x41bc7f['getFirstRange']()['root'];_0x2399e1&&!_0x1e723f||(_0x2399e1=c(_0x4920bb,_0x551487['content']),_0x2399e1||=_0x5bd2a8['_insertEmptyFootnotesDefinitionsContainer'](_0x4920bb,_0x3c4f61));const _0x501848=Array['from'](_0x41bc7f['getRanges']())['flatMap'](l),_0x13c831=function(_0x1a062f,_0x30d644,_0x53d8ab){const _0x23cbc0=Object['create'](null);for(const {item:_0x4352b9}of _0x1a062f['createRangeIn'](_0x30d644))if(_0x4352b9['is']('element','footnoteRef')){const _0x5a6e61=_0x4352b9['getAttribute']('footnoteId');if(!_0x53d8ab(_0x5a6e61))continue;_0x23cbc0[_0x5a6e61]||(_0x23cbc0[_0x5a6e61]=_0x1ab937()),_0x1a062f['setAttribute']('footnoteId',_0x23cbc0[_0x5a6e61],_0x4352b9);}return _0x23cbc0;}(_0x4920bb,_0x551487['content'],_0x52e86e=>{if(!_0x3549dd)return!0x0;return!!_0x5bd2a8['getFootnote'](_0x52e86e)&&!_0x501848['includes'](_0x52e86e);});for(const [_0x1237a2,_0x1b6e7c]of Object['entries'](_0x535b47)){const _0x14b627=_0x13c831[_0x1237a2]||_0x1237a2;let _0x1f4a41;if('string'!=typeof _0x1b6e7c)_0x1f4a41=_0x1b6e7c,_0x14b627!==_0x1237a2&&_0x4920bb['setAttribute']('footnoteId',_0x14b627,_0x1f4a41);else{_0x1f4a41=_0x4920bb['createElement']('footnoteDefinition',{'footnoteId':_0x14b627});const _0x1527f1=_0x20d00c['data']['htmlProcessor']['toView'](_0x1b6e7c);let _0x441fa9;if(_0x1e8b9e)_0x441fa9=_0x20d00c['data']['toModel'](_0x1527f1,_0x1f4a41);else{_0x441fa9=_0x4920bb['createElement']('footnoteInlineContent');const _0x3c10a2=_0x20d00c['data']['toModel'](_0x1527f1,_0x441fa9);_0x4920bb['insert'](_0x3c10a2,_0x441fa9);}_0x4920bb['append'](_0x441fa9,_0x1f4a41);}_0x4920bb['insert'](_0x1f4a41,_0x2399e1,'end');}_0x535b47=null;});});}}function c(_0x21faca,_0xb4fcf1){for(const {item:_0x237d67}of _0x21faca['createRangeIn'](_0xb4fcf1))if(_0x237d67['is']('element','footnotesDefinitions'))return _0x237d67;return null;}function l(_0x872246){const _0x3cc338=new Set();for(const {item:_0x4b4816}of _0x872246)_0x4b4816['is']('element','footnoteRef')&&_0x3cc338['add'](_0x4b4816['getAttribute']('footnoteId'));return Array['from'](_0x3cc338);}class i extends _0x28ad1a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x33f9b5}=this,{componentFactory:_0x31cc45}=_0x33f9b5['ui'];_0x31cc45['add']('insertFootnote',E(_0x33f9b5,_0x386d83)),_0x31cc45['add']('menuBar:insertFootnote',E(_0x33f9b5,_0x4770d4)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x494f07=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2e601d;for(const _0x17c6d4 in _0x494f07){const _0x546782=_0x17c6d4,_0xca2642=_0x494f07[_0x546782];if('footnotesLicenseKeyValid'==_0xca2642||'footnotesLicenseKeyInvalid'==_0xca2642||'footnotesLicenseKeyExpired'==_0xca2642||'footnotesLicenseKeyDomainLimit'==_0xca2642||'footnotesLicenseKeyNotAllowed'==_0xca2642||'footnotesLicenseKeyEvaluationLimit'==_0xca2642||'footnotesLicenseKeyUsageLimit'==_0xca2642){delete _0x494f07[_0x546782],_0x2e601d=_0xca2642,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x2e601d&&_0x494f07['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x2e601d&&_0x494f07['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x2e601d&&_0x494f07['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x2e601d&&_0x494f07['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x2e601d&&_0x494f07['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyUsageLimit'==_0x2e601d&&_0x494f07['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function E(_0x10ae98,_0x39e71a){const _0x463c82=_0x10ae98['commands']['get']('insertFootnote');return _0x2801d4=>{const {t:t}=_0x2801d4,_0x530887=new _0x39e71a(_0x2801d4),_0x49fa65=_0x530887 instanceof _0x4770d4;return _0x530887['bind']('isEnabled')['to'](_0x463c82,'isEnabled'),_0x530887['set']({'label':t(_0x49fa65?'Footnote':'Insert\x20footnote'),'icon':_0x3c632d,'tooltip':!0x0}),_0x530887['on']('execute',()=>{_0x463c82['execute'](),_0x10ae98['editing']['view']['focus']();}),_0x530887;};}class lt extends _0x28ad1a{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const W=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x5958dd{['refresh'](){const {editor:_0x5e6f98}=this,_0x3d24ee=_0x5e6f98['plugins']['get'](f)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x3d24ee,this['value']=_0x3d24ee?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x4c0969}){const {editor:_0x333f2a}=this,_0x1ca573=_0x333f2a['plugins']['get'](f),_0x54af32=_0x1ca573['getFootnotesDefinitionsObjectElement']();_0x54af32&&W['includes'](_0x4c0969)&&_0x333f2a['model']['change'](_0x5ddc9a=>{_0x5ddc9a['setAttribute']('footnotesListStyle',_0x4c0969,_0x54af32),_0x1ca573['_updateFootnotesCounters'](_0x5ddc9a);});}}class C extends _0x5958dd{['refresh'](){const {editor:_0x56a12b}=this,_0x1d2d1c=_0x56a12b['plugins']['get'](f)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x1d2d1c,this['value']=_0x1d2d1c?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x4982c2}){const {editor:_0x2d13aa}=this,_0x2a7f05=_0x2d13aa['plugins']['get'](f),_0x1daf9d=_0x2a7f05['getFootnotesDefinitionsObjectElement']();_0x1daf9d&&Number['isInteger'](_0x4982c2)&&_0x2d13aa['model']['change'](_0x152c9f=>{_0x152c9f['setAttribute']('footnotesListStart',_0x4982c2,_0x1daf9d),_0x2a7f05['_updateFootnotesCounters'](_0x152c9f);});}}class P extends _0x28ad1a{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,f];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x522ffb}=this;_0x522ffb['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x522ffb['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x522ffb['commands']['add']('footnotesStyle',new S(_0x522ffb)),_0x522ffb['commands']['add']('footnotesStart',new C(_0x522ffb)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x329680}=this,{schema:_0x49e315}=_0x329680['model'];_0x49e315['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x4503b5}=this,{conversion:_0x37761f,model:_0x397af9}=_0x4503b5,{schema:_0x3f3fa2}=_0x397af9;_0x37761f['for']('upcast')['add'](_0x5de886=>{_0x5de886['on']('element:ol',(_0x534f6e,_0x4dd329,_0x32c052)=>{const _0x168564=_0x4dd329['viewItem'],_0x3f7245=_0x4dd329['modelCursor']?.['parent'];_0x168564['hasClass']('footnotes-list')&&_0x3f7245?.['is']('element','footnotesDefinitions')&&(function(_0x1e131f,_0x514041,_0xe6596b,_0x55fe18){if(!_0x55fe18['checkAttribute'](_0x514041,'footnotesListStart'))return;let _0x59bd7c=0x1;const _0x5b4eb7=_0xe6596b['consumable']['consume'](_0x1e131f,{'attributes':'start'});if(_0x5b4eb7){const _0x110525=Number['parseInt'](_0x1e131f['getAttribute']('start'),0xa);Number['isNaN'](_0x110525)||(_0x59bd7c=_0x110525);}!_0x5b4eb7&&_0x514041['hasAttribute']('footnotesListStart')||_0xe6596b['writer']['setAttribute']('footnotesListStart',_0x59bd7c,_0x514041);}(_0x168564,_0x3f7245,_0x32c052,_0x3f3fa2),function(_0xc93e6d,_0x293245,_0x4041b3,_0x5a99e7){if(!_0x5a99e7['checkAttribute'](_0x293245,'footnotesListStyle'))return;let _0x36cca7='decimal',_0x3b205a=!0x1;if(_0x4041b3['consumable']['consume'](_0xc93e6d,{'attributes':'type'})){const _0x1aafc2={0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0xc93e6d['getAttribute']('type')];_0x1aafc2&&(_0x36cca7=_0x1aafc2),_0x3b205a=!0x0;}_0x4041b3['consumable']['consume'](_0xc93e6d,{'styles':'list-style-type'})&&(_0x36cca7=function(_0x19b9d0){switch(_0x19b9d0){case'lower-alpha':return'lower-latin';case'upper-alpha':return'upper-latin';default:return _0x19b9d0;}}(_0xc93e6d['getStyle']('list-style-type')),_0x3b205a=!0x0),!_0x3b205a&&_0x293245['hasAttribute']('footnotesListStyle')||_0x4041b3['writer']['setAttribute']('footnotesListStyle',_0x36cca7,_0x293245);}(_0x168564,_0x3f7245,_0x32c052,_0x3f3fa2));});}),_0x37761f['for']('downcast')['add'](_0x2522c2=>{_0x2522c2['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x182f72,_0x550a94,_0x349ad3)=>{if(!_0x349ad3['consumable']['consume'](_0x550a94['item'],_0x182f72['name']))return;const _0x20a354=M(_0x550a94['item'],_0x349ad3['mapper']),{attributeNewValue:_0x9b6224}=_0x550a94;null==_0x9b6224||0x1===_0x9b6224?_0x349ad3['writer']['removeAttribute']('start',_0x20a354):_0x349ad3['writer']['setAttribute']('start',String(_0x9b6224),_0x20a354);}),_0x2522c2['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x322227,_0x409834,_0x4eb153)=>{if(!_0x4eb153['consumable']['consume'](_0x409834['item'],_0x322227['name']))return;const _0x515006=M(_0x409834['item'],_0x4eb153['mapper']),{attributeNewValue:_0x47a9bd}=_0x409834;_0x47a9bd&&'decimal'!==_0x47a9bd?_0x4eb153['writer']['setStyle']('list-style-type',_0x47a9bd,_0x515006):_0x4eb153['writer']['removeStyle']('list-style-type',_0x515006);});});}['_definePostfixer'](){const {editor:_0x101230}=this,{model:_0x42a4a3}=_0x101230,_0x165616=_0x101230['plugins']['get'](f),_0x551782=this['_getDefaultListStyle'](),_0x16f505=this['_getDefaultStartIndex']();_0x42a4a3['document']['registerPostFixer'](_0x38e152=>{const _0x47c43a=_0x42a4a3['document']['differ']['getChanges']();let _0x2c5629=!0x1;for(const _0x491833 of _0x47c43a){if('insert'!==_0x491833['type']||'$text'===_0x491833['name'])continue;const _0x24cb84=_0x42a4a3['createRangeOn'](_0x491833['position']['nodeAfter']);for(const _0x2e7b48 of _0x24cb84['getItems']())_0x2e7b48['is']('element','footnotesDefinitions')&&(!_0x2e7b48['hasAttribute']('footnotesListStart')&&_0x42a4a3['schema']['checkAttribute'](_0x2e7b48,'footnotesListStart')&&(_0x38e152['setAttribute']('footnotesListStart',_0x16f505,_0x2e7b48),_0x2c5629=!0x0),!_0x2e7b48['hasAttribute']('footnotesListStyle')&&_0x42a4a3['schema']['checkAttribute'](_0x2e7b48,'footnotesListStyle')&&(_0x38e152['setAttribute']('footnotesListStyle',_0x551782,_0x2e7b48),_0x2c5629=!0x0));}return _0x2c5629&&_0x165616['_updateFootnotesCounters'](_0x38e152),_0x2c5629;});}['_defineFormatter'](){const {editor:_0x5ce2e0}=this;_0x5ce2e0['plugins']['get'](f)['setFootnoteFormatter'](_0x520173=>this['_formatFootnoteListValue'](_0x520173));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x3f61e3,value:_0x4086e6,digits:_0x663000}){const _0x27c502=_0x3f61e3['getAttribute']('footnotesListStyle'),_0x51955c=_0x3f61e3['getAttribute']('footnotesListStart'),_0x4d6d53=Math['floor'](_0x4086e6)+(_0x51955c??0x1)-0x1;switch(_0x27c502){case'decimal-leading-zero':return function(_0x266811,_0x1660fe){return String(_0x266811)['padStart'](_0x1660fe,'0');}(_0x4d6d53,Math['max'](0x2,_0x663000));case'lower-alpha':case'lower-latin':return N(_0x4d6d53,!0x1);case'upper-alpha':case'upper-latin':return N(_0x4d6d53,!0x0);case'lower-roman':return X(_0x4d6d53,!0x1);case'upper-roman':return X(_0x4d6d53,!0x0);default:return String(_0x4d6d53);}}}function M(_0x2c1c79,_0x458ddc){const _0x4541fd=_0x458ddc['toViewElement'](_0x2c1c79);return Array['from'](_0x4541fd['getChildren']())['find'](_0x37e8a1=>_0x37e8a1['is']('element','ol')&&_0x37e8a1['hasClass']('footnotes-list'));}function N(_0x1e2417,_0x38f76f){let _0x372756='',_0x4fb997=_0x1e2417;for(;_0x4fb997>0x0;){const _0x1dfcc1=(_0x4fb997-0x1)%0x1a;_0x372756=String['fromCharCode'](0x61+_0x1dfcc1)+_0x372756,_0x4fb997=Math['floor']((_0x4fb997-0x1)/0x1a);}return _0x38f76f?_0x372756['toUpperCase']():_0x372756;}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(_0x301727,_0x5ad1b9){let _0x4e7e9b='',_0x398cb6=_0x301727;for(const {value:_0x588a98,numeral:_0x6dad77}of V)for(;_0x398cb6>=_0x588a98;)_0x4e7e9b+=_0x6dad77,_0x398cb6-=_0x588a98;return _0x5ad1b9?_0x4e7e9b:_0x4e7e9b['toLowerCase']();}class $ extends _0x36d4e0{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new rt();['keystrokes']=new nt();['focusables']=new _0x121f84();['focusCycler'];constructor(_0x52e8f7,{styleButtonViews:_0x114033,styleGridAriaLabel:_0x520304}){super(_0x52e8f7),(this['focusCycler']=new tt({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x114033,_0x520304),[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 _0x1aa335 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x1aa335['element']);st({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>at['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 _0x2f4135=_0x171589=>_0x171589['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2f4135),this['keystrokes']['set']('arrowleft',_0x2f4135),this['keystrokes']['set']('arrowup',_0x2f4135),this['keystrokes']['set']('arrowdown',_0x2f4135);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x3df5f5,_0x2436cc){const _0x3de333=new _0x36d4e0(this['locale']);return _0x3de333['children']=_0x3de333['createCollection'](),_0x3de333['children']['addMany'](_0x3df5f5),_0x3de333['setTemplate']({'tag':'div','attributes':{'aria-label':_0x2436cc,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x3de333['children']}),_0x3de333['children']['delegate']('execute')['to'](this),_0x3de333['focus']=function(){for(const _0xb06d44 of this['children'])if(_0xb06d44 instanceof _0x386d83&&_0xb06d44['isOn'])return void _0xb06d44['focus']();this['children']['first']['focus']();},_0x3de333['focusTracker']=new rt(),_0x3de333['keystrokes']=new nt(),_0x3de333['render'](),_0x3de333['keystrokes']['listenTo'](_0x3de333['element']),this['children']['add'](_0x3de333),_0x3de333;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x203103=this['_createStartIndexPropertyView'](),_0x50512f=[_0x203103],_0x37443b=new it(this['locale'],_0x50512f);return _0x37443b['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x37443b['buttonView']['bind']('isEnabled')['toMany'](_0x50512f,'isEnabled',(..._0x1a9019)=>_0x1a9019['some'](_0xd4fc67=>_0xd4fc67)),_0x37443b['buttonView']['on']('change:isEnabled',(_0x4f66f6,_0x4bad6c,_0x42467e)=>{_0x42467e||(_0x37443b['isCollapsed']=!0x0);}),this['children']['add'](_0x37443b),[_0x203103,_0x37443b];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x35bf2a=new et(this['locale'],ot);return _0x35bf2a['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x35bf2a['fieldView']['set']({'min':0x0,'max':Math['pow'](0x2,0x1e),'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x35bf2a['fieldView']['on']('input',()=>{const _0x1f45df=_0x35bf2a['fieldView']['element'],_0x513646=_0x1f45df['valueAsNumber'];Number['isNaN'](_0x513646)?_0x35bf2a['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x1f45df['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x513646}):_0x35bf2a['errorText']=t(_0x513646<0x0?'Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.':'Footnotes\x20start\x20index\x20is\x20too\x20large.');}),_0x35bf2a;}}class j extends _0x28ad1a{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0xdfabb8,_0x46b3ea];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x34b664}=this,{componentFactory:_0xbbfeea}=_0x34b664['ui'];_0x34b664['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0xbbfeea['add']('footnotesStyle',function(_0x3b756d){return _0x329e88=>{const {t:t}=_0x329e88,_0x4f612c=_0x3b756d['commands']['get']('footnotesStyle'),_0x189049=_0x297dae(_0x329e88),{buttonView:_0x44d72c}=_0x189049;return _0x189049['class']='ck-footnotes-styles-dropdown',_0x189049['bind']('isEnabled')['to'](_0x4f612c,'isEnabled'),_0x44d72c['set']({'label':t('Footnotes\x20style'),'icon':_0x3c632d,'tooltip':!0x0}),_0x189049['once']('change:isOpen',()=>{const _0x5ec140=function({editor:_0x3baf16,dropdownView:_0x34e06c}){const {t:t}=_0x3baf16['locale'],_0x4d7896=t('Footnotes\x20definitions\x20styles'),_0x55daff=function(_0x99f590){const t=_0x99f590['locale']['t'],_0x34cc0f=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x45c6ef},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x2fdb02},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x2fd9e2},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x511099},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x45b2e7},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x12d59a}];return _0x34cc0f['map'](function(_0x5c4360){const _0x4af989=_0x5c4360['locale'];return({label:_0xe082ee,icon:_0x51954e,tooltip:_0x3bea38,style:_0x49da0d})=>{const _0x329409=_0x5c4360['commands']['get']('footnotesStyle'),_0x18f45e=new _0x386d83(_0x4af989);return _0x18f45e['set']({'label':_0xe082ee,'icon':_0x51954e,'tooltip':_0x3bea38}),_0x18f45e['bind']('isOn')['to'](_0x329409,'value',_0x1e6573=>_0x1e6573===_0x49da0d),_0x18f45e['bind']('isEnabled')['to'](_0x329409,'isEnabled'),_0x18f45e['on']('execute',()=>{_0x5c4360['execute']('footnotesStyle',{'value':_0x49da0d}),_0x5c4360['editing']['view']['focus']();}),_0x18f45e;};}(_0x99f590));}(_0x3baf16),_0x2899d2=new $(_0x3baf16['locale'],{'styleGridAriaLabel':_0x4d7896,'styleButtonViews':_0x55daff}),_0x18c1b6=_0x3baf16['commands']['get']('footnotesStart');return _0x2899d2['startIndexFieldView']['bind']('isEnabled')['to'](_0x18c1b6),_0x2899d2['startIndexFieldView']['fieldView']['bind']('value')['to'](_0x18c1b6),_0x2899d2['on']('footnotesListStart',(_0x4208ef,_0x4cc022)=>{_0x3baf16['execute']('footnotesStart',{'value':_0x4cc022['startIndex']});}),_0x2899d2['delegate']('execute')['to'](_0x34e06c),_0x2899d2;}({'editor':_0x3b756d,'dropdownView':_0x189049});_0x189049['panelView']['children']['add'](_0x5ec140);}),_0x189049;};}(_0x34b664));}['afterInit'](){const {editor:_0x211a33}=this,{t:t}=_0x211a33['locale'],_0x6568f7=_0x211a33['plugins']['get'](_0x46b3ea),{defaultPositions:_0x3e13a5}=_0x3b35f0;_0x6568f7['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x211a33['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x594191=>{let _0x45fddd=_0x594191['getFirstPosition']()?.['parent'];return _0x45fddd?.['is']('$text')&&(_0x45fddd=_0x45fddd['parent']),_0x45fddd?.['is']('element')?_0x45fddd['findAncestor'](H):null;},'positions':[_0x3e13a5['southArrowNorth'],_0x3e13a5['southArrowNorthMiddleWest'],_0x3e13a5['southArrowNorthMiddleEast'],_0x3e13a5['southArrowNorthWest'],_0x3e13a5['southArrowNorthEast'],_0x3e13a5['northArrowSouth'],_0x3e13a5['northArrowSouthMiddleWest'],_0x3e13a5['northArrowSouthMiddleEast'],_0x3e13a5['northArrowSouthWest'],_0x3e13a5['northArrowSouthEast'],_0x3e13a5['viewportStickyNorth']]});}}class ft extends _0x28ad1a{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,f as FootnotesTracker,i as FootnotesUI,h as InsertFootnoteCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-footnotes",
3
- "version": "47.4.0-alpha.6",
3
+ "version": "47.4.0",
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.4.0-alpha.6",
27
- "@ckeditor/ckeditor5-ui": "47.4.0-alpha.6",
28
- "@ckeditor/ckeditor5-engine": "47.4.0-alpha.6",
29
- "@ckeditor/ckeditor5-icons": "47.4.0-alpha.6",
30
- "@ckeditor/ckeditor5-widget": "47.4.0-alpha.6",
31
- "@ckeditor/ckeditor5-clipboard": "47.4.0-alpha.6",
32
- "@ckeditor/ckeditor5-utils": "47.4.0-alpha.6",
33
- "ckeditor5": "47.4.0-alpha.6"
26
+ "@ckeditor/ckeditor5-core": "47.4.0",
27
+ "@ckeditor/ckeditor5-ui": "47.4.0",
28
+ "@ckeditor/ckeditor5-engine": "47.4.0",
29
+ "@ckeditor/ckeditor5-icons": "47.4.0",
30
+ "@ckeditor/ckeditor5-widget": "47.4.0",
31
+ "@ckeditor/ckeditor5-clipboard": "47.4.0",
32
+ "@ckeditor/ckeditor5-utils": "47.4.0",
33
+ "ckeditor5": "47.4.0"
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
- const _0x25e52c=_0x5c2a;function _0x1954(){const _0x3b455d=['end','isEnabled','getItems','checkChild','length','insertObject','plugins','278433uhTkWV','footnoteRef','execute','insert-footnote-command-executed-with-invalid-id','_getPositionToInsertFootnote','document','isObject','3298743IxQCYa','341220reQbIv','949764TGlKrV','refresh','2kIxAza','change','get','222430WuXWIi','FootnotesEditing','616563stmOVs','editor','string','getFirstRange','isBlock','createElement','5517750WiTYSq','model','selection','footnoteId','_moveSelectionToFootnoteDefinition','test','56GyxJMp'];_0x1954=function(){return _0x3b455d;};return _0x1954();}(function(_0x2d2e55,_0x39d2c3){const _0x50f72f=_0x5c2a,_0x383235=_0x2d2e55();while(!![]){try{const _0x52519e=-parseInt(_0x50f72f(0x147))/0x1*(parseInt(_0x50f72f(0x152))/0x2)+-parseInt(_0x50f72f(0x150))/0x3+parseInt(_0x50f72f(0x14f))/0x4+parseInt(_0x50f72f(0x131))/0x5+parseInt(_0x50f72f(0x139))/0x6+-parseInt(_0x50f72f(0x14e))/0x7+-parseInt(_0x50f72f(0x13f))/0x8*(-parseInt(_0x50f72f(0x133))/0x9);if(_0x52519e===_0x39d2c3)break;else _0x383235['push'](_0x383235['shift']());}catch(_0x35b942){_0x383235['push'](_0x383235['shift']());}}}(_0x1954,0x70f67));import{logWarning as _0x8c141,uid as _0x416eed}from'ckeditor5/src/utils.js';import{Command as _0x483d60}from'ckeditor5/src/core.js';function _0x5c2a(_0x553b7a,_0x1a7023){const _0x19547a=_0x1954();return _0x5c2a=function(_0x5c2ad9,_0xa79a2f){_0x5c2ad9=_0x5c2ad9-0x130;let _0x1020d3=_0x19547a[_0x5c2ad9];return _0x1020d3;},_0x5c2a(_0x553b7a,_0x1a7023);}export class InsertFootnoteCommand extends _0x483d60{[_0x25e52c(0x151)](){const _0x251c90=_0x25e52c,_0x25bdf9=this[_0x251c90(0x134)][_0x251c90(0x13a)][_0x251c90(0x14c)][_0x251c90(0x13b)],_0x5d6d25=this[_0x251c90(0x14b)](_0x25bdf9);this[_0x251c90(0x141)]=!!_0x5d6d25;}[_0x25e52c(0x149)](_0x210f68){const _0x2e291c=_0x25e52c,{editor:_0x4dc17d}=this,{model:_0x24e471}=_0x4dc17d,{selection:_0x7c3952}=_0x24e471[_0x2e291c(0x14c)],_0x2db956=this[_0x2e291c(0x14b)](_0x7c3952);if(!_0x2db956)return;const _0x422690=_0x4dc17d[_0x2e291c(0x146)][_0x2e291c(0x130)](_0x2e291c(0x132)),_0x5b8e64=_0x210f68?.[_0x2e291c(0x13c)]??_0x416eed();!function(_0x39d1c2){const _0x1d530b=_0x2e291c;return _0x1d530b(0x135)==typeof _0x39d1c2&&_0x39d1c2[_0x1d530b(0x144)]>0x0&&!/\s/[_0x1d530b(0x13e)](_0x39d1c2)&&!/^\d/[_0x1d530b(0x13e)](_0x39d1c2);}(_0x5b8e64)?_0x8c141(_0x2e291c(0x14a)):(_0x24e471[_0x2e291c(0x153)](_0x10c64f=>{const _0x4c1f26=_0x2e291c,_0x3958cf=_0x10c64f[_0x4c1f26(0x138)](_0x4c1f26(0x148),{'footnoteId':_0x5b8e64});_0x24e471[_0x4c1f26(0x145)](_0x3958cf,_0x2db956,null);}),_0x422690[_0x2e291c(0x13d)](_0x5b8e64));}[_0x25e52c(0x14b)](_0x472abc){const _0x188216=_0x25e52c,{model:_0x14739b}=this[_0x188216(0x134)],{schema:_0xb0530d}=_0x14739b,_0x43889c=_0x472abc[_0x188216(0x136)]();for(const _0x2c50a6 of _0x43889c[_0x188216(0x142)]())if(_0xb0530d[_0x188216(0x137)](_0x2c50a6)||_0xb0530d[_0x188216(0x14d)](_0x2c50a6))return null;const _0x4e73eb=_0x43889c[_0x188216(0x140)];return _0xb0530d[_0x188216(0x143)](_0x4e73eb,_0x188216(0x148))?_0x4e73eb:null;}}
23
+ const _0x4c7ac2=_0x3382;function _0x3382(_0x39b281,_0x340fdc){const _0x1a62e1=_0x1a62();return _0x3382=function(_0x3382fb,_0x4fecdd){_0x3382fb=_0x3382fb-0x133;let _0xd04241=_0x1a62e1[_0x3382fb];return _0xd04241;},_0x3382(_0x39b281,_0x340fdc);}function _0x1a62(){const _0x393c47=['5PbPYgt','document','createElement','footnoteRef','refresh','179484rbjGrP','get','editor','72wzdTwg','10vkExOa','400TcDrmf','48201zfACfh','isObject','checkChild','test','5616128WoaYcv','3412926eIJPvr','35KfToMC','insert-footnote-command-executed-with-invalid-id','end','isEnabled','change','selection','17883JEFvVu','2879252QcdWpR','plugins','getItems','_getPositionToInsertFootnote','execute','isBlock','FootnotesEditing','1656498aqwSlk','insertObject','length','model','getFirstRange','string','footnoteId','_moveSelectionToFootnoteDefinition'];_0x1a62=function(){return _0x393c47;};return _0x1a62();}(function(_0x4f4d2e,_0x3b76d6){const _0x35c434=_0x3382,_0x6bb29c=_0x4f4d2e();while(!![]){try{const _0x2692fe=-parseInt(_0x35c434(0x141))/0x1+-parseInt(_0x35c434(0x145))/0x2*(-parseInt(_0x35c434(0x147))/0x3)+-parseInt(_0x35c434(0x154))/0x4*(-parseInt(_0x35c434(0x13c))/0x5)+parseInt(_0x35c434(0x134))/0x6*(parseInt(_0x35c434(0x14d))/0x7)+parseInt(_0x35c434(0x14b))/0x8+-parseInt(_0x35c434(0x153))/0x9*(parseInt(_0x35c434(0x146))/0xa)+-parseInt(_0x35c434(0x14c))/0xb*(parseInt(_0x35c434(0x144))/0xc);if(_0x2692fe===_0x3b76d6)break;else _0x6bb29c['push'](_0x6bb29c['shift']());}catch(_0x560467){_0x6bb29c['push'](_0x6bb29c['shift']());}}}(_0x1a62,0xba0a3));import{logWarning as _0x31682f,uid as _0x5f1e96}from'ckeditor5/src/utils.js';import{Command as _0xc6a871}from'ckeditor5/src/core.js';export class InsertFootnoteCommand extends _0xc6a871{[_0x4c7ac2(0x140)](){const _0x2488df=_0x4c7ac2,_0x28693d=this[_0x2488df(0x143)][_0x2488df(0x137)][_0x2488df(0x13d)][_0x2488df(0x152)],_0x4c2114=this[_0x2488df(0x157)](_0x28693d);this[_0x2488df(0x150)]=!!_0x4c2114;}[_0x4c7ac2(0x158)](_0x162ebe){const _0x5e6479=_0x4c7ac2,{editor:_0x2b8b41}=this,{model:_0x12501d}=_0x2b8b41,{selection:_0x5429c4}=_0x12501d[_0x5e6479(0x13d)],_0xe7c759=this[_0x5e6479(0x157)](_0x5429c4);if(!_0xe7c759)return;const _0x453d46=_0x2b8b41[_0x5e6479(0x155)][_0x5e6479(0x142)](_0x5e6479(0x133)),_0x316b9d=_0x162ebe?.[_0x5e6479(0x13a)]??_0x5f1e96();!function(_0x1b91c5){const _0x282fe1=_0x5e6479;return _0x282fe1(0x139)==typeof _0x1b91c5&&_0x1b91c5[_0x282fe1(0x136)]>0x0&&!/\s/[_0x282fe1(0x14a)](_0x1b91c5)&&!/^\d/[_0x282fe1(0x14a)](_0x1b91c5);}(_0x316b9d)?_0x31682f(_0x5e6479(0x14e)):(_0x12501d[_0x5e6479(0x151)](_0x42e75b=>{const _0x251bdf=_0x5e6479,_0x1a805c=_0x42e75b[_0x251bdf(0x13e)](_0x251bdf(0x13f),{'footnoteId':_0x316b9d});_0x12501d[_0x251bdf(0x135)](_0x1a805c,_0xe7c759,null);}),_0x453d46[_0x5e6479(0x13b)](_0x316b9d));}[_0x4c7ac2(0x157)](_0x274985){const _0x4e8a2c=_0x4c7ac2,{model:_0x42b4c3}=this[_0x4e8a2c(0x143)],{schema:_0x14b039}=_0x42b4c3,_0x50a3b6=_0x274985[_0x4e8a2c(0x138)]();for(const _0x1df68e of _0x50a3b6[_0x4e8a2c(0x156)]())if(_0x14b039[_0x4e8a2c(0x159)](_0x1df68e)||_0x14b039[_0x4e8a2c(0x148)](_0x1df68e))return null;const _0x1875d5=_0x50a3b6[_0x4e8a2c(0x14f)];return _0x14b039[_0x4e8a2c(0x149)](_0x1875d5,_0x4e8a2c(0x13f))?_0x1875d5:null;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x28f303=_0x1e70;function _0x1d3d(){const _0x2b7b1f=['change','refresh','isInteger','get','getFootnotesDefinitionsObjectElement','getAttribute','24VXJzls','2749572oVuVeo','2146916tzTIHX','1085611HEeDSM','setAttribute','2589534lIBzgD','9104056Jrxefo','value','1114795Yzqvcb','plugins','3LJbpoM','isEnabled','execute','_updateFootnotesCounters','2506284JeFZKV','footnotesListStart','model'];_0x1d3d=function(){return _0x2b7b1f;};return _0x1d3d();}(function(_0x1d0fc6,_0x188af8){const _0x5c246a=_0x1e70,_0xbf9037=_0x1d0fc6();while(!![]){try{const _0x35653c=-parseInt(_0x5c246a(0x182))/0x1+parseInt(_0x5c246a(0x181))/0x2+-parseInt(_0x5c246a(0x172))/0x3*(-parseInt(_0x5c246a(0x176))/0x4)+-parseInt(_0x5c246a(0x170))/0x5*(parseInt(_0x5c246a(0x17f))/0x6)+parseInt(_0x5c246a(0x180))/0x7+parseInt(_0x5c246a(0x16e))/0x8+-parseInt(_0x5c246a(0x16d))/0x9;if(_0x35653c===_0x188af8)break;else _0xbf9037['push'](_0xbf9037['shift']());}catch(_0xa73455){_0xbf9037['push'](_0xbf9037['shift']());}}}(_0x1d3d,0xebc1b));function _0x1e70(_0xdf4bd1,_0x5117c7){const _0x1d3de3=_0x1d3d();return _0x1e70=function(_0x1e7060,_0x3171ac){_0x1e7060=_0x1e7060-0x16c;let _0x57ae56=_0x1d3de3[_0x1e7060];return _0x57ae56;},_0x1e70(_0xdf4bd1,_0x5117c7);}import{Command as _0x70aa5d}from'ckeditor5/src/core.js';import{FootnotesTracker as _0x35d062}from'../../footnotestracker.js';export class FootnotesStartCommand extends _0x70aa5d{[_0x28f303(0x17a)](){const _0x43dcc6=_0x28f303,{editor:_0x4699ee}=this,_0x2f20d0=_0x4699ee[_0x43dcc6(0x171)][_0x43dcc6(0x17c)](_0x35d062)[_0x43dcc6(0x17d)]();this[_0x43dcc6(0x173)]=!!_0x2f20d0,this[_0x43dcc6(0x16f)]=_0x2f20d0?.[_0x43dcc6(0x17e)](_0x43dcc6(0x177))??null;}[_0x28f303(0x174)]({value:_0x41664}){const _0x1f8c7a=_0x28f303,{editor:_0x705a94}=this,_0x15e38a=_0x705a94[_0x1f8c7a(0x171)][_0x1f8c7a(0x17c)](_0x35d062),_0x254c16=_0x15e38a[_0x1f8c7a(0x17d)]();_0x254c16&&Number[_0x1f8c7a(0x17b)](_0x41664)&&_0x705a94[_0x1f8c7a(0x178)][_0x1f8c7a(0x179)](_0xf8e9a5=>{const _0x59e2c6=_0x1f8c7a;_0xf8e9a5[_0x59e2c6(0x16c)](_0x59e2c6(0x177),_0x41664,_0x254c16),_0x15e38a[_0x59e2c6(0x175)](_0xf8e9a5);});}}
23
+ const _0x1171a1=_0x292d;(function(_0x4a183b,_0x14a3db){const _0x625c62=_0x292d,_0xed7205=_0x4a183b();while(!![]){try{const _0x405c2a=-parseInt(_0x625c62(0x17d))/0x1*(-parseInt(_0x625c62(0x18a))/0x2)+parseInt(_0x625c62(0x181))/0x3*(parseInt(_0x625c62(0x187))/0x4)+parseInt(_0x625c62(0x193))/0x5+-parseInt(_0x625c62(0x18d))/0x6+-parseInt(_0x625c62(0x194))/0x7*(-parseInt(_0x625c62(0x184))/0x8)+parseInt(_0x625c62(0x18e))/0x9+parseInt(_0x625c62(0x192))/0xa*(-parseInt(_0x625c62(0x17f))/0xb);if(_0x405c2a===_0x14a3db)break;else _0xed7205['push'](_0xed7205['shift']());}catch(_0x3e7532){_0xed7205['push'](_0xed7205['shift']());}}}(_0x292f,0x6c66c));function _0x292d(_0x285ccf,_0x56622f){const _0x292f9f=_0x292f();return _0x292d=function(_0x292dd5,_0x4265b5){_0x292dd5=_0x292dd5-0x17d;let _0x5d8c07=_0x292f9f[_0x292dd5];return _0x5d8c07;},_0x292d(_0x285ccf,_0x56622f);}import{Command as _0x339bb7}from'ckeditor5/src/core.js';import{FootnotesTracker as _0x4a155a}from'../../footnotestracker.js';export class FootnotesStartCommand extends _0x339bb7{[_0x1171a1(0x180)](){const _0x42c3b6=_0x1171a1,{editor:_0x52abbb}=this,_0x1b2336=_0x52abbb[_0x42c3b6(0x17e)][_0x42c3b6(0x191)](_0x4a155a)[_0x42c3b6(0x18c)]();this[_0x42c3b6(0x186)]=!!_0x1b2336,this[_0x42c3b6(0x182)]=_0x1b2336?.[_0x42c3b6(0x190)](_0x42c3b6(0x18f))??null;}[_0x1171a1(0x195)]({value:_0xb425db}){const _0x148f2a=_0x1171a1,{editor:_0xb5b43c}=this,_0xaf3d10=_0xb5b43c[_0x148f2a(0x17e)][_0x148f2a(0x191)](_0x4a155a),_0x523523=_0xaf3d10[_0x148f2a(0x18c)]();_0x523523&&Number[_0x148f2a(0x189)](_0xb425db)&&_0xb5b43c[_0x148f2a(0x183)][_0x148f2a(0x188)](_0x245430=>{const _0x890341=_0x148f2a;_0x245430[_0x890341(0x185)](_0x890341(0x18f),_0xb425db,_0x523523),_0xaf3d10[_0x890341(0x18b)](_0x245430);});}}function _0x292f(){const _0x8aa6f2=['28yhNsTc','change','isInteger','276344ZMtIxI','_updateFootnotesCounters','getFootnotesDefinitionsObjectElement','2005182TScfuD','5744142xCMYxv','footnotesListStart','getAttribute','get','283980IZaIHE','1570985GlmNje','3252081KKPqfw','execute','4JHkPoG','plugins','627IXsDYv','refresh','183081BvWCrZ','value','model','8UsLuwX','setAttribute','isEnabled'];_0x292f=function(){return _0x8aa6f2;};return _0x292f();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x34dd60=_0x2a8c;(function(_0x4bef0b,_0x43f8a7){const _0xbe48fc=_0x2a8c,_0x2a3a58=_0x4bef0b();while(!![]){try{const _0x5e8051=parseInt(_0xbe48fc(0x121))/0x1+-parseInt(_0xbe48fc(0x125))/0x2*(parseInt(_0xbe48fc(0x11b))/0x3)+parseInt(_0xbe48fc(0x118))/0x4*(parseInt(_0xbe48fc(0x11c))/0x5)+parseInt(_0xbe48fc(0x122))/0x6*(-parseInt(_0xbe48fc(0x11a))/0x7)+parseInt(_0xbe48fc(0x111))/0x8*(parseInt(_0xbe48fc(0x115))/0x9)+-parseInt(_0xbe48fc(0x113))/0xa+parseInt(_0xbe48fc(0x116))/0xb;if(_0x5e8051===_0x43f8a7)break;else _0x2a3a58['push'](_0x2a3a58['shift']());}catch(_0x251ec9){_0x2a3a58['push'](_0x2a3a58['shift']());}}}(_0x33dd,0xbaf1c));import{Command as _0x3c289e}from'ckeditor5/src/core.js';import{FOOTNOTES_DEFINITIONS_STYLES as _0x44e4d5}from'../footnotespropertiesconfig.js';import{FootnotesTracker as _0x2fcf50}from'../../footnotestracker.js';function _0x33dd(){const _0x3543ca=['plugins','_updateFootnotesCounters','getAttribute','341444FTVKdg','30XvisGp','execute','change','2wStUqm','includes','setAttribute','isEnabled','footnotesListStyle','1285624EcJWJu','getFootnotesDefinitionsObjectElement','6079700mRljTs','value','9OIGfVN','9535559MbWPCz','model','16204sTvZID','refresh','116578JoSWVH','2494887eZswOM','1135yPeEaD','get'];_0x33dd=function(){return _0x3543ca;};return _0x33dd();}function _0x2a8c(_0x31af4e,_0x4a98e1){const _0x33dd91=_0x33dd();return _0x2a8c=function(_0x2a8cb5,_0x139cd6){_0x2a8cb5=_0x2a8cb5-0x110;let _0x41f79c=_0x33dd91[_0x2a8cb5];return _0x41f79c;},_0x2a8c(_0x31af4e,_0x4a98e1);}export class FootnotesStyleCommand extends _0x3c289e{[_0x34dd60(0x119)](){const _0x2cdc18=_0x34dd60,{editor:_0x509463}=this,_0x599a25=_0x509463[_0x2cdc18(0x11e)][_0x2cdc18(0x11d)](_0x2fcf50)[_0x2cdc18(0x112)]();this[_0x2cdc18(0x128)]=!!_0x599a25,this[_0x2cdc18(0x114)]=_0x599a25?.[_0x2cdc18(0x120)](_0x2cdc18(0x110))??null;}[_0x34dd60(0x123)]({value:_0x4d0655}){const _0x51246e=_0x34dd60,{editor:_0x54e2bf}=this,_0x137c13=_0x54e2bf[_0x51246e(0x11e)][_0x51246e(0x11d)](_0x2fcf50),_0x164e23=_0x137c13[_0x51246e(0x112)]();_0x164e23&&_0x44e4d5[_0x51246e(0x126)](_0x4d0655)&&_0x54e2bf[_0x51246e(0x117)][_0x51246e(0x124)](_0x2f5390=>{const _0x616058=_0x51246e;_0x2f5390[_0x616058(0x127)](_0x616058(0x110),_0x4d0655,_0x164e23),_0x137c13[_0x616058(0x11f)](_0x2f5390);});}}
23
+ const _0x5c016d=_0x497d;function _0x2d34(){const _0x1b579b=['2624844aFkJkn','_updateFootnotesCounters','getAttribute','8xttDyN','isEnabled','get','execute','6871802ezIKOa','516DxnbKr','getFootnotesDefinitionsObjectElement','plugins','44440hUYZvy','789921qVybSG','refresh','62280iLXjKg','value','setAttribute','2439IkjaBz','model','1073544ocvKCS','includes','1196276ywZxJd','footnotesListStyle','change'];_0x2d34=function(){return _0x1b579b;};return _0x2d34();}(function(_0x33d853,_0x4a1735){const _0x48affc=_0x497d,_0x1e9aaf=_0x33d853();while(!![]){try{const _0xe35035=parseInt(_0x48affc(0x8a))/0x1+-parseInt(_0x48affc(0x79))/0x2+-parseInt(_0x48affc(0x7e))/0x3+-parseInt(_0x48affc(0x7b))/0x4+parseInt(_0x48affc(0x89))/0x5*(parseInt(_0x48affc(0x86))/0x6)+parseInt(_0x48affc(0x85))/0x7*(-parseInt(_0x48affc(0x81))/0x8)+parseInt(_0x48affc(0x77))/0x9*(parseInt(_0x48affc(0x8c))/0xa);if(_0xe35035===_0x4a1735)break;else _0x1e9aaf['push'](_0x1e9aaf['shift']());}catch(_0x2b6946){_0x1e9aaf['push'](_0x1e9aaf['shift']());}}}(_0x2d34,0x862e2));import{Command as _0x3dd2a4}from'ckeditor5/src/core.js';import{FOOTNOTES_DEFINITIONS_STYLES as _0x52c974}from'../footnotespropertiesconfig.js';import{FootnotesTracker as _0x55dca9}from'../../footnotestracker.js';function _0x497d(_0x4f227c,_0xceb6a5){const _0x2d34c4=_0x2d34();return _0x497d=function(_0x497d08,_0x292fc0){_0x497d08=_0x497d08-0x76;let _0x5bf047=_0x2d34c4[_0x497d08];return _0x5bf047;},_0x497d(_0x4f227c,_0xceb6a5);}export class FootnotesStyleCommand extends _0x3dd2a4{[_0x5c016d(0x8b)](){const _0x2606a3=_0x5c016d,{editor:_0x67df11}=this,_0x3ae240=_0x67df11[_0x2606a3(0x88)][_0x2606a3(0x83)](_0x55dca9)[_0x2606a3(0x87)]();this[_0x2606a3(0x82)]=!!_0x3ae240,this[_0x2606a3(0x8d)]=_0x3ae240?.[_0x2606a3(0x80)](_0x2606a3(0x7c))??null;}[_0x5c016d(0x84)]({value:_0x1c4a70}){const _0x405bc3=_0x5c016d,{editor:_0x11585c}=this,_0x2212de=_0x11585c[_0x405bc3(0x88)][_0x405bc3(0x83)](_0x55dca9),_0x25faa9=_0x2212de[_0x405bc3(0x87)]();_0x25faa9&&_0x52c974[_0x405bc3(0x7a)](_0x1c4a70)&&_0x11585c[_0x405bc3(0x78)][_0x405bc3(0x7d)](_0x160085=>{const _0x2c1aa2=_0x405bc3;_0x160085[_0x2c1aa2(0x76)](_0x2c1aa2(0x7c),_0x1c4a70,_0x25faa9),_0x2212de[_0x2c1aa2(0x7f)](_0x160085);});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{BalloonPanelView as _0x43b492,ButtonView as _0x23835f,ContextualBalloon as _0x5b1536,createDropdown as _0x23ce9a}from'ckeditor5/src/ui.js';import{WidgetToolbarRepository as _0xa807b}from'ckeditor5/src/widget.js';import{Plugin as _0x3d59d1}from'ckeditor5/src/core.js';import{IconFootnote as _0xf29a19,IconListStyleDecimal as _0xbedcdc,IconListStyleDecimalLeadingZero as _0x141e82,IconListStyleLowerLatin as _0x312130,IconListStyleLowerRoman as _0x3e1045,IconListStyleUpperLatin as _0x1ffcef,IconListStyleUpperRoman as _0x598506}from'ckeditor5/src/icons.js';import{FootnotesDefinitionsPropertiesView as _0x474e65}from'./ui/footnotesdefinitionspropertiesview.js';import{isFootnotesDefinitionsWidget as _0x9abd3d}from'../footnotesediting.js';import'../../theme/footnotesproperties.css';export class FootnotesPropertiesUI extends _0x3d59d1{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x5b1536,_0xa807b];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3bdba1}=this,{componentFactory:_0x44192c}=_0x3bdba1['ui'];_0x3bdba1['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x44192c['add']('footnotesStyle',function(_0xb322ee){return _0x14e5a2=>{const {t:t}=_0x14e5a2,_0x514ec2=_0xb322ee['commands']['get']('footnotesStyle'),_0x158991=_0x23ce9a(_0x14e5a2),{buttonView:_0x4b11dc}=_0x158991;return _0x158991['class']='ck-footnotes-styles-dropdown',_0x158991['bind']('isEnabled')['to'](_0x514ec2,'isEnabled'),_0x4b11dc['set']({'label':t('Footnotes\x20style'),'icon':_0xf29a19,'tooltip':!0x0}),_0x158991['once']('change:isOpen',()=>{const _0x1a98e4=function({editor:_0x300d17,dropdownView:_0x5c19da}){const {t:t}=_0x300d17['locale'],_0x3dbfba=t('Footnotes\x20definitions\x20styles'),_0x5a2fad=function(_0x276203){const t=_0x276203['locale']['t'],_0x5a9b21=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0xbedcdc},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x141e82},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x3e1045},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x598506},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x312130},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x1ffcef}];return _0x5a9b21['map'](function(_0x40b781){const _0xcefa55=_0x40b781['locale'];return({label:_0x296201,icon:_0x339ac8,tooltip:_0x127fe0,style:_0x29cdc4})=>{const _0x3265e8=_0x40b781['commands']['get']('footnotesStyle'),_0x4fc8b2=new _0x23835f(_0xcefa55);return _0x4fc8b2['set']({'label':_0x296201,'icon':_0x339ac8,'tooltip':_0x127fe0}),_0x4fc8b2['bind']('isOn')['to'](_0x3265e8,'value',_0x1ce7bd=>_0x1ce7bd===_0x29cdc4),_0x4fc8b2['bind']('isEnabled')['to'](_0x3265e8,'isEnabled'),_0x4fc8b2['on']('execute',()=>{_0x40b781['execute']('footnotesStyle',{'value':_0x29cdc4}),_0x40b781['editing']['view']['focus']();}),_0x4fc8b2;};}(_0x276203));}(_0x300d17),_0x579e51=new _0x474e65(_0x300d17['locale'],{'styleGridAriaLabel':_0x3dbfba,'styleButtonViews':_0x5a2fad}),_0xc02e30=_0x300d17['commands']['get']('footnotesStart');return _0x579e51['startIndexFieldView']['bind']('isEnabled')['to'](_0xc02e30),_0x579e51['startIndexFieldView']['fieldView']['bind']('value')['to'](_0xc02e30),_0x579e51['on']('footnotesListStart',(_0x56514f,_0x1bafe9)=>{_0x300d17['execute']('footnotesStart',{'value':_0x1bafe9['startIndex']});}),_0x579e51['delegate']('execute')['to'](_0x5c19da),_0x579e51;}({'editor':_0xb322ee,'dropdownView':_0x158991});_0x158991['panelView']['children']['add'](_0x1a98e4);}),_0x158991;};}(_0x3bdba1));}['afterInit'](){const {editor:_0x4e9aa8}=this,{t:t}=_0x4e9aa8['locale'],_0x4fa3b8=_0x4e9aa8['plugins']['get'](_0xa807b),{defaultPositions:_0x4cb466}=_0x43b492;_0x4fa3b8['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x4e9aa8['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x1bc983=>{let _0xf64c6f=_0x1bc983['getFirstPosition']()?.['parent'];return _0xf64c6f?.['is']('$text')&&(_0xf64c6f=_0xf64c6f['parent']),_0xf64c6f?.['is']('element')?_0xf64c6f['findAncestor'](_0x9abd3d):null;},'positions':[_0x4cb466['southArrowNorth'],_0x4cb466['southArrowNorthMiddleWest'],_0x4cb466['southArrowNorthMiddleEast'],_0x4cb466['southArrowNorthWest'],_0x4cb466['southArrowNorthEast'],_0x4cb466['northArrowSouth'],_0x4cb466['northArrowSouthMiddleWest'],_0x4cb466['northArrowSouthMiddleEast'],_0x4cb466['northArrowSouthWest'],_0x4cb466['northArrowSouthEast'],_0x4cb466['viewportStickyNorth']]});}}
23
+ import{BalloonPanelView as _0xba0d2e,ButtonView as _0x4b2d3a,ContextualBalloon as _0x431cc7,createDropdown as _0x48be57}from'ckeditor5/src/ui.js';import{WidgetToolbarRepository as _0x3ba696}from'ckeditor5/src/widget.js';import{Plugin as _0x441dce}from'ckeditor5/src/core.js';import{IconFootnote as _0x2b0ecf,IconListStyleDecimal as _0x5e7bc3,IconListStyleDecimalLeadingZero as _0x312689,IconListStyleLowerLatin as _0x4367eb,IconListStyleLowerRoman as _0x557898,IconListStyleUpperLatin as _0xe8ab1d,IconListStyleUpperRoman as _0x18dfa1}from'ckeditor5/src/icons.js';import{FootnotesDefinitionsPropertiesView as _0x201af6}from'./ui/footnotesdefinitionspropertiesview.js';import{isFootnotesDefinitionsWidget as _0x2809da}from'../footnotesediting.js';import'../../theme/footnotesproperties.css';export class FootnotesPropertiesUI extends _0x441dce{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x431cc7,_0x3ba696];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x1be647}=this,{componentFactory:_0x51356c}=_0x1be647['ui'];_0x1be647['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x51356c['add']('footnotesStyle',function(_0x372aca){return _0x793d62=>{const {t:t}=_0x793d62,_0xa4b2b7=_0x372aca['commands']['get']('footnotesStyle'),_0x23cef1=_0x48be57(_0x793d62),{buttonView:_0x175cd2}=_0x23cef1;return _0x23cef1['class']='ck-footnotes-styles-dropdown',_0x23cef1['bind']('isEnabled')['to'](_0xa4b2b7,'isEnabled'),_0x175cd2['set']({'label':t('Footnotes\x20style'),'icon':_0x2b0ecf,'tooltip':!0x0}),_0x23cef1['once']('change:isOpen',()=>{const _0x4e6c40=function({editor:_0x52bf89,dropdownView:_0x20d258}){const {t:t}=_0x52bf89['locale'],_0x55d0ba=t('Footnotes\x20definitions\x20styles'),_0x559289=function(_0x3abc9b){const t=_0x3abc9b['locale']['t'],_0x6c9ff5=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x5e7bc3},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x312689},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x557898},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x18dfa1},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x4367eb},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0xe8ab1d}];return _0x6c9ff5['map'](function(_0x2e42d0){const _0x101b91=_0x2e42d0['locale'];return({label:_0x29af0d,icon:_0x41b955,tooltip:_0x2bc36c,style:_0xedc1f5})=>{const _0x23580c=_0x2e42d0['commands']['get']('footnotesStyle'),_0xd9c004=new _0x4b2d3a(_0x101b91);return _0xd9c004['set']({'label':_0x29af0d,'icon':_0x41b955,'tooltip':_0x2bc36c}),_0xd9c004['bind']('isOn')['to'](_0x23580c,'value',_0x5e6259=>_0x5e6259===_0xedc1f5),_0xd9c004['bind']('isEnabled')['to'](_0x23580c,'isEnabled'),_0xd9c004['on']('execute',()=>{_0x2e42d0['execute']('footnotesStyle',{'value':_0xedc1f5}),_0x2e42d0['editing']['view']['focus']();}),_0xd9c004;};}(_0x3abc9b));}(_0x52bf89),_0x52037c=new _0x201af6(_0x52bf89['locale'],{'styleGridAriaLabel':_0x55d0ba,'styleButtonViews':_0x559289}),_0x20e1e0=_0x52bf89['commands']['get']('footnotesStart');return _0x52037c['startIndexFieldView']['bind']('isEnabled')['to'](_0x20e1e0),_0x52037c['startIndexFieldView']['fieldView']['bind']('value')['to'](_0x20e1e0),_0x52037c['on']('footnotesListStart',(_0x189d1e,_0x23d866)=>{_0x52bf89['execute']('footnotesStart',{'value':_0x23d866['startIndex']});}),_0x52037c['delegate']('execute')['to'](_0x20d258),_0x52037c;}({'editor':_0x372aca,'dropdownView':_0x23cef1});_0x23cef1['panelView']['children']['add'](_0x4e6c40);}),_0x23cef1;};}(_0x1be647));}['afterInit'](){const {editor:_0x4d108d}=this,{t:t}=_0x4d108d['locale'],_0x455b6b=_0x4d108d['plugins']['get'](_0x3ba696),{defaultPositions:_0x31bd54}=_0xba0d2e;_0x455b6b['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x4d108d['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x349497=>{let _0x3e05e5=_0x349497['getFirstPosition']()?.['parent'];return _0x3e05e5?.['is']('$text')&&(_0x3e05e5=_0x3e05e5['parent']),_0x3e05e5?.['is']('element')?_0x3e05e5['findAncestor'](_0x2809da):null;},'positions':[_0x31bd54['southArrowNorth'],_0x31bd54['southArrowNorthMiddleWest'],_0x31bd54['southArrowNorthMiddleEast'],_0x31bd54['southArrowNorthWest'],_0x31bd54['southArrowNorthEast'],_0x31bd54['northArrowSouth'],_0x31bd54['northArrowSouthMiddleWest'],_0x31bd54['northArrowSouthMiddleEast'],_0x31bd54['northArrowSouthWest'],_0x31bd54['northArrowSouthEast'],_0x31bd54['viewportStickyNorth']]});}}