@ckeditor/ckeditor5-footnotes 0.0.0-nightly-20251018.0 → 0.0.0-nightly-20251019.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/footnotesediting.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:1760745600;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:()=>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:1760832e3;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})();
|
package/dist/index.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x5dd69c,Command as _0x1159f6}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x40f775,isWidget as _0x52dc53,toWidgetEditable as _0x572824,WidgetToolbarRepository as _0x121d00}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x4970a6,logWarning as _0x1e6eca,FocusTracker as it,KeystrokeHandler as et,global as ot}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0x2a6255,ClickObserver as _0x1281d6}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x4a149c}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x158f1a,ButtonView as _0x4f7301,View as _0x5e6fbf,ViewCollection as _0x5f3227,FocusCycler as _0x2f996f,addKeyboardHandlingForGrid as _0x1fa4bf,CollapsibleView as _0x42bd83,LabeledFieldView as tt,createLabeledInputNumber as st,ContextualBalloon as _0x369595,BalloonPanelView as _0x52e42a,createDropdown as _0x24d4ee}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x242f94,IconListStyleDecimal as _0x3b2851,IconListStyleDecimalLeadingZero as _0x1c38c6,IconListStyleLowerRoman as _0x5a7599,IconListStyleUpperRoman as _0x3a4c8d,IconListStyleLowerLatin as _0x24244e,IconListStyleUpperLatin as _0xea279a}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x3a1239,_0x1b532a){this['_model']=_0x3a1239,this['_elementName']=_0x1b532a['elementName'],this['_getElementKey']=_0x1b532a['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x2411b2){const _0x772747=new Set(),_0x337039=new Map();for(const _0x1107d0 of _0x2411b2){if('insert'===_0x1107d0['type']&&'$text'!==_0x1107d0['name']&&_0x1107d0['position']['nodeAfter']){const _0x519c70=this['_model']['createRangeOn'](_0x1107d0['position']['nodeAfter']);for(const _0x3dee1b of _0x519c70['getItems']()){if(!_0x3dee1b['is']('element',this['_elementName']))continue;const _0x4f37a0=this['_getElementKey'](_0x3dee1b);_0x337039['has'](_0x4f37a0)||_0x337039['set'](_0x4f37a0,[]),_0x337039['get'](_0x4f37a0)['push'](_0x3dee1b);}}if('remove'===_0x1107d0['type']&&_0x1107d0['name']===this['_elementName']){const _0x828b3c=this['_getElementKey']({'getAttribute':_0x478862=>_0x1107d0['attributes']['get'](_0x478862)});_0x772747['add'](_0x828b3c);}}for(const [_0x5b45cd,_0x114cd3]of this['_trackedElements'])'$graveyard'===_0x114cd3['root']['rootName']&&_0x772747['add'](_0x5b45cd);for(const _0x307d3c of _0x772747)this['_trackedElements']['delete'](_0x307d3c);for(const [_0x2ec62c,_0x1c087f]of _0x337039)this['_trackedElements']['set'](_0x2ec62c,_0x1c087f[_0x1c087f['length']-0x1]);const _0x3c2276=new Set();for(const [_0x59a229,_0x3c87ce]of _0x337039)_0x772747['has'](_0x59a229)&&(_0x3c2276['add'](_0x3c87ce[0x0]),_0x3c87ce['length']>0x1?_0x337039['set'](_0x59a229,_0x3c87ce['slice'](0x1)):_0x337039['delete'](_0x59a229),_0x772747['delete'](_0x59a229));return{'removed':Array['from'](_0x772747),'inserted':Array['from'](_0x337039['values']())['flat'](),'moved':Array['from'](_0x3c2276)};}}class c extends _0x5dd69c{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e6721){super(_0x1e6721),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x341fe4=>_0x341fe4['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x3edd74=>_0x3edd74['getAttribute']('footnoteId')});}['init'](){const {editor:_0x2e1e3d}=this,{model:_0x3e7087,data:_0x2a00ff}=_0x2e1e3d;_0x3e7087['document']['registerPostFixer'](_0x411c6b=>{const _0xa333ec=_0x3e7087['document']['differ']['getChanges']();let _0x1fc7c9=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x411c6b,_0xa333ec)&&(_0x1fc7c9=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x411c6b,_0xa333ec)&&(_0x1fc7c9=!0x0),this['_handleFootnoteReferencesChanges'](_0x411c6b,_0xa333ec)&&(_0x1fc7c9=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x411c6b)&&(_0x1fc7c9=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x411c6b)&&(_0x1fc7c9=!0x0),this['_sortFootnoteDefinitions'](_0x411c6b)&&(_0x1fc7c9=!0x0),_0x1fc7c9;}),this['listenTo'](_0x3e7087['document'],'change:data',()=>{_0x3e7087['enqueueChange']({'isUndoable':!0x1},_0x466111=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x466111);});},{'priority':'low'}),this['listenTo'](_0x2a00ff,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x5b901e){return this['_footnotes']['find'](_0x36a185=>_0x36a185['id']===_0x5b901e)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x50d837){this['_footnoteFormatter']=_0x50d837;}['_updateFootnotesCounters'](_0x45370d,_0x2ba7be=0x0){let _0x307b52=!0x1;for(let _0x5398d3=_0x2ba7be;_0x5398d3<this['_footnotes']['length'];_0x5398d3++)this['_updateFootnoteRefCounter'](_0x45370d,_0x5398d3)&&(_0x307b52=!0x0);return _0x307b52;}['_insertEmptyFootnotesDefinitionsContainer'](_0x4d88e0,_0x37e658){const _0x512700=_0x4d88e0['createElement']('footnotesDefinitions',{});return _0x4d88e0['append'](_0x512700,_0x37e658),this['_footnotesDefinitions']=_0x512700,_0x512700;}['_ensureFootnotesDefinitionsContainerExists'](_0x16bf6b){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x52f853=this['_footnotes'][0x0]['reference']['root'],_0x533886=this['_insertEmptyFootnotesDefinitionsContainer'](_0x16bf6b,_0x52f853);for(const _0x42c7eb of this['_footnotes'])_0x42c7eb['definition']['parent']||_0x16bf6b['insert'](_0x42c7eb['definition'],_0x533886,'end');this['_updateFootnotesCounters'](_0x16bf6b);}['_handleFootnotesDefinitionsObjectChanges'](_0x2b71a1,_0x365ae1){let _0x31e693=!0x1;const {inserted:_0x3887f3,removed:_0x2b15d4,moved:_0x2db8ae}=this['_footnoteDefsContainerTracker']['getChanges'](_0x365ae1);if(_0x2db8ae['length']&&(this['_footnotesDefinitions']=_0x2db8ae[0x0]),_0x3887f3['length']){if(_0x3887f3['length']>0x1||this['_footnotesDefinitions']&&_0x3887f3['some'](_0x1741b5=>_0x1741b5!==this['_footnotesDefinitions'])){const _0x4f6fa1=_0x2b71a1['createElement']('footnotesDefinitions',{}),_0x15cbba=[];this['_footnotesDefinitions']&&_0x15cbba['push'](this['_footnotesDefinitions']),_0x15cbba['push'](..._0x3887f3),_0x2b71a1['insert'](_0x4f6fa1,_0x15cbba[0x0],'before');for(const _0x44b47b of _0x15cbba)_0x2b71a1['move'](_0x2b71a1['createRangeIn'](_0x44b47b),_0x2b71a1['createPositionAt'](_0x4f6fa1,'end')),_0x2b71a1['remove'](_0x44b47b);this['_footnotesDefinitions']=_0x4f6fa1,this['_updateFootnotesCounters'](_0x2b71a1),_0x31e693=!0x0;}else this['_footnotesDefinitions']=_0x3887f3[0x0];}if(_0x2b15d4['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x54ccec of this['_footnotes'])_0x2b71a1['remove'](_0x54ccec['reference']),_0x31e693=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x31e693;}['_handleFootnoteDefinitionsChanges'](_0x1d4207,_0x5d6f91){let _0x3c1bf0=!0x1;const _0x26cf5d=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x3358f3,moved:_0x347082}=this['_footnoteDefsTracker']['getChanges'](_0x5d6f91);for(const _0x26e578 of[..._0x347082,..._0x3358f3]){const _0x446f49=_0x26e578['getAttribute']('footnoteId'),_0x4cfea7=this['getFootnote'](_0x446f49);_0x4cfea7&&(_0x4cfea7['definition']=_0x26e578),_(_0x1d4207,_0x26cf5d,_0x26e578)&&(_0x3c1bf0=!0x0);}return _0x3c1bf0;}['_handleFootnoteReferencesChanges'](_0x13adbe,_0x3263fb){let _0x1a6184=!0x1;const {removed:_0x5112d6,inserted:_0x4354c6,moved:_0x4e9e28}=this['_footnoteRefsTracker']['getChanges'](_0x3263fb);for(const _0xb3b1c6 of _0x5112d6)this['_handleRemoveFootnoteReferenceById'](_0x13adbe,_0xb3b1c6)&&(_0x1a6184=!0x0);for(const _0x22a4ac of _0x4354c6)this['_handleInsertedFootnoteReference'](_0x13adbe,_0x22a4ac)&&(_0x1a6184=!0x0);for(const _0x447afa of _0x4e9e28)this['_handleMovedFootnoteReference'](_0x13adbe,_0x447afa)&&(_0x1a6184=!0x0);return _0x1a6184;}['_handleFootnotesDefinitionsObjectSync'](_0x57383c){if(!this['_footnotesDefinitions'])return!0x1;let _0x5aca30=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x472b00=[];for(const _0x326772 of this['_footnotesDefinitions']['getChildren']()){const _0x5caf24=_0x326772['getAttribute']('footnoteId');this['getFootnote'](_0x5caf24)||(_0x472b00['unshift'](_0x326772),_0x5aca30=!0x0);}for(const _0x3bbb07 of _0x472b00)_0x57383c['remove'](_0x3bbb07);}const _0x175184=new Set(),_0x3af0d8=[];for(const _0x324538 of this['_footnotesDefinitions']['getChildren']()){const _0x1a4516=_0x324538['getAttribute']('footnoteId');_0x175184['has'](_0x1a4516)?(_0x3af0d8['unshift'](_0x324538),_0x5aca30=!0x0):_0x175184['add'](_0x1a4516);}for(const _0x20511c of _0x3af0d8)_0x57383c['remove'](_0x20511c);return this['_footnotesDefinitions']['childCount']||(_0x57383c['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0x5aca30=!0x0),_0x5aca30;}['_handleInsertedFootnoteReference'](_0x2edc4a,_0x2a2d07){if(this['_footnotes']['find'](_0x500451=>_0x500451['reference']===_0x2a2d07))return!0x1;let _0x5db57f=!0x1;const _0x3f9bb9=_0x2a2d07['getAttribute']('footnoteId'),_0x10d37a=this['getFootnote'](_0x3f9bb9);_0x10d37a&&(_0x2edc4a['remove'](_0x10d37a['reference']),this['_footnotes']=this['_footnotes']['filter'](_0xa79de7=>_0xa79de7['id']!==_0x3f9bb9),_0x5db57f=!0x0);let _0x13f67c=this['_footnotesDefinitions']?function(_0x26172,_0x2cfec6){for(const _0x338796 of _0x26172['getChildren']())if(_0x338796['getAttribute']('footnoteId')===_0x2cfec6)return _0x338796;return null;}(this['_footnotesDefinitions'],_0x3f9bb9):null;_0x13f67c||(_0x13f67c=_0x2edc4a['createElement']('footnoteDefinition',{'footnoteId':_0x3f9bb9}),this['_footnotesDefinitions']&&(_0x2edc4a['insert'](_0x13f67c,this['_footnotesDefinitions'],'end'),_0x5db57f=!0x0));const _0x1f4449={'id':_0x3f9bb9,'reference':_0x2a2d07,'definition':_0x13f67c},_0x38afa0=I(this['editor']['model'],this['_footnotes'],_0x2a2d07);return this['_footnotes']['splice'](_0x38afa0,0x0,_0x1f4449),this['_updateFootnotesCounters'](_0x2edc4a,_0x38afa0)&&(_0x5db57f=!0x0),_0x5db57f;}['_handleRemoveFootnoteReferenceById'](_0x24220e,_0x39d742){const _0xf795ca=this['_footnotes']['findIndex'](_0x240164=>_0x240164['id']===_0x39d742);if(-0x1===_0xf795ca)return!0x1;let _0x203c9f=!0x1;const _0x33af72=this['_footnotes'][_0xf795ca];return'$graveyard'!==_0x33af72['definition']['root']['rootName']&&(_0x24220e['remove'](_0x33af72['definition']),_0x203c9f=!0x0),this['_footnotes']['splice'](_0xf795ca,0x1),this['_updateFootnotesCounters'](_0x24220e,_0xf795ca)&&(_0x203c9f=!0x0),_0x203c9f;}['_handleMovedFootnoteReference'](_0x437fd8,_0x302d69){const _0x50c63e=_0x302d69['getAttribute']('footnoteId'),_0x46c628=this['_footnotes']['findIndex'](_0x521d87=>_0x521d87['id']===_0x50c63e),_0x3819a6=this['_footnotes'][_0x46c628];let _0x5c1e6b=!0x1;_0x3819a6['reference']=_0x302d69,this['_footnotes']['splice'](_0x46c628,0x1);const _0xa02581=I(this['editor']['model'],this['_footnotes'],_0x302d69);return this['_footnotes']['splice'](_0xa02581,0x0,_0x3819a6),this['_updateFootnotesCounters'](_0x437fd8,Math['min'](_0x46c628,_0xa02581))&&(_0x5c1e6b=!0x0),_0x5c1e6b;}['_updateFootnoteRefCounter'](_0x2efc37,_0x43644d){if(!this['_footnotesDefinitions'])return!0x1;const _0x3b403c=this['_footnotes'][_0x43644d];let _0x5769fa;return _0x5769fa=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x3b403c,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x43644d+0x1}):String(_0x43644d+0x1),_0x3b403c['reference']['getAttribute']('footnoteCounter')!=_0x5769fa&&(_0x2efc37['setAttribute']('footnoteCounter',_0x5769fa,_0x3b403c['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x3139ae){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x5f1865,_0x5e9fa3){if(_0x5f1865['length']!==_0x5e9fa3['length'])return!0x1;for(let _0x543ca9=0x0;_0x543ca9<_0x5f1865['length'];_0x543ca9++)if(_0x5f1865[_0x543ca9]!==_0x5e9fa3[_0x543ca9])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x2ee20b=>_0x2ee20b['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x229fe8=>_0x229fe8['getAttribute']('footnoteId'))))return!0x1;let _0x346228=!0x1;for(let _0x34e6dd=0x0;_0x34e6dd<this['_footnotes']['length'];_0x34e6dd++){const _0x5517e8=this['_footnotes'][_0x34e6dd],_0x37fbde=_0x3139ae['createPositionBefore'](_0x5517e8['definition']),_0x50eab9=_0x3139ae['createPositionAt'](this['_footnotesDefinitions'],_0x34e6dd);_0x37fbde['isEqual'](_0x50eab9)||(_0x3139ae['move'](_0x3139ae['createRangeOn'](_0x5517e8['definition']),_0x50eab9),_0x346228=!0x0);}return _0x346228;}['_ensureFootnotesReferencesHaveProperOrder'](_0x3e8dc9){if(!this['_footnotes']['length'])return!0x1;const {model:_0x328188}=this['editor'];let _0x42dde2=!0x1;for(let _0x2f41ec=0x0;_0x2f41ec<this['_footnotes']['length']-0x1;_0x2f41ec++){const _0x536793=this['_footnotes'][_0x2f41ec],_0x33e4fb=this['_footnotes'][_0x2f41ec+0x1],_0x23afb4=_0x328188['createPositionBefore'](_0x536793['reference']),_0x486545=_0x328188['createPositionBefore'](_0x33e4fb['reference']);'after'===_0x23afb4['compareWith'](_0x486545)&&(this['_handleMovedFootnoteReference'](_0x3e8dc9,_0x536793['reference']),_0x2f41ec=-0x1,_0x42dde2=!0x0);}return _0x42dde2;}}function _(_0x32109e,_0x199d9b,_0x35cfcc){if(_0x35cfcc['childCount'])return!0x1;const _0x60cf7d=_0x199d9b?'paragraph':'footnoteInlineContent';return _0x32109e['insert'](_0x32109e['createElement'](_0x60cf7d),_0x35cfcc),!0x0;}function I(_0x424142,_0x325097,_0x13e8fb){if(0x0===_0x325097['length'])return 0x0;const _0x235574=_0x424142['createPositionBefore'](_0x13e8fb);for(let _0x33296a=0x0;_0x33296a<_0x325097['length'];_0x33296a++){const _0x30c93b=_0x325097[_0x33296a],_0xe14fc3=_0x424142['createPositionBefore'](_0x30c93b['reference']);if('before'===_0x235574['compareWith'](_0xe14fc3))return _0x33296a;}const _0x34c6be=_0x13e8fb['root'];let _0x2c60e2=-0x1;for(let _0x4b0474=_0x325097['length']-0x1;_0x4b0474>=0x0;_0x4b0474--)if(_0x325097[_0x4b0474]['reference']['root']===_0x34c6be){_0x2c60e2=_0x4b0474;break;}if(-0x1!==_0x2c60e2)return _0x2c60e2+0x1;const _0x53b6eb=_0x424142['document']['getRootNames'](),_0x463b3b=_0x53b6eb['indexOf'](_0x34c6be['rootName']),_0x225ca2=_0x53b6eb[_0x463b3b+0x1];if(_0x225ca2){for(let _0x13ca81=0x0;_0x13ca81<_0x325097['length'];_0x13ca81++)if(_0x325097[_0x13ca81]['reference']['root']['rootName']===_0x225ca2)return _0x13ca81;}return _0x325097['length'];}class w extends _0x1159f6{['refresh'](){const _0x35076c=this['editor']['model']['document']['selection'],_0x263ce7=this['_getPositionToInsertFootnote'](_0x35076c);this['isEnabled']=!!_0x263ce7;}['execute'](_0x349e13){const {editor:_0x509dc0}=this,{model:_0x330fff}=_0x509dc0,{selection:_0x3d2377}=_0x330fff['document'],_0x4f8461=this['_getPositionToInsertFootnote'](_0x3d2377);if(!_0x4f8461)return;const _0x2225d9=_0x509dc0['plugins']['get']('FootnotesEditing'),_0x5e746a=_0x349e13?.['footnoteId']??_0x4970a6();!function(_0x58cd4b){return'string'==typeof _0x58cd4b&&_0x58cd4b['length']>0x0&&!/\s/['test'](_0x58cd4b)&&!/^\d/['test'](_0x58cd4b);}(_0x5e746a)?_0x1e6eca('insert-footnote-command-executed-with-invalid-id'):(_0x330fff['change'](_0x52c082=>{const _0x59c2d0=_0x52c082['createElement']('footnoteRef',{'footnoteId':_0x5e746a});_0x330fff['insertObject'](_0x59c2d0,_0x4f8461,null);}),_0x2225d9['_moveSelectionToFootnoteDefinition'](_0x5e746a));}['_getPositionToInsertFootnote'](_0x1d4f5a){const {model:_0x1466d5}=this['editor'],{schema:_0x1979f2}=_0x1466d5,_0x5414dd=_0x1d4f5a['getFirstRange']();for(const _0x4bd8d5 of _0x5414dd['getItems']())if(_0x1979f2['isBlock'](_0x4bd8d5)||_0x1979f2['isObject'](_0x4bd8d5))return null;const _0x496475=_0x5414dd['end'];return _0x1979f2['checkChild'](_0x496475,'footnoteRef')?_0x496475:null;}}class r extends _0x5dd69c{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x3429bb}=this;_0x3429bb['config']['define']('footnotes.multiBlock',!0x0),_0x3429bb['commands']['add']('insertFootnote',new w(_0x3429bb)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x1b990f){const _0x3ee658=_0x3b77d3([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x320d07=0x47a28506,_0x56af79=0x47a5f38e^_0x320d07,_0x5957ed=window[_0x3b77d3([0x44,0x61,0x74,0x65])][_0x3b77d3([0x6e,0x6f,0x77])](),_0x394f9c=_0x1b990f[_0x3b77d3([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5cdc49=new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3af1c8=>{_0x394f9c[_0x3b77d3([0x6f,0x6e,0x63,0x65])](_0x3b77d3([0x72,0x65,0x61,0x64,0x79]),_0x3af1c8);}),_0xe57aa0={[_0x3b77d3([0x6b,0x74,0x79])]:_0x3b77d3([0x45,0x43]),[_0x3b77d3([0x75,0x73,0x65])]:_0x3b77d3([0x73,0x69,0x67]),[_0x3b77d3([0x63,0x72,0x76])]:_0x3b77d3([0x50,0x2d,0x32,0x35,0x36]),[_0x3b77d3([0x78])]:_0x3b77d3([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x3b77d3([0x79])]:_0x3b77d3([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x3b77d3([0x61,0x6c,0x67])]:_0x3b77d3([0x45,0x53,0x32,0x35,0x36])},_0x560cfa=_0x394f9c[_0x3b77d3([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3b77d3([0x67,0x65,0x74])](_0x3b77d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x124b9d(){let _0x427bdd,_0xd38889=null,_0x136054=null;try{if(_0x560cfa==_0x3b77d3([0x47,0x50,0x4c]))return _0x3b77d3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x427bdd=_0xb2c900(),!_0x427bdd)return _0x3b77d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x427bdd[_0x3b77d3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x136054=_0x37afb6(_0x427bdd[_0x3b77d3([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x427bdd[_0x3b77d3([0x6a,0x74,0x69])])),await _0x50ef4a()?_0x3edc36()?_0x41de56()?_0x3b77d3([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5177fb()?(_0x427bdd[_0x3b77d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3b77d3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xd38889=_0x1c864f(_0x3b77d3([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x427bdd[_0x3b77d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3b77d3([0x74,0x72,0x69,0x61,0x6c])&&(_0xd38889=_0x1c864f(_0x3b77d3([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x32596d()):_0x3b77d3([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3b77d3([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3b77d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3b77d3([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x41de56(){const _0x4c0fde=[_0x3b77d3([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3b77d3([0x74,0x72,0x69,0x61,0x6c])][_0x3b77d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x427bdd[_0x3b77d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5957ed/0x3e8:0xe10*_0x56af79;return _0x427bdd[_0x3b77d3([0x65,0x78,0x70])]<_0x4c0fde;}function _0x3edc36(){const _0xcee349=_0x427bdd[_0x3b77d3([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xcee349&&(!!_0xcee349[_0x3b77d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b77d3([0x2a]))||!!_0xcee349[_0x3b77d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b77d3([0x46,0x4f,0x4f])));}function _0x5177fb(){const _0x5b686c=_0x427bdd[_0x3b77d3([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5b686c||0x0==_0x5b686c[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x60138}=new URL(window[_0x3b77d3([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5b686c[_0x3b77d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x60138))return!0x0;const _0x409d35=_0x60138[_0x3b77d3([0x73,0x70,0x6c,0x69,0x74])](_0x3b77d3([0x2e]));return _0x5b686c[_0x3b77d3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x248590=>_0x248590[_0x3b77d3([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3b77d3([0x2a])))[_0x3b77d3([0x6d,0x61,0x70])](_0x23124b=>_0x23124b[_0x3b77d3([0x73,0x70,0x6c,0x69,0x74])](_0x3b77d3([0x2e])))[_0x3b77d3([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x199410=>_0x199410[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x409d35[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3b77d3([0x6d,0x61,0x70])](_0x30a255=>Array(_0x409d35[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x30a255[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3b77d3([0x66,0x69,0x6c,0x6c])](_0x30a255[0x0]===_0x3b77d3([0x2a])?_0x3b77d3([0x2a]):'')[_0x3b77d3([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x30a255))[_0x3b77d3([0x73,0x6f,0x6d,0x65])](_0x34b70f=>_0x409d35[_0x3b77d3([0x65,0x76,0x65,0x72,0x79])]((_0x4fee5f,_0x594364)=>_0x34b70f[_0x594364]===_0x4fee5f||_0x34b70f[_0x594364]===_0x3b77d3([0x2a])));}function _0x32596d(){return _0xd38889&&_0x136054?new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f84c0,_0x44d3bf)=>{_0xd38889[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x3f84c0,_0x44d3bf),_0x136054[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x4e22a0=>{_0x4e22a0!=_0x3b77d3([0x56,0x61,0x6c,0x69,0x64])&&_0x3f84c0(_0x4e22a0);},_0x44d3bf);}):_0xd38889||_0x136054||_0x3b77d3([0x56,0x61,0x6c,0x69,0x64]);}}function _0x37afb6(_0x613638,_0x30d9c1){return new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f23ac=>{if(_0x490f6a())return _0x1f23ac(_0x3b77d3([0x56,0x61,0x6c,0x69,0x64]));_0x3fdc64(),_0x394f9c[_0x3b77d3([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3b77d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5812c0=!0x1;const _0x46ff18=_0x4970a6();function _0x22986d(_0x484ee8){return!!_0x484ee8&&(typeof _0x484ee8===_0x3b77d3([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x484ee8===_0x3b77d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x484ee8[_0x3b77d3([0x74,0x68,0x65,0x6e])]===_0x3b77d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x484ee8[_0x3b77d3([0x63,0x61,0x74,0x63,0x68])]===_0x3b77d3([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2be838(_0x4fe467){_0x5aac8f(_0x4fe467)[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x28f98f=>{if(!_0x28f98f||_0x28f98f[_0x3b77d3([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3b77d3([0x6f,0x6b]))return _0x3b77d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x49839a(_0x42e8ef(_0x46ff18+_0x30d9c1))!=_0x28f98f[_0x3b77d3([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3b77d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3b77d3([0x56,0x61,0x6c,0x69,0x64]);})[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x586cc3=>(_0x531d8e(),_0x586cc3),()=>{const _0x3aba40=_0x5a41fe();return null==_0x3aba40?(_0x531d8e(),_0x3b77d3([0x56,0x61,0x6c,0x69,0x64])):_0x3b77d3(_0x5957ed-_0x3aba40>(0x63ae0106^_0x320d07)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x1f23ac)[_0x3b77d3([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1f23ac(_0x3b77d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4971bd=0x47946b86^_0x320d07;function _0x531d8e(){const _0x4d8651=_0x3b77d3([0x6c,0x6c,0x63,0x74,0x2d])+_0x49839a(_0x42e8ef(_0x613638)),_0x9c86c=_0x339002(_0x49839a(window[_0x3b77d3([0x4d,0x61,0x74,0x68])][_0x3b77d3([0x63,0x65,0x69,0x6c])](_0x5957ed/_0x4971bd)));window[_0x3b77d3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3b77d3([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4d8651,_0x9c86c);}function _0x5a41fe(){const _0x3ef361=_0x3b77d3([0x6c,0x6c,0x63,0x74,0x2d])+_0x49839a(_0x42e8ef(_0x613638)),_0x26ca08=window[_0x3b77d3([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3b77d3([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3ef361);return _0x26ca08?window[_0x3b77d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x339002(_0x26ca08),0x10)*_0x4971bd:null;}function _0x5aac8f(_0x14fda8){return new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x529835,_0x308cdc)=>{_0x14fda8[_0x3b77d3([0x74,0x68,0x65,0x6e])](_0x529835,_0x308cdc),window[_0x3b77d3([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x308cdc,0x47a351c6^_0x320d07);});}}_0x394f9c[_0x3b77d3([0x6f,0x6e])](_0x3b77d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x12ab07,_0x543605)=>{if(_0x543605[0x0]!=_0x613638)return _0x1f23ac(_0x3b77d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x543605[0x1]={..._0x543605[0x1],[_0x3b77d3([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x46ff18};},{[_0x3b77d3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3b77d3([0x68,0x69,0x67,0x68])}),_0x394f9c[_0x3b77d3([0x6f,0x6e])](_0x3b77d3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xa29537=>{_0x22986d(_0xa29537[_0x3b77d3([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5812c0=!0x0,_0x2be838(_0xa29537[_0x3b77d3([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3b77d3([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3b77d3([0x6c,0x6f,0x77])}),_0x5cdc49[_0x3b77d3([0x74,0x68,0x65,0x6e])](()=>{_0x5812c0||_0x1f23ac(_0x3b77d3([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x490f6a(){return _0x394f9c[_0x3b77d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3b77d3([0x76,0x69,0x65,0x77])][_0x3b77d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3b77d3([0x61,0x75,0x74,0x6f]);}function _0x3fdc64(){_0x394f9c[_0x3b77d3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3b77d3([0x76,0x69,0x65,0x77])][_0x3b77d3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3b77d3([0x61,0x75,0x74,0x6f]);}}function _0x1c864f(_0x484431){const _0x1a6dbd=[new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f8628=>setTimeout(_0x1f8628,0x47abbbca^_0x320d07)),_0x5cdc49[_0x3b77d3([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x203bc2=>{let _0x48aa3c=0x0;_0x394f9c[_0x3b77d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b77d3([0x6f,0x6e])](_0x3b77d3([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x366190,_0xdfe060)=>{_0xdfe060[0x0][_0x3b77d3([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x48aa3c++,_0x48aa3c==(0x47a284fe^_0x320d07)&&(_0x203bc2(),_0x366190[_0x3b77d3([0x6f,0x66,0x66])]());});}))];return window[_0x3b77d3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3b77d3([0x72,0x61,0x63,0x65])](_0x1a6dbd)[_0x3b77d3([0x74,0x68,0x65,0x6e])](()=>_0x484431);}async function _0x35ca88(){await _0x5cdc49,_0x394f9c[_0x3b77d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b77d3([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x33442f,_0x394f9c[_0x3b77d3([0x6d,0x6f,0x64,0x65,0x6c])][_0x3b77d3([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x33442f,_0x394f9c[_0x3b77d3([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3b77d3([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x54a2f2(_0x27e71d){const _0x41ef8e=_0x550c82();_0x394f9c[_0x41ef8e]=_0x3b77d3([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x27e71d,_0x27e71d!=_0x3b77d3([0x56,0x61,0x6c,0x69,0x64])&&_0x35ca88();}function _0x550c82(){const _0x26964c=window[_0x3b77d3([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3b77d3([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3b77d3([0x6e,0x6f,0x77])]())[_0x3b77d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3b77d3([0x2e]),'');let _0x1e736b=_0x3b77d3([0x75]);for(let _0x7e229c=0x0;_0x7e229c<_0x26964c[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x7e229c+=0x2){let _0x3af8b2=window[_0x3b77d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x26964c[_0x3b77d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x7e229c,_0x7e229c+0x2));_0x3af8b2>=_0x3ee658[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3af8b2-=_0x3ee658[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1e736b+=_0x3ee658[_0x3af8b2];}return _0x1e736b;}function _0xb2c900(){const _0x59c77e=_0x560cfa[_0x3b77d3([0x73,0x70,0x6c,0x69,0x74])](_0x3b77d3([0x2e]));if(0x3!=_0x59c77e[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x588894(_0x59c77e[0x1]);function _0x588894(_0x2c4ed7){const _0x35da02=_0x268de8(_0x2c4ed7);return _0x35da02&&_0x274506()?_0x35da02:null;function _0x274506(){const _0x1b592f=_0x35da02[_0x3b77d3([0x6a,0x74,0x69])],_0x456418=window[_0x3b77d3([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b592f[_0x3b77d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b592f[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3ea2de={..._0x35da02,[_0x3b77d3([0x6a,0x74,0x69])]:_0x1b592f[_0x3b77d3([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b592f[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3ea2de[_0x3b77d3([0x76,0x63])],_0x42e8ef(_0x3ea2de)==_0x456418;}}}async function _0x50ef4a(){let _0x4b817d=!0x0;try{const _0x1aea57=_0x560cfa[_0x3b77d3([0x73,0x70,0x6c,0x69,0x74])](_0x3b77d3([0x2e])),[_0x27cc74,_0x1adcb2,_0x13be5f]=_0x1aea57;return _0x36c59f(_0x27cc74),await _0xc5c921(_0x27cc74,_0x1adcb2,_0x13be5f),_0x4b817d;}catch{return!0x1;}function _0x36c59f(_0x3475fb){const _0x323153=_0x268de8(_0x3475fb);_0x323153&&_0x323153[_0x3b77d3([0x61,0x6c,0x67])]==_0x3b77d3([0x45,0x53,0x32,0x35,0x36])||(_0x4b817d=!0x1);}async function _0xc5c921(_0x460e77,_0x37be36,_0x50a28f){const _0x555e8f=window[_0x3b77d3([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3b77d3([0x66,0x72,0x6f,0x6d])](_0x5b949b(_0x50a28f),_0x15529c=>_0x15529c[_0x3b77d3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1e9552=new window[(_0x3b77d3([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3b77d3([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x460e77+_0x3b77d3([0x2e])+_0x37be36),_0x4e7ac4=window[_0x3b77d3([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3b77d3([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4e7ac4)return;const _0x21a45e=await _0x4e7ac4[_0x3b77d3([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3b77d3([0x6a,0x77,0x6b]),_0xe57aa0,{[_0x3b77d3([0x6e,0x61,0x6d,0x65])]:_0x3b77d3([0x45,0x43,0x44,0x53,0x41]),[_0x3b77d3([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3b77d3([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3b77d3([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4e7ac4[_0x3b77d3([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3b77d3([0x6e,0x61,0x6d,0x65])]:_0x3b77d3([0x45,0x43,0x44,0x53,0x41]),[_0x3b77d3([0x68,0x61,0x73,0x68])]:{[_0x3b77d3([0x6e,0x61,0x6d,0x65])]:_0x3b77d3([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x21a45e,_0x555e8f,_0x1e9552)||(_0x4b817d=!0x1);}}function _0x268de8(_0x1c15f2){return _0x1c15f2[_0x3b77d3([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3b77d3([0x65,0x79]))?JSON[_0x3b77d3([0x70,0x61,0x72,0x73,0x65])](_0x5b949b(_0x1c15f2)):null;}function _0x5b949b(_0x5e5208){return window[_0x3b77d3([0x61,0x74,0x6f,0x62])](_0x5e5208[_0x3b77d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3b77d3([0x2b]))[_0x3b77d3([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3b77d3([0x2f])));}function _0x42e8ef(_0x16c03d){let _0x4abcd7=0x1505;function _0x12fb88(_0x30562b){for(let _0x467a57=0x0;_0x467a57<_0x30562b[_0x3b77d3([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x467a57++){const _0x1c823b=_0x30562b[_0x3b77d3([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x467a57);_0x4abcd7=(_0x4abcd7<<0x5)+_0x4abcd7+_0x1c823b,_0x4abcd7&=_0x4abcd7;}}function _0x2e3baf(_0x391e4){Array[_0x3b77d3([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x391e4)?_0x391e4[_0x3b77d3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2e3baf):_0x391e4&&typeof _0x391e4==_0x3b77d3([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3b77d3([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x391e4)[_0x3b77d3([0x73,0x6f,0x72,0x74])]()[_0x3b77d3([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x35eeb3,_0x265751])=>{_0x12fb88(_0x35eeb3),_0x2e3baf(_0x265751);}):_0x12fb88(window[_0x3b77d3([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x391e4));}return _0x2e3baf(_0x16c03d),_0x4abcd7>>>0x0;}function _0x49839a(_0x2f822f){return _0x2f822f[_0x3b77d3([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3b77d3([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3b77d3([0x30]));}function _0x339002(_0x1ad9d5){return _0x1ad9d5[_0x3b77d3([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3b77d3([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3b77d3([0x6a,0x6f,0x69,0x6e])]('');}function _0x33442f(){}function _0x3b77d3(_0x29a2b7){return _0x29a2b7['map'](_0x2184d6=>String['fromCharCode'](_0x2184d6))['join']('');}_0x54a2f2(await _0x124b9d());}(this);}['_moveSelectionToFootnoteDefinition'](_0x1e7d21){const {plugins:_0x3d7933,editing:_0x1fd6f2,model:_0x5edf97}=this['editor'],_0x5f1ce6=_0x3d7933['get'](c)['getFootnote'](_0x1e7d21);return!!_0x5f1ce6&&(_0x5edf97['change'](_0x155927=>{_0x155927['setSelection'](_0x155927['createPositionAt'](_0x5f1ce6['definition'],'end'));}),_0x1fd6f2['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x2b56f8){const {plugins:_0x2f98f9,editing:_0x449b38,model:_0x482596}=this['editor'],_0x1ac10c=_0x2f98f9['get'](c)['getFootnote'](_0x2b56f8);return!!_0x1ac10c&&(_0x482596['change'](_0x2a6def=>{_0x2a6def['setSelection'](_0x1ac10c['reference'],'on');}),_0x449b38['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x35806f}=this['editor']['model'],_0x216a1f=this['editor']['config']['get']('footnotes.multiBlock');_0x35806f['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x35806f['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x35806f['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x216a1f?_0x35806f['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x35806f['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x35806f['addChildCheck'](_0x3fb35c=>{for(const _0x22d744 of _0x3fb35c)if('footnoteDefinition'===_0x22d744['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0xc4e71f}=this,{conversion:_0x521f3b,editing:_0x62c321}=_0xc4e71f,{t:t}=_0xc4e71f['locale'];_0x521f3b['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x4e0a1b,{writer:_0x10ed0b,consumable:_0x1ae4c1})=>{const _0x46326c=_0x4e0a1b['getChild'](0x0);if(!_0x46326c||!_0x46326c['is']('element','a'))return null;const _0x4c6136=_0x46326c['getAttribute']('href')||'';if(!_0x4c6136['startsWith']('#'))return null;const _0x232016=_0x4c6136['replace'](/^#/,'');if(!_0x232016)return null;_0x1ae4c1['consume'](_0x46326c,{'name':!0x0,'attributes':['href']});for(const {item:_0x466b86}of _0x62c321['view']['createRangeIn'](_0x46326c))_0x466b86['is']('$textProxy')?_0x1ae4c1['consume'](_0x466b86['textNode'],{'name':!0x0}):_0x466b86['is']('element')&&_0x1ae4c1['consume'](_0x466b86,{'name':!0x0});return _0x10ed0b['createElement']('footnoteRef',{'footnoteId':_0x232016});}}),_0x521f3b['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x4bb2e1,{writer:_0x4751c3})=>g(_0x4bb2e1,_0x4751c3)}),_0x521f3b['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x1ccb90,{writer:_0x441e99})=>{const _0x2bb081=_0x1ccb90['getAttribute']('footnoteCounter');return _0x40f775(g(_0x1ccb90,_0x441e99),_0x441e99,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x2bb081)});}});}['_defineDefinitionsConverters'](){const {editor:_0x343df9}=this,{t:t}=_0x343df9['locale'],{conversion:_0x40c633}=_0x343df9;_0x40c633['for']('upcast')['elementToElement']({'view':{'name':'ol','classes':['footnotes']},'model':'footnotesDefinitions','converterPriority':'high'}),_0x40c633['for']('dataDowncast')['elementToElement']({'model':'footnotesDefinitions','view':{'name':'ol','classes':['footnotes']}}),_0x40c633['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x5091e1,{writer:_0x3871c0})=>{const _0x22a840=_0x3871c0['createContainerElement']('div',{'class':'footnotes-wrapper','data-footnotes-list-label':t('Footnotes')},_0x3871c0['createContainerElement']('ol',{'class':'footnotes'},_0x3871c0['createSlot']())),_0x29fe6e=_0x40f775(_0x22a840,_0x3871c0,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x3871c0['setCustomProperty']('footnotesDefinitions',!0x0,_0x29fe6e),_0x29fe6e;}});}['_defineDefinitionConverters'](){const {editor:_0x565a36}=this,{conversion:_0x1f4bad,locale:_0x16ed73}=_0x565a36,_0xc92afa=_0x565a36['config']['get']('footnotes.multiBlock');_0x1f4bad['for']('upcast')['add'](_0xdac6d4=>{_0xdac6d4['on']('element:li',(_0x3f390b,_0x492795,_0x30043f)=>{const _0x497af3=_0x492795['viewItem'];if(!_0x497af3['hasClass']('footnote-definition')||!_0x497af3['getAttribute']('id'))return;const _0x85017c=_0x497af3['parent'];if(!_0x85017c['is']('element','ol')||!_0x85017c['hasClass']('footnotes'))return;if(!_0x30043f['consumable']['test'](_0x497af3,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x1cb78d=_0x30043f['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x497af3['getAttribute']('id')});if(!_0x30043f['safeInsert'](_0x1cb78d,_0x492795['modelCursor']))return;_0x30043f['consumable']['consume'](_0x497af3,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x1d6a3a=Array['from'](_0x497af3['getChildren']())['find'](_0x434867=>_0x434867['is']('element')&&_0x434867['hasClass']('footnote-content'));for(const _0x12d6dc of _0x497af3['getChildren']())_0x12d6dc['is']('element')&&(_0x30043f['consumable']['consume'](_0x12d6dc,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x30043f['consumable']['consume'](_0x12d6dc,{'name':!0x0,'classes':'footnote-content'}));if(_0x1d6a3a){if(_0xc92afa)_0x30043f['convertChildren'](_0x1d6a3a,_0x1cb78d);else{const _0x21ebff=_0x30043f['writer']['createElement']('footnoteInlineContent');_0x30043f['writer']['insert'](_0x21ebff,_0x1cb78d),_0x30043f['convertChildren'](_0x1d6a3a,_0x21ebff);}}_0x30043f['updateConversionResult'](_0x1cb78d,_0x492795);});}),_0x1f4bad['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x186323,{writer:_0x4d4b84})=>D(_0x186323,_0x4d4b84,_0x16ed73,{'dataPipeline':!0x0})}),_0x1f4bad['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x5cdbb3,{writer:_0x2f5182})=>D(_0x5cdbb3,_0x2f5182,_0x16ed73)});}['_defineBogusParagraphConverters'](){const {editor:_0x57caf1}=this,{conversion:_0xc86b5}=_0x57caf1;_0x57caf1['config']['get']('footnotes.multiBlock')?(_0xc86b5['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0xc86b5['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x57caf1['model']['document'],'change:data',()=>{!function(_0x5f10af,_0x3591d1){const _0x1cbb58=_0x5f10af['document']['differ'],_0x13b1f3=new Set();for(const _0x731f61 of _0x1cbb58['getChanges']()){const _0x1f8153='attribute'==_0x731f61['type']?_0x731f61['range']['start']['parent']:_0x731f61['position']['parent'];_0x1f8153['is']('element','footnoteDefinition')&&_0x13b1f3['add'](_0x1f8153);}for(const _0x5567ad of _0x13b1f3['values']()){const _0x22e450=Array['from'](_0x5567ad['getChildren']())['filter'](_0x423db2=>p(_0x423db2,_0x3591d1['mapper']));for(const _0xec3bf8 of _0x22e450)_0x3591d1['reconvertItem'](_0xec3bf8);}}(_0x57caf1['model'],_0x57caf1['editing']);})):(_0xc86b5['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0xc86b5['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0xd6c268,{writer:_0x1a4bb6})=>{const _0x477e52=_0x1a4bb6['createContainerElement']('span');return _0x1a4bb6['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x477e52),_0x477e52;}}));}['_defineKeyboardHandlers'](){const {editor:_0x2b07ec}=this,{editing:_0x4f9f7e,t:t}=_0x2b07ec,_0x13a922=_0x2b07ec['model']['document']['selection'];_0x2b07ec['keystrokes']['set']('CTRL+Alt+D','insertFootnote'),_0x2b07ec['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+D'}]}),this['listenTo'](_0x4f9f7e['view']['document'],'enter',(_0xae0bc4,_0x3c58b7)=>{const _0x484479=function(_0x358f8f){const _0x1f2f3b=_0x358f8f['getSelectedElement']();if(_0x1f2f3b?.['is']('element','footnoteRef'))return _0x1f2f3b;return null;}(_0x13a922);if(_0x484479){const _0x40a166=_0x484479['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x40a166),_0x3c58b7['preventDefault'](),_0xae0bc4['stop']();}},{'context':_0x52dc53});}['_defineClickHandlers'](){const {editor:_0x4cc08d}=this,{editing:_0x1221b5}=_0x4cc08d;_0x4cc08d['editing']['view']['addObserver'](_0x2a6255),_0x4cc08d['editing']['view']['addObserver'](_0x1281d6);let _0x95ca96=!0x1;this['listenTo'](_0x1221b5['view']['document'],'pointerdown',(_0x3cba23,_0x51ce39)=>{const {target:_0x227cfd}=_0x51ce39,_0x578a7b=_0x1221b5['view']['document']['selection'];_0x95ca96=!(!_0x227cfd['is']('element','sup')||!_0x227cfd['hasClass']('footnote'))&&_0x578a7b['getSelectedElement']()===_0x227cfd;},{'priority':'high'}),this['listenTo'](_0x1221b5['view']['document'],'click',(_0x6c1f42,_0x432358)=>{const {target:_0x5e4142}=_0x432358,_0x1c562b=_0x5e4142['getChild'](0x0)['getAttribute']('href');this['_moveSelectionToFootnoteDefinition'](_0x1c562b['slice'](0x1)),_0x6c1f42['stop'](),_0x432358['preventDefault']();},{'priority':'high','context':_0x39664f=>_0x39664f['is']('element','sup')&&_0x39664f['hasClass']('footnote')&&_0x95ca96}),this['listenTo'](_0x1221b5['view']['document'],'click',(_0x16808d,_0x57c8c0)=>{const {target:_0x448b52}=_0x57c8c0;if(!_0x448b52['is']('element','a'))return;let _0x4f055c=_0x448b52['getAttribute']('href');if(!_0x4f055c?.['startsWith']('#'))return;_0x4f055c=_0x4f055c['slice'](0x1);let _0x397cb9=!0x1;(_0x4f055c['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x4f055c['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x4f055c))&&(_0x397cb9=!0x0),_0x397cb9&&(_0x57c8c0['preventDefault'](),_0x16808d['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x330540}={}){return(_0x11228d,{writer:_0x22ec16})=>{if(!h(_0x11228d))return null;if(!_0x330540)return _0x22ec16['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x538c9e=_0x22ec16['createContainerElement']('p');return _0x22ec16['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x538c9e),_0x538c9e;};}function h(_0x3566ec){const {parent:_0x8c6d1b}=_0x3566ec;if(!_0x8c6d1b?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x8c6d1b['childCount'])return!0x1;for(const _0x18a5b1 of _0x3566ec['getAttributeKeys']())if(!_0x18a5b1['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x18a5b1)return!0x1;return!0x0;}function p(_0xcea4bb,_0x492c43){if(!_0xcea4bb['is']('element','paragraph'))return!0x1;const _0x3e7f3d=_0x492c43['toViewElement'](_0xcea4bb);return!!_0x3e7f3d&&h(_0xcea4bb)!==_0x3e7f3d['is']('element','span');}function $(_0x465131){return _0x52dc53(_0x465131)&&_0x465131['is']('containerElement')&&!!_0x465131['getCustomProperty']('footnotesDefinitions');}function g(_0x3ade0e,_0x47a967){const _0x27a31a=_0x3ade0e['getAttribute']('footnoteId'),_0x40a06b=_0x3ade0e['getAttribute']('footnoteCounter'),_0x385a8c=_0x47a967['createUIElement']('a',{'id':'ref-'+_0x27a31a,'href':'#'+_0x27a31a},function(_0x3e8bae){const _0x3999a8=this['toDomElement'](_0x3e8bae);return _0x3999a8['textContent']=_0x40a06b,_0x3999a8;}),_0x2c6370=_0x47a967['createContainerElement']('sup',{'class':'footnote'},[_0x385a8c]);return _0x2c6370['getFillerOffset']=()=>null,_0x2c6370;}function D(_0x609399,_0x381d43,_0x3074b8,{dataPipeline:_0x8b6620}={}){const {t:t}=_0x3074b8,_0x4b0be1=_0x609399['getAttribute']('footnoteId'),_0x41dd09=_0x381d43['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x4b0be1},function(_0x1d2169){const _0x19358b=this['toDomElement'](_0x1d2169);return _0x19358b['innerText']='^',_0x19358b;}),_0x2e65d7=_0x8b6620?_0x381d43['createContainerElement']('div',{'class':'footnote-content'}):_0x572824(_0x381d43['createEditableElement']('div',{'class':'footnote-content'}),_0x381d43,{'label':t('Footnote\x20content.')});return _0x381d43['insert'](_0x381d43['createPositionAt'](_0x2e65d7,0x0),_0x381d43['createSlot']()),_0x381d43['createContainerElement']('li',{'class':'footnote-definition','id':_0x4b0be1},[_0x41dd09,_0x2e65d7]);}class e extends _0x5dd69c{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x4a149c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x160a07}=this,{plugins:_0x1afe0f,model:_0x4840d0}=_0x160a07,_0x896e77=_0x1afe0f['get'](_0x4a149c),_0x2fffc2=_0x1afe0f['get'](c);this['listenTo'](_0x896e77,'outputTransformation',(_0x59671c,_0x9db8b5)=>{const _0x1214fc=function(_0x2efc52,_0x56c515){const _0x5abc06=new Set();for(const {item:_0x5f2be3}of _0x2efc52['createRangeIn'](_0x56c515))_0x5f2be3['is']('element','footnoteRef')&&_0x5abc06['add'](_0x5f2be3['getAttribute']('footnoteId'));return Array['from'](_0x5abc06);}(_0x4840d0,_0x9db8b5['content']);if(!_0x1214fc['length'])return;const _0x17282e=_0x2fffc2['getFootnotes'](),_0x2d748b=_0x1214fc['reduce']((_0xb3efcd,_0x5ab030)=>{const _0x475649=_0x17282e['find'](_0x14dd8b=>_0x14dd8b['id']===_0x5ab030);if(_0x475649){const _0x42f576=_0x160a07['data']['toView'](_0x475649['definition'],{'isClipboardPipeline':!0x0}),_0x15ccb1=_0x160a07['data']['htmlProcessor']['toData'](_0x42f576);_0xb3efcd[_0x475649['id']]=_0x15ccb1;}return _0xb3efcd;},Object['create'](null));_0x9db8b5['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x2d748b));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x361a13}=this,{model:_0x581dc1,plugins:_0x4fb8bf}=_0x361a13,{view:_0x9c40b7}=_0x361a13['editing'],_0x407f71=_0x4fb8bf['get'](_0x4a149c),_0x329647=_0x4fb8bf['get'](c);let _0x3f33c5=null;this['listenTo'](_0x9c40b7['document'],'clipboardInput',(_0x420281,_0x2189c0)=>{const _0x177a86=_0x2189c0['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x3f33c5=_0x177a86?JSON['parse'](_0x177a86):null;}),this['listenTo'](_0x407f71,'contentInsertion',(_0x362055,_0x4e27e6)=>{if(!_0x3f33c5)return;const _0x249326=_0x4e27e6['sourceEditorId']===this['editor']['id'];_0x249326&&'drop'===_0x4e27e6['method']||_0x581dc1['change'](_0x5d1700=>{!function(_0x3d9686,_0x240de2){const _0x1ec094=[];for(const {item:_0x5df087}of _0x3d9686['createRangeIn'](_0x240de2))_0x5df087['is']('element','footnotesDefinitions')&&_0x1ec094['push'](_0x5df087);for(const _0x3470e3 of _0x1ec094)_0x3d9686['remove'](_0x3470e3);}(_0x5d1700,_0x4e27e6['content']);let _0x3e05e2=_0x329647['getFootnotesDefinitionsObjectElement']();if(!_0x3e05e2){const _0x5aa677=_0x581dc1['document']['selection']['getFirstRange']()['root'];_0x3e05e2=_0x329647['_insertEmptyFootnotesDefinitionsContainer'](_0x5d1700,_0x5aa677);}const _0x116d2c=function(_0x2b9396,_0x3ca94d,_0x13039a){const _0x2412fa=Object['create'](null);for(const {item:_0x225a40}of _0x2b9396['createRangeIn'](_0x3ca94d))if(_0x225a40['is']('element','footnoteRef')){const _0x3fa70c=_0x225a40['getAttribute']('footnoteId');if(!_0x13039a(_0x3fa70c))continue;_0x2412fa[_0x3fa70c]||(_0x2412fa[_0x3fa70c]=_0x4970a6()),_0x2b9396['setAttribute']('footnoteId',_0x2412fa[_0x3fa70c],_0x225a40);}return _0x2412fa;}(_0x5d1700,_0x4e27e6['content'],_0x451a45=>!_0x249326||null!==_0x329647['getFootnote'](_0x451a45));for(const [_0x58e0ac,_0x435a43]of Object['entries'](_0x3f33c5)){const _0x1bea9d=_0x116d2c[_0x58e0ac]||_0x58e0ac,_0x42650b=_0x5d1700['createElement']('footnoteDefinition',{'footnoteId':_0x1bea9d}),_0x55f744=_0x361a13['data']['htmlProcessor']['toView'](_0x435a43),_0x528f11=_0x361a13['data']['toModel'](_0x55f744,_0x42650b);_0x5d1700['append'](_0x528f11,_0x42650b),_0x5d1700['insert'](_0x42650b,_0x3e05e2,'end');}_0x3f33c5=null;});});}}class i extends _0x5dd69c{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x340fa0}=this,{componentFactory:_0x5501c7}=_0x340fa0['ui'];_0x5501c7['add']('insertFootnote',v(_0x340fa0,_0x4f7301)),_0x5501c7['add']('menuBar:insertFootnote',v(_0x340fa0,_0x158f1a)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5c8c85=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1e026a;for(const _0x4ca5ee in _0x5c8c85){const _0xdc7262=_0x4ca5ee,_0x2406fe=_0x5c8c85[_0xdc7262];if('footnotesLicenseKeyValid'==_0x2406fe||'footnotesLicenseKeyInvalid'==_0x2406fe||'footnotesLicenseKeyExpired'==_0x2406fe||'footnotesLicenseKeyDomainLimit'==_0x2406fe||'footnotesLicenseKeyNotAllowed'==_0x2406fe||'footnotesLicenseKeyEvaluationLimit'==_0x2406fe||'footnotesLicenseKeyTrialLimit'==_0x2406fe||'footnotesLicenseKeyUsageLimit'==_0x2406fe){delete _0x5c8c85[_0xdc7262],_0x1e026a=_0x2406fe,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x1e026a&&_0x5c8c85['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x1e026a&&_0x5c8c85['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x1e026a&&_0x5c8c85['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x1e026a&&_0x5c8c85['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x1e026a&&_0x5c8c85['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x1e026a&&_0x5c8c85['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x1e026a&&_0x5c8c85['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function v(_0x558197,_0x394707){const _0x110aeb=_0x558197['commands']['get']('insertFootnote');return _0x525f69=>{const {t:t}=_0x525f69,_0x17425a=new _0x394707(_0x525f69),_0x1585fd=_0x17425a instanceof _0x158f1a;return _0x17425a['bind']('isEnabled')['to'](_0x110aeb,'isEnabled'),_0x17425a['set']({'label':t(_0x1585fd?'Footnote':'Insert\x20footnote'),'icon':_0x242f94,'tooltip':!0x0}),_0x17425a['on']('execute',()=>{_0x110aeb['execute'](),_0x558197['editing']['view']['focus']();}),_0x17425a;};}class nt extends _0x5dd69c{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const H=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x1159f6{['refresh'](){const {editor:_0x6a0cc4}=this,_0x1dbacf=_0x6a0cc4['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x1dbacf,this['value']=_0x1dbacf?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0xad0757}){const {editor:_0x5db59e}=this,_0x2828ed=_0x5db59e['plugins']['get'](c),_0x539b39=_0x2828ed['getFootnotesDefinitionsObjectElement']();_0x539b39&&H['includes'](_0xad0757)&&_0x5db59e['model']['change'](_0x5538cc=>{_0x5538cc['setAttribute']('footnotesListStyle',_0xad0757,_0x539b39),_0x2828ed['_updateFootnotesCounters'](_0x5538cc);});}}class b extends _0x1159f6{['refresh'](){const {editor:_0x6b87c3}=this,_0x398c00=_0x6b87c3['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x398c00,this['value']=_0x398c00?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x5e5f64}){const {editor:_0x6c207f}=this,_0x74c008=_0x6c207f['plugins']['get'](c),_0x31ee3a=_0x74c008['getFootnotesDefinitionsObjectElement']();_0x31ee3a&&Number['isInteger'](_0x5e5f64)&&_0x6c207f['model']['change'](_0xbd91d6=>{_0xbd91d6['setAttribute']('footnotesListStart',_0x5e5f64,_0x31ee3a),_0x74c008['_updateFootnotesCounters'](_0xbd91d6);});}}class P extends _0x5dd69c{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x58a9a5}=this;_0x58a9a5['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x58a9a5['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x58a9a5['commands']['add']('footnotesStyle',new S(_0x58a9a5)),_0x58a9a5['commands']['add']('footnotesStart',new b(_0x58a9a5)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x4f50e8}=this,{schema:_0x5053d1}=_0x4f50e8['model'];_0x5053d1['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x33ef2f}=this,{conversion:_0x58d0e4,model:_0x4b2b64}=_0x33ef2f,{schema:_0x3c3932}=_0x4b2b64;_0x58d0e4['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','styles':{'list-style-type':/.+/}},'model':{'key':'footnotesListStyle','value':_0x4544de=>_0x4544de['getStyle']('list-style-type')}}),_0x58d0e4['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','attributes':{'start':/.+/}},'model':{'key':'footnotesListStart','value':_0x4487c3=>{const _0x24ff2f=_0x4487c3['getAttribute']('start'),_0x18d8bb=Number['parseInt'](_0x24ff2f,0xa);return Number['isNaN'](_0x18d8bb)?null:_0x18d8bb;}}}),_0x58d0e4['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','attributes':{'type':/.+/}},'model':{'key':'footnotesListStyle','value':_0x2db104=>({0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x2db104['getAttribute']('type')])}}),_0x58d0e4['for']('upcast')['add'](_0x56a495=>{_0x56a495['on']('element:ol',(_0x4b2cfb,_0x4a160e,_0xe42836)=>{const _0x5aae1f=_0x4a160e['modelRange']?.['start']['nodeAfter'];_0x5aae1f?.['is']('element','footnotesDefinitions')&&(!_0x5aae1f['hasAttribute']('footnotesListStyle')&&_0x3c3932['checkAttribute'](_0x5aae1f,'footnotesListStyle')&&_0xe42836['writer']['setAttribute']('footnotesListStyle','decimal',_0x5aae1f),!_0x5aae1f['hasAttribute']('footnotesListStart')&&_0x3c3932['checkAttribute'](_0x5aae1f,'footnotesListStart')&&_0xe42836['writer']['setAttribute']('footnotesListStart',0x1,_0x5aae1f));},{'priority':'low'});}),_0x58d0e4['for']('dataDowncast')['attributeToAttribute']({'model':{'name':'footnotesDefinitions','key':'footnotesListStart'},'view':_0x1e5d45=>0x1===_0x1e5d45?null:{'key':'start','value':String(_0x1e5d45)}}),_0x58d0e4['for']('dataDowncast')['attributeToAttribute']({'model':{'name':'footnotesDefinitions','key':'footnotesListStyle'},'view':_0x269b70=>'decimal'===_0x269b70?null:{'key':'style','value':{'list-style-type':_0x269b70}}}),_0x58d0e4['for']('editingDowncast')['add'](_0x2ac58c=>{_0x2ac58c['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x4509e7,_0x1cb216,_0x18c5a2)=>{if(!_0x18c5a2['consumable']['consume'](_0x1cb216['item'],_0x4509e7['name']))return;const _0x2764e9=C(_0x1cb216['item'],_0x18c5a2['mapper']);null===_0x1cb216['attributeNewValue']||void 0x0===_0x1cb216['attributeNewValue']||0x1===_0x1cb216['attributeNewValue']?_0x18c5a2['writer']['removeAttribute']('start',_0x2764e9):_0x18c5a2['writer']['setAttribute']('start',String(_0x1cb216['attributeNewValue']),_0x2764e9);}),_0x2ac58c['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x113af1,_0x536998,_0x602cad)=>{if(!_0x602cad['consumable']['consume'](_0x536998['item'],_0x113af1['name']))return;const _0x1becd=C(_0x536998['item'],_0x602cad['mapper']);_0x536998['attributeNewValue']&&'decimal'!==_0x536998['attributeNewValue']?_0x602cad['writer']['setStyle']('list-style-type',_0x536998['attributeNewValue'],_0x1becd):_0x602cad['writer']['removeStyle']('list-style-type',_0x1becd);});});}['_definePostfixer'](){const {editor:_0x284ac8}=this,{model:_0x509440}=_0x284ac8,_0x559420=_0x284ac8['plugins']['get'](c),_0x1717eb=this['_getDefaultListStyle'](),_0x355afa=this['_getDefaultStartIndex']();_0x509440['document']['registerPostFixer'](_0x4dc25b=>{const _0x5ba952=_0x509440['document']['differ']['getChanges']();let _0x39aa85=!0x1;for(const _0x1f9a7b of _0x5ba952){if('insert'!==_0x1f9a7b['type']||'$text'===_0x1f9a7b['name'])continue;const _0x5e0bd4=_0x509440['createRangeOn'](_0x1f9a7b['position']['nodeAfter']);for(const _0x2cd77d of _0x5e0bd4['getItems']())_0x2cd77d['is']('element','footnotesDefinitions')&&(_0x2cd77d['hasAttribute']('footnotesListStart')||(_0x4dc25b['setAttribute']('footnotesListStart',_0x355afa,_0x2cd77d),_0x39aa85=!0x0),_0x2cd77d['hasAttribute']('footnotesListStyle')||(_0x4dc25b['setAttribute']('footnotesListStyle',_0x1717eb,_0x2cd77d),_0x39aa85=!0x0));}return _0x39aa85&&_0x559420['_updateFootnotesCounters'](_0x4dc25b),_0x39aa85;});}['_defineFormatter'](){const {editor:_0x57afcc}=this;_0x57afcc['plugins']['get'](c)['setFootnoteFormatter'](_0x3e37c5=>this['_formatFootnoteListValue'](_0x3e37c5));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0xe7b06d,value:_0x4b79c4,digits:_0x5504da}){const _0x1c1ecc=_0xe7b06d['getAttribute']('footnotesListStyle'),_0x3b7c52=_0xe7b06d['getAttribute']('footnotesListStart'),_0x126291=Math['floor'](_0x4b79c4)+(_0x3b7c52-0x1);switch(_0x1c1ecc){case'decimal':default:return String(_0x126291);case'decimal-leading-zero':return function(_0x303028,_0x3ca1f2){return String(_0x303028)['padStart'](_0x3ca1f2,'0');}(_0x126291,Math['max'](0x2,_0x5504da));case'lower-alpha':case'lower-latin':return M(_0x126291,!0x1);case'upper-alpha':case'upper-latin':return M(_0x126291,!0x0);case'lower-roman':return A(_0x126291,!0x1);case'upper-roman':return A(_0x126291,!0x0);}}}function C(_0x36f5bb,_0x1eb065){const _0x45ab59=_0x1eb065['toViewElement'](_0x36f5bb);return Array['from'](_0x45ab59['getChildren']())['find'](_0x136538=>_0x136538['is']('element','ol'));}function M(_0x75ee88,_0x5d9b22){let _0x4fbb6a='',_0x5eb709=_0x75ee88;for(;_0x5eb709>0x0;){const _0x5d2517=(_0x5eb709-0x1)%0x1a;_0x4fbb6a=String['fromCharCode'](0x61+_0x5d2517)+_0x4fbb6a,_0x5eb709=Math['floor']((_0x5eb709-0x1)/0x1a);}return _0x5d9b22?_0x4fbb6a['toUpperCase']():_0x4fbb6a;}const X=[{'value':0x3e8,'numeral':'M'},{'value':0x384,'numeral':'CM'},{'value':0x1f4,'numeral':'D'},{'value':0x190,'numeral':'CD'},{'value':0x64,'numeral':'C'},{'value':0x5a,'numeral':'XC'},{'value':0x32,'numeral':'L'},{'value':0x28,'numeral':'XL'},{'value':0xa,'numeral':'X'},{'value':0x9,'numeral':'IX'},{'value':0x5,'numeral':'V'},{'value':0x4,'numeral':'IV'},{'value':0x1,'numeral':'I'}];function A(_0x4291a0,_0x32667e){let _0x5df6e7='',_0x4e18a0=_0x4291a0;for(const {value:_0x3798bb,numeral:_0xfe0b32}of X)for(;_0x4e18a0>=_0x3798bb;)_0x5df6e7+=_0xfe0b32,_0x4e18a0-=_0x3798bb;return _0x32667e?_0x5df6e7:_0x5df6e7['toLowerCase']();}class R extends _0x5e6fbf{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new it();['keystrokes']=new et();['focusables']=new _0x5f3227();['focusCycler'];constructor(_0x42bffa,{styleButtonViews:_0x25211e,styleGridAriaLabel:_0xc48cf}){super(_0x42bffa),(this['focusCycler']=new _0x2f996f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x25211e,_0xc48cf),[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 _0x41e7db of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x41e7db['element']);_0x1fa4bf({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>ot['window']['getComputedStyle'](this['stylesView']['element'])['getPropertyValue']('grid-template-columns')['split']('\x20')['length'],'uiLanguageDirection':this['locale']&&this['locale']['uiLanguageDirection']});}if(this['startIndexFieldView']){this['focusables']['add'](this['startIndexFieldView']),this['focusTracker']['add'](this['startIndexFieldView']['element']);const _0x203f0d=_0x2a7789=>_0x2a7789['stopPropagation']();this['keystrokes']['set']('arrowright',_0x203f0d),this['keystrokes']['set']('arrowleft',_0x203f0d),this['keystrokes']['set']('arrowup',_0x203f0d),this['keystrokes']['set']('arrowdown',_0x203f0d);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x1f0a87,_0x4e224f){const _0xf82f43=new _0x5e6fbf(this['locale']);return _0xf82f43['children']=_0xf82f43['createCollection'](),_0xf82f43['children']['addMany'](_0x1f0a87),_0xf82f43['setTemplate']({'tag':'div','attributes':{'aria-label':_0x4e224f,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0xf82f43['children']}),_0xf82f43['children']['delegate']('execute')['to'](this),_0xf82f43['focus']=function(){for(const _0x28bf65 of this['children'])if(_0x28bf65 instanceof _0x4f7301&&_0x28bf65['isOn'])return void _0x28bf65['focus']();this['children']['first']['focus']();},_0xf82f43['focusTracker']=new it(),_0xf82f43['keystrokes']=new et(),_0xf82f43['render'](),_0xf82f43['keystrokes']['listenTo'](_0xf82f43['element']),this['children']['add'](_0xf82f43),_0xf82f43;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x1dfe1b=this['_createStartIndexPropertyView'](),_0x51740a=[_0x1dfe1b],_0x33d16b=new _0x42bd83(this['locale'],_0x51740a);return _0x33d16b['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x33d16b['buttonView']['bind']('isEnabled')['toMany'](_0x51740a,'isEnabled',(..._0x54f1a3)=>_0x54f1a3['some'](_0x4613e6=>_0x4613e6)),_0x33d16b['buttonView']['on']('change:isEnabled',(_0x353370,_0x30aa72,_0x29d1dc)=>{_0x29d1dc||(_0x33d16b['isCollapsed']=!0x0);}),this['children']['add'](_0x33d16b),[_0x1dfe1b,_0x33d16b];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x2bdb04=new tt(this['locale'],st);return _0x2bdb04['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x2bdb04['fieldView']['set']({'min':0x0,'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x2bdb04['fieldView']['on']('input',()=>{const _0x4e2bb5=_0x2bdb04['fieldView']['element'],_0x30a203=_0x4e2bb5['valueAsNumber'];Number['isNaN'](_0x30a203)?_0x2bdb04['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x4e2bb5['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x30a203}):_0x2bdb04['errorText']=t('Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.');}),_0x2bdb04;}}class j extends _0x5dd69c{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x369595,_0x121d00];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x359290}=this,{componentFactory:_0x418fe0}=_0x359290['ui'];_0x359290['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x418fe0['add']('footnotesStyle',function(_0x44a70f){return _0x2bc56a=>{const {t:t}=_0x2bc56a,_0x3a3e72=_0x44a70f['commands']['get']('footnotesStyle'),_0x3407a1=_0x24d4ee(_0x2bc56a),{buttonView:_0x4d960b}=_0x3407a1;return _0x3407a1['class']='ck-footnotes-styles-dropdown',_0x3407a1['bind']('isEnabled')['to'](_0x3a3e72,'isEnabled'),_0x4d960b['set']({'label':t('Footnotes\x20style'),'icon':_0x242f94,'tooltip':!0x0}),_0x3407a1['once']('change:isOpen',()=>{const _0x1c303f=function({editor:_0x25c163,dropdownView:_0x5ab7fe}){const {t:t}=_0x25c163['locale'],_0x2845e4=t('Footnotes\x20definitions\x20styles'),_0x5e84e4=function(_0x10d6d9){const t=_0x10d6d9['locale']['t'],_0x1d9c6b=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x3b2851},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x1c38c6},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x5a7599},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x3a4c8d},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x24244e},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0xea279a}];return _0x1d9c6b['map'](function(_0x5c67be){const _0x12d941=_0x5c67be['locale'];return({label:_0x1f07b5,icon:_0x3b9284,tooltip:_0x1bab11,style:_0x502cab})=>{const _0x513c52=_0x5c67be['commands']['get']('footnotesStyle'),_0x149b68=new _0x4f7301(_0x12d941);return _0x149b68['set']({'label':_0x1f07b5,'icon':_0x3b9284,'tooltip':_0x1bab11}),_0x149b68['bind']('isOn')['to'](_0x513c52,'value',_0x314536=>_0x314536===_0x502cab),_0x149b68['bind']('isEnabled')['to'](_0x513c52,'isEnabled'),_0x149b68['on']('execute',()=>{_0x5c67be['execute']('footnotesStyle',{'value':_0x502cab}),_0x5c67be['editing']['view']['focus']();}),_0x149b68;};}(_0x10d6d9));}(_0x25c163),_0x408193=new R(_0x25c163['locale'],{'styleGridAriaLabel':_0x2845e4,'styleButtonViews':_0x5e84e4});return _0x408193['delegate']('execute')['to'](_0x5ab7fe),_0x408193['on']('footnotesListStart',(_0x3a0800,_0x527aea)=>{_0x25c163['execute']('footnotesStart',{'value':_0x527aea['startIndex']});}),_0x408193;}({'editor':_0x44a70f,'dropdownView':_0x3407a1});_0x3407a1['panelView']['children']['add'](_0x1c303f);}),_0x3407a1;};}(_0x359290));}['afterInit'](){const {editor:_0x247058}=this,{t:t}=_0x247058['locale'],_0x4f853=_0x247058['plugins']['get'](_0x121d00),{defaultPositions:_0x16a8f8}=_0x52e42a;_0x4f853['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x247058['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0xa121a3=>{let _0x1c1221=_0xa121a3['getFirstPosition']()?.['parent'];return _0x1c1221?.['is']('$text')&&(_0x1c1221=_0x1c1221['parent']),_0x1c1221?.['is']('element')?_0x1c1221['findAncestor']($):null;},'positions':[_0x16a8f8['southArrowNorth'],_0x16a8f8['southArrowNorthMiddleWest'],_0x16a8f8['southArrowNorthMiddleEast'],_0x16a8f8['southArrowNorthWest'],_0x16a8f8['southArrowNorthEast'],_0x16a8f8['northArrowSouth'],_0x16a8f8['northArrowSouthMiddleWest'],_0x16a8f8['northArrowSouthMiddleEast'],_0x16a8f8['northArrowSouthWest'],_0x16a8f8['northArrowSouthEast'],_0x16a8f8['viewportStickyNorth']]});}}class rt extends _0x5dd69c{static get['pluginName'](){return'FootnotesProperties';}static get['requires'](){return[P,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{nt as Footnotes,e as FootnotesClipboard,r as FootnotesEditing,rt as FootnotesProperties,P as FootnotesPropertiesEditing,j as FootnotesPropertiesUI,b as FootnotesStartCommand,S as FootnotesStyleCommand,c as FootnotesTracker,i as FootnotesUI,w as InsertFootnoteCommand};
|
|
23
|
+
import{Plugin as _0x381f4b,Command as _0x180100}from'@ckeditor/ckeditor5-core/dist/index.js';import{toWidget as _0x27240f,isWidget as _0x1862ca,toWidgetEditable as _0x147785,WidgetToolbarRepository as _0x289e52}from'@ckeditor/ckeditor5-widget/dist/index.js';import{uid as _0x204d37,logWarning as _0x204d57,FocusTracker as it,KeystrokeHandler as et,global as ot}from'@ckeditor/ckeditor5-utils/dist/index.js';import{PointerObserver as _0xfde7da,ClickObserver as _0x46b2f1}from'@ckeditor/ckeditor5-engine/dist/index.js';import{ClipboardPipeline as _0x1b023c}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{MenuBarMenuListItemButtonView as _0x528eb8,ButtonView as _0x37c695,View as _0xf9108b,ViewCollection as _0x44558e,FocusCycler as _0x1e2e91,addKeyboardHandlingForGrid as _0x34cdf8,CollapsibleView as _0x4a1638,LabeledFieldView as tt,createLabeledInputNumber as st,ContextualBalloon as _0x45a7bd,BalloonPanelView as _0x33377f,createDropdown as _0x4519ce}from'@ckeditor/ckeditor5-ui/dist/index.js';import{IconFootnote as _0x5eae8f,IconListStyleDecimal as _0x437365,IconListStyleDecimalLeadingZero as _0x4025d5,IconListStyleLowerRoman as _0x50417e,IconListStyleUpperRoman as _0x18d6e3,IconListStyleLowerLatin as _0x2868d1,IconListStyleUpperLatin as _0x317054}from'@ckeditor/ckeditor5-icons/dist/index.js';class F{['_model'];['_elementName'];['_getElementKey'];['_trackedElements']=new Map();constructor(_0x273550,_0x299146){this['_model']=_0x273550,this['_elementName']=_0x299146['elementName'],this['_getElementKey']=_0x299146['getElementKey'];}['reset'](){this['_trackedElements']['clear']();}['getChanges'](_0x3476ac){const _0x16a989=new Set(),_0x431d27=new Map();for(const _0x305f64 of _0x3476ac){if('insert'===_0x305f64['type']&&'$text'!==_0x305f64['name']&&_0x305f64['position']['nodeAfter']){const _0x572a05=this['_model']['createRangeOn'](_0x305f64['position']['nodeAfter']);for(const _0x839f8 of _0x572a05['getItems']()){if(!_0x839f8['is']('element',this['_elementName']))continue;const _0x32b38c=this['_getElementKey'](_0x839f8);_0x431d27['has'](_0x32b38c)||_0x431d27['set'](_0x32b38c,[]),_0x431d27['get'](_0x32b38c)['push'](_0x839f8);}}if('remove'===_0x305f64['type']&&_0x305f64['name']===this['_elementName']){const _0x2ad0da=this['_getElementKey']({'getAttribute':_0x180417=>_0x305f64['attributes']['get'](_0x180417)});_0x16a989['add'](_0x2ad0da);}}for(const [_0x1eb524,_0x2fd420]of this['_trackedElements'])'$graveyard'===_0x2fd420['root']['rootName']&&_0x16a989['add'](_0x1eb524);for(const _0x30ff8a of _0x16a989)this['_trackedElements']['delete'](_0x30ff8a);for(const [_0x63c77d,_0xd01e6e]of _0x431d27)this['_trackedElements']['set'](_0x63c77d,_0xd01e6e[_0xd01e6e['length']-0x1]);const _0x29167d=new Set();for(const [_0xf44454,_0x5c1d63]of _0x431d27)_0x16a989['has'](_0xf44454)&&(_0x29167d['add'](_0x5c1d63[0x0]),_0x5c1d63['length']>0x1?_0x431d27['set'](_0xf44454,_0x5c1d63['slice'](0x1)):_0x431d27['delete'](_0xf44454),_0x16a989['delete'](_0xf44454));return{'removed':Array['from'](_0x16a989),'inserted':Array['from'](_0x431d27['values']())['flat'](),'moved':Array['from'](_0x29167d)};}}class c extends _0x381f4b{['_footnotes']=[];['_footnotesDefinitions']=null;['_footnoteFormatter']=null;['_footnoteDefsContainerTracker'];['_footnoteRefsTracker'];['_footnoteDefsTracker'];static get['pluginName'](){return'FootnotesTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24b10b){super(_0x24b10b),this['_footnoteDefsContainerTracker']=new F(this['editor']['model'],{'elementName':'footnotesDefinitions','getElementKey':()=>'singleton'}),this['_footnoteRefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteRef','getElementKey':_0x8ae00d=>_0x8ae00d['getAttribute']('footnoteId')}),this['_footnoteDefsTracker']=new F(this['editor']['model'],{'elementName':'footnoteDefinition','getElementKey':_0x3cd929=>_0x3cd929['getAttribute']('footnoteId')});}['init'](){const {editor:_0x30af4e}=this,{model:_0x3e3bb5,data:_0x4d2f27}=_0x30af4e;_0x3e3bb5['document']['registerPostFixer'](_0x5d50b3=>{const _0x46f2a6=_0x3e3bb5['document']['differ']['getChanges']();let _0x430ae2=!0x1;return this['_handleFootnotesDefinitionsObjectChanges'](_0x5d50b3,_0x46f2a6)&&(_0x430ae2=!0x0),this['_handleFootnoteDefinitionsChanges'](_0x5d50b3,_0x46f2a6)&&(_0x430ae2=!0x0),this['_handleFootnoteReferencesChanges'](_0x5d50b3,_0x46f2a6)&&(_0x430ae2=!0x0),this['_ensureFootnotesReferencesHaveProperOrder'](_0x5d50b3)&&(_0x430ae2=!0x0),this['_handleFootnotesDefinitionsObjectSync'](_0x5d50b3)&&(_0x430ae2=!0x0),this['_sortFootnoteDefinitions'](_0x5d50b3)&&(_0x430ae2=!0x0),_0x430ae2;}),this['listenTo'](_0x3e3bb5['document'],'change:data',()=>{_0x3e3bb5['enqueueChange']({'isUndoable':!0x1},_0x347295=>{this['_ensureFootnotesDefinitionsContainerExists'](_0x347295);});},{'priority':'low'}),this['listenTo'](_0x4d2f27,'set',()=>{this['_footnotes']=[],this['_footnoteDefsContainerTracker']['reset'](),this['_footnoteRefsTracker']['reset'](),this['_footnoteDefsTracker']['reset']();},{'priority':'high'});}['getFootnotesDefinitionsObjectElement'](){return this['_footnotesDefinitions'];}['getFootnote'](_0x3d76cd){return this['_footnotes']['find'](_0x133353=>_0x133353['id']===_0x3d76cd)||null;}['getFootnotes'](){return Array['from'](this['_footnotes']);}['getFootnotesFormatter'](){return this['_footnoteFormatter'];}['setFootnoteFormatter'](_0x33b4fd){this['_footnoteFormatter']=_0x33b4fd;}['_updateFootnotesCounters'](_0x2931f9,_0x1cd4da=0x0){let _0x4ca9a4=!0x1;for(let _0x4ad934=_0x1cd4da;_0x4ad934<this['_footnotes']['length'];_0x4ad934++)this['_updateFootnoteRefCounter'](_0x2931f9,_0x4ad934)&&(_0x4ca9a4=!0x0);return _0x4ca9a4;}['_insertEmptyFootnotesDefinitionsContainer'](_0x45ad99,_0x2f04c6){const _0x49ebe6=_0x45ad99['createElement']('footnotesDefinitions',{});return _0x45ad99['append'](_0x49ebe6,_0x2f04c6),this['_footnotesDefinitions']=_0x49ebe6,_0x49ebe6;}['_ensureFootnotesDefinitionsContainerExists'](_0xbcb258){if(!this['_footnotes']['length']||this['_footnotesDefinitions'])return;const _0x254fbe=this['_footnotes'][0x0]['reference']['root'],_0x51d4cf=this['_insertEmptyFootnotesDefinitionsContainer'](_0xbcb258,_0x254fbe);for(const _0x1b7530 of this['_footnotes'])_0x1b7530['definition']['parent']||_0xbcb258['insert'](_0x1b7530['definition'],_0x51d4cf,'end');this['_updateFootnotesCounters'](_0xbcb258);}['_handleFootnotesDefinitionsObjectChanges'](_0x5ec8ce,_0x5ee677){let _0x5d439a=!0x1;const {inserted:_0x357ae1,removed:_0x3a1fec,moved:_0x261565}=this['_footnoteDefsContainerTracker']['getChanges'](_0x5ee677);if(_0x261565['length']&&(this['_footnotesDefinitions']=_0x261565[0x0]),_0x357ae1['length']){if(_0x357ae1['length']>0x1||this['_footnotesDefinitions']&&_0x357ae1['some'](_0x403b90=>_0x403b90!==this['_footnotesDefinitions'])){const _0x35f044=_0x5ec8ce['createElement']('footnotesDefinitions',{}),_0x1944d0=[];this['_footnotesDefinitions']&&_0x1944d0['push'](this['_footnotesDefinitions']),_0x1944d0['push'](..._0x357ae1),_0x5ec8ce['insert'](_0x35f044,_0x1944d0[0x0],'before');for(const _0x3156de of _0x1944d0)_0x5ec8ce['move'](_0x5ec8ce['createRangeIn'](_0x3156de),_0x5ec8ce['createPositionAt'](_0x35f044,'end')),_0x5ec8ce['remove'](_0x3156de);this['_footnotesDefinitions']=_0x35f044,this['_updateFootnotesCounters'](_0x5ec8ce),_0x5d439a=!0x0;}else this['_footnotesDefinitions']=_0x357ae1[0x0];}if(_0x3a1fec['length']&&'$graveyard'===this['_footnotesDefinitions']?.['root']['rootName']){for(const _0x2e6678 of this['_footnotes'])_0x5ec8ce['remove'](_0x2e6678['reference']),_0x5d439a=!0x0;this['_footnotes']=[],this['_footnotesDefinitions']=null;}return _0x5d439a;}['_handleFootnoteDefinitionsChanges'](_0x2933c7,_0x2530f7){let _0x14d73b=!0x1;const _0x3db977=this['editor']['config']['get']('footnotes.multiBlock'),{inserted:_0x131b23,moved:_0x2068f1}=this['_footnoteDefsTracker']['getChanges'](_0x2530f7);for(const _0x4f0fa5 of[..._0x2068f1,..._0x131b23]){const _0x4cfe9c=_0x4f0fa5['getAttribute']('footnoteId'),_0x2a2359=this['getFootnote'](_0x4cfe9c);_0x2a2359&&(_0x2a2359['definition']=_0x4f0fa5),_(_0x2933c7,_0x3db977,_0x4f0fa5)&&(_0x14d73b=!0x0);}return _0x14d73b;}['_handleFootnoteReferencesChanges'](_0x3dbcb6,_0x48306f){let _0x3598d1=!0x1;const {removed:_0x596f91,inserted:_0x275423,moved:_0xf8a934}=this['_footnoteRefsTracker']['getChanges'](_0x48306f);for(const _0x273cc9 of _0x596f91)this['_handleRemoveFootnoteReferenceById'](_0x3dbcb6,_0x273cc9)&&(_0x3598d1=!0x0);for(const _0x14322f of _0x275423)this['_handleInsertedFootnoteReference'](_0x3dbcb6,_0x14322f)&&(_0x3598d1=!0x0);for(const _0x293ca9 of _0xf8a934)this['_handleMovedFootnoteReference'](_0x3dbcb6,_0x293ca9)&&(_0x3598d1=!0x0);return _0x3598d1;}['_handleFootnotesDefinitionsObjectSync'](_0x34ce57){if(!this['_footnotesDefinitions'])return!0x1;let _0xd1f0bb=!0x1;if(this['_footnotesDefinitions']['childCount']!==this['_footnotes']['length']){const _0x5c3a05=[];for(const _0x352516 of this['_footnotesDefinitions']['getChildren']()){const _0x5656e1=_0x352516['getAttribute']('footnoteId');this['getFootnote'](_0x5656e1)||(_0x5c3a05['unshift'](_0x352516),_0xd1f0bb=!0x0);}for(const _0x35853 of _0x5c3a05)_0x34ce57['remove'](_0x35853);}const _0x4136f2=new Set(),_0x5b36db=[];for(const _0x476fe4 of this['_footnotesDefinitions']['getChildren']()){const _0x22719f=_0x476fe4['getAttribute']('footnoteId');_0x4136f2['has'](_0x22719f)?(_0x5b36db['unshift'](_0x476fe4),_0xd1f0bb=!0x0):_0x4136f2['add'](_0x22719f);}for(const _0x2c4074 of _0x5b36db)_0x34ce57['remove'](_0x2c4074);return this['_footnotesDefinitions']['childCount']||(_0x34ce57['remove'](this['_footnotesDefinitions']),this['_footnotesDefinitions']=null,_0xd1f0bb=!0x0),_0xd1f0bb;}['_handleInsertedFootnoteReference'](_0x5adb15,_0x2a3461){if(this['_footnotes']['find'](_0x31a338=>_0x31a338['reference']===_0x2a3461))return!0x1;let _0x805f35=!0x1;const _0x3f065d=_0x2a3461['getAttribute']('footnoteId'),_0x26231a=this['getFootnote'](_0x3f065d);_0x26231a&&(_0x5adb15['remove'](_0x26231a['reference']),this['_footnotes']=this['_footnotes']['filter'](_0x1e3911=>_0x1e3911['id']!==_0x3f065d),_0x805f35=!0x0);let _0x4524d6=this['_footnotesDefinitions']?function(_0x5dffdc,_0x4013ca){for(const _0x536319 of _0x5dffdc['getChildren']())if(_0x536319['getAttribute']('footnoteId')===_0x4013ca)return _0x536319;return null;}(this['_footnotesDefinitions'],_0x3f065d):null;_0x4524d6||(_0x4524d6=_0x5adb15['createElement']('footnoteDefinition',{'footnoteId':_0x3f065d}),this['_footnotesDefinitions']&&(_0x5adb15['insert'](_0x4524d6,this['_footnotesDefinitions'],'end'),_0x805f35=!0x0));const _0xeb5adc={'id':_0x3f065d,'reference':_0x2a3461,'definition':_0x4524d6},_0x34b50a=I(this['editor']['model'],this['_footnotes'],_0x2a3461);return this['_footnotes']['splice'](_0x34b50a,0x0,_0xeb5adc),this['_updateFootnotesCounters'](_0x5adb15,_0x34b50a)&&(_0x805f35=!0x0),_0x805f35;}['_handleRemoveFootnoteReferenceById'](_0x214935,_0x82a8bd){const _0x1758da=this['_footnotes']['findIndex'](_0x5696ef=>_0x5696ef['id']===_0x82a8bd);if(-0x1===_0x1758da)return!0x1;let _0x5b7dd2=!0x1;const _0x2f2a37=this['_footnotes'][_0x1758da];return'$graveyard'!==_0x2f2a37['definition']['root']['rootName']&&(_0x214935['remove'](_0x2f2a37['definition']),_0x5b7dd2=!0x0),this['_footnotes']['splice'](_0x1758da,0x1),this['_updateFootnotesCounters'](_0x214935,_0x1758da)&&(_0x5b7dd2=!0x0),_0x5b7dd2;}['_handleMovedFootnoteReference'](_0x1d0e71,_0x3dd93){const _0x2a74bc=_0x3dd93['getAttribute']('footnoteId'),_0x322501=this['_footnotes']['findIndex'](_0x1d55cb=>_0x1d55cb['id']===_0x2a74bc),_0x2ad0cd=this['_footnotes'][_0x322501];let _0x3a8a47=!0x1;_0x2ad0cd['reference']=_0x3dd93,this['_footnotes']['splice'](_0x322501,0x1);const _0x3bf2f5=I(this['editor']['model'],this['_footnotes'],_0x3dd93);return this['_footnotes']['splice'](_0x3bf2f5,0x0,_0x2ad0cd),this['_updateFootnotesCounters'](_0x1d0e71,Math['min'](_0x322501,_0x3bf2f5))&&(_0x3a8a47=!0x0),_0x3a8a47;}['_updateFootnoteRefCounter'](_0x2e4e66,_0x1c1783){if(!this['_footnotesDefinitions'])return!0x1;const _0x40c2f5=this['_footnotes'][_0x1c1783];let _0x191326;return _0x191326=this['_footnoteFormatter']?this['_footnoteFormatter']({'footnote':_0x40c2f5,'container':this['_footnotesDefinitions'],'digits':String(this['_footnotes']['length'])['length'],'value':_0x1c1783+0x1}):String(_0x1c1783+0x1),_0x40c2f5['reference']['getAttribute']('footnoteCounter')!=_0x191326&&(_0x2e4e66['setAttribute']('footnoteCounter',_0x191326,_0x40c2f5['reference']),!0x0);}['_sortFootnoteDefinitions'](_0x4c7028){if(!this['_footnotesDefinitions']||this['_footnotes']['length']<0x2)return!0x1;if(function(_0x5925d1,_0x969c2e){if(_0x5925d1['length']!==_0x969c2e['length'])return!0x1;for(let _0x2e930c=0x0;_0x2e930c<_0x5925d1['length'];_0x2e930c++)if(_0x5925d1[_0x2e930c]!==_0x969c2e[_0x2e930c])return!0x1;return!0x0;}(this['_footnotes']['map'](_0x12ead1=>_0x12ead1['id']),Array['from'](this['_footnotesDefinitions']['getChildren']())['map'](_0x5058c1=>_0x5058c1['getAttribute']('footnoteId'))))return!0x1;let _0x1f465d=!0x1;for(let _0x3b2302=0x0;_0x3b2302<this['_footnotes']['length'];_0x3b2302++){const _0xd2eac3=this['_footnotes'][_0x3b2302],_0xa3aa2a=_0x4c7028['createPositionBefore'](_0xd2eac3['definition']),_0xbe9c6b=_0x4c7028['createPositionAt'](this['_footnotesDefinitions'],_0x3b2302);_0xa3aa2a['isEqual'](_0xbe9c6b)||(_0x4c7028['move'](_0x4c7028['createRangeOn'](_0xd2eac3['definition']),_0xbe9c6b),_0x1f465d=!0x0);}return _0x1f465d;}['_ensureFootnotesReferencesHaveProperOrder'](_0x1b4685){if(!this['_footnotes']['length'])return!0x1;const {model:_0x1fe1ef}=this['editor'];let _0x2ce830=!0x1;for(let _0x1ca628=0x0;_0x1ca628<this['_footnotes']['length']-0x1;_0x1ca628++){const _0x9bc768=this['_footnotes'][_0x1ca628],_0x500a11=this['_footnotes'][_0x1ca628+0x1],_0x3a0432=_0x1fe1ef['createPositionBefore'](_0x9bc768['reference']),_0x3228d9=_0x1fe1ef['createPositionBefore'](_0x500a11['reference']);'after'===_0x3a0432['compareWith'](_0x3228d9)&&(this['_handleMovedFootnoteReference'](_0x1b4685,_0x9bc768['reference']),_0x1ca628=-0x1,_0x2ce830=!0x0);}return _0x2ce830;}}function _(_0x53cde2,_0x19f3c4,_0x3ed0ea){if(_0x3ed0ea['childCount'])return!0x1;const _0x45b5bb=_0x19f3c4?'paragraph':'footnoteInlineContent';return _0x53cde2['insert'](_0x53cde2['createElement'](_0x45b5bb),_0x3ed0ea),!0x0;}function I(_0x23094f,_0x302c5f,_0x2f7d03){if(0x0===_0x302c5f['length'])return 0x0;const _0x1462e3=_0x23094f['createPositionBefore'](_0x2f7d03);for(let _0x4791b0=0x0;_0x4791b0<_0x302c5f['length'];_0x4791b0++){const _0x42449c=_0x302c5f[_0x4791b0],_0x343d12=_0x23094f['createPositionBefore'](_0x42449c['reference']);if('before'===_0x1462e3['compareWith'](_0x343d12))return _0x4791b0;}const _0x28ea0f=_0x2f7d03['root'];let _0x5ddd22=-0x1;for(let _0x85d504=_0x302c5f['length']-0x1;_0x85d504>=0x0;_0x85d504--)if(_0x302c5f[_0x85d504]['reference']['root']===_0x28ea0f){_0x5ddd22=_0x85d504;break;}if(-0x1!==_0x5ddd22)return _0x5ddd22+0x1;const _0x2515f0=_0x23094f['document']['getRootNames'](),_0x4dd0fe=_0x2515f0['indexOf'](_0x28ea0f['rootName']),_0x2ad486=_0x2515f0[_0x4dd0fe+0x1];if(_0x2ad486){for(let _0x1625ab=0x0;_0x1625ab<_0x302c5f['length'];_0x1625ab++)if(_0x302c5f[_0x1625ab]['reference']['root']['rootName']===_0x2ad486)return _0x1625ab;}return _0x302c5f['length'];}class w extends _0x180100{['refresh'](){const _0x57e23c=this['editor']['model']['document']['selection'],_0x20e1b7=this['_getPositionToInsertFootnote'](_0x57e23c);this['isEnabled']=!!_0x20e1b7;}['execute'](_0x585b41){const {editor:_0x357515}=this,{model:_0xa7f8d1}=_0x357515,{selection:_0x5f4c8f}=_0xa7f8d1['document'],_0x4c51b8=this['_getPositionToInsertFootnote'](_0x5f4c8f);if(!_0x4c51b8)return;const _0x540bc3=_0x357515['plugins']['get']('FootnotesEditing'),_0x5317de=_0x585b41?.['footnoteId']??_0x204d37();!function(_0x8c3fda){return'string'==typeof _0x8c3fda&&_0x8c3fda['length']>0x0&&!/\s/['test'](_0x8c3fda)&&!/^\d/['test'](_0x8c3fda);}(_0x5317de)?_0x204d57('insert-footnote-command-executed-with-invalid-id'):(_0xa7f8d1['change'](_0x4e027c=>{const _0x38655d=_0x4e027c['createElement']('footnoteRef',{'footnoteId':_0x5317de});_0xa7f8d1['insertObject'](_0x38655d,_0x4c51b8,null);}),_0x540bc3['_moveSelectionToFootnoteDefinition'](_0x5317de));}['_getPositionToInsertFootnote'](_0x1f5287){const {model:_0x1b4bcf}=this['editor'],{schema:_0x47eb01}=_0x1b4bcf,_0x3fb384=_0x1f5287['getFirstRange']();for(const _0xedf323 of _0x3fb384['getItems']())if(_0x47eb01['isBlock'](_0xedf323)||_0x47eb01['isObject'](_0xedf323))return null;const _0x31e5e0=_0x3fb384['end'];return _0x47eb01['checkChild'](_0x31e5e0,'footnoteRef')?_0x31e5e0:null;}}class r extends _0x381f4b{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5e0871}=this;_0x5e0871['config']['define']('footnotes.multiBlock',!0x0),_0x5e0871['commands']['add']('insertFootnote',new w(_0x5e0871)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x26852b){const _0x4e49f=_0x140651([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x32c943=0x47a28506,_0x3d4c15=0x47a5f3a6^_0x32c943,_0x5afed0=window[_0x140651([0x44,0x61,0x74,0x65])][_0x140651([0x6e,0x6f,0x77])](),_0x17d5fe=_0x26852b[_0x140651([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x11bb98=new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a509f=>{_0x17d5fe[_0x140651([0x6f,0x6e,0x63,0x65])](_0x140651([0x72,0x65,0x61,0x64,0x79]),_0x2a509f);}),_0x442dea={[_0x140651([0x6b,0x74,0x79])]:_0x140651([0x45,0x43]),[_0x140651([0x75,0x73,0x65])]:_0x140651([0x73,0x69,0x67]),[_0x140651([0x63,0x72,0x76])]:_0x140651([0x50,0x2d,0x32,0x35,0x36]),[_0x140651([0x78])]:_0x140651([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x140651([0x79])]:_0x140651([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x140651([0x61,0x6c,0x67])]:_0x140651([0x45,0x53,0x32,0x35,0x36])},_0x45b716=_0x17d5fe[_0x140651([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x140651([0x67,0x65,0x74])](_0x140651([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x526d60(){let _0x114924,_0x3433c9=null,_0x4f1b87=null;try{if(_0x45b716==_0x140651([0x47,0x50,0x4c]))return _0x140651([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x114924=_0x2f0106(),!_0x114924)return _0x140651([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x114924[_0x140651([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4f1b87=_0x13594c(_0x114924[_0x140651([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x114924[_0x140651([0x6a,0x74,0x69])])),await _0x234449()?_0x49af2f()?_0x26e1f1()?_0x140651([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1709cb()?(_0x114924[_0x140651([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x140651([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3433c9=_0x18110d(_0x140651([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x114924[_0x140651([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x140651([0x74,0x72,0x69,0x61,0x6c])&&(_0x3433c9=_0x18110d(_0x140651([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x281e0f()):_0x140651([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x140651([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x140651([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x140651([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x26e1f1(){const _0x9f5b49=[_0x140651([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x140651([0x74,0x72,0x69,0x61,0x6c])][_0x140651([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x114924[_0x140651([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5afed0/0x3e8:0xe10*_0x3d4c15;return _0x114924[_0x140651([0x65,0x78,0x70])]<_0x9f5b49;}function _0x49af2f(){const _0x167ade=_0x114924[_0x140651([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x167ade&&(!!_0x167ade[_0x140651([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x140651([0x2a]))||!!_0x167ade[_0x140651([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x140651([0x46,0x4f,0x4f])));}function _0x1709cb(){const _0x29fcef=_0x114924[_0x140651([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x29fcef||0x0==_0x29fcef[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xfe6bb}=new URL(window[_0x140651([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x29fcef[_0x140651([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xfe6bb))return!0x0;const _0xe32e5=_0xfe6bb[_0x140651([0x73,0x70,0x6c,0x69,0x74])](_0x140651([0x2e]));return _0x29fcef[_0x140651([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x23c0e9=>_0x23c0e9[_0x140651([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x140651([0x2a])))[_0x140651([0x6d,0x61,0x70])](_0x4bca3f=>_0x4bca3f[_0x140651([0x73,0x70,0x6c,0x69,0x74])](_0x140651([0x2e])))[_0x140651([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1d8e21=>_0x1d8e21[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xe32e5[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x140651([0x6d,0x61,0x70])](_0x36347c=>Array(_0xe32e5[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x36347c[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x140651([0x66,0x69,0x6c,0x6c])](_0x36347c[0x0]===_0x140651([0x2a])?_0x140651([0x2a]):'')[_0x140651([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x36347c))[_0x140651([0x73,0x6f,0x6d,0x65])](_0x6b1410=>_0xe32e5[_0x140651([0x65,0x76,0x65,0x72,0x79])]((_0x133180,_0x5cb714)=>_0x6b1410[_0x5cb714]===_0x133180||_0x6b1410[_0x5cb714]===_0x140651([0x2a])));}function _0x281e0f(){return _0x3433c9&&_0x4f1b87?new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x29d8aa,_0x1ddcf8)=>{_0x3433c9[_0x140651([0x74,0x68,0x65,0x6e])](_0x29d8aa,_0x1ddcf8),_0x4f1b87[_0x140651([0x74,0x68,0x65,0x6e])](_0x1d4eed=>{_0x1d4eed!=_0x140651([0x56,0x61,0x6c,0x69,0x64])&&_0x29d8aa(_0x1d4eed);},_0x1ddcf8);}):_0x3433c9||_0x4f1b87||_0x140651([0x56,0x61,0x6c,0x69,0x64]);}}function _0x13594c(_0x1e10b6,_0x670c1f){return new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x841ff7=>{if(_0xc1ac87())return _0x841ff7(_0x140651([0x56,0x61,0x6c,0x69,0x64]));_0x3afb51(),_0x17d5fe[_0x140651([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x140651([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5de218=!0x1;const _0x48ae32=_0x204d37();function _0x117769(_0x348991){return!!_0x348991&&(typeof _0x348991===_0x140651([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x348991===_0x140651([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x348991[_0x140651([0x74,0x68,0x65,0x6e])]===_0x140651([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x348991[_0x140651([0x63,0x61,0x74,0x63,0x68])]===_0x140651([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xbda430(_0x2e197e){_0x3c0903(_0x2e197e)[_0x140651([0x74,0x68,0x65,0x6e])](_0x2570cc=>{if(!_0x2570cc||_0x2570cc[_0x140651([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x140651([0x6f,0x6b]))return _0x140651([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5b236b(_0x5564d8(_0x48ae32+_0x670c1f))!=_0x2570cc[_0x140651([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x140651([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x140651([0x56,0x61,0x6c,0x69,0x64]);})[_0x140651([0x74,0x68,0x65,0x6e])](_0xbc2799=>(_0x6a652b(),_0xbc2799),()=>{const _0x74ea0f=_0x22bd44();return null==_0x74ea0f?(_0x6a652b(),_0x140651([0x56,0x61,0x6c,0x69,0x64])):_0x140651(_0x5afed0-_0x74ea0f>(0x63ae0106^_0x32c943)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x140651([0x74,0x68,0x65,0x6e])](_0x841ff7)[_0x140651([0x63,0x61,0x74,0x63,0x68])](()=>{_0x841ff7(_0x140651([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xef4b33=0x47946b86^_0x32c943;function _0x6a652b(){const _0x1e3ed7=_0x140651([0x6c,0x6c,0x63,0x74,0x2d])+_0x5b236b(_0x5564d8(_0x1e10b6)),_0x3c98c2=_0x1216a8(_0x5b236b(window[_0x140651([0x4d,0x61,0x74,0x68])][_0x140651([0x63,0x65,0x69,0x6c])](_0x5afed0/_0xef4b33)));window[_0x140651([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x140651([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1e3ed7,_0x3c98c2);}function _0x22bd44(){const _0x465ede=_0x140651([0x6c,0x6c,0x63,0x74,0x2d])+_0x5b236b(_0x5564d8(_0x1e10b6)),_0x4152d5=window[_0x140651([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x140651([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x465ede);return _0x4152d5?window[_0x140651([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1216a8(_0x4152d5),0x10)*_0xef4b33:null;}function _0x3c0903(_0x1e58fd){return new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x329a12,_0x5257e2)=>{_0x1e58fd[_0x140651([0x74,0x68,0x65,0x6e])](_0x329a12,_0x5257e2),window[_0x140651([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5257e2,0x47a351c6^_0x32c943);});}}_0x17d5fe[_0x140651([0x6f,0x6e])](_0x140651([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x500086,_0x3b0a33)=>{if(_0x3b0a33[0x0]!=_0x1e10b6)return _0x841ff7(_0x140651([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3b0a33[0x1]={..._0x3b0a33[0x1],[_0x140651([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x48ae32};},{[_0x140651([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x140651([0x68,0x69,0x67,0x68])}),_0x17d5fe[_0x140651([0x6f,0x6e])](_0x140651([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x342cfa=>{_0x117769(_0x342cfa[_0x140651([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5de218=!0x0,_0xbda430(_0x342cfa[_0x140651([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x140651([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x140651([0x6c,0x6f,0x77])}),_0x11bb98[_0x140651([0x74,0x68,0x65,0x6e])](()=>{_0x5de218||_0x841ff7(_0x140651([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xc1ac87(){return _0x17d5fe[_0x140651([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x140651([0x76,0x69,0x65,0x77])][_0x140651([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x140651([0x61,0x75,0x74,0x6f]);}function _0x3afb51(){_0x17d5fe[_0x140651([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x140651([0x76,0x69,0x65,0x77])][_0x140651([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x140651([0x61,0x75,0x74,0x6f]);}}function _0x18110d(_0x1a638d){const _0x12dac5=[new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4b36e9=>setTimeout(_0x4b36e9,0x47abbbca^_0x32c943)),_0x11bb98[_0x140651([0x74,0x68,0x65,0x6e])](()=>new window[(_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54d85f=>{let _0x8c1b2e=0x0;_0x17d5fe[_0x140651([0x6d,0x6f,0x64,0x65,0x6c])][_0x140651([0x6f,0x6e])](_0x140651([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4a9122,_0x244fe3)=>{_0x244fe3[0x0][_0x140651([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x8c1b2e++,_0x8c1b2e==(0x47a284fe^_0x32c943)&&(_0x54d85f(),_0x4a9122[_0x140651([0x6f,0x66,0x66])]());});}))];return window[_0x140651([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x140651([0x72,0x61,0x63,0x65])](_0x12dac5)[_0x140651([0x74,0x68,0x65,0x6e])](()=>_0x1a638d);}async function _0x3cc0a0(){await _0x11bb98,_0x17d5fe[_0x140651([0x6d,0x6f,0x64,0x65,0x6c])][_0x140651([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xf5988b,_0x17d5fe[_0x140651([0x6d,0x6f,0x64,0x65,0x6c])][_0x140651([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xf5988b,_0x17d5fe[_0x140651([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x140651([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xa51ae3(_0x4c1e59){const _0x44a148=_0x3bac5f();_0x17d5fe[_0x44a148]=_0x140651([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4c1e59,_0x4c1e59!=_0x140651([0x56,0x61,0x6c,0x69,0x64])&&_0x3cc0a0();}function _0x3bac5f(){const _0xb9bc74=window[_0x140651([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x140651([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x140651([0x6e,0x6f,0x77])]())[_0x140651([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x140651([0x2e]),'');let _0x4dd3b7=_0x140651([0x75]);for(let _0x364ade=0x0;_0x364ade<_0xb9bc74[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x364ade+=0x2){let _0x37ce20=window[_0x140651([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb9bc74[_0x140651([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x364ade,_0x364ade+0x2));_0x37ce20>=_0x4e49f[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x37ce20-=_0x4e49f[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x4dd3b7+=_0x4e49f[_0x37ce20];}return _0x4dd3b7;}function _0x2f0106(){const _0x3548d2=_0x45b716[_0x140651([0x73,0x70,0x6c,0x69,0x74])](_0x140651([0x2e]));if(0x3!=_0x3548d2[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x427b7b(_0x3548d2[0x1]);function _0x427b7b(_0x24935f){const _0x1cfb76=_0x55c5df(_0x24935f);return _0x1cfb76&&_0x4cbfbb()?_0x1cfb76:null;function _0x4cbfbb(){const _0x3b049b=_0x1cfb76[_0x140651([0x6a,0x74,0x69])],_0x460026=window[_0x140651([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b049b[_0x140651([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b049b[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x543261={..._0x1cfb76,[_0x140651([0x6a,0x74,0x69])]:_0x3b049b[_0x140651([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3b049b[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x543261[_0x140651([0x76,0x63])],_0x5564d8(_0x543261)==_0x460026;}}}async function _0x234449(){let _0x1e9c99=!0x0;try{const _0x40db4b=_0x45b716[_0x140651([0x73,0x70,0x6c,0x69,0x74])](_0x140651([0x2e])),[_0x1454aa,_0xdea782,_0x1f886d]=_0x40db4b;return _0x4e5cb3(_0x1454aa),await _0x3d3993(_0x1454aa,_0xdea782,_0x1f886d),_0x1e9c99;}catch{return!0x1;}function _0x4e5cb3(_0x5de5bc){const _0x31d953=_0x55c5df(_0x5de5bc);_0x31d953&&_0x31d953[_0x140651([0x61,0x6c,0x67])]==_0x140651([0x45,0x53,0x32,0x35,0x36])||(_0x1e9c99=!0x1);}async function _0x3d3993(_0x4bf868,_0x219a39,_0x564ab5){const _0x17edc6=window[_0x140651([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x140651([0x66,0x72,0x6f,0x6d])](_0x27dff3(_0x564ab5),_0x1d7ec3=>_0x1d7ec3[_0x140651([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3d26fe=new window[(_0x140651([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x140651([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4bf868+_0x140651([0x2e])+_0x219a39),_0x5162d1=window[_0x140651([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x140651([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5162d1)return;const _0x110baf=await _0x5162d1[_0x140651([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x140651([0x6a,0x77,0x6b]),_0x442dea,{[_0x140651([0x6e,0x61,0x6d,0x65])]:_0x140651([0x45,0x43,0x44,0x53,0x41]),[_0x140651([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x140651([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x140651([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5162d1[_0x140651([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x140651([0x6e,0x61,0x6d,0x65])]:_0x140651([0x45,0x43,0x44,0x53,0x41]),[_0x140651([0x68,0x61,0x73,0x68])]:{[_0x140651([0x6e,0x61,0x6d,0x65])]:_0x140651([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x110baf,_0x17edc6,_0x3d26fe)||(_0x1e9c99=!0x1);}}function _0x55c5df(_0x585a42){return _0x585a42[_0x140651([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x140651([0x65,0x79]))?JSON[_0x140651([0x70,0x61,0x72,0x73,0x65])](_0x27dff3(_0x585a42)):null;}function _0x27dff3(_0x27b6bf){return window[_0x140651([0x61,0x74,0x6f,0x62])](_0x27b6bf[_0x140651([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x140651([0x2b]))[_0x140651([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x140651([0x2f])));}function _0x5564d8(_0x31d41d){let _0x517218=0x1505;function _0x29a876(_0x46d70f){for(let _0x2be509=0x0;_0x2be509<_0x46d70f[_0x140651([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2be509++){const _0x4f2798=_0x46d70f[_0x140651([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2be509);_0x517218=(_0x517218<<0x5)+_0x517218+_0x4f2798,_0x517218&=_0x517218;}}function _0x30c197(_0x474b9a){Array[_0x140651([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x474b9a)?_0x474b9a[_0x140651([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x30c197):_0x474b9a&&typeof _0x474b9a==_0x140651([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x140651([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x474b9a)[_0x140651([0x73,0x6f,0x72,0x74])]()[_0x140651([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x12b1cd,_0x45416e])=>{_0x29a876(_0x12b1cd),_0x30c197(_0x45416e);}):_0x29a876(window[_0x140651([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x474b9a));}return _0x30c197(_0x31d41d),_0x517218>>>0x0;}function _0x5b236b(_0x4b460c){return _0x4b460c[_0x140651([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x140651([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x140651([0x30]));}function _0x1216a8(_0x506fee){return _0x506fee[_0x140651([0x73,0x70,0x6c,0x69,0x74])]('')[_0x140651([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x140651([0x6a,0x6f,0x69,0x6e])]('');}function _0xf5988b(){}function _0x140651(_0xbdbc4e){return _0xbdbc4e['map'](_0x41160f=>String['fromCharCode'](_0x41160f))['join']('');}_0xa51ae3(await _0x526d60());}(this);}['_moveSelectionToFootnoteDefinition'](_0x2c2af4){const {plugins:_0x53f59a,editing:_0x51278b,model:_0x4629f6}=this['editor'],_0x46425d=_0x53f59a['get'](c)['getFootnote'](_0x2c2af4);return!!_0x46425d&&(_0x4629f6['change'](_0x96d3a9=>{_0x96d3a9['setSelection'](_0x96d3a9['createPositionAt'](_0x46425d['definition'],'end'));}),_0x51278b['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x2e2731){const {plugins:_0x15442d,editing:_0x48991c,model:_0x37b381}=this['editor'],_0x4be2f3=_0x15442d['get'](c)['getFootnote'](_0x2e2731);return!!_0x4be2f3&&(_0x37b381['change'](_0x472718=>{_0x472718['setSelection'](_0x4be2f3['reference'],'on');}),_0x48991c['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x2cd47f}=this['editor']['model'],_0x3ee39f=this['editor']['config']['get']('footnotes.multiBlock');_0x2cd47f['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x2cd47f['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x2cd47f['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x3ee39f?_0x2cd47f['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x2cd47f['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x2cd47f['addChildCheck'](_0x49985a=>{for(const _0x5b429f of _0x49985a)if('footnoteDefinition'===_0x5b429f['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x218de3}=this,{conversion:_0x306c9d,editing:_0x4a4aa2}=_0x218de3,{t:t}=_0x218de3['locale'];_0x306c9d['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x5bb3f0,{writer:_0x44fd98,consumable:_0x2b894d})=>{const _0x33bbe2=_0x5bb3f0['getChild'](0x0);if(!_0x33bbe2||!_0x33bbe2['is']('element','a'))return null;const _0x3ecd38=_0x33bbe2['getAttribute']('href')||'';if(!_0x3ecd38['startsWith']('#'))return null;const _0x4fcd31=_0x3ecd38['replace'](/^#/,'');if(!_0x4fcd31)return null;_0x2b894d['consume'](_0x33bbe2,{'name':!0x0,'attributes':['href']});for(const {item:_0x236bc9}of _0x4a4aa2['view']['createRangeIn'](_0x33bbe2))_0x236bc9['is']('$textProxy')?_0x2b894d['consume'](_0x236bc9['textNode'],{'name':!0x0}):_0x236bc9['is']('element')&&_0x2b894d['consume'](_0x236bc9,{'name':!0x0});return _0x44fd98['createElement']('footnoteRef',{'footnoteId':_0x4fcd31});}}),_0x306c9d['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x22c175,{writer:_0x520ccb})=>g(_0x22c175,_0x520ccb)}),_0x306c9d['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x3540a9,{writer:_0x1ea946})=>{const _0x4bf39f=_0x3540a9['getAttribute']('footnoteCounter');return _0x27240f(g(_0x3540a9,_0x1ea946),_0x1ea946,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x4bf39f)});}});}['_defineDefinitionsConverters'](){const {editor:_0x131bee}=this,{t:t}=_0x131bee['locale'],{conversion:_0x101098}=_0x131bee;_0x101098['for']('upcast')['elementToElement']({'view':{'name':'ol','classes':['footnotes']},'model':'footnotesDefinitions','converterPriority':'high'}),_0x101098['for']('dataDowncast')['elementToElement']({'model':'footnotesDefinitions','view':{'name':'ol','classes':['footnotes']}}),_0x101098['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x212785,{writer:_0x4ec8c0})=>{const _0x41fa99=_0x4ec8c0['createContainerElement']('div',{'class':'footnotes-wrapper','data-footnotes-list-label':t('Footnotes')},_0x4ec8c0['createContainerElement']('ol',{'class':'footnotes'},_0x4ec8c0['createSlot']())),_0x13208f=_0x27240f(_0x41fa99,_0x4ec8c0,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x4ec8c0['setCustomProperty']('footnotesDefinitions',!0x0,_0x13208f),_0x13208f;}});}['_defineDefinitionConverters'](){const {editor:_0x341ef6}=this,{conversion:_0x4fbd8e,locale:_0x4579f0}=_0x341ef6,_0x487a62=_0x341ef6['config']['get']('footnotes.multiBlock');_0x4fbd8e['for']('upcast')['add'](_0x4ad634=>{_0x4ad634['on']('element:li',(_0x25e5a9,_0x4f991b,_0x43c047)=>{const _0x2fddec=_0x4f991b['viewItem'];if(!_0x2fddec['hasClass']('footnote-definition')||!_0x2fddec['getAttribute']('id'))return;const _0x46a427=_0x2fddec['parent'];if(!_0x46a427['is']('element','ol')||!_0x46a427['hasClass']('footnotes'))return;if(!_0x43c047['consumable']['test'](_0x2fddec,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0xa27550=_0x43c047['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x2fddec['getAttribute']('id')});if(!_0x43c047['safeInsert'](_0xa27550,_0x4f991b['modelCursor']))return;_0x43c047['consumable']['consume'](_0x2fddec,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x3c8ab7=Array['from'](_0x2fddec['getChildren']())['find'](_0x3ce77b=>_0x3ce77b['is']('element')&&_0x3ce77b['hasClass']('footnote-content'));for(const _0x18aab2 of _0x2fddec['getChildren']())_0x18aab2['is']('element')&&(_0x43c047['consumable']['consume'](_0x18aab2,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x43c047['consumable']['consume'](_0x18aab2,{'name':!0x0,'classes':'footnote-content'}));if(_0x3c8ab7){if(_0x487a62)_0x43c047['convertChildren'](_0x3c8ab7,_0xa27550);else{const _0x26da5c=_0x43c047['writer']['createElement']('footnoteInlineContent');_0x43c047['writer']['insert'](_0x26da5c,_0xa27550),_0x43c047['convertChildren'](_0x3c8ab7,_0x26da5c);}}_0x43c047['updateConversionResult'](_0xa27550,_0x4f991b);});}),_0x4fbd8e['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x4cc0ce,{writer:_0x44f9e9})=>D(_0x4cc0ce,_0x44f9e9,_0x4579f0,{'dataPipeline':!0x0})}),_0x4fbd8e['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x24bb85,{writer:_0x18a13f})=>D(_0x24bb85,_0x18a13f,_0x4579f0)});}['_defineBogusParagraphConverters'](){const {editor:_0x130499}=this,{conversion:_0x316ec1}=_0x130499;_0x130499['config']['get']('footnotes.multiBlock')?(_0x316ec1['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x316ec1['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x130499['model']['document'],'change:data',()=>{!function(_0xcc81a7,_0x3dca53){const _0x4e2708=_0xcc81a7['document']['differ'],_0x25b7d6=new Set();for(const _0x1a2159 of _0x4e2708['getChanges']()){const _0x96d283='attribute'==_0x1a2159['type']?_0x1a2159['range']['start']['parent']:_0x1a2159['position']['parent'];_0x96d283['is']('element','footnoteDefinition')&&_0x25b7d6['add'](_0x96d283);}for(const _0x29697f of _0x25b7d6['values']()){const _0x3ab395=Array['from'](_0x29697f['getChildren']())['filter'](_0x340875=>p(_0x340875,_0x3dca53['mapper']));for(const _0x13e0d1 of _0x3ab395)_0x3dca53['reconvertItem'](_0x13e0d1);}}(_0x130499['model'],_0x130499['editing']);})):(_0x316ec1['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x316ec1['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x3656c1,{writer:_0x510c2d})=>{const _0x1e3601=_0x510c2d['createContainerElement']('span');return _0x510c2d['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x1e3601),_0x1e3601;}}));}['_defineKeyboardHandlers'](){const {editor:_0x467cf6}=this,{editing:_0x8deffc,t:t}=_0x467cf6,_0x209562=_0x467cf6['model']['document']['selection'];_0x467cf6['keystrokes']['set']('CTRL+Alt+D','insertFootnote'),_0x467cf6['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+D'}]}),this['listenTo'](_0x8deffc['view']['document'],'enter',(_0x468042,_0x2d4c81)=>{const _0x1b2e81=function(_0x336053){const _0x1d3f4b=_0x336053['getSelectedElement']();if(_0x1d3f4b?.['is']('element','footnoteRef'))return _0x1d3f4b;return null;}(_0x209562);if(_0x1b2e81){const _0x90db00=_0x1b2e81['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x90db00),_0x2d4c81['preventDefault'](),_0x468042['stop']();}},{'context':_0x1862ca});}['_defineClickHandlers'](){const {editor:_0x573600}=this,{editing:_0x3531ae}=_0x573600;_0x573600['editing']['view']['addObserver'](_0xfde7da),_0x573600['editing']['view']['addObserver'](_0x46b2f1);let _0x431166=!0x1;this['listenTo'](_0x3531ae['view']['document'],'pointerdown',(_0x376653,_0x1a90e4)=>{const {target:_0x4d8727}=_0x1a90e4,_0x3af5e4=_0x3531ae['view']['document']['selection'];_0x431166=!(!_0x4d8727['is']('element','sup')||!_0x4d8727['hasClass']('footnote'))&&_0x3af5e4['getSelectedElement']()===_0x4d8727;},{'priority':'high'}),this['listenTo'](_0x3531ae['view']['document'],'click',(_0x47da20,_0x12e886)=>{const {target:_0x526a86}=_0x12e886,_0x13cb13=_0x526a86['getChild'](0x0)['getAttribute']('href');this['_moveSelectionToFootnoteDefinition'](_0x13cb13['slice'](0x1)),_0x47da20['stop'](),_0x12e886['preventDefault']();},{'priority':'high','context':_0x567216=>_0x567216['is']('element','sup')&&_0x567216['hasClass']('footnote')&&_0x431166}),this['listenTo'](_0x3531ae['view']['document'],'click',(_0x5ade61,_0x42901c)=>{const {target:_0x1d9f5e}=_0x42901c;if(!_0x1d9f5e['is']('element','a'))return;let _0x423338=_0x1d9f5e['getAttribute']('href');if(!_0x423338?.['startsWith']('#'))return;_0x423338=_0x423338['slice'](0x1);let _0x44a131=!0x1;(_0x423338['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x423338['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x423338))&&(_0x44a131=!0x0),_0x44a131&&(_0x42901c['preventDefault'](),_0x5ade61['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x173450}={}){return(_0x16f6d5,{writer:_0x3bdc48})=>{if(!h(_0x16f6d5))return null;if(!_0x173450)return _0x3bdc48['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x4fefc4=_0x3bdc48['createContainerElement']('p');return _0x3bdc48['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x4fefc4),_0x4fefc4;};}function h(_0x42e06e){const {parent:_0x4a6be3}=_0x42e06e;if(!_0x4a6be3?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x4a6be3['childCount'])return!0x1;for(const _0x5b3ccf of _0x42e06e['getAttributeKeys']())if(!_0x5b3ccf['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x5b3ccf)return!0x1;return!0x0;}function p(_0x3f8928,_0x1442eb){if(!_0x3f8928['is']('element','paragraph'))return!0x1;const _0xdb5df3=_0x1442eb['toViewElement'](_0x3f8928);return!!_0xdb5df3&&h(_0x3f8928)!==_0xdb5df3['is']('element','span');}function $(_0x118e23){return _0x1862ca(_0x118e23)&&_0x118e23['is']('containerElement')&&!!_0x118e23['getCustomProperty']('footnotesDefinitions');}function g(_0x120a0d,_0x339330){const _0x167a1e=_0x120a0d['getAttribute']('footnoteId'),_0x33fdd2=_0x120a0d['getAttribute']('footnoteCounter'),_0x3c246a=_0x339330['createUIElement']('a',{'id':'ref-'+_0x167a1e,'href':'#'+_0x167a1e},function(_0x325031){const _0x118821=this['toDomElement'](_0x325031);return _0x118821['textContent']=_0x33fdd2,_0x118821;}),_0x105f70=_0x339330['createContainerElement']('sup',{'class':'footnote'},[_0x3c246a]);return _0x105f70['getFillerOffset']=()=>null,_0x105f70;}function D(_0x285332,_0x4d811a,_0x36ad24,{dataPipeline:_0x125281}={}){const {t:t}=_0x36ad24,_0x5acc80=_0x285332['getAttribute']('footnoteId'),_0xb2418f=_0x4d811a['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x5acc80},function(_0xb8ea21){const _0x3d7a3d=this['toDomElement'](_0xb8ea21);return _0x3d7a3d['innerText']='^',_0x3d7a3d;}),_0x2e4115=_0x125281?_0x4d811a['createContainerElement']('div',{'class':'footnote-content'}):_0x147785(_0x4d811a['createEditableElement']('div',{'class':'footnote-content'}),_0x4d811a,{'label':t('Footnote\x20content.')});return _0x4d811a['insert'](_0x4d811a['createPositionAt'](_0x2e4115,0x0),_0x4d811a['createSlot']()),_0x4d811a['createContainerElement']('li',{'class':'footnote-definition','id':_0x5acc80},[_0xb2418f,_0x2e4115]);}class e extends _0x381f4b{static get['pluginName'](){return'FootnotesClipboard';}static get['requires'](){return[r,_0x1b023c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){this['_defineClipboardIntegration']();}['_defineClipboardIntegration'](){this['_handleCopyFootnotesDefinitions'](),this['_handlePasteFootnotesDefinitions']();}['_handleCopyFootnotesDefinitions'](){const {editor:_0x24cb3e}=this,{plugins:_0x23946e,model:_0x445522}=_0x24cb3e,_0x5e972c=_0x23946e['get'](_0x1b023c),_0x3d035a=_0x23946e['get'](c);this['listenTo'](_0x5e972c,'outputTransformation',(_0x3915dc,_0x2167f7)=>{const _0x463b56=function(_0x496f94,_0xd4624c){const _0x4bb135=new Set();for(const {item:_0x5382c0}of _0x496f94['createRangeIn'](_0xd4624c))_0x5382c0['is']('element','footnoteRef')&&_0x4bb135['add'](_0x5382c0['getAttribute']('footnoteId'));return Array['from'](_0x4bb135);}(_0x445522,_0x2167f7['content']);if(!_0x463b56['length'])return;const _0x5191c3=_0x3d035a['getFootnotes'](),_0x40ba64=_0x463b56['reduce']((_0x1bcf0a,_0x148fef)=>{const _0xdfad00=_0x5191c3['find'](_0x26af7c=>_0x26af7c['id']===_0x148fef);if(_0xdfad00){const _0x34e7ef=_0x24cb3e['data']['toView'](_0xdfad00['definition'],{'isClipboardPipeline':!0x0}),_0x15bada=_0x24cb3e['data']['htmlProcessor']['toData'](_0x34e7ef);_0x1bcf0a[_0xdfad00['id']]=_0x15bada;}return _0x1bcf0a;},Object['create'](null));_0x2167f7['dataTransfer']['setData']('application/ckeditor5-footnotes',JSON['stringify'](_0x40ba64));});}['_handlePasteFootnotesDefinitions'](){const {editor:_0x557f8e}=this,{model:_0x20fcc2,plugins:_0xe29be7}=_0x557f8e,{view:_0x5b2c79}=_0x557f8e['editing'],_0x3f64ae=_0xe29be7['get'](_0x1b023c),_0x361536=_0xe29be7['get'](c);let _0x2f3ca2=null;this['listenTo'](_0x5b2c79['document'],'clipboardInput',(_0x120da6,_0x2eef27)=>{const _0x3e2687=_0x2eef27['dataTransfer']['getData']('application/ckeditor5-footnotes');_0x2f3ca2=_0x3e2687?JSON['parse'](_0x3e2687):null;}),this['listenTo'](_0x3f64ae,'contentInsertion',(_0x4f910c,_0x17b2e6)=>{if(!_0x2f3ca2)return;const _0x33bff7=_0x17b2e6['sourceEditorId']===this['editor']['id'];_0x33bff7&&'drop'===_0x17b2e6['method']||_0x20fcc2['change'](_0x497503=>{!function(_0x4a9b0c,_0x5aa800){const _0x3e73c6=[];for(const {item:_0x28f695}of _0x4a9b0c['createRangeIn'](_0x5aa800))_0x28f695['is']('element','footnotesDefinitions')&&_0x3e73c6['push'](_0x28f695);for(const _0x38cff1 of _0x3e73c6)_0x4a9b0c['remove'](_0x38cff1);}(_0x497503,_0x17b2e6['content']);let _0xab393f=_0x361536['getFootnotesDefinitionsObjectElement']();if(!_0xab393f){const _0x563acb=_0x20fcc2['document']['selection']['getFirstRange']()['root'];_0xab393f=_0x361536['_insertEmptyFootnotesDefinitionsContainer'](_0x497503,_0x563acb);}const _0x1a3b7c=function(_0x3e21c2,_0x11c8ec,_0x37b071){const _0x4008e9=Object['create'](null);for(const {item:_0x3bdfa0}of _0x3e21c2['createRangeIn'](_0x11c8ec))if(_0x3bdfa0['is']('element','footnoteRef')){const _0x70f8fd=_0x3bdfa0['getAttribute']('footnoteId');if(!_0x37b071(_0x70f8fd))continue;_0x4008e9[_0x70f8fd]||(_0x4008e9[_0x70f8fd]=_0x204d37()),_0x3e21c2['setAttribute']('footnoteId',_0x4008e9[_0x70f8fd],_0x3bdfa0);}return _0x4008e9;}(_0x497503,_0x17b2e6['content'],_0x1f9bef=>!_0x33bff7||null!==_0x361536['getFootnote'](_0x1f9bef));for(const [_0xe65ede,_0x390f01]of Object['entries'](_0x2f3ca2)){const _0x378bd3=_0x1a3b7c[_0xe65ede]||_0xe65ede,_0x51a8c3=_0x497503['createElement']('footnoteDefinition',{'footnoteId':_0x378bd3}),_0x535776=_0x557f8e['data']['htmlProcessor']['toView'](_0x390f01),_0xc05956=_0x557f8e['data']['toModel'](_0x535776,_0x51a8c3);_0x497503['append'](_0xc05956,_0x51a8c3),_0x497503['insert'](_0x51a8c3,_0xab393f,'end');}_0x2f3ca2=null;});});}}class i extends _0x381f4b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'FootnotesUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x360b9c}=this,{componentFactory:_0x4b9634}=_0x360b9c['ui'];_0x4b9634['add']('insertFootnote',v(_0x360b9c,_0x37c695)),_0x4b9634['add']('menuBar:insertFootnote',v(_0x360b9c,_0x528eb8)),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x43dc08=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x466685;for(const _0x561057 in _0x43dc08){const _0x23922c=_0x561057,_0x28c4bb=_0x43dc08[_0x23922c];if('footnotesLicenseKeyValid'==_0x28c4bb||'footnotesLicenseKeyInvalid'==_0x28c4bb||'footnotesLicenseKeyExpired'==_0x28c4bb||'footnotesLicenseKeyDomainLimit'==_0x28c4bb||'footnotesLicenseKeyNotAllowed'==_0x28c4bb||'footnotesLicenseKeyEvaluationLimit'==_0x28c4bb||'footnotesLicenseKeyTrialLimit'==_0x28c4bb||'footnotesLicenseKeyUsageLimit'==_0x28c4bb){delete _0x43dc08[_0x23922c],_0x466685=_0x28c4bb,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'footnotesLicenseKeyInvalid'==_0x466685&&_0x43dc08['_showLicenseError']('invalid'),'footnotesLicenseKeyExpired'==_0x466685&&_0x43dc08['_showLicenseError']('expired'),'footnotesLicenseKeyDomainLimit'==_0x466685&&_0x43dc08['_showLicenseError']('domainLimit'),'footnotesLicenseKeyNotAllowed'==_0x466685&&_0x43dc08['_showLicenseError']('featureNotAllowed','Footnotes'),'footnotesLicenseKeyEvaluationLimit'==_0x466685&&_0x43dc08['_showLicenseError']('evaluationLimit'),'footnotesLicenseKeyTrialLimit'==_0x466685&&_0x43dc08['_showLicenseError']('trialLimit'),'footnotesLicenseKeyUsageLimit'==_0x466685&&_0x43dc08['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}}function v(_0x2e7a28,_0x3da6a7){const _0x103567=_0x2e7a28['commands']['get']('insertFootnote');return _0x3e03ff=>{const {t:t}=_0x3e03ff,_0x2f86c2=new _0x3da6a7(_0x3e03ff),_0x51c7f5=_0x2f86c2 instanceof _0x528eb8;return _0x2f86c2['bind']('isEnabled')['to'](_0x103567,'isEnabled'),_0x2f86c2['set']({'label':t(_0x51c7f5?'Footnote':'Insert\x20footnote'),'icon':_0x5eae8f,'tooltip':!0x0}),_0x2f86c2['on']('execute',()=>{_0x103567['execute'](),_0x2e7a28['editing']['view']['focus']();}),_0x2f86c2;};}class nt extends _0x381f4b{static get['pluginName'](){return'Footnotes';}static get['requires'](){return[r,e,i];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}const H=['decimal','decimal-leading-zero','lower-latin','upper-latin','lower-alpha','upper-alpha','lower-roman','upper-roman'];class S extends _0x180100{['refresh'](){const {editor:_0x7a70dd}=this,_0x10c7d5=_0x7a70dd['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x10c7d5,this['value']=_0x10c7d5?.['getAttribute']('footnotesListStyle')??null;}['execute']({value:_0x522e2a}){const {editor:_0x475392}=this,_0x14c79c=_0x475392['plugins']['get'](c),_0x1988ba=_0x14c79c['getFootnotesDefinitionsObjectElement']();_0x1988ba&&H['includes'](_0x522e2a)&&_0x475392['model']['change'](_0xea9f25=>{_0xea9f25['setAttribute']('footnotesListStyle',_0x522e2a,_0x1988ba),_0x14c79c['_updateFootnotesCounters'](_0xea9f25);});}}class b extends _0x180100{['refresh'](){const {editor:_0x2d9bfd}=this,_0x3d168c=_0x2d9bfd['plugins']['get'](c)['getFootnotesDefinitionsObjectElement']();this['isEnabled']=!!_0x3d168c,this['value']=_0x3d168c?.['getAttribute']('footnotesListStart')??null;}['execute']({value:_0x173c18}){const {editor:_0x3b24e5}=this,_0x7a54dc=_0x3b24e5['plugins']['get'](c),_0x348c18=_0x7a54dc['getFootnotesDefinitionsObjectElement']();_0x348c18&&Number['isInteger'](_0x173c18)&&_0x3b24e5['model']['change'](_0x4d41e6=>{_0x4d41e6['setAttribute']('footnotesListStart',_0x173c18,_0x348c18),_0x7a54dc['_updateFootnotesCounters'](_0x4d41e6);});}}class P extends _0x381f4b{static get['pluginName'](){return'FootnotesPropertiesEditing';}static get['requires'](){return[r,c];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2b1a7b}=this;_0x2b1a7b['config']['define']('footnotes.footnotesProperties.defaultListStyle','decimal'),_0x2b1a7b['config']['define']('footnotes.footnotesProperties.defaultStartIndex',0x1),_0x2b1a7b['commands']['add']('footnotesStyle',new S(_0x2b1a7b)),_0x2b1a7b['commands']['add']('footnotesStart',new b(_0x2b1a7b)),this['_defineSchema'](),this['_defineConverters'](),this['_defineFormatter'](),this['_definePostfixer']();}['_defineSchema'](){const {editor:_0x247fc4}=this,{schema:_0x14efe6}=_0x247fc4['model'];_0x14efe6['extend']('footnotesDefinitions',{'allowAttributes':['footnotesListStyle','footnotesListStart']});}['_defineConverters'](){const {editor:_0x276169}=this,{conversion:_0x2da6b8,model:_0x43819c}=_0x276169,{schema:_0x1c235b}=_0x43819c;_0x2da6b8['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','styles':{'list-style-type':/.+/}},'model':{'key':'footnotesListStyle','value':_0x222e66=>_0x222e66['getStyle']('list-style-type')}}),_0x2da6b8['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','attributes':{'start':/.+/}},'model':{'key':'footnotesListStart','value':_0x957ff3=>{const _0x54a850=_0x957ff3['getAttribute']('start'),_0x292109=Number['parseInt'](_0x54a850,0xa);return Number['isNaN'](_0x292109)?null:_0x292109;}}}),_0x2da6b8['for']('upcast')['attributeToAttribute']({'view':{'name':'ol','attributes':{'type':/.+/}},'model':{'key':'footnotesListStyle','value':_0x5d683f=>({0x1:'decimal','a':'lower-alpha','A':'upper-alpha','i':'lower-roman','I':'upper-roman'}[_0x5d683f['getAttribute']('type')])}}),_0x2da6b8['for']('upcast')['add'](_0x4ac867=>{_0x4ac867['on']('element:ol',(_0x553006,_0x72b0d8,_0x6044bd)=>{const _0x303d8c=_0x72b0d8['modelRange']?.['start']['nodeAfter'];_0x303d8c?.['is']('element','footnotesDefinitions')&&(!_0x303d8c['hasAttribute']('footnotesListStyle')&&_0x1c235b['checkAttribute'](_0x303d8c,'footnotesListStyle')&&_0x6044bd['writer']['setAttribute']('footnotesListStyle','decimal',_0x303d8c),!_0x303d8c['hasAttribute']('footnotesListStart')&&_0x1c235b['checkAttribute'](_0x303d8c,'footnotesListStart')&&_0x6044bd['writer']['setAttribute']('footnotesListStart',0x1,_0x303d8c));},{'priority':'low'});}),_0x2da6b8['for']('dataDowncast')['attributeToAttribute']({'model':{'name':'footnotesDefinitions','key':'footnotesListStart'},'view':_0x2f4944=>0x1===_0x2f4944?null:{'key':'start','value':String(_0x2f4944)}}),_0x2da6b8['for']('dataDowncast')['attributeToAttribute']({'model':{'name':'footnotesDefinitions','key':'footnotesListStyle'},'view':_0x766e2=>'decimal'===_0x766e2?null:{'key':'style','value':{'list-style-type':_0x766e2}}}),_0x2da6b8['for']('editingDowncast')['add'](_0x5d89f9=>{_0x5d89f9['on']('attribute:footnotesListStart:footnotesDefinitions',(_0x35eda7,_0x59fc56,_0x54713b)=>{if(!_0x54713b['consumable']['consume'](_0x59fc56['item'],_0x35eda7['name']))return;const _0x19b941=C(_0x59fc56['item'],_0x54713b['mapper']);null===_0x59fc56['attributeNewValue']||void 0x0===_0x59fc56['attributeNewValue']||0x1===_0x59fc56['attributeNewValue']?_0x54713b['writer']['removeAttribute']('start',_0x19b941):_0x54713b['writer']['setAttribute']('start',String(_0x59fc56['attributeNewValue']),_0x19b941);}),_0x5d89f9['on']('attribute:footnotesListStyle:footnotesDefinitions',(_0x58a02c,_0x47f1e7,_0x511465)=>{if(!_0x511465['consumable']['consume'](_0x47f1e7['item'],_0x58a02c['name']))return;const _0xec5414=C(_0x47f1e7['item'],_0x511465['mapper']);_0x47f1e7['attributeNewValue']&&'decimal'!==_0x47f1e7['attributeNewValue']?_0x511465['writer']['setStyle']('list-style-type',_0x47f1e7['attributeNewValue'],_0xec5414):_0x511465['writer']['removeStyle']('list-style-type',_0xec5414);});});}['_definePostfixer'](){const {editor:_0x27b5e9}=this,{model:_0x399b05}=_0x27b5e9,_0x5e4775=_0x27b5e9['plugins']['get'](c),_0x2b45bd=this['_getDefaultListStyle'](),_0x20e70e=this['_getDefaultStartIndex']();_0x399b05['document']['registerPostFixer'](_0x431aa6=>{const _0x25476f=_0x399b05['document']['differ']['getChanges']();let _0x202f6f=!0x1;for(const _0x4ef49f of _0x25476f){if('insert'!==_0x4ef49f['type']||'$text'===_0x4ef49f['name'])continue;const _0x56ffd8=_0x399b05['createRangeOn'](_0x4ef49f['position']['nodeAfter']);for(const _0x2e57cd of _0x56ffd8['getItems']())_0x2e57cd['is']('element','footnotesDefinitions')&&(_0x2e57cd['hasAttribute']('footnotesListStart')||(_0x431aa6['setAttribute']('footnotesListStart',_0x20e70e,_0x2e57cd),_0x202f6f=!0x0),_0x2e57cd['hasAttribute']('footnotesListStyle')||(_0x431aa6['setAttribute']('footnotesListStyle',_0x2b45bd,_0x2e57cd),_0x202f6f=!0x0));}return _0x202f6f&&_0x5e4775['_updateFootnotesCounters'](_0x431aa6),_0x202f6f;});}['_defineFormatter'](){const {editor:_0x1946e1}=this;_0x1946e1['plugins']['get'](c)['setFootnoteFormatter'](_0x5d1d26=>this['_formatFootnoteListValue'](_0x5d1d26));}['_getDefaultListStyle'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultListStyle');}['_getDefaultStartIndex'](){return this['editor']['config']['get']('footnotes.footnotesProperties.defaultStartIndex');}['_formatFootnoteListValue']({container:_0x4c95b8,value:_0x5c895f,digits:_0x3079c4}){const _0x48332f=_0x4c95b8['getAttribute']('footnotesListStyle'),_0x15a798=_0x4c95b8['getAttribute']('footnotesListStart'),_0x368d08=Math['floor'](_0x5c895f)+(_0x15a798-0x1);switch(_0x48332f){case'decimal':default:return String(_0x368d08);case'decimal-leading-zero':return function(_0x9b0b00,_0x8f64c0){return String(_0x9b0b00)['padStart'](_0x8f64c0,'0');}(_0x368d08,Math['max'](0x2,_0x3079c4));case'lower-alpha':case'lower-latin':return M(_0x368d08,!0x1);case'upper-alpha':case'upper-latin':return M(_0x368d08,!0x0);case'lower-roman':return A(_0x368d08,!0x1);case'upper-roman':return A(_0x368d08,!0x0);}}}function C(_0x159a5a,_0x8d62fa){const _0x4e14e8=_0x8d62fa['toViewElement'](_0x159a5a);return Array['from'](_0x4e14e8['getChildren']())['find'](_0x2ef5a5=>_0x2ef5a5['is']('element','ol'));}function M(_0x461b4e,_0x2e9a33){let _0x267e4='',_0x58c182=_0x461b4e;for(;_0x58c182>0x0;){const _0x385dca=(_0x58c182-0x1)%0x1a;_0x267e4=String['fromCharCode'](0x61+_0x385dca)+_0x267e4,_0x58c182=Math['floor']((_0x58c182-0x1)/0x1a);}return _0x2e9a33?_0x267e4['toUpperCase']():_0x267e4;}const X=[{'value':0x3e8,'numeral':'M'},{'value':0x384,'numeral':'CM'},{'value':0x1f4,'numeral':'D'},{'value':0x190,'numeral':'CD'},{'value':0x64,'numeral':'C'},{'value':0x5a,'numeral':'XC'},{'value':0x32,'numeral':'L'},{'value':0x28,'numeral':'XL'},{'value':0xa,'numeral':'X'},{'value':0x9,'numeral':'IX'},{'value':0x5,'numeral':'V'},{'value':0x4,'numeral':'IV'},{'value':0x1,'numeral':'I'}];function A(_0x3e126d,_0x491b2a){let _0x56ce57='',_0xdbdb19=_0x3e126d;for(const {value:_0x6c606f,numeral:_0x3082f8}of X)for(;_0xdbdb19>=_0x6c606f;)_0x56ce57+=_0x3082f8,_0xdbdb19-=_0x6c606f;return _0x491b2a?_0x56ce57:_0x56ce57['toLowerCase']();}class R extends _0xf9108b{['children'];['stylesView']=null;['additionalProperties']=null;['startIndexFieldView']=null;['focusTracker']=new it();['keystrokes']=new et();['focusables']=new _0x44558e();['focusCycler'];constructor(_0x5b23a1,{styleButtonViews:_0x32830f,styleGridAriaLabel:_0x229dff}){super(_0x5b23a1),(this['focusCycler']=new _0x1e2e91({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['children']=this['createCollection'](),this['stylesView']=this['_appendStylesView'](_0x32830f,_0x229dff),[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 _0x254d95 of this['stylesView']['children'])this['stylesView']['focusTracker']['add'](_0x254d95['element']);_0x34cdf8({'keystrokeHandler':this['stylesView']['keystrokes'],'focusTracker':this['stylesView']['focusTracker'],'gridItems':this['stylesView']['children'],'numberOfColumns':()=>ot['window']['getComputedStyle'](this['stylesView']['element'])['getPropertyValue']('grid-template-columns')['split']('\x20')['length'],'uiLanguageDirection':this['locale']&&this['locale']['uiLanguageDirection']});}if(this['startIndexFieldView']){this['focusables']['add'](this['startIndexFieldView']),this['focusTracker']['add'](this['startIndexFieldView']['element']);const _0x29b79f=_0x472027=>_0x472027['stopPropagation']();this['keystrokes']['set']('arrowright',_0x29b79f),this['keystrokes']['set']('arrowleft',_0x29b79f),this['keystrokes']['set']('arrowup',_0x29b79f),this['keystrokes']['set']('arrowdown',_0x29b79f);}this['keystrokes']['listenTo'](this['element']);}['focus'](){this['focusCycler']['focusFirst']();}['focusLast'](){this['focusCycler']['focusLast']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy'](),this['keystrokes']['destroy']();}['_appendStylesView'](_0x409997,_0x45dc02){const _0x19800a=new _0xf9108b(this['locale']);return _0x19800a['children']=_0x19800a['createCollection'](),_0x19800a['children']['addMany'](_0x409997),_0x19800a['setTemplate']({'tag':'div','attributes':{'aria-label':_0x45dc02,'class':['ck','ck-footnotes-definitions-styles-list']},'children':_0x19800a['children']}),_0x19800a['children']['delegate']('execute')['to'](this),_0x19800a['focus']=function(){for(const _0x8e7a10 of this['children'])if(_0x8e7a10 instanceof _0x37c695&&_0x8e7a10['isOn'])return void _0x8e7a10['focus']();this['children']['first']['focus']();},_0x19800a['focusTracker']=new it(),_0x19800a['keystrokes']=new et(),_0x19800a['render'](),_0x19800a['keystrokes']['listenTo'](_0x19800a['element']),this['children']['add'](_0x19800a),_0x19800a;}['_appendAdditionalPropertiesCollapsibleView'](){const {t:t}=this['locale'],_0x4132a3=this['_createStartIndexPropertyView'](),_0x3dcaa6=[_0x4132a3],_0x1b689d=new _0x4a1638(this['locale'],_0x3dcaa6);return _0x1b689d['set']({'label':t('Footnotes\x20properties'),'isCollapsed':!0x0}),_0x1b689d['buttonView']['bind']('isEnabled')['toMany'](_0x3dcaa6,'isEnabled',(..._0x245c1b)=>_0x245c1b['some'](_0x207a10=>_0x207a10)),_0x1b689d['buttonView']['on']('change:isEnabled',(_0x114625,_0x351e41,_0x4e9166)=>{_0x4e9166||(_0x1b689d['isCollapsed']=!0x0);}),this['children']['add'](_0x1b689d),[_0x4132a3,_0x1b689d];}['_createStartIndexPropertyView'](){const {t:t}=this['locale'],_0x27fedd=new tt(this['locale'],st);return _0x27fedd['set']({'label':t('Footnotes\x20start\x20at'),'class':'ck-footnotes-definitions-properties__start-index'}),_0x27fedd['fieldView']['set']({'min':0x0,'step':0x1,'value':0x1,'inputMode':'numeric'}),_0x27fedd['fieldView']['on']('input',()=>{const _0x8bab73=_0x27fedd['fieldView']['element'],_0x18db03=_0x8bab73['valueAsNumber'];Number['isNaN'](_0x18db03)?_0x27fedd['errorText']=t('Invalid\x20footnotes\x20start\x20index\x20value.'):_0x8bab73['checkValidity']()?this['fire']('footnotesListStart',{'startIndex':_0x18db03}):_0x27fedd['errorText']=t('Footnotes\x20start\x20index\x20must\x20be\x20greater\x20than\x200.');}),_0x27fedd;}}class j extends _0x381f4b{static get['pluginName'](){return'FootnotesPropertiesUI';}static get['requires'](){return[_0x45a7bd,_0x289e52];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2b9db4}=this,{componentFactory:_0x3bf2e2}=_0x2b9db4['ui'];_0x2b9db4['config']['define']('footnotes.footnotesProperties.toolbar',['footnotesStyle']),_0x3bf2e2['add']('footnotesStyle',function(_0x4521c5){return _0x3587b2=>{const {t:t}=_0x3587b2,_0x4f1e71=_0x4521c5['commands']['get']('footnotesStyle'),_0x227459=_0x4519ce(_0x3587b2),{buttonView:_0x5971d1}=_0x227459;return _0x227459['class']='ck-footnotes-styles-dropdown',_0x227459['bind']('isEnabled')['to'](_0x4f1e71,'isEnabled'),_0x5971d1['set']({'label':t('Footnotes\x20style'),'icon':_0x5eae8f,'tooltip':!0x0}),_0x227459['once']('change:isOpen',()=>{const _0x149a72=function({editor:_0x5c07ee,dropdownView:_0x417393}){const {t:t}=_0x5c07ee['locale'],_0x5786dd=t('Footnotes\x20definitions\x20styles'),_0x7ee6a8=function(_0x485c48){const t=_0x485c48['locale']['t'],_0x5a28e7=[{'label':t('Toggle\x20the\x20decimal\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes'),'style':'decimal','icon':_0x437365},{'label':t('Toggle\x20the\x20decimal\x20with\x20leading\x20zero\x20footnotes\x20style'),'tooltip':t('Decimal\x20footnotes\x20with\x20leading\x20zero'),'style':'decimal-leading-zero','icon':_0x4025d5},{'label':t('Toggle\x20the\x20lower–roman\x20footnotes\x20style'),'tooltip':t('Lower–roman\x20footnotes'),'style':'lower-roman','icon':_0x50417e},{'label':t('Toggle\x20the\x20upper–roman\x20footnotes\x20style'),'tooltip':t('Upper-roman\x20footnotes'),'style':'upper-roman','icon':_0x18d6e3},{'label':t('Toggle\x20the\x20lower–latin\x20footnotes\x20style'),'tooltip':t('Lower-latin\x20footnotes'),'style':'lower-latin','icon':_0x2868d1},{'label':t('Toggle\x20the\x20upper–latin\x20footnotes\x20style'),'tooltip':t('Upper-latin\x20footnotes'),'style':'upper-latin','icon':_0x317054}];return _0x5a28e7['map'](function(_0x196249){const _0x2122e2=_0x196249['locale'];return({label:_0x5391fd,icon:_0x2d9274,tooltip:_0x237731,style:_0x4115c2})=>{const _0xf21f7b=_0x196249['commands']['get']('footnotesStyle'),_0x55b9ff=new _0x37c695(_0x2122e2);return _0x55b9ff['set']({'label':_0x5391fd,'icon':_0x2d9274,'tooltip':_0x237731}),_0x55b9ff['bind']('isOn')['to'](_0xf21f7b,'value',_0xf8a515=>_0xf8a515===_0x4115c2),_0x55b9ff['bind']('isEnabled')['to'](_0xf21f7b,'isEnabled'),_0x55b9ff['on']('execute',()=>{_0x196249['execute']('footnotesStyle',{'value':_0x4115c2}),_0x196249['editing']['view']['focus']();}),_0x55b9ff;};}(_0x485c48));}(_0x5c07ee),_0x324460=new R(_0x5c07ee['locale'],{'styleGridAriaLabel':_0x5786dd,'styleButtonViews':_0x7ee6a8});return _0x324460['delegate']('execute')['to'](_0x417393),_0x324460['on']('footnotesListStart',(_0xbe3f1e,_0x5e4e5e)=>{_0x5c07ee['execute']('footnotesStart',{'value':_0x5e4e5e['startIndex']});}),_0x324460;}({'editor':_0x4521c5,'dropdownView':_0x227459});_0x227459['panelView']['children']['add'](_0x149a72);}),_0x227459;};}(_0x2b9db4));}['afterInit'](){const {editor:_0x215b26}=this,{t:t}=_0x215b26['locale'],_0x3f0c31=_0x215b26['plugins']['get'](_0x289e52),{defaultPositions:_0x46ee3b}=_0x33377f;_0x3f0c31['register']('footnotesDefinitions',{'ariaLabel':t('Footnotes\x20definitions\x20toolbar'),'items':_0x215b26['config']['get']('footnotes.footnotesProperties.toolbar'),'balloonClassName':'ck-footnotes-style-balloon\x20ck-toolbar-container','getRelatedElement':_0x11475f=>{let _0x4edd98=_0x11475f['getFirstPosition']()?.['parent'];return _0x4edd98?.['is']('$text')&&(_0x4edd98=_0x4edd98['parent']),_0x4edd98?.['is']('element')?_0x4edd98['findAncestor']($):null;},'positions':[_0x46ee3b['southArrowNorth'],_0x46ee3b['southArrowNorthMiddleWest'],_0x46ee3b['southArrowNorthMiddleEast'],_0x46ee3b['southArrowNorthWest'],_0x46ee3b['southArrowNorthEast'],_0x46ee3b['northArrowSouth'],_0x46ee3b['northArrowSouthMiddleWest'],_0x46ee3b['northArrowSouthMiddleEast'],_0x46ee3b['northArrowSouthWest'],_0x46ee3b['northArrowSouthEast'],_0x46ee3b['viewportStickyNorth']]});}}class rt extends _0x381f4b{static get['pluginName'](){return'FootnotesProperties';}static get['requires'](){return[P,j];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{nt as Footnotes,e as FootnotesClipboard,r as FootnotesEditing,rt as FootnotesProperties,P as FootnotesPropertiesEditing,j as FootnotesPropertiesUI,b as FootnotesStartCommand,S as FootnotesStyleCommand,c as FootnotesTracker,i as FootnotesUI,w as InsertFootnoteCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-footnotes",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20251019.0",
|
|
4
4
|
"description": "The footnotes feature for CKEditor 5.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ckeditor",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"type": "module",
|
|
24
24
|
"main": "src/index.js",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@ckeditor/ckeditor5-core": "0.0.0-nightly-
|
|
27
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
28
|
-
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-
|
|
29
|
-
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-
|
|
30
|
-
"@ckeditor/ckeditor5-widget": "0.0.0-nightly-
|
|
31
|
-
"@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-
|
|
32
|
-
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-
|
|
33
|
-
"ckeditor5": "0.0.0-nightly-
|
|
26
|
+
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20251019.0",
|
|
27
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20251019.0",
|
|
28
|
+
"@ckeditor/ckeditor5-engine": "0.0.0-nightly-20251019.0",
|
|
29
|
+
"@ckeditor/ckeditor5-icons": "0.0.0-nightly-20251019.0",
|
|
30
|
+
"@ckeditor/ckeditor5-widget": "0.0.0-nightly-20251019.0",
|
|
31
|
+
"@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-20251019.0",
|
|
32
|
+
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20251019.0",
|
|
33
|
+
"ckeditor5": "0.0.0-nightly-20251019.0"
|
|
34
34
|
},
|
|
35
35
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
36
36
|
"author": "CKSource (http://cksource.com/)",
|
package/src/footnotesediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x3dc058}from'ckeditor5/src/core.js';import{isWidget as _0x11ce06,toWidget as _0x30bfde,toWidgetEditable as _0x56c70c}from'ckeditor5/src/widget.js';import{uid as _0x5641bb}from'ckeditor5/src/utils.js';import{PointerObserver as _0x42e9ab,ClickObserver as _0x45980d}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x477d67}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x21aa01}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x3dc058{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x477d67];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x23a404}=this;_0x23a404['config']['define']('footnotes.multiBlock',!0x0),_0x23a404['commands']['add']('insertFootnote',new _0x21aa01(_0x23a404)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x1f5409){const _0x5744a9=_0x102ca8([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x38f853=0x47a28506,_0x3640c4=0x47a5f38e^_0x38f853,_0x40d640=window[_0x102ca8([0x44,0x61,0x74,0x65])][_0x102ca8([0x6e,0x6f,0x77])](),_0x1f45e6=_0x1f5409[_0x102ca8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2141fc=new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa0546b=>{_0x1f45e6[_0x102ca8([0x6f,0x6e,0x63,0x65])](_0x102ca8([0x72,0x65,0x61,0x64,0x79]),_0xa0546b);}),_0x1168ac={[_0x102ca8([0x6b,0x74,0x79])]:_0x102ca8([0x45,0x43]),[_0x102ca8([0x75,0x73,0x65])]:_0x102ca8([0x73,0x69,0x67]),[_0x102ca8([0x63,0x72,0x76])]:_0x102ca8([0x50,0x2d,0x32,0x35,0x36]),[_0x102ca8([0x78])]:_0x102ca8([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x102ca8([0x79])]:_0x102ca8([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x102ca8([0x61,0x6c,0x67])]:_0x102ca8([0x45,0x53,0x32,0x35,0x36])},_0x5e7f2c=_0x1f45e6[_0x102ca8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x102ca8([0x67,0x65,0x74])](_0x102ca8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4b2afb(){let _0x3da731,_0x244baa=null,_0x34ad67=null;try{if(_0x5e7f2c==_0x102ca8([0x47,0x50,0x4c]))return _0x102ca8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3da731=_0x426024(),!_0x3da731)return _0x102ca8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3da731[_0x102ca8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x34ad67=_0x208e5f(_0x3da731[_0x102ca8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3da731[_0x102ca8([0x6a,0x74,0x69])])),await _0x163b34()?_0x448bab()?_0x10a718()?_0x102ca8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x406de8()?(_0x3da731[_0x102ca8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x102ca8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x244baa=_0x5ef342(_0x102ca8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x3da731[_0x102ca8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x102ca8([0x74,0x72,0x69,0x61,0x6c])&&(_0x244baa=_0x5ef342(_0x102ca8([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x335071()):_0x102ca8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x102ca8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x102ca8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x102ca8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x10a718(){const _0x37dc39=[_0x102ca8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x102ca8([0x74,0x72,0x69,0x61,0x6c])][_0x102ca8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3da731[_0x102ca8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x40d640/0x3e8:0xe10*_0x3640c4;return _0x3da731[_0x102ca8([0x65,0x78,0x70])]<_0x37dc39;}function _0x448bab(){const _0x504142=_0x3da731[_0x102ca8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x504142&&(!!_0x504142[_0x102ca8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x102ca8([0x2a]))||!!_0x504142[_0x102ca8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x102ca8([0x46,0x4f,0x4f])));}function _0x406de8(){const _0x272153=_0x3da731[_0x102ca8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x272153||0x0==_0x272153[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2cc994}=new URL(window[_0x102ca8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x272153[_0x102ca8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cc994))return!0x0;const _0x2cfd33=_0x2cc994[_0x102ca8([0x73,0x70,0x6c,0x69,0x74])](_0x102ca8([0x2e]));return _0x272153[_0x102ca8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32348c=>_0x32348c[_0x102ca8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x102ca8([0x2a])))[_0x102ca8([0x6d,0x61,0x70])](_0x27d575=>_0x27d575[_0x102ca8([0x73,0x70,0x6c,0x69,0x74])](_0x102ca8([0x2e])))[_0x102ca8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xee86fd=>_0xee86fd[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2cfd33[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x102ca8([0x6d,0x61,0x70])](_0xf85efd=>Array(_0x2cfd33[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xf85efd[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x102ca8([0x66,0x69,0x6c,0x6c])](_0xf85efd[0x0]===_0x102ca8([0x2a])?_0x102ca8([0x2a]):'')[_0x102ca8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xf85efd))[_0x102ca8([0x73,0x6f,0x6d,0x65])](_0x11c192=>_0x2cfd33[_0x102ca8([0x65,0x76,0x65,0x72,0x79])]((_0x5abed7,_0x249d26)=>_0x11c192[_0x249d26]===_0x5abed7||_0x11c192[_0x249d26]===_0x102ca8([0x2a])));}function _0x335071(){return _0x244baa&&_0x34ad67?new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x55162e,_0xd7e9ea)=>{_0x244baa[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x55162e,_0xd7e9ea),_0x34ad67[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x3e099c=>{_0x3e099c!=_0x102ca8([0x56,0x61,0x6c,0x69,0x64])&&_0x55162e(_0x3e099c);},_0xd7e9ea);}):_0x244baa||_0x34ad67||_0x102ca8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x208e5f(_0x2afd9e,_0x456240){return new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x44251c=>{if(_0x1574eb())return _0x44251c(_0x102ca8([0x56,0x61,0x6c,0x69,0x64]));_0x15ba0e(),_0x1f45e6[_0x102ca8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x102ca8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1aa3c0=!0x1;const _0xdc49f2=_0x5641bb();function _0x35ce7b(_0x3e8342){return!!_0x3e8342&&(typeof _0x3e8342===_0x102ca8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3e8342===_0x102ca8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3e8342[_0x102ca8([0x74,0x68,0x65,0x6e])]===_0x102ca8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3e8342[_0x102ca8([0x63,0x61,0x74,0x63,0x68])]===_0x102ca8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4b42b5(_0x5c4d23){_0x448233(_0x5c4d23)[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x39a82b=>{if(!_0x39a82b||_0x39a82b[_0x102ca8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x102ca8([0x6f,0x6b]))return _0x102ca8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x170d5c(_0x2c1e56(_0xdc49f2+_0x456240))!=_0x39a82b[_0x102ca8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x102ca8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x102ca8([0x56,0x61,0x6c,0x69,0x64]);})[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x394b43=>(_0x42d4f1(),_0x394b43),()=>{const _0x2b547e=_0x36e290();return null==_0x2b547e?(_0x42d4f1(),_0x102ca8([0x56,0x61,0x6c,0x69,0x64])):_0x102ca8(_0x40d640-_0x2b547e>(0x63ae0106^_0x38f853)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x44251c)[_0x102ca8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x44251c(_0x102ca8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x13f58e=0x47946b86^_0x38f853;function _0x42d4f1(){const _0x3f32c9=_0x102ca8([0x6c,0x6c,0x63,0x74,0x2d])+_0x170d5c(_0x2c1e56(_0x2afd9e)),_0x466ca=_0x534d41(_0x170d5c(window[_0x102ca8([0x4d,0x61,0x74,0x68])][_0x102ca8([0x63,0x65,0x69,0x6c])](_0x40d640/_0x13f58e)));window[_0x102ca8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x102ca8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f32c9,_0x466ca);}function _0x36e290(){const _0x2eb3ab=_0x102ca8([0x6c,0x6c,0x63,0x74,0x2d])+_0x170d5c(_0x2c1e56(_0x2afd9e)),_0x2185e3=window[_0x102ca8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x102ca8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2eb3ab);return _0x2185e3?window[_0x102ca8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x534d41(_0x2185e3),0x10)*_0x13f58e:null;}function _0x448233(_0x3d8f70){return new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x430f68,_0x3f8fca)=>{_0x3d8f70[_0x102ca8([0x74,0x68,0x65,0x6e])](_0x430f68,_0x3f8fca),window[_0x102ca8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3f8fca,0x47a351c6^_0x38f853);});}}_0x1f45e6[_0x102ca8([0x6f,0x6e])](_0x102ca8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x54ddfe,_0x2a370f)=>{if(_0x2a370f[0x0]!=_0x2afd9e)return _0x44251c(_0x102ca8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2a370f[0x1]={..._0x2a370f[0x1],[_0x102ca8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xdc49f2};},{[_0x102ca8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x102ca8([0x68,0x69,0x67,0x68])}),_0x1f45e6[_0x102ca8([0x6f,0x6e])](_0x102ca8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4c58f4=>{_0x35ce7b(_0x4c58f4[_0x102ca8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1aa3c0=!0x0,_0x4b42b5(_0x4c58f4[_0x102ca8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x102ca8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x102ca8([0x6c,0x6f,0x77])}),_0x2141fc[_0x102ca8([0x74,0x68,0x65,0x6e])](()=>{_0x1aa3c0||_0x44251c(_0x102ca8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1574eb(){return _0x1f45e6[_0x102ca8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x102ca8([0x76,0x69,0x65,0x77])][_0x102ca8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x102ca8([0x61,0x75,0x74,0x6f]);}function _0x15ba0e(){_0x1f45e6[_0x102ca8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x102ca8([0x76,0x69,0x65,0x77])][_0x102ca8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x102ca8([0x61,0x75,0x74,0x6f]);}}function _0x5ef342(_0x4e3a31){const _0x5526a1=[new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x491689=>setTimeout(_0x491689,0x47abbbca^_0x38f853)),_0x2141fc[_0x102ca8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2571b9=>{let _0x5eecb2=0x0;_0x1f45e6[_0x102ca8([0x6d,0x6f,0x64,0x65,0x6c])][_0x102ca8([0x6f,0x6e])](_0x102ca8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x20f73d,_0x489b74)=>{_0x489b74[0x0][_0x102ca8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5eecb2++,_0x5eecb2==(0x47a284fe^_0x38f853)&&(_0x2571b9(),_0x20f73d[_0x102ca8([0x6f,0x66,0x66])]());});}))];return window[_0x102ca8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x102ca8([0x72,0x61,0x63,0x65])](_0x5526a1)[_0x102ca8([0x74,0x68,0x65,0x6e])](()=>_0x4e3a31);}async function _0x22dcd4(){await _0x2141fc,_0x1f45e6[_0x102ca8([0x6d,0x6f,0x64,0x65,0x6c])][_0x102ca8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x249850,_0x1f45e6[_0x102ca8([0x6d,0x6f,0x64,0x65,0x6c])][_0x102ca8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x249850,_0x1f45e6[_0x102ca8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x102ca8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3f33b8(_0x2e530f){const _0x459bf3=_0x3cb49a();_0x1f45e6[_0x459bf3]=_0x102ca8([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2e530f,_0x2e530f!=_0x102ca8([0x56,0x61,0x6c,0x69,0x64])&&_0x22dcd4();}function _0x3cb49a(){const _0xedbf=window[_0x102ca8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x102ca8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x102ca8([0x6e,0x6f,0x77])]())[_0x102ca8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x102ca8([0x2e]),'');let _0xcce80=_0x102ca8([0x75]);for(let _0x109282=0x0;_0x109282<_0xedbf[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x109282+=0x2){let _0x2f2185=window[_0x102ca8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xedbf[_0x102ca8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x109282,_0x109282+0x2));_0x2f2185>=_0x5744a9[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2f2185-=_0x5744a9[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xcce80+=_0x5744a9[_0x2f2185];}return _0xcce80;}function _0x426024(){const _0x156f78=_0x5e7f2c[_0x102ca8([0x73,0x70,0x6c,0x69,0x74])](_0x102ca8([0x2e]));if(0x3!=_0x156f78[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x302cbb(_0x156f78[0x1]);function _0x302cbb(_0x1afba5){const _0x2e692a=_0x28c232(_0x1afba5);return _0x2e692a&&_0x102ba3()?_0x2e692a:null;function _0x102ba3(){const _0x53a7c9=_0x2e692a[_0x102ca8([0x6a,0x74,0x69])],_0x6123e=window[_0x102ca8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x53a7c9[_0x102ca8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x53a7c9[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x287517={..._0x2e692a,[_0x102ca8([0x6a,0x74,0x69])]:_0x53a7c9[_0x102ca8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x53a7c9[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x287517[_0x102ca8([0x76,0x63])],_0x2c1e56(_0x287517)==_0x6123e;}}}async function _0x163b34(){let _0x3d0546=!0x0;try{const _0x3130fe=_0x5e7f2c[_0x102ca8([0x73,0x70,0x6c,0x69,0x74])](_0x102ca8([0x2e])),[_0x31eb1b,_0x248bd8,_0x5b1405]=_0x3130fe;return _0x52b901(_0x31eb1b),await _0x2a993d(_0x31eb1b,_0x248bd8,_0x5b1405),_0x3d0546;}catch{return!0x1;}function _0x52b901(_0x258d23){const _0x4d6272=_0x28c232(_0x258d23);_0x4d6272&&_0x4d6272[_0x102ca8([0x61,0x6c,0x67])]==_0x102ca8([0x45,0x53,0x32,0x35,0x36])||(_0x3d0546=!0x1);}async function _0x2a993d(_0x5a3ff0,_0x5455a3,_0xaeaeb4){const _0xc61209=window[_0x102ca8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x102ca8([0x66,0x72,0x6f,0x6d])](_0x3fe880(_0xaeaeb4),_0x4d70d=>_0x4d70d[_0x102ca8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3acc22=new window[(_0x102ca8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x102ca8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5a3ff0+_0x102ca8([0x2e])+_0x5455a3),_0x126d65=window[_0x102ca8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x102ca8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x126d65)return;const _0x3221cc=await _0x126d65[_0x102ca8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x102ca8([0x6a,0x77,0x6b]),_0x1168ac,{[_0x102ca8([0x6e,0x61,0x6d,0x65])]:_0x102ca8([0x45,0x43,0x44,0x53,0x41]),[_0x102ca8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x102ca8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x102ca8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x126d65[_0x102ca8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x102ca8([0x6e,0x61,0x6d,0x65])]:_0x102ca8([0x45,0x43,0x44,0x53,0x41]),[_0x102ca8([0x68,0x61,0x73,0x68])]:{[_0x102ca8([0x6e,0x61,0x6d,0x65])]:_0x102ca8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3221cc,_0xc61209,_0x3acc22)||(_0x3d0546=!0x1);}}function _0x28c232(_0x317a82){return _0x317a82[_0x102ca8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x102ca8([0x65,0x79]))?JSON[_0x102ca8([0x70,0x61,0x72,0x73,0x65])](_0x3fe880(_0x317a82)):null;}function _0x3fe880(_0x5ba3e8){return window[_0x102ca8([0x61,0x74,0x6f,0x62])](_0x5ba3e8[_0x102ca8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x102ca8([0x2b]))[_0x102ca8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x102ca8([0x2f])));}function _0x2c1e56(_0x401bfd){let _0x46ee63=0x1505;function _0x166d9d(_0x44da0c){for(let _0x98f55e=0x0;_0x98f55e<_0x44da0c[_0x102ca8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x98f55e++){const _0x1a8fa7=_0x44da0c[_0x102ca8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x98f55e);_0x46ee63=(_0x46ee63<<0x5)+_0x46ee63+_0x1a8fa7,_0x46ee63&=_0x46ee63;}}function _0x315211(_0x75bd6e){Array[_0x102ca8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x75bd6e)?_0x75bd6e[_0x102ca8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x315211):_0x75bd6e&&typeof _0x75bd6e==_0x102ca8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x102ca8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x75bd6e)[_0x102ca8([0x73,0x6f,0x72,0x74])]()[_0x102ca8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3c34b4,_0x1a961f])=>{_0x166d9d(_0x3c34b4),_0x315211(_0x1a961f);}):_0x166d9d(window[_0x102ca8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x75bd6e));}return _0x315211(_0x401bfd),_0x46ee63>>>0x0;}function _0x170d5c(_0x38f2a4){return _0x38f2a4[_0x102ca8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x102ca8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x102ca8([0x30]));}function _0x534d41(_0x57a704){return _0x57a704[_0x102ca8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x102ca8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x102ca8([0x6a,0x6f,0x69,0x6e])]('');}function _0x249850(){}function _0x102ca8(_0x5da37f){return _0x5da37f['map'](_0x467037=>String['fromCharCode'](_0x467037))['join']('');}_0x3f33b8(await _0x4b2afb());}(this);}['_moveSelectionToFootnoteDefinition'](_0x5cc489){const {plugins:_0x3aaaad,editing:_0x29af3f,model:_0x2d25f1}=this['editor'],_0x55a69c=_0x3aaaad['get'](_0x477d67)['getFootnote'](_0x5cc489);return!!_0x55a69c&&(_0x2d25f1['change'](_0x291e4e=>{_0x291e4e['setSelection'](_0x291e4e['createPositionAt'](_0x55a69c['definition'],'end'));}),_0x29af3f['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x49c3d8){const {plugins:_0x4c3a12,editing:_0x35428b,model:_0x256a1d}=this['editor'],_0x5ca5b8=_0x4c3a12['get'](_0x477d67)['getFootnote'](_0x49c3d8);return!!_0x5ca5b8&&(_0x256a1d['change'](_0x315555=>{_0x315555['setSelection'](_0x5ca5b8['reference'],'on');}),_0x35428b['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x46a330}=this['editor']['model'],_0xcb0ab8=this['editor']['config']['get']('footnotes.multiBlock');_0x46a330['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x46a330['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x46a330['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0xcb0ab8?_0x46a330['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x46a330['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x46a330['addChildCheck'](_0x26cf0b=>{for(const _0x58dd74 of _0x26cf0b)if('footnoteDefinition'===_0x58dd74['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x2a719e}=this,{conversion:_0x1c16dd,editing:_0x8f1fe4}=_0x2a719e,{t:t}=_0x2a719e['locale'];_0x1c16dd['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x2902ec,{writer:_0x528211,consumable:_0x83fa1b})=>{const _0x42c0e1=_0x2902ec['getChild'](0x0);if(!_0x42c0e1||!_0x42c0e1['is']('element','a'))return null;const _0x2329ff=_0x42c0e1['getAttribute']('href')||'';if(!_0x2329ff['startsWith']('#'))return null;const _0xf703dd=_0x2329ff['replace'](/^#/,'');if(!_0xf703dd)return null;_0x83fa1b['consume'](_0x42c0e1,{'name':!0x0,'attributes':['href']});for(const {item:_0x4583da}of _0x8f1fe4['view']['createRangeIn'](_0x42c0e1))_0x4583da['is']('$textProxy')?_0x83fa1b['consume'](_0x4583da['textNode'],{'name':!0x0}):_0x4583da['is']('element')&&_0x83fa1b['consume'](_0x4583da,{'name':!0x0});return _0x528211['createElement']('footnoteRef',{'footnoteId':_0xf703dd});}}),_0x1c16dd['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x8a0e47,{writer:_0x353f7e})=>g(_0x8a0e47,_0x353f7e)}),_0x1c16dd['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0xe20da1,{writer:_0x109d8d})=>{const _0x1fa574=_0xe20da1['getAttribute']('footnoteCounter');return _0x30bfde(g(_0xe20da1,_0x109d8d),_0x109d8d,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x1fa574)});}});}['_defineDefinitionsConverters'](){const {editor:_0x3d1134}=this,{t:t}=_0x3d1134['locale'],{conversion:_0x5991bd}=_0x3d1134;_0x5991bd['for']('upcast')['elementToElement']({'view':{'name':'ol','classes':['footnotes']},'model':'footnotesDefinitions','converterPriority':'high'}),_0x5991bd['for']('dataDowncast')['elementToElement']({'model':'footnotesDefinitions','view':{'name':'ol','classes':['footnotes']}}),_0x5991bd['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x16e2e2,{writer:_0x5934de})=>{const _0x44bb8a=_0x5934de['createContainerElement']('div',{'class':'footnotes-wrapper','data-footnotes-list-label':t('Footnotes')},_0x5934de['createContainerElement']('ol',{'class':'footnotes'},_0x5934de['createSlot']())),_0x5c2401=_0x30bfde(_0x44bb8a,_0x5934de,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x5934de['setCustomProperty']('footnotesDefinitions',!0x0,_0x5c2401),_0x5c2401;}});}['_defineDefinitionConverters'](){const {editor:_0x53cd94}=this,{conversion:_0x383dbc,locale:_0x3b0606}=_0x53cd94,_0x34cf7c=_0x53cd94['config']['get']('footnotes.multiBlock');_0x383dbc['for']('upcast')['add'](_0x454516=>{_0x454516['on']('element:li',(_0x1532c6,_0x445f18,_0x3f3400)=>{const _0x2277ea=_0x445f18['viewItem'];if(!_0x2277ea['hasClass']('footnote-definition')||!_0x2277ea['getAttribute']('id'))return;const _0x2bda75=_0x2277ea['parent'];if(!_0x2bda75['is']('element','ol')||!_0x2bda75['hasClass']('footnotes'))return;if(!_0x3f3400['consumable']['test'](_0x2277ea,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x155873=_0x3f3400['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x2277ea['getAttribute']('id')});if(!_0x3f3400['safeInsert'](_0x155873,_0x445f18['modelCursor']))return;_0x3f3400['consumable']['consume'](_0x2277ea,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x4e42da=Array['from'](_0x2277ea['getChildren']())['find'](_0x39e8c3=>_0x39e8c3['is']('element')&&_0x39e8c3['hasClass']('footnote-content'));for(const _0x18fbcb of _0x2277ea['getChildren']())_0x18fbcb['is']('element')&&(_0x3f3400['consumable']['consume'](_0x18fbcb,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0x3f3400['consumable']['consume'](_0x18fbcb,{'name':!0x0,'classes':'footnote-content'}));if(_0x4e42da){if(_0x34cf7c)_0x3f3400['convertChildren'](_0x4e42da,_0x155873);else{const _0x184015=_0x3f3400['writer']['createElement']('footnoteInlineContent');_0x3f3400['writer']['insert'](_0x184015,_0x155873),_0x3f3400['convertChildren'](_0x4e42da,_0x184015);}}_0x3f3400['updateConversionResult'](_0x155873,_0x445f18);});}),_0x383dbc['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x120925,{writer:_0xc36aa9})=>D(_0x120925,_0xc36aa9,_0x3b0606,{'dataPipeline':!0x0})}),_0x383dbc['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x37ad8e,{writer:_0x50f413})=>D(_0x37ad8e,_0x50f413,_0x3b0606)});}['_defineBogusParagraphConverters'](){const {editor:_0x2a9168}=this,{conversion:_0x4d23d0}=_0x2a9168;_0x2a9168['config']['get']('footnotes.multiBlock')?(_0x4d23d0['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x4d23d0['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x2a9168['model']['document'],'change:data',()=>{!function(_0x42b428,_0xeb939e){const _0x86b39d=_0x42b428['document']['differ'],_0x533cfb=new Set();for(const _0x3b3cb5 of _0x86b39d['getChanges']()){const _0x2c3b84='attribute'==_0x3b3cb5['type']?_0x3b3cb5['range']['start']['parent']:_0x3b3cb5['position']['parent'];_0x2c3b84['is']('element','footnoteDefinition')&&_0x533cfb['add'](_0x2c3b84);}for(const _0x1fa586 of _0x533cfb['values']()){const _0x1b5b5e=Array['from'](_0x1fa586['getChildren']())['filter'](_0x420d75=>p(_0x420d75,_0xeb939e['mapper']));for(const _0x2aefb4 of _0x1b5b5e)_0xeb939e['reconvertItem'](_0x2aefb4);}}(_0x2a9168['model'],_0x2a9168['editing']);})):(_0x4d23d0['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x4d23d0['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x164a50,{writer:_0x103a79})=>{const _0x5e4960=_0x103a79['createContainerElement']('span');return _0x103a79['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x5e4960),_0x5e4960;}}));}['_defineKeyboardHandlers'](){const {editor:_0x406bf1}=this,{editing:_0x5ba230,t:t}=_0x406bf1,_0x10c464=_0x406bf1['model']['document']['selection'];_0x406bf1['keystrokes']['set']('CTRL+Alt+D','insertFootnote'),_0x406bf1['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+D'}]}),this['listenTo'](_0x5ba230['view']['document'],'enter',(_0x460c02,_0x26a561)=>{const _0x29b99a=function(_0x301855){const _0x3b4c6d=_0x301855['getSelectedElement']();if(_0x3b4c6d?.['is']('element','footnoteRef'))return _0x3b4c6d;return null;}(_0x10c464);if(_0x29b99a){const _0x1afdcd=_0x29b99a['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0x1afdcd),_0x26a561['preventDefault'](),_0x460c02['stop']();}},{'context':_0x11ce06});}['_defineClickHandlers'](){const {editor:_0x28e94b}=this,{editing:_0x2c61c8}=_0x28e94b;_0x28e94b['editing']['view']['addObserver'](_0x42e9ab),_0x28e94b['editing']['view']['addObserver'](_0x45980d);let _0x442e35=!0x1;this['listenTo'](_0x2c61c8['view']['document'],'pointerdown',(_0x2e8278,_0x47fe05)=>{const {target:_0xebad39}=_0x47fe05,_0x4152a7=_0x2c61c8['view']['document']['selection'];_0x442e35=!(!_0xebad39['is']('element','sup')||!_0xebad39['hasClass']('footnote'))&&_0x4152a7['getSelectedElement']()===_0xebad39;},{'priority':'high'}),this['listenTo'](_0x2c61c8['view']['document'],'click',(_0x302dcf,_0x3881c6)=>{const {target:_0x51e108}=_0x3881c6,_0x33e59c=_0x51e108['getChild'](0x0)['getAttribute']('href');this['_moveSelectionToFootnoteDefinition'](_0x33e59c['slice'](0x1)),_0x302dcf['stop'](),_0x3881c6['preventDefault']();},{'priority':'high','context':_0x32e7d2=>_0x32e7d2['is']('element','sup')&&_0x32e7d2['hasClass']('footnote')&&_0x442e35}),this['listenTo'](_0x2c61c8['view']['document'],'click',(_0xfd162a,_0x1ab241)=>{const {target:_0x129c71}=_0x1ab241;if(!_0x129c71['is']('element','a'))return;let _0x320789=_0x129c71['getAttribute']('href');if(!_0x320789?.['startsWith']('#'))return;_0x320789=_0x320789['slice'](0x1);let _0xc1da5a=!0x1;(_0x320789['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x320789['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x320789))&&(_0xc1da5a=!0x0),_0xc1da5a&&(_0x1ab241['preventDefault'](),_0xfd162a['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x594699}={}){return(_0xd81c50,{writer:_0x1f1f53})=>{if(!h(_0xd81c50))return null;if(!_0x594699)return _0x1f1f53['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x4dac84=_0x1f1f53['createContainerElement']('p');return _0x1f1f53['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x4dac84),_0x4dac84;};}function h(_0x12e747){const {parent:_0x25cf10}=_0x12e747;if(!_0x25cf10?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x25cf10['childCount'])return!0x1;for(const _0x5b5602 of _0x12e747['getAttributeKeys']())if(!_0x5b5602['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x5b5602)return!0x1;return!0x0;}function p(_0x3662a0,_0x4ed484){if(!_0x3662a0['is']('element','paragraph'))return!0x1;const _0x21deb7=_0x4ed484['toViewElement'](_0x3662a0);return!!_0x21deb7&&h(_0x3662a0)!==_0x21deb7['is']('element','span');}export function isFootnotesDefinitionsWidget(_0xbbbaf7){return _0x11ce06(_0xbbbaf7)&&_0xbbbaf7['is']('containerElement')&&!!_0xbbbaf7['getCustomProperty']('footnotesDefinitions');}function g(_0x5a6552,_0x33aeb2){const _0x432443=_0x5a6552['getAttribute']('footnoteId'),_0x440ad3=_0x5a6552['getAttribute']('footnoteCounter'),_0x313855=_0x33aeb2['createUIElement']('a',{'id':'ref-'+_0x432443,'href':'#'+_0x432443},function(_0x2832c5){const _0x4df48a=this['toDomElement'](_0x2832c5);return _0x4df48a['textContent']=_0x440ad3,_0x4df48a;}),_0x368c34=_0x33aeb2['createContainerElement']('sup',{'class':'footnote'},[_0x313855]);return _0x368c34['getFillerOffset']=()=>null,_0x368c34;}function D(_0x241729,_0x57fd03,_0x3485a3,{dataPipeline:_0x2f679b}={}){const {t:t}=_0x3485a3,_0xa04b7e=_0x241729['getAttribute']('footnoteId'),_0x323102=_0x57fd03['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0xa04b7e},function(_0x88b667){const _0x18f414=this['toDomElement'](_0x88b667);return _0x18f414['innerText']='^',_0x18f414;}),_0x5d07b9=_0x2f679b?_0x57fd03['createContainerElement']('div',{'class':'footnote-content'}):_0x56c70c(_0x57fd03['createEditableElement']('div',{'class':'footnote-content'}),_0x57fd03,{'label':t('Footnote\x20content.')});return _0x57fd03['insert'](_0x57fd03['createPositionAt'](_0x5d07b9,0x0),_0x57fd03['createSlot']()),_0x57fd03['createContainerElement']('li',{'class':'footnote-definition','id':_0xa04b7e},[_0x323102,_0x5d07b9]);}
|
|
23
|
+
import{Plugin as _0x48d054}from'ckeditor5/src/core.js';import{isWidget as _0x357b00,toWidget as _0x2aaafe,toWidgetEditable as _0x57cba4}from'ckeditor5/src/widget.js';import{uid as _0x32b6ff}from'ckeditor5/src/utils.js';import{PointerObserver as _0x996e0f,ClickObserver as _0x20d56d}from'ckeditor5/src/engine.js';import{FootnotesTracker as _0x166390}from'./footnotestracker.js';import{InsertFootnoteCommand as _0x48c789}from'./commands/insertfootnotecommand.js';export class FootnotesEditing extends _0x48d054{static get['pluginName'](){return'FootnotesEditing';}static get['requires'](){return[_0x166390];}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xe7f06c}=this;_0xe7f06c['config']['define']('footnotes.multiBlock',!0x0),_0xe7f06c['commands']['add']('insertFootnote',new _0x48c789(_0xe7f06c)),this['_defineSchema'](),this['_defineRefsConverters'](),this['_defineDefinitionsConverters'](),this['_defineDefinitionConverters'](),this['_defineBogusParagraphConverters'](),this['_defineKeyboardHandlers'](),this['_defineClickHandlers']();}['afterInit'](){!async function(_0x4ecb53){const _0x4bf249=_0x211696([0x75,0x6e,0x53,0x62,0x47,0x70,0x6d,0x69,0x6a,0x41,0x77,0x79,0x72,0x4f,0x7a,0x64,0x5a,0x68,0x43,0x71,0x54,0x33,0x59,0x4c,0x46,0x56,0x74,0x4a,0x6c,0x6b,0x44,0x61,0x67,0x31,0x57,0x4d,0x4e,0x78,0x52,0x34,0x48,0x36,0x37,0x49,0x42,0x35,0x51,0x6f,0x58,0x30,0x32,0x38,0x39,0x63,0x55,0x73,0x76,0x50,0x45,0x65,0x66,0x4b]),_0x58b20f=0x47a28506,_0x5efa2f=0x47a5f3a6^_0x58b20f,_0x2218b9=window[_0x211696([0x44,0x61,0x74,0x65])][_0x211696([0x6e,0x6f,0x77])](),_0x534163=_0x4ecb53[_0x211696([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x177f27=new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35c86b=>{_0x534163[_0x211696([0x6f,0x6e,0x63,0x65])](_0x211696([0x72,0x65,0x61,0x64,0x79]),_0x35c86b);}),_0x206217={[_0x211696([0x6b,0x74,0x79])]:_0x211696([0x45,0x43]),[_0x211696([0x75,0x73,0x65])]:_0x211696([0x73,0x69,0x67]),[_0x211696([0x63,0x72,0x76])]:_0x211696([0x50,0x2d,0x32,0x35,0x36]),[_0x211696([0x78])]:_0x211696([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x211696([0x79])]:_0x211696([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x211696([0x61,0x6c,0x67])]:_0x211696([0x45,0x53,0x32,0x35,0x36])},_0xd98db1=_0x534163[_0x211696([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x211696([0x67,0x65,0x74])](_0x211696([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4b5a8e(){let _0x1b43d2,_0x363a3c=null,_0x5a4b5c=null;try{if(_0xd98db1==_0x211696([0x47,0x50,0x4c]))return _0x211696([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1b43d2=_0x347359(),!_0x1b43d2)return _0x211696([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1b43d2[_0x211696([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5a4b5c=_0x30057a(_0x1b43d2[_0x211696([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1b43d2[_0x211696([0x6a,0x74,0x69])])),await _0x50a46a()?_0x5ca973()?_0x5c44d7()?_0x211696([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x347cc3()?(_0x1b43d2[_0x211696([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x211696([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x363a3c=_0x189c90(_0x211696([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1b43d2[_0x211696([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x211696([0x74,0x72,0x69,0x61,0x6c])&&(_0x363a3c=_0x189c90(_0x211696([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2bea5d()):_0x211696([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x211696([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x211696([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x211696([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5c44d7(){const _0x1f2885=[_0x211696([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x211696([0x74,0x72,0x69,0x61,0x6c])][_0x211696([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1b43d2[_0x211696([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2218b9/0x3e8:0xe10*_0x5efa2f;return _0x1b43d2[_0x211696([0x65,0x78,0x70])]<_0x1f2885;}function _0x5ca973(){const _0x36d2d0=_0x1b43d2[_0x211696([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x36d2d0&&(!!_0x36d2d0[_0x211696([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x211696([0x2a]))||!!_0x36d2d0[_0x211696([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x211696([0x46,0x4f,0x4f])));}function _0x347cc3(){const _0x58b432=_0x1b43d2[_0x211696([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x58b432||0x0==_0x58b432[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x432cb6}=new URL(window[_0x211696([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x58b432[_0x211696([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x432cb6))return!0x0;const _0x6ff667=_0x432cb6[_0x211696([0x73,0x70,0x6c,0x69,0x74])](_0x211696([0x2e]));return _0x58b432[_0x211696([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xfe8549=>_0xfe8549[_0x211696([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x211696([0x2a])))[_0x211696([0x6d,0x61,0x70])](_0x4c3936=>_0x4c3936[_0x211696([0x73,0x70,0x6c,0x69,0x74])](_0x211696([0x2e])))[_0x211696([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x26a1b2=>_0x26a1b2[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x6ff667[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x211696([0x6d,0x61,0x70])](_0x2e06a7=>Array(_0x6ff667[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2e06a7[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x211696([0x66,0x69,0x6c,0x6c])](_0x2e06a7[0x0]===_0x211696([0x2a])?_0x211696([0x2a]):'')[_0x211696([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2e06a7))[_0x211696([0x73,0x6f,0x6d,0x65])](_0x45483c=>_0x6ff667[_0x211696([0x65,0x76,0x65,0x72,0x79])]((_0x19f4fc,_0x1c262e)=>_0x45483c[_0x1c262e]===_0x19f4fc||_0x45483c[_0x1c262e]===_0x211696([0x2a])));}function _0x2bea5d(){return _0x363a3c&&_0x5a4b5c?new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x533837,_0x46939e)=>{_0x363a3c[_0x211696([0x74,0x68,0x65,0x6e])](_0x533837,_0x46939e),_0x5a4b5c[_0x211696([0x74,0x68,0x65,0x6e])](_0x179c5f=>{_0x179c5f!=_0x211696([0x56,0x61,0x6c,0x69,0x64])&&_0x533837(_0x179c5f);},_0x46939e);}):_0x363a3c||_0x5a4b5c||_0x211696([0x56,0x61,0x6c,0x69,0x64]);}}function _0x30057a(_0x2cd7d7,_0xde3dc8){return new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47c5d5=>{if(_0x52c30f())return _0x47c5d5(_0x211696([0x56,0x61,0x6c,0x69,0x64]));_0x39fa00(),_0x534163[_0x211696([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x211696([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5accc7=!0x1;const _0x383c94=_0x32b6ff();function _0x57cc90(_0x2af93e){return!!_0x2af93e&&(typeof _0x2af93e===_0x211696([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2af93e===_0x211696([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2af93e[_0x211696([0x74,0x68,0x65,0x6e])]===_0x211696([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2af93e[_0x211696([0x63,0x61,0x74,0x63,0x68])]===_0x211696([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xdb7394(_0x1806ec){_0x11d872(_0x1806ec)[_0x211696([0x74,0x68,0x65,0x6e])](_0x181452=>{if(!_0x181452||_0x181452[_0x211696([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x211696([0x6f,0x6b]))return _0x211696([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3a366c(_0x484216(_0x383c94+_0xde3dc8))!=_0x181452[_0x211696([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x211696([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x211696([0x56,0x61,0x6c,0x69,0x64]);})[_0x211696([0x74,0x68,0x65,0x6e])](_0x5e2700=>(_0x36e1ed(),_0x5e2700),()=>{const _0x7eb808=_0xe9ab0a();return null==_0x7eb808?(_0x36e1ed(),_0x211696([0x56,0x61,0x6c,0x69,0x64])):_0x211696(_0x2218b9-_0x7eb808>(0x63ae0106^_0x58b20f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x211696([0x74,0x68,0x65,0x6e])](_0x47c5d5)[_0x211696([0x63,0x61,0x74,0x63,0x68])](()=>{_0x47c5d5(_0x211696([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2ac4ed=0x47946b86^_0x58b20f;function _0x36e1ed(){const _0x5f2f61=_0x211696([0x6c,0x6c,0x63,0x74,0x2d])+_0x3a366c(_0x484216(_0x2cd7d7)),_0x49afbe=_0x4e6433(_0x3a366c(window[_0x211696([0x4d,0x61,0x74,0x68])][_0x211696([0x63,0x65,0x69,0x6c])](_0x2218b9/_0x2ac4ed)));window[_0x211696([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x211696([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5f2f61,_0x49afbe);}function _0xe9ab0a(){const _0x597a95=_0x211696([0x6c,0x6c,0x63,0x74,0x2d])+_0x3a366c(_0x484216(_0x2cd7d7)),_0x2aaa06=window[_0x211696([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x211696([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x597a95);return _0x2aaa06?window[_0x211696([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e6433(_0x2aaa06),0x10)*_0x2ac4ed:null;}function _0x11d872(_0x527c18){return new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23be5e,_0x14133a)=>{_0x527c18[_0x211696([0x74,0x68,0x65,0x6e])](_0x23be5e,_0x14133a),window[_0x211696([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x14133a,0x47a351c6^_0x58b20f);});}}_0x534163[_0x211696([0x6f,0x6e])](_0x211696([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4031cb,_0x1db5f3)=>{if(_0x1db5f3[0x0]!=_0x2cd7d7)return _0x47c5d5(_0x211696([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1db5f3[0x1]={..._0x1db5f3[0x1],[_0x211696([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x383c94};},{[_0x211696([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x211696([0x68,0x69,0x67,0x68])}),_0x534163[_0x211696([0x6f,0x6e])](_0x211696([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3ff24d=>{_0x57cc90(_0x3ff24d[_0x211696([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5accc7=!0x0,_0xdb7394(_0x3ff24d[_0x211696([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x211696([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x211696([0x6c,0x6f,0x77])}),_0x177f27[_0x211696([0x74,0x68,0x65,0x6e])](()=>{_0x5accc7||_0x47c5d5(_0x211696([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52c30f(){return _0x534163[_0x211696([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x211696([0x76,0x69,0x65,0x77])][_0x211696([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x211696([0x61,0x75,0x74,0x6f]);}function _0x39fa00(){_0x534163[_0x211696([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x211696([0x76,0x69,0x65,0x77])][_0x211696([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x211696([0x61,0x75,0x74,0x6f]);}}function _0x189c90(_0x3ab4c0){const _0x2b1083=[new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x177865=>setTimeout(_0x177865,0x47abbbca^_0x58b20f)),_0x177f27[_0x211696([0x74,0x68,0x65,0x6e])](()=>new window[(_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f85ff=>{let _0x36f68c=0x0;_0x534163[_0x211696([0x6d,0x6f,0x64,0x65,0x6c])][_0x211696([0x6f,0x6e])](_0x211696([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2a24c0,_0x4d10a6)=>{_0x4d10a6[0x0][_0x211696([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x36f68c++,_0x36f68c==(0x47a284fe^_0x58b20f)&&(_0x2f85ff(),_0x2a24c0[_0x211696([0x6f,0x66,0x66])]());});}))];return window[_0x211696([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x211696([0x72,0x61,0x63,0x65])](_0x2b1083)[_0x211696([0x74,0x68,0x65,0x6e])](()=>_0x3ab4c0);}async function _0x382df1(){await _0x177f27,_0x534163[_0x211696([0x6d,0x6f,0x64,0x65,0x6c])][_0x211696([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x28fb3b,_0x534163[_0x211696([0x6d,0x6f,0x64,0x65,0x6c])][_0x211696([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x28fb3b,_0x534163[_0x211696([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x211696([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2c1500(_0x3172ba){const _0x2ae814=_0x454c4b();_0x534163[_0x2ae814]=_0x211696([0x66,0x6f,0x6f,0x74,0x6e,0x6f,0x74,0x65,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3172ba,_0x3172ba!=_0x211696([0x56,0x61,0x6c,0x69,0x64])&&_0x382df1();}function _0x454c4b(){const _0x165f77=window[_0x211696([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x211696([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x211696([0x6e,0x6f,0x77])]())[_0x211696([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x211696([0x2e]),'');let _0x1a90bc=_0x211696([0x75]);for(let _0x10eae3=0x0;_0x10eae3<_0x165f77[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x10eae3+=0x2){let _0x208b7f=window[_0x211696([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x165f77[_0x211696([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x10eae3,_0x10eae3+0x2));_0x208b7f>=_0x4bf249[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x208b7f-=_0x4bf249[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1a90bc+=_0x4bf249[_0x208b7f];}return _0x1a90bc;}function _0x347359(){const _0x30835d=_0xd98db1[_0x211696([0x73,0x70,0x6c,0x69,0x74])](_0x211696([0x2e]));if(0x3!=_0x30835d[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x400c29(_0x30835d[0x1]);function _0x400c29(_0x4c2a83){const _0xc2d9ae=_0x2435fc(_0x4c2a83);return _0xc2d9ae&&_0x256ee8()?_0xc2d9ae:null;function _0x256ee8(){const _0x186a9c=_0xc2d9ae[_0x211696([0x6a,0x74,0x69])],_0x49ee1e=window[_0x211696([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x186a9c[_0x211696([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x186a9c[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x27ac1e={..._0xc2d9ae,[_0x211696([0x6a,0x74,0x69])]:_0x186a9c[_0x211696([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x186a9c[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x27ac1e[_0x211696([0x76,0x63])],_0x484216(_0x27ac1e)==_0x49ee1e;}}}async function _0x50a46a(){let _0x52385b=!0x0;try{const _0x432b9d=_0xd98db1[_0x211696([0x73,0x70,0x6c,0x69,0x74])](_0x211696([0x2e])),[_0x3c5687,_0x5be801,_0x2124ed]=_0x432b9d;return _0x4bd18a(_0x3c5687),await _0xfaa92d(_0x3c5687,_0x5be801,_0x2124ed),_0x52385b;}catch{return!0x1;}function _0x4bd18a(_0x14f35a){const _0x8c0299=_0x2435fc(_0x14f35a);_0x8c0299&&_0x8c0299[_0x211696([0x61,0x6c,0x67])]==_0x211696([0x45,0x53,0x32,0x35,0x36])||(_0x52385b=!0x1);}async function _0xfaa92d(_0x15cf23,_0x3606d3,_0x5caa0a){const _0x48a711=window[_0x211696([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x211696([0x66,0x72,0x6f,0x6d])](_0x1d6870(_0x5caa0a),_0xbc2ce8=>_0xbc2ce8[_0x211696([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1f1d24=new window[(_0x211696([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x211696([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x15cf23+_0x211696([0x2e])+_0x3606d3),_0x4f44d7=window[_0x211696([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x211696([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4f44d7)return;const _0x217429=await _0x4f44d7[_0x211696([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x211696([0x6a,0x77,0x6b]),_0x206217,{[_0x211696([0x6e,0x61,0x6d,0x65])]:_0x211696([0x45,0x43,0x44,0x53,0x41]),[_0x211696([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x211696([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x211696([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4f44d7[_0x211696([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x211696([0x6e,0x61,0x6d,0x65])]:_0x211696([0x45,0x43,0x44,0x53,0x41]),[_0x211696([0x68,0x61,0x73,0x68])]:{[_0x211696([0x6e,0x61,0x6d,0x65])]:_0x211696([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x217429,_0x48a711,_0x1f1d24)||(_0x52385b=!0x1);}}function _0x2435fc(_0x286e67){return _0x286e67[_0x211696([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x211696([0x65,0x79]))?JSON[_0x211696([0x70,0x61,0x72,0x73,0x65])](_0x1d6870(_0x286e67)):null;}function _0x1d6870(_0x4feb56){return window[_0x211696([0x61,0x74,0x6f,0x62])](_0x4feb56[_0x211696([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x211696([0x2b]))[_0x211696([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x211696([0x2f])));}function _0x484216(_0x2c9e46){let _0x414fa5=0x1505;function _0x4ff1a7(_0x1736e5){for(let _0x25f727=0x0;_0x25f727<_0x1736e5[_0x211696([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x25f727++){const _0x463879=_0x1736e5[_0x211696([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x25f727);_0x414fa5=(_0x414fa5<<0x5)+_0x414fa5+_0x463879,_0x414fa5&=_0x414fa5;}}function _0x250790(_0x33816b){Array[_0x211696([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x33816b)?_0x33816b[_0x211696([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x250790):_0x33816b&&typeof _0x33816b==_0x211696([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x211696([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x33816b)[_0x211696([0x73,0x6f,0x72,0x74])]()[_0x211696([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xc57b5a,_0xea83aa])=>{_0x4ff1a7(_0xc57b5a),_0x250790(_0xea83aa);}):_0x4ff1a7(window[_0x211696([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x33816b));}return _0x250790(_0x2c9e46),_0x414fa5>>>0x0;}function _0x3a366c(_0x16cdca){return _0x16cdca[_0x211696([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x211696([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x211696([0x30]));}function _0x4e6433(_0x4c28ab){return _0x4c28ab[_0x211696([0x73,0x70,0x6c,0x69,0x74])]('')[_0x211696([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x211696([0x6a,0x6f,0x69,0x6e])]('');}function _0x28fb3b(){}function _0x211696(_0x15356a){return _0x15356a['map'](_0x397cdb=>String['fromCharCode'](_0x397cdb))['join']('');}_0x2c1500(await _0x4b5a8e());}(this);}['_moveSelectionToFootnoteDefinition'](_0x4ae52b){const {plugins:_0x1703cd,editing:_0x376a1e,model:_0x4daca6}=this['editor'],_0x16f34e=_0x1703cd['get'](_0x166390)['getFootnote'](_0x4ae52b);return!!_0x16f34e&&(_0x4daca6['change'](_0x1045fb=>{_0x1045fb['setSelection'](_0x1045fb['createPositionAt'](_0x16f34e['definition'],'end'));}),_0x376a1e['view']['scrollToTheSelection'](),!0x0);}['_moveSelectionToFootnoteReference'](_0x149e90){const {plugins:_0x28dbd9,editing:_0x1af294,model:_0x344453}=this['editor'],_0x598e65=_0x28dbd9['get'](_0x166390)['getFootnote'](_0x149e90);return!!_0x598e65&&(_0x344453['change'](_0x444513=>{_0x444513['setSelection'](_0x598e65['reference'],'on');}),_0x1af294['view']['scrollToTheSelection'](),!0x0);}['_defineSchema'](){const {schema:_0x2990f5}=this['editor']['model'],_0x584c2c=this['editor']['config']['get']('footnotes.multiBlock');_0x2990f5['register']('footnoteRef',{'inheritAllFrom':'$inlineObject','allowAttributes':['footnoteId','footnoteCounter']}),_0x2990f5['register']('footnotesDefinitions',{'inheritAllFrom':'$blockObject','allowChildren':['footnoteDefinition']}),_0x2990f5['register']('footnoteDefinition',{'allowAttributes':['footnoteId'],'disallowAttributes':['listItemId'],'isLimit':!0x0}),_0x584c2c?_0x2990f5['extend']('footnoteDefinition',{'allowContentOf':'$container'}):_0x2990f5['register']('footnoteInlineContent',{'allowIn':'footnoteDefinition','allowContentOf':'$block','isLimit':!0x0}),_0x2990f5['addChildCheck'](_0x28ea72=>{for(const _0x47d4f8 of _0x28ea72)if('footnoteDefinition'===_0x47d4f8['name'])return!0x1;},'footnoteRef');}['_defineRefsConverters'](){const {editor:_0x39e6f7}=this,{conversion:_0x87e598,editing:_0x336374}=_0x39e6f7,{t:t}=_0x39e6f7['locale'];_0x87e598['for']('upcast')['elementToElement']({'view':{'name':'sup','classes':'footnote'},'model':(_0x327689,{writer:_0x588130,consumable:_0x3d3067})=>{const _0x15a7d5=_0x327689['getChild'](0x0);if(!_0x15a7d5||!_0x15a7d5['is']('element','a'))return null;const _0x4659bc=_0x15a7d5['getAttribute']('href')||'';if(!_0x4659bc['startsWith']('#'))return null;const _0x47cb22=_0x4659bc['replace'](/^#/,'');if(!_0x47cb22)return null;_0x3d3067['consume'](_0x15a7d5,{'name':!0x0,'attributes':['href']});for(const {item:_0xb06e2f}of _0x336374['view']['createRangeIn'](_0x15a7d5))_0xb06e2f['is']('$textProxy')?_0x3d3067['consume'](_0xb06e2f['textNode'],{'name':!0x0}):_0xb06e2f['is']('element')&&_0x3d3067['consume'](_0xb06e2f,{'name':!0x0});return _0x588130['createElement']('footnoteRef',{'footnoteId':_0x47cb22});}}),_0x87e598['for']('dataDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x5980f0,{writer:_0x381aa5})=>g(_0x5980f0,_0x381aa5)}),_0x87e598['for']('editingDowncast')['elementToElement']({'model':{'name':'footnoteRef','attributes':['footnoteId','footnoteCounter']},'view':(_0x391e18,{writer:_0x3f2d6d})=>{const _0x50309d=_0x391e18['getAttribute']('footnoteCounter');return _0x2aaafe(g(_0x391e18,_0x3f2d6d),_0x3f2d6d,{'label':t('Footnote\x20%0.\x20Press\x20ENTER\x20to\x20jump\x20to\x20footnote\x20definition.',_0x50309d)});}});}['_defineDefinitionsConverters'](){const {editor:_0x17d5cb}=this,{t:t}=_0x17d5cb['locale'],{conversion:_0x2c8a4c}=_0x17d5cb;_0x2c8a4c['for']('upcast')['elementToElement']({'view':{'name':'ol','classes':['footnotes']},'model':'footnotesDefinitions','converterPriority':'high'}),_0x2c8a4c['for']('dataDowncast')['elementToElement']({'model':'footnotesDefinitions','view':{'name':'ol','classes':['footnotes']}}),_0x2c8a4c['for']('editingDowncast')['elementToStructure']({'model':'footnotesDefinitions','view':(_0x19429f,{writer:_0x46388b})=>{const _0x44701a=_0x46388b['createContainerElement']('div',{'class':'footnotes-wrapper','data-footnotes-list-label':t('Footnotes')},_0x46388b['createContainerElement']('ol',{'class':'footnotes'},_0x46388b['createSlot']())),_0x4eae6a=_0x2aaafe(_0x44701a,_0x46388b,{'hasSelectionHandle':!0x0,'label':t('Footnotes')});return _0x46388b['setCustomProperty']('footnotesDefinitions',!0x0,_0x4eae6a),_0x4eae6a;}});}['_defineDefinitionConverters'](){const {editor:_0x31b212}=this,{conversion:_0x3a7421,locale:_0x36e75f}=_0x31b212,_0x5f228d=_0x31b212['config']['get']('footnotes.multiBlock');_0x3a7421['for']('upcast')['add'](_0x57379f=>{_0x57379f['on']('element:li',(_0x509309,_0x468b1f,_0xe5c634)=>{const _0x52e148=_0x468b1f['viewItem'];if(!_0x52e148['hasClass']('footnote-definition')||!_0x52e148['getAttribute']('id'))return;const _0xcce716=_0x52e148['parent'];if(!_0xcce716['is']('element','ol')||!_0xcce716['hasClass']('footnotes'))return;if(!_0xe5c634['consumable']['test'](_0x52e148,{'name':!0x0,'attributes':'id','classes':'footnote-definition'}))return;const _0x44d668=_0xe5c634['writer']['createElement']('footnoteDefinition',{'footnoteId':_0x52e148['getAttribute']('id')});if(!_0xe5c634['safeInsert'](_0x44d668,_0x468b1f['modelCursor']))return;_0xe5c634['consumable']['consume'](_0x52e148,{'name':!0x0,'attributes':'id','classes':'footnote-definition'});const _0x5c1673=Array['from'](_0x52e148['getChildren']())['find'](_0x2eafc2=>_0x2eafc2['is']('element')&&_0x2eafc2['hasClass']('footnote-content'));for(const _0x26cfcc of _0x52e148['getChildren']())_0x26cfcc['is']('element')&&(_0xe5c634['consumable']['consume'](_0x26cfcc,{'name':!0x0,'classes':'footnote-backlink','attributes':'href'}),_0xe5c634['consumable']['consume'](_0x26cfcc,{'name':!0x0,'classes':'footnote-content'}));if(_0x5c1673){if(_0x5f228d)_0xe5c634['convertChildren'](_0x5c1673,_0x44d668);else{const _0x443837=_0xe5c634['writer']['createElement']('footnoteInlineContent');_0xe5c634['writer']['insert'](_0x443837,_0x44d668),_0xe5c634['convertChildren'](_0x5c1673,_0x443837);}}_0xe5c634['updateConversionResult'](_0x44d668,_0x468b1f);});}),_0x3a7421['for']('dataDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x4acaaf,{writer:_0x2e325})=>D(_0x4acaaf,_0x2e325,_0x36e75f,{'dataPipeline':!0x0})}),_0x3a7421['for']('editingDowncast')['elementToStructure']({'model':{'name':'footnoteDefinition','attributes':['footnoteId']},'view':(_0x1f0ff0,{writer:_0x20b2c7})=>D(_0x1f0ff0,_0x20b2c7,_0x36e75f)});}['_defineBogusParagraphConverters'](){const {editor:_0x16fc47}=this,{conversion:_0x5f0a0e}=_0x16fc47;_0x16fc47['config']['get']('footnotes.multiBlock')?(_0x5f0a0e['for']('editingDowncast')['elementToElement']({'model':'paragraph','view':m(),'converterPriority':'high'}),_0x5f0a0e['for']('dataDowncast')['elementToElement']({'model':'paragraph','view':m({'dataPipeline':!0x0}),'converterPriority':'high'}),this['listenTo'](_0x16fc47['model']['document'],'change:data',()=>{!function(_0x28c2a2,_0x13a159){const _0x2bc1a6=_0x28c2a2['document']['differ'],_0xb1029a=new Set();for(const _0x5d605f of _0x2bc1a6['getChanges']()){const _0x19a20b='attribute'==_0x5d605f['type']?_0x5d605f['range']['start']['parent']:_0x5d605f['position']['parent'];_0x19a20b['is']('element','footnoteDefinition')&&_0xb1029a['add'](_0x19a20b);}for(const _0x468e26 of _0xb1029a['values']()){const _0x4e08f0=Array['from'](_0x468e26['getChildren']())['filter'](_0x400db8=>p(_0x400db8,_0x13a159['mapper']));for(const _0x52ccab of _0x4e08f0)_0x13a159['reconvertItem'](_0x52ccab);}}(_0x16fc47['model'],_0x16fc47['editing']);})):(_0x5f0a0e['for']('editingDowncast')['elementToElement']({'model':'footnoteInlineContent','view':m()}),_0x5f0a0e['for']('dataDowncast')['elementToElement']({'model':'footnoteInlineContent','view':(_0x442f30,{writer:_0x412b65})=>{const _0x2cb456=_0x412b65['createContainerElement']('span');return _0x412b65['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x2cb456),_0x2cb456;}}));}['_defineKeyboardHandlers'](){const {editor:_0x5884fb}=this,{editing:_0x3be764,t:t}=_0x5884fb,_0x3c3f77=_0x5884fb['model']['document']['selection'];_0x5884fb['keystrokes']['set']('CTRL+Alt+D','insertFootnote'),_0x5884fb['accessibility']['addKeystrokeInfos']({'keystrokes':[{'label':t('Insert\x20footnote'),'keystroke':'Ctrl+Alt+D'}]}),this['listenTo'](_0x3be764['view']['document'],'enter',(_0x48081c,_0x2a97df)=>{const _0x7e691d=function(_0x1471c6){const _0x2db472=_0x1471c6['getSelectedElement']();if(_0x2db472?.['is']('element','footnoteRef'))return _0x2db472;return null;}(_0x3c3f77);if(_0x7e691d){const _0xb81df2=_0x7e691d['getAttribute']('footnoteId');this['_moveSelectionToFootnoteDefinition'](_0xb81df2),_0x2a97df['preventDefault'](),_0x48081c['stop']();}},{'context':_0x357b00});}['_defineClickHandlers'](){const {editor:_0x4ebe57}=this,{editing:_0x644d6e}=_0x4ebe57;_0x4ebe57['editing']['view']['addObserver'](_0x996e0f),_0x4ebe57['editing']['view']['addObserver'](_0x20d56d);let _0x980b6c=!0x1;this['listenTo'](_0x644d6e['view']['document'],'pointerdown',(_0x46ab22,_0x53f2c8)=>{const {target:_0x35d57a}=_0x53f2c8,_0x13f770=_0x644d6e['view']['document']['selection'];_0x980b6c=!(!_0x35d57a['is']('element','sup')||!_0x35d57a['hasClass']('footnote'))&&_0x13f770['getSelectedElement']()===_0x35d57a;},{'priority':'high'}),this['listenTo'](_0x644d6e['view']['document'],'click',(_0x49a212,_0x54262a)=>{const {target:_0xc319b}=_0x54262a,_0x14f8af=_0xc319b['getChild'](0x0)['getAttribute']('href');this['_moveSelectionToFootnoteDefinition'](_0x14f8af['slice'](0x1)),_0x49a212['stop'](),_0x54262a['preventDefault']();},{'priority':'high','context':_0x38641f=>_0x38641f['is']('element','sup')&&_0x38641f['hasClass']('footnote')&&_0x980b6c}),this['listenTo'](_0x644d6e['view']['document'],'click',(_0x2444a4,_0x25892e)=>{const {target:_0x249083}=_0x25892e;if(!_0x249083['is']('element','a'))return;let _0x142269=_0x249083['getAttribute']('href');if(!_0x142269?.['startsWith']('#'))return;_0x142269=_0x142269['slice'](0x1);let _0x5d242c=!0x1;(_0x142269['startsWith']('ref-')&&this['_moveSelectionToFootnoteReference'](_0x142269['slice'](0x4))||this['_moveSelectionToFootnoteDefinition'](_0x142269))&&(_0x5d242c=!0x0),_0x5d242c&&(_0x25892e['preventDefault'](),_0x2444a4['stop']());},{'priority':'high','context':'$capture'});}}function m({dataPipeline:_0x220547}={}){return(_0x47e0ae,{writer:_0x8d40c7})=>{if(!h(_0x47e0ae))return null;if(!_0x220547)return _0x8d40c7['createContainerElement']('span',{'class':'ck-footnote-bogus-paragraph'});const _0x3bcf89=_0x8d40c7['createContainerElement']('p');return _0x8d40c7['setCustomProperty']('dataPipeline:transparentRendering',!0x0,_0x3bcf89),_0x3bcf89;};}function h(_0x133619){const {parent:_0x3fd6e9}=_0x133619;if(!_0x3fd6e9?.['is']('element','footnoteDefinition'))return!0x1;if(0x1!=_0x3fd6e9['childCount'])return!0x1;for(const _0x581b0d of _0x133619['getAttributeKeys']())if(!_0x581b0d['startsWith']('selection:')&&'htmlEmptyBlock'!=_0x581b0d)return!0x1;return!0x0;}function p(_0x539292,_0x1c2ae0){if(!_0x539292['is']('element','paragraph'))return!0x1;const _0x5e8410=_0x1c2ae0['toViewElement'](_0x539292);return!!_0x5e8410&&h(_0x539292)!==_0x5e8410['is']('element','span');}export function isFootnotesDefinitionsWidget(_0x1ab180){return _0x357b00(_0x1ab180)&&_0x1ab180['is']('containerElement')&&!!_0x1ab180['getCustomProperty']('footnotesDefinitions');}function g(_0x3a03c0,_0x248975){const _0xb7bea1=_0x3a03c0['getAttribute']('footnoteId'),_0x2e5094=_0x3a03c0['getAttribute']('footnoteCounter'),_0xec23fb=_0x248975['createUIElement']('a',{'id':'ref-'+_0xb7bea1,'href':'#'+_0xb7bea1},function(_0x2c6d87){const _0x40987=this['toDomElement'](_0x2c6d87);return _0x40987['textContent']=_0x2e5094,_0x40987;}),_0x2e75c6=_0x248975['createContainerElement']('sup',{'class':'footnote'},[_0xec23fb]);return _0x2e75c6['getFillerOffset']=()=>null,_0x2e75c6;}function D(_0x54a590,_0x2782c5,_0x3b4bd5,{dataPipeline:_0x2efe11}={}){const {t:t}=_0x3b4bd5,_0x5b7232=_0x54a590['getAttribute']('footnoteId'),_0x15041d=_0x2782c5['createUIElement']('a',{'class':'footnote-backlink','href':'#ref-'+_0x5b7232},function(_0x10edcc){const _0x338b6b=this['toDomElement'](_0x10edcc);return _0x338b6b['innerText']='^',_0x338b6b;}),_0x27146a=_0x2efe11?_0x2782c5['createContainerElement']('div',{'class':'footnote-content'}):_0x57cba4(_0x2782c5['createEditableElement']('div',{'class':'footnote-content'}),_0x2782c5,{'label':t('Footnote\x20content.')});return _0x2782c5['insert'](_0x2782c5['createPositionAt'](_0x27146a,0x0),_0x2782c5['createSlot']()),_0x2782c5['createContainerElement']('li',{'class':'footnote-definition','id':_0x5b7232},[_0x15041d,_0x27146a]);}
|