@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251020.0 → 0.0.0-nightly-20251021.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/footnotes.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +9 -9
- package/src/commands/insertfootnotecommand.js +1 -1
- package/src/footnotesediting.js +1 -1
- package/src/footnotesproperties/commands/footnotesstartcommand.js +1 -1
- package/src/footnotesproperties/commands/footnotesstylecommand.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/build/footnotes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md.
|
|
4
|
-
*/(()=>{var t={14:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,':root{--ck-footnotes-list-widget-label-background-color:#757575;--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small)}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:1.9em 0 1.5em;padding-inline-start:3em;position:relative}.ck-content .footnotes:before{border-top:1px solid var(--ck-content-footnotes-list-separator-color);content:"";left:0;position:absolute;top:-1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes:before{left:auto;right:0}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.ck.ck-editor__editable .footnote>a{pointer-events:none}.ck.ck-editor__editable .footnotes-wrapper{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes-wrapper:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-list-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-wrapper>.footnotes{margin-bottom:.65em;margin-top:1em}',""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=o.base?c[0]+o.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=n(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=o(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var c=o(t,i),l=0;l<s.length;l++){var u=n(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function o(t,e,o,i){var s;if(o)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,n=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(n,e,!1,t)},remove:function(t){o(n,e,!0,t)}}}},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},901:(t,e,n)=>{t.exports=n(237)("./src/widget.js")},945:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Footnotes:()=>J,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>St,FootnotesPropertiesEditing:()=>dt,FootnotesPropertiesUI:()=>It,FootnotesStartCommand:()=>lt,FootnotesStyleCommand:()=>it,FootnotesTracker:()=>d,FootnotesUI:()=>H,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);const r=c;function a(){const t=["1987443mGKNwE","96768GWXPSd","nodeAfter","elementName","add","_model","from","3695CEveea","_elementName","reset","delete","attributes","_getElementKey","5LiXiwq","15ChFttD","2229115AJOybm","insert","2227074ZnXqsW","type","slice","length","name","$text","position","13511575xYfwTY","remove","$graveyard","rootName","248fVjuRh","getElementKey","flat","get","root","push","createRangeOn","10NrhGRk","getChanges","_trackedElements","getItems","901296ucPNfX","element","set","has","values","clear"];return(a=function(){return t})()}function c(t,e){const n=a();return(c=function(t,e){return n[t-=432]})(t,e)}!function(t){const e=c,n=t();for(;;)try{if(309646===parseInt(e(460))/1*(-parseInt(e(436))/2)+-parseInt(e(467))/3*(-parseInt(e(454))/4)+parseInt(e(466))/5*(-parseInt(e(470))/6)+-parseInt(e(468))/7+-parseInt(e(447))/8+parseInt(e(453))/9+-parseInt(e(443))/10*(-parseInt(e(432))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(a);class l{[r(458)];[r(461)];[r(465)];[r(445)]=new Map;constructor(t,e){const n=r;this[n(458)]=t,this[n(461)]=e[n(456)],this[n(465)]=e[n(437)]}[r(462)](){const t=r;this[t(445)][t(452)]()}[r(444)](t){const e=r,n=new Set,o=new Map;for(const i of t){if(e(469)===i[e(471)]&&e(475)!==i[e(474)]&&i[e(476)][e(455)]){const t=this[e(458)][e(442)](i[e(476)][e(455)]);for(const n of t[e(446)]()){if(!n.is(e(448),this[e(461)]))continue;const t=this[e(465)](n);o[e(450)](t)||o[e(449)](t,[]),o[e(439)](t)[e(441)](n)}}if(e(433)===i[e(471)]&&i[e(474)]===this[e(461)]){const t=this[e(465)]({getAttribute:t=>i[e(464)][e(439)](t)});n[e(457)](t)}}for(const[t,o]of this[e(445)])e(434)===o[e(440)][e(435)]&&n[e(457)](t);for(const t of n)this[e(445)][e(463)](t);for(const[t,n]of o)this[e(445)][e(449)](t,n[n[e(473)]-1]);const i=new Set;for(const[t,s]of o)n[e(450)](t)&&(i[e(457)](s[0]),s[e(473)]>1?o[e(449)](t,s[e(472)](1)):o[e(463)](t),n[e(463)](t));return{removed:Array[e(459)](n),inserted:Array[e(459)](o[e(451)]())[e(438)](),moved:Array[e(459)](i)}}}function u(){const t=["set","has","reset","13012mNoIBF","_footnotesDefinitions","move","filter","differ","_sortFootnoteDefinitions","isOfficialPlugin","isEqual","map","document","add","push","definition","registerPostFixer","_ensureFootnotesReferencesHaveProperOrder","createRangeIn","654600tNHQsz","588rUSEFY","getChanges","$graveyard","getRootNames","144aLSHUM","reference","model","splice","_footnoteFormatter","min","createRangeOn","_footnotes","159ADvvFD","footnoteDefinition","FootnotesTracker","_footnoteRefsTracker","footnoteInlineContent","pluginName","enqueueChange","350077qTmrdc","footnotes.multiBlock","after","editor","createPositionAt","getChildren","createPositionBefore","end","rootName","childCount","footnoteCounter","72807NPPGoq","setAttribute","getFootnotesFormatter","change:data","indexOf","low","from","remove","isPremiumPlugin","before","_handleFootnoteDefinitionsChanges","18mPCItM","createElement","73348Szimwn","parent","append","_handleFootnotesDefinitionsObjectChanges","length","footnotesDefinitions","getFootnotes","getFootnote","_handleFootnotesDefinitionsObjectSync","_insertEmptyFootnotesDefinitionsContainer","listenTo","some","footnoteId","unshift","24puAGun","_ensureFootnotesDefinitionsContainerExists","_updateFootnoteRefCounter","config","findIndex","_handleInsertedFootnoteReference","953815PwlAzJ","10JpijQX","setFootnoteFormatter","_updateFootnotesCounters","root","compareWith","_footnoteDefsTracker","155510pSevtr","footnoteRef","_footnoteDefsContainerTracker","112IdstGq","_handleRemoveFootnoteReferenceById","high","paragraph","_handleFootnoteReferencesChanges","singleton","find","get","init","insert","_handleMovedFootnoteReference","getAttribute","getFootnotesDefinitionsObjectElement"];return(u=function(){return t})()}const f=h;!function(t){const e=h,n=t();for(;;)try{if(411555===-parseInt(e(448))/1*(parseInt(e(442))/2)+-parseInt(e(390))/3*(parseInt(e(361))/4)+parseInt(e(441))/5*(parseInt(e(435))/6)+-parseInt(e(408))/7*(-parseInt(e(382))/8)+-parseInt(e(419))/9*(parseInt(e(377))/10)+-parseInt(e(421))/11*(-parseInt(e(378))/12)+-parseInt(e(397))/13*(-parseInt(e(451))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(u);class d extends t.Plugin{[f(389)]=[];[f(362)]=null;[f(386)]=null;[f(450)];[f(393)];[f(447)];static get[f(395)](){return f(392)}static get[f(367)](){return!0}static get[f(416)](){return!0}constructor(t){const e=f;super(t),this[e(450)]=new l(this[e(400)][e(384)],{elementName:e(426),getElementKey:()=>e(350)}),this[e(393)]=new l(this[e(400)][e(384)],{elementName:e(449),getElementKey:t=>t[e(356)](e(433))}),this[e(447)]=new l(this[e(400)][e(384)],{elementName:e(391),getElementKey:t=>t[e(356)](e(433))})}[f(353)](){const t=f,{editor:e}=this,{model:n,data:o}=e;n[t(370)][t(374)](e=>{const o=t,i=n[o(370)][o(365)][o(379)]();let s=!1;return this[o(424)](e,i)&&(s=!0),this[o(418)](e,i)&&(s=!0),this[o(349)](e,i)&&(s=!0),this[o(375)](e)&&(s=!0),this[o(429)](e)&&(s=!0),this[o(366)](e)&&(s=!0),s}),this[t(431)](n[t(370)],t(411),()=>{const e=t;n[e(396)]({isUndoable:!1},t=>{this[e(436)](t)})},{priority:t(413)}),this[t(431)](o,t(358),()=>{const e=t;this[e(389)]=[],this[e(450)][e(360)](),this[e(393)][e(360)](),this[e(447)][e(360)]()},{priority:t(453)})}[f(357)](){return this[f(362)]}[f(428)](t){const e=f;return this[e(389)][e(351)](e=>e.id===t)||null}[f(427)](){const t=f;return Array[t(414)](this[t(389)])}[f(410)](){return this[f(386)]}[f(443)](t){this[f(386)]=t}[f(444)](t,e=0){const n=f;let o=!1;for(let i=e;i<this[n(389)][n(425)];i++)this[n(437)](t,i)&&(o=!0);return o}[f(430)](t,e){const n=f,o=t[n(420)](n(426),{});return t[n(423)](o,e),this[n(362)]=o,o}[f(436)](t){const e=f;if(!this[e(389)][e(425)]||this[e(362)])return;const n=this[e(389)][0][e(383)][e(445)],o=this[e(430)](t,n);for(const n of this[e(389)])n[e(373)][e(422)]||t[e(354)](n[e(373)],o,e(404));this[e(444)](t)}[f(424)](t,e){const n=f;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(450)][n(379)](e);if(r[n(425)]&&(this[n(362)]=r[0]),i[n(425)])if(i[n(425)]>1||this[n(362)]&&i[n(432)](t=>t!==this[n(362)])){const e=t[n(420)](n(426),{}),s=[];this[n(362)]&&s[n(372)](this[n(362)]),s[n(372)](...i),t[n(354)](e,s[0],n(417));for(const o of s)t[n(363)](t[n(376)](o),t[n(401)](e,n(404))),t[n(415)](o);this[n(362)]=e,this[n(444)](t),o=!0}else this[n(362)]=i[0];if(s[n(425)]&&n(380)===this[n(362)]?.[n(445)][n(405)]){for(const e of this[n(389)])t[n(415)](e[n(383)]),o=!0;this[n(389)]=[],this[n(362)]=null}return o}[f(418)](t,e){const n=f;let o=!1;const i=this[n(400)][n(438)][n(352)](n(398)),{inserted:s,moved:r}=this[n(447)][n(379)](e);for(const e of[...r,...s]){const s=e[n(356)](n(433)),r=this[n(428)](s);r&&(r[n(373)]=e),p(t,i,e)&&(o=!0)}return o}[f(349)](t,e){const n=f;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(393)][n(379)](e);for(const e of i)this[n(452)](t,e)&&(o=!0);for(const e of s)this[n(440)](t,e)&&(o=!0);for(const e of r)this[n(355)](t,e)&&(o=!0);return o}[f(429)](t){const e=f;if(!this[e(362)])return!1;let n=!1;if(this[e(362)][e(406)]!==this[e(389)][e(425)]){const o=[];for(const t of this[e(362)][e(402)]()){const i=t[e(356)](e(433));this[e(428)](i)||(o[e(434)](t),n=!0)}for(const n of o)t[e(415)](n)}const o=new Set,i=[];for(const t of this[e(362)][e(402)]()){const s=t[e(356)](e(433));o[e(359)](s)?(i[e(434)](t),n=!0):o[e(371)](s)}for(const n of i)t[e(415)](n);return this[e(362)][e(406)]||(t[e(415)](this[e(362)]),this[e(362)]=null,n=!0),n}[f(440)](t,e){const n=f;if(this[n(389)][n(351)](t=>t[n(383)]===e))return!1;let o=!1;const i=e[n(356)](n(433)),s=this[n(428)](i);s&&(t[n(415)](s[n(383)]),this[n(389)]=this[n(389)][n(364)](t=>t.id!==i),o=!0);let r=this[n(362)]?function(t,e){const o=n;for(const n of t[o(402)]())if(n[o(356)](o(433))===e)return n;return null}(this[n(362)],i):null;r||(r=t[n(420)](n(391),{footnoteId:i}),this[n(362)]&&(t[n(354)](r,this[n(362)],n(404)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(400)][n(384)],this[n(389)],e);return this[n(389)][n(385)](c,0,a),this[n(444)](t,c)&&(o=!0),o}[f(452)](t,e){const n=f,o=this[n(389)][n(439)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(389)][o];return n(380)!==s[n(373)][n(445)][n(405)]&&(t[n(415)](s[n(373)]),i=!0),this[n(389)][n(385)](o,1),this[n(444)](t,o)&&(i=!0),i}[f(355)](t,e){const n=f,o=e[n(356)](n(433)),i=this[n(389)][n(439)](t=>t.id===o),s=this[n(389)][i];let r=!1;s[n(383)]=e,this[n(389)][n(385)](i,1);const a=m(this[n(400)][n(384)],this[n(389)],e);return this[n(389)][n(385)](a,0,s),this[n(444)](t,Math[n(387)](i,a))&&(r=!0),r}[f(437)](t,e){const n=f;if(!this[n(362)])return!1;const o=this[n(389)][e];let i;return i=this[n(386)]?this[n(386)]({footnote:o,container:this[n(362)],digits:String(this[n(389)][n(425)])[n(425)],value:e+1}):String(e+1),o[n(383)][n(356)](n(407))!=i&&(t[n(409)](n(407),i,o[n(383)]),!0)}[f(366)](t){const e=f;if(!this[e(362)]||this[e(389)][e(425)]<2)return!1;if(function(t,n){const o=e;if(t[o(425)]!==n[o(425)])return!1;for(let e=0;e<t[o(425)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(389)][e(369)](t=>t.id),Array[e(414)](this[e(362)][e(402)]())[e(369)](t=>t[e(356)](e(433)))))return!1;let n=!1;for(let o=0;o<this[e(389)][e(425)];o++){const i=this[e(389)][o],s=t[e(403)](i[e(373)]),r=t[e(401)](this[e(362)],o);s[e(368)](r)||(t[e(363)](t[e(388)](i[e(373)]),r),n=!0)}return n}[f(375)](t){const e=f;if(!this[e(389)][e(425)])return!1;const{model:n}=this[e(400)];let o=!1;for(let i=0;i<this[e(389)][e(425)]-1;i++){const s=this[e(389)][i],r=this[e(389)][i+1],a=n[e(403)](s[e(383)]),c=n[e(403)](r[e(383)]);e(399)===a[e(446)](c)&&(this[e(355)](t,s[e(383)]),i=-1,o=!0)}return o}}function p(t,e,n){const o=f;if(n[o(406)])return!1;const i=o(e?454:394);return t[o(354)](t[o(420)](i),n),!0}function h(t,e){const n=u();return(h=function(t,e){return n[t-=349]})(t,e)}function m(t,e,n){const o=f;if(0===e[o(425)])return 0;const i=t[o(403)](n);for(let n=0;n<e[o(425)];n++){const s=e[n],r=t[o(403)](s[o(383)]);if(o(417)===i[o(446)](r))return n}const s=n[o(445)];let r=-1;for(let t=e[o(425)]-1;t>=0;t--)if(e[t][o(383)][o(445)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(370)][o(381)](),c=a[o(412)](s[o(405)]),l=a[c+1];if(l)for(let t=0;t<e[o(425)];t++)if(e[t][o(383)][o(445)][o(405)]===l)return t;return e[o(425)]}function g(){const t=["_moveSelectionToFootnoteDefinition","74VDsVBP","insert-footnote-command-executed-with-invalid-id","change","editor","execute","document","footnoteId","insertObject","FootnotesEditing","end","176056oOkvHH","length","selection","10NXAtai","checkChild","getFirstRange","20005TERwFD","get","378960ZiDfYK","2023884yivceV","6579564xPsqUY","footnoteRef","isObject","isEnabled","test","createElement","model","plugins","refresh","string","3892746PYXNLt","7WjjOkG","isBlock","3902589LZjEyI","_getPositionToInsertFootnote","getItems"];return(g=function(){return t})()}const w=y;function y(t,e){const n=g();return(y=function(t,e){return n[t-=214]})(t,e)}!function(t){const e=y,n=t();for(;;)try{if(660614===parseInt(e(234))/1*(-parseInt(e(218))/2)+parseInt(e(248))/3+-parseInt(e(237))/4+-parseInt(e(236))/5+parseInt(e(238))/6+parseInt(e(249))/7*(parseInt(e(228))/8)+parseInt(e(214))/9*(-parseInt(e(231))/10))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(g);class b extends t.Command{[w(246)](){const t=w,e=this[t(221)][t(244)][t(223)][t(230)],n=this[t(215)](e);this[t(241)]=!!n}[w(222)](t){const e=w,{editor:n}=this,{model:o}=n,{selection:s}=o[e(223)],r=this[e(215)](s);if(!r)return;const a=n[e(245)][e(235)](e(226)),c=t?.[e(224)]??(0,i.uid)();!function(t){const n=e;return n(247)==typeof t&&t[n(229)]>0&&!/\s/[n(242)](t)&&!/^\d/[n(242)](t)}(c)?(0,i.logWarning)(e(219)):(o[e(220)](t=>{const n=e,i=t[n(243)](n(239),{footnoteId:c});o[n(225)](i,r,null)}),a[e(217)](c))}[w(215)](t){const e=w,{model:n}=this[e(221)],{schema:o}=n,i=t[e(233)]();for(const t of i[e(216)]())if(o[e(250)](t)||o[e(240)](t))return null;const s=i[e(227)];return o[e(232)](s,e(239))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),n=window[m([68,97,116,101])][m([110,111,119])](),o=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{o[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=o[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;o[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,o)=>{o[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),n[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function n(t){for(let n=0;n<t[m([108,101,110,103,116,104])];n++){const o=t[m([99,104,97,114,67,111,100,101,65,116])](n);e=(e<<5)+e+o,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,o])=>{n(e),t(o)}):n(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function p(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function h(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const n=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let n=m([117]);for(let o=0;o<t[m([108,101,110,103,116,104])];o+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),n+=e[i]}return n}();o[n]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,o[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=h,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,o[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&n()?e:null;function n(){const t=e[m([106,116,105])],n=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),o={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete o[m([118,99])],f(o)==n}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),o[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function h(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(o){a(o)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(n-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),o=p(d(window[m([77,97,116,104])][m([99,101,105,108])](n/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,o)}function r(){const e=m([108,108,99,116,45])+d(f(t)),n=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return n?window[m([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,n)=>{t[m([116,104,101,110])](e,n),window[m([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,n)=>{if(n[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{h(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const o=a[m([115,112,108,105,116])](m([46])),[i,s,r]=o;return e(i),await n(i,s,r),t}catch{return!1}function e(e){const n=l(e);n&&n[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function n(e,n,o){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(o),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+n),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1760918400;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:n}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](n))return!0;const o=n[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=o[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(o[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>o[m([101,118,101,114,121])]((e,n)=>t[n]===e||t[n]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&h?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),h[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||h||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),n.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(i.reference,"on")}),n.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:n,editing:o}=t,{t:i}=t.locale;n.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:n})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;n.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of o.view.createRangeIn(i))t.is("$textProxy")?n.consume(t.textNode,{name:!0}):t.is("element")&&n.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),n.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>S(t,e)}),n.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:n})=>{const o=t.getAttribute("footnoteCounter");return(0,e.toWidget)(S(t,n),n,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",o)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:n}=t.locale,{conversion:o}=t;o.for("upcast").elementToElement({view:{name:"ol",classes:["footnotes"]},model:"footnotesDefinitions",converterPriority:"high"}),o.for("dataDowncast").elementToElement({model:"footnotesDefinitions",view:{name:"ol",classes:["footnotes"]}}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=o.createContainerElement("div",{class:"footnotes-wrapper","data-footnotes-list-label":n("Footnotes")},o.createContainerElement("ol",{class:"footnotes"},o.createSlot())),s=(0,e.toWidget)(i,o,{hasSelectionHandle:!0,label:n("Footnotes")});return o.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:n}=t,o=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,n)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes"))return;if(!n.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=n.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!n.safeInsert(r,e.modelCursor))return;n.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(n.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),n.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(o)n.convertChildren(a,r);else{const t=n.writer.createElement("footnoteInlineContent");n.writer.insert(t,r),n.convertChildren(a,t)}n.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>E(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>E(t,e,n)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of n)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const n=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:n,t:o}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Alt+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Alt+D"}]}),this.listenTo(n.view.document,"enter",(t,e)=>{const n=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(n){const o=n.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(o),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let n=!1;this.listenTo(e.view.document,"pointerdown",(t,o)=>{const{target:i}=o,s=e.view.document.selection;n=!(!i.is("element","sup")||!i.hasClass("footnote"))&&s.getSelectedElement()===i},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e,o=n.getChild(0).getAttribute("href");this._moveSelectionToFootnoteDefinition(o.slice(1)),t.stop(),e.preventDefault()},{priority:"high",context:t=>t.is("element","sup")&&t.hasClass("footnote")&&n}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n.is("element","a"))return;let o=n.getAttribute("href");if(!o?.startsWith("#"))return;o=o.slice(1);let i=!1;(o.startsWith("ref-")&&this._moveSelectionToFootnoteReference(o.slice(4))||this._moveSelectionToFootnoteDefinition(o))&&(i=!0),i&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:n})=>{if(!k(e))return null;if(!t)return n.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const o=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const n=e.toViewElement(t);return!!n&&k(t)!==n.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function S(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{id:"ref-"+n,href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function E(t,n,o,{dataPipeline:i}={}){const{t:s}=o,r=t.getAttribute("footnoteId"),a=n.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?n.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(n.createEditableElement("div",{class:"footnote-content"}),n,{label:s("Footnote content.")});return n.insert(n.createPositionAt(c,0),n.createSlot()),n.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var x=n(331);const P=A;function A(t,e){const n=_();return(A=function(t,e){return n[t-=124]})(t,e)}function _(){const t=["18517QawWeg","get","end","root","from","element","stringify","3813087QRxtJz","9727776YAkbvc","12fHTnfW","editing","setAttribute","51650SZisXE","footnoteRef","definition","toData","reduce","getAttribute","requires","editor","3487OQdSal","contentInsertion","6600350UTfZEd","htmlProcessor","getFootnote","outputTransformation","drop","content","_handleCopyFootnotesDefinitions","append","method","parse","toModel","4RQvbfH","entries","FootnotesClipboard","footnotesDefinitions","init","find","getData","12084633EzGbDM","footnoteId","_insertEmptyFootnotesDefinitionsContainer","change","getFootnotes","footnoteDefinition","remove","createRangeIn","sourceEditorId","_handlePasteFootnotesDefinitions","add","dataTransfer","pluginName","_defineClipboardIntegration","clipboardInput","toView","getFootnotesDefinitionsObjectElement","createElement","data","length","isPremiumPlugin","insert","2362598McsAkm","getFirstRange","selection","document","listenTo","setData","application/ckeditor5-footnotes","push","create","12dCPSCS","isOfficialPlugin"];return(_=function(){return t})()}!function(t){const e=A,n=t();for(;;)try{if(675369===-parseInt(e(188))/1*(parseInt(e(186))/2)+-parseInt(e(195))/3*(-parseInt(e(148))/4)+-parseInt(e(137))/5+-parseInt(e(124))/6*(parseInt(e(177))/7)+parseInt(e(196))/8+-parseInt(e(155))/9+-parseInt(e(127))/10*(-parseInt(e(135))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_);class D extends t.Plugin{static get[P(167)](){return P(150)}static get[P(133)](){return[v,x.ClipboardPipeline]}static get[P(187)](){return!0}static get[P(175)](){return!0}[P(152)](){this[P(168)]()}[P(168)](){const t=P;this[t(143)](),this[t(164)]()}[P(143)](){const t=P,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(189)](x.ClipboardPipeline),s=n[t(189)](d);this[t(181)](i,t(140),(n,i)=>{const r=t,a=function(t,e){const n=A,o=new Set;for(const{item:i}of t[n(162)](e))i.is(n(193),n(128))&&o[n(165)](i[n(132)](n(156)));return Array[n(192)](o)}(o,i[r(142)]);if(!a[r(174)])return;const c=s[r(159)](),l=a[r(131)]((t,n)=>{const o=r,i=c[o(153)](t=>t.id===n);if(i){const n=e[o(173)][o(170)](i[o(129)],{isClipboardPipeline:!0}),s=e[o(173)][o(138)][o(130)](n);t[i.id]=s}return t},Object[r(185)](null));i[r(166)][r(182)](r(183),JSON[r(194)](l))})}[P(164)](){const t=P,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(125)],r=o[t(189)](x.ClipboardPipeline),a=o[t(189)](d);let c=null;this[t(181)](s[t(180)],t(169),(e,n)=>{const o=t,i=n[o(166)][o(154)](o(183));c=i?JSON[o(146)](i):null}),this[t(181)](r,t(136),(o,s)=>{const r=t;if(!c)return;const l=s[r(163)]===this[r(134)].id;l&&r(141)===s[r(145)]||n[r(158)](t=>{const o=r;!function(t,e){const n=A,o=[];for(const{item:i}of t[n(162)](e))i.is(n(193),n(151))&&o[n(184)](i);for(const e of o)t[n(161)](e)}(t,s[o(142)]);let u=a[o(171)]();if(!u){const e=n[o(180)][o(179)][o(178)]()[o(191)];u=a[o(157)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(185)](null);for(const{item:o}of t[s(162)](e))if(o.is(s(193),s(128))){const e=o[s(132)](s(156));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(126)](s(156),r[e],o)}return r}(t,s[o(142)],t=>!l||null!==a[o(139)](t));for(const[n,i]of Object[o(149)](c)){const s=f[n]||n,r=t[o(172)](o(160),{footnoteId:s}),a=e[o(173)][o(138)][o(170)](i),c=e[o(173)][o(147)](a,r);t[o(144)](c,r),t[o(176)](r,u,o(190))}c=null})})}}var L=n(311),T=n(355),V=n(450),N=n.n(V),O=n(774),R=n.n(O),K=n(265),M=n.n(K),j=n(410),B=n.n(j),z=n(238),U=n.n(z),W=n(14),q={attributes:{"data-cke":!0}};q.setAttributes=B(),q.insert=M().bind(null,"head"),q.domAPI=R(),q.insertStyleElement=U();N()(W.A,q);W.A&&W.A.locals&&W.A.locals;class H 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,L.ButtonView)),e.add("menuBar:insertFootnote",G(t,L.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const n=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in n){const o=e,i=n[o];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete n[o],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&n._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&n._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&n._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&n._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&n._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&n._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&n._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function G(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof L.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:T.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}var Y=Z;function X(){var t=["isOfficialPlugin","3465784VMBuEJ","4809512EhSCHi","isPremiumPlugin","5EAvaOI","1100610pvazRI","pluginName","4608504CSNytd","924yqCkVx","Footnotes","32315ppJGPF","462802NHvnhq","requires","2745837mbIKUc"];return(X=function(){return t})()}function Z(t,e){var n=X();return(Z=function(t,e){return n[t-=299]})(t,e)}!function(t){for(var e=Z,n=t();;)try{if(845591===-parseInt(e(310))/1*(parseInt(e(303))/2)+-parseInt(e(305))/3+-parseInt(e(300))/4*(-parseInt(e(302))/5)+-parseInt(e(311))/6+parseInt(e(307))/7+parseInt(e(308))/8+parseInt(e(299))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(X);class J extends t.Plugin{static get[Y(312)](){return Y(301)}static get[Y(304)](){return[v,D,H]}static get[Y(306)](){return!0}static get[Y(309)](){return!0}}const Q=$;function $(t,e){const n=et();return($=function(t,e){return n[t-=260]})(t,e)}!function(t){const e=$,n=t();for(;;)try{if(309717===parseInt(e(261))/1*(parseInt(e(272))/2)+-parseInt(e(270))/3+-parseInt(e(269))/4+parseInt(e(266))/5*(-parseInt(e(263))/6)+parseInt(e(265))/7+-parseInt(e(267))/8*(-parseInt(e(276))/9)+parseInt(e(260))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(et);const tt=[Q(271),Q(275),Q(268),Q(264),Q(274),Q(273),Q(262),Q(277)];function et(){const t=["lower-alpha","decimal-leading-zero","9pEyuQs","upper-roman","12190660DUjOQp","27264vZKqrd","lower-roman","408840xPbtSG","upper-latin","943173hBqtFB","40uqhlFA","2217304gMwiSN","lower-latin","1805372qLipAq","1383324MibXbV","decimal","10YxZoub","upper-alpha"];return(et=function(){return t})()}const nt=ot;function ot(t,e){const n=st();return(ot=function(t,e){return n[t-=291]})(t,e)}!function(t){const e=ot,n=t();for(;;)try{if(472793===parseInt(e(300))/1+parseInt(e(311))/2*(-parseInt(e(308))/3)+-parseInt(e(302))/4+parseInt(e(307))/5+-parseInt(e(292))/6+parseInt(e(297))/7+-parseInt(e(294))/8)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(st);class it extends t.Command{[nt(312)](){const t=nt,{editor:e}=this,n=e[t(310)][t(295)](d)[t(306)]();this[t(291)]=!!n,this[t(299)]=n?.[t(296)](t(304))??null}[nt(293)]({value:t}){const e=nt,{editor:n}=this,o=n[e(310)][e(295)](d),i=o[e(306)]();i&&tt[e(301)](t)&&n[e(303)][e(305)](n=>{const s=e;n[s(298)](s(304),t,i),o[s(309)](n)})}}function st(){const t=["113012vLswCr","refresh","isEnabled","2982234sXQsSg","execute","2782920pNtDeG","get","getAttribute","5623716GTMhWL","setAttribute","value","505950kJUhBa","includes","38344RBtEEG","model","footnotesListStyle","change","getFootnotesDefinitionsObjectElement","937315SZfUTa","9zFilcr","_updateFootnotesCounters","plugins"];return(st=function(){return t})()}const rt=ct;function at(){const t=["568350cfCAgs","458xGzrSd","get","getFootnotesDefinitionsObjectElement","35qDIcCJ","footnotesListStart","1009779crTlfW","5977008fammPf","187WFtnuj","refresh","execute","5389713SkjuaA","model","change","getAttribute","isInteger","setAttribute","490938bhksYV","value","_updateFootnotesCounters","4118yoQItM","plugins","isEnabled","1040390GnPIDH","4KahVyt"];return(at=function(){return t})()}function ct(t,e){const n=at();return(ct=function(t,e){return n[t-=235]})(t,e)}!function(t){const e=ct,n=t();for(;;)try{if(577294===-parseInt(e(242))/1*(parseInt(e(248))/2)+-parseInt(e(253))/3*(-parseInt(e(246))/4)+parseInt(e(251))/5*(-parseInt(e(247))/6)+-parseInt(e(239))/7+parseInt(e(254))/8+-parseInt(e(258))/9+parseInt(e(245))/10*(parseInt(e(255))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(at);class lt extends t.Command{[rt(256)](){const t=rt,{editor:e}=this,n=e[t(243)][t(249)](d)[t(250)]();this[t(244)]=!!n,this[t(240)]=n?.[t(236)](t(252))??null}[rt(257)]({value:t}){const e=rt,{editor:n}=this,o=n[e(243)][e(249)](d),i=o[e(250)]();i&&Number[e(237)](t)&&n[e(259)][e(235)](n=>{const s=e;n[s(238)](s(252),t,i),o[s(241)](n)})}}function ut(){const t=["document","insert","plugins","mapper","2590GxlbMr","upper-roman","differ","12HLBBwo","_defineFormatter","position","attribute:footnotesListStyle:footnotesDefinitions","setStyle","footnotesStart","_updateFootnotesCounters","parseInt","toViewElement","dataDowncast","for","editingDowncast","6039055dOWnfc","getAttribute","footnotes.footnotesProperties.defaultStartIndex","name","init","decimal","isNaN","list-style-type","12768VLwfJx","consume","setAttribute","getChildren","lower-alpha","style","extend","footnotesListStyle","529014KRhsFL","5481KjAnNP","removeAttribute","getChanges","FootnotesPropertiesEditing","removeStyle","registerPostFixer","requires","checkAttribute","getItems","getStyle","7877628zDTTwL","writer","footnotesListStart","_definePostfixer","footnotesStyle","modelRange","consumable","toUpperCase","element:ol","_getDefaultStartIndex","upper-latin","config","start","1rIzYfb","lower-roman","nodeAfter","$text","add","element","attributeToAttribute","isPremiumPlugin","from","floor","50726RLYZQG","_formatFootnoteListValue","_defineSchema","isOfficialPlugin","lower-latin","upcast","decimal-leading-zero","define","toLowerCase","footnotes.footnotesProperties.defaultListStyle","max","footnotesDefinitions","_defineConverters","editor","item","upper-alpha","commands","low","hasAttribute","attributeNewValue","type","setFootnoteFormatter","2525866IbNCfp","padStart","pluginName","10tIkUYr","attribute:footnotesListStart:footnotesDefinitions","get","_getDefaultListStyle","6SCogpp","createRangeOn","3034865bUnkzF","8YVtFwS","fromCharCode","find","model"];return(ut=function(){return t})()}const ft=gt;!function(t){const e=gt,n=t();for(;;)try{if(969989===-parseInt(e(317))/1*(-parseInt(e(349))/2)+parseInt(e(293))/3*(-parseInt(e(359))/4)+-parseInt(e(358))/5*(-parseInt(e(356))/6)+parseInt(e(294))/7*(-parseInt(e(285))/8)+-parseInt(e(304))/9*(-parseInt(e(352))/10)+-parseInt(e(277))/11*(-parseInt(e(370))/12)+parseInt(e(327))/13*(-parseInt(e(367))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(ut);class dt extends t.Plugin{static get[ft(351)](){return ft(297)}static get[ft(300)](){return[v,d]}static get[ft(330)](){return!0}static get[ft(324)](){return!0}[ft(281)](){const t=ft,{editor:e}=this;e[t(315)][t(334)](t(336),t(282)),e[t(315)][t(334)](t(279),1),e[t(343)][t(321)](t(308),new it(e)),e[t(343)][t(321)](t(375),new lt(e)),this[t(329)](),this[t(339)](),this[t(371)](),this[t(307)]()}[ft(329)](){const t=ft,{editor:e}=this,{schema:n}=e[t(362)];n[t(291)](t(338),{allowAttributes:[t(292),t(306)]})}[ft(339)](){const t=ft,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(380)](t(332))[t(323)]({view:{name:"ol",styles:{"list-style-type":/.+/}},model:{key:t(292),value:e=>e[t(303)](t(284))}}),n[t(380)](t(332))[t(323)]({view:{name:"ol",attributes:{start:/.+/}},model:{key:t(306),value:e=>{const n=t,o=e[n(278)](n(316)),i=Number[n(377)](o,10);return Number[n(283)](i)?null:i}}}),n[t(380)](t(332))[t(323)]({view:{name:"ol",attributes:{type:/.+/}},model:{key:t(292),value:e=>({1:t(282),a:t(289),A:t(342),i:t(318),I:t(368)}[e[t(278)](t(347))])}}),n[t(380)](t(332))[t(321)](e=>{const n=t;e.on(n(312),(t,e,o)=>{const s=n,r=e[s(309)]?.[s(316)][s(319)];r?.is(s(322),s(338))&&(!r[s(345)](s(292))&&i[s(301)](r,s(292))&&o[s(305)][s(287)](s(292),s(282),r),!r[s(345)](s(306))&&i[s(301)](r,s(306))&&o[s(305)][s(287)](s(306),1,r))},{priority:n(344)})}),n[t(380)](t(379))[t(323)]({model:{name:t(338),key:t(306)},view:e=>1===e?null:{key:t(316),value:String(e)}}),n[t(380)](t(379))[t(323)]({model:{name:t(338),key:t(292)},view:e=>t(282)===e?null:{key:t(290),value:{"list-style-type":e}}}),n[t(380)](t(381))[t(321)](e=>{const n=t;e.on(n(353),(t,e,o)=>{const i=n;if(!o[i(310)][i(286)](e[i(341)],t[i(280)]))return;const s=pt(e[i(341)],o[i(366)]);null===e[i(346)]||void 0===e[i(346)]||1===e[i(346)]?o[i(305)][i(295)](i(316),s):o[i(305)][i(287)](i(316),String(e[i(346)]),s)}),e.on(n(373),(t,e,o)=>{const i=n;if(!o[i(310)][i(286)](e[i(341)],t[i(280)]))return;const s=pt(e[i(341)],o[i(366)]);e[i(346)]&&i(282)!==e[i(346)]?o[i(305)][i(374)](i(284),e[i(346)],s):o[i(305)][i(298)](i(284),s)})})}[ft(307)](){const t=ft,{editor:e}=this,{model:n}=e,o=e[t(365)][t(354)](d),i=this[t(355)](),s=this[t(313)]();n[t(363)][t(299)](e=>{const r=t,a=n[r(363)][r(369)][r(296)]();let c=!1;for(const t of a){if(r(364)!==t[r(347)]||r(320)===t[r(280)])continue;const o=n[r(357)](t[r(372)][r(319)]);for(const t of o[r(302)]())t.is(r(322),r(338))&&(t[r(345)](r(306))||(e[r(287)](r(306),s,t),c=!0),t[r(345)](r(292))||(e[r(287)](r(292),i,t),c=!0))}return c&&o[r(376)](e),c})}[ft(371)](){const t=ft,{editor:e}=this;e[t(365)][t(354)](d)[t(348)](e=>this[t(328)](e))}[ft(355)](){const t=ft;return this[t(340)][t(315)][t(354)](t(336))}[ft(313)](){const t=ft;return this[t(340)][t(315)][t(354)](t(279))}[ft(328)]({container:t,value:e,digits:n}){const o=ft,i=t[o(278)](o(292)),s=t[o(278)](o(306)),r=Math[o(326)](e)+(s-1);switch(i){case o(282):default:return String(r);case o(333):return function(t,e){const n=o;return String(t)[n(350)](e,"0")}(r,Math[o(337)](2,n));case o(289):case o(331):return ht(r,!1);case o(342):case o(314):return ht(r,!0);case o(318):return wt(r,!1);case o(368):return wt(r,!0)}}}function pt(t,e){const n=ft,o=e[n(378)](t);return Array[n(325)](o[n(288)]())[n(361)](t=>t.is(n(322),"ol"))}function ht(t,e){const n=ft;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(360)](97+t)+o,i=Math[n(326)]((i-1)/26)}return e?o[n(311)]():o}const mt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function gt(t,e){const n=ut();return(gt=function(t,e){return n[t-=277]})(t,e)}function wt(t,e){const n=ft;let o="",i=t;for(const{value:t,numeral:e}of mt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(335)]()}class yt extends L.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new L.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new L.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,n),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,L.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const n=new L.View(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){for(const t of this.children)if(t instanceof L.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},n.focusTracker=new i.FocusTracker,n.keystrokes=new i.KeystrokeHandler,n.render(),n.keystrokes.listenTo(n.element),this.children.add(n),n}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),n=[e],o=new L.CollapsibleView(this.locale,n);return o.set({label:t("Footnotes properties"),isCollapsed:!0}),o.buttonView.bind("isEnabled").toMany(n,"isEnabled",(...t)=>t.some(t=>t)),o.buttonView.on("change:isEnabled",(t,e,n)=>{n||(o.isCollapsed=!0)}),this.children.add(o),[e,o]}_createStartIndexPropertyView(){const{t}=this.locale,e=new L.LabeledFieldView(this.locale,L.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid footnotes start index value."):n.checkValidity()?this.fire("footnotesListStart",{startIndex:o}):e.errorText=t("Footnotes start index must be greater than 0.")}),e}}var bt=n(945),vt={attributes:{"data-cke":!0}};vt.setAttributes=B(),vt.insert=M().bind(null,"head"),vt.domAPI=R(),vt.insertStyleElement=U();N()(bt.A,vt);bt.A&&bt.A.locals&&bt.A.locals;class It extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[L.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var n;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(n=t,t=>{const{t:e}=t,o=n.commands.get("footnotesStyle"),i=(0,L.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(o,"isEnabled"),s.set({label:e("Footnotes style"),icon:T.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:n}=t.locale,o=n("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:T.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:T.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:T.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:T.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:T.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:T.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:n,icon:o,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new L.ButtonView(e);return a.set({label:n,icon:o,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new yt(t.locale,{styleGridAriaLabel:o,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,n)=>{t.execute("footnotesStart",{value:n.startIndex})}),s}({editor:n,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:n}=t.locale,o=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=L.BalloonPanelView;o.register("footnotesDefinitions",{ariaLabel:n("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}function kt(t,e){var n=Ct();return(kt=function(t,e){return n[t-=173]})(t,e)}function Ct(){var t=["403251xryoUk","10877657hBJATP","isPremiumPlugin","20chXESF","isOfficialPlugin","28036107iDyifQ","890oddnZc","requires","388692ufWaNg","pluginName","6012foJZtg","11344kLxivr","FootnotesProperties","685nYzcOk","44MfwwOb","2185670kpFrfS"];return(Ct=function(){return t})()}var Ft=kt;!function(t){for(var e=kt,n=t();;)try{if(894357===-parseInt(e(180))/1*(parseInt(e(173))/2)+-parseInt(e(183))/3*(parseInt(e(181))/4)+parseInt(e(186))/5*(-parseInt(e(175))/6)+parseInt(e(184))/7+parseInt(e(178))/8*(-parseInt(e(177))/9)+-parseInt(e(182))/10+parseInt(e(188))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ct);class St extends t.Plugin{static get[Ft(176)](){return Ft(179)}static get[Ft(174)](){return[dt,It]}static get[Ft(187)](){return!0}static get[Ft(185)](){return!0}}function Et(){var t=["24912ECsOCS","868310edOazP","440SwlkUR","981756pUnYkf","10505929qjGfIK","6AtvRxw","2KayYnH","4035990YmCMaz","4213296bcZQZL","6529240Nqsygr","708ZOykDT"];return(Et=function(){return t})()}function xt(t,e){var n=Et();return(xt=function(t,e){return n[t-=199]})(t,e)}!function(t){for(var e=xt,n=t();;)try{if(956272===parseInt(e(205))/1*(parseInt(e(208))/2)+-parseInt(e(202))/3*(-parseInt(e(201))/4)+-parseInt(e(209))/5+parseInt(e(207))/6*(parseInt(e(206))/7)+parseInt(e(200))/8+parseInt(e(199))/9+parseInt(e(203))/10*(-parseInt(e(204))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Et)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
|
|
4
|
+
*/(()=>{var t={14:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,':root{--ck-footnotes-list-widget-label-background-color:#757575;--ck-content-footnotes-list-background-color:none;--ck-content-footnotes-list-separator-color:#000;--ck-content-footnote-font-size:var(--ck-content-font-size-small)}.ck-content .footnote{margin-inline-end:.2em}.ck-content .footnotes{background-color:var(--ck-content-footnotes-list-background-color);font-size:var(--ck-content-footnote-font-size);margin:1.9em 0 1.5em;padding-inline-start:3em;position:relative}.ck-content .footnotes:before{border-top:1px solid var(--ck-content-footnotes-list-separator-color);content:"";left:0;position:absolute;top:-1em;width:min(30%,350px)}[dir=rtl] .ck-content .footnotes:before{left:auto;right:0}.ck-content .footnote-backlink{display:inline-block;margin-inline-end:1ch;user-select:none;vertical-align:top;width:auto}.ck-content .footnote-content{display:inline-block;padding:0 4px;vertical-align:top;width:calc(100% - 2em)}.ck-content .footnote-content>p:first-of-type{margin-top:0}.ck-content .footnote-content>p:last-of-type{margin-bottom:0}.ck-content .footnote-content ol{list-style-type:decimal}.ck-content .footnote-content ol ol{list-style-type:lower-latin}.ck-content .footnote-content ol ol ol{list-style-type:lower-roman}.ck-content .footnote-content ol ol ol ol{list-style-type:upper-latin}.ck-content .footnote-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content .footnote-content ul{list-style-type:disc}.ck-content .footnote-content ul ul{list-style-type:circle}.ck-content .footnote-content ul ul ul,.ck-content .footnote-content ul ul ul ul{list-style-type:square}.ck.ck-editor__editable .footnote>a{pointer-events:none}.ck.ck-editor__editable .footnotes-wrapper{display:flow-root;margin:.9em 0 .85em;position:relative}.ck.ck-editor__editable .footnotes-wrapper:not(:hover):not(.ck-widget_selected){outline:1px solid var(--ck-color-base-border)}.ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]:after{background-color:var(--ck-footnotes-list-widget-label-background-color);color:#fff;content:attr(data-footnotes-list-label);font-family:var(--ck-font-face);font-size:10px;line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);position:absolute;right:10px;top:-1px;white-space:nowrap}[dir=rtl] .ck.ck-editor__editable .footnotes-wrapper[data-footnotes-list-label]:after{left:10px;right:auto}.ck.ck-editor__editable .footnotes-wrapper>.footnotes{margin-bottom:.65em;margin-top:1em}',""]);const a=r},237:t=>{"use strict";t.exports=CKEditor5.dll},238:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},265:t=>{"use strict";var e={};t.exports=function(t,n){var o=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},311:(t,e,n)=>{t.exports=n(237)("./src/ui.js")},331:(t,e,n)=>{t.exports=n(237)("./src/clipboard.js")},355:(t,e,n)=>{t.exports=n(237)("./src/icons.js")},374:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n="",o=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),o&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),o&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n}).join("")},e.i=function(t,n,o,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(o)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(r[c]=!0)}for(var l=0;l<t.length;l++){var u=[].concat(t[l]);o&&r[u[0]]||(void 0!==s&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=s),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),e.push(u))}},e}},410:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}},450:t=>{"use strict";var e=[];function n(t){for(var n=-1,o=0;o<e.length;o++)if(e[o].identifier===t){n=o;break}return n}function o(t,o){for(var s={},r=[],a=0;a<t.length;a++){var c=t[a],l=o.base?c[0]+o.base:c[0],u=s[l]||0,f="".concat(l," ").concat(u);s[l]=u+1;var d=n(f),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var h=i(p,o);o.byIndex=a,e.splice(a,0,{identifier:f,updater:h,references:1})}r.push(f)}return r}function i(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=o(t=t||[],i=i||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=n(s[r]);e[a].references--}for(var c=o(t,i),l=0;l<s.length;l++){var u=n(s[l]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}s=c}}},453:t=>{"use strict";t.exports=function(t){return t[1]}},584:(t,e,n)=>{t.exports=n(237)("./src/utils.js")},774:t=>{"use strict";var e,n=(e=[],function(t,n){return e[t]=n,e.filter(Boolean).join("\n")});function o(t,e,o,i){var s;if(o)s="";else{s="",i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var r=void 0!==i.layer;r&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,r&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}")}if(t.styleSheet)t.styleSheet.cssText=n(e,s);else{var a=document.createTextNode(s),c=t.childNodes;c[e]&&t.removeChild(c[e]),c.length?t.insertBefore(a,c[e]):t.appendChild(a)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,n=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){o(n,e,!1,t)},remove:function(t){o(n,e,!0,t)}}}},782:(t,e,n)=>{t.exports=n(237)("./src/core.js")},783:(t,e,n)=>{t.exports=n(237)("./src/engine.js")},901:(t,e,n)=>{t.exports=n(237)("./src/widget.js")},945:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var o=n(453),i=n.n(o),s=n(374),r=n.n(s)()(i());r.push([t.id,":root{--ck-footnotes-styles-list-style-button-size:44px}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list{column-gap:var(--ck-spacing-medium);display:grid;grid-template-columns:repeat(4,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button,.ck.ck-footnotes-definitions-properties>.ck-footnotes-definitions-styles-list .ck-button .ck-icon{height:var(--ck-footnotes-styles-list-style-button-size);width:var(--ck-footnotes-styles-list-style-button-size)}.ck.ck-footnotes-definitions-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-footnotes-definitions-properties>.ck-collapsible .ck-footnotes-definitions-properties__start-index .ck-input{min-width:100%}",""]);const a=r}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={id:o,exports:{}};return t[o](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{Footnotes:()=>J,FootnotesClipboard:()=>D,FootnotesEditing:()=>v,FootnotesProperties:()=>St,FootnotesPropertiesEditing:()=>pt,FootnotesPropertiesUI:()=>It,FootnotesStartCommand:()=>lt,FootnotesStyleCommand:()=>st,FootnotesTracker:()=>d,FootnotesUI:()=>H,InsertFootnoteCommand:()=>b});var t=n(782),e=n(901),i=n(584),s=n(783);const r=c;function a(){const t=["1987443mGKNwE","96768GWXPSd","nodeAfter","elementName","add","_model","from","3695CEveea","_elementName","reset","delete","attributes","_getElementKey","5LiXiwq","15ChFttD","2229115AJOybm","insert","2227074ZnXqsW","type","slice","length","name","$text","position","13511575xYfwTY","remove","$graveyard","rootName","248fVjuRh","getElementKey","flat","get","root","push","createRangeOn","10NrhGRk","getChanges","_trackedElements","getItems","901296ucPNfX","element","set","has","values","clear"];return(a=function(){return t})()}function c(t,e){const n=a();return(c=function(t,e){return n[t-=432]})(t,e)}!function(t){const e=c,n=t();for(;;)try{if(309646===parseInt(e(460))/1*(-parseInt(e(436))/2)+-parseInt(e(467))/3*(-parseInt(e(454))/4)+parseInt(e(466))/5*(-parseInt(e(470))/6)+-parseInt(e(468))/7+-parseInt(e(447))/8+parseInt(e(453))/9+-parseInt(e(443))/10*(-parseInt(e(432))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(a);class l{[r(458)];[r(461)];[r(465)];[r(445)]=new Map;constructor(t,e){const n=r;this[n(458)]=t,this[n(461)]=e[n(456)],this[n(465)]=e[n(437)]}[r(462)](){const t=r;this[t(445)][t(452)]()}[r(444)](t){const e=r,n=new Set,o=new Map;for(const i of t){if(e(469)===i[e(471)]&&e(475)!==i[e(474)]&&i[e(476)][e(455)]){const t=this[e(458)][e(442)](i[e(476)][e(455)]);for(const n of t[e(446)]()){if(!n.is(e(448),this[e(461)]))continue;const t=this[e(465)](n);o[e(450)](t)||o[e(449)](t,[]),o[e(439)](t)[e(441)](n)}}if(e(433)===i[e(471)]&&i[e(474)]===this[e(461)]){const t=this[e(465)]({getAttribute:t=>i[e(464)][e(439)](t)});n[e(457)](t)}}for(const[t,o]of this[e(445)])e(434)===o[e(440)][e(435)]&&n[e(457)](t);for(const t of n)this[e(445)][e(463)](t);for(const[t,n]of o)this[e(445)][e(449)](t,n[n[e(473)]-1]);const i=new Set;for(const[t,s]of o)n[e(450)](t)&&(i[e(457)](s[0]),s[e(473)]>1?o[e(449)](t,s[e(472)](1)):o[e(463)](t),n[e(463)](t));return{removed:Array[e(459)](n),inserted:Array[e(459)](o[e(451)]())[e(438)](),moved:Array[e(459)](i)}}}function u(){const t=["set","has","reset","13012mNoIBF","_footnotesDefinitions","move","filter","differ","_sortFootnoteDefinitions","isOfficialPlugin","isEqual","map","document","add","push","definition","registerPostFixer","_ensureFootnotesReferencesHaveProperOrder","createRangeIn","654600tNHQsz","588rUSEFY","getChanges","$graveyard","getRootNames","144aLSHUM","reference","model","splice","_footnoteFormatter","min","createRangeOn","_footnotes","159ADvvFD","footnoteDefinition","FootnotesTracker","_footnoteRefsTracker","footnoteInlineContent","pluginName","enqueueChange","350077qTmrdc","footnotes.multiBlock","after","editor","createPositionAt","getChildren","createPositionBefore","end","rootName","childCount","footnoteCounter","72807NPPGoq","setAttribute","getFootnotesFormatter","change:data","indexOf","low","from","remove","isPremiumPlugin","before","_handleFootnoteDefinitionsChanges","18mPCItM","createElement","73348Szimwn","parent","append","_handleFootnotesDefinitionsObjectChanges","length","footnotesDefinitions","getFootnotes","getFootnote","_handleFootnotesDefinitionsObjectSync","_insertEmptyFootnotesDefinitionsContainer","listenTo","some","footnoteId","unshift","24puAGun","_ensureFootnotesDefinitionsContainerExists","_updateFootnoteRefCounter","config","findIndex","_handleInsertedFootnoteReference","953815PwlAzJ","10JpijQX","setFootnoteFormatter","_updateFootnotesCounters","root","compareWith","_footnoteDefsTracker","155510pSevtr","footnoteRef","_footnoteDefsContainerTracker","112IdstGq","_handleRemoveFootnoteReferenceById","high","paragraph","_handleFootnoteReferencesChanges","singleton","find","get","init","insert","_handleMovedFootnoteReference","getAttribute","getFootnotesDefinitionsObjectElement"];return(u=function(){return t})()}const f=h;!function(t){const e=h,n=t();for(;;)try{if(411555===-parseInt(e(448))/1*(parseInt(e(442))/2)+-parseInt(e(390))/3*(parseInt(e(361))/4)+parseInt(e(441))/5*(parseInt(e(435))/6)+-parseInt(e(408))/7*(-parseInt(e(382))/8)+-parseInt(e(419))/9*(parseInt(e(377))/10)+-parseInt(e(421))/11*(-parseInt(e(378))/12)+-parseInt(e(397))/13*(-parseInt(e(451))/14))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(u);class d extends t.Plugin{[f(389)]=[];[f(362)]=null;[f(386)]=null;[f(450)];[f(393)];[f(447)];static get[f(395)](){return f(392)}static get[f(367)](){return!0}static get[f(416)](){return!0}constructor(t){const e=f;super(t),this[e(450)]=new l(this[e(400)][e(384)],{elementName:e(426),getElementKey:()=>e(350)}),this[e(393)]=new l(this[e(400)][e(384)],{elementName:e(449),getElementKey:t=>t[e(356)](e(433))}),this[e(447)]=new l(this[e(400)][e(384)],{elementName:e(391),getElementKey:t=>t[e(356)](e(433))})}[f(353)](){const t=f,{editor:e}=this,{model:n,data:o}=e;n[t(370)][t(374)](e=>{const o=t,i=n[o(370)][o(365)][o(379)]();let s=!1;return this[o(424)](e,i)&&(s=!0),this[o(418)](e,i)&&(s=!0),this[o(349)](e,i)&&(s=!0),this[o(375)](e)&&(s=!0),this[o(429)](e)&&(s=!0),this[o(366)](e)&&(s=!0),s}),this[t(431)](n[t(370)],t(411),()=>{const e=t;n[e(396)]({isUndoable:!1},t=>{this[e(436)](t)})},{priority:t(413)}),this[t(431)](o,t(358),()=>{const e=t;this[e(389)]=[],this[e(450)][e(360)](),this[e(393)][e(360)](),this[e(447)][e(360)]()},{priority:t(453)})}[f(357)](){return this[f(362)]}[f(428)](t){const e=f;return this[e(389)][e(351)](e=>e.id===t)||null}[f(427)](){const t=f;return Array[t(414)](this[t(389)])}[f(410)](){return this[f(386)]}[f(443)](t){this[f(386)]=t}[f(444)](t,e=0){const n=f;let o=!1;for(let i=e;i<this[n(389)][n(425)];i++)this[n(437)](t,i)&&(o=!0);return o}[f(430)](t,e){const n=f,o=t[n(420)](n(426),{});return t[n(423)](o,e),this[n(362)]=o,o}[f(436)](t){const e=f;if(!this[e(389)][e(425)]||this[e(362)])return;const n=this[e(389)][0][e(383)][e(445)],o=this[e(430)](t,n);for(const n of this[e(389)])n[e(373)][e(422)]||t[e(354)](n[e(373)],o,e(404));this[e(444)](t)}[f(424)](t,e){const n=f;let o=!1;const{inserted:i,removed:s,moved:r}=this[n(450)][n(379)](e);if(r[n(425)]&&(this[n(362)]=r[0]),i[n(425)])if(i[n(425)]>1||this[n(362)]&&i[n(432)](t=>t!==this[n(362)])){const e=t[n(420)](n(426),{}),s=[];this[n(362)]&&s[n(372)](this[n(362)]),s[n(372)](...i),t[n(354)](e,s[0],n(417));for(const o of s)t[n(363)](t[n(376)](o),t[n(401)](e,n(404))),t[n(415)](o);this[n(362)]=e,this[n(444)](t),o=!0}else this[n(362)]=i[0];if(s[n(425)]&&n(380)===this[n(362)]?.[n(445)][n(405)]){for(const e of this[n(389)])t[n(415)](e[n(383)]),o=!0;this[n(389)]=[],this[n(362)]=null}return o}[f(418)](t,e){const n=f;let o=!1;const i=this[n(400)][n(438)][n(352)](n(398)),{inserted:s,moved:r}=this[n(447)][n(379)](e);for(const e of[...r,...s]){const s=e[n(356)](n(433)),r=this[n(428)](s);r&&(r[n(373)]=e),p(t,i,e)&&(o=!0)}return o}[f(349)](t,e){const n=f;let o=!1;const{removed:i,inserted:s,moved:r}=this[n(393)][n(379)](e);for(const e of i)this[n(452)](t,e)&&(o=!0);for(const e of s)this[n(440)](t,e)&&(o=!0);for(const e of r)this[n(355)](t,e)&&(o=!0);return o}[f(429)](t){const e=f;if(!this[e(362)])return!1;let n=!1;if(this[e(362)][e(406)]!==this[e(389)][e(425)]){const o=[];for(const t of this[e(362)][e(402)]()){const i=t[e(356)](e(433));this[e(428)](i)||(o[e(434)](t),n=!0)}for(const n of o)t[e(415)](n)}const o=new Set,i=[];for(const t of this[e(362)][e(402)]()){const s=t[e(356)](e(433));o[e(359)](s)?(i[e(434)](t),n=!0):o[e(371)](s)}for(const n of i)t[e(415)](n);return this[e(362)][e(406)]||(t[e(415)](this[e(362)]),this[e(362)]=null,n=!0),n}[f(440)](t,e){const n=f;if(this[n(389)][n(351)](t=>t[n(383)]===e))return!1;let o=!1;const i=e[n(356)](n(433)),s=this[n(428)](i);s&&(t[n(415)](s[n(383)]),this[n(389)]=this[n(389)][n(364)](t=>t.id!==i),o=!0);let r=this[n(362)]?function(t,e){const o=n;for(const n of t[o(402)]())if(n[o(356)](o(433))===e)return n;return null}(this[n(362)],i):null;r||(r=t[n(420)](n(391),{footnoteId:i}),this[n(362)]&&(t[n(354)](r,this[n(362)],n(404)),o=!0));const a={id:i,reference:e,definition:r},c=m(this[n(400)][n(384)],this[n(389)],e);return this[n(389)][n(385)](c,0,a),this[n(444)](t,c)&&(o=!0),o}[f(452)](t,e){const n=f,o=this[n(389)][n(439)](t=>t.id===e);if(-1===o)return!1;let i=!1;const s=this[n(389)][o];return n(380)!==s[n(373)][n(445)][n(405)]&&(t[n(415)](s[n(373)]),i=!0),this[n(389)][n(385)](o,1),this[n(444)](t,o)&&(i=!0),i}[f(355)](t,e){const n=f,o=e[n(356)](n(433)),i=this[n(389)][n(439)](t=>t.id===o),s=this[n(389)][i];let r=!1;s[n(383)]=e,this[n(389)][n(385)](i,1);const a=m(this[n(400)][n(384)],this[n(389)],e);return this[n(389)][n(385)](a,0,s),this[n(444)](t,Math[n(387)](i,a))&&(r=!0),r}[f(437)](t,e){const n=f;if(!this[n(362)])return!1;const o=this[n(389)][e];let i;return i=this[n(386)]?this[n(386)]({footnote:o,container:this[n(362)],digits:String(this[n(389)][n(425)])[n(425)],value:e+1}):String(e+1),o[n(383)][n(356)](n(407))!=i&&(t[n(409)](n(407),i,o[n(383)]),!0)}[f(366)](t){const e=f;if(!this[e(362)]||this[e(389)][e(425)]<2)return!1;if(function(t,n){const o=e;if(t[o(425)]!==n[o(425)])return!1;for(let e=0;e<t[o(425)];e++)if(t[e]!==n[e])return!1;return!0}(this[e(389)][e(369)](t=>t.id),Array[e(414)](this[e(362)][e(402)]())[e(369)](t=>t[e(356)](e(433)))))return!1;let n=!1;for(let o=0;o<this[e(389)][e(425)];o++){const i=this[e(389)][o],s=t[e(403)](i[e(373)]),r=t[e(401)](this[e(362)],o);s[e(368)](r)||(t[e(363)](t[e(388)](i[e(373)]),r),n=!0)}return n}[f(375)](t){const e=f;if(!this[e(389)][e(425)])return!1;const{model:n}=this[e(400)];let o=!1;for(let i=0;i<this[e(389)][e(425)]-1;i++){const s=this[e(389)][i],r=this[e(389)][i+1],a=n[e(403)](s[e(383)]),c=n[e(403)](r[e(383)]);e(399)===a[e(446)](c)&&(this[e(355)](t,s[e(383)]),i=-1,o=!0)}return o}}function p(t,e,n){const o=f;if(n[o(406)])return!1;const i=o(e?454:394);return t[o(354)](t[o(420)](i),n),!0}function h(t,e){const n=u();return(h=function(t,e){return n[t-=349]})(t,e)}function m(t,e,n){const o=f;if(0===e[o(425)])return 0;const i=t[o(403)](n);for(let n=0;n<e[o(425)];n++){const s=e[n],r=t[o(403)](s[o(383)]);if(o(417)===i[o(446)](r))return n}const s=n[o(445)];let r=-1;for(let t=e[o(425)]-1;t>=0;t--)if(e[t][o(383)][o(445)]===s){r=t;break}if(-1!==r)return r+1;const a=t[o(370)][o(381)](),c=a[o(412)](s[o(405)]),l=a[c+1];if(l)for(let t=0;t<e[o(425)];t++)if(e[t][o(383)][o(445)][o(405)]===l)return t;return e[o(425)]}function g(){const t=["1426982fyEbrV","plugins","length","insertObject","editor","getFirstRange","model","footnoteRef","FootnotesEditing","isObject","6775WazQie","refresh","change","selection","execute","43637FnVurt","53712NfqAeJ","4160307qoyNrx","isEnabled","document","1009404aSjCaY","test","string","1576ZqFAeA","1SZpEeP","insert-footnote-command-executed-with-invalid-id","6564ReQTrS","footnoteId","_getPositionToInsertFootnote","checkChild","getItems","49777MyRkoh","createElement","end","get","5868XeUZRp","160iPdfjX","isBlock","_moveSelectionToFootnoteDefinition"];return(g=function(){return t})()}function w(t,e){const n=g();return(w=function(t,e){return n[t-=466]})(t,e)}const y=w;!function(t){const e=w,n=t();for(;;)try{if(881547===parseInt(e(503))/1*(-parseInt(e(479))/2)+parseInt(e(496))/3+-parseInt(e(499))/4+parseInt(e(489))/5*(parseInt(e(475))/6)+-parseInt(e(471))/7*(-parseInt(e(502))/8)+-parseInt(e(495))/9*(parseInt(e(476))/10)+parseInt(e(494))/11*(-parseInt(e(466))/12))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(g);class b extends t.Command{[y(490)](){const t=y,e=this[t(483)][t(485)][t(498)][t(492)],n=this[t(468)](e);this[t(497)]=!!n}[y(493)](t){const e=y,{editor:n}=this,{model:o}=n,{selection:s}=o[e(498)],r=this[e(468)](s);if(!r)return;const a=n[e(480)][e(474)](e(487)),c=t?.[e(467)]??(0,i.uid)();!function(t){const n=e;return n(501)==typeof t&&t[n(481)]>0&&!/\s/[n(500)](t)&&!/^\d/[n(500)](t)}(c)?(0,i.logWarning)(e(504)):(o[e(491)](t=>{const n=e,i=t[n(472)](n(486),{footnoteId:c});o[n(482)](i,r,null)}),a[e(478)](c))}[y(468)](t){const e=y,{model:n}=this[e(483)],{schema:o}=n,i=t[e(484)]();for(const t of i[e(470)]())if(o[e(477)](t)||o[e(488)](t))return null;const s=i[e(473)];return o[e(469)](s,e(486))?s:null}}class v extends t.Plugin{static get pluginName(){return"FootnotesEditing"}static get requires(){return[d]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this;t.config.define("footnotes.multiBlock",!0),t.commands.add("insertFootnote",new b(t)),this._defineSchema(),this._defineRefsConverters(),this._defineDefinitionsConverters(),this._defineDefinitionConverters(),this._defineBogusParagraphConverters(),this._defineKeyboardHandlers(),this._defineClickHandlers()}afterInit(){!async function(t){const e=m([117,110,83,98,71,112,109,105,106,65,119,121,114,79,122,100,90,104,67,113,84,51,89,76,70,86,116,74,108,107,68,97,103,49,87,77,78,120,82,52,72,54,55,73,66,53,81,111,88,48,50,56,57,99,85,115,118,80,69,101,102,75]),n=window[m([68,97,116,101])][m([110,111,119])](),o=t[m([101,100,105,116,111,114])],s=new(window[m([80,114,111,109,105,115,101])])(t=>{o[m([111,110,99,101])](m([114,101,97,100,121]),t)}),r={[m([107,116,121])]:m([69,67]),[m([117,115,101])]:m([115,105,103]),[m([99,114,118])]:m([80,45,50,53,54]),[m([120])]:m([105,67,106,79,67,118,68,70,73,54,108,81,72,72,84,49,56,106,86,119,82,102,107,102,72,81,50,97,95,77,121,109,84,51,53,76,81,86,111,70,83,65,73]),[m([121])]:m([107,88,73,121,74,52,101,118,116,67,69,70,82,109,120,75,83,85,112,75,57,102,68,87,52,53,57,118,88,79,118,86,114,104,102,54,117,81,65,101,79,105,111]),[m([97,108,103])]:m([69,83,50,53,54])},a=o[m([99,111,110,102,105,103])][m([103,101,116])](m([108,105,99,101,110,115,101,75,101,121]));function c(t){const e=[new(window[m([80,114,111,109,105,115,101])])(t=>setTimeout(t,605900)),s[m([116,104,101,110])](()=>new(window[m([80,114,111,109,105,115,101])])(t=>{let e=0;o[m([109,111,100,101,108])][m([111,110])](m([97,112,112,108,121,79,112,101,114,97,116,105,111,110]),(n,o)=>{o[0][m([105,115,68,111,99,117,109,101,110,116,79,112,101,114,97,116,105,111,110])]&&e++,504==e&&(t(),n[m([111,102,102])]())})}))];return window[m([80,114,111,109,105,115,101])][m([114,97,99,101])](e)[m([116,104,101,110])](()=>t)}function l(t){return t[m([115,116,97,114,116,115,87,105,116,104])](m([101,121]))?JSON[m([112,97,114,115,101])](u(t)):null}function u(t){return window[m([97,116,111,98])](t[m([114,101,112,108,97,99,101])](/-/g,m([43]))[m([114,101,112,108,97,99,101])](/_/g,m([47])))}function f(t){let e=5381;function n(t){for(let n=0;n<t[m([108,101,110,103,116,104])];n++){const o=t[m([99,104,97,114,67,111,100,101,65,116])](n);e=(e<<5)+e+o,e&=e}}return function t(e){Array[m([105,115,65,114,114,97,121])](e)?e[m([102,111,114,69,97,99,104])](t):e&&typeof e==m([111,98,106,101,99,116])?Object[m([101,110,116,114,105,101,115])](e)[m([115,111,114,116])]()[m([102,111,114,69,97,99,104])](([e,o])=>{n(e),t(o)}):n(window[m([83,116,114,105,110,103])](e))}(t),e>>>0}function d(t){return t[m([116,111,83,116,114,105,110,103])](16)[m([112,97,100,83,116,97,114,116])](8,m([48]))}function p(t){return t[m([115,112,108,105,116])]("")[m([114,101,118,101,114,115,101])]()[m([106,111,105,110])]("")}function h(){}function m(t){return t.map(t=>String.fromCharCode(t)).join("")}!function(t){const n=function(){const t=window[m([83,116,114,105,110,103])](window[m([112,101,114,102,111,114,109,97,110,99,101])][m([110,111,119])]())[m([114,101,112,108,97,99,101])](m([46]),"");let n=m([117]);for(let o=0;o<t[m([108,101,110,103,116,104])];o+=2){let i=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](o,o+2));i>=e[m([108,101,110,103,116,104])]&&(i-=e[m([108,101,110,103,116,104])]),n+=e[i]}return n}();o[n]=m([102,111,111,116,110,111,116,101,115,76,105,99,101,110,115,101,75,101,121])+t,t!=m([86,97,108,105,100])&&async function(){await s,o[m([109,111,100,101,108])][m([99,104,97,110,103,101])]=h,o[m([109,111,100,101,108])][m([101,110,113,117,101,117,101,67,104,97,110,103,101])]=h,o[m([101,110,97,98,108,101,82,101,97,100,79,110,108,121,77,111,100,101])](m([109,111,100,101,108]))}()}(await async function(){let t,e=null,h=null;try{return a==m([71,80,76])?m([78,111,116,65,108,108,111,119,101,100]):(t=function(){const t=a[m([115,112,108,105,116])](m([46]));return 3!=t[m([108,101,110,103,116,104])]?null:e(t[1]);function e(t){const e=l(t);return e&&n()?e:null;function n(){const t=e[m([106,116,105])],n=window[m([112,97,114,115,101,73,110,116])](t[m([115,117,98,115,116,114,105,110,103])](t[m([108,101,110,103,116,104])]-8),16),o={...e,[m([106,116,105])]:t[m([115,117,98,115,116,114,105,110,103])](0,t[m([108,101,110,103,116,104])]-8)};return delete o[m([118,99])],f(o)==n}}}(),t?(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])]&&(h=function(t,e){return new(window[m([80,114,111,109,105,115,101])])(c=>{if(r())return c(m([86,97,108,105,100]));a(),o[m([100,101,99,111,114,97,116,101])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]));let l=!1;const u=(0,i.uid)();function h(t){return!!t&&(typeof t===m([111,98,106,101,99,116])||typeof t===m([102,117,110,99,116,105,111,110]))&&typeof t[m([116,104,101,110])]===m([102,117,110,99,116,105,111,110])&&typeof t[m([99,97,116,99,104])]===m([102,117,110,99,116,105,111,110])}function g(o){a(o)[m([116,104,101,110])](t=>t&&t[m([115,116,97,116,117,115])]==m([111,107])?d(f(u+e))!=t[m([118,101,114,105,102,105,99,97,116,105,111,110])]?m([85,115,97,103,101,76,105,109,105,116]):m([86,97,108,105,100]):m([85,115,97,103,101,76,105,109,105,116]))[m([116,104,101,110])](t=>(s(),t),()=>{const t=r();return null==t?(s(),m([86,97,108,105,100])):m(n-t>6048e5?[85,115,97,103,101,76,105,109,105,116]:[86,97,108,105,100])})[m([116,104,101,110])](c)[m([99,97,116,99,104])](()=>{c(m([85,115,97,103,101,76,105,109,105,116]))});const i=36e5;function s(){const e=m([108,108,99,116,45])+d(f(t)),o=p(d(window[m([77,97,116,104])][m([99,101,105,108])](n/i)));window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([115,101,116,73,116,101,109])](e,o)}function r(){const e=m([108,108,99,116,45])+d(f(t)),n=window[m([108,111,99,97,108,83,116,111,114,97,103,101])][m([103,101,116,73,116,101,109])](e);return n?window[m([112,97,114,115,101,73,110,116])](p(n),16)*i:null}function a(t){return new(window[m([80,114,111,109,105,115,101])])((e,n)=>{t[m([116,104,101,110])](e,n),window[m([115,101,116,84,105,109,101,111,117,116])](n,12e4)})}}o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),(e,n)=>{if(n[0]!=t)return c(m([85,115,97,103,101,76,105,109,105,116]));n[1]={...n[1],[m([114,101,113,117,101,115,116,73,100])]:u}},{[m([112,114,105,111,114,105,116,121])]:m([104,105,103,104])}),o[m([111,110])](m([95,115,101,110,100,85,115,97,103,101,82,101,113,117,101,115,116]),t=>{h(t[m([114,101,116,117,114,110])])&&(l=!0,g(t[m([114,101,116,117,114,110])]))},{[m([112,114,105,111,114,105,116,121])]:m([108,111,119])}),s[m([116,104,101,110])](()=>{l||c(m([85,115,97,103,101,76,105,109,105,116]))})});function r(){return o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]==m([97,117,116,111])}function a(){o[m([101,100,105,116,105,110,103])][m([118,105,101,119])][m([95,111,118,101,114,108,97,121,77,111,100,101,72,105,110,116])]=m([97,117,116,111])}}(t[m([117,115,97,103,101,69,110,100,112,111,105,110,116])],t[m([106,116,105])])),await async function(){let t=!0;try{const o=a[m([115,112,108,105,116])](m([46])),[i,s,r]=o;return e(i),await n(i,s,r),t}catch{return!1}function e(e){const n=l(e);n&&n[m([97,108,103])]==m([69,83,50,53,54])||(t=!1)}async function n(e,n,o){const i=window[m([85,105,110,116,56,65,114,114,97,121])][m([102,114,111,109])](u(o),t=>t[m([99,104,97,114,67,111,100,101,65,116])](0)),s=(new(window[m([84,101,120,116,69,110,99,111,100,101,114])]))[m([101,110,99,111,100,101])](e+m([46])+n),a=window[m([99,114,121,112,116,111])][m([115,117,98,116,108,101])];if(!a)return;const c=await a[m([105,109,112,111,114,116,75,101,121])](m([106,119,107]),r,{[m([110,97,109,101])]:m([69,67,68,83,65]),[m([110,97,109,101,100,67,117,114,118,101])]:m([80,45,50,53,54])},!1,[m([118,101,114,105,102,121])]);await a[m([118,101,114,105,102,121])]({[m([110,97,109,101])]:m([69,67,68,83,65]),[m([104,97,115,104])]:{[m([110,97,109,101])]:m([83,72,65,45,50,53,54])}},c,i,s)||(t=!1)}}()?function(){const e=t[m([102,101,97,116,117,114,101,115])];return!(!e||!e[m([105,110,99,108,117,100,101,115])](m([42]))&&!e[m([105,110,99,108,117,100,101,115])](m([70,79,79])))}()?function(){const e=[m([101,118,97,108,117,97,116,105,111,110]),m([116,114,105,97,108])][m([105,110,99,108,117,100,101,115])](t[m([108,105,99,101,110,115,101,84,121,112,101])])?n/1e3:1761004800;return t[m([101,120,112])]<e}()?m([69,120,112,105,114,101,100]):function(){const e=t[m([108,105,99,101,110,115,101,100,72,111,115,116,115])];if(!e||0==e[m([108,101,110,103,116,104])])return!0;const{hostname:n}=new URL(window[m([108,111,99,97,116,105,111,110])].href);if(e[m([105,110,99,108,117,100,101,115])](n))return!0;const o=n[m([115,112,108,105,116])](m([46]));return e[m([102,105,108,116,101,114])](t=>t[m([105,110,99,108,117,100,101,115])](m([42])))[m([109,97,112])](t=>t[m([115,112,108,105,116])](m([46])))[m([102,105,108,116,101,114])](t=>t[m([108,101,110,103,116,104])]<=o[m([108,101,110,103,116,104])])[m([109,97,112])](t=>Array(o[m([108,101,110,103,116,104])]-t[m([108,101,110,103,116,104])])[m([102,105,108,108])](t[0]===m([42])?m([42]):"")[m([99,111,110,99,97,116])](t))[m([115,111,109,101])](t=>o[m([101,118,101,114,121])]((e,n)=>t[n]===e||t[n]===m([42])))}()?(t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([101,118,97,108,117,97,116,105,111,110])&&(e=c(m([69,118,97,108,117,97,116,105,111,110,76,105,109,105,116]))),t[m([108,105,99,101,110,115,101,84,121,112,101])]==m([116,114,105,97,108])&&(e=c(m([84,114,105,97,108,76,105,109,105,116]))),await(e&&h?new(window[m([80,114,111,109,105,115,101])])((t,n)=>{e[m([116,104,101,110])](t,n),h[m([116,104,101,110])](e=>{e!=m([86,97,108,105,100])&&t(e)},n)}):e||h||m([86,97,108,105,100]))):m([68,111,109,97,105,110,76,105,109,105,116]):m([78,111,116,65,108,108,111,119,101,100]):m([73,110,118,97,108,105,100])):m([73,110,118,97,108,105,100]))}catch{return m([73,110,118,97,108,105,100])}}())}(this)}_moveSelectionToFootnoteDefinition(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(t.createPositionAt(i.definition,"end"))}),n.view.scrollToTheSelection(),!0)}_moveSelectionToFootnoteReference(t){const{plugins:e,editing:n,model:o}=this.editor,i=e.get(d).getFootnote(t);return!!i&&(o.change(t=>{t.setSelection(i.reference,"on")}),n.view.scrollToTheSelection(),!0)}_defineSchema(){const{schema:t}=this.editor.model,e=this.editor.config.get("footnotes.multiBlock");t.register("footnoteRef",{inheritAllFrom:"$inlineObject",allowAttributes:["footnoteId","footnoteCounter"]}),t.register("footnotesDefinitions",{inheritAllFrom:"$blockObject",allowChildren:["footnoteDefinition"]}),t.register("footnoteDefinition",{allowAttributes:["footnoteId"],disallowAttributes:["listItemId"],isLimit:!0}),e?t.extend("footnoteDefinition",{allowContentOf:"$container"}):t.register("footnoteInlineContent",{allowIn:"footnoteDefinition",allowContentOf:"$block",isLimit:!0}),t.addChildCheck(t=>{for(const e of t)if("footnoteDefinition"===e.name)return!1},"footnoteRef")}_defineRefsConverters(){const{editor:t}=this,{conversion:n,editing:o}=t,{t:i}=t.locale;n.for("upcast").elementToElement({view:{name:"sup",classes:"footnote"},model:(t,{writer:e,consumable:n})=>{const i=t.getChild(0);if(!i||!i.is("element","a"))return null;const s=i.getAttribute("href")||"";if(!s.startsWith("#"))return null;const r=s.replace(/^#/,"");if(!r)return null;n.consume(i,{name:!0,attributes:["href"]});for(const{item:t}of o.view.createRangeIn(i))t.is("$textProxy")?n.consume(t.textNode,{name:!0}):t.is("element")&&n.consume(t,{name:!0});return e.createElement("footnoteRef",{footnoteId:r})}}),n.for("dataDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:e})=>S(t,e)}),n.for("editingDowncast").elementToElement({model:{name:"footnoteRef",attributes:["footnoteId","footnoteCounter"]},view:(t,{writer:n})=>{const o=t.getAttribute("footnoteCounter");return(0,e.toWidget)(S(t,n),n,{label:i("Footnote %0. Press ENTER to jump to footnote definition.",o)})}})}_defineDefinitionsConverters(){const{editor:t}=this,{t:n}=t.locale,{conversion:o}=t;o.for("upcast").elementToElement({view:{name:"ol",classes:["footnotes"]},model:"footnotesDefinitions",converterPriority:"high"}),o.for("dataDowncast").elementToElement({model:"footnotesDefinitions",view:{name:"ol",classes:["footnotes"]}}),o.for("editingDowncast").elementToStructure({model:"footnotesDefinitions",view:(t,{writer:o})=>{const i=o.createContainerElement("div",{class:"footnotes-wrapper","data-footnotes-list-label":n("Footnotes")},o.createContainerElement("ol",{class:"footnotes"},o.createSlot())),s=(0,e.toWidget)(i,o,{hasSelectionHandle:!0,label:n("Footnotes")});return o.setCustomProperty("footnotesDefinitions",!0,s),s}})}_defineDefinitionConverters(){const{editor:t}=this,{conversion:e,locale:n}=t,o=t.config.get("footnotes.multiBlock");e.for("upcast").add(t=>{t.on("element:li",(t,e,n)=>{const i=e.viewItem;if(!i.hasClass("footnote-definition")||!i.getAttribute("id"))return;const s=i.parent;if(!s.is("element","ol")||!s.hasClass("footnotes"))return;if(!n.consumable.test(i,{name:!0,attributes:"id",classes:"footnote-definition"}))return;const r=n.writer.createElement("footnoteDefinition",{footnoteId:i.getAttribute("id")});if(!n.safeInsert(r,e.modelCursor))return;n.consumable.consume(i,{name:!0,attributes:"id",classes:"footnote-definition"});const a=Array.from(i.getChildren()).find(t=>t.is("element")&&t.hasClass("footnote-content"));for(const t of i.getChildren())t.is("element")&&(n.consumable.consume(t,{name:!0,classes:"footnote-backlink",attributes:"href"}),n.consumable.consume(t,{name:!0,classes:"footnote-content"}));if(a)if(o)n.convertChildren(a,r);else{const t=n.writer.createElement("footnoteInlineContent");n.writer.insert(t,r),n.convertChildren(a,t)}n.updateConversionResult(r,e)})}),e.for("dataDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>E(t,e,n,{dataPipeline:!0})}),e.for("editingDowncast").elementToStructure({model:{name:"footnoteDefinition",attributes:["footnoteId"]},view:(t,{writer:e})=>E(t,e,n)})}_defineBogusParagraphConverters(){const{editor:t}=this,{conversion:e}=t;t.config.get("footnotes.multiBlock")?(e.for("editingDowncast").elementToElement({model:"paragraph",view:I(),converterPriority:"high"}),e.for("dataDowncast").elementToElement({model:"paragraph",view:I({dataPipeline:!0}),converterPriority:"high"}),this.listenTo(t.model.document,"change:data",()=>{!function(t,e){const n=t.document.differ,o=new Set;for(const t of n.getChanges()){const e="attribute"==t.type?t.range.start.parent:t.position.parent;e.is("element","footnoteDefinition")&&o.add(e)}for(const t of o.values()){const n=Array.from(t.getChildren()).filter(t=>C(t,e.mapper));for(const t of n)e.reconvertItem(t)}}(t.model,t.editing)})):(e.for("editingDowncast").elementToElement({model:"footnoteInlineContent",view:I()}),e.for("dataDowncast").elementToElement({model:"footnoteInlineContent",view:(t,{writer:e})=>{const n=e.createContainerElement("span");return e.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}))}_defineKeyboardHandlers(){const{editor:t}=this,{editing:n,t:o}=t,i=t.model.document.selection;t.keystrokes.set("CTRL+Alt+D","insertFootnote"),t.accessibility.addKeystrokeInfos({keystrokes:[{label:o("Insert footnote"),keystroke:"Ctrl+Alt+D"}]}),this.listenTo(n.view.document,"enter",(t,e)=>{const n=function(t){const e=t.getSelectedElement();return e?.is("element","footnoteRef")?e:null}(i);if(n){const o=n.getAttribute("footnoteId");this._moveSelectionToFootnoteDefinition(o),e.preventDefault(),t.stop()}},{context:e.isWidget})}_defineClickHandlers(){const{editor:t}=this,{editing:e}=t;t.editing.view.addObserver(s.PointerObserver),t.editing.view.addObserver(s.ClickObserver);let n=!1;this.listenTo(e.view.document,"pointerdown",(t,o)=>{const{target:i}=o,s=e.view.document.selection;n=!(!i.is("element","sup")||!i.hasClass("footnote"))&&s.getSelectedElement()===i},{priority:"high"}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e,o=n.getChild(0).getAttribute("href");this._moveSelectionToFootnoteDefinition(o.slice(1)),t.stop(),e.preventDefault()},{priority:"high",context:t=>t.is("element","sup")&&t.hasClass("footnote")&&n}),this.listenTo(e.view.document,"click",(t,e)=>{const{target:n}=e;if(!n.is("element","a"))return;let o=n.getAttribute("href");if(!o?.startsWith("#"))return;o=o.slice(1);let i=!1;(o.startsWith("ref-")&&this._moveSelectionToFootnoteReference(o.slice(4))||this._moveSelectionToFootnoteDefinition(o))&&(i=!0),i&&(e.preventDefault(),t.stop())},{priority:"high",context:"$capture"})}}function I({dataPipeline:t}={}){return(e,{writer:n})=>{if(!k(e))return null;if(!t)return n.createContainerElement("span",{class:"ck-footnote-bogus-paragraph"});const o=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,o),o}}function k(t){const{parent:e}=t;if(!e?.is("element","footnoteDefinition"))return!1;if(1!=e.childCount)return!1;for(const e of t.getAttributeKeys())if(!e.startsWith("selection:")&&"htmlEmptyBlock"!=e)return!1;return!0}function C(t,e){if(!t.is("element","paragraph"))return!1;const n=e.toViewElement(t);return!!n&&k(t)!==n.is("element","span")}function F(t){return(0,e.isWidget)(t)&&t.is("containerElement")&&!!t.getCustomProperty("footnotesDefinitions")}function S(t,e){const n=t.getAttribute("footnoteId"),o=t.getAttribute("footnoteCounter"),i=e.createUIElement("a",{id:"ref-"+n,href:"#"+n},function(t){const e=this.toDomElement(t);return e.textContent=o,e}),s=e.createContainerElement("sup",{class:"footnote"},[i]);return s.getFillerOffset=()=>null,s}function E(t,n,o,{dataPipeline:i}={}){const{t:s}=o,r=t.getAttribute("footnoteId"),a=n.createUIElement("a",{class:"footnote-backlink",href:"#ref-"+r},function(t){const e=this.toDomElement(t);return e.innerText="^",e}),c=i?n.createContainerElement("div",{class:"footnote-content"}):(0,e.toWidgetEditable)(n.createEditableElement("div",{class:"footnote-content"}),n,{label:s("Footnote content.")});return n.insert(n.createPositionAt(c,0),n.createSlot()),n.createContainerElement("li",{class:"footnote-definition",id:r},[a,c])}var x=n(331);const P=A;function A(t,e){const n=_();return(A=function(t,e){return n[t-=124]})(t,e)}function _(){const t=["18517QawWeg","get","end","root","from","element","stringify","3813087QRxtJz","9727776YAkbvc","12fHTnfW","editing","setAttribute","51650SZisXE","footnoteRef","definition","toData","reduce","getAttribute","requires","editor","3487OQdSal","contentInsertion","6600350UTfZEd","htmlProcessor","getFootnote","outputTransformation","drop","content","_handleCopyFootnotesDefinitions","append","method","parse","toModel","4RQvbfH","entries","FootnotesClipboard","footnotesDefinitions","init","find","getData","12084633EzGbDM","footnoteId","_insertEmptyFootnotesDefinitionsContainer","change","getFootnotes","footnoteDefinition","remove","createRangeIn","sourceEditorId","_handlePasteFootnotesDefinitions","add","dataTransfer","pluginName","_defineClipboardIntegration","clipboardInput","toView","getFootnotesDefinitionsObjectElement","createElement","data","length","isPremiumPlugin","insert","2362598McsAkm","getFirstRange","selection","document","listenTo","setData","application/ckeditor5-footnotes","push","create","12dCPSCS","isOfficialPlugin"];return(_=function(){return t})()}!function(t){const e=A,n=t();for(;;)try{if(675369===-parseInt(e(188))/1*(parseInt(e(186))/2)+-parseInt(e(195))/3*(-parseInt(e(148))/4)+-parseInt(e(137))/5+-parseInt(e(124))/6*(parseInt(e(177))/7)+parseInt(e(196))/8+-parseInt(e(155))/9+-parseInt(e(127))/10*(-parseInt(e(135))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(_);class D extends t.Plugin{static get[P(167)](){return P(150)}static get[P(133)](){return[v,x.ClipboardPipeline]}static get[P(187)](){return!0}static get[P(175)](){return!0}[P(152)](){this[P(168)]()}[P(168)](){const t=P;this[t(143)](),this[t(164)]()}[P(143)](){const t=P,{editor:e}=this,{plugins:n,model:o}=e,i=n[t(189)](x.ClipboardPipeline),s=n[t(189)](d);this[t(181)](i,t(140),(n,i)=>{const r=t,a=function(t,e){const n=A,o=new Set;for(const{item:i}of t[n(162)](e))i.is(n(193),n(128))&&o[n(165)](i[n(132)](n(156)));return Array[n(192)](o)}(o,i[r(142)]);if(!a[r(174)])return;const c=s[r(159)](),l=a[r(131)]((t,n)=>{const o=r,i=c[o(153)](t=>t.id===n);if(i){const n=e[o(173)][o(170)](i[o(129)],{isClipboardPipeline:!0}),s=e[o(173)][o(138)][o(130)](n);t[i.id]=s}return t},Object[r(185)](null));i[r(166)][r(182)](r(183),JSON[r(194)](l))})}[P(164)](){const t=P,{editor:e}=this,{model:n,plugins:o}=e,{view:s}=e[t(125)],r=o[t(189)](x.ClipboardPipeline),a=o[t(189)](d);let c=null;this[t(181)](s[t(180)],t(169),(e,n)=>{const o=t,i=n[o(166)][o(154)](o(183));c=i?JSON[o(146)](i):null}),this[t(181)](r,t(136),(o,s)=>{const r=t;if(!c)return;const l=s[r(163)]===this[r(134)].id;l&&r(141)===s[r(145)]||n[r(158)](t=>{const o=r;!function(t,e){const n=A,o=[];for(const{item:i}of t[n(162)](e))i.is(n(193),n(151))&&o[n(184)](i);for(const e of o)t[n(161)](e)}(t,s[o(142)]);let u=a[o(171)]();if(!u){const e=n[o(180)][o(179)][o(178)]()[o(191)];u=a[o(157)](t,e)}const f=function(t,e,n){const s=o,r=Object[s(185)](null);for(const{item:o}of t[s(162)](e))if(o.is(s(193),s(128))){const e=o[s(132)](s(156));if(!n(e))continue;r[e]||(r[e]=(0,i.uid)()),t[s(126)](s(156),r[e],o)}return r}(t,s[o(142)],t=>!l||null!==a[o(139)](t));for(const[n,i]of Object[o(149)](c)){const s=f[n]||n,r=t[o(172)](o(160),{footnoteId:s}),a=e[o(173)][o(138)][o(170)](i),c=e[o(173)][o(147)](a,r);t[o(144)](c,r),t[o(176)](r,u,o(190))}c=null})})}}var T=n(311),L=n(355),V=n(450),N=n.n(V),O=n(774),R=n.n(O),K=n(265),M=n.n(K),j=n(410),B=n.n(j),q=n(238),z=n.n(q),W=n(14),U={attributes:{"data-cke":!0}};U.setAttributes=B(),U.insert=M().bind(null,"head"),U.domAPI=R(),U.insertStyleElement=z();N()(W.A,U);W.A&&W.A.locals&&W.A.locals;class H 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",Z(t,T.ButtonView)),e.add("menuBar:insertFootnote",Z(t,T.MenuBarMenuListItemButtonView)),this.licenseKey=this.editor.config.get("licenseKey");const n=this.editor;this._licenseKeyCheckInterval=setInterval(()=>{let t;for(const e in n){const o=e,i=n[o];if("footnotesLicenseKeyValid"==i||"footnotesLicenseKeyInvalid"==i||"footnotesLicenseKeyExpired"==i||"footnotesLicenseKeyDomainLimit"==i||"footnotesLicenseKeyNotAllowed"==i||"footnotesLicenseKeyEvaluationLimit"==i||"footnotesLicenseKeyTrialLimit"==i||"footnotesLicenseKeyUsageLimit"==i){delete n[o],t=i,clearInterval(this._licenseKeyCheckInterval),this._licenseKeyCheckInterval=void 0;break}}"footnotesLicenseKeyInvalid"==t&&n._showLicenseError("invalid"),"footnotesLicenseKeyExpired"==t&&n._showLicenseError("expired"),"footnotesLicenseKeyDomainLimit"==t&&n._showLicenseError("domainLimit"),"footnotesLicenseKeyNotAllowed"==t&&n._showLicenseError("featureNotAllowed","Footnotes"),"footnotesLicenseKeyEvaluationLimit"==t&&n._showLicenseError("evaluationLimit"),"footnotesLicenseKeyTrialLimit"==t&&n._showLicenseError("trialLimit"),"footnotesLicenseKeyUsageLimit"==t&&n._showLicenseError("usageLimit")},1e3)}destroy(){super.destroy(),this._licenseKeyCheckInterval&&clearInterval(this._licenseKeyCheckInterval)}}function Z(t,e){const n=t.commands.get("insertFootnote");return o=>{const{t:i}=o,s=new e(o),r=s instanceof T.MenuBarMenuListItemButtonView;return s.bind("isEnabled").to(n,"isEnabled"),s.set({label:i(r?"Footnote":"Insert footnote"),icon:L.IconFootnote,tooltip:!0}),s.on("execute",()=>{n.execute(),t.editing.view.focus()}),s}}var G=X;function Q(){var t=["isOfficialPlugin","3465784VMBuEJ","4809512EhSCHi","isPremiumPlugin","5EAvaOI","1100610pvazRI","pluginName","4608504CSNytd","924yqCkVx","Footnotes","32315ppJGPF","462802NHvnhq","requires","2745837mbIKUc"];return(Q=function(){return t})()}function X(t,e){var n=Q();return(X=function(t,e){return n[t-=299]})(t,e)}!function(t){for(var e=X,n=t();;)try{if(845591===-parseInt(e(310))/1*(parseInt(e(303))/2)+-parseInt(e(305))/3+-parseInt(e(300))/4*(-parseInt(e(302))/5)+-parseInt(e(311))/6+parseInt(e(307))/7+parseInt(e(308))/8+parseInt(e(299))/9)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Q);class J extends t.Plugin{static get[G(312)](){return G(301)}static get[G(304)](){return[v,D,H]}static get[G(306)](){return!0}static get[G(309)](){return!0}}const Y=$;function $(t,e){const n=et();return($=function(t,e){return n[t-=260]})(t,e)}!function(t){const e=$,n=t();for(;;)try{if(309717===parseInt(e(261))/1*(parseInt(e(272))/2)+-parseInt(e(270))/3+-parseInt(e(269))/4+parseInt(e(266))/5*(-parseInt(e(263))/6)+parseInt(e(265))/7+-parseInt(e(267))/8*(-parseInt(e(276))/9)+parseInt(e(260))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(et);const tt=[Y(271),Y(275),Y(268),Y(264),Y(274),Y(273),Y(262),Y(277)];function et(){const t=["lower-alpha","decimal-leading-zero","9pEyuQs","upper-roman","12190660DUjOQp","27264vZKqrd","lower-roman","408840xPbtSG","upper-latin","943173hBqtFB","40uqhlFA","2217304gMwiSN","lower-latin","1805372qLipAq","1383324MibXbV","decimal","10YxZoub","upper-alpha"];return(et=function(){return t})()}const nt=ot;function ot(t,e){const n=it();return(ot=function(t,e){return n[t-=360]})(t,e)}function it(){const t=["footnotesListStyle","refresh","167472paBGDW","getAttribute","17017390DmvZwn","change","isEnabled","8FytIAH","1569222xVeSSn","model","269745VFAQcO","108prScCX","1220215ZQtrec","get","plugins","includes","11134rzpsBT","getFootnotesDefinitionsObjectElement","76qLooTY","_updateFootnotesCounters","execute","397266KHFfII","value","setAttribute"];return(it=function(){return t})()}!function(t){const e=ot,n=t();for(;;)try{if(424778===parseInt(e(368))/1*(-parseInt(e(370))/2)+-parseInt(e(373))/3+parseInt(e(378))/4+-parseInt(e(364))/5+-parseInt(e(363))/6*(parseInt(e(362))/7)+parseInt(e(383))/8*(parseInt(e(360))/9)+parseInt(e(380))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(it);class st extends t.Command{[nt(377)](){const t=nt,{editor:e}=this,n=e[t(366)][t(365)](d)[t(369)]();this[t(382)]=!!n,this[t(374)]=n?.[t(379)](t(376))??null}[nt(372)]({value:t}){const e=nt,{editor:n}=this,o=n[e(366)][e(365)](d),i=o[e(369)]();i&&tt[e(367)](t)&&n[e(361)][e(381)](n=>{const s=e;n[s(375)](s(376),t,i),o[s(371)](n)})}}function rt(){const t=["plugins","value","223442FBCJAL","4WQEuKr","get","isEnabled","footnotesListStart","250jKoAzh","getAttribute","getFootnotesDefinitionsObjectElement","_updateFootnotesCounters","1446RcMJEU","setAttribute","10376694bLPWBY","2146308iZcxhd","refresh","model","32081010hbhdDS","change","8ExlBZz","26738NGTBGC","execute","isInteger","3849734tQwSHd"];return(rt=function(){return t})()}const at=ct;function ct(t,e){const n=rt();return(ct=function(t,e){return n[t-=277]})(t,e)}!function(t){const e=ct,n=t();for(;;)try{if(639228===-parseInt(e(279))/1+-parseInt(e(285))/2+-parseInt(e(297))/3*(parseInt(e(286))/4)+-parseInt(e(290))/5*(parseInt(e(294))/6)+-parseInt(e(282))/7+-parseInt(e(278))/8*(parseInt(e(296))/9)+parseInt(e(300))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(rt);class lt extends t.Command{[at(298)](){const t=at,{editor:e}=this,n=e[t(283)][t(287)](d)[t(292)]();this[t(288)]=!!n,this[t(284)]=n?.[t(291)](t(289))??null}[at(280)]({value:t}){const e=at,{editor:n}=this,o=n[e(283)][e(287)](d),i=o[e(292)]();i&&Number[e(281)](t)&&n[e(299)][e(277)](n=>{const s=e;n[s(295)](s(289),t,i),o[s(293)](n)})}}const ut=ft;function ft(t,e){const n=dt();return(ft=function(t,e){return n[t-=282]})(t,e)}function dt(){const t=["config","footnotes.footnotesProperties.defaultListStyle","647935hFktOn","toUpperCase","start","_formatFootnoteListValue","editingDowncast","_definePostfixer","registerPostFixer","_defineFormatter","9uwsgbH","for","pluginName","upper-alpha","consumable","name","_getDefaultListStyle","commands","style","requires","attributeNewValue","274KwEobu","modelRange","attribute:footnotesListStyle:footnotesDefinitions","floor","getItems","toLowerCase","model","_updateFootnotesCounters","getAttribute","isOfficialPlugin","footnotesListStart","insert","fromCharCode","item","upper-roman","low","setStyle","extend","list-style-type","getStyle","2738478zUWojP","attributeToAttribute","footnotesDefinitions","decimal-leading-zero","createRangeOn","padStart","define","attribute:footnotesListStart:footnotesDefinitions","nodeAfter","_defineSchema","mapper","1120567kajDse","decimal","footnotesListStyle","lower-latin","isPremiumPlugin","FootnotesPropertiesEditing","11312984uazcqu","lower-alpha","position","footnotes.footnotesProperties.defaultStartIndex","_defineConverters","upper-latin","hasAttribute","footnotesStyle","lower-roman","document","max","consume","726DtfxmO","toViewElement","editor","getChildren","plugins","checkAttribute","footnotesStart","writer","from","element","isNaN","$text","setAttribute","init","getChanges","element:ol","dataDowncast","upcast","removeAttribute","setFootnoteFormatter","removeStyle","parseInt","find","_getDefaultStartIndex","1802128FtruCo","differ","78YMkfsg","type","add","9032340fnmAPS","get"];return(dt=function(){return t})()}!function(t){const e=ft,n=t();for(;;)try{if(892781===-parseInt(e(311))/1*(parseInt(e(360))/2)+-parseInt(e(331))/3+-parseInt(e(283))/4+-parseInt(e(292))/5*(-parseInt(e(285))/6)+parseInt(e(342))/7+-parseInt(e(348))/8*(-parseInt(e(300))/9)+-parseInt(e(288))/10)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(dt);class pt extends t.Plugin{static get[ut(302)](){return ut(347)}static get[ut(309)](){return[v,d]}static get[ut(320)](){return!0}static get[ut(346)](){return!0}[ut(373)](){const t=ut,{editor:e}=this;e[t(290)][t(337)](t(291),t(343)),e[t(290)][t(337)](t(351),1),e[t(307)][t(287)](t(355),new st(e)),e[t(307)][t(287)](t(366),new lt(e)),this[t(340)](),this[t(352)](),this[t(299)](),this[t(297)]()}[ut(340)](){const t=ut,{editor:e}=this,{schema:n}=e[t(317)];n[t(328)](t(333),{allowAttributes:[t(344),t(321)]})}[ut(352)](){const t=ut,{editor:e}=this,{conversion:n,model:o}=e,{schema:i}=o;n[t(301)](t(377))[t(332)]({view:{name:"ol",styles:{"list-style-type":/.+/}},model:{key:t(344),value:e=>e[t(330)](t(329))}}),n[t(301)](t(377))[t(332)]({view:{name:"ol",attributes:{start:/.+/}},model:{key:t(321),value:e=>{const n=t,o=e[n(319)](n(294)),i=Number[n(381)](o,10);return Number[n(370)](i)?null:i}}}),n[t(301)](t(377))[t(332)]({view:{name:"ol",attributes:{type:/.+/}},model:{key:t(344),value:e=>({1:t(343),a:t(349),A:t(303),i:t(356),I:t(325)}[e[t(319)](t(286))])}}),n[t(301)](t(377))[t(287)](e=>{const n=t;e.on(n(375),(t,e,o)=>{const s=n,r=e[s(312)]?.[s(294)][s(339)];r?.is(s(369),s(333))&&(!r[s(354)](s(344))&&i[s(365)](r,s(344))&&o[s(367)][s(372)](s(344),s(343),r),!r[s(354)](s(321))&&i[s(365)](r,s(321))&&o[s(367)][s(372)](s(321),1,r))},{priority:n(326)})}),n[t(301)](t(376))[t(332)]({model:{name:t(333),key:t(321)},view:e=>1===e?null:{key:t(294),value:String(e)}}),n[t(301)](t(376))[t(332)]({model:{name:t(333),key:t(344)},view:e=>t(343)===e?null:{key:t(308),value:{"list-style-type":e}}}),n[t(301)](t(296))[t(287)](e=>{const n=t;e.on(n(338),(t,e,o)=>{const i=n;if(!o[i(304)][i(359)](e[i(324)],t[i(305)]))return;const s=ht(e[i(324)],o[i(341)]);null===e[i(310)]||void 0===e[i(310)]||1===e[i(310)]?o[i(367)][i(378)](i(294),s):o[i(367)][i(372)](i(294),String(e[i(310)]),s)}),e.on(n(313),(t,e,o)=>{const i=n;if(!o[i(304)][i(359)](e[i(324)],t[i(305)]))return;const s=ht(e[i(324)],o[i(341)]);e[i(310)]&&i(343)!==e[i(310)]?o[i(367)][i(327)](i(329),e[i(310)],s):o[i(367)][i(380)](i(329),s)})})}[ut(297)](){const t=ut,{editor:e}=this,{model:n}=e,o=e[t(364)][t(289)](d),i=this[t(306)](),s=this[t(282)]();n[t(357)][t(298)](e=>{const r=t,a=n[r(357)][r(284)][r(374)]();let c=!1;for(const t of a){if(r(322)!==t[r(286)]||r(371)===t[r(305)])continue;const o=n[r(335)](t[r(350)][r(339)]);for(const t of o[r(315)]())t.is(r(369),r(333))&&(t[r(354)](r(321))||(e[r(372)](r(321),s,t),c=!0),t[r(354)](r(344))||(e[r(372)](r(344),i,t),c=!0))}return c&&o[r(318)](e),c})}[ut(299)](){const t=ut,{editor:e}=this;e[t(364)][t(289)](d)[t(379)](e=>this[t(295)](e))}[ut(306)](){const t=ut;return this[t(362)][t(290)][t(289)](t(291))}[ut(282)](){const t=ut;return this[t(362)][t(290)][t(289)](t(351))}[ut(295)]({container:t,value:e,digits:n}){const o=ut,i=t[o(319)](o(344)),s=t[o(319)](o(321)),r=Math[o(314)](e)+(s-1);switch(i){case o(343):default:return String(r);case o(334):return function(t,e){const n=o;return String(t)[n(336)](e,"0")}(r,Math[o(358)](2,n));case o(349):case o(345):return mt(r,!1);case o(303):case o(353):return mt(r,!0);case o(356):return wt(r,!1);case o(325):return wt(r,!0)}}}function ht(t,e){const n=ut,o=e[n(361)](t);return Array[n(368)](o[n(363)]())[n(382)](t=>t.is(n(369),"ol"))}function mt(t,e){const n=ut;let o="",i=t;for(;i>0;){const t=(i-1)%26;o=String[n(323)](97+t)+o,i=Math[n(314)]((i-1)/26)}return e?o[n(293)]():o}const gt=[{value:1e3,numeral:"M"},{value:900,numeral:"CM"},{value:500,numeral:"D"},{value:400,numeral:"CD"},{value:100,numeral:"C"},{value:90,numeral:"XC"},{value:50,numeral:"L"},{value:40,numeral:"XL"},{value:10,numeral:"X"},{value:9,numeral:"IX"},{value:5,numeral:"V"},{value:4,numeral:"IV"},{value:1,numeral:"I"}];function wt(t,e){const n=ut;let o="",i=t;for(const{value:t,numeral:e}of gt)for(;i>=t;)o+=e,i-=t;return e?o:o[n(316)]()}class yt extends T.View{children;stylesView=null;additionalProperties=null;startIndexFieldView=null;focusTracker=new i.FocusTracker;keystrokes=new i.KeystrokeHandler;focusables=new T.ViewCollection;focusCycler;constructor(t,{styleButtonViews:e,styleGridAriaLabel:n}){super(t),this.focusCycler=new T.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children=this.createCollection(),this.stylesView=this._appendStylesView(e,n),[this.startIndexFieldView,this.additionalProperties]=this._appendAdditionalPropertiesCollapsibleView(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-footnotes-definitions-properties"]},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element);for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,T.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>i.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_appendStylesView(t,e){const n=new T.View(this.locale);return n.children=n.createCollection(),n.children.addMany(t),n.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-footnotes-definitions-styles-list"]},children:n.children}),n.children.delegate("execute").to(this),n.focus=function(){for(const t of this.children)if(t instanceof T.ButtonView&&t.isOn)return void t.focus();this.children.first.focus()},n.focusTracker=new i.FocusTracker,n.keystrokes=new i.KeystrokeHandler,n.render(),n.keystrokes.listenTo(n.element),this.children.add(n),n}_appendAdditionalPropertiesCollapsibleView(){const{t}=this.locale,e=this._createStartIndexPropertyView(),n=[e],o=new T.CollapsibleView(this.locale,n);return o.set({label:t("Footnotes properties"),isCollapsed:!0}),o.buttonView.bind("isEnabled").toMany(n,"isEnabled",(...t)=>t.some(t=>t)),o.buttonView.on("change:isEnabled",(t,e,n)=>{n||(o.isCollapsed=!0)}),this.children.add(o),[e,o]}_createStartIndexPropertyView(){const{t}=this.locale,e=new T.LabeledFieldView(this.locale,T.createLabeledInputNumber);return e.set({label:t("Footnotes start at"),class:"ck-footnotes-definitions-properties__start-index"}),e.fieldView.set({min:0,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",()=>{const n=e.fieldView.element,o=n.valueAsNumber;Number.isNaN(o)?e.errorText=t("Invalid footnotes start index value."):n.checkValidity()?this.fire("footnotesListStart",{startIndex:o}):e.errorText=t("Footnotes start index must be greater than 0.")}),e}}var bt=n(945),vt={attributes:{"data-cke":!0}};vt.setAttributes=B(),vt.insert=M().bind(null,"head"),vt.domAPI=R(),vt.insertStyleElement=z();N()(bt.A,vt);bt.A&&bt.A.locals&&bt.A.locals;class It extends t.Plugin{static get pluginName(){return"FootnotesPropertiesUI"}static get requires(){return[T.ContextualBalloon,e.WidgetToolbarRepository]}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const{editor:t}=this,{componentFactory:e}=t.ui;var n;t.config.define("footnotes.footnotesProperties.toolbar",["footnotesStyle"]),e.add("footnotesStyle",(n=t,t=>{const{t:e}=t,o=n.commands.get("footnotesStyle"),i=(0,T.createDropdown)(t),{buttonView:s}=i;return i.class="ck-footnotes-styles-dropdown",i.bind("isEnabled").to(o,"isEnabled"),s.set({label:e("Footnotes style"),icon:L.IconFootnote,tooltip:!0}),i.once("change:isOpen",()=>{const t=function({editor:t,dropdownView:e}){const{t:n}=t.locale,o=n("Footnotes definitions styles"),i=function(t){const e=t.locale.t;return[{label:e("Toggle the decimal footnotes style"),tooltip:e("Decimal footnotes"),style:"decimal",icon:L.IconListStyleDecimal},{label:e("Toggle the decimal with leading zero footnotes style"),tooltip:e("Decimal footnotes with leading zero"),style:"decimal-leading-zero",icon:L.IconListStyleDecimalLeadingZero},{label:e("Toggle the lower–roman footnotes style"),tooltip:e("Lower–roman footnotes"),style:"lower-roman",icon:L.IconListStyleLowerRoman},{label:e("Toggle the upper–roman footnotes style"),tooltip:e("Upper-roman footnotes"),style:"upper-roman",icon:L.IconListStyleUpperRoman},{label:e("Toggle the lower–latin footnotes style"),tooltip:e("Lower-latin footnotes"),style:"lower-latin",icon:L.IconListStyleLowerLatin},{label:e("Toggle the upper–latin footnotes style"),tooltip:e("Upper-latin footnotes"),style:"upper-latin",icon:L.IconListStyleUpperLatin}].map(function(t){const e=t.locale;return({label:n,icon:o,tooltip:i,style:s})=>{const r=t.commands.get("footnotesStyle"),a=new T.ButtonView(e);return a.set({label:n,icon:o,tooltip:i}),a.bind("isOn").to(r,"value",t=>t===s),a.bind("isEnabled").to(r,"isEnabled"),a.on("execute",()=>{t.execute("footnotesStyle",{value:s}),t.editing.view.focus()}),a}}(t))}(t),s=new yt(t.locale,{styleGridAriaLabel:o,styleButtonViews:i});return s.delegate("execute").to(e),s.on("footnotesListStart",(e,n)=>{t.execute("footnotesStart",{value:n.startIndex})}),s}({editor:n,dropdownView:i});i.panelView.children.add(t)}),i}))}afterInit(){const{editor:t}=this,{t:n}=t.locale,o=t.plugins.get(e.WidgetToolbarRepository),{defaultPositions:i}=T.BalloonPanelView;o.register("footnotesDefinitions",{ariaLabel:n("Footnotes definitions toolbar"),items:t.config.get("footnotes.footnotesProperties.toolbar"),balloonClassName:"ck-footnotes-style-balloon ck-toolbar-container",getRelatedElement:t=>{let e=t.getFirstPosition()?.parent;return e?.is("$text")&&(e=e.parent),e?.is("element")?e.findAncestor(F):null},positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth]})}}function kt(t,e){var n=Ct();return(kt=function(t,e){return n[t-=173]})(t,e)}function Ct(){var t=["403251xryoUk","10877657hBJATP","isPremiumPlugin","20chXESF","isOfficialPlugin","28036107iDyifQ","890oddnZc","requires","388692ufWaNg","pluginName","6012foJZtg","11344kLxivr","FootnotesProperties","685nYzcOk","44MfwwOb","2185670kpFrfS"];return(Ct=function(){return t})()}var Ft=kt;!function(t){for(var e=kt,n=t();;)try{if(894357===-parseInt(e(180))/1*(parseInt(e(173))/2)+-parseInt(e(183))/3*(parseInt(e(181))/4)+parseInt(e(186))/5*(-parseInt(e(175))/6)+parseInt(e(184))/7+parseInt(e(178))/8*(-parseInt(e(177))/9)+-parseInt(e(182))/10+parseInt(e(188))/11)break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Ct);class St extends t.Plugin{static get[Ft(176)](){return Ft(179)}static get[Ft(174)](){return[pt,It]}static get[Ft(187)](){return!0}static get[Ft(185)](){return!0}}function Et(){var t=["24912ECsOCS","868310edOazP","440SwlkUR","981756pUnYkf","10505929qjGfIK","6AtvRxw","2KayYnH","4035990YmCMaz","4213296bcZQZL","6529240Nqsygr","708ZOykDT"];return(Et=function(){return t})()}function xt(t,e){var n=Et();return(xt=function(t,e){return n[t-=199]})(t,e)}!function(t){for(var e=xt,n=t();;)try{if(956272===parseInt(e(205))/1*(parseInt(e(208))/2)+-parseInt(e(202))/3*(-parseInt(e(201))/4)+-parseInt(e(209))/5+parseInt(e(207))/6*(parseInt(e(206))/7)+parseInt(e(200))/8+parseInt(e(199))/9+parseInt(e(203))/10*(-parseInt(e(204))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}}(Et)})(),(window.CKEditor5=window.CKEditor5||{}).footnotes=o})();
|