@richscripts/richtexteditor 2.9.0 → 2.11.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.
@@ -20,7 +20,7 @@ To add context: this extended version unpacks the idea with an additional senten
20
20
  `).split(/\n{2,}/);return d.map(function(w){return"<p>"+H(w).replace(/\n/g,"<br>")+"</p>"}).join("")}}function O(C,y){return C==null?!1:y==="insert"&&typeof r.insertHTML=="function"?(r.insertHTML(C),!0):typeof r.setHTMLCode=="function"?(r.setHTMLCode(C),!0):!1}function V(C,y){var d=y.mode||u.documentImportMode||"replace";return new Promise(function(w){if(!C){w(!1);return}var D=x(C.name);if(typeof u.documentImportResolver=="function")try{var P=u.documentImportResolver(C);Promise.resolve(P).then(function(Z){typeof Z=="string"?w(O(Z,d)):B()},function(){B()});return}catch{B();return}B();function B(){if(D==="docx"){if(!W()){A("This browser can't unpack .docx (no DecompressionStream). Save as .doc/.html/.md, or wire config.documentImportResolver."),w(!1);return}l(C).then(function(fe){fe!=null?w(O(fe,d)):(A("Could not read this .docx file."),w(!1))},function(){A("Could not read this .docx file."),w(!1)});return}if(typeof FileReader>"u"){w(!1);return}var Z=new FileReader;Z.onload=function(){var fe=o(Z.result,D);w(O(fe,d))},Z.onerror=function(){w(!1)},Z.readAsText(C)}})}function K(C){try{var y=document.createElement("input");return y.type="file",y.accept=C.accept||u.documentImportAccept||".md,.markdown,.html,.htm,.txt,.doc,.docx",y.style.position="fixed",y.style.left="-9999px",y.addEventListener("change",function(){var d=y.files&&y.files[0];d&&V(d,C),setTimeout(function(){try{document.body.removeChild(y)}catch{}},0)}),document.body.appendChild(y),y.click(),!0}catch(d){return window.console&&console.error("documentimport: openPicker failed",d),!1}}function W(){return typeof DecompressionStream=="function"&&typeof DOMParser=="function"&&(typeof Response=="function"||typeof Blob=="function")}function q(C,y){for(var d=new DataView(C.buffer,C.byteOffset,C.byteLength),w=-1,D=C.length-22;D>=0&&D>=C.length-22-65536;D--)if(d.getUint32(D,!0)===101010256){w=D;break}if(w<0)return null;for(var P=d.getUint32(w+16,!0),B=d.getUint16(w+10,!0),Z=P,fe=0;fe<B&&d.getUint32(Z,!0)===33639248;fe++){var re=d.getUint16(Z+10,!0),ie=d.getUint32(Z+20,!0),ae=d.getUint16(Z+28,!0),de=d.getUint16(Z+30,!0),se=d.getUint16(Z+32,!0),U=d.getUint32(Z+42,!0),Q=b(C.subarray(Z+46,Z+46+ae)).replace(/\\/g,"/");if(Q===y){var j=new DataView(C.buffer,C.byteOffset+U,30),J=j.getUint16(26,!0),Y=j.getUint16(28,!0),te=U+30+J+Y;return{method:re,data:C.subarray(te,te+ie)}}Z+=46+ae+de+se}return null}function b(C){try{return new TextDecoder("utf-8").decode(C)}catch{for(var y="",d=0;d<C.length;d++)y+=String.fromCharCode(C[d]);return y}}function m(C){var y=new DecompressionStream("deflate-raw"),d=new Blob([C]);return new Response(d.stream().pipeThrough(y)).arrayBuffer().then(function(w){return new Uint8Array(w)})}function k(C){for(var y=new DataView(C.buffer,C.byteOffset,C.byteLength),d=-1,w=C.length-22;w>=0&&w>=C.length-22-65536;w--)if(y.getUint32(w,!0)===101010256){d=w;break}if(d<0)return[];for(var D=y.getUint32(d+16,!0),P=y.getUint16(d+10,!0),B=D,Z=[],fe=0;fe<P&&y.getUint32(B,!0)===33639248;fe++){var re=y.getUint16(B+10,!0),ie=y.getUint32(B+20,!0),ae=y.getUint16(B+28,!0),de=y.getUint16(B+30,!0),se=y.getUint16(B+32,!0),U=y.getUint32(B+42,!0),Q=b(C.subarray(B+46,B+46+ae)).replace(/\\/g,"/"),j=new DataView(C.buffer,C.byteOffset+U,30),J=U+30+j.getUint16(26,!0)+j.getUint16(28,!0);Z.push({name:Q,method:re,data:C.subarray(J,J+ie)}),B+=46+ae+de+se}return Z}function M(C){return C.method===0?Promise.resolve(C.data):m(C.data)}function I(C){var y=(C.split(".").pop()||"").toLowerCase();return y==="png"?"image/png":y==="jpg"||y==="jpeg"?"image/jpeg":y==="gif"?"image/gif":y==="bmp"?"image/bmp":y==="webp"?"image/webp":y==="svg"?"image/svg+xml":null}function R(C,y){for(var d=32768,w="",D=0;D<C.length;D+=d)w+=String.fromCharCode.apply(null,C.subarray(D,D+d));return"data:"+y+";base64,"+btoa(w)}function l(C){var y=C.arrayBuffer?C.arrayBuffer():new Promise(function(d,w){var D=new FileReader;D.onload=function(){d(D.result)},D.onerror=w,D.readAsArrayBuffer(C)});return y.then(function(d){for(var w=new Uint8Array(d),D=k(w),P={},B=0;B<D.length;B++)P[D[B].name]=D[B];if(!P["word/document.xml"])return null;var Z={rels:{},numbering:{},media:{},footnotes:{},endnotes:{},comments:{},diagrams:{},vectorNames:{}},fe=u.documentImportImages!==!1,re=[M(P["word/document.xml"]).then(function(de){Z.documentXml=b(de)})];P["word/_rels/document.xml.rels"]&&re.push(M(P["word/_rels/document.xml.rels"]).then(function(de){Z.rels=f(b(de))})),P["word/numbering.xml"]&&re.push(M(P["word/numbering.xml"]).then(function(de){Z.numbering=c(b(de))})),P["word/footnotes.xml"]&&re.push(M(P["word/footnotes.xml"]).then(function(de){Z.footnotes=_(b(de),"footnote")})),P["word/endnotes.xml"]&&re.push(M(P["word/endnotes.xml"]).then(function(de){Z.endnotes=_(b(de),"endnote")})),P["word/comments.xml"]&&re.push(M(P["word/comments.xml"]).then(function(de){Z.comments=v(b(de))}));for(var ie=0;ie<D.length;ie++)(function(de){/^word\/diagrams\/data\d*\.xml$/.test(de.name)&&re.push(M(de).then(function(se){try{Z.diagrams[de.name]=s(b(se))}catch{}}))})(D[ie]);if(fe)for(var ae=0;ae<D.length;ae++)(function(de){if(de.name.indexOf("word/media/")===0){var se=I(de.name);se&&re.push(M(de).then(function(U){try{Z.media[de.name]=R(U,se)}catch{}}))}})(D[ae]);return Promise.all(re).then(function(){return E(Z.documentXml,Z)})})}function f(C){var y={};try{for(var d=new DOMParser().parseFromString(C,"application/xml"),w=d.getElementsByTagName("*"),D=0;D<w.length;D++)if(w[D].localName==="Relationship"){var P=w[D].getAttribute("Id"),B=w[D].getAttribute("Target"),Z=w[D].getAttribute("TargetMode");P&&B&&(y[P]={target:B,external:Z==="External"})}}catch{}return y}function _(C,y){var d={};try{for(var w="http://schemas.openxmlformats.org/wordprocessingml/2006/main",D=new DOMParser().parseFromString(C,"application/xml"),P=D.getElementsByTagNameNS(w,y||"footnote"),B=0;B<P.length;B++){var Z=P[B],fe=Z.getAttributeNS(w,"type")||Z.getAttribute("w:type")||"";if(!fe){var re=Z.getAttributeNS(w,"id")||Z.getAttribute("w:id");if(re!=null){var ie=(Z.textContent||"").replace(/\s+/g," ").trim();ie&&(d[String(re)]=ie)}}}}catch{}return d}function v(C){var y={};try{for(var d="http://schemas.openxmlformats.org/wordprocessingml/2006/main",w=new DOMParser().parseFromString(C,"application/xml"),D=w.getElementsByTagNameNS(d,"comment"),P=0;P<D.length;P++){var B=D[P],Z=B.getAttributeNS(d,"id")||B.getAttribute("w:id");Z!=null&&(y[String(Z)]={text:(B.textContent||"").replace(/\s+/g," ").trim(),author:B.getAttributeNS(d,"author")||B.getAttribute("w:author")||""})}}catch{}return y}function s(C){var y=[];try{for(var d="http://schemas.openxmlformats.org/drawingml/2006/diagram",w=new DOMParser().parseFromString(C,"application/xml"),D=w.getElementsByTagNameNS(d,"pt"),P=0;P<D.length;P++){var B=D[P].getAttribute("type")||"";if(!(B==="pres"||B==="parTrans"||B==="sibTrans")){var Z=D[P].getElementsByTagNameNS(d,"t")[0];if(Z){var fe=(Z.textContent||"").replace(/\s+/g," ").trim();fe&&y.push(fe)}}}}catch{}return y}function c(C){var y={};try{let te=function(le){return le&&(le.getAttributeNS(d,"val")||le.getAttribute("w:val"))||""};for(var Y=te,d="http://schemas.openxmlformats.org/wordprocessingml/2006/main",w=new DOMParser().parseFromString(C,"application/xml"),D={},P=w.getElementsByTagNameNS(d,"abstractNum"),B=0;B<P.length;B++){for(var Z=P[B].getAttributeNS(d,"abstractNumId")||P[B].getAttribute("w:abstractNumId"),fe={},re=P[B].getElementsByTagNameNS(d,"lvl"),ie=0;ie<re.length;ie++){var ae=re[ie].getAttributeNS(d,"ilvl")||re[ie].getAttribute("w:ilvl")||"0",de=te(re[ie].getElementsByTagNameNS(d,"numFmt")[0]);fe[ae]=de||"decimal"}Z!=null&&(D[Z]=fe)}for(var se=w.getElementsByTagNameNS(d,"num"),U=0;U<se.length;U++){var Q=se[U].getAttributeNS(d,"numId")||se[U].getAttribute("w:numId"),j=se[U].getElementsByTagNameNS(d,"abstractNumId")[0],J=te(j);Q!=null&&D[J]&&(y[Q]=D[J])}}catch{}return y}var p="http://schemas.openxmlformats.org/officeDocument/2006/math",g={"\u2211":"\\sum","\u220F":"\\prod","\u2210":"\\coprod","\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u22C3":"\\bigcup","\u22C2":"\\bigcap","\xB1":"\\pm","\u2213":"\\mp","\xD7":"\\times","\xF7":"\\div","\u2212":"-","\u2260":"\\neq","\u2264":"\\leq","\u2265":"\\geq","\u2248":"\\approx","\u2261":"\\equiv","\u221D":"\\propto","\u221E":"\\infty","\u2202":"\\partial","\u2207":"\\nabla","\u221A":"\\sqrt","\u2220":"\\angle","\u22C5":"\\cdot","\u2026":"\\dots","\u2192":"\\to","\u2190":"\\leftarrow","\u21D2":"\\Rightarrow","\u21D4":"\\Leftrightarrow","\u2208":"\\in","\u2209":"\\notin","\u2282":"\\subset","\u2286":"\\subseteq","\u222A":"\\cup","\u2229":"\\cap","\u2205":"\\emptyset","\u2200":"\\forall","\u2203":"\\exists","\xAC":"\\neg","\u2227":"\\land","\u2228":"\\lor","\u2234":"\\therefore",\u03B1:"\\alpha",\u03B2:"\\beta",\u03B3:"\\gamma",\u03B4:"\\delta",\u03B5:"\\epsilon",\u03B6:"\\zeta",\u03B7:"\\eta",\u03B8:"\\theta",\u03B9:"\\iota",\u03BA:"\\kappa",\u03BB:"\\lambda",\u03BC:"\\mu",\u03BD:"\\nu",\u03BE:"\\xi",\u03C0:"\\pi",\u03C1:"\\rho",\u03C3:"\\sigma",\u03C4:"\\tau",\u03C5:"\\upsilon",\u03C6:"\\varphi",\u03C7:"\\chi",\u03C8:"\\psi",\u03C9:"\\omega",\u0393:"\\Gamma",\u0394:"\\Delta",\u0398:"\\Theta",\u039B:"\\Lambda",\u039E:"\\Xi",\u03A0:"\\Pi",\u03A3:"\\Sigma",\u03A6:"\\Phi",\u03A8:"\\Psi",\u03A9:"\\Omega"},h={"\u0302":"\\hat","\u0303":"\\tilde","\u0304":"\\bar","\u0305":"\\overline","\u0306":"\\breve","\u0307":"\\dot","\u0308":"\\ddot","\u030A":"\\mathring","\u030C":"\\check","\u2192":"\\vec","\u20D7":"\\vec","\u0301":"\\acute","\u0300":"\\grave"};function L(C){var y=p;function d(ae,de){for(var se=0;se<ae.childNodes.length;se++){var U=ae.childNodes[se];if(U.nodeType===1&&U.localName===de)return U.getAttributeNS(y,"val")||U.getAttribute("m:val")||""}return""}function w(ae,de,se){var U=D(ae,de);return U?d(U,se):""}function D(ae,de){for(var se=0;se<ae.childNodes.length;se++){var U=ae.childNodes[se];if(U.nodeType===1&&U.localName===de&&U.namespaceURI===y)return U}return null}function P(ae,de){for(var se=[],U=0;U<ae.childNodes.length;U++){var Q=ae.childNodes[U];Q.nodeType===1&&Q.localName===de&&Q.namespaceURI===y&&se.push(Q)}return se}function B(ae){return"{"+(ae?re(ae).trim():"")+"}"}function Z(ae){var de=ae?re(ae).trim():"";return/^[A-Za-z0-9]$/.test(de)||/^\\[A-Za-z]+$/.test(de)?de:"{"+de+"}"}function fe(ae){for(var de="",se=0;se<ae.length;se++){var U=ae.charAt(se),Q=g[U];if(Q){de+=Q+" ";continue}if("#$%&_{}".indexOf(U)>=0){de+="\\"+U;continue}if(U==="\\"){de+="\\backslash ";continue}de+=U}return de}function re(ae){for(var de="",se=0;se<ae.childNodes.length;se++){var U=ae.childNodes[se];if(U.nodeType===1){if(U.namespaceURI!==y){de+=fe(U.textContent||"");continue}de+=ie(U)}}return de}function ie(ae){var de=ae.localName;switch(de){case"oMath":case"oMathPara":case"e":case"num":case"den":case"sub":case"sup":case"deg":case"lim":case"fName":return re(ae);case"rPr":case"ctrlPr":case"fPr":case"radPr":case"naryPr":case"dPr":case"sSupPr":case"sSubPr":case"sSubSupPr":case"accPr":case"barPr":case"funcPr":case"mPr":case"limLowPr":case"limUppPr":case"groupChrPr":case"mcPr":case"eqArrPr":case"boxPr":case"borderBoxPr":case"phantPr":case"sPrePr":return"";case"r":return fe(ae.textContent||"");case"t":return fe(ae.textContent||"");case"f":{var se=w(ae,"fPr","type"),U=B(D(ae,"num")),Q=B(D(ae,"den"));return se==="noBar"?"\\binom"+U+Q:se==="skw"||se==="lin"?U+"/"+Q:"\\frac"+U+Q}case"sSup":return Z(D(ae,"e"))+"^"+B(D(ae,"sup"));case"sSub":return Z(D(ae,"e"))+"_"+B(D(ae,"sub"));case"sSubSup":return Z(D(ae,"e"))+"_"+B(D(ae,"sub"))+"^"+B(D(ae,"sup"));case"sPre":return"{}_"+B(D(ae,"sub"))+"^"+B(D(ae,"sup"))+B(D(ae,"e"));case"rad":{var j=w(ae,"radPr","degHide"),J=D(ae,"deg"),Y=B(D(ae,"e"));return j==="1"||j==="on"||j==="true"||!J||!(J.textContent||"").trim()?"\\sqrt"+Y:"\\sqrt["+re(J)+"]"+Y}case"nary":{var te=w(ae,"naryPr","chr")||"\u222B",le=g[te]||fe(te),pe=w(ae,"naryPr","subHide"),ye=w(ae,"naryPr","supHide"),me=le;pe!=="1"&&pe!=="on"&&D(ae,"sub")&&(me+="_"+B(D(ae,"sub"))),ye!=="1"&&ye!=="on"&&D(ae,"sup")&&(me+="^"+B(D(ae,"sup")));var ee=D(ae,"e");return me+" "+(ee?re(ee).trim():"")}case"d":{let Ge=function(yt,Et){if(!yt)return Et==="l"?"\\left.":"\\right.";if(yt==="{"||yt==="}")return"\\"+yt;if(yt==="|")return"|";if(yt==="\u2016")return"\\|";var lt=yt.charCodeAt(0);return lt===10216||lt===12296||lt===9001?"\\langle":lt===10217||lt===12297||lt===9002?"\\rangle":yt==="\u230A"?"\\lfloor":yt==="\u230B"?"\\rfloor":yt==="\u2308"?"\\lceil":yt==="\u2309"?"\\rceil":yt};var Bt=Ge,ue=w(ae,"dPr","begChr"),ce=w(ae,"dPr","endChr"),ve=w(ae,"dPr","sepChr")||"|";ue===""&&(ue="("),ce===""&&(ce=")");for(var be=P(ae,"e"),ke=[],Pe=0;Pe<be.length;Pe++)ke.push(re(be[Pe]));return"\\left"+Ge(ue,"l")+ke.join(" "+Ge(ve,"m")+" ")+"\\right"+Ge(ce,"r")}case"func":{var Le=re(D(ae,"fName")).trim(),qe=/^(sin|cos|tan|cot|sec|csc|sinh|cosh|tanh|log|ln|lg|exp|lim|max|min|det|dim|gcd|arg|deg|hom|ker|Pr|sup|inf)$/,Re=qe.test(Le)?"\\"+Le:Le?"\\operatorname{"+Le+"}":"";return Re+B(D(ae,"e"))}case"limLow":{var Ie=re(D(ae,"e")).trim();return Ie==="lim"||Ie==="\\lim"?"\\lim_"+B(D(ae,"lim")):"\\underset"+B(D(ae,"lim"))+"{"+Ie+"}"}case"limUpp":return"\\overset"+B(D(ae,"lim"))+B(D(ae,"e"));case"acc":{var Ve=w(ae,"accPr","chr")||"\u0302",Ye=h[Ve]||"\\hat";return Ye+B(D(ae,"e"))}case"bar":return(w(ae,"barPr","pos")==="bot"?"\\underline":"\\overline")+B(D(ae,"e"));case"groupChr":{var ft=w(ae,"groupChrPr","chr");return ft==="\u23DF"?"\\underbrace"+B(D(ae,"e")):"\\overbrace"+B(D(ae,"e"))}case"borderBox":return"\\boxed"+B(D(ae,"e"));case"box":case"phant":return re(ae);case"m":{for(var ht=P(ae,"mr"),At=[],Rt=0;Rt<ht.length;Rt++){for(var ar=P(ht[Rt],"e"),ze=[],je=0;je<ar.length;je++)ze.push(re(ar[je]));At.push(ze.join(" & "))}return"\\begin{matrix}"+At.join(" \\\\ ")+"\\end{matrix}"}case"eqArr":{for(var We=P(ae,"e"),Oe=[],pt=0;pt<We.length;pt++)Oe.push(re(We[pt]));return"\\begin{aligned}"+Oe.join(" \\\\ ")+"\\end{aligned}"}default:return re(ae)}}try{return ie(C).replace(/\s+/g," ").trim()}catch{return(C.textContent||"").trim()}}function E(C,y){y=y||{rels:{},numbering:{},media:{}},y.diagrams||(y.diagrams={});var d=new DOMParser().parseFromString(C,"application/xml"),w="http://schemas.openxmlformats.org/wordprocessingml/2006/main",D="http://schemas.openxmlformats.org/officeDocument/2006/relationships";function P(ze){if(!ze)return null;var je=ze.getAttributeNS(D,"id")||ze.getAttribute("r:id")||ze.getAttributeNS(D,"embed")||ze.getAttribute("r:embed");return je&&y.rels[je]||null}function B(ze){for(var je=ze.getElementsByTagName("*"),We=0;We<je.length;We++)if(!(je[We].localName!=="blip"&&je[We].localName!=="imagedata")){var Oe=P(je[We]);if(Oe){var pt=Oe.target.replace(/^\.\//,""),Bt=pt.indexOf("word/")===0?pt:"word/"+pt,Ge=y.media[Bt];if(Ge)return'<img src="'+Ge+'" alt="">';if(Oe.external)return'<img src="'+H(Oe.target)+'" alt="">';if(/\.(wmf|emf|emz|wmz)$/i.test(pt)){var yt=pt.split("/").pop();return se('<p class="rte-imported-unsupported" data-source="'+H(yt)+'"><em>[Unsupported image: '+H(yt)+" \u2014 Windows metafiles have no browser-renderable form]</em></p>"),""}}}return se(Z(ze)),""}function Z(ze){for(var je=ze.getElementsByTagName("*"),We=0;We<je.length;We++)if(je[We].localName==="relIds"){var Oe=je[We].getAttributeNS(D,"dm")||je[We].getAttribute("r:dm"),pt=Oe?y.rels[Oe]:null;if(pt){var Bt=pt.target.replace(/^\.\//,""),Ge=Bt.indexOf("word/")===0?Bt:"word/"+Bt,yt=y.diagrams[Ge];if(!(!yt||!yt.length)){for(var Et="",lt=0;lt<yt.length;lt++)Et+="<li>"+H(yt[lt])+"</li>";return'<div class="rte-imported-smartart" style="'+$+'"><ul>'+Et+"</ul></div>"}}}return""}function fe(ze,je){return ze.getElementsByTagNameNS(w,je)}function re(ze,je){for(var We=0;We<ze.childNodes.length;We++){var Oe=ze.childNodes[We];if(Oe.nodeType===1&&Oe.localName===je&&Oe.namespaceURI===w)return Oe}return null}function ie(ze){for(var je="",We=ze.childNodes,Oe=0;Oe<We.length;Oe++){var pt=We[Oe];pt.nodeType===1&&(pt.localName==="t"||pt.localName==="delText"?je+=pt.textContent||"":pt.localName==="tab"?je+=" ":(pt.localName==="br"||pt.localName==="cr")&&(je+=`
21
21
  `))}return je}function ae(ze){for(var je="",We=0;We<ze.childNodes.length;We++){var Oe=ze.childNodes[We];if(Oe.nodeType===1&&(Oe.localName==="drawing"||Oe.localName==="pict")&&(je+=B(Oe)),Oe.nodeType===1&&Oe.localName==="footnoteReference"){var pt=Oe.getAttributeNS(w,"id")||Oe.getAttribute("w:id"),Bt=pt!=null?y.footnotes[String(pt)]:null;Bt&&(je+=Y(Bt))}if(Oe.nodeType===1&&Oe.localName==="endnoteReference"){var Ge=Oe.getAttributeNS(w,"id")||Oe.getAttribute("w:id"),yt=Ge!=null?y.endnotes[String(Ge)]:null;yt&&(je+=Y(yt))}Oe.nodeType===1&&(Oe.localName==="pict"||Oe.localName==="drawing"||Oe.localName==="object"||Oe.localName==="AlternateContent")&&U(Oe)}var Et=H(ie(ze));if(!Et)return je;Et=Et.replace(/\n/g,"<br>");var lt=re(ze,"rPr");if(lt){re(lt,"b")&&(Et="<strong>"+Et+"</strong>"),re(lt,"i")&&(Et="<em>"+Et+"</em>"),re(lt,"u")&&(Et="<u>"+Et+"</u>"),re(lt,"strike")&&(Et="<s>"+Et+"</s>");var zt=re(lt,"vertAlign");if(zt){var lr=zt.getAttributeNS(w,"val")||zt.getAttribute("w:val")||"";lr==="superscript"?Et="<sup>"+Et+"</sup>":lr==="subscript"&&(Et="<sub>"+Et+"</sub>")}var Zt="",$t=re(lt,"color");if($t){var Me=$t.getAttributeNS(w,"val")||$t.getAttribute("w:val")||"";Me&&/^[0-9A-Fa-f]{6}$/.test(Me)&&(Zt+="color:#"+Me+";")}var Se=re(lt,"highlight");if(Se){var Ze=Se.getAttributeNS(w,"val")||Se.getAttribute("w:val")||"";Ze&&Ze!=="none"&&(Zt+="background-color:"+Ze+";")}var nt=re(lt,"shd");if(nt){var Nt=nt.getAttributeNS(w,"fill")||nt.getAttribute("w:fill")||"";Nt&&/^[0-9A-Fa-f]{6}$/.test(Nt)&&(Zt+="background-color:#"+Nt+";")}var jt=re(lt,"rFonts");if(jt){var Vt=jt.getAttributeNS(w,"ascii")||jt.getAttribute("w:ascii")||"";/consolas|courier|monospace|mono$/i.test(Vt)?Et="<code>"+Et+"</code>":Vt&&(Zt+="font-family:"+Vt.replace(/[<>"]/g,"")+";")}var ut=re(lt,"sz");if(ut){var sr=parseInt(ut.getAttributeNS(w,"val")||ut.getAttribute("w:val")||"",10);sr>0&&(Zt+="font-size:"+sr/2+"pt;")}Zt&&(Et='<span style="'+Zt+'">'+Et+"</span>")}return je+Et}var de=[];function se(ze){ze&&de.indexOf(ze)<0&&de.push(ze)}function U(ze){for(var je=ze.getElementsByTagName("*"),We=0;We<je.length;We++)if(je[We].localName==="txbxContent"){for(var Oe="",pt=je[We].childNodes,Bt=0;Bt<pt.length;Bt++){var Ge=pt[Bt];if(Ge.nodeType===1)if(Ge.localName==="p"){var yt=pe(Ge);yt&&(Oe+="<p>"+yt+"</p>")}else Ge.localName==="tbl"&&(Oe+=ar(Ge))}Oe&&se('<div class="rte-imported-textbox" style="'+F+'">'+Oe+"</div>")}}function Q(){if(!de.length)return"";var ze=de.join("");return de=[],ze}var j=[];function J(ze){var je=L(ze);if(!je)return"";var We=ze.localName==="oMathPara";return'<span class="rte-math-inline'+(We?" rte-math-display":"")+'" data-tex="'+H(je)+'">'+H(je)+"</span>"}function Y(ze){var je="fnimp"+(j.length+1);j.push({id:je,text:ze});var We=j.length;return'<sup class="rte-fn-ref" data-fn-id="'+je+'" data-fn-number="'+We+'" id="fnref-'+je+'" contenteditable="false">'+We+"</sup>"}function te(){if(!j.length)return"";for(var ze="",je=0;je<j.length;je++){var We=j[je];ze+='<li class="rte-fn-note" data-fn-id="'+We.id+'" data-fn-number="'+(je+1)+'" id="fn-'+We.id+'">'+H(We.text)+'<a class="rte-fn-back" data-fn-id="'+We.id+'" href="#fnref-'+We.id+'" contenteditable="false" title="Back to reference">\u21A9</a></li>'}return'<section class="rte-footnotes"><h2 class="rte-fn-title">Footnotes</h2><ol class="rte-fn-list" data-numbering="decimal">'+ze+"</ol></section>"}function le(ze,je){for(var We="",Oe=0;Oe<ze.childNodes.length;Oe++){var pt=ze.childNodes[Oe];pt.nodeType===1&&(pt.localName==="r"?We+=ae(pt):pt.localName==="ins"?We+=le(pt,"ins"):pt.localName==="del"&&(We+=le(pt,"del")))}if(!We)return"";var Bt=ze.getAttributeNS(w,"author")||ze.getAttribute("w:author")||"",Ge=ze.getAttributeNS(w,"date")||ze.getAttribute("w:date")||"";return"<"+je+(Bt?' data-author="'+H(Bt)+'"':"")+(Ge?' data-date="'+H(Ge)+'"':"")+">"+We+"</"+je+">"}function pe(ze){var je="",We=ze.childNodes,Oe=[];function pt(Zt){var $t=y.comments[String(Zt)];return $t?(Oe.push(Zt),'<span data-comment="'+H($t.text)+'"'+($t.author?' data-comment-author="'+H($t.author)+'"':"")+">"):""}for(var Bt=0;Bt<We.length;Bt++){var Ge=We[Bt];if(Ge.nodeType===1&&Ge.localName==="commentRangeStart"){je+=pt(Ge.getAttributeNS(w,"id")||Ge.getAttribute("w:id"));continue}if(Ge.nodeType===1&&Ge.localName==="commentRangeEnd"){Oe.length&&(Oe.pop(),je+="</span>");continue}if(Ge.nodeType===1&&(Ge.localName==="ins"||Ge.localName==="del")&&Ge.namespaceURI===w){je+=le(Ge,Ge.localName);continue}if(Ge.nodeType===1&&Ge.namespaceURI===p&&(Ge.localName==="oMath"||Ge.localName==="oMathPara")){je+=J(Ge);continue}if(Ge.nodeType===1&&Ge.localName==="r"&&Ge.namespaceURI===w)je+=ae(Ge);else if(Ge.nodeType===1&&Ge.localName==="hyperlink"){for(var yt="",Et=0;Et<Ge.childNodes.length;Et++)Ge.childNodes[Et].localName==="r"&&(yt+=ae(Ge.childNodes[Et]));var lt=P(Ge),zt=Ge.getAttributeNS(w,"anchor")||Ge.getAttribute("w:anchor"),lr=lt?lt.target:zt?"#"+zt:null;je+=lr?'<a href="'+H(lr)+'">'+(yt||H(lr))+"</a>":yt}}for(;Oe.length;)Oe.pop(),je+="</span>";return je}function ye(ze){var je=re(ze,"pPr");if(!je)return{};var We={},Oe=re(je,"pStyle");if(Oe){var pt=Oe.getAttributeNS(w,"val")||Oe.getAttribute("w:val")||"",Bt=/heading(\d)/i.exec(pt);Bt?We.heading=Math.min(6,parseInt(Bt[1],10)):/^(intense)?quote$|blockquote/i.test(pt.replace(/\s+/g,""))?We.quote=!0:/^(code|sourcecode|htmlpre|preformatted)$/i.test(pt.replace(/\s+/g,""))&&(We.pre=!0)}var Ge=re(je,"pBdr");Ge&&re(Ge,"bottom")&&(We.rule=!0);var yt=re(je,"numPr");if(yt){We.list=!0;var Et=re(yt,"ilvl"),lt=re(yt,"numId");We.level=parseInt(Et&&(Et.getAttributeNS(w,"val")||Et.getAttribute("w:val"))||"0",10)||0;var zt=lt&&(lt.getAttributeNS(w,"val")||lt.getAttribute("w:val"))||"",lr=y.numbering[zt],Zt=lr?lr[String(We.level)]:null;We.ordered=!!Zt&&Zt!=="bullet"&&Zt!=="none"}var $t=re(je,"ind");if($t){var Me=$t.getAttributeNS(w,"left")||$t.getAttribute("w:left")||"",Se=parseInt(Me,10);Se>0&&!(We.quote&&Se===720)&&(We.indentPx=Math.round(Se/15))}var Ze=re(je,"jc");if(Ze){var nt=Ze.getAttributeNS(w,"val")||Ze.getAttribute("w:val")||"";(nt==="center"||nt==="right"||nt==="both")&&(We.align=nt==="both"?"justify":nt)}return We}var me=fe(d,"body")[0];if(!me)return"";var ee=[],ue=[],ce=[];function ve(ze){for(;ue.length>ze;){var je=ue.length-1;ce[je]&&(ee.push("</li>"),ce[je]=!1),ee.push("</"+ue.pop()+">"),ce.pop()}}for(var be=0;be<me.childNodes.length;be++){var ke=me.childNodes[be];if(ke.nodeType===1){if(ke.namespaceURI===p&&(ke.localName==="oMathPara"||ke.localName==="oMath")){ve(0);var Pe=J(ke);Pe&&ee.push("<p>"+Pe+"</p>");continue}if(ke.namespaceURI===w)if(ke.localName==="p"){var Le=ye(ke),qe=pe(ke);if(Le.list){var Re=(Le.level||0)+1,Ie=Le.ordered?"ol":"ul";for(ue.length>Re&&ve(Re),ue.length===Re&&ue[Re-1]!==Ie&&ve(Re-1);ue.length<Re;)ee.push("<"+Ie+">"),ue.push(Ie),ce.push(!1);ce[Re-1]&&(ee.push("</li>"),ce[Re-1]=!1),ee.push("<li>"+(qe||"")),ce[Re-1]=!0;continue}if(ve(0),Le.rule&&!(qe||"").replace(/<[^>]*>/g,"").trim()){ve(0),ee.push("<hr>");continue}if(Le.pre){ee.push("<pre>"+(qe||"<br>")+"</pre>");continue}if(Le.heading){var Ve=Le.indentPx?' style="margin-left:'+Le.indentPx+'px"':"";ee.push("<h"+Le.heading+Ve+">"+(qe||"")+"</h"+Le.heading+">")}else if(Le.quote)ee.push("<blockquote>"+(qe||"<br>")+"</blockquote>");else{var Ye=[];Le.align&&Ye.push("text-align:"+Le.align),Le.indentPx&&Ye.push("margin-left:"+Le.indentPx+"px");var ft=Ye.length?' style="'+Ye.join(";")+'"':"",ht=Q();(qe||!ht)&&ee.push("<p"+ft+">"+(qe||"<br>")+"</p>"),ht&&ee.push(ht)}}else ke.localName==="tbl"&&(ve(0),ee.push(ar(ke)))}}ve(0);var At=Q();At&&ee.push(At);var Rt=te();return Rt&&ee.push(Rt),ee.join(`
22
22
  `);function ar(ze){for(var je=[],We=ze.childNodes,Oe=0;Oe<We.length;Oe++){var pt=We[Oe];if(!(pt.nodeType!==1||pt.localName!=="tr")){for(var Bt=re(pt,"trPr"),Ge=!!(Bt&&re(Bt,"tblHeader")),yt=Ge?"th":"td",Et=[],lt=0;lt<pt.childNodes.length;lt++){var zt=pt.childNodes[lt];if(!(zt.nodeType!==1||zt.localName!=="tc")){for(var lr="",Zt=0;Zt<zt.childNodes.length;Zt++)zt.childNodes[Zt].localName==="p"&&(lr+="<p>"+(pe(zt.childNodes[Zt])||"<br>")+"</p>");Et.push("<"+yt+">"+lr+"</"+yt+">")}}je.push("<tr>"+Et.join("")+"</tr>")}}return"<table>"+je.join("")+"</table>"}}function A(C){try{if(r&&typeof r.createDialog=="function"){var y=r.createDialog(r.getLangText&&r.getLangText("importtitle")||"Import document","rte-dialog-import"),d=y.ownerDocument.createElement("div");d.style.cssText="padding:16px;max-width:420px;font:13px -apple-system,Segoe UI,sans-serif;line-height:1.5",d.textContent=C,y.appendChild(d);return}}catch{}window.console&&console.warn("documentimport:",C)}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_documentoutline=RTE_Plugin_DocumentOutline;function RTE_Plugin_DocumentOutline(){var N=this,u,r,x=null,H=null,F=null,$=null,z=0,o="";N.PluginName="DocumentOutline",N.InitConfig=function(s){u=s,u.documentOutlineEnabled!==!1&&(u.documentOutlineTitle=u.documentOutlineTitle||"Outline",u.documentOutlineHint=u.documentOutlineHint||"Browse headings and jump through long documents without leaving the editor.",u.documentOutlineEmptyText=u.documentOutlineEmptyText||"Add headings to build the document outline.",typeof u.documentOutlineAutoOpen!="boolean"&&(u.documentOutlineAutoOpen=!1),typeof u.documentOutlineMinLevel!="number"&&(u.documentOutlineMinLevel=1),typeof u.documentOutlineMaxLevel!="number"&&(u.documentOutlineMaxLevel=6),O("toolbar_default","#{documentoutline}"),O("toolbar_full","#{documentoutline}"))},N.InitEditor=function(s){r=s,u.documentOutlineEnabled!==!1&&(r.documentOutline={close:function(){b()},list:function(){return M()},open:function(){q()},refresh:function(){v()},toggle:function(){W()}},V(),r.toolbarFactoryMap=r.toolbarFactoryMap||{},r.toolbarFactoryMap.documentoutline=function(c){return r.createToolbarButton(c)},r.attachEvent("exec_command_documentoutline",function(c){c.returnValue=!0,c.stopBubble=!0,W()}),r.attachEvent("change",function(){m()}),r.attachEvent("selectionchange",function(){_()}),K(),v(),u.documentOutlineAutoOpen&&q())};function O(s,c){u[s]&&u[s].indexOf(c)===-1&&(u[s]=u[s]+c)}function V(){var s=u.container.ownerDocument;if(!s.getElementById("rte-document-outline-style")){var c=[".rte-document-outline-shell{display:flex;align-items:stretch;gap:10px;}",".rte-document-outline-shell>.rte-document-outline-host{flex:1 1 auto;min-width:0;}","/* 2026-07-12 navigation panel precision */",".rte-document-outline-panel{display:none;flex:0 0 286px;min-width:248px;max-width:min(330px,30vw);border:1px solid rgba(148,163,184,.22);border-radius:8px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,251,255,.96));box-shadow:0 14px 32px rgba(29,78,216,.1),0 2px 8px rgba(15,23,42,.06);overflow:hidden;color:#172033;font-family:Aptos,'Segoe UI',sans-serif;}",".rte-document-outline-shell.is-open>.rte-document-outline-panel{display:flex;flex-direction:column;}",".rte-document-outline-header{padding:12px 12px 9px 14px;border-bottom:1px solid rgba(148,163,184,.16);background:rgba(255,255,255,.72);}",".rte-document-outline-kicker{font-size:10px;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:#52657e;font-weight:850;}",".rte-document-outline-title{margin-top:3px;font-size:15px;line-height:1.2;font-weight:850;color:#172033;}",".rte-document-outline-copy{margin-top:5px;font-size:12px;line-height:1.42;color:#52657e;}",".rte-document-outline-toolbar{display:flex;align-items:center;justify-content:space-between;padding:8px 10px 8px 14px;border-bottom:1px solid rgba(148,163,184,.16);gap:10px;background:rgba(255,255,255,.52);}",".rte-document-outline-count{min-width:0;font-size:12px;font-weight:750;color:#52657e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}",".rte-document-outline-close{appearance:none;border:1px solid rgba(100,116,139,.18);background:#fff;color:#315277;cursor:pointer;font-size:12px;font-weight:750;padding:6px 9px;border-radius:7px;line-height:1;}",".rte-document-outline-close:hover,.rte-document-outline-close:focus-visible{background:#eef4ff;color:#0f3f9f;border-color:rgba(37,99,235,.28);}",".rte-document-outline-body{padding:6px;overflow:auto;min-height:140px;max-height:520px;scrollbar-width:thin;}",".rte-document-outline-list{display:flex;flex-direction:column;gap:5px;}",".rte-document-outline-item{appearance:none;width:100%;text-align:left;border:1px solid transparent;background:transparent;color:#172033;cursor:pointer;border-radius:7px;padding:8px 10px 8px calc(10px + (var(--rte-outline-level,1) - 1) * 12px);font-size:13px;line-height:1.35;font-weight:650;}",".rte-document-outline-item:hover,.rte-document-outline-item:focus-visible{background:#f8fbff;border-color:rgba(37,99,235,.18);}",".rte-document-outline-item.is-active{background:#eef4ff;border-color:rgba(37,99,235,.26);color:#0f3f9f;box-shadow:0 8px 18px rgba(37,99,235,.1);}",".rte-document-outline-item-level{display:inline-flex;margin:0 0 3px;padding:2px 6px;border-radius:999px;background:#fff;color:#64748b;font-size:10px;line-height:1.1;letter-spacing:.08em;text-transform:uppercase;font-weight:850;box-shadow:inset 0 0 0 1px rgba(148,163,184,.18);}",".rte-document-outline-empty{margin:6px;padding:14px;color:#52657e;font-size:13px;font-weight:700;line-height:1.55;background:#fff;border:1px dashed rgba(148,163,184,.34);border-radius:8px;}","@media (max-width: 1100px){.rte-document-outline-shell{display:block;}.rte-document-outline-panel{margin-top:12px;max-width:none;width:100%;}.rte-document-outline-body{max-height:320px;}}"].join(""),p=s.createElement("style");p.id="rte-document-outline-style",p.appendChild(s.createTextNode(c)),s.head.appendChild(p),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(s,p,"rte-document-outline-style",c)}}function K(){if(x)return x;var s=u.container,c=s.ownerDocument;x=c.createElement("div"),x.className="rte-document-outline-shell";var p=c.createElement("div");p.className="rte-document-outline-host";var g=s.parentNode;g.insertBefore(x,s),x.appendChild(p),p.appendChild(s),H=c.createElement("aside"),H.className="rte-document-outline-panel",H.setAttribute("aria-label",u.documentOutlineTitle),H.setAttribute("role","complementary");var h=c.createElement("div");h.className="rte-document-outline-header";var L=c.createElement("div");L.className="rte-document-outline-kicker",L.innerText="Document";var E=c.createElement("div");E.className="rte-document-outline-title",E.innerText=u.documentOutlineTitle;var A=c.createElement("div");A.className="rte-document-outline-copy",A.innerText=u.documentOutlineHint,h.appendChild(L),h.appendChild(E),h.appendChild(A);var C=c.createElement("div");C.className="rte-document-outline-toolbar";var y=c.createElement("div");y.className="rte-document-outline-count",y.setAttribute("data-rte-outline-count","1");var d=c.createElement("button");d.type="button",d.className="rte-document-outline-close",d.innerText="Hide",d.setAttribute("aria-label","Hide document outline"),d.onclick=function(){b()},C.appendChild(y),C.appendChild(d);var w=c.createElement("div");return w.className="rte-document-outline-body",F=c.createElement("div"),F.className="rte-document-outline-list",$=c.createElement("div"),$.className="rte-document-outline-empty",$.innerText=u.documentOutlineEmptyText,w.appendChild(F),w.appendChild($),H.appendChild(h),H.appendChild(C),H.appendChild(w),x.appendChild(H),x}function W(){x&&x.classList.contains("is-open")?b():q()}function q(){K(),x.classList.add("is-open"),v()}function b(){x&&x.classList.remove("is-open")}function m(){clearTimeout(z),z=setTimeout(function(){v()},80)}function k(s){var c=String(s||"").toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");return c||"section"}function M(){var s=r.getEditable();if(!s)return[];var c=Math.max(1,Math.min(6,u.documentOutlineMinLevel||1)),p=Math.max(c,Math.min(6,u.documentOutlineMaxLevel||6)),g=s.querySelectorAll("h1,h2,h3,h4,h5,h6"),h={},L=[],E;for(E=0;E<g.length;E++){var A=g[E],C=parseInt(A.nodeName.substring(1),10);if(!(C<c||C>p)){var y=(A.innerText||A.textContent||"").replace(/\s+/g," ").replace(/^\s+|\s+$/g,""),d=A.id||k(y);h[d]=(h[d]||0)+1;var w=A.id||(h[d]===1?d:d+"-"+h[d]);A.id||(A.id=w),L.push({id:A.id,level:C,text:y||"Heading "+(L.length+1),element:A})}}return L}function I(){var s=r.getSelection?r.getSelection():null;if(!s||s.rangeCount===0)return null;try{var c=s.getRangeAt(0).cloneRange();return c.collapse(!0),c}catch{return null}}function R(s){var c=I();if(!c||!s.length)return"";var p=c.startContainer.ownerDocument||r.getEditable().ownerDocument,g=p.createRange(),h="";try{g.setStart(c.startContainer,c.startOffset),g.collapse(!0);for(var L=0;L<s.length;L++){var E=p.createRange();E.selectNodeContents(s[L].element),E.collapse(!0),E.compareBoundaryPoints(Range.START_TO_START,g)<=0&&(h=s[L].id)}}catch{return o}return h}function l(s){if(!(!s||!s.element)){s.element.scrollIntoView({behavior:"smooth",block:"center"});try{var c=r.getSelection?r.getSelection():null,p=s.element.ownerDocument.createRange();p.selectNodeContents(s.element),p.collapse(!0),c&&(c.removeAllRanges(),c.addRange(p))}catch{}r.focus(),o=s.id,f()}}function f(){if(F)for(var s=F.querySelectorAll(".rte-document-outline-item"),c=0;c<s.length;c++){var p=s[c],g=p.getAttribute("data-rte-outline-id")===o;p.classList.toggle("is-active",g),p.setAttribute("aria-current",g?"true":"false")}}function _(){var s=M(),c=R(s);if(c===o&&F&&F.childNodes.length){f();return}o=c,v(s)}function v(s){K();var c=s||M();for(o=R(c)||o;F.firstChild;)F.removeChild(F.firstChild);var p=H.querySelector("[data-rte-outline-count]");p&&(p.innerText=c.length+" heading"+(c.length===1?"":"s")),$.style.display=c.length?"none":"block";for(var g=0;g<c.length;g++)(function(h){var L=H.ownerDocument.createElement("button");L.type="button",L.className="rte-document-outline-item",L.style.setProperty("--rte-outline-level",String(h.level)),L.setAttribute("data-rte-outline-id",h.id),L.setAttribute("aria-current","false");var E=H.ownerDocument.createElement("span");E.className="rte-document-outline-item-level",E.innerText="H"+h.level;var A=H.ownerDocument.createElement("span");A.innerText=h.text,L.appendChild(E),L.appendChild(A),L.onclick=function(){l(h)},F.appendChild(L)})(c[g]);f()}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_docxexport=RTE_Plugin_DocxExport,typeof RTE_DefaultConfig.docxExport>"u"&&(RTE_DefaultConfig.docxExport=!0);function RTE_Plugin_DocxExport(){var N=this,u,r;N.PluginName="DocxExport",N.InitConfig=function(D){u=D},N.InitEditor=function(D){r=D,u.docxExport!==!1&&(r.getDocxBlob=function(P){return h(P||{})},r.exportToDocx=function(P,B){return h(B||{}).then(function(Z){var fe=y(P)||y(u.docxExportFileName)||d();return w(Z,fe+".docx")})},r.attachEvent("exec_command_exportdocx",function(P){P.returnValue=!0,P.stopBubble=!0;try{r.exportToDocx().catch(function(B){window.console&&console.error("docxexport:",B)})}catch(B){window.console&&console.error("docxexport:",B)}}))};var x={w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math"};function H(D){return String(D??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g,"")}var F=(function(){var D=[],P,B,Z;for(B=0;B<256;B++){for(P=B,Z=0;Z<8;Z++)P=P&1?3988292384^P>>>1:P>>>1;D[B]=P>>>0}return D})();function $(D){for(var P=4294967295,B=0;B<D.length;B++)P=F[(P^D[B])&255]^P>>>8;return(P^4294967295)>>>0}function z(D){return new TextEncoder().encode(D)}function o(D){if(typeof CompressionStream>"u")return Promise.resolve(null);try{var P=new CompressionStream("deflate-raw"),B=P.writable.getWriter();return B.write(D),B.close(),new Response(P.readable).arrayBuffer().then(function(Z){return new Uint8Array(Z)})}catch{return Promise.resolve(null)}}function O(D){var P=D.map(function(B){return o(B.bytes).then(function(Z){var fe=Z&&Z.length<B.bytes.length;return{name:B.name,raw:B.bytes,data:fe?Z:B.bytes,method:fe?8:0}})});return Promise.all(P).then(function(B){for(var Z=[],fe=[],re=0,ie=0;ie<B.length;ie++){var ae=B[ie],de=z(ae.name),se=$(ae.raw),U=new DataView(new ArrayBuffer(30));U.setUint32(0,67324752,!0),U.setUint16(4,20,!0),U.setUint16(6,2048,!0),U.setUint16(8,ae.method,!0),U.setUint32(14,se,!0),U.setUint32(18,ae.data.length,!0),U.setUint32(22,ae.raw.length,!0),U.setUint16(26,de.length,!0);var Q=new DataView(new ArrayBuffer(46));Q.setUint32(0,33639248,!0),Q.setUint16(4,20,!0),Q.setUint16(6,20,!0),Q.setUint16(8,2048,!0),Q.setUint16(10,ae.method,!0),Q.setUint32(16,se,!0),Q.setUint32(20,ae.data.length,!0),Q.setUint32(24,ae.raw.length,!0),Q.setUint16(28,de.length,!0),Q.setUint32(42,re,!0),Z.push(new Uint8Array(U.buffer),de,ae.data),fe.push(new Uint8Array(Q.buffer),de),re+=30+de.length+ae.data.length}var j=fe.reduce(function(Y,te){return Y+te.length},0),J=new DataView(new ArrayBuffer(22));return J.setUint32(0,101010256,!0),J.setUint16(8,B.length,!0),J.setUint16(10,B.length,!0),J.setUint32(12,j,!0),J.setUint32(16,re,!0),new Blob(Z.concat(fe,[new Uint8Array(J.buffer)]),{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"})})}function V(){this.rels=[],this.media=[],this.footnotes=[],this.endnotes=[],this.comments=[],this.numbering={},this.relSeq=0,this.noteSeq=1,this.commentSeq=0,this.numSeq=0}V.prototype.rel=function(D,P,B){var Z="rId"+ ++this.relSeq;return this.rels.push({id:Z,type:D,target:P,mode:B}),Z};var K={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6};function W(D,P){var B={bold:P.bold,italic:P.italic,underline:P.underline,strike:P.strike,sizeHalfPoints:P.sizeHalfPoints,color:P.color,highlight:P.highlight,vertAlign:P.vertAlign,mono:P.mono,font:P.font},Z=D.tagName?D.tagName.toLowerCase():"";(Z==="b"||Z==="strong")&&(B.bold=!0),(Z==="i"||Z==="em")&&(B.italic=!0),Z==="u"&&(B.underline=!0),(Z==="s"||Z==="strike")&&(B.strike=!0),Z==="sup"&&(B.vertAlign="superscript"),Z==="sub"&&(B.vertAlign="subscript"),(Z==="code"||Z==="kbd"||Z==="samp"||Z==="pre")&&(B.mono=!0),Z==="mark"&&(B.highlight=B.highlight||"FFFF00");var fe=D.style;if(fe){/bold|^[6-9]00$/.test(fe.fontWeight||"")&&(B.bold=!0),fe.fontStyle==="italic"&&(B.italic=!0);var re=fe.textDecorationLine||fe.textDecoration||"";if(re.indexOf("underline")>=0&&(B.underline=!0),re.indexOf("line-through")>=0&&(B.strike=!0),fe.color){var ie=q(fe.color);ie&&(B.color=ie)}if(fe.backgroundColor){var ae=q(fe.backgroundColor);ae&&(B.highlight=ae)}if(fe.fontFamily){var de=String(fe.fontFamily).split(",")[0].replace(/^\s*['"]?|['"]?\s*$/g,"");de&&(B.font=de)}if(fe.fontSize){var se=b(fe.fontSize);se&&(B.sizeHalfPoints=Math.round(se*2))}}return B}function q(D){var P=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(String(D).replace(/\s/g,""));if(P){var B=P[1];return B.length===3&&(B=B[0]+B[0]+B[1]+B[1]+B[2]+B[2]),B.toUpperCase()}var Z=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i.exec(String(D));if(!Z)return null;function fe(re){var ie=Number(re).toString(16).toUpperCase();return ie.length<2?"0"+ie:ie}return fe(Z[1])+fe(Z[2])+fe(Z[3])}function b(D){var P=/^\s*([\d.]+)\s*(px|pt|em|rem|%)?\s*$/.exec(String(D));if(!P)return null;var B=parseFloat(P[1]);if(!isFinite(B))return null;switch(P[2]){case"pt":return B;case"em":case"rem":return B*11;case"%":return B/100*11;default:return B*.75}}function m(D){var P="",B=D.mono?"Consolas":D.font||"";return B&&(P+='<w:rFonts w:ascii="'+H(B)+'" w:hAnsi="'+H(B)+'"/>'),D.bold&&(P+="<w:b/>"),D.italic&&(P+="<w:i/>"),D.underline&&(P+='<w:u w:val="single"/>'),D.strike&&(P+="<w:strike/>"),D.color&&(P+='<w:color w:val="'+D.color+'"/>'),D.highlight&&(P+='<w:shd w:val="clear" w:color="auto" w:fill="'+D.highlight+'"/>'),D.vertAlign&&(P+='<w:vertAlign w:val="'+D.vertAlign+'"/>'),D.sizeHalfPoints&&(P+='<w:sz w:val="'+D.sizeHalfPoints+'"/><w:szCs w:val="'+D.sizeHalfPoints+'"/>'),P?"<w:rPr>"+P+"</w:rPr>":""}function k(D,P,B){if(!D)return"";for(var Z=String(D).split(`
23
- `),fe="",re=0;re<Z.length;re++)if(re&&(fe+="<w:r>"+m(P)+"<w:br/></w:r>"),!!Z[re]){var ie=B?"w:delText":"w:t";fe+="<w:r>"+m(P)+"<"+ie+' xml:space="preserve">'+H(Z[re])+"</"+ie+">",fe+="</w:r>"}return fe}function M(D){var P=D.getAttribute("data-author")||D.getAttribute("data-comment-author")||"RichTextEditor",B=D.getAttribute("data-date")||new Date().toISOString().replace(/\.\d+Z$/,"Z");return' w:author="'+H(P)+'" w:date="'+H(B)+'"'}function I(D,P,B,Z){for(var fe="",re=0;re<D.childNodes.length;re++){var ie=D.childNodes[re];if(ie.nodeType===3){var ae=(ie.nodeValue||"").replace(/[\r\n\t]+/g," ");ae&&(fe+=k(ae,P,!1));continue}if(ie.nodeType===1){var de=ie.tagName.toLowerCase();if(!(de==="script"||de==="style")){if(de==="br"){fe+="<w:r>"+m(P)+"<w:br/></w:r>";continue}if(ie.getAttribute&&ie.getAttribute("data-tex")){fe+=c(ie.getAttribute("data-tex"));continue}if((de==="sup"||de==="span")&&ie.getAttribute("data-footnote")){fe+=l(B,"footnote",ie.getAttribute("data-footnote"));continue}if((de==="sup"||de==="span")&&ie.getAttribute("data-endnote")){fe+=l(B,"endnote",ie.getAttribute("data-endnote"));continue}if(ie.classList&&ie.classList.contains("rte-fn-ref")){var se=ie.getAttribute("data-fn-id"),U=se?R(D.ownerDocument,se):"";fe+=l(B,"footnote",U||ie.textContent||"");continue}if(de==="img"){fe+=f(ie,B);continue}var Q=W(ie,P);if(de==="a"&&ie.getAttribute("href")){var j=ie.getAttribute("href"),J=I(ie,Q,B,Z);if(j.charAt(0)==="#")fe+='<w:hyperlink w:anchor="'+H(j.slice(1))+'">'+J+"</w:hyperlink>";else{var Y=B.rel("hyperlink",j,"External");fe+='<w:hyperlink r:id="'+Y+'">'+J+"</w:hyperlink>"}continue}if(de==="ins"||de==="del"){var te=de==="del",le="";(function ye(me,ee){for(var ue=0;ue<me.childNodes.length;ue++){var ce=me.childNodes[ue];if(ce.nodeType===3){le+=k((ce.nodeValue||"").replace(/[\r\n\t]+/g," "),ee,te);continue}ce.nodeType===1&&ye(ce,W(ce,ee))}})(ie,Q),fe+="<w:"+de+' w:id="'+Z.n+++'"'+M(ie)+">"+le+"</w:"+de+">";continue}if(ie.getAttribute&&ie.getAttribute("data-comment")){var pe=B.commentSeq++;B.comments.push({id:pe,author:ie.getAttribute("data-comment-author")||"RichTextEditor user",initials:ie.getAttribute("data-comment-initials")||"RTE",text:ie.getAttribute("data-comment")}),fe+='<w:commentRangeStart w:id="'+pe+'"/>'+I(ie,Q,B,Z)+'<w:commentRangeEnd w:id="'+pe+'"/><w:r><w:commentReference w:id="'+pe+'"/></w:r>';continue}fe+=I(ie,Q,B,Z)}}}return fe}function R(D,P){try{var B=D.querySelector('.rte-fn-note[data-fn-id="'+P+'"]');return B?(B.textContent||"").replace(/\s+/g," ").trim():""}catch{return""}}function l(D,P,B){var Z=D.noteSeq++;return(P==="endnote"?D.endnotes:D.footnotes).push({id:Z,text:B||""}),'<w:r><w:rPr><w:vertAlign w:val="superscript"/></w:rPr><w:'+P+'Reference w:id="'+Z+'"/></w:r>'}function f(D,P){var B=_(D);if(!B)return"";var Z="image"+(P.media.length+1)+".png";P.media.push({name:Z,bytes:B.bytes});var fe=P.rel("image","media/"+Z),re=Math.round(B.width*914400/96),ie=Math.round(B.height*914400/96),ae=P.media.length;return'<w:r><w:drawing><wp:inline distT="0" distB="0" distL="0" distR="0" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"><wp:extent cx="'+re+'" cy="'+ie+'"/><wp:docPr id="'+ae+'" name="Picture '+ae+'" descr="'+H(D.getAttribute("alt")||"")+'"/><a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:nvPicPr><pic:cNvPr id="'+ae+'" name="Picture '+ae+'"/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed="'+fe+'"/><a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="'+re+'" cy="'+ie+'"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></pic:spPr></pic:pic></a:graphicData></a:graphic></wp:inline></w:drawing></w:r>'}function _(D){try{var P=D.naturalWidth||D.width,B=D.naturalHeight||D.height;if(!P||!B)return null;var Z=Math.min(1,1600/Math.max(P,B)),fe=Math.max(1,Math.round(P*Z)),re=Math.max(1,Math.round(B*Z)),ie=document.createElement("canvas");ie.width=fe,ie.height=re,ie.getContext("2d").drawImage(D,0,0,fe,re);var ae=ie.toDataURL("image/png"),de=ae.indexOf(",");if(de<0)return null;for(var se=atob(ae.slice(de+1)),U=new Uint8Array(se.length),Q=0;Q<se.length;Q++)U[Q]=se.charCodeAt(Q);return{bytes:U,width:fe,height:re}}catch{return null}}var v={alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",pi:"\u03C0",rho:"\u03C1",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",varphi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",Gamma:"\u0393",Delta:"\u0394",Theta:"\u0398",Lambda:"\u039B",Xi:"\u039E",Pi:"\u03A0",Sigma:"\u03A3",Phi:"\u03A6",Psi:"\u03A8",Omega:"\u03A9",pm:"\xB1",mp:"\u2213",times:"\xD7",div:"\xF7",cdot:"\u22C5",neq:"\u2260",leq:"\u2264",geq:"\u2265",approx:"\u2248",equiv:"\u2261",propto:"\u221D",infty:"\u221E",partial:"\u2202",nabla:"\u2207",to:"\u2192",rightarrow:"\u2192",leftarrow:"\u2190",Rightarrow:"\u21D2",Leftrightarrow:"\u21D4",in:"\u2208",notin:"\u2209",subset:"\u2282",subseteq:"\u2286",cup:"\u222A",cap:"\u2229",emptyset:"\u2205",forall:"\u2200",exists:"\u2203",neg:"\xAC",land:"\u2227",lor:"\u2228",dots:"\u2026",ldots:"\u2026",cdots:"\u22EF",langle:"\u27E8",rangle:"\u27E9",lfloor:"\u230A",rfloor:"\u230B",lceil:"\u2308",rceil:"\u2309",quad:" ",",":" ",";":" "},s=/^(sin|cos|tan|cot|sec|csc|sinh|cosh|tanh|log|ln|lg|exp|det|dim|gcd|arg|max|min|sup|inf)$/;function c(D){var P=String(D||"").trim();if(!P)return"";var B=0;function Z(Y){return Y?"<m:r><m:t>"+H(Y)+"</m:t></m:r>":""}function fe(){return re(),P.charAt(B)==="{"?(B++,ae("}")):ie()}function re(){for(;B<P.length&&/\s/.test(P.charAt(B));)B++}function ie(){if(re(),P.charAt(B)==="\\")return de();var Y=P.charAt(B++);return Z(Y)}function ae(Y){for(var te="",le=0;B<P.length;){var pe=P.charAt(B);if(pe==="{"&&le++,pe===Y&&le===0){B++;break}pe===Y&&le--,te+=j()}return te}function de(){B++;var Y=/^[A-Za-z]+/.exec(P.slice(B)),te=Y?Y[0]:P.charAt(B);switch(B+=te.length,te){case"frac":case"dfrac":case"tfrac":return"<m:f><m:fPr/><m:num>"+fe()+"</m:num><m:den>"+fe()+"</m:den></m:f>";case"sqrt":{re();var le="";return P.charAt(B)==="["&&(B++,le=ae("]")),'<m:rad><m:radPr><m:degHide m:val="'+(le?"0":"1")+'"/></m:radPr><m:deg>'+le+"</m:deg><m:e>"+fe()+"</m:e></m:rad>"}case"sum":case"prod":case"int":case"oint":case"bigcup":case"bigcap":{for(var pe={sum:"\u2211",prod:"\u220F",int:"\u222B",oint:"\u222E",bigcup:"\u22C3",bigcap:"\u22C2"}[te],ye="",me="",ee=0;ee<2;ee++)if(re(),P.charAt(B)==="_")B++,ye=fe();else if(P.charAt(B)==="^")B++,me=fe();else break;return'<m:nary><m:naryPr><m:chr m:val="'+pe+'"/><m:subHide m:val="'+(ye?"0":"1")+'"/><m:supHide m:val="'+(me?"0":"1")+'"/></m:naryPr><m:sub>'+ye+"</m:sub><m:sup>"+me+"</m:sup><m:e>"+Q()+"</m:e></m:nary>"}case"left":{for(var ue=se(),ce="",ve=0;B<P.length;){if(P.slice(B,B+5)==="\\left"&&ve++,P.slice(B,B+6)==="\\right"){if(ve===0){B+=6;var be=se();return U(ue,be,ce)}ve--}ce+=j()}return U(ue,")",ce)}case"right":return se(),"";case"lim":{re();var ke="";return P.charAt(B)==="_"&&(B++,ke=fe()),"<m:limLow><m:e>"+Z("lim")+"</m:e><m:lim>"+ke+"</m:lim></m:limLow>"}case"operatorname":return"<m:func><m:funcPr/><m:fName>"+fe()+"</m:fName><m:e>"+fe()+"</m:e></m:func>";case"hat":case"vec":case"tilde":case"bar":case"overline":case"dot":case"ddot":{var Pe={hat:"\u0302",vec:"\u20D7",tilde:"\u0303",dot:"\u0307",ddot:"\u0308"}[te];return te==="bar"||te==="overline"?'<m:bar><m:barPr><m:pos m:val="top"/></m:barPr><m:e>'+fe()+"</m:e></m:bar>":'<m:acc><m:accPr><m:chr m:val="'+Pe+'"/></m:accPr><m:e>'+fe()+"</m:e></m:acc>"}case"underline":return'<m:bar><m:barPr><m:pos m:val="bot"/></m:barPr><m:e>'+fe()+"</m:e></m:bar>";case"boxed":return"<m:borderBox><m:e>"+fe()+"</m:e></m:borderBox>";case"text":case"mathrm":case"mathbf":case"mathit":return fe();case"\\":return Z(" ");default:return s.test(te)?"<m:func><m:funcPr/><m:fName>"+Z(te)+"</m:fName><m:e>"+fe()+"</m:e></m:func>":v[te]!==void 0?Z(v[te]):Z(te)}}function se(){if(re(),P.charAt(B)==="\\"){B++;var Y=/^[A-Za-z]+|^./.exec(P.slice(B)),te=Y?Y[0]:"";return B+=te.length,v[te]||te}return P.charAt(B++)}function U(Y,te,le){return'<m:d><m:dPr><m:begChr m:val="'+H(Y)+'"/><m:endChr m:val="'+H(te)+'"/></m:dPr><m:e>'+le+"</m:e></m:d>"}function Q(){for(var Y="";B<P.length&&P.charAt(B)!=="}";)Y+=j();return Y}function j(){if(re(),B>=P.length)return"";var Y=P.charAt(B);if(Y==="\\")return de();if(Y==="{")return B++,ae("}");if(Y==="^"||Y==="_"){B++;var te=fe();return Y==="^"?"<m:sSup><m:sSupPr/><m:e>"+Z("")+"</m:e><m:sup>"+te+"</m:sup></m:sSup>":"<m:sSub><m:sSubPr/><m:e>"+Z("")+"</m:e><m:sub>"+te+"</m:sub></m:sSub>"}for(var le="";B<P.length&&!/[\\{}^_]/.test(P.charAt(B));)le+=P.charAt(B++);if((P.charAt(B)==="^"||P.charAt(B)==="_")&&le){var pe=le.slice(-1);le=le.slice(0,-1);var ye=P.charAt(B);B++;var me=fe();re();var ee="";if((P.charAt(B)==="^"||P.charAt(B)==="_")&&P.charAt(B)!==ye){var ue=P.charAt(B);B++,ee=fe()}var ce=Z(le);return ee?ce+"<m:sSubSup><m:sSubSupPr/><m:e>"+Z(pe)+"</m:e><m:sub>"+(ye==="_"?me:ee)+"</m:sub><m:sup>"+(ye==="^"?me:ee)+"</m:sup></m:sSubSup>":ce+(ye==="^"?"<m:sSup><m:sSupPr/><m:e>"+Z(pe)+"</m:e><m:sup>"+me+"</m:sup></m:sSup>":"<m:sSub><m:sSubPr/><m:e>"+Z(pe)+"</m:e><m:sub>"+me+"</m:sub></m:sSub>")}return Z(le)}for(var J="";B<P.length;)J+=j();return"<m:oMath>"+J+"</m:oMath>"}function p(D,P){var B="",Z={n:1},fe={bold:!1,italic:!1,underline:!1,strike:!1,sizeHalfPoints:0,color:null,highlight:null,vertAlign:null,mono:!1};function re(Q){if(!Q||!Q.style)return 0;var j=Q.style.marginLeft||Q.style.paddingLeft||"",J=/^\s*(-?[\d.]+)\s*([a-z%]*)\s*$/i.exec(j);if(!J)return 0;var Y=parseFloat(J[1]);if(!Y||Y<=0)return 0;var te=(J[2]||"px").toLowerCase(),le=te==="px"?Y:te==="pt"?Y*(4/3):te==="in"?Y*96:te==="cm"?Y*37.795:te==="mm"?Y*3.7795:te==="em"||te==="rem"?Y*16:0;return Math.round(le*15)}function ie(Q,j,J){J=J||{};var Y="";if(J.heading&&(Y+='<w:pStyle w:val="Heading'+J.heading+'"/>'),J.quote&&(Y+='<w:pStyle w:val="Quote"/><w:ind w:left="720"/>'),J.pre&&(Y+='<w:pStyle w:val="Code"/>'),J.numId&&(Y+='<w:numPr><w:ilvl w:val="'+(J.level||0)+'"/><w:numId w:val="'+J.numId+'"/></w:numPr>'),J.pageBreakBefore&&(Y+="<w:pageBreakBefore/>"),!J.quote){var te=re(Q);te>0&&(Y+='<w:ind w:left="'+te+'"/>')}var le=Q&&Q.style?Q.style.textAlign:"";le==="center"||le==="right"?Y+='<w:jc w:val="'+le+'"/>':le==="justify"&&(Y+='<w:jc w:val="both"/>');var pe=Q?I(Q,j,P,Z):"";return"<w:p>"+(Y?"<w:pPr>"+Y+"</w:pPr>":"")+pe+"</w:p>"}function ae(Q,j,J,Y){var te=Q.tagName.toLowerCase()==="ol",le=++P.numSeq;P.numbering[le]=te?"decimal":"bullet";for(var pe="",ye=0;ye<Q.childNodes.length;ye++){var me=Q.childNodes[ye];if(!(me.nodeType!==1||me.tagName.toLowerCase()!=="li")){for(var ee=me.ownerDocument.createElement("li"),ue=0;ue<me.childNodes.length;ue++){var ce=me.childNodes[ue];ce.nodeType===1&&/^(ul|ol)$/.test(ce.tagName.toLowerCase())||ee.appendChild(ce.cloneNode(!0))}pe+=ie(ee,W(me,j),{numId:le,level:J,pageBreakBefore:Y}),Y=!1;for(var ve=0;ve<me.childNodes.length;ve++){var be=me.childNodes[ve];be.nodeType===1&&/^(ul|ol)$/.test(be.tagName.toLowerCase())&&(pe+=ae(be,j,Math.min(8,J+1),!1))}}}return pe}function de(Q,j){for(var J='<w:tbl><w:tblPr><w:tblW w:w="0" w:type="auto"/><w:tblBorders>'+["top","left","bottom","right","insideH","insideV"].map(function(qe){return"<w:"+qe+' w:val="single" w:sz="4" w:space="0" w:color="BFBFBF"/>'}).join("")+"</w:tblBorders></w:tblPr>",Y=Q.getElementsByTagName("tr"),te=0;te<Y.length;te++){for(var le=[],pe=0;pe<Y[te].childNodes.length;pe++){var ye=Y[te].childNodes[pe];if(ye.nodeType===1){var me=ye.tagName.toLowerCase();(me==="td"||me==="th")&&le.push({node:ye,header:me==="th"})}}if(le.length){var ee=le.length&&le[0].header;J+="<w:tr>"+(ee?"<w:trPr><w:tblHeader/></w:trPr>":"");for(var ue=0;ue<le.length;ue++){var ce=parseInt(le[ue].node.getAttribute("colspan")||"1",10)||1,ve=W(le[ue].node,j);le[ue].header&&(ve.bold=!0);for(var be="",ke=le[ue].node.childNodes,Pe=!1,Le=0;Le<ke.length;Le++)if(ke[Le].nodeType===1&&/^(p|div|ul|ol|table|h[1-6]|blockquote)$/.test(ke[Le].tagName.toLowerCase())){Pe=!0;break}be=Pe?se(le[ue].node,ve):ie(le[ue].node,ve,{}),be||(be="<w:p/>"),J+="<w:tc><w:tcPr>"+(ce>1?'<w:gridSpan w:val="'+ce+'"/>':"")+(le[ue].header?'<w:shd w:val="clear" w:color="auto" w:fill="F1F3F7"/>':"")+"</w:tcPr>"+be+"</w:tc>"}J+="</w:tr>"}}return J+"</w:tbl><w:p/>"}function se(Q,j){for(var J="",Y=!1,te=0;te<Q.childNodes.length;te++){var le=Q.childNodes[te];if(le.nodeType===3){(le.nodeValue||"").trim()&&(J+="<w:p>"+k(le.nodeValue.replace(/\s+/g," "),j,!1)+"</w:p>");continue}if(le.nodeType===1){var pe=le.tagName.toLowerCase();if(!(pe==="script"||pe==="style"||pe==="noscript")&&!(le.classList&&(le.classList.contains("rte-footnotes")||le.classList.contains("rte-fn-note")))){if((le.getAttribute("data-rte-page-break")!==null||/always|page/.test(le.style&&(le.style.pageBreakBefore||le.style.breakBefore)||""))&&(Y=!0),pe==="hr"){J+='<w:p><w:pPr><w:pBdr><w:bottom w:val="single" w:sz="6" w:space="1" w:color="C8CDD4"/></w:pBdr></w:pPr></w:p>';continue}if(pe==="ul"||pe==="ol"){J+=ae(le,j,0,Y),Y=!1;continue}if(pe==="table"){J+=de(le,j);continue}if(K[pe]){J+=ie(le,W(le,j),{heading:K[pe],pageBreakBefore:Y}),Y=!1;continue}if(pe==="blockquote"){J+=ie(le,W(le,j),{quote:!0,pageBreakBefore:Y}),Y=!1;continue}if(pe==="pre"){J+=ie(le,W(le,j),{pre:!0,pageBreakBefore:Y}),Y=!1;continue}if(pe==="p"||pe==="div"||pe==="section"||pe==="article"||pe==="figure"||pe==="address"){if(U(le)){J+=se(le,W(le,j));continue}J+=ie(le,W(le,j),{pageBreakBefore:Y}),Y=!1;continue}J+=ie(le,W(le,j),{pageBreakBefore:Y}),Y=!1}}}return J}function U(Q){for(var j=0;j<Q.childNodes.length;j++){var J=Q.childNodes[j];if(J.nodeType===1&&/^(p|div|ul|ol|table|h[1-6]|blockquote|pre|hr|section|article)$/.test(J.tagName.toLowerCase()))return!0}return!1}return B=se(D,fe),B||"<w:p/>"}function g(){var D=null;try{typeof r.getDocumentPageSetup=="function"&&(D=r.getDocumentPageSetup())}catch{}D=D||{};var P={letter:[12240,15840],legal:[12240,20160],tabloid:[15840,24480],a3:[16838,23811],a4:[11906,16838],a5:[8391,11906]},B=P[String(D.format||"letter").toLowerCase()]||P.letter,Z=String(D.orientation||"").toLowerCase()==="landscape",fe=Z?B[1]:B[0],re=Z?B[0]:B[1];function ie(de,se){if(typeof de=="number"&&isFinite(de))return Math.round(de*1440);var U=/^\s*(-?[\d.]+)\s*(mm|cm|in|px|pt)?\s*$/.exec(String(de||""));if(!U)return se;var Q=parseFloat(U[1]);switch(U[2]){case"mm":return Math.round(Q*1440/25.4);case"cm":return Math.round(Q*1440/2.54);case"pt":return Math.round(Q*20);case"px":return Math.round(Q*15);default:return Math.round(Q*1440)}}var ae=D.margins||{};return'<w:sectPr><w:pgSz w:w="'+fe+'" w:h="'+re+'"'+(Z?' w:orient="landscape"':"")+'/><w:pgMar w:top="'+ie(ae.top,1440)+'" w:right="'+ie(ae.right,1440)+'" w:bottom="'+ie(ae.bottom,1440)+'" w:left="'+ie(ae.left,1440)+'" w:header="720" w:footer="720" w:gutter="0"/></w:sectPr>'}function h(D){return new Promise(function(P,B){try{let ye=function(me,ee){ie.push({name:me,bytes:z(ee)})};var pe=ye,Z=document.createElement("div");Z.innerHTML=r.getHTMLCode()||"",document.body.appendChild(Z),Z.style.cssText="position:absolute;left:-99999px;top:0;width:800px;";var fe=new V,re=p(Z,fe);Z.parentNode.removeChild(Z);var ie=[],ae=fe.footnotes.length>0,de=fe.endnotes.length>0,se=fe.comments.length>0;ye("[Content_Types].xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="png" ContentType="image/png"/><Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/><Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/><Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>'+(ae?'<Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/>':"")+(de?'<Override PartName="/word/endnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/>':"")+(se?'<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/>':"")+'<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>'),ye("_rels/.rels",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rIdDoc" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/><Relationship Id="rIdCore" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rIdApp" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/></Relationships>');for(var U="http://schemas.openxmlformats.org/officeDocument/2006/relationships/",Q='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rIdStyles" Type="'+U+'styles" Target="styles.xml"/><Relationship Id="rIdNum" Type="'+U+'numbering" Target="numbering.xml"/>'+(ae?'<Relationship Id="rIdFn" Type="'+U+'footnotes" Target="footnotes.xml"/>':"")+(de?'<Relationship Id="rIdEn" Type="'+U+'endnotes" Target="endnotes.xml"/>':"")+(se?'<Relationship Id="rIdCm" Type="'+U+'comments" Target="comments.xml"/>':""),j=0;j<fe.rels.length;j++){var J=fe.rels[j];Q+='<Relationship Id="'+J.id+'" Type="'+U+J.type+'" Target="'+H(J.target)+'"'+(J.mode?' TargetMode="'+J.mode+'"':"")+"/>"}ye("word/_rels/document.xml.rels",Q+"</Relationships>"),ye("word/document.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document xmlns:w="'+x.w+'" xmlns:r="'+x.r+'" xmlns:m="'+x.m+'"><w:body>'+re+g()+"</w:body></w:document>"),ye("word/styles.xml",L()),ye("word/numbering.xml",E(fe)),ae&&ye("word/footnotes.xml",A(fe.footnotes,"footnote")),de&&ye("word/endnotes.xml",A(fe.endnotes,"endnote")),se&&ye("word/comments.xml",C(fe.comments));var Y=D.title||u.docxExportTitle||document.title||"Document",te=D.author||u.docxExportAuthor||"RichTextEditor";ye("docProps/core.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>'+H(Y)+"</dc:title><dc:creator>"+H(te)+"</dc:creator><cp:lastModifiedBy>"+H(te)+'</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">'+new Date().toISOString().replace(/\.\d+Z$/,"Z")+"</dcterms:created></cp:coreProperties>"),ye("docProps/app.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>RichTextEditor</Application></Properties>');for(var le=0;le<fe.media.length;le++)ie.push({name:"word/media/"+fe.media[le].name,bytes:fe.media[le].bytes});O(ie).then(P,B)}catch(ye){B(ye)}})}function L(){for(var D="",P=1;P<=6;P++){var B=[36,30,26,24,22,20][P-1];D+='<w:style w:type="paragraph" w:styleId="Heading'+P+'"><w:name w:val="heading '+P+'"/><w:basedOn w:val="Normal"/><w:pPr><w:outlineLvl w:val="'+(P-1)+'"/><w:spacing w:before="240" w:after="120"/></w:pPr><w:rPr><w:b/><w:sz w:val="'+B+'"/><w:szCs w:val="'+B+'"/></w:rPr></w:style>'}return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:styles xmlns:w="'+x.w+'"><w:docDefaults><w:rPrDefault><w:rPr><w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/><w:sz w:val="22"/><w:szCs w:val="22"/></w:rPr></w:rPrDefault></w:docDefaults><w:style w:type="paragraph" w:default="1" w:styleId="Normal"><w:name w:val="Normal"/></w:style>'+D+'<w:style w:type="paragraph" w:styleId="Quote"><w:name w:val="Quote"/><w:basedOn w:val="Normal"/><w:rPr><w:i/><w:color w:val="4A5568"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Code"><w:name w:val="Code"/><w:basedOn w:val="Normal"/><w:rPr><w:rFonts w:ascii="Consolas" w:hAnsi="Consolas"/></w:rPr></w:style></w:styles>'}function E(D){for(var P="",B="",Z=Object.keys(D.numbering),fe=0;fe<Z.length;fe++){for(var re=Z[fe],ie=D.numbering[re],ae="",de=0;de<9;de++)ae+='<w:lvl w:ilvl="'+de+'"><w:start w:val="1"/><w:numFmt w:val="'+(ie==="bullet"?"bullet":"decimal")+'"/><w:lvlText w:val="'+(ie==="bullet"?"\uF0B7":"%"+(de+1)+".")+'"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="'+720*(de+1)+'" w:hanging="360"/></w:pPr>'+(ie==="bullet"?'<w:rPr><w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/></w:rPr>':"")+"</w:lvl>";P+='<w:abstractNum w:abstractNumId="'+re+'">'+ae+"</w:abstractNum>",B+='<w:num w:numId="'+re+'"><w:abstractNumId w:val="'+re+'"/></w:num>'}return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:numbering xmlns:w="'+x.w+'">'+P+B+"</w:numbering>"}function A(D,P){for(var B="<w:"+P+' w:type="separator" w:id="-1"><w:p><w:r><w:separator/></w:r></w:p></w:'+P+"><w:"+P+' w:type="continuationSeparator" w:id="0"><w:p><w:r><w:continuationSeparator/></w:r></w:p></w:'+P+">",Z=0;Z<D.length;Z++)B+="<w:"+P+' w:id="'+D[Z].id+'"><w:p><w:r><w:rPr><w:vertAlign w:val="superscript"/></w:rPr><w:'+P+'Ref/></w:r><w:r><w:t xml:space="preserve"> '+H(D[Z].text)+"</w:t></w:r></w:p></w:"+P+">";return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:'+P+'s xmlns:w="'+x.w+'">'+B+"</w:"+P+"s>"}function C(D){for(var P="",B=0;B<D.length;B++){var Z=D[B];P+='<w:comment w:id="'+Z.id+'" w:author="'+H(Z.author)+'" w:initials="'+H(Z.initials)+'" w:date="'+new Date().toISOString().replace(/\.\d+Z$/,"Z")+'"><w:p><w:r><w:t xml:space="preserve">'+H(Z.text)+"</w:t></w:r></w:p></w:comment>"}return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments xmlns:w="'+x.w+'">'+P+"</w:comments>"}function y(D){return!D||typeof D!="string"?"":D.replace(/\.docx?$/i,"").replace(/[\\/:*?"<>|]+/g,"").trim().slice(0,120)}function d(){var D=new Date;function P(B){return(B<10?"0":"")+B}return"Export-"+String(D.getFullYear()).slice(2)+P(D.getMonth()+1)+P(D.getDate())+"-"+P(D.getHours())+P(D.getMinutes())+P(D.getSeconds())}function w(D,P){var B=URL.createObjectURL(D),Z=document.createElement("a");return Z.href=B,Z.download=P,document.body.appendChild(Z),Z.click(),document.body.removeChild(Z),setTimeout(function(){URL.revokeObjectURL(B)},4e3),P}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_draghandle=RTE_Plugin_DragHandle,typeof RTE_DefaultConfig.dragHandleEnabled>"u"&&(RTE_DefaultConfig.dragHandleEnabled=!0),typeof RTE_DefaultConfig.dragHandleKeyboard>"u"&&(RTE_DefaultConfig.dragHandleKeyboard=!0);function RTE_Plugin_DragHandle(){var N=this,u,r,x=null,H=null,F=null,$=null,z=null,o=null;N.PluginName="DragHandle",N.InitConfig=function(g){u=g},N.InitEditor=function(g){r=g,O();try{r.attachEvent("ready",O)}catch{}try{r.attachEvent("aftersethtml",O)}catch{}setTimeout(O,0),r.moveBlock=function(h,L){return m(h,L)},r.moveBlockUp=function(){return k(-1)},r.moveBlockDown=function(){return k(1)},r.setDragHandleEnabled=function(h){return u.dragHandleEnabled=!!h,h||R(),!!h},r.isDragHandleEnabled=function(){return u.dragHandleEnabled!==!1}};function O(){var g=V();if(!(!g||g===x)){x=g,p(g);var h=K();h&&(g.addEventListener("mousemove",f),g.addEventListener("mousedown",_,!0),g.addEventListener("mousemove",v,!0),g.addEventListener("mouseup",s,!0),g.addEventListener("keydown",M),g.addEventListener("mouseleave",function(){z||R()}))}}function V(){try{return r.getDocument()}catch{return null}}function K(){try{return r.getEditable()}catch{return null}}function W(){var g=K();if(!g)return[];for(var h=[],L=0;L<g.children.length;L++){var E=g.children[L];E.nodeType===1&&(E.getAttribute&&(E.getAttribute("data-rte-page-overlay")==="true"||E.getAttribute("data-rte-linenumbers")==="true")||h.push(E))}return h}function q(g){for(var h=K(),L=g&&g.nodeType===3?g.parentNode:g,E=null;L&&L!==h;)E=L,L=L.parentNode;return L===h&&E&&E.nodeType===1?E:null}function b(){try{var g=r.getSelection();return!g||g.rangeCount===0?null:q(g.getRangeAt(0).startContainer)}catch{return null}}function m(g,h){var L=K();if(!L||!g||g.parentNode!==L||h===g||h&&h.parentNode!==L||h===g.nextSibling)return!1;L.insertBefore(g,h||null);try{var E=V(),A=E.createRange();A.selectNodeContents(g),A.collapse(!0);var C=r.getSelection();C.removeAllRanges(),C.addRange(A)}catch{}return c(),!0}function k(g){var h=b();if(!h)return!1;var L=W(),E=L.indexOf(h);return E<0?!1:g<0?E===0?!1:m(h,L[E-1]):E>=L.length-1?!1:m(h,L[E+1].nextSibling)}function M(g){u.dragHandleKeyboard!==!1&&(!g.altKey||!g.shiftKey||g.ctrlKey||g.metaKey||g.key!=="ArrowUp"&&g.key!=="ArrowDown"||k(g.key==="ArrowUp"?-1:1)&&(g.preventDefault(),g.stopPropagation()))}function I(g,h){var L=h.parentNode||g.body;(!H||!H.parentNode)&&(H=g.createElement("div"),H.className="rte-drag-grip",H.setAttribute("contenteditable","false"),H.setAttribute("aria-hidden","true"),H.textContent="\u283F",L.appendChild(H)),(!F||!F.parentNode)&&(F=g.createElement("div"),F.className="rte-drag-indicator",F.setAttribute("contenteditable","false"),F.setAttribute("aria-hidden","true"),L.appendChild(F))}function R(){H&&(H.style.display="none"),$=null}function l(){F&&(F.style.display="none")}function f(g){if(!(z||u.dragHandleEnabled===!1)){var h=V(),L=K();if(!(!h||!L)){var E=null;if(g.target!==H){if(L.contains(g.target)&&(E=q(g.target)),!E||W().indexOf(E)<0){R();return}if(!(E===$&&H&&H.style.display!=="none")){I(h,L),$=E;var A=!1;try{A=h.defaultView.getComputedStyle(L).direction==="rtl"}catch{}H.style.display="block",H.style.top=E.offsetTop+"px",A?H.style.left=E.offsetLeft+E.offsetWidth+4+"px":H.style.left=Math.max(0,E.offsetLeft-22)+"px"}}}}}function _(g){if(!(g.target!==H||!$)){z={block:$},o=null,g.preventDefault(),g.stopPropagation();var h=K();h&&h.classList&&h.classList.add("rte-drag-active"),H&&H.classList.add("rte-drag-grip-held")}}function v(g){if(z){g.preventDefault();var h=V(),L=K();if(!(!h||!L)){I(h,L);var E=W();if(E.length){var A=L.getBoundingClientRect(),C=g.clientY-A.top+(L.scrollTop||0);o=null;for(var y=null,d=0;d<E.length;d++){var w=E[d],D=w.offsetTop+w.offsetHeight/2;if(C<D){o=w,y=w.offsetTop;break}}if(y===null){var P=E[E.length-1];y=P.offsetTop+P.offsetHeight}F.style.display="block",F.style.top=Math.max(0,y-1)+"px",F.style.left=L.offsetLeft+"px",F.style.width=L.offsetWidth+"px"}}}}function s(){if(z){var g=z.block,h=o;z=null,l();var L=K();L&&L.classList&&L.classList.remove("rte-drag-active"),H&&H.classList.remove("rte-drag-grip-held"),R(),h!==g&&m(g,h)}}function c(){try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function p(g){if(!g.getElementById("rte-drag-handle-styles")){var h=g.createElement("style");h.id="rte-drag-handle-styles",h.appendChild(g.createTextNode(".rte-drag-grip{position:absolute;display:none;width:18px;text-align:center;color:#94a3b8;font-size:14px;line-height:1.4;cursor:grab;user-select:none;z-index:20;border-radius:4px;}.rte-drag-grip:hover{background:rgba(148,163,184,.18);color:#475569;}.rte-drag-grip-held{cursor:grabbing;color:#1474ea;}.rte-drag-indicator{position:absolute;display:none;height:2px;background:#1474ea;border-radius:1px;pointer-events:none;z-index:19;}.rte-drag-active{cursor:grabbing;}.rte-drag-active *{cursor:grabbing !important;}")),(g.head||g.getElementsByTagName("head")[0]||g.documentElement).appendChild(h),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(g,h,"rte-drag-handle-styles",h.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_emailtoolkit=RTE_Plugin_EmailToolkit,RTE_DefaultConfig.emailInlineProperties=RTE_DefaultConfig.emailInlineProperties||["color","background-color","font-family","font-size","font-weight","font-style","text-decoration","text-align","line-height","margin-top","margin-bottom","margin-left","margin-right","padding-top","padding-bottom","padding-left","padding-right","border","border-radius","vertical-align","list-style-type","width"],RTE_DefaultConfig.emailWrapWidth=RTE_DefaultConfig.emailWrapWidth||640;function RTE_Plugin_EmailToolkit(){var N=this,u,r;N.PluginName="EmailToolkit",N.InitConfig=function(O){u=O},N.InitEditor=function(O){r=O,r.getEmailHTML=function(V){return N.BuildEmailHTML(V||{})},r.attachEvent("exec_command_emailexport",function(V){V.returnValue=!0,N.OpenEmailExport()})};function x(O,V,K,W){var q=O.ownerDocument.createElement(V);return K&&(q.style.cssText=K),W&&(q.className=W),O.appendChild(q),q}function H(O,V){if(!V)return!0;var K=V.trim().toLowerCase();return K==="normal"||K==="auto"||K==="none"||K==="0px"||K==="0"?!(O==="list-style-type"&&K==="none"):O==="background-color"&&(K==="rgba(0, 0, 0, 0)"||K==="transparent")?!0:O==="color"&&K==="rgb(0, 0, 0)"?!1:O==="text-decoration"&&K.indexOf("none")===0||O==="border"&&(K.indexOf("0px")===0||K.indexOf("none")!==-1&&K.indexOf("0px")!==-1)||O==="vertical-align"&&K==="baseline"||O==="font-weight"&&K==="400"||O==="font-style"&&K==="normal"||O==="text-align"&&(K==="start"||K==="left")}var F={UL:1,OL:1,LI:1};function $(O,V){for(var K=V.getComputedStyle(O),W=u.emailInlineProperties||[],q=[],b=0;b<W.length;b++){var m=W[b],k;try{k=K.getPropertyValue(m)}catch{k=""}k==null||k===""||H(m,k)||m==="width"&&O.nodeName!=="TABLE"&&O.nodeName!=="IMG"&&O.nodeName!=="TD"&&O.nodeName!=="TH"||m==="list-style-type"&&!F[O.nodeName]||q.push(m+":"+k)}return q.join(";")}var z={SCRIPT:1,STYLE:1,LINK:1,META:1};function o(O,V){if(O.nodeType===3)return O.ownerDocument.createTextNode(O.data);if(O.nodeType!==1||z[O.nodeName])return null;for(var K=O.ownerDocument,W=K.createElement(O.nodeName),q=0;q<O.attributes.length;q++){var b=O.attributes[q],m=b.name.toLowerCase();m==="class"||m==="id"||m==="contenteditable"||m==="style"||m.indexOf("data-rte-")===0||W.setAttribute(b.name,b.value)}var k=$(O,V);k&&W.setAttribute("style",k);for(var M=0;M<O.childNodes.length;M++){var I=o(O.childNodes[M],V);I&&W.appendChild(I)}return W}N.BuildEmailHTML=function(O){for(var V=r.getEditable(),K=r.getDocument(),W=K&&K.defaultView||window,q=K.createElement("div"),b=0;b<V.childNodes.length;b++){var m=o(V.childNodes[b],W);m&&q.appendChild(m)}var k=q.innerHTML,M=O.wrap!==!1;if(!M)return k;var I=O.width||u.emailWrapWidth||640;return'<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="border-collapse:collapse"><tr><td align="center" style="padding:0"><table role="presentation" width="'+I+'" cellpadding="0" cellspacing="0" style="border-collapse:collapse;max-width:'+I+'px;width:100%"><tr><td style="padding:16px;font-family:Arial,Helvetica,sans-serif">'+k+"</td></tr></table></td></tr></table>"},N.OpenEmailExport=function(){var O=N.BuildEmailHTML({}),V=r.createDialog(r.getLangText&&r.getLangText("emailexporttitle")||"Export email HTML","rte-dialog-email"),K=typeof V.close=="function"?function(){V.close()}:function(){r.closeCurrentPopup()},W=x(V,"div","","rte-email-export");x(W,"div","","rte-email-export-copy").innerText="Inline-styled HTML for email clients (class/style blocks resolved to inline styles). Copy and paste into your email tool.";var q=x(W,"textarea","","rte-email-export-code");q.value=O,q.readOnly=!0,q.setAttribute("aria-label","Inline-styled email HTML");var b=x(W,"div","","rte-email-export-status");b.setAttribute("role","status"),b.setAttribute("aria-live","polite"),b.textContent="Ready to copy "+O.length+" characters.";var m=x(W,"div","","rte-email-export-footer"),k=x(m,"button","","rte-email-export-button rte-email-export-button-primary");k.type="button",k.textContent="Copy",k.onclick=function(){q.select();try{navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(q.value):V.ownerDocument.execCommand("copy"),k.textContent="Copied",b.textContent="Copied email HTML to the clipboard.",setTimeout(function(){k.textContent="Copy",b.textContent="Ready to copy "+O.length+" characters."},1400)}catch{}};var M=x(m,"button","","rte-email-export-button");M.type="button",M.textContent="Close",M.onclick=K,setTimeout(function(){q.focus()},0)}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_emojiautocomplete=RTE_Plugin_EmojiAutocomplete,RTE_DefaultConfig.emojiAutocompleteEnabled=typeof RTE_DefaultConfig.emojiAutocompleteEnabled>"u"?!0:RTE_DefaultConfig.emojiAutocompleteEnabled,RTE_DefaultConfig.emojiShortcodes=RTE_DefaultConfig.emojiShortcodes||{smile:"\u{1F604}",smiley:"\u{1F603}",grin:"\u{1F601}",laughing:"\u{1F606}",satisfied:"\u{1F606}",joy:"\u{1F602}",rofl:"\u{1F923}",sweat_smile:"\u{1F605}",wink:"\u{1F609}",blush:"\u{1F60A}",innocent:"\u{1F607}",heart_eyes:"\u{1F60D}",star_struck:"\u{1F929}",kissing_heart:"\u{1F618}",yum:"\u{1F60B}",stuck_out_tongue:"\u{1F61B}",zany:"\u{1F92A}",thinking:"\u{1F914}",shush:"\u{1F92B}",neutral_face:"\u{1F610}",expressionless:"\u{1F611}",no_mouth:"\u{1F636}",smirk:"\u{1F60F}",unamused:"\u{1F612}",roll_eyes:"\u{1F644}",grimacing:"\u{1F62C}",relieved:"\u{1F60C}",pensive:"\u{1F614}",sleepy:"\u{1F62A}",sleeping:"\u{1F634}",mask:"\u{1F637}",face_with_thermometer:"\u{1F912}",nauseated_face:"\u{1F922}",sneezing_face:"\u{1F927}",dizzy_face:"\u{1F635}",exploding_head:"\u{1F92F}",cowboy:"\u{1F920}",sunglasses:"\u{1F60E}",nerd:"\u{1F913}",monocle:"\u{1F9D0}",confused:"\u{1F615}",worried:"\u{1F61F}",slightly_frowning_face:"\u{1F641}",open_mouth:"\u{1F62E}",astonished:"\u{1F632}",flushed:"\u{1F633}",fearful:"\u{1F628}",cold_sweat:"\u{1F630}",cry:"\u{1F622}",sob:"\u{1F62D}",scream:"\u{1F631}",confounded:"\u{1F616}",persevere:"\u{1F623}",disappointed:"\u{1F61E}",sweat:"\u{1F613}",weary:"\u{1F629}",tired_face:"\u{1F62B}",triumph:"\u{1F624}",rage:"\u{1F621}",angry:"\u{1F620}",cursing_face:"\u{1F92C}",smiling_imp:"\u{1F608}",imp:"\u{1F47F}",skull:"\u{1F480}",poop:"\u{1F4A9}",hankey:"\u{1F4A9}",clown:"\u{1F921}",ghost:"\u{1F47B}",alien:"\u{1F47D}",robot:"\u{1F916}",heart_eyes_cat:"\u{1F63B}",see_no_evil:"\u{1F648}",hear_no_evil:"\u{1F649}",speak_no_evil:"\u{1F64A}",heart:"\u2764\uFE0F",orange_heart:"\u{1F9E1}",yellow_heart:"\u{1F49B}",green_heart:"\u{1F49A}",blue_heart:"\u{1F499}",purple_heart:"\u{1F49C}",black_heart:"\u{1F5A4}",broken_heart:"\u{1F494}",two_hearts:"\u{1F495}",sparkling_heart:"\u{1F496}",heartpulse:"\u{1F497}",cupid:"\u{1F498}",gift_heart:"\u{1F49D}",revolving_hearts:"\u{1F49E}",kiss:"\u{1F48B}","+1":"\u{1F44D}",thumbsup:"\u{1F44D}","-1":"\u{1F44E}",thumbsdown:"\u{1F44E}",ok_hand:"\u{1F44C}",punch:"\u{1F44A}",fist:"\u270A",facepunch:"\u{1F44A}",wave:"\u{1F44B}",raised_hand:"\u270B",raised_hands:"\u{1F64C}",pray:"\u{1F64F}",clap:"\u{1F44F}",muscle:"\u{1F4AA}",point_up:"\u261D\uFE0F",point_down:"\u{1F447}",point_left:"\u{1F448}",point_right:"\u{1F449}",v:"\u270C\uFE0F",crossed_fingers:"\u{1F91E}",handshake:"\u{1F91D}",writing_hand:"\u270D\uFE0F",selfie:"\u{1F933}",nail_care:"\u{1F485}",eyes:"\u{1F440}",fire:"\u{1F525}",star:"\u2B50",star2:"\u{1F31F}",sparkles:"\u2728",zap:"\u26A1",boom:"\u{1F4A5}",collision:"\u{1F4A5}",dizzy:"\u{1F4AB}",sweat_drops:"\u{1F4A6}",droplet:"\u{1F4A7}",snowflake:"\u2744\uFE0F",sunny:"\u2600\uFE0F",cloud:"\u2601\uFE0F",rainbow:"\u{1F308}",umbrella:"\u2614",ocean:"\u{1F30A}",sun_with_face:"\u{1F31E}",full_moon:"\u{1F315}",crescent_moon:"\u{1F319}",tada:"\u{1F389}",confetti_ball:"\u{1F38A}",balloon:"\u{1F388}",gift:"\u{1F381}",trophy:"\u{1F3C6}",medal:"\u{1F3C5}",crown:"\u{1F451}",gem:"\u{1F48E}",rocket:"\u{1F680}",airplane:"\u2708\uFE0F",car:"\u{1F697}",rotating_light:"\u{1F6A8}",100:"\u{1F4AF}",white_check_mark:"\u2705",heavy_check_mark:"\u2714\uFE0F",ballot_box_with_check:"\u2611\uFE0F",x:"\u274C",warning:"\u26A0\uFE0F",no_entry:"\u26D4",question:"\u2753",exclamation:"\u2757",bulb:"\u{1F4A1}",lock:"\u{1F512}",key:"\u{1F511}",mag:"\u{1F50D}",bell:"\u{1F514}",recycle:"\u267B\uFE0F",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",coffee:"\u2615",tea:"\u{1F375}",beer:"\u{1F37A}",beers:"\u{1F37B}",wine_glass:"\u{1F377}",cocktail:"\u{1F378}",pizza:"\u{1F355}",hamburger:"\u{1F354}",fries:"\u{1F35F}",taco:"\u{1F32E}",cake:"\u{1F382}",birthday:"\u{1F382}",cookie:"\u{1F36A}",doughnut:"\u{1F369}",apple:"\u{1F34E}",banana:"\u{1F34C}",strawberry:"\u{1F353}",avocado:"\u{1F951}",bread:"\u{1F35E}",cheese:"\u{1F9C0}",dog:"\u{1F436}",cat:"\u{1F431}",mouse:"\u{1F42D}",rabbit:"\u{1F430}",bear:"\u{1F43B}",panda_face:"\u{1F43C}",koala:"\u{1F428}",tiger:"\u{1F42F}",lion:"\u{1F981}",cow:"\u{1F42E}",pig:"\u{1F437}",frog:"\u{1F438}",monkey_face:"\u{1F435}",chicken:"\u{1F414}",penguin:"\u{1F427}",bird:"\u{1F426}",unicorn:"\u{1F984}",bee:"\u{1F41D}",bug:"\u{1F41B}",butterfly:"\u{1F98B}",snail:"\u{1F40C}",book:"\u{1F4D6}",books:"\u{1F4DA}",memo:"\u{1F4DD}",pencil:"\u{1F4DD}",email:"\u2709\uFE0F",envelope:"\u2709\uFE0F",calendar:"\u{1F4C5}",chart:"\u{1F4CA}",bar_chart:"\u{1F4CA}",chart_with_upwards_trend:"\u{1F4C8}",clipboard:"\u{1F4CB}",pushpin:"\u{1F4CC}",paperclip:"\u{1F4CE}",scissors:"\u2702\uFE0F",hammer:"\u{1F528}",wrench:"\u{1F527}",gear:"\u2699\uFE0F",nut_and_bolt:"\u{1F529}",bomb:"\u{1F4A3}",hourglass:"\u231B",watch:"\u231A",alarm_clock:"\u23F0",moneybag:"\u{1F4B0}",dollar:"\u{1F4B5}",credit_card:"\u{1F4B3}",chart_increasing:"\u{1F4C8}",link:"\u{1F517}",mag_right:"\u{1F50E}",telescope:"\u{1F52D}",microscope:"\u{1F52C}",syringe:"\u{1F489}",pill:"\u{1F48A}",phone:"\u{1F4DE}",telephone:"\u{1F4DE}",iphone:"\u{1F4F1}",computer:"\u{1F4BB}",keyboard:"\u2328\uFE0F",printer:"\u{1F5A8}\uFE0F",camera:"\u{1F4F7}",movie_camera:"\u{1F3A5}",tv:"\u{1F4FA}",seedling:"\u{1F331}",evergreen_tree:"\u{1F332}",deciduous_tree:"\u{1F333}",palm_tree:"\u{1F334}",cactus:"\u{1F335}",four_leaf_clover:"\u{1F340}",rose:"\u{1F339}",sunflower:"\u{1F33B}",tulip:"\u{1F337}",blossom:"\u{1F33C}",herb:"\u{1F33F}",musical_note:"\u{1F3B5}",notes:"\u{1F3B6}",microphone:"\u{1F3A4}",headphones:"\u{1F3A7}",guitar:"\u{1F3B8}",trumpet:"\u{1F3BA}",soccer:"\u26BD",basketball:"\u{1F3C0}",football:"\u{1F3C8}",baseball:"\u26BE",tennis:"\u{1F3BE}","8ball":"\u{1F3B1}",dart:"\u{1F3AF}",video_game:"\u{1F3AE}",game_die:"\u{1F3B2}",trophy2:"\u{1F3C6}",sos:"\u{1F198}",new:"\u{1F195}",ok:"\u{1F197}",up:"\u{1F199}",cool:"\u{1F192}",free:"\u{1F193}",arrow_up:"\u2B06\uFE0F",arrow_down:"\u2B07\uFE0F",arrow_left:"\u2B05\uFE0F",arrow_right:"\u27A1\uFE0F",arrow_forward:"\u25B6\uFE0F",bangbang:"\u203C\uFE0F",interrobang:"\u2049\uFE0F",grey_question:"\u2754",grey_exclamation:"\u2755"};function RTE_Plugin_EmojiAutocomplete(){var N=this,u,r,x,H,F=null,$=[],z=0,o=-1,O=null;N.PluginName="EmojiAutocomplete",N.InitConfig=function(l){u=l},N.InitEditor=function(l){r=l,x=r.getEditable(),H=r.getDocument(),!(!x||!H)&&(H.addEventListener("input",W,!1),H.addEventListener("keydown",k,!0),H.addEventListener("blur",function(){setTimeout(R,150)},!0))};function V(){return u.emojiShortcodes||{}}function K(){var l=r.getSelection();if(!l||l.rangeCount===0||!l.isCollapsed)return null;var f=l.getRangeAt(0);if(f.startContainer.nodeType!==3)return null;for(var _=f.startContainer.parentNode;_&&_!==x;){if(_.nodeName==="CODE"||_.nodeName==="PRE")return null;_=_.parentNode}return f}function W(){if(u.emojiAutocompleteEnabled){var l=K();if(!l){R();return}var f=l.startContainer,_=l.startOffset,v=f.data.slice(0,_),s=/(^|[^a-z0-9_])(:[a-z0-9_+\-]{1,30}:)$/i.exec(v);if(s){var c=s[2].slice(1,-1).toLowerCase(),p=V()[c];if(p){I(f,_-s[2].length,_,p),R();return}}var g=/(^|[^a-z0-9_])(:)([a-z0-9_+\-]{1,30})$/i.exec(v);if(g){var h=g[3].toLowerCase();O=f,o=_-h.length-1,q(h,l)}else R()}}function q(l,f){for(var _=V(),v=Object.keys(_),s=[],c=[],p=0;p<v.length;p++){var g=v[p];g.indexOf(l)===0?s.push(g):g.indexOf(l)!==-1&&c.push(g)}for(var h=s.concat(c),L={},E=[],A=0;A<h.length&&E.length<8;A++){var C=_[h[A]];L[C]||(L[C]=1,E.push({code:h[A],emo:C}))}if(!E.length){R();return}$=E,z=0,b(f)}function b(l){var f=document;F||(F=f.createElement("div"),F.className="rte-emoji-pop",F.setAttribute("role","listbox"),F.setAttribute("aria-label","Emoji suggestions"),F.style.cssText="position:fixed;z-index:2147483600;",f.body.appendChild(F)),F.innerHTML="",$.forEach(function(h,L){var E=f.createElement("div");E.className="rte-emoji-pop-row"+(L===z?" is-active":""),E.setAttribute("role","option"),E.setAttribute("aria-selected",L===z?"true":"false");var A=f.createElement("span");A.className="rte-emoji-pop-glyph",A.textContent=h.emo;var C=f.createElement("span");C.className="rte-emoji-pop-code",C.textContent=":"+h.code+":",E.appendChild(A),E.appendChild(C),E.onmousedown=function(y){y.preventDefault(),z=L,M()},E.onmouseenter=function(){z=L,m()},F.appendChild(E)});try{var _=l.getBoundingClientRect(),v=H.defaultView&&H.defaultView.frameElement?H.defaultView.frameElement.getBoundingClientRect():{left:0,top:0},s=v.left+_.left,c=v.top+_.bottom+4,p=f.documentElement.clientWidth,g=f.documentElement.clientHeight;F.style.left=Math.max(4,Math.min(s,p-290))+"px",F.style.top=Math.max(4,Math.min(c,g-20))+"px",F.style.display="block"}catch{}}function m(){if(F)for(var l=F.childNodes,f=0;f<l.length;f++)l[f].classList.toggle("is-active",f===z),l[f].setAttribute("aria-selected",f===z?"true":"false")}function k(l){if(!(!F||F.style.display==="none"||!$.length))switch(l.key){case"ArrowDown":l.preventDefault(),l.stopPropagation(),z=(z+1)%$.length,m();break;case"ArrowUp":l.preventDefault(),l.stopPropagation(),z=(z-1+$.length)%$.length,m();break;case"Enter":case"Tab":l.preventDefault(),l.stopPropagation(),M();break;case"Escape":l.preventDefault(),l.stopPropagation(),R();break}}function M(){if(!$.length||!O||o<0){R();return}var l=$[z]||$[0],f=K();if(!f||f.startContainer!==O){R();return}I(O,o,f.startOffset,l.emo),R()}function I(l,f,_,v){try{var s=l.data,c=s.slice(0,f),p=s.slice(_),g=l.parentNode;if(!g)return;var h=H.createDocumentFragment();c&&h.appendChild(H.createTextNode(c));var L=H.createTextNode(v);h.appendChild(L);var E=p?H.createTextNode(p):null;E&&h.appendChild(E),g.replaceChild(h,l);var A=H.createRange();E?A.setStart(E,0):A.setStartAfter(L),A.collapse(!0);var C=r.getSelection();if(C&&(C.removeAllRanges(),C.addRange(A)),typeof r.fireChange=="function")try{r.fireChange()}catch{}}catch{}}function R(){F&&(F.style.display="none"),$=[],z=0,o=-1,O=null}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_foldheadings=RTE_Plugin_FoldHeadings,RTE_DefaultConfig.foldHeadingsEnabled=typeof RTE_DefaultConfig.foldHeadingsEnabled>"u"?!0:RTE_DefaultConfig.foldHeadingsEnabled;function RTE_Plugin_FoldHeadings(){var N=this,u,r,x=!1,H=null;N.PluginName="FoldHeadings",N.InitConfig=function(R){u=R},N.InitEditor=function(R){r=R,F();try{r.attachEvent("ready",F)}catch{}try{r.attachEvent("aftersethtml",F)}catch{}setTimeout(F,0),setTimeout(F,200),r.toggleHeadingFold=function(l){$(l)&&K(l)},r.unfoldAll=function(){var l=r.getEditable();l&&o(l.querySelectorAll(".rte-fold-collapsed,.rte-fold-hidden"))},r.foldAtCaret=function(){var l=V();return l&&K(l),!!l}};function F(){var R=r.getDocument();R&&(k(R),R!==H&&(R.addEventListener("click",b,!0),H=R)),I()}function $(R){return R&&R.nodeType===1&&/^H[1-6]$/.test(R.nodeName)}function z(R){return $(R)?+R.nodeName.charAt(1):0}function o(R){for(var l=0;l<R.length;l++)R[l].classList.remove("rte-fold-collapsed"),R[l].classList.remove("rte-fold-hidden")}function O(R){for(var l=z(R),f=[],_=R.nextElementSibling;_&&!($(_)&&z(_)<=l);)f.push(_),_=_.nextElementSibling;return f}function V(){try{var R=r.getSelection();if(!R||R.rangeCount===0)return null;for(var l=r.getEditable(),f=R.getRangeAt(0).startContainer;f&&f!==l;){if($(f))return f;f=f.parentNode}for(var _=R.getRangeAt(0).startContainer;_&&_.parentNode!==l&&_!==l;)_=_.parentNode;for(;_&&_!==l;){if($(_))return _;_=_.previousElementSibling}}catch{}return null}function K(R){R.classList.contains("rte-fold-collapsed")?q(R):W(R)}function W(R){var l=O(R);if(l.length){try{var f=r.getSelection();if(f&&f.rangeCount){for(var _=f.getRangeAt(0).startContainer,v=_.nodeType===1?_:_.parentNode,s=0;s<l.length;s++)if(l[s]===v||l[s].contains(v)){var c=r.getDocument(),p=c.createRange();p.selectNodeContents(R),p.collapse(!1),f.removeAllRanges(),f.addRange(p);break}}}catch{}R.classList.add("rte-fold-collapsed");for(var g=0;g<l.length;g++)l[g].classList.add("rte-fold-hidden");m()}}function q(R){R.classList.remove("rte-fold-collapsed");for(var l=O(R),f=0;f<l.length;f++)l[f].classList.remove("rte-fold-hidden");m()}function b(R){if(u.foldHeadingsEnabled){var l=R.target;if($(l)){var f=l.getBoundingClientRect(),_=R.clientX-f.left;_>2||_<-40||(R.preventDefault(),K(l))}}}function m(){try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function k(R){if(!(!R||R.getElementById("rte-foldheadings-styles"))){var l=".rte-fold-hidden{display:none !important;}h1,h2,h3,h4,h5,h6{position:relative;}h1::before,h2::before,h3::before,h4::before,h5::before,h6::before{content:'\\25BE';position:absolute;left:-0.95em;top:0;width:0.8em;text-align:center;color:#cbd5e1;cursor:pointer;opacity:0;transition:opacity .12s,transform .12s;font-size:.9em;}h1:hover::before,h2:hover::before,h3:hover::before,h4:hover::before,h5:hover::before,h6:hover::before{opacity:1;}h1.rte-fold-collapsed::before,h2.rte-fold-collapsed::before,h3.rte-fold-collapsed::before,h4.rte-fold-collapsed::before,h5.rte-fold-collapsed::before,h6.rte-fold-collapsed::before{content:'\\25B8';opacity:1;color:#1d67ba;}@media (prefers-reduced-motion: reduce){h1::before,h2::before,h3::before,h4::before,h5::before,h6::before{transition:none !important;}}@media (hover: none),(pointer: coarse){h1::before,h2::before,h3::before,h4::before,h5::before,h6::before{opacity:.5;}}",f=R.createElement("style");f.id="rte-foldheadings-styles",f.appendChild(R.createTextNode(l)),(R.head||R.getElementsByTagName("head")[0]||R.documentElement).appendChild(f),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(R,f,"rte-foldheadings-styles",f.textContent)}}function M(){var R=r.getEditable();if(!R)return function(){};var l=R.querySelectorAll(".rte-fold-collapsed"),f=R.querySelectorAll(".rte-fold-hidden"),_;for(_=0;_<l.length;_++)l[_].classList.remove("rte-fold-collapsed");for(_=0;_<f.length;_++)f[_].classList.remove("rte-fold-hidden");return function(){for(var s=0;s<l.length;s++)l[s].classList.add("rte-fold-collapsed");for(var c=0;c<f.length;c++)f[c].classList.add("rte-fold-hidden")}}function I(){if(!x){for(var R=["getHTMLCode","getJSON","getHTMLContent"],l=!1,f=0;f<R.length;f++)(function(_){var v=r[_];if(!(typeof v!="function"||v.__rteFoldWrapped)){var s=function(){var c=M();try{return v.apply(r,arguments)}finally{c()}};s.__rteFoldWrapped=!0,r[_]=s,l=!0}})(R[f]);l&&(x=!0)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_footnotes=RTE_Plugin_Footnotes,typeof RTE_DefaultConfig.footnotesTitle>"u"&&(RTE_DefaultConfig.footnotesTitle="Footnotes"),typeof RTE_DefaultConfig.footnotesNumbering>"u"&&(RTE_DefaultConfig.footnotesNumbering="decimal"),typeof RTE_DefaultConfig.footnotesMarkerPrefix>"u"&&(RTE_DefaultConfig.footnotesMarkerPrefix=""),typeof RTE_DefaultConfig.footnotesMarkerSuffix>"u"&&(RTE_DefaultConfig.footnotesMarkerSuffix="");function RTE_Plugin_Footnotes(){var N=this,u,r,x=null,H=!1;N.PluginName="Footnotes",N.InitConfig=function(c){u=c},N.InitEditor=function(c){r=c,r.attachEvent("exec_command_insertfootnote",function(p){p.returnValue=!0,N.InsertFootnote()}),F();try{r.attachEvent("ready",F)}catch{}try{r.attachEvent("aftersethtml",function(){F(),O()})}catch{}setTimeout(function(){F(),O()},0),r.insertFootnote=function(p){return N.InsertFootnote(p)},r.getFootnotes=function(){return N.List()},r.syncFootnotes=function(){return R()},r.getFootnotesCss=function(){return v()}};function F(){var c=$();c&&(s(c),c!==x&&(o(),x=c))}function $(){try{return r.getDocument()}catch{return null}}function z(){try{return r.getEditable()}catch{return null}}function o(){var c=z();c&&(c.addEventListener("keyup",O),c.addEventListener("cut",O),c.addEventListener("paste",O),c.addEventListener("drop",O),c.addEventListener("click",function(p){var g=V(p.target,"rte-fn-ref",c),h=V(p.target,"rte-fn-back",c),L=null;if(g?L=m(g.getAttribute("data-fn-id")):h&&(L=k(h.getAttribute("data-fn-id"))),!!L){p.preventDefault();try{L.scrollIntoView({block:"center"})}catch{L.scrollIntoView()}f(L)}}))}function O(){H||(H=!0,setTimeout(function(){H=!1,R()},0))}function V(c,p,g){for(;c&&c!==g;){if(c.nodeType===1&&c.classList&&c.classList.contains(p))return c;c=c.parentNode}return null}function K(){return"fn"+Math.floor(Math.random()*1e9).toString(36)+(W++).toString(36)}var W=0;function q(){var c=z();return c?Array.prototype.slice.call(c.querySelectorAll("sup.rte-fn-ref[data-fn-id]")):[]}function b(){var c=z();return c?c.querySelector("section.rte-footnotes"):null}function m(c){var p=b();return p?p.querySelector('li.rte-fn-note[data-fn-id="'+M(c)+'"]'):null}function k(c){var p=z();return p?p.querySelector('sup.rte-fn-ref[data-fn-id="'+M(c)+'"]'):null}function M(c){return String(c).replace(/["\\]/g,"\\$&")}N.InsertFootnote=function(c){var p=$(),g=z();if(!p||!g)return null;var h=K(),L=p.createElement("sup");L.className="rte-fn-ref",L.setAttribute("data-fn-id",h),L.setAttribute("contenteditable","false"),L.setAttribute("id","fnref-"+h),L.textContent="0";var E=!1;try{typeof r.insertElement=="function"&&(r.insertElement(L),E=!0)}catch{}if(!E)try{var A=r.getSelection();if(A&&A.rangeCount){var C=A.getRangeAt(0);C.collapse(!1),C.insertNode(L),C.setStartAfter(L),C.collapse(!0),A.removeAllRanges(),A.addRange(C),E=!0}}catch{}E||g.appendChild(L);var y=I(p).querySelector("ol.rte-fn-list"),d=p.createElement("li");d.className="rte-fn-note",d.setAttribute("data-fn-id",h),d.setAttribute("id","fn-"+h),c!=null&&String(c)!==""&&d.appendChild(p.createTextNode(String(c)));var w=p.createElement("a");w.className="rte-fn-back",w.setAttribute("data-fn-id",h),w.setAttribute("href","#fnref-"+h),w.setAttribute("contenteditable","false"),w.setAttribute("title","Back to reference"),w.textContent="\u21A9",d.appendChild(w),y.appendChild(d),R();try{var D=p.createRange();D.setStart(d,0),D.collapse(!0);var P=r.getSelection();P.removeAllRanges(),P.addRange(D),typeof r.focus=="function"&&r.focus()}catch{}return _(),h};function I(c){var p=z(),g=b();if(g)return g;g=c.createElement("section"),g.className="rte-footnotes";var h=String(u.footnotesTitle==null?"":u.footnotesTitle);if(h){var L=c.createElement("h2");L.className="rte-fn-title",L.textContent=h,g.appendChild(L)}var E=c.createElement("ol");return E.className="rte-fn-list",g.appendChild(E),p.appendChild(g),g}function R(){var c=$(),p=b(),g=q();if(!g.length)return p&&p.parentNode&&p.parentNode.removeChild(p),[];if(!c)return[];p||(p=I(c));var h=p.querySelector("ol.rte-fn-list");h||(h=c.createElement("ol"),h.className="rte-fn-list",p.appendChild(h));for(var L={},E=[],A=0;A<g.length;A++){var C=g[A],y=C.getAttribute("data-fn-id");if(L[y]){var d=K();C.setAttribute("data-fn-id",d),C.setAttribute("id","fnref-"+d),y=d}L[y]=!0;var w=String(A+1),D=String(u.footnotesMarkerPrefix||"")+w+String(u.footnotesMarkerSuffix||"");C.textContent!==D&&(C.textContent=D),C.setAttribute("data-fn-number",w),C.getAttribute("contenteditable")!=="false"&&C.setAttribute("contenteditable","false"),C.getAttribute("id")!=="fnref-"+y&&C.setAttribute("id","fnref-"+y);var P=h.querySelector('li.rte-fn-note[data-fn-id="'+M(y)+'"]');P||(P=c.createElement("li"),P.className="rte-fn-note",P.setAttribute("data-fn-id",y),P.setAttribute("id","fn-"+y)),P.setAttribute("data-fn-number",w),h.appendChild(P),E.push({id:y,number:A+1,text:l(P)})}for(var B=Array.prototype.slice.call(h.querySelectorAll("li.rte-fn-note")),Z=0;Z<B.length;Z++)L[B[Z].getAttribute("data-fn-id")]||h.removeChild(B[Z]);return h.getAttribute("data-numbering")!==u.footnotesNumbering&&h.setAttribute("data-numbering",u.footnotesNumbering),E}function l(c){if(!c)return"";for(var p=c.cloneNode(!0),g=p.querySelectorAll?p.querySelectorAll("a.rte-fn-back"):[],h=0;h<g.length;h++)g[h].parentNode&&g[h].parentNode.removeChild(g[h]);return(p.textContent||"").replace(/\u21a9/g,"").trim()}N.List=function(){var c=b();if(!c)return[];for(var p=[],g=c.querySelectorAll("li.rte-fn-note"),h=0;h<g.length;h++)p.push({id:g[h].getAttribute("data-fn-id"),number:parseInt(g[h].getAttribute("data-fn-number"),10)||h+1,text:l(g[h])});return p};function f(c){!c||!c.classList||(c.classList.add("rte-fn-flash"),setTimeout(function(){try{c.classList.remove("rte-fn-flash")}catch{}},900))}function _(){try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function v(){var c=String(u.footnotesNumbering||"decimal");return"sup.rte-fn-ref{cursor:pointer;font-size:.72em;line-height:0;vertical-align:super;color:#1474ea;font-weight:700;padding:0 .12em;user-select:none;}sup.rte-fn-ref:hover{text-decoration:underline;}section.rte-footnotes{margin-top:2em;padding-top:.85em;border-top:1px solid #ddd;font-size:.88em;color:#333;}section.rte-footnotes h2.rte-fn-title{font-size:1em;font-weight:700;margin:0 0 .5em;}ol.rte-fn-list{list-style:"+c+";padding-left:1.6em;margin:0;}ol.rte-fn-list>li{margin:.25em 0;}a.rte-fn-back{text-decoration:none;color:#1474ea;cursor:pointer;user-select:none;}.rte-fn-flash{background:#fff3b0;transition:background .5s ease;}"}function s(c){if(c){var p=c.getElementById("rte-footnotes-styles"),g=v();if(p){if(p.getAttribute("data-css")===g)return;p.parentNode&&p.parentNode.removeChild(p)}var h=c.createElement("style");h.id="rte-footnotes-styles",h.setAttribute("data-css",g),h.appendChild(c.createTextNode(g)),(c.head||c.getElementsByTagName("head")[0]||c.documentElement).appendChild(h),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(c,h,"rte-footnotes-styles",g)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_formatpainter=RTE_Plugin_FormatPainter,typeof RTE_DefaultConfig.formatPainterProperties>"u"&&(RTE_DefaultConfig.formatPainterProperties=["font-family","font-size","font-weight","font-style","text-decoration-line","color","background-color","letter-spacing","text-transform","font-variant"]);function RTE_Plugin_FormatPainter(){var N=this,u,r,x=null,H=!1,F=null,$={B:1,STRONG:1,I:1,EM:1,U:1,S:1,STRIKE:1,FONT:1,BIG:1,SMALL:1};N.PluginName="FormatPainter",N.InitConfig=function(f){u=f},N.InitEditor=function(f){r=f,r.attachEvent("exec_command_formatpainter",function(_){_.returnValue=!0,N.Toggle()}),z();try{r.attachEvent("ready",z)}catch{}try{r.attachEvent("aftersethtml",z)}catch{}setTimeout(z,0),r.copyFormatting=function(){return N.Copy()},r.pasteFormatting=function(){return N.Paint()},r.toggleFormatPainter=function(_){return N.Toggle(_)},r.cancelFormatPainter=function(){return N.Cancel()},r.isFormatPainterActive=function(){return!!x},r.getCapturedFormatting=function(){return x?V(x.props):null}};function z(){var f=o();if(f&&(l(f),f!==F)){F=f;var _=O();_&&(_.addEventListener("mouseup",function(){x&&setTimeout(function(){x&&N.Paint()},0)}),_.addEventListener("keydown",function(v){v.key==="Escape"&&x&&(N.Cancel(),v.preventDefault())}))}}function o(){try{return r.getDocument()}catch{return null}}function O(){try{return r.getEditable()}catch{return null}}function V(f){var _={};for(var v in f)f.hasOwnProperty(v)&&(_[v]=f[v]);return _}function K(){try{var f=r.getSelection();if(!f||f.rangeCount===0)return null;var _=f.getRangeAt(0).startContainer;return _&&_.nodeType===3&&(_=_.parentNode),_&&_.nodeType===1?_:null}catch{return null}}N.Copy=function(){var f=K(),_=o();if(!f||!_)return null;for(var v=_.defaultView||window,s=v.getComputedStyle(f),c=O(),p=c?v.getComputedStyle(c):null,g={},h=u.formatPainterProperties||[],L=0;L<h.length;L++){var E=h[L],A=s.getPropertyValue(E);A&&(p&&A===p.getPropertyValue(E)||(g[E]=A))}return g["background-color"]&&/^(transparent|rgba\(0,\s*0,\s*0,\s*0\))$/.test(g["background-color"])&&delete g["background-color"],x={props:g},M(!0),V(g)},N.Paint=function(){if(!x)return!1;var f=o(),_;try{_=r.getSelection()}catch{return!1}if(!f||!_||_.rangeCount===0||_.getRangeAt(0).collapsed)return!1;var v=f.createElement("span");v.className="rte-painted";var s=x.props;for(var c in s)s.hasOwnProperty(c)&&v.style.setProperty(c,s[c]);var p=null;try{p=r.surroundElement(v)}catch{p=null}return p?(W(p,u.formatPainterProperties||[]),m(p),H||N.Cancel(),I(),!0):!1};function W(f,_){for(var v=f.getElementsByTagName("*"),s=Array.prototype.slice.call(v),c=0;c<s.length;c++){var p=s[c];if(p.style){for(var g=0;g<_.length;g++)p.style.removeProperty(_[g]);p.style.removeProperty("font"),p.style.removeProperty("text-decoration")}p.nodeName==="FONT"&&(p.removeAttribute("color"),p.removeAttribute("face"),p.removeAttribute("size"))}for(var h=0;h<s.length;h++){var L=s[h];$[L.nodeName]&&L.parentNode&&b(L)}q(f)}function q(f){for(var _=Array.prototype.slice.call(f.getElementsByTagName("*")),v=0;v<_.length;v++){var s=_[v];if(s.getAttribute&&s.getAttribute("style")===""&&s.removeAttribute("style"),s.nodeName==="SPAN"&&s.classList&&s.classList.contains("rte-painted")&&s.parentNode){b(s);continue}s.nodeName==="SPAN"&&!s.attributes.length&&s.parentNode&&b(s)}f.getAttribute&&f.getAttribute("style")===""&&f.removeAttribute("style")}function b(f){for(var _=f.parentNode;f.firstChild;)_.insertBefore(f.firstChild,f);_.removeChild(f)}function m(f){for(var _=0;_<32;_++){var v=f.parentNode;if(!v||v.nodeType!==1||v.nodeName!=="SPAN"||!v.classList||!v.classList.contains("rte-painted")||!k(v,f))return;b(v)}}function k(f,_){for(var v=0;v<f.childNodes.length;v++){var s=f.childNodes[v];if(s!==_&&!(s.nodeType===3&&s.nodeValue.length===0))return!1}return!0}N.Toggle=function(f){return H=!!f,x?(N.Cancel(),!1):(N.Copy(),!!x)},N.Cancel=function(){return x=null,H=!1,M(!1),!0};function M(f){var _=O();!_||!_.classList||(f?_.classList.add("rte-format-painting"):_.classList.remove("rte-format-painting"))}function I(){try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function R(){return".rte-format-painting,.rte-format-painting *{cursor:copy !important;}"}function l(f){if(f&&!f.getElementById("rte-format-painter-styles")){var _=f.createElement("style");_.id="rte-format-painter-styles",_.appendChild(f.createTextNode(R())),(f.head||f.getElementsByTagName("head")[0]||f.documentElement).appendChild(_),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(f,_,"rte-format-painter-styles",_.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_formattingmarks=RTE_Plugin_FormattingMarks,typeof RTE_DefaultConfig.formattingMarkPilcrow>"u"&&(RTE_DefaultConfig.formattingMarkPilcrow=!0),typeof RTE_DefaultConfig.formattingMarkBlocks>"u"&&(RTE_DefaultConfig.formattingMarkBlocks=!0),typeof RTE_DefaultConfig.formattingMarkInvisibles>"u"&&(RTE_DefaultConfig.formattingMarkInvisibles=!0);function RTE_Plugin_FormattingMarks(){var N=this,u,r,x=null,H=!1,F=!1,$=!1,z=[{ch:"\xA0",cls:"rte-fm-nbsp",label:"\xB7"},{ch:"\u200B",cls:"rte-fm-zwsp",label:"\u2400"},{ch:"\u200E",cls:"rte-fm-bidi",label:"\u200E"},{ch:"\u200F",cls:"rte-fm-bidi",label:"\u200F"},{ch:"\xAD",cls:"rte-fm-shy",label:"-"}];N.PluginName="FormattingMarks",N.InitConfig=function(l){u=l},N.InitEditor=function(l){r=l,r.attachEvent("exec_command_formattingmarks",function(f){f.returnValue=!0,N.Toggle()}),o();try{r.attachEvent("ready",o)}catch{}try{r.attachEvent("aftersethtml",function(){o(),H&&K()})}catch{}setTimeout(o,0),r.setFormattingMarks=function(f){return H=!!f,W(),H},r.toggleFormattingMarks=function(){return N.Toggle()},r.isFormattingMarks=function(){return H},r.getFormattingMarksCss=function(){return I()}},N.Toggle=function(){return H=!H,W(),H};function o(){var l=O();if(l&&(R(l),M(),l!==x)){x=l;var f=V();f&&(f.addEventListener("keyup",function(){H&&K()}),f.addEventListener("paste",function(){H&&K()}))}}function O(){try{return r.getDocument()}catch{return null}}function V(){try{return r.getEditable()}catch{return null}}function K(){$||($=!0,setTimeout(function(){$=!1,b()},0))}function W(){var l=V();l&&(l.classList&&(l.classList.toggle("rte-fm-on",H),l.classList.toggle("rte-fm-pilcrow",H&&u.formattingMarkPilcrow!==!1),l.classList.toggle("rte-fm-blocks",H&&u.formattingMarkBlocks!==!1)),H&&u.formattingMarkInvisibles!==!1?b():q())}function q(){var l=V();if(l)for(var f=l.querySelectorAll("span[data-rte-fm]"),_=0;_<f.length;_++){var v=f[_],s=v.parentNode;s&&(s.replaceChild(v.ownerDocument.createTextNode(v.getAttribute("data-rte-fm-char")||""),v),s.normalize())}}function b(){var l=V(),f=O();if(!(!l||!f)){q();for(var _={},v=0;v<z.length;v++)_[z[v].ch]=z[v];for(var s=f.createTreeWalker(l,4,null,!1),c=[],p;p=s.nextNode();)if(p.nodeValue){for(var g=0;g<z.length;g++)if(p.nodeValue.indexOf(z[g].ch)>=0){c.push(p);break}}for(var h=0;h<c.length;h++)m(f,c[h],_)}}function m(l,f,_){var v=f.nodeValue,s=f.parentNode;if(s&&!(s.nodeName==="CODE"||s.nodeName==="PRE")){for(var c=l.createDocumentFragment(),p="",g=0;g<v.length;g++){var h=_[v[g]];if(!h){p+=v[g];continue}p&&(c.appendChild(l.createTextNode(p)),p="");var L=l.createElement("span");L.setAttribute("data-rte-fm","1"),L.setAttribute("data-rte-fm-char",v[g]),L.className=h.cls,L.setAttribute("contenteditable","false"),L.textContent=h.label,c.appendChild(L)}p&&c.appendChild(l.createTextNode(p)),s.replaceChild(c,f)}}function k(){var l=V();if(!l)return function(){};var f=Array.prototype.slice.call(l.querySelectorAll("span[data-rte-fm]"));if(!f.length)return function(){};for(var _=[],v=0;v<f.length;v++){var s=f[v],c=s.ownerDocument.createTextNode(s.getAttribute("data-rte-fm-char")||"");_.push({span:s,parent:s.parentNode,text:c}),s.parentNode&&s.parentNode.replaceChild(c,s)}return function(){for(var g=0;g<_.length;g++){var h=_[g];h.text.parentNode&&h.text.parentNode.replaceChild(h.span,h.text)}}}function M(){if(!F){for(var l=["getHTMLCode","getJSON","getHTMLContent","getText"],f=!1,_=0;_<l.length;_++)(function(v){var s=r[v];if(!(typeof s!="function"||s.__rteFmWrapped)){var c=function(){var p=k();try{return s.apply(r,arguments)}finally{p()}};c.__rteFmWrapped=!0,r[v]=c,f=!0}})(l[_]);f&&(F=!0)}}function I(){return".rte-fm-pilcrow p::after,.rte-fm-pilcrow h1::after,.rte-fm-pilcrow h2::after,.rte-fm-pilcrow h3::after,.rte-fm-pilcrow h4::after,.rte-fm-pilcrow h5::after,.rte-fm-pilcrow h6::after,.rte-fm-pilcrow li::after,.rte-fm-pilcrow blockquote::after{content:'\\00b6';color:#9aa4b5;opacity:.65;font-weight:400;}.rte-fm-blocks p,.rte-fm-blocks h1,.rte-fm-blocks h2,.rte-fm-blocks h3,.rte-fm-blocks h4,.rte-fm-blocks h5,.rte-fm-blocks h6,.rte-fm-blocks ul,.rte-fm-blocks ol,.rte-fm-blocks blockquote,.rte-fm-blocks table,.rte-fm-blocks div{outline:1px dashed rgba(120,140,170,.45);outline-offset:1px;}span[data-rte-fm]{color:#c2410c;opacity:.75;user-select:none;}.rte-fm-nbsp{background:rgba(194,65,12,.10);border-radius:2px;}.rte-fm-zwsp,.rte-fm-shy,.rte-fm-bidi{background:rgba(194,65,12,.18);border-radius:2px;font-size:.8em;vertical-align:middle;}"}function R(l){if(l){var f=l.getElementById("rte-formatting-marks-styles"),_=I();if(f){if(f.getAttribute("data-css")===_)return;f.parentNode&&f.parentNode.removeChild(f)}var v=l.createElement("style");v.id="rte-formatting-marks-styles",v.setAttribute("data-css",_),v.appendChild(l.createTextNode(_)),(l.head||l.getElementsByTagName("head")[0]||l.documentElement).appendChild(v),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(l,v,"rte-formatting-marks-styles",v.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_gapcursor=RTE_Plugin_GapCursor,typeof RTE_DefaultConfig.gapCursorClick>"u"&&(RTE_DefaultConfig.gapCursorClick=!0),typeof RTE_DefaultConfig.gapCursorKeys>"u"&&(RTE_DefaultConfig.gapCursorKeys=!0),typeof RTE_DefaultConfig.gapCursorHint>"u"&&(RTE_DefaultConfig.gapCursorHint=!0);function RTE_Plugin_GapCursor(){var N=this,u,r,x=null;N.PluginName="GapCursor";var H={TABLE:1,HR:1,IMG:1,FIGURE:1,IFRAME:1,VIDEO:1,AUDIO:1,OBJECT:1,EMBED:1,CANVAS:1,SVG:1,PRE:1};N.InitConfig=function(A){u=A},N.InitEditor=function(A){r=A,z();try{r.attachEvent("ready",z)}catch{}try{r.attachEvent("aftersethtml",z)}catch{}setTimeout(z,0),r.insertParagraphAt=function(C){return q(C)},r.insertParagraphAfter=function(C){return b(C,!0)},r.insertParagraphBefore=function(C){return b(C,!1)},r.getGapPositions=function(){return K()}};function F(){try{return r.getDocument()}catch{return null}}function $(){try{return r.getEditable()}catch{return null}}function z(){var A=F(),C=$();!A||!C||A===x||(x=A,E(A),u.gapCursorKeys!==!1&&C.addEventListener("keydown",M,!0),u.gapCursorClick!==!1&&C.addEventListener("click",I,!0),u.gapCursorHint!==!1&&C.addEventListener("mousemove",s,!0))}function o(A){return!!(A&&A.nodeType===1&&H[A.nodeName])}function O(A){return!!(A&&A.nodeType===1&&A.className==="rte-gap-hint")}function V(){var A=$(),C=[];if(!A)return C;for(var y=0;y<A.children.length;y++)O(A.children[y])||C.push(A.children[y]);return C}function K(){var A=[],C=V();if(!C.length)return A;o(C[0])&&A.push(0);for(var y=0;y<C.length-1;y++)o(C[y])&&o(C[y+1])&&A.push(y+1);return o(C[C.length-1])&&A.push(C.length),A}function W(A){var C=A.createElement("p");return C.appendChild(A.createElement("br")),C}function q(A){var C=$(),y=F();if(!C||!y)return null;g();var d=W(y),w=V()[A]||null;return C.insertBefore(d,w),m(d),h(),d}function b(A,C){var y=$(),d=F();if(!y||!d||!A)return null;var w=W(d);return C?A.parentNode.insertBefore(w,A.nextSibling):A.parentNode.insertBefore(w,A),m(w),h(),w}function m(A){try{var C=A.ownerDocument,y=C.createRange();y.setStart(A,0),y.collapse(!0);var d=r.getSelection();d.removeAllRanges(),d.addRange(y),r.focus()}catch{}}function k(A){for(var C=$(),y=A&&A.nodeType===3?A.parentNode:A;y&&y.parentNode&&y.parentNode!==C;)y=y.parentNode;return y&&y.parentNode===C?y:null}function M(A){var C=A.key,y=C==="ArrowDown"||C==="ArrowRight"||C==="End"||C==="PageDown",d=C==="ArrowUp"||C==="ArrowLeft"||C==="Home"||C==="PageUp";if(!(!y&&!d)){var w=$();if(!(!w||!w.children.length)){var D=r.getSelection();if(!(!D||!D.rangeCount)){var P=k(D.getRangeAt(0).startContainer);if(o(P)){var B=V(),Z=B.indexOf(P);if(!(Z<0))if(y){var fe=B[Z+1];if(fe&&!o(fe))return;A.preventDefault(),A.stopPropagation(),q(Z+1)}else{var re=B[Z-1];if(re&&!o(re))return;A.preventDefault(),A.stopPropagation(),q(Z)}}}}}}function I(A){var C=$();if(!(!C||A.target!==C)){g();var y=R(A.clientY);y!==null&&(A.preventDefault(),A.stopPropagation(),q(y))}}function R(A){var C=V();if(!C.length)return null;var y=K();if(!y.length)return null;for(var d=0;d<C.length;d++){var w=C[d].getBoundingClientRect();if(A<w.top)return l(y,d);if(A<=w.bottom)return null}return l(y,C.length)}function l(A,C){return A.indexOf(C)>=0?C:null}var f=null,_=null,v=10;function s(A){var C=$();if(C&&!O(A.target)){if(A.target===C){var y=R(A.clientY);if(y===null){g();return}p(y);return}var d=c(A.clientY);if(d===null){g();return}p(d)}}function c(A){for(var C=V(),y=K(),d=0;d<y.length;d++){var w=y[d],D;if(w===0?D=C[0].getBoundingClientRect().top:D=C[w-1].getBoundingClientRect().bottom,Math.abs(A-D)<=v)return w}return null}function p(A){var C=$(),y=F();if(!(!C||!y)){f||(f=y.createElement("div"),f.className="rte-gap-hint",f.setAttribute("contenteditable","false"),f.setAttribute("aria-hidden","true"),f.addEventListener("mousedown",function(w){w.preventDefault(),w.stopPropagation(),_!==null&&q(_)},!0));var d=V()[A]||null;if(f.parentNode===C&&f.nextSibling===d){_=A;return}C.insertBefore(f,d),_=A}}function g(){f&&f.parentNode&&f.parentNode.removeChild(f),_=null}function h(){g();try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function L(){return".rte-gap-hint{height:6px;margin:1px 0;position:relative;cursor:text;pointer-events:auto;background:transparent;}.rte-gap-hint::before{content:'';position:absolute;left:0;right:0;top:2px;border-top:2px solid #2563eb;opacity:.65;}.rte-gap-hint::after{content:'';position:absolute;left:-3px;top:0;width:6px;height:6px;border-radius:50%;background:#2563eb;}"}function E(A){if(A){var C=L(),y=A.getElementById("rte-gapcursor-styles");if(y){if(y.getAttribute("data-css")===C)return;y.parentNode&&y.parentNode.removeChild(y)}var d=A.createElement("style");d.id="rte-gapcursor-styles",d.setAttribute("data-css",C),d.appendChild(A.createTextNode(C)),(A.head||A.getElementsByTagName("head")[0]||A.documentElement).appendChild(d),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(A,d,"rte-gapcursor-styles",d.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_ghostcomplete=RTE_Plugin_GhostComplete,typeof RTE_DefaultConfig.ghostText>"u"&&(RTE_DefaultConfig.ghostText=!1),typeof RTE_DefaultConfig.ghostTextResolver>"u"&&(RTE_DefaultConfig.ghostTextResolver=null);function RTE_Plugin_GhostComplete(){var N=this,u,r,x=null,H=null,F=!1,$=null,z=0,o=!1,O=null,V="";N.PluginName="GhostComplete",N.InitConfig=function(C){u=C},N.InitEditor=function(C){r=C,x=typeof u.ghostText=="object"&&u.ghostText?u.ghostText:{},W();try{r.attachEvent("ready",W)}catch{}try{r.attachEvent("aftersethtml",W)}catch{}setTimeout(W,0),setTimeout(W,200),r.setGhostTextResolver=function(y){u.ghostTextResolver=typeof y=="function"?y:null},r.requestGhostText=function(){if(typeof u.ghostTextResolver!="function"){h();return}R(0)},r.acceptGhostText=function(){return g()},r.dismissGhostText=function(){p()},r.hasGhostText=function(){return!!O}};function K(){return!!u.ghostText&&typeof u.ghostTextResolver=="function"}function W(){var C=r.getDocument();C&&(L(C),C!==H&&(C.addEventListener("keydown",M,!0),C.addEventListener("input",k,!0),C.addEventListener("mousedown",I,!0),C.addEventListener("touchstart",I,!0),H=C),A())}function q(){var C=x&&+x.delayMs;return C&&C>=0?C:600}function b(){var C=x&&+x.minChars;return C&&C>0?C:3}function m(){var C=x&&+x.maxContext;return C&&C>0?C:2e3}function k(){o||(p(),K()&&R(q()))}function M(C){if(O){if(C.key==="Tab"){C.preventDefault(),C.stopPropagation(),g();return}if(C.key==="Escape"){C.preventDefault(),C.stopPropagation(),p();return}/^Arrow|^Home$|^End$|^PageUp$|^PageDown$/.test(C.key)&&p()}}function I(C){if(O){var y=C.target;y===O||O.contains&&O.contains(y)?(C.preventDefault(),C.stopPropagation(),g()):p()}}function R(C){$&&(clearTimeout($),$=null),K()&&($=setTimeout(l,C))}function l(){if($=null,!(!K()||O)){var C=f();if(!(!C||C.before.replace(/\s/g,"").length<b())){var y=++z,d;try{d=u.ghostTextResolver({before:C.before,after:C.after,full:C.full})}catch{return}Promise.resolve(d).then(function(w){y===z&&(O||typeof w=="string"&&(w=w.replace(/\r/g,""),w&&c(w)))},function(){})}}}function f(){try{var C=r.getSelection();if(!C||C.rangeCount===0||!C.isCollapsed)return null;var y=r.getEditable();if(!y)return null;var d=C.getRangeAt(0),w=s(d.startContainer,y)||y,D=d.cloneRange();D.setStart(w,0);var P=d.cloneRange();P.setEnd(w,w.childNodes.length);var B=v(D),Z=v(P);return B.length>m()&&(B=B.slice(B.length-m())),{before:B,after:Z,full:v(_(y))}}catch{return null}}function _(C){var y=r.getDocument(),d=y.createRange();return d.selectNodeContents(C),d}function v(C){try{for(var y=C.cloneContents(),d=y.querySelectorAll?y.querySelectorAll(".rte-ghost"):[],w=0;w<d.length;w++)d[w].parentNode.removeChild(d[w]);var D=r.getDocument().createElement("div");return D.appendChild(y),D.textContent||""}catch{return""}}function s(C,y){for(var d=C&&C.nodeType===3?C.parentNode:C;d&&d!==y;){if(d.nodeType===1&&/^(P|H[1-6]|LI|BLOCKQUOTE|PRE|TD|TH|DIV|FIGCAPTION)$/.test(d.nodeName))return d;d=d.parentNode}return null}function c(C){var y=r.getDocument(),d=r.getSelection();if(!(!y||!d||d.rangeCount===0||!d.isCollapsed)){o=!0;try{var w=d.getRangeAt(0),D=y.createElement("span");D.className="rte-ghost",D.setAttribute("contenteditable","false"),D.setAttribute("data-rte-ghost","1"),D.setAttribute("aria-hidden","true"),D.textContent=C,w.insertNode(D),O=D,V=C;var P=y.createRange();P.setStartBefore(D),P.collapse(!0),d.removeAllRanges(),d.addRange(P)}catch{O=null,V=""}finally{o=!1}}}function p(){if(O){o=!0;try{var C=r.getSelection(),y=null;if(C&&C.rangeCount){var d=C.getRangeAt(0);y={n:d.startContainer,o:d.startOffset}}O.parentNode&&O.parentNode.removeChild(O);try{if(y&&y.n){var w=r.getDocument(),D=w.createRange();D.setStart(y.n,Math.min(y.o,y.n.length!=null?y.n.length:y.o)),D.collapse(!0),C.removeAllRanges(),C.addRange(D)}}catch{}}catch{}finally{O=null,V="",o=!1}}}function g(){if(!O)return!1;var C=V,y=r.getDocument(),d=r.getSelection();o=!0;try{O.parentNode&&O.parentNode.removeChild(O),O=null,V="";var w=!1;try{w=y.execCommand("insertText",!1,C)}catch{w=!1}if(!w&&d&&d.rangeCount){var D=d.getRangeAt(0),P=y.createTextNode(C);D.insertNode(P);var B=y.createRange();B.setStartAfter(P),B.collapse(!0),d.removeAllRanges(),d.addRange(B)}}catch{}finally{o=!1}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}return!0}function h(){try{var C=r.iframe||r.getDocument&&r.getDocument().defaultView&&r.getDocument().defaultView.frameElement,y=C&&C.parentNode?C.parentNode:document.body;if(y.querySelector&&y.querySelector(".rte-ghost-hint"))return;var d=(y.ownerDocument||document).createElement("div");d.className="rte-ghost-hint",d.setAttribute("role","status"),d.textContent="AI completion isn't configured \u2014 supply config.ghostTextResolver (or editor.setGhostTextResolver) to enable inline suggestions.",d.style.cssText="position:absolute;left:50%;bottom:12px;transform:translateX(-50%);z-index:20;max-width:90%;padding:7px 14px;border-radius:8px;background:#1f2937;color:#f9fafb;font:12px/1.5 -apple-system,Segoe UI,sans-serif;box-shadow:0 4px 14px rgba(0,0,0,.25);pointer-events:none";try{y!==document.body&&(y.ownerDocument.defaultView||window).getComputedStyle(y).position==="static"&&(y.style.position="relative")}catch{}y.appendChild(d),setTimeout(function(){try{d.parentNode&&d.parentNode.removeChild(d)}catch{}},4500)}catch{}}function L(C){if(!(!C||C.getElementById("rte-ghost-styles"))){var y=".rte-ghost{color:#9aa3b2;opacity:.85;font-style:normal;user-select:none;-webkit-user-select:none;cursor:pointer;white-space:pre-wrap;}",d=C.createElement("style");d.id="rte-ghost-styles",d.appendChild(C.createTextNode(y)),(C.head||C.getElementsByTagName("head")[0]||C.documentElement).appendChild(d),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(C,d,"rte-ghost-styles",d.textContent)}}function E(){var C=r.getEditable();if(!C)return function(){};for(var y=C.querySelectorAll(".rte-ghost"),d=[],w=0;w<y.length;w++)d.push([y[w],y[w].nextSibling,y[w].parentNode]),y[w].parentNode.removeChild(y[w]);return function(){for(var P=0;P<d.length;P++){var B=d[P][0],Z=d[P][1],fe=d[P][2];if(fe)try{fe.insertBefore(B,Z)}catch{}}}}function A(){if(!F){for(var C=["getHTMLCode","getJSON","getHTMLContent"],y=!1,d=0;d<C.length;d++)(function(w){var D=r[w];if(!(typeof D!="function"||D.__rteGhostWrapped)){var P=function(){var B=E();try{return D.apply(r,arguments)}finally{B()}};P.__rteGhostWrapped=!0,r[w]=P,y=!0}})(C[d]);y&&(F=!0)}}}RTE_DefaultConfig.svgCode_html2pdf||(RTE_DefaultConfig.svgCode_html2pdf='<svg viewBox="-2 -2 36 36" fill="#5F6368"><polygon points="30 11 30 9 22 9 22 23 24 23 24 17 29 17 29 15 24 15 24 11 30 11"></polygon><path d="M8,9H2V23H4V18H8a2,2,0,0,0,2-2V11A2,2,0,0,0,8,9Zm0,7H4V11H8Z"></path><path d="M16,23H12V9h4a4,4,0,0,1,4,4v6A4,4,0,0,1,16,23Zm-2-2h2a2,2,0,0,0,2-2V13a2,2,0,0,0-2-2H14Z"></path><title>PDF</title></svg>'),RTE_DefaultConfig.plugin_html2pdf=RTE_Plugin_Html2PDF,typeof RTE_DefaultConfig.html2pdfScriptUrl>"u"&&(RTE_DefaultConfig.html2pdfScriptUrl=null);function RTE_Plugin_Html2PDF(){var N="/plugins/vendor/html2pdf.bundle.min.js";function u(O){try{return new URL(O,document.baseURI||location.href).href}catch{return O}}function r(){if(H&&H.html2pdfScriptUrl)return u(H.html2pdfScriptUrl);var O=H&&H.url_base?String(H.url_base).replace(/\/+$/,""):"";return u(O?O+N:"."+N)}var x=this,H,F;x.PluginName="Html2PDF",x.InitConfig=function(O){H=O},x.InitEditor=function(O){F=O,F.attachEvent("exec_command_html2pdf",function(V,K,W){x.DoHtml2PDF(),V.returnValue=!0}),F.toolbarFactoryMap.html2pdf=function(V){var K=F.createToolbarButton(V);return K.style.backgroundColor="",K}},x.GetPdfPageOptions=function(){var O={format:"letter",orientation:"portrait",margin:.5},V=null;try{F&&typeof F.getDocumentPageSetup=="function"&&(V=F.getDocumentPageSetup())}catch{V=null}if(!V||typeof V!="object")return O;var K={a3:1,a4:1,a5:1,letter:1,legal:1,tabloid:1},W=String(V.format||"").toLowerCase(),q=String(V.orientation||"").toLowerCase()==="landscape"?"landscape":O.orientation,b={format:K[W]?W:O.format,orientation:q,margin:O.margin},m=V.margins;if(m&&typeof m=="object"){var k=$(m.top),M=$(m.right),I=$(m.bottom),R=$(m.left);k!==null&&M!==null&&I!==null&&R!==null&&(b.margin=[k,M,I,R])}return b};function $(O){if(typeof O=="number"&&isFinite(O))return O;if(typeof O!="string")return null;var V=/^\s*(-?[\d.]+)\s*(mm|cm|in|px|pt)?\s*$/.exec(O);if(!V)return null;var K=parseFloat(V[1]);if(!isFinite(K))return null;switch(V[2]){case"mm":return K/25.4;case"cm":return K/2.54;case"pt":return K/72;case"px":return K/96;default:return K}}function z(O,V,K,W){var q=O.ownerDocument.createElement(V);return K&&(q.style.cssText=K),W&&(q.className=W),O.appendChild(q),q}function o(O){for(var V=O.split(","),K=V[0].match(/:(.*?);/)[1],W=atob(V[1]),q=W.length,b=new Uint8Array(q);q--;)b[q]=W.charCodeAt(q);return new Blob([b],{type:K})}x.DoHtml2PDF=function(){var O=F.createDialog("Html2PDF","rte-dialog-html2pdf"),V=z(O,"div","position:relative;text-align:center;");V.innerHTML="Loading...";var K=z(O,"div","position:relative;text-align:center;");window.html2pdf_callback=function(q){if(!q.html2pdf){V.innerHTML="Failed to load script.";return}V.innerHTML="Exporting...";var b=x.GetPdfPageOptions(),m={margin:b.margin,filename:"myfile.pdf",image:{type:"jpeg",quality:.98},html2canvas:{scale:2},jsPDF:{unit:"in",format:b.format,orientation:b.orientation}},k=q.html2pdf().set(m).from(q.document.body).outputImg();k.then(function(M){var I=M.getAttribute("src");if(I.indexOf("base64")==-1){V.innerHTML="Error, no data.";return}var R=o(I),l=URL.createObjectURL(R);M.setAttribute("src",l);var f=q.html2pdf().set(m).from(q.document.body).outputPdf();f.then(function(_){for(var v=new Array(_.length),s=0;s<_.length;s++)v[s]=_.charCodeAt(s);var c=new Blob([new Uint8Array(v)],{type:"application/pdf"}),p=URL.createObjectURL(c);V.innerHTML=Math.ceil(_.length/1024)+"KB Exported<br/><a href='"+p+"' target=_blank>Download PDF</a>";var g=V.querySelector("a"),h=new Date,L=String(h.getFullYear()*1e4+(h.getMonth()+1)*100+h.getDate()).substring(2),E=String(1e6+h.getHours()*1e4+h.getMinutes()*100+h.getSeconds()).substring(1);g.download="Export-"+L+"-"+E+".pdf",g.click(),M.style.cssText="max-width:300px;max-height:200px;margin:5px;padding:10px;border:solid 1px #eee;box-shadow:2px 2px 6px #eee",K.appendChild(M),z(K,"br");var A=z(K,"a");A.setAttribute("href",l),A.setAttribute("target","_blank"),A.download="Export-"+L+"-"+E+".jpg",A.innerText="Download Img"}).catch(function(_){console.error(_)})}).catch(function(M){console.error(M)})};var W=z(O,"div","position:relative;text-align:center;");iframe=z(W,"iframe","align-self:center;flex:99;width:100%;height:0px;border:0px;","rte-editable"),iframe.contentDocument.open("text/html"),iframe.contentDocument.write("<html><head><link id='url-css-preview' rel='stylesheet' href='"+F.htmlEncode(H.previewCssUrl)+"'/><script src='"+F.htmlEncode(r())+"'><\/script></head><body style='padding:10px;margin:0px'>"+F.getHTMLCode()+"</body><script>window.onload=function(){setTimeout(function(){parent.html2pdf_callback(window)},100)}<\/script></html>"),iframe.contentDocument.close()}}RTE_DefaultConfig.svgCode_imageeditor||(RTE_DefaultConfig.svgCode_imageeditor='<svg viewBox="-2 -2 20 20" fill="#5F6368"><style>.st0{fill:#f6f6f6}.st1{fill:#424242}.st2{fill:none}.st3{fill:#f0eff1}</style><path class="st0" d="M1 0v6H0v10h10v-1h6V0z" id="outline"/><g id="icon_x5F_bg"><path class="st1" d="M2 5h1v1H2zM2 3h1v1H2zM2 1h1v1H2zM4 1h1.001v1H4zM6 1h1v1H6zM8 1h1v1H8zM10 1h1v1h-1zM12 1h1v1h-1zM14 1h1v1h-1zM14 3h1v1h-1zM14 5h1v1h-1zM14 7h1v1h-1zM14 9h1v1h-1zM14 10.999h1V12h-1zM14 13h1v1h-1zM12 13h1v1h-1zM11 11V5H5v1H4V4h8v7z"/><circle class="st1" cx="6.192" cy="9.807" r=".807"/><path class="st1" d="M1 7v8h8V7H1zm1 7.001v-.28l2.537-1.463L7.554 14l.001.001H2zm6-.93l-3.463-1.982L2 12.491v-4.49h6v5.07zM10 13h1v1h-1z"/></g><g id="icon_x5F_fg"><path class="st2" d="M2 14h5.554v.001H2z"/><path class="st3" d="M11 5v6h-1V6H5V5z"/><path class="st3" d="M2 12.491l2.537-1.402L8 13.071v-5.07H2v4.49zM6.192 9a.807.807 0 1 1 .001 1.615A.807.807 0 0 1 6.192 9z"/><path class="st3" d="M2 13.721V14h5.554l-3.017-1.742z"/></g></svg>'),RTE_DefaultConfig.plugin_imageeditor=RTE_Plugin_ImageEditor;function RTE_Plugin_ImageEditor(){var N=this,u,r;N.PluginName="ImageEditor",N.InitConfig=function($){u=$},N.InitEditor=function($){r=$,r.attachEvent("exec_command_imageeditor",function(z,o,O){N.DoImageEditor(),z.returnValue=!0}),r.toolbarFactoryMap.imageeditor=function(z){var o=r.createToolbarButton(z);return o.style.backgroundColor="",o}};function x($,z,o,O){var V=$.ownerDocument.createElement(z);return o&&(V.style.cssText=o),O&&(V.className=O),$.appendChild(V),V}var H={"image/png":".png","image/jpeg":".jpg","image/jpg":".jpg","image/webp":".webp","image/gif":".gif","image/bmp":".bmp","image/avif":".avif"};function F($,z){for(var o=$.split(","),O=o[0].match(/:(.*?);/)[1],V=atob(o[1]),K=V.length,W=new Uint8Array(K);K--;)W[K]=V.charCodeAt(K);var q=z||"image-"+new Date().getTime()+(H[O]||".png");try{return new File([W],q,{type:O})}catch{var b=new Blob([W],{type:O});return b.name=q,b}}N.DoImageEditor=function(){var $=r.getSelectedControl();if($){var z=r.createDialog("ImageEditor","rte-dialog-imageeditor");z.style.width="90%",z.style.height="90%";var o=u.url_base+"/plugins/tui.image-editor/";window.rte_image_editor_callback=function(O){try{O.tui=O.tui||{},O.tui.usageStatistics=!1}catch{}var V={usageStatistics:!1,includeUI:{loadImage:{path:$.src,name:"RteImage"},usageStatistics:!1,theme:{"common.bi.image":"","common.bisize.width":"0","common.bisize.height":"0","menu.normalIcon.path":o+"svg/icon-d.svg","menu.activeIcon.path":o+"svg/icon-b.svg","menu.disabledIcon.path":o+"svg/icon-a.svg","menu.hoverIcon.path":o+"svg/icon-c.svg","submenu.normalIcon.path":o+"svg/icon-d.svg","submenu.normalIcon.name":"icon-d","submenu.activeIcon.path":o+"svg/icon-c.svg","submenu.activeIcon.name":"icon-c"},menuBarPosition:"bottom"},cssMaxWidth:700,cssMaxHeight:500,selectionStyle:{cornerSize:20,rotatingPointOffset:70}},K=new O.tui.ImageEditor(O.document.querySelector("#tui-image-editor"),V),W=O.document.querySelector(".tui-image-editor-header-buttons");W.innerHTML="";var q=x(W,"button","");q.innerText="Save";var b=x(W,"div","margin-left:10px;font-size:12px;color:#b42318;","rte-imageeditor-upload-status");b.setAttribute("role","status"),b.setAttribute("aria-live","polite"),q.onclick=function(){b.innerText="",q.disabled=!0,q.innerText="Saving...";var m=K.toDataURL();if(!u.file_upload_handler){$.src=m,r.notifySelectionChange(),z.close();return}var k=F(m);u.file_upload_handler(k,function(M,I){if(M){$.src=M,r.notifySelectionChange(),z.close();return}q.disabled=!1,q.innerText="Save",b.innerText=I?"Upload failed: "+I:"The upload did not return a file URL. Please try again."})}},iframe=x(z,"iframe","align-self:center;flex:99;width:100%;height:100%px;border:0px;","rte-editable"),iframe.contentDocument.open("text/html"),iframe.contentDocument.write("<html><head><base href='"+r.htmlEncode(location.href)+"'/><link id='url-css-preview' rel='stylesheet' href='"+r.htmlEncode(o+"tui-color-picker.min.css")+"'/><link id='url-css-preview' rel='stylesheet' href='"+r.htmlEncode(o+"tui-image-editor.min.css")+"'/><script src='"+r.htmlEncode(o+"fabric.min.js")+"'><\/script><script src='"+r.htmlEncode(o+"tui-color-picker.min.js")+"'><\/script><script src='"+r.htmlEncode(o+"tui-code-snippet.min.js")+"'><\/script><script src='"+r.htmlEncode(o+"tui-image-editor.min.js")+"'><\/script></head><body style='padding:10px;margin:0px'><div id='tui-image-editor'></div></body><script>window.onload=function(){setTimeout(function(){parent.rte_image_editor_callback(window)},100)}<\/script></html>"),iframe.contentDocument.close()}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_importstyles=RTE_Plugin_ImportStyles,typeof RTE_DefaultConfig.importStyles>"u"&&(RTE_DefaultConfig.importStyles=!1),typeof RTE_DefaultConfig.importStylesSheets>"u"&&(RTE_DefaultConfig.importStylesSheets=null),typeof RTE_DefaultConfig.importStylesExclude>"u"&&(RTE_DefaultConfig.importStylesExclude=/^(rte[-_]|ck[-_]|cke[-_]|mce[-_]|tox[-_]|js[-_]|is[-_]|has[-_])/i),typeof RTE_DefaultConfig.importStylesFilter>"u"&&(RTE_DefaultConfig.importStylesFilter=null),typeof RTE_DefaultConfig.importStylesReplace>"u"&&(RTE_DefaultConfig.importStylesReplace=!1),typeof RTE_DefaultConfig.importStylesLimit>"u"&&(RTE_DefaultConfig.importStylesLimit=100);function RTE_Plugin_ImportStyles(){var N=this,u,r,x=null,H=[];N.PluginName="ImportStyles",N.InitConfig=function(s){u=s},N.InitEditor=function(s){if(r=s,r.importStyles=function(c){return v(c||{})},r.getImportedStyles=function(){return x},r.scanStylesheetClasses=function(c){b=c||{};try{return l()}finally{b={}}},!!u.importStyles){v({});try{r.attachEvent("ready",function(){v({})})}catch{}setTimeout(function(){v({})},0)}};var F={img:1,figure:1,picture:1},$={a:1},z={span:1,strong:1,b:1,em:1,i:1,code:1,mark:1,small:1,sub:1,sup:1,abbr:1,q:1,cite:1},o={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,blockquote:1,li:1,ul:1,ol:1,pre:1,section:1,article:1,aside:1,figcaption:1,td:1,th:1,table:1},O=[{key:"imageStyles",tags:F},{key:"linkStyles",tags:$},{key:"inlineStyles",tags:z},{key:"paragraphStyles",tags:o}],V=/^([a-zA-Z][\w-]*)?\.([\w-]+)$/;function K(s){var c=String(s).replace(/\[[^\]]*\]/g,"").replace(/::?[\w-]+(\([^)]*\))?/g,"").trim(),p=c.split(/[\s>+~]+/),g=p[p.length-1]||"";if((g.match(/\./g)||[]).length!==1)return null;var h=g.match(V);return h?{tag:(h[1]||"").toLowerCase(),cls:h[2]}:null}function W(s){if(!s)return["inlineStyles","paragraphStyles"];for(var c=0;c<O.length;c++)if(O[c].tags[s])return[O[c].key];return[]}function q(s,c){var p=s.href||"";if(/\/richtexteditor\//i.test(p))return!0;var g=s.ownerNode,h=g&&g.id||"";return!!(/^(rte[-_]|__rte)/i.test(h)||c&&!p)}var b={};function m(s){return b&&s in b?b[s]:u["importStyles"+s.charAt(0).toUpperCase()+s.slice(1)]}function k(s,c){if(q(s,c))return!1;var p=m("sheets");if(!p)return!0;var g=s.href||"";return typeof p=="function"?!!p(s):p instanceof RegExp?p.test(g):g.indexOf(String(p))>=0}function M(s){var c=m("exclude");return c?c instanceof RegExp?c.test(s):typeof c=="function"?!!c(s):s.indexOf(String(c))===0:!1}function I(s,c){if(s)for(var p=0;p<s.length;p++){var g=s[p];if(g.cssRules&&!g.selectorText){I(g.cssRules,c);continue}if(g.selectorText)for(var h=g.selectorText.split(","),L=0;L<h.length;L++){var E=K(h[L]);!E||M(E.cls)||c.push({cls:E.cls,tag:E.tag,selector:h[L].trim()})}}}function R(){var s=[];typeof document<"u"&&s.push({doc:document,editing:!1});try{var c=r.getDocument&&r.getDocument();c&&c!==document&&s.push({doc:c,editing:!0})}catch{}return s}function l(){for(var s=[],c=0,p=R(),g=0;g<p.length;g++)for(var h=p[g].doc.styleSheets||[],L=0;L<h.length;L++){var E=h[L];if(k(E,p[g].editing)){var A=null;try{A=E.cssRules||E.rules}catch{c++;continue}I(A,s)}}return{classes:s,unreadableSheets:c,documents:p.length}}function f(s){var c=String(s).replace(/^(my[-_]cls[-_]|u[-_]|c[-_])/i,"").replace(/[-_]+/g," ").trim();return c||(c=s),c.replace(/\b\w/g,function(p){return p.toUpperCase()})}function _(s,c){for(var p=0;p<s.length;p++)if(s[p]&&s[p][1]===c)return!0;return!1}function v(s){b=s||{};for(var c=l(),p=Math.max(0,parseInt(m("limit"),10)||0)||1/0,g=!!m("replace"),h=m("filter"),L={},E={},A=0;A<O.length;A++)L[O[A].key]=[];for(var C={},y=0;y<c.classes.length;y++)for(var d=c.classes[y],w=W(d.tag),D=0;D<w.length;D++){var P=w[D],B=P+"|"+d.cls;if(!C[B]){var Z=f(d.cls);if(typeof h=="function"){var fe=h(d.cls,d.selector,P);if(fe===!1)continue;typeof fe=="string"&&fe&&(Z=fe)}if(C[B]=!0,L[P].length>=p){E[P]=(E[P]||0)+1;continue}L[P].push([Z,d.cls])}}for(var re={},ie=0;ie<O.length;ie++){var ae=O[ie].key,de=L[ae];if(g)u[ae]=de;else{u[ae]||(u[ae]=[]);for(var se=0;se<de.length;se++)_(u[ae],de[se][1])||u[ae].push(de[se])}re[ae]=de.length}var U=0;for(var Q in E)E.hasOwnProperty(Q)&&(U+=E[Q]);if(U)try{console.warn("[RichTextEditor] importStyles: "+U+" class(es) omitted \u2014 importStylesLimit is "+p+" per dropdown. Raise the limit or narrow importStylesSheets / importStylesFilter.")}catch{}return x={applied:re,truncated:E,droppedCount:U,unreadableSheets:c.unreadableSheets,documentsScanned:c.documents,replaced:!!g},b={},x}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_inlinecode=RTE_Plugin_InlineCode,RTE_DefaultConfig.text_inlinecode||(RTE_DefaultConfig.text_inlinecode="Inline code"),RTE_DefaultConfig.svgCode_inlinecode||(RTE_DefaultConfig.svgCode_inlinecode='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="7 8 3 12 7 16"/><polyline points="17 8 21 12 17 16"/></svg>');function RTE_Plugin_InlineCode(){var N=this,u,r;N.PluginName="InlineCode",N.InitConfig=function(q){u=q},N.InitEditor=function(q){r=q,r.attachEvent("exec_command_inlinecode",function(b){b.returnValue=!0,N.Toggle()}),r.toggleInlineCode=function(){return N.Toggle()},r.isInlineCode=function(){return N.IsActive()}};function x(){try{return r.getDocument()}catch{return null}}function H(){try{return r.getEditable()}catch{return null}}function F(q){var b=q&&q.getSelection?q.getSelection():null;return!b||!b.rangeCount?null:b.getRangeAt(0)}function $(q,b){for(;q&&q!==b;){if(q.nodeType===1&&q.nodeName==="CODE")return q;q=q.parentNode}return null}function z(q,b){for(;q&&q!==b;){if(q.nodeType===1&&q.nodeName==="PRE")return!0;q=q.parentNode}return!1}N.IsActive=function(){var q=x(),b=H();if(!q||!b)return!1;var m=F(q);return m?!!$(m.startContainer,b):!1};function o(q){var b=q.startContainer;if(!b||b.nodeType!==3)return!1;for(var m=b.data||"",k=q.startOffset,M=k,I=k;M>0&&/\S/.test(m.charAt(M-1));)M--;for(;I<m.length&&/\S/.test(m.charAt(I));)I++;return M===I?!1:(q.setStart(b,M),q.setEnd(b,I),!0)}function O(q,b,m){if(b.startContainer.nodeType===3&&b.startOffset>0){var k=b.startContainer;if(b.startOffset<k.data.length){var M=k.splitText(b.startOffset),I=b.endContainer===k,R=b.endOffset;b.setStart(M,0),I&&b.setEnd(M,R-k.data.length)}}b.endContainer.nodeType===3&&b.endOffset<b.endContainer.data.length&&b.endOffset>0&&b.endContainer.splitText(b.endOffset);for(var l=[],f=q.createTreeWalker(m,4,null,!1),_;_=f.nextNode();)if(_.data&&(!b.intersectsNode||b.intersectsNode(_))){var v=q.createRange();v.selectNodeContents(_),b.compareBoundaryPoints(Range.END_TO_START,v)<0&&b.compareBoundaryPoints(Range.START_TO_END,v)>0&&l.push(_)}return l}function V(q,b,m){var k=b.parentNode;if(k){var M=b.contains(m.startContainer),I=b.contains(m.endContainer),R=q.createRange();I?R.setStart(m.endContainer,m.endOffset):R.setStart(b,b.childNodes.length),R.setEnd(b,b.childNodes.length);var l=R.extractContents(),f=q.createRange();f.setStart(b,0),M?f.setEnd(m.startContainer,m.startOffset):f.setEnd(b,0);var _=f.extractContents();if(_&&_.textContent!==""){var v=q.createElement("code");v.appendChild(_),k.insertBefore(v,b)}for(;b.firstChild;)k.insertBefore(b.firstChild,b);if(l&&l.textContent!==""){var s=q.createElement("code");s.appendChild(l),k.insertBefore(s,b)}k.removeChild(b)}}function K(q,b,m){for(var k=[],M=[],I=0;I<b.length;I++){var R=b[I];z(R,m)||$(R,m)||(k.length&&k[k.length-1].parentNode===R.parentNode&&k[k.length-1].nextSibling===R?k.push(R):(k.length&&M.push(k),k=[R]))}k.length&&M.push(k);for(var l=0;l<M.length;l++){for(var f=M[l],_="",v=0;v<f.length;v++)_+=f[v].data;if(/\S/.test(_)){var s=q.createElement("code");f[0].parentNode.insertBefore(s,f[0]);for(var c=0;c<f.length;c++)s.appendChild(f[c])}}}function W(q){for(var b=q.querySelectorAll("code"),m=0;m<b.length;m++)for(var k=b[m],M=k.nextSibling;M&&M.nodeType===1&&M.nodeName==="CODE";){for(;M.firstChild;)k.appendChild(M.firstChild);M.parentNode.removeChild(M),M=k.nextSibling}}N.Toggle=function(){var q=x(),b=H();if(!q||!b)return!1;var m=F(q);if(!m||!b.contains(m.startContainer)||m.collapsed&&!o(m))return!1;var k=O(q,m,b);if(!k.length)return!1;for(var M=!0,I=0;I<k.length;I++)if(/\S/.test(k[I].data)&&!$(k[I],b)){M=!1;break}if(M){for(var R=[],l=[],f=0;f<k.length;f++){var _=$(k[f],b);_&&l.indexOf(_)<0&&(l.push(_),R.push(_))}for(var v=0;v<R.length;v++)V(q,R[v],m)}else K(q,k,b),W(b);try{r.updateToolbarStatus&&r.updateToolbarStatus()}catch{}return!0}}RTE_DefaultConfig.svgCode_insertcode||(RTE_DefaultConfig.svgCode_insertcode='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="8 7 3 12 8 17"/><polyline points="16 7 21 12 16 17"/><line x1="14" y1="5" x2="10" y2="19"/></svg>'),RTE_DefaultConfig.plugin_insertcode=RTE_Plugin_InsertCode;function RTE_Plugin_InsertCode(){var N={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Version:"1.5.1"}};N.InsertCode=N.sh,N.sh.Utils.CopyStyles=function(F,$){for(var z=$.getElementsByTagName("link"),o=0;o<z.length;o++)z[o].rel.toLowerCase()=="stylesheet"&&F.write('<link type="text/css" rel="stylesheet" href="'+z[o].href+'"></link>')},N.sh.Utils.FixForBlogger=function(F){return N.sh.isBloggerMode==!0?F.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/gi,`
23
+ `),fe="",re=0;re<Z.length;re++)if(re&&(fe+="<w:r>"+m(P)+"<w:br/></w:r>"),!!Z[re]){var ie=B?"w:delText":"w:t";fe+="<w:r>"+m(P)+"<"+ie+' xml:space="preserve">'+H(Z[re])+"</"+ie+">",fe+="</w:r>"}return fe}function M(D){var P=D.getAttribute("data-author")||D.getAttribute("data-comment-author")||"RichTextEditor",B=D.getAttribute("data-date")||new Date().toISOString().replace(/\.\d+Z$/,"Z");return' w:author="'+H(P)+'" w:date="'+H(B)+'"'}function I(D,P,B,Z){for(var fe="",re=0;re<D.childNodes.length;re++){var ie=D.childNodes[re];if(ie.nodeType===3){var ae=(ie.nodeValue||"").replace(/[\r\n\t]+/g," ");ae&&(fe+=k(ae,P,!1));continue}if(ie.nodeType===1){var de=ie.tagName.toLowerCase();if(!(de==="script"||de==="style")){if(de==="br"){fe+="<w:r>"+m(P)+"<w:br/></w:r>";continue}if(ie.getAttribute&&ie.getAttribute("data-tex")){fe+=c(ie.getAttribute("data-tex"));continue}if((de==="sup"||de==="span")&&ie.getAttribute("data-footnote")){fe+=l(B,"footnote",ie.getAttribute("data-footnote"));continue}if((de==="sup"||de==="span")&&ie.getAttribute("data-endnote")){fe+=l(B,"endnote",ie.getAttribute("data-endnote"));continue}if(ie.classList&&ie.classList.contains("rte-fn-ref")){var se=ie.getAttribute("data-fn-id"),U=se?R(D.ownerDocument,se):"";fe+=l(B,"footnote",U||ie.textContent||"");continue}if(de==="img"){fe+=f(ie,B);continue}var Q=W(ie,P);if(de==="a"&&ie.getAttribute("href")){var j=ie.getAttribute("href"),J=I(ie,Q,B,Z);if(j.charAt(0)==="#")fe+='<w:hyperlink w:anchor="'+H(j.slice(1))+'">'+J+"</w:hyperlink>";else{var Y=B.rel("hyperlink",j,"External");fe+='<w:hyperlink r:id="'+Y+'">'+J+"</w:hyperlink>"}continue}if(de==="ins"||de==="del"){var te=de==="del",le="";(function ye(me,ee){for(var ue=0;ue<me.childNodes.length;ue++){var ce=me.childNodes[ue];if(ce.nodeType===3){le+=k((ce.nodeValue||"").replace(/[\r\n\t]+/g," "),ee,te);continue}ce.nodeType===1&&ye(ce,W(ce,ee))}})(ie,Q),fe+="<w:"+de+' w:id="'+Z.n+++'"'+M(ie)+">"+le+"</w:"+de+">";continue}if(ie.getAttribute&&ie.getAttribute("data-comment")){var pe=B.commentSeq++;B.comments.push({id:pe,author:ie.getAttribute("data-comment-author")||"RichTextEditor user",initials:ie.getAttribute("data-comment-initials")||"RTE",text:ie.getAttribute("data-comment")}),fe+='<w:commentRangeStart w:id="'+pe+'"/>'+I(ie,Q,B,Z)+'<w:commentRangeEnd w:id="'+pe+'"/><w:r><w:commentReference w:id="'+pe+'"/></w:r>';continue}fe+=I(ie,Q,B,Z)}}}return fe}function R(D,P){try{var B=D.querySelector('.rte-fn-note[data-fn-id="'+P+'"]');return B?(B.textContent||"").replace(/\s+/g," ").trim():""}catch{return""}}function l(D,P,B){var Z=D.noteSeq++;return(P==="endnote"?D.endnotes:D.footnotes).push({id:Z,text:B||""}),'<w:r><w:rPr><w:vertAlign w:val="superscript"/></w:rPr><w:'+P+'Reference w:id="'+Z+'"/></w:r>'}function f(D,P){var B=_(D);if(!B)return"";var Z="image"+(P.media.length+1)+".png";P.media.push({name:Z,bytes:B.bytes});var fe=P.rel("image","media/"+Z),re=Math.round(B.width*914400/96),ie=Math.round(B.height*914400/96),ae=P.media.length;return'<w:r><w:drawing><wp:inline distT="0" distB="0" distL="0" distR="0" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"><wp:extent cx="'+re+'" cy="'+ie+'"/><wp:docPr id="'+ae+'" name="Picture '+ae+'" descr="'+H(D.getAttribute("alt")||"")+'"/><a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:nvPicPr><pic:cNvPr id="'+ae+'" name="Picture '+ae+'"/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed="'+fe+'"/><a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="'+re+'" cy="'+ie+'"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></pic:spPr></pic:pic></a:graphicData></a:graphic></wp:inline></w:drawing></w:r>'}function _(D){try{var P=D.naturalWidth||D.width,B=D.naturalHeight||D.height;if(!P||!B)return null;var Z=Math.min(1,1600/Math.max(P,B)),fe=Math.max(1,Math.round(P*Z)),re=Math.max(1,Math.round(B*Z)),ie=document.createElement("canvas");ie.width=fe,ie.height=re,ie.getContext("2d").drawImage(D,0,0,fe,re);var ae=ie.toDataURL("image/png"),de=ae.indexOf(",");if(de<0)return null;for(var se=atob(ae.slice(de+1)),U=new Uint8Array(se.length),Q=0;Q<se.length;Q++)U[Q]=se.charCodeAt(Q);return{bytes:U,width:fe,height:re}}catch{return null}}var v={alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",pi:"\u03C0",rho:"\u03C1",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",varphi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",Gamma:"\u0393",Delta:"\u0394",Theta:"\u0398",Lambda:"\u039B",Xi:"\u039E",Pi:"\u03A0",Sigma:"\u03A3",Phi:"\u03A6",Psi:"\u03A8",Omega:"\u03A9",pm:"\xB1",mp:"\u2213",times:"\xD7",div:"\xF7",cdot:"\u22C5",neq:"\u2260",leq:"\u2264",geq:"\u2265",approx:"\u2248",equiv:"\u2261",propto:"\u221D",infty:"\u221E",partial:"\u2202",nabla:"\u2207",to:"\u2192",rightarrow:"\u2192",leftarrow:"\u2190",Rightarrow:"\u21D2",Leftrightarrow:"\u21D4",in:"\u2208",notin:"\u2209",subset:"\u2282",subseteq:"\u2286",cup:"\u222A",cap:"\u2229",emptyset:"\u2205",forall:"\u2200",exists:"\u2203",neg:"\xAC",land:"\u2227",lor:"\u2228",dots:"\u2026",ldots:"\u2026",cdots:"\u22EF",langle:"\u27E8",rangle:"\u27E9",lfloor:"\u230A",rfloor:"\u230B",lceil:"\u2308",rceil:"\u2309",quad:" ",",":" ",";":" "},s=/^(sin|cos|tan|cot|sec|csc|sinh|cosh|tanh|log|ln|lg|exp|det|dim|gcd|arg|max|min|sup|inf)$/;function c(D){var P=String(D||"").trim();if(!P)return"";var B=0;function Z(Y){return Y?"<m:r><m:t>"+H(Y)+"</m:t></m:r>":""}function fe(){return re(),P.charAt(B)==="{"?(B++,ae("}")):ie()}function re(){for(;B<P.length&&/\s/.test(P.charAt(B));)B++}function ie(){if(re(),P.charAt(B)==="\\")return de();var Y=P.charAt(B++);return Z(Y)}function ae(Y){for(var te="",le=0;B<P.length;){var pe=P.charAt(B);if(pe==="{"&&le++,pe===Y&&le===0){B++;break}pe===Y&&le--,te+=j()}return te}function de(){B++;var Y=/^[A-Za-z]+/.exec(P.slice(B)),te=Y?Y[0]:P.charAt(B);switch(B+=te.length,te){case"frac":case"dfrac":case"tfrac":return"<m:f><m:fPr/><m:num>"+fe()+"</m:num><m:den>"+fe()+"</m:den></m:f>";case"sqrt":{re();var le="";return P.charAt(B)==="["&&(B++,le=ae("]")),'<m:rad><m:radPr><m:degHide m:val="'+(le?"0":"1")+'"/></m:radPr><m:deg>'+le+"</m:deg><m:e>"+fe()+"</m:e></m:rad>"}case"sum":case"prod":case"int":case"oint":case"bigcup":case"bigcap":{for(var pe={sum:"\u2211",prod:"\u220F",int:"\u222B",oint:"\u222E",bigcup:"\u22C3",bigcap:"\u22C2"}[te],ye="",me="",ee=0;ee<2;ee++)if(re(),P.charAt(B)==="_")B++,ye=fe();else if(P.charAt(B)==="^")B++,me=fe();else break;return'<m:nary><m:naryPr><m:chr m:val="'+pe+'"/><m:subHide m:val="'+(ye?"0":"1")+'"/><m:supHide m:val="'+(me?"0":"1")+'"/></m:naryPr><m:sub>'+ye+"</m:sub><m:sup>"+me+"</m:sup><m:e>"+Q()+"</m:e></m:nary>"}case"left":{for(var ue=se(),ce="",ve=0;B<P.length;){if(P.slice(B,B+5)==="\\left"&&ve++,P.slice(B,B+6)==="\\right"){if(ve===0){B+=6;var be=se();return U(ue,be,ce)}ve--}ce+=j()}return U(ue,")",ce)}case"right":return se(),"";case"lim":{re();var ke="";return P.charAt(B)==="_"&&(B++,ke=fe()),"<m:limLow><m:e>"+Z("lim")+"</m:e><m:lim>"+ke+"</m:lim></m:limLow>"}case"operatorname":return"<m:func><m:funcPr/><m:fName>"+fe()+"</m:fName><m:e>"+fe()+"</m:e></m:func>";case"hat":case"vec":case"tilde":case"bar":case"overline":case"dot":case"ddot":{var Pe={hat:"\u0302",vec:"\u20D7",tilde:"\u0303",dot:"\u0307",ddot:"\u0308"}[te];return te==="bar"||te==="overline"?'<m:bar><m:barPr><m:pos m:val="top"/></m:barPr><m:e>'+fe()+"</m:e></m:bar>":'<m:acc><m:accPr><m:chr m:val="'+Pe+'"/></m:accPr><m:e>'+fe()+"</m:e></m:acc>"}case"underline":return'<m:bar><m:barPr><m:pos m:val="bot"/></m:barPr><m:e>'+fe()+"</m:e></m:bar>";case"boxed":return"<m:borderBox><m:e>"+fe()+"</m:e></m:borderBox>";case"text":case"mathrm":case"mathbf":case"mathit":return fe();case"\\":return Z(" ");default:return s.test(te)?"<m:func><m:funcPr/><m:fName>"+Z(te)+"</m:fName><m:e>"+fe()+"</m:e></m:func>":v[te]!==void 0?Z(v[te]):Z(te)}}function se(){if(re(),P.charAt(B)==="\\"){B++;var Y=/^[A-Za-z]+|^./.exec(P.slice(B)),te=Y?Y[0]:"";return B+=te.length,v[te]||te}return P.charAt(B++)}function U(Y,te,le){return'<m:d><m:dPr><m:begChr m:val="'+H(Y)+'"/><m:endChr m:val="'+H(te)+'"/></m:dPr><m:e>'+le+"</m:e></m:d>"}function Q(){for(var Y="";B<P.length&&P.charAt(B)!=="}";)Y+=j();return Y}function j(){if(re(),B>=P.length)return"";var Y=P.charAt(B);if(Y==="\\")return de();if(Y==="{")return B++,ae("}");if(Y==="^"||Y==="_"){B++;var te=fe();return Y==="^"?"<m:sSup><m:sSupPr/><m:e>"+Z("")+"</m:e><m:sup>"+te+"</m:sup></m:sSup>":"<m:sSub><m:sSubPr/><m:e>"+Z("")+"</m:e><m:sub>"+te+"</m:sub></m:sSub>"}for(var le="";B<P.length&&!/[\\{}^_]/.test(P.charAt(B));)le+=P.charAt(B++);if((P.charAt(B)==="^"||P.charAt(B)==="_")&&le){var pe=le.slice(-1);le=le.slice(0,-1);var ye=P.charAt(B);B++;var me=fe();re();var ee="";if((P.charAt(B)==="^"||P.charAt(B)==="_")&&P.charAt(B)!==ye){var ue=P.charAt(B);B++,ee=fe()}var ce=Z(le);return ee?ce+"<m:sSubSup><m:sSubSupPr/><m:e>"+Z(pe)+"</m:e><m:sub>"+(ye==="_"?me:ee)+"</m:sub><m:sup>"+(ye==="^"?me:ee)+"</m:sup></m:sSubSup>":ce+(ye==="^"?"<m:sSup><m:sSupPr/><m:e>"+Z(pe)+"</m:e><m:sup>"+me+"</m:sup></m:sSup>":"<m:sSub><m:sSubPr/><m:e>"+Z(pe)+"</m:e><m:sub>"+me+"</m:sub></m:sSub>")}return Z(le)}for(var J="";B<P.length;)J+=j();return"<m:oMath>"+J+"</m:oMath>"}function p(D,P){var B="",Z={n:1},fe={bold:!1,italic:!1,underline:!1,strike:!1,sizeHalfPoints:0,color:null,highlight:null,vertAlign:null,mono:!1};function re(Q){if(!Q||!Q.style)return 0;var j=Q.style.marginLeft||Q.style.paddingLeft||"",J=/^\s*(-?[\d.]+)\s*([a-z%]*)\s*$/i.exec(j);if(!J)return 0;var Y=parseFloat(J[1]);if(!Y||Y<=0)return 0;var te=(J[2]||"px").toLowerCase(),le=te==="px"?Y:te==="pt"?Y*(4/3):te==="in"?Y*96:te==="cm"?Y*37.795:te==="mm"?Y*3.7795:te==="em"||te==="rem"?Y*16:0;return Math.round(le*15)}function ie(Q,j,J){J=J||{};var Y="";if(J.heading&&(Y+='<w:pStyle w:val="Heading'+J.heading+'"/>'),J.quote&&(Y+='<w:pStyle w:val="Quote"/><w:ind w:left="720"/>'),J.pre&&(Y+='<w:pStyle w:val="Code"/>'),J.numId&&(Y+='<w:numPr><w:ilvl w:val="'+(J.level||0)+'"/><w:numId w:val="'+J.numId+'"/></w:numPr>'),J.pageBreakBefore&&(Y+="<w:pageBreakBefore/>"),!J.quote){var te=re(Q);te>0&&(Y+='<w:ind w:left="'+te+'"/>')}var le=Q&&Q.style?Q.style.textAlign:"";le==="center"||le==="right"?Y+='<w:jc w:val="'+le+'"/>':le==="justify"&&(Y+='<w:jc w:val="both"/>');var pe=Q?I(Q,j,P,Z):"";return"<w:p>"+(Y?"<w:pPr>"+Y+"</w:pPr>":"")+pe+"</w:p>"}function ae(Q,j,J,Y){var te=Q.tagName.toLowerCase()==="ol",le=++P.numSeq;P.numbering[le]=te?"decimal":"bullet";for(var pe="",ye=0;ye<Q.childNodes.length;ye++){var me=Q.childNodes[ye];if(!(me.nodeType!==1||me.tagName.toLowerCase()!=="li")){for(var ee=me.ownerDocument.createElement("li"),ue=0;ue<me.childNodes.length;ue++){var ce=me.childNodes[ue];ce.nodeType===1&&/^(ul|ol)$/.test(ce.tagName.toLowerCase())||ee.appendChild(ce.cloneNode(!0))}pe+=ie(ee,W(me,j),{numId:le,level:J,pageBreakBefore:Y}),Y=!1;for(var ve=0;ve<me.childNodes.length;ve++){var be=me.childNodes[ve];be.nodeType===1&&/^(ul|ol)$/.test(be.tagName.toLowerCase())&&(pe+=ae(be,j,Math.min(8,J+1),!1))}}}return pe}function de(Q,j){for(var J='<w:tbl><w:tblPr><w:tblW w:w="0" w:type="auto"/><w:tblBorders>'+["top","left","bottom","right","insideH","insideV"].map(function(qe){return"<w:"+qe+' w:val="single" w:sz="4" w:space="0" w:color="BFBFBF"/>'}).join("")+"</w:tblBorders></w:tblPr>",Y=Q.getElementsByTagName("tr"),te=0;te<Y.length;te++){for(var le=[],pe=0;pe<Y[te].childNodes.length;pe++){var ye=Y[te].childNodes[pe];if(ye.nodeType===1){var me=ye.tagName.toLowerCase();(me==="td"||me==="th")&&le.push({node:ye,header:me==="th"})}}if(le.length){var ee=le.length&&le[0].header;J+="<w:tr>"+(ee?"<w:trPr><w:tblHeader/></w:trPr>":"");for(var ue=0;ue<le.length;ue++){var ce=parseInt(le[ue].node.getAttribute("colspan")||"1",10)||1,ve=W(le[ue].node,j);le[ue].header&&(ve.bold=!0);for(var be="",ke=le[ue].node.childNodes,Pe=!1,Le=0;Le<ke.length;Le++)if(ke[Le].nodeType===1&&/^(p|div|ul|ol|table|h[1-6]|blockquote)$/.test(ke[Le].tagName.toLowerCase())){Pe=!0;break}be=Pe?se(le[ue].node,ve):ie(le[ue].node,ve,{}),be||(be="<w:p/>"),J+="<w:tc><w:tcPr>"+(ce>1?'<w:gridSpan w:val="'+ce+'"/>':"")+(le[ue].header?'<w:shd w:val="clear" w:color="auto" w:fill="F1F3F7"/>':"")+"</w:tcPr>"+be+"</w:tc>"}J+="</w:tr>"}}return J+"</w:tbl><w:p/>"}function se(Q,j){for(var J="",Y=!1,te=0;te<Q.childNodes.length;te++){var le=Q.childNodes[te];if(le.nodeType===3){(le.nodeValue||"").trim()&&(J+="<w:p>"+k(le.nodeValue.replace(/\s+/g," "),j,!1)+"</w:p>");continue}if(le.nodeType===1){var pe=le.tagName.toLowerCase();if(!(pe==="script"||pe==="style"||pe==="noscript")&&!(le.classList&&(le.classList.contains("rte-footnotes")||le.classList.contains("rte-fn-note")))){if((le.getAttribute("data-rte-page-break")!==null||/always|page/.test(le.style&&(le.style.pageBreakBefore||le.style.breakBefore)||""))&&(Y=!0),pe==="hr"){J+='<w:p><w:pPr><w:pBdr><w:bottom w:val="single" w:sz="6" w:space="1" w:color="C8CDD4"/></w:pBdr></w:pPr></w:p>';continue}if(pe==="ul"||pe==="ol"){J+=ae(le,j,0,Y),Y=!1;continue}if(pe==="table"){J+=de(le,j);continue}if(K[pe]){J+=ie(le,W(le,j),{heading:K[pe],pageBreakBefore:Y}),Y=!1;continue}if(pe==="blockquote"){J+=ie(le,W(le,j),{quote:!0,pageBreakBefore:Y}),Y=!1;continue}if(pe==="pre"){J+=ie(le,W(le,j),{pre:!0,pageBreakBefore:Y}),Y=!1;continue}if(pe==="p"||pe==="div"||pe==="section"||pe==="article"||pe==="figure"||pe==="address"){if(U(le)){J+=se(le,W(le,j));continue}J+=ie(le,W(le,j),{pageBreakBefore:Y}),Y=!1;continue}J+=ie(le,W(le,j),{pageBreakBefore:Y}),Y=!1}}}return J}function U(Q){for(var j=0;j<Q.childNodes.length;j++){var J=Q.childNodes[j];if(J.nodeType===1&&/^(p|div|ul|ol|table|h[1-6]|blockquote|pre|hr|section|article)$/.test(J.tagName.toLowerCase()))return!0}return!1}return B=se(D,fe),B||"<w:p/>"}function g(){var D=null;try{typeof r.getDocumentPageSetup=="function"&&(D=r.getDocumentPageSetup())}catch{}D=D||{};var P={letter:[12240,15840],legal:[12240,20160],tabloid:[15840,24480],a3:[16838,23811],a4:[11906,16838],a5:[8391,11906]},B=P[String(D.format||"letter").toLowerCase()]||P.letter,Z=String(D.orientation||"").toLowerCase()==="landscape",fe=Z?B[1]:B[0],re=Z?B[0]:B[1];function ie(de,se){if(typeof de=="number"&&isFinite(de))return Math.round(de*1440);var U=/^\s*(-?[\d.]+)\s*(mm|cm|in|px|pt)?\s*$/.exec(String(de||""));if(!U)return se;var Q=parseFloat(U[1]);switch(U[2]){case"mm":return Math.round(Q*1440/25.4);case"cm":return Math.round(Q*1440/2.54);case"pt":return Math.round(Q*20);case"px":return Math.round(Q*15);default:return Math.round(Q*1440)}}var ae=D.margins||{};return'<w:sectPr><w:pgSz w:w="'+fe+'" w:h="'+re+'"'+(Z?' w:orient="landscape"':"")+'/><w:pgMar w:top="'+ie(ae.top,1440)+'" w:right="'+ie(ae.right,1440)+'" w:bottom="'+ie(ae.bottom,1440)+'" w:left="'+ie(ae.left,1440)+'" w:header="720" w:footer="720" w:gutter="0"/></w:sectPr>'}function h(D){return new Promise(function(P,B){try{let ye=function(me,ee){ie.push({name:me,bytes:z(ee)})};var pe=ye,Z=document.createElement("div");Z.innerHTML=r.getHTMLCode()||"",document.body.appendChild(Z),Z.style.cssText="position:absolute;left:-99999px;top:0;width:800px;";var fe=new V,re=p(Z,fe);Z.parentNode.removeChild(Z);var ie=[],ae=fe.footnotes.length>0,de=fe.endnotes.length>0,se=fe.comments.length>0;ye("[Content_Types].xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="png" ContentType="image/png"/><Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/><Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/><Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/>'+(ae?'<Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/>':"")+(de?'<Override PartName="/word/endnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/>':"")+(se?'<Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml"/>':"")+'<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>'),ye("_rels/.rels",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rIdDoc" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/><Relationship Id="rIdCore" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rIdApp" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/></Relationships>');for(var U="http://schemas.openxmlformats.org/officeDocument/2006/relationships/",Q='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rIdStyles" Type="'+U+'styles" Target="styles.xml"/><Relationship Id="rIdNum" Type="'+U+'numbering" Target="numbering.xml"/>'+(ae?'<Relationship Id="rIdFn" Type="'+U+'footnotes" Target="footnotes.xml"/>':"")+(de?'<Relationship Id="rIdEn" Type="'+U+'endnotes" Target="endnotes.xml"/>':"")+(se?'<Relationship Id="rIdCm" Type="'+U+'comments" Target="comments.xml"/>':""),j=0;j<fe.rels.length;j++){var J=fe.rels[j];Q+='<Relationship Id="'+J.id+'" Type="'+U+J.type+'" Target="'+H(J.target)+'"'+(J.mode?' TargetMode="'+J.mode+'"':"")+"/>"}ye("word/_rels/document.xml.rels",Q+"</Relationships>"),ye("word/document.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:document xmlns:w="'+x.w+'" xmlns:r="'+x.r+'" xmlns:m="'+x.m+'"><w:body>'+re+g()+"</w:body></w:document>"),ye("word/styles.xml",L()),ye("word/numbering.xml",E(fe)),ae&&ye("word/footnotes.xml",A(fe.footnotes,"footnote")),de&&ye("word/endnotes.xml",A(fe.endnotes,"endnote")),se&&ye("word/comments.xml",C(fe.comments));var Y=D.title||u.docxExportTitle||document.title||"Document",te=D.author||u.docxExportAuthor||"RichTextEditor";ye("docProps/core.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>'+H(Y)+"</dc:title><dc:creator>"+H(te)+"</dc:creator><cp:lastModifiedBy>"+H(te)+'</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">'+new Date().toISOString().replace(/\.\d+Z$/,"Z")+"</dcterms:created></cp:coreProperties>"),ye("docProps/app.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>RichTextEditor</Application></Properties>');for(var le=0;le<fe.media.length;le++)ie.push({name:"word/media/"+fe.media[le].name,bytes:fe.media[le].bytes});O(ie).then(P,B)}catch(ye){B(ye)}})}function L(){for(var D="",P=1;P<=6;P++){var B=[36,30,26,24,22,20][P-1];D+='<w:style w:type="paragraph" w:styleId="Heading'+P+'"><w:name w:val="heading '+P+'"/><w:basedOn w:val="Normal"/><w:pPr><w:outlineLvl w:val="'+(P-1)+'"/><w:spacing w:before="240" w:after="120"/></w:pPr><w:rPr><w:b/><w:sz w:val="'+B+'"/><w:szCs w:val="'+B+'"/></w:rPr></w:style>'}return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:styles xmlns:w="'+x.w+'"><w:docDefaults><w:rPrDefault><w:rPr><w:rFonts w:ascii="Calibri" w:hAnsi="Calibri"/><w:sz w:val="22"/><w:szCs w:val="22"/></w:rPr></w:rPrDefault></w:docDefaults><w:style w:type="paragraph" w:default="1" w:styleId="Normal"><w:name w:val="Normal"/></w:style>'+D+'<w:style w:type="paragraph" w:styleId="Quote"><w:name w:val="Quote"/><w:basedOn w:val="Normal"/><w:rPr><w:i/><w:color w:val="4A5568"/></w:rPr></w:style><w:style w:type="paragraph" w:styleId="Code"><w:name w:val="Code"/><w:basedOn w:val="Normal"/><w:rPr><w:rFonts w:ascii="Consolas" w:hAnsi="Consolas"/></w:rPr></w:style></w:styles>'}function E(D){for(var P="",B="",Z=Object.keys(D.numbering),fe=0;fe<Z.length;fe++){for(var re=Z[fe],ie=D.numbering[re],ae="",de=0;de<9;de++)ae+='<w:lvl w:ilvl="'+de+'"><w:start w:val="1"/><w:numFmt w:val="'+(ie==="bullet"?"bullet":"decimal")+'"/><w:lvlText w:val="'+(ie==="bullet"?"\uF0B7":"%"+(de+1)+".")+'"/><w:lvlJc w:val="left"/><w:pPr><w:ind w:left="'+720*(de+1)+'" w:hanging="360"/></w:pPr>'+(ie==="bullet"?'<w:rPr><w:rFonts w:ascii="Symbol" w:hAnsi="Symbol" w:hint="default"/></w:rPr>':"")+"</w:lvl>";P+='<w:abstractNum w:abstractNumId="'+re+'">'+ae+"</w:abstractNum>",B+='<w:num w:numId="'+re+'"><w:abstractNumId w:val="'+re+'"/></w:num>'}return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:numbering xmlns:w="'+x.w+'">'+P+B+"</w:numbering>"}function A(D,P){for(var B="<w:"+P+' w:type="separator" w:id="-1"><w:p><w:r><w:separator/></w:r></w:p></w:'+P+"><w:"+P+' w:type="continuationSeparator" w:id="0"><w:p><w:r><w:continuationSeparator/></w:r></w:p></w:'+P+">",Z=0;Z<D.length;Z++)B+="<w:"+P+' w:id="'+D[Z].id+'"><w:p><w:r><w:rPr><w:vertAlign w:val="superscript"/></w:rPr><w:'+P+'Ref/></w:r><w:r><w:t xml:space="preserve"> '+H(D[Z].text)+"</w:t></w:r></w:p></w:"+P+">";return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:'+P+'s xmlns:w="'+x.w+'">'+B+"</w:"+P+"s>"}function C(D){for(var P="",B=0;B<D.length;B++){var Z=D[B];P+='<w:comment w:id="'+Z.id+'" w:author="'+H(Z.author)+'" w:initials="'+H(Z.initials)+'" w:date="'+new Date().toISOString().replace(/\.\d+Z$/,"Z")+'"><w:p><w:r><w:t xml:space="preserve">'+H(Z.text)+"</w:t></w:r></w:p></w:comment>"}return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><w:comments xmlns:w="'+x.w+'">'+P+"</w:comments>"}function y(D){return!D||typeof D!="string"?"":D.replace(/\.docx?$/i,"").replace(/[\\/:*?"<>|]+/g,"").trim().slice(0,120)}function d(){var D=new Date;function P(B){return(B<10?"0":"")+B}return"Export-"+String(D.getFullYear()).slice(2)+P(D.getMonth()+1)+P(D.getDate())+"-"+P(D.getHours())+P(D.getMinutes())+P(D.getSeconds())}function w(D,P){var B=URL.createObjectURL(D),Z=document.createElement("a");return Z.href=B,Z.download=P,document.body.appendChild(Z),Z.click(),document.body.removeChild(Z),setTimeout(function(){URL.revokeObjectURL(B)},4e3),P}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_draghandle=RTE_Plugin_DragHandle,typeof RTE_DefaultConfig.dragHandleEnabled>"u"&&(RTE_DefaultConfig.dragHandleEnabled=!0),typeof RTE_DefaultConfig.dragHandleKeyboard>"u"&&(RTE_DefaultConfig.dragHandleKeyboard=!0);function RTE_Plugin_DragHandle(){var N=this,u,r,x=null,H=null,F=null,$=null,z=null,o=null;N.PluginName="DragHandle",N.InitConfig=function(g){u=g},N.InitEditor=function(g){r=g,O();try{r.attachEvent("ready",O)}catch{}try{r.attachEvent("aftersethtml",O)}catch{}setTimeout(O,0),r.moveBlock=function(h,L){return m(h,L)},r.moveBlockUp=function(){return k(-1)},r.moveBlockDown=function(){return k(1)},r.setDragHandleEnabled=function(h){return u.dragHandleEnabled=!!h,h||R(),!!h},r.isDragHandleEnabled=function(){return u.dragHandleEnabled!==!1}};function O(){var g=V();if(!(!g||g===x)){x=g,p(g);var h=K();h&&(g.addEventListener("mousemove",f),g.addEventListener("mousedown",_,!0),g.addEventListener("mousemove",v,!0),g.addEventListener("mouseup",s,!0),g.addEventListener("keydown",M),g.addEventListener("mouseleave",function(){z||R()}))}}function V(){try{return r.getDocument()}catch{return null}}function K(){try{return r.getEditable()}catch{return null}}function W(){var g=K();if(!g)return[];for(var h=[],L=0;L<g.children.length;L++){var E=g.children[L];E.nodeType===1&&(E.getAttribute&&(E.getAttribute("data-rte-page-overlay")==="true"||E.getAttribute("data-rte-linenumbers")==="true")||h.push(E))}return h}function q(g){for(var h=K(),L=g&&g.nodeType===3?g.parentNode:g,E=null;L&&L!==h;)E=L,L=L.parentNode;return L===h&&E&&E.nodeType===1?E:null}function b(){try{var g=r.getSelection();return!g||g.rangeCount===0?null:q(g.getRangeAt(0).startContainer)}catch{return null}}function m(g,h){var L=K();if(!L||!g||g.parentNode!==L||h===g||h&&h.parentNode!==L||h===g.nextSibling)return!1;L.insertBefore(g,h||null);try{var E=V(),A=E.createRange();A.selectNodeContents(g),A.collapse(!0);var C=r.getSelection();C.removeAllRanges(),C.addRange(A)}catch{}return c(),!0}function k(g){var h=b();if(!h)return!1;var L=W(),E=L.indexOf(h);return E<0?!1:g<0?E===0?!1:m(h,L[E-1]):E>=L.length-1?!1:m(h,L[E+1].nextSibling)}function M(g){u.dragHandleKeyboard!==!1&&(!g.altKey||!g.shiftKey||g.ctrlKey||g.metaKey||g.key!=="ArrowUp"&&g.key!=="ArrowDown"||k(g.key==="ArrowUp"?-1:1)&&(g.preventDefault(),g.stopPropagation()))}function I(g,h){var L=h.parentNode||g.body;(!H||!H.parentNode)&&(H=g.createElement("div"),H.className="rte-drag-grip",H.setAttribute("contenteditable","false"),H.setAttribute("aria-hidden","true"),H.textContent="\u283F",L.appendChild(H)),(!F||!F.parentNode)&&(F=g.createElement("div"),F.className="rte-drag-indicator",F.setAttribute("contenteditable","false"),F.setAttribute("aria-hidden","true"),L.appendChild(F))}function R(){H&&(H.style.display="none"),$=null}function l(){F&&(F.style.display="none")}function f(g){if(!(z||u.dragHandleEnabled===!1)){var h=V(),L=K();if(!(!h||!L)){var E=null;if(g.target!==H){if(L.contains(g.target)&&(E=q(g.target)),!E||W().indexOf(E)<0){R();return}if(!(E===$&&H&&H.style.display!=="none")){I(h,L),$=E;var A=!1;try{A=h.defaultView.getComputedStyle(L).direction==="rtl"}catch{}H.style.display="block",H.style.top=E.offsetTop+"px",A?H.style.left=E.offsetLeft+E.offsetWidth+4+"px":H.style.left=Math.max(0,E.offsetLeft-22)+"px"}}}}}function _(g){if(!(g.target!==H||!$)){z={block:$},o=null,g.preventDefault(),g.stopPropagation();var h=K();h&&h.classList&&h.classList.add("rte-drag-active"),H&&H.classList.add("rte-drag-grip-held")}}function v(g){if(z){g.preventDefault();var h=V(),L=K();if(!(!h||!L)){I(h,L);var E=W();if(E.length){var A=L.getBoundingClientRect(),C=g.clientY-A.top+(L.scrollTop||0);o=null;for(var y=null,d=0;d<E.length;d++){var w=E[d],D=w.offsetTop+w.offsetHeight/2;if(C<D){o=w,y=w.offsetTop;break}}if(y===null){var P=E[E.length-1];y=P.offsetTop+P.offsetHeight}F.style.display="block",F.style.top=Math.max(0,y-1)+"px",F.style.left=L.offsetLeft+"px",F.style.width=L.offsetWidth+"px"}}}}function s(){if(z){var g=z.block,h=o;z=null,l();var L=K();L&&L.classList&&L.classList.remove("rte-drag-active"),H&&H.classList.remove("rte-drag-grip-held"),R(),h!==g&&m(g,h)}}function c(){try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function p(g){if(!g.getElementById("rte-drag-handle-styles")){var h=g.createElement("style");h.id="rte-drag-handle-styles",h.appendChild(g.createTextNode(".rte-drag-grip{position:absolute;display:none;width:18px;text-align:center;color:#94a3b8;font-size:14px;line-height:1.4;cursor:grab;user-select:none;z-index:20;border-radius:4px;}.rte-drag-grip:hover{background:rgba(148,163,184,.18);color:#475569;}.rte-drag-grip-held{cursor:grabbing;color:#1474ea;}.rte-drag-indicator{position:absolute;display:none;height:2px;background:#1474ea;border-radius:1px;pointer-events:none;z-index:19;}.rte-drag-active{cursor:grabbing;}.rte-drag-active *{cursor:grabbing !important;}")),(g.head||g.getElementsByTagName("head")[0]||g.documentElement).appendChild(h),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(g,h,"rte-drag-handle-styles",h.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_emailtoolkit=RTE_Plugin_EmailToolkit,RTE_DefaultConfig.emailInlineProperties=RTE_DefaultConfig.emailInlineProperties||["color","background-color","font-family","font-size","font-weight","font-style","text-decoration","text-align","line-height","margin-top","margin-bottom","margin-left","margin-right","padding-top","padding-bottom","padding-left","padding-right","border","border-radius","vertical-align","list-style-type","width"],RTE_DefaultConfig.emailWrapWidth=RTE_DefaultConfig.emailWrapWidth||640;function RTE_Plugin_EmailToolkit(){var N=this,u,r;N.PluginName="EmailToolkit",N.InitConfig=function(O){u=O},N.InitEditor=function(O){r=O,r.getEmailHTML=function(V){return N.BuildEmailHTML(V||{})},r.attachEvent("exec_command_emailexport",function(V){V.returnValue=!0,N.OpenEmailExport()})};function x(O,V,K,W){var q=O.ownerDocument.createElement(V);return K&&(q.style.cssText=K),W&&(q.className=W),O.appendChild(q),q}function H(O,V){if(!V)return!0;var K=V.trim().toLowerCase();return K==="normal"||K==="auto"||K==="none"||K==="0px"||K==="0"?!(O==="list-style-type"&&K==="none"):O==="background-color"&&(K==="rgba(0, 0, 0, 0)"||K==="transparent")?!0:O==="color"&&K==="rgb(0, 0, 0)"?!1:O==="text-decoration"&&K.indexOf("none")===0||O==="border"&&(K.indexOf("0px")===0||K.indexOf("none")!==-1&&K.indexOf("0px")!==-1)||O==="vertical-align"&&K==="baseline"||O==="font-weight"&&K==="400"||O==="font-style"&&K==="normal"||O==="text-align"&&(K==="start"||K==="left")}var F={UL:1,OL:1,LI:1};function $(O,V){for(var K=V.getComputedStyle(O),W=u.emailInlineProperties||[],q=[],b=0;b<W.length;b++){var m=W[b],k;try{k=K.getPropertyValue(m)}catch{k=""}k==null||k===""||H(m,k)||m==="width"&&O.nodeName!=="TABLE"&&O.nodeName!=="IMG"&&O.nodeName!=="TD"&&O.nodeName!=="TH"||m==="list-style-type"&&!F[O.nodeName]||q.push(m+":"+k)}return q.join(";")}var z={SCRIPT:1,STYLE:1,LINK:1,META:1};function o(O,V){if(O.nodeType===3)return O.ownerDocument.createTextNode(O.data);if(O.nodeType!==1||z[O.nodeName])return null;for(var K=O.ownerDocument,W=K.createElement(O.nodeName),q=0;q<O.attributes.length;q++){var b=O.attributes[q],m=b.name.toLowerCase();m==="class"||m==="id"||m==="contenteditable"||m==="style"||m.indexOf("data-rte-")===0||W.setAttribute(b.name,b.value)}var k=$(O,V);k&&W.setAttribute("style",k);for(var M=0;M<O.childNodes.length;M++){var I=o(O.childNodes[M],V);I&&W.appendChild(I)}return W}N.BuildEmailHTML=function(O){for(var V=r.getEditable(),K=r.getDocument(),W=K&&K.defaultView||window,q=K.createElement("div"),b=0;b<V.childNodes.length;b++){var m=o(V.childNodes[b],W);m&&q.appendChild(m)}var k=q.innerHTML,M=O.wrap!==!1;if(!M)return k;var I=O.width||u.emailWrapWidth||640;return'<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="border-collapse:collapse"><tr><td align="center" style="padding:0"><table role="presentation" width="'+I+'" cellpadding="0" cellspacing="0" style="border-collapse:collapse;max-width:'+I+'px;width:100%"><tr><td style="padding:16px;font-family:Arial,Helvetica,sans-serif">'+k+"</td></tr></table></td></tr></table>"},N.OpenEmailExport=function(){var O=N.BuildEmailHTML({}),V=r.createDialog(r.getLangText&&r.getLangText("emailexporttitle")||"Export email HTML","rte-dialog-email"),K=typeof V.close=="function"?function(){V.close()}:function(){r.closeCurrentPopup()},W=x(V,"div","","rte-email-export");x(W,"div","","rte-email-export-copy").innerText="Inline-styled HTML for email clients (class/style blocks resolved to inline styles). Copy and paste into your email tool.";var q=x(W,"textarea","","rte-email-export-code");q.value=O,q.readOnly=!0,q.setAttribute("aria-label","Inline-styled email HTML");var b=x(W,"div","","rte-email-export-status");b.setAttribute("role","status"),b.setAttribute("aria-live","polite"),b.textContent="Ready to copy "+O.length+" characters.";var m=x(W,"div","","rte-email-export-footer"),k=x(m,"button","","rte-email-export-button rte-email-export-button-primary");k.type="button",k.textContent="Copy",k.onclick=function(){q.select();try{navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(q.value):V.ownerDocument.execCommand("copy"),k.textContent="Copied",b.textContent="Copied email HTML to the clipboard.",setTimeout(function(){k.textContent="Copy",b.textContent="Ready to copy "+O.length+" characters."},1400)}catch{}};var M=x(m,"button","","rte-email-export-button");M.type="button",M.textContent="Close",M.onclick=K,setTimeout(function(){q.focus()},0)}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_emojiautocomplete=RTE_Plugin_EmojiAutocomplete,RTE_DefaultConfig.emojiAutocompleteEnabled=typeof RTE_DefaultConfig.emojiAutocompleteEnabled>"u"?!0:RTE_DefaultConfig.emojiAutocompleteEnabled,RTE_DefaultConfig.emojiShortcodes=RTE_DefaultConfig.emojiShortcodes||{smile:"\u{1F604}",smiley:"\u{1F603}",grin:"\u{1F601}",laughing:"\u{1F606}",satisfied:"\u{1F606}",joy:"\u{1F602}",rofl:"\u{1F923}",sweat_smile:"\u{1F605}",wink:"\u{1F609}",blush:"\u{1F60A}",innocent:"\u{1F607}",heart_eyes:"\u{1F60D}",star_struck:"\u{1F929}",kissing_heart:"\u{1F618}",yum:"\u{1F60B}",stuck_out_tongue:"\u{1F61B}",zany:"\u{1F92A}",thinking:"\u{1F914}",shush:"\u{1F92B}",neutral_face:"\u{1F610}",expressionless:"\u{1F611}",no_mouth:"\u{1F636}",smirk:"\u{1F60F}",unamused:"\u{1F612}",roll_eyes:"\u{1F644}",grimacing:"\u{1F62C}",relieved:"\u{1F60C}",pensive:"\u{1F614}",sleepy:"\u{1F62A}",sleeping:"\u{1F634}",mask:"\u{1F637}",face_with_thermometer:"\u{1F912}",nauseated_face:"\u{1F922}",sneezing_face:"\u{1F927}",dizzy_face:"\u{1F635}",exploding_head:"\u{1F92F}",cowboy:"\u{1F920}",sunglasses:"\u{1F60E}",nerd:"\u{1F913}",monocle:"\u{1F9D0}",confused:"\u{1F615}",worried:"\u{1F61F}",slightly_frowning_face:"\u{1F641}",open_mouth:"\u{1F62E}",astonished:"\u{1F632}",flushed:"\u{1F633}",fearful:"\u{1F628}",cold_sweat:"\u{1F630}",cry:"\u{1F622}",sob:"\u{1F62D}",scream:"\u{1F631}",confounded:"\u{1F616}",persevere:"\u{1F623}",disappointed:"\u{1F61E}",sweat:"\u{1F613}",weary:"\u{1F629}",tired_face:"\u{1F62B}",triumph:"\u{1F624}",rage:"\u{1F621}",angry:"\u{1F620}",cursing_face:"\u{1F92C}",smiling_imp:"\u{1F608}",imp:"\u{1F47F}",skull:"\u{1F480}",poop:"\u{1F4A9}",hankey:"\u{1F4A9}",clown:"\u{1F921}",ghost:"\u{1F47B}",alien:"\u{1F47D}",robot:"\u{1F916}",heart_eyes_cat:"\u{1F63B}",see_no_evil:"\u{1F648}",hear_no_evil:"\u{1F649}",speak_no_evil:"\u{1F64A}",heart:"\u2764\uFE0F",orange_heart:"\u{1F9E1}",yellow_heart:"\u{1F49B}",green_heart:"\u{1F49A}",blue_heart:"\u{1F499}",purple_heart:"\u{1F49C}",black_heart:"\u{1F5A4}",broken_heart:"\u{1F494}",two_hearts:"\u{1F495}",sparkling_heart:"\u{1F496}",heartpulse:"\u{1F497}",cupid:"\u{1F498}",gift_heart:"\u{1F49D}",revolving_hearts:"\u{1F49E}",kiss:"\u{1F48B}","+1":"\u{1F44D}",thumbsup:"\u{1F44D}","-1":"\u{1F44E}",thumbsdown:"\u{1F44E}",ok_hand:"\u{1F44C}",punch:"\u{1F44A}",fist:"\u270A",facepunch:"\u{1F44A}",wave:"\u{1F44B}",raised_hand:"\u270B",raised_hands:"\u{1F64C}",pray:"\u{1F64F}",clap:"\u{1F44F}",muscle:"\u{1F4AA}",point_up:"\u261D\uFE0F",point_down:"\u{1F447}",point_left:"\u{1F448}",point_right:"\u{1F449}",v:"\u270C\uFE0F",crossed_fingers:"\u{1F91E}",handshake:"\u{1F91D}",writing_hand:"\u270D\uFE0F",selfie:"\u{1F933}",nail_care:"\u{1F485}",eyes:"\u{1F440}",fire:"\u{1F525}",star:"\u2B50",star2:"\u{1F31F}",sparkles:"\u2728",zap:"\u26A1",boom:"\u{1F4A5}",collision:"\u{1F4A5}",dizzy:"\u{1F4AB}",sweat_drops:"\u{1F4A6}",droplet:"\u{1F4A7}",snowflake:"\u2744\uFE0F",sunny:"\u2600\uFE0F",cloud:"\u2601\uFE0F",rainbow:"\u{1F308}",umbrella:"\u2614",ocean:"\u{1F30A}",sun_with_face:"\u{1F31E}",full_moon:"\u{1F315}",crescent_moon:"\u{1F319}",tada:"\u{1F389}",confetti_ball:"\u{1F38A}",balloon:"\u{1F388}",gift:"\u{1F381}",trophy:"\u{1F3C6}",medal:"\u{1F3C5}",crown:"\u{1F451}",gem:"\u{1F48E}",rocket:"\u{1F680}",airplane:"\u2708\uFE0F",car:"\u{1F697}",rotating_light:"\u{1F6A8}",100:"\u{1F4AF}",white_check_mark:"\u2705",heavy_check_mark:"\u2714\uFE0F",ballot_box_with_check:"\u2611\uFE0F",x:"\u274C",warning:"\u26A0\uFE0F",no_entry:"\u26D4",question:"\u2753",exclamation:"\u2757",bulb:"\u{1F4A1}",lock:"\u{1F512}",key:"\u{1F511}",mag:"\u{1F50D}",bell:"\u{1F514}",recycle:"\u267B\uFE0F",heavy_plus_sign:"\u2795",heavy_minus_sign:"\u2796",coffee:"\u2615",tea:"\u{1F375}",beer:"\u{1F37A}",beers:"\u{1F37B}",wine_glass:"\u{1F377}",cocktail:"\u{1F378}",pizza:"\u{1F355}",hamburger:"\u{1F354}",fries:"\u{1F35F}",taco:"\u{1F32E}",cake:"\u{1F382}",birthday:"\u{1F382}",cookie:"\u{1F36A}",doughnut:"\u{1F369}",apple:"\u{1F34E}",banana:"\u{1F34C}",strawberry:"\u{1F353}",avocado:"\u{1F951}",bread:"\u{1F35E}",cheese:"\u{1F9C0}",dog:"\u{1F436}",cat:"\u{1F431}",mouse:"\u{1F42D}",rabbit:"\u{1F430}",bear:"\u{1F43B}",panda_face:"\u{1F43C}",koala:"\u{1F428}",tiger:"\u{1F42F}",lion:"\u{1F981}",cow:"\u{1F42E}",pig:"\u{1F437}",frog:"\u{1F438}",monkey_face:"\u{1F435}",chicken:"\u{1F414}",penguin:"\u{1F427}",bird:"\u{1F426}",unicorn:"\u{1F984}",bee:"\u{1F41D}",bug:"\u{1F41B}",butterfly:"\u{1F98B}",snail:"\u{1F40C}",book:"\u{1F4D6}",books:"\u{1F4DA}",memo:"\u{1F4DD}",pencil:"\u{1F4DD}",email:"\u2709\uFE0F",envelope:"\u2709\uFE0F",calendar:"\u{1F4C5}",chart:"\u{1F4CA}",bar_chart:"\u{1F4CA}",chart_with_upwards_trend:"\u{1F4C8}",clipboard:"\u{1F4CB}",pushpin:"\u{1F4CC}",paperclip:"\u{1F4CE}",scissors:"\u2702\uFE0F",hammer:"\u{1F528}",wrench:"\u{1F527}",gear:"\u2699\uFE0F",nut_and_bolt:"\u{1F529}",bomb:"\u{1F4A3}",hourglass:"\u231B",watch:"\u231A",alarm_clock:"\u23F0",moneybag:"\u{1F4B0}",dollar:"\u{1F4B5}",credit_card:"\u{1F4B3}",chart_increasing:"\u{1F4C8}",link:"\u{1F517}",mag_right:"\u{1F50E}",telescope:"\u{1F52D}",microscope:"\u{1F52C}",syringe:"\u{1F489}",pill:"\u{1F48A}",phone:"\u{1F4DE}",telephone:"\u{1F4DE}",iphone:"\u{1F4F1}",computer:"\u{1F4BB}",keyboard:"\u2328\uFE0F",printer:"\u{1F5A8}\uFE0F",camera:"\u{1F4F7}",movie_camera:"\u{1F3A5}",tv:"\u{1F4FA}",seedling:"\u{1F331}",evergreen_tree:"\u{1F332}",deciduous_tree:"\u{1F333}",palm_tree:"\u{1F334}",cactus:"\u{1F335}",four_leaf_clover:"\u{1F340}",rose:"\u{1F339}",sunflower:"\u{1F33B}",tulip:"\u{1F337}",blossom:"\u{1F33C}",herb:"\u{1F33F}",musical_note:"\u{1F3B5}",notes:"\u{1F3B6}",microphone:"\u{1F3A4}",headphones:"\u{1F3A7}",guitar:"\u{1F3B8}",trumpet:"\u{1F3BA}",soccer:"\u26BD",basketball:"\u{1F3C0}",football:"\u{1F3C8}",baseball:"\u26BE",tennis:"\u{1F3BE}","8ball":"\u{1F3B1}",dart:"\u{1F3AF}",video_game:"\u{1F3AE}",game_die:"\u{1F3B2}",trophy2:"\u{1F3C6}",sos:"\u{1F198}",new:"\u{1F195}",ok:"\u{1F197}",up:"\u{1F199}",cool:"\u{1F192}",free:"\u{1F193}",arrow_up:"\u2B06\uFE0F",arrow_down:"\u2B07\uFE0F",arrow_left:"\u2B05\uFE0F",arrow_right:"\u27A1\uFE0F",arrow_forward:"\u25B6\uFE0F",bangbang:"\u203C\uFE0F",interrobang:"\u2049\uFE0F",grey_question:"\u2754",grey_exclamation:"\u2755"};function RTE_Plugin_EmojiAutocomplete(){var N=this,u,r,x,H,F=null,$=[],z=0,o=-1,O=null;N.PluginName="EmojiAutocomplete",N.InitConfig=function(l){u=l},N.InitEditor=function(l){r=l,x=r.getEditable(),H=r.getDocument(),!(!x||!H)&&(H.addEventListener("input",W,!1),H.addEventListener("keydown",k,!0),H.addEventListener("blur",function(){setTimeout(R,150)},!0))};function V(){return u.emojiShortcodes||{}}function K(){var l=r.getSelection();if(!l||l.rangeCount===0||!l.isCollapsed)return null;var f=l.getRangeAt(0);if(f.startContainer.nodeType!==3)return null;for(var _=f.startContainer.parentNode;_&&_!==x;){if(_.nodeName==="CODE"||_.nodeName==="PRE")return null;_=_.parentNode}return f}function W(){if(u.emojiAutocompleteEnabled){var l=K();if(!l){R();return}var f=l.startContainer,_=l.startOffset,v=f.data.slice(0,_),s=/(^|[^a-z0-9_])(:[a-z0-9_+\-]{1,30}:)$/i.exec(v);if(s){var c=s[2].slice(1,-1).toLowerCase(),p=V()[c];if(p){I(f,_-s[2].length,_,p),R();return}}var g=/(^|[^a-z0-9_])(:)([a-z0-9_+\-]{1,30})$/i.exec(v);if(g){var h=g[3].toLowerCase();O=f,o=_-h.length-1,q(h,l)}else R()}}function q(l,f){for(var _=V(),v=Object.keys(_),s=[],c=[],p=0;p<v.length;p++){var g=v[p];g.indexOf(l)===0?s.push(g):g.indexOf(l)!==-1&&c.push(g)}for(var h=s.concat(c),L={},E=[],A=0;A<h.length&&E.length<8;A++){var C=_[h[A]];L[C]||(L[C]=1,E.push({code:h[A],emo:C}))}if(!E.length){R();return}$=E,z=0,b(f)}function b(l){var f=document;F||(F=f.createElement("div"),F.className="rte-emoji-pop",F.setAttribute("role","listbox"),F.setAttribute("aria-label","Emoji suggestions"),F.style.cssText="position:fixed;z-index:2147483600;",f.body.appendChild(F)),F.innerHTML="",$.forEach(function(h,L){var E=f.createElement("div");E.className="rte-emoji-pop-row"+(L===z?" is-active":""),E.setAttribute("role","option"),E.setAttribute("aria-selected",L===z?"true":"false");var A=f.createElement("span");A.className="rte-emoji-pop-glyph",A.textContent=h.emo;var C=f.createElement("span");C.className="rte-emoji-pop-code",C.textContent=":"+h.code+":",E.appendChild(A),E.appendChild(C),E.onmousedown=function(y){y.preventDefault(),z=L,M()},E.onmouseenter=function(){z=L,m()},F.appendChild(E)});try{var _=l.getBoundingClientRect(),v=H.defaultView&&H.defaultView.frameElement?H.defaultView.frameElement.getBoundingClientRect():{left:0,top:0},s=v.left+_.left,c=v.top+_.bottom+4,p=f.documentElement.clientWidth,g=f.documentElement.clientHeight;F.style.left=Math.max(4,Math.min(s,p-290))+"px",F.style.top=Math.max(4,Math.min(c,g-20))+"px",F.style.display="block"}catch{}}function m(){if(F)for(var l=F.childNodes,f=0;f<l.length;f++)l[f].classList.toggle("is-active",f===z),l[f].setAttribute("aria-selected",f===z?"true":"false")}function k(l){if(!(!F||F.style.display==="none"||!$.length))switch(l.key){case"ArrowDown":l.preventDefault(),l.stopPropagation(),z=(z+1)%$.length,m();break;case"ArrowUp":l.preventDefault(),l.stopPropagation(),z=(z-1+$.length)%$.length,m();break;case"Enter":case"Tab":l.preventDefault(),l.stopPropagation(),M();break;case"Escape":l.preventDefault(),l.stopPropagation(),R();break}}function M(){if(!$.length||!O||o<0){R();return}var l=$[z]||$[0],f=K();if(!f||f.startContainer!==O){R();return}I(O,o,f.startOffset,l.emo),R()}function I(l,f,_,v){try{var s=l.data,c=s.slice(0,f),p=s.slice(_),g=l.parentNode;if(!g)return;var h=H.createDocumentFragment();c&&h.appendChild(H.createTextNode(c));var L=H.createTextNode(v);h.appendChild(L);var E=p?H.createTextNode(p):null;E&&h.appendChild(E),g.replaceChild(h,l);var A=H.createRange();E?A.setStart(E,0):A.setStartAfter(L),A.collapse(!0);var C=r.getSelection();if(C&&(C.removeAllRanges(),C.addRange(A)),typeof r.fireChange=="function")try{r.fireChange()}catch{}}catch{}}function R(){F&&(F.style.display="none"),$=[],z=0,o=-1,O=null}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_foldheadings=RTE_Plugin_FoldHeadings,RTE_DefaultConfig.foldHeadingsEnabled=typeof RTE_DefaultConfig.foldHeadingsEnabled>"u"?!0:RTE_DefaultConfig.foldHeadingsEnabled;function RTE_Plugin_FoldHeadings(){var N=this,u,r,x=!1,H=null;N.PluginName="FoldHeadings",N.InitConfig=function(R){u=R},N.InitEditor=function(R){r=R,F();try{r.attachEvent("ready",F)}catch{}try{r.attachEvent("aftersethtml",F)}catch{}setTimeout(F,0),setTimeout(F,200),r.toggleHeadingFold=function(l){$(l)&&K(l)},r.unfoldAll=function(){var l=r.getEditable();l&&o(l.querySelectorAll(".rte-fold-collapsed,.rte-fold-hidden"))},r.foldAtCaret=function(){var l=V();return l&&K(l),!!l}};function F(){var R=r.getDocument();R&&(k(R),R!==H&&(R.addEventListener("click",b,!0),H=R)),I()}function $(R){return R&&R.nodeType===1&&/^H[1-6]$/.test(R.nodeName)}function z(R){return $(R)?+R.nodeName.charAt(1):0}function o(R){for(var l=0;l<R.length;l++)R[l].classList.remove("rte-fold-collapsed"),R[l].classList.remove("rte-fold-hidden")}function O(R){for(var l=z(R),f=[],_=R.nextElementSibling;_&&!($(_)&&z(_)<=l);)f.push(_),_=_.nextElementSibling;return f}function V(){try{var R=r.getSelection();if(!R||R.rangeCount===0)return null;for(var l=r.getEditable(),f=R.getRangeAt(0).startContainer;f&&f!==l;){if($(f))return f;f=f.parentNode}for(var _=R.getRangeAt(0).startContainer;_&&_.parentNode!==l&&_!==l;)_=_.parentNode;for(;_&&_!==l;){if($(_))return _;_=_.previousElementSibling}}catch{}return null}function K(R){R.classList.contains("rte-fold-collapsed")?q(R):W(R)}function W(R){var l=O(R);if(l.length){try{var f=r.getSelection();if(f&&f.rangeCount){for(var _=f.getRangeAt(0).startContainer,v=_.nodeType===1?_:_.parentNode,s=0;s<l.length;s++)if(l[s]===v||l[s].contains(v)){var c=r.getDocument(),p=c.createRange();p.selectNodeContents(R),p.collapse(!1),f.removeAllRanges(),f.addRange(p);break}}}catch{}R.classList.add("rte-fold-collapsed");for(var g=0;g<l.length;g++)l[g].classList.add("rte-fold-hidden");m()}}function q(R){R.classList.remove("rte-fold-collapsed");for(var l=O(R),f=0;f<l.length;f++)l[f].classList.remove("rte-fold-hidden");m()}function b(R){if(u.foldHeadingsEnabled){var l=R.target;if($(l)){var f=l.getBoundingClientRect(),_=R.clientX-f.left;_>2||_<-40||(R.preventDefault(),K(l))}}}function m(){try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function k(R){if(!(!R||R.getElementById("rte-foldheadings-styles"))){var l=".rte-fold-hidden{display:none !important;}h1,h2,h3,h4,h5,h6{position:relative;}h1::before,h2::before,h3::before,h4::before,h5::before,h6::before{content:'\\25BE';position:absolute;left:-0.95em;top:0;width:0.8em;text-align:center;color:#cbd5e1;cursor:pointer;opacity:0;transition:opacity .12s,transform .12s;font-size:.9em;}h1:hover::before,h2:hover::before,h3:hover::before,h4:hover::before,h5:hover::before,h6:hover::before{opacity:1;}h1.rte-fold-collapsed::before,h2.rte-fold-collapsed::before,h3.rte-fold-collapsed::before,h4.rte-fold-collapsed::before,h5.rte-fold-collapsed::before,h6.rte-fold-collapsed::before{content:'\\25B8';opacity:1;color:#1d67ba;}@media (prefers-reduced-motion: reduce){h1::before,h2::before,h3::before,h4::before,h5::before,h6::before{transition:none !important;}}@media (hover: none),(pointer: coarse){h1::before,h2::before,h3::before,h4::before,h5::before,h6::before{opacity:.5;}}",f=R.createElement("style");f.id="rte-foldheadings-styles",f.appendChild(R.createTextNode(l)),(R.head||R.getElementsByTagName("head")[0]||R.documentElement).appendChild(f),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(R,f,"rte-foldheadings-styles",f.textContent)}}function M(){var R=r.getEditable();if(!R)return function(){};var l=R.querySelectorAll(".rte-fold-collapsed"),f=R.querySelectorAll(".rte-fold-hidden"),_;for(_=0;_<l.length;_++)l[_].classList.remove("rte-fold-collapsed");for(_=0;_<f.length;_++)f[_].classList.remove("rte-fold-hidden");return function(){for(var s=0;s<l.length;s++)l[s].classList.add("rte-fold-collapsed");for(var c=0;c<f.length;c++)f[c].classList.add("rte-fold-hidden")}}function I(){if(!x){for(var R=["getHTMLCode","getJSON","getHTMLContent"],l=!1,f=0;f<R.length;f++)(function(_){var v=r[_];if(!(typeof v!="function"||v.__rteFoldWrapped)){var s=function(){var c=M();try{return v.apply(r,arguments)}finally{c()}};s.__rteFoldWrapped=!0,r[_]=s,l=!0}})(R[f]);l&&(x=!0)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_footnotes=RTE_Plugin_Footnotes,typeof RTE_DefaultConfig.footnotesTitle>"u"&&(RTE_DefaultConfig.footnotesTitle="Footnotes"),typeof RTE_DefaultConfig.footnotesNumbering>"u"&&(RTE_DefaultConfig.footnotesNumbering="decimal"),typeof RTE_DefaultConfig.footnotesMarkerPrefix>"u"&&(RTE_DefaultConfig.footnotesMarkerPrefix=""),typeof RTE_DefaultConfig.footnotesMarkerSuffix>"u"&&(RTE_DefaultConfig.footnotesMarkerSuffix="");function RTE_Plugin_Footnotes(){var N=this,u,r,x=null,H=!1;N.PluginName="Footnotes",N.InitConfig=function(c){u=c},N.InitEditor=function(c){r=c,r.attachEvent("exec_command_insertfootnote",function(p){p.returnValue=!0,N.InsertFootnote()}),F();try{r.attachEvent("ready",F)}catch{}try{r.attachEvent("aftersethtml",function(){F(),O()})}catch{}setTimeout(function(){F(),O()},0),r.insertFootnote=function(p){return N.InsertFootnote(p)},r.getFootnotes=function(){return N.List()},r.syncFootnotes=function(){return R()},r.getFootnotesCss=function(){return v()}};function F(){var c=$();c&&(s(c),c!==x&&(o(),x=c))}function $(){try{return r.getDocument()}catch{return null}}function z(){try{return r.getEditable()}catch{return null}}function o(){var c=z();c&&(c.addEventListener("keyup",O),c.addEventListener("cut",O),c.addEventListener("paste",O),c.addEventListener("drop",O),c.addEventListener("click",function(p){var g=V(p.target,"rte-fn-ref",c),h=V(p.target,"rte-fn-back",c),L=null;if(g?L=m(g.getAttribute("data-fn-id")):h&&(L=k(h.getAttribute("data-fn-id"))),!!L){p.preventDefault();try{L.scrollIntoView({block:"center"})}catch{L.scrollIntoView()}f(L)}}))}function O(){H||(H=!0,setTimeout(function(){H=!1,R()},0))}function V(c,p,g){for(;c&&c!==g;){if(c.nodeType===1&&c.classList&&c.classList.contains(p))return c;c=c.parentNode}return null}function K(){return"fn"+Math.floor(Math.random()*1e9).toString(36)+(W++).toString(36)}var W=0;function q(){var c=z();return c?Array.prototype.slice.call(c.querySelectorAll("sup.rte-fn-ref[data-fn-id]")):[]}function b(){var c=z();return c?c.querySelector("section.rte-footnotes"):null}function m(c){var p=b();return p?p.querySelector('li.rte-fn-note[data-fn-id="'+M(c)+'"]'):null}function k(c){var p=z();return p?p.querySelector('sup.rte-fn-ref[data-fn-id="'+M(c)+'"]'):null}function M(c){return String(c).replace(/["\\]/g,"\\$&")}N.InsertFootnote=function(c){var p=$(),g=z();if(!p||!g)return null;var h=K(),L=p.createElement("sup");L.className="rte-fn-ref",L.setAttribute("data-fn-id",h),L.setAttribute("contenteditable","false"),L.setAttribute("id","fnref-"+h),L.textContent="0";var E=!1;try{typeof r.insertElement=="function"&&(r.insertElement(L),E=!0)}catch{}if(!E)try{var A=r.getSelection();if(A&&A.rangeCount){var C=A.getRangeAt(0);C.collapse(!1),C.insertNode(L),C.setStartAfter(L),C.collapse(!0),A.removeAllRanges(),A.addRange(C),E=!0}}catch{}E||g.appendChild(L);var y=I(p).querySelector("ol.rte-fn-list"),d=p.createElement("li");d.className="rte-fn-note",d.setAttribute("data-fn-id",h),d.setAttribute("id","fn-"+h),c!=null&&String(c)!==""&&d.appendChild(p.createTextNode(String(c)));var w=p.createElement("a");w.className="rte-fn-back",w.setAttribute("data-fn-id",h),w.setAttribute("href","#fnref-"+h),w.setAttribute("contenteditable","false"),w.setAttribute("title","Back to reference"),w.textContent="\u21A9",d.appendChild(w),y.appendChild(d),R();try{var D=p.createRange();D.setStart(d,0),D.collapse(!0);var P=r.getSelection();P.removeAllRanges(),P.addRange(D),typeof r.focus=="function"&&r.focus()}catch{}return _(),h};function I(c){var p=z(),g=b();if(g)return g;g=c.createElement("section"),g.className="rte-footnotes";var h=String(u.footnotesTitle==null?"":u.footnotesTitle);if(h){var L=c.createElement("h2");L.className="rte-fn-title",L.textContent=h,g.appendChild(L)}var E=c.createElement("ol");return E.className="rte-fn-list",g.appendChild(E),p.appendChild(g),g}function R(){var c=$(),p=b(),g=q();if(!g.length)return p&&p.parentNode&&p.parentNode.removeChild(p),[];if(!c)return[];p||(p=I(c));var h=p.querySelector("ol.rte-fn-list");h||(h=c.createElement("ol"),h.className="rte-fn-list",p.appendChild(h));for(var L={},E=[],A=0;A<g.length;A++){var C=g[A],y=C.getAttribute("data-fn-id");if(L[y]){var d=K();C.setAttribute("data-fn-id",d),C.setAttribute("id","fnref-"+d),y=d}L[y]=!0;var w=String(A+1),D=String(u.footnotesMarkerPrefix||"")+w+String(u.footnotesMarkerSuffix||"");C.textContent!==D&&(C.textContent=D),C.setAttribute("data-fn-number",w),C.getAttribute("contenteditable")!=="false"&&C.setAttribute("contenteditable","false"),C.getAttribute("id")!=="fnref-"+y&&C.setAttribute("id","fnref-"+y);var P=h.querySelector('li.rte-fn-note[data-fn-id="'+M(y)+'"]');P||(P=c.createElement("li"),P.className="rte-fn-note",P.setAttribute("data-fn-id",y),P.setAttribute("id","fn-"+y)),P.setAttribute("data-fn-number",w),h.appendChild(P),E.push({id:y,number:A+1,text:l(P)})}for(var B=Array.prototype.slice.call(h.querySelectorAll("li.rte-fn-note")),Z=0;Z<B.length;Z++)L[B[Z].getAttribute("data-fn-id")]||h.removeChild(B[Z]);return h.getAttribute("data-numbering")!==u.footnotesNumbering&&h.setAttribute("data-numbering",u.footnotesNumbering),E}function l(c){if(!c)return"";for(var p=c.cloneNode(!0),g=p.querySelectorAll?p.querySelectorAll("a.rte-fn-back"):[],h=0;h<g.length;h++)g[h].parentNode&&g[h].parentNode.removeChild(g[h]);return(p.textContent||"").replace(/\u21a9/g,"").trim()}N.List=function(){var c=b();if(!c)return[];for(var p=[],g=c.querySelectorAll("li.rte-fn-note"),h=0;h<g.length;h++)p.push({id:g[h].getAttribute("data-fn-id"),number:parseInt(g[h].getAttribute("data-fn-number"),10)||h+1,text:l(g[h])});return p};function f(c){!c||!c.classList||(c.classList.add("rte-fn-flash"),setTimeout(function(){try{c.classList.remove("rte-fn-flash")}catch{}},900))}function _(){try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function v(){var c=String(u.footnotesNumbering||"decimal");return"sup.rte-fn-ref{cursor:pointer;font-size:.72em;line-height:0;vertical-align:super;color:#1474ea;font-weight:700;padding:0 .12em;user-select:none;}sup.rte-fn-ref:hover{text-decoration:underline;}section.rte-footnotes{margin-top:2em;padding-top:.85em;border-top:1px solid #ddd;font-size:.88em;color:#333;}section.rte-footnotes h2.rte-fn-title{font-size:1em;font-weight:700;margin:0 0 .5em;}ol.rte-fn-list{list-style:"+c+";padding-left:1.6em;margin:0;}ol.rte-fn-list>li{margin:.25em 0;}a.rte-fn-back{text-decoration:none;color:#1474ea;cursor:pointer;user-select:none;}.rte-fn-flash{background:#fff3b0;transition:background .5s ease;}"}function s(c){if(c){var p=c.getElementById("rte-footnotes-styles"),g=v();if(p){if(p.getAttribute("data-css")===g)return;p.parentNode&&p.parentNode.removeChild(p)}var h=c.createElement("style");h.id="rte-footnotes-styles",h.setAttribute("data-css",g),h.appendChild(c.createTextNode(g)),(c.head||c.getElementsByTagName("head")[0]||c.documentElement).appendChild(h),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(c,h,"rte-footnotes-styles",g)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_formatpainter=RTE_Plugin_FormatPainter,typeof RTE_DefaultConfig.formatPainterProperties>"u"&&(RTE_DefaultConfig.formatPainterProperties=["font-family","font-size","font-weight","font-style","text-decoration-line","color","background-color","letter-spacing","text-transform","font-variant"]);function RTE_Plugin_FormatPainter(){var N=this,u,r,x=null,H=!1,F=null,$={B:1,STRONG:1,I:1,EM:1,U:1,S:1,STRIKE:1,FONT:1,BIG:1,SMALL:1};N.PluginName="FormatPainter",N.InitConfig=function(f){u=f},N.InitEditor=function(f){r=f,r.attachEvent("exec_command_formatpainter",function(_){_.returnValue=!0,N.Toggle()}),z();try{r.attachEvent("ready",z)}catch{}try{r.attachEvent("aftersethtml",z)}catch{}setTimeout(z,0),r.copyFormatting=function(){return N.Copy()},r.pasteFormatting=function(){return N.Paint()},r.toggleFormatPainter=function(_){return N.Toggle(_)},r.cancelFormatPainter=function(){return N.Cancel()},r.isFormatPainterActive=function(){return!!x},r.getCapturedFormatting=function(){return x?V(x.props):null}};function z(){var f=o();if(f&&(l(f),f!==F)){F=f;var _=O();_&&(_.addEventListener("mouseup",function(){x&&setTimeout(function(){x&&N.Paint()},0)}),_.addEventListener("keydown",function(v){v.key==="Escape"&&x&&(N.Cancel(),v.preventDefault())}))}}function o(){try{return r.getDocument()}catch{return null}}function O(){try{return r.getEditable()}catch{return null}}function V(f){var _={};for(var v in f)f.hasOwnProperty(v)&&(_[v]=f[v]);return _}function K(){try{var f=r.getSelection();if(!f||f.rangeCount===0)return null;var _=f.getRangeAt(0).startContainer;return _&&_.nodeType===3&&(_=_.parentNode),_&&_.nodeType===1?_:null}catch{return null}}N.Copy=function(){var f=K(),_=o();if(!f||!_)return null;for(var v=_.defaultView||window,s=v.getComputedStyle(f),c=O(),p=c?v.getComputedStyle(c):null,g={},h=u.formatPainterProperties||[],L=0;L<h.length;L++){var E=h[L],A=s.getPropertyValue(E);A&&(p&&A===p.getPropertyValue(E)||(g[E]=A))}return g["background-color"]&&/^(transparent|rgba\(0,\s*0,\s*0,\s*0\))$/.test(g["background-color"])&&delete g["background-color"],x={props:g},M(!0),V(g)},N.Paint=function(){if(!x)return!1;var f=o(),_;try{_=r.getSelection()}catch{return!1}if(!f||!_||_.rangeCount===0||_.getRangeAt(0).collapsed)return!1;var v=f.createElement("span");v.className="rte-painted";var s=x.props;for(var c in s)s.hasOwnProperty(c)&&v.style.setProperty(c,s[c]);var p=null;try{p=r.surroundElement(v)}catch{p=null}return p?(W(p,u.formatPainterProperties||[]),m(p),H||N.Cancel(),I(),!0):!1};function W(f,_){for(var v=f.getElementsByTagName("*"),s=Array.prototype.slice.call(v),c=0;c<s.length;c++){var p=s[c];if(p.style){for(var g=0;g<_.length;g++)p.style.removeProperty(_[g]);p.style.removeProperty("font"),p.style.removeProperty("text-decoration")}p.nodeName==="FONT"&&(p.removeAttribute("color"),p.removeAttribute("face"),p.removeAttribute("size"))}for(var h=0;h<s.length;h++){var L=s[h];$[L.nodeName]&&L.parentNode&&b(L)}q(f)}function q(f){for(var _=Array.prototype.slice.call(f.getElementsByTagName("*")),v=0;v<_.length;v++){var s=_[v];if(s.getAttribute&&s.getAttribute("style")===""&&s.removeAttribute("style"),s.nodeName==="SPAN"&&s.classList&&s.classList.contains("rte-painted")&&s.parentNode){b(s);continue}s.nodeName==="SPAN"&&!s.attributes.length&&s.parentNode&&b(s)}f.getAttribute&&f.getAttribute("style")===""&&f.removeAttribute("style")}function b(f){for(var _=f.parentNode;f.firstChild;)_.insertBefore(f.firstChild,f);_.removeChild(f)}function m(f){for(var _=0;_<32;_++){var v=f.parentNode;if(!v||v.nodeType!==1||v.nodeName!=="SPAN"||!v.classList||!v.classList.contains("rte-painted")||!k(v,f))return;b(v)}}function k(f,_){for(var v=0;v<f.childNodes.length;v++){var s=f.childNodes[v];if(s!==_&&!(s.nodeType===3&&s.nodeValue.length===0))return!1}return!0}N.Toggle=function(f){return H=!!f,x?(N.Cancel(),!1):(N.Copy(),!!x)},N.Cancel=function(){return x=null,H=!1,M(!1),!0};function M(f){var _=O();!_||!_.classList||(f?_.classList.add("rte-format-painting"):_.classList.remove("rte-format-painting"))}function I(){try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function R(){return".rte-format-painting,.rte-format-painting *{cursor:copy !important;}"}function l(f){if(f&&!f.getElementById("rte-format-painter-styles")){var _=f.createElement("style");_.id="rte-format-painter-styles",_.appendChild(f.createTextNode(R())),(f.head||f.getElementsByTagName("head")[0]||f.documentElement).appendChild(_),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(f,_,"rte-format-painter-styles",_.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_formattingmarks=RTE_Plugin_FormattingMarks,typeof RTE_DefaultConfig.formattingMarkPilcrow>"u"&&(RTE_DefaultConfig.formattingMarkPilcrow=!0),typeof RTE_DefaultConfig.formattingMarkBlocks>"u"&&(RTE_DefaultConfig.formattingMarkBlocks=!0),typeof RTE_DefaultConfig.formattingMarkInvisibles>"u"&&(RTE_DefaultConfig.formattingMarkInvisibles=!0);function RTE_Plugin_FormattingMarks(){var N=this,u,r,x=null,H=!1,F=!1,$=!1,z=[{ch:"\xA0",cls:"rte-fm-nbsp",label:"\xB7"},{ch:"\u200B",cls:"rte-fm-zwsp",label:"\u2400"},{ch:"\u200E",cls:"rte-fm-bidi",label:"\u200E"},{ch:"\u200F",cls:"rte-fm-bidi",label:"\u200F"},{ch:"\xAD",cls:"rte-fm-shy",label:"-"}];N.PluginName="FormattingMarks",N.InitConfig=function(l){u=l},N.InitEditor=function(l){r=l,r.attachEvent("exec_command_formattingmarks",function(f){f.returnValue=!0,N.Toggle()}),o();try{r.attachEvent("ready",o)}catch{}try{r.attachEvent("aftersethtml",function(){o(),H&&K()})}catch{}setTimeout(o,0),r.setFormattingMarks=function(f){return H=!!f,W(),H},r.toggleFormattingMarks=function(){return N.Toggle()},r.isFormattingMarks=function(){return H},r.getFormattingMarksCss=function(){return I()}},N.Toggle=function(){return H=!H,W(),H};function o(){var l=O();if(l&&(R(l),M(),l!==x)){x=l;var f=V();f&&(f.addEventListener("keyup",function(){H&&K()}),f.addEventListener("paste",function(){H&&K()}))}}function O(){try{return r.getDocument()}catch{return null}}function V(){try{return r.getEditable()}catch{return null}}function K(){$||($=!0,setTimeout(function(){$=!1,b()},0))}function W(){var l=V();l&&(l.classList&&(l.classList.toggle("rte-fm-on",H),l.classList.toggle("rte-fm-pilcrow",H&&u.formattingMarkPilcrow!==!1),l.classList.toggle("rte-fm-blocks",H&&u.formattingMarkBlocks!==!1)),H&&u.formattingMarkInvisibles!==!1?b():q())}function q(){var l=V();if(l)for(var f=l.querySelectorAll("span[data-rte-fm]"),_=0;_<f.length;_++){var v=f[_],s=v.parentNode;s&&(s.replaceChild(v.ownerDocument.createTextNode(v.getAttribute("data-rte-fm-char")||""),v),s.normalize())}}function b(){var l=V(),f=O();if(!(!l||!f)){q();for(var _={},v=0;v<z.length;v++)_[z[v].ch]=z[v];for(var s=f.createTreeWalker(l,4,null,!1),c=[],p;p=s.nextNode();)if(p.nodeValue){for(var g=0;g<z.length;g++)if(p.nodeValue.indexOf(z[g].ch)>=0){c.push(p);break}}for(var h=0;h<c.length;h++)m(f,c[h],_)}}function m(l,f,_){var v=f.nodeValue,s=f.parentNode;if(s&&!(s.nodeName==="CODE"||s.nodeName==="PRE")){for(var c=l.createDocumentFragment(),p="",g=0;g<v.length;g++){var h=_[v[g]];if(!h){p+=v[g];continue}p&&(c.appendChild(l.createTextNode(p)),p="");var L=l.createElement("span");L.setAttribute("data-rte-fm","1"),L.setAttribute("data-rte-fm-char",v[g]),L.className=h.cls,L.setAttribute("contenteditable","false"),L.textContent=h.label,c.appendChild(L)}p&&c.appendChild(l.createTextNode(p)),s.replaceChild(c,f)}}function k(){var l=V();if(!l)return function(){};var f=Array.prototype.slice.call(l.querySelectorAll("span[data-rte-fm]"));if(!f.length)return function(){};for(var _=[],v=0;v<f.length;v++){var s=f[v],c=s.ownerDocument.createTextNode(s.getAttribute("data-rte-fm-char")||"");_.push({span:s,parent:s.parentNode,text:c}),s.parentNode&&s.parentNode.replaceChild(c,s)}return function(){for(var g=0;g<_.length;g++){var h=_[g];h.text.parentNode&&h.text.parentNode.replaceChild(h.span,h.text)}}}function M(){if(!F){for(var l=["getHTMLCode","getJSON","getHTMLContent","getText"],f=!1,_=0;_<l.length;_++)(function(v){var s=r[v];if(!(typeof s!="function"||s.__rteFmWrapped)){var c=function(){var p=k();try{return s.apply(r,arguments)}finally{p()}};c.__rteFmWrapped=!0,r[v]=c,f=!0}})(l[_]);f&&(F=!0)}}function I(){return".rte-fm-pilcrow p::after,.rte-fm-pilcrow h1::after,.rte-fm-pilcrow h2::after,.rte-fm-pilcrow h3::after,.rte-fm-pilcrow h4::after,.rte-fm-pilcrow h5::after,.rte-fm-pilcrow h6::after,.rte-fm-pilcrow li::after,.rte-fm-pilcrow blockquote::after{content:'\\00b6';color:#9aa4b5;opacity:.65;font-weight:400;}.rte-fm-blocks p,.rte-fm-blocks h1,.rte-fm-blocks h2,.rte-fm-blocks h3,.rte-fm-blocks h4,.rte-fm-blocks h5,.rte-fm-blocks h6,.rte-fm-blocks ul,.rte-fm-blocks ol,.rte-fm-blocks blockquote,.rte-fm-blocks table,.rte-fm-blocks div{outline:1px dashed rgba(120,140,170,.45);outline-offset:1px;}span[data-rte-fm]{color:#c2410c;opacity:.75;user-select:none;}.rte-fm-nbsp{background:rgba(194,65,12,.10);border-radius:2px;}.rte-fm-zwsp,.rte-fm-shy,.rte-fm-bidi{background:rgba(194,65,12,.18);border-radius:2px;font-size:.8em;vertical-align:middle;}"}function R(l){if(l){var f=l.getElementById("rte-formatting-marks-styles"),_=I();if(f){if(f.getAttribute("data-css")===_)return;f.parentNode&&f.parentNode.removeChild(f)}var v=l.createElement("style");v.id="rte-formatting-marks-styles",v.setAttribute("data-css",_),v.appendChild(l.createTextNode(_)),(l.head||l.getElementsByTagName("head")[0]||l.documentElement).appendChild(v),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(l,v,"rte-formatting-marks-styles",v.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_gapcursor=RTE_Plugin_GapCursor,typeof RTE_DefaultConfig.gapCursorClick>"u"&&(RTE_DefaultConfig.gapCursorClick=!0),typeof RTE_DefaultConfig.gapCursorKeys>"u"&&(RTE_DefaultConfig.gapCursorKeys=!0),typeof RTE_DefaultConfig.gapCursorHint>"u"&&(RTE_DefaultConfig.gapCursorHint=!0);function RTE_Plugin_GapCursor(){var N=this,u,r,x=null;N.PluginName="GapCursor";var H={TABLE:1,HR:1,IMG:1,FIGURE:1,IFRAME:1,VIDEO:1,AUDIO:1,OBJECT:1,EMBED:1,CANVAS:1,SVG:1,PRE:1};N.InitConfig=function(A){u=A},N.InitEditor=function(A){r=A,z();try{r.attachEvent("ready",z)}catch{}try{r.attachEvent("aftersethtml",z)}catch{}setTimeout(z,0),r.insertParagraphAt=function(C){return q(C)},r.insertParagraphAfter=function(C){return b(C,!0)},r.insertParagraphBefore=function(C){return b(C,!1)},r.getGapPositions=function(){return K()}};function F(){try{return r.getDocument()}catch{return null}}function $(){try{return r.getEditable()}catch{return null}}function z(){var A=F(),C=$();!A||!C||A===x||(x=A,E(A),u.gapCursorKeys!==!1&&C.addEventListener("keydown",M,!0),u.gapCursorClick!==!1&&C.addEventListener("click",I,!0),u.gapCursorHint!==!1&&C.addEventListener("mousemove",s,!0))}function o(A){return!!(A&&A.nodeType===1&&H[A.nodeName])}function O(A){return!!(A&&A.nodeType===1&&A.className==="rte-gap-hint")}function V(){var A=$(),C=[];if(!A)return C;for(var y=0;y<A.children.length;y++)O(A.children[y])||C.push(A.children[y]);return C}function K(){var A=[],C=V();if(!C.length)return A;o(C[0])&&A.push(0);for(var y=0;y<C.length-1;y++)o(C[y])&&o(C[y+1])&&A.push(y+1);return o(C[C.length-1])&&A.push(C.length),A}function W(A){var C=A.createElement("p");return C.appendChild(A.createElement("br")),C}function q(A){var C=$(),y=F();if(!C||!y)return null;g();var d=W(y),w=V()[A]||null;return C.insertBefore(d,w),m(d),h(),d}function b(A,C){var y=$(),d=F();if(!y||!d||!A)return null;var w=W(d);return C?A.parentNode.insertBefore(w,A.nextSibling):A.parentNode.insertBefore(w,A),m(w),h(),w}function m(A){try{var C=A.ownerDocument,y=C.createRange();y.setStart(A,0),y.collapse(!0);var d=r.getSelection();d.removeAllRanges(),d.addRange(y),r.focus()}catch{}}function k(A){for(var C=$(),y=A&&A.nodeType===3?A.parentNode:A;y&&y.parentNode&&y.parentNode!==C;)y=y.parentNode;return y&&y.parentNode===C?y:null}function M(A){var C=A.key,y=C==="ArrowDown"||C==="ArrowRight"||C==="End"||C==="PageDown",d=C==="ArrowUp"||C==="ArrowLeft"||C==="Home"||C==="PageUp";if(!(!y&&!d)){var w=$();if(!(!w||!w.children.length)){var D=r.getSelection();if(!(!D||!D.rangeCount)){var P=k(D.getRangeAt(0).startContainer);if(o(P)){var B=V(),Z=B.indexOf(P);if(!(Z<0))if(y){var fe=B[Z+1];if(fe&&!o(fe))return;A.preventDefault(),A.stopPropagation(),q(Z+1)}else{var re=B[Z-1];if(re&&!o(re))return;A.preventDefault(),A.stopPropagation(),q(Z)}}}}}}function I(A){var C=$();if(!(!C||A.target!==C)){g();var y=R(A.clientY);y!==null&&(A.preventDefault(),A.stopPropagation(),q(y))}}function R(A){var C=V();if(!C.length)return null;var y=K();if(!y.length)return null;for(var d=0;d<C.length;d++){var w=C[d].getBoundingClientRect();if(A<w.top)return l(y,d);if(A<=w.bottom)return null}return l(y,C.length)}function l(A,C){return A.indexOf(C)>=0?C:null}var f=null,_=null,v=10;function s(A){var C=$();if(C&&!O(A.target)){if(A.target===C){var y=R(A.clientY);if(y===null){g();return}p(y);return}var d=c(A.clientY);if(d===null){g();return}p(d)}}function c(A){for(var C=V(),y=K(),d=0;d<y.length;d++){var w=y[d],D;if(w===0?D=C[0].getBoundingClientRect().top:D=C[w-1].getBoundingClientRect().bottom,Math.abs(A-D)<=v)return w}return null}function p(A){var C=$(),y=F();if(!(!C||!y)){f||(f=y.createElement("div"),f.className="rte-gap-hint",f.setAttribute("contenteditable","false"),f.setAttribute("aria-hidden","true"),f.addEventListener("mousedown",function(w){w.preventDefault(),w.stopPropagation(),_!==null&&q(_)},!0));var d=V()[A]||null;if(f.parentNode===C&&f.nextSibling===d){_=A;return}C.insertBefore(f,d),_=A}}function g(){f&&f.parentNode&&f.parentNode.removeChild(f),_=null}function h(){g();try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function L(){return".rte-gap-hint{height:6px;margin:1px 0;position:relative;cursor:text;pointer-events:auto;background:transparent;}.rte-gap-hint::before{content:'';position:absolute;left:0;right:0;top:2px;border-top:2px solid #2563eb;opacity:.65;}.rte-gap-hint::after{content:'';position:absolute;left:-3px;top:0;width:6px;height:6px;border-radius:50%;background:#2563eb;}"}function E(A){if(A){var C=L(),y=A.getElementById("rte-gapcursor-styles");if(y){if(y.getAttribute("data-css")===C)return;y.parentNode&&y.parentNode.removeChild(y)}var d=A.createElement("style");d.id="rte-gapcursor-styles",d.setAttribute("data-css",C),d.appendChild(A.createTextNode(C)),(A.head||A.getElementsByTagName("head")[0]||A.documentElement).appendChild(d),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(A,d,"rte-gapcursor-styles",d.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_ghostcomplete=RTE_Plugin_GhostComplete,typeof RTE_DefaultConfig.ghostText>"u"&&(RTE_DefaultConfig.ghostText=!1),typeof RTE_DefaultConfig.ghostTextResolver>"u"&&(RTE_DefaultConfig.ghostTextResolver=null);function RTE_Plugin_GhostComplete(){var N=this,u,r,x=null,H=null,F=!1,$=null,z=0,o=!1,O=null,V="";N.PluginName="GhostComplete",N.InitConfig=function(C){u=C},N.InitEditor=function(C){r=C,x=typeof u.ghostText=="object"&&u.ghostText?u.ghostText:{},W();try{r.attachEvent("ready",W)}catch{}try{r.attachEvent("aftersethtml",W)}catch{}setTimeout(W,0),setTimeout(W,200),r.setGhostTextResolver=function(y){u.ghostTextResolver=typeof y=="function"?y:null},r.requestGhostText=function(){if(typeof u.ghostTextResolver!="function"){h();return}R(0)},r.acceptGhostText=function(){return g()},r.dismissGhostText=function(){p()},r.hasGhostText=function(){return!!O}};function K(){return!!u.ghostText&&typeof u.ghostTextResolver=="function"}function W(){var C=r.getDocument();C&&(L(C),C!==H&&(C.addEventListener("keydown",M,!0),C.addEventListener("input",k,!0),C.addEventListener("mousedown",I,!0),C.addEventListener("touchstart",I,!0),H=C),A())}function q(){var C=x&&+x.delayMs;return C&&C>=0?C:600}function b(){var C=x&&+x.minChars;return C&&C>0?C:3}function m(){var C=x&&+x.maxContext;return C&&C>0?C:2e3}function k(){o||(p(),K()&&R(q()))}function M(C){if(O){if(C.key==="Tab"){C.preventDefault(),C.stopPropagation(),g();return}if(C.key==="Escape"){C.preventDefault(),C.stopPropagation(),p();return}/^Arrow|^Home$|^End$|^PageUp$|^PageDown$/.test(C.key)&&p()}}function I(C){if(O){var y=C.target;y===O||O.contains&&O.contains(y)?(C.preventDefault(),C.stopPropagation(),g()):p()}}function R(C){$&&(clearTimeout($),$=null),K()&&($=setTimeout(l,C))}function l(){if($=null,!(!K()||O)){var C=f();if(!(!C||C.before.replace(/\s/g,"").length<b())){var y=++z,d;try{d=u.ghostTextResolver({before:C.before,after:C.after,full:C.full})}catch{return}Promise.resolve(d).then(function(w){y===z&&(O||typeof w=="string"&&(w=w.replace(/\r/g,""),w&&c(w)))},function(){})}}}function f(){try{var C=r.getSelection();if(!C||C.rangeCount===0||!C.isCollapsed)return null;var y=r.getEditable();if(!y)return null;var d=C.getRangeAt(0),w=s(d.startContainer,y)||y,D=d.cloneRange();D.setStart(w,0);var P=d.cloneRange();P.setEnd(w,w.childNodes.length);var B=v(D),Z=v(P);return B.length>m()&&(B=B.slice(B.length-m())),{before:B,after:Z,full:v(_(y))}}catch{return null}}function _(C){var y=r.getDocument(),d=y.createRange();return d.selectNodeContents(C),d}function v(C){try{for(var y=C.cloneContents(),d=y.querySelectorAll?y.querySelectorAll(".rte-ghost"):[],w=0;w<d.length;w++)d[w].parentNode.removeChild(d[w]);var D=r.getDocument().createElement("div");return D.appendChild(y),D.textContent||""}catch{return""}}function s(C,y){for(var d=C&&C.nodeType===3?C.parentNode:C;d&&d!==y;){if(d.nodeType===1&&/^(P|H[1-6]|LI|BLOCKQUOTE|PRE|TD|TH|DIV|FIGCAPTION)$/.test(d.nodeName))return d;d=d.parentNode}return null}function c(C){var y=r.getDocument(),d=r.getSelection();if(!(!y||!d||d.rangeCount===0||!d.isCollapsed)){o=!0;try{var w=d.getRangeAt(0),D=y.createElement("span");D.className="rte-ghost",D.setAttribute("contenteditable","false"),D.setAttribute("data-rte-ghost","1"),D.setAttribute("aria-hidden","true"),D.textContent=C,w.insertNode(D),O=D,V=C;var P=y.createRange();P.setStartBefore(D),P.collapse(!0),d.removeAllRanges(),d.addRange(P)}catch{O=null,V=""}finally{o=!1}}}function p(){if(O){o=!0;try{var C=r.getSelection(),y=null;if(C&&C.rangeCount){var d=C.getRangeAt(0);y={n:d.startContainer,o:d.startOffset}}O.parentNode&&O.parentNode.removeChild(O);try{if(y&&y.n){var w=r.getDocument(),D=w.createRange();D.setStart(y.n,Math.min(y.o,y.n.length!=null?y.n.length:y.o)),D.collapse(!0),C.removeAllRanges(),C.addRange(D)}}catch{}}catch{}finally{O=null,V="",o=!1}}}function g(){if(!O)return!1;var C=V,y=r.getDocument(),d=r.getSelection();o=!0;try{O.parentNode&&O.parentNode.removeChild(O),O=null,V="";var w=!1;try{w=y.execCommand("insertText",!1,C)}catch{w=!1}if(!w&&d&&d.rangeCount){var D=d.getRangeAt(0),P=y.createTextNode(C);D.insertNode(P);var B=y.createRange();B.setStartAfter(P),B.collapse(!0),d.removeAllRanges(),d.addRange(B)}}catch{}finally{o=!1}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}return!0}function h(){try{var C=r.iframe||r.getDocument&&r.getDocument().defaultView&&r.getDocument().defaultView.frameElement,y=C&&C.parentNode?C.parentNode:document.body;if(y.querySelector&&y.querySelector(".rte-ghost-hint"))return;var d=(y.ownerDocument||document).createElement("div");d.className="rte-ghost-hint",d.setAttribute("role","status"),d.textContent="AI completion isn't configured \u2014 supply config.ghostTextResolver (or editor.setGhostTextResolver) to enable inline suggestions.",d.style.cssText="position:absolute;left:50%;bottom:12px;transform:translateX(-50%);z-index:20;max-width:90%;padding:7px 14px;border-radius:8px;background:#1f2937;color:#f9fafb;font:12px/1.5 -apple-system,Segoe UI,sans-serif;box-shadow:0 4px 14px rgba(0,0,0,.25);pointer-events:none";try{y!==document.body&&(y.ownerDocument.defaultView||window).getComputedStyle(y).position==="static"&&(y.style.position="relative")}catch{}y.appendChild(d),setTimeout(function(){try{d.parentNode&&d.parentNode.removeChild(d)}catch{}},4500)}catch{}}function L(C){if(!(!C||C.getElementById("rte-ghost-styles"))){var y=".rte-ghost{color:#9aa3b2;opacity:.85;font-style:normal;user-select:none;-webkit-user-select:none;cursor:pointer;white-space:pre-wrap;}",d=C.createElement("style");d.id="rte-ghost-styles",d.appendChild(C.createTextNode(y)),(C.head||C.getElementsByTagName("head")[0]||C.documentElement).appendChild(d),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(C,d,"rte-ghost-styles",d.textContent)}}function E(){var C=r.getEditable();if(!C)return function(){};for(var y=C.querySelectorAll(".rte-ghost"),d=[],w=0;w<y.length;w++)d.push([y[w],y[w].nextSibling,y[w].parentNode]),y[w].parentNode.removeChild(y[w]);return function(){for(var P=0;P<d.length;P++){var B=d[P][0],Z=d[P][1],fe=d[P][2];if(fe)try{fe.insertBefore(B,Z)}catch{}}}}function A(){if(!F){for(var C=["getHTMLCode","getJSON","getHTMLContent"],y=!1,d=0;d<C.length;d++)(function(w){var D=r[w];if(!(typeof D!="function"||D.__rteGhostWrapped)){var P=function(){var B=E();try{return D.apply(r,arguments)}finally{B()}};P.__rteGhostWrapped=!0,r[w]=P,y=!0}})(C[d]);y&&(F=!0)}}}RTE_DefaultConfig.svgCode_html2pdf||(RTE_DefaultConfig.svgCode_html2pdf='<svg viewBox="-2 -2 36 36" fill="#5F6368"><polygon points="30 11 30 9 22 9 22 23 24 23 24 17 29 17 29 15 24 15 24 11 30 11"></polygon><path d="M8,9H2V23H4V18H8a2,2,0,0,0,2-2V11A2,2,0,0,0,8,9Zm0,7H4V11H8Z"></path><path d="M16,23H12V9h4a4,4,0,0,1,4,4v6A4,4,0,0,1,16,23Zm-2-2h2a2,2,0,0,0,2-2V13a2,2,0,0,0-2-2H14Z"></path><title>PDF</title></svg>'),RTE_DefaultConfig.plugin_html2pdf=RTE_Plugin_Html2PDF,typeof RTE_DefaultConfig.html2pdfScriptUrl>"u"&&(RTE_DefaultConfig.html2pdfScriptUrl=null);function RTE_Plugin_Html2PDF(){var N="/plugins/vendor/html2pdf.bundle.min.js";function u(O){try{return new URL(O,document.baseURI||location.href).href}catch{return O}}function r(){if(H&&H.html2pdfScriptUrl)return u(H.html2pdfScriptUrl);var O=H&&H.url_base?String(H.url_base).replace(/\/+$/,""):"";return u(O?O+N:"."+N)}var x=this,H,F;x.PluginName="Html2PDF",x.InitConfig=function(O){H=O},x.InitEditor=function(O){F=O,F.attachEvent("exec_command_html2pdf",function(V,K,W){x.DoHtml2PDF(),V.returnValue=!0}),F.toolbarFactoryMap.html2pdf=function(V){var K=F.createToolbarButton(V);return K.style.backgroundColor="",K}},x.GetPdfPageOptions=function(){var O={format:"letter",orientation:"portrait",margin:.5},V=null;try{F&&typeof F.getDocumentPageSetup=="function"&&(V=F.getDocumentPageSetup())}catch{V=null}if(!V||typeof V!="object")return O;var K={a3:1,a4:1,a5:1,letter:1,legal:1,tabloid:1},W=String(V.format||"").toLowerCase(),q=String(V.orientation||"").toLowerCase()==="landscape"?"landscape":O.orientation,b={format:K[W]?W:O.format,orientation:q,margin:O.margin},m=V.margins;if(m&&typeof m=="object"){var k=$(m.top),M=$(m.right),I=$(m.bottom),R=$(m.left);k!==null&&M!==null&&I!==null&&R!==null&&(b.margin=[k,M,I,R])}return b};function $(O){if(typeof O=="number"&&isFinite(O))return O;if(typeof O!="string")return null;var V=/^\s*(-?[\d.]+)\s*(mm|cm|in|px|pt)?\s*$/.exec(O);if(!V)return null;var K=parseFloat(V[1]);if(!isFinite(K))return null;switch(V[2]){case"mm":return K/25.4;case"cm":return K/2.54;case"pt":return K/72;case"px":return K/96;default:return K}}function z(O,V,K,W){var q=O.ownerDocument.createElement(V);return K&&(q.style.cssText=K),W&&(q.className=W),O.appendChild(q),q}function o(O){for(var V=O.split(","),K=V[0].match(/:(.*?);/)[1],W=atob(V[1]),q=W.length,b=new Uint8Array(q);q--;)b[q]=W.charCodeAt(q);return new Blob([b],{type:K})}x.DoHtml2PDF=function(){var O=F.createDialog("Html2PDF","rte-dialog-html2pdf"),V=z(O,"div","position:relative;text-align:center;");V.innerHTML="Loading...";var K=z(O,"div","position:relative;text-align:center;");window.html2pdf_callback=function(q){if(!q.html2pdf){V.innerHTML="Failed to load script.";return}V.innerHTML="Exporting...";var b=x.GetPdfPageOptions(),m={margin:b.margin,filename:"myfile.pdf",image:{type:"jpeg",quality:.98},html2canvas:{scale:2},jsPDF:{unit:"in",format:b.format,orientation:b.orientation}},k=q.html2pdf().set(m).from(q.document.body).outputImg();k.then(function(M){var I=M.getAttribute("src");if(I.indexOf("base64")==-1){V.innerHTML="Error, no data.";return}var R=o(I),l=URL.createObjectURL(R);M.setAttribute("src",l);var f=q.html2pdf().set(m).from(q.document.body).outputPdf();f.then(function(_){for(var v=new Array(_.length),s=0;s<_.length;s++)v[s]=_.charCodeAt(s);var c=new Blob([new Uint8Array(v)],{type:"application/pdf"}),p=URL.createObjectURL(c);V.innerHTML=Math.ceil(_.length/1024)+"KB Exported<br/><a href='"+p+"' target=_blank>Download PDF</a>";var g=V.querySelector("a"),h=new Date,L=String(h.getFullYear()*1e4+(h.getMonth()+1)*100+h.getDate()).substring(2),E=String(1e6+h.getHours()*1e4+h.getMinutes()*100+h.getSeconds()).substring(1);g.download="Export-"+L+"-"+E+".pdf",g.click(),M.style.cssText="max-width:300px;max-height:200px;margin:5px;padding:10px;border:solid 1px #eee;box-shadow:2px 2px 6px #eee",K.appendChild(M),z(K,"br");var A=z(K,"a");A.setAttribute("href",l),A.setAttribute("target","_blank"),A.download="Export-"+L+"-"+E+".jpg",A.innerText="Download Img"}).catch(function(_){console.error(_)})}).catch(function(M){console.error(M)})};var W=z(O,"div","position:relative;text-align:center;");iframe=z(W,"iframe","align-self:center;flex:99;width:100%;height:0px;border:0px;","rte-editable"),iframe.contentDocument.open("text/html"),iframe.contentDocument.write("<html><head><link id='url-css-preview' rel='stylesheet' href='"+F.htmlEncode(H.previewCssUrl)+"'/><script src='"+F.htmlEncode(r())+"'><\/script></head><body style='padding:10px;margin:0px'>"+F.getHTMLCode()+"</body><script>window.onload=function(){setTimeout(function(){parent.html2pdf_callback(window)},100)}<\/script></html>"),iframe.contentDocument.close()}}RTE_DefaultConfig.svgCode_imageeditor||(RTE_DefaultConfig.svgCode_imageeditor='<svg viewBox="-2 -2 20 20" fill="#5F6368"><style>.st0{fill:#f6f6f6}.st1{fill:#424242}.st2{fill:none}.st3{fill:#f0eff1}</style><path class="st0" d="M1 0v6H0v10h10v-1h6V0z" id="outline"/><g id="icon_x5F_bg"><path class="st1" d="M2 5h1v1H2zM2 3h1v1H2zM2 1h1v1H2zM4 1h1.001v1H4zM6 1h1v1H6zM8 1h1v1H8zM10 1h1v1h-1zM12 1h1v1h-1zM14 1h1v1h-1zM14 3h1v1h-1zM14 5h1v1h-1zM14 7h1v1h-1zM14 9h1v1h-1zM14 10.999h1V12h-1zM14 13h1v1h-1zM12 13h1v1h-1zM11 11V5H5v1H4V4h8v7z"/><circle class="st1" cx="6.192" cy="9.807" r=".807"/><path class="st1" d="M1 7v8h8V7H1zm1 7.001v-.28l2.537-1.463L7.554 14l.001.001H2zm6-.93l-3.463-1.982L2 12.491v-4.49h6v5.07zM10 13h1v1h-1z"/></g><g id="icon_x5F_fg"><path class="st2" d="M2 14h5.554v.001H2z"/><path class="st3" d="M11 5v6h-1V6H5V5z"/><path class="st3" d="M2 12.491l2.537-1.402L8 13.071v-5.07H2v4.49zM6.192 9a.807.807 0 1 1 .001 1.615A.807.807 0 0 1 6.192 9z"/><path class="st3" d="M2 13.721V14h5.554l-3.017-1.742z"/></g></svg>'),RTE_DefaultConfig.plugin_imageeditor=RTE_Plugin_ImageEditor;function RTE_Plugin_ImageEditor(){var N=this,u,r;N.PluginName="ImageEditor",N.InitConfig=function($){u=$},N.InitEditor=function($){r=$,r.attachEvent("exec_command_imageeditor",function(z,o,O){N.DoImageEditor(),z.returnValue=!0}),r.toolbarFactoryMap.imageeditor=function(z){var o=r.createToolbarButton(z);return o.style.backgroundColor="",o}};function x($,z,o,O){var V=$.ownerDocument.createElement(z);return o&&(V.style.cssText=o),O&&(V.className=O),$.appendChild(V),V}var H={"image/png":".png","image/jpeg":".jpg","image/jpg":".jpg","image/webp":".webp","image/gif":".gif","image/bmp":".bmp","image/avif":".avif"};function F($,z){for(var o=$.split(","),O=o[0].match(/:(.*?);/)[1],V=atob(o[1]),K=V.length,W=new Uint8Array(K);K--;)W[K]=V.charCodeAt(K);var q=z||"image-"+new Date().getTime()+(H[O]||".png");try{return new File([W],q,{type:O})}catch{var b=new Blob([W],{type:O});return b.name=q,b}}N.DoImageEditor=function(){var $=r.getSelectedControl();if($){var z=r.createDialog("ImageEditor","rte-dialog-imageeditor");z.style.width="90%",z.style.height="90%";var o=u.url_base+"/plugins/tui.image-editor/";window.rte_image_editor_callback=function(O){try{O.tui=O.tui||{},O.tui.usageStatistics=!1}catch{}var V={usageStatistics:!1,includeUI:{loadImage:{path:$.src,name:"RteImage"},usageStatistics:!1,theme:{"common.bi.image":"","common.bisize.width":"0","common.bisize.height":"0","menu.normalIcon.path":o+"svg/icon-d.svg","menu.activeIcon.path":o+"svg/icon-b.svg","menu.disabledIcon.path":o+"svg/icon-a.svg","menu.hoverIcon.path":o+"svg/icon-c.svg","submenu.normalIcon.path":o+"svg/icon-d.svg","submenu.normalIcon.name":"icon-d","submenu.activeIcon.path":o+"svg/icon-c.svg","submenu.activeIcon.name":"icon-c"},menuBarPosition:"bottom"},cssMaxWidth:700,cssMaxHeight:500,selectionStyle:{cornerSize:20,rotatingPointOffset:70}},K=new O.tui.ImageEditor(O.document.querySelector("#tui-image-editor"),V),W=O.document.querySelector(".tui-image-editor-header-buttons");W.innerHTML="";var q=x(W,"button","");q.innerText="Save";var b=x(W,"div","margin-left:10px;font-size:12px;color:#b42318;","rte-imageeditor-upload-status");b.setAttribute("role","status"),b.setAttribute("aria-live","polite"),q.onclick=function(){b.innerText="",q.disabled=!0,q.innerText="Saving...";var m=K.toDataURL(),k=u.file_upload_handler||window.rte_file_upload_handler;if(!k){$.src=m,r.notifySelectionChange(),z.close();return}var M=F(m);k(M,function(I,R){if(I){$.src=I,r.notifySelectionChange(),z.close();return}q.disabled=!1,q.innerText="Save",b.innerText=R?"Upload failed: "+R:"The upload did not return a file URL. Please try again."})}},iframe=x(z,"iframe","align-self:center;flex:99;width:100%;height:100%px;border:0px;","rte-editable"),iframe.contentDocument.open("text/html"),iframe.contentDocument.write("<html><head><base href='"+r.htmlEncode(location.href)+"'/><link id='url-css-preview' rel='stylesheet' href='"+r.htmlEncode(o+"tui-color-picker.min.css")+"'/><link id='url-css-preview' rel='stylesheet' href='"+r.htmlEncode(o+"tui-image-editor.min.css")+"'/><script src='"+r.htmlEncode(o+"fabric.min.js")+"'><\/script><script src='"+r.htmlEncode(o+"tui-color-picker.min.js")+"'><\/script><script src='"+r.htmlEncode(o+"tui-code-snippet.min.js")+"'><\/script><script src='"+r.htmlEncode(o+"tui-image-editor.min.js")+"'><\/script></head><body style='padding:10px;margin:0px'><div id='tui-image-editor'></div></body><script>window.onload=function(){setTimeout(function(){parent.rte_image_editor_callback(window)},100)}<\/script></html>"),iframe.contentDocument.close()}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_importstyles=RTE_Plugin_ImportStyles,typeof RTE_DefaultConfig.importStyles>"u"&&(RTE_DefaultConfig.importStyles=!1),typeof RTE_DefaultConfig.importStylesSheets>"u"&&(RTE_DefaultConfig.importStylesSheets=null),typeof RTE_DefaultConfig.importStylesExclude>"u"&&(RTE_DefaultConfig.importStylesExclude=/^(rte[-_]|ck[-_]|cke[-_]|mce[-_]|tox[-_]|js[-_]|is[-_]|has[-_])/i),typeof RTE_DefaultConfig.importStylesFilter>"u"&&(RTE_DefaultConfig.importStylesFilter=null),typeof RTE_DefaultConfig.importStylesReplace>"u"&&(RTE_DefaultConfig.importStylesReplace=!1),typeof RTE_DefaultConfig.importStylesLimit>"u"&&(RTE_DefaultConfig.importStylesLimit=100);function RTE_Plugin_ImportStyles(){var N=this,u,r,x=null,H=[];N.PluginName="ImportStyles",N.InitConfig=function(s){u=s},N.InitEditor=function(s){if(r=s,r.importStyles=function(c){return v(c||{})},r.getImportedStyles=function(){return x},r.scanStylesheetClasses=function(c){b=c||{};try{return l()}finally{b={}}},!!u.importStyles){v({});try{r.attachEvent("ready",function(){v({})})}catch{}setTimeout(function(){v({})},0)}};var F={img:1,figure:1,picture:1},$={a:1},z={span:1,strong:1,b:1,em:1,i:1,code:1,mark:1,small:1,sub:1,sup:1,abbr:1,q:1,cite:1},o={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,blockquote:1,li:1,ul:1,ol:1,pre:1,section:1,article:1,aside:1,figcaption:1,td:1,th:1,table:1},O=[{key:"imageStyles",tags:F},{key:"linkStyles",tags:$},{key:"inlineStyles",tags:z},{key:"paragraphStyles",tags:o}],V=/^([a-zA-Z][\w-]*)?\.([\w-]+)$/;function K(s){var c=String(s).replace(/\[[^\]]*\]/g,"").replace(/::?[\w-]+(\([^)]*\))?/g,"").trim(),p=c.split(/[\s>+~]+/),g=p[p.length-1]||"";if((g.match(/\./g)||[]).length!==1)return null;var h=g.match(V);return h?{tag:(h[1]||"").toLowerCase(),cls:h[2]}:null}function W(s){if(!s)return["inlineStyles","paragraphStyles"];for(var c=0;c<O.length;c++)if(O[c].tags[s])return[O[c].key];return[]}function q(s,c){var p=s.href||"";if(/\/richtexteditor\//i.test(p))return!0;var g=s.ownerNode,h=g&&g.id||"";return!!(/^(rte[-_]|__rte)/i.test(h)||c&&!p)}var b={};function m(s){return b&&s in b?b[s]:u["importStyles"+s.charAt(0).toUpperCase()+s.slice(1)]}function k(s,c){if(q(s,c))return!1;var p=m("sheets");if(!p)return!0;var g=s.href||"";return typeof p=="function"?!!p(s):p instanceof RegExp?p.test(g):g.indexOf(String(p))>=0}function M(s){var c=m("exclude");return c?c instanceof RegExp?c.test(s):typeof c=="function"?!!c(s):s.indexOf(String(c))===0:!1}function I(s,c){if(s)for(var p=0;p<s.length;p++){var g=s[p];if(g.cssRules&&!g.selectorText){I(g.cssRules,c);continue}if(g.selectorText)for(var h=g.selectorText.split(","),L=0;L<h.length;L++){var E=K(h[L]);!E||M(E.cls)||c.push({cls:E.cls,tag:E.tag,selector:h[L].trim()})}}}function R(){var s=[];typeof document<"u"&&s.push({doc:document,editing:!1});try{var c=r.getDocument&&r.getDocument();c&&c!==document&&s.push({doc:c,editing:!0})}catch{}return s}function l(){for(var s=[],c=0,p=R(),g=0;g<p.length;g++)for(var h=p[g].doc.styleSheets||[],L=0;L<h.length;L++){var E=h[L];if(k(E,p[g].editing)){var A=null;try{A=E.cssRules||E.rules}catch{c++;continue}I(A,s)}}return{classes:s,unreadableSheets:c,documents:p.length}}function f(s){var c=String(s).replace(/^(my[-_]cls[-_]|u[-_]|c[-_])/i,"").replace(/[-_]+/g," ").trim();return c||(c=s),c.replace(/\b\w/g,function(p){return p.toUpperCase()})}function _(s,c){for(var p=0;p<s.length;p++)if(s[p]&&s[p][1]===c)return!0;return!1}function v(s){b=s||{};for(var c=l(),p=Math.max(0,parseInt(m("limit"),10)||0)||1/0,g=!!m("replace"),h=m("filter"),L={},E={},A=0;A<O.length;A++)L[O[A].key]=[];for(var C={},y=0;y<c.classes.length;y++)for(var d=c.classes[y],w=W(d.tag),D=0;D<w.length;D++){var P=w[D],B=P+"|"+d.cls;if(!C[B]){var Z=f(d.cls);if(typeof h=="function"){var fe=h(d.cls,d.selector,P);if(fe===!1)continue;typeof fe=="string"&&fe&&(Z=fe)}if(C[B]=!0,L[P].length>=p){E[P]=(E[P]||0)+1;continue}L[P].push([Z,d.cls])}}for(var re={},ie=0;ie<O.length;ie++){var ae=O[ie].key,de=L[ae];if(g)u[ae]=de;else{u[ae]||(u[ae]=[]);for(var se=0;se<de.length;se++)_(u[ae],de[se][1])||u[ae].push(de[se])}re[ae]=de.length}var U=0;for(var Q in E)E.hasOwnProperty(Q)&&(U+=E[Q]);if(U)try{console.warn("[RichTextEditor] importStyles: "+U+" class(es) omitted \u2014 importStylesLimit is "+p+" per dropdown. Raise the limit or narrow importStylesSheets / importStylesFilter.")}catch{}return x={applied:re,truncated:E,droppedCount:U,unreadableSheets:c.unreadableSheets,documentsScanned:c.documents,replaced:!!g},b={},x}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_inlinecode=RTE_Plugin_InlineCode,RTE_DefaultConfig.text_inlinecode||(RTE_DefaultConfig.text_inlinecode="Inline code"),RTE_DefaultConfig.svgCode_inlinecode||(RTE_DefaultConfig.svgCode_inlinecode='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="7 8 3 12 7 16"/><polyline points="17 8 21 12 17 16"/></svg>');function RTE_Plugin_InlineCode(){var N=this,u,r;N.PluginName="InlineCode",N.InitConfig=function(q){u=q},N.InitEditor=function(q){r=q,r.attachEvent("exec_command_inlinecode",function(b){b.returnValue=!0,N.Toggle()}),r.toggleInlineCode=function(){return N.Toggle()},r.isInlineCode=function(){return N.IsActive()}};function x(){try{return r.getDocument()}catch{return null}}function H(){try{return r.getEditable()}catch{return null}}function F(q){var b=q&&q.getSelection?q.getSelection():null;return!b||!b.rangeCount?null:b.getRangeAt(0)}function $(q,b){for(;q&&q!==b;){if(q.nodeType===1&&q.nodeName==="CODE")return q;q=q.parentNode}return null}function z(q,b){for(;q&&q!==b;){if(q.nodeType===1&&q.nodeName==="PRE")return!0;q=q.parentNode}return!1}N.IsActive=function(){var q=x(),b=H();if(!q||!b)return!1;var m=F(q);return m?!!$(m.startContainer,b):!1};function o(q){var b=q.startContainer;if(!b||b.nodeType!==3)return!1;for(var m=b.data||"",k=q.startOffset,M=k,I=k;M>0&&/\S/.test(m.charAt(M-1));)M--;for(;I<m.length&&/\S/.test(m.charAt(I));)I++;return M===I?!1:(q.setStart(b,M),q.setEnd(b,I),!0)}function O(q,b,m){if(b.startContainer.nodeType===3&&b.startOffset>0){var k=b.startContainer;if(b.startOffset<k.data.length){var M=k.splitText(b.startOffset),I=b.endContainer===k,R=b.endOffset;b.setStart(M,0),I&&b.setEnd(M,R-k.data.length)}}b.endContainer.nodeType===3&&b.endOffset<b.endContainer.data.length&&b.endOffset>0&&b.endContainer.splitText(b.endOffset);for(var l=[],f=q.createTreeWalker(m,4,null,!1),_;_=f.nextNode();)if(_.data&&(!b.intersectsNode||b.intersectsNode(_))){var v=q.createRange();v.selectNodeContents(_),b.compareBoundaryPoints(Range.END_TO_START,v)<0&&b.compareBoundaryPoints(Range.START_TO_END,v)>0&&l.push(_)}return l}function V(q,b,m){var k=b.parentNode;if(k){var M=b.contains(m.startContainer),I=b.contains(m.endContainer),R=q.createRange();I?R.setStart(m.endContainer,m.endOffset):R.setStart(b,b.childNodes.length),R.setEnd(b,b.childNodes.length);var l=R.extractContents(),f=q.createRange();f.setStart(b,0),M?f.setEnd(m.startContainer,m.startOffset):f.setEnd(b,0);var _=f.extractContents();if(_&&_.textContent!==""){var v=q.createElement("code");v.appendChild(_),k.insertBefore(v,b)}for(;b.firstChild;)k.insertBefore(b.firstChild,b);if(l&&l.textContent!==""){var s=q.createElement("code");s.appendChild(l),k.insertBefore(s,b)}k.removeChild(b)}}function K(q,b,m){for(var k=[],M=[],I=0;I<b.length;I++){var R=b[I];z(R,m)||$(R,m)||(k.length&&k[k.length-1].parentNode===R.parentNode&&k[k.length-1].nextSibling===R?k.push(R):(k.length&&M.push(k),k=[R]))}k.length&&M.push(k);for(var l=0;l<M.length;l++){for(var f=M[l],_="",v=0;v<f.length;v++)_+=f[v].data;if(/\S/.test(_)){var s=q.createElement("code");f[0].parentNode.insertBefore(s,f[0]);for(var c=0;c<f.length;c++)s.appendChild(f[c])}}}function W(q){for(var b=q.querySelectorAll("code"),m=0;m<b.length;m++)for(var k=b[m],M=k.nextSibling;M&&M.nodeType===1&&M.nodeName==="CODE";){for(;M.firstChild;)k.appendChild(M.firstChild);M.parentNode.removeChild(M),M=k.nextSibling}}N.Toggle=function(){var q=x(),b=H();if(!q||!b)return!1;var m=F(q);if(!m||!b.contains(m.startContainer)||m.collapsed&&!o(m))return!1;var k=O(q,m,b);if(!k.length)return!1;for(var M=!0,I=0;I<k.length;I++)if(/\S/.test(k[I].data)&&!$(k[I],b)){M=!1;break}if(M){for(var R=[],l=[],f=0;f<k.length;f++){var _=$(k[f],b);_&&l.indexOf(_)<0&&(l.push(_),R.push(_))}for(var v=0;v<R.length;v++)V(q,R[v],m)}else K(q,k,b),W(b);try{r.updateToolbarStatus&&r.updateToolbarStatus()}catch{}return!0}}RTE_DefaultConfig.svgCode_insertcode||(RTE_DefaultConfig.svgCode_insertcode='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><polyline points="8 7 3 12 8 17"/><polyline points="16 7 21 12 16 17"/><line x1="14" y1="5" x2="10" y2="19"/></svg>'),RTE_DefaultConfig.plugin_insertcode=RTE_Plugin_InsertCode;function RTE_Plugin_InsertCode(){var N={sh:{Toolbar:{},Utils:{},RegexLib:{},Brushes:{},Version:"1.5.1"}};N.InsertCode=N.sh,N.sh.Utils.CopyStyles=function(F,$){for(var z=$.getElementsByTagName("link"),o=0;o<z.length;o++)z[o].rel.toLowerCase()=="stylesheet"&&F.write('<link type="text/css" rel="stylesheet" href="'+z[o].href+'"></link>')},N.sh.Utils.FixForBlogger=function(F){return N.sh.isBloggerMode==!0?F.replace(/<br\s*\/?>|&lt;br\s*\/?&gt;/gi,`
24
24
  `):F},N.sh.RegexLib={MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"',"g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")},N.sh.Match=function(F,$,z){this.value=F,this.index=$,this.length=F.length,this.css=z},N.sh.Highlighter=function(){this.noGutter=!1,this.addControls=!0,this.collapse=!1,this.tabsToSpaces=!0,this.wrapColumn=80,this.showColumns=!0},N.sh.Highlighter.SortCallback=function(F,$){return F.index<$.index?-1:F.index>$.index?1:F.length<$.length?-1:F.length>$.length?1:0},N.sh.Highlighter.prototype.CreateElement=function(F){var $=document.createElement(F);return $.highlighter=this,$},N.sh.Highlighter.prototype.GetMatches=function(F,$){for(var z=0,o=null;(o=F.exec(this.code))!=null;)this.matches[this.matches.length]=new N.sh.Match(o[0],o.index,$)},N.sh.Highlighter.prototype.AddBit=function(F,$){if(!(F==null||F.length==0)){var z=this.CreateElement("SPAN");if(F=F.replace(/ /g,"&nbsp;"),F=F.replace(/</g,"&lt;"),F=F.replace(/\n/gm,"&nbsp;<br>"),$!=null)if(/br/gi.test(F))for(var o=F.split("&nbsp;<br>"),O=0;O<o.length;O++)z=this.CreateElement("SPAN"),z.className=$,z.innerHTML=o[O],this.div.appendChild(z),O+1<o.length&&this.div.appendChild(this.CreateElement("BR"));else z.className=$,z.innerHTML=F,this.div.appendChild(z);else z.innerHTML=F,this.div.appendChild(z)}},N.sh.Highlighter.prototype.IsInside=function(F){if(F==null||F.length==0)return!1;for(var $=0;$<this.matches.length;$++){var z=this.matches[$];if(z!=null&&F.index>z.index&&F.index<z.index+z.length)return!0}return!1},N.sh.Highlighter.prototype.ProcessRegexList=function(){for(var F=0;F<this.regexList.length;F++)this.GetMatches(this.regexList[F].regex,this.regexList[F].css)},N.sh.Highlighter.prototype.ProcessSmartTabs=function(F){var $=F.split(`
25
25
  `),z="",o=4,O=" ";function V(q,b,m){for(var k=q.substr(0,b),M=q.substr(b+1,q.length),I="",R=0;R<m;R++)I+=" ";return k+I+M}function K(q,b){if(q.indexOf(O)==-1)return q;for(var m=0;(m=q.indexOf(O))!=-1;){var k=b-m%b;q=V(q,m,k)}return q}for(var W=0;W<$.length;W++)z+=K($[W],o)+`
26
26
  `;return z},N.sh.Highlighter.prototype.SwitchToList=function(){var F=this.div.innerHTML.replace(/<(br)\/?>/gi,`
@@ -67,10 +67,10 @@ endstream
67
67
  `),(b.head||b.getElementsByTagName("head")[0]).appendChild(m),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(b,m,"__rte_restrictedediting_styles",m.textContent)}}}function z(){var q=F();if(!q)return!1;x=!0,q.classList.add("rte-restricted");for(var b=0;b<q.children.length;b++){var m=q.children[b];m.querySelector("["+H+"='true']")?(m.setAttribute("contenteditable","true"),m.setAttribute(H+"-wrapper","true")):m.setAttribute("contenteditable","false")}return q.setAttribute("contenteditable","false"),$(),!0}function o(){var q=F();if(!q)return!1;x=!1,q.classList.remove("rte-restricted");for(var b=q.querySelectorAll("[contenteditable]"),m=0;m<b.length;m++)b[m].removeAttribute("contenteditable"),b[m].removeAttribute(H+"-wrapper");return q.setAttribute("contenteditable","true"),!0}function O(q){q=q||{};var b=F();if(!b)return null;var m=b.ownerDocument,k=m.getSelection();if(!k||k.rangeCount===0)return null;var M=k.getRangeAt(0);if(M.collapsed)return null;var I=m.createElement("span");I.setAttribute(H,"true"),q.label&&I.setAttribute("aria-label",q.label);try{M.surroundContents(I)}catch{var R=M.extractContents();I.appendChild(R),M.insertNode(I)}var l=m.createRange();return l.selectNodeContents(I),k.removeAllRanges(),k.addRange(l),$(),x&&z(),I}function V(q){if(q=q||(function(){var m=F(),k=m&&m.ownerDocument.getSelection();if(!k||k.rangeCount===0)return null;for(var M=k.anchorNode;M&&M!==m;){if(M.nodeType===1&&M.getAttribute&&M.getAttribute(H)==="true")return M;M=M.parentNode}return null})(),!q)return!1;for(var b=q.parentNode;q.firstChild;)b.insertBefore(q.firstChild,q);return b.removeChild(q),x&&z(),!0}function K(){var q=F();return q?Array.prototype.slice.call(q.querySelectorAll("["+H+"='true']")):[]}function W(q){var b=K();if(b.length===0)return null;var m=F(),k=m&&m.ownerDocument.getSelection(),M=null;if(k&&k.anchorNode)for(var I=k.anchorNode;I&&I!==m;){if(I.nodeType===1&&I.getAttribute&&I.getAttribute(H)==="true"){M=I;break}I=I.parentNode}var R=M?b.indexOf(M):-1,l=b[(R+q+b.length)%b.length];if(!l)return null;var f=m.ownerDocument.createRange();return f.selectNodeContents(l),f.collapse(!1),k.removeAllRanges(),k.addRange(f),l.scrollIntoView({block:"center",behavior:"smooth"}),l}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.svgCode_revisionhistory||(RTE_DefaultConfig.svgCode_revisionhistory='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 3-6.7"/><path d="M3 4v5h5"/><path d="M12 8v4l3 2"/></svg>'),RTE_DefaultConfig.plugin_revisionhistory=RTE_Plugin_RevisionHistory;function RTE_Plugin_RevisionHistory(){var N=this,u,r,x=null,H=null,F="";N.PluginName="RevisionHistory",N.InitConfig=function(d){u=d,u.revisionHistoryEnabled!==!1&&(u.revisionHistoryMaxEntries=u.revisionHistoryMaxEntries||50,u.revisionHistoryAutoSnapshotMs=u.revisionHistoryAutoSnapshotMs||0,u.revisionHistoryUrl=u.revisionHistoryUrl||"",u.revisionHistoryRequestHeaders=u.revisionHistoryRequestHeaders||null,u.onRevisionHistorySyncError=u.onRevisionHistorySyncError||null,u.text_revisionhistory=u.text_revisionhistory||"Revision history",$("toolbar_default","#{revisionhistory}"),$("toolbar_full","#{revisionhistory}"),$("toolbar_mobile","#{revisionhistory}"),(u.controltoolbar_TEXT||"").indexOf("revisionhistory")===-1&&(u.controltoolbar_TEXT=(u.controltoolbar_TEXT||"")+"|{revisionhistory}"))},N.InitEditor=function(d){r=d,u.revisionHistoryEnabled!==!1&&(r.revisionHistory={snapshot:function(w,D){return k(w,D)},promptAndSnapshot:function(w){return M(w)},rename:function(w,D){return I(w,D)},list:function(){return O().slice().sort(function(w,D){return(D.createdAt||0)-(w.createdAt||0)})},listNamed:function(){return O().slice().filter(function(w){return w.isNamed===!0}).sort(function(w,D){return(D.createdAt||0)-(w.createdAt||0)})},get:function(w){return V(w)},restore:function(w,D){return f(w,D||{})},delete:function(w){return _(w)},clear:function(){return v()},diff:function(w,D){return R(w,D)},openBrowser:function(){g()},closeBrowser:function(){h()}},r.toolbarFactoryMap=r.toolbarFactoryMap||{},r.toolbarFactoryMap.revisionhistory=function(w){return r.createToolbarButton(w)},r.attachEvent("exec_command_revisionhistory",function(w){w.returnValue=!0,w.stopBubble=!0,g()}),y(),m(),F=r.getHTML?r.getHTML():"",u.revisionHistoryAutoSnapshotMs>0&&r.getDocument().addEventListener("input",function(){H&&clearTimeout(H),H=setTimeout(function(){var w=r.getHTML();w!==F&&k("Auto",{auto:!0})},u.revisionHistoryAutoSnapshotMs)},!0),r.getDocument().addEventListener("keydown",function(w){(w.ctrlKey||w.metaKey)&&w.shiftKey&&(w.key==="H"||w.key==="h")&&(w.preventDefault(),g())},!0))};function $(d,w){u[d]&&u[d].indexOf(w)===-1&&(u[d]=u[d]+w)}function z(){return u.currentUser&&u.currentUser.id?u.currentUser:{id:"user",name:"User",color:"#64748b"}}function o(){var d=u.aiToolkitPersistenceKey||"default";return"RTE.Revisions."+d}function O(){return r.__revisions||(r.__revisions=[]),r.__revisions}function V(d){for(var w=O(),D=0;D<w.length;D++)if(w[D].id===d)return w[D];return null}function K(){for(var d=O();d.length>u.revisionHistoryMaxEntries;)d.shift();try{window.localStorage&&window.localStorage.setItem(o(),JSON.stringify(d))}catch(w){console.warn("revisionhistory: localStorage quota or access issue:",w&&w.message)}u.revisionHistoryUrl&&W(d)}function W(d){try{var w=new XMLHttpRequest;w.open("POST",u.revisionHistoryUrl,!0),w.setRequestHeader("Content-Type","application/json");var D=q();for(var P in D)if(Object.prototype.hasOwnProperty.call(D,P)&&/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/.test(P)){var B=String(D[P]);if(!/\r|\n/.test(B))try{w.setRequestHeader(P,B)}catch{}}w.onerror=function(){b({reason:"network",status:w.status||0})},w.onload=function(){(w.status<200||w.status>=300)&&b({reason:"http",status:w.status,responseText:(w.responseText||"").slice(0,512)})},w.send(JSON.stringify({documentKey:u.aiToolkitPersistenceKey||"",savedAt:Date.now(),revisions:d}))}catch(Z){b({reason:"exception",error:Z})}}function q(){var d=u.revisionHistoryRequestHeaders;if(typeof d=="function")try{d=d(r)}catch(w){return b({reason:"header-provider",error:w}),{}}return d&&typeof d=="object"?d:{}}function b(d){console.warn("revisionhistory: remote persistence failed:",d&&d.reason,d&&d.status);try{typeof u.onRevisionHistorySyncError=="function"&&u.onRevisionHistorySyncError(d)}catch{}try{typeof r.fireEvent=="function"&&r.fireEvent("revision_history_sync_error",d)}catch{}}function m(){try{if(!window.localStorage)return;var d=window.localStorage.getItem(o());if(!d)return;var w=JSON.parse(d);Array.isArray(w)&&(r.__revisions=w)}catch{}}function k(d,w){var D=r.getHTML?r.getHTML():r.getHTMLCode?r.getHTMLCode():"",P=z(),B=(d||"").toString().slice(0,120),Z=B.length>0&&(!w||w.auto!==!0),fe={id:"rev-"+Date.now()+"-"+Math.floor(Math.random()*1e4),html:D,text:r.getText?r.getText():p(D),label:B||l(),isNamed:Z,author:{id:P.id,name:P.name,color:P.color},createdAt:Date.now(),metadata:w||{}};O().push(fe),F=D,K(),x&&x.isConnected&&A();try{typeof r.fireEvent=="function"&&r.fireEvent("revision_snapshot",{id:fe.id,label:fe.label,isNamed:fe.isNamed,createdAt:fe.createdAt})}catch{}return fe}function M(d){var w=r.iframe?r.iframe.ownerDocument:document,D=w.defaultView||window,P=D.prompt('Name this version (e.g. "Draft sent to legal"):',d||"");if(P===null)return null;var B=(P||"").trim();return B?k(B,{user:!0}):null}function I(d,w){var D=V(d);if(!D)return!1;var P=(w||"").toString().trim().slice(0,120);return P?(D.label=P,D.isNamed=!0,K(),x&&x.isConnected&&A(),!0):!1}function R(d,w){var D=V(d),P=V(w);if(!D||!P)return null;var B=D.text||p(D.html),Z=P.text||p(P.html);return{oldEntry:D,newEntry:P,oldText:B,newText:Z,lines:s(B,Z)}}function l(){var d=new Date;function w(D){return D<10?"0"+D:""+D}return w(d.getHours())+":"+w(d.getMinutes())+":"+w(d.getSeconds())}function f(d,w){w=w||{};var D=V(d);if(!D)return!1;if(!w.skipConfirm){var P=r.iframe?r.iframe.ownerDocument:document;if(!P.defaultView.confirm("Restore this version? Your current content will be replaced (this itself is not auto-snapshotted)."))return!1}return r.setHTMLCode?r.setHTMLCode(D.html):r.setHTML&&r.setHTML(D.html),F=D.html,x&&x.isConnected&&h(),!0}function _(d){for(var w=O(),D=0;D<w.length;D++)if(w[D].id===d)return w.splice(D,1),K(),x&&x.isConnected&&A(),!0;return!1}function v(){r.__revisions=[],K(),x&&x.isConnected&&A()}function s(d,w){for(var D=String(d||"").split(/\r?\n/),P=String(w||"").split(/\r?\n/),B=[],Z=c(D,P),fe=0,re=0,ie=0;fe<D.length&&re<P.length;)ie<Z.length&&D[fe]===Z[ie]&&P[re]===Z[ie]?(B.push({type:"eq",text:D[fe]}),fe++,re++,ie++):ie<Z.length&&D[fe]!==Z[ie]?(B.push({type:"del",text:D[fe]}),fe++):ie<Z.length&&P[re]!==Z[ie]?(B.push({type:"add",text:P[re]}),re++):fe<D.length?(B.push({type:"del",text:D[fe]}),fe++):re<P.length&&(B.push({type:"add",text:P[re]}),re++);for(;fe<D.length;)B.push({type:"del",text:D[fe]}),fe++;for(;re<P.length;)B.push({type:"add",text:P[re]}),re++;return B}function c(d,w){for(var D=d.length,P=w.length,B=new Array(P+1).fill(0),Z=new Array(P+1).fill(0),fe=[],ie=0;ie<=D;ie++)fe.push(new Array(P+1).fill(0));for(var ie=1;ie<=D;ie++)for(var ae=1;ae<=P;ae++)d[ie-1]===w[ae-1]?fe[ie][ae]=fe[ie-1][ae-1]+1:fe[ie][ae]=Math.max(fe[ie-1][ae],fe[ie][ae-1]);for(var re=[],ie=D,ae=P;ie>0&&ae>0;)d[ie-1]===w[ae-1]?(re.unshift(d[ie-1]),ie--,ae--):fe[ie-1][ae]>=fe[ie][ae-1]?ie--:ae--;return re}function p(d){var w=document.createElement("div");return w.innerHTML=d||"",w.innerText||w.textContent||""}function g(){if(!(x&&x.isConnected)&&!(!r||!r.iframe||!r.iframe.ownerDocument)){x&&!x.isConnected&&(x=null);var d=r.iframe.ownerDocument;if(!(!d||!d.body)){x=d.createElement("div");var w=!1;try{var D=r.container||r.getEditable&&r.getEditable().closest&&r.getEditable().closest(".richtexteditor");w=!!(D&&D.classList&&D.classList.contains("rte-dark"))}catch{}x.className="rte-rev-dialog"+(w?" rte-rev-dark":""),x.setAttribute("role","dialog"),x.setAttribute("aria-modal","true"),x.setAttribute("aria-labelledby","rte-rev-dialog-title");var P=d.createElement("div");P.className="rte-rev-backdrop",P.addEventListener("mousedown",function(Z){Z.target===P&&h()});var B=d.createElement("div");B.className="rte-rev-panel",P.appendChild(B),x.appendChild(P),d.body.appendChild(x),A()}}}function h(){x&&x.parentNode&&x.parentNode.removeChild(x),x=null}var L=null,E="preview";function A(){if(x){var d=x.ownerDocument,w=x.querySelector(".rte-rev-panel");if(!w){h();return}w.innerHTML="";var D=d.createElement("div");D.className="rte-rev-header";var P=d.createElement("div");P.id="rte-rev-dialog-title",P.className="rte-rev-title",P.textContent="Revision history",D.appendChild(P);var B=d.createElement("div");B.className="rte-rev-header-actions";var Z=d.createElement("button");Z.type="button",Z.className="rte-rev-btn rte-rev-btn-ghost",Z.textContent="Save version now",Z.addEventListener("mousedown",function(Le){Le.preventDefault();var qe=d.defaultView.prompt("Label this version (optional):","");qe!==null&&k(qe||"")}),B.appendChild(Z);var fe=d.createElement("button");fe.type="button",fe.className="rte-rev-btn rte-rev-btn-ghost",fe.textContent="Close",fe.setAttribute("aria-label","Close revision history"),fe.addEventListener("mousedown",function(Le){Le.preventDefault(),h()}),B.appendChild(fe),D.appendChild(B),w.appendChild(D);var re=d.createElement("div");re.className="rte-rev-body";var ie=d.createElement("div");ie.className="rte-rev-list",ie.setAttribute("role","listbox"),ie.setAttribute("aria-label","Saved revisions");var ae=r.revisionHistory.list();if(ae.length){(!L||!V(L))&&(L=ae[0].id);for(var se=0;se<ae.length;se++)(function(Le){var qe=d.createElement("button");qe.type="button",qe.className="rte-rev-row"+(Le.id===L?" rte-rev-row-active":""),qe.setAttribute("role","option"),qe.setAttribute("aria-selected",Le.id===L?"true":"false");var Re=d.createElement("span");Re.className="rte-rev-dot",Re.style.background=Le.author&&Le.author.color||"#64748b";var Ie=d.createElement("div");Ie.className="rte-rev-row-who",Ie.textContent=Le.author&&Le.author.name||"User";var Ve=d.createElement("div");Ve.className="rte-rev-row-when",Ve.textContent=C(Le.createdAt)+" \xB7 "+(Le.label||"");var Ye=d.createElement("div");Ye.className="rte-rev-row-col",Ye.appendChild(Ie),Ye.appendChild(Ve),qe.appendChild(Re),qe.appendChild(Ye),qe.addEventListener("mousedown",function(ft){ft.preventDefault(),L=Le.id,A()}),ie.appendChild(qe)})(ae[se])}else{var de=d.createElement("div");de.className="rte-rev-empty",de.textContent='No revisions yet. Click "Save version now" to capture the current document.',ie.appendChild(de)}re.appendChild(ie);var U=d.createElement("div");if(U.className="rte-rev-pane",ae.length){var Q=V(L)||ae[0],j=d.createElement("div");j.className="rte-rev-tabs",j.setAttribute("role","tablist"),j.setAttribute("aria-label","Revision view");var J=d.createElement("button");J.type="button",J.className="rte-rev-tab"+(E==="preview"?" rte-rev-tab-active":""),J.setAttribute("role","tab"),J.setAttribute("aria-selected",E==="preview"?"true":"false"),J.textContent="Preview",J.addEventListener("mousedown",function(Le){Le.preventDefault(),E="preview",A()});var Y=d.createElement("button");Y.type="button",Y.className="rte-rev-tab"+(E==="diff"?" rte-rev-tab-active":""),Y.setAttribute("role","tab"),Y.setAttribute("aria-selected",E==="diff"?"true":"false"),Y.textContent="Diff vs current",Y.addEventListener("mousedown",function(Le){Le.preventDefault(),E="diff",A()}),j.appendChild(J),j.appendChild(Y),U.appendChild(j);var te=d.createElement("div");if(te.className="rte-rev-content",E==="preview"){var le=d.createElement("iframe");le.className="rte-rev-preview-frame",le.setAttribute("title","Revision preview"),le.setAttribute("sandbox","allow-same-origin"),te.appendChild(le),setTimeout(function(){try{le.contentDocument.open(),le.contentDocument.write('<!DOCTYPE html><html><head><meta charset="utf-8"><style>body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;padding:16px;color:#0f172a;line-height:1.6}img{max-width:100%}</style></head><body>'+(Q.html||"")+"</body></html>"),le.contentDocument.close()}catch{}},0)}else{var pe=r.getText?r.getText():p(r.getHTML()),ye=s(Q.text||p(Q.html),pe),me=d.createElement("pre");me.className="rte-rev-diff";for(var ee=0;ee<ye.length;ee++){var ue=d.createElement("span");ue.className="rte-rev-diff-line rte-rev-diff-"+ye[ee].type,ue.textContent=(ye[ee].type==="add"?"+ ":ye[ee].type==="del"?"- ":" ")+ye[ee].text+`
68
68
  `,me.appendChild(ue)}te.appendChild(me)}U.appendChild(te);var ce=d.createElement("div");ce.className="rte-rev-footer";var ve=d.createElement("div");ve.className="rte-rev-footer-info",ve.textContent=Q.label?"Label: "+Q.label:"";var be=d.createElement("div");be.className="rte-rev-footer-btns";var ke=d.createElement("button");ke.type="button",ke.className="rte-rev-btn rte-rev-btn-danger",ke.textContent="Delete",ke.addEventListener("mousedown",function(Le){Le.preventDefault(),_(Q.id)});var Pe=d.createElement("button");Pe.type="button",Pe.className="rte-rev-btn rte-rev-btn-primary",Pe.textContent="Restore this version",Pe.addEventListener("mousedown",function(Le){Le.preventDefault()}),Pe.addEventListener("click",function(Le){Le.preventDefault(),f(Q.id)}),be.appendChild(ke),be.appendChild(Pe),ce.appendChild(ve),ce.appendChild(be),U.appendChild(ce)}re.appendChild(U),w.appendChild(re)}}function C(d){if(!d)return"";var w=new Date(d),D=new Date;function P(Z){return Z<10?"0"+Z:""+Z}var B=P(w.getHours())+":"+P(w.getMinutes());return w.toDateString()===D.toDateString()?"Today "+B:w.getFullYear()+"-"+P(w.getMonth()+1)+"-"+P(w.getDate())+" "+B}function y(){var d=r&&r.iframe&&r.iframe.ownerDocument||document;if(!d.querySelector("style[data-rte-revisionhistory]")){var w=d.createElement("style");w.setAttribute("data-rte-revisionhistory","1"),w.textContent=[".rte-rev-dialog{position:fixed;inset:0;z-index:2147483600;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;font-size:13px;color:#172033}",".rte-rev-backdrop{position:absolute;inset:0;background:linear-gradient(135deg,rgba(12,18,32,.44),rgba(40,54,77,.26));display:flex;align-items:center;justify-content:center;padding:18px}","/* 2026-07-12 revision dialog precision */",".rte-rev-panel{background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);border:1px solid rgba(117,137,163,.28);border-radius:8px;width:min(960px,calc(100vw - 28px));max-height:min(82vh,740px);display:flex;flex-direction:column;box-shadow:0 16px 40px rgba(35,48,72,.18);overflow:hidden}",".rte-rev-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid rgba(117,137,163,.18);background:rgba(255,255,255,.72)}",".rte-rev-title{font-size:16px;font-weight:760;letter-spacing:-.01em;color:#172033}",".rte-rev-header-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}",".rte-rev-btn{padding:8px 12px;border-radius:7px;border:1px solid rgba(116,135,162,.25);font:inherit;font-size:12px;font-weight:680;line-height:1;cursor:pointer;background:#fff;color:#223652;box-shadow:0 1px 2px rgba(32,45,66,.06);transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,transform .14s ease}",".rte-rev-btn:hover{background:#f5f8fc;border-color:rgba(81,111,151,.42);box-shadow:0 5px 14px rgba(32,45,66,.09);transform:translateY(-1px)}",".rte-rev-btn:focus-visible{outline:2px solid rgba(56,122,255,.34);outline-offset:2px}",".rte-rev-btn-ghost{background:#fff;color:#34506f}",".rte-rev-btn-primary{background:linear-gradient(135deg,#2563eb,#1d67ba);color:#fff;border-color:rgba(29,103,186,.85);box-shadow:0 8px 18px rgba(37,99,235,.22)}",".rte-rev-btn-primary:hover{background:linear-gradient(135deg,#1d4ed8,#195fad);color:#fff;border-color:rgba(29,78,216,.9);box-shadow:0 9px 20px rgba(37,99,235,.28)}",".rte-rev-btn-danger{background:#fff5f5;color:#9f1d1d;border-color:rgba(190,45,45,.22)}",".rte-rev-body{display:flex;flex:1;min-height:0;background:linear-gradient(90deg,#f8fbff 0%,#fff 42%)}",".rte-rev-list{width:258px;flex:0 0 258px;border-right:1px solid rgba(117,137,163,.18);overflow-y:auto;background:rgba(244,248,253,.78);padding:10px}",".rte-rev-empty{padding:16px;border:1px dashed rgba(99,118,145,.28);border-radius:8px;background:#fff;color:#5b6c81;font-size:12px;line-height:1.5}",".rte-rev-row{display:flex;align-items:center;gap:10px;width:100%;padding:10px;border:1px solid transparent;border-radius:8px;background:transparent;text-align:left;cursor:pointer;font:inherit;color:inherit}",".rte-rev-row:hover{background:#fff;border-color:rgba(93,122,161,.24);box-shadow:0 8px 18px rgba(33,48,70,.08)}",".rte-rev-row-active{background:#eef6ff;border-color:rgba(37,99,235,.28);box-shadow:0 8px 22px rgba(37,99,235,.12)}",".rte-rev-dot{width:9px;height:9px;border-radius:50%;flex:0 0 9px;box-shadow:0 0 0 3px rgba(255,255,255,.95),0 0 0 4px rgba(96,116,140,.18)}",".rte-rev-row-col{flex:1;min-width:0}",".rte-rev-row-who{font-weight:720;font-size:12px;line-height:1.25;color:#172033}",".rte-rev-row-when{margin-top:2px;font-size:11px;color:#637487;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",".rte-rev-pane{flex:1;display:flex;flex-direction:column;min-width:0;padding:10px}",".rte-rev-tabs{display:flex;align-self:flex-start;gap:3px;padding:3px;margin:0 0 10px;border:1px solid rgba(117,137,163,.2);border-radius:7px;background:#eef3f8}",".rte-rev-tab{padding:7px 12px;border:0;border-radius:6px;background:transparent;font:inherit;font-size:12px;font-weight:680;color:#637487;cursor:pointer}",".rte-rev-tab:hover{color:#1d3557;background:rgba(255,255,255,.58)}",".rte-rev-tab:focus-visible{outline:2px solid rgba(56,122,255,.34);outline-offset:2px}",".rte-rev-tab-active{color:#163966;background:#fff;box-shadow:0 2px 7px rgba(35,48,72,.08)}",".rte-rev-content{flex:1;overflow:auto;padding:0;border:1px solid rgba(117,137,163,.18);border-radius:8px;background:#fff;min-height:300px}",".rte-rev-preview-frame{width:100%;height:100%;min-height:330px;border:0;display:block;background:#fff}",".rte-rev-diff{margin:0;padding:14px 16px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.55;white-space:pre-wrap;color:#172033;background:#fbfdff;min-height:100%}",".rte-rev-diff-line{display:block}",".rte-rev-diff-add{background:#e8f8ef;color:#17633f}",".rte-rev-diff-del{background:#fff0f0;color:#9f1d1d}",".rte-rev-diff-eq{color:#556575}",".rte-rev-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0 0;background:transparent}",".rte-rev-footer-info{font-size:12px;color:#637487;min-height:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",".rte-rev-footer-btns{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}","@media(max-width:720px){.rte-rev-backdrop{padding:10px;align-items:flex-start}.rte-rev-panel{width:calc(100vw - 20px);max-height:calc(100vh - 20px);border-radius:8px}.rte-rev-header{align-items:flex-start;flex-direction:column}.rte-rev-body{flex-direction:column}.rte-rev-list{width:auto;flex:0 0 auto;max-height:178px;border-right:0;border-bottom:1px solid rgba(117,137,163,.18)}.rte-rev-pane{min-height:360px}.rte-rev-footer{align-items:stretch;flex-direction:column}.rte-rev-footer-info{white-space:normal}.rte-rev-footer-btns{justify-content:stretch}.rte-rev-footer-btns .rte-rev-btn{flex:1}}",".rte-rev-dark{color:#e2e8f0}",".rte-rev-dark .rte-rev-panel{background:linear-gradient(180deg,#1e293b,#0f172a);border-color:#334155}",".rte-rev-dark .rte-rev-header{background:rgba(30,41,59,.72);border-color:#334155}",".rte-rev-dark .rte-rev-title,.rte-rev-dark .rte-rev-row-who{color:#e2e8f0}",".rte-rev-dark .rte-rev-btn,.rte-rev-dark .rte-rev-btn-ghost{background:#0f172a;color:#cbd5e1;border-color:#334155}",".rte-rev-dark .rte-rev-btn:hover{background:#334155}",".rte-rev-dark .rte-rev-btn-primary,.rte-rev-dark .rte-rev-btn-primary:hover{background:linear-gradient(135deg,#2563eb,#1d4ed8);color:#fff;border-color:#3b82f6}",".rte-rev-dark .rte-rev-body{background:#0f172a}",".rte-rev-dark .rte-rev-list{background:rgba(15,23,42,.6);border-color:#334155}",".rte-rev-dark .rte-rev-empty{background:#1e293b;color:#94a3b8;border-color:#334155}",".rte-rev-dark .rte-rev-row:hover{background:#1e293b;border-color:#334155}",".rte-rev-dark .rte-rev-row-active{background:#1e3a8a;border-color:#3b82f6}",".rte-rev-dark .rte-rev-row-when,.rte-rev-dark .rte-rev-footer-info{color:#94a3b8}",".rte-rev-dark .rte-rev-tabs{background:#1e293b;border-color:#334155}",".rte-rev-dark .rte-rev-tab{color:#94a3b8}.rte-rev-dark .rte-rev-tab-active{color:#fff;background:#1d4ed8}",".rte-rev-dark .rte-rev-diff{background:#0f172a;color:#cbd5e1}.rte-rev-dark .rte-rev-diff-eq{color:#94a3b8}",".rte-rev-dark .rte-rev-diff-add{background:rgba(16,185,129,.16);color:#6ee7b7}",".rte-rev-dark .rte-rev-diff-del{background:rgba(244,63,94,.16);color:#fda4af}"].join(`
69
69
  `),d.head.appendChild(w),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(d,w,"rte-revisionhistory-style",w.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_rtlui=RTE_Plugin_RtlUi,typeof RTE_DefaultConfig.rtlUserInterface>"u"&&(RTE_DefaultConfig.rtlUserInterface="auto");function RTE_Plugin_RtlUi(){var N=this,u,r,x=!1;N.PluginName="RtlUi",N.InitConfig=function(V){u=V},N.InitEditor=function(V){r=V,r.attachEvent("exec_command_rtlui",function(K){K.returnValue=!0,N.Toggle()}),H();try{r.attachEvent("ready",H)}catch{}try{r.attachEvent("aftersethtml",H)}catch{}setTimeout(H,0),r.setRtlUserInterface=function(K){return z(!!K)},r.toggleRtlUserInterface=function(){return z(!x)},r.isRtlUserInterface=function(){return x},r.getRtlUiCss=function(){return o()}},N.Toggle=function(){return z(!x)};function H(){O(),u.rtlUserInterface===!0?z(!0):u.rtlUserInterface===!1?z(!1):z(F())}function F(){try{if(typeof r.getBaseDirection=="function"&&r.getBaseDirection()==="rtl")return!0;var V=r.getEditable();if(V){var K=V.ownerDocument,W=K&&(K.defaultView||K.parentWindow);if(W&&W.getComputedStyle(V).direction==="rtl")return!0}}catch{}return!1}function $(){try{var V=r.getEditable();if(!V)return null;for(var K=V.ownerDocument.defaultView,W=K&&K.frameElement?K.frameElement:V;W&&W.classList&&!W.classList.contains("richtexteditor");)W=W.parentNode;return W&&W.classList?W:null}catch{return null}}function z(V){var K=$();return K&&(V?K.setAttribute("dir","rtl"):K.removeAttribute("dir"),x=!!V),x}function o(){return['.richtexteditor[dir="rtl"]{direction:rtl;}','.richtexteditor[dir="rtl"] rte-dropdown,','.richtexteditor[dir="rtl"] rte-submenu,','.richtexteditor[dir="rtl"] rte-floatpanel{direction:rtl;text-align:right;}','.richtexteditor[dir="rtl"] rte-menuitem{flex-direction:row-reverse;}','.richtexteditor[dir="rtl"] rte-menutext{margin-left:0;margin-right:3px;}','.richtexteditor[dir="rtl"] rte-menuarrow{margin-right:0;margin-left:4px;}','.richtexteditor[dir="rtl"] rte-ribbon-group-right{margin-left:2px;margin-right:5px;}','.richtexteditor[dir="rtl"] rte-toolbar-arrowbutton{padding-right:0;padding-left:12px;}','.richtexteditor[dir="rtl"] rte-toolbar-dropdown-input{padding-left:0;padding-right:3px;}','.richtexteditor[dir="rtl"] rte-dialog-line-target rte-dialog-input-label{padding-left:0;padding-right:20px;}','.richtexteditor[dir="rtl"] .rte-find-replace-all{margin-left:0;margin-right:auto;}','.richtexteditor[dir="rtl"] .rte-gallery-browser-footer-text{margin-right:0;margin-left:auto;}','.richtexteditor[dir="rtl"] rte-bottom,','.richtexteditor[dir="rtl"] rte-taglist,','.richtexteditor[dir="rtl"] rte-textcounter{direction:rtl;}','.richtexteditor[dir="rtl"] rte-resizecorner{transform:scaleX(-1);}','.richtexteditor[dir="rtl"] [class*="indent"] svg,','.richtexteditor[dir="rtl"] [class*="outdent"] svg,','.richtexteditor[dir="rtl"] rte-menuarrow svg{transform:scaleX(-1);}'].join(`
70
- `)}function O(){var V=document;if(!V.getElementById("rte-rtl-ui-styles")){var K=V.createElement("style");K.id="rte-rtl-ui-styles",K.appendChild(V.createTextNode(o())),(V.head||V.documentElement).appendChild(K),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(V,K,"rte-rtl-ui-styles",K.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_rubyannotation=RTE_Plugin_RubyAnnotation;function RTE_Plugin_RubyAnnotation(){var N=this,u,r;N.PluginName="RubyAnnotation",N.InitConfig=function(k){u=k,u.rubyAnnotationEnabled!==!1&&(typeof u.rubyAnnotationParentheses!="boolean"&&(u.rubyAnnotationParentheses=!0),x("toolbar_full","#{rubyannotation}"),H("subtoolbar_more","rubyannotation"))},N.InitEditor=function(k){r=k,u.rubyAnnotationEnabled!==!1&&(r.ruby={add:function(M){return q(M)},get:function(){var M=o();return M?O(M):null},isRuby:function(){return!!o()},open:function(){N.OpenRubyDialog()},remove:function(){return b()}},F(),r.toolbarFactoryMap=r.toolbarFactoryMap||{},r.toolbarFactoryMap.rubyannotation=function(M){return r.createToolbarButton(M)},r.attachEvent("exec_command_rubyannotation",function(M){M.returnValue=!0,M.stopBubble=!0,N.OpenRubyDialog()}))};function x(k,M){u[k]&&u[k].indexOf(M)===-1&&(u[k]=u[k]+M)}function H(k,M){var I=u[k];if(!(!I||I.indexOf(M)!==-1)){var R=I.indexOf("}");R!==-1&&(u[k]=I.substring(0,R)+","+M+I.substring(R))}}function F(){var k=u.container.ownerDocument;if(!k.getElementById("rte-ruby-style")){var M=k.createElement("style");M.id="rte-ruby-style",M.innerHTML=[".rte-ruby-annotated{ruby-position:over;}",".rte-ruby-annotated>rt{font-size:.55em;line-height:1.15;opacity:.85;user-select:none;}","@supports (display:ruby){.rte-ruby-annotated>rp{display:none;}}"].join(""),k.head.appendChild(M)}}function $(){return r&&r.getEditable?r.getEditable():null}function z(){var k=r.getDocument();try{var M=k.getSelection();return!M||!M.rangeCount?null:M.getRangeAt(0)}catch{return null}}function o(){var k=z(),M=$();if(!k||!M)return null;for(var I=k.startContainer;I&&I!==M;){if(I.nodeType===1&&I.nodeName==="RUBY")return I;I=I.parentNode}return null}function O(k){var M=k.querySelector("rt");return M&&M.textContent||""}function V(k){for(var M="",I=0;I<k.childNodes.length;I++){var R=k.childNodes[I];R.nodeType===3?M+=R.nodeValue:R.nodeType===1&&R.nodeName!=="RT"&&R.nodeName!=="RP"&&(M+=R.textContent||"")}return M}function K(k){return String(k??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function W(k,M){var I=u.rubyAnnotationParentheses;return'<ruby class="rte-ruby-annotated">'+K(k)+(I?"<rp>(</rp>":"")+"<rt>"+K(M)+"</rt>"+(I?"<rp>)</rp>":"")+"</ruby>"}function q(k){var M=o();if(M){var I=M.querySelector("rt");return I||(I=M.ownerDocument.createElement("rt"),M.appendChild(I)),I.textContent=String(k??""),r.focus(),M}var R=z();if(!R||R.collapsed)return null;var l=String(R.toString()||"");return l?(r.insertHTML(W(l,k)),r.focus(),!0):null}function b(){var k=o();if(!k)return!1;var M=k.ownerDocument,I=M.createTextNode(V(k));return k.parentNode.insertBefore(I,k),k.parentNode.removeChild(k),r.focus(),!0}function m(k,M,I,R){var l=k.ownerDocument.createElement(M);return I&&(l.style.cssText=I),R&&(l.className=R),k.appendChild(l),l}N.OpenRubyDialog=function(){var k=o(),M=z(),I=k?V(k):M?String(M.toString()||""):"",R=r.createDialog(r.getLangText&&r.getLangText("rubyannotationtitle")||"Ruby annotation","rte-dialog-ruby"),l=typeof R.close=="function"?function(){R.close()}:function(){r.closeCurrentPopup()},f=m(R,"div","padding:14px;min-width:340px;font:13px -apple-system,Segoe UI,sans-serif");m(f,"div","font-weight:600;margin-bottom:4px").innerText="Base text";var _=m(f,"div","padding:8px 10px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;min-height:20px;word-break:break-word");_.textContent=I,m(f,"div","font-weight:600;margin:10px 0 4px").innerText="Reading";var v=m(f,"input","width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;font:13px inherit");v.type="text",v.value=k?O(k):"",v.placeholder="e.g. \u304B\u3093\u3058";var s=m(f,"div","font-size:11px;color:#94a3b8;margin-top:6px");s.innerText=I?"Shown above the base text. Parentheses are emitted for readers without ruby support.":"Select the text to annotate first, then reopen this dialog.";var c=m(f,"div","display:flex;justify-content:space-between;gap:8px;margin-top:14px"),p=m(c,"div","display:flex;gap:8px");if(k){var g=m(p,"button","padding:6px 14px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#b91c1c;cursor:pointer");g.type="button",g.textContent="Remove",g.onclick=function(){b(),l()}}var h=m(c,"div","display:flex;gap:8px"),L=m(h,"button","padding:6px 14px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;cursor:pointer");L.type="button",L.textContent="Cancel",L.onclick=l;var E=m(h,"button","padding:6px 14px;border:1px solid #1d67ba;border-radius:8px;background:#1d67ba;color:#fff;cursor:pointer");E.type="button",E.textContent=k?"Update":"Add",E.disabled=!I,E.onclick=function(){var A=v.value.trim();if(!A||!I){l();return}q(A),l()},setTimeout(function(){v.focus()},0)}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_sanitizer=RTE_Plugin_Sanitizer,typeof RTE_DefaultConfig.contentSanitizer>"u"&&(RTE_DefaultConfig.contentSanitizer=!0);function RTE_Plugin_Sanitizer(){var N=this,u,r,x=!1,H={removedTags:[],removedAttributes:[],calls:0,lastPasses:0},F=[];N.PluginName="Sanitizer",N.InitConfig=function(E){u=E},N.InitEditor=function(E){if(r=E,u.contentSanitizer===!1)return;r.sanitizeHtml=function(C){return l(String(C??""))},r.getSanitizerReport=function(){return JSON.parse(JSON.stringify(H))};function A(){try{f(),_()}catch{}try{L()}catch{}try{h()}catch{}}A();try{r.attachEvent("ready",A)}catch{}setTimeout(A,0),setTimeout(A,400)};var $={};"p,div,span,br,hr,h1,h2,h3,h4,h5,h6,b,strong,i,em,u,s,strike,del,ins,mark,small,sub,sup,abbr,cite,q,dfn,kbd,samp,var,time,data,bdi,bdo,wbr,ruby,rt,rp,ul,ol,li,dl,dt,dd,table,thead,tbody,tfoot,tr,td,th,caption,colgroup,col,blockquote,pre,code,figure,figcaption,section,article,header,footer,main,aside,nav,address,details,summary,a,img,picture,source,video,audio,track,map,area,input,label,button,svg,g,path,circle,ellipse,rect,line,polyline,polygon,text,tspan,defs,marker,linearGradient,radialGradient,stop,clipPath,mask,pattern,use,symbol,title,desc".split(",").forEach(function(E){$[E]=!0});var z={script:1,noscript:1,template:1,object:1,embed:1,applet:1,base:1,meta:1,link:1,frame:1,frameset:1,foreignobject:1,xml:1,"script:":1},o={};"id,class,style,title,lang,dir,translate,hidden,tabindex,role,contenteditable,spellcheck,autocomplete,draggable,sandbox,allowfullscreen,allow,frameborder,scrolling,href,src,srcset,sizes,alt,width,height,loading,decoding,referrerpolicy,target,rel,download,type,value,name,placeholder,checked,disabled,readonly,colspan,rowspan,headers,scope,span,align,valign,bgcolor,border,cellpadding,cellspacing,start,reversed,datetime,cite,open,controls,autoplay,loop,muted,playsinline,poster,preload,kind,srclang,label,usemap,ismap,coords,shape,viewbox,xmlns,fill,stroke,stroke-width,stroke-linecap,stroke-linejoin,stroke-dasharray,d,cx,cy,r,rx,ry,x,y,x1,y1,x2,y2,points,transform,opacity,fill-rule,clip-rule,gradientunits,offset,stop-color,stop-opacity,text-anchor,font-size,font-family,font-weight,preserveaspectratio,version".split(",").forEach(function(E){o[E]=!0});var O={href:1,src:1,action:1,formaction:1,poster:1,cite:1,data:1,longdesc:1,background:1,ping:1,srcset:1},V=/^(https?|mailto|tel|ftp|sms|callto|webcal|geo|bitcoin):/i,K=/^data:image\/(png|jpe?g|gif|webp|bmp|x-icon|avif);base64,[a-z0-9+/=\s]+$/i;function W(E,A,C){var y=String(E??"").replace(/[\u0000-\u0020\u007F-\u00A0]+/g,"").trim();if(!y)return!1;if(A==="use")return y.charAt(0)==="#";if(/^[#?/]/.test(y))return!0;var d=/^([a-z][a-z0-9+.\-]*):/i.exec(y);return d?K.test(y)?A==="img"||A==="source"||C==="poster"||C==="srcset":/^blob:/i.test(y)?A==="img"||A==="video"||A==="audio"||A==="source":V.test(y):!0}function q(E){for(var A=[],C=String(E??"").split(";"),y=0;y<C.length;y++){var d=C[y];if(d.trim()&&!/expression\s*\(|(javascript|vbscript|livescript)\s*:|-moz-binding|behaviou?r\s*:|@import|-o-link/i.test(d)){var w=/url\s*\(\s*(['"]?)([^'")]*)\1\s*\)/i.exec(d);w&&!W(w[2],"img","src")||A.push(d.trim())}}return A.join("; ")}var b="allow-scripts allow-same-origin allow-presentation";function m(E){if(u.sanitizerAllowIframes===!1)return!1;var A=E.getAttribute("src")||"";if(!/^https?:/i.test(A))return!1;var C=u.sanitizerAllowedIframeHosts;if(!C||!C.length)return E.hasAttribute("sandbox")||E.setAttribute("sandbox",b),!0;try{for(var y=new URL(A).hostname.toLowerCase(),d=0;d<C.length;d++){var w=String(C[d]).toLowerCase();if(y===w||y.slice(-(w.length+1))==="."+w)return!0}}catch{}return!1}function k(E){var A={},C=[],y=[];(E||[]).forEach(function(w){if(w instanceof RegExp){y.push(w);return}var D=String(w).toLowerCase();if(D.indexOf("*")===-1){A[D]=!0;return}C.push(D.split("*"))});function d(w,D){var P=w[0];if(D.lastIndexOf(P,0)!==0)return!1;var B=w[w.length-1];if(B&&(D.length<B.length||D.indexOf(B,D.length-B.length)===-1))return!1;for(var Z=P.length,fe=1;fe<w.length;fe++)if(w[fe]){var re=D.indexOf(w[fe],Z);if(re===-1)return!1;Z=re+w[fe].length}return!0}return function(w){if(A[w])return!0;for(var D=0;D<C.length;D++)if(d(C[D],w))return!0;for(var P=0;P<y.length;P++)if(y[P].test(w))return!0;return!1}}function M(E,A){var C=k(u.sanitizerAllowTags),y=k(u.sanitizerAllowAttributes),d=u.sanitizerAllowStyleTags===!0,w=[];(function se(U){for(var Q=0;Q<U.childNodes.length;Q++){var j=U.childNodes[Q];j.nodeType===1?(w.push(j),se(j)):j.nodeType===8&&w.push(j)}})(E);for(var D=0;D<w.length;D++){var P=w[D];if(P.parentNode){if(P.nodeType===8){s(P.data)&&(R(A.removedTags,"#comment"),P.parentNode.removeChild(P));continue}var B=(P.localName||P.nodeName||"").toLowerCase();if(B==="style"){if(!d){R(A.removedTags,"style"),P.parentNode.removeChild(P);continue}}else if(B==="iframe"){if(P.hasAttribute("srcdoc")&&(R(A.removedAttributes,"iframe[srcdoc]"),P.removeAttribute("srcdoc")),!m(P)){R(A.removedTags,"iframe"),P.parentNode.removeChild(P);continue}}else if(B==="title"||B==="desc"){if(!P.closest||!P.closest("svg")){R(A.removedTags,B),P.parentNode.removeChild(P);continue}}else if(z[B]){R(A.removedTags,B),P.parentNode.removeChild(P);continue}else if(!$[B]&&!C(B)){R(A.removedTags,B),I(P);continue}for(var Z=[],fe=0;fe<P.attributes.length;fe++)Z.push(P.attributes[fe]);for(var re=0;re<Z.length;re++){var ie=Z[re].name.toLowerCase(),ae=Z[re].value;if(ie.indexOf("on")===0){R(A.removedAttributes,ie),P.removeAttribute(Z[re].name);continue}if(ie==="xlink:href"||ie==="xmlns:xlink"){W(ae,B,ie)||(R(A.removedAttributes,ie),P.removeAttribute(Z[re].name));continue}if(ie==="srcdoc"){R(A.removedAttributes,"srcdoc"),P.removeAttribute(Z[re].name);continue}if(ie==="style"){P.setAttribute("style",q(ae));continue}if(!(ie.indexOf("data-")===0||ie.indexOf("aria-")===0)){if(O[ie]){W(ae,B,ie)||(R(A.removedAttributes,B+"["+ie+"]"),P.removeAttribute(Z[re].name));continue}!o[ie]&&!y(ie)&&(R(A.removedAttributes,ie),P.removeAttribute(Z[re].name))}}if(B==="a"&&(P.getAttribute("target")||"").toLowerCase()==="_blank"){var de=(P.getAttribute("rel")||"").toLowerCase();de.indexOf("noopener")<0&&P.setAttribute("rel",(de?de+" ":"")+"noopener noreferrer")}}}return E}function I(E){for(var A=E.parentNode;E.firstChild;)A.insertBefore(E.firstChild,E);A.removeChild(E)}function R(E,A){E.indexOf(A)<0&&E.push(A)}function l(E){var A=E;H.calls++;for(var C=0;C<3;C++){var y=new DOMParser().parseFromString("<body>"+A+"</body>","text/html");M(y.body,H);var d=y.body.innerHTML;if(H.lastPasses=C+1,d===A)break;A=d}return A}function f(){if(!x){for(var E=["getHTMLCode","getHTMLContent"],A=!1,C=0;C<E.length;C++)(function(y){var d=r[y];if(!(typeof d!="function"||d.__rteSanitized)){var w=function(){var D=d.apply(r,arguments);return typeof D!="string"?D:l(D)};w.__rteSanitized=!0,r[y]=w,A=!0}})(E[C]);A&&(x=!0)}}function _(){for(var E=["setHTMLCode","setHTMLContent"],A=0;A<E.length;A++)(function(C){var y=r[C];if(!(typeof y!="function"||y.__rteSanitizedIn)){var d=function(w){var D=[].slice.call(arguments);return typeof w=="string"&&(D[0]=l(w)),y.apply(r,D)};d.__rteSanitizedIn=!0,r[C]=d}})(E[A])}function v(E){return/\son[a-z]+\s*=/i.test(E)||/<\s*(script|iframe|object|embed|base)\b/i.test(E)||/srcdoc\s*=/i.test(E)||/(javascript|vbscript)\s*:/i.test(E)||/data:\s*text\/html/i.test(E)}function s(E){var A=String(E??"");return A.indexOf("-->")!==-1||A.indexOf("--!>")!==-1||A.charAt(0)===">"||A.charAt(0)==="-"&&A.charAt(1)===">"}var c=/^(script|iframe|object|embed|base|meta|link|form)$/;function p(E){if(!E.attributes)return!1;for(var A=0;A<E.attributes.length;A++){var C=E.attributes[A].name.toLowerCase();if(C.indexOf("on")===0||C==="srcdoc"||(C==="href"||C==="src"||C==="data"||C==="action"||C==="xlink:href")&&/(javascript|vbscript)\s*:|data:\s*text\/html/i.test(E.attributes[A].value||""))return!0}return!1}function g(E){if(c.test(E.localName||"")||p(E))return!0;for(var A=E.getElementsByTagName?E.getElementsByTagName("*"):[],C=0;C<A.length;C++)if(c.test(A[C].localName||"")||p(A[C]))return!0;return!1}function h(){if(u.sanitizerGuardLiveDom!==!1){var E=null;try{E=r.getEditable()}catch{return}if(!(!E||E.__rteLiveGuard)){E.__rteLiveGuard=!0;var A=new MutationObserver(function(C){for(var y=!1,d=0;d<C.length&&!y;d++){var w=C[d];if(w.type==="attributes"){var D=(w.attributeName||"").toLowerCase();(D.indexOf("on")===0||D==="srcdoc"||p(w.target))&&(y=!0);continue}for(var P=0;P<w.addedNodes.length;P++){var B=w.addedNodes[P];if(B.nodeType===8){if(s(B.data)){y=!0;break}continue}if(B.nodeType===1&&g(B)){y=!0;break}}}if(y)try{M(E,H)}catch{}});A.observe(E,{childList:!0,subtree:!0,attributes:!0}),F.push(A)}}}function L(){var E=null;try{E=r.getEditable()}catch{return}if(!E||E.__rteSanitizePaste)return;E.__rteSanitizePaste=!0,E.addEventListener("paste",function(C){var y=C.clipboardData||window.clipboardData;if(y){var d="";try{d=y.getData("text/html")||""}catch{return}if(!(!d||!v(d))){C.preventDefault(),C.stopImmediatePropagation();var w=l(d);try{r.insertHTML(w)}catch{try{r.insertText(y.getData("text/plain")||"")}catch{}}}}},!0);function A(){var C=function(){try{M(E,H)}catch{}};setTimeout(C,0),setTimeout(C,250)}E.addEventListener("paste",A,!1),E.addEventListener("drop",A,!0)}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_shadowdom=RTE_Plugin_ShadowDom,typeof RTE_DefaultConfig.shadowStyleAdoption>"u"&&(RTE_DefaultConfig.shadowStyleAdoption=!0),typeof RTE_DefaultConfig.shadowStyleSources>"u"&&(RTE_DefaultConfig.shadowStyleSources=null);function RTE_Plugin_ShadowDom(){var N=this,u,r,x=null,H=null,F=null;N.PluginName="ShadowDom",N.InitConfig=function(I){u=I},N.InitEditor=function(I){r=I,r.getShadowRoot=function(){return z()},r.isInShadowDom=function(){return!!z()},r.adoptEditorStyles=function(R){return m(R||z(),!0)},r.getAdoptedStyleCount=function(){return F?F.size:0},!(u&&u.shadowStyleAdoption===!1)&&o(function(){x=z(),x&&(F=new(window.Set||Array),m(x,!1),M(x))})},N.Destroy=function(){if(H){try{H.disconnect()}catch{}H=null}};function $(){try{var I=r.getEditable(),R=I&&I.ownerDocument&&I.ownerDocument.defaultView?I.ownerDocument.defaultView.frameElement:null;if(!R)return null;for(var l=R;l;){if(l.classList&&l.classList.contains("richtexteditor"))return l;l=l.parentNode||l.host}return R}catch{return null}}function z(){var I=$();if(!I||typeof I.getRootNode!="function")return null;var R=I.getRootNode();return R&&R.host&&R!==document?R:null}function o(I){if($()){I();return}var R=0,l=window.setInterval(function(){($()||++R>100)&&(window.clearInterval(l),I())},50)}function O(){try{for(var I=document.getElementsByTagName("script"),R=0;R<I.length;R++){var l=I[R].src||"";if(/(^|\/)rte(\.min)?\.js(\?|$)/.test(l))return l.replace(/[^\/]*$/,"")}}catch{}return null}function V(I){var R=String(I.id||"");if(/^rte[-_]|^__rte/.test(R))return!0;var l=I.href||"";if(!l){if(I.tagName==="STYLE"){var f=I.textContent||"";return/[.]richtexteditor|rte-toolbar|rte-editor|rte-dialog|[.]rte-a11y/.test(f)}return!1}var _=O();return _&&l.indexOf(_)===0?!0:/rte_theme|rte_mobile|richtexteditor_content|richtexteditor_preview|aitoolkit/.test(l)}function K(){var I=u&&u.shadowStyleSources||null;return I?typeof I=="string"?[I]:I:[]}function W(I){return(I.href||"")+"|"+(I.id||"")+"|"+(I.textContent||"").length}function q(I){return F&&(F.has?F.has(I):F.indexOf(I)>=0)}function b(I){F&&(F.add?F.add(I):F.push(I))}function m(I,R){if(!I)return 0;F||(F=new(window.Set||Array));for(var l=0,f=document.querySelectorAll("link[rel~=stylesheet],style"),_=0;_<f.length;_++){var v=f[_];if(V(v)){var s=W(v);!R&&q(s)||q(s)||(I.appendChild(k(v,I)),b(s),l++)}}for(var c=K(),p=0;p<c.length;p++){var g="extra|"+c[p];if(!q(g)){var h=document.createElement("link");h.rel="stylesheet",h.href=c[p],h.setAttribute("data-rte-adopted","1"),I.appendChild(h),b(g),l++}}try{if(I.adoptedStyleSheets&&document.adoptedStyleSheets&&document.adoptedStyleSheets.length){for(var L=I.adoptedStyleSheets.slice(),E=0;E<document.adoptedStyleSheets.length;E++)L.indexOf(document.adoptedStyleSheets[E])<0&&L.push(document.adoptedStyleSheets[E]);I.adoptedStyleSheets=L}}catch{}return l}function k(I,R){if(I.tagName==="LINK"){var l=document.createElement("link");return l.rel="stylesheet",l.href=I.href,I.media&&(l.media=I.media),l.setAttribute("data-rte-adopted","1"),l}var f=document.createElement("style");return f.textContent=I.textContent,I.id&&f.setAttribute("data-rte-source-id",I.id),f.setAttribute("data-rte-adopted","1"),f}function M(I){window.MutationObserver&&(H=new MutationObserver(function(R){for(var l=!1,f=0;f<R.length&&!l;f++)for(var _=R[f].addedNodes||[],v=0;v<_.length;v++){var s=_[v];if(s.nodeType===1&&(s.tagName==="STYLE"||s.tagName==="LINK")&&V(s)){l=!0;break}}l&&m(I,!1)}),H.observe(document.head||document.documentElement,{childList:!0,subtree:!0}))}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_slashcommand=RTE_Plugin_SlashCommand;function RTE_Plugin_SlashCommand(){var N=this,u,r,x=null,H=null,F=null,$=[],z=[],o=0,O=!1,V=!1;N.PluginName="SlashCommand",N.InitConfig=function(Me){u=Me,u.slashCommandEnabled!==!1&&(u.slashCommandTrigger=u.slashCommandTrigger||"/",u.slashCommandMaxItems=u.slashCommandMaxItems||40,u.slashCommandIncludeAi=u.slashCommandIncludeAi!==!1,u.slashCommands=u.slashCommands||null)},N.InitEditor=function(Me){if(r=Me,u.slashCommandEnabled!==!1){if(r.slashCommands={register:K,remove:b,list:function(){return q(),$.slice()},open:function(){c(!0)},close:p,isOpen:function(){return!!H}},$=f(),Array.isArray(u.slashCommands))for(var Se=0;Se<u.slashCommands.length;Se++)K(u.slashCommands[Se]);setTimeout(q,0),B();var Ze=r.getDocument();Ze.addEventListener("keydown",_,!0),Ze.addEventListener("input",v,!0),Ze.addEventListener("compositionstart",function(){O=!0}),Ze.addEventListener("compositionend",function(){O=!1}),Ze.addEventListener("mousedown",function(){p()},!0),Ze.addEventListener("blur",function(){setTimeout(p,150)},!0),window.addEventListener("scroll",P,!0),window.addEventListener("resize",P,!0)}};function K(Me){if(!(!Me||!Me.id)){var Se=m(Me.id);Se>=0?$[Se]=M(Me):$.push(M(Me))}}var W={};function q(){if(r){for(var Me=[],Se=0;Se<$.length;Se++)$[Se]._default||Me.push($[Se]);for(var Ze=f(),nt=[],Nt=0;Nt<Ze.length;Nt++){var jt=Ze[Nt].id;if(!W[jt]){for(var Vt=!1,ut=0;ut<Me.length;ut++)if(Me[ut].id===jt){Vt=!0;break}Vt||nt.push(Ze[Nt])}}$=nt.concat(Me)}}function b(Me){W[Me]=!0;var Se=m(Me);Se>=0&&$.splice(Se,1)}function m(Me){for(var Se=0;Se<$.length;Se++)if($[Se].id===Me)return Se;return-1}function k(Me,Se){try{var Ze=String(Me).toLowerCase().replace(/[^a-z0-9_]/g,"_");if(u&&u["text_"+Ze]&&r&&typeof r.getLangText=="function")return r.getLangText(Ze)}catch{}return Se}function M(Me){var Se=Me.section||"Blocks";return{id:Me.id,section:k("slash_section_"+Se,Se),title:k("slash_"+Me.id,Me.title||Me.id),description:k("slash_"+Me.id+"_desc",Me.description||""),keywords:(Me.keywords||[]).slice(),icon:Me.icon||"",iconSvg:Me.iconSvg||"",run:Me.run||Me.action}}var I={P:1,DIV:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1,BLOCKQUOTE:1,PRE:1,LI:1};function R(){var Me=r.getSelection();if(!Me||Me.rangeCount===0)return null;for(var Se=Me.getRangeAt(0).startContainer,Ze=r.getEditable();Se&&Se!==Ze;){if(Se.nodeType===1&&I[Se.nodeName])return Se;Se=Se.parentNode}return null}function l(Me){var Se=R();if(Me=Me.toUpperCase(),Se&&!Se.textContent.trim()){var Ze=r.getDocument(),nt=Ze.createElement(Me);nt.appendChild(Ze.createElement("br")),Se.parentNode.replaceChild(nt,Se);var Nt=Ze.createRange();Nt.setStart(nt,0),Nt.setEnd(nt,0);var jt=r.getSelection();jt.removeAllRanges(),jt.addRange(Nt);return}r.execCommand("formatblock",Me)}function f(){var Me=[];function Se(ut,sr,Fn,Un,Or,na,Ko){var co=M({id:sr,section:ut,title:Fn,description:Un,keywords:Or,iconSvg:na,run:Ko});co._default=!0,Me.push(co)}if(Se("Blocks","heading1","Heading 1","Large section heading",["h1","title"],Z("1"),function(){l("H1")}),Se("Blocks","heading2","Heading 2","Medium section heading",["h2","subtitle"],Z("2"),function(){l("H2")}),Se("Blocks","heading3","Heading 3","Small section heading",["h3"],Z("3"),function(){l("H3")}),Se("Blocks","paragraph","Paragraph","Plain body text",["p","text","body"],fe(),function(){l("P")}),Se("Blocks","bulletlist","Bulleted list","Unordered list",["ul","bullets","list"],re(),function(){r.execCommand("insertunorderedlist")}),Se("Blocks","numberlist","Numbered list","Ordered list",["ol","numbered"],ie(),function(){r.execCommand("insertorderedlist")}),Se("Blocks","quote","Quote","Block quotation",["blockquote"],ae(),function(){r.execCommand("insertblockquote")}),Se("Blocks","code","Code block","Monospaced code block",["pre","snippet"],de(),function(){r.isCommandEnabled&&r.isCommandEnabled("insertcode")?r.execCommand("insertcode"):r.execCommand("formatblock","PRE")}),Se("Blocks","divider","Divider","Horizontal rule",["hr","line","separator"],se(),function(){r.execCommand("inserthorizontalrule")}),(!r.isCommandEnabled||r.isCommandEnabled("insertcallout"))&&Se("Blocks","callout","Callout","Highlighted info / warning box",["admonition","info","warning","note","tip"],pe(),function(){r.execCommand("insertcallout")}),(!r.isCommandEnabled||r.isCommandEnabled("insertcolumns"))&&Se("Blocks","columns","Columns","Multi-column layout",["layout","grid","column"],ye(),function(){r.execCommand("insertcolumns")}),(!r.isCommandEnabled||r.isCommandEnabled("inserttoggle"))&&Se("Blocks","toggle","Toggle list","Collapsible toggle block",["collapse","details","accordion","expand"],me(),function(){r.execCommand("inserttoggle")}),(!r.isCommandEnabled||r.isCommandEnabled("insertmath"))&&Se("Insert","equation","Equation","Insert a math equation (TeX)",["math","latex","tex","formula","katex"],ee(),function(){r.execCommand("insertmath")}),(!r.isCommandEnabled||r.isCommandEnabled("inserttodolist"))&&Se("Blocks","todolist","To-do list","Checklist with clickable checkboxes",["task","todo","checklist","checkbox","check"],pt(),function(){r.execCommand("inserttodolist")}),(!r.isCommandEnabled||r.isCommandEnabled("insertdiagram"))&&Se("Insert","diagram","Diagram","Insert a Mermaid diagram",["mermaid","flowchart","sequence","gantt","graph","uml"],ke(),function(){r.execCommand("insertdiagram")}),(!r.isCommandEnabled||r.isCommandEnabled("insertbookmark"))&&Se("Insert","bookmark","Bookmark","Insert a link preview card",["link","url","embed","preview","card"],ue(),function(){r.execCommand("insertbookmark")}),(!r.isCommandEnabled||r.isCommandEnabled("spellcheck"))&&Se("Tools","spellcheck","Spell check","Check spelling",["spelling","grammar","proofread","typo"],ce(),function(){r.execCommand("spellcheck")}),(!r.isCommandEnabled||r.isCommandEnabled("insertdatechip"))&&Se("Insert","datechip","Date chip","Insert an interactive date chip",["date","calendar","chip","today"],ve(),function(){r.execCommand("insertdatechip")}),(!r.isCommandEnabled||r.isCommandEnabled("insertchip"))&&Se("Insert","chip","Smart chip","Insert a date / person / link chip",["chip","person","mention","link","pill"],ve(),function(){r.execCommand("insertchip")}),(!r.isCommandEnabled||r.isCommandEnabled("emailexport"))&&Se("Tools","emailexport","Export email HTML","Inline-styled HTML for email",["email","inline","mail","newsletter","html"],be(),function(){r.execCommand("emailexport")}),typeof r.openFindDialog=="function"&&Se("Tools","findreplace","Find & replace","Search the document and replace text",["find","replace","search","query","substitute"],yt(),function(){r.openFindDialog()}),typeof r.showShortcuts=="function"&&Se("Tools","shortcuts","Keyboard shortcuts","Show the keyboard shortcut cheat sheet (Ctrl+/)",["keyboard","shortcuts","hotkeys","keys","help","cheat"],Ge(),function(){r.showShortcuts()}),typeof r.foldAtCaret=="function"&&(Se("Tools","foldsection","Fold section","Collapse the section under the current heading",["fold","collapse","heading","outline","section"],Bt(),function(){r.foldAtCaret()}),Se("Tools","unfoldall","Unfold all","Expand every collapsed heading section",["unfold","expand","headings","collapse"],Bt(),function(){r.unfoldAll&&r.unfoldAll()})),(!r.isCommandEnabled||r.isCommandEnabled("readaloud"))&&Se("Tools","readaloud","Read aloud","Speak the selection or document (text-to-speech)",["tts","speak","speech","voice","accessibility","narrate"],Pe(),function(){r.execCommand("readaloud")}),typeof r.sortTableAtCaret=="function"&&(Se("Tools","sorttableasc","Sort table by this column","Sort the table rows by the column the caret is in",["sort","table","column","order","ascending"],ft(),function(){r.sortTableAtCaret("asc")}),Se("Tools","sorttabledesc","Sort table (descending)","Sort the table rows by this column, largest first",["sort","table","column","descending","reverse"],ft(),function(){r.sortTableAtCaret("desc")}),Se("Tools","tablerownumbers","Number table rows","Add or remove an automatic row-numbering column",["number","rows","table","count","index"],ft(),function(){r.execCommand("tablerownumbers")})),typeof r.setTableLayoutMode=="function"&&(Se("Insert","layouttable","Layout table","Insert a borderless table for positioning content (role=presentation)",["layout","table","grid","email","columns","presentation"],U(),function(){r.insertLayoutTable(2,2)}),Se("Tools","tablelayoutmode","Mark table as layout","This table only positions content \u2014 stop screen readers announcing it as data",["layout","table","presentation","accessibility","screen reader"],U(),function(){r.setTableLayoutMode("layout")}),Se("Tools","tabledatamode","Mark table as data","This table states relationships \u2014 restore its header cells",["data","table","header","accessibility"],U(),function(){r.setTableLayoutMode("data",null,{promoteFirstRow:!0})})),typeof r.moveBlockUp=="function"&&(Se("Tools","moveblockup","Move block up","Move this paragraph or block above the previous one (Alt+Shift+Up)",["move","block","up","reorder","drag"],Le(),function(){r.moveBlockUp()}),Se("Tools","moveblockdown","Move block down","Move this paragraph or block below the next one (Alt+Shift+Down)",["move","block","down","reorder","drag"],Le(),function(){r.moveBlockDown()})),typeof r.toggleRtlUserInterface=="function"&&Se("Tools","rtlui","Mirror editor for RTL","Flip the toolbar, menus and dialogs for right-to-left languages",["rtl","mirror","interface","toolbar","arabic","hebrew"],qe(),function(){r.toggleRtlUserInterface()}),typeof r.setTextDirection=="function"&&(Se("Tools","rtl","Right-to-left","Set this paragraph to right-to-left (Arabic, Hebrew, Persian)",["rtl","arabic","hebrew","persian","urdu","direction","bidi"],qe(),function(){r.setTextDirection("rtl")}),Se("Tools","ltr","Left-to-right","Set this paragraph to left-to-right",["ltr","direction","bidi"],Re(),function(){r.setTextDirection("ltr")}),Se("Tools","autodir","Detect text direction","Set each paragraph's direction from its own content",["direction","detect","auto","rtl","bidi"],qe(),function(){r.autoDetectTextDirection()})),typeof r.toggleFormattingMarks=="function"&&Se("Tools","formattingmarks","Formatting marks","Show paragraph marks, block outlines and invisible characters",["marks","pilcrow","paragraph","invisible","whitespace","nbsp"],Ie(),function(){r.toggleFormattingMarks()}),typeof r.toggleWatermark=="function"&&Se("Tools","watermark","Watermark","Draw DRAFT or CONFIDENTIAL behind the content",["watermark","draft","confidential","background","stamp"],Ve(),function(){r.toggleWatermark()}),typeof r.toggleLineNumbers=="function"&&Se("Tools","linenumbers","Line numbers","Number every line in the margin, as pleadings and transcripts require",["line","numbers","margin","pleading","legal","transcript"],Ye(),function(){r.toggleLineNumbers()}),typeof r.togglePermanentPen=="function"&&Se("Tools","permanentpen","Permanent pen","Keep typing in a fixed annotation format until switched off",["pen","marker","annotate","highlight","review"],ht(),function(){r.togglePermanentPen()}),typeof r.checkLinks=="function"&&Se("Tools","checklinks","Check links","Find broken anchors, unsafe schemes and unlabelled links",["link","check","broken","audit","url","accessibility"],At(),function(){r.highlightLinkIssues(!0),r.checkLinks()}),typeof r.getMergeFieldDefinitions=="function"){for(var Ze=r.getMergeFieldDefinitions(),nt=0;nt<Ze.length;nt++)(function(ut){!ut||!ut.id||Se("Insert","mergefield-"+ut.id,ut.label||ut.id,"Insert the "+(ut.label||ut.id)+" merge field",["merge","field","placeholder","variable","mail merge",ut.id],Rt(),function(){r.insertMergeField(ut.id)})})(Ze[nt]);Se("Tools","mergepreview","Preview merge fields","Swap merge-field placeholders for sample data",["merge","preview","sample","data","placeholder"],Rt(),function(){r.toggleMergeFieldPreview()})}if(typeof r.listCrossReferenceTargets=="function"){var Nt=[];try{Nt=r.listCrossReferenceTargets()}catch{Nt=[]}for(var jt=0;jt<Nt.length&&jt<40;jt++)(function(ut){if(!(!ut||!ut.id)){var sr=ut.number?ut.number+" "+ut.label:ut.label;Se("Insert","xref-"+ut.id,"Reference: "+sr,"Insert a cross-reference to this "+ut.type+" that updates itself",["cross","reference","xref","see","refer",ut.type,ut.number||""],ar(),function(){r.insertCrossReference(ut.id,ut.number?"label":"text")})}})(Nt[jt])}if(typeof r.insertTableOfContents=="function"&&Se("Insert","toc","Table of contents","Insert a contents block that updates itself from your headings",["toc","contents","outline","index","headings"],ze(),function(){r.insertTableOfContents()}),typeof r.insertFootnote=="function"&&Se("Insert","footnote","Footnote","Insert a numbered footnote reference and note",["footnote","note","citation","reference","endnote","cite"],je(),function(){r.insertFootnote()}),typeof r.toggleFormatPainter=="function"&&Se("Tools","formatpainter","Format painter","Copy formatting here, then select the text to paint it onto",["format","painter","brush","copy","style","clone"],We(),function(){r.toggleFormatPainter()}),typeof r.changeCase=="function"&&(Se("Tools","caseupper","UPPERCASE","Convert the selection to upper case",["case","upper","caps","capitals"],Oe(),function(){r.changeCase("upper")}),Se("Tools","caselower","lowercase","Convert the selection to lower case",["case","lower","small"],Oe(),function(){r.changeCase("lower")}),Se("Tools","casetitle","Title Case","Capitalise each significant word in the selection",["case","title","headline","capitalise","capitalize"],Oe(),function(){r.changeCase("title")}),Se("Tools","casesentence","Sentence case","Capitalise the first letter of each sentence",["case","sentence","capitalise","capitalize"],Oe(),function(){r.changeCase("sentence")})),typeof r.requestGhostText=="function"&&Se("Tools","aicomplete","AI complete","Suggest an inline AI completion of the current sentence",["ai","complete","autocomplete","ghost","suggest","continue","copilot"],lr(),function(){r.requestGhostText()}),typeof r.exportToPdf=="function"&&Se("Tools","exportpdf","Export to PDF","Real text, not a screenshot \u2014 selectable, searchable and screen-reader friendly",["pdf","export","download","save","print","text","accessible","searchable"],Zt(),function(){r.exportToPdf()}),typeof r.exportToDocx=="function"&&Se("Tools","exportdocx","Export to Word (.docx)","A real OOXML document, built in the browser with no upload",["word","docx","ooxml","export","download","save","office"],$t(),function(){r.exportToDocx()}),typeof r.openImportDialog=="function"&&Se("Tools","import-document","Import document","Open a Markdown, HTML, text, or Word file into the editor",["import","open","file","word","docx","markdown","upload"],$t(),function(){r.openImportDialog({})}),typeof r.getReadabilityStats=="function"&&Se("Tools","readability-stats","Readability statistics","Flesch reading ease, grade level, and reading time",["readability","flesch","grade","reading","stats","score"],ce(),function(){r.execCommand("readability")}),typeof r.insertCrossReference=="function"&&Se("Insert","crossreference","Cross-reference","Insert a live reference to a heading, figure, table, or bookmark",["cross","reference","xref","see","figure","heading"],ar(),function(){r.execCommand("insertcrossreference")}),r.restrictedEditing&&Se("Tools","restrictedediting","Restricted editing","Lock the document and mark only the regions others may edit",["restrict","lock","protect","editable","region","permission"],ht(),function(){r.execCommand("restrictedediting")}),r.dictation&&Se("Tools","dictation","Dictation","Speak and have your words typed into the document",["dictate","speech","voice","microphone","talk"],Pe(),function(){r.execCommand("dictation")}),typeof r.copyAsMarkdown=="function"&&(Se("Tools","copymarkdown","Copy as Markdown","Copy the whole document to the clipboard as Markdown",["markdown","md","copy","clipboard","export"],zt(),function(){r.copyAsMarkdown()}),Se("Tools","downloadmarkdown","Download as Markdown","Save the document as a .md file",["markdown","md","download","export","save","file"],zt(),function(){r.downloadMarkdown()})),typeof r.toggleTypewriterMode=="function"&&(Se("Tools","typewriter","Typewriter mode","Keep the caret line centred as you type",["typewriter","center","scroll","focus","distraction","zen"],Et(),function(){r.toggleTypewriterMode()}),Se("Tools","focusmode","Focus mode","Dim everything except the current paragraph",["focus","dim","highlight","distraction","zen","concentrate"],lt(),function(){r.toggleFocusMode()})),Se("Insert","table","Table","Insert a table",["grid","rows","columns"],U(),function(){r.execCommand("inserttable")}),Se("Insert","image","Image","Upload or embed an image",["picture","photo","img"],Q(),function(){r.execCommand("imageupload")}),Se("Insert","link","Link","Insert a hyperlink",["url","anchor"],j(),function(){r.execCommand("insertlink")}),Se("Insert","emoji","Emoji","Insert an emoji",["smiley","icon"],J(),function(){r.execCommand("insertemoji")}),Se("Insert","template","Template","Insert from template gallery",["snippet"],Y(),function(){r.execCommand("inserttemplate")}),Se("Insert","date","Today's date","Insert the current date",["time","now"],te(),function(){r.execCommand("insertdate")}),u.slashCommandIncludeAi&&Array.isArray(u.aiToolkitActions))for(var Vt=0;Vt<u.aiToolkitActions.length;Vt++)(function(ut){Me.push(M({id:"ai-"+ut.id,section:"AI",title:ut.title||ut.id,description:ut.description||"",keywords:["ai",ut.id],iconSvg:u["svgCode_aiassist_"+(ut.icon||ut.id)]||u.svgCode_aiassist||"",run:function(){var sr=r.aiToolkit;if(sr){if(ut.id==="chat-panel"&&typeof sr.openChatPanel=="function"){sr.openChatPanel();return}if(ut.id==="review-panel"&&typeof sr.openReviewPanel=="function"){sr.openReviewPanel();return}if(ut.id==="open-dialog"&&typeof sr.openDialog=="function"){sr.openDialog();return}if(typeof sr.runQuickAction=="function"){sr.runQuickAction(ut.id);return}typeof sr.resolveAction=="function"&&sr.resolveAction(ut.id)}}}))})(u.aiToolkitActions[Vt]);return Me}function _(Me){if(!O){if(H)switch(Me.key){case"ArrowDown":Me.preventDefault(),Me.stopPropagation(),y(1);return;case"ArrowUp":Me.preventDefault(),Me.stopPropagation(),y(-1);return;case"Enter":case"Tab":if(z.length){Me.preventDefault(),Me.stopPropagation(),d();return}p();return;case"Escape":case"Esc":Me.preventDefault(),Me.stopPropagation(),p();return}if(Me.key===u.slashCommandTrigger&&!Me.ctrlKey&&!Me.metaKey&&!Me.altKey){if(!s())return;V=!1,setTimeout(function(){V||c(!1)},0)}}}function v(){H&&g()}function s(){var Me=r.getSelection();if(!Me||Me.rangeCount===0||!Me.isCollapsed)return!1;for(var Se=Me.getRangeAt(0),Ze=Se.startContainer,nt=Se.startOffset,Nt=r.getEditable(),jt=Ze.nodeType===1?Ze:Ze.parentNode;jt&&jt!==Nt;){var Vt=jt.nodeName;if(Vt==="CODE"||Vt==="PRE")return!1;jt=jt.parentNode}if(Ze.nodeType===3){if(nt===0)return!0;var ut=Ze.nodeValue.charAt(nt-1);return/\s/.test(ut)}return!0}function c(Me){q(),p();var Se=r.getSelection();if(!(!Se||Se.rangeCount===0)){var Ze=Se.getRangeAt(0).cloneRange();F={range:Ze,startNode:Ze.startContainer,startOffset:Ze.startOffset,triggerCharCount:Me?0:1,query:""},L(),D(),h("")}}function p(){H&&H.parentNode&&H.parentNode.removeChild(H),H=null,F=null,z=[],o=0}function g(){if(F){var Me=r.getSelection();if(!Me||Me.rangeCount===0||!Me.isCollapsed){p();return}var Se=Me.getRangeAt(0),Ze=Se.startContainer;if(Ze!==F.startNode){p();return}var nt=Se.startOffset;if(nt<F.startOffset){p();return}var Nt=(Ze.nodeType===3?Ze.nodeValue:"")||"",jt=Nt.substring(F.startOffset,nt);if(/\s/.test(jt)){p();return}F.query=jt,h(jt),D()}}function h(Me){var Se=(Me||"").toLowerCase();z=$.filter(function(Ze){if(!Se||Ze.title.toLowerCase().indexOf(Se)!==-1||Ze.description&&Ze.description.toLowerCase().indexOf(Se)!==-1)return!0;for(var nt=0;nt<Ze.keywords.length;nt++)if(String(Ze.keywords[nt]).toLowerCase().indexOf(Se)!==-1)return!0;return!1}).slice(0,u.slashCommandMaxItems),o=0,E()}function L(){x=r.iframe.ownerDocument,H=x.createElement("div"),H.className="rte-slash-popup";try{var Me=r.container||r.getEditable&&r.getEditable().closest&&r.getEditable().closest(".richtexteditor");Me&&Me.classList&&Me.classList.contains("rte-dark")&&(H.className+=" rte-slash-popup-dark")}catch{}H.setAttribute("role","listbox"),H.setAttribute("aria-label","Slash commands"),x.body.appendChild(H)}function E(){if(H){if(H.innerHTML="",!z.length){var Me=x.createElement("div");Me.className="rte-slash-empty",Me.textContent="No matching commands",H.appendChild(Me);return}for(var Se="",Ze=0;Ze<z.length;Ze++)(function(nt,Nt){if(nt.section!==Se){var jt=x.createElement("div");jt.className="rte-slash-section",jt.textContent=nt.section,H.appendChild(jt),Se=nt.section}var Vt=x.createElement("button");Vt.type="button",Vt.className="rte-slash-item"+(Nt===o?" rte-slash-item-active":""),Vt.setAttribute("role","option"),Vt.setAttribute("aria-selected",Nt===o?"true":"false"),Vt.setAttribute("data-index",Nt);var ut=x.createElement("span");ut.className="rte-slash-item-icon",ut.innerHTML=nt.iconSvg||le(),Vt.appendChild(ut);var sr=x.createElement("span");sr.className="rte-slash-item-body";var Fn=x.createElement("span");if(Fn.className="rte-slash-item-title",Fn.textContent=nt.title,sr.appendChild(Fn),nt.description){var Un=x.createElement("span");Un.className="rte-slash-item-desc",Un.textContent=nt.description,sr.appendChild(Un)}Vt.appendChild(sr),Vt.addEventListener("mousedown",function(Or){Or.preventDefault(),Or.stopPropagation(),o=Nt,d()}),Vt.addEventListener("click",function(Or){H&&(Or.preventDefault(),Or.stopPropagation(),o=Nt,d())}),Vt.addEventListener("mouseenter",function(){o!==Nt&&(o=Nt,A())}),H.appendChild(Vt)})(z[Ze],Ze)}}function A(){if(H){for(var Me=H.querySelectorAll(".rte-slash-item"),Se=0;Se<Me.length;Se++){var Ze=+Me[Se].getAttribute("data-index"),nt=Ze===o;Me[Se].classList.toggle("rte-slash-item-active",nt),Me[Se].setAttribute("aria-selected",nt?"true":"false")}C()}}function C(){if(H){var Me=H.querySelector(".rte-slash-item-active");if(Me){var Se=Me.offsetTop,Ze=Se+Me.offsetHeight;Se<H.scrollTop?H.scrollTop=Se:Ze>H.scrollTop+H.clientHeight&&(H.scrollTop=Ze-H.clientHeight)}}}function y(Me){z.length&&(o=(o+Me+z.length)%z.length,A())}function d(){if(!z.length){p();return}var Me=z[o],Se=F;if(p(),!(!Me||!Se)){w(Se);var Ze=r.getDocument();Ze.activeElement!==r.getEditable()&&!Ze.hasFocus()&&r.focus();try{Me.run(r)}catch(nt){console.warn("Slash command failed:",nt)}}}function w(Me){var Se=Me.startNode;if(Se){var Ze=Me.startOffset-(Me.triggerCharCount||0);Ze<0&&(Ze=0);var nt=r.getSelection();if(!(!nt||nt.rangeCount===0)){var Nt=nt.getRangeAt(0),jt,Vt;Se.nodeType===3&&Nt.startContainer===Se?(jt=Se,Vt=Nt.startOffset):(jt=Nt.startContainer,Vt=Nt.startOffset);var ut=r.getDocument().createRange();ut.setStart(Se,Ze),ut.setEnd(jt,Vt);try{ut.deleteContents()}catch{return}nt.removeAllRanges(),nt.addRange(ut)}}}function D(){if(!(!H||!F)){var Me=r.iframe,Se=Me.getBoundingClientRect(),Ze=F.range.getClientRects(),nt=Ze&&Ze.length?Ze[Ze.length-1]:null;nt||(nt=F.range.getBoundingClientRect());var Nt=Se.left+(nt.left||0)+window.pageXOffset,jt=Se.top+(nt.bottom||nt.top||0)+window.pageYOffset+4;H.style.position="absolute",H.style.left=Nt+"px",H.style.top=jt+"px";var Vt=window.innerHeight||document.documentElement.clientHeight,ut=H.getBoundingClientRect();ut.bottom>Vt-8&&Se.top+(nt.top||0)>ut.height+16&&(H.style.top=Se.top+(nt.top||0)+window.pageYOffset-ut.height-4+"px")}}function P(){H&&D()}function B(){var Me=r&&r.iframe&&r.iframe.ownerDocument||document;if(!Me.querySelector("style[data-rte-slashcommand]")){var Se=Me.createElement("style");Se.setAttribute("data-rte-slashcommand","1"),Se.textContent=["/* 2026-07-03 slash command polish */",".rte-slash-popup{position:absolute;z-index:2147483000;min-width:280px;max-width:min(390px,calc(100vw - 24px));max-height:min(360px,64vh);overflow-y:auto;overscroll-behavior:contain;padding:6px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,251,255,.96));background-clip:padding-box;border:1px solid rgba(148,163,184,.22);box-shadow:0 16px 36px rgba(29,78,216,.14),0 2px 8px rgba(15,23,42,.08);border-radius:8px;font-family:Aptos,'Segoe UI',sans-serif;font-size:13px;color:#172033;scrollbar-width:thin}",".rte-slash-section{position:sticky;top:0;z-index:1;margin:4px 0 2px;padding:6px 8px 4px;background:linear-gradient(180deg,rgba(248,251,255,.98),rgba(248,251,255,.86));color:#52657e;font-size:10px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}",".rte-slash-item{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:8px;width:100%;min-height:40px;padding:6px 8px;border:0;background:transparent;text-align:left;cursor:pointer;color:inherit;font:inherit;border-radius:8px}",".rte-slash-item:hover,.rte-slash-item-active{background:#eef4ff;color:#1559d6}",".rte-slash-item:focus-visible{outline:2px solid rgba(37,99,235,.22);outline-offset:2px}",".rte-slash-item-icon{flex:0 0 28px;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;color:#315277;background:#ffffff;border-radius:8px;box-shadow:inset 0 0 0 1px rgba(148,163,184,.18)}",".rte-slash-item-active .rte-slash-item-icon{color:#1559d6;background:#ffffff}",".rte-slash-item-icon svg{display:block;width:16px;height:16px;pointer-events:none}",".rte-slash-item-body{display:flex;flex-direction:column;min-width:0;flex:1}",".rte-slash-item-title{font-weight:780;font-size:13px;line-height:1.24;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",".rte-slash-item-desc{font-size:11px;color:#64748b;line-height:1.24;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",".rte-slash-item-active .rte-slash-item-desc{color:#315277}",".rte-slash-empty{padding:16px;color:#52657e;font-size:12px;font-weight:700;text-align:center}",".rte-slash-popup-dark{background:linear-gradient(180deg,#1e293b,#0f172a);border-color:#334155;color:#e2e8f0;box-shadow:0 20px 46px rgba(0,0,0,.5),0 2px 8px rgba(0,0,0,.4)}",".rte-slash-popup-dark .rte-slash-section{background:linear-gradient(180deg,rgba(30,41,59,.98),rgba(30,41,59,.86));color:#94a3b8}",".rte-slash-popup-dark .rte-slash-item:hover,.rte-slash-popup-dark .rte-slash-item-active{background:#1d4ed8;color:#fff}",".rte-slash-popup-dark .rte-slash-item-icon{color:#cbd5e1;background:#0f172a;box-shadow:inset 0 0 0 1px rgba(148,163,184,.25)}",".rte-slash-popup-dark .rte-slash-item-active .rte-slash-item-icon{color:#fff;background:#1e3a8a}",".rte-slash-popup-dark .rte-slash-item-desc{color:#94a3b8}",".rte-slash-popup-dark .rte-slash-item-active .rte-slash-item-desc{color:#dbeafe}",".rte-slash-popup-dark .rte-slash-empty{color:#94a3b8}"].join(`
70
+ `)}function O(){var V=document;if(!V.getElementById("rte-rtl-ui-styles")){var K=V.createElement("style");K.id="rte-rtl-ui-styles",K.appendChild(V.createTextNode(o())),(V.head||V.documentElement).appendChild(K),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(V,K,"rte-rtl-ui-styles",K.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_rubyannotation=RTE_Plugin_RubyAnnotation;function RTE_Plugin_RubyAnnotation(){var N=this,u,r;N.PluginName="RubyAnnotation",N.InitConfig=function(k){u=k,u.rubyAnnotationEnabled!==!1&&(typeof u.rubyAnnotationParentheses!="boolean"&&(u.rubyAnnotationParentheses=!0),x("toolbar_full","#{rubyannotation}"),H("subtoolbar_more","rubyannotation"))},N.InitEditor=function(k){r=k,u.rubyAnnotationEnabled!==!1&&(r.ruby={add:function(M){return q(M)},get:function(){var M=o();return M?O(M):null},isRuby:function(){return!!o()},open:function(){N.OpenRubyDialog()},remove:function(){return b()}},F(),r.toolbarFactoryMap=r.toolbarFactoryMap||{},r.toolbarFactoryMap.rubyannotation=function(M){return r.createToolbarButton(M)},r.attachEvent("exec_command_rubyannotation",function(M){M.returnValue=!0,M.stopBubble=!0,N.OpenRubyDialog()}))};function x(k,M){u[k]&&u[k].indexOf(M)===-1&&(u[k]=u[k]+M)}function H(k,M){var I=u[k];if(!(!I||I.indexOf(M)!==-1)){var R=I.indexOf("}");R!==-1&&(u[k]=I.substring(0,R)+","+M+I.substring(R))}}function F(){var k=u.container.ownerDocument;if(!k.getElementById("rte-ruby-style")){var M=k.createElement("style");M.id="rte-ruby-style",M.innerHTML=[".rte-ruby-annotated{ruby-position:over;}",".rte-ruby-annotated>rt{font-size:.55em;line-height:1.15;opacity:.85;user-select:none;}","@supports (display:ruby){.rte-ruby-annotated>rp{display:none;}}"].join(""),k.head.appendChild(M),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(k,M,"rte-ruby-style",M.textContent)}}function $(){return r&&r.getEditable?r.getEditable():null}function z(){var k=r.getDocument();try{var M=k.getSelection();return!M||!M.rangeCount?null:M.getRangeAt(0)}catch{return null}}function o(){var k=z(),M=$();if(!k||!M)return null;for(var I=k.startContainer;I&&I!==M;){if(I.nodeType===1&&I.nodeName==="RUBY")return I;I=I.parentNode}return null}function O(k){var M=k.querySelector("rt");return M&&M.textContent||""}function V(k){for(var M="",I=0;I<k.childNodes.length;I++){var R=k.childNodes[I];R.nodeType===3?M+=R.nodeValue:R.nodeType===1&&R.nodeName!=="RT"&&R.nodeName!=="RP"&&(M+=R.textContent||"")}return M}function K(k){return String(k??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function W(k,M){var I=u.rubyAnnotationParentheses;return'<ruby class="rte-ruby-annotated">'+K(k)+(I?"<rp>(</rp>":"")+"<rt>"+K(M)+"</rt>"+(I?"<rp>)</rp>":"")+"</ruby>"}function q(k){var M=o();if(M){var I=M.querySelector("rt");return I||(I=M.ownerDocument.createElement("rt"),M.appendChild(I)),I.textContent=String(k??""),r.focus(),M}var R=z();if(!R||R.collapsed)return null;var l=String(R.toString()||"");return l?(r.insertHTML(W(l,k)),r.focus(),!0):null}function b(){var k=o();if(!k)return!1;var M=k.ownerDocument,I=M.createTextNode(V(k));return k.parentNode.insertBefore(I,k),k.parentNode.removeChild(k),r.focus(),!0}function m(k,M,I,R){var l=k.ownerDocument.createElement(M);return I&&(l.style.cssText=I),R&&(l.className=R),k.appendChild(l),l}N.OpenRubyDialog=function(){var k=o(),M=z(),I=k?V(k):M?String(M.toString()||""):"",R=r.createDialog(r.getLangText&&r.getLangText("rubyannotationtitle")||"Ruby annotation","rte-dialog-ruby"),l=typeof R.close=="function"?function(){R.close()}:function(){r.closeCurrentPopup()},f=m(R,"div","padding:14px;min-width:340px;font:13px -apple-system,Segoe UI,sans-serif");m(f,"div","font-weight:600;margin-bottom:4px").innerText="Base text";var _=m(f,"div","padding:8px 10px;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;min-height:20px;word-break:break-word");_.textContent=I,m(f,"div","font-weight:600;margin:10px 0 4px").innerText="Reading";var v=m(f,"input","width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #cbd5e1;border-radius:8px;font:13px inherit");v.type="text",v.value=k?O(k):"",v.placeholder="e.g. \u304B\u3093\u3058";var s=m(f,"div","font-size:11px;color:#94a3b8;margin-top:6px");s.innerText=I?"Shown above the base text. Parentheses are emitted for readers without ruby support.":"Select the text to annotate first, then reopen this dialog.";var c=m(f,"div","display:flex;justify-content:space-between;gap:8px;margin-top:14px"),p=m(c,"div","display:flex;gap:8px");if(k){var g=m(p,"button","padding:6px 14px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#b91c1c;cursor:pointer");g.type="button",g.textContent="Remove",g.onclick=function(){b(),l()}}var h=m(c,"div","display:flex;gap:8px"),L=m(h,"button","padding:6px 14px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;cursor:pointer");L.type="button",L.textContent="Cancel",L.onclick=l;var E=m(h,"button","padding:6px 14px;border:1px solid #1d67ba;border-radius:8px;background:#1d67ba;color:#fff;cursor:pointer");E.type="button",E.textContent=k?"Update":"Add",E.disabled=!I,E.onclick=function(){var A=v.value.trim();if(!A||!I){l();return}q(A),l()},setTimeout(function(){v.focus()},0)}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_sanitizer=RTE_Plugin_Sanitizer,typeof RTE_DefaultConfig.contentSanitizer>"u"&&(RTE_DefaultConfig.contentSanitizer=!0);function RTE_Plugin_Sanitizer(){var N=this,u,r,x=!1,H={removedTags:[],removedAttributes:[],calls:0,lastPasses:0},F=[];N.PluginName="Sanitizer",N.InitConfig=function(E){u=E},N.InitEditor=function(E){if(r=E,u.contentSanitizer===!1)return;r.sanitizeHtml=function(C){return l(String(C??""))},r.getSanitizerReport=function(){return JSON.parse(JSON.stringify(H))};function A(){try{f(),_()}catch{}try{L()}catch{}try{h()}catch{}}A();try{r.attachEvent("ready",A)}catch{}setTimeout(A,0),setTimeout(A,400)};var $={};"p,div,span,br,hr,h1,h2,h3,h4,h5,h6,b,strong,i,em,u,s,strike,del,ins,mark,small,sub,sup,abbr,cite,q,dfn,kbd,samp,var,time,data,bdi,bdo,wbr,ruby,rt,rp,ul,ol,li,dl,dt,dd,table,thead,tbody,tfoot,tr,td,th,caption,colgroup,col,blockquote,pre,code,figure,figcaption,section,article,header,footer,main,aside,nav,address,details,summary,a,img,picture,source,video,audio,track,map,area,input,label,button,svg,g,path,circle,ellipse,rect,line,polyline,polygon,text,tspan,defs,marker,linearGradient,radialGradient,stop,clipPath,mask,pattern,use,symbol,title,desc".split(",").forEach(function(E){$[E]=!0});var z={script:1,noscript:1,template:1,object:1,embed:1,applet:1,base:1,meta:1,link:1,frame:1,frameset:1,foreignobject:1,xml:1,"script:":1},o={};"id,class,style,title,lang,dir,translate,hidden,tabindex,role,contenteditable,spellcheck,autocomplete,draggable,sandbox,allowfullscreen,allow,frameborder,scrolling,href,src,srcset,sizes,alt,width,height,loading,decoding,referrerpolicy,target,rel,download,type,value,name,placeholder,checked,disabled,readonly,colspan,rowspan,headers,scope,span,align,valign,bgcolor,border,cellpadding,cellspacing,start,reversed,datetime,cite,open,controls,autoplay,loop,muted,playsinline,poster,preload,kind,srclang,label,usemap,ismap,coords,shape,viewbox,xmlns,fill,stroke,stroke-width,stroke-linecap,stroke-linejoin,stroke-dasharray,d,cx,cy,r,rx,ry,x,y,x1,y1,x2,y2,points,transform,opacity,fill-rule,clip-rule,gradientunits,offset,stop-color,stop-opacity,text-anchor,font-size,font-family,font-weight,preserveaspectratio,version".split(",").forEach(function(E){o[E]=!0});var O={href:1,src:1,action:1,formaction:1,poster:1,cite:1,data:1,longdesc:1,background:1,ping:1,srcset:1},V=/^(https?|mailto|tel|ftp|sms|callto|webcal|geo|bitcoin):/i,K=/^data:image\/(png|jpe?g|gif|webp|bmp|x-icon|avif);base64,[a-z0-9+/=\s]+$/i;function W(E,A,C){var y=String(E??"").replace(/[\u0000-\u0020\u007F-\u00A0]+/g,"").trim();if(!y)return!1;if(A==="use")return y.charAt(0)==="#";if(/^[#?/]/.test(y))return!0;var d=/^([a-z][a-z0-9+.\-]*):/i.exec(y);return d?K.test(y)?A==="img"||A==="source"||C==="poster"||C==="srcset":/^blob:/i.test(y)?A==="img"||A==="video"||A==="audio"||A==="source":V.test(y):!0}function q(E){for(var A=[],C=String(E??"").split(";"),y=0;y<C.length;y++){var d=C[y];if(d.trim()&&!/expression\s*\(|(javascript|vbscript|livescript)\s*:|-moz-binding|behaviou?r\s*:|@import|-o-link/i.test(d)){var w=/url\s*\(\s*(['"]?)([^'")]*)\1\s*\)/i.exec(d);w&&!W(w[2],"img","src")||A.push(d.trim())}}return A.join("; ")}var b="allow-scripts allow-same-origin allow-presentation";function m(E){if(u.sanitizerAllowIframes===!1)return!1;var A=E.getAttribute("src")||"";if(!/^https?:/i.test(A))return!1;var C=u.sanitizerAllowedIframeHosts;if(!C||!C.length)return E.hasAttribute("sandbox")||E.setAttribute("sandbox",b),!0;try{for(var y=new URL(A).hostname.toLowerCase(),d=0;d<C.length;d++){var w=String(C[d]).toLowerCase();if(y===w||y.slice(-(w.length+1))==="."+w)return!0}}catch{}return!1}function k(E){var A={},C=[],y=[];(E||[]).forEach(function(w){if(w instanceof RegExp){y.push(w);return}var D=String(w).toLowerCase();if(D.indexOf("*")===-1){A[D]=!0;return}C.push(D.split("*"))});function d(w,D){var P=w[0];if(D.lastIndexOf(P,0)!==0)return!1;var B=w[w.length-1];if(B&&(D.length<B.length||D.indexOf(B,D.length-B.length)===-1))return!1;for(var Z=P.length,fe=1;fe<w.length;fe++)if(w[fe]){var re=D.indexOf(w[fe],Z);if(re===-1)return!1;Z=re+w[fe].length}return!0}return function(w){if(A[w])return!0;for(var D=0;D<C.length;D++)if(d(C[D],w))return!0;for(var P=0;P<y.length;P++)if(y[P].test(w))return!0;return!1}}function M(E,A){var C=k(u.sanitizerAllowTags),y=k(u.sanitizerAllowAttributes),d=u.sanitizerAllowStyleTags===!0,w=[];(function se(U){for(var Q=0;Q<U.childNodes.length;Q++){var j=U.childNodes[Q];j.nodeType===1?(w.push(j),se(j)):j.nodeType===8&&w.push(j)}})(E);for(var D=0;D<w.length;D++){var P=w[D];if(P.parentNode){if(P.nodeType===8){s(P.data)&&(R(A.removedTags,"#comment"),P.parentNode.removeChild(P));continue}var B=(P.localName||P.nodeName||"").toLowerCase();if(B==="style"){if(!d){R(A.removedTags,"style"),P.parentNode.removeChild(P);continue}}else if(B==="iframe"){if(P.hasAttribute("srcdoc")&&(R(A.removedAttributes,"iframe[srcdoc]"),P.removeAttribute("srcdoc")),!m(P)){R(A.removedTags,"iframe"),P.parentNode.removeChild(P);continue}}else if(B==="title"||B==="desc"){if(!P.closest||!P.closest("svg")){R(A.removedTags,B),P.parentNode.removeChild(P);continue}}else if(z[B]){R(A.removedTags,B),P.parentNode.removeChild(P);continue}else if(!$[B]&&!C(B)){R(A.removedTags,B),I(P);continue}for(var Z=[],fe=0;fe<P.attributes.length;fe++)Z.push(P.attributes[fe]);for(var re=0;re<Z.length;re++){var ie=Z[re].name.toLowerCase(),ae=Z[re].value;if(ie.indexOf("on")===0){R(A.removedAttributes,ie),P.removeAttribute(Z[re].name);continue}if(ie==="xlink:href"||ie==="xmlns:xlink"){W(ae,B,ie)||(R(A.removedAttributes,ie),P.removeAttribute(Z[re].name));continue}if(ie==="srcdoc"){R(A.removedAttributes,"srcdoc"),P.removeAttribute(Z[re].name);continue}if(ie==="style"){P.setAttribute("style",q(ae));continue}if(!(ie.indexOf("data-")===0||ie.indexOf("aria-")===0)){if(O[ie]){W(ae,B,ie)||(R(A.removedAttributes,B+"["+ie+"]"),P.removeAttribute(Z[re].name));continue}!o[ie]&&!y(ie)&&(R(A.removedAttributes,ie),P.removeAttribute(Z[re].name))}}if(B==="a"&&(P.getAttribute("target")||"").toLowerCase()==="_blank"){var de=(P.getAttribute("rel")||"").toLowerCase();de.indexOf("noopener")<0&&P.setAttribute("rel",(de?de+" ":"")+"noopener noreferrer")}}}return E}function I(E){for(var A=E.parentNode;E.firstChild;)A.insertBefore(E.firstChild,E);A.removeChild(E)}function R(E,A){E.indexOf(A)<0&&E.push(A)}function l(E){var A=E;H.calls++;for(var C=0;C<3;C++){var y=new DOMParser().parseFromString("<body>"+A+"</body>","text/html");M(y.body,H);var d=y.body.innerHTML;if(H.lastPasses=C+1,d===A)break;A=d}return A}function f(){if(!x){for(var E=["getHTMLCode","getHTMLContent"],A=!1,C=0;C<E.length;C++)(function(y){var d=r[y];if(!(typeof d!="function"||d.__rteSanitized)){var w=function(){var D=d.apply(r,arguments);return typeof D!="string"?D:l(D)};w.__rteSanitized=!0,r[y]=w,A=!0}})(E[C]);A&&(x=!0)}}function _(){for(var E=["setHTMLCode","setHTMLContent"],A=0;A<E.length;A++)(function(C){var y=r[C];if(!(typeof y!="function"||y.__rteSanitizedIn)){var d=function(w){var D=[].slice.call(arguments);return typeof w=="string"&&(D[0]=l(w)),y.apply(r,D)};d.__rteSanitizedIn=!0,r[C]=d}})(E[A])}function v(E){return/\son[a-z]+\s*=/i.test(E)||/<\s*(script|iframe|object|embed|base)\b/i.test(E)||/srcdoc\s*=/i.test(E)||/(javascript|vbscript)\s*:/i.test(E)||/data:\s*text\/html/i.test(E)}function s(E){var A=String(E??"");return A.indexOf("-->")!==-1||A.indexOf("--!>")!==-1||A.charAt(0)===">"||A.charAt(0)==="-"&&A.charAt(1)===">"}var c=/^(script|iframe|object|embed|base|meta|link|form)$/;function p(E){if(!E.attributes)return!1;for(var A=0;A<E.attributes.length;A++){var C=E.attributes[A].name.toLowerCase();if(C.indexOf("on")===0||C==="srcdoc"||(C==="href"||C==="src"||C==="data"||C==="action"||C==="xlink:href")&&/(javascript|vbscript)\s*:|data:\s*text\/html/i.test(E.attributes[A].value||""))return!0}return!1}function g(E){if(c.test(E.localName||"")||p(E))return!0;for(var A=E.getElementsByTagName?E.getElementsByTagName("*"):[],C=0;C<A.length;C++)if(c.test(A[C].localName||"")||p(A[C]))return!0;return!1}function h(){if(u.sanitizerGuardLiveDom!==!1){var E=null;try{E=r.getEditable()}catch{return}if(!(!E||E.__rteLiveGuard)){E.__rteLiveGuard=!0;var A=new MutationObserver(function(C){for(var y=!1,d=0;d<C.length&&!y;d++){var w=C[d];if(w.type==="attributes"){var D=(w.attributeName||"").toLowerCase();(D.indexOf("on")===0||D==="srcdoc"||p(w.target))&&(y=!0);continue}for(var P=0;P<w.addedNodes.length;P++){var B=w.addedNodes[P];if(B.nodeType===8){if(s(B.data)){y=!0;break}continue}if(B.nodeType===1&&g(B)){y=!0;break}}}if(y)try{M(E,H)}catch{}});A.observe(E,{childList:!0,subtree:!0,attributes:!0}),F.push(A)}}}function L(){var E=null;try{E=r.getEditable()}catch{return}if(!E||E.__rteSanitizePaste)return;E.__rteSanitizePaste=!0,E.addEventListener("paste",function(C){var y=C.clipboardData||window.clipboardData;if(y){var d="";try{d=y.getData("text/html")||""}catch{return}if(!(!d||!v(d))){C.preventDefault(),C.stopImmediatePropagation();var w=l(d);try{r.insertHTML(w)}catch{try{r.insertText(y.getData("text/plain")||"")}catch{}}}}},!0);function A(){var C=function(){try{M(E,H)}catch{}};setTimeout(C,0),setTimeout(C,250)}E.addEventListener("paste",A,!1),E.addEventListener("drop",A,!0)}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_shadowdom=RTE_Plugin_ShadowDom,typeof RTE_DefaultConfig.shadowStyleAdoption>"u"&&(RTE_DefaultConfig.shadowStyleAdoption=!0),typeof RTE_DefaultConfig.shadowStyleSources>"u"&&(RTE_DefaultConfig.shadowStyleSources=null);function RTE_Plugin_ShadowDom(){var N=this,u,r,x=null,H=null,F=null;N.PluginName="ShadowDom",N.InitConfig=function(I){u=I},N.InitEditor=function(I){r=I,r.getShadowRoot=function(){return z()},r.isInShadowDom=function(){return!!z()},r.adoptEditorStyles=function(R){return m(R||z(),!0)},r.getAdoptedStyleCount=function(){return F?F.size:0},!(u&&u.shadowStyleAdoption===!1)&&o(function(){x=z(),x&&(F=new(window.Set||Array),m(x,!1),M(x))})},N.Destroy=function(){if(H){try{H.disconnect()}catch{}H=null}};function $(){try{var I=r.getEditable(),R=I&&I.ownerDocument&&I.ownerDocument.defaultView?I.ownerDocument.defaultView.frameElement:null;if(!R)return null;for(var l=R;l;){if(l.classList&&l.classList.contains("richtexteditor"))return l;l=l.parentNode||l.host}return R}catch{return null}}function z(){var I=$();if(!I||typeof I.getRootNode!="function")return null;var R=I.getRootNode();return R&&R.host&&R!==document?R:null}function o(I){if($()){I();return}var R=0,l=window.setInterval(function(){($()||++R>100)&&(window.clearInterval(l),I())},50)}function O(){try{for(var I=document.getElementsByTagName("script"),R=0;R<I.length;R++){var l=I[R].src||"";if(/(^|\/)rte(\.min)?\.js(\?|$)/.test(l))return l.replace(/[^\/]*$/,"")}}catch{}return null}function V(I){var R=String(I.id||"");if(/^rte[-_]|^__rte/.test(R))return!0;var l=I.href||"";if(!l){if(I.tagName==="STYLE"){var f=I.textContent||"";return/[.]richtexteditor|rte-toolbar|rte-editor|rte-dialog|[.]rte-a11y/.test(f)}return!1}var _=O();return _&&l.indexOf(_)===0?!0:/rte_theme|rte_mobile|richtexteditor_content|richtexteditor_preview|aitoolkit/.test(l)}function K(){var I=u&&u.shadowStyleSources||null;return I?typeof I=="string"?[I]:I:[]}function W(I){return(I.href||"")+"|"+(I.id||"")+"|"+(I.textContent||"").length}function q(I){return F&&(F.has?F.has(I):F.indexOf(I)>=0)}function b(I){F&&(F.add?F.add(I):F.push(I))}function m(I,R){if(!I)return 0;F||(F=new(window.Set||Array));for(var l=0,f=document.querySelectorAll("link[rel~=stylesheet],style"),_=0;_<f.length;_++){var v=f[_];if(V(v)){var s=W(v);!R&&q(s)||q(s)||(I.appendChild(k(v,I)),b(s),l++)}}for(var c=K(),p=0;p<c.length;p++){var g="extra|"+c[p];if(!q(g)){var h=document.createElement("link");h.rel="stylesheet",h.href=c[p],h.setAttribute("data-rte-adopted","1"),I.appendChild(h),b(g),l++}}try{if(I.adoptedStyleSheets&&document.adoptedStyleSheets&&document.adoptedStyleSheets.length){for(var L=I.adoptedStyleSheets.slice(),E=0;E<document.adoptedStyleSheets.length;E++)L.indexOf(document.adoptedStyleSheets[E])<0&&L.push(document.adoptedStyleSheets[E]);I.adoptedStyleSheets=L}}catch{}return l}function k(I,R){if(I.tagName==="LINK"){var l=document.createElement("link");return l.rel="stylesheet",l.href=I.href,I.media&&(l.media=I.media),l.setAttribute("data-rte-adopted","1"),l}var f=document.createElement("style");return f.textContent=I.textContent,I.id&&f.setAttribute("data-rte-source-id",I.id),f.setAttribute("data-rte-adopted","1"),f}function M(I){window.MutationObserver&&(H=new MutationObserver(function(R){for(var l=!1,f=0;f<R.length&&!l;f++)for(var _=R[f].addedNodes||[],v=0;v<_.length;v++){var s=_[v];if(s.nodeType===1&&(s.tagName==="STYLE"||s.tagName==="LINK")&&V(s)){l=!0;break}}l&&m(I,!1)}),H.observe(document.head||document.documentElement,{childList:!0,subtree:!0}))}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_slashcommand=RTE_Plugin_SlashCommand;function RTE_Plugin_SlashCommand(){var N=this,u,r,x=null,H=null,F=null,$=[],z=[],o=0,O=!1,V=!1;N.PluginName="SlashCommand",N.InitConfig=function(Me){u=Me,u.slashCommandEnabled!==!1&&(u.slashCommandTrigger=u.slashCommandTrigger||"/",u.slashCommandMaxItems=u.slashCommandMaxItems||40,u.slashCommandIncludeAi=u.slashCommandIncludeAi!==!1,u.slashCommands=u.slashCommands||null)},N.InitEditor=function(Me){if(r=Me,u.slashCommandEnabled!==!1){if(r.slashCommands={register:K,remove:b,list:function(){return q(),$.slice()},open:function(){c(!0)},close:p,isOpen:function(){return!!H}},$=f(),Array.isArray(u.slashCommands))for(var Se=0;Se<u.slashCommands.length;Se++)K(u.slashCommands[Se]);setTimeout(q,0),B();var Ze=r.getDocument();Ze.addEventListener("keydown",_,!0),Ze.addEventListener("input",v,!0),Ze.addEventListener("compositionstart",function(){O=!0}),Ze.addEventListener("compositionend",function(){O=!1}),Ze.addEventListener("mousedown",function(){p()},!0),Ze.addEventListener("blur",function(){setTimeout(p,150)},!0),window.addEventListener("scroll",P,!0),window.addEventListener("resize",P,!0)}};function K(Me){if(!(!Me||!Me.id)){var Se=m(Me.id);Se>=0?$[Se]=M(Me):$.push(M(Me))}}var W={};function q(){if(r){for(var Me=[],Se=0;Se<$.length;Se++)$[Se]._default||Me.push($[Se]);for(var Ze=f(),nt=[],Nt=0;Nt<Ze.length;Nt++){var jt=Ze[Nt].id;if(!W[jt]){for(var Vt=!1,ut=0;ut<Me.length;ut++)if(Me[ut].id===jt){Vt=!0;break}Vt||nt.push(Ze[Nt])}}$=nt.concat(Me)}}function b(Me){W[Me]=!0;var Se=m(Me);Se>=0&&$.splice(Se,1)}function m(Me){for(var Se=0;Se<$.length;Se++)if($[Se].id===Me)return Se;return-1}function k(Me,Se){try{var Ze=String(Me).toLowerCase().replace(/[^a-z0-9_]/g,"_");if(u&&u["text_"+Ze]&&r&&typeof r.getLangText=="function")return r.getLangText(Ze)}catch{}return Se}function M(Me){var Se=Me.section||"Blocks";return{id:Me.id,section:k("slash_section_"+Se,Se),title:k("slash_"+Me.id,Me.title||Me.id),description:k("slash_"+Me.id+"_desc",Me.description||""),keywords:(Me.keywords||[]).slice(),icon:Me.icon||"",iconSvg:Me.iconSvg||"",run:Me.run||Me.action}}var I={P:1,DIV:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1,BLOCKQUOTE:1,PRE:1,LI:1};function R(){var Me=r.getSelection();if(!Me||Me.rangeCount===0)return null;for(var Se=Me.getRangeAt(0).startContainer,Ze=r.getEditable();Se&&Se!==Ze;){if(Se.nodeType===1&&I[Se.nodeName])return Se;Se=Se.parentNode}return null}function l(Me){var Se=R();if(Me=Me.toUpperCase(),Se&&!Se.textContent.trim()){var Ze=r.getDocument(),nt=Ze.createElement(Me);nt.appendChild(Ze.createElement("br")),Se.parentNode.replaceChild(nt,Se);var Nt=Ze.createRange();Nt.setStart(nt,0),Nt.setEnd(nt,0);var jt=r.getSelection();jt.removeAllRanges(),jt.addRange(Nt);return}r.execCommand("formatblock",Me)}function f(){var Me=[];function Se(ut,sr,Fn,Un,Or,na,Ko){var co=M({id:sr,section:ut,title:Fn,description:Un,keywords:Or,iconSvg:na,run:Ko});co._default=!0,Me.push(co)}if(Se("Blocks","heading1","Heading 1","Large section heading",["h1","title"],Z("1"),function(){l("H1")}),Se("Blocks","heading2","Heading 2","Medium section heading",["h2","subtitle"],Z("2"),function(){l("H2")}),Se("Blocks","heading3","Heading 3","Small section heading",["h3"],Z("3"),function(){l("H3")}),Se("Blocks","paragraph","Paragraph","Plain body text",["p","text","body"],fe(),function(){l("P")}),Se("Blocks","bulletlist","Bulleted list","Unordered list",["ul","bullets","list"],re(),function(){r.execCommand("insertunorderedlist")}),Se("Blocks","numberlist","Numbered list","Ordered list",["ol","numbered"],ie(),function(){r.execCommand("insertorderedlist")}),Se("Blocks","quote","Quote","Block quotation",["blockquote"],ae(),function(){r.execCommand("insertblockquote")}),Se("Blocks","code","Code block","Monospaced code block",["pre","snippet"],de(),function(){r.isCommandEnabled&&r.isCommandEnabled("insertcode")?r.execCommand("insertcode"):r.execCommand("formatblock","PRE")}),Se("Blocks","divider","Divider","Horizontal rule",["hr","line","separator"],se(),function(){r.execCommand("inserthorizontalrule")}),(!r.isCommandEnabled||r.isCommandEnabled("insertcallout"))&&Se("Blocks","callout","Callout","Highlighted info / warning box",["admonition","info","warning","note","tip"],pe(),function(){r.execCommand("insertcallout")}),(!r.isCommandEnabled||r.isCommandEnabled("insertcolumns"))&&Se("Blocks","columns","Columns","Multi-column layout",["layout","grid","column"],ye(),function(){r.execCommand("insertcolumns")}),(!r.isCommandEnabled||r.isCommandEnabled("inserttoggle"))&&Se("Blocks","toggle","Toggle list","Collapsible toggle block",["collapse","details","accordion","expand"],me(),function(){r.execCommand("inserttoggle")}),(!r.isCommandEnabled||r.isCommandEnabled("insertmath"))&&Se("Insert","equation","Equation","Insert a math equation (TeX)",["math","latex","tex","formula","katex"],ee(),function(){r.execCommand("insertmath")}),(!r.isCommandEnabled||r.isCommandEnabled("inserttodolist"))&&Se("Blocks","todolist","To-do list","Checklist with clickable checkboxes",["task","todo","checklist","checkbox","check"],pt(),function(){r.execCommand("inserttodolist")}),(!r.isCommandEnabled||r.isCommandEnabled("insertdiagram"))&&Se("Insert","diagram","Diagram","Insert a Mermaid diagram",["mermaid","flowchart","sequence","gantt","graph","uml"],ke(),function(){r.execCommand("insertdiagram")}),(!r.isCommandEnabled||r.isCommandEnabled("insertbookmark"))&&Se("Insert","bookmark","Bookmark","Insert a link preview card",["link","url","embed","preview","card"],ue(),function(){r.execCommand("insertbookmark")}),(!r.isCommandEnabled||r.isCommandEnabled("spellcheck"))&&Se("Tools","spellcheck","Spell check","Check spelling",["spelling","grammar","proofread","typo"],ce(),function(){r.execCommand("spellcheck")}),(!r.isCommandEnabled||r.isCommandEnabled("insertdatechip"))&&Se("Insert","datechip","Date chip","Insert an interactive date chip",["date","calendar","chip","today"],ve(),function(){r.execCommand("insertdatechip")}),(!r.isCommandEnabled||r.isCommandEnabled("insertchip"))&&Se("Insert","chip","Smart chip","Insert a date / person / link chip",["chip","person","mention","link","pill"],ve(),function(){r.execCommand("insertchip")}),(!r.isCommandEnabled||r.isCommandEnabled("emailexport"))&&Se("Tools","emailexport","Export email HTML","Inline-styled HTML for email",["email","inline","mail","newsletter","html"],be(),function(){r.execCommand("emailexport")}),typeof r.openFindDialog=="function"&&Se("Tools","findreplace","Find & replace","Search the document and replace text",["find","replace","search","query","substitute"],yt(),function(){r.openFindDialog()}),typeof r.showShortcuts=="function"&&Se("Tools","shortcuts","Keyboard shortcuts","Show the keyboard shortcut cheat sheet (Ctrl+/)",["keyboard","shortcuts","hotkeys","keys","help","cheat"],Ge(),function(){r.showShortcuts()}),typeof r.foldAtCaret=="function"&&(Se("Tools","foldsection","Fold section","Collapse the section under the current heading",["fold","collapse","heading","outline","section"],Bt(),function(){r.foldAtCaret()}),Se("Tools","unfoldall","Unfold all","Expand every collapsed heading section",["unfold","expand","headings","collapse"],Bt(),function(){r.unfoldAll&&r.unfoldAll()})),(!r.isCommandEnabled||r.isCommandEnabled("readaloud"))&&Se("Tools","readaloud","Read aloud","Speak the selection or document (text-to-speech)",["tts","speak","speech","voice","accessibility","narrate"],Pe(),function(){r.execCommand("readaloud")}),typeof r.sortTableAtCaret=="function"&&(Se("Tools","sorttableasc","Sort table by this column","Sort the table rows by the column the caret is in",["sort","table","column","order","ascending"],ft(),function(){r.sortTableAtCaret("asc")}),Se("Tools","sorttabledesc","Sort table (descending)","Sort the table rows by this column, largest first",["sort","table","column","descending","reverse"],ft(),function(){r.sortTableAtCaret("desc")}),Se("Tools","tablerownumbers","Number table rows","Add or remove an automatic row-numbering column",["number","rows","table","count","index"],ft(),function(){r.execCommand("tablerownumbers")})),typeof r.setTableLayoutMode=="function"&&(Se("Insert","layouttable","Layout table","Insert a borderless table for positioning content (role=presentation)",["layout","table","grid","email","columns","presentation"],U(),function(){r.insertLayoutTable(2,2)}),Se("Tools","tablelayoutmode","Mark table as layout","This table only positions content \u2014 stop screen readers announcing it as data",["layout","table","presentation","accessibility","screen reader"],U(),function(){r.setTableLayoutMode("layout")}),Se("Tools","tabledatamode","Mark table as data","This table states relationships \u2014 restore its header cells",["data","table","header","accessibility"],U(),function(){r.setTableLayoutMode("data",null,{promoteFirstRow:!0})})),typeof r.moveBlockUp=="function"&&(Se("Tools","moveblockup","Move block up","Move this paragraph or block above the previous one (Alt+Shift+Up)",["move","block","up","reorder","drag"],Le(),function(){r.moveBlockUp()}),Se("Tools","moveblockdown","Move block down","Move this paragraph or block below the next one (Alt+Shift+Down)",["move","block","down","reorder","drag"],Le(),function(){r.moveBlockDown()})),typeof r.toggleRtlUserInterface=="function"&&Se("Tools","rtlui","Mirror editor for RTL","Flip the toolbar, menus and dialogs for right-to-left languages",["rtl","mirror","interface","toolbar","arabic","hebrew"],qe(),function(){r.toggleRtlUserInterface()}),typeof r.setTextDirection=="function"&&(Se("Tools","rtl","Right-to-left","Set this paragraph to right-to-left (Arabic, Hebrew, Persian)",["rtl","arabic","hebrew","persian","urdu","direction","bidi"],qe(),function(){r.setTextDirection("rtl")}),Se("Tools","ltr","Left-to-right","Set this paragraph to left-to-right",["ltr","direction","bidi"],Re(),function(){r.setTextDirection("ltr")}),Se("Tools","autodir","Detect text direction","Set each paragraph's direction from its own content",["direction","detect","auto","rtl","bidi"],qe(),function(){r.autoDetectTextDirection()})),typeof r.toggleFormattingMarks=="function"&&Se("Tools","formattingmarks","Formatting marks","Show paragraph marks, block outlines and invisible characters",["marks","pilcrow","paragraph","invisible","whitespace","nbsp"],Ie(),function(){r.toggleFormattingMarks()}),typeof r.toggleWatermark=="function"&&Se("Tools","watermark","Watermark","Draw DRAFT or CONFIDENTIAL behind the content",["watermark","draft","confidential","background","stamp"],Ve(),function(){r.toggleWatermark()}),typeof r.toggleLineNumbers=="function"&&Se("Tools","linenumbers","Line numbers","Number every line in the margin, as pleadings and transcripts require",["line","numbers","margin","pleading","legal","transcript"],Ye(),function(){r.toggleLineNumbers()}),typeof r.togglePermanentPen=="function"&&Se("Tools","permanentpen","Permanent pen","Keep typing in a fixed annotation format until switched off",["pen","marker","annotate","highlight","review"],ht(),function(){r.togglePermanentPen()}),typeof r.checkLinks=="function"&&Se("Tools","checklinks","Check links","Find broken anchors, unsafe schemes and unlabelled links",["link","check","broken","audit","url","accessibility"],At(),function(){r.highlightLinkIssues(!0),r.checkLinks()}),typeof r.getMergeFieldDefinitions=="function"){for(var Ze=r.getMergeFieldDefinitions(),nt=0;nt<Ze.length;nt++)(function(ut){!ut||!ut.id||Se("Insert","mergefield-"+ut.id,ut.label||ut.id,"Insert the "+(ut.label||ut.id)+" merge field",["merge","field","placeholder","variable","mail merge",ut.id],Rt(),function(){r.insertMergeField(ut.id)})})(Ze[nt]);Se("Tools","mergepreview","Preview merge fields","Swap merge-field placeholders for sample data",["merge","preview","sample","data","placeholder"],Rt(),function(){r.toggleMergeFieldPreview()})}if(typeof r.listCrossReferenceTargets=="function"){var Nt=[];try{Nt=r.listCrossReferenceTargets()}catch{Nt=[]}for(var jt=0;jt<Nt.length&&jt<40;jt++)(function(ut){if(!(!ut||!ut.id)){var sr=ut.number?ut.number+" "+ut.label:ut.label;Se("Insert","xref-"+ut.id,"Reference: "+sr,"Insert a cross-reference to this "+ut.type+" that updates itself",["cross","reference","xref","see","refer",ut.type,ut.number||""],ar(),function(){r.insertCrossReference(ut.id,ut.number?"label":"text")})}})(Nt[jt])}if(typeof r.insertTableOfContents=="function"&&Se("Insert","toc","Table of contents","Insert a contents block that updates itself from your headings",["toc","contents","outline","index","headings"],ze(),function(){r.insertTableOfContents()}),typeof r.insertFootnote=="function"&&Se("Insert","footnote","Footnote","Insert a numbered footnote reference and note",["footnote","note","citation","reference","endnote","cite"],je(),function(){r.insertFootnote()}),typeof r.toggleFormatPainter=="function"&&Se("Tools","formatpainter","Format painter","Copy formatting here, then select the text to paint it onto",["format","painter","brush","copy","style","clone"],We(),function(){r.toggleFormatPainter()}),typeof r.changeCase=="function"&&(Se("Tools","caseupper","UPPERCASE","Convert the selection to upper case",["case","upper","caps","capitals"],Oe(),function(){r.changeCase("upper")}),Se("Tools","caselower","lowercase","Convert the selection to lower case",["case","lower","small"],Oe(),function(){r.changeCase("lower")}),Se("Tools","casetitle","Title Case","Capitalise each significant word in the selection",["case","title","headline","capitalise","capitalize"],Oe(),function(){r.changeCase("title")}),Se("Tools","casesentence","Sentence case","Capitalise the first letter of each sentence",["case","sentence","capitalise","capitalize"],Oe(),function(){r.changeCase("sentence")})),typeof r.requestGhostText=="function"&&Se("Tools","aicomplete","AI complete","Suggest an inline AI completion of the current sentence",["ai","complete","autocomplete","ghost","suggest","continue","copilot"],lr(),function(){r.requestGhostText()}),typeof r.exportToPdf=="function"&&Se("Tools","exportpdf","Export to PDF","Real text, not a screenshot \u2014 selectable, searchable and screen-reader friendly",["pdf","export","download","save","print","text","accessible","searchable"],Zt(),function(){r.exportToPdf()}),typeof r.exportToDocx=="function"&&Se("Tools","exportdocx","Export to Word (.docx)","A real OOXML document, built in the browser with no upload",["word","docx","ooxml","export","download","save","office"],$t(),function(){r.exportToDocx()}),typeof r.openImportDialog=="function"&&Se("Tools","import-document","Import document","Open a Markdown, HTML, text, or Word file into the editor",["import","open","file","word","docx","markdown","upload"],$t(),function(){r.openImportDialog({})}),typeof r.getReadabilityStats=="function"&&Se("Tools","readability-stats","Readability statistics","Flesch reading ease, grade level, and reading time",["readability","flesch","grade","reading","stats","score"],ce(),function(){r.execCommand("readability")}),typeof r.insertCrossReference=="function"&&Se("Insert","crossreference","Cross-reference","Insert a live reference to a heading, figure, table, or bookmark",["cross","reference","xref","see","figure","heading"],ar(),function(){r.execCommand("insertcrossreference")}),r.restrictedEditing&&Se("Tools","restrictedediting","Restricted editing","Lock the document and mark only the regions others may edit",["restrict","lock","protect","editable","region","permission"],ht(),function(){r.execCommand("restrictedediting")}),r.dictation&&Se("Tools","dictation","Dictation","Speak and have your words typed into the document",["dictate","speech","voice","microphone","talk"],Pe(),function(){r.execCommand("dictation")}),typeof r.copyAsMarkdown=="function"&&(Se("Tools","copymarkdown","Copy as Markdown","Copy the whole document to the clipboard as Markdown",["markdown","md","copy","clipboard","export"],zt(),function(){r.copyAsMarkdown()}),Se("Tools","downloadmarkdown","Download as Markdown","Save the document as a .md file",["markdown","md","download","export","save","file"],zt(),function(){r.downloadMarkdown()})),typeof r.toggleTypewriterMode=="function"&&(Se("Tools","typewriter","Typewriter mode","Keep the caret line centred as you type",["typewriter","center","scroll","focus","distraction","zen"],Et(),function(){r.toggleTypewriterMode()}),Se("Tools","focusmode","Focus mode","Dim everything except the current paragraph",["focus","dim","highlight","distraction","zen","concentrate"],lt(),function(){r.toggleFocusMode()})),Se("Insert","table","Table","Insert a table",["grid","rows","columns"],U(),function(){r.execCommand("inserttable")}),Se("Insert","image","Image","Upload or embed an image",["picture","photo","img"],Q(),function(){r.execCommand("imageupload")}),Se("Insert","link","Link","Insert a hyperlink",["url","anchor"],j(),function(){r.execCommand("insertlink")}),Se("Insert","emoji","Emoji","Insert an emoji",["smiley","icon"],J(),function(){r.execCommand("insertemoji")}),Se("Insert","template","Template","Insert from template gallery",["snippet"],Y(),function(){r.execCommand("inserttemplate")}),Se("Insert","date","Today's date","Insert the current date",["time","now"],te(),function(){r.execCommand("insertdate")}),u.slashCommandIncludeAi&&Array.isArray(u.aiToolkitActions))for(var Vt=0;Vt<u.aiToolkitActions.length;Vt++)(function(ut){Me.push(M({id:"ai-"+ut.id,section:"AI",title:ut.title||ut.id,description:ut.description||"",keywords:["ai",ut.id],iconSvg:u["svgCode_aiassist_"+(ut.icon||ut.id)]||u.svgCode_aiassist||"",run:function(){var sr=r.aiToolkit;if(sr){if(ut.id==="chat-panel"&&typeof sr.openChatPanel=="function"){sr.openChatPanel();return}if(ut.id==="review-panel"&&typeof sr.openReviewPanel=="function"){sr.openReviewPanel();return}if(ut.id==="open-dialog"&&typeof sr.openDialog=="function"){sr.openDialog();return}if(typeof sr.runQuickAction=="function"){sr.runQuickAction(ut.id);return}typeof sr.resolveAction=="function"&&sr.resolveAction(ut.id)}}}))})(u.aiToolkitActions[Vt]);return Me}function _(Me){if(!O){if(H)switch(Me.key){case"ArrowDown":Me.preventDefault(),Me.stopPropagation(),y(1);return;case"ArrowUp":Me.preventDefault(),Me.stopPropagation(),y(-1);return;case"Enter":case"Tab":if(z.length){Me.preventDefault(),Me.stopPropagation(),d();return}p();return;case"Escape":case"Esc":Me.preventDefault(),Me.stopPropagation(),p();return}if(Me.key===u.slashCommandTrigger&&!Me.ctrlKey&&!Me.metaKey&&!Me.altKey){if(!s())return;V=!1,setTimeout(function(){V||c(!1)},0)}}}function v(){H&&g()}function s(){var Me=r.getSelection();if(!Me||Me.rangeCount===0||!Me.isCollapsed)return!1;for(var Se=Me.getRangeAt(0),Ze=Se.startContainer,nt=Se.startOffset,Nt=r.getEditable(),jt=Ze.nodeType===1?Ze:Ze.parentNode;jt&&jt!==Nt;){var Vt=jt.nodeName;if(Vt==="CODE"||Vt==="PRE")return!1;jt=jt.parentNode}if(Ze.nodeType===3){if(nt===0)return!0;var ut=Ze.nodeValue.charAt(nt-1);return/\s/.test(ut)}return!0}function c(Me){q(),p();var Se=r.getSelection();if(!(!Se||Se.rangeCount===0)){var Ze=Se.getRangeAt(0).cloneRange();F={range:Ze,startNode:Ze.startContainer,startOffset:Ze.startOffset,triggerCharCount:Me?0:1,query:""},L(),D(),h("")}}function p(){H&&H.parentNode&&H.parentNode.removeChild(H),H=null,F=null,z=[],o=0}function g(){if(F){var Me=r.getSelection();if(!Me||Me.rangeCount===0||!Me.isCollapsed){p();return}var Se=Me.getRangeAt(0),Ze=Se.startContainer;if(Ze!==F.startNode){p();return}var nt=Se.startOffset;if(nt<F.startOffset){p();return}var Nt=(Ze.nodeType===3?Ze.nodeValue:"")||"",jt=Nt.substring(F.startOffset,nt);if(/\s/.test(jt)){p();return}F.query=jt,h(jt),D()}}function h(Me){var Se=(Me||"").toLowerCase();z=$.filter(function(Ze){if(!Se||Ze.title.toLowerCase().indexOf(Se)!==-1||Ze.description&&Ze.description.toLowerCase().indexOf(Se)!==-1)return!0;for(var nt=0;nt<Ze.keywords.length;nt++)if(String(Ze.keywords[nt]).toLowerCase().indexOf(Se)!==-1)return!0;return!1}).slice(0,u.slashCommandMaxItems),o=0,E()}function L(){x=r.iframe.ownerDocument,H=x.createElement("div"),H.className="rte-slash-popup";try{var Me=r.container||r.getEditable&&r.getEditable().closest&&r.getEditable().closest(".richtexteditor");Me&&Me.classList&&Me.classList.contains("rte-dark")&&(H.className+=" rte-slash-popup-dark")}catch{}H.setAttribute("role","listbox"),H.setAttribute("aria-label","Slash commands"),x.body.appendChild(H)}function E(){if(H){if(H.innerHTML="",!z.length){var Me=x.createElement("div");Me.className="rte-slash-empty",Me.textContent="No matching commands",H.appendChild(Me);return}for(var Se="",Ze=0;Ze<z.length;Ze++)(function(nt,Nt){if(nt.section!==Se){var jt=x.createElement("div");jt.className="rte-slash-section",jt.textContent=nt.section,H.appendChild(jt),Se=nt.section}var Vt=x.createElement("button");Vt.type="button",Vt.className="rte-slash-item"+(Nt===o?" rte-slash-item-active":""),Vt.setAttribute("role","option"),Vt.setAttribute("aria-selected",Nt===o?"true":"false"),Vt.setAttribute("data-index",Nt);var ut=x.createElement("span");ut.className="rte-slash-item-icon",ut.innerHTML=nt.iconSvg||le(),Vt.appendChild(ut);var sr=x.createElement("span");sr.className="rte-slash-item-body";var Fn=x.createElement("span");if(Fn.className="rte-slash-item-title",Fn.textContent=nt.title,sr.appendChild(Fn),nt.description){var Un=x.createElement("span");Un.className="rte-slash-item-desc",Un.textContent=nt.description,sr.appendChild(Un)}Vt.appendChild(sr),Vt.addEventListener("mousedown",function(Or){Or.preventDefault(),Or.stopPropagation(),o=Nt,d()}),Vt.addEventListener("click",function(Or){H&&(Or.preventDefault(),Or.stopPropagation(),o=Nt,d())}),Vt.addEventListener("mouseenter",function(){o!==Nt&&(o=Nt,A())}),H.appendChild(Vt)})(z[Ze],Ze)}}function A(){if(H){for(var Me=H.querySelectorAll(".rte-slash-item"),Se=0;Se<Me.length;Se++){var Ze=+Me[Se].getAttribute("data-index"),nt=Ze===o;Me[Se].classList.toggle("rte-slash-item-active",nt),Me[Se].setAttribute("aria-selected",nt?"true":"false")}C()}}function C(){if(H){var Me=H.querySelector(".rte-slash-item-active");if(Me){var Se=Me.offsetTop,Ze=Se+Me.offsetHeight;Se<H.scrollTop?H.scrollTop=Se:Ze>H.scrollTop+H.clientHeight&&(H.scrollTop=Ze-H.clientHeight)}}}function y(Me){z.length&&(o=(o+Me+z.length)%z.length,A())}function d(){if(!z.length){p();return}var Me=z[o],Se=F;if(p(),!(!Me||!Se)){w(Se);var Ze=r.getDocument();Ze.activeElement!==r.getEditable()&&!Ze.hasFocus()&&r.focus();try{Me.run(r)}catch(nt){console.warn("Slash command failed:",nt)}}}function w(Me){var Se=Me.startNode;if(Se){var Ze=Me.startOffset-(Me.triggerCharCount||0);Ze<0&&(Ze=0);var nt=r.getSelection();if(!(!nt||nt.rangeCount===0)){var Nt=nt.getRangeAt(0),jt,Vt;Se.nodeType===3&&Nt.startContainer===Se?(jt=Se,Vt=Nt.startOffset):(jt=Nt.startContainer,Vt=Nt.startOffset);var ut=r.getDocument().createRange();ut.setStart(Se,Ze),ut.setEnd(jt,Vt);try{ut.deleteContents()}catch{return}nt.removeAllRanges(),nt.addRange(ut)}}}function D(){if(!(!H||!F)){var Me=r.iframe,Se=Me.getBoundingClientRect(),Ze=F.range.getClientRects(),nt=Ze&&Ze.length?Ze[Ze.length-1]:null;nt||(nt=F.range.getBoundingClientRect());var Nt=Se.left+(nt.left||0)+window.pageXOffset,jt=Se.top+(nt.bottom||nt.top||0)+window.pageYOffset+4;H.style.position="absolute",H.style.left=Nt+"px",H.style.top=jt+"px";var Vt=window.innerHeight||document.documentElement.clientHeight,ut=H.getBoundingClientRect();ut.bottom>Vt-8&&Se.top+(nt.top||0)>ut.height+16&&(H.style.top=Se.top+(nt.top||0)+window.pageYOffset-ut.height-4+"px")}}function P(){H&&D()}function B(){var Me=r&&r.iframe&&r.iframe.ownerDocument||document;if(!Me.querySelector("style[data-rte-slashcommand]")){var Se=Me.createElement("style");Se.setAttribute("data-rte-slashcommand","1"),Se.textContent=["/* 2026-07-03 slash command polish */",".rte-slash-popup{position:absolute;z-index:2147483000;min-width:280px;max-width:min(390px,calc(100vw - 24px));max-height:min(360px,64vh);overflow-y:auto;overscroll-behavior:contain;padding:6px;background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(248,251,255,.96));background-clip:padding-box;border:1px solid rgba(148,163,184,.22);box-shadow:0 16px 36px rgba(29,78,216,.14),0 2px 8px rgba(15,23,42,.08);border-radius:8px;font-family:Aptos,'Segoe UI',sans-serif;font-size:13px;color:#172033;scrollbar-width:thin}",".rte-slash-section{position:sticky;top:0;z-index:1;margin:4px 0 2px;padding:6px 8px 4px;background:linear-gradient(180deg,rgba(248,251,255,.98),rgba(248,251,255,.86));color:#52657e;font-size:10px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}",".rte-slash-item{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:8px;width:100%;min-height:40px;padding:6px 8px;border:0;background:transparent;text-align:left;cursor:pointer;color:inherit;font:inherit;border-radius:8px}",".rte-slash-item:hover,.rte-slash-item-active{background:#eef4ff;color:#1559d6}",".rte-slash-item:focus-visible{outline:2px solid rgba(37,99,235,.22);outline-offset:2px}",".rte-slash-item-icon{flex:0 0 28px;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;color:#315277;background:#ffffff;border-radius:8px;box-shadow:inset 0 0 0 1px rgba(148,163,184,.18)}",".rte-slash-item-active .rte-slash-item-icon{color:#1559d6;background:#ffffff}",".rte-slash-item-icon svg{display:block;width:16px;height:16px;pointer-events:none}",".rte-slash-item-body{display:flex;flex-direction:column;min-width:0;flex:1}",".rte-slash-item-title{font-weight:780;font-size:13px;line-height:1.24;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",".rte-slash-item-desc{font-size:11px;color:#64748b;line-height:1.24;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",".rte-slash-item-active .rte-slash-item-desc{color:#315277}",".rte-slash-empty{padding:16px;color:#52657e;font-size:12px;font-weight:700;text-align:center}",".rte-slash-popup-dark{background:linear-gradient(180deg,#1e293b,#0f172a);border-color:#334155;color:#e2e8f0;box-shadow:0 20px 46px rgba(0,0,0,.5),0 2px 8px rgba(0,0,0,.4)}",".rte-slash-popup-dark .rte-slash-section{background:linear-gradient(180deg,rgba(30,41,59,.98),rgba(30,41,59,.86));color:#94a3b8}",".rte-slash-popup-dark .rte-slash-item:hover,.rte-slash-popup-dark .rte-slash-item-active{background:#1d4ed8;color:#fff}",".rte-slash-popup-dark .rte-slash-item-icon{color:#cbd5e1;background:#0f172a;box-shadow:inset 0 0 0 1px rgba(148,163,184,.25)}",".rte-slash-popup-dark .rte-slash-item-active .rte-slash-item-icon{color:#fff;background:#1e3a8a}",".rte-slash-popup-dark .rte-slash-item-desc{color:#94a3b8}",".rte-slash-popup-dark .rte-slash-item-active .rte-slash-item-desc{color:#dbeafe}",".rte-slash-popup-dark .rte-slash-empty{color:#94a3b8}"].join(`
71
71
  `),Me.head.appendChild(Se),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(Me,Se,"rte-slashcommand-style",Se.textContent)}}function Z(Me){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 4v16"/><path d="M14 4v16"/><path d="M6 12h8"/><text x="16" y="18" font-size="9" font-weight="700" fill="currentColor" stroke="none" font-family="-apple-system,Segoe UI,sans-serif">'+Me+"</text></svg>"}function fe(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 4h5"/><path d="M13 4v16"/><path d="M17 4v16"/><path d="M13 4a4 4 0 000 8h0"/></svg>'}function re(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="5" cy="7" r="1"/><circle cx="5" cy="12" r="1"/><circle cx="5" cy="17" r="1"/><path d="M9 7h11"/><path d="M9 12h11"/><path d="M9 17h11"/></svg>'}function ie(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6h1v3"/><path d="M4 9h2"/><path d="M4 14h2a1 1 0 010 2H4v1h2"/><path d="M9 7h11"/><path d="M9 12h11"/><path d="M9 17h11"/></svg>'}function ae(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 8c-2 0-3 1.5-3 4s1 4 3 4V8z"/><path d="M16 8c-2 0-3 1.5-3 4s1 4 3 4V8z"/></svg>'}function de(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 8l-4 4 4 4"/><path d="M15 8l4 4-4 4"/></svg>'}function se(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 12h16"/><path d="M4 6h10"/><path d="M4 18h10"/></svg>'}function U(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="5" width="16" height="14" rx="1"/><path d="M4 10h16"/><path d="M4 15h16"/><path d="M10 5v14"/><path d="M16 5v14"/></svg>'}function Q(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><circle cx="9" cy="10" r="1.5"/><path d="M21 16l-5-5-8 8"/></svg>'}function j(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 14a4 4 0 005.7 0l3-3a4 4 0 10-5.7-5.7L11 7"/><path d="M14 10a4 4 0 00-5.7 0l-3 3a4 4 0 105.7 5.7L13 17"/></svg>'}function J(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="9"/><path d="M8 14c1 1.5 2.5 2 4 2s3-.5 4-2"/><circle cx="9" cy="10" r=".8"/><circle cx="15" cy="10" r=".8"/></svg>'}function Y(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="2"/><path d="M4 9h16"/><path d="M9 9v11"/></svg>'}function te(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="6" width="16" height="14" rx="1.5"/><path d="M4 10h16"/><path d="M9 3v4"/><path d="M15 3v4"/></svg>'}function le(){return'<svg viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="12" r="3"/></svg>'}function pe(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M12 9v4"/><path d="M12 16h.01"/></svg>'}function ye(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="7" height="16" rx="1"/><rect x="14" y="4" width="7" height="16" rx="1"/></svg>'}function me(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6-6 6"/></svg>'}function ee(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 5h9l-5 14"/><path d="M14 11h6"/><path d="M14 16h6"/></svg>'}function ue(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 10h18"/><circle cx="7" cy="7.5" r=".6" fill="currentColor"/></svg>'}function ce(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 17l4-10 4 10"/><path d="M5.5 13.5h5"/><path d="M14 14a2.5 2.5 0 105 0v-3"/><path d="M14 20l2 2 4-4"/></svg>'}function ve(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="7" width="18" height="10" rx="5"/><circle cx="8" cy="12" r="1.6"/><path d="M12 12h6"/></svg>'}function be(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M4 7l8 6 8-6"/></svg>'}function ke(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="6" height="5" rx="1"/><rect x="15" y="3" width="6" height="5" rx="1"/><rect x="9" y="16" width="6" height="5" rx="1"/><path d="M6 8v3h12V8M12 11v5"/></svg>'}function Pe(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 9v6h4l5 4V5L8 9H4z"/><path d="M16 8.5a4 4 0 010 7"/><path d="M19 6a7 7 0 010 12"/></svg>'}function Le(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3v18"/><path d="M8 7l4-4 4 4"/><path d="M8 17l4 4 4-4"/></svg>'}function qe(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6H10a3 3 0 000 6h3"/><path d="M13 6v12"/><path d="M17 6v12"/><path d="M7 18l-3-3 3-3"/></svg>'}function Re(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 6H7a3 3 0 000 6h3"/><path d="M11 6v12"/><path d="M7 6v12"/><path d="M17 12l3 3-3 3"/></svg>'}function Ie(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M13 4v16"/><path d="M17 4v16"/><path d="M13 4H9a4 4 0 000 8h4"/></svg>'}function Ve(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M7 15l4-5 3 3 3-4"/></svg>'}function Ye(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6h1v4"/><path d="M4 14h2l-2 3h2"/><path d="M10 7h10"/><path d="M10 12h10"/><path d="M10 17h10"/></svg>'}function ft(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 4v16"/><path d="M4 8l3-4 3 4"/><path d="M14 6h6"/><path d="M14 12h5"/><path d="M14 18h3"/></svg>'}function ht(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3l6 6L9 21H3v-6z"/><path d="M13 5l6 6"/></svg>'}function At(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 13a4 4 0 005.7 0l2-2a4 4 0 10-5.7-5.7l-1 1"/><path d="M13 11a4 4 0 00-5.7 0l-2 2a4 4 0 105.7 5.7l1-1"/><path d="M16 18l2 2 4-4"/></svg>'}function Rt(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 4H7a2 2 0 00-2 2v3a2 2 0 01-2 2 2 2 0 012 2v3a2 2 0 002 2h2"/><path d="M15 4h2a2 2 0 012 2v3a2 2 0 002 2 2 2 0 00-2 2v3a2 2 0 01-2 2h-2"/></svg>'}function ar(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7h8"/><path d="M4 12h5"/><path d="M4 17h8"/><path d="M14 12h6"/><path d="M17 9l3 3-3 3"/></svg>'}function ze(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6h7"/><path d="M4 11h9"/><path d="M4 16h5"/><path d="M17 6h3"/><path d="M17 11h3"/><path d="M17 16h3"/></svg>'}function je(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6h9"/><path d="M4 11h9"/><path d="M4 18h16"/><path d="M17 4v6"/><path d="M20 7h-6"/></svg>'}function We(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 3h11a2 2 0 012 2v4a2 2 0 01-2 2H6z"/><path d="M12 11v3"/><path d="M10 14h4v5a2 2 0 01-4 0z"/></svg>'}function Oe(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 18L8 6l5 12"/><path d="M4.6 14.5h6.8"/><path d="M21 11.5a3 3 0 00-6 0"/><path d="M21 11.5V18"/><path d="M21 15.5a3 3 0 11-6 0 3 3 0 016 0z"/></svg>'}function pt(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="7" height="7" rx="1.5"/><path d="M4.5 7.5 6 9l2.5-3"/><line x1="13" y1="6" x2="21" y2="6"/><line x1="13" y1="13" x2="21" y2="13"/><line x1="3" y1="17" x2="21" y2="17"/><line x1="3" y1="20.5" x2="14" y2="20.5"/></svg>'}function Bt(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l3 3 3-3"/><path d="M9 18l3-3 3 3"/><line x1="4" y1="12" x2="20" y2="12"/></svg>'}function Ge(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="6" width="20" height="12" rx="2"/><path d="M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M9 14h6"/></svg>'}function yt(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="10.5" cy="10.5" r="6.5"/><line x1="15.5" y1="15.5" x2="21" y2="21"/></svg>'}function Et(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="9" width="18" height="7" rx="1"/><path d="M7 9V5h10v4"/><line x1="7" y1="20" x2="17" y2="20"/></svg>'}function lt(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M3 12h3M18 12h3M12 3v3M12 18v3"/></svg>'}function zt(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="5" width="20" height="14" rx="2"/><path d="M6 15V9l3 3 3-3v6"/><path d="M17 9v6M14.5 12.5L17 15l2.5-2.5"/></svg>'}function lr(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 21V9a7 7 0 0114 0v12l-3-2-2 2-2-2-2 2-3-2z"/><circle cx="9.5" cy="10" r="1" fill="currentColor"/><circle cx="14.5" cy="10" r="1" fill="currentColor"/></svg>'}function Zt(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3H7a2 2 0 00-2 2v14a2 2 0 002 2h10a2 2 0 002-2V8z"/><path d="M14 3v5h5"/><path d="M9 13h6M9 17h4"/></svg>'}function $t(){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3H7a2 2 0 00-2 2v14a2 2 0 002 2h10a2 2 0 002-2V8z"/><path d="M14 3v5h5"/><path d="M8.5 12l1.3 5 2.2-3.6 2.2 3.6 1.3-5"/></svg>'}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_smartchips=RTE_Plugin_SmartChips,RTE_DefaultConfig.chipResolver=RTE_DefaultConfig.chipResolver||null,RTE_DefaultConfig.chipDateFormat=RTE_DefaultConfig.chipDateFormat||null;function RTE_Plugin_SmartChips(){var N=this,u,r;N.PluginName="SmartChips",N.InitConfig=function(W){u=W},N.InitEditor=function(W){r=W,r.attachEvent("exec_command_insertdatechip",function(q){q.returnValue=!0,N.OpenDateChip()}),r.attachEvent("exec_command_insertchip",function(q){q.returnValue=!0,N.OpenChipMenu()}),K()};function x(W,q,b,m){var k=W.ownerDocument.createElement(q);return b&&(k.style.cssText=b),m&&(k.className=m),W.appendChild(k),k}function H(W){return String(W??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function $(W){if(u.chipDateFormat&&typeof u.chipDateFormat=="function")try{return String(u.chipDateFormat(W))}catch{}return F[W.getMonth()]+" "+W.getDate()+", "+W.getFullYear()}function z(W){function q(b){return(b<10?"0":"")+b}return W.getFullYear()+"-"+q(W.getMonth()+1)+"-"+q(W.getDate())}var o={date:'<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.6"><rect x="2" y="3" width="12" height="11" rx="1.5"/><path d="M2 6.5h12"/><path d="M5 1.5v3"/><path d="M11 1.5v3"/></svg>',person:'<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.6"><circle cx="8" cy="5" r="2.6"/><path d="M3 13.5c0-2.5 2.2-4 5-4s5 1.5 5 4"/></svg>',link:'<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.6"><path d="M6.5 9.5a3 3 0 004.2 0l2-2a3 3 0 10-4.2-4.2L7.4 4.3"/><path d="M9.5 6.5a3 3 0 00-4.2 0l-2 2a3 3 0 104.2 4.2l1-1"/></svg>'};function O(W,q,b,m){var k=o[W]||"",M='class="rte-chip rte-chip-'+H(W)+'" data-rte-chip="'+H(W)+'" data-rte-chip-value="'+H(b||q)+'" contenteditable="false"',I='<span class="rte-chip-icon">'+k+'</span><span class="rte-chip-label">'+H(q)+"</span>";if(W==="link"&&m){var R=/^(javascript|data|vbscript):/i.test(m)?"#":m;return"<a "+M+' href="'+H(R)+'" target="_blank" rel="noopener noreferrer">'+I+"</a>"}return"<span "+M+">"+I+"</span>"}function V(W,q,b,m){K(),r.insertHTML(O(W,q,b,m)+"\u200B"),r.focus()}N.OpenDateChip=function(){var W=r.createDialog(r.getLangText&&r.getLangText("insertdatechiptitle")||"Date","rte-dialog-datechip"),q=typeof W.close=="function"?function(){W.close()}:function(){r.closeCurrentPopup()},b=x(W,"div","","rte-chip-dialog rte-chip-date-dialog");x(b,"div","","rte-chip-dialog-copy").textContent="Choose a quick date or insert a custom date chip.";function m(f,_){var v=x(b,"button","","rte-chip-quick");return v.type="button",v.textContent=f+" \u2014 "+$(_),v.onmouseover=function(){v.style.background="#eef2ff"},v.onmouseout=function(){v.style.background="transparent"},v.textContent="",x(v,"span","","rte-chip-quick-label").textContent=f,x(v,"span","","rte-chip-quick-value").textContent=$(_),v.onmouseover=null,v.onmouseout=null,v.setAttribute("aria-label","Insert "+f+", "+$(_)),v.onclick=function(){q(),V("date",$(_),z(_))},v}var k=new Date(r.__chipNow||Date.now());function M(f,_){var v=new Date(f.getTime());return v.setDate(v.getDate()+_),v}m("Today",k),m("Tomorrow",M(k,1)),m("Yesterday",M(k,-1)),m("Next week",M(k,7));var I=x(b,"div","","rte-chip-pick-row"),R=x(I,"input","","rte-chip-input");R.type="date",R.value=z(k),R.setAttribute("aria-label","Custom date");var l=x(I,"button","","rte-chip-action rte-chip-action-primary");l.type="button",l.textContent="Insert",l.onclick=function(){var f=(R.value||"").split("-");if(f.length===3){var _=new Date(parseInt(f[0],10),parseInt(f[1],10)-1,parseInt(f[2],10));q(),V("date",$(_),R.value)}else q()},setTimeout(function(){R.focus()},0)},N.OpenChipMenu=function(){var W=r.createDialog(r.getLangText&&r.getLangText("insertchiptitle")||"Insert chip","rte-dialog-chip"),q=typeof W.close=="function"?function(){W.close()}:function(){r.closeCurrentPopup()},b=x(W,"div","","rte-chip-dialog rte-chip-menu-dialog");x(b,"div","","rte-chip-dialog-copy").textContent="Insert a date, person, or link chip into the document.";var m=x(b,"div","","rte-chip-type-tabs");m.setAttribute("role","tablist"),m.setAttribute("aria-label","Chip type");var k=[["date","Date"],["person","Person"],["link","Link"]],M="date",I=x(b,"div","","rte-chip-dialog-body"),R={};k.forEach(function(v){var s=x(m,"button","","rte-chip-type-tab");s.type="button",s.textContent=v[1],s.setAttribute("role","tab"),s.setAttribute("aria-selected",v[0]===M?"true":"false"),R[v[0]]=s,s.onclick=function(){M=v[0],l(),f()}});function l(){k.forEach(function(v){var s=v[0]===M;R[v[0]].classList.toggle("is-selected",s),R[v[0]].setAttribute("aria-selected",s?"true":"false")})}function f(){if(I.innerHTML="",M==="date"){var v=x(I,"div","","rte-chip-field-label");v.textContent="Insert a date chip:";var s=x(I,"input","","rte-chip-input");s.type="date",s.value=z(new Date(r.__chipNow||Date.now())),s.setAttribute("aria-label","Date chip value"),_(function(){var h=(s.value||"").split("-");if(h.length===3){var L=new Date(+h[0],+h[1]-1,+h[2]);q(),V("date",$(L),s.value)}})}else{var c=x(I,"div","","rte-chip-field-label");c.textContent=M==="person"?"Name (or search):":"URL:";var p=x(I,"input","","rte-chip-input");p.type=M==="link"?"url":"text",p.placeholder=M==="person"?"Jane Doe":"https://example.com",p.setAttribute("aria-label",M==="person"?"Person chip name":"Link chip URL");var g=x(I,"div","","rte-chip-results");g.setAttribute("role","listbox"),g.setAttribute("aria-label","Chip suggestions"),u.chipResolver&&typeof u.chipResolver=="function"&&(p.oninput=function(){var h=p.value.trim();if(g.innerHTML="",!!h)try{var L=u.chipResolver(h,M);L&&L.then&&L.then(function(E){g.innerHTML="",(E||[]).slice(0,6).forEach(function(A){var C=x(g,"button","","rte-chip-suggestion");C.type="button",C.textContent=A.label||A.value,C.setAttribute("role","option"),C.onclick=function(){q(),V(M,A.label||A.value,A.value||A.label,A.href)}})})}catch{}}),_(function(){var h=p.value.trim();if(!h){q();return}if(M==="link"){if(/^(javascript|data|vbscript|file):/i.test(h)){p.style.borderColor="#dc2626",p.placeholder="Enter a valid http(s) URL",p.value="";return}if(!/^https?:\/\//i.test(h))if(/^[a-z0-9.-]+\.[a-z]{2,}([\/?#].*)?$/i.test(h))h="https://"+h;else{p.style.borderColor="#dc2626",p.placeholder="Enter a valid http(s) URL",p.value="";return}q(),V("link",h.replace(/^https?:\/\//i,"").replace(/\/$/,""),h,h)}else q(),V("person",h,h)}),setTimeout(function(){p.focus()},0)}}function _(v){var s=x(I,"div","","rte-chip-dialog-footer"),c=x(s,"button","","rte-chip-action rte-chip-action-primary");c.type="button",c.textContent="Insert",c.onclick=v}l(),f()};function K(){var W=[".rte-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px 2px 6px;margin:0 1px;border:1px solid rgba(100,116,139,.16);border-radius:999px;background:linear-gradient(180deg,#f8fbff,#eef4ff);color:#315277;font-size:.92em;line-height:1.45;white-space:nowrap;text-decoration:none;vertical-align:baseline;cursor:default;user-select:none;box-shadow:0 1px 2px rgba(15,23,42,.06)}",".rte-chip-icon{display:inline-flex;align-items:center;opacity:.9}",".rte-chip-date{background:linear-gradient(180deg,#f0fdff,#e6f8fb);color:#0e7490;border-color:rgba(14,116,144,.18)}",".rte-chip-person{background:linear-gradient(180deg,#f6f7ff,#eef2ff);color:#3730a3;border-color:rgba(55,48,163,.18)}",".rte-chip-link{background:linear-gradient(180deg,#f5fff8,#ecfdf4);color:#15803d;border-color:rgba(21,128,61,.18);cursor:pointer}",".rte-chip-link:hover{text-decoration:underline}"].join(`
72
72
  `);try{var q=r.getDocument();if(!q)return;var b=q.head||q.getElementsByTagName&&q.getElementsByTagName("head")[0]||q.documentElement;if(b&&!q.querySelector("style[data-rte-smartchips]")){var m=q.createElement("style");m.setAttribute("data-rte-smartchips","1"),m.textContent=W,b.appendChild(m),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(q,m,"rte-smartchips-st",m.textContent)}}catch{}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_spellcheck=RTE_Plugin_SpellCheck,RTE_DefaultConfig.spellCheckResolver=RTE_DefaultConfig.spellCheckResolver||null,typeof RTE_DefaultConfig.spellCheckEnabled>"u"&&(RTE_DefaultConfig.spellCheckEnabled=!0);function RTE_Plugin_SpellCheck(){var N=this,u,r;N.PluginName="SpellCheck",N.InitConfig=function(o){u=o},N.InitEditor=function(o){r=o;try{var O=r.getEditable&&r.getEditable();O&&O.setAttribute("spellcheck",u.spellCheckEnabled===!1?"false":"true")}catch{}r.attachEvent("exec_command_spellcheck",function(V){V.returnValue=!0,N.RunSpellCheck()}),z()};function x(o,O,V,K){var W=o.ownerDocument.createElement(O);return V&&(W.style.cssText=V),K&&(W.className=K),o.appendChild(W),W}function H(o){return String(o??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function F(o){try{!r.InvokeEventHook||r.InvokeEventHook("customdialog","spellcheck",o)}catch{}try{var O=r.getEditable(),V=O.ownerDocument,K=V.createElement("div");K.className="rte-spell-toast",K.setAttribute("role","status"),K.setAttribute("aria-live","polite"),K.textContent=o,V.body.appendChild(K),setTimeout(function(){K.parentNode&&K.parentNode.removeChild(K)},2600)}catch{}}function $(o,O){try{for(var V=r.getEditable(),K=r.getDocument(),W=K.createTreeWalker(V,NodeFilter.SHOW_TEXT,null),q,b=new RegExp("\\b"+o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b");q=W.nextNode();){var m=q.parentNode;if(!(m&&(m.nodeName==="CODE"||m.nodeName==="PRE"))){var k=q.data.search(b);if(k>=0)return q.data=q.data.substring(0,k)+O+q.data.substring(k+o.length),!0}}}catch{}return!1}N.RunSpellCheck=function(){if(!u.spellCheckResolver||typeof u.spellCheckResolver!="function"){try{var o=r.getEditable();o.setAttribute("spellcheck","true"),o.focus()}catch{}F(r.getLangText&&r.getLangText("spellchecknative")||"Browser spell-check is on \u2014 misspellings are underlined as you type.");return}var O;try{O=r.getEditable().innerText||""}catch{O=""}if(!O.trim()){F("Nothing to check.");return}var V=r.createDialog(r.getLangText&&r.getLangText("spellchecktitle")||"Spelling","rte-dialog-spell"),K=typeof V.close=="function"?function(){V.close()}:function(){r.closeCurrentPopup()},W=x(V,"div","box-sizing:border-box;width:min(420px,calc(100vw - 32px));max-height:60vh;overflow:auto;padding:14px;font:13px -apple-system,Segoe UI,sans-serif"),q=x(W,"div","color:#64748b;margin-bottom:8px");q.innerText="Checking\u2026";var b=x(W,"div","");function m(f){if(b.innerHTML="",!f||!f.length){q.innerText=r.getLangText&&r.getLangText("spellcheckclean")||"No spelling issues found.";return}q.innerText=f.length+" issue"+(f.length===1?"":"s")+" found.",f.forEach(function(_){if(!(!_||!_.word)){var v=x(b,"div","padding:8px 0;border-bottom:1px solid rgba(15,23,42,.08)","rte-spell-row"),s=x(v,"div","font-weight:600;color:#b91c1c;margin-bottom:4px");s.textContent=_.word;var c=x(v,"div","display:flex;flex-wrap:wrap;gap:6px"),p=(_.suggestions||[]).slice(0,6);p.length||(x(c,"span","font-size:12px;color:#94a3b8").textContent="(no suggestions)"),p.forEach(function(g){var h=x(c,"button","font-size:12px;padding:4px 9px;border:1px solid #cbd5e1;border-radius:6px;background:#f8fbff;color:#315277;cursor:pointer");h.type="button",h.textContent=g,h.onclick=function(){$(_.word,g)&&(v.style.opacity="0.45",s.innerHTML=H(_.word)+' &rarr; <span style="color:#16a34a">'+H(g)+"</span>",c.innerHTML="")}})}})}var k=!1;function M(f){k||(k=!0,m(f))}try{var I=u.spellCheckResolver(O);I&&typeof I.then=="function"?(I.then(function(f){M(f||[])},function(){q.innerText="Spell-check service error."}),setTimeout(function(){k||(q.innerText="Spell-check timed out.",k=!0)},12e3)):M(I||[])}catch{q.innerText="Spell-check error."}var R=x(W,"div","display:flex;justify-content:flex-end;margin-top:12px"),l=x(R,"button","padding:6px 14px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;cursor:pointer");l.type="button",l.textContent="Done",l.onclick=function(){K(),r.focus()}};function z(){var o=["/* 2026-07-12 spell-check feedback precision */",".rte-spell-toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:9px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#172033;font:600 13px/1.35 -apple-system,Segoe UI,sans-serif;z-index:2147483600;box-shadow:0 10px 24px rgba(15,23,42,.14)}",".rte-spell-row:last-child{border-bottom:0}"].join(`
73
- `);try{var O=r&&r.iframe&&r.iframe.ownerDocument||document;if(!O.querySelector("style[data-rte-spellcheck]")){var V=O.createElement("style");V.setAttribute("data-rte-spellcheck","1"),V.textContent=o,(O.head||O.documentElement).appendChild(V),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(O,V,"rte-spellcheck-st",V.textContent)}}catch{}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_stateinspector=RTE_Plugin_StateInspector;function RTE_Plugin_StateInspector(){var N=this,u,r,x=null,H=null,F=null,$=null,z=null,o=0,O="issues",V=[],K=[],W=60,q=[{id:"issues",label:"Issues"},{id:"tree",label:"Tree"},{id:"selection",label:"Selection"},{id:"plugins",label:"Plugins"},{id:"log",label:"Log"}],b={A:1,ABBR:1,B:1,BDI:1,BDO:1,CITE:1,CODE:1,DEL:1,DFN:1,EM:1,I:1,INS:1,KBD:1,MARK:1,Q:1,S:1,SAMP:1,SMALL:1,SPAN:1,STRONG:1,SUB:1,SUP:1,U:1,VAR:1,FONT:1},m={AREA:1,BASE:1,BR:1,COL:1,EMBED:1,HR:1,IMG:1,INPUT:1,LINK:1,META:1,PARAM:1,SOURCE:1,TRACK:1,WBR:1},k={ADDRESS:1,ARTICLE:1,ASIDE:1,BLOCKQUOTE:1,DIV:1,DL:1,DT:1,DD:1,FIELDSET:1,FIGCAPTION:1,FIGURE:1,FOOTER:1,FORM:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1,HEADER:1,HR:1,LI:1,MAIN:1,NAV:1,OL:1,P:1,PRE:1,SECTION:1,TABLE:1,UL:1},M=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/;N.PluginName="StateInspector",N.InitConfig=function(ee){u=ee,u.stateInspectorEnabled!==!1&&(u.stateInspectorTitle=u.stateInspectorTitle||"State inspector",u.stateInspectorHint=u.stateInspectorHint||"Derived document model, structural checks, and a copyable snapshot for bug reports.",u.stateInspectorEmptyText=u.stateInspectorEmptyText||"No content to inspect yet.",typeof u.stateInspectorAutoOpen!="boolean"&&(u.stateInspectorAutoOpen=!1),typeof u.stateInspectorToolbarButton!="boolean"&&(u.stateInspectorToolbarButton=!1),typeof u.stateInspectorMaxDepth!="number"&&(u.stateInspectorMaxDepth=24),typeof u.stateInspectorLogLimit=="number"&&(W=Math.max(10,Math.min(500,u.stateInspectorLogLimit))),V=R(u),u.stateInspectorToolbarButton&&(I("toolbar_default","#{stateinspector}"),I("toolbar_full","#{stateinspector}")))},N.InitEditor=function(ee){r=ee,u.stateInspectorEnabled!==!1&&(r.stateInspector={close:function(){ae()},isOpen:function(){return!!(x&&x.classList.contains("is-open"))},issues:function(){return A(v()).issues},log:function(){return K.slice(0)},open:function(){ie()},plugins:function(){return V.slice(0)},refresh:function(){Q()},snapshot:function(){return g()},toggle:function(){re()}},D(),r.toolbarFactoryMap=r.toolbarFactoryMap||{},r.toolbarFactoryMap.stateinspector=function(ue){return r.createToolbarButton(ue)},r.attachEvent("exec_command_stateinspector",function(ue){ue.returnValue=!0,ue.stopBubble=!0,re()}),r.attachEvent("change",function(){l("change"),de()}),r.attachEvent("selectionchange",function(){l("selectionchange"),de()}),r.slashCommands&&r.slashCommands.register&&r.slashCommands.register({id:"stateinspector",section:"Tools",title:u.stateInspectorTitle,description:"Inspect document structure, selection, and structural issues",keywords:["inspect","debug","devtools","state","structure"],run:function(){ie()}}),P(),u.stateInspectorAutoOpen&&ie())};function I(ee,ue){u[ee]&&u[ee].indexOf(ue)===-1&&(u[ee]=u[ee]+ue)}function R(ee){var ue=[];for(var ce in ee)ce[0]!=="p"||ce.substr(0,7)!=="plugin_"||!ee[ce]||!(ee[ce]instanceof Function)||ue.push({index:ue.length,key:ce,name:ce.substring(7)});return ue}function l(ee){K.push({at:Date.now(),event:ee}),K.length>W&&K.splice(0,K.length-W)}function f(ee){var ue={},ce=ee.attributes;if(!ce)return ue;for(var ve=0;ve<ce.length;ve++){var be=ce[ve].value;ue[ce[ve].name]=be.length>220?be.substring(0,220)+"\u2026":be}return ue}function _(ee,ue,ce,ve){if(ee.nodeType===3){var be=ee.nodeValue||"";return ve.textNodes++,ve.characters+=be.length,{type:"text",length:be.length,text:be.length>80?be.substring(0,80)+"\u2026":be}}if(ee.nodeType===8)return ve.comments++,{type:"comment",length:(ee.nodeValue||"").length};if(ee.nodeType!==1)return null;ve.elements++;var ke=ee.nodeName;ve.tags[ke]=(ve.tags[ke]||0)+1;var Pe={type:"element",name:ke.toLowerCase(),attrs:f(ee),children:[]};if(ue>=ce)return Pe.truncated=!0,Pe.childCount=ee.childNodes.length,Pe;for(var Le=0;Le<ee.childNodes.length;Le++){var qe=_(ee.childNodes[Le],ue+1,ce,ve);qe&&Pe.children.push(qe)}return Pe}function v(){var ee=r&&r.getEditable?r.getEditable():null,ue={elements:0,textNodes:0,comments:0,characters:0,tags:{}};if(!ee)return{root:null,counters:ue,editable:null};for(var ce=Math.max(2,u.stateInspectorMaxDepth||24),ve={type:"element",name:"root",attrs:{},children:[]},be=0;be<ee.childNodes.length;be++){var ke=_(ee.childNodes[be],1,ce,ue);ke&&ve.children.push(ke)}return{root:ve,counters:ue,editable:ee}}function s(){var ee=r&&r.getDocument?r.getDocument():null,ue=r&&r.getEditable?r.getEditable():null,ce={available:!1};if(!ee||!ee.getSelection)return ce;var ve;try{ve=ee.getSelection()}catch{return ce}if(!ve||ve.rangeCount===0)return ce;var be;try{be=ve.getRangeAt(0)}catch{return ce}if(!be)return ce;ce.available=!0,ce.collapsed=!!be.collapsed,ce.anchor=c(be.startContainer,be.startOffset),ce.focus=c(be.endContainer,be.endOffset),ce.insideEditable=!!(ue&&ue.contains(be.startContainer)&&ue.contains(be.endContainer));try{var ke=String(be.toString()||"");ce.textLength=ke.length,ce.text=ke.length>120?ke.substring(0,120)+"\u2026":ke}catch{ce.textLength=0}return ce.block=p(be.startContainer,ue),ce}function c(ee,ue){if(!ee)return{node:"(none)",offset:ue};if(ee.nodeType===3){var ce=ee.nodeValue||"";return{node:"#text",offset:ue,length:ce.length,zeroLength:ce.length===0}}return{node:ee.nodeName?ee.nodeName.toLowerCase():"(unknown)",offset:ue,childCount:ee.childNodes?ee.childNodes.length:0}}function p(ee,ue){for(var ce=[],ve=ee;ve&&ve!==ue;)ve.nodeType===1&&ce.unshift(ve.nodeName.toLowerCase()),ve=ve.parentNode;return ce.join(" > ")}function g(){var ee=v(),ue=A(ee);return{snapshotVersion:1,generatedAt:new Date().toISOString(),counters:ee.counters,issues:ue.issues,plugins:V.slice(0),recentEvents:K.slice(-20),selection:s(),tree:ee.root}}function h(ee,ue,ce,ve,be){ee.push({id:ue,severity:ce,message:ve,detail:be||""})}function L(ee,ue){for(var ce=[],ve=ee;ve&&ve!==ue&&ve.nodeType===1;){var be=ve.nodeName.toLowerCase();ve.id&&(be+="#"+ve.id),ce.unshift(be),ve=ve.parentNode}return ce.join(" > ")}function E(ee){if((ee.textContent||"").replace(/[\s\u200B\uFEFF]/g,"")!=="")return!0;for(var ue=0;ue<ee.childNodes.length;ue++){var ce=ee.childNodes[ue];if(ce.nodeType===1&&m[ce.nodeName])return!0}return!1}function A(ee){var ue=[],ce=ee.editable;if(!ce)return{issues:ue};for(var ve=ce.ownerDocument.createTreeWalker(ce,5,null,!1),be=0,ke;ke=ve.nextNode();){if(ke.nodeType===3){y(ke,ce,ue);continue}d(ke,ce,ue);var Pe=C(ke);Pe&&(be&&Pe>be+1&&h(ue,"heading-skip","warn","Heading level jumps from h"+be+" to h"+Pe,L(ke,ce)),be=Pe)}for(var Le=0;Le<ce.childNodes.length;Le++){var qe=ce.childNodes[Le];qe.nodeType===1&&qe.nodeName==="IMG"&&w(qe,ce,ue)}return{issues:ue}}function C(ee){var ue=ee.nodeName;return ue.length===2&&ue[0]==="H"&&ue[1]>="1"&&ue[1]<="6"?parseInt(ue[1],10):0}function y(ee,ue,ce){var ve=ee.nodeValue||"";if(ve.length===0){h(ce,"zero-length-text","warn","Zero-length text node",L(ee.parentNode,ue));return}M.test(ve)&&h(ce,"control-characters","error","Text contains control characters - Word will reject an exported .docx",L(ee.parentNode,ue))}function d(ee,ue,ce){for(var ve=ee.nodeName,be=L(ee,ue),ke=ee.attributes,Pe=0;ke&&Pe<ke.length;Pe++){var Le=ke[Pe].name.toLowerCase(),qe=ke[Pe].value||"";if(Le.indexOf("on")===0&&Le.length>2&&h(ce,"event-handler-attribute","error","Inline event handler "+Le+" present in document content",be),Le==="href"||Le==="src"||Le==="xlink:href"){var Re=qe.replace(/[\u0000-\u0020]/g,"").toLowerCase();Re.indexOf("javascript:")===0?h(ce,"unsafe-url-scheme","error","javascript: URL in "+Le,be):(Re.indexOf("data:text/html")===0||Re.indexOf("data:image/svg+xml")===0)&&h(ce,"unsafe-url-scheme","error","Scriptable data: URL in "+Le,be)}}if(ve==="IFRAME"&&ee.hasAttribute("srcdoc")&&h(ce,"iframe-srcdoc","error","iframe[srcdoc] executes when the saved content is rendered downstream",be),b[ve]&&!E(ee)&&h(ce,"empty-inline","warn","Empty inline <"+ve.toLowerCase()+"> - a caret entering it cannot leave by typing",be),b[ve]&&ee.parentNode&&ee.parentNode.nodeName===ve&&h(ce,"nested-duplicate-inline","warn","<"+ve.toLowerCase()+"> nested directly inside another <"+ve.toLowerCase()+">",be),b[ve])for(var Ie=0;Ie<ee.childNodes.length;Ie++){var Ve=ee.childNodes[Ie];if(Ve.nodeType===1&&k[Ve.nodeName]){h(ce,"block-inside-inline","warn","Block <"+Ve.nodeName.toLowerCase()+"> inside inline <"+ve.toLowerCase()+">",be);break}}if(ve==="LI"){var Ye=ee.parentNode?ee.parentNode.nodeName:"";Ye!=="UL"&&Ye!=="OL"&&h(ce,"orphan-list-item","warn","<li> outside a <ul> or <ol>",be)}ve==="IMG"&&w(ee,ue,ce),ee.hasAttribute&&ee.hasAttribute("data-rte-atomic")&&ee.getAttribute("contenteditable")!=="false"&&h(ce,"atomic-not-protected","error",'Atomic element without contenteditable="false"',be)}function w(ee,ue,ce){if(!(ee.getAttribute("role")==="presentation"||ee.getAttribute("aria-hidden")==="true")){var ve=ee.getAttribute("alt");ve===null&&h(ce,"image-missing-alt","warn","Image has no alt attribute",L(ee,ue))}}function D(){var ee=u.container.ownerDocument;if(!ee.getElementById("rte-state-inspector-style")){var ue=ee.createElement("style");ue.id="rte-state-inspector-style",ue.innerHTML=[".rte-state-inspector-shell{display:flex;align-items:stretch;gap:10px;}",".rte-state-inspector-shell>.rte-state-inspector-host{flex:1 1 auto;min-width:0;}",".rte-state-inspector-panel{display:none;flex:0 0 340px;min-width:290px;max-width:min(400px,36vw);border:1px solid rgba(148,163,184,.22);border-radius:8px;background:#fff;box-shadow:0 14px 32px rgba(29,78,216,.1),0 2px 8px rgba(15,23,42,.06);overflow:hidden;color:#172033;font-family:Aptos,'Segoe UI',sans-serif;}",".rte-state-inspector-shell.is-open>.rte-state-inspector-panel{display:flex;flex-direction:column;}",".rte-state-inspector-header{padding:12px 12px 9px 14px;border-bottom:1px solid rgba(148,163,184,.16);background:rgba(248,251,255,.72);}",".rte-state-inspector-kicker{font-size:10px;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:#52657e;font-weight:850;}",".rte-state-inspector-title{margin-top:3px;font-size:15px;line-height:1.2;font-weight:850;color:#172033;}",".rte-state-inspector-copy{margin-top:5px;font-size:12px;line-height:1.42;color:#52657e;}",".rte-state-inspector-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px 8px 14px;border-bottom:1px solid rgba(148,163,184,.16);}",".rte-state-inspector-summary{min-width:0;font-size:12px;font-weight:750;color:#52657e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}",".rte-state-inspector-actions{display:flex;gap:6px;flex:0 0 auto;}",".rte-state-inspector-btn{appearance:none;border:1px solid rgba(100,116,139,.18);background:#fff;color:#315277;cursor:pointer;font-size:12px;font-weight:750;padding:6px 9px;border-radius:7px;line-height:1;}",".rte-state-inspector-btn:hover,.rte-state-inspector-btn:focus-visible{background:#eef4ff;color:#0f3f9f;border-color:rgba(37,99,235,.28);}",".rte-state-inspector-tabs{display:flex;gap:2px;padding:8px 10px 0 10px;border-bottom:1px solid rgba(148,163,184,.16);}",".rte-state-inspector-tab{appearance:none;border:1px solid transparent;border-bottom:none;background:transparent;color:#52657e;cursor:pointer;font-size:12px;font-weight:800;padding:7px 10px;border-radius:7px 7px 0 0;line-height:1;}",".rte-state-inspector-tab:hover,.rte-state-inspector-tab:focus-visible{background:#f8fbff;color:#0f3f9f;}",".rte-state-inspector-tab[aria-selected='true']{background:#eef4ff;border-color:rgba(37,99,235,.26);color:#0f3f9f;}",".rte-state-inspector-body{padding:10px;overflow:auto;min-height:160px;max-height:540px;scrollbar-width:thin;font-size:12px;line-height:1.5;}",".rte-state-inspector-issue{display:block;padding:8px 10px;margin-bottom:6px;border:1px solid rgba(148,163,184,.24);border-left-width:3px;border-radius:7px;background:#fff;}",".rte-state-inspector-issue.is-error{border-left-color:#dc2626;background:#fef4f4;}",".rte-state-inspector-issue.is-warn{border-left-color:#d97706;background:#fffaf1;}",".rte-state-inspector-issue-msg{font-weight:750;color:#172033;}",".rte-state-inspector-issue-meta{margin-top:3px;font-size:11px;color:#52657e;font-family:Consolas,'Cascadia Mono',monospace;word-break:break-all;}",".rte-state-inspector-ok{padding:14px;color:#166534;font-weight:750;background:#f0fdf4;border:1px dashed rgba(22,101,52,.3);border-radius:8px;}",".rte-state-inspector-empty{padding:14px;color:#52657e;font-weight:700;background:#fff;border:1px dashed rgba(148,163,184,.34);border-radius:8px;}",".rte-state-inspector-pre{margin:0;font-family:Consolas,'Cascadia Mono',monospace;font-size:11px;line-height:1.55;color:#172033;white-space:pre;}",".rte-state-inspector-row{display:flex;gap:8px;padding:4px 0;border-bottom:1px solid rgba(148,163,184,.14);}",".rte-state-inspector-row-key{flex:0 0 116px;color:#52657e;font-weight:750;}",".rte-state-inspector-row-val{flex:1 1 auto;min-width:0;font-family:Consolas,'Cascadia Mono',monospace;word-break:break-all;}",".rte-state-inspector-row.is-flagged .rte-state-inspector-row-val{color:#b91c1c;font-weight:750;}","@media (max-width: 1100px){.rte-state-inspector-shell{display:block;}.rte-state-inspector-panel{margin-top:12px;max-width:none;width:100%;}.rte-state-inspector-body{max-height:340px;}}"].join(""),ee.head.appendChild(ue)}}function P(){if(x)return x;var ee=u.container,ue=ee.ownerDocument;x=ue.createElement("div"),x.className="rte-state-inspector-shell";var ce=ue.createElement("div");ce.className="rte-state-inspector-host",ee.parentNode.insertBefore(x,ee),x.appendChild(ce),ce.appendChild(ee),H=ue.createElement("aside"),H.className="rte-state-inspector-panel",H.setAttribute("role","complementary"),H.setAttribute("aria-label",u.stateInspectorTitle);var ve=ue.createElement("div");ve.className="rte-state-inspector-header";var be=ue.createElement("div");be.className="rte-state-inspector-kicker",be.innerText="Developer";var ke=ue.createElement("div");ke.className="rte-state-inspector-title",ke.innerText=u.stateInspectorTitle;var Pe=ue.createElement("div");Pe.className="rte-state-inspector-copy",Pe.innerText=u.stateInspectorHint,ve.appendChild(be),ve.appendChild(ke),ve.appendChild(Pe);var Le=ue.createElement("div");Le.className="rte-state-inspector-toolbar",z=ue.createElement("div"),z.className="rte-state-inspector-summary",z.setAttribute("data-rte-inspector-summary","1");var qe=ue.createElement("div");qe.className="rte-state-inspector-actions",qe.appendChild(B(ue,"Copy","Copy the state snapshot as JSON",se)),qe.appendChild(B(ue,"Hide","Hide the state inspector",ae)),Le.appendChild(z),Le.appendChild(qe),$=ue.createElement("div"),$.className="rte-state-inspector-tabs",$.setAttribute("role","tablist");for(var Re=0;Re<q.length;Re++)$.appendChild(Z(ue,q[Re]));return F=ue.createElement("div"),F.className="rte-state-inspector-body",H.appendChild(ve),H.appendChild(Le),H.appendChild($),H.appendChild(F),x.appendChild(H),x}function B(ee,ue,ce,ve){var be=ee.createElement("button");return be.type="button",be.className="rte-state-inspector-btn",be.innerText=ue,be.setAttribute("aria-label",ce),be.onclick=ve,be}function Z(ee,ue){var ce=ee.createElement("button");return ce.type="button",ce.className="rte-state-inspector-tab",ce.innerText=ue.label,ce.setAttribute("role","tab"),ce.setAttribute("data-rte-inspector-tab",ue.id),ce.setAttribute("aria-selected",ue.id===O?"true":"false"),ce.onclick=function(){O=ue.id,fe(),Q()},ce}function fe(){if($)for(var ee=$.querySelectorAll("[data-rte-inspector-tab]"),ue=0;ue<ee.length;ue++){var ce=ee[ue].getAttribute("data-rte-inspector-tab");ee[ue].setAttribute("aria-selected",ce===O?"true":"false")}}function re(){x&&x.classList.contains("is-open")?ae():ie()}function ie(){P(),x.classList.add("is-open"),Q()}function ae(){x&&x.classList.remove("is-open")}function de(){!x||!x.classList.contains("is-open")||(clearTimeout(o),o=setTimeout(function(){Q()},120))}function se(){var ee=JSON.stringify(g(),null,2);if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(ee);return}var ue=u.container.ownerDocument,ce=ue.createElement("textarea");ce.value=ee,ce.style.position="fixed",ce.style.opacity="0",ue.body.appendChild(ce),ce.select();try{ue.execCommand("copy")}catch{}ue.body.removeChild(ce)}function U(ee){for(;ee.firstChild;)ee.removeChild(ee.firstChild)}function Q(){if(!(!x||!F)){for(var ee=v(),ue=A(ee),ce=u.container.ownerDocument,ve=0,be=0;be<ue.issues.length;be++)ue.issues[be].severity==="error"&&ve++;z&&(z.innerText=ee.counters.elements+" el \xB7 "+ue.issues.length+" issue"+(ue.issues.length===1?"":"s")+(ve?" \xB7 "+ve+" error"+(ve===1?"":"s"):"")),U(F),O==="issues"?j(ce,ue.issues):O==="tree"?J(ce,ee):O==="selection"?te(ce):O==="plugins"?ye(ce):O==="log"&&me(ce)}}function j(ee,ue){if(!ue.length){var ce=ee.createElement("div");ce.className="rte-state-inspector-ok",ce.innerText="No structural issues found.",F.appendChild(ce);return}for(var ve=0;ve<ue.length;ve++){var be=ue[ve],ke=ee.createElement("div");ke.className="rte-state-inspector-issue is-"+(be.severity==="error"?"error":"warn"),ke.setAttribute("data-rte-issue-id",be.id);var Pe=ee.createElement("div");Pe.className="rte-state-inspector-issue-msg",Pe.innerText=be.message;var Le=ee.createElement("div");Le.className="rte-state-inspector-issue-meta",Le.innerText=(be.detail||"(document root)")+" \xB7 "+be.id,ke.appendChild(Pe),ke.appendChild(Le),F.appendChild(ke)}}function J(ee,ue){if(!ue.root||!ue.root.children.length){var ce=ee.createElement("div");ce.className="rte-state-inspector-empty",ce.innerText=u.stateInspectorEmptyText,F.appendChild(ce);return}var ve=ee.createElement("pre");ve.className="rte-state-inspector-pre",ve.innerText=Y(ue.root,0).join(`
73
+ `);try{var O=r&&r.iframe&&r.iframe.ownerDocument||document;if(!O.querySelector("style[data-rte-spellcheck]")){var V=O.createElement("style");V.setAttribute("data-rte-spellcheck","1"),V.textContent=o,(O.head||O.documentElement).appendChild(V),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(O,V,"rte-spellcheck-st",V.textContent)}}catch{}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_stateinspector=RTE_Plugin_StateInspector;function RTE_Plugin_StateInspector(){var N=this,u,r,x=null,H=null,F=null,$=null,z=null,o=0,O="issues",V=[],K=[],W=60,q=[{id:"issues",label:"Issues"},{id:"tree",label:"Tree"},{id:"selection",label:"Selection"},{id:"plugins",label:"Plugins"},{id:"log",label:"Log"}],b={A:1,ABBR:1,B:1,BDI:1,BDO:1,CITE:1,CODE:1,DEL:1,DFN:1,EM:1,I:1,INS:1,KBD:1,MARK:1,Q:1,S:1,SAMP:1,SMALL:1,SPAN:1,STRONG:1,SUB:1,SUP:1,U:1,VAR:1,FONT:1},m={AREA:1,BASE:1,BR:1,COL:1,EMBED:1,HR:1,IMG:1,INPUT:1,LINK:1,META:1,PARAM:1,SOURCE:1,TRACK:1,WBR:1},k={ADDRESS:1,ARTICLE:1,ASIDE:1,BLOCKQUOTE:1,DIV:1,DL:1,DT:1,DD:1,FIELDSET:1,FIGCAPTION:1,FIGURE:1,FOOTER:1,FORM:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1,HEADER:1,HR:1,LI:1,MAIN:1,NAV:1,OL:1,P:1,PRE:1,SECTION:1,TABLE:1,UL:1},M=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/;N.PluginName="StateInspector",N.InitConfig=function(ee){u=ee,u.stateInspectorEnabled!==!1&&(u.stateInspectorTitle=u.stateInspectorTitle||"State inspector",u.stateInspectorHint=u.stateInspectorHint||"Derived document model, structural checks, and a copyable snapshot for bug reports.",u.stateInspectorEmptyText=u.stateInspectorEmptyText||"No content to inspect yet.",typeof u.stateInspectorAutoOpen!="boolean"&&(u.stateInspectorAutoOpen=!1),typeof u.stateInspectorToolbarButton!="boolean"&&(u.stateInspectorToolbarButton=!1),typeof u.stateInspectorMaxDepth!="number"&&(u.stateInspectorMaxDepth=24),typeof u.stateInspectorLogLimit=="number"&&(W=Math.max(10,Math.min(500,u.stateInspectorLogLimit))),V=R(u),u.stateInspectorToolbarButton&&(I("toolbar_default","#{stateinspector}"),I("toolbar_full","#{stateinspector}")))},N.InitEditor=function(ee){r=ee,u.stateInspectorEnabled!==!1&&(r.stateInspector={close:function(){ae()},isOpen:function(){return!!(x&&x.classList.contains("is-open"))},issues:function(){return A(v()).issues},log:function(){return K.slice(0)},open:function(){ie()},plugins:function(){return V.slice(0)},refresh:function(){Q()},snapshot:function(){return g()},toggle:function(){re()}},D(),r.toolbarFactoryMap=r.toolbarFactoryMap||{},r.toolbarFactoryMap.stateinspector=function(ue){return r.createToolbarButton(ue)},r.attachEvent("exec_command_stateinspector",function(ue){ue.returnValue=!0,ue.stopBubble=!0,re()}),r.attachEvent("change",function(){l("change"),de()}),r.attachEvent("selectionchange",function(){l("selectionchange"),de()}),r.slashCommands&&r.slashCommands.register&&r.slashCommands.register({id:"stateinspector",section:"Tools",title:u.stateInspectorTitle,description:"Inspect document structure, selection, and structural issues",keywords:["inspect","debug","devtools","state","structure"],run:function(){ie()}}),P(),u.stateInspectorAutoOpen&&ie())};function I(ee,ue){u[ee]&&u[ee].indexOf(ue)===-1&&(u[ee]=u[ee]+ue)}function R(ee){var ue=[];for(var ce in ee)ce[0]!=="p"||ce.substr(0,7)!=="plugin_"||!ee[ce]||!(ee[ce]instanceof Function)||ue.push({index:ue.length,key:ce,name:ce.substring(7)});return ue}function l(ee){K.push({at:Date.now(),event:ee}),K.length>W&&K.splice(0,K.length-W)}function f(ee){var ue={},ce=ee.attributes;if(!ce)return ue;for(var ve=0;ve<ce.length;ve++){var be=ce[ve].value;ue[ce[ve].name]=be.length>220?be.substring(0,220)+"\u2026":be}return ue}function _(ee,ue,ce,ve){if(ee.nodeType===3){var be=ee.nodeValue||"";return ve.textNodes++,ve.characters+=be.length,{type:"text",length:be.length,text:be.length>80?be.substring(0,80)+"\u2026":be}}if(ee.nodeType===8)return ve.comments++,{type:"comment",length:(ee.nodeValue||"").length};if(ee.nodeType!==1)return null;ve.elements++;var ke=ee.nodeName;ve.tags[ke]=(ve.tags[ke]||0)+1;var Pe={type:"element",name:ke.toLowerCase(),attrs:f(ee),children:[]};if(ue>=ce)return Pe.truncated=!0,Pe.childCount=ee.childNodes.length,Pe;for(var Le=0;Le<ee.childNodes.length;Le++){var qe=_(ee.childNodes[Le],ue+1,ce,ve);qe&&Pe.children.push(qe)}return Pe}function v(){var ee=r&&r.getEditable?r.getEditable():null,ue={elements:0,textNodes:0,comments:0,characters:0,tags:{}};if(!ee)return{root:null,counters:ue,editable:null};for(var ce=Math.max(2,u.stateInspectorMaxDepth||24),ve={type:"element",name:"root",attrs:{},children:[]},be=0;be<ee.childNodes.length;be++){var ke=_(ee.childNodes[be],1,ce,ue);ke&&ve.children.push(ke)}return{root:ve,counters:ue,editable:ee}}function s(){var ee=r&&r.getDocument?r.getDocument():null,ue=r&&r.getEditable?r.getEditable():null,ce={available:!1};if(!ee||!ee.getSelection)return ce;var ve;try{ve=ee.getSelection()}catch{return ce}if(!ve||ve.rangeCount===0)return ce;var be;try{be=ve.getRangeAt(0)}catch{return ce}if(!be)return ce;ce.available=!0,ce.collapsed=!!be.collapsed,ce.anchor=c(be.startContainer,be.startOffset),ce.focus=c(be.endContainer,be.endOffset),ce.insideEditable=!!(ue&&ue.contains(be.startContainer)&&ue.contains(be.endContainer));try{var ke=String(be.toString()||"");ce.textLength=ke.length,ce.text=ke.length>120?ke.substring(0,120)+"\u2026":ke}catch{ce.textLength=0}return ce.block=p(be.startContainer,ue),ce}function c(ee,ue){if(!ee)return{node:"(none)",offset:ue};if(ee.nodeType===3){var ce=ee.nodeValue||"";return{node:"#text",offset:ue,length:ce.length,zeroLength:ce.length===0}}return{node:ee.nodeName?ee.nodeName.toLowerCase():"(unknown)",offset:ue,childCount:ee.childNodes?ee.childNodes.length:0}}function p(ee,ue){for(var ce=[],ve=ee;ve&&ve!==ue;)ve.nodeType===1&&ce.unshift(ve.nodeName.toLowerCase()),ve=ve.parentNode;return ce.join(" > ")}function g(){var ee=v(),ue=A(ee);return{snapshotVersion:1,generatedAt:new Date().toISOString(),counters:ee.counters,issues:ue.issues,plugins:V.slice(0),recentEvents:K.slice(-20),selection:s(),tree:ee.root}}function h(ee,ue,ce,ve,be){ee.push({id:ue,severity:ce,message:ve,detail:be||""})}function L(ee,ue){for(var ce=[],ve=ee;ve&&ve!==ue&&ve.nodeType===1;){var be=ve.nodeName.toLowerCase();ve.id&&(be+="#"+ve.id),ce.unshift(be),ve=ve.parentNode}return ce.join(" > ")}function E(ee){if((ee.textContent||"").replace(/[\s\u200B\uFEFF]/g,"")!=="")return!0;for(var ue=0;ue<ee.childNodes.length;ue++){var ce=ee.childNodes[ue];if(ce.nodeType===1&&m[ce.nodeName])return!0}return!1}function A(ee){var ue=[],ce=ee.editable;if(!ce)return{issues:ue};for(var ve=ce.ownerDocument.createTreeWalker(ce,5,null,!1),be=0,ke;ke=ve.nextNode();){if(ke.nodeType===3){y(ke,ce,ue);continue}d(ke,ce,ue);var Pe=C(ke);Pe&&(be&&Pe>be+1&&h(ue,"heading-skip","warn","Heading level jumps from h"+be+" to h"+Pe,L(ke,ce)),be=Pe)}for(var Le=0;Le<ce.childNodes.length;Le++){var qe=ce.childNodes[Le];qe.nodeType===1&&qe.nodeName==="IMG"&&w(qe,ce,ue)}return{issues:ue}}function C(ee){var ue=ee.nodeName;return ue.length===2&&ue[0]==="H"&&ue[1]>="1"&&ue[1]<="6"?parseInt(ue[1],10):0}function y(ee,ue,ce){var ve=ee.nodeValue||"";if(ve.length===0){h(ce,"zero-length-text","warn","Zero-length text node",L(ee.parentNode,ue));return}M.test(ve)&&h(ce,"control-characters","error","Text contains control characters - Word will reject an exported .docx",L(ee.parentNode,ue))}function d(ee,ue,ce){for(var ve=ee.nodeName,be=L(ee,ue),ke=ee.attributes,Pe=0;ke&&Pe<ke.length;Pe++){var Le=ke[Pe].name.toLowerCase(),qe=ke[Pe].value||"";if(Le.indexOf("on")===0&&Le.length>2&&h(ce,"event-handler-attribute","error","Inline event handler "+Le+" present in document content",be),Le==="href"||Le==="src"||Le==="xlink:href"){var Re=qe.replace(/[\u0000-\u0020]/g,"").toLowerCase();Re.indexOf("javascript:")===0?h(ce,"unsafe-url-scheme","error","javascript: URL in "+Le,be):(Re.indexOf("data:text/html")===0||Re.indexOf("data:image/svg+xml")===0)&&h(ce,"unsafe-url-scheme","error","Scriptable data: URL in "+Le,be)}}if(ve==="IFRAME"&&ee.hasAttribute("srcdoc")&&h(ce,"iframe-srcdoc","error","iframe[srcdoc] executes when the saved content is rendered downstream",be),b[ve]&&!E(ee)&&h(ce,"empty-inline","warn","Empty inline <"+ve.toLowerCase()+"> - a caret entering it cannot leave by typing",be),b[ve]&&ee.parentNode&&ee.parentNode.nodeName===ve&&h(ce,"nested-duplicate-inline","warn","<"+ve.toLowerCase()+"> nested directly inside another <"+ve.toLowerCase()+">",be),b[ve])for(var Ie=0;Ie<ee.childNodes.length;Ie++){var Ve=ee.childNodes[Ie];if(Ve.nodeType===1&&k[Ve.nodeName]){h(ce,"block-inside-inline","warn","Block <"+Ve.nodeName.toLowerCase()+"> inside inline <"+ve.toLowerCase()+">",be);break}}if(ve==="LI"){var Ye=ee.parentNode?ee.parentNode.nodeName:"";Ye!=="UL"&&Ye!=="OL"&&h(ce,"orphan-list-item","warn","<li> outside a <ul> or <ol>",be)}ve==="IMG"&&w(ee,ue,ce),ee.hasAttribute&&ee.hasAttribute("data-rte-atomic")&&ee.getAttribute("contenteditable")!=="false"&&h(ce,"atomic-not-protected","error",'Atomic element without contenteditable="false"',be)}function w(ee,ue,ce){if(!(ee.getAttribute("role")==="presentation"||ee.getAttribute("aria-hidden")==="true")){var ve=ee.getAttribute("alt");ve===null&&h(ce,"image-missing-alt","warn","Image has no alt attribute",L(ee,ue))}}function D(){var ee=u.container.ownerDocument;if(!ee.getElementById("rte-state-inspector-style")){var ue=ee.createElement("style");ue.id="rte-state-inspector-style",ue.innerHTML=[".rte-state-inspector-shell{display:flex;align-items:stretch;gap:10px;}",".rte-state-inspector-shell>.rte-state-inspector-host{flex:1 1 auto;min-width:0;}",".rte-state-inspector-panel{display:none;flex:0 0 340px;min-width:290px;max-width:min(400px,36vw);border:1px solid rgba(148,163,184,.22);border-radius:8px;background:#fff;box-shadow:0 14px 32px rgba(29,78,216,.1),0 2px 8px rgba(15,23,42,.06);overflow:hidden;color:#172033;font-family:Aptos,'Segoe UI',sans-serif;}",".rte-state-inspector-shell.is-open>.rte-state-inspector-panel{display:flex;flex-direction:column;}",".rte-state-inspector-header{padding:12px 12px 9px 14px;border-bottom:1px solid rgba(148,163,184,.16);background:rgba(248,251,255,.72);}",".rte-state-inspector-kicker{font-size:10px;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:#52657e;font-weight:850;}",".rte-state-inspector-title{margin-top:3px;font-size:15px;line-height:1.2;font-weight:850;color:#172033;}",".rte-state-inspector-copy{margin-top:5px;font-size:12px;line-height:1.42;color:#52657e;}",".rte-state-inspector-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px 8px 14px;border-bottom:1px solid rgba(148,163,184,.16);}",".rte-state-inspector-summary{min-width:0;font-size:12px;font-weight:750;color:#52657e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}",".rte-state-inspector-actions{display:flex;gap:6px;flex:0 0 auto;}",".rte-state-inspector-btn{appearance:none;border:1px solid rgba(100,116,139,.18);background:#fff;color:#315277;cursor:pointer;font-size:12px;font-weight:750;padding:6px 9px;border-radius:7px;line-height:1;}",".rte-state-inspector-btn:hover,.rte-state-inspector-btn:focus-visible{background:#eef4ff;color:#0f3f9f;border-color:rgba(37,99,235,.28);}",".rte-state-inspector-tabs{display:flex;gap:2px;padding:8px 10px 0 10px;border-bottom:1px solid rgba(148,163,184,.16);}",".rte-state-inspector-tab{appearance:none;border:1px solid transparent;border-bottom:none;background:transparent;color:#52657e;cursor:pointer;font-size:12px;font-weight:800;padding:7px 10px;border-radius:7px 7px 0 0;line-height:1;}",".rte-state-inspector-tab:hover,.rte-state-inspector-tab:focus-visible{background:#f8fbff;color:#0f3f9f;}",".rte-state-inspector-tab[aria-selected='true']{background:#eef4ff;border-color:rgba(37,99,235,.26);color:#0f3f9f;}",".rte-state-inspector-body{padding:10px;overflow:auto;min-height:160px;max-height:540px;scrollbar-width:thin;font-size:12px;line-height:1.5;}",".rte-state-inspector-issue{display:block;padding:8px 10px;margin-bottom:6px;border:1px solid rgba(148,163,184,.24);border-left-width:3px;border-radius:7px;background:#fff;}",".rte-state-inspector-issue.is-error{border-left-color:#dc2626;background:#fef4f4;}",".rte-state-inspector-issue.is-warn{border-left-color:#d97706;background:#fffaf1;}",".rte-state-inspector-issue-msg{font-weight:750;color:#172033;}",".rte-state-inspector-issue-meta{margin-top:3px;font-size:11px;color:#52657e;font-family:Consolas,'Cascadia Mono',monospace;word-break:break-all;}",".rte-state-inspector-ok{padding:14px;color:#166534;font-weight:750;background:#f0fdf4;border:1px dashed rgba(22,101,52,.3);border-radius:8px;}",".rte-state-inspector-empty{padding:14px;color:#52657e;font-weight:700;background:#fff;border:1px dashed rgba(148,163,184,.34);border-radius:8px;}",".rte-state-inspector-pre{margin:0;font-family:Consolas,'Cascadia Mono',monospace;font-size:11px;line-height:1.55;color:#172033;white-space:pre;}",".rte-state-inspector-row{display:flex;gap:8px;padding:4px 0;border-bottom:1px solid rgba(148,163,184,.14);}",".rte-state-inspector-row-key{flex:0 0 116px;color:#52657e;font-weight:750;}",".rte-state-inspector-row-val{flex:1 1 auto;min-width:0;font-family:Consolas,'Cascadia Mono',monospace;word-break:break-all;}",".rte-state-inspector-row.is-flagged .rte-state-inspector-row-val{color:#b91c1c;font-weight:750;}","@media (max-width: 1100px){.rte-state-inspector-shell{display:block;}.rte-state-inspector-panel{margin-top:12px;max-width:none;width:100%;}.rte-state-inspector-body{max-height:340px;}}"].join(""),ee.head.appendChild(ue),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(ee,ue,"rte-state-inspector-style",ue.textContent)}}function P(){if(x)return x;var ee=u.container,ue=ee.ownerDocument;x=ue.createElement("div"),x.className="rte-state-inspector-shell";var ce=ue.createElement("div");ce.className="rte-state-inspector-host",ee.parentNode.insertBefore(x,ee),x.appendChild(ce),ce.appendChild(ee),H=ue.createElement("aside"),H.className="rte-state-inspector-panel",H.setAttribute("role","complementary"),H.setAttribute("aria-label",u.stateInspectorTitle);var ve=ue.createElement("div");ve.className="rte-state-inspector-header";var be=ue.createElement("div");be.className="rte-state-inspector-kicker",be.innerText="Developer";var ke=ue.createElement("div");ke.className="rte-state-inspector-title",ke.innerText=u.stateInspectorTitle;var Pe=ue.createElement("div");Pe.className="rte-state-inspector-copy",Pe.innerText=u.stateInspectorHint,ve.appendChild(be),ve.appendChild(ke),ve.appendChild(Pe);var Le=ue.createElement("div");Le.className="rte-state-inspector-toolbar",z=ue.createElement("div"),z.className="rte-state-inspector-summary",z.setAttribute("data-rte-inspector-summary","1");var qe=ue.createElement("div");qe.className="rte-state-inspector-actions",qe.appendChild(B(ue,"Copy","Copy the state snapshot as JSON",se)),qe.appendChild(B(ue,"Hide","Hide the state inspector",ae)),Le.appendChild(z),Le.appendChild(qe),$=ue.createElement("div"),$.className="rte-state-inspector-tabs",$.setAttribute("role","tablist");for(var Re=0;Re<q.length;Re++)$.appendChild(Z(ue,q[Re]));return F=ue.createElement("div"),F.className="rte-state-inspector-body",H.appendChild(ve),H.appendChild(Le),H.appendChild($),H.appendChild(F),x.appendChild(H),x}function B(ee,ue,ce,ve){var be=ee.createElement("button");return be.type="button",be.className="rte-state-inspector-btn",be.innerText=ue,be.setAttribute("aria-label",ce),be.onclick=ve,be}function Z(ee,ue){var ce=ee.createElement("button");return ce.type="button",ce.className="rte-state-inspector-tab",ce.innerText=ue.label,ce.setAttribute("role","tab"),ce.setAttribute("data-rte-inspector-tab",ue.id),ce.setAttribute("aria-selected",ue.id===O?"true":"false"),ce.onclick=function(){O=ue.id,fe(),Q()},ce}function fe(){if($)for(var ee=$.querySelectorAll("[data-rte-inspector-tab]"),ue=0;ue<ee.length;ue++){var ce=ee[ue].getAttribute("data-rte-inspector-tab");ee[ue].setAttribute("aria-selected",ce===O?"true":"false")}}function re(){x&&x.classList.contains("is-open")?ae():ie()}function ie(){P(),x.classList.add("is-open"),Q()}function ae(){x&&x.classList.remove("is-open")}function de(){!x||!x.classList.contains("is-open")||(clearTimeout(o),o=setTimeout(function(){Q()},120))}function se(){var ee=JSON.stringify(g(),null,2);if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(ee);return}var ue=u.container.ownerDocument,ce=ue.createElement("textarea");ce.value=ee,ce.style.position="fixed",ce.style.opacity="0",ue.body.appendChild(ce),ce.select();try{ue.execCommand("copy")}catch{}ue.body.removeChild(ce)}function U(ee){for(;ee.firstChild;)ee.removeChild(ee.firstChild)}function Q(){if(!(!x||!F)){for(var ee=v(),ue=A(ee),ce=u.container.ownerDocument,ve=0,be=0;be<ue.issues.length;be++)ue.issues[be].severity==="error"&&ve++;z&&(z.innerText=ee.counters.elements+" el \xB7 "+ue.issues.length+" issue"+(ue.issues.length===1?"":"s")+(ve?" \xB7 "+ve+" error"+(ve===1?"":"s"):"")),U(F),O==="issues"?j(ce,ue.issues):O==="tree"?J(ce,ee):O==="selection"?te(ce):O==="plugins"?ye(ce):O==="log"&&me(ce)}}function j(ee,ue){if(!ue.length){var ce=ee.createElement("div");ce.className="rte-state-inspector-ok",ce.innerText="No structural issues found.",F.appendChild(ce);return}for(var ve=0;ve<ue.length;ve++){var be=ue[ve],ke=ee.createElement("div");ke.className="rte-state-inspector-issue is-"+(be.severity==="error"?"error":"warn"),ke.setAttribute("data-rte-issue-id",be.id);var Pe=ee.createElement("div");Pe.className="rte-state-inspector-issue-msg",Pe.innerText=be.message;var Le=ee.createElement("div");Le.className="rte-state-inspector-issue-meta",Le.innerText=(be.detail||"(document root)")+" \xB7 "+be.id,ke.appendChild(Pe),ke.appendChild(Le),F.appendChild(ke)}}function J(ee,ue){if(!ue.root||!ue.root.children.length){var ce=ee.createElement("div");ce.className="rte-state-inspector-empty",ce.innerText=u.stateInspectorEmptyText,F.appendChild(ce);return}var ve=ee.createElement("pre");ve.className="rte-state-inspector-pre",ve.innerText=Y(ue.root,0).join(`
74
74
  `),F.appendChild(ve)}function Y(ee,ue){var ce=[],ve=new Array(ue+1).join(" ");if(ee.type==="text")return ce.push(ve+"#text("+ee.length+") "+JSON.stringify(ee.text)),ce;if(ee.type==="comment")return ce.push(ve+"#comment("+ee.length+")"),ce;var be=ve+"<"+ee.name,ke=[];for(var Pe in ee.attrs)ke.push(Pe);if(ke.length){ke.sort();for(var Le=0;Le<ke.length&&Le<4;Le++)be+=" "+ke[Le]+"="+JSON.stringify(ee.attrs[ke[Le]]);ke.length>4&&(be+=" \u2026+"+(ke.length-4))}be+=">",ee.truncated&&(be+=" \u2026 "+ee.childCount+" children (depth limit)"),ce.push(be);for(var qe=0;qe<(ee.children||[]).length;qe++)ce=ce.concat(Y(ee.children[qe],ue+1));return ce}function te(ee){var ue=s();if(!ue.available){var ce=ee.createElement("div");ce.className="rte-state-inspector-empty",ce.innerText="No selection in the document.",F.appendChild(ce);return}pe(ee,"Collapsed",String(ue.collapsed)),pe(ee,"In editable",String(ue.insideEditable),!ue.insideEditable),pe(ee,"Block path",ue.block||"(root)"),pe(ee,"Anchor",le(ue.anchor),!!(ue.anchor&&ue.anchor.zeroLength)),pe(ee,"Focus",le(ue.focus),!!(ue.focus&&ue.focus.zeroLength)),pe(ee,"Selected",ue.textLength+" chars"),ue.text&&pe(ee,"Text",ue.text)}function le(ee){if(!ee)return"(none)";var ue=ee.node+" @ "+ee.offset;return typeof ee.length=="number"&&(ue+=" (len "+ee.length+")"),typeof ee.childCount=="number"&&(ue+=" ("+ee.childCount+" children)"),ee.zeroLength&&(ue+=" \u2190 zero-length text node"),ue}function pe(ee,ue,ce,ve){var be=ee.createElement("div");be.className="rte-state-inspector-row"+(ve?" is-flagged":"");var ke=ee.createElement("div");ke.className="rte-state-inspector-row-key",ke.innerText=ue;var Pe=ee.createElement("div");Pe.className="rte-state-inspector-row-val",Pe.innerText=ce,be.appendChild(ke),be.appendChild(Pe),F.appendChild(be)}function ye(ee){if(!V.length){var ue=ee.createElement("div");ue.className="rte-state-inspector-empty",ue.innerText="No plugins registered.",F.appendChild(ue);return}var ce=ee.createElement("div");ce.className="rte-state-inspector-copy",ce.innerText="Initialization order. A plugin can only register into another plugin's API if it appears below it.",F.appendChild(ce);for(var ve=0;ve<V.length;ve++)pe(ee,String(ve+1).padStart?String(ve+1).padStart(3,"0"):String(ve+1),V[ve].name)}function me(ee){if(!K.length){var ue=ee.createElement("div");ue.className="rte-state-inspector-empty",ue.innerText="No editor events recorded yet.",F.appendChild(ue);return}for(var ce=K[0].at,ve=K.length-1;ve>=0;ve--)pe(ee,"+"+(K[ve].at-ce)+"ms",K[ve].event)}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_tableofcontents=RTE_Plugin_TableOfContents,typeof RTE_DefaultConfig.tocTitle>"u"&&(RTE_DefaultConfig.tocTitle="Contents"),typeof RTE_DefaultConfig.tocMinLevel>"u"&&(RTE_DefaultConfig.tocMinLevel=1),typeof RTE_DefaultConfig.tocMaxLevel>"u"&&(RTE_DefaultConfig.tocMaxLevel=3),typeof RTE_DefaultConfig.tocPageNumbers>"u"&&(RTE_DefaultConfig.tocPageNumbers="auto");function RTE_Plugin_TableOfContents(){var N=this,u,r,x=null,H=!1,F=0;N.PluginName="TableOfContents",N.InitConfig=function(f){u=f},N.InitEditor=function(f){r=f,r.attachEvent("exec_command_inserttoc",function(_){_.returnValue=!0,N.Insert()}),$();try{r.attachEvent("ready",$)}catch{}try{r.attachEvent("aftersethtml",function(){$(),O()})}catch{}setTimeout(function(){$(),O()},0),r.insertTableOfContents=function(){return N.Insert()},r.updateTableOfContents=function(){return M()},r.removeTableOfContents=function(){return N.Remove()},r.hasTableOfContents=function(){return!!W()},r.getTableOfContents=function(){return N.List()},r.getTocCss=function(){return R()}};function $(){var f=z();if(f&&(l(f),f!==x)){x=f;var _=o();_&&(_.addEventListener("keyup",O),_.addEventListener("cut",O),_.addEventListener("paste",O),_.addEventListener("drop",O),_.addEventListener("click",function(v){var s=V(v.target,"rte-toc-link",_);if(s){v.preventDefault();var c=_.querySelector("#"+K(s.getAttribute("data-toc-target")));if(c)try{c.scrollIntoView({block:"center"})}catch{c.scrollIntoView()}}}))}}function z(){try{return r.getDocument()}catch{return null}}function o(){try{return r.getEditable()}catch{return null}}function O(){H||(H=!0,setTimeout(function(){H=!1,M()},0))}function V(f,_,v){for(;f&&f!==v;){if(f.nodeType===1&&f.classList&&f.classList.contains(_))return f;f=f.parentNode}return null}function K(f){return String(f||"").replace(/["\\\]\[]/g,"\\$&")}function W(){var f=o();return f?f.querySelector("nav.rte-toc"):null}function q(){var f=Math.max(1,Math.min(6,parseInt(u.tocMinLevel,10)||1)),_=Math.max(f,Math.min(6,parseInt(u.tocMaxLevel,10)||3));return{min:f,max:_}}function b(){var f=o();if(!f)return[];for(var _=q(),v=[],s=_.min;s<=_.max;s++)v.push("h"+s);for(var c=f.querySelectorAll(v.join(",")),p=[],g=0;g<c.length;g++){var h=c[g];h.closest&&(h.closest("nav.rte-toc")||h.closest("section.rte-footnotes"))||(h.textContent||"").trim()&&p.push(h)}return p}function m(f){var _=f.getAttribute("id");return _&&_.indexOf("rte-h-")===0||_||(_="rte-h-"+Math.floor(Math.random()*1e9).toString(36)+(F++).toString(36),f.setAttribute("id",_)),_}function k(){var f=u.tocPageNumbers;if(f===!1||typeof r.getPageOfElement!="function")return!1;if(f===!0)return!0;try{return typeof r.isPageView=="function"&&r.isPageView()}catch{return!1}}N.Insert=function(){var f=z(),_=o();if(!f||!_)return!1;var v=W();if(v)return M(),!0;var s=f.createElement("nav");s.className="rte-toc",s.setAttribute("contenteditable","false"),s.setAttribute("data-rte-toc","1");var c=!1;try{typeof r.insertElement=="function"&&(r.insertElement(s),c=!0)}catch{}return c||_.insertBefore(s,_.firstChild),M(),I(),!0},N.Remove=function(){var f=W();return!f||!f.parentNode?!1:(f.parentNode.removeChild(f),I(),!0)};function M(){var f=W();if(!f)return[];var _=z();if(!_)return[];for(var v=b(),s=q(),c=k(),p={},g=f.querySelectorAll("li.rte-toc-item"),h=0;h<g.length;h++){var L=g[h].querySelector("a.rte-toc-link"),E=g[h].querySelector(".rte-toc-page");if(L&&E){var A=parseInt(E.textContent,10);A&&(p[L.getAttribute("data-toc-target")]=A)}}for(;f.firstChild;)f.removeChild(f.firstChild);var C=String(u.tocTitle==null?"":u.tocTitle);if(C){var y=_.createElement("div");y.className="rte-toc-title",y.textContent=C,f.appendChild(y)}if(!v.length){var d=_.createElement("div");return d.className="rte-toc-empty",d.textContent="No headings yet.",f.appendChild(d),[]}var w=_.createElement("ol");w.className="rte-toc-list";for(var D=[],P=0;P<v.length;P++){var B=v[P],Z=parseInt(B.nodeName.substring(1),10)||1,fe=m(B),re=(B.textContent||"").trim(),ie=_.createElement("li");ie.className="rte-toc-item rte-toc-l"+(Z-s.min+1);var ae=_.createElement("a");ae.className="rte-toc-link",ae.setAttribute("href","#"+fe),ae.setAttribute("data-toc-target",fe),ae.textContent=re,ie.appendChild(ae);var de=null;if(c)try{de=r.getPageOfElement(B)}catch{de=null}if(!de&&p[fe]&&(de=p[fe]),de){var se=_.createElement("span");se.className="rte-toc-page",se.textContent=String(de),ie.appendChild(se)}w.appendChild(ie),D.push({id:fe,level:Z,text:re,page:de})}return f.appendChild(w),D}N.List=function(){var f=W();if(!f)return[];for(var _=f.querySelectorAll("li.rte-toc-item"),v=[],s=0;s<_.length;s++){var c=_[s].querySelector("a.rte-toc-link"),p=_[s].querySelector(".rte-toc-page"),g=_[s].className.match(/rte-toc-l(\d+)/);v.push({id:c?c.getAttribute("data-toc-target"):null,level:g?parseInt(g[1],10):1,text:c?c.textContent:"",page:p?parseInt(p.textContent,10):null})}return v};function I(){try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function R(){return"nav.rte-toc{margin:0 0 1.4em;padding:.9em 1.1em;border:1px solid #ddd;border-radius:6px;background:#fafbfc;}nav.rte-toc .rte-toc-title{font-weight:700;margin-bottom:.45em;}nav.rte-toc .rte-toc-empty{color:#888;font-style:italic;}ol.rte-toc-list{list-style:none;margin:0;padding:0;counter-reset:rte-toc;}ol.rte-toc-list>li{counter-increment:rte-toc;margin:.16em 0;display:flex;align-items:baseline;gap:.5em;}ol.rte-toc-list>li>a{color:#1474ea;text-decoration:none;cursor:pointer;}ol.rte-toc-list>li>a:hover{text-decoration:underline;}ol.rte-toc-list>li:has(>.rte-toc-page)>a::after{content:'';flex:1 1 auto;margin:0 .4em;border-bottom:1px dotted #bbb;transform:translateY(-.25em);display:inline-block;min-width:1.5em;}ol.rte-toc-list>li>a{flex:1 1 auto;display:flex;align-items:baseline;}.rte-toc-page{flex:0 0 auto;color:#666;font-variant-numeric:tabular-nums;}.rte-toc-l2{padding-left:1.3em;}.rte-toc-l3{padding-left:2.6em;}.rte-toc-l4{padding-left:3.9em;}.rte-toc-l5{padding-left:5.2em;}.rte-toc-l6{padding-left:6.5em;}"}function l(f){if(f){var _=f.getElementById("rte-toc-styles"),v=R();if(_){if(_.getAttribute("data-css")===v)return;_.parentNode&&_.parentNode.removeChild(_)}var s=f.createElement("style");s.id="rte-toc-styles",s.setAttribute("data-css",v),s.appendChild(f.createTextNode(v)),(f.head||f.getElementsByTagName("head")[0]||f.documentElement).appendChild(s),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(f,s,"rte-toc-styles",s.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_tabletools=RTE_Plugin_TableTools,typeof RTE_DefaultConfig.tableNumberSeries>"u"&&(RTE_DefaultConfig.tableNumberSeries="numeric"),typeof RTE_DefaultConfig.tableNumberHeader>"u"&&(RTE_DefaultConfig.tableNumberHeader="#");function RTE_Plugin_TableTools(){var N=this,u,r;N.PluginName="TableTools",N.InitConfig=function(R){u=R},N.InitEditor=function(R){r=R,r.attachEvent("exec_command_sorttable",function(l){l.returnValue=!0,N.SortAtCaret(l&&l.value==="desc"?"desc":"asc")}),r.attachEvent("exec_command_tablerownumbers",function(l){l.returnValue=!0,N.ToggleRowNumbers()}),r.sortTableByColumn=function(l,f){return N.Sort(H(),l,f)},r.sortTableAtCaret=function(l){return N.SortAtCaret(l)},r.canSortTable=function(){return o(H())},r.addTableRowNumbers=function(l){return N.AddRowNumbers(l)},r.removeTableRowNumbers=function(){return N.RemoveRowNumbers()},r.hasTableRowNumbers=function(){var l=H();return!!(l&&l.querySelector("[data-rte-rownum]"))}};function x(){try{return r.getEditable()}catch{return null}}function H(){try{var R=r.getSelection();if(!R||R.rangeCount===0)return null;var l=R.getRangeAt(0).startContainer;l&&l.nodeType===3&&(l=l.parentNode);for(var f=x();l&&l!==f;){if(l.nodeName==="TABLE")return l;l=l.parentNode}return null}catch{return null}}function F(){try{var R=r.getSelection();if(!R||R.rangeCount===0)return null;var l=R.getRangeAt(0).startContainer;l&&l.nodeType===3&&(l=l.parentNode);for(var f=x();l&&l!==f;){if(l.nodeName==="TD"||l.nodeName==="TH")return l;l=l.parentNode}return null}catch{return null}}function $(R){if(!R)return[];for(var l=Array.prototype.slice.call(R.rows||[]),f=[],_=0;_<l.length;_++){var v=l[_],s=v.parentNode?v.parentNode.nodeName:"";s==="THEAD"||s==="TFOOT"||f.length===0&&_===0&&v.cells.length&&z(v)||f.push(v)}return f}function z(R){for(var l=0;l<R.cells.length;l++)if(R.cells[l].nodeName!=="TH")return!1;return!0}function o(R){if(!R)return{ok:!1,reason:"The caret is not inside a table."};var l=$(R);if(l.length<2)return{ok:!1,reason:"The table has fewer than two sortable rows."};for(var f=0;f<l.length;f++)for(var _=0;_<l[f].cells.length;_++){var v=l[f].cells[_];if((v.rowSpan||1)>1||(v.colSpan||1)>1)return{ok:!1,reason:"This table has merged cells. Sorting would move rows out from under a rowspan and break the table, so it has been left alone."}}return{ok:!0,reason:""}}function O(R){var l=String(R??"").trim();if(!l)return{type:"empty",v:""};if(/\d/.test(l)){var f=l.replace(/[\s ,]/g,"").replace(/^\(([^)]*)\)$/,"-$1").replace(/[^0-9.eE+-]/g,"");if(f&&/^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/.test(f))return{type:"number",v:parseFloat(f)};var _=Date.parse(l);if(!isNaN(_))return{type:"date",v:_}}return{type:"text",v:l.toLowerCase()}}function V(R,l){for(var f={number:0,date:0,text:0},_=0;_<R.length;_++){var v=R[_].cells[l];if(v){var s=O(v.textContent);s.type!=="empty"&&f[s.type]++}}return f.number>=f.date&&f.number>=f.text&&f.number>0?"number":f.date>=f.text&&f.date>0?"date":"text"}N.SortAtCaret=function(R){var l=H(),f=F();return!l||!f?!1:N.Sort(l,f.cellIndex,R)},N.Sort=function(R,l,f){var _=o(R);if(!_.ok)return _;for(var v=String(f).toLowerCase()==="desc",s=$(R),c=V(s,l),p=[],g=0;g<s.length;g++){var h=s[g].cells[l];p.push({row:s[g],order:g,val:O(h?h.textContent:"")})}p.sort(function(C,y){if(C.val.type==="empty"&&y.val.type==="empty")return C.order-y.order;if(C.val.type==="empty")return 1;if(y.val.type==="empty")return-1;var d;if(c==="number"||c==="date"){var w=C.val.type===c?C.val.v:Number.POSITIVE_INFINITY,D=y.val.type===c?y.val.v:Number.POSITIVE_INFINITY;d=w<D?-1:w>D?1:0}else{var P=String(C.val.v),B=String(y.val.v);d=P.localeCompare?P.localeCompare(B,void 0,{numeric:!0,sensitivity:"base"}):P<B?-1:P>B?1:0}return d===0?C.order-y.order:v?-d:d});var L=p.length?p[0].row.parentNode:null;if(!L)return{ok:!1,reason:"The table has no sortable rows."};for(var E=F(),A=0;A<p.length;A++)L.appendChild(p[A].row);return M(E),k(R),I(),{ok:!0,reason:"",sortedBy:l,direction:v?"desc":"asc",detectedType:c}};function K(R,l){switch(String(l)){case"upper-alpha":return W(R).toUpperCase();case"lower-alpha":return W(R);case"upper-roman":return q(R);case"lower-roman":return q(R).toLowerCase();default:return String(R)}}function W(R){for(var l="";R>0;){var f=(R-1)%26;l=String.fromCharCode(97+f)+l,R=Math.floor((R-1)/26)}return l||"a"}function q(R){for(var l=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],f="",_=0;_<l.length;_++)for(;R>=l[_][0];)f+=l[_][1],R-=l[_][0];return f||"I"}N.AddRowNumbers=function(R){var l=H();if(!l)return!1;if(l.querySelector("[data-rte-rownum]"))return k(l),!0;R=R||{};for(var f=R.series||u.tableNumberSeries,_=l.ownerDocument,v=Array.prototype.slice.call(l.rows||[]),s=$(l),c={},p=0;p<s.length;p++)c[m(s[p])]=!0;for(var g=0;g<v.length;g++){var h=v[g],L=c[m(h)],E=_.createElement(L?"td":"th");E.setAttribute("data-rte-rownum",L?"value":"header"),L||(E.textContent=String(u.tableNumberHeader==null?"#":u.tableNumberHeader)),h.insertBefore(E,h.firstChild)}return l.setAttribute("data-rte-rownum-series",f),k(l),I(),!0};var b=0;function m(R){return R.__rteKey||(R.__rteKey="r"+b++),R.__rteKey}N.RemoveRowNumbers=function(){var R=H();if(!R)return!1;var l=R.querySelectorAll("[data-rte-rownum]");if(!l.length)return!1;for(var f=0;f<l.length;f++)l[f].parentNode&&l[f].parentNode.removeChild(l[f]);return R.removeAttribute("data-rte-rownum-series"),I(),!0},N.ToggleRowNumbers=function(){var R=H();return R?R.querySelector("[data-rte-rownum]")?N.RemoveRowNumbers():N.AddRowNumbers():!1};function k(R){if(R)for(var l=R.getAttribute("data-rte-rownum-series")||u.tableNumberSeries,f=$(R),_=1,v=0;v<f.length;v++){var s=f[v].querySelector("[data-rte-rownum='value']");s&&(s.textContent=K(_++,l))}}function M(R){if(!(!R||!R.parentNode))try{var l=R.ownerDocument,f=l.createRange();f.selectNodeContents(R),f.collapse(!0);var _=r.getSelection();_.removeAllRanges(),_.addRange(f)}catch{}}function I(){try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_textdirection=RTE_Plugin_TextDirection,typeof RTE_DefaultConfig.defaultTextDirection>"u"&&(RTE_DefaultConfig.defaultTextDirection=null),typeof RTE_DefaultConfig.textDirectionAutoDetect>"u"&&(RTE_DefaultConfig.textDirectionAutoDetect=!1),typeof RTE_DefaultConfig.textDirectionSwapAlign>"u"&&(RTE_DefaultConfig.textDirectionSwapAlign=!0);function RTE_Plugin_TextDirection(){var N=this,u,r,x=null,H={P:1,DIV:1,LI:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1,BLOCKQUOTE:1,TD:1,TH:1,PRE:1,UL:1,OL:1,TABLE:1,SECTION:1,ARTICLE:1},F=/[֐-׿؀-ۿ܀-ݏݐ-ݿހ-޿߀-߿ࠀ-࠿ࡀ-࡟ࢠ-ࣿיִ-﷿ﹰ-]/,$=/[A-Za-zÀ-ʯͰ-֏ऀ-႟Ḁ-῿Ⰰ-ⷿ⺀-꓏가-힯]/;N.PluginName="TextDirection",N.InitConfig=function(R){u=R},N.InitEditor=function(R){r=R,r.attachEvent("exec_command_textdirection",function(l){l.returnValue=!0;var f=l&&l.value;f==="rtl"||f==="ltr"?N.Apply(f):N.Toggle()}),z();try{r.attachEvent("ready",z)}catch{}try{r.attachEvent("aftersethtml",function(){z(),o()})}catch{}setTimeout(function(){z(),o()},0),r.setTextDirection=function(l){return N.Apply(l)},r.toggleTextDirection=function(){return N.Toggle()},r.getTextDirection=function(){return N.Current()},r.setBaseDirection=function(l){return N.Base(l)},r.getBaseDirection=function(){var l=V();return l&&l.getAttribute("dir")||"ltr"},r.detectTextDirection=function(l){return K(String(l??""))},r.autoDetectTextDirection=function(){return N.AutoDetect()},r.isolateBidi=function(l,f){return N.Isolate(l,f)},r.insertIsolated=function(l,f){return N.InsertIsolated(l,f)},r.getTextDirectionCss=function(){return M()}};function z(){var R=O();!R||R===x||(x=R,I(R))}function o(){var R=V();R&&((u.defaultTextDirection==="rtl"||u.defaultTextDirection==="ltr")&&(R.getAttribute("dir")||N.Base(u.defaultTextDirection)),u.textDirectionAutoDetect&&N.AutoDetect())}function O(){try{return r.getDocument()}catch{return null}}function V(){try{return r.getEditable()}catch{return null}}function K(R){for(var l=0;l<R.length;l++){var f=R.charAt(l);if(F.test(f))return"rtl";if($.test(f))return"ltr"}return"neutral"}function W(){var R=V(),l=[];try{var f=r.getSelection();if(!f||f.rangeCount===0)return l;var _=f.getRangeAt(0),v=b(_.startContainer),s=b(_.endContainer);if(!v)return l;if(v===s||_.collapsed)return[v];for(var c=R.querySelectorAll("*"),p=!1,g=0;g<c.length;g++){var h=c[g];if(H[h.nodeName]&&(h===v&&(p=!0),p&&!q(h)&&l.push(h),h===s))break}l.length||l.push(v)}catch{}return l}function q(R){for(var l=0;l<R.children.length;l++)if(H[R.children[l].nodeName])return!0;return!1}function b(R){for(var l=V(),f=R&&R.nodeType===3?R.parentNode:R;f&&f!==l;){if(f.nodeType===1&&H[f.nodeName])return f;f=f.parentNode}return l&&l.firstElementChild?l.firstElementChild:null}N.Current=function(){var R=W()[0];if(!R)return r.getBaseDirection?r.getBaseDirection():"ltr";var l=R.getAttribute("dir");if(l)return l;try{var f=O(),_=f&&(f.defaultView||f.parentWindow);if(_)return _.getComputedStyle(R).direction||"ltr"}catch{}return"ltr"},N.Apply=function(R){R=R==="rtl"?"rtl":R==="auto"?"auto":"ltr";var l=W();if(!l.length)return!1;for(var f=0;f<l.length;f++){var _=l[f],v=_.getAttribute("dir")||"ltr";_.setAttribute("dir",R),u.textDirectionSwapAlign!==!1&&R!=="auto"&&v!==R&&m(_,R)}return k(),R},N.Toggle=function(){return N.Apply(N.Current()==="rtl"?"ltr":"rtl")};function m(R,l){var f=R.style&&R.style.textAlign||R.getAttribute("align")||"";if(f){var _=null;if(f==="left"?_="right":f==="right"&&(_="left"),!!_){var v=l==="rtl"?"right":"left";R.style&&(R.style.textAlign=_===v?"":_),R.getAttribute("align")&&R.removeAttribute("align")}}}N.Base=function(R){var l=V();return l?(R=R==="rtl"?"rtl":R==="auto"?"auto":"ltr",l.setAttribute("dir",R),k(),R):!1},N.AutoDetect=function(){var R=V();if(!R)return[];for(var l=[],f=R.querySelectorAll("*"),_=0;_<f.length;_++){var v=f[_];if(!(!H[v.nodeName]||q(v))){var s=K(v.textContent||"");s!=="neutral"&&v.getAttribute("dir")!==s&&(v.setAttribute("dir",s),l.push({tag:v.nodeName,dir:s}))}}return l.length&&k(),l},N.Isolate=function(R,l){var f=l==="rtl"||l==="ltr"?l:"auto";return'<bdi dir="'+f+'">'+String(R??"")+"</bdi>"},N.InsertIsolated=function(R,l){var f=O();if(!f)return!1;var _=f.createElement("bdi");_.setAttribute("dir",l==="rtl"||l==="ltr"?l:"auto"),_.innerHTML=String(R??"");try{if(typeof r.insertElement=="function")return r.insertElement(_),k(),!0}catch{}try{var v=r.getSelection();if(v&&v.rangeCount){var s=v.getRangeAt(0);return s.collapse(!1),s.insertNode(_),s.setStartAfter(_),s.collapse(!0),v.removeAllRanges(),v.addRange(s),k(),!0}}catch{}return!1};function k(){try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function M(){return"[dir='rtl'] ul,[dir='rtl'] ol{padding-right:1.6em;padding-left:0;}[dir='rtl'] blockquote{border-right:3px solid #ddd;border-left:0;padding-right:.9em;padding-left:0;margin-right:0;}[dir='rtl'] table{direction:rtl;}bdi{unicode-bidi:isolate;}"}function I(R){if(R){var l=R.getElementById("rte-textdirection-styles"),f=M();if(l){if(l.getAttribute("data-css")===f)return;l.parentNode&&l.parentNode.removeChild(l)}var _=R.createElement("style");_.id="rte-textdirection-styles",_.setAttribute("data-css",f),_.appendChild(R.createTextNode(f)),(R.head||R.getElementsByTagName("head")[0]||R.documentElement).appendChild(_),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(R,_,"rte-textdirection-styles",_.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_textpartlanguage=RTE_Plugin_TextPartLanguage,typeof RTE_DefaultConfig.textPartLanguages>"u"&&(RTE_DefaultConfig.textPartLanguages=[{code:"ar",label:"Arabic",dir:"rtl"},{code:"zh-Hans",label:"Chinese (Simplified)"},{code:"zh-Hant",label:"Chinese (Traditional)"},{code:"cs",label:"Czech"},{code:"nl",label:"Dutch"},{code:"en",label:"English"},{code:"fr",label:"French"},{code:"de",label:"German"},{code:"el",label:"Greek"},{code:"he",label:"Hebrew",dir:"rtl"},{code:"hi",label:"Hindi"},{code:"it",label:"Italian"},{code:"ja",label:"Japanese"},{code:"ko",label:"Korean"},{code:"fa",label:"Persian",dir:"rtl"},{code:"pl",label:"Polish"},{code:"pt",label:"Portuguese"},{code:"ru",label:"Russian"},{code:"es",label:"Spanish"},{code:"sv",label:"Swedish"},{code:"tr",label:"Turkish"},{code:"uk",label:"Ukrainian"},{code:"ur",label:"Urdu",dir:"rtl"},{code:"vi",label:"Vietnamese"}]),typeof RTE_DefaultConfig.textPartLanguageHighlight>"u"&&(RTE_DefaultConfig.textPartLanguageHighlight=!0);function RTE_Plugin_TextPartLanguage(){var N=this,u,r,x=null;N.PluginName="TextPartLanguage",N.InitConfig=function(v){u=v},N.InitEditor=function(v){r=v,r.attachEvent("exec_command_textpartlanguage",function(s){s.returnValue=!0;var c=s&&s.value;!c||c==="none"||c==="remove"?N.Remove():N.Apply(c)}),r.toolbarFactoryMap&&(r.toolbarFactoryMap.textpartlanguage=function(s){return r.createToolbarItemDropDownPanel(s,I)}),l();try{r.attachEvent("ready",l)}catch{}try{r.attachEvent("aftersethtml",l)}catch{}setTimeout(l,0),r.setTextLanguage=function(s){return N.Apply(s)},r.removeTextLanguage=function(){return N.Remove()},r.getTextLanguage=function(){return N.Current()},r.listTextLanguages=function(){return $().slice()},r.getMarkedLanguages=function(){return N.List()}};function H(){try{return r.getDocument()}catch{return null}}function F(){try{return r.getEditable()}catch{return null}}function $(){var v=u&&u.textPartLanguages;return v&&v.length?v:[]}function z(v){for(var s=$(),c=0;c<s.length;c++)if(s[c].code===v)return s[c];return{code:v,label:v}}function o(v){for(var s=F(),c=v&&v.nodeType===3?v.parentNode:v;c&&c!==s&&c.nodeType===1;){if(c.hasAttribute&&c.hasAttribute("lang"))return c;c=c.parentNode}return null}function O(){try{var v=r.getSelection();return!v||v.rangeCount===0?null:v.getRangeAt(0)}catch{return null}}N.Current=function(){var v=O();if(!v)return null;var s=o(v.startContainer);return s&&!v.collapsed&&o(v.endContainer)!==s?null:s?s.getAttribute("lang"):null},N.List=function(){var v=F(),s=[];if(!v)return s;for(var c={},p=v.querySelectorAll("[lang]"),g=0;g<p.length;g++){var h=p[g].getAttribute("lang");!h||c[h]||(c[h]=!0,s.push({code:h,label:z(h).label}))}return s},N.Apply=function(v){if(v=String(v??"").trim(),!v)return!1;var s=H(),c=O();if(!s||!c)return!1;if(N.Current()===v)return N.Remove();if(c.collapsed){var p=o(c.startContainer);return p?(K(p,v),M(),v):!1}var g=s.createElement("span");K(g,v);try{c.surroundContents(g)}catch{var h=c.extractContents();g.appendChild(h),c.insertNode(g)}return W(g),b(g),g.firstChild?(m(g),k(g),M(),v):(g.parentNode&&g.parentNode.removeChild(g),!1)},N.Remove=function(){var v=O();if(!v)return!1;var s=F();if(!s)return!1;var c=0,p=o(v.startContainer);if(p&&(q(p),c++),!v.collapsed)for(var g=s.querySelectorAll("[lang]"),h=g.length-1;h>=0;h--){var L=g[h];L!==p&&V(v,L)&&(q(L),c++)}return c&&M(),c>0};function V(v,s){try{var c=s.ownerDocument.createRange();return c.selectNodeContents(s),v.compareBoundaryPoints(Range.END_TO_START,c)<0&&v.compareBoundaryPoints(Range.START_TO_END,c)>0}catch{return!1}}function K(v,s){v.setAttribute("lang",s);var c=z(s).dir;c==="rtl"||c==="ltr"?v.setAttribute("dir",c):v.removeAttribute("dir")}function W(v){for(var s=v.querySelectorAll("[lang]"),c=s.length-1;c>=0;c--)q(s[c])}function q(v){if(!(!v||!v.parentNode))if(v.nodeName==="SPAN"&&v.attributes.length<=2&&!v.getAttribute("class")&&!v.getAttribute("style")&&!v.getAttribute("id")){for(var s=v.parentNode;v.firstChild;)s.insertBefore(v.firstChild,v);s.removeChild(v);try{s.normalize()}catch{}}else v.removeAttribute("lang"),v.removeAttribute("dir")}function b(v){for(var s=v.childNodes.length-1;s>=0;s--){var c=v.childNodes[s];c.nodeType===3&&c.nodeValue===""&&v.removeChild(c)}}function m(v){var s=v.getAttribute("lang"),c=v.previousSibling;if(c&&c.nodeType===1&&c.nodeName==="SPAN"&&c.getAttribute("lang")===s){for(;v.firstChild;)c.appendChild(v.firstChild);v.parentNode.removeChild(v),v=c}var p=v.nextSibling;if(p&&p.nodeType===1&&p.nodeName==="SPAN"&&p.getAttribute("lang")===s){for(;p.firstChild;)v.appendChild(p.firstChild);p.parentNode.removeChild(p)}try{v.normalize()}catch{}return v}function k(v){try{var s=r.getSelection(),c=v.ownerDocument.createRange();c.selectNodeContents(v),s.removeAllRanges(),s.addRange(c)}catch{}}function M(){try{typeof r.updateDesign=="function"&&r.updateDesign()}catch{}try{typeof r.fireChange=="function"&&r.fireChange()}catch{}}function I(v){var s=N.Current();v.style.width="220px",v.style.maxHeight="340px",v.style.overflowY="auto",v.style.padding="4px 0";var c=$();R(v,r.getLangText&&r.getLangText("removelanguage")||"Remove language",null,!s,function(){N.Remove()});var p=v.ownerDocument.createElement("div");p.style.cssText="height:1px;margin:4px 6px;background:var(--rte-border-color,#e0e0e0);",v.appendChild(p);for(var g=0;g<c.length;g++)(function(h){R(v,h.label,h.code,s===h.code,function(){N.Apply(h.code)})})(c[g]);setTimeout(function(){var h=v.querySelectorAll("rte-toolbar-dropdown-item");if(h.length){for(var L=h[0],E=0;E<h.length;E++)if(h[E].getAttribute("aria-checked")==="true"){L=h[E];break}try{L.focus()}catch{}}},0)}function R(v,s,c,p,g){var h=v.ownerDocument,L=h.createElement("rte-toolbar-dropdown-item");v.appendChild(L),L.setAttribute("role","menuitemradio"),L.setAttribute("aria-checked",p?"true":"false"),L.setAttribute("tabindex","0"),L.style.cssText="padding:5px 12px;cursor:pointer;white-space:nowrap;display:flex;justify-content:space-between;gap:12px;color:var(--rte-text-color,inherit);"+(p?"font-weight:600;":"");var E=h.createElement("span");if(E.appendChild(h.createTextNode(s)),L.appendChild(E),c){var A=h.createElement("span");A.style.cssText="opacity:.55;font-size:11px;",A.appendChild(h.createTextNode(c)),L.appendChild(A)}L.onmouseover=function(){L.style.backgroundColor="var(--rte-hover-bg,#e6e6e6)"},L.onmouseout=function(){L.style.backgroundColor=""},L.onclick=function(){try{r.closeCurrentPopup()}catch{}try{r.focus()}catch{}g()},L.onkeydown=function(C){var y=C.key;if(y==="Enter"||y===" "||y==="Spacebar"){C.preventDefault(),C.stopPropagation(),L.onclick();return}if(y==="ArrowDown"||y==="ArrowUp"){C.preventDefault(),C.stopPropagation();var d=v.querySelectorAll("rte-toolbar-dropdown-item"),w=Array.prototype.slice.call(d),D=w.indexOf(L),P=w[(D+(y==="ArrowDown"?1:-1)+w.length)%w.length];P&&P.focus();return}if(y==="Home"||y==="End"){C.preventDefault(),C.stopPropagation();var B=v.querySelectorAll("rte-toolbar-dropdown-item"),Z=y==="Home"?B[0]:B[B.length-1];Z&&Z.focus();return}if(y==="Escape"){C.preventDefault(),C.stopPropagation();try{r.closeCurrentPopup()}catch{}}}}function l(){var v=H();!v||v===x||(x=v,_(v))}function f(){return u&&u.textPartLanguageHighlight===!1?"":"[lang]:not(html):not(body){border-bottom:1px dotted rgba(120,120,120,.75);}[lang]:not(html):not(body):hover{background:rgba(120,120,120,.10);}"}function _(v){if(v){var s=f(),c=v.getElementById("rte-textpartlanguage-styles");if(c){if(c.getAttribute("data-css")===s)return;c.parentNode&&c.parentNode.removeChild(c)}if(s){var p=v.createElement("style");p.id="rte-textpartlanguage-styles",p.setAttribute("data-css",s),p.appendChild(v.createTextNode(s)),(v.head||v.getElementsByTagName("head")[0]||v.documentElement).appendChild(p),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(v,p,"rte-textpartlanguage-styles",p.textContent)}}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_todolist=RTE_Plugin_TodoList;function RTE_Plugin_TodoList(){var N=this,u,r,x,H;N.PluginName="TodoList",N.InitConfig=function(V){u=V},N.InitEditor=function(V){r=V,x=r.getEditable(),H=r.getDocument(),r.attachEvent("exec_command_inserttodolist",function(K){K.returnValue=!0,N.InsertTaskList()}),x&&(x.addEventListener("click",function(K){var W=F(K.target,"rte-task-checkbox",x);if(W){var q=W.parentNode;if(!(!q||!q.classList||!q.classList.contains("rte-task-item"))){var b=q.getAttribute("data-checked")==="true";q.setAttribute("data-checked",b?"false":"true"),K.preventDefault(),$()}}}),x.addEventListener("keyup",function(K){if(K.key==="Enter"&&!K.shiftKey){N.Normalize();var W=z();W&&W.setAttribute("data-checked","false")}}),setTimeout(function(){o(H)},0))};function F(V,K,W){for(;V&&V!==W;){if(V.nodeType===1&&V.classList&&V.classList.contains(K))return V;V=V.parentNode}return null}function $(){if(typeof r.fireChange=="function")try{r.fireChange()}catch{}}function z(){try{var V=r.getSelection();if(!V||V.rangeCount===0)return null;var K=V.getRangeAt(0).startContainer;return F(K,"rte-task-item",x)}catch{return null}}function o(V){if(!(!V||V.getElementById("rte-todolist-styles"))){var K="ul.rte-task-list{list-style:none;margin:.4em 0;padding-left:0;}ul.rte-task-list li.rte-task-item{position:relative;padding-left:28px;margin:3px 0;min-height:20px;}li.rte-task-item>.rte-task-checkbox{position:absolute;left:0;top:1px;width:18px;height:18px;border:2px solid #94a3b8;border-radius:5px;box-sizing:border-box;cursor:pointer;user-select:none;transition:background .12s,border-color .12s;}li.rte-task-item>.rte-task-checkbox:hover{border-color:#1d67ba;}li.rte-task-item[data-checked='true']>.rte-task-checkbox{background:#1d67ba;border-color:#1d67ba;}li.rte-task-item[data-checked='true']>.rte-task-checkbox::after{content:'';position:absolute;left:4px;top:0px;width:6px;height:11px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg);}li.rte-task-item[data-checked='true']{color:#94a3b8;text-decoration:line-through;}",W=V.createElement("style");W.id="rte-todolist-styles",W.appendChild(V.createTextNode(K)),(V.head||V.getElementsByTagName("head")[0]||V.documentElement).appendChild(W),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(V,W,"rte-todolist-styles",W.textContent)}}function O(){var V=H.createElement("span");return V.className="rte-task-checkbox",V.setAttribute("contenteditable","false"),V}N.Normalize=function(){if(x)for(var V=x.querySelectorAll("ul.rte-task-list"),K=0;K<V.length;K++)for(var W=V[K].children,q=0;q<W.length;q++){var b=W[q];if(b.nodeName==="LI"){b.classList.add("rte-task-item"),b.getAttribute("data-checked")!=="true"&&b.getAttribute("data-checked")!=="false"&&b.setAttribute("data-checked","false");var m=b.firstChild;m&&m.nodeType===1&&m.classList&&m.classList.contains("rte-task-checkbox")||b.insertBefore(O(),b.firstChild)}}},N.InsertTaskList=function(){o(H);var V="rte-todo-pending",K='<ul class="rte-task-list"><li class="rte-task-item" data-checked="false" id="'+V+'"><span class="rte-task-checkbox" contenteditable="false"></span>&#8203;</li></ul>';r.insertHTML(K);try{var W=H.getElementById(V);if(W){W.removeAttribute("id");var q=H.createRange(),b=W.lastChild;b&&b.nodeType===3?q.setStart(b,b.length):q.setStart(W,W.childNodes.length),q.collapse(!0);var m=r.getSelection();m&&(m.removeAllRanges(),m.addRange(q))}}catch{}r.focus(),$()}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.svgCode_trackchanges||(RTE_DefaultConfig.svgCode_trackchanges='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 17l4-1 10-10-3-3L5 13l-1 4z"/><path d="M14 4l3 3"/><path d="M4 21h10"/></svg>'),RTE_DefaultConfig.plugin_trackedchanges=RTE_Plugin_TrackedChanges;function RTE_Plugin_TrackedChanges(){var N=this,u,r,x=!1;N.PluginName="TrackedChanges",N.InitConfig=function(se){u=se,u.trackChangesEnabled!==!1&&(u.currentUser=u.currentUser||null,u.trackChangesInsertClass=u.trackChangesInsertClass||"rte-tc rte-tc-insert",u.trackChangesDeleteClass=u.trackChangesDeleteClass||"rte-tc rte-tc-delete",u.reviewCanDecide=u.reviewCanDecide||null,u.onReviewDecisionDenied=u.onReviewDecisionDenied||null,u.text_trackchanges=u.text_trackchanges||"Suggesting mode",H("toolbar_default","#{trackchanges}"),H("toolbar_full","#{trackchanges}"),H("toolbar_mobile","#{trackchanges}"),(u.controltoolbar_TEXT||"").indexOf("trackchanges")===-1&&(u.controltoolbar_TEXT=(u.controltoolbar_TEXT||"")+"|{trackchanges}"))},N.InitEditor=function(se){r=se,u.trackChangesEnabled!==!1&&(r.trackedChanges={enable:function(U){F(U)},disable:function(){$()},isEnabled:function(){return x},acceptAll:function(U){return fe(U)},rejectAll:function(U){return re(U)},accept:function(U){return B(U)},reject:function(U){return Z(U)},canDecide:function(U,Q){var j=r.reviewLedger&&r.reviewLedger.get(U);return!!j&&P(j,Q||"accept")},list:function(U){if(!r.reviewLedger)return[];var Q=U&&U.all===!0;return r.reviewLedger.list().filter(function(j){return j.changeType!=="insert"&&j.changeType!=="delete"?!1:Q||j.status==="pending"})}},de(),r.toolbarFactoryMap=r.toolbarFactoryMap||{},r.toolbarFactoryMap.trackchanges=function(U){var Q=r.createToolbarButton(U);return Q.__tcSync=function(){x?Q.classList.add("rte-ui-active"):Q.classList.remove("rte-ui-active"),Q.setAttribute("aria-pressed",x?"true":"false"),Q.setAttribute("title",u.text_trackchanges||"Suggesting mode")},Q.__tcSync(),Q},r.attachEvent("exec_command_trackchanges",function(U){U.returnValue=!0,U.stopBubble=!0,x?$():F()}),r.getEditable().addEventListener("beforeinput",o,!0))};function H(se,U){u[se]&&u[se].indexOf(U)===-1&&(u[se]=u[se]+U)}function F(se){se&&(u.currentUser=se),u.currentUser||(u.currentUser={id:"user",name:"User",color:"#2563eb"},console.warn("trackedchanges: no config.currentUser configured; defaulting to generic user.")),x=!0,z()}function $(){x=!1,z()}function z(){for(var se=r.iframe&&r.iframe.ownerDocument||document,U=se.querySelectorAll(".rte_command_trackchanges"),Q=0;Q<U.length;Q++)U[Q].__tcSync&&U[Q].__tcSync()}function o(se){if(x&&r.reviewLedger){var U=se.inputType;if(U){if(U==="insertText"||U==="insertReplacementText"){se.preventDefault(),O(se.data||"");return}if(U==="deleteContentBackward"||U==="deleteContentForward"||U==="deleteByCut"){se.preventDefault(),k(U);return}}}}function O(se){if(se){var U=r.getSelection();if(!(!U||U.rangeCount===0)){var Q=U.getRangeAt(0);if(!Q.collapsed){if(!h(Q))return;Q=U.getRangeAt(0),b(se,Q);return}var j=V(Q);j?q(j,se):b(se,Q)}}}function V(se){var U=se.startContainer;if(U.nodeType===3&&U.parentNode&&K(U.parentNode))return U.parentNode;if(U.nodeType===1&&se.startOffset>0){var Q=U.childNodes[se.startOffset-1];if(Q&&Q.nodeType===1&&K(Q))return Q}return U.nodeType===3&&U.previousSibling&&K(U.previousSibling)&&se.startOffset===0?U.previousSibling:null}function K(se){return!se||se.nodeType!==1||!se.classList||!se.classList.contains("rte-tc-insert")?!1:se.getAttribute("data-tc-author")===u.currentUser.id}function W(se){if(!(!se||se.nodeType!==3)){var U=se.nodeValue;U.indexOf(" ")===-1&&U.indexOf("\xA0")===-1||(U=U.replace(/\u00a0/g," "),U=U.replace(/ (?= )/g,"\xA0"),U=U.replace(/ $/,"\xA0"),U!==se.nodeValue&&(se.nodeValue=U))}}function q(se,U){var Q=r.getDocument(),j=se.lastChild,J;j&&j.nodeType===3?(j.nodeValue=j.nodeValue+U,J=j):(J=Q.createTextNode(U),se.appendChild(J)),W(J),w(J),m(se)}function b(se,U){var Q=r.getDocument(),j=Q.createElement("span");j.className=u.trackChangesInsertClass;var J=u.currentUser,Y="tc-"+Date.now()+"-"+Math.floor(Math.random()*1e4);j.setAttribute("data-tc-id",Y),j.setAttribute("data-tc-author",J.id),j.setAttribute("data-tc-at",new Date().toISOString()),j.style.color=J.color,j.style.textDecoration="underline",j.appendChild(Q.createTextNode(se)),U.insertNode(j),W(j.firstChild),w(j.firstChild),r.reviewLedger.add({id:Y,changeType:"insert",author:J,text:se,status:"pending",sourceLabel:"Suggested insert",createdAt:Date.now()})}function m(se){var U=se.getAttribute("data-tc-id");U&&r.reviewLedger.update(U,{text:se.textContent})}function k(se){var U=r.getSelection();if(!(!U||U.rangeCount===0)){var Q=U.getRangeAt(0);if(!Q.collapsed){h(Q);return}var j=r.getDocument().createRange();if(se==="deleteContentBackward"){var J=R(Q.startContainer,Q.startOffset);if(!J)return;j.setStart(J.node,J.offset),j.setEnd(J.node,J.offset+1)}else{var Y=l(Q.startContainer,Q.startOffset);if(!Y)return;j.setStart(Y.node,Y.offset-1),j.setEnd(Y.node,Y.offset)}if(g(j)){j.deleteContents();var te=r.getSelection();te.removeAllRanges(),te.addRange(j),d();return}h(j)}}function M(se){for(var U=se.nodeType===1?se:se.parentNode;U&&U!==r.getEditable();){if(U.classList&&U.classList.contains("rte-tc-delete"))return!0;U=U.parentNode}return!1}function I(){for(var se=r.getEditable(),U=r.getDocument().createTreeWalker(se,NodeFilter.SHOW_TEXT,{acceptNode:function(J){return M(J)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),Q=[],j;j=U.nextNode();)Q.push(j);return Q}function R(se,U){var Q=I();if(!Q.length)return null;var j=f(se,U,Q);return j<=0?null:_(j-1,Q)}function l(se,U){var Q=I();if(!Q.length)return null;for(var j=0,J=0;J<Q.length;J++)j+=Q[J].nodeValue.length;var Y=f(se,U,Q);return Y>=j?null:_(Y+1,Q)}function f(se,U,Q){var j=r.getDocument().createRange();j.setStart(se,U),j.collapse(!0);for(var J=0,Y=0;Y<Q.length;Y++){var te=Q[Y],le=j.comparePoint(te,te.nodeValue.length);if(le<=0){J+=te.nodeValue.length;continue}var pe=j.comparePoint(te,0);if(pe>=0)break;for(var ye=0,me=te.nodeValue.length;ye<me;){var ee=ye+me>>1;j.comparePoint(te,ee)<0?ye=ee+1:me=ee}J+=ye;break}return J}function _(se,U){for(var Q=se,j=0;j<U.length;j++){if(Q<=U[j].nodeValue.length)return{node:U[j],offset:Q};Q-=U[j].nodeValue.length}return null}function v(se){if(!se)return null;if(se.nodeType===3)return se;var U=r.getDocument().createTreeWalker(se,NodeFilter.SHOW_TEXT);return U.nextNode()}function s(se){if(!se)return null;if(se.nodeType===3)return se;for(var U=r.getDocument().createTreeWalker(se,NodeFilter.SHOW_TEXT),Q=null,j;j=U.nextNode();)Q=j;return Q}function c(se){for(var U=r.getEditable(),Q=r.getDocument().createTreeWalker(U,NodeFilter.SHOW_TEXT),j=null,J;J=Q.nextNode();){if(J===se)return j;j=J}return null}function p(se){for(var U=r.getEditable(),Q=r.getDocument().createTreeWalker(U,NodeFilter.SHOW_TEXT),j=!1,J;J=Q.nextNode();){if(j)return J;J===se&&(j=!0)}return null}function g(se){for(var U=se.startContainer.parentNode;U&&U!==r.getEditable();){if(K(U))return se.endContainer.parentNode===U||U.contains(se.endContainer);U=U.parentNode}return!1}function h(se){if(se.collapsed)return!1;var U=r.getDocument(),Q=se.cloneContents();if(!y(Q))return!1;var j=u.currentUser,J=L(se,"before",j),Y=L(se,"after",j);if(se.deleteContents(),J){if(A(J,Q),Y&&Y!==J){for(;Y.firstChild;)J.appendChild(Y.firstChild);var te=Y.getAttribute("data-tc-id");Y.remove(),te&&r.reviewLedger&&r.reviewLedger.remove(te)}var le=U.createRange();le.setStartAfter(J),le.collapse(!0);var pe=r.getSelection();pe.removeAllRanges(),pe.addRange(le);var ye=J.getAttribute("data-tc-id");return ye&&r.reviewLedger&&r.reviewLedger.update(ye,{text:J.textContent}),!0}if(Y){C(Y,Q);var me=U.createRange();me.setStartBefore(Y),me.collapse(!0);var ee=r.getSelection();ee.removeAllRanges(),ee.addRange(me);var ue=Y.getAttribute("data-tc-id");return ue&&r.reviewLedger&&r.reviewLedger.update(ue,{text:Y.textContent}),!0}var ce=U.createElement("span");ce.className=u.trackChangesDeleteClass;var ve="tc-"+Date.now()+"-"+Math.floor(Math.random()*1e4);ce.setAttribute("data-tc-id",ve),ce.setAttribute("data-tc-author",j.id),ce.setAttribute("data-tc-at",new Date().toISOString()),ce.style.color=j.color,ce.style.textDecoration="line-through",ce.appendChild(Q),se.insertNode(ce);var be=U.createRange();be.setStartAfter(ce),be.collapse(!0);var ke=r.getSelection();return ke.removeAllRanges(),ke.addRange(be),r.reviewLedger.add({id:ve,changeType:"delete",author:j,text:ce.textContent,originalHtml:ce.innerHTML,status:"pending",sourceLabel:"Suggested delete",createdAt:Date.now()}),!0}function L(se,U,Q){var j=U==="before"?se.startContainer:se.endContainer,J=U==="before"?se.startOffset:se.endOffset;if(j.nodeType===3){if(U==="before"&&J===0){var Y=j.previousSibling;if(Y&&E(Y,Q))return Y}if(U==="after"&&J===j.nodeValue.length){var te=j.nextSibling;if(te&&E(te,Q))return te}return null}if(U==="before"&&J>0){var le=j.childNodes[J-1];if(le&&E(le,Q))return le}if(U==="after"&&J<j.childNodes.length){var pe=j.childNodes[J];if(pe&&E(pe,Q))return pe}return null}function E(se,U){return!se||se.nodeType!==1||!se.classList||!se.classList.contains("rte-tc-delete")?!1:se.getAttribute("data-tc-author")===U.id}function A(se,U){for(;U.firstChild;)se.appendChild(U.firstChild)}function C(se,U){for(var Q=se.firstChild;U.firstChild;)se.insertBefore(U.firstChild,Q)}function y(se){var U=(se.textContent||"").replace(/\s+/g,"");return!!U}function d(){for(var se=r.getEditable().querySelectorAll(".rte-tc-insert"),U=0;U<se.length;U++){var Q=se[U];if(!Q.textContent||!Q.textContent.length){var j=Q.getAttribute("data-tc-id");j&&r.reviewLedger&&r.reviewLedger.remove(j),Q.remove()}else m(Q)}}function w(se){if(se){var U=r.getDocument(),Q=U.createRange();se.nodeType===3?Q.setStart(se,se.nodeValue.length):Q.setStart(se,se.childNodes.length),Q.collapse(!0);var j=r.getSelection();j.removeAllRanges(),j.addRange(Q)}}function D(){return u.currentUser||{id:"user",name:"User",color:"#2563eb"}}function P(se,U){if(typeof u.reviewCanDecide!="function")return!0;var Q=!1,j=D();try{Q=u.reviewCanDecide(se,U,j,r)!==!1}catch(Y){console.warn("trackedchanges: reviewCanDecide threw; denying decision.",Y)}if(Q)return!0;var J={entry:se,action:U,user:j};try{typeof u.onReviewDecisionDenied=="function"&&u.onReviewDecisionDenied(J)}catch{}try{typeof r.fireEvent=="function"&&r.fireEvent("review_decision_denied",J)}catch{}return!1}function B(se){var U=r.reviewLedger.get(se);if(!U||!P(U,"accept"))return!1;var Q=r.getEditable().querySelector('[data-tc-id="'+ae(se)+'"]');return U.changeType==="insert"?Q&&ie(Q):U.changeType==="delete"&&Q&&Q.remove(),r.reviewLedger.update(se,{status:"accepted",decidedAt:Date.now(),decidedBy:D()}),!0}function Z(se){var U=r.reviewLedger.get(se);if(!U||!P(U,"reject"))return!1;var Q=r.getEditable().querySelector('[data-tc-id="'+ae(se)+'"]');return U.changeType==="insert"?Q&&Q.remove():U.changeType==="delete"&&Q&&ie(Q),r.reviewLedger.update(se,{status:"rejected",decidedAt:Date.now(),decidedBy:D()}),!0}function fe(se){for(var U=r.reviewLedger.list(se).filter(function(J){return(J.changeType==="insert"||J.changeType==="delete")&&J.status==="pending"}),Q=0,j=0;j<U.length;j++)B(U[j].id)&&Q++;return Q}function re(se){for(var U=r.reviewLedger.list(se).filter(function(J){return(J.changeType==="insert"||J.changeType==="delete")&&J.status==="pending"}),Q=0,j=0;j<U.length;j++)Z(U[j].id)&&Q++;return Q}function ie(se){var U=se.parentNode;if(U){for(;se.firstChild;)U.insertBefore(se.firstChild,se);U.removeChild(se)}}function ae(se){var U=String(se);if(typeof CSS<"u"&&typeof CSS.escape=="function")try{return CSS.escape(U)}catch{}return U.replace(/["\\\]\[\(\)\{\}'#:;,<>=`~!@$%^&*+/?\s\x00-\x1F]/g,function(Q){return"\\"+Q})}function de(){var se=r&&r.iframe&&r.iframe.ownerDocument||document;if(!se.querySelector("style[data-rte-trackchanges]")){var U=se.createElement("style");U.setAttribute("data-rte-trackchanges","1"),U.textContent=[".richtexteditor rte-toolbar-button.rte_command_trackchanges{position:relative;border-radius:8px;transition:background .14s ease,color .14s ease,box-shadow .14s ease}",".richtexteditor rte-toolbar-button.rte_command_trackchanges.rte-ui-active{background:linear-gradient(135deg,#e9f7ef,#eef5ff);color:#17633f;box-shadow:inset 0 0 0 1px rgba(34,132,82,.28),0 6px 14px rgba(34,132,82,.12)}",".richtexteditor rte-toolbar-button.rte_command_trackchanges.rte-ui-active:after{content:'';position:absolute;right:5px;top:5px;width:6px;height:6px;border-radius:50%;background:#22a66a;box-shadow:0 0 0 2px #fff}",".rte-tc{border-radius:4px;padding:0 2px;box-decoration-break:clone;-webkit-box-decoration-break:clone}",".rte-tc-insert{background:linear-gradient(180deg,rgba(232,248,239,.78),rgba(232,248,239,.38));color:#125b39;text-decoration:underline;text-decoration-color:#22a66a;text-decoration-thickness:2px;text-underline-offset:3px}",".rte-tc-delete{background:linear-gradient(180deg,rgba(255,240,240,.82),rgba(255,240,240,.42));color:#9f1d1d;text-decoration:line-through;text-decoration-color:#dc4c4c;text-decoration-thickness:2px;opacity:.92}"].join(`
75
75
  `),se.head.appendChild(U),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(se,U,"rte-trackedchanges-style",U.textContent)}var Q=r.getDocument();if(Q&&Q.head&&!Q.querySelector("style[data-rte-trackchanges-inline]")){var j=Q.createElement("style");j.setAttribute("data-rte-trackchanges-inline","1"),j.textContent=[".rte-tc{border-radius:4px;padding:0 2px;box-decoration-break:clone;-webkit-box-decoration-break:clone}",".rte-tc-insert{background:linear-gradient(180deg,rgba(232,248,239,.78),rgba(232,248,239,.38));color:#125b39;text-decoration:underline;text-decoration-color:#22a66a;text-decoration-thickness:2px;text-underline-offset:3px}",".rte-tc-delete{background:linear-gradient(180deg,rgba(255,240,240,.82),rgba(255,240,240,.42));color:#9f1d1d;text-decoration:line-through;text-decoration-color:#dc4c4c;text-decoration-thickness:2px;opacity:.92}"].join(`
76
76
  `),Q.head.appendChild(j),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(Q,j,"rte-trackedchanges-iStyle",j.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_typewriter=RTE_Plugin_Typewriter,typeof RTE_DefaultConfig.typewriterModeEnabled>"u"&&(RTE_DefaultConfig.typewriterModeEnabled=!1),typeof RTE_DefaultConfig.focusModeEnabled>"u"&&(RTE_DefaultConfig.focusModeEnabled=!1),typeof RTE_DefaultConfig.typewriterAnchor>"u"&&(RTE_DefaultConfig.typewriterAnchor=.5);function RTE_Plugin_Typewriter(){var N=this,u,r,x=!1,H=!1,F=null,$=!1,z=0;N.PluginName="Typewriter",N.InitConfig=function(l){u=l,x=!!u.typewriterModeEnabled,H=!!u.focusModeEnabled},N.InitEditor=function(l){r=l,o();try{r.attachEvent("ready",o)}catch{}try{r.attachEvent("aftersethtml",o)}catch{}setTimeout(o,0),setTimeout(o,200),r.setTypewriterMode=function(f){return x=!!f,k(),x},r.setFocusMode=function(f){return H=!!f,k(),H},r.toggleTypewriterMode=function(){return x=!x,k(),x},r.toggleFocusMode=function(){return H=!H,k(),H},r.isTypewriterMode=function(){return x},r.isFocusMode=function(){return H}};function o(){var l=r.getDocument();l&&(M(l),l!==F&&(l.addEventListener("keyup",W,!0),l.addEventListener("mouseup",W,!0),l.addEventListener("input",W,!0),F=l)),R(),k()}function O(l){return l&&l.nodeType===1&&/^(P|H[1-6]|LI|BLOCKQUOTE|PRE|DIV|TD|TH|FIGCAPTION)$/.test(l.nodeName)}function V(){try{var l=r.getSelection();if(!l||l.rangeCount===0)return null;var f=r.getEditable(),_=l.getRangeAt(0).startContainer;_&&_.nodeType===3&&(_=_.parentNode);for(var v=null;_&&_!==f;)O(_)&&(v=_),_=_.parentNode;return v}catch{return null}}function K(){try{var l=r.getSelection();if(!l||l.rangeCount===0)return null;var f=l.getRangeAt(0).cloneRange(),_=f.getBoundingClientRect();if(_&&(_.top||_.bottom||_.height))return _;var v=V();return v?v.getBoundingClientRect():null}catch{return null}}function W(){if(!(!x&&!H)&&!z){var l=typeof requestAnimationFrame=="function"?requestAnimationFrame:function(f){return setTimeout(f,16)};z=l(function(){z=0,H&&q(),x&&b()})}}function q(){var l=r.getEditable();if(l){for(var f=l.querySelectorAll(".rte-focus-current"),_=0;_<f.length;_++)f[_].classList.remove("rte-focus-current");var v=V();v&&v.classList.add("rte-focus-current")}}function b(){var l=r.getDocument();if(l){var f=K();if(f){var _=l.defaultView||l.parentWindow;if(_){var v=_.innerHeight||l.documentElement.clientHeight;if(v){var s=v*m(u.typewriterAnchor,.15,.85),c=f.top+f.height/2,p=c-s;if(!(Math.abs(p)<2)){var g=l.scrollingElement||l.documentElement||l.body;if(g&&g.scrollHeight-g.clientHeight<=4){var h=r.getEditable();h&&h.scrollHeight-h.clientHeight>4&&(g=h)}g&&(g.scrollTop+=p)}}}}}}function m(l,f,_){return l=typeof l=="number"&&!isNaN(l)?l:.5,l<f?f:l>_?_:l}function k(){var l=r.getEditable();if(l){if(H)l.classList.add("rte-focus-active"),q();else{l.classList.remove("rte-focus-active");for(var f=l.querySelectorAll(".rte-focus-current"),_=0;_<f.length;_++)f[_].classList.remove("rte-focus-current")}x?(l.classList.add("rte-typewriter-active"),b()):l.classList.remove("rte-typewriter-active")}}function M(l){if(!(!l||l.getElementById("rte-typewriter-styles"))){var f=".rte-focus-active p,.rte-focus-active h1,.rte-focus-active h2,.rte-focus-active h3,.rte-focus-active h4,.rte-focus-active h5,.rte-focus-active h6,.rte-focus-active li,.rte-focus-active blockquote,.rte-focus-active pre,.rte-focus-active figcaption{opacity:.28;transition:opacity .18s ease;}.rte-focus-active .rte-focus-current,.rte-focus-active .rte-focus-current *{opacity:1 !important;}.rte-typewriter-active{padding-bottom:45vh !important;}@media (prefers-reduced-motion: reduce){.rte-focus-active p,.rte-focus-active h1,.rte-focus-active h2,.rte-focus-active h3,.rte-focus-active h4,.rte-focus-active h5,.rte-focus-active h6,.rte-focus-active li,.rte-focus-active blockquote,.rte-focus-active pre,.rte-focus-active figcaption{transition:none !important;}}",_=l.createElement("style");_.id="rte-typewriter-styles",_.appendChild(l.createTextNode(f)),(l.head||l.getElementsByTagName("head")[0]||l.documentElement).appendChild(_),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(l,_,"rte-typewriter-styles",_.textContent)}}function I(){var l=r.getEditable();if(!l)return function(){};for(var f=l.querySelectorAll(".rte-focus-current"),_=0;_<f.length;_++)f[_].classList.remove("rte-focus-current");return function(){for(var s=0;s<f.length;s++)f[s].classList.add("rte-focus-current")}}function R(){if(!$){for(var l=["getHTMLCode","getJSON","getHTMLContent"],f=!1,_=0;_<l.length;_++)(function(v){var s=r[v];if(!(typeof s!="function"||s.__rteTwWrapped)){var c=function(){var p=I();try{return s.apply(r,arguments)}finally{p()}};c.__rteTwWrapped=!0,r[v]=c,f=!0}})(l[_]);f&&($=!0)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_watermark=RTE_Plugin_Watermark,typeof RTE_DefaultConfig.watermarkText>"u"&&(RTE_DefaultConfig.watermarkText="DRAFT"),typeof RTE_DefaultConfig.watermarkColor>"u"&&(RTE_DefaultConfig.watermarkColor="#94a3b8"),typeof RTE_DefaultConfig.watermarkOpacity>"u"&&(RTE_DefaultConfig.watermarkOpacity=.18),typeof RTE_DefaultConfig.watermarkAngle>"u"&&(RTE_DefaultConfig.watermarkAngle=-30),typeof RTE_DefaultConfig.watermarkFontSize>"u"&&(RTE_DefaultConfig.watermarkFontSize=48),typeof RTE_DefaultConfig.watermarkMode>"u"&&(RTE_DefaultConfig.watermarkMode="tile"),typeof RTE_DefaultConfig.watermarkPrint>"u"&&(RTE_DefaultConfig.watermarkPrint=!1),typeof RTE_DefaultConfig.watermarkImage>"u"&&(RTE_DefaultConfig.watermarkImage=null);function RTE_Plugin_Watermark(){var N=this,u,r,x=null,H=!1,F=!1;N.PluginName="Watermark",N.InitConfig=function(m){u=m},N.InitEditor=function(m){r=m,r.attachEvent("exec_command_watermark",function(k){k.returnValue=!0,N.Toggle()}),$();try{r.attachEvent("ready",$)}catch{}try{r.attachEvent("aftersethtml",$)}catch{}setTimeout($,0),r.setWatermark=function(k){return H=!!k,K(),H},r.toggleWatermark=function(){return H=!H,K(),H},r.isWatermark=function(){return H},r.setWatermarkOptions=function(k){if(k&&typeof k=="object"){var M=["watermarkText","watermarkColor","watermarkOpacity","watermarkAngle","watermarkFontSize","watermarkMode","watermarkPrint","watermarkImage"],I={text:0,color:1,opacity:2,angle:3,fontSize:4,mode:5,print:6,image:7};for(var R in k)k.hasOwnProperty(R)&&(I[R]!==void 0?u[M[I[R]]]=k[R]:M.indexOf(R)>=0&&(u[R]=k[R]))}return K(),N.Options()},r.getWatermarkOptions=function(){return N.Options()}},N.Options=function(){return{text:u.watermarkText,color:u.watermarkColor,opacity:u.watermarkOpacity,angle:u.watermarkAngle,fontSize:u.watermarkFontSize,mode:u.watermarkMode,print:u.watermarkPrint,image:u.watermarkImage}};function $(){var m=z();m&&(q(),m!==x&&(x=m),H&&K())}function z(){try{return r.getDocument()}catch{return null}}function o(){try{return r.getEditable()}catch{return null}}function O(m){return String(m??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function V(){if(u.watermarkImage)return String(u.watermarkImage);var m=String(u.watermarkText==null?"":u.watermarkText);if(!m)return null;var k=parseInt(u.watermarkFontSize,10)||48,M=parseFloat(u.watermarkAngle);isNaN(M)&&(M=-30);var I=Math.max(240,m.length*k*.72),R=Math.max(160,k*3.2),l='<svg xmlns="http://www.w3.org/2000/svg" width="'+Math.round(I)+'" height="'+Math.round(R)+'"><text x="50%" y="50%" text-anchor="middle" dominant-baseline="middle" transform="rotate('+M+" "+Math.round(I/2)+" "+Math.round(R/2)+')" font-family="Segoe UI, Arial, sans-serif" font-size="'+k+'" font-weight="700" fill="'+O(u.watermarkColor||"#94a3b8")+'">'+O(m)+"</text></svg>";return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(l)}function K(){var m=o(),k=z();if(!(!m||!k)){if(b(k),!H){m.style.backgroundImage="",m.style.backgroundRepeat="",m.style.backgroundPosition="",m.removeAttribute("data-rte-watermark");return}var M=V();if(M){var I=String(u.watermarkMode)==="single";m.setAttribute("data-rte-watermark","true"),m.style.backgroundImage='url("'+M+'")',m.style.backgroundRepeat=I?"no-repeat":"repeat",m.style.backgroundPosition=I?"center center":"0 0";var R=parseFloat(u.watermarkOpacity);m.style.opacity="";var l=k.getElementById("rte-watermark-dynamic");l||(l=k.createElement("style"),l.id="rte-watermark-dynamic",(k.head||k.documentElement).appendChild(l)),l.textContent="[data-rte-watermark]{background-blend-mode:multiply;}[data-rte-watermark]::before{content:'';position:absolute;inset:0;pointer-events:none;background-image:inherit;background-repeat:inherit;background-position:inherit;opacity:"+(isNaN(R)?.18:R)+";z-index:0;}"+(u.watermarkPrint?"":"@media print{[data-rte-watermark]{background-image:none !important;}[data-rte-watermark]::before{display:none !important;}}"),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(k,l,"rte-watermark-dynamic",l.textContent)}}}function W(){var m=o();if(!m||!H)return function(){};var k=m.style.backgroundImage,M=m.style.backgroundRepeat,I=m.style.backgroundPosition,R=m.getAttribute("data-rte-watermark");return m.style.backgroundImage="",m.style.backgroundRepeat="",m.style.backgroundPosition="",m.removeAttribute("data-rte-watermark"),function(){m.style.backgroundImage=k,m.style.backgroundRepeat=M,m.style.backgroundPosition=I,R&&m.setAttribute("data-rte-watermark",R)}}function q(){if(!F){for(var m=["getHTMLCode","getJSON","getHTMLContent","getText"],k=!1,M=0;M<m.length;M++)(function(I){var R=r[I];if(!(typeof R!="function"||R.__rteWmWrapped)){var l=function(){var f=W();try{return R.apply(r,arguments)}finally{f()}};l.__rteWmWrapped=!0,r[I]=l,k=!0}})(m[M]);k&&(F=!0)}}function b(m){if(!(!m||m.getElementById("rte-watermark-styles"))){var k=m.createElement("style");k.id="rte-watermark-styles",k.appendChild(m.createTextNode("[data-rte-watermark]{position:relative;}")),(m.head||m.getElementsByTagName("head")[0]||m.documentElement).appendChild(k),r&&typeof r.ensureStyleSheetLive=="function"&&r.ensureStyleSheetLive(m,k,"rte-watermark-styles",k.textContent)}}}window.RTE_DefaultConfig||(window.RTE_DefaultConfig={}),RTE_DefaultConfig.plugin_wordexport=RTE_Plugin_WordExport,typeof RTE_DefaultConfig.wordExport>"u"&&(RTE_DefaultConfig.wordExport=!0);function RTE_Plugin_WordExport(){var N=this,u,r;N.PluginName="WordExport",N.InitConfig=function(K){u=K},N.InitEditor=function(K){if(r=K,u.wordExport!==!1&&(r.getWordDocument=function(W){return $(W||{})},r.exportToWord=function(W,q){var b=$(q||{}),m=O(W)||O(u.wordExportFileName)||o();return V(b,m+".doc")},r.downloadWord=r.exportToWord,r.attachEvent("exec_command_exportword",function(W){W.returnValue=!0,W.stopBubble=!0;try{r.exportToWord()}catch(q){window.console&&console.error("wordexport:",q)}}),r.slashCommands&&typeof r.slashCommands.register=="function"))try{r.slashCommands.register({id:"export-word",title:"Export to Word (legacy .doc)",description:"HTML wrapped for Word \u2014 use Export to Word (.docx) for a real OOXML file",keywords:["word","doc","legacy","html","export","download"],run:function(){r.exportToWord()}})}catch{}};function x(K){return String(K??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function H(){if(r&&typeof r.getHTMLCode=="function"){var K=r.getHTMLCode();if(K!=null)return K}var W=r&&r.getEditable?r.getEditable():null;return W?W.innerHTML:""}function F(){try{if(!r||typeof r.getDocumentPageSetup!="function")return null;var K=r.getDocumentPageSetup();if(!K||typeof K!="object")return null;var W={};K.width&&K.height&&(W.pageSize=K.width+" "+K.height),K.orientation&&(W.landscape=String(K.orientation).toLowerCase()==="landscape");var q=K.margins;return q&&typeof q=="object"&&q.top&&q.right&&q.bottom&&q.left&&(W.margin=q.top+" "+q.right+" "+q.bottom+" "+q.left),W}catch{return null}}function $(K){var W=F()||{},q=K.fontFamily||u.wordExportFontFamily||"Calibri, 'Segoe UI', Arial, sans-serif",b=K.fontSize||u.wordExportFontSize||"11pt",m=K.pageSize||W.pageSize||u.wordExportPageSize||"8.5in 11in",k=K.margin||W.margin||u.wordExportMargin||"1in",M=typeof K.landscape<"u"?K.landscape:typeof W.landscape<"u"?W.landscape:u.wordExportLandscape,I=x(K.title||z()||"Document"),R="Print",l=M?"landscape":"portrait";return`<!DOCTYPE html>\r