@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251104.0 → 0.0.0-nightly-20251105.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={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-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck-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 .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,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),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:p,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:()=>$,FootnotesClipboard:()=>L,FootnotesEditing:()=>v,FootnotesProperties:()=>St,FootnotesPropertiesEditing:()=>dt,FootnotesPropertiesUI:()=>kt,FootnotesStartCommand:()=>ct,FootnotesStyleCommand:()=>rt,FootnotesTracker:()=>f,FootnotesUI:()=>q,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);const r=c;function a(){const t=["insert","slice","values","clear","_model","rootName","elementName","element","75inMGCB","push","getElementKey","name","from","get","reset","590584AMdyMJ","nodeAfter","$text","attributes","flat","_elementName","length","remove","_getElementKey","4308ldUwCQ","add","type","getChanges","27agKfWx","34441LEkOhH","$graveyard","getItems","root","_trackedElements","896210OFOhbE","delete","set","131178QGQaOg","createRangeOn","position","has","423703eOEXgq","841608QTQHFO","3LuAjyM"];return(a=function(){return t})()}function c(t,e){const n=a();return(c=function(t,e){return n[t-=186]})(t,e)}!function(t){const e=c,n=t();for(;;)try{if(119299===parseInt(e(196))/1+-parseInt(e(204))/2+-parseInt(e(210))/3*(parseInt(e(209))/4)+-parseInt(e(219))/5*(parseInt(e(191))/6)+parseInt(e(208))/7+-parseInt(e(226))/8*(-parseInt(e(195))/9)+parseInt(e(201))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(a);class l{[r(215)];[r(187)];[r(190)];[r(200)]=new Map;constructor(t,e){const n=r;this[n(215)]=t,this[n(187)]=e[n(217)],this[n(190)]=e[n(221)]}[r(225)](){const t=r;this[t(200)][t(214)]()}[r(194)](t){const e=r,n=new Set,o=new Map;for(const i of t){if(e(211)===i[e(193)]&&e(228)!==i[e(222)]&&i[e(206)][e(227)]){const t=this[e(215)][e(205)](i[e(206)][e(227)]);for(const n of t[e(198)]()){if(!n.is(e(218),this[e(187)]))continue;const t=this[e(190)](n);o[e(207)](t)||o[e(203)](t,[]),o[e(224)](t)[e(220)](n)}}if(e(189)===i[e(193)]&&i[e(222)]===this[e(187)]){const t=this[e(190)]({getAttribute:t=>i[e(229)][e(224)](t)});n[e(192)](t)}}for(const[t,o]of this[e(200)])e(197)===o[e(199)][e(216)]&&n[e(192)](t);for(const t of n)this[e(200)][e(202)](t);for(const[t,n]of o)this[e(200)][e(203)](t,n[n[e(188)]-1]);const i=new Set;for(const[t,s]of o)n[e(207)](t)&&(i[e(192)](s[0]),s[e(188)]>1?o[e(203)](t,s[e(212)](1)):o[e(202)](t),n[e(202)](t));return{removed:Array[e(223)](n),inserted:Array[e(223)](o[e(213)]())[e(186)](),moved:Array[e(223)](i)}}}const u=p;!function(t){const e=p,n=t();for(;;)try{if(462105===parseInt(e(158))/1+-parseInt(e(188))/2+-parseInt(e(149))/3+-parseInt(e(160))/4+parseInt(e(185))/5+parseInt(e(114))/6+-parseInt(e(182))/7)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(h);class f extends t.Plugin{[u(163)]=[];[u(113)]=null;[u(178)]=null;[u(116)];[u(107)];[u(192)];static get[u(169)](){return u(130)}static get[u(195)](){return!0}static get[u(177)](){return!0}constructor(t){const e=u;super(t),this[e(116)]=new l(this[e(126)][e(196)],{elementName:e(191),getElementKey:()=>e(106)}),this[e(107)]=new l(this[e(126)][e(196)],{elementName:e(119),getElementKey:t=>t[e(111)](e(198))}),this[e(192)]=new l(this[e(126)][e(196)],{elementName:e(166),getElementKey:t=>t[e(111)](e(198))})}[u(154)](){const t=u,{editor:e}=this,{model:n,data:o}=e;n[t(110)][t(190)](e=>{const o=t,i=n[o(110)][o(135)][o(200)]();let s=!1;return this[o(164)](e,i)&&(s=!0),this[o(203)](e,i)&&(s=!0),this[o(118)](e,i)&&(s=!0),this[o(150)](e)&&(s=!0),this[o(115)](e)&&(s=!0),this[o(174)](e)&&(s=!0),s}),this[t(121)](n[t(110)],t(112),()=>{const e=t;n[e(189)]({isUndoable:!1},t=>{this[e(157)](t)})},{priority:t(183)}),this[t(121)](o,t(179),()=>{const e=t;this[e(163)]=[],this[e(116)][e(175)](),this[e(107)][e(175)](),this[e(192)][e(175)]()},{priority:t(122)})}[u(143)](){return this[u(113)]}[u(194)](t){const e=u;return this[e(163)][e(201)](e=>e.id===t)||null}[u(161)](){const t=u;return Array[t(202)](this[t(163)])}[u(199)](){return this[u(178)]}[u(117)](t){this[u(178)]=t}[u(197)](t,e=0){const n=u;let o=!1;for(let i=e;i<this[n(163)][n(181)];i++)this[n(153)](t,i)&&(o=!0);return o}[u(108)](t,e){const n=u,o=t[n(145)](n(191),{});return t[n(148)](o,e),this[n(113)]=o,o}[u(157)](t){const e=u;if(!this[e(163)][e(181)]||this[e(113)])return;const n=this[e(163)][0][e(151)][e(156)],o=this[e(108)](t,n);for(const n of this[e(163)])n[e(162)][e(155)]||t[e(170)](n[e(162)],o,e(172));this[e(197)](t)}[u(164)](t,e){const n=u;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(116)][n(200)](e);if(r[n(181)]&&(this[n(113)]=r[0]),i[n(181)])if(i[n(181)]>1||this[n(113)]&&i[n(129)](t=>t!==this[n(113)])){const e=t[n(145)](n(191),{}),s=[];this[n(113)]&&s[n(176)](this[n(113)]),s[n(176)](...i),t[n(170)](e,s[0],n(127));for(const o of s)t[n(134)](t[n(142)](o),t[n(141)](e,n(172))),t[n(144)](o);this[n(113)]=e,this[n(197)](t),o=!0}else this[n(113)]=i[0];if(s[n(181)]&&n(184)===this[n(113)]?.[n(156)][n(186)]){for(const e of this[n(163)])t[n(144)](e[n(151)]),o=!0;this[n(163)]=[],this[n(113)]=null}return o}[u(203)](t,e){const n=u;let o=!1;const i=this[n(126)][n(125)][n(180)](n(138)),{inserted:s,moved:r}=this[n(192)][n(200)](e);for(const e of[...r,...s]){const s=e[n(111)](n(198)),r=this[n(194)](s);r&&(r[n(162)]=e),d(t,i,e)&&(o=!0)}return o}[u(118)](t,e){const n=u;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(107)][n(200)](e);for(const e of i)this[n(168)](t,e)&&(o=!0);for(const e of s)this[n(123)](t,e)&&(o=!0);for(const e of r)this[n(109)](t,e)&&(o=!0);return o}[u(115)](t){const e=u;if(!this[e(113)])return!1;let n=!1;if(this[e(113)][e(173)]!==this[e(163)][e(181)]){const o=[];for(const t of this[e(113)][e(133)]()){const i=t[e(111)](e(198));this[e(194)](i)||(o[e(140)](t),n=!0)}for(const n of o)t[e(144)](n)}const o=new Set,i=[];for(const t of this[e(113)][e(133)]()){const s=t[e(111)](e(198));o[e(136)](s)?(i[e(140)](t),n=!0):o[e(146)](s)}for(const n of i)t[e(144)](n);return this[e(113)][e(173)]||(t[e(144)](this[e(113)]),this[e(113)]=null,n=!0),n}[u(123)](t,e){const n=u;if(this[n(163)][n(201)](t=>t[n(151)]===e))return!1;let o=!1;const i=e[n(111)](n(198)),s=this[n(163)][n(128)](t=>t.id===i);-1!==s&&(t[n(144)](this[n(163)][s][n(151)]),this[n(163)][n(193)](s,1),o=!0);let r=this[n(113)]?function(t,e){const o=n;for(const n of t[o(133)]())if(n[o(111)](o(198))===e)return n;return null}(this[n(113)],i):null;r||(r=t[n(145)](n(166),{footnoteId:i}),this[n(113)]&&(t[n(170)](r,this[n(113)],n(172)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(126)][n(196)],this[n(163)],e);this[n(163)][n(193)](c,0,a);let l=c;return-1!==s&&(l=Math[n(137)](c,s)),this[n(197)](t,l)&&(o=!0),o}[u(168)](t,e){const n=u,o=this[n(163)][n(128)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(163)][o];return n(184)!==s[n(162)][n(156)][n(186)]&&(t[n(144)](s[n(162)]),i=!0),this[n(163)][n(193)](o,1),this[n(197)](t,o)&&(i=!0),i}[u(109)](t,e){const n=u,o=e[n(111)](n(198)),i=this[n(163)][n(128)](t=>t.id===o),s=this[n(163)][i];let r=!1;s[n(151)]=e,this[n(163)][n(193)](i,1);const a=m(this[n(126)][n(196)],this[n(163)],e);return this[n(163)][n(193)](a,0,s),this[n(197)](t,Math[n(137)](i,a))&&(r=!0),r}[u(153)](t,e){const n=u;if(!this[n(113)])return!1;const o=this[n(163)][e];let i;return i=this[n(178)]?this[n(178)]({footnote:o,container:this[n(113)],digits:String(this[n(163)][n(181)])[n(181)],value:e+1}):String(e+1),o[n(151)][n(111)](n(139))!=i&&(t[n(187)](n(139),i,o[n(151)]),!0)}[u(174)](t){const e=u;if(!this[e(113)]||this[e(163)][e(181)]<2)return!1;if(function(t,n){const o=e;if(t[o(181)]!==n[o(181)])return!1;for(let e=0;e<t[o(181)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(163)][e(165)](t=>t.id),Array[e(202)](this[e(113)][e(133)]())[e(165)](t=>t[e(111)](e(198)))))return!1;let n=!1;for(let o=0;o<this[e(163)][e(181)];o++){const i=this[e(163)][o],s=t[e(124)](i[e(162)]),r=t[e(141)](this[e(113)],o);s[e(131)](r)||(t[e(134)](t[e(171)](i[e(162)]),r),n=!0)}return n}[u(150)](t){const e=u;if(!this[e(163)][e(181)])return!1;const{model:n}=this[e(126)];let o=!1;for(let i=0;i<this[e(163)][e(181)]-1;i++){const s=this[e(163)][i],r=this[e(163)][i+1],a=n[e(124)](s[e(151)]),c=n[e(124)](r[e(151)]);e(147)===a[e(152)](c)&&(this[e(109)](t,s[e(151)]),i=-1,o=!0)}return o}}function d(t,e,n){const o=u;if(n[o(173)])return!1;const i=o(e?120:159);return t[o(170)](t[o(145)](i),n),!0}function h(){const t=["unshift","createPositionAt","createRangeIn","getFootnotesDefinitionsObjectElement","remove","createElement","add","after","append","1174626LQONlI","_ensureFootnotesReferencesHaveProperOrder","reference","compareWith","_updateFootnoteRefCounter","init","parent","root","_ensureFootnotesDefinitionsContainerExists","719512LIWKSP","footnoteInlineContent","1006680FyuhoJ","getFootnotes","definition","_footnotes","_handleFootnotesDefinitionsObjectChanges","map","footnoteDefinition","indexOf","_handleRemoveFootnoteReferenceById","pluginName","insert","createRangeOn","end","childCount","_sortFootnoteDefinitions","reset","push","isPremiumPlugin","_footnoteFormatter","set","get","length","2421027lTSRYG","low","$graveyard","1178995QGGrNj","rootName","setAttribute","725790vwOoum","enqueueChange","registerPostFixer","footnotesDefinitions","_footnoteDefsTracker","splice","getFootnote","isOfficialPlugin","model","_updateFootnotesCounters","footnoteId","getFootnotesFormatter","getChanges","find","from","_handleFootnoteDefinitionsChanges","singleton","_footnoteRefsTracker","_insertEmptyFootnotesDefinitionsContainer","_handleMovedFootnoteReference","document","getAttribute","change:data","_footnotesDefinitions","5152572RcJadk","_handleFootnotesDefinitionsObjectSync","_footnoteDefsContainerTracker","setFootnoteFormatter","_handleFootnoteReferencesChanges","footnoteRef","paragraph","listenTo","high","_handleInsertedFootnoteReference","createPositionBefore","config","editor","before","findIndex","some","FootnotesTracker","isEqual","getRootNames","getChildren","move","differ","has","min","footnotes.multiBlock","footnoteCounter"];return(h=function(){return t})()}function p(t,e){const n=h();return(p=function(t,e){return n[t-=106]})(t,e)}function m(t,e,n){const o=u;if(0===e[o(181)])return 0;const i=t[o(124)](n);for(let n=0;n<e[o(181)];n++){const s=e[n],r=t[o(124)](s[o(151)]);if(o(127)===i[o(152)](r))return n}const s=n[o(156)];let r=-1;for(let t=e[o(181)]-1;t>=0;t--)if(e[t][o(151)][o(156)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(110)][o(132)](),c=a[o(167)](s[o(186)]),l=a[c+1];if(l)for(let t=0;t<e[o(181)];t++)if(e[t][o(151)][o(156)][o(186)]===l)return t;return e[o(181)]}function g(t,e){const n=y();return(g=function(t,e){return n[t-=416]})(t,e)}const w=g;function y(){const t=["2172255IUCjTq","isEnabled","2292IjWfcO","get","2944MjyVdh","string","insertObject","254229XaFEre","model","getItems","editor","createElement","test","_moveSelectionToFootnoteDefinition","footnoteId","footnoteRef","20UZtugW","1024029EHsmkh","354tejjjP","execute","document","getFirstRange","insert-footnote-command-executed-with-invalid-id","_getPositionToInsertFootnote","change","isObject","length","FootnotesEditing","checkChild","3367790YMyRio","1311942sFIiOE","refresh","10346swtHty","selection","end","isBlock","plugins"];return(y=function(){return t})()}!function(t){const e=g,n=t();for(;;)try{if(292699===parseInt(e(450))/1*(parseInt(e(429))/2)+-parseInt(e(418))/3*(-parseInt(e(427))/4)+-parseInt(e(448))/5+parseInt(e(441))/6+parseInt(e(443))/7*(-parseInt(e(452))/8)+-parseInt(e(428))/9+parseInt(e(440))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(y);class b extends t.Command{[w(442)](){const t=w,e=this[t(421)][t(419)][t(431)][t(444)],n=this[t(434)](e);this[t(449)]=!!n}[w(430)](t){const e=w,{editor:n}=this,{model:o}=n,{selection:s}=o[e(431)],r=this[e(434)](s);if(!r)return;const a=n[e(447)][e(451)](e(438)),c=t?.[e(425)]??(0,i.uid)();!function(t){const n=e;return n(416)==typeof t&&t[n(437)]>0&&!/\s/[n(423)](t)&&!/^\d/[n(423)](t)}(c)?(0,i.logWarning)(e(433)):(o[e(435)](t=>{const n=e,i=t[n(422)](n(426),{footnoteId:c});o[n(417)](i,r,null)}),a[e(424)](c))}[w(434)](t){const e=w,{model:n}=this[e(421)],{schema:o}=n,i=t[e(432)]();for(const t of i[e(420)]())if(o[e(446)](t)||o[e(436)](t))return null;const s=i[e(445)];return o[e(439)](s,e(426))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[f]}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 h(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function p(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const 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])]=p,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,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,p=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&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])]&&(p=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),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 p(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(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=h(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])](h(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=>{p(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return 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:1762214400;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&&p?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),p[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||p||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(f).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(f).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})=>S(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)(S(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:"div",classes:"footnotes"},model:"footnotesDefinitions"}),o.for("upcast").add(t=>{t.on("element:ol",(t,e,n)=>{const o=e.viewItem;if(!o.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!n.consumable.consume(o,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,n)=>{const o=e.viewItem;o.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&n.consumable.consume(o,{name:!0,classes:"footnotes-divider"})})}),o.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>E(e)}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=E(o,{"data-footnotes-list-label":n("Footnotes")}),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-list"))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+Shift+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Shift+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","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:o}=e;if(!o.is("element","a"))return;if(o.parent?.is("element","sup")&&o.parent.hasClass("footnote")&&!n)return void e.preventDefault();let i=o.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer: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.createEmptyElement("hr",{class:"footnotes-divider"}),o=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[n,o])}function S(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{id:"ref-"+n,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);const _=D;function A(){const t=["add","getFootnote","reduce","requires","getData","2139513fALgFy","footnotesDefinitions","contentInsertion","setData","push","getFirstRange","create","pluginName","clipboardInput","getFootnotes","selection","toModel","8410rvKCTZ","dataTransfer","65srTLMs","insert","init","listenTo","content","toData","8536weWnGv","1943220QMgdoA","toView","htmlProcessor","_handleCopyFootnotesDefinitions","from","getAttribute","definition","113381kDMrah","editor","createElement","length","8UNYsJj","_defineClipboardIntegration","_insertEmptyFootnotesDefinitionsContainer","footnoteId","application/ckeditor5-footnotes","root","setAttribute","_handlePasteFootnotesDefinitions","change","find","editing","footnoteDefinition","stringify","footnoteRef","data","2087596ObmicV","outputTransformation","end","isOfficialPlugin","103064kjhWtj","createRangeIn","element","getFootnotesDefinitionsObjectElement","2PdzIRx","isPremiumPlugin","method","document","FootnotesClipboard","remove","parse","get","drop","entries","sourceEditorId","2226789GJEvsp","append"];return(A=function(){return t})()}function D(t,e){const n=A();return(D=function(t,e){return n[t-=219]})(t,e)}!function(t){const e=D,n=t();for(;;)try{if(360625===-parseInt(e(247))/1+-parseInt(e(274))/2*(parseInt(e(219))/3)+-parseInt(e(270))/4*(parseInt(e(233))/5)+parseInt(e(240))/6+parseInt(e(266))/7+-parseInt(e(251))/8*(-parseInt(e(285))/9)+parseInt(e(231))/10*(parseInt(e(239))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(A);class L extends t.Plugin{static get[_(226)](){return _(278)}static get[_(290)](){return[v,P.ClipboardPipeline]}static get[_(269)](){return!0}static get[_(275)](){return!0}[_(235)](){this[_(252)]()}[_(252)](){const t=_;this[t(243)](),this[t(258)]()}[_(243)](){const t=_,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(281)](P.ClipboardPipeline),s=n[t(281)](f);this[t(236)](i,t(267),(n,i)=>{const r=t,a=function(t,e){const n=D,o=new Set;for(const{item:i}of t[n(271)](e))i.is(n(272),n(264))&&o[n(287)](i[n(245)](n(254)));return Array[n(244)](o)}(o,i[r(237)]);if(!a[r(250)])return;const c=s[r(228)](),l=a[r(289)]((t,n)=>{const o=r,i=c[o(260)](t=>t.id===n);if(i){const n=e[o(265)][o(241)](i[o(246)],{isClipboardPipeline:!0}),s=e[o(265)][o(242)][o(238)](n);t[i.id]=s}return t},Object[r(225)](null));i[r(232)][r(222)](r(255),JSON[r(263)](l))})}[_(258)](){const t=_,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(261)],r=o[t(281)](P.ClipboardPipeline),a=o[t(281)](f);let c=null;this[t(236)](s[t(277)],t(227),(e,n)=>{const o=t,i=n[o(232)][o(291)](o(255));c=i?JSON[o(280)](i):null}),this[t(236)](r,t(221),(o,s)=>{const r=t;if(!c)return;const l=s[r(284)]===this[r(248)].id;l&&r(282)===s[r(276)]||n[r(259)](t=>{const o=r;!function(t,e){const n=D,o=[];for(const{item:i}of t[n(271)](e))i.is(n(272),n(220))&&o[n(223)](i);for(const e of o)t[n(279)](e)}(t,s[o(237)]);let u=a[o(273)]();if(!u){const e=n[o(277)][o(229)][o(224)]()[o(256)];u=a[o(253)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(225)](null);for(const{item:o}of t[s(271)](e))if(o.is(s(272),s(264))){const e=o[s(245)](s(254));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(257)](s(254),r[e],o)}return r}(t,s[o(237)],t=>!l||null!==a[o(288)](t));for(const[n,i]of Object[o(283)](c)){const s=f[n]||n,r=t[o(249)](o(262),{footnoteId:s}),a=e[o(265)][o(242)][o(241)](i),c=e[o(265)][o(230)](a,r);t[o(286)](c,r),t[o(234)](r,u,o(268))}c=null})})}}var T=n(311),V=n(355),O=n(450),N=n.n(O),M=n(774),R=n.n(M),j=n(265),K=n.n(j),W=n(410),U=n.n(W),B=n(238),H=n.n(B),z=n(14),Q={attributes:{"data-cke":!0}};Q.setAttributes=U(),Q.insert=K().bind(null,"head"),Q.domAPI=R(),Q.insertStyleElement=H();N()(z.A,Q);z.A&&z.A.locals&&z.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",G(t,T.ButtonView)),e.add("menuBar:insertFootnote",G(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 G(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:V.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}function J(t,e){var n=Y();return(J=function(t,e){return n[t-=166]})(t,e)}var X=J;function Y(){var t=["19556QLNsjS","46536cGyPMp","600561VXzYFm","587470nDOAWf","39ZQIspL","requires","pluginName","1854540dpEaji","Footnotes","isOfficialPlugin","24VLyfSE","2331cWpsog","isPremiumPlugin","1883110MQWVcm","21JqUAkV"];return(Y=function(){return t})()}!function(t){for(var e=J,n=t();;)try{if(234154===parseInt(e(172))/1*(-parseInt(e(168))/2)+parseInt(e(170))/3+parseInt(e(175))/4+parseInt(e(171))/5+parseInt(e(169))/6*(parseInt(e(167))/7)+parseInt(e(178))/8*(-parseInt(e(179))/9)+-parseInt(e(166))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Y);class $ extends t.Plugin{static get[X(174)](){return X(176)}static get[X(173)](){return[v,L,q]}static get[X(177)](){return!0}static get[X(180)](){return!0}}function Z(t,e){const n=nt();return(Z=function(t,e){return n[t-=480]})(t,e)}const tt=Z;!function(t){const e=Z,n=t();for(;;)try{if(485729===parseInt(e(492))/1*(parseInt(e(486))/2)+-parseInt(e(497))/3+parseInt(e(487))/4*(parseInt(e(489))/5)+-parseInt(e(481))/6*(parseInt(e(483))/7)+parseInt(e(491))/8+parseInt(e(493))/9+-parseInt(e(490))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(nt);const et=[tt(482),tt(480),tt(488),tt(484),tt(496),tt(485),tt(495),tt(494)];function nt(){const t=["decimal","1974JVfVbq","upper-latin","upper-alpha","1195170FUvogf","160pyYVDM","lower-latin","104450RaILdS","10234940cITtto","805432lTCjaf","1QaltXO","8492166GUpktD","upper-roman","lower-roman","lower-alpha","2699067FQzjJQ","decimal-leading-zero","1458AmZRyq"];return(nt=function(){return t})()}const ot=st;function it(){const t=["setAttribute","value","getFootnotesDefinitionsObjectElement","8261239VIcpSz","3034062rLCPoX","115974SeYlnI","get","11DfeyWf","execute","plugins","footnotesListStyle","33744516gaFiTV","4ETMcJz","1pfVlfU","380aPrNmm","isEnabled","_updateFootnotesCounters","change","getAttribute","model","refresh","5088882pKxhdu","6248488eKNNMQ","3794734nNVPYs","includes","20HucWeD"];return(it=function(){return t})()}function st(t,e){const n=it();return(st=function(t,e){return n[t-=407]})(t,e)}!function(t){const e=st,n=t();for(;;)try{if(962506===parseInt(e(414))/1*(-parseInt(e(424))/2)+-parseInt(e(422))/3*(parseInt(e(413))/4)+-parseInt(e(415))/5*(-parseInt(e(432))/6)+-parseInt(e(430))/7+parseInt(e(423))/8+parseInt(e(431))/9*(parseInt(e(426))/10)+parseInt(e(408))/11*(parseInt(e(412))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(it);class rt extends t.Command{[ot(421)](){const t=ot,{editor:e}=this,n=e[t(410)][t(407)](f)[t(429)]();this[t(416)]=!!n,this[t(428)]=n?.[t(419)](t(411))??null}[ot(409)]({value:t}){const e=ot,{editor:n}=this,o=n[e(410)][e(407)](f),i=o[e(429)]();i&&et[e(425)](t)&&n[e(420)][e(418)](n=>{const s=e;n[s(427)](s(411),t,i),o[s(417)](n)})}}const at=lt;!function(t){const e=lt,n=t();for(;;)try{if(880803===parseInt(e(161))/1*(parseInt(e(164))/2)+-parseInt(e(149))/3*(-parseInt(e(144))/4)+parseInt(e(148))/5+-parseInt(e(162))/6*(parseInt(e(156))/7)+-parseInt(e(163))/8+-parseInt(e(150))/9+parseInt(e(145))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ut);class ct extends t.Command{[at(160)](){const t=at,{editor:e}=this,n=e[t(159)][t(155)](f)[t(165)]();this[t(166)]=!!n,this[t(151)]=n?.[t(153)](t(154))??null}[at(157)]({value:t}){const e=at,{editor:n}=this,o=n[e(159)][e(155)](f),i=o[e(165)]();i&&Number[e(147)](t)&&n[e(152)][e(143)](n=>{const s=e;n[s(146)](s(154),t,i),o[s(158)](n)})}}function lt(t,e){const n=ut();return(lt=function(t,e){return n[t-=143]})(t,e)}function ut(){const t=["change","262796NjrMYh","13081990FEMhVt","setAttribute","isInteger","8570825qteQbM","3hdYXaL","8878689UmUPiC","value","model","getAttribute","footnotesListStart","get","7MpSwan","execute","_updateFootnotesCounters","plugins","refresh","1068xQwWtZ","10254732IMeIHu","7430824Wfjkpi","2654qldrsu","getFootnotesDefinitionsObjectElement","isEnabled"];return(ut=function(){return t})()}const ft=ht;!function(t){const e=ht,n=t();for(;;)try{if(321052===-parseInt(e(340))/1*(-parseInt(e(327))/2)+-parseInt(e(386))/3+parseInt(e(359))/4+parseInt(e(397))/5+-parseInt(e(400))/6*(parseInt(e(323))/7)+-parseInt(e(341))/8+parseInt(e(374))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(gt);class dt extends t.Plugin{static get[ft(349)](){return ft(406)}static get[ft(396)](){return[v,f]}static get[ft(369)](){return!0}static get[ft(339)](){return!0}[ft(336)](){const t=ft,{editor:e}=this;e[t(382)][t(399)](t(368),t(352)),e[t(382)][t(399)](t(325),1),e[t(334)][t(412)](t(377),new rt(e)),e[t(334)][t(412)](t(356),new ct(e)),this[t(401)](),this[t(408)](),this[t(346)](),this[t(394)]()}[ft(401)](){const t=ft,{editor:e}=this,{schema:n}=e[t(404)];n[t(393)](t(365),{allowAttributes:[t(370),t(409)]})}[ft(408)](){const t=ft,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(379)](t(342))[t(412)](e=>{const n=t;e.on(n(338),(t,e,o)=>{const s=n,r=e[s(348)],a=e[s(330)]?.[s(410)];r[s(388)](s(343))&&a?.is(s(357),s(365))&&(function(t,e,n,o){const i=s;if(!o[i(416)](e,i(409)))return;let r=1;const a=n[i(390)][i(371)](t,{attributes:i(355)});if(a){const e=Number[i(331)](t[i(402)](i(355)),10);Number[i(335)](e)||(r=e)}!a&&e[i(337)](i(409))||n[i(378)][i(326)](i(409),r,e)}(r,a,o,i),function(t,e,n,o){const i=s;if(!o[i(416)](e,i(370)))return;let r=i(352),a=!1;if(n[i(390)][i(371)](t,{attributes:i(367)})){const e={1:i(352),a:i(373),A:i(362),i:i(363),I:i(413)}[t[i(402)](i(367))];e&&(r=e),a=!0}n[i(390)][i(371)](t,{styles:i(376)})&&(r=t[i(324)](i(376)),a=!0),!a&&e[i(337)](i(370))||n[i(378)][i(326)](i(370),r,e)}(r,a,o,i))})}),n[t(379)](t(417))[t(412)](e=>{const n=t;e.on(n(381),(t,e,o)=>{const i=n;if(!o[i(390)][i(371)](e[i(387)],t[i(347)]))return;const s=pt(e[i(387)],o[i(329)]),{attributeNewValue:r}=e;null==r||1===r?o[i(378)][i(384)](i(355),s):o[i(378)][i(326)](i(355),String(r),s)}),e.on(n(360),(t,e,o)=>{const i=n;if(!o[i(390)][i(371)](e[i(387)],t[i(347)]))return;const s=pt(e[i(387)],o[i(329)]),{attributeNewValue:r}=e;r&&i(352)!==r?o[i(378)][i(383)](i(376),r,s):o[i(378)][i(418)](i(376),s)})})}[ft(394)](){const t=ft,{editor:e}=this,{model:n}=e,o=e[t(332)][t(411)](f),i=this[t(344)](),s=this[t(354)]();n[t(358)][t(407)](e=>{const r=t,a=n[r(358)][r(421)][r(405)]();let c=!1;for(const t of a){if(r(351)!==t[r(367)]||r(380)===t[r(347)])continue;const o=n[r(322)](t[r(420)][r(372)]);for(const t of o[r(392)]())t.is(r(357),r(365))&&(!t[r(337)](r(409))&&n[r(419)][r(416)](t,r(409))&&(e[r(326)](r(409),s,t),c=!0),!t[r(337)](r(370))&&n[r(419)][r(416)](t,r(370))&&(e[r(326)](r(370),i,t),c=!0))}return c&&o[r(375)](e),c})}[ft(346)](){const t=ft,{editor:e}=this;e[t(332)][t(411)](f)[t(350)](e=>this[t(364)](e))}[ft(344)](){const t=ft;return this[t(403)][t(382)][t(411)](t(368))}[ft(354)](){const t=ft;return this[t(403)][t(382)][t(411)](t(325))}[ft(364)]({container:t,value:e,digits:n}){const o=ft,i=t[o(402)](o(370)),s=t[o(402)](o(409)),r=Math[o(353)](e)+(s??1)-1;switch(i){case o(391):return function(t,e){const n=o;return String(t)[n(385)](e,"0")}(r,Math[o(395)](2,n));case o(373):case o(333):return mt(r,!1);case o(362):case o(366):return mt(r,!0);case o(363):return yt(r,!1);case o(413):return yt(r,!0);default:return String(r)}}}function ht(t,e){const n=gt();return(ht=function(t,e){return n[t-=322]})(t,e)}function pt(t,e){const n=ft,o=e[n(414)](t);return Array[n(328)](o[n(389)]())[n(415)](t=>t.is(n(357),"ol")&&t[n(388)](n(343)))}function mt(t,e){const n=ft;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(398)](97+t)+o,i=Math[n(353)]((i-1)/26)}return e?o[n(345)]():o}function gt(){const t=["getChanges","FootnotesPropertiesEditing","registerPostFixer","_defineConverters","footnotesListStart","parent","get","add","upper-roman","toViewElement","find","checkAttribute","downcast","removeStyle","schema","position","differ","createRangeOn","1329013HWCVzW","getStyle","footnotes.footnotesProperties.defaultStartIndex","setAttribute","96098QgDlnc","from","mapper","modelCursor","parseInt","plugins","lower-latin","commands","isNaN","init","hasAttribute","element:ol","isPremiumPlugin","4MAbAmv","2857904XxlBUj","upcast","footnotes-list","_getDefaultListStyle","toUpperCase","_defineFormatter","name","viewItem","pluginName","setFootnoteFormatter","insert","decimal","floor","_getDefaultStartIndex","start","footnotesStart","element","document","1291644tTySnR","attribute:footnotesListStyle:footnotesDefinitions","toLowerCase","upper-alpha","lower-roman","_formatFootnoteListValue","footnotesDefinitions","upper-latin","type","footnotes.footnotesProperties.defaultListStyle","isOfficialPlugin","footnotesListStyle","consume","nodeAfter","lower-alpha","5599278szcBma","_updateFootnotesCounters","list-style-type","footnotesStyle","writer","for","$text","attribute:footnotesListStart:footnotesDefinitions","config","setStyle","removeAttribute","padStart","1045815mIQLUC","item","hasClass","getChildren","consumable","decimal-leading-zero","getItems","extend","_definePostfixer","max","requires","397525EgDFeR","fromCharCode","define","6gCnuau","_defineSchema","getAttribute","editor","model"];return(gt=function(){return t})()}const wt=[{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 yt(t,e){const n=ft;let o="",i=t;for(const{value:t,numeral:e}of wt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(361)]()}class bt 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,max:Math.pow(2,30),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(o<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var vt=n(945),It={attributes:{"data-cke":!0}};It.setAttributes=U(),It.insert=K().bind(null,"head"),It.domAPI=R(),It.insertStyleElement=H();N()(vt.A,It);vt.A&&vt.A.locals&&vt.A.locals;class kt 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:V.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:V.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:V.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:V.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:V.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:V.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:V.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 bt(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]})}}var Ct=Et;function Ft(){var t=["19275fvVdCZ","424032uwODep","isPremiumPlugin","requires","pluginName","42435dRWOCZ","729808HPQYye","isOfficialPlugin","3SGFROc","1839334GPHsfW","FootnotesProperties","174ydrewy","476361hkVpzm","131182gAFSGV"];return(Ft=function(){return t})()}function Et(t,e){var n=Ft();return(Et=function(t,e){return n[t-=234]})(t,e)}!function(t){for(var e=Et,n=t();;)try{if(132478===-parseInt(e(235))/1*(parseInt(e(240))/2)+parseInt(e(239))/3+parseInt(e(242))/4+-parseInt(e(241))/5*(parseInt(e(238))/6)+parseInt(e(236))/7+-parseInt(e(247))/8+parseInt(e(246))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ft);class St extends t.Plugin{static get[Ct(245)](){return Ct(237)}static get[Ct(244)](){return[dt,kt]}static get[Ct(234)](){return!0}static get[Ct(243)](){return!0}}function xt(t,e){var n=Pt();return(xt=function(t,e){return n[t-=337]})(t,e)}function Pt(){var t=["4939HFvPWu","16160274RvSywY","1880UXcSeD","12275AKPCdo","232fAAmGZ","85295PCpvlT","100260KcdUhl","1223970MXyojM","2115938tWVUQh","3QHAYqL","1122116tJnJnM"];return(Pt=function(){return t})()}!function(t){for(var e=xt,n=t();;)try{if(930731===-parseInt(e(343))/1+parseInt(e(341))/2*(parseInt(e(342))/3)+parseInt(e(346))/4*(-parseInt(e(347))/5)+-parseInt(e(340))/6+parseInt(e(338))/7*(-parseInt(e(337))/8)+-parseInt(e(345))/9+-parseInt(e(339))/10*(-parseInt(e(344))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Pt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
|
|
4
|
+
*/(()=>{var t={14:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),r=o.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck-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 .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},450:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=o(f),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:p,references:1})}r.push(f)}return r}function i(t,e){var o=e.domAPI(e);o.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var s=n(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=o(s[r]);e[a].references--}for(var c=n(t,i),l=0;l<s.length;l++){var u=o(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},774:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=o(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},945:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(453),i=o.n(n),s=o(374),r=o.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>Z,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>Et,FootnotesPropertiesEditing:()=>pt,FootnotesPropertiesUI:()=>kt,FootnotesStartCommand:()=>ut,FootnotesStyleCommand:()=>rt,FootnotesTracker:()=>f,FootnotesUI:()=>X,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);const r=a;function a(t,e){const o=c();return(a=function(t,e){return o[t-=377]})(t,e)}function c(){const t=["clear","getItems","type","2247534OhfkOz","19699960QWJXaS","_model","getChanges","$text","attributes","remove","1755264GosFpu","flat","elementName","set","slice","length","$graveyard","name","add","nodeAfter","getElementKey","values","has","142198jEVkpp","_getElementKey","element","rootName","_elementName","position","insert","get","2636112PgscAc","reset","from","delete","10YViCyS","push","createRangeOn","root","4872408rXLAei","_trackedElements","1250130rQDpkm"];return(c=function(){return t})()}!function(t){const e=a,o=t();for(;;)try{if(814931===parseInt(e(397))/1+parseInt(e(384))/2+-parseInt(e(377))/3+-parseInt(e(413))/4+-parseInt(e(409))/5*(parseInt(e(405))/6)+parseInt(e(415))/7+parseInt(e(378))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(c);class l{[r(379)];[r(401)];[r(398)];[r(414)]=new Map;constructor(t,e){const o=r;this[o(379)]=t,this[o(401)]=e[o(386)],this[o(398)]=e[o(394)]}[r(406)](){const t=r;this[t(414)][t(416)]()}[r(380)](t){const e=r,o=new Set,n=new Map;for(const i of t){if(e(403)===i[e(418)]&&e(381)!==i[e(391)]&&i[e(402)][e(393)]){const t=this[e(379)][e(411)](i[e(402)][e(393)]);for(const o of t[e(417)]()){if(!o.is(e(399),this[e(401)]))continue;const t=this[e(398)](o);n[e(396)](t)||n[e(387)](t,[]),n[e(404)](t)[e(410)](o)}}if(e(383)===i[e(418)]&&i[e(391)]===this[e(401)]){const t=this[e(398)]({getAttribute:t=>i[e(382)][e(404)](t)});o[e(392)](t)}}for(const[t,n]of this[e(414)])e(390)===n[e(412)][e(400)]&&o[e(392)](t);for(const t of o)this[e(414)][e(408)](t);for(const[t,o]of n)this[e(414)][e(387)](t,o[o[e(389)]-1]);const i=new Set;for(const[t,s]of n)o[e(396)](t)&&(i[e(392)](s[0]),s[e(389)]>1?n[e(387)](t,s[e(388)](1)):n[e(408)](t),o[e(408)](t));return{removed:Array[e(407)](o),inserted:Array[e(407)](n[e(395)]())[e(385)](),moved:Array[e(407)](i)}}}const u=d;!function(t){const e=d,o=t();for(;;)try{if(447668===parseInt(e(579))/1*(parseInt(e(583))/2)+-parseInt(e(596))/3*(parseInt(e(553))/4)+parseInt(e(527))/5+parseInt(e(572))/6*(-parseInt(e(547))/7)+parseInt(e(544))/8+parseInt(e(542))/9+-parseInt(e(570))/10*(-parseInt(e(554))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(p);class f extends t.Plugin{[u(522)]=[];[u(591)]=null;[u(513)]=null;[u(563)];[u(555)];[u(588)];static get[u(536)](){return u(550)}static get[u(515)](){return!0}static get[u(529)](){return!0}constructor(t){const e=u;super(t),this[e(563)]=new l(this[e(575)][e(568)],{elementName:e(512),getElementKey:()=>e(518)}),this[e(555)]=new l(this[e(575)][e(568)],{elementName:e(576),getElementKey:t=>t[e(502)](e(566))}),this[e(588)]=new l(this[e(575)][e(568)],{elementName:e(556),getElementKey:t=>t[e(502)](e(566))})}[u(534)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(521)][t(580)](e=>{const n=t,i=o[n(521)][n(587)][n(594)]();let s=!1;return this[n(582)](e,i)&&(s=!0),this[n(569)](e,i)&&(s=!0),this[n(592)](e,i)&&(s=!0),this[n(528)](e)&&(s=!0),this[n(498)](e)&&(s=!0),this[n(548)](e)&&(s=!0),s}),this[t(506)](o[t(521)],t(558),()=>{const e=t;o[e(593)]({isUndoable:!1},t=>{this[e(564)](t)})},{priority:t(586)}),this[t(506)](n,t(581),()=>{const e=t;this[e(522)]=[],this[e(563)][e(540)](),this[e(555)][e(540)](),this[e(588)][e(540)]()},{priority:t(531)})}[u(545)](){return this[u(591)]}[u(505)](t){const e=u;return this[e(522)][e(514)](e=>e.id===t)||null}[u(517)](){const t=u;return Array[t(543)](this[t(522)])}[u(538)](){return this[u(513)]}[u(567)](t){this[u(513)]=t}[u(508)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(522)][o(535)];i++)this[o(510)](t,i)&&(n=!0);return n}[u(525)](t,e){const o=u,n=t[o(541)](o(512),{});return t[o(532)](n,e),this[o(591)]=n,n}[u(564)](t){const e=u;if(!this[e(522)][e(535)]||this[e(591)])return;const o=this[e(522)][0][e(551)][e(511)],n=this[e(525)](t,o);for(const o of this[e(522)])o[e(526)][e(496)]||t[e(509)](o[e(526)],n,e(595));this[e(508)](t)}[u(582)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(563)][o(594)](e);if(r[o(535)]&&(this[o(591)]=r[0]),i[o(535)])if(i[o(535)]>1||this[o(591)]&&i[o(597)](t=>t!==this[o(591)])){const e=t[o(541)](o(512),{}),s=[];this[o(591)]&&s[o(578)](this[o(591)]),s[o(578)](...i),t[o(509)](e,s[0],o(565));for(const n of s)t[o(562)](t[o(504)](n),t[o(574)](e,o(595))),t[o(539)](n);this[o(591)]=e,this[o(508)](t),n=!0}else this[o(591)]=i[0];if(s[o(535)]&&o(501)===this[o(591)]?.[o(511)][o(573)]){for(const e of this[o(522)])t[o(539)](e[o(551)]),n=!0;this[o(522)]=[],this[o(591)]=null}return n}[u(569)](t,e){const o=u;let n=!1;const i=this[o(575)][o(516)][o(560)](o(590)),{inserted:s,moved:r}=this[o(588)][o(594)](e);for(const e of[...r,...s]){const s=e[o(502)](o(566)),r=this[o(505)](s);r&&(r[o(526)]=e),h(t,i,e)&&(n=!0)}return n}[u(592)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(555)][o(594)](e);for(const e of i)this[o(530)](t,e)&&(n=!0);for(const e of s)this[o(561)](t,e)&&(n=!0);for(const e of r)this[o(507)](t,e)&&(n=!0);return n}[u(498)](t){const e=u;if(!this[e(591)])return!1;let o=!1;if(this[e(591)][e(519)]!==this[e(522)][e(535)]){const n=[];for(const t of this[e(591)][e(549)]()){const i=t[e(502)](e(566));this[e(505)](i)||(n[e(497)](t),o=!0)}for(const o of n)t[e(539)](o)}const n=new Set,i=[];for(const t of this[e(591)][e(549)]()){const s=t[e(502)](e(566));n[e(552)](s)?(i[e(497)](t),o=!0):n[e(557)](s)}for(const o of i)t[e(539)](o);return this[e(591)][e(519)]||(t[e(539)](this[e(591)]),this[e(591)]=null,o=!0),o}[u(561)](t,e){const o=u;if(this[o(522)][o(514)](t=>t[o(551)]===e))return!1;let n=!1;const i=e[o(502)](o(566)),s=this[o(522)][o(585)](t=>t.id===i);-1!==s&&(t[o(539)](this[o(522)][s][o(551)]),this[o(522)][o(546)](s,1),n=!0);let r=this[o(591)]?function(t,e){const n=o;for(const o of t[n(549)]())if(o[n(502)](n(566))===e)return o;return null}(this[o(591)],i):null;r||(r=t[o(541)](o(556),{footnoteId:i}),this[o(591)]&&(t[o(509)](r,this[o(591)],o(595)),n=!0));const a={id:i,reference:e,definition:r},c=m(this[o(575)][o(568)],this[o(522)],e);this[o(522)][o(546)](c,0,a);let l=c;return-1!==s&&(l=Math[o(499)](c,s)),this[o(508)](t,l)&&(n=!0),n}[u(530)](t,e){const o=u,n=this[o(522)][o(585)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(522)][n];return o(501)!==s[o(526)][o(511)][o(573)]&&(t[o(539)](s[o(526)]),i=!0),this[o(522)][o(546)](n,1),this[o(508)](t,n)&&(i=!0),i}[u(507)](t,e){const o=u,n=e[o(502)](o(566)),i=this[o(522)][o(585)](t=>t.id===n),s=this[o(522)][i];let r=!1;s[o(551)]=e,this[o(522)][o(546)](i,1);const a=m(this[o(575)][o(568)],this[o(522)],e);return this[o(522)][o(546)](a,0,s),this[o(508)](t,Math[o(499)](i,a))&&(r=!0),r}[u(510)](t,e){const o=u;if(!this[o(591)])return!1;const n=this[o(522)][e];let i;return i=this[o(513)]?this[o(513)]({footnote:n,container:this[o(591)],digits:String(this[o(522)][o(535)])[o(535)],value:e+1}):String(e+1),n[o(551)][o(502)](o(537))!=i&&(t[o(584)](o(537),i,n[o(551)]),!0)}[u(548)](t){const e=u;if(!this[e(591)]||this[e(522)][e(535)]<2)return!1;if(function(t,o){const n=e;if(t[n(535)]!==o[n(535)])return!1;for(let e=0;e<t[n(535)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(522)][e(559)](t=>t.id),Array[e(543)](this[e(591)][e(549)]())[e(559)](t=>t[e(502)](e(566)))))return!1;let o=!1;for(let n=0;n<this[e(522)][e(535)];n++){const i=this[e(522)][n],s=t[e(589)](i[e(526)]),r=t[e(574)](this[e(591)],n);s[e(503)](r)||(t[e(562)](t[e(523)](i[e(526)]),r),o=!0)}return o}[u(528)](t){const e=u;if(!this[e(522)][e(535)])return!1;const{model:o}=this[e(575)];let n=!1;for(let i=0;i<this[e(522)][e(535)]-1;i++){const s=this[e(522)][i],r=this[e(522)][i+1],a=o[e(589)](s[e(551)]),c=o[e(589)](r[e(551)]);e(577)===a[e(533)](c)&&(this[e(507)](t,s[e(551)]),i=-1,n=!0)}return n}}function d(t,e){const o=p();return(d=function(t,e){return o[t-=496]})(t,e)}function h(t,e,o){const n=u;if(o[n(519)])return!1;const i=n(e?571:520);return t[n(509)](t[n(541)](i),o),!0}function p(){const t=["_footnoteRefsTracker","footnoteDefinition","add","change:data","map","get","_handleInsertedFootnoteReference","move","_footnoteDefsContainerTracker","_ensureFootnotesDefinitionsContainerExists","before","footnoteId","setFootnoteFormatter","model","_handleFootnoteDefinitionsChanges","120vNUqrf","paragraph","1657938OXQngP","rootName","createPositionAt","editor","footnoteRef","after","push","191vrJAUB","registerPostFixer","set","_handleFootnotesDefinitionsObjectChanges","1362yAlwWr","setAttribute","findIndex","low","differ","_footnoteDefsTracker","createPositionBefore","footnotes.multiBlock","_footnotesDefinitions","_handleFootnoteReferencesChanges","enqueueChange","getChanges","end","3fHcAst","some","parent","unshift","_handleFootnotesDefinitionsObjectSync","min","indexOf","$graveyard","getAttribute","isEqual","createRangeIn","getFootnote","listenTo","_handleMovedFootnoteReference","_updateFootnotesCounters","insert","_updateFootnoteRefCounter","root","footnotesDefinitions","_footnoteFormatter","find","isOfficialPlugin","config","getFootnotes","singleton","childCount","footnoteInlineContent","document","_footnotes","createRangeOn","getRootNames","_insertEmptyFootnotesDefinitionsContainer","definition","2365710LOlBey","_ensureFootnotesReferencesHaveProperOrder","isPremiumPlugin","_handleRemoveFootnoteReferenceById","high","append","compareWith","init","length","pluginName","footnoteCounter","getFootnotesFormatter","remove","reset","createElement","3064473LlgkXB","from","377904OlvGYb","getFootnotesDefinitionsObjectElement","splice","7XlrHrw","_sortFootnoteDefinitions","getChildren","FootnotesTracker","reference","has","3087236oDIDAT","462781dUYecC"];return(p=function(){return t})()}function m(t,e,o){const n=u;if(0===e[n(535)])return 0;const i=t[n(589)](o);for(let o=0;o<e[n(535)];o++){const s=e[o],r=t[n(589)](s[n(551)]);if(n(565)===i[n(533)](r))return o}const s=o[n(511)];let r=-1;for(let t=e[n(535)]-1;t>=0;t--)if(e[t][n(551)][n(511)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(521)][n(524)](),c=a[n(500)](s[n(573)]),l=a[c+1];if(l)for(let t=0;t<e[n(535)];t++)if(e[t][n(551)][n(511)][n(573)]===l)return t;return e[n(535)]}const g=w;function w(t,e){const o=y();return(w=function(t,e){return o[t-=263]})(t,e)}function y(){const t=["selection","createElement","3002840lAEGqx","length","410232tCStwl","get","editor","5446974XFihwb","_getPositionToInsertFootnote","insert-footnote-command-executed-with-invalid-id","_moveSelectionToFootnoteDefinition","235144ltGWIB","string","model","footnoteRef","test","15lsLcqX","execute","document","refresh","plugins","change","checkChild","insertObject","getFirstRange","getItems","400564VtMvVw","455icmGeJ","6968826KBzSXR","FootnotesEditing","12185802YFsofD","footnoteId","isEnabled","end","isObject","isBlock"];return(y=function(){return t})()}!function(t){const e=w,o=t();for(;;)try{if(999107===-parseInt(e(289))/1+-parseInt(e(287))/2+-parseInt(e(292))/3+parseInt(e(275))/4*(parseInt(e(265))/5)+parseInt(e(277))/6+-parseInt(e(276))/7*(-parseInt(e(296))/8)+parseInt(e(279))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(y);class b extends t.Command{[g(268)](){const t=g,e=this[t(291)][t(298)][t(267)][t(285)],o=this[t(293)](e);this[t(281)]=!!o}[g(266)](t){const e=g,{editor:o}=this,{model:n}=o,{selection:s}=n[e(267)],r=this[e(293)](s);if(!r)return;const a=o[e(269)][e(290)](e(278)),c=t?.[e(280)]??(0,i.uid)();!function(t){const o=e;return o(297)==typeof t&&t[o(288)]>0&&!/\s/[o(264)](t)&&!/^\d/[o(264)](t)}(c)?(0,i.logWarning)(e(294)):(n[e(270)](t=>{const o=e,i=t[o(286)](o(263),{footnoteId:c});n[o(272)](i,r,null)}),a[e(295)](c))}[g(293)](t){const e=g,{model:o}=this[e(291)],{schema:n}=o,i=t[e(273)]();for(const t of i[e(274)]())if(n[e(284)](t)||n[e(283)](t))return null;const s=i[e(282)];return n[e(271)](s,e(263))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[f]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),o=window[m([68,97,116,101])][m([110,111,119])](),n=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{n[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=n[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;n[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),o[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function o(t){for(let o=0;o<t[m([108,101,110,103,116,104])];o++){const n=t[m([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function h(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function p(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let o=m([117]);for(let n=0;n<t[m([108,101,110,103,116,104])];n+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,n[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=p,n[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&o()?e:null;function o(){const t=e[m([106,116,105])],o=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),n={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete n[m([118,99])],f(n)==o}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),n[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function p(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(n){a(n)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),n=h(d(window[m([77,97,116,104])][m([99,101,105,108])](o/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,n)}function r(){const e=m([108,108,99,116,45])+d(f(t)),o=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return o?window[m([112,97,114,115,101,73,110,116])](h(o),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,o)=>{t[m([116,104,101,110])](e,o),window[m([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,o)=>{if(o[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),n[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{p(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){n[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const n=a[m([115,112,108,105,116])](m([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=l(e);o&&o[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(n),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+o),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1762300800;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](o))return!0;const n=o[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=n[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(n[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>n[m([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&p?new(window[m([80,114,111,109,105,115,101])])((t,o)=>{e[m([116,104,101,110])](t,o),p[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},o)}):e||p||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(f).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),o.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(f).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(i.reference,"on")}),o.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:o,editing:n}=t,{t:i}=t.locale;o.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:o})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;o.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of n.view.createRangeIn(i))t.is("$textProxy")?o.consume(t.textNode,{name:!0}):t.is("element")&&o.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),o.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),o.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:o})=>{const n=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,o),o,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",n)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:o}=t.locale,{conversion:n}=t;n.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),n.for("upcast").add(t=>{t.on("element:ol",(t,e,o)=>{const n=e.viewItem;if(!n.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!o.consumable.consume(n,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=o.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,o)=>{const n=e.viewItem;n.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&o.consumable.consume(n,{name:!0,classes:"footnotes-divider"})})}),n.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>x(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=x(n,{"data-footnotes-list-label":o("Footnotes")}),s=(0,e.toWidget)(i,n,{hasSelectionHandle:!0,label:o("Footnotes")});return n.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:o}=t,n=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,o)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!o.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=o.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!o.safeInsert(r,e.modelCursor))return;o.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(o.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),o.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(n)o.convertChildren(a,r);else{const t=o.writer.createElement("footnoteInlineContent");o.writer.insert(t,r),o.convertChildren(a,t)}o.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(t,e,o)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const o=t.document.differ,n=new Set;for(const t of o.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&n.add(e)}for(const t of n.values()){const o=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of o)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const o=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:o,t:n}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Shift+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Shift+D"}]}),this.listenTo(o.view.document,"enter",(t,e)=>{const o=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(o){const n=o.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(n),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let o=!1;this.listenTo(e.view.document,"pointerdown",(t,n)=>{const{target:i}=n,s=e.view.document.selection;o=!!(i.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n.is("element","a"))return;if(n.parent?.is("element","sup")&&n.parent.hasClass("footnote")&&!o)return void e.preventDefault();let i=n.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:o})=>{if(!k(e))return null;if(!t)return o.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const o=e.toViewElement(t);return!!o&&k(t)!==o.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function x(t,e={}){const o=t.createEmptyElement("hr",{class:"footnotes-divider"}),n=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[o,n])}function E(t,e){const o=t.getAttribute("footnoteId"),n=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+o},function(t){const e=this.toDomElement(t);return e.textContent=n,e}),s=e.createContainerElement("sup",{id:"ref-"+o,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function S(t,o,n,{dataPipeline:i}={}){const{t:s}=n,r=t.getAttribute("footnoteId"),a=o.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?o.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(o.createEditableElement("div",{class:"footnote-content"}),o,{label:s("Footnote content.")});return o.insert(o.createPositionAt(c,0),o.createSlot()),o.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var A=o(331);const P=_;function _(t,e){const o=L();return(_=function(t,e){return o[t-=431]})(t,e)}!function(t){const e=_,o=t();for(;;)try{if(122681===-parseInt(e(483))/1+-parseInt(e(448))/2+-parseInt(e(449))/3*(-parseInt(e(446))/4)+parseInt(e(453))/5+-parseInt(e(500))/6+-parseInt(e(464))/7+parseInt(e(468))/8*(parseInt(e(444))/9))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(L);class D extends t.Plugin{static get[P(490)](){return P(477)}static get[P(454)](){return[v,A.ClipboardPipeline]}static get[P(476)](){return!0}static get[P(471)](){return!0}[P(494)](){this[P(499)]()}[P(499)](){const t=P;this[t(461)](),this[t(497)]()}[P(461)](){const t=P,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(452)](A.ClipboardPipeline),s=o[t(452)](f);this[t(484)](i,t(472),(o,i)=>{const r=t,a=function(t,e){const o=_,n=new Set;for(const{item:i}of t[o(487)](e))i.is(o(447),o(481))&&n[o(469)](i[o(443)](o(486)));return Array[o(473)](n)}(n,i[r(480)]);if(!a[r(493)])return;const c=s[r(482)](),l=a[r(431)]((t,o)=>{const n=r,i=c[n(459)](t=>t.id===o);if(i){const o=e[n(492)][n(491)](i[n(479)],{isClipboardPipeline:!0}),s=e[n(492)][n(435)][n(439)](o);t[i.id]=s}return t},Object[r(467)](null));i[r(455)][r(485)](r(478),JSON[r(498)](l))})}[P(497)](){const t=P,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(457)],r=n[t(452)](A.ClipboardPipeline),a=n[t(452)](f);let c=null;this[t(484)](s[t(496)],t(451),(e,o)=>{const n=t,i=o[n(455)][n(450)](n(478));c=i?JSON[n(463)](i):null}),this[t(484)](r,t(441),(n,s)=>{const r=t;if(!c)return;const l=s[r(456)]===this[r(465)].id;l&&r(440)===s[r(432)]||o[r(438)](t=>{const n=r;!function(t,e){const o=_,n=[];for(const{item:i}of t[o(487)](e))i.is(o(447),o(434))&&n[o(433)](i);for(const e of n)t[o(442)](e)}(t,s[n(480)]);let u=a[n(460)]();if(!u){const e=o[n(496)][n(489)][n(437)]()[n(462)];u=a[n(436)](t,e)}const f=function(t,e,o){const s=n,r=Object[s(467)](null);for(const{item:n}of t[s(487)](e))if(n.is(s(447),s(481))){const e=n[s(443)](s(486));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(445)](s(486),r[e],n)}return r}(t,s[n(480)],t=>!l||null!==a[n(501)](t));for(const[o,i]of Object[n(458)](c)){const s=f[o]||o,r=t[n(474)](n(488),{footnoteId:s}),a=e[n(492)][n(435)][n(491)](i),c=e[n(492)][n(466)](a,r);t[n(470)](c,r),t[n(475)](r,u,n(495))}c=null})})}}function L(){const t=["find","getFootnotesDefinitionsObjectElement","_handleCopyFootnotesDefinitions","root","parse","634690BVKlVO","editor","toModel","create","88696OTyagl","add","append","isPremiumPlugin","outputTransformation","from","createElement","insert","isOfficialPlugin","FootnotesClipboard","application/ckeditor5-footnotes","definition","content","footnoteRef","getFootnotes","51176fiKtLg","listenTo","setData","footnoteId","createRangeIn","footnoteDefinition","selection","pluginName","toView","data","length","init","end","document","_handlePasteFootnotesDefinitions","stringify","_defineClipboardIntegration","950004UprWhp","getFootnote","reduce","method","push","footnotesDefinitions","htmlProcessor","_insertEmptyFootnotesDefinitionsContainer","getFirstRange","change","toData","drop","contentInsertion","remove","getAttribute","441mrfZrE","setAttribute","20dlcjzg","element","297556nWStMt","15321KouRtr","getData","clipboardInput","get","14205dJimQO","requires","dataTransfer","sourceEditorId","editing","entries"];return(L=function(){return t})()}var T=o(311),V=o(355),O=o(450),N=o.n(O),R=o(774),K=o.n(R),j=o(265),M=o.n(j),B=o(410),W=o.n(B),H=o(238),U=o.n(H),z=o(14),q={attributes:{"data-cke":!0}};q.setAttributes=W(),q.insert=M().bind(null,"head"),q.domAPI=K(),q.insertStyleElement=U();N()(z.A,q);z.A&&z.A.locals&&z.A.locals;class X 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 o=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in o){const n=e,i=o[n];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&o._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function J(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof T.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:V.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}var Y=Q;function G(){var t=["pluginName","667236ITMcen","isOfficialPlugin","30bwNtPK","5279589xJWvCk","18424616hsRNxZ","658305UKnlSM","Footnotes","2746314byqJZr","isPremiumPlugin","705341ZpHbLN","209082bAEHtZ","requires"];return(G=function(){return t})()}function Q(t,e){var o=G();return(Q=function(t,e){return o[t-=134]})(t,e)}!function(t){for(var e=Q,o=t();;)try{if(554288===-parseInt(e(136))/1+-parseInt(e(142))/2*(parseInt(e(137))/3)+parseInt(e(140))/4+parseInt(e(145))/5+parseInt(e(134))/6+-parseInt(e(143))/7+parseInt(e(144))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(G);class Z extends t.Plugin{static get[Y(139)](){return Y(146)}static get[Y(138)](){return[v,D,X]}static get[Y(141)](){return!0}static get[Y(135)](){return!0}}const $=et;function tt(){const t=["921734IOIxhk","lower-roman","upper-latin","2634995iEFHcR","13636ACOutX","7256970wnKjWe","1782764VYojEc","498EiAuEB","decimal-leading-zero","12762gwVsHX","254063sahZaR","upper-alpha","3aCROsP","lower-latin","368podcyf","lower-alpha","upper-roman","decimal"];return(tt=function(){return t})()}function et(t,e){const o=tt();return(et=function(t,e){return o[t-=288]})(t,e)}!function(t){const e=et,o=t();for(;;)try{if(318987===-parseInt(e(293))/1+-parseInt(e(301))/2+parseInt(e(295))/3*(-parseInt(e(289))/4)+parseInt(e(304))/5+-parseInt(e(290))/6*(-parseInt(e(305))/7)+-parseInt(e(297))/8*(-parseInt(e(292))/9)+parseInt(e(288))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(tt);const ot=[$(300),$(291),$(296),$(303),$(298),$(294),$(302),$(299)];function nt(t,e){const o=st();return(nt=function(t,e){return o[t-=472]})(t,e)}const it=nt;function st(){const t=["refresh","947924YefJOg","isEnabled","plugins","getAttribute","20656264tPbBRy","1000OXufVN","model","change","value","1470447gVeJSH","includes","2744aqFrea","footnotesListStyle","_updateFootnotesCounters","execute","getFootnotesDefinitionsObjectElement","setAttribute","7692900ywAGCp","8602286pCwJIV","2428235JdjIpx","get"];return(st=function(){return t})()}!function(t){const e=nt,o=t();for(;;)try{if(924302===-parseInt(e(492))/1*(parseInt(e(486))/2)+parseInt(e(490))/3+-parseInt(e(481))/4+-parseInt(e(478))/5+-parseInt(e(476))/6+parseInt(e(477))/7+parseInt(e(485))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(st);class rt extends t.Command{[it(480)](){const t=it,{editor:e}=this,o=e[t(483)][t(479)](f)[t(474)]();this[t(482)]=!!o,this[t(489)]=o?.[t(484)](t(493))??null}[it(473)]({value:t}){const e=it,{editor:o}=this,n=o[e(483)][e(479)](f),i=n[e(474)]();i&&ot[e(491)](t)&&o[e(487)][e(488)](o=>{const s=e;o[s(475)](s(493),t,i),n[s(472)](o)})}}const at=ct;function ct(t,e){const o=lt();return(ct=function(t,e){return o[t-=137]})(t,e)}function lt(){const t=["764883wNNfYn","56oOFDqA","isInteger","218711astGDE","5lmjKAy","163356HdIeLC","change","397380HFWYIa","10407780niAcsH","setAttribute","getAttribute","execute","isEnabled","value","606051zAKwjm","model","_updateFootnotesCounters","footnotesListStart","324738zWGQrA","33tzpJtW","get","plugins","getFootnotesDefinitionsObjectElement","refresh"];return(lt=function(){return t})()}!function(t){const e=ct,o=t();for(;;)try{if(242079===parseInt(e(151))/1+parseInt(e(155))/2+-parseInt(e(143))/3*(-parseInt(e(153))/4)+parseInt(e(152))/5*(parseInt(e(142))/6)+-parseInt(e(148))/7+parseInt(e(149))/8*(parseInt(e(138))/9)+-parseInt(e(156))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(lt);class ut extends t.Command{[at(147)](){const t=at,{editor:e}=this,o=e[t(145)][t(144)](f)[t(146)]();this[t(160)]=!!o,this[t(137)]=o?.[t(158)](t(141))??null}[at(159)]({value:t}){const e=at,{editor:o}=this,n=o[e(145)][e(144)](f),i=n[e(146)]();i&&Number[e(150)](t)&&o[e(139)][e(154)](o=>{const s=e;o[s(157)](s(141),t,i),n[s(140)](o)})}}function ft(){const t=["writer","padStart","footnotes.footnotesProperties.defaultStartIndex","mapper","_defineConverters","8ZxYlgS","$text","upper-alpha","max","config","footnotesListStyle","292IkAHyr","setStyle","commands","_defineSchema","hasClass","55qrAatH","editor","parent","plugins","for","modelCursor","getItems","position","item","consume","_defineFormatter","setFootnoteFormatter","fromCharCode","element","consumable","getChildren","toLowerCase","toUpperCase","hasAttribute","requires","813355mPQoKx","530664opuDCU","_definePostfixer","getAttribute","get","footnotes.footnotesProperties.defaultListStyle","list-style-type","getChanges","checkAttribute","footnotesStyle","decimal","find","registerPostFixer","setAttribute","differ","parseInt","_updateFootnotesCounters","_getDefaultStartIndex","footnotesDefinitions","isPremiumPlugin","element:ol","4AOIWZF","pluginName","define","1042947sFCYgH","upper-roman","3992880uAACqn","getStyle","lower-roman","upcast","insert","name","FootnotesPropertiesEditing","lower-latin","removeStyle","removeAttribute","60Vhfcft","extend","isNaN","type","isOfficialPlugin","attribute:footnotesListStyle:footnotesDefinitions","_formatFootnoteListValue","footnotesStart","decimal-leading-zero","start","lower-alpha","132651MWiaac","footnotes-list","from","init","schema","footnotesListStart","1191hUPhpM","_getDefaultListStyle","attribute:footnotesListStart:footnotesDefinitions","document","floor","toViewElement","upper-latin","1111292CKzEUP","nodeAfter","createRangeOn","add","viewItem","model","downcast"];return(ft=function(){return t})()}const dt=ht;function ht(t,e){const o=ft();return(ht=function(t,e){return o[t-=389]})(t,e)}!function(t){const e=ht,o=t();for(;;)try{if(354252===-parseInt(e(407))/1*(parseInt(e(432))/2)+-parseInt(e(401))/3+-parseInt(e(478))/4*(-parseInt(e(457))/5)+-parseInt(e(483))/6+parseInt(e(414))/7*(parseInt(e(426))/8)+-parseInt(e(481))/9*(-parseInt(e(390))/10)+-parseInt(e(437))/11*(-parseInt(e(458))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ft);class pt extends t.Plugin{static get[dt(479)](){return dt(489)}static get[dt(456)](){return[v,f]}static get[dt(394)](){return!0}static get[dt(476)](){return!0}[dt(404)](){const t=dt,{editor:e}=this;e[t(430)][t(480)](t(462),t(467)),e[t(430)][t(480)](t(423),1),e[t(434)][t(417)](t(466),new rt(e)),e[t(434)][t(417)](t(397),new ut(e)),this[t(435)](),this[t(425)](),this[t(447)](),this[t(459)]()}[dt(435)](){const t=dt,{editor:e}=this,{schema:o}=e[t(419)];o[t(391)](t(475),{allowAttributes:[t(431),t(406)]})}[dt(425)](){const t=dt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(441)](t(486))[t(417)](e=>{const o=t;e.on(o(477),(t,e,n)=>{const s=o,r=e[s(418)],a=e[s(442)]?.[s(439)];r[s(436)](s(402))&&a?.is(s(450),s(475))&&(function(t,e,o,n){const i=s;if(!n[i(465)](e,i(406)))return;let r=1;const a=o[i(451)][i(446)](t,{attributes:i(399)});if(a){const e=Number[i(472)](t[i(460)](i(399)),10);Number[i(392)](e)||(r=e)}!a&&e[i(455)](i(406))||o[i(421)][i(470)](i(406),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(465)](e,i(431)))return;let r=i(467),a=!1;if(o[i(451)][i(446)](t,{attributes:i(393)})){const e={1:i(467),a:i(400),A:i(428),i:i(485),I:i(482)}[t[i(460)](i(393))];e&&(r=e),a=!0}o[i(451)][i(446)](t,{styles:i(463)})&&(r=t[i(484)](i(463)),a=!0),!a&&e[i(455)](i(431))||o[i(421)][i(470)](i(431),r,e)}(r,a,n,i))})}),o[t(441)](t(420))[t(417)](e=>{const o=t;e.on(o(409),(t,e,n)=>{const i=o;if(!n[i(451)][i(446)](e[i(445)],t[i(488)]))return;const s=mt(e[i(445)],n[i(424)]),{attributeNewValue:r}=e;null==r||1===r?n[i(421)][i(389)](i(399),s):n[i(421)][i(470)](i(399),String(r),s)}),e.on(o(395),(t,e,n)=>{const i=o;if(!n[i(451)][i(446)](e[i(445)],t[i(488)]))return;const s=mt(e[i(445)],n[i(424)]),{attributeNewValue:r}=e;r&&i(467)!==r?n[i(421)][i(433)](i(463),r,s):n[i(421)][i(491)](i(463),s)})})}[dt(459)](){const t=dt,{editor:e}=this,{model:o}=e,n=e[t(440)][t(461)](f),i=this[t(408)](),s=this[t(474)]();o[t(410)][t(469)](e=>{const r=t,a=o[r(410)][r(471)][r(464)]();let c=!1;for(const t of a){if(r(487)!==t[r(393)]||r(427)===t[r(488)])continue;const n=o[r(416)](t[r(444)][r(415)]);for(const t of n[r(443)]())t.is(r(450),r(475))&&(!t[r(455)](r(406))&&o[r(405)][r(465)](t,r(406))&&(e[r(470)](r(406),s,t),c=!0),!t[r(455)](r(431))&&o[r(405)][r(465)](t,r(431))&&(e[r(470)](r(431),i,t),c=!0))}return c&&n[r(473)](e),c})}[dt(447)](){const t=dt,{editor:e}=this;e[t(440)][t(461)](f)[t(448)](e=>this[t(396)](e))}[dt(408)](){const t=dt;return this[t(438)][t(430)][t(461)](t(462))}[dt(474)](){const t=dt;return this[t(438)][t(430)][t(461)](t(423))}[dt(396)]({container:t,value:e,digits:o}){const n=dt,i=t[n(460)](n(431)),s=t[n(460)](n(406)),r=Math[n(411)](e)+(s??1)-1;switch(i){case n(398):return function(t,e){const o=n;return String(t)[o(422)](e,"0")}(r,Math[n(429)](2,o));case n(400):case n(490):return gt(r,!1);case n(428):case n(413):return gt(r,!0);case n(485):return yt(r,!1);case n(482):return yt(r,!0);default:return String(r)}}}function mt(t,e){const o=dt,n=e[o(412)](t);return Array[o(403)](n[o(452)]())[o(468)](t=>t.is(o(450),"ol")&&t[o(436)](o(402)))}function gt(t,e){const o=dt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(449)](97+t)+n,i=Math[o(411)]((i-1)/26)}return e?n[o(454)]():n}const wt=[{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 yt(t,e){const o=dt;let n="",i=t;for(const{value:t,numeral:e}of wt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(453)]()}class bt 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:o}){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,o),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,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 o=new T.View(this.locale);return o.children=o.createCollection(),o.children.addMany(t),o.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:o.children}),o.children.delegate("execute").to(this),o.focus=function(){for(const t of this.children)if(t instanceof T.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},o.focusTracker=new i.FocusTracker,o.keystrokes=new i.KeystrokeHandler,o.render(),o.keystrokes.listenTo(o.element),this.children.add(o),o}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),o=[e],n=new T.CollapsibleView(this.locale,o);return n.set({label:t("Footnotes properties"),isCollapsed:!0}),n.buttonView.bind("isEnabled").toMany(o,"isEnabled",(...t)=>t.some(t=>t)),n.buttonView.on("change:isEnabled",(t,e,o)=>{o||(n.isCollapsed=!0)}),this.children.add(n),[e,n]}_createStartIndexPropertyView(){const{t}=this.locale,e=new 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,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const o=e.fieldView.element,n=o.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid footnotes start index value."):o.checkValidity()?this.fire("footnotesListStart",{startIndex:n}):e.errorText=t(n<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var vt=o(945),It={attributes:{"data-cke":!0}};It.setAttributes=W(),It.insert=M().bind(null,"head"),It.domAPI=K(),It.insertStyleElement=U();N()(vt.A,It);vt.A&&vt.A.locals&&vt.A.locals;class kt 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 o;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(o=t,t=>{const{t:e}=t,n=o.commands.get("footnotesStyle"),i=(0,T.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(n,"isEnabled"),s.set({label:e("Footnotes style"),icon:V.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:o}=t.locale,n=o("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:V.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:V.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:V.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:V.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:V.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:V.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:o,icon:n,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new T.ButtonView(e);return a.set({label:o,icon:n,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new bt(t.locale,{styleGridAriaLabel:n,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=T.BalloonPanelView;n.register("footnotesDefinitions",{ariaLabel:o("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}var Ct=xt;function Ft(){var t=["881067APZSbl","159129lijiVR","156261htppQE","requires","5RIhsSE","787398JsYARX","1531482dRkjvi","22233nqmHqa","isOfficialPlugin","56DfGNlG","isPremiumPlugin","4bjadKY","87392BsQSrE","20lZarnk","FootnotesProperties","pluginName"];return(Ft=function(){return t})()}function xt(t,e){var o=Ft();return(xt=function(t,e){return o[t-=133]})(t,e)}!function(t){for(var e=xt,o=t();;)try{if(259467===parseInt(e(142))/1+parseInt(e(145))/2+-parseInt(e(147))/3*(-parseInt(e(135))/4)+-parseInt(e(144))/5*(parseInt(e(146))/6)+parseInt(e(133))/7*(-parseInt(e(136))/8)+parseInt(e(141))/9*(-parseInt(e(137))/10)+parseInt(e(140))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Ft);class Et extends t.Plugin{static get[Ct(139)](){return Ct(138)}static get[Ct(143)](){return[pt,kt]}static get[Ct(148)](){return!0}static get[Ct(134)](){return!0}}function St(t,e){var o=At();return(St=function(t,e){return o[t-=258]})(t,e)}function At(){var t=["31102850rovYjf","2012376ScaywD","2917715YUMTBI","1184433ximNTc","6616377kdbTxv","382AbvWst","581pIIsgt","4157SKQkfc","70024jQinIb","16fQtXza"];return(At=function(){return t})()}!function(t){for(var e=St,o=t();;)try{if(993855===parseInt(e(264))/1*(-parseInt(e(262))/2)+-parseInt(e(260))/3*(parseInt(e(266))/4)+parseInt(e(259))/5+-parseInt(e(258))/6+parseInt(e(263))/7*(-parseInt(e(265))/8)+parseInt(e(261))/9+parseInt(e(267))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(At)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
|