@ckeditor/ckeditor5-footnotes 47.6.0-alpha.8 → 47.6.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/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.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
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r},297:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=o(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},728:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},929:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=o(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var o=e.domAPI(e);o.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var s=n(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=o(s[r]);e[a].references--}for(var c=n(t,i),l=0;l<s.length;l++){var u=o(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>tt,FootnotesClipboard:()=>_,FootnotesEditing:()=>v,FootnotesProperties:()=>Pt,FootnotesPropertiesEditing:()=>gt,FootnotesPropertiesUI:()=>Ft,FootnotesStartCommand:()=>dt,FootnotesStyleCommand:()=>ct,FootnotesTracker:()=>d,FootnotesUI:()=>J,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);const r=a;function a(t,e){const o=l();return(a=function(t,e){return o[t-=115]})(t,e)}!function(t){const e=a,o=t();for(;;)try{if(566958===-parseInt(e(132))/1*(-parseInt(e(150))/2)+-parseInt(e(128))/3*(parseInt(e(137))/4)+parseInt(e(124))/5*(parseInt(e(145))/6)+parseInt(e(139))/7*(parseInt(e(133))/8)+-parseInt(e(141))/9+parseInt(e(148))/10+-parseInt(e(143))/11*(parseInt(e(152))/12))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(l);class c{[r(125)];[r(159)];[r(117)];[r(144)]=new Map;constructor(t,e){const o=r;this[o(125)]=t,this[o(159)]=e[o(158)],this[o(117)]=e[o(126)]}[r(120)](){const t=r;this[t(144)][t(134)]()}[r(122)](t){const e=r,o=new Set,n=new Map;for(const i of t){if(e(130)===i[e(135)]&&e(121)!==i[e(155)]&&i[e(119)][e(142)]){const t=this[e(125)][e(118)](i[e(119)][e(142)]);for(const o of t[e(153)]()){if(!o.is(e(131),this[e(159)]))continue;const t=this[e(117)](o);n[e(123)](t)||n[e(129)](t,[]),n[e(157)](t)[e(146)](o)}}if(e(147)===i[e(135)]&&i[e(155)]===this[e(159)]){const t=this[e(117)]({getAttribute:t=>i[e(156)][e(157)](t)});o[e(149)](t)}}for(const[t,n]of this[e(144)])e(115)===n[e(160)][e(127)]&&o[e(149)](t);for(const t of o)this[e(144)][e(154)](t);for(const[t,o]of n)this[e(144)][e(129)](t,o[o[e(151)]-1]);const i=new Set;for(const[t,s]of n)o[e(123)](t)&&(i[e(149)](s[0]),s[e(151)]>1?n[e(129)](t,s[e(136)](1)):n[e(154)](t),o[e(154)](t));return{removed:Array[e(138)](o),inserted:Array[e(138)](n[e(140)]())[e(116)](),moved:Array[e(138)](i)}}}function l(){const t=["_getElementKey","createRangeOn","position","reset","$text","getChanges","has","5rNJeOR","_model","getElementKey","rootName","1245675MOcYwi","set","insert","element","7KxReGr","32GYKvOX","clear","type","slice","8lQrTxO","from","1536871nrbWIO","values","7754031KzHrbl","nodeAfter","6919HzHIVZ","_trackedElements","1885032ftEBAs","push","remove","5932850fpaJZg","add","194354ESLSwx","length","3948AYrFKj","getItems","delete","name","attributes","get","elementName","_elementName","root","$graveyard","flat"];return(l=function(){return t})()}const u=f;function f(t,e){const o=m();return(f=function(t,e){return o[t-=138]})(t,e)}!function(t){const e=f,o=t();for(;;)try{if(992315===-parseInt(e(212))/1*(parseInt(e(225))/2)+-parseInt(e(210))/3+parseInt(e(196))/4+parseInt(e(157))/5*(-parseInt(e(228))/6)+-parseInt(e(229))/7*(parseInt(e(230))/8)+parseInt(e(232))/9+-parseInt(e(202))/10*(-parseInt(e(164))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(m);class d extends t.Plugin{[u(179)]=[];[u(213)]=null;[u(217)]=null;[u(151)];[u(197)];[u(152)];static get[u(235)](){return u(205)}static get[u(146)](){return!0}static get[u(227)](){return!0}constructor(t){const e=u;super(t),this[e(151)]=new c(this[e(169)][e(168)],{elementName:e(204),getElementKey:()=>e(172)}),this[e(197)]=new c(this[e(169)][e(168)],{elementName:e(214),getElementKey:t=>t[e(207)](e(203))}),this[e(152)]=new c(this[e(169)][e(168)],{elementName:e(170),getElementKey:t=>t[e(207)](e(203))})}[u(140)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(167)][t(237)](e=>{const n=t,i=o[n(167)][n(143)][n(198)]();let s=!1;return this[n(181)](e,i)&&(s=!0),this[n(180)](e,i)&&(s=!0),this[n(188)](e,i)&&(s=!0),this[n(184)](e)&&(s=!0),this[n(142)](e)&&(s=!0),this[n(215)](e)&&(s=!0),s}),this[t(171)](o[t(167)],t(239),()=>{const e=t;o[e(238)]({isUndoable:!1},t=>{this[e(154)](t)})},{priority:t(211)}),this[t(171)](n,t(178),()=>{const e=t;this[e(179)]=[],this[e(151)][e(208)](),this[e(197)][e(208)](),this[e(152)][e(208)]()},{priority:t(209)})}[u(221)](){return this[u(213)]}[u(199)](t){const e=u;return this[e(179)][e(145)](e=>e.id===t)||null}[u(224)](){const t=u;return Array[t(166)](this[t(179)])}[u(138)](){return this[u(217)]}[u(231)](t){this[u(217)]=t}[u(177)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(179)][o(200)];i++)this[o(165)](t,i)&&(n=!0);return n}[u(218)](t,e){const o=u,n=t[o(147)](o(204),{});return t[o(219)](n,e),this[o(213)]=n,n}[u(154)](t){const e=u;if(!this[e(179)][e(200)]||this[e(213)])return;const o=this[e(179)][0][e(191)][e(222)],n=this[e(218)](t,o);for(const o of this[e(179)])o[e(160)][e(139)]||t[e(192)](o[e(160)],n,e(153));this[e(177)](t)}[u(181)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(151)][o(198)](e);if(r[o(200)]&&(this[o(213)]=r[0]),i[o(200)])if(i[o(200)]>1||this[o(213)]&&i[o(187)](t=>t!==this[o(213)])){const e=t[o(147)](o(204),{}),s=[];this[o(213)]&&s[o(159)](this[o(213)]),s[o(159)](...i),t[o(192)](e,s[0],o(162));for(const n of s)t[o(175)](t[o(161)](n),t[o(190)](e,o(153))),t[o(186)](n);this[o(213)]=e,this[o(177)](t),n=!0}else this[o(213)]=i[0];if(s[o(200)]&&o(182)===this[o(213)]?.[o(222)][o(155)]){for(const e of this[o(179)])t[o(186)](e[o(191)]),n=!0;this[o(179)]=[],this[o(213)]=null}return n}[u(180)](t,e){const o=u;let n=!1;const i=this[o(169)][o(236)][o(174)](o(233)),{inserted:s,moved:r}=this[o(152)][o(198)](e);for(const e of[...r,...s]){const s=e[o(207)](o(203)),r=this[o(199)](s);r&&(r[o(160)]=e),p(t,i,e)&&(n=!0)}return n}[u(188)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(197)][o(198)](e);for(const e of i)this[o(195)](t,e)&&(n=!0);for(const e of s)this[o(183)](t,e)&&(n=!0);for(const e of r)this[o(216)](t,e)&&(n=!0);return n}[u(142)](t){const e=u;if(!this[e(213)])return!1;let o=!1;if(this[e(213)][e(156)]!==this[e(179)][e(200)]){const n=[];for(const t of this[e(213)][e(194)]()){const i=t[e(207)](e(203));this[e(199)](i)||(n[e(150)](t),o=!0)}for(const o of n)t[e(186)](o)}const n=new Set,i=[];for(const t of this[e(213)][e(194)]()){const s=t[e(207)](e(203));n[e(234)](s)?(i[e(150)](t),o=!0):n[e(223)](s)}for(const o of i)t[e(186)](o);return this[e(213)][e(156)]||(t[e(186)](this[e(213)]),this[e(213)]=null,o=!0),o}[u(183)](t,e){const o=u;if(this[o(179)][o(145)](t=>t[o(191)]===e))return!1;let n=!1;const i=e[o(207)](o(203)),s=this[o(179)][o(148)](t=>t.id===i);-1!==s&&(t[o(186)](this[o(179)][s][o(191)]),this[o(179)][o(226)](s,1),n=!0);let r=this[o(213)]?function(t,e){const n=o;for(const o of t[n(194)]())if(o[n(207)](n(203))===e)return o;return null}(this[o(213)],i):null;r||(r=t[o(147)](o(170),{footnoteId:i}),this[o(213)]&&(t[o(192)](r,this[o(213)],o(153)),n=!0));const a={id:i,reference:e,definition:r},c=h(this[o(169)][o(168)],this[o(179)],e);this[o(179)][o(226)](c,0,a);let l=c;return-1!==s&&(l=Math[o(158)](c,s)),this[o(177)](t,l)&&(n=!0),n}[u(195)](t,e){const o=u,n=this[o(179)][o(148)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(179)][n];return o(182)!==s[o(160)][o(222)][o(155)]&&(t[o(186)](s[o(160)]),i=!0),this[o(179)][o(226)](n,1),this[o(177)](t,n)&&(i=!0),i}[u(216)](t,e){const o=u,n=e[o(207)](o(203)),i=this[o(179)][o(148)](t=>t.id===n),s=this[o(179)][i];let r=!1;s[o(191)]=e,this[o(179)][o(226)](i,1);const a=h(this[o(169)][o(168)],this[o(179)],e);return this[o(179)][o(226)](a,0,s),this[o(177)](t,Math[o(158)](i,a))&&(r=!0),r}[u(165)](t,e){const o=u;if(!this[o(213)])return!1;const n=this[o(179)][e];let i;return i=this[o(217)]?this[o(217)]({footnote:n,container:this[o(213)],digits:String(this[o(179)][o(200)])[o(200)],value:e+1}):String(e+1),n[o(191)][o(207)](o(149))!=i&&(t[o(206)](o(149),i,n[o(191)]),!0)}[u(215)](t){const e=u;if(!this[e(213)]||this[e(179)][e(200)]<2)return!1;if(function(t,o){const n=e;if(t[n(200)]!==o[n(200)])return!1;for(let e=0;e<t[n(200)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(179)][e(189)](t=>t.id),Array[e(166)](this[e(213)][e(194)]())[e(189)](t=>t[e(207)](e(203)))))return!1;let o=!1;for(let n=0;n<this[e(179)][e(200)];n++){const i=this[e(179)][n],s=t[e(163)](i[e(160)]),r=t[e(190)](this[e(213)],n);s[e(185)](r)||(t[e(175)](t[e(144)](i[e(160)]),r),o=!0)}return o}[u(184)](t){const e=u;if(!this[e(179)][e(200)])return!1;const{model:o}=this[e(169)];let n=!1;for(let i=0;i<this[e(179)][e(200)]-1;i++){const s=this[e(179)][i],r=this[e(179)][i+1],a=o[e(163)](s[e(191)]),c=o[e(163)](r[e(191)]);e(220)===a[e(193)](c)&&(this[e(216)](t,s[e(191)]),i=-1,n=!0)}return n}}function p(t,e,o){const n=u;if(o[n(156)])return!1;const i=n(e?173:141);return t[n(192)](t[n(147)](i),o),!0}function h(t,e,o){const n=u;if(0===e[n(200)])return 0;const i=t[n(163)](o);for(let o=0;o<e[n(200)];o++){const s=e[o],r=t[n(163)](s[n(191)]);if(n(162)===i[n(193)](r))return o}const s=o[n(222)];let r=-1;for(let t=e[n(200)]-1;t>=0;t--)if(e[t][n(191)][n(222)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(167)][n(201)](),c=a[n(176)](s[n(155)]),l=a[c+1];if(l)for(let t=0;t<e[n(200)];t++)if(e[t][n(191)][n(222)][n(155)]===l)return t;return e[n(200)]}function m(){const t=["createPositionBefore","1118601dAqEQg","_updateFootnoteRefCounter","from","document","model","editor","footnoteDefinition","listenTo","singleton","paragraph","get","move","indexOf","_updateFootnotesCounters","set","_footnotes","_handleFootnoteDefinitionsChanges","_handleFootnotesDefinitionsObjectChanges","$graveyard","_handleInsertedFootnoteReference","_ensureFootnotesReferencesHaveProperOrder","isEqual","remove","some","_handleFootnoteReferencesChanges","map","createPositionAt","reference","insert","compareWith","getChildren","_handleRemoveFootnoteReferenceById","3507604elDhIa","_footnoteRefsTracker","getChanges","getFootnote","length","getRootNames","270FMwDVz","footnoteId","footnotesDefinitions","FootnotesTracker","setAttribute","getAttribute","reset","high","3671730CTietL","low","3EhEAyO","_footnotesDefinitions","footnoteRef","_sortFootnoteDefinitions","_handleMovedFootnoteReference","_footnoteFormatter","_insertEmptyFootnotesDefinitionsContainer","append","after","getFootnotesDefinitionsObjectElement","root","add","getFootnotes","382238mfpvUi","splice","isPremiumPlugin","54480mgTxXZ","399014nwkLNa","168GWrOgC","setFootnoteFormatter","13491594YHPIHs","footnotes.multiBlock","has","pluginName","config","registerPostFixer","enqueueChange","change:data","getFootnotesFormatter","parent","init","footnoteInlineContent","_handleFootnotesDefinitionsObjectSync","differ","createRangeOn","find","isOfficialPlugin","createElement","findIndex","footnoteCounter","unshift","_footnoteDefsContainerTracker","_footnoteDefsTracker","end","_ensureFootnotesDefinitionsContainerExists","rootName","childCount","625QexEFW","min","push","definition","createRangeIn","before"];return(m=function(){return t})()}const g=w;function w(t,e){const o=y();return(w=function(t,e){return o[t-=411]})(t,e)}function y(){const t=["8153620YKYpgq","_getPositionToInsertFootnote","12wncFVl","refresh","_moveSelectionToFootnoteDefinition","1460630jYozdJ","2761616jrgnXb","FootnotesEditing","length","createElement","12mIIIxc","145921uybbCL","test","2067674wBEnep","execute","1363276AaCuKC","change","get","selection","checkChild","footnoteRef","isBlock","footnoteId","isEnabled","insert-footnote-command-executed-with-invalid-id","isObject","5212458lJhFmj","model","getItems","document","plugins","insertObject","string","getFirstRange","editor","end","9AKFaIA"];return(y=function(){return t})()}!function(t){const e=w,o=t();for(;;)try{if(550023===parseInt(e(415))/1*(parseInt(e(414))/2)+-parseInt(e(440))/3*(-parseInt(e(419))/4)+parseInt(e(446))/5+parseInt(e(443))/6*(-parseInt(e(417))/7)+parseInt(e(447))/8+-parseInt(e(430))/9+-parseInt(e(441))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(y);class b extends t.Command{[g(444)](){const t=g,e=this[t(438)][t(431)][t(433)][t(422)],o=this[t(442)](e);this[t(427)]=!!o}[g(418)](t){const e=g,{editor:o}=this,{model:n}=o,{selection:s}=n[e(433)],r=this[e(442)](s);if(!r)return;const a=o[e(434)][e(421)](e(411)),c=t?.[e(426)]??(0,i.uid)();!function(t){const o=e;return o(436)==typeof t&&t[o(412)]>0&&!/\s/[o(416)](t)&&!/^\d/[o(416)](t)}(c)?(0,i.logWarning)(e(428)):(n[e(420)](t=>{const o=e,i=t[o(413)](o(424),{footnoteId:c});n[o(435)](i,r,null)}),a[e(445)](c))}[g(442)](t){const e=g,{model:o}=this[e(438)],{schema:n}=o,i=t[e(437)]();for(const t of i[e(432)]())if(n[e(425)](t)||n[e(429)](t))return null;const s=i[e(439)];return n[e(423)](s,e(424))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=h([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[h([68,97,116,101])][h([110,111,119])](),n=t[h([101,100,105,116,111,114])],s=new(window[h([80,114,111,109,105,115,101])])(t=>{n[h([111,110,99,101])](h([114,101,97,100,121]),t)}),r={[h([107,116,121])]:h([69,67]),[h([117,115,101])]:h([115,105,103]),[h([99,114,118])]:h([80,45,50,53,54]),[h([120])]:h([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]),[h([121])]:h([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]),[h([97,108,103])]:h([69,83,50,53,54])},a=n[h([99,111,110,102,105,103])][h([103,101,116])](h([108,105,99,101,110,115,101,75,101,121]));function c(t){return t[h([115,116,97,114,116,115,87,105,116,104])](h([101,121]))?JSON[h([112,97,114,115,101])](l(t)):null}function l(t){return window[h([97,116,111,98])](t[h([114,101,112,108,97,99,101])](/-/g,h([43]))[h([114,101,112,108,97,99,101])](/_/g,h([47])))}function u(t){let e=5381;function o(t){for(let o=0;o<t[h([108,101,110,103,116,104])];o++){const n=t[h([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[h([105,115,65,114,114,97,121])](e)?e[h([102,111,114,69,97,99,104])](t):e&&typeof e==h([111,98,106,101,99,116])?Object[h([101,110,116,114,105,101,115])](e)[h([115,111,114,116])]()[h([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[h([83,116,114,105,110,103])](e))}(t),e>>>0}function f(t){return t[h([116,111,83,116,114,105,110,103])](16)[h([112,97,100,83,116,97,114,116])](8,h([48]))}function d(t){return t[h([115,112,108,105,116])]("")[h([114,101,118,101,114,115,101])]()[h([106,111,105,110])]("")}function p(){}function h(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[h([83,116,114,105,110,103])](window[h([112,101,114,102,111,114,109,97,110,99,101])][h([110,111,119])]())[h([114,101,112,108,97,99,101])](h([46]),"");let o=h([117]);for(let n=0;n<t[h([108,101,110,103,116,104])];n+=2){let i=window[h([112,97,114,115,101,73,110,116])](t[h([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[h([108,101,110,103,116,104])]&&(i-=e[h([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=h([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=h([86,97,108,105,100])&&async function(){await s,n[h([109,111,100,101,108])][h([99,104,97,110,103,101])]=p,n[h([109,111,100,101,108])][h([101,110,113,117,101,117,101,67,104,97,110,103,101])]=p,n[h([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](h([109,111,100,101,108]))}()}(await async function(){let t,e=null,p=null;try{return a==h([71,80,76])?h([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[h([115,112,108,105,116])](h([46]));return 3!=t[h([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=c(t);return e&&o()?e:null;function o(){const t=e[h([106,116,105])],o=window[h([112,97,114,115,101,73,110,116])](t[h([115,117,98,115,116,114,105,110,103])](t[h([108,101,110,103,116,104])]-8),16),n={...e,[h([106,116,105])]:t[h([115,117,98,115,116,114,105,110,103])](0,t[h([108,101,110,103,116,104])]-8)};return delete n[h([118,99])],u(n)==o}}}(),t?(t[h([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(p=function(t,e){return new(window[h([80,114,111,109,105,115,101])])(c=>{if(r())return c(h([86,97,108,105,100]));a(),n[h([100,101,99,111,114,97,116,101])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const p=(0,i.uid)();function m(t){return!!t&&(typeof t===h([111,98,106,101,99,116])||typeof t===h([102,117,110,99,116,105,111,110]))&&typeof t[h([116,104,101,110])]===h([102,117,110,99,116,105,111,110])&&typeof t[h([99,97,116,99,104])]===h([102,117,110,99,116,105,111,110])}function g(n){a(n)[h([116,104,101,110])](t=>t&&t[h([115,116,97,116,117,115])]==h([111,107])?f(u(p+e))!=t[h([118,101,114,105,102,105,99,97,116,105,111,110])]?h([85,115,97,103,101,76,105,109,105,116]):h([86,97,108,105,100]):h([85,115,97,103,101,76,105,109,105,116]))[h([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),h([86,97,108,105,100])):h(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[h([116,104,101,110])](c)[h([99,97,116,99,104])](()=>{c(h([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=h([108,108,99,116,45])+f(u(t)),n=d(f(window[h([77,97,116,104])][h([99,101,105,108])](o/i)));window[h([108,111,99,97,108,83,116,111,114,97,103,101])][h([115,101,116,73,116,101,109])](e,n)}function r(){const e=h([108,108,99,116,45])+f(u(t)),o=window[h([108,111,99,97,108,83,116,111,114,97,103,101])][h([103,101,116,73,116,101,109])](e);return o?window[h([112,97,114,115,101,73,110,116])](d(o),16)*i:null}function a(t){return new(window[h([80,114,111,109,105,115,101])])((e,o)=>{t[h([116,104,101,110])](e,o),window[h([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[h([111,110])](h([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(h([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[h([114,101,113,117,101,115,116,73,100])]:p}},{[h([112,114,105,111,114,105,116,121])]:h([104,105,103,104])}),n[h([111,110])](h([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{m(t[h([114,101,116,117,114,110])])&&(l=!0,g(t[h([114,101,116,117,114,110])]))},{[h([112,114,105,111,114,105,116,121])]:h([108,111,119])}),s[h([116,104,101,110])](()=>{l||c(h([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[h([101,100,105,116,105,110,103])][h([118,105,101,119])][h([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==h([97,117,116,111])}function a(){n[h([101,100,105,116,105,110,103])][h([118,105,101,119])][h([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=h([97,117,116,111])}}(t[h([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[h([106,116,105])])),await async function(){let t=!0;try{const n=a[h([115,112,108,105,116])](h([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=c(e);o&&o[h([97,108,103])]==h([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[h([85,105,110,116,56,65,114,114,97,121])][h([102,114,111,109])](l(n),t=>t[h([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[h([84,101,120,116,69,110,99,111,100,101,114])]))[h([101,110,99,111,100,101])](e+h([46])+o),a=window[h([99,114,121,112,116,111])][h([115,117,98,116,108,101])];if(!a)return;const c=await a[h([105,109,112,111,114,116,75,101,121])](h([106,119,107]),r,{[h([110,97,109,101])]:h([69,67,68,83,65]),[h([110,97,109,101,100,67,117,114,118,101])]:h([80,45,50,53,54])},!1,[h([118,101,114,105,102,121])]);await a[h([118,101,114,105,102,121])]({[h([110,97,109,101])]:h([69,67,68,83,65]),[h([104,97,115,104])]:{[h([110,97,109,101])]:h([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[h([102,101,97,116,117,114,101,115])];return!(!e||!e[h([105,110,99,108,117,100,101,115])](h([42]))&&!e[h([105,110,99,108,117,100,101,115])](h([70,79,79])))}()?function(){const e=[h([101,118,97,108,117,97,116,105,111,110]),h([116,114,105,97,108])][h([105,110,99,108,117,100,101,115])](t[h([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1772582400;return t[h([101,120,112])]<e}()?h([69,120,112,105,114,101,100]):function(){const e=t[h([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[h([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[h([108,111,99,97,116,105,111,110])].href);if(e[h([105,110,99,108,117,100,101,115])](o))return!0;const n=o[h([115,112,108,105,116])](h([46]));return e[h([102,105,108,116,101,114])](t=>t[h([105,110,99,108,117,100,101,115])](h([42])))[h([109,97,112])](t=>t[h([115,112,108,105,116])](h([46])))[h([102,105,108,116,101,114])](t=>t[h([108,101,110,103,116,104])]<=n[h([108,101,110,103,116,104])])[h([109,97,112])](t=>Array(n[h([108,101,110,103,116,104])]-t[h([108,101,110,103,116,104])])[h([102,105,108,108])](t[0]===h([42])?h([42]):"")[h([99,111,110,99,97,116])](t))[h([115,111,109,101])](t=>n[h([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===h([42])))}()?(t[h([108,105,99,101,110,115,101,84,121,112,101])]==h([101,118,97,108,117,97,116,105,111,110])&&(e=function(t){const e=[new(window[h([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[h([116,104,101,110])](()=>new(window[h([80,114,111,109,105,115,101])])(t=>{let e=0;n[h([109,111,100,101,108])][h([111,110])](h([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][h([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,1512==e&&(t(),o[h([111,102,102])]())})}))];return window[h([80,114,111,109,105,115,101])][h([114,97,99,101])](e)[h([116,104,101,110])](()=>t)}(h([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),await(e&&p?new(window[h([80,114,111,109,105,115,101])])((t,o)=>{e[h([116,104,101,110])](t,o),p[h([116,104,101,110])](e=>{e!=h([86,97,108,105,100])&&t(e)},o)}):e||p||h([86,97,108,105,100]))):h([68,111,109,97,105,110,76,105,109,105,116]):h([78,111,116,65,108,108,111,119,101,100]):h([73,110,118,97,108,105,100])):h([73,110,118,97,108,105,100]))}catch{return h([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),o.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(i.reference,"on")}),o.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:o,editing:n}=t,{t:i}=t.locale;o.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:o})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;o.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of n.view.createRangeIn(i))t.is("$textProxy")?o.consume(t.textNode,{name:!0}):t.is("element")&&o.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),o.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),o.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:o})=>{const n=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,o),o,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",n)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:o}=t.locale,{conversion:n}=t;n.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),n.for("upcast").add(t=>{t.on("element:ol",(t,e,o)=>{const n=e.viewItem;if(!n.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!o.consumable.consume(n,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=o.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,o)=>{const n=e.viewItem;n.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&o.consumable.consume(n,{name:!0,classes:"footnotes-divider"})})}),n.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>x(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=x(n,{"data-footnotes-list-label":o("Footnotes")}),s=(0,e.toWidget)(i,n,{hasSelectionHandle:!0,label:o("Footnotes")});return n.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:o}=t,n=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,o)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!o.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=o.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!o.safeInsert(r,e.modelCursor))return;o.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(o.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),o.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(n)o.convertChildren(a,r);else{const t=o.writer.createElement("footnoteInlineContent");o.writer.insert(t,r),o.convertChildren(a,t)}o.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>A(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>A(t,e,o)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const o=t.document.differ,n=new Set;for(const t of o.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&n.add(e)}for(const t of n.values()){const o=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of o)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const o=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:o,t:n}=t,i=t.model.document.selection;t.keystrokes.set("Ctrl+Alt+F","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Alt+F"}]}),this.listenTo(o.view.document,"enter",(t,e)=>{const o=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(o){const n=o.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(n),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let o=!1;this.listenTo(e.view.document,"pointerdown",(t,n)=>{const{target:i}=n,s=e.view.document.selection;o=!!(i?.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n?.is("element","a"))return;if(n.parent?.is("element","sup")&&n.parent.hasClass("footnote")&&!o)return void e.preventDefault();let i=n.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:o})=>{if(!k(e))return null;if(!t)return o.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const o=e.toViewElement(t);return!!o&&k(t)!==o.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function x(t,e={}){const o=t.createEmptyElement("hr",{class:"footnotes-divider"}),n=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[o,n])}function E(t,e){const o=t.getAttribute("footnoteId"),n=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+o},function(t){const e=this.toDomElement(t);return e.textContent=n,e}),s=e.createContainerElement("sup",{id:"ref-"+o,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function A(t,o,n,{dataPipeline:i}={}){const{t:s}=n,r=t.getAttribute("footnoteId"),a=o.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?o.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(o.createEditableElement("div",{class:"footnote-content"}),o,{label:s("Footnote content.")});return o.insert(o.createPositionAt(c,0),o.createSlot()),o.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var P=o(331);const S=D;function D(t,e){const o=T();return(D=function(t,e){return o[t-=415]})(t,e)}function T(){const t=["setAttribute","sourceEditorId","editor","_insertEmptyFootnotesDefinitionsContainer","contentInsertion","insert","root","find","hasAttribute","_handlePasteFootnotesDefinitions","createRangeIn","flatMap","drop","method","listenTo","FootnotesClipboard","getRanges","remove","getFootnotesDefinitionsObjectElement","getAttribute","_defineClipboardIntegration","config","keys","push","create","outputTransformation","17649vlYXPq","toData","reduce","content","toModel","getFirstRange","664yQDole","dataTransfer","selection","getData","footnoteInlineContent","toView","cloneElement","application/ckeditor5-footnotes","10VWtzvj","clipboardInput","element","1118886hhSLas","getChildren","365400yxjQoe","change","7871060TWpOdj","length","pluginName","4edMUJU","setData","string","parse","getSelectedBlocks","footnoteDefinition","entries","2822925FMQXXV","isPremiumPlugin","from","definition","footnotes.multiBlock","footnotesDefinitions","htmlProcessor","data","isOfficialPlugin","1283919vDhsBZ","createElement","editing","69913TqZyis","footnoteRef","init","document","getFootnotes","append","stringify","get","getFootnote","includes","_handleCopyFootnotesDefinitions","add","footnoteId","requires","end"];return(T=function(){return t})()}!function(t){const e=D,o=t();for(;;)try{if(214533===parseInt(e(459))/1*(parseInt(e(440))/2)+-parseInt(e(456))/3+-parseInt(e(435))/4+-parseInt(e(430))/5*(-parseInt(e(433))/6)+-parseInt(e(447))/7+-parseInt(e(422))/8*(parseInt(e(416))/9)+parseInt(e(437))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(T);class _ extends t.Plugin{static get[S(439)](){return S(489)}static get[S(472)](){return[v,P.ClipboardPipeline]}static get[S(455)](){return!0}static get[S(448)](){return!0}[S(461)](){this[S(494)]()}[S(494)](){const t=S;this[t(469)](),this[t(483)]()}[S(469)](){const t=S,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(466)](P.ClipboardPipeline),s=o[t(466)](d);this[t(488)](i,t(415),(o,i)=>{const r=t,a=O(n[r(484)](i[r(419)]));if(!a[r(438)])return;const c=s[r(463)](),l=a[r(418)]((t,o)=>{const n=r,i=c[n(481)](t=>t.id===o);if(i){const o=e[n(454)][n(427)](i[n(450)],{isClipboardPipeline:!0}),s=e[n(454)][n(453)][n(417)](o);t[i.id]=s}return t},Object[r(498)](null));i[r(423)][r(441)](r(429),JSON[r(465)](l))})}[S(483)](){const t=S,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(458)],r=n[t(466)](P.ClipboardPipeline),a=n[t(466)](d),c=e[t(495)][t(466)](t(451));let l=null;this[t(488)](s[t(462)],t(431),(e,o)=>{const n=t,i=o[n(423)][n(425)](n(429));l=i?JSON[n(443)](i):null}),this[t(488)](r,t(478),(n,s)=>{const r=t,u=s[r(475)]===this[r(476)].id;u&&r(486)===s[r(487)]||o[r(436)](t=>{const n=r;let f=a[n(492)]();const d=!!f&&Array[n(449)](o[n(462)][n(424)][n(444)]())[n(468)](f);if(!l&&function(t){const e=n;for(const{item:o}of t)if(o.is(e(432),e(460)))return!0;return!1}(o[n(484)](s[n(419)]))&&(l=function(t,e){const o=n,i=L(t,e);if(!i)return null;const s=Object[o(498)](null);for(const e of i[o(434)]())e.is(o(432),o(445))&&e[o(482)](o(471))&&(s[e[o(493)](o(471))]=t[o(428)](e,!0));return Object[o(496)](s)[o(438)]?s:null}(t,s[n(419)])),(f&&!d||!f&&!l)&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(484)](e))n.is(o(432),o(452))&&i[o(497)](n);for(const e of i)t[o(491)](e)}(t,s[n(419)]),!l)return;const{selection:p}=o[n(462)],h=p[n(421)]()[n(480)];f&&!d||(f=L(t,s[n(419)]),f||=a[n(477)](t,h));const m=Array[n(449)](p[n(490)]())[n(485)](O),g=function(t,e,o){const s=n,r=Object[s(498)](null);for(const{item:n}of t[s(484)](e))if(n.is(s(432),s(460))){const e=n[s(493)](s(471));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(474)](s(471),r[e],n)}return r}(t,s[n(419)],t=>{const e=n;return!u||!!a[e(467)](t)&&!m[e(468)](t)});for(const[o,i]of Object[n(446)](l)){const s=g[o]||o;let r;if(n(442)!=typeof i)r=i,s!==o&&t[n(474)](n(471),s,r);else{r=t[n(457)](n(445),{footnoteId:s});const o=e[n(454)][n(453)][n(427)](i);let a;if(c)a=e[n(454)][n(420)](o,r);else{a=t[n(457)](n(426));const i=e[n(454)][n(420)](o,a);t[n(479)](i,a)}t[n(464)](a,r)}t[n(479)](r,f,n(473))}l=null})})}}function L(t,e){const o=S;for(const{item:n}of t[o(484)](e))if(n.is(o(432),o(452)))return n;return null}function O(t){const e=S,o=new Set;for(const{item:n}of t)n.is(e(432),e(460))&&o[e(470)](n[e(493)](e(471)));return Array[e(449)](o)}var V=o(311),N=o(355),R=o(929),K=o.n(R),j=o(297),M=o.n(j),B=o(102),U=o.n(B),z=o(123),H=o.n(z),W=o(741),Q=o.n(W),q=o(728),G={attributes:{"data-cke":!0}};G.setAttributes=H(),G.insert=U().bind(null,"head"),G.domAPI=M(),G.insertStyleElement=Q();K()(q.A,G);q.A&&q.A.locals&&q.A.locals;class J extends t.Plugin{licenseKey;_licenseKeyCheckInterval;static get pluginName(){return"FootnotesUI"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;e.add("insertFootnote",Y(t,V.ButtonView)),e.add("menuBar:insertFootnote",Y(t,V.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const o=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in o){const n=e,i=o[n];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function Y(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof V.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:N.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}var X=$;function Z(){var t=["8902212rJgUKq","1032hdKpjT","13mqMtya","174NQigcP","640bmmgVb","Footnotes","25130qKRTvr","3696QZJLsx","8930CkZQsp","isPremiumPlugin","isOfficialPlugin","pluginName","2456kNQUAO","31743GzPslH","1169MGortE","requires","84945JMybrV","4575fOziuQ"];return(Z=function(){return t})()}function $(t,e){var o=Z();return($=function(t,e){return o[t-=386]})(t,e)}!function(t){for(var e=$,o=t();;)try{if(622815===parseInt(e(386))/1*(parseInt(e(394))/2)+parseInt(e(389))/3*(parseInt(e(391))/4)+parseInt(e(388))/5*(parseInt(e(393))/6)+parseInt(e(396))/7+-parseInt(e(402))/8*(parseInt(e(403))/9)+-parseInt(e(398))/10*(parseInt(e(397))/11)+parseInt(e(390))/12*(parseInt(e(392))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Z);class tt extends t.Plugin{static get[X(401)](){return X(395)}static get[X(387)](){return[v,_,J]}static get[X(400)](){return!0}static get[X(399)](){return!0}}function et(){const t=["upper-alpha","13071ZdqQMs","upper-roman","21ZKQvoB","145806RhOxSM","decimal-leading-zero","305310nnRNLg","5379597FwpDvd","lower-roman","lower-latin","124XpfkDO","3549616cUQaUO","upper-latin","404775BebGtc","decimal","724140BqwqUw","lower-alpha"];return(et=function(){return t})()}function ot(t,e){const o=et();return(ot=function(t,e){return o[t-=405]})(t,e)}const nt=ot;!function(t){const e=ot,o=t();for(;;)try{if(224424===parseInt(e(415))/1+parseInt(e(407))/2+parseInt(e(410))/3*(-parseInt(e(419))/4)+-parseInt(e(405))/5+parseInt(e(413))/6*(-parseInt(e(412))/7)+parseInt(e(420))/8+-parseInt(e(416))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(et);const it=[nt(406),nt(414),nt(418),nt(421),nt(408),nt(409),nt(417),nt(411)],st=at;function rt(){const t=["value","isEnabled","754112LZZciz","getAttribute","includes","1NIoifx","506802YyfOhx","change","plugins","setAttribute","refresh","877119rGHWXj","1383510KvtPNu","_updateFootnotesCounters","263374Dswzzr","model","footnotesListStyle","getFootnotesDefinitionsObjectElement","get","752640cQHlxC","execute","10113176gbrMqg"];return(rt=function(){return t})()}function at(t,e){const o=rt();return(at=function(t,e){return o[t-=453]})(t,e)}!function(t){const e=at,o=t();for(;;)try{if(182870===-parseInt(e(472))/1*(parseInt(e(459))/2)+-parseInt(e(456))/3+-parseInt(e(469))/4+-parseInt(e(457))/5+-parseInt(e(473))/6+-parseInt(e(464))/7+parseInt(e(466))/8)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(rt);class ct extends t.Command{[st(455)](){const t=st,{editor:e}=this,o=e[t(453)][t(463)](d)[t(462)]();this[t(468)]=!!o,this[t(467)]=o?.[t(470)](t(461))??null}[st(465)]({value:t}){const e=st,{editor:o}=this,n=o[e(453)][e(463)](d),i=n[e(462)]();i&&it[e(471)](t)&&o[e(460)][e(474)](o=>{const s=e;o[s(454)](s(461),t,i),n[s(458)](o)})}}function lt(t,e){const o=ft();return(lt=function(t,e){return o[t-=313]})(t,e)}const ut=lt;function ft(){const t=["setAttribute","getAttribute","footnotesListStart","36uQxMMt","1821744zVMmnj","10991491PVVklj","value","26077650bbwUpI","452770JxrRyS","refresh","2uQuONG","4300132rkLhvv","execute","_updateFootnotesCounters","isEnabled","change","2286QotNLp","24848LTphJA","model","getFootnotesDefinitionsObjectElement","isInteger","998134cUDPBI","get","plugins"];return(ft=function(){return t})()}!function(t){const e=lt,o=t();for(;;)try{if(825045===-parseInt(e(314))/1*(-parseInt(e(327))/2)+parseInt(e(321))/3+-parseInt(e(328))/4+-parseInt(e(325))/5*(-parseInt(e(320))/6)+parseInt(e(322))/7+parseInt(e(334))/8*(parseInt(e(333))/9)+-parseInt(e(324))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ft);class dt extends t.Command{[ut(326)](){const t=ut,{editor:e}=this,o=e[t(316)][t(315)](d)[t(336)]();this[t(331)]=!!o,this[t(323)]=o?.[t(318)](t(319))??null}[ut(329)]({value:t}){const e=ut,{editor:o}=this,n=o[e(316)][e(315)](d),i=n[e(336)]();i&&Number[e(313)](t)&&o[e(335)][e(332)](o=>{const s=e;o[s(317)](s(319),t,i),n[s(330)](o)})}}const pt=mt;function ht(){const t=["setFootnoteFormatter","viewItem","from","_formatFootnoteListValue","isOfficialPlugin","getChanges","_defineSchema","_defineConverters","getAttribute","find","5YJIYnu","footnotes-list","define","hasClass","consume","_defineFormatter","model","element","lower-roman","footnotesListStyle","extend","padStart","consumable","downcast","_updateFootnotesCounters","footnotes.footnotesProperties.defaultStartIndex","upper-latin","document","isNaN","differ","decimal","toViewElement","17082140ITkkQf","get","lower-latin","$text","removeStyle","removeAttribute","_definePostfixer","item","upper-roman","pluginName","6644796ioBarc","getChildren","35SKgQMU","upcast","upper-alpha","setStyle","plugins","lower-alpha","max","list-style-type","name","registerPostFixer","attribute:footnotesListStart:footnotesDefinitions","FootnotesPropertiesEditing","footnotesListStart","footnotes.footnotesProperties.defaultListStyle","parent","_getDefaultListStyle","9PnHxbc","config","requires","getStyle","type","parseInt","checkAttribute","element:ol","toLowerCase","6535170wuEADD","isPremiumPlugin","1439368nnuiIl","add","footnotesStyle","commands","footnotesStart","fromCharCode","insert","getItems","footnotesDefinitions","nodeAfter","writer","start","1509152BbhIRS","schema","setAttribute","mapper","803938GcLXRv","hasAttribute","8546LQYkPU","floor","editor","createRangeOn","attribute:footnotesListStyle:footnotesDefinitions","decimal-leading-zero","position","for","toUpperCase","init","modelCursor","_getDefaultStartIndex"];return(ht=function(){return t})()}function mt(t,e){const o=ht();return(mt=function(t,e){return o[t-=360]})(t,e)}!function(t){const e=mt,o=t();for(;;)try{if(776114===-parseInt(e(384))/1+parseInt(e(386))/2*(parseInt(e(458))/3)+-parseInt(e(380))/4*(-parseInt(e(408))/5)+parseInt(e(440))/6+parseInt(e(442))/7*(-parseInt(e(368))/8)+-parseInt(e(366))/9+parseInt(e(430))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ht);class gt extends t.Plugin{static get[pt(439)](){return pt(453)}static get[pt(460)](){return[v,d]}static get[pt(402)](){return!0}static get[pt(367)](){return!0}[pt(395)](){const t=pt,{editor:e}=this;e[t(459)][t(410)](t(455),t(428)),e[t(459)][t(410)](t(423),1),e[t(371)][t(369)](t(370),new ct(e)),e[t(371)][t(369)](t(372),new dt(e)),this[t(404)](),this[t(405)](),this[t(413)](),this[t(436)]()}[pt(404)](){const t=pt,{editor:e}=this,{schema:o}=e[t(414)];o[t(418)](t(376),{allowAttributes:[t(417),t(454)]})}[pt(405)](){const t=pt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(393)](t(443))[t(369)](e=>{const o=t;e.on(o(364),(t,e,n)=>{const s=o,r=e[s(399)],a=e[s(396)]?.[s(456)];r[s(411)](s(409))&&a?.is(s(415),s(376))&&(function(t,e,o,n){const i=s;if(!n[i(363)](e,i(454)))return;let r=1;const a=o[i(420)][i(412)](t,{attributes:i(379)});if(a){const e=Number[i(362)](t[i(406)](i(379)),10);Number[i(426)](e)||(r=e)}!a&&e[i(385)](i(454))||o[i(378)][i(382)](i(454),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(363)](e,i(417)))return;let r=i(428),a=!1;if(o[i(420)][i(412)](t,{attributes:i(361)})){const e={1:i(428),a:i(447),A:i(444),i:i(416),I:i(438)}[t[i(406)](i(361))];e&&(r=e),a=!0}o[i(420)][i(412)](t,{styles:i(449)})&&(r=function(t){const e=i;switch(t){case e(447):return e(432);case e(444):return e(424);default:return t}}(t[i(360)](i(449))),a=!0),!a&&e[i(385)](i(417))||o[i(378)][i(382)](i(417),r,e)}(r,a,n,i))})}),o[t(393)](t(421))[t(369)](e=>{const o=t;e.on(o(452),(t,e,n)=>{const i=o;if(!n[i(420)][i(412)](e[i(437)],t[i(450)]))return;const s=wt(e[i(437)],n[i(383)]),{attributeNewValue:r}=e;null==r||1===r?n[i(378)][i(435)](i(379),s):n[i(378)][i(382)](i(379),String(r),s)}),e.on(o(390),(t,e,n)=>{const i=o;if(!n[i(420)][i(412)](e[i(437)],t[i(450)]))return;const s=wt(e[i(437)],n[i(383)]),{attributeNewValue:r}=e;r&&i(428)!==r?n[i(378)][i(445)](i(449),r,s):n[i(378)][i(434)](i(449),s)})})}[pt(436)](){const t=pt,{editor:e}=this,{model:o}=e,n=e[t(446)][t(431)](d),i=this[t(457)](),s=this[t(397)]();o[t(425)][t(451)](e=>{const r=t,a=o[r(425)][r(427)][r(403)]();let c=!1;for(const t of a){if(r(374)!==t[r(361)]||r(433)===t[r(450)])continue;const n=o[r(389)](t[r(392)][r(377)]);for(const t of n[r(375)]())t.is(r(415),r(376))&&(!t[r(385)](r(454))&&o[r(381)][r(363)](t,r(454))&&(e[r(382)](r(454),s,t),c=!0),!t[r(385)](r(417))&&o[r(381)][r(363)](t,r(417))&&(e[r(382)](r(417),i,t),c=!0))}return c&&n[r(422)](e),c})}[pt(413)](){const t=pt,{editor:e}=this;e[t(446)][t(431)](d)[t(398)](e=>this[t(401)](e))}[pt(457)](){const t=pt;return this[t(388)][t(459)][t(431)](t(455))}[pt(397)](){const t=pt;return this[t(388)][t(459)][t(431)](t(423))}[pt(401)]({container:t,value:e,digits:o}){const n=pt,i=t[n(406)](n(417)),s=t[n(406)](n(454)),r=Math[n(387)](e)+(s??1)-1;switch(i){case n(391):return function(t,e){const o=n;return String(t)[o(419)](e,"0")}(r,Math[n(448)](2,o));case n(447):case n(432):return yt(r,!1);case n(444):case n(424):return yt(r,!0);case n(416):return vt(r,!1);case n(438):return vt(r,!0);default:return String(r)}}}function wt(t,e){const o=pt,n=e[o(429)](t);return Array[o(400)](n[o(441)]())[o(407)](t=>t.is(o(415),"ol")&&t[o(411)](o(409)))}function yt(t,e){const o=pt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(373)](97+t)+n,i=Math[o(387)]((i-1)/26)}return e?n[o(394)]():n}const bt=[{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 vt(t,e){const o=pt;let n="",i=t;for(const{value:t,numeral:e}of bt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(365)]()}class It extends V.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new V.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new V.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,o),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,V.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const o=new V.View(this.locale);return o.children=o.createCollection(),o.children.addMany(t),o.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:o.children}),o.children.delegate("execute").to(this),o.focus=function(){for(const t of this.children)if(t instanceof V.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},o.focusTracker=new i.FocusTracker,o.keystrokes=new i.KeystrokeHandler,o.render(),o.keystrokes.listenTo(o.element),this.children.add(o),o}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),o=[e],n=new V.CollapsibleView(this.locale,o);return n.set({label:t("Footnotes properties"),isCollapsed:!0}),n.buttonView.bind("isEnabled").toMany(o,"isEnabled",(...t)=>t.some(t=>t)),n.buttonView.on("change:isEnabled",(t,e,o)=>{o||(n.isCollapsed=!0)}),this.children.add(n),[e,n]}_createStartIndexPropertyView(){const{t}=this.locale,e=new V.LabeledFieldView(this.locale,V.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const o=e.fieldView.element,n=o.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid footnotes start index value."):o.checkValidity()?this.fire("footnotesListStart",{startIndex:n}):e.errorText=t(n<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var kt=o(291),Ct={attributes:{"data-cke":!0}};Ct.setAttributes=H(),Ct.insert=U().bind(null,"head"),Ct.domAPI=M(),Ct.insertStyleElement=Q();K()(kt.A,Ct);kt.A&&kt.A.locals&&kt.A.locals;class Ft extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[V.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var o;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(o=t,t=>{const{t:e}=t,n=o.commands.get("footnotesStyle"),i=(0,V.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(n,"isEnabled"),s.set({label:e("Footnotes style"),icon:N.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:o}=t.locale,n=o("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:N.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:N.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:N.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:N.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:N.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:N.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:o,icon:n,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new V.ButtonView(e);return a.set({label:o,icon:n,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new It(t.locale,{styleGridAriaLabel:n,styleButtonViews:i}),r=t.commands.get("footnotesStart");return s.startIndexFieldView.bind("isEnabled").to(r),s.startIndexFieldView.fieldView.bind("value").to(r),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s.delegate("execute").to(e),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=V.BalloonPanelView;n.register("footnotesDefinitions",{ariaLabel:o("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}var xt=Et;function Et(t,e){var o=At();return(Et=function(t,e){return o[t-=353]})(t,e)}function At(){var t=["130xuBGGa","8JkFzCk","requires","3360085brUDsr","1360544oxDABz","10121658TFhuKy","5686478AHaDUr","isOfficialPlugin","9426DDZBkH","12XrTCLb","580968AdfedB","1385730nBuCkG","isPremiumPlugin","FootnotesProperties","pluginName"];return(At=function(){return t})()}!function(t){for(var e=Et,o=t();;)try{if(885760===parseInt(e(366))/1*(parseInt(e(367))/2)+parseInt(e(354))/3+-parseInt(e(362))/4+parseInt(e(361))/5+parseInt(e(363))/6+parseInt(e(364))/7*(-parseInt(e(359))/8)+parseInt(e(353))/9*(-parseInt(e(358))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(At);class Pt extends t.Plugin{static get[xt(357)](){return xt(356)}static get[xt(360)](){return[gt,Ft]}static get[xt(365)](){return!0}static get[xt(355)](){return!0}}function St(t,e){var o=Dt();return(St=function(t,e){return o[t-=133]})(t,e)}function Dt(){var t=["3CUAIwh","3645696aIYJWS","23859oHeLwn","2048FiMvEw","560250tZUFWA","3902110rEFYYg","1040gpHKDk","8Pgqczp","21697IEvRcp","6uEWeuj","889217PiTbvP","76212QkGktE","11NcAenh"];return(Dt=function(){return t})()}!function(t){for(var e=St,o=t();;)try{if(737330===parseInt(e(141))/1*(parseInt(e(140))/2)+-parseInt(e(133))/3*(parseInt(e(134))/4)+parseInt(e(137))/5+parseInt(e(142))/6*(-parseInt(e(143))/7)+-parseInt(e(136))/8*(-parseInt(e(135))/9)+parseInt(e(138))/10*(parseInt(e(145))/11)+parseInt(e(144))/12*(parseInt(e(139))/13))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Dt)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
|
|
5
|
+
*/(()=>{var t={102:t=>{"use strict";var e={};t.exports=function(t,o){var n=function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},106:t=>{"use strict";t.exports=function(t){return t[1]}},123:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}},237:t=>{"use strict";t.exports=CKEditor5.dll},291:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r},297:t=>{"use strict";var e,o=(e=[],function(t,o){return e[t]=o,e.filter(Boolean).join("\n")});function n(t,e,n,i){var s;if(n)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=o(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,o=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(o,e,!1,t)},remove:function(t){n(o,e,!0,t)}}}},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},331:(t,e,o)=>{t.exports=o(237)("./src/clipboard.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},728:(t,e,o)=>{"use strict";o.d(e,{A:()=>a});var n=o(106),i=o.n(n),s=o(779),r=o.n(s)()(i());r.push([t.id,":root{--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small);--ck-footnotes-widget-label-background-color:#757575}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:.9em 0 1.5em;position:relative}.ck-content .footnotes-divider{background:none;border:none;border-top:1px solid var(--ck-content-footnotes-list-separator-color);height:1px;margin:0 0 1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes-divider{margin-left:auto;margin-right:0}.ck-content .footnotes-list{margin:0;padding-inline-start:3em}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck.ck-editor__editable .footnotes.ck-widget{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes.ck-widget:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes.ck-widget[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-divider{margin-top:0}.ck.ck-editor__editable .footnotes-list{margin-bottom:.65em;margin-top:0}",""]);const a=r},741:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},779:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o="",n=void 0!==e[5];return e[4]&&(o+="@supports (".concat(e[4],") {")),e[2]&&(o+="@media ".concat(e[2]," {")),n&&(o+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),o+=t(e),n&&(o+="}"),e[2]&&(o+="}"),e[4]&&(o+="}"),o}).join("")},e.i=function(t,o,n,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);n&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),o&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=o):u[2]=o),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")},783:(t,e,o)=>{t.exports=o(237)("./src/engine.js")},901:(t,e,o)=>{t.exports=o(237)("./src/widget.js")},929:t=>{"use strict";var e=[];function o(t){for(var o=-1,n=0;n<e.length;n++)if(e[n].identifier===t){o=n;break}return o}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=n.base?c[0]+n.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=o(f),h={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(h);else{var p=i(h,n);n.byIndex=a,e.splice(a,0,{identifier:f,updater:p,references:1})}r.push(f)}return r}function i(t,e){var o=e.domAPI(e);o.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;o.update(t=e)}else o.remove()}}t.exports=function(t,i){var s=n(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=o(s[r]);e[a].references--}for(var c=n(t,i),l=0;l<s.length;l++){var u=o(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}}},e={};function o(n){var i=e[n];if(void 0!==i)return i.exports;var s=e[n]={id:n,exports:{}};return t[n](s,s.exports,o),s.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";o.r(n),o.d(n,{Footnotes:()=>tt,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>Tt,FootnotesPropertiesEditing:()=>gt,FootnotesPropertiesUI:()=>Ft,FootnotesStartCommand:()=>dt,FootnotesStyleCommand:()=>ct,FootnotesTracker:()=>d,FootnotesUI:()=>Z,InsertFootnoteCommand:()=>b});var t=o(782),e=o(901),i=o(584),s=o(783);const r=a;function a(t,e){const o=l();return(a=function(t,e){return o[t-=348]})(t,e)}!function(t){const e=a,o=t();for(;;)try{if(236354===-parseInt(e(367))/1+parseInt(e(359))/2+-parseInt(e(380))/3+-parseInt(e(384))/4+-parseInt(e(360))/5*(parseInt(e(372))/6)+-parseInt(e(383))/7*(-parseInt(e(382))/8)+parseInt(e(377))/9)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(l);class c{[r(362)];[r(356)];[r(388)];[r(349)]=new Map;constructor(t,e){const o=r;this[o(362)]=t,this[o(356)]=e[o(370)],this[o(388)]=e[o(387)]}[r(390)](){const t=r;this[t(349)][t(389)]()}[r(385)](t){const e=r,o=new Set,n=new Map;for(const i of t){if(e(366)===i[e(358)]&&e(369)!==i[e(352)]&&i[e(348)][e(373)]){const t=this[e(362)][e(350)](i[e(348)][e(373)]);for(const o of t[e(371)]()){if(!o.is(e(363),this[e(356)]))continue;const t=this[e(388)](o);n[e(376)](t)||n[e(351)](t,[]),n[e(378)](t)[e(364)](o)}}if(e(379)===i[e(358)]&&i[e(352)]===this[e(356)]){const t=this[e(388)]({getAttribute:t=>i[e(375)][e(378)](t)});o[e(355)](t)}}for(const[t,n]of this[e(349)])e(361)===n[e(386)][e(353)]&&o[e(355)](t);for(const t of o)this[e(349)][e(365)](t);for(const[t,o]of n)this[e(349)][e(351)](t,o[o[e(368)]-1]);const i=new Set;for(const[t,s]of n)o[e(376)](t)&&(i[e(355)](s[0]),s[e(368)]>1?n[e(351)](t,s[e(381)](1)):n[e(365)](t),o[e(365)](t));return{removed:Array[e(357)](o),inserted:Array[e(357)](n[e(374)]())[e(354)](),moved:Array[e(357)](i)}}}function l(){const t=["$graveyard","_model","element","push","delete","insert","306278qKOxcP","length","$text","elementName","getItems","12OPUJzT","nodeAfter","values","attributes","has","10315251NEBQQc","get","remove","944445IbxKXU","slice","952BrdRMX","20412zcEsft","1275488fCLHJI","getChanges","root","getElementKey","_getElementKey","clear","reset","position","_trackedElements","createRangeOn","set","name","rootName","flat","add","_elementName","from","type","302480bdPUcP","1170160HCJUxL"];return(l=function(){return t})()}const u=f;function f(t,e){const o=m();return(f=function(t,e){return o[t-=258]})(t,e)}!function(t){const e=f,o=t();for(;;)try{if(464534===-parseInt(e(265))/1*(-parseInt(e(357))/2)+-parseInt(e(341))/3+parseInt(e(321))/4*(-parseInt(e(342))/5)+-parseInt(e(282))/6+-parseInt(e(307))/7*(parseInt(e(331))/8)+parseInt(e(280))/9*(parseInt(e(298))/10)+parseInt(e(283))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(m);class d extends t.Plugin{[u(292)]=[];[u(268)]=null;[u(293)]=null;[u(348)];[u(359)];[u(345)];static get[u(351)](){return u(270)}static get[u(350)](){return!0}static get[u(327)](){return!0}constructor(t){const e=u;super(t),this[e(348)]=new c(this[e(300)][e(315)],{elementName:e(338),getElementKey:()=>e(354)}),this[e(359)]=new c(this[e(300)][e(315)],{elementName:e(281),getElementKey:t=>t[e(356)](e(296))}),this[e(345)]=new c(this[e(300)][e(315)],{elementName:e(314),getElementKey:t=>t[e(356)](e(296))})}[u(358)](){const t=u,{editor:e}=this,{model:o,data:n}=e;o[t(312)][t(324)](e=>{const n=t,i=o[n(312)][n(289)][n(353)]();let s=!1;return this[n(319)](e,i)&&(s=!0),this[n(271)](e,i)&&(s=!0),this[n(322)](e,i)&&(s=!0),this[n(266)](e)&&(s=!0),this[n(258)](e)&&(s=!0),this[n(305)](e)&&(s=!0),s}),this[t(260)](o[t(312)],t(310),()=>{const e=t;o[e(275)]({isUndoable:!1},t=>{this[e(318)](t)})},{priority:t(308)}),this[t(260)](n,t(347),()=>{const e=t;this[e(292)]=[],this[e(348)][e(344)](),this[e(359)][e(344)](),this[e(345)][e(344)]()},{priority:t(336)})}[u(317)](){return this[u(268)]}[u(294)](t){const e=u;return this[e(292)][e(279)](e=>e.id===t)||null}[u(263)](){const t=u;return Array[t(340)](this[t(292)])}[u(328)](){return this[u(293)]}[u(299)](t){this[u(293)]=t}[u(274)](t,e=0){const o=u;let n=!1;for(let i=e;i<this[o(292)][o(291)];i++)this[o(303)](t,i)&&(n=!0);return n}[u(262)](t,e){const o=u,n=t[o(339)](o(338),{});return t[o(301)](n,e),this[o(268)]=n,n}[u(318)](t){const e=u;if(!this[e(292)][e(291)]||this[e(268)])return;const o=this[e(292)][0][e(288)][e(297)],n=this[e(262)](t,o);for(const o of this[e(292)])o[e(278)][e(334)]||t[e(343)](o[e(278)],n,e(304));this[e(274)](t)}[u(319)](t,e){const o=u;let n=!1;const{inserted:i,removed:s,moved:r}=this[o(348)][o(353)](e);if(r[o(291)]&&(this[o(268)]=r[0]),i[o(291)])if(i[o(291)]>1||this[o(268)]&&i[o(259)](t=>t!==this[o(268)])){const e=t[o(339)](o(338),{}),s=[];this[o(268)]&&s[o(313)](this[o(268)]),s[o(313)](...i),t[o(343)](e,s[0],o(337));for(const n of s)t[o(302)](t[o(320)](n),t[o(349)](e,o(304))),t[o(277)](n);this[o(268)]=e,this[o(274)](t),n=!0}else this[o(268)]=i[0];if(s[o(291)]&&o(329)===this[o(268)]?.[o(297)][o(287)]){for(const e of this[o(292)])t[o(277)](e[o(288)]),n=!0;this[o(292)]=[],this[o(268)]=null}return n}[u(271)](t,e){const o=u;let n=!1;const i=this[o(300)][o(269)][o(286)](o(261)),{inserted:s,moved:r}=this[o(345)][o(353)](e);for(const e of[...r,...s]){const s=e[o(356)](o(296)),r=this[o(294)](s);r&&(r[o(278)]=e),h(t,i,e)&&(n=!0)}return n}[u(322)](t,e){const o=u;let n=!1;const{removed:i,inserted:s,moved:r}=this[o(359)][o(353)](e);for(const e of i)this[o(273)](t,e)&&(n=!0);for(const e of s)this[o(276)](t,e)&&(n=!0);for(const e of r)this[o(309)](t,e)&&(n=!0);return n}[u(258)](t){const e=u;if(!this[e(268)])return!1;let o=!1;if(this[e(268)][e(323)]!==this[e(292)][e(291)]){const n=[];for(const t of this[e(268)][e(267)]()){const i=t[e(356)](e(296));this[e(294)](i)||(n[e(264)](t),o=!0)}for(const o of n)t[e(277)](o)}const n=new Set,i=[];for(const t of this[e(268)][e(267)]()){const s=t[e(356)](e(296));n[e(333)](s)?(i[e(264)](t),o=!0):n[e(285)](s)}for(const o of i)t[e(277)](o);return this[e(268)][e(323)]||(t[e(277)](this[e(268)]),this[e(268)]=null,o=!0),o}[u(276)](t,e){const o=u;if(this[o(292)][o(279)](t=>t[o(288)]===e))return!1;let n=!1;const i=e[o(356)](o(296)),s=this[o(292)][o(290)](t=>t.id===i);-1!==s&&(t[o(277)](this[o(292)][s][o(288)]),this[o(292)][o(316)](s,1),n=!0);let r=this[o(268)]?function(t,e){const n=o;for(const o of t[n(267)]())if(o[n(356)](n(296))===e)return o;return null}(this[o(268)],i):null;r||(r=t[o(339)](o(314),{footnoteId:i}),this[o(268)]&&(t[o(343)](r,this[o(268)],o(304)),n=!0));const a={id:i,reference:e,definition:r},c=p(this[o(300)][o(315)],this[o(292)],e);this[o(292)][o(316)](c,0,a);let l=c;return-1!==s&&(l=Math[o(295)](c,s)),this[o(274)](t,l)&&(n=!0),n}[u(273)](t,e){const o=u,n=this[o(292)][o(290)](t=>t.id===e);if(-1===n)return!1;let i=!1;const s=this[o(292)][n];return o(329)!==s[o(278)][o(297)][o(287)]&&(t[o(277)](s[o(278)]),i=!0),this[o(292)][o(316)](n,1),this[o(274)](t,n)&&(i=!0),i}[u(309)](t,e){const o=u,n=e[o(356)](o(296)),i=this[o(292)][o(290)](t=>t.id===n),s=this[o(292)][i];let r=!1;s[o(288)]=e,this[o(292)][o(316)](i,1);const a=p(this[o(300)][o(315)],this[o(292)],e);return this[o(292)][o(316)](a,0,s),this[o(274)](t,Math[o(295)](i,a))&&(r=!0),r}[u(303)](t,e){const o=u;if(!this[o(268)])return!1;const n=this[o(292)][e];let i;return i=this[o(293)]?this[o(293)]({footnote:n,container:this[o(268)],digits:String(this[o(292)][o(291)])[o(291)],value:e+1}):String(e+1),n[o(288)][o(356)](o(335))!=i&&(t[o(332)](o(335),i,n[o(288)]),!0)}[u(305)](t){const e=u;if(!this[e(268)]||this[e(292)][e(291)]<2)return!1;if(function(t,o){const n=e;if(t[n(291)]!==o[n(291)])return!1;for(let e=0;e<t[n(291)];e++)if(t[e]!==o[e])return!1;return!0}(this[e(292)][e(311)](t=>t.id),Array[e(340)](this[e(268)][e(267)]())[e(311)](t=>t[e(356)](e(296)))))return!1;let o=!1;for(let n=0;n<this[e(292)][e(291)];n++){const i=this[e(292)][n],s=t[e(325)](i[e(278)]),r=t[e(349)](this[e(268)],n);s[e(346)](r)||(t[e(302)](t[e(272)](i[e(278)]),r),o=!0)}return o}[u(266)](t){const e=u;if(!this[e(292)][e(291)])return!1;const{model:o}=this[e(300)];let n=!1;for(let i=0;i<this[e(292)][e(291)]-1;i++){const s=this[e(292)][i],r=this[e(292)][i+1],a=o[e(325)](s[e(288)]),c=o[e(325)](r[e(288)]);e(352)===a[e(284)](c)&&(this[e(309)](t,s[e(288)]),i=-1,n=!0)}return n}}function h(t,e,o){const n=u;if(o[n(323)])return!1;const i=n(e?355:306);return t[n(343)](t[n(339)](i),o),!0}function p(t,e,o){const n=u;if(0===e[n(291)])return 0;const i=t[n(325)](o);for(let o=0;o<e[n(291)];o++){const s=e[o],r=t[n(325)](s[n(288)]);if(n(337)===i[n(284)](r))return o}const s=o[n(297)];let r=-1;for(let t=e[n(291)]-1;t>=0;t--)if(e[t][n(288)][n(297)]===s){r=t;break}if(-1!==r)return r+1;const a=t[n(312)][n(326)](),c=a[n(330)](s[n(287)]),l=a[c+1];if(l)for(let t=0;t<e[n(291)];t++)if(e[t][n(288)][n(297)][n(287)]===l)return t;return e[n(291)]}function m(){const t=["getRootNames","isPremiumPlugin","getFootnotesFormatter","$graveyard","indexOf","32yCdFjc","setAttribute","has","parent","footnoteCounter","high","before","footnotesDefinitions","createElement","from","1883466SGeEZz","3078805nBMTYE","insert","reset","_footnoteDefsTracker","isEqual","set","_footnoteDefsContainerTracker","createPositionAt","isOfficialPlugin","pluginName","after","getChanges","singleton","paragraph","getAttribute","1882KbvtSx","init","_footnoteRefsTracker","_handleFootnotesDefinitionsObjectSync","some","listenTo","footnotes.multiBlock","_insertEmptyFootnotesDefinitionsContainer","getFootnotes","unshift","653Tmlxta","_ensureFootnotesReferencesHaveProperOrder","getChildren","_footnotesDefinitions","config","FootnotesTracker","_handleFootnoteDefinitionsChanges","createRangeOn","_handleRemoveFootnoteReferenceById","_updateFootnotesCounters","enqueueChange","_handleInsertedFootnoteReference","remove","definition","find","3864429zMVWYH","footnoteRef","5336742FxPHTS","12967493FOLMWj","compareWith","add","get","rootName","reference","differ","findIndex","length","_footnotes","_footnoteFormatter","getFootnote","min","footnoteId","root","20zrwDcj","setFootnoteFormatter","editor","append","move","_updateFootnoteRefCounter","end","_sortFootnoteDefinitions","footnoteInlineContent","95417oqnUUJ","low","_handleMovedFootnoteReference","change:data","map","document","push","footnoteDefinition","model","splice","getFootnotesDefinitionsObjectElement","_ensureFootnotesDefinitionsContainerExists","_handleFootnotesDefinitionsObjectChanges","createRangeIn","4mDvFBG","_handleFootnoteReferencesChanges","childCount","registerPostFixer","createPositionBefore"];return(m=function(){return t})()}const g=y;function w(){const t=["length","document","checkChild","change","footnoteRef","FootnotesEditing","editor","901330ecYwzO","insertObject","isObject","test","createElement","738865pQKEDH","isBlock","refresh","footnoteId","63436RPJGIT","12375ZJIRJe","get","end","33DqiiDu","_getPositionToInsertFootnote","plugins","string","isEnabled","_moveSelectionToFootnoteDefinition","3310FqaEQC","70aifMeL","selection","845875uhLLRa","7060104jBNxQu","execute","441402uCmkHX","getFirstRange","getItems","model","insert-footnote-command-executed-with-invalid-id"];return(w=function(){return t})()}function y(t,e){const o=w();return(y=function(t,e){return o[t-=100]})(t,e)}!function(t){const e=y,o=t();for(;;)try{if(666036===parseInt(e(108))/1+parseInt(e(123))/2+-parseInt(e(136))/3*(parseInt(e(132))/4)+-parseInt(e(128))/5+-parseInt(e(111))/6*(parseInt(e(106))/7)+parseInt(e(109))/8+-parseInt(e(133))/9*(parseInt(e(105))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(w);class b extends t.Command{[g(130)](){const t=g,e=this[t(122)][t(114)][t(117)][t(107)],o=this[t(100)](e);this[t(103)]=!!o}[g(110)](t){const e=g,{editor:o}=this,{model:n}=o,{selection:s}=n[e(117)],r=this[e(100)](s);if(!r)return;const a=o[e(101)][e(134)](e(121)),c=t?.[e(131)]??(0,i.uid)();!function(t){const o=e;return o(102)==typeof t&&t[o(116)]>0&&!/\s/[o(126)](t)&&!/^\d/[o(126)](t)}(c)?(0,i.logWarning)(e(115)):(n[e(119)](t=>{const o=e,i=t[o(127)](o(120),{footnoteId:c});n[o(124)](i,r,null)}),a[e(104)](c))}[g(100)](t){const e=g,{model:o}=this[e(122)],{schema:n}=o,i=t[e(112)]();for(const t of i[e(113)]())if(n[e(129)](t)||n[e(125)](t))return null;const s=i[e(135)];return n[e(118)](s,e(120))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=p([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),o=window[p([68,97,116,101])][p([110,111,119])](),n=t[p([101,100,105,116,111,114])],s=new(window[p([80,114,111,109,105,115,101])])(t=>{n[p([111,110,99,101])](p([114,101,97,100,121]),t)}),r={[p([107,116,121])]:p([69,67]),[p([117,115,101])]:p([115,105,103]),[p([99,114,118])]:p([80,45,50,53,54]),[p([120])]:p([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[p([121])]:p([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[p([97,108,103])]:p([69,83,50,53,54])},a=n[p([99,111,110,102,105,103])][p([103,101,116])](p([108,105,99,101,110,115,101,75,101,121]));function c(t){return t[p([115,116,97,114,116,115,87,105,116,104])](p([101,121]))?JSON[p([112,97,114,115,101])](l(t)):null}function l(t){return window[p([97,116,111,98])](t[p([114,101,112,108,97,99,101])](/-/g,p([43]))[p([114,101,112,108,97,99,101])](/_/g,p([47])))}function u(t){let e=5381;function o(t){for(let o=0;o<t[p([108,101,110,103,116,104])];o++){const n=t[p([99,104,97,114,67,111,100,101,65,116])](o);e=(e<<5)+e+n,e&=e}}return function t(e){Array[p([105,115,65,114,114,97,121])](e)?e[p([102,111,114,69,97,99,104])](t):e&&typeof e==p([111,98,106,101,99,116])?Object[p([101,110,116,114,105,101,115])](e)[p([115,111,114,116])]()[p([102,111,114,69,97,99,104])](([e,n])=>{o(e),t(n)}):o(window[p([83,116,114,105,110,103])](e))}(t),e>>>0}function f(t){return t[p([116,111,83,116,114,105,110,103])](16)[p([112,97,100,83,116,97,114,116])](8,p([48]))}function d(t){return t[p([115,112,108,105,116])]("")[p([114,101,118,101,114,115,101])]()[p([106,111,105,110])]("")}function h(){}function p(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const o=function(){const t=window[p([83,116,114,105,110,103])](window[p([112,101,114,102,111,114,109,97,110,99,101])][p([110,111,119])]())[p([114,101,112,108,97,99,101])](p([46]),"");let o=p([117]);for(let n=0;n<t[p([108,101,110,103,116,104])];n+=2){let i=window[p([112,97,114,115,101,73,110,116])](t[p([115,117,98,115,116,114,105,110,103])](n,n+2));i>=e[p([108,101,110,103,116,104])]&&(i-=e[p([108,101,110,103,116,104])]),o+=e[i]}return o}();n[o]=p([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=p([86,97,108,105,100])&&async function(){await s,n[p([109,111,100,101,108])][p([99,104,97,110,103,101])]=h,n[p([109,111,100,101,108])][p([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,n[p([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](p([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==p([71,80,76])?p([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[p([115,112,108,105,116])](p([46]));return 3!=t[p([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=c(t);return e&&o()?e:null;function o(){const t=e[p([106,116,105])],o=window[p([112,97,114,115,101,73,110,116])](t[p([115,117,98,115,116,114,105,110,103])](t[p([108,101,110,103,116,104])]-8),16),n={...e,[p([106,116,105])]:t[p([115,117,98,115,116,114,105,110,103])](0,t[p([108,101,110,103,116,104])]-8)};return delete n[p([118,99])],u(n)==o}}}(),t?(t[p([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[p([80,114,111,109,105,115,101])])(c=>{if(r())return c(p([86,97,108,105,100]));a(),n[p([100,101,99,111,114,97,116,101])](p([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const h=(0,i.uid)();function m(t){return!!t&&(typeof t===p([111,98,106,101,99,116])||typeof t===p([102,117,110,99,116,105,111,110]))&&typeof t[p([116,104,101,110])]===p([102,117,110,99,116,105,111,110])&&typeof t[p([99,97,116,99,104])]===p([102,117,110,99,116,105,111,110])}function g(n){a(n)[p([116,104,101,110])](t=>t&&t[p([115,116,97,116,117,115])]==p([111,107])?f(u(h+e))!=t[p([118,101,114,105,102,105,99,97,116,105,111,110])]?p([85,115,97,103,101,76,105,109,105,116]):p([86,97,108,105,100]):p([85,115,97,103,101,76,105,109,105,116]))[p([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),p([86,97,108,105,100])):p(o-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[p([116,104,101,110])](c)[p([99,97,116,99,104])](()=>{c(p([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=p([108,108,99,116,45])+f(u(t)),n=d(f(window[p([77,97,116,104])][p([99,101,105,108])](o/i)));window[p([108,111,99,97,108,83,116,111,114,97,103,101])][p([115,101,116,73,116,101,109])](e,n)}function r(){const e=p([108,108,99,116,45])+f(u(t)),o=window[p([108,111,99,97,108,83,116,111,114,97,103,101])][p([103,101,116,73,116,101,109])](e);return o?window[p([112,97,114,115,101,73,110,116])](d(o),16)*i:null}function a(t){return new(window[p([80,114,111,109,105,115,101])])((e,o)=>{t[p([116,104,101,110])](e,o),window[p([115,101,116,84,105,109,101,111,117,116])](o,12e4)})}}n[p([111,110])](p([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,o)=>{if(o[0]!=t)return c(p([85,115,97,103,101,76,105,109,105,116]));o[1]={...o[1],[p([114,101,113,117,101,115,116,73,100])]:h}},{[p([112,114,105,111,114,105,116,121])]:p([104,105,103,104])}),n[p([111,110])](p([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{m(t[p([114,101,116,117,114,110])])&&(l=!0,g(t[p([114,101,116,117,114,110])]))},{[p([112,114,105,111,114,105,116,121])]:p([108,111,119])}),s[p([116,104,101,110])](()=>{l||c(p([85,115,97,103,101,76,105,109,105,116]))})});function r(){return n[p([101,100,105,116,105,110,103])][p([118,105,101,119])][p([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==p([97,117,116,111])}function a(){n[p([101,100,105,116,105,110,103])][p([118,105,101,119])][p([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=p([97,117,116,111])}}(t[p([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[p([106,116,105])])),await async function(){let t=!0;try{const n=a[p([115,112,108,105,116])](p([46])),[i,s,r]=n;return e(i),await o(i,s,r),t}catch{return!1}function e(e){const o=c(e);o&&o[p([97,108,103])]==p([69,83,50,53,54])||(t=!1)}async function o(e,o,n){const i=window[p([85,105,110,116,56,65,114,114,97,121])][p([102,114,111,109])](l(n),t=>t[p([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[p([84,101,120,116,69,110,99,111,100,101,114])]))[p([101,110,99,111,100,101])](e+p([46])+o),a=window[p([99,114,121,112,116,111])][p([115,117,98,116,108,101])];if(!a)return;const c=await a[p([105,109,112,111,114,116,75,101,121])](p([106,119,107]),r,{[p([110,97,109,101])]:p([69,67,68,83,65]),[p([110,97,109,101,100,67,117,114,118,101])]:p([80,45,50,53,54])},!1,[p([118,101,114,105,102,121])]);await a[p([118,101,114,105,102,121])]({[p([110,97,109,101])]:p([69,67,68,83,65]),[p([104,97,115,104])]:{[p([110,97,109,101])]:p([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[p([102,101,97,116,117,114,101,115])];return!(!e||!e[p([105,110,99,108,117,100,101,115])](p([42]))&&!e[p([105,110,99,108,117,100,101,115])](p([70,79,79])))}()?function(){const e=[p([101,118,97,108,117,97,116,105,111,110]),p([116,114,105,97,108])][p([105,110,99,108,117,100,101,115])](t[p([108,105,99,101,110,115,101,84,121,112,101])])?o/1e3:1772582400;return t[p([101,120,112])]<e}()?p([69,120,112,105,114,101,100]):function(){const e=t[p([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[p([108,101,110,103,116,104])])return!0;const{hostname:o}=new URL(window[p([108,111,99,97,116,105,111,110])].href);if(e[p([105,110,99,108,117,100,101,115])](o))return!0;const n=o[p([115,112,108,105,116])](p([46]));return e[p([102,105,108,116,101,114])](t=>t[p([105,110,99,108,117,100,101,115])](p([42])))[p([109,97,112])](t=>t[p([115,112,108,105,116])](p([46])))[p([102,105,108,116,101,114])](t=>t[p([108,101,110,103,116,104])]<=n[p([108,101,110,103,116,104])])[p([109,97,112])](t=>Array(n[p([108,101,110,103,116,104])]-t[p([108,101,110,103,116,104])])[p([102,105,108,108])](t[0]===p([42])?p([42]):"")[p([99,111,110,99,97,116])](t))[p([115,111,109,101])](t=>n[p([101,118,101,114,121])]((e,o)=>t[o]===e||t[o]===p([42])))}()?(t[p([108,105,99,101,110,115,101,84,121,112,101])]==p([101,118,97,108,117,97,116,105,111,110])&&(e=function(t){const e=[new(window[p([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[p([116,104,101,110])](()=>new(window[p([80,114,111,109,105,115,101])])(t=>{let e=0;n[p([109,111,100,101,108])][p([111,110])](p([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(o,n)=>{n[0][p([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,1512==e&&(t(),o[p([111,102,102])]())})}))];return window[p([80,114,111,109,105,115,101])][p([114,97,99,101])](e)[p([116,104,101,110])](()=>t)}(p([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),await(e&&h?new(window[p([80,114,111,109,105,115,101])])((t,o)=>{e[p([116,104,101,110])](t,o),h[p([116,104,101,110])](e=>{e!=p([86,97,108,105,100])&&t(e)},o)}):e||h||p([86,97,108,105,100]))):p([68,111,109,97,105,110,76,105,109,105,116]):p([78,111,116,65,108,108,111,119,101,100]):p([73,110,118,97,108,105,100])):p([73,110,118,97,108,105,100]))}catch{return p([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),o.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:o,model:n}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(n.change(t=>{t.setSelection(i.reference,"on")}),o.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:o,editing:n}=t,{t:i}=t.locale;o.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:o})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;o.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of n.view.createRangeIn(i))t.is("$textProxy")?o.consume(t.textNode,{name:!0}):t.is("element")&&o.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),o.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>E(t,e)}),o.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:o})=>{const n=t.getAttribute("footnoteCounter");return(0,e.toWidget)(E(t,o),o,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",n)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:o}=t.locale,{conversion:n}=t;n.for("upcast").elementToElement({view:{name:"div",classes:"footnotes"},model:"footnotesDefinitions"}),n.for("upcast").add(t=>{t.on("element:ol",(t,e,o)=>{const n=e.viewItem;if(!n.hasClass("footnotes-list")||!e.modelCursor.parent?.is("element","footnotesDefinitions"))return;if(!o.consumable.consume(n,{name:!0,classes:"footnotes-list"}))return;const{modelRange:i,modelCursor:s}=o.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=s}),t.on("element:hr",(t,e,o)=>{const n=e.viewItem;n.hasClass("footnotes-divider")&&e.modelCursor.parent?.is("element","footnotesDefinitions")&&o.consumable.consume(n,{name:!0,classes:"footnotes-divider"})})}),n.for("dataDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:e})=>x(e)}),n.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:n})=>{const i=x(n,{"data-footnotes-list-label":o("Footnotes")}),s=(0,e.toWidget)(i,n,{hasSelectionHandle:!0,label:o("Footnotes")});return n.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:o}=t,n=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,o)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes-list"))return;if(!o.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=o.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!o.safeInsert(r,e.modelCursor))return;o.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(o.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),o.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(n)o.convertChildren(a,r);else{const t=o.writer.createElement("footnoteInlineContent");o.writer.insert(t,r),o.convertChildren(a,t)}o.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(t,e,o,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>S(t,e,o)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const o=t.document.differ,n=new Set;for(const t of o.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&n.add(e)}for(const t of n.values()){const o=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of o)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const o=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:o,t:n}=t,i=t.model.document.selection;t.keystrokes.set("Ctrl+Alt+F","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert footnote"),keystroke:"Ctrl+Alt+F"}]}),this.listenTo(o.view.document,"enter",(t,e)=>{const o=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(o){const n=o.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(n),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let o=!1;this.listenTo(e.view.document,"pointerdown",(t,n)=>{const{target:i}=n,s=e.view.document.selection;o=!!(i?.is("element","a")&&i.parent?.is("element","sup")&&i.parent.hasClass("footnote"))&&s.getSelectedElement()===i.parent},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n?.is("element","a"))return;if(n.parent?.is("element","sup")&&n.parent.hasClass("footnote")&&!o)return void e.preventDefault();let i=n.getAttribute("href");if(!i?.startsWith("#"))return;i=i.slice(1);let s=!1;(i.startsWith("ref-")&&this._moveSelectionToFootnoteReference(i.slice(4))||this._moveSelectionToFootnoteDefinition(i))&&(s=!0),s&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:o})=>{if(!k(e))return null;if(!t)return o.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const n=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const o=e.toViewElement(t);return!!o&&k(t)!==o.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function x(t,e={}){const o=t.createEmptyElement("hr",{class:"footnotes-divider"}),n=t.createContainerElement("ol",{class:"footnotes-list"},t.createSlot());return t.createContainerElement("div",{class:"footnotes",...e},[o,n])}function E(t,e){const o=t.getAttribute("footnoteId"),n=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{href:"#"+o},function(t){const e=this.toDomElement(t);return e.textContent=n,e}),s=e.createContainerElement("sup",{id:"ref-"+o,class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function S(t,o,n,{dataPipeline:i}={}){const{t:s}=n,r=t.getAttribute("footnoteId"),a=o.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?o.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(o.createEditableElement("div",{class:"footnote-content"}),o,{label:s("Footnote content.")});return o.insert(o.createPositionAt(c,0),o.createSlot()),o.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var T=o(331);const P=L;function A(){const t=["30yLdgSV","pluginName","includes","_insertEmptyFootnotesDefinitionsContainer","editor","getFootnote","method","init","toModel","cloneElement","3662795NaSAbf","isPremiumPlugin","6019264DTToej","769015mxvYTy","dataTransfer","change","setData","content","732810OkgdYH","FootnotesClipboard","footnotes.multiBlock","7xVgTEo","string","parse","append","hasAttribute","requires","footnoteRef","listenTo","createRangeIn","getFootnotes","setAttribute","sourceEditorId","editing","config","clipboardInput","create","add","selection","application/ckeditor5-footnotes","194296HlTxtE","9598430EAbCvv","stringify","from","drop","keys","element","get","createElement","root","length","_handlePasteFootnotesDefinitions","reduce","getChildren","isOfficialPlugin","contentInsertion","outputTransformation","flatMap","footnoteDefinition","getFootnotesDefinitionsObjectElement","getSelectedBlocks","end","find","862956CKtXhn","footnoteInlineContent","toView","data","footnotesDefinitions","htmlProcessor","getData","getFirstRange","_defineClipboardIntegration","getAttribute","2ZypnTW","entries","push","footnoteId","insert","toData","_handleCopyFootnotesDefinitions","remove","getRanges","definition","document"];return(A=function(){return t})()}!function(t){const e=L,o=t();for(;;)try{if(478398===parseInt(e(535))/1*(-parseInt(e(511))/2)+-parseInt(e(522))/3*(-parseInt(e(562))/4)+-parseInt(e(532))/5+-parseInt(e(540))/6+-parseInt(e(543))/7*(-parseInt(e(534))/8)+-parseInt(e(501))/9+parseInt(e(479))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(A);class D extends t.Plugin{static get[P(523)](){return P(541)}static get[P(548)](){return[v,T.ClipboardPipeline]}static get[P(492)](){return!0}static get[P(533)](){return!0}[P(529)](){this[P(509)]()}[P(509)](){const t=P;this[t(517)](),this[t(489)]()}[P(517)](){const t=P,{editor:e}=this,{plugins:o,model:n}=e,i=o[t(485)](T.ClipboardPipeline),s=o[t(485)](d);this[t(550)](i,t(494),(o,i)=>{const r=t,a=V(n[r(551)](i[r(539)]));if(!a[r(488)])return;const c=s[r(552)](),l=a[r(490)]((t,o)=>{const n=r,i=c[n(500)](t=>t.id===o);if(i){const o=e[n(504)][n(503)](i[n(520)],{isClipboardPipeline:!0}),s=e[n(504)][n(506)][n(516)](o);t[i.id]=s}return t},Object[r(558)](null));i[r(536)][r(538)](r(561),JSON[r(480)](l))})}[P(489)](){const t=P,{editor:e}=this,{model:o,plugins:n}=e,{view:s}=e[t(555)],r=n[t(485)](T.ClipboardPipeline),a=n[t(485)](d),c=e[t(556)][t(485)](t(542));let l=null;this[t(550)](s[t(521)],t(557),(e,o)=>{const n=t,i=o[n(536)][n(507)](n(561));l=i?JSON[n(545)](i):null}),this[t(550)](r,t(493),(n,s)=>{const r=t,u=s[r(554)]===this[r(526)].id;u&&r(482)===s[r(528)]||o[r(537)](t=>{const n=r;let f=a[n(497)]();const d=!!f&&Array[n(481)](o[n(521)][n(560)][n(498)]())[n(524)](f);if(!l&&function(t){const e=n;for(const{item:o}of t)if(o.is(e(484),e(549)))return!0;return!1}(o[n(551)](s[n(539)]))&&(l=function(t,e){const o=n,i=_(t,e);if(!i)return null;const s=Object[o(558)](null);for(const e of i[o(491)]())e.is(o(484),o(496))&&e[o(547)](o(514))&&(s[e[o(510)](o(514))]=t[o(531)](e,!0));return Object[o(483)](s)[o(488)]?s:null}(t,s[n(539)])),(f&&!d||!f&&!l)&&function(t,e){const o=n,i=[];for(const{item:n}of t[o(551)](e))n.is(o(484),o(505))&&i[o(513)](n);for(const e of i)t[o(518)](e)}(t,s[n(539)]),!l)return;const{selection:h}=o[n(521)],p=h[n(508)]()[n(487)];f&&!d||(f=_(t,s[n(539)]),f||=a[n(525)](t,p));const m=Array[n(481)](h[n(519)]())[n(495)](V),g=function(t,e,o){const s=n,r=Object[s(558)](null);for(const{item:n}of t[s(551)](e))if(n.is(s(484),s(549))){const e=n[s(510)](s(514));if(!o(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(553)](s(514),r[e],n)}return r}(t,s[n(539)],t=>{const e=n;return!u||!!a[e(527)](t)&&!m[e(524)](t)});for(const[o,i]of Object[n(512)](l)){const s=g[o]||o;let r;if(n(544)!=typeof i)r=i,s!==o&&t[n(553)](n(514),s,r);else{r=t[n(486)](n(496),{footnoteId:s});const o=e[n(504)][n(506)][n(503)](i);let a;if(c)a=e[n(504)][n(530)](o,r);else{a=t[n(486)](n(502));const i=e[n(504)][n(530)](o,a);t[n(515)](i,a)}t[n(546)](a,r)}t[n(515)](r,f,n(499))}l=null})})}}function _(t,e){const o=P;for(const{item:n}of t[o(551)](e))if(n.is(o(484),o(505)))return n;return null}function L(t,e){const o=A();return(L=function(t,e){return o[t-=479]})(t,e)}function V(t){const e=P,o=new Set;for(const{item:n}of t)n.is(e(484),e(549))&&o[e(559)](n[e(510)](e(514)));return Array[e(481)](o)}var O=o(311),N=o(355),R=o(929),K=o.n(R),j=o(297),M=o.n(j),B=o(102),H=o.n(B),W=o(123),z=o.n(W),U=o(741),q=o.n(U),J=o(728),X={attributes:{"data-cke":!0}};X.setAttributes=z(),X.insert=H().bind(null,"head"),X.domAPI=M(),X.insertStyleElement=q();K()(J.A,X);J.A&&J.A.locals&&J.A.locals;class Z 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,O.ButtonView)),e.add("menuBar:insertFootnote",G(t,O.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const o=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in o){const n=e,i=o[n];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete o[n],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&o._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&o._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&o._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&o._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&o._showLicenseError("evaluationLimit"),"footnotesLicenseKeyUsageLimit"==t&&o._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function G(t,e){const o=t.commands.get("insertFootnote");return n=>{const{t:i}=n,s=new e(n),r=s instanceof O.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(o,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:N.IconFootnote,tooltip:!0}),s.on("execute",()=>{o.execute(),t.editing.view.focus()}),s}}function Q(){var t=["3953730lkJHjG","282hfqxBd","8CNOOOS","isOfficialPlugin","1udjrbv","pluginName","387772KfgSyZ","2155EtraKH","Footnotes","1358287IyxsZG","383878pHvoqL","isPremiumPlugin","requires","200052RisVkX","168135uZIInb"];return(Q=function(){return t})()}var Y=$;function $(t,e){var o=Q();return($=function(t,e){return o[t-=473]})(t,e)}!function(t){for(var e=$,o=t();;)try{if(101110===-parseInt(e(480))/1*(-parseInt(e(486))/2)+parseInt(e(475))/3+parseInt(e(482))/4+parseInt(e(483))/5*(-parseInt(e(477))/6)+-parseInt(e(485))/7*(-parseInt(e(478))/8)+-parseInt(e(474))/9+-parseInt(e(476))/10)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Q);class tt extends t.Plugin{static get[Y(481)](){return Y(484)}static get[Y(473)](){return[v,D,Z]}static get[Y(479)](){return!0}static get[Y(487)](){return!0}}function et(){const t=["644ZcrFHu","939ZGWewj","24zpzajp","65097eCLhtB","40286QSwETS","upper-roman","14YqInGO","lower-roman","13792rzlDLY","decimal-leading-zero","2919191ZkMLbt","upper-latin","upper-alpha","decimal","30758IWNbCS","320765OVcDgr","12GSEsST","630ZtFaXk","6foRmJW","lower-latin","lower-alpha","2111848iFxsFe"];return(et=function(){return t})()}const ot=nt;function nt(t,e){const o=et();return(nt=function(t,e){return o[t-=429]})(t,e)}!function(t){const e=nt,o=t();for(;;)try{if(615901===-parseInt(e(438))/1*(parseInt(e(436))/2)+parseInt(e(435))/3*(parseInt(e(442))/4)+parseInt(e(449))/5*(-parseInt(e(430))/6)+parseInt(e(440))/7*(-parseInt(e(433))/8)+-parseInt(e(437))/9*(-parseInt(e(429))/10)+-parseInt(e(444))/11*(-parseInt(e(450))/12)+parseInt(e(448))/13*(-parseInt(e(434))/14))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(et);const it=[ot(447),ot(443),ot(431),ot(445),ot(432),ot(446),ot(441),ot(439)],st=rt;function rt(t,e){const o=at();return(rt=function(t,e){return o[t-=296]})(t,e)}function at(){const t=["model","6341533XswjfX","545bGNBdT","2836MamoAH","9mqPIDT","isEnabled","4469500Zaprrb","setAttribute","1311615ynvPyN","execute","2bNfhVS","getAttribute","12hAABvg","_updateFootnotesCounters","includes","plugins","262264KxlgPq","refresh","2605UKPrwy","footnotesListStyle","value","get","2207380rsdKcm","getFootnotesDefinitionsObjectElement","change"];return(at=function(){return t})()}!function(t){const e=rt,o=t();for(;;)try{if(370131===parseInt(e(316))/1+-parseInt(e(308))/2*(parseInt(e(306))/3)+parseInt(e(301))/4*(parseInt(e(300))/5)+-parseInt(e(310))/6*(-parseInt(e(320))/7)+parseInt(e(314))/8*(-parseInt(e(302))/9)+-parseInt(e(304))/10+parseInt(e(299))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(at);class ct extends t.Command{[st(315)](){const t=st,{editor:e}=this,o=e[t(313)][t(319)](d)[t(296)]();this[t(303)]=!!o,this[t(318)]=o?.[t(309)](t(317))??null}[st(307)]({value:t}){const e=st,{editor:o}=this,n=o[e(313)][e(319)](d),i=n[e(296)]();i&&it[e(312)](t)&&o[e(298)][e(297)](o=>{const s=e;o[s(305)](s(317),t,i),n[s(311)](o)})}}function lt(t,e){const o=ut();return(lt=function(t,e){return o[t-=297]})(t,e)}function ut(){const t=["531WxnQPR","refresh","plugins","448642UuxyOE","change","_updateFootnotesCounters","4SEqBxt","footnotesListStart","18880azeFKv","977620ESeSte","execute","value","3112096LtPNvZ","750356LAhAJC","isInteger","setAttribute","getFootnotesDefinitionsObjectElement","get","2807328zeiLYp","9642143fJYlry","isEnabled","getAttribute","model","3bQDZth"];return(ut=function(){return t})()}const ft=lt;!function(t){const e=lt,o=t();for(;;)try{if(830762===parseInt(e(320))/1*(-parseInt(e(317))/2)+parseInt(e(313))/3*(parseInt(e(303))/4)+parseInt(e(299))/5+parseInt(e(308))/6+parseInt(e(309))/7+-parseInt(e(302))/8+parseInt(e(314))/9*(-parseInt(e(298))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ut);class dt extends t.Command{[ft(315)](){const t=ft,{editor:e}=this,o=e[t(316)][t(307)](d)[t(306)]();this[t(310)]=!!o,this[t(301)]=o?.[t(311)](t(297))??null}[ft(300)]({value:t}){const e=ft,{editor:o}=this,n=o[e(316)][e(307)](d),i=n[e(306)]();i&&Number[e(304)](t)&&o[e(312)][e(318)](o=>{const s=e;o[s(305)](s(297),t,i),n[s(319)](o)})}}function ht(){const t=["$text","footnotes.footnotesProperties.defaultStartIndex","writer","parent","footnotes.footnotesProperties.defaultListStyle","removeAttribute","upper-alpha","downcast","item","model","10fAsgDE","from","setAttribute","setFootnoteFormatter","6144614npgGHe","for","upper-roman","init","start","createRangeOn","schema","31613164iaHCxs","pluginName","find","lower-latin","add","_getDefaultStartIndex","commands","padStart","registerPostFixer","requires","fromCharCode","attribute:footnotesListStart:footnotesDefinitions","608031JHVoUh","footnotes-list","parseInt","element:ol","2173512AuAWxx","toUpperCase","nodeAfter","136ANxbJF","floor","consume","document","setStyle","toLowerCase","isOfficialPlugin","5elgVcD","13497qFhsNh","insert","toViewElement","define","_updateFootnotesCounters","extend","getAttribute","max","viewItem","upper-latin","lower-alpha","decimal-leading-zero","decimal","footnotesListStart","getStyle","isNaN","footnotesStyle","type","getChildren","position","_defineConverters","modelCursor","editor","footnotesStart","hasAttribute","_defineFormatter","footnotesListStyle","consumable","name","hasClass","_getDefaultListStyle","plugins","footnotesDefinitions","checkAttribute","isPremiumPlugin","differ","lower-roman","134pMOsAK","upcast","element","3079338DVhWmW","_definePostfixer","removeStyle","mapper","FootnotesPropertiesEditing","3458656lFweQN","attribute:footnotesListStyle:footnotesDefinitions","config","_formatFootnoteListValue","getItems","getChanges","list-style-type","_defineSchema","get"];return(ht=function(){return t})()}const pt=mt;function mt(t,e){const o=ht();return(mt=function(t,e){return o[t-=337]})(t,e)}!function(t){const e=mt,o=t();for(;;)try{if(580714===-parseInt(e(356))/1*(-parseInt(e(393))/2)+parseInt(e(396))/3+-parseInt(e(401))/4+parseInt(e(355))/5*(parseInt(e(345))/6)+parseInt(e(424))/7+parseInt(e(348))/8*(parseInt(e(341))/9)+-parseInt(e(420))/10*(parseInt(e(431))/11))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(ht);class gt extends t.Plugin{static get[pt(432)](){return pt(400)}static get[pt(338)](){return[v,d]}static get[pt(354)](){return!0}static get[pt(390)](){return!0}[pt(427)](){const t=pt,{editor:e}=this;e[t(403)][t(359)](t(414),t(368)),e[t(403)][t(359)](t(411),1),e[t(437)][t(435)](t(372),new ct(e)),e[t(437)][t(435)](t(379),new dt(e)),this[t(408)](),this[t(376)](),this[t(381)](),this[t(397)]()}[pt(408)](){const t=pt,{editor:e}=this,{schema:o}=e[t(419)];o[t(361)](t(388),{allowAttributes:[t(382),t(369)]})}[pt(376)](){const t=pt,{editor:e}=this,{conversion:o,model:n}=e,{schema:i}=n;o[t(425)](t(394))[t(435)](e=>{const o=t;e.on(o(344),(t,e,n)=>{const s=o,r=e[s(364)],a=e[s(377)]?.[s(413)];r[s(385)](s(342))&&a?.is(s(395),s(388))&&(function(t,e,o,n){const i=s;if(!n[i(389)](e,i(369)))return;let r=1;const a=o[i(383)][i(350)](t,{attributes:i(428)});if(a){const e=Number[i(343)](t[i(362)](i(428)),10);Number[i(371)](e)||(r=e)}!a&&e[i(380)](i(369))||o[i(412)][i(422)](i(369),r,e)}(r,a,n,i),function(t,e,o,n){const i=s;if(!n[i(389)](e,i(382)))return;let r=i(368),a=!1;if(o[i(383)][i(350)](t,{attributes:i(373)})){const e={1:i(368),a:i(366),A:i(416),i:i(392),I:i(426)}[t[i(362)](i(373))];e&&(r=e),a=!0}o[i(383)][i(350)](t,{styles:i(407)})&&(r=function(t){const e=i;switch(t){case e(366):return e(434);case e(416):return e(365);default:return t}}(t[i(370)](i(407))),a=!0),!a&&e[i(380)](i(382))||o[i(412)][i(422)](i(382),r,e)}(r,a,n,i))})}),o[t(425)](t(417))[t(435)](e=>{const o=t;e.on(o(340),(t,e,n)=>{const i=o;if(!n[i(383)][i(350)](e[i(418)],t[i(384)]))return;const s=wt(e[i(418)],n[i(399)]),{attributeNewValue:r}=e;null==r||1===r?n[i(412)][i(415)](i(428),s):n[i(412)][i(422)](i(428),String(r),s)}),e.on(o(402),(t,e,n)=>{const i=o;if(!n[i(383)][i(350)](e[i(418)],t[i(384)]))return;const s=wt(e[i(418)],n[i(399)]),{attributeNewValue:r}=e;r&&i(368)!==r?n[i(412)][i(352)](i(407),r,s):n[i(412)][i(398)](i(407),s)})})}[pt(397)](){const t=pt,{editor:e}=this,{model:o}=e,n=e[t(387)][t(409)](d),i=this[t(386)](),s=this[t(436)]();o[t(351)][t(337)](e=>{const r=t,a=o[r(351)][r(391)][r(406)]();let c=!1;for(const t of a){if(r(357)!==t[r(373)]||r(410)===t[r(384)])continue;const n=o[r(429)](t[r(375)][r(347)]);for(const t of n[r(405)]())t.is(r(395),r(388))&&(!t[r(380)](r(369))&&o[r(430)][r(389)](t,r(369))&&(e[r(422)](r(369),s,t),c=!0),!t[r(380)](r(382))&&o[r(430)][r(389)](t,r(382))&&(e[r(422)](r(382),i,t),c=!0))}return c&&n[r(360)](e),c})}[pt(381)](){const t=pt,{editor:e}=this;e[t(387)][t(409)](d)[t(423)](e=>this[t(404)](e))}[pt(386)](){const t=pt;return this[t(378)][t(403)][t(409)](t(414))}[pt(436)](){const t=pt;return this[t(378)][t(403)][t(409)](t(411))}[pt(404)]({container:t,value:e,digits:o}){const n=pt,i=t[n(362)](n(382)),s=t[n(362)](n(369)),r=Math[n(349)](e)+(s??1)-1;switch(i){case n(367):return function(t,e){const o=n;return String(t)[o(438)](e,"0")}(r,Math[n(363)](2,o));case n(366):case n(434):return yt(r,!1);case n(416):case n(365):return yt(r,!0);case n(392):return vt(r,!1);case n(426):return vt(r,!0);default:return String(r)}}}function wt(t,e){const o=pt,n=e[o(358)](t);return Array[o(421)](n[o(374)]())[o(433)](t=>t.is(o(395),"ol")&&t[o(385)](o(342)))}function yt(t,e){const o=pt;let n="",i=t;for(;i>0;){const t=(i-1)%26;n=String[o(339)](97+t)+n,i=Math[o(349)]((i-1)/26)}return e?n[o(346)]():n}const bt=[{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 vt(t,e){const o=pt;let n="",i=t;for(const{value:t,numeral:e}of bt)for(;i>=t;)n+=e,i-=t;return e?n:n[o(353)]()}class It extends O.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new O.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:o}){super(t),this.focusCycler=new O.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,O.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 O.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 O.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 O.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 O.LabeledFieldView(this.locale,O.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,max:Math.pow(2,30),step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const o=e.fieldView.element,n=o.valueAsNumber;Number.isNaN(n)?e.errorText=t("Invalid footnotes start index value."):o.checkValidity()?this.fire("footnotesListStart",{startIndex:n}):e.errorText=t(n<0?"Footnotes start index must be greater than 0.":"Footnotes start index is too large.")}),e}}var kt=o(291),Ct={attributes:{"data-cke":!0}};Ct.setAttributes=z(),Ct.insert=H().bind(null,"head"),Ct.domAPI=M(),Ct.insertStyleElement=q();K()(kt.A,Ct);kt.A&&kt.A.locals&&kt.A.locals;class Ft extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[O.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,O.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(n,"isEnabled"),s.set({label:e("Footnotes style"),icon:N.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:o}=t.locale,n=o("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:N.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:N.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:N.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:N.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:N.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:N.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:o,icon:n,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new O.ButtonView(e);return a.set({label:o,icon:n,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new It(t.locale,{styleGridAriaLabel:n,styleButtonViews:i}),r=t.commands.get("footnotesStart");return s.startIndexFieldView.bind("isEnabled").to(r),s.startIndexFieldView.fieldView.bind("value").to(r),s.on("footnotesListStart",(e,o)=>{t.execute("footnotesStart",{value:o.startIndex})}),s.delegate("execute").to(e),s}({editor:o,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:o}=t.locale,n=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=O.BalloonPanelView;n.register("footnotesDefinitions",{ariaLabel:o("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}var xt=St;function Et(){var t=["8JKcuiI","isOfficialPlugin","FootnotesProperties","pluginName","2665600bHMVwj","9224747vsXcLL","28081KBXayY","200xOjFrc","2802732WazlQk","48003xhIItg","356McTHIe","210969FdvcrV","isPremiumPlugin","requires","6577360kNdZdC"];return(Et=function(){return t})()}function St(t,e){var o=Et();return(St=function(t,e){return o[t-=199]})(t,e)}!function(t){for(var e=St,o=t();;)try{if(840427===parseInt(e(203))/1+-parseInt(e(201))/2+parseInt(e(206))/3*(-parseInt(e(207))/4)+parseInt(e(211))/5+parseInt(e(205))/6+-parseInt(e(202))/7*(-parseInt(e(212))/8)+parseInt(e(208))/9*(parseInt(e(204))/10))break;o.push(o.shift())}catch(t){o.push(o.shift())}}(Et);class Tt extends t.Plugin{static get[xt(200)](){return xt(199)}static get[xt(210)](){return[gt,Ft]}static get[xt(213)](){return!0}static get[xt(209)](){return!0}}function Pt(t,e){var o=At();return(Pt=function(t,e){return o[t-=491]})(t,e)}function At(){var t=["30957iIkOqW","427299AhDxyQ","14pKTWmW","3730600GSQSIY","2097UodRHs","48UlTQyK","12898358FFrbwy","4JkqTxM","60486RVJBFg","11528BykLXy","150315stEOiw"];return(At=function(){return t})()}!function(t){for(var e=Pt,o=t();;)try{if(192652===parseInt(e(495))/1+parseInt(e(491))/2*(parseInt(e(496))/3)+-parseInt(e(500))/4*(-parseInt(e(494))/5)+-parseInt(e(492))/6*(parseInt(e(497))/7)+-parseInt(e(493))/8*(-parseInt(e(499))/9)+parseInt(e(498))/10+-parseInt(e(501))/11)break;o.push(o.shift())}catch(t){o.push(o.shift())}}(At)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=n})();
|