var ContentBuilder=function(){"use strict";class t{constructor(t){this.builder=t,this.dom=new e}cellSelected(){return document.querySelector(".cell-active")}builderStuff(){return document.querySelector("#_cbhtml")}cellNext(t){const e=this.dom;let i=t.nextElementSibling;return i?e.hasClass(i,"is-row-tool")||e.hasClass(i,"is-rowadd-tool")||e.hasClass(i,"is-row-overlay")?null:i:null}out(t){if(this.builder){let e=this.builder.opts.lang[t];return e||(this.builder.checkLang&&console.log(t),t)}return t}confirm(t,e){const i=this.dom;let n=`
\n
\n

${t}

\n \n
\n
`;const o=this.builder.builderStuff;let s=o.querySelector(".is-confirm");s||(i.appendHtml(o,n),s=o.querySelector(".is-confirm")),this.showModal(s,!1,(()=>{s.parentNode.removeChild(s),e(!1)}),!0);let r=s.querySelector(".is-confirm .input-ok");i.addEventListener(r,"click",(()=>{this.hideModal(s),s.parentNode.removeChild(s),e(!0)}))}showModal(t,e,i,n){const o=this.dom;o.addClass(t,"active");let s=!1;if(this.builder?this.builder.opts.animateModal&&(s=!0,n||(s=!1)):n&&(s=!0),s&&this.builder){const t=document.querySelectorAll(this.builder.opts.container);Array.prototype.forEach.call(t,(t=>{t.style.transform=`scale(${this.builder.opts.zoom-.02})`,t.style.WebkitTransform=`scale(${this.builder.opts.zoom-.02})`,t.style.MozTransform=`scale(${this.builder.opts.zoom-.02})`,t.setAttribute("scaled-down","1")}))}if(!t.querySelector(".is-modal-overlay")){let n;if(n=e?'
':'
',t.insertAdjacentHTML("afterbegin",n),!e){let e=t.querySelector(".is-modal-overlay");o.addEventListener(e,"click",(()=>{i&&i(),this.hideModal(t)}))}}}hideModal(t){if(this.builder){const t=document.querySelectorAll(this.builder.opts.container);Array.prototype.forEach.call(t,(t=>{t.getAttribute("scaled-down")&&(t.style.transform=`scale(${this.builder.opts.zoom})`,t.style.WebkitTransform=`scale(${this.builder.opts.zoom})`,t.style.MozTransform=`scale(${this.builder.opts.zoom})`,t.removeAttribute("scaled-down"))}))}this.dom.removeClass(t,"active")}fixLayout(t){const e=this.dom;let i=2;t.querySelector(".is-row-overlay")&&(i=3);const n=t.childElementCount-i,o=this.builder.opts.row,s=this.builder.opts.cols,r=this.builder.opts.colequal;if(r.length>0){e.elementChildren(t).forEach((t=>{if(!(e.hasClass(t,"is-row-tool")||e.hasClass(t,"is-rowadd-tool")||e.hasClass(t,"is-row-overlay"))){for(let i=0;i<=s.length-1;i++)e.removeClass(t,s[i]);for(let i=0;i<=r.length-1;i++)if(r[i].length===n){e.addClass(t,r[i][0]);break}1===n&&e.addClass(t,s[s.length-1])}}))}else if(""!==o&&s.length>0){let i=0;e.elementChildren(t).forEach((t=>{if(!(e.hasClass(t,"is-row-tool")||e.hasClass(t,"is-rowadd-tool")||e.hasClass(t,"is-row-overlay"))){i++;for(var o=0;o<=s.length-1;o++)e.removeClass(t,s[o]);1===n&&e.addClass(t,s[11]),2===n&&e.addClass(t,s[5]),3===n&&e.addClass(t,s[3]),4===n&&e.addClass(t,s[2]),5===n&&(5===i?e.addClass(t,s[3]):e.addClass(t,s[1])),6===n&&e.addClass(t,s[1]),7===n&&(i>=6?e.addClass(t,s[0]):e.addClass(t,s[1])),8===n&&(i>=5?e.addClass(t,s[0]):e.addClass(t,s[1])),9===n&&(i>=4?e.addClass(t,s[0]):e.addClass(t,s[1])),10===n&&(i>=3?e.addClass(t,s[0]):e.addClass(t,s[1])),11===n&&(i>=2?e.addClass(t,s[0]):e.addClass(t,s[1])),12===n&&e.addClass(t,s[0])}}))}}addContent(t,e,i){const n=this.dom;this.builder.opts.onAdd&&(t=this.builder.opts.onAdd(t));const o=this.cellSelected();let s;if(o)s=o.parentNode;else{if(s=document.querySelector(".row-active"),!s)return;e="row"}if("cell"===e||"cell-left"===e||"cell-right"===e){let r=4;this.builder.maxColumns&&(r=this.builder.maxColumns);let l,a=2;if(s.querySelector(".is-row-overlay")&&(a=3),s.childElementCount>=r+a)return alert(this.out("You have reached the maximum number of columns")),!1;if(this.builder.uo.saveForUndo(),""===this.builder.opts.row){let e=this.builder.opts.cellFormat,i=e.indexOf("0&&(l=l[0],n.elementChildren(l).length>0);)l=n.elementChildren(l);l.innerHTML=t,o=l.firstChild,i&&o.setAttribute(i,"")}else o=n.createElement("div"),n.addClass(o,this.builder.opts.cols[this.builder.opts.cols.length-1]),o.innerHTML=t,i&&o.setAttribute(i,""),e=n.createElement("div"),n.addClass(e,this.builder.opts.row),n.appendChild(e,o);s.parentNode.insertBefore(e,s),n.moveAfter(e,s);let r=document.querySelector(".builder-active");r&&this.builder.applyBehaviorOn(r),o.click()}if("elm"===e){let e=this.builder.activeElement;if(!e)return;this.builder.uo.saveForUndo();let i=e;i.insertAdjacentHTML("afterend",t);let n=document.querySelector(".builder-active");n&&this.builder.applyBehaviorOn(n);let o=i.nextElementSibling;var r;if("img"===o.tagName.toLowerCase())clearTimeout(r),r=setTimeout((()=>{o.complete&&o.click()}),200);else o.click()}this.builder.opts.onChange()}htmlToElement(t){var e=document.createElement("template");return t=t.trim(),e.innerHTML=t,e.content.firstChild}addSnippet(t,e,i){this.builder.uo.saveForUndo();const n=this.dom;let o,s,r,l,a=!1;const d=this.builder.builderStuff.querySelector(".quickadd").getAttribute("data-mode");if(!e||"cell"!==d&&"cell-left"!==d&&"cell-right"!==d){if(e&&"row"===d){let e;if(r=document.createElement("div"),r.className=this.builder.opts.cols[this.builder.opts.cols.length-1],r.innerHTML=t,i&&r.setAttribute("data-noedit",""),o=document.createElement("div"),o.className=this.builder.opts.row,o.appendChild(r),s=this.builder.cellSelected(),s?e=s.parentNode:(e=document.querySelector(".row-active"),e||(a=!0)),a){const t=document.querySelectorAll(".is-builder"),i=t[t.length-1],o=n.elementChildren(i);e=o[o.length-1]}e.parentNode.insertBefore(o,e),n.moveAfter(o,e);let d=document.querySelector(".builder-active");d&&this.builder.applyBehaviorOn(d),r.click(),o.className=o.className.replace("row-outline",""),l=document.querySelector(".is-column-tool"),l.className=l.className.replace("active","")}else{if(e)return void(i?this.addContent(t,d,"data-noedit"):this.addContent(t,d));{var c=document.createElement("div");c.innerHTML=t;var u=c.querySelectorAll("[data-html]");if(Array.prototype.forEach.call(u,(e=>{t=(t=decodeURIComponent(e.getAttribute("data-html"))).replace(/{id}/g,this.makeId());for(var i=1;i<=20;i++)t=t.replace("[%HTML"+i+"%]",void 0===e.getAttribute("data-html-"+i)?"":decodeURIComponent(e.getAttribute("data-html-"+i)));e.innerHTML=t})),1===c.childNodes.length&&1===c.childNodes[0].childNodes.length&&("cell"===d||"cell-left"===d||"cell-right"===d)){const t=this.cellSelected();let e=t.parentNode,i=4;if(this.builder.maxColumns&&(i=this.builder.maxColumns),e.querySelector(".is-row-overlay")){if(e.childElementCount>=i+3)return alert(this.out("You have reached the maximum number of columns")),!1}else if(e.childElementCount>=i+2)return alert(this.out("You have reached the maximum number of columns")),!1;this.builder.uo.saveForUndo();let n=c.childNodes[0].childNodes[0];var p=document.createRange();t.parentNode.insertBefore(p.createContextualFragment(n.outerHTML),t),"cell"!==d&&"cell-right"!==d||(t.parentNode.insertBefore(t.previousElementSibling,t),t.parentNode.insertBefore(t,t.previousElementSibling));let o=document.querySelector(".builder-active");return o&&this.builder.applyBehaviorOn(o),this.fixLayout(e),"cell"===d||"cell-right"===d?t.nextElementSibling.click():t.previousElementSibling.click(),void this.builder.opts.onChange()}let e;if(s=this.builder.activeCol,s?e=s.parentNode:(e=document.querySelector(".row-active"),e||(a=!0)),a){const t=document.querySelectorAll(".is-builder"),i=t[t.length-1],o=n.elementChildren(i);e=o[o.length-1]}p=document.createRange(),e.parentNode.insertBefore(p.createContextualFragment(c.innerHTML),e.nextSibling),o=c.childNodes[0],o=e.nextElementSibling;let i=document.querySelector(".builder-active");i&&this.builder.applyBehaviorOn(i),r=o.childNodes[0],r.click(),o.className=o.className.replace("row-outline",""),l=document.querySelector(".is-column-tool"),l.className=l.className.replace("active","")}}this.builder.opts.onChange()}else i?this.addContent(t,d,"data-noedit"):this.addContent(t,d)}clearActiveCell(){const t=this.builder.builderStuff;if(!t)return;if(t.getAttribute("preventDevault"))return void setTimeout((()=>{t.removeAttribute("preventDevault")}),30);const e=this.dom;let i=document.getElementsByClassName("cell-active");for(;i.length;)i[0].classList.remove("cell-active");for(i=document.getElementsByClassName("row-outline");i.length;)i[0].classList.remove("row-outline");for(i=document.getElementsByClassName("row-active");i.length;)i[0].classList.remove("row-active");for(i=document.getElementsByClassName("builder-active");i.length;)i[0].classList.remove("builder-active");let n=t.querySelector(".is-column-tool");e.removeClass(n,"active"),t.querySelector(".is-element-tool").style.display="",this.builder.activeCol=null}clearAfterUndoRedo(){const t=this.dom,e=this.builder.builderStuff;let i=e.querySelectorAll(".is-tool");Array.prototype.forEach.call(i,(t=>{t.style.display=""})),this.builder.moveable.updateRect(),document.querySelector(".moveable-control-box").style.display="none",this.builder.activeSpacer=null,this.builder.activeCodeBlock=null,this.builder.activeLink=null,this.builder.activeIframe=null,this.builder.activeTd=null,this.builder.activeTable=null,this.builder.activeModule=null;const n=document.querySelectorAll(".icon-active");Array.prototype.forEach.call(n,(e=>{t.removeClass(e,"icon-active")})),this.builder.activeIcon=null;let o=e.querySelector(".is-rte-tool").querySelectorAll("button");Array.prototype.forEach.call(o,(e=>{t.removeClass(e,"on")})),o=e.querySelector(".is-elementrte-tool").querySelectorAll("button"),Array.prototype.forEach.call(o,(e=>{t.removeClass(e,"on")}));let s=e.querySelectorAll(".is-pop");Array.prototype.forEach.call(s,(t=>{t.style.display=""}))}hideControls(){let t=this.builder.builderStuff.querySelectorAll(".is-tool");Array.prototype.forEach.call(t,(t=>{t.style.display=""})),this.builder.moveable.updateRect(),document.querySelector(".moveable-control-box").style.display="none"}clearActiveElement(t){const e=this.dom,i=this.builder.builderStuff,n=document.querySelectorAll(".icon-active");Array.prototype.forEach.call(n,(t=>{e.removeClass(t,"icon-active")}));let o=document.querySelectorAll(".elm-inspected");if(Array.prototype.forEach.call(o,(t=>{e.removeClass(t,"elm-inspected")})),o=document.querySelectorAll(".elm-active"),Array.prototype.forEach.call(o,(t=>{e.removeClass(t,"elm-active")})),i.querySelector(".is-element-tool").style.display="",i.querySelector("#divLinkTool").style.display="",t){this.builder.activeIcon=null,this.builder.inspectedElement=null,this.builder.activeElement=null;let t=i.querySelector(".is-rte-tool");t&&(t.style.display="none");let e=i.querySelector(".is-elementrte-tool");e&&(e.style.display="flex");let n=i.querySelector(".rte-more-options");n&&(n.style.display="");let o=i.querySelector(".elementrte-more-options");o&&(o.style.display="");let s=e.querySelectorAll("button[data-align]");Array.prototype.forEach.call(s,(t=>{t.style.display="none"})),this.builder.rte.positionToolbar()}}clearControls(){const t=this.dom,e=this.builder.builderStuff;if(!e)return;if(e.getAttribute("preventDevault"))return void setTimeout((()=>{e.removeAttribute("preventDevault")}),30);let i=e.querySelectorAll(".is-tool");Array.prototype.forEach.call(i,(t=>{t.style.display=""})),this.builder.moveable.updateRect(),document.querySelector(".moveable-control-box").style.display="none",this.builder.activeSpacer=null,this.builder.activeCodeBlock=null,this.builder.activeLink=null,this.builder.activeIframe=null,this.builder.activeTd=null,this.builder.activeTable=null,this.builder.activeModule=null,this.builder.activeImage=null;const n=document.querySelectorAll(".icon-active");Array.prototype.forEach.call(n,(e=>{t.removeClass(e,"icon-active")})),this.builder.activeIcon=null;let o=document.querySelectorAll(".ovl");Array.prototype.forEach.call(o,(t=>{t.style.display="block"}));var s=e.querySelectorAll(".is-side.elementstyles");Array.prototype.forEach.call(s,(e=>{t.removeClass(e,"active")}));let r=document.querySelectorAll("[data-saveforundo]");Array.prototype.forEach.call(r,(t=>{t.removeAttribute("data-saveforundo")})),r=document.querySelectorAll(".elm-inspected"),Array.prototype.forEach.call(r,(e=>{t.removeClass(e,"elm-inspected")}));let l=e.querySelector(".is-rte-tool");l&&(l.style.display="none");let a=e.querySelector(".is-elementrte-tool");a&&(a.style.display="none");let d=e.querySelector(".rte-more-options");d&&(d.style.display="");let c=e.querySelector(".elementrte-more-options");c&&(c.style.display=""),r=document.querySelectorAll(".elm-active"),Array.prototype.forEach.call(r,(e=>{t.removeClass(e,"elm-active")}));let u=e.querySelectorAll(".is-rte-pop");Array.prototype.forEach.call(u,(e=>{e.style.display="",t.removeClass(e,"active"),t.removeClass(e,"deactive")})),this.builder.colTool.lockIndicator.style.display=""}makeId(){let t="",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let i=0;i<2;i++)t+=e.charAt(Math.floor(Math.random()*e.length));let i="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let t=0;t<5;t++)i+=n.charAt(Math.floor(Math.random()*n.length));return t+i}saveSelection(){if(window.getSelection){let t=window.getSelection();if(t.getRangeAt&&t.rangeCount){let e=[];for(let i=0,n=t.rangeCount;i","gi"):new RegExp("<(/)*(meta|link|\\?xml:|st1:|o:|font)(.*?)>","gi"),n=n.replace(i,"");let s,r=["style","script","applet","embed","noframes","noscript"];for(let t=0;t","gi"),n=n.replace(i,"");s=e?["style","start"]:["start"];for(let t=0;t]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s/>]))[^>]*>/gi,""),n=n.replace(/<(\/?)s>/gi,"<$1strike>"),n=n.replace(/ /gi," "),n=n.replace(/background-color: rgba\(200, 200, 201, 0.11\);/gi,""),n=n.replace(/background-color: rgba\(200, 200, 201, 0.11\)/gi,""),n}checkEmpty(){const t=document.querySelectorAll(this.builder.opts.container);Array.prototype.forEach.call(t,(t=>{this.checkEmptyOn(t)}))}checkEmptyOn(t){const e=this.dom,i=e.elementChildren(t);let n=!0;if(i.forEach((t=>{e.hasClass(t,"row-add-initial")||e.hasClass(t,"dummy-space")||(n=!1)})),n){let i=t.querySelector(".row-add-initial");i||(t.innerHTML=`\n \n \n \n \n \n ');const t=this.builder.builderStuff.querySelector(".style-helper"),e=this.builder.builderStuff.querySelector(".style-helper-input"),i=this.builder.builderStuff.querySelector(".style-helper-label"),n=this.builder.builderStuff.querySelector(".style-helper-select"),o=this.builder.builderStuff.querySelector(".style-helper-button-classic");this.builder.styleModalColor=this.getUIStyleValue(t,"modal-color","background-color"),this.builder.styleModalBackground=this.getUIStyleValue(t,"modal-background","background-color"),this.builder.styleButtonPickColorBorder=this.getUIStyleValue(t,"button-pickcolor-border","border"),this.builder.styleButtonPickColorBackground=this.getUIStyleValue(t,"button-pickcolor-background","background-color"),this.builder.styleToolBackground=window.getComputedStyle(t,null).getPropertyValue("background-color"),this.builder.styleButtonColor=window.getComputedStyle(t,null).getPropertyValue("color"),this.builder.styleButtonSvgFill=window.getComputedStyle(t.querySelector("svg"),null).getPropertyValue("fill"),this.builder.styleButtonBackgroundHover=this.getUIStyleValue(t,"hover","background-color"),this.builder.styleSnippetColor=this.getUIStyleValue(t,"snippet-color","background-color"),this.builder.styleSnippetBackground=this.getUIStyleValue(t,"snippet-background","background-color"),this.builder.styleSnippetTabsBackground=this.getUIStyleValue(t,"snippet-tabs-background","background-color"),this.builder.styleSnippetTabItemBackground=this.getUIStyleValue(t,"snippet-tab-item-background","background-color"),this.builder.styleSnippetTabItemBackgroundActive=this.getUIStyleValue(t,"snippet-tab-item-background-active","background-color"),this.builder.styleSnippetTabItemBackgroundHover=this.getUIStyleValue(t,"snippet-tab-item-background-hover","background-color"),this.builder.styleSnippetTabItemColor=this.getUIStyleValue(t,"snippet-tab-item-color","background-color"),this.builder.styleSnippetMoreItemBackground=this.getUIStyleValue(t,"snippet-more-item-background","background-color"),this.builder.styleSnippetMoreItemBackgroundActive=this.getUIStyleValue(t,"snippet-more-item-background-active","background-color"),this.builder.styleSnippetMoreItemBackgroundHover=this.getUIStyleValue(t,"snippet-more-item-background-hover","background-color"),this.builder.styleSnippetMoreItemColor=this.getUIStyleValue(t,"snippet-more-item-color","background-color"),this.builder.styleTabsBackground=this.getUIStyleValue(t,"tabs-background","background-color"),this.builder.styleTabItemBorderBottomActive=this.getUIStyleValue(t,"tab-item-active-border-bottom","border"),this.builder.styleTabItemColor=this.getUIStyleValue(t,"tab-item-color","background-color"),this.builder.styleTabsMoreBackground=this.getUIStyleValue(t,"tabs-more-background","background-color"),this.builder.styleTabsMoreBorder=this.getUIStyleValue(t,"tabs-more-border","border"),this.builder.styleTabsMoreItemColor=this.getUIStyleValue(t,"tabs-more-item-color","background-color"),this.builder.styleTabsMoreBackgroundHover=this.getUIStyleValue(t,"tabs-more-item-background-hover","background-color"),this.builder.styleSeparatorColor=this.getUIStyleValue(t,"separator-color","background-color"),this.builder.styleSelectBackground=window.getComputedStyle(n,null).getPropertyValue("background-color"),this.builder.styleSelectColor=window.getComputedStyle(n,null).getPropertyValue("color"),this.builder.styleSelectOptionBackground=window.getComputedStyle(n.querySelector("option"),null).getPropertyValue("background-color"),this.builder.styleInputBackground=window.getComputedStyle(e,null).getPropertyValue("background-color"),this.builder.styleInputBorderBottom=window.getComputedStyle(e,null).getPropertyValue("border-bottom"),this.builder.styleInputColor=window.getComputedStyle(e,null).getPropertyValue("color"),this.builder.styleLabelColor=window.getComputedStyle(i,null).getPropertyValue("color"),this.builder.styleButtonClassicBackground=window.getComputedStyle(o,null).getPropertyValue("background-color"),this.builder.styleButtonClassicColor=window.getComputedStyle(o,null).getPropertyValue("color"),this.builder.styleButtonClassicBackgroundHover=this.getUIStyleValue(o,"hover","background-color"),this.builder.styleDark=!1,this.builder.styleColored=!1,this.builder.styleColoredDark=!1,this.builder.styleLight=!1,document.body.getAttribute("class")&&(-1!==document.body.getAttribute("class").indexOf("colored-dark")?this.builder.styleColoredDark=!0:-1!==document.body.getAttribute("class").indexOf("dark")?this.builder.styleDark=!0:-1!==document.body.getAttribute("class").indexOf("colored")?this.builder.styleColored=!0:-1!==document.body.getAttribute("class").indexOf("light")&&(this.builder.styleLight=!0))}getUIStyleValue(t,e,i){const n=this.dom;n.addClass(t,e);let o=window.getComputedStyle(t,null).getPropertyValue(i);return n.removeClass(t,e),o}getFontFamilyStyle(t){return`\n html, body {height:100%}\n body {overflow:hidden;margin:0;\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size:100%; \n line-height:1.7;\n }\n #divFontList {margin:0;padding:0 0 9px 9px;height:100%;overflow-y:scroll !important;box-sizing:border-box;}\n #divFontList > div {width:100%;cursor:pointer;overflow:hidden;text-align:center;position:relative;}\n #divFontList > div img {margin:7px 5px 0px 5px;max-width: 230px;max-height: 27px;}\n #divFontList > div div {position:absolute;top:0;left:0;width:100%;height:100%;}\n\n #divFontList > div > div {\n position:absolute;left:0px;top:0px;width:100%;height:100%;\n // z-index: 1;\n }\n\n #divFontList > div {\n color: ${t?this.builder.styleModalColor:this.builder.styleButtonColor};\n background: ${t?this.builder.styleModalBackground:this.builder.styleToolBackground};\n }\n #divFontList > div > div:after {\n // background: rgba(0, 0, 0, 0.04); \n background: ${t?this.builder.styleButtonClassicBackgroundHover:this.builder.styleButtonBackgroundHover};\n position: absolute;\n content: "";\n display: block;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n opacity: 0;\n }\n #divFontList > div:hover > div:after {\n opacity: 1;\n }\n #divFontList > div.on > div:after {\n opacity: 1;\n }\n\n ${this.builder.styleDark||this.builder.styleColoredDark||this.builder.styleColore?"":"\n #divFontList > div img {\n mix-blend-mode: multiply;\n }\n "}\n\n .dark #divFontList > div img {\n ${t?"":"mix-blend-mode: screen;"};\n filter: invert(1);\n }\n .dark #divFontList > div {\n color: ${t?this.builder.styleModalColor:this.builder.styleButtonColor};\n background: ${t?this.builder.styleModalBackground:this.builder.styleToolBackground};\n }\n .dark #divFontList > div > div:after {\n background: ${t?this.builder.styleButtonClassicBackgroundHover:this.builder.styleButtonBackgroundHover};\n }\n \n .colored-dark #divFontList > div img {\n ${t?"":"mix-blend-mode: screen;"};\n ${t?"":"filter: invert(1);"};\n }\n .colored-dark #divFontList > div {\n color: ${t?this.builder.styleModalColor:this.builder.styleButtonColor};\n background: ${t?this.builder.styleModalBackground:this.builder.styleToolBackground};\n }\n .colored-dark #divFontList > div > div:after {\n background: ${t?this.builder.styleButtonClassicBackgroundHover:this.builder.styleButtonBackgroundHover};\n }\n\n\n .colored #divFontList > div img {\n ${t?"":"mix-blend-mode: screen;"};\n ${t?"":"filter: invert(1);"};\n }\n .colored #divFontList > div {\n color: ${t?this.builder.styleModalColor:this.builder.styleButtonColor};\n background: ${t?this.builder.styleModalBackground:this.builder.styleToolBackground};\n }\n .colored #divFontList > div > div:after {\n background: ${t?this.builder.styleButtonClassicBackgroundHover:this.builder.styleButtonBackgroundHover};\n }\n\n\n /* Scrollbar for toolbar/RTE and modal */\n\n .dark * {\n scrollbar-width: thin;\n scrollbar-color: rgba(255, 255, 255, 0.3) auto;\n }\n .dark *::-webkit-scrollbar {\n width: 12px;\n }\n .dark *::-webkit-scrollbar-track {\n background: transparent;\n }\n .dark *::-webkit-scrollbar-thumb {\n background-color:rgba(255, 255, 255, 0.3);\n } \n\n .colored-dark * {\n scrollbar-width: thin;\n scrollbar-color: rgb(100, 100, 100) auto;\n }\n .colored-dark *::-webkit-scrollbar {\n width: 12px;\n }\n .colored-dark *::-webkit-scrollbar-track {\n background: transparent;\n }\n .colored-dark *::-webkit-scrollbar-thumb {\n background-color:rgb(100, 100, 100);\n } \n\n .colored * {\n scrollbar-width: thin;\n scrollbar-color: rgba(0, 0, 0, 0.4) auto;\n }\n .colored *::-webkit-scrollbar {\n width: 12px;\n }\n .colored *::-webkit-scrollbar-track {\n background: transparent;\n }\n .colored *::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.4);\n } \n\n .light * {\n scrollbar-width: thin;\n scrollbar-color: rgba(0, 0, 0, 0.4) auto;\n }\n .light *::-webkit-scrollbar {\n width: 12px;\n }\n .light *::-webkit-scrollbar-track {\n background: transparent;\n }\n .light *::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.4);\n }`}refreshFontFamilyStyle1(){let t=this.builder.rte.rteFontFamilyOptions.querySelector("iframe").contentWindow.document;t.querySelector("#mainstyle").innerHTML=this.getFontFamilyStyle(),this.builder.styleDark?t.body.setAttribute("class","dark"):this.builder.styleColored?t.body.className="colored":this.builder.styleColoredDark?t.body.className="colored-dark":this.builder.styleLight?t.body.className="light":t.body.className=""}refreshFontFamilyStyle2(){let t=this.builder.builderStuff.querySelector(".is-modal.pickfontfamily").querySelector("iframe").contentWindow.document;t.querySelector("#mainstyle").innerHTML=this.getFontFamilyStyle(!0),this.builder.styleDark?t.body.setAttribute("class","dark"):this.builder.styleColored?t.body.className="colored":this.builder.styleColoredDark?t.body.className="colored-dark":this.builder.styleLight?t.body.className="light":t.body.className=""}getFontPreview(){let t=this.builder.fontAssetPath,e="";return e=`\n
\n ${this.out("None")}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n `,e+=`
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n `,e}getFontFamilyHTML(t){return`\n \n \n \n \n Fonts\n \n \n \n\n \n \n\n
\n ${this.getFontPreview()}\n
\n\n