@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251016.0 → 0.0.0-nightly-20251017.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.
- package/build/footnotes.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +9 -9
- package/src/commands/insertfootnotecommand.js +1 -1
- package/src/footnotes.js +1 -1
- package/src/footnotesclipboard.js +1 -1
- package/src/footnotesediting.js +1 -1
- package/src/footnotesproperties/commands/footnotesstartcommand.js +1 -1
- package/src/footnotesproperties/commands/footnotesstylecommand.js +1 -1
- package/src/footnotesproperties/footnotespropertiesconfig.js +1 -1
- package/src/footnotesproperties/footnotespropertiesediting.js +1 -1
- package/src/footnotesproperties/footnotespropertiesui.js +1 -1
- package/src/footnotesproperties/ui/footnotesdefinitionspropertiesview.js +1 -1
- package/src/footnotesproperties.js +1 -1
- package/src/footnotestracker.js +1 -1
- package/src/footnotesui.js +1 -1
- package/src/index.js +1 -1
- package/src/modelelementtracker.js +1 -1
package/build/footnotes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
|
-
*/(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},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(n){t.setAttribute(n,e[n])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(106),i=n.n(o),s=n(779),r=n.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,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function o(t,e,o,i){var s;if(o)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=n(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++,n=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(n,e,!1,t)},remove:function(t){o(n,e,!0,t)}}}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},728:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(106),i=n.n(o),s=n(779),r=n.n(s)()(i());r.push([t.id,':root{--ck-footnotes-list-widget-label-background-color:#757575;--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-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:1.9em 0 1.5em;padding-inline-start:3em;position:relative}.ck-content .footnotes:before{border-top:1px solid var(--ck-content-footnotes-list-separator-color);content:"";left:0;position:absolute;top:-1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes:before{left:auto;right:0}.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-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.ck.ck-editor__editable .footnote>a{pointer-events:none}.ck.ck-editor__editable .footnotes-wrapper{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes-wrapper:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-list-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-wrapper[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-wrapper>.footnotes{margin-bottom:.65em;margin-top:1em}',""]);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 n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)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]);o&&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),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),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,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},901:(t,e,n)=>{t.exports=n(237)("./src/widget.js")},929:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=o.base?c[0]+o.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=n(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var n=e.domAPI(e);n.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;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=o(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var c=o(t,i),l=0;l<s.length;l++){var u=n(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Footnotes:()=>G,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>Et,FootnotesPropertiesEditing:()=>pt,FootnotesPropertiesUI:()=>It,FootnotesStartCommand:()=>lt,FootnotesStyleCommand:()=>st,FootnotesTracker:()=>d,FootnotesUI:()=>q,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);function r(t,e){const n=c();return(r=function(t,e){return n[t-=419]})(t,e)}const a=r;function c(){const t=["name","element","has","getChanges","_elementName","getElementKey","_model","4770095YFXyWN","insert","attributes","1803488RLPNpF","flat","$text","16075976upWgds","rootName","55202vrbmlI","root","get","remove","5838672vYEDxX","_trackedElements","values","956287orrZDh","type","add","push","length","from","position","_getElementKey","slice","565320ORKUgi","delete","elementName","set","$graveyard","nodeAfter","123GXzgrT","getItems","createRangeOn"];return(c=function(){return t})()}!function(t){const e=r,n=t();for(;;)try{if(629156===parseInt(e(454))/1+-parseInt(e(447))/2*(-parseInt(e(429))/3)+parseInt(e(442))/4+-parseInt(e(439))/5+parseInt(e(451))/6+parseInt(e(423))/7+-parseInt(e(445))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(c);class l{[a(438)];[a(436)];[a(421)];[a(452)]=new Map;constructor(t,e){const n=a;this[n(438)]=t,this[n(436)]=e[n(425)],this[n(421)]=e[n(437)]}[a(435)](t){const e=a,n=new Set,o=new Map;for(const i of t){if(e(440)===i[e(455)]&&e(444)!==i[e(432)]&&i[e(420)][e(428)]){const t=this[e(438)][e(431)](i[e(420)][e(428)]);for(const n of t[e(430)]()){if(!n.is(e(433),this[e(436)]))continue;const t=this[e(421)](n);o[e(434)](t)||o[e(426)](t,[]),o[e(449)](t)[e(457)](n)}}if(e(450)===i[e(455)]&&i[e(432)]===this[e(436)]){const t=this[e(421)]({getAttribute:t=>i[e(441)][e(449)](t)});n[e(456)](t)}}for(const[t,o]of this[e(452)])e(427)===o[e(448)][e(446)]&&n[e(456)](t);for(const t of n)this[e(452)][e(424)](t);for(const[t,n]of o)this[e(452)][e(426)](t,n[n[e(458)]-1]);const i=new Set;for(const[t,s]of o)n[e(434)](t)&&(i[e(456)](s[0]),s[e(458)]>1?o[e(426)](t,s[e(422)](1)):o[e(424)](t),n[e(424)](t));return{removed:Array[e(419)](n),inserted:Array[e(419)](o[e(453)]())[e(443)](),moved:Array[e(419)](i)}}}function u(t,e){const n=h();return(u=function(t,e){return n[t-=103]})(t,e)}const f=u;!function(t){const e=u,n=t();for(;;)try{if(733598===parseInt(e(172))/1*(parseInt(e(104))/2)+-parseInt(e(109))/3*(parseInt(e(120))/4)+-parseInt(e(189))/5*(parseInt(e(185))/6)+-parseInt(e(180))/7+parseInt(e(144))/8*(-parseInt(e(162))/9)+parseInt(e(133))/10+parseInt(e(192))/11*(parseInt(e(190))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(h);class d extends t.Plugin{[f(175)]=[];[f(112)]=null;[f(165)]=null;[f(106)];[f(188)];[f(191)];static get[f(193)](){return f(168)}static get[f(114)](){return!0}static get[f(132)](){return!0}constructor(t){const e=f;super(t),this[e(106)]=new l(this[e(137)][e(111)],{elementName:e(108),getElementKey:()=>e(198)}),this[e(188)]=new l(this[e(137)][e(111)],{elementName:e(157),getElementKey:t=>t[e(197)](e(138))}),this[e(191)]=new l(this[e(137)][e(111)],{elementName:e(202),getElementKey:t=>t[e(197)](e(138))})}[f(141)](){const t=f,{editor:e}=this,{model:n}=e;n[t(167)][t(151)](e=>{const o=t,i=n[o(167)][o(145)][o(184)]();let s=!1;return this[o(178)](e,i)&&(s=!0),this[o(119)](e,i)&&(s=!0),this[o(118)](e,i)&&(s=!0),this[o(103)](e)&&(s=!0),this[o(186)](e)&&(s=!0),this[o(176)](e)&&(s=!0),s}),this[t(182)](n[t(167)],t(159),()=>{const e=t;n[e(160)]({isUndoable:!1},t=>{this[e(158)](t)})},{priority:t(135)})}[f(116)](){return this[f(112)]}[f(124)](t){const e=f;return this[e(175)][e(171)](e=>e.id===t)||null}[f(123)](){const t=f;return Array[t(110)](this[t(175)])}[f(125)](){return this[f(165)]}[f(117)](t){this[f(165)]=t}[f(115)](t,e=0){const n=f;let o=!1;for(let i=e;i<this[n(175)][n(142)];i++)this[n(173)](t,i)&&(o=!0);return o}[f(126)](t,e){const n=f,o=t[n(149)](n(108),{});return t[n(199)](o,e),this[n(112)]=o,o}[f(158)](t){const e=f;if(!this[e(175)][e(142)]||this[e(112)])return;const n=this[e(175)][0][e(187)][e(194)],o=this[e(126)](t,n);for(const n of this[e(175)])n[e(134)][e(161)]||t[e(166)](n[e(134)],o,e(156));this[e(115)](t)}[f(178)](t,e){const n=f;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(106)][n(184)](e);if(r[n(142)]&&(this[n(112)]=r[0]),i[n(142)])if(i[n(142)]>1||this[n(112)]&&i[n(201)](t=>t!==this[n(112)])){const e=t[n(149)](n(108),{}),s=[];this[n(112)]&&s[n(150)](this[n(112)]),s[n(150)](...i),t[n(166)](e,s[0],n(203));for(const o of s)t[n(143)](t[n(140)](o),t[n(121)](e,n(156))),t[n(183)](o);this[n(112)]=e,this[n(115)](t),o=!0}else this[n(112)]=i[0];if(s[n(142)]&&n(177)===this[n(112)]?.[n(194)][n(127)]){for(const e of this[n(175)])t[n(183)](e[n(187)]),o=!0;this[n(175)]=[],this[n(112)]=null}return o}[f(119)](t,e){const n=f;let o=!1;const i=this[n(137)][n(107)][n(128)](n(154)),{inserted:s,moved:r}=this[n(191)][n(184)](e);for(const e of[...r,...s]){const s=e[n(197)](n(138)),r=this[n(124)](s);r&&(r[n(134)]=e),p(t,i,e)&&(o=!0)}return o}[f(118)](t,e){const n=f;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(188)][n(184)](e);for(const e of i)this[n(195)](t,e)&&(o=!0);for(const e of s)this[n(164)](t,e)&&(o=!0);for(const e of r)this[n(122)](t,e)&&(o=!0);return o}[f(186)](t){const e=f;if(!this[e(112)])return!1;let n=!1;if(this[e(112)][e(139)]!==this[e(175)][e(142)]){const o=[];for(const t of this[e(112)][e(155)]()){const i=t[e(197)](e(138));this[e(124)](i)||(o[e(147)](t),n=!0)}for(const n of o)t[e(183)](n)}const o=new Set,i=[];for(const t of this[e(112)][e(155)]()){const s=t[e(197)](e(138));o[e(181)](s)?(i[e(147)](t),n=!0):o[e(174)](s)}for(const n of i)t[e(183)](n);return this[e(112)][e(139)]||(t[e(183)](this[e(112)]),this[e(112)]=null,n=!0),n}[f(164)](t,e){const n=f;if(this[n(175)][n(171)](t=>t[n(187)]===e))return!1;let o=!1;const i=e[n(197)](n(138)),s=this[n(124)](i);s&&(t[n(183)](s[n(187)]),this[n(175)]=this[n(175)][n(146)](t=>t.id!==i),o=!0);let r=this[n(112)]?function(t,e){const o=n;for(const n of t[o(155)]())if(n[o(197)](o(138))===e)return n;return null}(this[n(112)],i):null;r||(r=t[n(149)](n(202),{footnoteId:i}),this[n(112)]&&(t[n(166)](r,this[n(112)],n(156)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(137)][n(111)],this[n(175)],e);return this[n(175)][n(170)](c,0,a),this[n(115)](t,c)&&(o=!0),o}[f(195)](t,e){const n=f,o=this[n(175)][n(136)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(175)][o];return n(177)!==s[n(134)][n(194)][n(127)]&&(t[n(183)](s[n(134)]),i=!0),this[n(175)][n(170)](o,1),this[n(115)](t,o)&&(i=!0),i}[f(122)](t,e){const n=f,o=e[n(197)](n(138)),i=this[n(175)][n(136)](t=>t.id===o),s=this[n(175)][i];let r=!1;s[n(187)]=e,this[n(175)][n(170)](i,1);const a=m(this[n(137)][n(111)],this[n(175)],e);return this[n(175)][n(170)](a,0,s),this[n(115)](t,Math[n(105)](i,a))&&(r=!0),r}[f(173)](t,e){const n=f;if(!this[n(112)])return!1;const o=this[n(175)][e];let i;return i=this[n(165)]?this[n(165)]({footnote:o,container:this[n(112)],digits:String(this[n(175)][n(142)])[n(142)],value:e+1}):String(e+1),o[n(187)][n(197)](n(129))!=i&&(t[n(131)](n(129),i,o[n(187)]),!0)}[f(176)](t){const e=f;if(!this[e(112)]||this[e(175)][e(142)]<2)return!1;if(function(t,n){const o=e;if(t[o(142)]!==n[o(142)])return!1;for(let e=0;e<t[o(142)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(175)][e(196)](t=>t.id),Array[e(110)](this[e(112)][e(155)]())[e(196)](t=>t[e(197)](e(138)))))return!1;let n=!1;for(let o=0;o<this[e(175)][e(142)];o++){const i=this[e(175)][o],s=t[e(153)](i[e(134)]),r=t[e(121)](this[e(112)],o);s[e(130)](r)||(t[e(143)](t[e(113)](i[e(134)]),r),n=!0)}return n}[f(103)](t){const e=f;if(!this[e(175)][e(142)])return!1;const{model:n}=this[e(137)];let o=!1;for(let i=0;i<this[e(175)][e(142)]-1;i++){const s=this[e(175)][i],r=this[e(175)][i+1],a=n[e(153)](s[e(187)]),c=n[e(153)](r[e(187)]);e(163)===a[e(200)](c)&&(this[e(122)](t,s[e(187)]),i=-1,o=!0)}return o}}function p(t,e,n){const o=f;if(n[o(139)])return!1;const i=o(e?152:148);return t[o(166)](t[o(149)](i),n),!0}function h(){const t=["unshift","footnoteInlineContent","createElement","push","registerPostFixer","paragraph","createPositionBefore","footnotes.multiBlock","getChildren","end","footnoteRef","_ensureFootnotesDefinitionsContainerExists","change:data","enqueueChange","parent","1415277EqFZSf","after","_handleInsertedFootnoteReference","_footnoteFormatter","insert","document","FootnotesTracker","indexOf","splice","find","57325gqRFSY","_updateFootnoteRefCounter","add","_footnotes","_sortFootnoteDefinitions","$graveyard","_handleFootnotesDefinitionsObjectChanges","getRootNames","9395561UBkQha","has","listenTo","remove","getChanges","6FpQWcs","_handleFootnotesDefinitionsObjectSync","reference","_footnoteRefsTracker","5657105uLkylt","12WCPLop","_footnoteDefsTracker","45097789SnWkJh","pluginName","root","_handleRemoveFootnoteReferenceById","map","getAttribute","singleton","append","compareWith","some","footnoteDefinition","before","_ensureFootnotesReferencesHaveProperOrder","10xoOvkC","min","_footnoteDefsContainerTracker","config","footnotesDefinitions","3YqRuVO","from","model","_footnotesDefinitions","createRangeOn","isOfficialPlugin","_updateFootnotesCounters","getFootnotesDefinitionsObjectElement","setFootnoteFormatter","_handleFootnoteReferencesChanges","_handleFootnoteDefinitionsChanges","4890712bnnJyv","createPositionAt","_handleMovedFootnoteReference","getFootnotes","getFootnote","getFootnotesFormatter","_insertEmptyFootnotesDefinitionsContainer","rootName","get","footnoteCounter","isEqual","setAttribute","isPremiumPlugin","13015200kMUDrl","definition","low","findIndex","editor","footnoteId","childCount","createRangeIn","init","length","move","64QRgHpu","differ","filter"];return(h=function(){return t})()}function m(t,e,n){const o=f;if(0===e[o(142)])return 0;const i=t[o(153)](n);for(let n=0;n<e[o(142)];n++){const s=e[n],r=t[o(153)](s[o(187)]);if(o(203)===i[o(200)](r))return n}const s=n[o(194)];let r=-1;for(let t=e[o(142)]-1;t>=0;t--)if(e[t][o(187)][o(194)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(167)][o(179)](),c=a[o(169)](s[o(127)]),l=a[c+1];if(l)for(let t=0;t<e[o(142)];t++)if(e[t][o(187)][o(194)][o(127)]===l)return t;return e[o(142)]}const g=w;function w(t,e){const n=y();return(w=function(t,e){return n[t-=147]})(t,e)}function y(){const t=["isBlock","10bgjThd","12978HlVjkp","27144XPKFkb","editor","_moveSelectionToFootnoteDefinition","refresh","string","1593720WRzzcc","document","change","execute","isObject","isEnabled","plugins","FootnotesEditing","_getPositionToInsertFootnote","141aecJBC","getItems","454671pxrHNm","insertObject","109312boDHgN","get","selection","createElement","getFirstRange","model","test","checkChild","insert-footnote-command-executed-with-invalid-id","footnoteRef","length","274566CUrzcz","161wsfMLc","end","47430DfMhGh","footnoteId"];return(y=function(){return t})()}!function(t){const e=w,n=t();for(;;)try{if(164445===parseInt(e(162))/1+-parseInt(e(165))/2+parseInt(e(147))/3*(parseInt(e(170))/4)+-parseInt(e(175))/5+-parseInt(e(169))/6*(parseInt(e(163))/7)+parseInt(e(151))/8+-parseInt(e(149))/9*(parseInt(e(168))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(y);class b extends t.Command{[g(173)](){const t=g,e=this[t(171)][t(156)][t(176)][t(153)],n=this[t(183)](e);this[t(180)]=!!n}[g(178)](t){const e=g,{editor:n}=this,{model:o}=n,{selection:s}=o[e(176)],r=this[e(183)](s);if(!r)return;const a=n[e(181)][e(152)](e(182)),c=t?.[e(166)]??(0,i.uid)();!function(t){const n=e;return n(174)==typeof t&&t[n(161)]>0&&!/\s/[n(157)](t)&&!/^\d/[n(157)](t)}(c)?(0,i.logWarning)(e(159)):(o[e(177)](t=>{const n=e,i=t[n(154)](n(160),{footnoteId:c});o[n(150)](i,r,null)}),a[e(172)](c))}[g(183)](t){const e=g,{model:n}=this[e(171)],{schema:o}=n,i=t[e(155)]();for(const t of i[e(148)]())if(o[e(167)](t)||o[e(179)](t))return null;const s=i[e(164)];return o[e(158)](s,e(160))?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=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),n=window[m([68,97,116,101])][m([110,111,119])](),o=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{o[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=o[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;o[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,o)=>{o[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),n[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function n(t){for(let n=0;n<t[m([108,101,110,103,116,104])];n++){const o=t[m([99,104,97,114,67,111,100,101,65,116])](n);e=(e<<5)+e+o,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,o])=>{n(e),t(o)}):n(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function p(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function h(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const n=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let n=m([117]);for(let o=0;o<t[m([108,101,110,103,116,104])];o+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),n+=e[i]}return n}();o[n]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,o[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=h,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,o[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&n()?e:null;function n(){const t=e[m([106,116,105])],n=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),o={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete o[m([118,99])],f(o)==n}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),o[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function h(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(o){a(o)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(n-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),o=p(d(window[m([77,97,116,104])][m([99,101,105,108])](n/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,o)}function r(){const e=m([108,108,99,116,45])+d(f(t)),n=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return n?window[m([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,n)=>{t[m([116,104,101,110])](e,n),window[m([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,n)=>{if(n[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{h(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const o=a[m([115,112,108,105,116])](m([46])),[i,s,r]=o;return e(i),await n(i,s,r),t}catch{return!1}function e(e){const n=l(e);n&&n[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function n(e,n,o){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(o),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+n),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1760572800;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:n}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](n))return!0;const o=n[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=o[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(o[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>o[m([101,118,101,114,121])]((e,n)=>t[n]===e||t[n]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&h?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),h[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||h||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),n.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(i.reference,"on")}),n.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:n,editing:o}=t,{t:i}=t.locale;n.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:n})=>{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;n.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of o.view.createRangeIn(i))t.is("$textProxy")?n.consume(t.textNode,{name:!0}):t.is("element")&&n.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),n.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),n.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:n})=>{const o=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,n),n,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",o)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:n}=t.locale,{conversion:o}=t;o.for("upcast").elementToElement({view:{name:"ol",classes:["footnotes"]},model:"footnotesDefinitions",converterPriority:"high"}),o.for("dataDowncast").elementToElement({model:"footnotesDefinitions",view:{name:"ol",classes:["footnotes"]}}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=o.createContainerElement("div",{class:"footnotes-wrapper","data-footnotes-list-label":n("Footnotes")},o.createContainerElement("ol",{class:"footnotes"},o.createSlot())),s=(0,e.toWidget)(i,o,{hasSelectionHandle:!0,label:n("Footnotes")});return o.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:n}=t,o=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,n)=>{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"))return;if(!n.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=n.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!n.safeInsert(r,e.modelCursor))return;n.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")&&(n.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),n.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(o)n.convertChildren(a,r);else{const t=n.writer.createElement("footnoteInlineContent");n.writer.insert(t,r),n.convertChildren(a,t)}n.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>x(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>x(t,e,n)})}_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 n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of n)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 n=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:n,t:o}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Alt+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Alt+D"}]}),this.listenTo(n.view.document,"enter",(t,e)=>{const n=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(n){const o=n.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(o),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 n=!1;this.listenTo(e.view.document,"pointerdown",(t,o)=>{const{target:i}=o,s=e.view.document.selection;n=!(!i.is("element","sup")||!i.hasClass("footnote"))&&s.getSelectedElement()===i},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e,o=n.getChild(0).getAttribute("href");this._moveSelectionToFootnoteDefinition(o.slice(1)),t.stop(),e.preventDefault()},{priority:"high",context:t=>t.is("element","sup")&&t.hasClass("footnote")&&n}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n.is("element","a"))return;let o=n.getAttribute("href");if(!o?.startsWith("#"))return;o=o.slice(1);let i=!1;(o.startsWith("ref-")&&this._moveSelectionToFootnoteReference(o.slice(4))||this._moveSelectionToFootnoteDefinition(o))&&(i=!0),i&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:n})=>{if(!k(e))return null;if(!t)return n.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const o=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}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 n=e.toViewElement(t);return!!n&&k(t)!==n.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function E(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{id:"ref-"+n,href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function x(t,n,o,{dataPipeline:i}={}){const{t:s}=o,r=t.getAttribute("footnoteId"),a=n.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?n.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(n.createEditableElement("div",{class:"footnote-content"}),n,{label:s("Footnote content.")});return n.insert(n.createPositionAt(c,0),n.createSlot()),n.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var P=n(331);function S(){const t=["length","end","listenTo","parse","document","343587zpLqtl","editor","data","_handleCopyFootnotesDefinitions","3206724tZasTg","get","create","7uvCIRR","isPremiumPlugin","getFootnotes","find","root","init","method","setAttribute","isOfficialPlugin","9wqhEYb","requires","reduce","footnoteRef","remove","_insertEmptyFootnotesDefinitionsContainer","element","302450FbMTjs","entries","footnoteId","setData","contentInsertion","clipboardInput","6005730EcQTRB","FootnotesClipboard","content","toData","outputTransformation","stringify","htmlProcessor","12300hnsCON","editing","toModel","push","11uHYeIR","getFirstRange","getAttribute","drop","insert","8tyNcCN","_handlePasteFootnotesDefinitions","selection","6938934bJaYgg","change","footnoteDefinition","createElement","from","append","getFootnote","getFootnotesDefinitionsObjectElement","getData","createRangeIn","7038536fnUhAh","_defineClipboardIntegration","definition","application/ckeditor5-footnotes","dataTransfer","sourceEditorId","toView","64jxiFkT","footnotesDefinitions","pluginName","add"];return(S=function(){return t})()}const A=_;function _(t,e){const n=S();return(_=function(t,e){return n[t-=360]})(t,e)}!function(t){const e=_,n=t();for(;;)try{if(626474===-parseInt(e(374))/1*(-parseInt(e(419))/2)+parseInt(e(383))/3*(parseInt(e(428))/4)+parseInt(e(406))/5+parseInt(e(431))/6+parseInt(e(390))/7*(-parseInt(e(367))/8)+parseInt(e(399))/9*(-parseInt(e(412))/10)+-parseInt(e(423))/11*(-parseInt(e(387))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(S);class D extends t.Plugin{static get[A(376)](){return A(413)}static get[A(400)](){return[v,P.ClipboardPipeline]}static get[A(398)](){return!0}static get[A(391)](){return!0}[A(395)](){this[A(368)]()}[A(368)](){const t=A;this[t(386)](),this[t(429)]()}[A(386)](){const t=A,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(388)](P.ClipboardPipeline),s=n[t(388)](d);this[t(380)](i,t(416),(n,i)=>{const r=t,a=function(t,e){const n=_,o=new Set;for(const{item:i}of t[n(366)](e))i.is(n(405),n(402))&&o[n(377)](i[n(425)](n(408)));return Array[n(361)](o)}(o,i[r(414)]);if(!a[r(378)])return;const c=s[r(392)](),l=a[r(401)]((t,n)=>{const o=r,i=c[o(393)](t=>t.id===n);if(i){const n=e[o(385)][o(373)](i[o(369)],{isClipboardPipeline:!0}),s=e[o(385)][o(418)][o(415)](n);t[i.id]=s}return t},Object[r(389)](null));i[r(371)][r(409)](r(370),JSON[r(417)](l))})}[A(429)](){const t=A,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(420)],r=o[t(388)](P.ClipboardPipeline),a=o[t(388)](d);let c=null;this[t(380)](s[t(382)],t(411),(e,n)=>{const o=t,i=n[o(371)][o(365)](o(370));c=i?JSON[o(381)](i):null}),this[t(380)](r,t(410),(o,s)=>{const r=t;if(!c)return;const l=s[r(372)]===this[r(384)].id;l&&r(426)===s[r(396)]||n[r(432)](t=>{const o=r;!function(t,e){const n=_,o=[];for(const{item:i}of t[n(366)](e))i.is(n(405),n(375))&&o[n(422)](i);for(const e of o)t[n(403)](e)}(t,s[o(414)]);let u=a[o(364)]();if(!u){const e=n[o(382)][o(430)][o(424)]()[o(394)];u=a[o(404)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(389)](null);for(const{item:o}of t[s(366)](e))if(o.is(s(405),s(402))){const e=o[s(425)](s(408));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(397)](s(408),r[e],o)}return r}(t,s[o(414)],t=>!l||null!==a[o(363)](t));for(const[n,i]of Object[o(407)](c)){const s=f[n]||n,r=t[o(360)](o(433),{footnoteId:s}),a=e[o(385)][o(418)][o(373)](i),c=e[o(385)][o(421)](a,r);t[o(362)](c,r),t[o(427)](r,u,o(379))}c=null})})}}var T=n(311),L=n(355),V=n(929),N=n.n(V),O=n(297),R=n.n(O),K=n(102),j=n.n(K),B=n(123),M=n.n(B),W=n(741),H=n.n(W),U=n(728),z={attributes:{"data-cke":!0}};z.setAttributes=M(),z.insert=j().bind(null,"head"),z.domAPI=R(),z.insertStyleElement=H();N()(U.A,z);U.A&&U.A.locals&&U.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",J(t,T.ButtonView)),e.add("menuBar:insertFootnote",J(t,T.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const n=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in n){const o=e,i=n[o];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete n[o],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&n._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&n._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&n._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&n._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&n._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&n._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&n._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function J(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof T.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:L.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}var X=Q;function Q(t,e){var n=Z();return(Q=function(t,e){return n[t-=302]})(t,e)}function Z(){var t=["isOfficialPlugin","42BCxShN","isPremiumPlugin","213935jfpRJB","pluginName","1886624qNAFvN","Footnotes","853964wBiKSh","1698725ZLJJZN","2783210UJwRZH","requires","39AQItBt","31898NCBgel","266500HoCilr","27sJCmLb"];return(Z=function(){return t})()}!function(t){for(var e=Q,n=t();;)try{if(158721===parseInt(e(311))/1+parseInt(e(310))/2*(parseInt(e(309))/3)+parseInt(e(305))/4+-parseInt(e(316))/5*(-parseInt(e(314))/6)+parseInt(e(306))/7+-parseInt(e(303))/8+-parseInt(e(312))/9*(parseInt(e(307))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Z);class G extends t.Plugin{static get[X(302)](){return X(304)}static get[X(308)](){return[v,D,q]}static get[X(313)](){return!0}static get[X(315)](){return!0}}function Y(){const t=["1295chViNF","23643SRacAm","decimal","decimal-leading-zero","179158exEEIg","3794703oDbwGR","upper-alpha","lower-alpha","258765IEDaea","upper-latin","upper-roman","10BtuWMB","584kBAPCf","2764PXrVDG","613902najLBT","lower-latin","lower-roman","3HZuUxt","12738Qangrh"];return(Y=function(){return t})()}function $(t,e){const n=Y();return($=function(t,e){return n[t-=422]})(t,e)}const tt=$;!function(t){const e=$,n=t();for(;;)try{if(156318===parseInt(e(430))/1*(parseInt(e(431))/2)+parseInt(e(440))/3+parseInt(e(426))/4*(-parseInt(e(432))/5)+parseInt(e(427))/6+-parseInt(e(436))/7+-parseInt(e(425))/8*(parseInt(e(433))/9)+parseInt(e(424))/10*(parseInt(e(437))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Y);const et=[tt(434),tt(435),tt(428),tt(422),tt(439),tt(438),tt(429),tt(423)],nt=it;function ot(){const t=["_updateFootnotesCounters","execute","get","1801518XHfzSP","getAttribute","change","1047176hTdQJZ","27ilXVFc","48674328PwtDAu","15gzTYyi","footnotesListStyle","29558hrmYFy","146144gOmoyl","refresh","isEnabled","5273466navpQD","5459216egwkdE","setAttribute","getFootnotesDefinitionsObjectElement","model","61jBiurn","plugins","value","includes","9oOMVyw","10bdIztJ"];return(ot=function(){return t})()}function it(t,e){const n=ot();return(it=function(t,e){return n[t-=439]})(t,e)}!function(t){const e=it,n=t();for(;;)try{if(534901===-parseInt(e(462))/1*(parseInt(e(453))/2)+-parseInt(e(449))/3*(parseInt(e(454))/4)+-parseInt(e(451))/5*(parseInt(e(445))/6)+-parseInt(e(458))/7+parseInt(e(448))/8*(-parseInt(e(440))/9)+-parseInt(e(441))/10*(parseInt(e(457))/11)+parseInt(e(450))/12)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ot);class st extends t.Command{[nt(455)](){const t=nt,{editor:e}=this,n=e[t(463)][t(444)](d)[t(460)]();this[t(456)]=!!n,this[t(464)]=n?.[t(446)](t(452))??null}[nt(443)]({value:t}){const e=nt,{editor:n}=this,o=n[e(463)][e(444)](d),i=o[e(460)]();i&&et[e(439)](t)&&n[e(461)][e(447)](n=>{const s=e;n[s(459)](s(452),t,i),o[s(442)](n)})}}const rt=at;function at(t,e){const n=ct();return(at=function(t,e){return n[t-=397]})(t,e)}function ct(){const t=["get","36672vAZGUn","4852134OcmEIu","value","getAttribute","getFootnotesDefinitionsObjectElement","plugins","execute","185580LrIEKc","change","3492Aeoxfk","setAttribute","4560738SCkwKn","footnotesListStart","isInteger","_updateFootnotesCounters","5qvbOrX","refresh","573111tkACEM","649490OJbTUt","isEnabled","model","2768889EgWAnK"];return(ct=function(){return t})()}!function(t){const e=at,n=t();for(;;)try{if(586697===-parseInt(e(409))/1+parseInt(e(410))/2+-parseInt(e(413))/3+parseInt(e(399))/4*(parseInt(e(407))/5)+-parseInt(e(403))/6+parseInt(e(416))/7+parseInt(e(415))/8*(parseInt(e(401))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ct);class lt extends t.Command{[rt(408)](){const t=rt,{editor:e}=this,n=e[t(397)][t(414)](d)[t(419)]();this[t(411)]=!!n,this[t(417)]=n?.[t(418)](t(404))??null}[rt(398)]({value:t}){const e=rt,{editor:n}=this,o=n[e(397)][e(414)](d),i=o[e(419)]();i&&Number[e(405)](t)&&n[e(412)][e(400)](n=>{const s=e;n[s(402)](s(404),t,i),o[s(406)](n)})}}const ut=dt;function ft(){const t=["isPremiumPlugin","editor","_defineSchema","low","element","_getDefaultListStyle","start","differ","toUpperCase","fromCharCode","_getDefaultStartIndex","toViewElement","upper-roman","add","define","footnotesListStyle","getAttribute","814902fyprUC","extend","footnotes.footnotesProperties.defaultListStyle","194666XxVjtV","insert","item","339zOIMQW","9001058mfugWX","footnotes.footnotesProperties.defaultStartIndex","isOfficialPlugin","removeAttribute","getChildren","dataDowncast","upcast","createRangeOn","$text","FootnotesPropertiesEditing","attributeToAttribute","removeStyle","type","requires","consumable","hasAttribute","commands","find","style","nodeAfter","footnotesListStart","setAttribute","_defineConverters","attribute:footnotesListStyle:footnotesDefinitions","element:ol","getChanges","16SfWcBY","footnotesDefinitions","2354350CdQcZk","footnotesStart","footnotesStyle","from","upper-latin","27sPmyap","lower-roman","attribute:footnotesListStart:footnotesDefinitions","228QEETNc","floor","lower-alpha","getStyle","document","setStyle","config","decimal","decimal-leading-zero","_formatFootnoteListValue","isNaN","modelRange","setFootnoteFormatter","for","pluginName","max","init","_updateFootnotesCounters","writer","checkAttribute","parseInt","toLowerCase","plugins","mapper","upper-alpha","editingDowncast","registerPostFixer","model","padStart","list-style-type","29804jxxylD","129339JStxkF","consume","name","attributeNewValue","_defineFormatter","position","getItems","1510ThEigP","_definePostfixer","get","lower-latin"];return(ft=function(){return t})()}function dt(t,e){const n=ft();return(dt=function(t,e){return n[t-=326]})(t,e)}!function(t){const e=dt,n=t();for(;;)try{if(444357===parseInt(e(327))/1+-parseInt(e(426))/2+-parseInt(e(330))/3*(parseInt(e(397))/4)+-parseInt(e(405))/5*(-parseInt(e(367))/6)+parseInt(e(398))/7*(-parseInt(e(357))/8)+parseInt(e(364))/9*(parseInt(e(359))/10)+parseInt(e(331))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ft);class pt extends t.Plugin{static get[ut(381)](){return ut(340)}static get[ut(344)](){return[v,d]}static get[ut(333)](){return!0}static get[ut(409)](){return!0}[ut(383)](){const t=ut,{editor:e}=this;e[t(373)][t(423)](t(326),t(374)),e[t(373)][t(423)](t(332),1),e[t(347)][t(422)](t(361),new st(e)),e[t(347)][t(422)](t(360),new lt(e)),this[t(411)](),this[t(353)](),this[t(402)](),this[t(406)]()}[ut(411)](){const t=ut,{editor:e}=this,{schema:n}=e[t(394)];n[t(427)](t(358),{allowAttributes:[t(424),t(351)]})}[ut(353)](){const t=ut,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(380)](t(337))[t(341)]({view:{name:"ol",styles:{"list-style-type":/.+/}},model:{key:t(424),value:e=>e[t(370)](t(396))}}),n[t(380)](t(337))[t(341)]({view:{name:"ol",attributes:{start:/.+/}},model:{key:t(351),value:e=>{const n=t,o=e[n(425)](n(415)),i=Number[n(387)](o,10);return Number[n(377)](i)?null:i}}}),n[t(380)](t(337))[t(341)]({view:{name:"ol",attributes:{type:/.+/}},model:{key:t(424),value:e=>({1:t(374),a:t(369),A:t(391),i:t(365),I:t(421)}[e[t(425)](t(343))])}}),n[t(380)](t(337))[t(422)](e=>{const n=t;e.on(n(355),(t,e,o)=>{const s=n,r=e[s(378)]?.[s(415)][s(350)];r?.is(s(413),s(358))&&(!r[s(346)](s(424))&&i[s(386)](r,s(424))&&o[s(385)][s(352)](s(424),s(374),r),!r[s(346)](s(351))&&i[s(386)](r,s(351))&&o[s(385)][s(352)](s(351),1,r))},{priority:n(412)})}),n[t(380)](t(336))[t(341)]({model:{name:t(358),key:t(351)},view:e=>1===e?null:{key:t(415),value:String(e)}}),n[t(380)](t(336))[t(341)]({model:{name:t(358),key:t(424)},view:e=>t(374)===e?null:{key:t(349),value:{"list-style-type":e}}}),n[t(380)](t(392))[t(422)](e=>{const n=t;e.on(n(366),(t,e,o)=>{const i=n;if(!o[i(345)][i(399)](e[i(329)],t[i(400)]))return;const s=ht(e[i(329)],o[i(390)]);null===e[i(401)]||void 0===e[i(401)]||1===e[i(401)]?o[i(385)][i(334)](i(415),s):o[i(385)][i(352)](i(415),String(e[i(401)]),s)}),e.on(n(354),(t,e,o)=>{const i=n;if(!o[i(345)][i(399)](e[i(329)],t[i(400)]))return;const s=ht(e[i(329)],o[i(390)]);e[i(401)]&&i(374)!==e[i(401)]?o[i(385)][i(372)](i(396),e[i(401)],s):o[i(385)][i(342)](i(396),s)})})}[ut(406)](){const t=ut,{editor:e}=this,{model:n}=e,o=e[t(389)][t(407)](d),i=this[t(414)](),s=this[t(419)]();n[t(371)][t(393)](e=>{const r=t,a=n[r(371)][r(416)][r(356)]();let c=!1;for(const t of a){if(r(328)!==t[r(343)]||r(339)===t[r(400)])continue;const o=n[r(338)](t[r(403)][r(350)]);for(const t of o[r(404)]())t.is(r(413),r(358))&&(t[r(346)](r(351))||(e[r(352)](r(351),s,t),c=!0),t[r(346)](r(424))||(e[r(352)](r(424),i,t),c=!0))}return c&&o[r(384)](e),c})}[ut(402)](){const t=ut,{editor:e}=this;e[t(389)][t(407)](d)[t(379)](e=>this[t(376)](e))}[ut(414)](){const t=ut;return this[t(410)][t(373)][t(407)](t(326))}[ut(419)](){const t=ut;return this[t(410)][t(373)][t(407)](t(332))}[ut(376)]({container:t,value:e,digits:n}){const o=ut,i=t[o(425)](o(424)),s=t[o(425)](o(351)),r=Math[o(368)](e)+(s-1);switch(i){case o(374):default:return String(r);case o(375):return function(t,e){const n=o;return String(t)[n(395)](e,"0")}(r,Math[o(382)](2,n));case o(369):case o(408):return mt(r,!1);case o(391):case o(363):return mt(r,!0);case o(365):return wt(r,!1);case o(421):return wt(r,!0)}}}function ht(t,e){const n=ut,o=e[n(420)](t);return Array[n(362)](o[n(335)]())[n(348)](t=>t.is(n(413),"ol"))}function mt(t,e){const n=ut;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(418)](97+t)+o,i=Math[n(368)]((i-1)/26)}return e?o[n(417)]():o}const gt=[{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 wt(t,e){const n=ut;let o="",i=t;for(const{value:t,numeral:e}of gt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(388)]()}class yt extends T.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new T.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new T.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,n),[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,T.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 n=new T.View(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){for(const t of this.children)if(t instanceof T.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},n.focusTracker=new i.FocusTracker,n.keystrokes=new i.KeystrokeHandler,n.render(),n.keystrokes.listenTo(n.element),this.children.add(n),n}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),n=[e],o=new T.CollapsibleView(this.locale,n);return o.set({label:t("Footnotes properties"),isCollapsed:!0}),o.buttonView.bind("isEnabled").toMany(n,"isEnabled",(...t)=>t.some(t=>t)),o.buttonView.on("change:isEnabled",(t,e,n)=>{n||(o.isCollapsed=!0)}),this.children.add(o),[e,o]}_createStartIndexPropertyView(){const{t}=this.locale,e=new T.LabeledFieldView(this.locale,T.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid footnotes start index value."):n.checkValidity()?this.fire("footnotesListStart",{startIndex:o}):e.errorText=t("Footnotes start index must be greater than 0.")}),e}}var bt=n(291),vt={attributes:{"data-cke":!0}};vt.setAttributes=M(),vt.insert=j().bind(null,"head"),vt.domAPI=R(),vt.insertStyleElement=H();N()(bt.A,vt);bt.A&&bt.A.locals&&bt.A.locals;class It extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[T.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var n;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(n=t,t=>{const{t:e}=t,o=n.commands.get("footnotesStyle"),i=(0,T.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(o,"isEnabled"),s.set({label:e("Footnotes style"),icon:L.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:n}=t.locale,o=n("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:L.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:L.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:L.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:L.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:L.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:L.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:n,icon:o,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new T.ButtonView(e);return a.set({label:n,icon:o,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 yt(t.locale,{styleGridAriaLabel:o,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,n)=>{t.execute("footnotesStart",{value:n.startIndex})}),s}({editor:n,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:n}=t.locale,o=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=T.BalloonPanelView;o.register("footnotesDefinitions",{ariaLabel:n("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]})}}function kt(t,e){var n=Ct();return(kt=function(t,e){return n[t-=367]})(t,e)}function Ct(){var t=["requires","5569820bjtwAR","3209324auXnkc","12627312FjLDsA","4584440rOqJjO","21gnvBPb","isOfficialPlugin","isPremiumPlugin","478098geAGTg","FootnotesProperties","943237BOudks","3414645nYMebk","pluginName"];return(Ct=function(){return t})()}var Ft=kt;!function(t){for(var e=kt,n=t();;)try{if(894721===-parseInt(e(369))/1+parseInt(e(374))/2+-parseInt(e(370))/3+parseInt(e(376))/4+-parseInt(e(373))/5+-parseInt(e(367))/6*(parseInt(e(377))/7)+parseInt(e(375))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ct);class Et extends t.Plugin{static get[Ft(371)](){return Ft(368)}static get[Ft(372)](){return[pt,It]}static get[Ft(378)](){return!0}static get[Ft(379)](){return!0}}function xt(t,e){var n=Pt();return(xt=function(t,e){return n[t-=499]})(t,e)}function Pt(){var t=["1502485NVHDEE","2414533BsGpiQ","12exreHZ","579754VTLExu","28790Quhqeu","5733IEpqhj","4HsJqsE","64626qAfPfJ","558XfsyDQ","3fGFvrE","1148344olTHji","477hTouyP"];return(Pt=function(){return t})()}!function(t){for(var e=xt,n=t();;)try{if(206386===parseInt(e(500))/1+parseInt(e(508))/2*(parseInt(e(502))/3)+-parseInt(e(499))/4*(parseInt(e(505))/5)+-parseInt(e(501))/6*(parseInt(e(510))/7)+-parseInt(e(503))/8+-parseInt(e(504))/9*(-parseInt(e(509))/10)+-parseInt(e(506))/11*(-parseInt(e(507))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
|
|
4
|
+
*/(()=>{var t={14:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,':root{--ck-footnotes-list-widget-label-background-color:#757575;--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-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:1.9em 0 1.5em;padding-inline-start:3em;position:relative}.ck-content .footnotes:before{border-top:1px solid var(--ck-content-footnotes-list-separator-color);content:"";left:0;position:absolute;top:-1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes:before{left:auto;right:0}.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-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.ck.ck-editor__editable .footnote>a{pointer-events:none}.ck.ck-editor__editable .footnotes-wrapper{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes-wrapper:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-list-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-wrapper[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-wrapper>.footnotes{margin-bottom:.65em;margin-top:1em}',""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)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]);o&&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),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=o.base?c[0]+o.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=n(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var n=e.domAPI(e);n.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;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=o(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var c=o(t,i),l=0;l<s.length;l++){var u=n(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function o(t,e,o,i){var s;if(o)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=n(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++,n=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(n,e,!1,t)},remove:function(t){o(n,e,!0,t)}}}},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},901:(t,e,n)=>{t.exports=n(237)("./src/widget.js")},945:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Footnotes:()=>X,FootnotesClipboard:()=>_,FootnotesEditing:()=>v,FootnotesProperties:()=>xt,FootnotesPropertiesEditing:()=>ft,FootnotesPropertiesUI:()=>It,FootnotesStartCommand:()=>ct,FootnotesStyleCommand:()=>st,FootnotesTracker:()=>p,FootnotesUI:()=>Q,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);const r=a;function a(t,e){const n=c();return(a=function(t,e){return n[t-=336]})(t,e)}function c(){const t=["element","_model","getChanges","add","position","remove","_trackedElements","type","$text","4HZmBab","insert","13381896IiPYLE","createRangeOn","52vweejS","has","85oeaYrQ","rootName","4536861nxnzDj","_elementName","174585PWhpzt","_getElementKey","slice","root","180204Jblmvk","delete","elementName","nodeAfter","95683qWIGoG","getItems","get","set","push","values","length","2643228VuFMCF","getElementKey","flat","from","29210jfNbcO","$graveyard","attributes","8dsCesI","name"];return(c=function(){return t})()}!function(t){const e=a,n=t();for(;;)try{if(421861===-parseInt(e(338))/1*(parseInt(e(363))/2)+parseInt(e(373))/3*(-parseInt(e(367))/4)+-parseInt(e(369))/5*(-parseInt(e(377))/6)+parseInt(e(371))/7*(-parseInt(e(352))/8)+parseInt(e(345))/9+-parseInt(e(349))/10+parseInt(e(365))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(c);class l{[r(355)];[r(372)];[r(374)];[r(360)]=new Map;constructor(t,e){const n=r;this[n(355)]=t,this[n(372)]=e[n(336)],this[n(374)]=e[n(346)]}[r(356)](t){const e=r,n=new Set,o=new Map;for(const i of t){if(e(364)===i[e(361)]&&e(362)!==i[e(353)]&&i[e(358)][e(337)]){const t=this[e(355)][e(366)](i[e(358)][e(337)]);for(const n of t[e(339)]()){if(!n.is(e(354),this[e(372)]))continue;const t=this[e(374)](n);o[e(368)](t)||o[e(341)](t,[]),o[e(340)](t)[e(342)](n)}}if(e(359)===i[e(361)]&&i[e(353)]===this[e(372)]){const t=this[e(374)]({getAttribute:t=>i[e(351)][e(340)](t)});n[e(357)](t)}}for(const[t,o]of this[e(360)])e(350)===o[e(376)][e(370)]&&n[e(357)](t);for(const t of n)this[e(360)][e(378)](t);for(const[t,n]of o)this[e(360)][e(341)](t,n[n[e(344)]-1]);const i=new Set;for(const[t,s]of o)n[e(368)](t)&&(i[e(357)](s[0]),s[e(344)]>1?o[e(341)](t,s[e(375)](1)):o[e(378)](t),n[e(378)](t));return{removed:Array[e(348)](n),inserted:Array[e(348)](o[e(343)]())[e(347)](),moved:Array[e(348)](i)}}}function u(t,e){const n=d();return(u=function(t,e){return n[t-=319]})(t,e)}const f=u;function d(){const t=["before","footnoteCounter","_handleFootnoteReferencesChanges","config","footnoteInlineContent","124113tloLkv","12052824DuEQpv","change:data","differ","indexOf","footnotes.multiBlock","_footnoteRefsTracker","isOfficialPlugin","createRangeOn","_handleFootnoteDefinitionsChanges","18wCrHQi","editor","singleton","document","remove","paragraph","enqueueChange","init","_handleInsertedFootnoteReference","$graveyard","_footnoteFormatter","footnoteRef","append","_handleRemoveFootnoteReferenceById","min","534692JpyNtI","push","2090948OQzPOH","getFootnotesFormatter","_handleMovedFootnoteReference","insert","6ZXxpZF","getRootNames","_ensureFootnotesDefinitionsContainerExists","getChanges","_footnotes","footnoteId","_footnoteDefsTracker","_sortFootnoteDefinitions","1836duvZJK","getFootnote","1203010SGeOvn","model","listenTo","has","move","getFootnotesDefinitionsObjectElement","findIndex","FootnotesTracker","after","getChildren","pluginName","isEqual","footnotesDefinitions","get","_handleFootnotesDefinitionsObjectChanges","_footnotesDefinitions","root","isPremiumPlugin","getFootnotes","find","_ensureFootnotesReferencesHaveProperOrder","parent","createElement","_insertEmptyFootnotesDefinitionsContainer","5597744mFgUZp","from","rootName","23410ewuMjw","childCount","createRangeIn","registerPostFixer","_updateFootnoteRefCounter","splice","createPositionAt","5877SuvMyp","map","reference","_handleFootnotesDefinitionsObjectSync","definition","add","compareWith","getAttribute","length","_footnoteDefsContainerTracker","some","3KcJSfW","low","unshift","_updateFootnotesCounters","setFootnoteFormatter","createPositionBefore","filter","footnoteDefinition","setAttribute","end"];return(d=function(){return t})()}!function(t){const e=u,n=t();for(;;)try{if(978657===parseInt(e(335))/1*(parseInt(e(329))/2)+parseInt(e(390))/3*(-parseInt(e(331))/4)+-parseInt(e(345))/5*(-parseInt(e(415))/6)+-parseInt(e(406))/7+parseInt(e(369))/8+-parseInt(e(379))/9*(parseInt(e(372))/10)+-parseInt(e(405))/11*(-parseInt(e(343))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(d);class p extends t.Plugin{[f(339)]=[];[f(360)]=null;[f(324)]=null;[f(388)];[f(411)];[f(341)];static get[f(355)](){return f(352)}static get[f(412)](){return!0}static get[f(362)](){return!0}constructor(t){const e=f;super(t),this[e(388)]=new l(this[e(416)][e(346)],{elementName:e(357),getElementKey:()=>e(417)}),this[e(411)]=new l(this[e(416)][e(346)],{elementName:e(325),getElementKey:t=>t[e(386)](e(340))}),this[e(341)]=new l(this[e(416)][e(346)],{elementName:e(397),getElementKey:t=>t[e(386)](e(340))})}[f(321)](){const t=f,{editor:e}=this,{model:n}=e;n[t(418)][t(375)](e=>{const o=t,i=n[o(418)][o(408)][o(338)]();let s=!1;return this[o(359)](e,i)&&(s=!0),this[o(414)](e,i)&&(s=!0),this[o(402)](e,i)&&(s=!0),this[o(365)](e)&&(s=!0),this[o(382)](e)&&(s=!0),this[o(342)](e)&&(s=!0),s}),this[t(347)](n[t(418)],t(407),()=>{const e=t;n[e(320)]({isUndoable:!1},t=>{this[e(337)](t)})},{priority:t(391)})}[f(350)](){return this[f(360)]}[f(344)](t){const e=f;return this[e(339)][e(364)](e=>e.id===t)||null}[f(363)](){const t=f;return Array[t(370)](this[t(339)])}[f(332)](){return this[f(324)]}[f(394)](t){this[f(324)]=t}[f(393)](t,e=0){const n=f;let o=!1;for(let i=e;i<this[n(339)][n(387)];i++)this[n(376)](t,i)&&(o=!0);return o}[f(368)](t,e){const n=f,o=t[n(367)](n(357),{});return t[n(326)](o,e),this[n(360)]=o,o}[f(337)](t){const e=f;if(!this[e(339)][e(387)]||this[e(360)])return;const n=this[e(339)][0][e(381)][e(361)],o=this[e(368)](t,n);for(const n of this[e(339)])n[e(383)][e(366)]||t[e(334)](n[e(383)],o,e(399));this[e(393)](t)}[f(359)](t,e){const n=f;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(388)][n(338)](e);if(r[n(387)]&&(this[n(360)]=r[0]),i[n(387)])if(i[n(387)]>1||this[n(360)]&&i[n(389)](t=>t!==this[n(360)])){const e=t[n(367)](n(357),{}),s=[];this[n(360)]&&s[n(330)](this[n(360)]),s[n(330)](...i),t[n(334)](e,s[0],n(400));for(const o of s)t[n(349)](t[n(374)](o),t[n(378)](e,n(399))),t[n(419)](o);this[n(360)]=e,this[n(393)](t),o=!0}else this[n(360)]=i[0];if(s[n(387)]&&n(323)===this[n(360)]?.[n(361)][n(371)]){for(const e of this[n(339)])t[n(419)](e[n(381)]),o=!0;this[n(339)]=[],this[n(360)]=null}return o}[f(414)](t,e){const n=f;let o=!1;const i=this[n(416)][n(403)][n(358)](n(410)),{inserted:s,moved:r}=this[n(341)][n(338)](e);for(const e of[...r,...s]){const s=e[n(386)](n(340)),r=this[n(344)](s);r&&(r[n(383)]=e),h(t,i,e)&&(o=!0)}return o}[f(402)](t,e){const n=f;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(411)][n(338)](e);for(const e of i)this[n(327)](t,e)&&(o=!0);for(const e of s)this[n(322)](t,e)&&(o=!0);for(const e of r)this[n(333)](t,e)&&(o=!0);return o}[f(382)](t){const e=f;if(!this[e(360)])return!1;let n=!1;if(this[e(360)][e(373)]!==this[e(339)][e(387)]){const o=[];for(const t of this[e(360)][e(354)]()){const i=t[e(386)](e(340));this[e(344)](i)||(o[e(392)](t),n=!0)}for(const n of o)t[e(419)](n)}const o=new Set,i=[];for(const t of this[e(360)][e(354)]()){const s=t[e(386)](e(340));o[e(348)](s)?(i[e(392)](t),n=!0):o[e(384)](s)}for(const n of i)t[e(419)](n);return this[e(360)][e(373)]||(t[e(419)](this[e(360)]),this[e(360)]=null,n=!0),n}[f(322)](t,e){const n=f;if(this[n(339)][n(364)](t=>t[n(381)]===e))return!1;let o=!1;const i=e[n(386)](n(340)),s=this[n(344)](i);s&&(t[n(419)](s[n(381)]),this[n(339)]=this[n(339)][n(396)](t=>t.id!==i),o=!0);let r=this[n(360)]?function(t,e){const o=n;for(const n of t[o(354)]())if(n[o(386)](o(340))===e)return n;return null}(this[n(360)],i):null;r||(r=t[n(367)](n(397),{footnoteId:i}),this[n(360)]&&(t[n(334)](r,this[n(360)],n(399)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(416)][n(346)],this[n(339)],e);return this[n(339)][n(377)](c,0,a),this[n(393)](t,c)&&(o=!0),o}[f(327)](t,e){const n=f,o=this[n(339)][n(351)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(339)][o];return n(323)!==s[n(383)][n(361)][n(371)]&&(t[n(419)](s[n(383)]),i=!0),this[n(339)][n(377)](o,1),this[n(393)](t,o)&&(i=!0),i}[f(333)](t,e){const n=f,o=e[n(386)](n(340)),i=this[n(339)][n(351)](t=>t.id===o),s=this[n(339)][i];let r=!1;s[n(381)]=e,this[n(339)][n(377)](i,1);const a=m(this[n(416)][n(346)],this[n(339)],e);return this[n(339)][n(377)](a,0,s),this[n(393)](t,Math[n(328)](i,a))&&(r=!0),r}[f(376)](t,e){const n=f;if(!this[n(360)])return!1;const o=this[n(339)][e];let i;return i=this[n(324)]?this[n(324)]({footnote:o,container:this[n(360)],digits:String(this[n(339)][n(387)])[n(387)],value:e+1}):String(e+1),o[n(381)][n(386)](n(401))!=i&&(t[n(398)](n(401),i,o[n(381)]),!0)}[f(342)](t){const e=f;if(!this[e(360)]||this[e(339)][e(387)]<2)return!1;if(function(t,n){const o=e;if(t[o(387)]!==n[o(387)])return!1;for(let e=0;e<t[o(387)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(339)][e(380)](t=>t.id),Array[e(370)](this[e(360)][e(354)]())[e(380)](t=>t[e(386)](e(340)))))return!1;let n=!1;for(let o=0;o<this[e(339)][e(387)];o++){const i=this[e(339)][o],s=t[e(395)](i[e(383)]),r=t[e(378)](this[e(360)],o);s[e(356)](r)||(t[e(349)](t[e(413)](i[e(383)]),r),n=!0)}return n}[f(365)](t){const e=f;if(!this[e(339)][e(387)])return!1;const{model:n}=this[e(416)];let o=!1;for(let i=0;i<this[e(339)][e(387)]-1;i++){const s=this[e(339)][i],r=this[e(339)][i+1],a=n[e(395)](s[e(381)]),c=n[e(395)](r[e(381)]);e(353)===a[e(385)](c)&&(this[e(333)](t,s[e(381)]),i=-1,o=!0)}return o}}function h(t,e,n){const o=f;if(n[o(373)])return!1;const i=o(e?319:404);return t[o(334)](t[o(367)](i),n),!0}function m(t,e,n){const o=f;if(0===e[o(387)])return 0;const i=t[o(395)](n);for(let n=0;n<e[o(387)];n++){const s=e[n],r=t[o(395)](s[o(381)]);if(o(400)===i[o(385)](r))return n}const s=n[o(361)];let r=-1;for(let t=e[o(387)]-1;t>=0;t--)if(e[t][o(381)][o(361)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(418)][o(336)](),c=a[o(409)](s[o(371)]),l=a[c+1];if(l)for(let t=0;t<e[o(387)];t++)if(e[t][o(381)][o(361)][o(371)]===l)return t;return e[o(387)]}const g=w;function w(t,e){const n=y();return(w=function(t,e){return n[t-=419]})(t,e)}function y(){const t=["selection","refresh","_moveSelectionToFootnoteDefinition","footnoteId","36jzfIgV","getItems","isBlock","127114sFEzzU","448172TEQQHa","get","FootnotesEditing","footnoteRef","insert-footnote-command-executed-with-invalid-id","6wsQNKY","9438870wlgAuX","createElement","isObject","581176bikHUQ","change","editor","checkChild","_getPositionToInsertFootnote","isEnabled","getFirstRange","75tLtBGK","3057vwjYwA","length","insertObject","13211IhepQg","model","end","plugins","document","test","2594hcNTun","string","execute","39324TxvdYM","3074141wXvZQT"];return(y=function(){return t})()}!function(t){const e=w,n=t();for(;;)try{if(846367===parseInt(e(455))/1+-parseInt(e(443))/2*(parseInt(e(434))/3)+parseInt(e(456))/4*(-parseInt(e(433))/5)+parseInt(e(422))/6*(parseInt(e(447))/7)+-parseInt(e(426))/8*(-parseInt(e(452))/9)+-parseInt(e(423))/10+parseInt(e(437))/11*(parseInt(e(446))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(y);class b extends t.Command{[g(449)](){const t=g,e=this[t(428)][t(438)][t(441)][t(448)],n=this[t(430)](e);this[t(431)]=!!n}[g(445)](t){const e=g,{editor:n}=this,{model:o}=n,{selection:s}=o[e(441)],r=this[e(430)](s);if(!r)return;const a=n[e(440)][e(457)](e(419)),c=t?.[e(451)]??(0,i.uid)();!function(t){const n=e;return n(444)==typeof t&&t[n(435)]>0&&!/\s/[n(442)](t)&&!/^\d/[n(442)](t)}(c)?(0,i.logWarning)(e(421)):(o[e(427)](t=>{const n=e,i=t[n(424)](n(420),{footnoteId:c});o[n(436)](i,r,null)}),a[e(450)](c))}[g(430)](t){const e=g,{model:n}=this[e(428)],{schema:o}=n,i=t[e(432)]();for(const t of i[e(453)]())if(o[e(454)](t)||o[e(425)](t))return null;const s=i[e(439)];return o[e(429)](s,e(420))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[p]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),n=window[m([68,97,116,101])][m([110,111,119])](),o=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{o[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=o[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;o[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,o)=>{o[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),n[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function n(t){for(let n=0;n<t[m([108,101,110,103,116,104])];n++){const o=t[m([99,104,97,114,67,111,100,101,65,116])](n);e=(e<<5)+e+o,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,o])=>{n(e),t(o)}):n(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function p(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function h(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const n=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let n=m([117]);for(let o=0;o<t[m([108,101,110,103,116,104])];o+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),n+=e[i]}return n}();o[n]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,o[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=h,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,o[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&n()?e:null;function n(){const t=e[m([106,116,105])],n=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),o={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete o[m([118,99])],f(o)==n}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),o[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function h(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(o){a(o)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(n-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),o=p(d(window[m([77,97,116,104])][m([99,101,105,108])](n/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,o)}function r(){const e=m([108,108,99,116,45])+d(f(t)),n=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return n?window[m([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,n)=>{t[m([116,104,101,110])](e,n),window[m([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,n)=>{if(n[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{h(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const o=a[m([115,112,108,105,116])](m([46])),[i,s,r]=o;return e(i),await n(i,s,r),t}catch{return!1}function e(e){const n=l(e);n&&n[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function n(e,n,o){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(o),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+n),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1760659200;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:n}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](n))return!0;const o=n[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=o[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(o[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>o[m([101,118,101,114,121])]((e,n)=>t[n]===e||t[n]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&h?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),h[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||h||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(p).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),n.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(p).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(i.reference,"on")}),n.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:n,editing:o}=t,{t:i}=t.locale;n.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:n})=>{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;n.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of o.view.createRangeIn(i))t.is("$textProxy")?n.consume(t.textNode,{name:!0}):t.is("element")&&n.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),n.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>x(t,e)}),n.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:n})=>{const o=t.getAttribute("footnoteCounter");return(0,e.toWidget)(x(t,n),n,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",o)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:n}=t.locale,{conversion:o}=t;o.for("upcast").elementToElement({view:{name:"ol",classes:["footnotes"]},model:"footnotesDefinitions",converterPriority:"high"}),o.for("dataDowncast").elementToElement({model:"footnotesDefinitions",view:{name:"ol",classes:["footnotes"]}}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=o.createContainerElement("div",{class:"footnotes-wrapper","data-footnotes-list-label":n("Footnotes")},o.createContainerElement("ol",{class:"footnotes"},o.createSlot())),s=(0,e.toWidget)(i,o,{hasSelectionHandle:!0,label:n("Footnotes")});return o.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:n}=t,o=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,n)=>{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"))return;if(!n.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=n.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!n.safeInsert(r,e.modelCursor))return;n.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")&&(n.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),n.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(o)n.convertChildren(a,r);else{const t=n.writer.createElement("footnoteInlineContent");n.writer.insert(t,r),n.convertChildren(a,t)}n.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>P(t,e,n)})}_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 n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of n)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 n=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:n,t:o}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Alt+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Alt+D"}]}),this.listenTo(n.view.document,"enter",(t,e)=>{const n=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(n){const o=n.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(o),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 n=!1;this.listenTo(e.view.document,"pointerdown",(t,o)=>{const{target:i}=o,s=e.view.document.selection;n=!(!i.is("element","sup")||!i.hasClass("footnote"))&&s.getSelectedElement()===i},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e,o=n.getChild(0).getAttribute("href");this._moveSelectionToFootnoteDefinition(o.slice(1)),t.stop(),e.preventDefault()},{priority:"high",context:t=>t.is("element","sup")&&t.hasClass("footnote")&&n}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n.is("element","a"))return;let o=n.getAttribute("href");if(!o?.startsWith("#"))return;o=o.slice(1);let i=!1;(o.startsWith("ref-")&&this._moveSelectionToFootnoteReference(o.slice(4))||this._moveSelectionToFootnoteDefinition(o))&&(i=!0),i&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:n})=>{if(!k(e))return null;if(!t)return n.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const o=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}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 n=e.toViewElement(t);return!!n&&k(t)!==n.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function x(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{id:"ref-"+n,href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function P(t,n,o,{dataPipeline:i}={}){const{t:s}=o,r=t.getAttribute("footnoteId"),a=n.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?n.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(n.createEditableElement("div",{class:"footnote-content"}),n,{label:s("Footnote content.")});return n.insert(n.createPositionAt(c,0),n.createSlot()),n.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var E=n(331);const S=T;function A(){const t=["get","getFirstRange","init","listenTo","_handlePasteFootnotesDefinitions","length","799092sfHXph","_defineClipboardIntegration","reduce","getFootnote","remove","content","contentInsertion","toView","parse","getFootnotesDefinitionsObjectElement","684510lRjltt","747648kuCFFk","getFootnotes","editing","footnoteId","FootnotesClipboard","getData","toModel","change","5637591JcioyT","8bsPYtk","getAttribute","footnoteRef","create","drop","requires","5EWtTQP","createRangeIn","definition","setAttribute","434380ZtQISp","method","1136541jpOESd","entries","find","htmlProcessor","application/ckeditor5-footnotes","document","isPremiumPlugin","push","editor","isOfficialPlugin","root","end","sourceEditorId","toData","_handleCopyFootnotesDefinitions","footnotesDefinitions","from","append","data","footnoteDefinition","pluginName","clipboardInput","insert","setData","outputTransformation","dataTransfer","selection","stringify","createElement","_insertEmptyFootnotesDefinitionsContainer","element","1075890wdAToC","add"];return(A=function(){return t})()}function T(t,e){const n=A();return(T=function(t,e){return n[t-=476]})(t,e)}!function(t){const e=T,n=t();for(;;)try{if(248296===parseInt(e(513))/1+-parseInt(e(493))/2+-parseInt(e(483))/3+-parseInt(e(494))/4+-parseInt(e(509))/5*(parseInt(e(546))/6)+parseInt(e(515))/7+parseInt(e(503))/8*(parseInt(e(502))/9))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(A);class _ extends t.Plugin{static get[S(535)](){return S(498)}static get[S(508)](){return[v,E.ClipboardPipeline]}static get[S(524)](){return!0}static get[S(521)](){return!0}[S(479)](){this[S(484)]()}[S(484)](){const t=S;this[t(529)](),this[t(481)]()}[S(529)](){const t=S,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(477)](E.ClipboardPipeline),s=n[t(477)](p);this[t(480)](i,t(539),(n,i)=>{const r=t,a=function(t,e){const n=T,o=new Set;for(const{item:i}of t[n(510)](e))i.is(n(545),n(505))&&o[n(476)](i[n(504)](n(497)));return Array[n(531)](o)}(o,i[r(488)]);if(!a[r(482)])return;const c=s[r(495)](),l=a[r(485)]((t,n)=>{const o=r,i=c[o(517)](t=>t.id===n);if(i){const n=e[o(533)][o(490)](i[o(511)],{isClipboardPipeline:!0}),s=e[o(533)][o(518)][o(528)](n);t[i.id]=s}return t},Object[r(506)](null));i[r(540)][r(538)](r(519),JSON[r(542)](l))})}[S(481)](){const t=S,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(496)],r=o[t(477)](E.ClipboardPipeline),a=o[t(477)](p);let c=null;this[t(480)](s[t(520)],t(536),(e,n)=>{const o=t,i=n[o(540)][o(499)](o(519));c=i?JSON[o(491)](i):null}),this[t(480)](r,t(489),(o,s)=>{const r=t;if(!c)return;const l=s[r(527)]===this[r(523)].id;l&&r(507)===s[r(514)]||n[r(501)](t=>{const o=r;!function(t,e){const n=T,o=[];for(const{item:i}of t[n(510)](e))i.is(n(545),n(530))&&o[n(522)](i);for(const e of o)t[n(487)](e)}(t,s[o(488)]);let u=a[o(492)]();if(!u){const e=n[o(520)][o(541)][o(478)]()[o(525)];u=a[o(544)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(506)](null);for(const{item:o}of t[s(510)](e))if(o.is(s(545),s(505))){const e=o[s(504)](s(497));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(512)](s(497),r[e],o)}return r}(t,s[o(488)],t=>!l||null!==a[o(486)](t));for(const[n,i]of Object[o(516)](c)){const s=f[n]||n,r=t[o(543)](o(534),{footnoteId:s}),a=e[o(533)][o(518)][o(490)](i),c=e[o(533)][o(500)](a,r);t[o(532)](c,r),t[o(537)](r,u,o(526))}c=null})})}}var D=n(311),L=n(355),V=n(450),O=n.n(V),K=n(774),N=n.n(K),R=n(265),j=n.n(R),M=n(410),B=n.n(M),z=n(238),W=n.n(z),H=n(14),U={attributes:{"data-cke":!0}};U.setAttributes=B(),U.insert=j().bind(null,"head"),U.domAPI=N(),U.insertStyleElement=W();O()(H.A,U);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",q(t,D.ButtonView)),e.add("menuBar:insertFootnote",q(t,D.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const n=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in n){const o=e,i=n[o];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete n[o],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&n._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&n._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&n._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&n._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&n._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&n._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&n._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function q(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof D.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:L.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}var J=Z;function Z(t,e){var n=Y();return(Z=function(t,e){return n[t-=447]})(t,e)}function Y(){var t=["10gBaGoK","requires","isOfficialPlugin","1582080mNRYHK","279008HsxarO","6zCcHOd","693248mrSeQt","isPremiumPlugin","pluginName","2161628QvHqnR","5680035gpGCKn","1037838BsmFyl","Footnotes","237606aAMlTL"];return(Y=function(){return t})()}!function(t){for(var e=Z,n=t();;)try{if(223331===parseInt(e(453))/1+parseInt(e(460))/2+-parseInt(e(459))/3*(parseInt(e(458))/4)+parseInt(e(454))/5*(-parseInt(e(451))/6)+-parseInt(e(449))/7+-parseInt(e(457))/8+parseInt(e(450))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Y);class X extends t.Plugin{static get[J(448)](){return J(452)}static get[J(455)](){return[v,_,Q]}static get[J(456)](){return!0}static get[J(447)](){return!0}}const G=tt;function $(){const t=["40329phRlSq","upper-roman","22LUYMls","2910AWPxZf","40388UKwRPS","decimal-leading-zero","decimal","1165WCApPS","upper-latin","lower-roman","lower-alpha","1869408dJWVOf","upper-alpha","7CLDAMg","12124136tEYLtT","35vynjRz","16403364gvqKUx","7322082TYkfJl","8764IJWitV","lower-latin"];return($=function(){return t})()}function tt(t,e){const n=$();return(tt=function(t,e){return n[t-=368]})(t,e)}!function(t){const e=tt,n=t();for(;;)try{if(905670===parseInt(e(370))/1*(-parseInt(e(379))/2)+-parseInt(e(386))/3+-parseInt(e(373))/4*(-parseInt(e(382))/5)+-parseInt(e(372))/6+-parseInt(e(368))/7*(-parseInt(e(369))/8)+-parseInt(e(375))/9*(parseInt(e(378))/10)+-parseInt(e(377))/11*(-parseInt(e(371))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}($);const et=[G(381),G(380),G(374),G(383),G(385),G(387),G(384),G(376)],nt=ot;function ot(t,e){const n=it();return(ot=function(t,e){return n[t-=437]})(t,e)}function it(){const t=["1260952MtmEHs","292260lRNfPh","plugins","refresh","1555zMfVEn","execute","_updateFootnotesCounters","getAttribute","setAttribute","624892ZIkkTa","footnotesListStyle","includes","change","value","2hxFZzK","3mQBMks","288462MQQgJu","isEnabled","model","3569049PhXxSm","getFootnotesDefinitionsObjectElement","513624CIPyNy","get"];return(it=function(){return t})()}!function(t){const e=ot,n=t();for(;;)try{if(104083===-parseInt(e(438))/1*(-parseInt(e(448))/2)+-parseInt(e(449))/3*(parseInt(e(443))/4)+parseInt(e(458))/5+parseInt(e(450))/6+-parseInt(e(457))/7+-parseInt(e(455))/8+parseInt(e(453))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(it);class st extends t.Command{[nt(437)](){const t=nt,{editor:e}=this,n=e[t(459)][t(456)](p)[t(454)]();this[t(451)]=!!n,this[t(447)]=n?.[t(441)](t(444))??null}[nt(439)]({value:t}){const e=nt,{editor:n}=this,o=n[e(459)][e(456)](p),i=o[e(454)]();i&&et[e(445)](t)&&n[e(452)][e(446)](n=>{const s=e;n[s(442)](s(444),t,i),o[s(440)](n)})}}const rt=at;function at(t,e){const n=lt();return(at=function(t,e){return n[t-=113]})(t,e)}!function(t){const e=at,n=t();for(;;)try{if(680809===-parseInt(e(118))/1+-parseInt(e(113))/2*(-parseInt(e(122))/3)+parseInt(e(136))/4*(-parseInt(e(128))/5)+parseInt(e(131))/6+-parseInt(e(126))/7+-parseInt(e(119))/8+-parseInt(e(133))/9*(-parseInt(e(120))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(lt);class ct extends t.Command{[rt(123)](){const t=rt,{editor:e}=this,n=e[t(129)][t(134)](p)[t(121)]();this[t(135)]=!!n,this[t(117)]=n?.[t(130)](t(127))??null}[rt(116)]({value:t}){const e=rt,{editor:n}=this,o=n[e(129)][e(134)](p),i=o[e(121)]();i&&Number[e(115)](t)&&n[e(124)][e(132)](n=>{const s=e;n[s(114)](s(127),t,i),o[s(125)](n)})}}function lt(){const t=["96044cKCeJD","setAttribute","isInteger","execute","value","1284797wkMbej","9714600MibaNP","10AjAidT","getFootnotesDefinitionsObjectElement","30pwlYCK","refresh","model","_updateFootnotesCounters","3762899RFthKg","footnotesListStart","3648340gZnQzf","plugins","getAttribute","2323734AzUjTz","change","32216823ePLxXL","get","isEnabled","4FBpUQZ"];return(lt=function(){return t})()}const ut=dt;!function(t){const e=dt,n=t();for(;;)try{if(864216===-parseInt(e(367))/1*(-parseInt(e(415))/2)+parseInt(e(336))/3+parseInt(e(416))/4*(-parseInt(e(380))/5)+-parseInt(e(325))/6*(parseInt(e(394))/7)+parseInt(e(399))/8+parseInt(e(350))/9*(parseInt(e(417))/10)+-parseInt(e(364))/11*(parseInt(e(353))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(gt);class ft extends t.Plugin{static get[ut(348)](){return ut(362)}static get[ut(387)](){return[v,p]}static get[ut(381)](){return!0}static get[ut(327)](){return!0}[ut(351)](){const t=ut,{editor:e}=this;e[t(400)][t(419)](t(337),t(366)),e[t(400)][t(419)](t(341),1),e[t(411)][t(363)](t(427),new st(e)),e[t(411)][t(363)](t(369),new ct(e)),this[t(335)](),this[t(384)](),this[t(420)](),this[t(414)]()}[ut(335)](){const t=ut,{editor:e}=this,{schema:n}=e[t(334)];n[t(355)](t(371),{allowAttributes:[t(396),t(361)]})}[ut(384)](){const t=ut,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(412)](t(426))[t(390)]({view:{name:"ol",styles:{"list-style-type":/.+/}},model:{key:t(396),value:e=>e[t(376)](t(360))}}),n[t(412)](t(426))[t(390)]({view:{name:"ol",attributes:{start:/.+/}},model:{key:t(361),value:e=>{const n=t,o=e[n(328)](n(347)),i=Number[n(377)](o,10);return Number[n(359)](i)?null:i}}}),n[t(412)](t(426))[t(390)]({view:{name:"ol",attributes:{type:/.+/}},model:{key:t(396),value:e=>({1:t(366),a:t(404),A:t(382),i:t(368),I:t(358)}[e[t(328)](t(407))])}}),n[t(412)](t(426))[t(363)](e=>{const n=t;e.on(n(374),(t,e,o)=>{const s=n,r=e[s(409)]?.[s(347)][s(406)];r?.is(s(345),s(371))&&(!r[s(391)](s(396))&&i[s(338)](r,s(396))&&o[s(386)][s(378)](s(396),s(366),r),!r[s(391)](s(361))&&i[s(338)](r,s(361))&&o[s(386)][s(378)](s(361),1,r))},{priority:n(425)})}),n[t(412)](t(339))[t(390)]({model:{name:t(371),key:t(361)},view:e=>1===e?null:{key:t(347),value:String(e)}}),n[t(412)](t(339))[t(390)]({model:{name:t(371),key:t(396)},view:e=>t(366)===e?null:{key:t(393),value:{"list-style-type":e}}}),n[t(412)](t(401))[t(363)](e=>{const n=t;e.on(n(389),(t,e,o)=>{const i=n;if(!o[i(397)][i(357)](e[i(408)],t[i(421)]))return;const s=pt(e[i(408)],o[i(365)]);null===e[i(398)]||void 0===e[i(398)]||1===e[i(398)]?o[i(386)][i(402)](i(347),s):o[i(386)][i(378)](i(347),String(e[i(398)]),s)}),e.on(n(410),(t,e,o)=>{const i=n;if(!o[i(397)][i(357)](e[i(408)],t[i(421)]))return;const s=pt(e[i(408)],o[i(365)]);e[i(398)]&&i(366)!==e[i(398)]?o[i(386)][i(395)](i(360),e[i(398)],s):o[i(386)][i(372)](i(360),s)})})}[ut(414)](){const t=ut,{editor:e}=this,{model:n}=e,o=e[t(343)][t(354)](p),i=this[t(331)](),s=this[t(413)]();n[t(379)][t(340)](e=>{const r=t,a=n[r(379)][r(422)][r(346)]();let c=!1;for(const t of a){if(r(333)!==t[r(407)]||r(326)===t[r(421)])continue;const o=n[r(418)](t[r(342)][r(406)]);for(const t of o[r(352)]())t.is(r(345),r(371))&&(t[r(391)](r(361))||(e[r(378)](r(361),s,t),c=!0),t[r(391)](r(396))||(e[r(378)](r(396),i,t),c=!0))}return c&&o[r(373)](e),c})}[ut(420)](){const t=ut,{editor:e}=this;e[t(343)][t(354)](p)[t(383)](e=>this[t(423)](e))}[ut(331)](){const t=ut;return this[t(356)][t(400)][t(354)](t(337))}[ut(413)](){const t=ut;return this[t(356)][t(400)][t(354)](t(341))}[ut(423)]({container:t,value:e,digits:n}){const o=ut,i=t[o(328)](o(396)),s=t[o(328)](o(361)),r=Math[o(388)](e)+(s-1);switch(i){case o(366):default:return String(r);case o(332):return function(t,e){const n=o;return String(t)[n(424)](e,"0")}(r,Math[o(370)](2,n));case o(404):case o(330):return ht(r,!1);case o(382):case o(375):return ht(r,!0);case o(368):return wt(r,!1);case o(358):return wt(r,!0)}}}function dt(t,e){const n=gt();return(dt=function(t,e){return n[t-=325]})(t,e)}function pt(t,e){const n=ut,o=e[n(392)](t);return Array[n(385)](o[n(349)]())[n(405)](t=>t.is(n(345),"ol"))}function ht(t,e){const n=ut;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(403)](97+t)+o,i=Math[n(388)]((i-1)/26)}return e?o[n(344)]():o}const mt=[{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 gt(){const t=["nodeAfter","type","item","modelRange","attribute:footnotesListStyle:footnotesDefinitions","commands","for","_getDefaultStartIndex","_definePostfixer","513914lYMrvt","4oFkbBs","631840vWZhPg","createRangeOn","define","_defineFormatter","name","differ","_formatFootnoteListValue","padStart","low","upcast","footnotesStyle","6pfWoCa","$text","isPremiumPlugin","getAttribute","toLowerCase","lower-latin","_getDefaultListStyle","decimal-leading-zero","insert","model","_defineSchema","2530038tkazGb","footnotes.footnotesProperties.defaultListStyle","checkAttribute","dataDowncast","registerPostFixer","footnotes.footnotesProperties.defaultStartIndex","position","plugins","toUpperCase","element","getChanges","start","pluginName","getChildren","198WLdyjb","init","getItems","12IJTklI","get","extend","editor","consume","upper-roman","isNaN","list-style-type","footnotesListStart","FootnotesPropertiesEditing","add","14292399wQrlim","mapper","decimal","1RXGVSU","lower-roman","footnotesStart","max","footnotesDefinitions","removeStyle","_updateFootnotesCounters","element:ol","upper-latin","getStyle","parseInt","setAttribute","document","1445280QIBYEh","isOfficialPlugin","upper-alpha","setFootnoteFormatter","_defineConverters","from","writer","requires","floor","attribute:footnotesListStart:footnotesDefinitions","attributeToAttribute","hasAttribute","toViewElement","style","7432999buQJTO","setStyle","footnotesListStyle","consumable","attributeNewValue","8192696OyjbXK","config","editingDowncast","removeAttribute","fromCharCode","lower-alpha","find"];return(gt=function(){return t})()}function wt(t,e){const n=ut;let o="",i=t;for(const{value:t,numeral:e}of mt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(329)]()}class yt extends D.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new D.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new D.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,n),[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,D.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 n=new D.View(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){for(const t of this.children)if(t instanceof D.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},n.focusTracker=new i.FocusTracker,n.keystrokes=new i.KeystrokeHandler,n.render(),n.keystrokes.listenTo(n.element),this.children.add(n),n}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),n=[e],o=new D.CollapsibleView(this.locale,n);return o.set({label:t("Footnotes properties"),isCollapsed:!0}),o.buttonView.bind("isEnabled").toMany(n,"isEnabled",(...t)=>t.some(t=>t)),o.buttonView.on("change:isEnabled",(t,e,n)=>{n||(o.isCollapsed=!0)}),this.children.add(o),[e,o]}_createStartIndexPropertyView(){const{t}=this.locale,e=new D.LabeledFieldView(this.locale,D.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid footnotes start index value."):n.checkValidity()?this.fire("footnotesListStart",{startIndex:o}):e.errorText=t("Footnotes start index must be greater than 0.")}),e}}var bt=n(945),vt={attributes:{"data-cke":!0}};vt.setAttributes=B(),vt.insert=j().bind(null,"head"),vt.domAPI=N(),vt.insertStyleElement=W();O()(bt.A,vt);bt.A&&bt.A.locals&&bt.A.locals;class It extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[D.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var n;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(n=t,t=>{const{t:e}=t,o=n.commands.get("footnotesStyle"),i=(0,D.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(o,"isEnabled"),s.set({label:e("Footnotes style"),icon:L.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:n}=t.locale,o=n("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:L.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:L.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:L.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:L.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:L.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:L.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:n,icon:o,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new D.ButtonView(e);return a.set({label:n,icon:o,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 yt(t.locale,{styleGridAriaLabel:o,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,n)=>{t.execute("footnotesStart",{value:n.startIndex})}),s}({editor:n,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:n}=t.locale,o=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=D.BalloonPanelView;o.register("footnotesDefinitions",{ariaLabel:n("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 kt=Ft;function Ct(){var t=["29969291XEcKNQ","5928740TZnfcg","36mTzCwt","isPremiumPlugin","90bDdDwC","6955816veqoWY","1617039wZsHjI","2287528shdLTY","requires","17078ZgbrOk","pluginName","10TcvxCR","isOfficialPlugin","569472BUvCuD","FootnotesProperties","4vCfwRP"];return(Ct=function(){return t})()}function Ft(t,e){var n=Ct();return(Ft=function(t,e){return n[t-=293]})(t,e)}!function(t){for(var e=Ft,n=t();;)try{if(613892===parseInt(e(295))/1*(parseInt(e(300))/2)+parseInt(e(297))/3+-parseInt(e(306))/4*(parseInt(e(308))/5)+-parseInt(e(304))/6+-parseInt(e(296))/7+parseInt(e(298))/8*(-parseInt(e(293))/9)+-parseInt(e(302))/10*(-parseInt(e(307))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ct);class xt extends t.Plugin{static get[kt(301)](){return kt(305)}static get[kt(299)](){return[ft,It]}static get[kt(303)](){return!0}static get[kt(294)](){return!0}}function Pt(t,e){var n=Et();return(Pt=function(t,e){return n[t-=107]})(t,e)}function Et(){var t=["49548VdugUf","2296806qvrFTS","126tychgA","32TgVOse","184AThaLm","1398263MxrLhY","2784710nDBBJM","1352516hVtwko","20AHRLAK","525580jgyDte","1069719zuPqKJ"];return(Et=function(){return t})()}!function(t){for(var e=Pt,n=t();;)try{if(775788===parseInt(e(115))/1+-parseInt(e(116))/2+parseInt(e(110))/3*(-parseInt(e(114))/4)+parseInt(e(107))/5*(parseInt(e(111))/6)+-parseInt(e(109))/7*(-parseInt(e(113))/8)+parseInt(e(112))/9*(-parseInt(e(108))/10)+parseInt(e(117))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Et)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
|