/*!
* froala_editor v4.0.15 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2022 Froala Labs
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(i){"use strict";i=i&&i.hasOwnProperty("default")?i["default"]:i,Object.assign(i.DEFAULTS,{listAdvancedTypes:!0}),i.PLUGINS.lists=function(m){var g=m.$;function d(e){return'')}function f(e){return'')}function o(e,t){!function c(e,t){for(var a=[],n=0;n").concat(l.html(),"").concat(t.toLowerCase(),">"))}}(e,t);var a,n=m.html.defaultTag(),r=null;e.length&&(a="rtl"==m.opts.direction||"rtl"==g(e[0]).css("direction")?"margin-right":"margin-left");for(var o=0;o'):"<".concat(t,">"),s="".concat(t,">");for(l-=r;0"),s+=s,l-=m.opts.indentMargin;n&&e[o].tagName.toLowerCase()==n?g(e[o]).replaceWith("".concat(i,"").concat(g(e[o]).html(),"").concat(s)):g(e[o]).wrap("".concat(i,"").concat(s))}m.clean.lists()}function c(e){var t,a;for(t=e.length-1;0<=t;t--)for(a=t-1;0<=a;a--){if(g(e[a]).find(e[t]).length||e[a]==e[t]){e.splice(t,1);break}if(g(e[a]).contains(e[t])){e.splice(a,1);break}}var n=[];for(t=0;t")),r.append(d("LI")),r.prepend(f("LI"))}r.after(d(o.tagName)),"LI"==o.parentNode.tagName&&(o=o.parentNode.parentNode),n.indexOf(o)<0&&n.push(o)}for(t=0;t<\/span>/g,"$1>")).replace(/<\/span>/g,"<$1>"),c.replaceWith(m.node.openTagString(c.get(0))+p+m.node.closeTagString(c.get(0)))}m.$el.find("li:empty").remove(),m.$el.find("ul:empty, ol:empty").remove(),m.clean.lists(),m.$el.find("ul:empty, ol:empty").remove(),m.html.wrap()}function e(e){if("indent"==e||"outdent"==e){var t=!1,a=m.selection.blocks(),n=[],r=a[0].previousSibling||a[0].parentElement;if("outdent"==e){if("UL"!=a[0].parentNode.tagName&&"UL"!=r.parentNode.tagName&&"OL"!=r.parentNode.tagName&&"LI"!=r.parentNode.tagName)return;if(!a[0].previousSibling&&"none"==r.parentNode.style.listStyleType)return void function l(e){for(m.selection.save();0 ul, > ol").last().get(0);if(n){var r=g(document.createElement("li"));if(n.childNodes.length)for(var o=n.childNodes[0].attributes,l=0;l ul, > ol").last().get(0);if(p)g(p).append(g(e[t]));else{var d=g("<".concat(e[t].parentNode.tagName,">"));g(a).append(d),d.append(g(e[t]))}}}}m.clean.lists(),m.selection.restore()}(n):function s(e){m.selection.save(),c(e),m.selection.restore()}(n))}}return{_init:function t(){m.events.on("commands.after",e),m.events.on("keydown",function(e){if(e.which==i.KEYCODE.TAB){for(var t=m.selection.blocks(),a=[],n=0;n