@fvc/richtext 1.3.7 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import{RichTextEditorComponent as e,Inject as t,Toolbar as n,HtmlEditor as r,Table as o,QuickToolbar as i}from"@cyber-wysiwyg/richtexteditor";import*as a from"react";import l,{useCallback as c}from"react";import"@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-inputs/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-lists/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-navigations/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-popups/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-richtexteditor/styles/material.css";var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;
1
+ import{RichTextEditorComponent as e,Inject as t,Toolbar as n,HtmlEditor as r,Table as o,QuickToolbar as i}from"@cyber-wysiwyg/richtexteditor";import*as a from"react";import l,{useState as c,useCallback as s}from"react";import"@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-inputs/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-lists/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-navigations/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-popups/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-richtexteditor/styles/material.css";var u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)};function m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}"function"==typeof SuppressedError&&SuppressedError;
2
2
  /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
3
- const{entries:u,setPrototypeOf:p,isFrozen:m,getPrototypeOf:d,getOwnPropertyDescriptor:f}=Object;let{freeze:g,seal:h,create:y}=Object,{apply:b,construct:T}="undefined"!=typeof Reflect&&Reflect;g||(g=function(e){return e}),h||(h=function(e){return e}),b||(b=function(e,t,n){return e.apply(t,n)}),T||(T=function(e,t){return new e(...t)});const E=M(Array.prototype.forEach),S=M(Array.prototype.lastIndexOf),v=M(Array.prototype.pop),A=M(Array.prototype.push),x=M(Array.prototype.splice),w=M(String.prototype.toLowerCase),_=M(String.prototype.toString),N=M(String.prototype.match),C=M(String.prototype.replace),R=M(String.prototype.indexOf),O=M(String.prototype.trim),k=M(Object.prototype.hasOwnProperty),L=M(RegExp.prototype.test),D=(I=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(I,t)});var I;function M(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return b(e,t,r)}}function z(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;p&&p(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(m(t)||(t[r]=e),o=e)}e[o]=!0}return e}function P(e){for(let t=0;t<e.length;t++){k(e,t)||(e[t]=null)}return e}function U(e){const t=y(null);for(const[n,r]of u(e)){k(e,n)&&(Array.isArray(r)?t[n]=P(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=U(r):t[n]=r)}return t}function H(e,t){for(;null!==e;){const n=f(e,t);if(n){if(n.get)return M(n.get);if("function"==typeof n.value)return M(n.value)}e=d(e)}return function(){return null}}const F=g(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=g(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=g(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),W=g(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=g(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Y=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),q=g(["#text"]),X=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),K=g(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=g(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),V=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Z=h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),J=h(/<%[\w\W]*|[\w\W]*%>/gm),Q=h(/\$\{[\w\W]*/gm),ee=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),te=h(/^aria-[\-\w]+$/),ne=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),re=h(/^(?:\w+script|data):/i),oe=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ie=h(/^html$/i),ae=h(/^[a-z][.\w]*(-[.\w]+)+$/i);var le=Object.freeze({__proto__:null,ARIA_ATTR:te,ATTR_WHITESPACE:oe,CUSTOM_ELEMENT:ae,DATA_ATTR:ee,DOCTYPE_NAME:ie,ERB_EXPR:J,IS_ALLOWED_URI:ne,IS_SCRIPT_OR_DATA:re,MUSTACHE_EXPR:Z,TMPLIT_EXPR:Q});const ce=1,se=3,ue=7,pe=8,me=9,de=function(){return"undefined"==typeof window?null:window};var fe=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==me||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:c,Element:s,NodeFilter:p,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=t,b=s.prototype,T=H(b,"cloneNode"),I=H(b,"remove"),M=H(b,"nextSibling"),P=H(b,"childNodes"),Z=H(b,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:re,getElementsByTagName:oe}=r,{importNode:ae}=o;let fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof u&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ge,ERB_EXPR:he,TMPLIT_EXPR:ye,DATA_ATTR:be,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:Ee,ATTR_WHITESPACE:Se,CUSTOM_ELEMENT:ve}=le;let{IS_ALLOWED_URI:Ae}=le,xe=null;const we=z({},[...F,...j,...B,...G,...q]);let _e=null;const Ne=z({},[...X,...K,...$,...V]);let Ce=Object.seal(y(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,Oe=null,ke=!0,Le=!0,De=!1,Ie=!0,Me=!1,ze=!0,Pe=!1,Ue=!1,He=!1,Fe=!1,je=!1,Be=!1,We=!0,Ge=!1,Ye=!0,qe=!1,Xe={},Ke=null;const $e=z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=z({},["audio","video","img","source","image","track"]);let Je=null;const Qe=z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let rt=nt,ot=!1,it=null;const at=z({},[et,tt,nt],_);let lt=z({},["mi","mo","mn","ms","mtext"]),ct=z({},["annotation-xml"]);const st=z({},["title","style","font","a","script"]);let ut=null;const pt=["application/xhtml+xml","text/html"];let mt=null,dt=null;const ft=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=U(e),ut=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,mt="application/xhtml+xml"===ut?_:w,xe=k(e,"ALLOWED_TAGS")?z({},e.ALLOWED_TAGS,mt):we,_e=k(e,"ALLOWED_ATTR")?z({},e.ALLOWED_ATTR,mt):Ne,it=k(e,"ALLOWED_NAMESPACES")?z({},e.ALLOWED_NAMESPACES,_):at,Je=k(e,"ADD_URI_SAFE_ATTR")?z(U(Qe),e.ADD_URI_SAFE_ATTR,mt):Qe,Ve=k(e,"ADD_DATA_URI_TAGS")?z(U(Ze),e.ADD_DATA_URI_TAGS,mt):Ze,Ke=k(e,"FORBID_CONTENTS")?z({},e.FORBID_CONTENTS,mt):$e,Re=k(e,"FORBID_TAGS")?z({},e.FORBID_TAGS,mt):U({}),Oe=k(e,"FORBID_ATTR")?z({},e.FORBID_ATTR,mt):U({}),Xe=!!k(e,"USE_PROFILES")&&e.USE_PROFILES,ke=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,je=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,We=!1!==e.SANITIZE_DOM,Ge=e.SANITIZE_NAMED_PROPS||!1,Ye=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Ae=e.ALLOWED_URI_REGEXP||ne,rt=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(Le=!1),je&&(Fe=!0),Xe&&(xe=z({},q),_e=[],!0===Xe.html&&(z(xe,F),z(_e,X)),!0===Xe.svg&&(z(xe,j),z(_e,K),z(_e,V)),!0===Xe.svgFilters&&(z(xe,B),z(_e,K),z(_e,V)),!0===Xe.mathMl&&(z(xe,G),z(_e,$),z(_e,V))),e.ADD_TAGS&&(xe===we&&(xe=U(xe)),z(xe,e.ADD_TAGS,mt)),e.ADD_ATTR&&(_e===Ne&&(_e=U(_e)),z(_e,e.ADD_ATTR,mt)),e.ADD_URI_SAFE_ATTR&&z(Je,e.ADD_URI_SAFE_ATTR,mt),e.FORBID_CONTENTS&&(Ke===$e&&(Ke=U(Ke)),z(Ke,e.FORBID_CONTENTS,mt)),Ye&&(xe["#text"]=!0),Pe&&z(xe,["html","head","body"]),xe.table&&(z(xe,["tbody"]),delete Re.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(h,i)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));g&&g(e),dt=e}},yt=z({},[...j,...B,...W]),bt=z({},[...G,...Y]),Tt=function(e){A(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){I(e)}},Et=function(e,t){try{A(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){A(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||je)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},St=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=N(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&rt===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(rt===nt)try{t=(new f).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(rt,"template",null);try{t.documentElement.innerHTML=ot?Q:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===nt?oe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},vt=function(e){return te.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},At=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof c&&e instanceof c};function wt(e,t,r){E(e,e=>{e.call(n,t,r,dt)})}const _t=function(e){let t=null;if(wt(fe.beforeSanitizeElements,e,null),At(e))return Tt(e),!0;const r=mt(e.nodeName);if(wt(fe.uponSanitizeElement,e,{tagName:r,allowedTags:xe}),ze&&e.hasChildNodes()&&!xt(e.firstElementChild)&&L(/<[/\w!]/g,e.innerHTML)&&L(/<[/\w!]/g,e.textContent))return Tt(e),!0;if(e.nodeType===ue)return Tt(e),!0;if(ze&&e.nodeType===pe&&L(/<[/\w]/g,e.data))return Tt(e),!0;if(!xe[r]||Re[r]){if(!Re[r]&&Ct(r)){if(Ce.tagNameCheck instanceof RegExp&&L(Ce.tagNameCheck,r))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(r))return!1}if(Ye&&!Ke[r]){const t=Z(e)||e.parentNode,n=P(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=T(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,M(e))}}}return Tt(e),!0}return e instanceof s&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=w(e.tagName),r=w(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===r||lt[r]):Boolean(yt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[r]:Boolean(bt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[r])&&!(t.namespaceURI===et&&!lt[r])&&!bt[n]&&(st[n]||!yt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!L(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===se&&(t=e.textContent,E([ge,he,ye],e=>{t=C(t,e," ")}),e.textContent!==t&&(A(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt(fe.afterSanitizeElements,e,null),!1):(Tt(e),!0)},Nt=function(e,t,n){if(We&&("id"===t||"name"===t)&&(n in r||n in ft))return!1;if(Le&&!Oe[t]&&L(be,t));else if(ke&&L(Te,t));else if(!_e[t]||Oe[t]){if(!(Ct(e)&&(Ce.tagNameCheck instanceof RegExp&&L(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&L(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&L(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Je[t]);else if(L(Ae,C(n,Se,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==R(n,"data:")||!Ve[e]){if(De&&!L(Ee,C(n,Se,"")));else if(n)return!1}else;return!0},Ct=function(e){return"annotation-xml"!==e&&N(e,ve)},Rt=function(e){wt(fe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||At(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:l,value:c}=i,s=mt(a),u=c;let p="value"===a?u:O(u);if(r.attrName=s,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,wt(fe.uponSanitizeAttribute,e,r),p=r.attrValue,!Ge||"id"!==s&&"name"!==s||(Et(a,e),p="user-content-"+p),ze&&L(/((--!?|])>)|<\/(style|title)/i,p)){Et(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Et(a,e);continue}if(!Ie&&L(/\/>/i,p)){Et(a,e);continue}Me&&E([ge,he,ye],e=>{p=C(p,e," ")});const m=mt(e.nodeName);if(Nt(m,s,p)){if(J&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(l);else switch(h.getAttributeType(m,s)){case"TrustedHTML":p=J.createHTML(p);break;case"TrustedScriptURL":p=J.createScriptURL(p)}if(p!==u)try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),At(e)?Tt(e):v(n.removed)}catch(t){Et(a,e)}}else Et(a,e)}wt(fe.afterSanitizeAttributes,e,null)},Ot=function e(t){let n=null;const r=vt(t);for(wt(fe.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)wt(fe.uponSanitizeShadowNode,n,null),_t(n),Rt(n),n.content instanceof a&&e(n.content);wt(fe.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,l=null,s=null;if(ot=!e,ot&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw D("toString is not a function");if("string"!=typeof(e=e.toString()))throw D("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ue||ht(t),n.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=mt(e.nodeName);if(!xe[t]||Re[t])throw D("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=St("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===ce&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Fe&&!Me&&!Pe&&-1===e.indexOf("<"))return J&&Be?J.createHTML(e):e;if(r=St(e),!r)return Fe?null:Be?Q:""}r&&He&&Tt(r.firstChild);const u=vt(qe?e:r);for(;l=u.nextNode();)_t(l),Rt(l),l.content instanceof a&&Ot(l.content);if(qe)return e;if(Fe){if(je)for(s=re.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(_e.shadowroot||_e.shadowrootmode)&&(s=ae.call(o,s,!0)),s}let p=Pe?r.outerHTML:r.innerHTML;return Pe&&xe["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&L(ie,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),Me&&E([ge,he,ye],e=>{p=C(p,e," ")}),J&&Be?J.createHTML(p):p},n.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},n.clearConfig=function(){dt=null,Ue=!1},n.isValidAttribute=function(e,t,n){dt||ht({});const r=mt(e),o=mt(t);return Nt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&A(fe[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=S(fe[e],t);return-1===n?void 0:x(fe[e],n,1)[0]}return v(fe[e])},n.removeHooks=function(e){fe[e]=[]},n.removeAllHooks=function(){fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),ge=function(e){return e.replace(/font-size\s*:\s*[^;]+;?/gi,"").replace(/font-family\s*:\s*[^;]+;?/gi,"")},he=function(e){return function(e){return e.replace(/<br\s*\/?>/gi,"<br>").replace(/<img\s+([^>]+?)\s*\/>/gi,"<img $1>")}(ge(e))},ye=["^","_","`","{","|","}","~"," ","¡","¢","£","¤","¥","₹","¦","§","¨","©","ª","«","¬","­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã"],be=function(e){var t=e.visible,n=e.onSelect,r=e.onClose;return t?l.createElement("div",{role:"dialog","aria-modal":"true","aria-labelledby":"special-char-modal-title",className:"special-char-modal-overlay",onClick:r},l.createElement("div",{className:"special-char-modal",onClick:function(e){return e.stopPropagation()}},l.createElement("h2",{id:"special-char-modal-title"},"Special Characters"),l.createElement("div",{className:"special-char-btn-container"},ye.map(function(e){return l.createElement("button",{key:e.charCodeAt(0),type:"button",onClick:function(){return n(e)},className:"special-char-btn",title:"Insert ".concat(e)},e)})),l.createElement("button",{onClick:r,type:"button",className:"special-char-cancel-btn"},"Cancel"),l.createElement("div",{className:"clearfix"}))):null};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n}\n\n.e-content {\n max-width: 685px;\n padding: 0;\n}\n.e-content > * {\n font-size: 12px !important;\n font-family: Arial, sans-serif !important;\n}\n\n.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n position: relative;\n}\n\n.special-char-modal-overlay {\n position: absolute;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.4);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 9999;\n}\n\n.special-char-modal {\n background-color: white;\n border-radius: 8px;\n padding: 20px;\n min-width: 280px;\n max-width: 90vw;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);\n position: relative;\n z-index: 10000;\n}\n\n.special-char-modal h2 {\n margin-bottom: 12px;\n}\n\n.special-char-btn-container {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.special-char-btn {\n cursor: pointer;\n font-size: 22px;\n width: 32px;\n height: 32px;\n line-height: 32px;\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 4px;\n user-select: none;\n background-color: white;\n transition: background-color 0.15s ease, border-color 0.15s ease;\n}\n\n.special-char-btn:hover,\n.special-char-btn:focus {\n background-color: #f0f0f0;\n border-color: #aaa;\n outline: none;\n}\n\n.special-char-cancel-btn {\n margin-top: 16px;\n float: right;\n padding: 6px 12px;\n cursor: pointer;\n background-color: #eee;\n border: none;\n border-radius: 4px;\n transition: background-color 0.15s ease;\n}\n\n.special-char-cancel-btn:hover,\n.special-char-cancel-btn:focus {\n background-color: #ddd;\n outline: none;\n}\n\n.clearfix::after {\n content: "";\n display: table;\n clear: both;\n}');var Te={items:["Bold","Italic","Underline","StrikeThrough","FontColor","BackgroundColor","LowerCase","UpperCase","|","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","CreateTable","|",{tooltipText:"Insert Symbol",template:'<button class="e-tbar-btn e-control e-btn e-lib e-icon-btn" id="insert-symbol-btn" tabindex="-1"><span class="e-btn e-lib e-icon-btn">&#937;</span></button>'},"|","ClearFormat","|"]},Ee={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},Se=function(l){var u=l.autoSanitize,p=void 0===u||u;l.testId;var m=l.toolbarSettings,d=void 0===m?Te:m,f=l.quickToolbarSettings,g=void 0===f?Ee:f,h=l.height,y=void 0===h?450:h,b=l.enableTabKey,T=void 0===b||b,E=l.enableHtmlSanitizer,S=void 0===E||E,v=l.change,A=l.value,x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(l,["autoSanitize","testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer","change","value"]),w=a.useRef(null),_=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(a.useState(!1),2),N=_[0],C=_[1],R=a.useRef(null),O=a.useMemo(function(){return"function"==typeof d?d(Te):d},[d]),k=c(function(e){var t=p?function(e){return function(e){return e.replace(/<br(\s*[^/>]*)>/gi,"<br />").replace(/<img(\s+[^>]*?)(?<!\/)>/gi,"<img$1 />")}(function(e){return e.replace(/<\/?o:p>/gi,"").replace(/\sclass="Mso[a-zA-Z]*"/gi,"").replace(/<!--[\s\S]*?-->/g,"").replace(/<\/?xml[^>]*>/gi,"").replace(/<\/?w:[^>]*>/gi,"").replace(/<\/?m:[^>]*>/gi,"").replace(/\sxmlns(:\w+)?="[^"]*"/gi,"")}(ge(fe.sanitize(e))))}(e.value):e.value;null==v||v(s(s({},e),{value:t}))},[p,v]);a.useEffect(function(){var e=document.getElementById("insert-symbol-btn");return e&&e.addEventListener("click",function(){var e=window.getSelection();e&&e.rangeCount>0&&(R.current=e.getRangeAt(0)),C(!0)}),function(){e&&e.removeEventListener("click",function(){})}},[]);var L=p&&A?he(A):A;return a.createElement(a.Fragment,null,a.createElement(e,s({locale:"az",ref:w,tabIndex:0,height:y,enableTabKey:T,toolbarSettings:O,quickToolbarSettings:g,enableHtmlSanitizer:S,change:k,onPaste:function(e){var t,n,r=null===(t=null==e?void 0:e.clipboardData)||void 0===t?void 0:t.getData("text/html");if(r){var o=he(r);null===(n=e.preventDefault)||void 0===n||n.call(e);var i=w.current;i&&i.executeCommand("insertHTML",o)}},value:L},x),a.createElement(t,{services:[n,r,o,i]}),a.createElement(be,{visible:N,onSelect:function(e){C(!1);var t=w.current;if(t&&R.current){var n=window.getSelection();null==n||n.removeAllRanges(),null==n||n.addRange(R.current),t.executeCommand("insertText",e)}},onClose:function(){return C(!1)}})))};export{Se as Richtext};
3
+ const{entries:p,setPrototypeOf:f,isFrozen:d,getPrototypeOf:h,getOwnPropertyDescriptor:g}=Object;let{freeze:y,seal:b,create:T}=Object,{apply:E,construct:S}="undefined"!=typeof Reflect&&Reflect;y||(y=function(e){return e}),b||(b=function(e){return e}),E||(E=function(e,t,n){return e.apply(t,n)}),S||(S=function(e,t){return new e(...t)});const v=P(Array.prototype.forEach),A=P(Array.prototype.lastIndexOf),x=P(Array.prototype.pop),w=P(Array.prototype.push),N=P(Array.prototype.splice),_=P(String.prototype.toLowerCase),C=P(String.prototype.toString),R=P(String.prototype.match),O=P(String.prototype.replace),k=P(String.prototype.indexOf),L=P(String.prototype.trim),D=P(Object.prototype.hasOwnProperty),I=P(RegExp.prototype.test),M=(z=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return S(z,t)});var z;function P(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return E(e,t,r)}}function U(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:_;f&&f(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(d(t)||(t[r]=e),o=e)}e[o]=!0}return e}function H(e){for(let t=0;t<e.length;t++){D(e,t)||(e[t]=null)}return e}function F(e){const t=T(null);for(const[n,r]of p(e)){D(e,n)&&(Array.isArray(r)?t[n]=H(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=F(r):t[n]=r)}return t}function j(e,t){for(;null!==e;){const n=g(e,t);if(n){if(n.get)return P(n.get);if("function"==typeof n.value)return P(n.value)}e=h(e)}return function(){return null}}const B=y(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),W=y(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),G=y(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Y=y(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),q=y(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),X=y(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),K=y(["#text"]),$=y(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),V=y(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Z=y(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),J=y(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Q=b(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ee=b(/<%[\w\W]*|[\w\W]*%>/gm),te=b(/\$\{[\w\W]*/gm),ne=b(/^data-[\-\w.\u00B7-\uFFFF]+$/),re=b(/^aria-[\-\w]+$/),oe=b(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ie=b(/^(?:\w+script|data):/i),ae=b(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),le=b(/^html$/i),ce=b(/^[a-z][.\w]*(-[.\w]+)+$/i);var se=Object.freeze({__proto__:null,ARIA_ATTR:re,ATTR_WHITESPACE:ae,CUSTOM_ELEMENT:ce,DATA_ATTR:ne,DOCTYPE_NAME:le,ERB_EXPR:ee,IS_ALLOWED_URI:oe,IS_SCRIPT_OR_DATA:ie,MUSTACHE_EXPR:Q,TMPLIT_EXPR:te});const ue=1,me=3,pe=7,fe=8,de=9,he=function(){return"undefined"==typeof window?null:window};var ge=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:he();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==de||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:c,Element:s,NodeFilter:u,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:h}=t,g=s.prototype,b=j(g,"cloneNode"),E=j(g,"remove"),S=j(g,"nextSibling"),z=j(g,"childNodes"),P=j(g,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let H,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:re}=r,{importNode:ie}=o;let ae={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof p&&"function"==typeof P&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ce,ERB_EXPR:ge,TMPLIT_EXPR:ye,DATA_ATTR:be,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:Ee,ATTR_WHITESPACE:Se,CUSTOM_ELEMENT:ve}=se;let{IS_ALLOWED_URI:Ae}=se,xe=null;const we=U({},[...B,...W,...G,...q,...K]);let Ne=null;const _e=U({},[...$,...V,...Z,...J]);let Ce=Object.seal(T(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,Oe=null,ke=!0,Le=!0,De=!1,Ie=!0,Me=!1,ze=!0,Pe=!1,Ue=!1,He=!1,Fe=!1,je=!1,Be=!1,We=!0,Ge=!1,Ye=!0,qe=!1,Xe={},Ke=null;const $e=U({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=U({},["audio","video","img","source","image","track"]);let Je=null;const Qe=U({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let rt=nt,ot=!1,it=null;const at=U({},[et,tt,nt],C);let lt=U({},["mi","mo","mn","ms","mtext"]),ct=U({},["annotation-xml"]);const st=U({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=F(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?C:_,xe=D(e,"ALLOWED_TAGS")?U({},e.ALLOWED_TAGS,pt):we,Ne=D(e,"ALLOWED_ATTR")?U({},e.ALLOWED_ATTR,pt):_e,it=D(e,"ALLOWED_NAMESPACES")?U({},e.ALLOWED_NAMESPACES,C):at,Je=D(e,"ADD_URI_SAFE_ATTR")?U(F(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=D(e,"ADD_DATA_URI_TAGS")?U(F(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,Ke=D(e,"FORBID_CONTENTS")?U({},e.FORBID_CONTENTS,pt):$e,Re=D(e,"FORBID_TAGS")?U({},e.FORBID_TAGS,pt):F({}),Oe=D(e,"FORBID_ATTR")?U({},e.FORBID_ATTR,pt):F({}),Xe=!!D(e,"USE_PROFILES")&&e.USE_PROFILES,ke=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,je=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,We=!1!==e.SANITIZE_DOM,Ge=e.SANITIZE_NAMED_PROPS||!1,Ye=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Ae=e.ALLOWED_URI_REGEXP||oe,rt=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(Le=!1),je&&(Fe=!0),Xe&&(xe=U({},K),Ne=[],!0===Xe.html&&(U(xe,B),U(Ne,$)),!0===Xe.svg&&(U(xe,W),U(Ne,V),U(Ne,J)),!0===Xe.svgFilters&&(U(xe,G),U(Ne,V),U(Ne,J)),!0===Xe.mathMl&&(U(xe,q),U(Ne,Z),U(Ne,J))),e.ADD_TAGS&&(xe===we&&(xe=F(xe)),U(xe,e.ADD_TAGS,pt)),e.ADD_ATTR&&(Ne===_e&&(Ne=F(Ne)),U(Ne,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&U(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&(Ke===$e&&(Ke=F(Ke)),U(Ke,e.FORBID_CONTENTS,pt)),Ye&&(xe["#text"]=!0),Pe&&U(xe,["html","head","body"]),xe.table&&(U(xe,["tbody"]),delete Re.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw M('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=e.TRUSTED_TYPES_POLICY,Q=H.createHTML("")}else void 0===H&&(H=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(h,i)),null!==H&&"string"==typeof Q&&(Q=H.createHTML(""));y&&y(e),ft=e}},yt=U({},[...W,...G,...Y]),bt=U({},[...q,...X]),Tt=function(e){w(n.removed,{element:e});try{P(e).removeChild(e)}catch(t){E(e)}},Et=function(e,t){try{w(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){w(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||je)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},St=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=R(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&rt===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=H?H.createHTML(e):e;if(rt===nt)try{t=(new d).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(rt,"template",null);try{t.documentElement.innerHTML=ot?Q:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===nt?re.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},vt=function(e){return te.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},At=function(e){return e instanceof f&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof c&&e instanceof c};function wt(e,t,r){v(e,e=>{e.call(n,t,r,ft)})}const Nt=function(e){let t=null;if(wt(ae.beforeSanitizeElements,e,null),At(e))return Tt(e),!0;const r=pt(e.nodeName);if(wt(ae.uponSanitizeElement,e,{tagName:r,allowedTags:xe}),ze&&e.hasChildNodes()&&!xt(e.firstElementChild)&&I(/<[/\w!]/g,e.innerHTML)&&I(/<[/\w!]/g,e.textContent))return Tt(e),!0;if(e.nodeType===pe)return Tt(e),!0;if(ze&&e.nodeType===fe&&I(/<[/\w]/g,e.data))return Tt(e),!0;if(!xe[r]||Re[r]){if(!Re[r]&&Ct(r)){if(Ce.tagNameCheck instanceof RegExp&&I(Ce.tagNameCheck,r))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(r))return!1}if(Ye&&!Ke[r]){const t=P(e)||e.parentNode,n=z(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=b(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,S(e))}}}return Tt(e),!0}return e instanceof s&&!function(e){let t=P(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=_(e.tagName),r=_(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===r||lt[r]):Boolean(yt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[r]:Boolean(bt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[r])&&!(t.namespaceURI===et&&!lt[r])&&!bt[n]&&(st[n]||!yt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!I(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===me&&(t=e.textContent,v([ce,ge,ye],e=>{t=O(t,e," ")}),e.textContent!==t&&(w(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt(ae.afterSanitizeElements,e,null),!1):(Tt(e),!0)},_t=function(e,t,n){if(We&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(Le&&!Oe[t]&&I(be,t));else if(ke&&I(Te,t));else if(!Ne[t]||Oe[t]){if(!(Ct(e)&&(Ce.tagNameCheck instanceof RegExp&&I(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&I(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&I(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Je[t]);else if(I(Ae,O(n,Se,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==k(n,"data:")||!Ve[e]){if(De&&!I(Ee,O(n,Se,"")));else if(n)return!1}else;return!0},Ct=function(e){return"annotation-xml"!==e&&R(e,ve)},Rt=function(e){wt(ae.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||At(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:l,value:c}=i,s=pt(a),u=c;let m="value"===a?u:L(u);if(r.attrName=s,r.attrValue=m,r.keepAttr=!0,r.forceKeepAttr=void 0,wt(ae.uponSanitizeAttribute,e,r),m=r.attrValue,!Ge||"id"!==s&&"name"!==s||(Et(a,e),m="user-content-"+m),ze&&I(/((--!?|])>)|<\/(style|title)/i,m)){Et(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Et(a,e);continue}if(!Ie&&I(/\/>/i,m)){Et(a,e);continue}Me&&v([ce,ge,ye],e=>{m=O(m,e," ")});const p=pt(e.nodeName);if(_t(p,s,m)){if(H&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(l);else switch(h.getAttributeType(p,s)){case"TrustedHTML":m=H.createHTML(m);break;case"TrustedScriptURL":m=H.createScriptURL(m)}if(m!==u)try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),At(e)?Tt(e):x(n.removed)}catch(t){Et(a,e)}}else Et(a,e)}wt(ae.afterSanitizeAttributes,e,null)},Ot=function e(t){let n=null;const r=vt(t);for(wt(ae.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)wt(ae.uponSanitizeShadowNode,n,null),Nt(n),Rt(n),n.content instanceof a&&e(n.content);wt(ae.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,l=null,s=null;if(ot=!e,ot&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw M("toString is not a function");if("string"!=typeof(e=e.toString()))throw M("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ue||gt(t),n.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=pt(e.nodeName);if(!xe[t]||Re[t])throw M("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=St("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===ue&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Fe&&!Me&&!Pe&&-1===e.indexOf("<"))return H&&Be?H.createHTML(e):e;if(r=St(e),!r)return Fe?null:Be?Q:""}r&&He&&Tt(r.firstChild);const u=vt(qe?e:r);for(;l=u.nextNode();)Nt(l),Rt(l),l.content instanceof a&&Ot(l.content);if(qe)return e;if(Fe){if(je)for(s=ne.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(Ne.shadowroot||Ne.shadowrootmode)&&(s=ie.call(o,s,!0)),s}let m=Pe?r.outerHTML:r.innerHTML;return Pe&&xe["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&I(le,r.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+m),Me&&v([ce,ge,ye],e=>{m=O(m,e," ")}),H&&Be?H.createHTML(m):m},n.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},n.clearConfig=function(){ft=null,Ue=!1},n.isValidAttribute=function(e,t,n){ft||gt({});const r=pt(e),o=pt(t);return _t(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&w(ae[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=A(ae[e],t);return-1===n?void 0:N(ae[e],n,1)[0]}return x(ae[e])},n.removeHooks=function(e){ae[e]=[]},n.removeAllHooks=function(){ae={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),ye=function(e){var t=document.createElement("div");t.innerHTML=e;var n=function(e){if(e.hasAttribute("style")){var t=e.getAttribute("style");if(t){var r=t.split(";").map(function(e){return e.trim()}).filter(function(e){return!/^font-(size|family)\s*:/i.test(e)}).join("; ");""===r.trim()?e.removeAttribute("style"):e.setAttribute("style",r)}}e.hasAttribute("font-size")&&e.removeAttribute("font-size"),e.hasAttribute("font-family")&&e.removeAttribute("font-family"),Array.from(e.children).forEach(function(e){return n(e)})};return Array.from(t.children).forEach(function(e){return n(e)}),t.innerHTML},be=function(e){return function(e){return e.replace(/<br\s*\/?>/gi,"<br>").replace(/<img\s+([^>]+?)\s*\/>/gi,"<img $1>")}(ye(e))},Te=["^","_","`","{","|","}","~"," ","¡","¢","£","¤","¥","₹","¦","§","¨","©","ª","«","¬","-­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã"],Ee=function(e){var t=e.visible,n=e.onSelect,r=e.onClose,o=m(c(null),2),i=o[0],a=o[1];if(!t)return null;return l.createElement("div",{role:"dialog","aria-modal":"true","aria-labelledby":"special-char-modal-title",className:"special-char-modal-overlay",onClick:r},l.createElement("div",{className:"special-char-modal",onClick:function(e){return e.stopPropagation()}},l.createElement("h2",{id:"special-char-modal-title"},"Special Characters"),l.createElement("div",{className:"special-char-btn-container"},Te.map(function(e){return l.createElement("button",{key:e.charCodeAt(0),type:"button",onClick:function(){return a(e)},className:"special-char-btn ".concat(i===e?"selected":""),title:"Select ".concat(e)},e)})),l.createElement("div",{className:"special-char-btn-footer"},l.createElement("button",{onClick:function(){i&&(n(i),a(null))},type:"button",className:"special-char-insert-btn",disabled:!i},"Insert"),l.createElement("button",{onClick:r,type:"button",className:"special-char-cancel-btn"},"Cancel")),l.createElement("div",{className:"clearfix"})))};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n}\n\n.e-content {\n max-width: 685px;\n padding: 0;\n}\n.e-content > * {\n font-size: 12px !important;\n font-family: Arial, sans-serif !important;\n}\n\n.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n position: relative;\n}\n\n.special-char-modal-overlay {\n position: absolute;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.4);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 9999;\n}\n\n.special-char-modal {\n background-color: white;\n border-radius: 8px;\n padding: 20px;\n width: 100%;\n max-width: 634px;\n max-height: 480px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);\n position: relative;\n z-index: 10000;\n}\n\n.special-char-modal h2 {\n margin-bottom: 12px;\n}\n\n.special-char-btn-container {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.special-char-btn {\n cursor: pointer;\n font-size: 22px;\n width: 32px;\n height: 32px;\n line-height: 32px;\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 4px;\n user-select: none;\n background-color: white;\n transition: background-color 0.15s ease, border-color 0.15s ease;\n font-family: monospace;\n white-space: pre;\n}\n\n.special-char-btn:hover,\n.special-char-btn:focus {\n background-color: #f0f0f0;\n border-color: #aaa;\n outline: none;\n}\n\n.special-char-btn-footer {\n display: flex;\n gap: 8px;\n justify-content: flex-end;\n}\n\n.special-char-cancel-btn,\n.special-char-insert-btn {\n margin-top: 16px;\n padding: 6px 12px;\n cursor: pointer;\n background-color: #eee;\n border: none;\n border-radius: 4px;\n transition: background-color 0.15s ease;\n}\n\n.special-char-insert-btn:hover,\n.special-char-cancel-btn:hover,\n.special-char-insert-btn:focus,\n.special-char-cancel-btn:focus {\n background-color: #ddd;\n outline: none;\n}\n\n.clearfix::after {\n content: "";\n display: table;\n clear: both;\n}');var Se={items:["Bold","Italic","Underline","StrikeThrough","FontColor","BackgroundColor","LowerCase","UpperCase","|","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","CreateTable","|",{tooltipText:"Insert Symbol",template:'<button class="e-tbar-btn e-control e-btn e-lib e-icon-btn" id="insert-symbol-btn" tabindex="-1"><span class="e-btn e-lib e-icon-btn">&#937;</span></button>'},"|","ClearFormat","|"]},ve={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},Ae=function(l){var c=l.autoSanitize,p=void 0===c||c;l.testId;var f=l.toolbarSettings,d=void 0===f?Se:f,h=l.quickToolbarSettings,g=void 0===h?ve:h,y=l.height,b=void 0===y?450:y,T=l.enableTabKey,E=void 0===T||T,S=l.enableHtmlSanitizer,v=void 0===S||S,A=l.change,x=l.value,w=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(l,["autoSanitize","testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer","change","value"]),N=a.useRef(null),_=m(a.useState(!1),2),C=_[0],R=_[1],O=a.useRef(null),k=a.useMemo(function(){return"function"==typeof d?d(Se):d},[d]),L=s(function(e){var t=p?function(e){return function(e){return e.replace(/<br(\s*[^/>]*)>/gi,"<br />").replace(/<img(\s+[^>]*?)(?<!\/)>/gi,"<img$1 />")}(function(e){return e.replace(/<\/?o:p>/gi,"").replace(/\sclass="Mso[a-zA-Z]*"/gi,"").replace(/<!--[\s\S]*?-->/g,"").replace(/<\/?xml[^>]*>/gi,"").replace(/<\/?w:[^>]*>/gi,"").replace(/<\/?m:[^>]*>/gi,"").replace(/\sxmlns(:\w+)?="[^"]*"/gi,"")}(ye(ge.sanitize(e))))}(e.value):e.value;null==A||A(u(u({},e),{value:t}))},[p,A]);a.useEffect(function(){var e=document.getElementById("insert-symbol-btn");return e&&e.addEventListener("click",function(){var e=window.getSelection();e&&e.rangeCount>0&&(O.current=e.getRangeAt(0)),R(!0)}),function(){e&&e.removeEventListener("click",function(){})}},[]);var D=p&&x?be(x):x;return a.createElement(a.Fragment,null,a.createElement(e,u({locale:"az",ref:N,tabIndex:0,height:b,enableTabKey:E,toolbarSettings:k,quickToolbarSettings:g,enableHtmlSanitizer:v,change:L,onPaste:function(e){var t,n,r=null===(t=null==e?void 0:e.clipboardData)||void 0===t?void 0:t.getData("text/html");if(r){var o=be(r);null===(n=e.preventDefault)||void 0===n||n.call(e);var i=N.current;i&&i.executeCommand("insertHTML",o)}},value:D},w),a.createElement(t,{services:[n,r,o,i]}),a.createElement(Ee,{visible:C,onSelect:function(e){R(!1);var t=N.current;if(t&&O.current){var n=window.getSelection();null==n||n.removeAllRanges(),null==n||n.addRange(O.current),t.executeCommand("insertText",e)}},onClose:function(){return R(!1)}})))};export{Ae as Richtext};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fvc/richtext",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
4
4
  "main": "./dist/lib/index.js",
5
5
  "types": "./dist/lib/richtext/src/index.d.ts",
6
6
  "files": [
@@ -35,4 +35,4 @@
35
35
  "@types/dompurify": "^3.2.0",
36
36
  "@types/minimatch": "^6.0.0"
37
37
  }
38
- }
38
+ }