1!function(){try{var t="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ba1c482e-dc30-4889-b0b4-c2c035611c86",t._sentryDebugIdIdentifier="sentry-dbid-ba1c482e-dc30-4889-b0b4-c2c035611c86")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6133],{18441:(t,e,i)=>{i.d(e,{B8:()=>tl,an:()=>h});var r=i(38412),n=i(38288),s=i(93765),l=i(46664),o=i(96046),a=i(68364),u=i(51927),d=i(43625),c=(i(26498),i(16763));class m{_startElement;_referenceIndent;_isForward;_includeSelf;_sameAttributes;_sameIndent;_lowerIndent;_higherIndent;constructor(t,e){this._startElement=t,this._referenceIndent=t.getAttribute("listIndent"),this._isForward="forward"==e.direction,this._includeSelf=!!e.includeSelf,this._sameAttributes=(0,l.$r)(e.sameAttributes||[]),this._sameIndent=!!e.sameIndent,this._lowerIndent=!!e.lowerIndent,this._higherIndent=!!e.higherIndent}static first(t,e){let i=new this(t,e)[Symbol.iterator]();return(0,l.$1)(i)}*[Symbol.iterator](){let t=[];for(let{node:e}of new f(this._getStartNode(),this._isForward?"forward":"backward")){let i=e.getAttribute("listIndent");if(i<this._referenceIndent){if(!this._lowerIndent)break;this._referenceIndent=i}else if(i>this._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){t.push(e);continue}}else{if(!this._sameIndent){if(this._higherIndent){t.length&&(yield*t,t.length=0);break}continue}if(this._sameAttributes.some(t=>e.getAttribute(t)!==this._startElement.getAttribute(t)))break}t.length&&(yield*t,t.length=0),yield e}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}class f{_node;_isForward;_previousNodesByIndent=[];_previous=null;_previousNodeIndent=null;constructor(t,e="forward"){this._node=t,this._isForward="forward"===e}[Symbol.iterator](){return this}next(){if(!h(this._node))return{done:!0,value:void 0};let t=this._node.getAttribute("listIndent"),e=null;if(this._previous){let i=this._previousNodeIndent;t>i?this._previousNodesByIndent[i]=this._previous:t<i?(e=this._previousNodesByIndent[t]||null,this._previousNodesByIndent.length=t):e=this._previous}let i={node:this._node,previous:this._previous,previousNodeInList:e};return this._previous=this._node,this._previousNodeIndent=t,this._node=this._isForward?this._node.nextSibling:this._node.previousSibling,{value:i,done:!1}}}class g{_listHead;constructor(t){this._listHead=t}[Symbol.iterator](){return new f(this._listHead)}}class p{static next(){return(0,l.Ld)()}}function h(t){return!!t&&t.is("element")&&t.hasAttribute("listItemId")}function b(t,e={}){return[...I(t,{...e,direction:"backward"}),...I(t,{...e,direction:"forward"})]}function I(t,e={}){let i="forward"==e.direction,r=Array.from(new m(t,{...e,includeSelf:i,sameIndent:!0,sameAttributes:"listItemId"}));return i?r:r.reverse()}function A(t,e){let i=new m(t,{sameIndent:!0,sameAttributes:"listType",...e}),r=new m(t,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward",...e});return[...Array.from(i).reverse(),...r]}function y(t){return!m.first(t,{sameIndent:!0,sameAttributes:"listItemId"})}function k(t){return!m.first(t,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function w(t,e={}){t=(0,l.$r)(t);let i=!1!==e.withNested,r=new Set;for(let e of t)for(let t of b(e,{higherIndent:i}))r.add(t);return L(r)}function _(t){t=(0,l.$r)(t);let e=new Set;for(let i of t)for(let t of A(i))e.add(t);return L(e)}function S(t,e){let i=I(t,{direction:"forward"}),r=p.next();for(let t of i)e.setAttribute("listItemId",r,t);return i}function v(t,e,i){let r={};for(let[t,i]of e.getAttributes())t.startsWith("list")&&(r[t]=i);let n=I(t,{direction:"forward"});for(let t of n)i.setAttributes(r,t);return n}function E(t,e,{expand:i,indentBy:r=1,attributeNames:n}){t=(0,l.$r)(t);let s=i?w(t):t;for(let t of s){let i=t.getAttribute("listIndent")+r;i<0?F(t,e,n):e.setAttribute("listIndent",i,t)}return s}function F(t,e,i){for(let i of t=(0,l.$r)(t))i.is("element","listItem")&&e.rename(i,"paragraph");for(let r of t)for(let t of r.getAttributeKeys())i.includes(t)&&e.removeAttribute(t,r);return t}function x(t){if(!t.length)return!1;let e=t[0].getAttribute("listItemId");return!!e&&!t.some(t=>t.getAttribute("listItemId")!=e)}function L(t){return Array.from(t).filter(t=>"$graveyard"!==t.root.rootName).sort((t,e)=>t.index-e.index)}function T(t){let e=t.document.selection.getSelectedElement();return e&&t.schema.isObject(e)&&t.schema.isBlock(e)?e:null}function B(t,e){return e.checkChild(t.parent,"listItem")&&e.checkChild(t,"$text")&&!e.isObject(t)}function P(t){return"numbered"==t||"customNumbered"==t}class C extends r.uB{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){let t=this.editor,e=t.model,i=N(e.document.selection),r=t.plugins.get("ListEditing").getListAttributeNames();e.change(t=>{let e=[];for(let n of(x(i)&&!y(i[0])?("forward"==this._direction&&e.push(...E(i,t,{attributeNames:r})),e.push(...S(i[0],t))):"forward"==this._direction?e.push(...E(i,t,{expand:!0,attributeNames:r})):e.push(...function(t,e,{attributeNames:i}){let r=w(t=(0,l.$r)(t)),n=new Set,s=Math.min(...r.map(t=>t.getAttribute("listIndent"))),o=new Map;for(let t of r)o.set(t,m.first(t,{lowerIndent:!0}));for(let t of r){if(n.has(t))continue;n.add(t);let r=t.getAttribute("listIndent")-1;if(r<0){F(t,e,i);continue}if(t.getAttribute("listIndent")==s){var a,u,d;let i=(a=t,u=o.get(t),d=e,I(u,{direction:"forward"}).pop().index>a.index?v(a,u,d):[]);for(let t of i)n.add(t);if(i.length)continue}e.setAttribute("listIndent",r,t)}return L(n)}(i,t,{attributeNames:r})),e)){if(!n.hasAttribute("listType"))continue;let e=m.first(n,{sameIndent:!0});e&&t.setAttribute("listType",e.getAttribute("listType"),n)}this._fireAfterExecute(e)})}_fireAfterExecute(t){this.fire("afterExecute",L(new Set(t)))}_checkEnabled(){let t=N(this.editor.model.document.selection),e=t[0];if(!e)return!1;if("backward"==this._direction||x(t)&&!y(t[0]))return!0;e=(t=w(t))[0];let i=m.first(e,{sameIndent:!0});return!!i&&i.getAttribute("listType")==e.getAttribute("listType")}}function N(t){let e=Array.from(t.getSelectedBlocks()),i=e.findIndex(t=>!h(t));return -1!=i&&(e.length=i),e}class O extends r.uB{type;_listWalkerOptions;constructor(t,e,i={}){super(t),this.type=e,this._listWalkerOptions=i.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){let e=this.editor.model,i=e.document,r=T(e),n=Array.from(i.selection.getSelectedBlocks()).filter(t=>e.schema.checkAttribute(t,"listType")||B(t,e.schema)),s=void 0!==t.forceValue?!t.forceValue:this.value;e.change(l=>{if(s){let t=n[n.length-1],e=this.editor.plugins.get("ListEditing").getListAttributeNames(),i=I(t,{direction:"forward"}),r=[];i.length>1&&r.push(...S(i[1],l)),r.push(...F(n,l,e)),r.push(...function(t,e){let i=[],r=1/0;for(let{node:n}
1of new f(t.nextSibling)){let t=n.getAttribute("listIndent");if(0==t)break;t<r&&(r=t);let s=t-r;e.setAttribute("listIndent",s,n),i.push(n)}return i}(t,l)),this._fireAfterExecute(r)}else if((r||i.selection.isCollapsed)&&h(n[0])){let e=A(r||n[0],this._listWalkerOptions);for(let i of e)l.setAttributes({...t.additionalAttributes,listType:this.type},i);this._fireAfterExecute(e)}else{let i=[];for(let r of n)if(r.hasAttribute("listType"))for(let e of w(r,{withNested:!1}))e.getAttribute("listType")!=this.type&&(l.setAttributes({...t.additionalAttributes,listType:this.type},e),i.push(e));else!r.is("element","listItem")&&B(r,e.schema)&&l.rename(r,"listItem"),l.setAttributes({...t.additionalAttributes,listIndent:0,listItemId:p.next(),listType:this.type},r),i.push(r);this._fireAfterExecute(i)}})}_fireAfterExecute(t){this.fire("afterExecute",L(new Set(t)))}_getValue(){let t=Array.from(this.editor.model.document.selection.getSelectedBlocks());if(!t.length)return!1;for(let e of t)if(e.getAttribute("listType")!=this.type)return!1;return!0}_checkEnabled(){let t=this.editor.model,e=t.schema,i=Array.from(t.document.selection.getSelectedBlocks());if(!i.length)return!1;if(this.value)return!0;for(let t of i)if(e.checkAttribute(t,"listType")||B(t,e))return!0;return!1}}class $ extends r.uB{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute({shouldMergeOnBlocksContentLevel:t=!1}={}){let e=this.editor,i=e.model,r=i.document.selection,n=[],s=e.plugins.get("ListEditing").getListAttributeNames();i.change(e=>{let{firstElement:l,lastElement:o}=this._getMergeSubjectElements(r,t),a=l.getAttribute("listIndent")||0,u=o.getAttribute("listIndent"),d=o.getAttribute("listItemId");if(a!=u){let t=Array.from(new m(o,{direction:"forward",higherIndent:!0}));n.push(...E([o,...t],e,{indentBy:a-u,expand:a<u,attributeNames:s}))}if(t){let t=r;r.isCollapsed&&(t=e.createSelection(e.createRange(e.createPositionAt(l,"end"),e.createPositionAt(o,0)))),i.deleteContent(t,{doNotResetEntireContent:r.isCollapsed});let s=t.getLastPosition().parent,a=s.nextSibling;n.push(s),a&&a!==o&&a.getAttribute("listItemId")==d&&n.push(...v(a,s,e))}else n.push(...v(o,l,e));this._fireAfterExecute(n)})}_fireAfterExecute(t){this.fire("afterExecute",L(new Set(t)))}_checkEnabled(){let t=this.editor.model,e=t.document.selection,i=T(t);if(e.isCollapsed||i){let t=i||e.getFirstPosition().parent;if(!h(t))return!1;let r="backward"==this._direction?t.previousSibling:t.nextSibling;if(!r||x([t,r]))return!1}else{let t=e.getLastPosition(),i=e.getFirstPosition();if(t.parent===i.parent||!h(t.parent))return!1}return!0}_getMergeSubjectElements(t,e){let i,r,n=T(this.editor.model);if(t.isCollapsed||n){let s=n||t.getFirstPosition().parent,l=y(s);"backward"==this._direction?(r=s,i=l&&!e?m.first(s,{sameIndent:!0,lowerIndent:!0}):s.previousSibling):(i=s,r=s.nextSibling)}else i=t.getFirstPosition().parent,r=t.getLastPosition().parent;return{firstElement:i,lastElement:r}}}class M extends r.uB{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){this.editor.model.change(t=>{let e=S(this._getStartBlock(),t);this._fireAfterExecute(e)})}_fireAfterExecute(t){this.fire("afterExecute",L(new Set(t)))}_checkEnabled(){let t=this.editor.model.document.selection,e=this._getStartBlock();return t.isCollapsed&&h(e)&&!y(e)}_getStartBlock(){let t=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?t:t.nextSibling}}class z extends r.k_{static get pluginName(){return"ListItemBoldIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[te]}init(){let t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(te);t.plugins.has("BoldEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("bold","listItemBold"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemBold",setAttributeOnDowncast(t,e,i,r){e&&(t.addClass("ck-list-marker-bold",i),l._K.isSafari&&!(r&&r.dataPipeline)&&t.setStyle("--ck-content-list-marker-dummy-bold","0",i))}}))}afterInit(){let t=this.editor,e=t.model;t.plugins.has("BoldEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemBold"}),e.schema.setAttributeProperties("listItemBold",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemBold"),t.conversion.for("upcast").attributeToAttribute({model:"listItemBold",view:{name:"li",classes:"ck-list-marker-bold"}}))}}class D extends r.k_{static get pluginName(){return"ListItemItalicIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[te]}init(){let t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(te);t.plugins.has("ItalicEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("italic","listItemItalic"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemItalic",setAttributeOnDowncast(t,e,i,r){e&&(t.addClass("ck-list-marker-italic",i),l._K.isSafari&&!(r&&r.dataPipeline)&&t.setStyle("--ck-content-list-marker-dummy-italic","0",i))}}))}afterInit(){let t=this.editor,e=t.model;t.plugins.has("ItalicEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemItalic"}),e.schema.setAttributeProperties("listItemItalic",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemItalic"),t.conversion.for("upcast").attributeToAttribute({model:"listItemItalic",view:{name:"li",classes:"ck-list-marker-italic"}}))}}class R extends r.k_{static get pluginName(){return"ListItemFontSizeIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[te]}init(){let t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(te);if(!t.plugins.has("FontSizeEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting"))return;let r=(0,o.zJ)(t.config.get("fontSize.options"));e.registerFormatAttribute("fontSize","listItemFontSize"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontSize",setAttributeOnDowncast(t,e,i,n){if(e){let s=r.find(t=>t.model==e);s&&s.view&&"string"!=typeof s.view?s.view.styles?(t.addClass("ck-list-marker-font-size",i),t.setStyle("--ck-content-list-marker-font-size",s.view.styles["font-size"],i)):s.view.classes&&(t.addClass(`ck-list-marker-font-size-${e}`,i),l._K.isSafari&&!(n&&n.dataPipeline)&&t.setStyle("--ck-content-list-marker-dummy-font-size","0",i)):(t.addClass("ck-list-marker-font-size",i),t.setStyle("--ck-content-list-marker-font-size",e,i))}}})}afterInit(){let t=this.editor,e=t.model;if(t.plugins.has("FontSizeEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting"))for(let i of(e.schema.extend("$listItem",{allowAttributes:"listItemFontSize"}),e.schema.setAttributeProperties("listItemFontSize",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemFontSize"),t.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:t=>t.getStyle("--ck-content-list-marker-font-size")},view:{name:"li",classes:"ck-list-marker-font-size",styles:{"--ck-content-list-marker-font-size":/.*/}}}),(0,o.zJ)(t.config.get("fontSize.options"))))i.model&&i.view&&t.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:i.model},view:{name:"li",classes:`ck-list-marker-font-size-${i.model}`}})}}class V extends r.k_{static get pluginName(){return"ListItemFontColorIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[te]}init(){let t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(te);t.plugins.has("FontColorEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("fontColor","listItemFontColor"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontColor",setAttributeOnDowncast(t,e,i){e&&(t.addClass("ck-list-marker-color",i),t.setStyle("--ck-content-list-marker-color",e,i))}}))}afterInit(){let t=this.editor,e=t.model;t.plugins.has("FontColorEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemFontColor"}),e.schema.setAttributeProperties("listItemFontColor",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemFontColor"),t.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontColor",value:t=>t.getStyle("--ck-content-list-marker-color")},view:{name:"li",classes:"ck-list-marker-color",styles:{"--ck-content-list-marker-color":/.*/}}}))}}class j extends r.k_{static get pluginName(){return"ListItemFontFamilyIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[te]}init(){let t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(te);t.plugins.has("FontFamilyEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.registerFormatAttribute("fontFamily","listItemFontFamily"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontFamily",setAttributeOnDowncast(t,e,i){e&&(t.addClass("ck-list-marker-font-family",
1i),t.setStyle("--ck-content-list-marker-font-family",e,i))}}))}afterInit(){let t=this.editor,e=t.model;t.plugins.has("FontFamilyEditing")&&this.editor.config.get("list.enableListItemMarkerFormatting")&&(e.schema.extend("$listItem",{allowAttributes:"listItemFontFamily"}),e.schema.setAttributeProperties("listItemFontFamily",{isFormatting:!0}),e.schema.addAttributeCheck(t=>{if(!t.last.getAttribute("listItemId"))return!1},"listItemFontFamily"),t.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontFamily",value:t=>t.getStyle("--ck-content-list-marker-font-family")},view:{name:"li",classes:"ck-list-marker-font-family",styles:{"--ck-content-list-marker-font-family":/.*/}}}))}}class K extends r.k_{_loadedFormatting={};static get pluginName(){return"ListFormatting"}static get isOfficialPlugin(){return!0}static get requires(){return[z,D,R,V,j]}constructor(t){super(t),t.config.define("list.enableListItemMarkerFormatting",!0)}afterInit(){this.editor.config.get("list.enableListItemMarkerFormatting")&&this._registerPostfixerForListItemFormatting()}_registerPostfixerForListItemFormatting(){let t=this.editor.model;t.document.registerPostFixer(e=>{let i=t.document.differ.getChanges(),r=new Set,n=!1;for(let t of i)if("attribute"===t.type)("listItemId"==t.attributeKey||"listType"==t.attributeKey||this._isInlineOrSelectionFormatting(t.attributeKey)||Object.values(this._loadedFormatting).includes(t.attributeKey))&&(h(t.range.start.nodeAfter)?r.add(t.range.start.nodeAfter):h(t.range.start.parent)&&r.add(t.range.start.parent));else if(h(t.position.nodeAfter)&&r.add(t.position.nodeAfter),h(t.position.nodeBefore)&&r.add(t.position.nodeBefore),h(t.position.parent)&&r.add(t.position.parent),"insert"==t.type&&"$text"!=t.name)for(let i of e.createRangeIn(t.position.nodeAfter).getItems())h(i)&&r.add(i);for(let i of r){var s,l,o;for(let[r,a]of Object.entries((s=t,l=i,o=Object.keys(this._loadedFormatting),y(l)?W(s,l,o):W(s,b(l)[0],o)))){let t=this._loadedFormatting[r];a&&function(t,e,i,r){let n=b(e),s=!1;for(let e of n)e.hasAttribute(i)&&e.getAttribute(i)===r||(t.setAttribute(i,r,e),s=!0);return s}(e,i,t,a)?n=!0:!a&&function(t,e,i){let r=b(e),n=!1;for(let e of r)e.hasAttribute(i)&&(t.removeAttribute(i,e),n=!0);return n}(e,i,t)&&(n=!0)}}return n})}registerFormatAttribute(t,e){this._loadedFormatting[t]=e}_isInlineOrSelectionFormatting(t){return t.replace(/^selection:/,"")in this._loadedFormatting}}function W(t,e,i){if(!["numbered","bulleted","customNumbered","customBulleted"].includes(e.getAttribute("listType"))||t.schema.isLimit(e))return Object.fromEntries(i.map(t=>[t]));if(e.isEmpty)return Object.fromEntries(i.map(t=>[t,e.getAttribute(`selection:${t}`)]));let r=new Set(i),n={},s=t.createRangeIn(e).getWalker({ignoreElementEnd:!0});for(let{item:e}of s){for(let i of r)if(t.schema.checkAttribute(e,i)){let t=e.getAttribute(i);void 0===t?(r.delete(i),n[i]=void 0):void 0===n[i]?n[i]=t:n[i]!==t&&(r.delete(i),n[i]=void 0)}else i in n||(n[i]=void 0);if(!r.size)break;t.schema.isLimit(e)&&s.jumpTo(t.createPositionAfter(e))}return n}class q extends r.k_{static get pluginName(){return"ListUtils"}static get isOfficialPlugin(){return!0}expandListBlocksToCompleteList(t){return _(t)}isFirstBlockOfListItem(t){return y(t)}isListItemBlock(t){return h(t)}expandListBlocksToCompleteItems(t,e={}){return w(t,e)}isNumberedListType(t){return P(t)}isFirstListItemInList(t){return!m.first(t,{sameIndent:!0,sameAttributes:"listType"})}}function H(t){return t.is("element","li")}function U(t){return"numbered"==t||"customNumbered"==t?"ol":"ul"}function J(t,e){return`list-${t}-${e}`}function G(t,e,i){let r=t.nodeBefore;if(h(r)){let t=r;for(let{node:n}of new f(t,"backward"))if(t=n,i.has(t)||(i.add(t),e.has(r)))return;e.add(t)}else{let i=t.nodeAfter;h(i)&&e.add(i)}}function Y(t,e,i,{dataPipeline:r}={}){var n;let s,l=(n=t,s=e.filter(t=>!1===t.consume).map(t=>t.attributeName),(t,e)=>{let i=[];for(let e of n)t.hasAttribute(e)&&!s.includes(e)&&i.push(`attribute:${e}`);return!!i.every(i=>!1!==e.test(t,i))&&(i.forEach(i=>e.consume(t,i)),!0)});return(n,s,o)=>{let{writer:a,mapper:u,consumable:d}=o,c=s.item;if(!t.includes(s.attributeKey)||!l(c,d))return;let f={...o.options,dataPipeline:r}
1,g=function(t,e,i,r){let n=i.createRangeOn(t),s=e.toViewRange(n).getTrimmed().getWalker();for(let{item:t}of s)if(t.is("element")&&t.getCustomProperty("listItemMarker"))s.jumpTo(r.createPositionAfter(t));else if(t.is("element")&&!t.getCustomProperty("listItemWrapper"))return t}(c,u,i,a);X(g,a,u),function(t,e){let i=t.parent;for(;i.is("attributeElement")&&["ul","ol","li"].includes(i.name);){let r=i.parent;e.unwrap(e.createRangeOn(t),i),i=r}}(g,a);let p=function(t,e,i,r,{dataPipeline:n}){let s=r.createRangeOn(e);if(!y(t))return s;for(let l of i){if("itemMarker"!=l.scope)continue;let i=l.createElement(r,t,{dataPipeline:n});if(!i||(r.setCustomProperty("listItemMarker",!0,i),l.canInjectMarkerIntoElement&&l.canInjectMarkerIntoElement(t)?r.insert(r.createPositionAt(e,0),i):(r.insert(s.start,i),s=r.createRange(r.createPositionBefore(i),r.createPositionAfter(e))),!l.createWrapperElement||!l.canWrapElement))continue;let o=l.createWrapperElement(r,t,{dataPipeline:n});r.setCustomProperty("listItemWrapper",!0,o),l.canWrapElement(t)?s=r.wrap(s,o):(s=r.wrap(r.createRangeOn(i),o),s=r.createRange(s.start,r.createPositionAfter(e)))}return s}(c,g,e,a,f);!function(t,e,i,r,n){if(!t.hasAttribute("listIndent"))return;let s=t.getAttribute("listIndent"),l=t;for(let t=s;t>=0;t--){var o,a;let s=(o=t,a=l.getAttribute("listItemId"),r.createAttributeElement("li",null,{priority:(2*o+1)/100-100,id:a})),u=function(t,e,i,r=J(i,e)){return t.createAttributeElement(U(i),null,{priority:2*e/100-100,id:r})}(r,t,l.getAttribute("listType"));for(let t of i)("list"==t.scope||"item"==t.scope)&&l.hasAttribute(t.attributeName)&&t.setAttributeOnDowncast(r,l.getAttribute(t.attributeName),"list"==t.scope?u:s,n,l);if(e=r.wrap(e,s),e=r.wrap(e,u),0==t||!(l=m.first(l,{lowerIndent:!0})))break}}(c,p,e,a,f)}}function Q(t,{dataPipeline:e}={}){return(i,{writer:r})=>{if(!Z(i,t))return null;if(!e)return r.createContainerElement("span",{class:"ck-list-bogus-paragraph"});let n=r.createContainerElement("p");return r.setCustomProperty("dataPipeline:transparentRendering",!0,n),n}}function X(t,e,i){for(;t.parent.is("attributeElement")&&t.parent.getCustomProperty("listItemWrapper");)e.unwrap(e.createRangeOn(t),t.parent);let r=[];for(let i of(n(e.createPositionBefore(t).getWalker({direction:"backward"})),n(e.createRangeIn(t).getWalker()),r))e.remove(i);function n(t){for(let{item:e}of t){if(e.is("element")&&i.toModelElement(e))break;e.is("element")&&e.getCustomProperty("listItemMarker")&&r.push(e)}}}function Z(t,e,i=b(t)){if(!h(t))return!1;for(let i of t.getAttributeKeys())if(!i.startsWith("selection:")&&"htmlEmptyBlock"!=i&&!e.includes(i))return!1;return i.length<2}let tt=["listType","listIndent","listItemId"];class te extends r.k_{_downcastStrategies=[];static get pluginName(){return"ListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[s.xy,n.ep,q,a.xz,K]}constructor(t){super(t),t.config.define("list.multiBlock",!0)}init(){let t=this.editor,e=t.model,i=t.config.get("list.multiBlock");if(t.plugins.has("LegacyListEditing"))throw new l.Yb("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});for(let t of(e.schema.register("$listItem",{allowAttributes:tt}),i?(e.schema.extend("$container",{allowAttributesOf:"$listItem"}),e.schema.extend("$block",{allowAttributesOf:"$listItem"}),e.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):e.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"}),tt))e.schema.setAttributeProperties(t,{copyOnReplace:!0});t.commands.add("numberedList",new O(t,"numbered")),t.commands.add("bulletedList",new O(t,"bulleted")),t.commands.add("customNumberedList",new O(t,"customNumbered",{multiLevel:!0})),t.commands.add("customBulletedList",new O(t,"customBulleted",{multiLevel:!0})),t.commands.add("indentList",new C(t,"forward")),t.commands.add("outdentList",new C(t,"backward")),t.commands.add("splitListItemBefore",new M(t,"before")),t.commands.add("splitListItemAfter",new M(t,"after")),i&&(t.commands.add("mergeListItemBackward",new $(t,"backward")),t.commands.add("mergeListItemForward",new $(t,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration(),this._setupListItemIdConversionStrategy()}afterInit(){let t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList"),{priority:"high"}),i&&i.registerChildCommand(t.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(t){this._downcastStrategies.push(t)}getListAttributeNames(){return[...tt,...this._downcastStrategies.map(t=>t.attributeName)]}_setupDeleteIntegration(){let t=this.editor,e=t.commands.get("mergeListItemBackward"),i=t.commands.get("mergeListItemForward");this.listenTo(t.editing.view.document,"delete",(r,n)=>{let s=t.model.document.selection;T(t.model)||t.model.change(()=>{let l=s.getFirstPosition();if(s.isCollapsed&&"backward"==n.direction){if(!l.isAtStart)return;let i=l.parent;if(!h(i))return;if(m.first(i,{sameAttributes:"listType",sameIndent:!0})||0!==i.getAttribute("listIndent")){if(!e||!e.isEnabled)return;e.execute({shouldMergeOnBlocksContentLevel:ti(t.model,"backward")})}else k(i)||t.execute("splitListItemAfter"),t.execute("outdentList");n.preventDefault(),r.stop()}else{if(s.isCollapsed&&!s.getLastPosition().isAtEnd||!i||!i.isEnabled)return;i.execute({shouldMergeOnBlocksContentLevel:ti(t.model,"forward")}),n.preventDefault(),r.stop()}})},{context:"li"})}_setupEnterIntegration(){let t=this.editor,e=t.model,i=t.commands,r=i.get("enter");this.listenTo(t.editing.view.document,"enter",(i,r)=>{let n=e.document,s=n.selection.getFirstPosition().parent;if(n.selection.isCollapsed&&h(s)&&s.isEmpty&&!r.isSoft){let e=y(s),n=k(s);e&&n?(t.execute("outdentList"),r.preventDefault(),i.stop()):e&&!n?(t.execute("splitListItemAfter"),r.preventDefault(),i.stop()):n&&(t.execute("splitListItemBefore"),r.preventDefault(),i.stop())}},{context:"li"}),this.listenTo(r,"afterExecute",()=>{let e=i.get("splitListItemBefore");e.refresh(),e.isEnabled&&2===b(t.model.document.selection.getLastPosition().parent).length&&e.execute()})}_setupTabIntegration(){let t=this.editor;this.listenTo(t.editing.view.document,"tab",(e,i)=>{let r=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(r).isEnabled&&(t.execute(r),i.stopPropagation(),i.preventDefault(),e.stop())},{context:"li"})}_setupConversion(){var t,e;
1let i=this.editor,r=i.model,n=this.getListAttributeNames(),s=i.config.get("list.multiBlock"),l=s?"paragraph":"listItem";i.conversion.for("upcast").elementToElement({view:"li",model:(t,{writer:e})=>e.createElement(l,{listType:""})}).elementToElement({view:"p",model:(t,{writer:e})=>t.parent&&t.parent.is("element","li")?e.createElement(l,{listType:""}):null,converterPriority:"high"}).add(t=>{t.on("element:li",(t,e,i)=>{let{writer:r,schema:n}=i;if(!e.modelRange)return;let s=Array.from(e.modelRange.getItems({shallow:!0})).filter(t=>n.checkAttribute(t,"listItemId"));if(!s.length)return;let l=e.viewItem.getAttribute("data-list-item-id")||p.next();i.consumable.consume(e.viewItem,{attributes:"data-list-item-id"});let o=function(t){let e=0,i=t.parent;for(;i;){if(H(i))e++;else{let t=i.previousSibling;t&&H(t)&&e++}i=i.parent}return e}(e.viewItem),a=e.viewItem.parent&&e.viewItem.parent.is("element","ol")?"numbered":"bulleted",u=s[0].getAttribute("listType");u&&(a=u);let d={listItemId:l,listIndent:o,listType:a};for(let t of s)t.hasAttribute("listItemId")||r.setAttributes(d,t);s.length>1&&s[1].getAttribute("listItemId")!=d.listItemId&&i.keepEmptyElement(s[0])})}),s||i.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),i.conversion.for("editingDowncast").elementToElement({model:l,view:Q(n),converterPriority:"high"}).add(t=>{var e;t.on("attribute",Y(n,this._downcastStrategies,r)),t.on("remove",(e=r.schema,(t,i,r)=>{let{writer:n,mapper:s}=r,l=t.name.split(":")[1];if(!e.checkAttribute(l,"listItemId"))return;let o=s.toViewPosition(i.position),a=i.position.getShiftedBy(i.length),u=s.toViewPosition(a,{isPhantom:!0}),d=n.createRange(o,u).getTrimmed().end.nodeBefore;d&&X(d,n,s)}))}),i.conversion.for("dataDowncast").elementToElement({model:l,view:Q(n,{dataPipeline:!0}),converterPriority:"high"}).add(t=>{t.on("attribute",Y(n,this._downcastStrategies,r,{dataPipeline:!0}))});let o=(t=this._downcastStrategies,e=i.editing.view,(i,r)=>{if(r.modelPosition.offset>0)return;let n=r.modelPosition.parent;if(!h(n)||!t.some(t=>"itemMarker"==t.scope&&t.canInjectMarkerIntoElement&&t.canInjectMarkerIntoElement(n)))return;let s=r.mapper.toViewElement(n),l=e.createRangeIn(s),o=l.getWalker(),a=l.start;for(let{item:t}of o){if(t.is("element")&&r.mapper.toModelElement(t)||t.is("$textProxy"))break;t.is("element")&&t.getCustomProperty("listItemMarker")&&(a=e.createPositionAfter(t),o.skip(({previousPosition:t})=>!t.isEqual(a)))}r.viewPosition=a});i.editing.mapper.on("modelToViewPosition",o),i.data.mapper.on("modelToViewPosition",o),this.listenTo(r.document,"change:data",function(t,e,i,r){return()=>{let s=t.document.differ.getChanges(),l=[],o=new Set,a=new Set,u=new Set;for(let t of s)if("insert"==t.type&&"$text"!=t.name)G(t.position,o,u),t.attributes.has("listItemId")?a.add(t.position.nodeAfter):G(t.position.getShiftedBy(t.length),o,u);else if("remove"==t.type&&t.attributes.has("listItemId"))G(t.position,o,u);else if("attribute"==t.type){let e=t.range.start.nodeAfter;i.includes(t.attributeKey)?(G(t.range.start,o,u),null===t.attributeNewValue?(G(t.range.start.getShiftedBy(1),o,u),n(e)&&l.push(e)):a.add(e)):h(e)&&n(e)&&l.push(e)}for(let t of o.values())l.push(...function(t,s){let l=[],o=new Set,a=[];for(let{node:u,previous:d}of new f(t)){if(o.has(u))continue;let t=u.getAttribute("listIndent");d&&t<d.getAttribute("listIndent")&&(a.length=t+1),a[t]={modelAttributes:Object.fromEntries(Array.from(u.getAttributes()).filter(([t])=>i.includes(t))),modelElement:u};let c=I(u,{direction:"forward"});for(let t of c)o.add(t),n(t,c)?l.push(t):function(t,i,n){if(n.has(t))return!1;let s=e.mapper.toViewElement(t),l=i.length-1;for(let t=s.parent;!t.is("editableElement");t=t.parent){var o;let e=H(t),n=(o=t).is("element","ol")||o.is("element","ul");if(!n&&!e)continue;let s=`checkAttributes:${e?"item":"list"}`;if(r.fire(s,{viewElement:t,modelAttributes:i[l].modelAttributes,modelReferenceElement:i[l].modelElement}))break;if(n&&--l<0)return!1}return!0}(t,a,s)&&l.push(t)}return l}(t,a));for(let t of new Set(l))e.reconvertItem(t)};function n(t,n){let s=e.mapper.toViewElement(t);if(!s)return!1;if(function(t){for(t=t.parent;t.is("attributeElement")&&["ol","ul","li"].includes(t.name);)t=t.parent;return!(!t.getCustomProperty("$structureSlotParent")||e.mapper.toModelElement(t))}(s)||r.fire("checkElement",{modelElement:t,viewElement:s}))return!0;
1if(!t.is("element","paragraph")&&!t.is("element","listItem"))return!1;let l=Z(t,i,n);return!!(l&&s.is("element","p"))||!!(!l&&s.is("element","span"))}}(r,i.editing,n,this),{priority:"high"}),this.on("checkAttributes:item",(t,{viewElement:e,modelAttributes:i})=>{e.id!=i.listItemId&&(t.return=!0,t.stop())}),this.on("checkAttributes:list",(t,{viewElement:e,modelAttributes:i})=>{(e.name!=U(i.listType)||e.id!=J(i.listType,i.listIndent))&&(t.return=!0,t.stop())})}_setupModelPostFixing(){let t=this.editor.model,e=this.getListAttributeNames();t.document.registerPostFixer(i=>(function(t,e,i,r){let n=t.document.differ.getChanges(),s=new Set,l=new Set,o=r.editor.config.get("list.multiBlock"),a=!1;for(let r of n){if("insert"==r.type&&"$text"!=r.name){let n=r.position.nodeAfter;if(!t.schema.checkAttribute(n,"listItemId"))for(let t of Array.from(n.getAttributeKeys()))i.includes(t)&&(e.removeAttribute(t,n),a=!0);for(let{item:e,previousPosition:i}of(G(r.position,l,s),r.attributes.has("listItemId")||G(r.position.getShiftedBy(r.length),l,s),t.createRangeIn(n)))h(e)&&G(i,l,s)}else"remove"==r.type?G(r.position,l,s):"attribute"==r.type&&i.includes(r.attributeKey)&&
1(G(r.range.start,l,s),null===r.attributeNewValue&&G(r.range.start.getShiftedBy(1),l,s));if(!o&&"attribute"==r.type&&tt.includes(r.attributeKey)){let t=r.range.start.nodeAfter;null===r.attributeNewValue&&t&&t.is("element","listItem")?(e.rename(t,"paragraph"),a=!0):null===r.attributeOldValue&&t&&t.is("element")&&"listItem"!=t.name&&(e.rename(t,"listItem"),a=!0)}}let u=new Set;for(let t of l.values())a=r.fire("postFixer",{listNodes:new g(t),listHead:t,writer:e,seenIds:u})||a;return a})(t,i,e,this)),this.on("postFixer",(t,{listNodes:e,writer:i})=>{t.return=function(t,e){let i=0,r=-1,n=null,s=!1;for(let{node:l}of t){let t=l.getAttribute("listIndent");if(t>i){let o;null===n?(n=t-i,o=i):(n>t&&(n=t),o=t-n),o>r+1&&(o=r+1),e.setAttribute("listIndent",o,l),s=!0,r=o}else n=null,i=t+1,r=t}return s}(e,i)||t.return},{priority:"high"}),this.on("postFixer",(t,{listNodes:e,writer:i,seenIds:r})=>{t.return=function(t,e,i){let r=new Set,n=!1;for(let{node:s}of t){if(r.has(s))continue;let t=s.getAttribute("listType"),l=s.getAttribute("listItemId");if(e.has(l)&&(l=p.next()),e.add(l),s.is("element","listItem")){s.getAttribute("listItemId")!=l&&(i.setAttribute("listItemId",l,s),n=!0);continue}for(let e of I(s,{direction:"forward"}))r.add(e),e.getAttribute("listType")!=t&&(l=p.next(),t=e.getAttribute("listType")),e.getAttribute("listItemId")!=l&&(i.setAttribute("listItemId",l,e),n=!0)}return n}(e,r,i)||t.return},{priority:"high"})}_setupClipboardIntegration(){var t;let e=this.editor.model,i=this.editor.plugins.get("ClipboardPipeline");this.listenTo(e,"insertContent",(t=e,(e,[i,r])=>{let n,s=i.is("documentFragment")?Array.from(i.getChildren()):[i];if(!s.length)return;let l=(r?t.createSelection(r):t.document.selection).getFirstPosition();if(h(l.parent))n=l.parent;else{if(!(h(l.nodeBefore)&&h(l.nodeAfter)))return;n=l.nodeBefore}t.change(t=>{let e=n.getAttribute("listType"),i=Math.max(n.getAttribute("listIndent")-(s[0].getAttribute("listIndent")||0),0);for(let r of s){let s=h(r);n.is("element","listItem")&&r.is("element","paragraph")&&t.rename(r,"listItem"),t.setAttributes({listIndent:(s?r.getAttribute("listIndent"):0)+i,listItemId:s?r.getAttribute("listItemId"):p.next(),listType:e},r)}})}),{priority:"high"}),this.listenTo(i,"outputTransformation",(t,i)=>{e.change(t=>{let e=Array.from(i.content.getChildren()),r=e[e.length-1];if(e.length>1&&r.is("element")&&r.isEmpty&&e.slice(0,-1).every(h)&&t.remove(r),"copy"==i.method||"cut"==i.method){let e=Array.from(i.content.getChildren());x(e)&&F(e,t,this.getListAttributeNames())}})})}_setupAccessibilityIntegration(){let t=this.editor,e=t.t;t.accessibility.addKeystrokeInfoGroup({id:"list",label:e("Keystrokes that can be used in a list"),keystrokes:[{label:e("Increase list item indent"),keystroke:"Tab"},{label:e("Decrease list item indent"),keystroke:"Shift+Tab"}]})}_setupListItemIdConversionStrategy(){this.registerDowncastStrategy({scope:"item",attributeName:"listItemId",setAttributeOnDowncast(t,e,i,r){r&&(r.skipListItemIds||r.isClipboardPipeline)||t.setAttribute("data-list-item-id",e,i)}})}}function ti(t,e){let i=t.document.selection;if(!i.isCollapsed)return!T(t);if("forward"===e)return!0;let r=i.getFirstPosition().parent,n=r.previousSibling;return!t.schema.isObject(n)&&(!!n.isEmpty||x([r,n]))}
1function tr(t,e,i,r){t.ui.componentFactory.add(e,()=>{let n=tn(u._,t,e,i,r);return n.set({tooltip:!0,isToggleable:!0}),n}),t.ui.componentFactory.add(`menuBar:${e}`,()=>{let n=tn(u.kS,t,e,i,r);return n.set({role:"menuitemcheckbox",isToggleable:!0}),n})}function tn(t,e,i,r,n){let s=e.commands.get(i),l=new t(e.locale);return l.set({label:r,icon:n}),l.bind("isOn","isEnabled").to(s,"value","isEnabled"),l.on("execute",()=>{e.execute(i),e.editing.view.focus()}),l}class ts extends r.k_{static get pluginName(){return"ListUI"}static get isOfficialPlugin(){return!0}init(){let t=this.editor.t;this.editor.ui.componentFactory.has("numberedList")||tr(this.editor,"numberedList",t("Numbered List"),d.mgI),this.editor.ui.componentFactory.has("bulletedList")||tr(this.editor,"bulletedList",t("Bulleted List"),d.dwx)}}class tl extends r.k_{static get requires(){return[te,ts]}static get pluginName(){return"List"}static get isOfficialPlugin(){return!0}}r.uB;let to={},ta={},tu={},td=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"},{listStyle:"arabic-indic",typeAttribute:null,listType:"numbered"}];for(let{listStyle:t,typeAttribute:e,listType:i}of td)to[t]=i,ta[t]=e,e&&(tu[e]=t);r.uB,r.uB;r.k_;r.k_,u.Ss,r.uB;class tc extends r.uB{type;constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){let e=this.editor.model,i=Array.from(e.document.selection.getSelectedBlocks()).filter(t=>tf(t,e.schema)),r=void 0!==t.forceValue?!t.forceValue:this.value;e.change(t=>{if(r){let e=i[i.length-1].nextSibling,r=1/0,n=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){let t=e.getAttribute("listIndent");t<r&&(r=t);let i=t-r;n.push({element:e,listIndent:i}),e=e.nextSibling}for(let e of n=n.reverse())t.setAttribute("listIndent",e.listIndent,e.element)}if(!r){let t=1/0;for(let e of i)e.is("element","listItem")&&e.getAttribute("listIndent")<t&&(t=e.getAttribute("listIndent"));tm(i,!0,t=0===t?1:t),tm(i,!1,t)}for(let e of i.reverse())r&&"listItem"==e.name?t.rename(e,"paragraph"):r||"listItem"==e.name?r||"listItem"!=e.name||e.getAttribute("listType")==this.type||t.setAttribute("listType",this.type,e):(t.setAttributes({listType:this.type,listIndent:0},e),t.rename(e,"listItem"));this.fire("_executeCleanup",i)})}_getValue(){let t=(0,l.$1)(this.editor.model.document.selection.getSelectedBlocks());return!!t&&t.is("element","listItem")&&t.getAttribute("listType")==this.type}_checkEnabled(){if(this.value)return!0;let t=this.editor.model.document.selection,e=this.editor.model.schema,i=(0,l.$1)(t.getSelectedBlocks());return!!i&&tf(i,e)}}function tm(t,e,i){let r=e?t[0]:t[t.length-1];if(r.is("element","listItem")){let n=r[e?"previousSibling":"nextSibling"],s=r.getAttribute("listIndent");for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=i;)s>n.getAttribute("listIndent")&&(s=n.getAttribute("listIndent")),n.getAttribute("listIndent")==s&&t[e?"unshift":"push"](n),n=n[e?"previousSibling":"nextSibling"]}}function tf(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class tg extends r.uB{_indentBy;constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){let t=this.editor.model,e=Array.from(t.document.selection.getSelectedBlocks());t.change(t=>{let i=e[e.length-1],r=i.nextSibling;for(;r&&"listItem"==r.name&&r.getAttribute("listIndent")>i.getAttribute("listIndent");)e.push(r),r=r.nextSibling;for(let i of(this._indentBy<0&&(e=e.reverse()),e)){let e=i.getAttribute("listIndent")+this._indentBy;e<0?t.rename(i,"paragraph"):t.setAttribute("listIndent",e,i)}this.fire("_executeCleanup",e)})}_checkEnabled(){let t=(0,l.$1)(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){let e=t.getAttribute("listIndent"),i=t.getAttribute("listType"),r=t.previousSibling;for(;r&&r.is("element","listItem")&&r.getAttribute("listIndent")>=e;){if(r.getAttribute("listIndent")==e)return r.getAttribute("listType")==i;r=r.previousSibling}return!1}return!0}}function tp(t,e){let i=[],r=t.parent,n=r.getAttribute("listIndent");for(let s of[...new c.oDe({ignoreElementEnd:!1,startPosition:t,shallow:!0,direction:e})].filter(t=>t.item.is("element")).map(t=>t.item)){if(!s.is("element","listItem")||s.getAttribute("listIndent")<n)break;if(!(s.getAttribute("listIndent")>
1n)){if(s.getAttribute("listType")!==r.getAttribute("listType")||s.getAttribute("listStyle")!==r.getAttribute("listStyle")||s.getAttribute("listReversed")!==r.getAttribute("listReversed")||s.getAttribute("listStart")!==r.getAttribute("listStart"))break;"backward"===e?i.unshift(s):i.push(s)}}return i}function th(t){let e=[...t.document.selection.getSelectedBlocks()].filter(t=>t.is("element","listItem")).map(e=>{let i=t.change(t=>t.createPositionAt(e,0));return[...tp(i,"backward"),...tp(i,"forward")]}).flat();return[...new Set(e)]}let tb=["disc","circle","square"],tI=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function tA(t){return tb.includes(t)?"bulleted":tI.includes(t)?"numbered":null}class ty extends r.k_{static get pluginName(){return"LegacyListUtils"}static get isOfficialPlugin(){return!0}getListTypeFromListStyleType(t){return tA(t)}getSelectedListItems(t){return th(t)}getSiblingNodes(t,e){return tp(t,e)}}r.k_,r.uB,r.uB,r.uB;r.k_;r.uB}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.