quill-paste-smart
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -1,3 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("quill")):"function"==typeof define&&define.amd?define(["quill"],t):"object"==typeof exports?exports.QuillPasteSmart=t(require("quill")):e.QuillPasteSmart=t(e.Quill)}(window,(function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){ | ||
/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */ | ||
e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:i}=Object;let{freeze:r,seal:a,create:l}=Object,{apply:u,construct:s}="undefined"!=typeof Reflect&&Reflect;u||(u=function(e,t,n){return e.apply(t,n)}),r||(r=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const c=D(Array.prototype.forEach),f=D(Array.prototype.pop),p=D(Array.prototype.push),d=D(String.prototype.toLowerCase),m=D(String.prototype.toString),h=D(String.prototype.match),g=D(String.prototype.replace),T=D(String.prototype.indexOf),A=D(String.prototype.trim),b=D(RegExp.prototype.test),E=(y=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(y,t)});var y;function D(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return u(e,t,o)}}function L(e,o,i){var r;i=null!==(r=i)&&void 0!==r?r:d,t&&t(e,null);let a=o.length;for(;a--;){let t=o[a];if("string"==typeof t){const e=i(t);e!==t&&(n(o)||(o[a]=e),t=e)}e[t]=!0}return e}function S(t){const n=l(null);for(const[o,i]of e(t))n[o]=i;return n}function F(e,t){for(;null!==e;){const n=i(e,t);if(n){if(n.get)return D(n.get);if("function"==typeof n.value)return D(n.value)}e=o(e)}return function(e){return console.warn("fallback value for",e),null}}const _=r(["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"]),v=r(["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"]),O=r(["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"]),k=r(["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"]),w=r(["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"]),N=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),x=r(["#text"]),R=r(["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","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","xmlns","slot"]),C=r(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),M=r(["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"]),I=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),P=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=a(/<%[\w\W]*|[\w\W]*%>/gm),W=a(/\${[\w\W]*}/gm),H=a(/^data-[\-\w.\u00B7-\uFFFF]/),U=a(/^aria-[\-\w]+$/),G=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B=a(/^(?:\w+script|data):/i),j=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i);var Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:z,TMPLIT_EXPR:W,DATA_ATTR:H,ARIA_ATTR:U,IS_ALLOWED_URI:G,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:j,DOCTYPE_NAME:q});const K=()=>"undefined"==typeof window?null:window,X=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;t&&t.hasAttribute("data-tt-policy-suffix")&&(n=t.getAttribute("data-tt-policy-suffix"));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}};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const o=e=>t(e);if(o.version="3.0.5",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const i=n.document,a=i.currentScript;let{document:l}=n;const{DocumentFragment:u,HTMLTemplateElement:s,Node:y,Element:D,NodeFilter:P,NamedNodeMap:z=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:W,DOMParser:H,trustedTypes:U}=n,B=D.prototype,j=F(B,"cloneNode"),V=F(B,"nextSibling"),$=F(B,"childNodes"),Q=F(B,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let Z,J="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:ie}=i;let re={};o.isSupported="function"==typeof e&&"function"==typeof Q&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ue,DATA_ATTR:se,ARIA_ATTR:ce,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:pe}=Y;let{IS_ALLOWED_URI:de}=Y,me=null;const he=L({},[..._,...v,...O,...w,...x]);let ge=null;const Te=L({},[...R,...C,...M,...I]);let Ae=Object.seal(Object.create(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}})),be=null,Ee=null,ye=!0,De=!0,Le=!1,Se=!0,Fe=!1,_e=!1,ve=!1,Oe=!1,ke=!1,we=!1,Ne=!1,xe=!0,Re=!1;const Ce="user-content-";let Me=!0,Ie=!1,Pe={},ze=null;const We=L({},["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 He=null;const Ue=L({},["audio","video","img","source","image","track"]);let Ge=null;const Be=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),je="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",Ye="http://www.w3.org/1999/xhtml";let Ke=Ye,Xe=!1,Ve=null;const $e=L({},[je,qe,Ye],m);let Qe;const Ze=["application/xhtml+xml","text/html"],Je="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},it=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Qe=Qe=-1===Ze.indexOf(e.PARSER_MEDIA_TYPE)?Je:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Qe?m:d,me="ALLOWED_TAGS"in e?L({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?L({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?L({},e.ALLOWED_NAMESPACES,m):$e,Ge="ADD_URI_SAFE_ATTR"in e?L(S(Be),e.ADD_URI_SAFE_ATTR,et):Be,He="ADD_DATA_URI_TAGS"in e?L(S(Ue),e.ADD_DATA_URI_TAGS,et):Ue,ze="FORBID_CONTENTS"in e?L({},e.FORBID_CONTENTS,et):We,be="FORBID_TAGS"in e?L({},e.FORBID_TAGS,et):{},Ee="FORBID_ATTR"in e?L({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,ye=!1!==e.ALLOW_ARIA_ATTR,De=!1!==e.ALLOW_DATA_ATTR,Le=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Fe=e.SAFE_FOR_TEMPLATES||!1,_e=e.WHOLE_DOCUMENT||!1,ke=e.RETURN_DOM||!1,we=e.RETURN_DOM_FRAGMENT||!1,Ne=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,xe=!1!==e.SANITIZE_DOM,Re=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ie=e.IN_PLACE||!1,de=e.ALLOWED_URI_REGEXP||G,Ke=e.NAMESPACE||Ye,Ae=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Fe&&(De=!1),we&&(ke=!0),Pe&&(me=L({},[...x]),ge=[],!0===Pe.html&&(L(me,_),L(ge,R)),!0===Pe.svg&&(L(me,v),L(ge,C),L(ge,I)),!0===Pe.svgFilters&&(L(me,O),L(ge,C),L(ge,I)),!0===Pe.mathMl&&(L(me,w),L(ge,M),L(ge,I))),e.ADD_TAGS&&(me===he&&(me=S(me)),L(me,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),L(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&L(Ge,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(ze===We&&(ze=S(ze)),L(ze,e.FORBID_CONTENTS,et)),Me&&(me["#text"]=!0),_e&&L(me,["html","head","body"]),me.table&&(L(me,["tbody"]),delete be.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,J=Z.createHTML("")}else void 0===Z&&(Z=X(U,a)),null!==Z&&"string"==typeof J&&(J=Z.createHTML(""));r&&r(e),tt=e}},rt=L({},["mi","mo","mn","ms","mtext"]),at=L({},["foreignobject","desc","title","annotation-xml"]),lt=L({},["title","style","font","a","script"]),ut=L({},v);L(ut,O),L(ut,k);const st=L({},w);L(st,N);const ct=function(e){let t=Q(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});const n=d(e.tagName),o=d(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Ye?"svg"===n:t.namespaceURI===je?"svg"===n&&("annotation-xml"===o||rt[o]):Boolean(ut[n]):e.namespaceURI===je?t.namespaceURI===Ye?"math"===n:t.namespaceURI===qe?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===Ye?!(t.namespaceURI===qe&&!at[o])&&!(t.namespaceURI===je&&!rt[o])&&!st[n]&&(lt[n]||!ut[n]):!("application/xhtml+xml"!==Qe||!Ve[e.namespaceURI]))},ft=function(e){p(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(ke||we)try{ft(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t,n;if(Oe)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Qe&&Ke===Ye&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=Z?Z.createHTML(e):e;if(Ke===Ye)try{t=(new H).parseFromString(o,Qe)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Ke,"template",null);try{t.documentElement.innerHTML=Xe?J:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(l.createTextNode(n),i.childNodes[0]||null),Ke===Ye?oe.call(t,_e?"html":"body")[0]:_e?t.documentElement:i},mt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof W&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},gt=function(e){return"object"==typeof y?e instanceof y:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){re[e]&&c(re[e],e=>{e.call(o,t,n,tt)})},At=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ft(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:me}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return ft(e),!0;if(!me[n]||be[n]){if(!be[n]&&Et(n)){if(Ae.tagNameCheck instanceof RegExp&&b(Ae.tagNameCheck,n))return!1;if(Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))return!1}if(Me&&!ze[n]){const t=Q(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o)t.insertBefore(j(n[o],!0),V(e))}return ft(e),!0}return e instanceof D&&!ct(e)?(ft(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Fe&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ue," "),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ft(e),!0)},bt=function(e,t,n){if(xe&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(De&&!Ee[t]&&b(se,t));else if(ye&&b(ce,t));else if(!ge[t]||Ee[t]){if(!(Et(e)&&(Ae.tagNameCheck instanceof RegExp&&b(Ae.tagNameCheck,e)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(e))&&(Ae.attributeNameCheck instanceof RegExp&&b(Ae.attributeNameCheck,t)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(t))||"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&b(Ae.tagNameCheck,n)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))))return!1}else if(Ge[t]);else if(b(de,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!He[e])if(Le&&!b(fe,g(n,pe,"")));else if(n)return!1;return!0},Et=function(e){return e.indexOf("-")>0},yt=function(e){let t,n,i,r;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(r=a.length;r--;){t=a[r];const{name:u,namespaceURI:s}=t;if(n="value"===u?t.value:A(t.value),i=et(u),l.attrName=i,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(pt(u,e),!l.keepAttr)continue;if(!Se&&b(/\/>/i,n)){pt(u,e);continue}Fe&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ue," "));const c=et(e.nodeName);if(bt(c,i,n)){if(!Re||"id"!==i&&"name"!==i||(pt(u,e),n=Ce+n),Z&&"object"==typeof U&&"function"==typeof U.getAttributeType)if(s);else switch(U.getAttributeType(c,i)){case"TrustedHTML":n=Z.createHTML(n);break;case"TrustedScriptURL":n=Z.createScriptURL(n)}try{s?e.setAttributeNS(s,u,n):e.setAttribute(u,n),f(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},Dt=function e(t){let n;const o=mt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),At(n)||(n.content instanceof u&&e(n.content),yt(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,r,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Xe=!e,Xe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw E("toString is not a function");if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}if(!o.isSupported)return e;if(ve||it(l),o.removed=[],"string"==typeof e&&(Ie=!1),Ie){if(e.nodeName){const t=et(e.nodeName);if(!me[t]||be[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof y)t=dt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ke&&!Fe&&!_e&&-1===e.indexOf("<"))return Z&&Ne?Z.createHTML(e):e;if(t=dt(e),!t)return ke?null:Ne?J:""}t&&Oe&&ft(t.firstChild);const s=mt(Ie?e:t);for(;r=s.nextNode();)At(r)||(r.content instanceof u&&Dt(r.content),yt(r));if(Ie)return e;if(ke){if(we)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmode)&&(a=ie.call(i,a,!0)),a}let c=_e?t.outerHTML:t.innerHTML;return _e&&me["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&b(q,t.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+c),Fe&&(c=g(c,ae," "),c=g(c,le," "),c=g(c,ue," ")),Z&&Ne?Z.createHTML(c):c},o.setConfig=function(e){it(e),ve=!0},o.clearConfig=function(){tt=null,ve=!1},o.isValidAttribute=function(e,t,n){tt||it({});const o=et(e),i=et(t);return bt(o,i,n)},o.addHook=function(e,t){"function"==typeof t&&(re[e]=re[e]||[],p(re[e],t))},o.removeHook=function(e){if(re[e])return f(re[e])},o.removeHooks=function(e){re[e]&&(re[e]=[])},o.removeAllHooks=function(){re={}},o}()}()},function(t,n){t.exports=e},function(e,t,n){"use strict";n.r(t);var o=n(1),i=n.n(o),r=n(0),a=n.n(r);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=i.a.import("modules/clipboard"),T=i.a.import("delta"),A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(l,e);var t,n,o,r=d(l);function l(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(n=r.call(this,e,t)).allowed=t.allowed,n.keepSelection=t.keepSelection,n.substituteBlockElements=t.substituteBlockElements,n.magicPasteLinks=t.magicPasteLinks,n.hooks=t.hooks,n.handleImagePaste=t.handleImagePaste,n}return t=l,(n=[{key:"onPaste",value:function(e){var t=this;e.preventDefault();var n,o,r,l,u,s=this.quill.getSelection();e.clipboardData&&e.clipboardData.getData||!window.clipboardData||!window.clipboardData.getData?(n=e.clipboardData.getData("text/plain"),o=e.clipboardData.getData("text/html"),r=null===(l=e.clipboardData)||void 0===l||null===(u=l.items)||void 0===u?void 0:u[0]):n=window.clipboardData.getData("Text");var c=(new T).retain(s.index).delete(s.length),f=this.getDOMPurifyOptions(),p=!1,d=n;if(!o&&f.ALLOWED_TAGS.includes("a")&&this.isURL(n)&&s.length>0&&this.magicPasteLinks)d=this.quill.getText(s.index,s.length),c=c.insert(d,{link:n});else if(!o&&f.ALLOWED_TAGS.includes("img")&&r&&"file"===r.kind&&r.type.match(/^image\//i)){var m=r.getAsFile();if(void 0!==this.handleImagePaste)this.handleImagePaste(m);else{var h=new FileReader;h.onload=function(e){t.quill.insertEmbed(s.index,"image",e.target.result),t.keepSelection||t.quill.setSelection(s.index+1)},h.readAsDataURL(m)}}else{var g,A,b,E,y,D,L,S,F;o||(p=!0,o=d),"function"==typeof(null===(g=this.hooks)||void 0===g?void 0:g.beforeSanitizeElements)&&a.a.addHook("beforeSanitizeElements",this.hooks.beforeSanitizeElements),"function"==typeof(null===(A=this.hooks)||void 0===A?void 0:A.uponSanitizeElement)&&a.a.addHook("uponSanitizeElement",this.hooks.uponSanitizeElement),"function"==typeof(null===(b=this.hooks)||void 0===b?void 0:b.afterSanitizeElements)&&a.a.addHook("afterSanitizeElements",this.hooks.afterSanitizeElements),"function"==typeof(null===(E=this.hooks)||void 0===E?void 0:E.beforeSanitizeAttributes)&&a.a.addHook("beforeSanitizeAttributes",this.hooks.beforeSanitizeAttributes),"function"==typeof(null===(y=this.hooks)||void 0===y?void 0:y.uponSanitizeAttribute)&&a.a.addHook("uponSanitizeAttribute",this.hooks.uponSanitizeAttribute),"function"==typeof(null===(D=this.hooks)||void 0===D?void 0:D.afterSanitizeAttributes)&&a.a.addHook("afterSanitizeAttributes",this.hooks.afterSanitizeAttributes),"function"==typeof(null===(L=this.hooks)||void 0===L?void 0:L.beforeSanitizeShadowDOM)&&a.a.addHook("beforeSanitizeShadowDOM",this.hooks.beforeSanitizeShadowDOM),"function"==typeof(null===(S=this.hooks)||void 0===S?void 0:S.uponSanitizeShadowNode)&&a.a.addHook("uponSanitizeShadowNode",this.hooks.uponSanitizeShadowNode),"function"==typeof(null===(F=this.hooks)||void 0===F?void 0:F.afterSanitizeShadowDOM)&&a.a.addHook("afterSanitizeShadowDOM",this.hooks.afterSanitizeShadowDOM),p?(d=a.a.sanitize(o,f),c=c.insert(d)):(d=!1!==this.substituteBlockElements?(o=this.substitute(o,f)).innerHTML:a.a.sanitize(o,f),c=c.concat(this.convert(d)))}this.quill.updateContents(c,i.a.sources.USER),p||(c=this.convert(d)),this.keepSelection?this.quill.setSelection(s.index,c.length(),i.a.sources.SILENT):this.quill.setSelection(s.index+c.length(),i.a.sources.SILENT),this.quill.scrollIntoView(),a.a.removeAllHooks()}},{key:"getDOMPurifyOptions",value:function(){var e,t,n={};if(null!==(e=this.allowed)&&void 0!==e&&e.tags&&(n.ALLOWED_TAGS=this.allowed.tags),null!==(t=this.allowed)&&void 0!==t&&t.attributes&&(n.ALLOWED_ATTR=this.allowed.attributes),void 0===n.ALLOWED_TAGS||void 0===n.ALLOWED_ATTR){var o,i=!1;void 0===n.ALLOWED_TAGS&&(i=!0,n.ALLOWED_TAGS=["p","br","span"]);var r=!1;void 0===n.ALLOWED_ATTR&&(r=!0,n.ALLOWED_ATTR=["class"]);var a=this.quill.getModule("toolbar");null==a||null===(o=a.controls)||void 0===o||o.forEach((function(e){switch(e[0]){case"bold":i&&(n.ALLOWED_TAGS.push("b"),n.ALLOWED_TAGS.push("strong"));break;case"italic":i&&(n.ALLOWED_TAGS.push("i"),n.ALLOWED_TAGS.push("em"));break;case"underline":i&&n.ALLOWED_TAGS.push("u");break;case"strike":i&&n.ALLOWED_TAGS.push("s");break;case"color":case"background":r&&n.ALLOWED_ATTR.push("style");break;case"script":i&&("super"===e[1].value?n.ALLOWED_TAGS.push("sup"):"sub"===e[1].value&&n.ALLOWED_TAGS.push("sub"));break;case"header":if(i){var t=function(e){"1"===e?n.ALLOWED_TAGS.push("h1"):"2"===e?n.ALLOWED_TAGS.push("h2"):"3"===e?n.ALLOWED_TAGS.push("h3"):"4"===e?n.ALLOWED_TAGS.push("h4"):"5"===e?n.ALLOWED_TAGS.push("h5"):"6"===e&&n.ALLOWED_TAGS.push("h6")};e[1].value?t(e[1].value):e[1].options&&e[1].options.length&&[].forEach.call(e[1].options,(function(e){e.value&&t(e.value)}))}break;case"code-block":i&&n.ALLOWED_TAGS.push("pre"),r&&n.ALLOWED_ATTR.push("spellcheck");break;case"list":i&&("ordered"===e[1].value?n.ALLOWED_TAGS.push("ol"):"bullet"===e[1].value&&n.ALLOWED_TAGS.push("ul"),n.ALLOWED_TAGS.push("li"));break;case"link":i&&n.ALLOWED_TAGS.push("a"),r&&(n.ALLOWED_ATTR.push("href"),n.ALLOWED_ATTR.push("target"),n.ALLOWED_ATTR.push("rel"));break;case"image":i&&n.ALLOWED_TAGS.push("img"),r&&(n.ALLOWED_ATTR.push("src"),n.ALLOWED_ATTR.push("title"),n.ALLOWED_ATTR.push("alt"));break;case"video":i&&n.ALLOWED_TAGS.push("iframe"),r&&(n.ALLOWED_ATTR.push("frameborder"),n.ALLOWED_ATTR.push("allowfullscreen"),n.ALLOWED_ATTR.push("src"));break;case"blockquote":i&&n.ALLOWED_TAGS.push(e[0])}}))}return n}},{key:"substitute",value:function(e,t){var n,o=["h1","h2","h3","h4","h5","h6"],i=["p","div","section","article","fieldset","address","aside","blockquote","canvas","dl","figcaption","figure","footer","form","header","main","nav","noscript","ol","pre","table","tfoot","ul","video"],r=["li","dt","dd","hr"];a.a.addHook("uponSanitizeElement",(function(e,a,l){for(var u=0;!n&&u<3;)t.ALLOWED_TAGS.includes(i[u])&&(n=i[u]),++u;if(n&&e.tagName&&!t.ALLOWED_TAGS.includes(e.tagName.toLowerCase())){var s=e.tagName.toLowerCase();o.includes(s)?e.innerHTML="<".concat(n,"><b>").concat(e.innerHTML,"</b></").concat(n,">"):i.includes(s)?e.innerHTML="<".concat(n,">").concat(e.innerHTML,"</").concat(n,">"):r.includes(s)&&(e.innerHTML="".concat(e.innerHTML,"<br>"))}})),e=a.a.sanitize(e,s(s({},t),{RETURN_DOM:!0,WHOLE_DOCUMENT:!1})),a.a.removeAllHooks();var l,u=function(e){var t=document.createElement(e.tagName.toLowerCase()),n=e.attributes;return n.length&&Array.from(n).forEach((function(e){return t.setAttribute(e.nodeName,e.value)})),t},c=0,f=document.createElement("body");return function e(t,n){for(n(t,c),t=c<=1?t.firstChild:void 0;t;)++c,e(t,n),t=t.nextSibling;--c}(e,(function(e,t){if(1===t)if(e.tagName&&i.includes(e.tagName.toLowerCase())){l&&(l=void 0);var o=u(e);o.innerHTML=e.innerHTML,f.appendChild(o)}else if(void 0===l&&(l=document.createElement(n),f.appendChild(l)),e.tagName){var r=u(e);e.innerHTML&&(r.innerHTML=e.innerHTML),l.appendChild(r)}else{var a=document.createTextNode(e.textContent);l.appendChild(a)}})),f}},{key:"isURL",value:function(e){return!!/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\x2D?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\x2D?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:(?![\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])[\s\S])*)?$/i.test(e)}}])&&f(t.prototype,n),o&&f(t,o),l}(g);i.a.register("modules/clipboard",A,!0),t.default=A}])})); | ||
/*! For license information please see quill-paste-smart.js.LICENSE.txt */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("quill")):"function"==typeof define&&define.amd?define(["quill"],t):"object"==typeof exports?exports.QuillPasteSmart=t(require("quill")):e.QuillPasteSmart=t(e.Quill)}(self,(e=>(()=>{var t={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:u,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),u||(u=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const c=S(Array.prototype.forEach),f=S(Array.prototype.pop),p=S(Array.prototype.push),d=S(String.prototype.toLowerCase),m=S(String.prototype.toString),h=S(String.prototype.match),T=S(String.prototype.replace),A=S(String.prototype.indexOf),g=S(String.prototype.trim),y=S(Object.prototype.hasOwnProperty),b=S(RegExp.prototype.test),E=(D=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(D,t)});var D;function S(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return u(e,t,o)}}function L(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function v(e){for(let t=0;t<e.length;t++)y(e,t)||(e[t]=null);return e}function _(t){const n=l(null);for(const[o,r]of e(t))y(t,o)&&(Array.isArray(r)?n[o]=v(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=_(r):n[o]=r);return n}function F(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=o(e)}return function(){return null}}const O=i(["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"]),k=i(["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"]),w=i(["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"]),N=i(["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"]),R=i(["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"]),C=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),x=i(["#text"]),M=i(["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"]),I=i(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),P=i(["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"]),W=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=a(/<%[\w\W]*|[\w\W]*%>/gm),U=a(/\${[\w\W]*}/gm),G=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),j=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),X=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var $=Object.freeze({__proto__:null,MUSTACHE_EXPR:H,ERB_EXPR:z,TMPLIT_EXPR:U,DATA_ATTR:G,ARIA_ATTR:B,IS_ALLOWED_URI:j,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:Y,DOCTYPE_NAME:K,CUSTOM_ELEMENT:X});const V=1,Q=3,Z=7,J=8,ee=9,te=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const o=e=>t(e);if(o.version="3.1.6",o.removed=[],!n||!n.document||n.document.nodeType!==ee)return o.isSupported=!1,o;let{document:r}=n;const a=r,u=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:D,Node:S,Element:v,NodeFilter:H,NamedNodeMap:z=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:U,DOMParser:G,trustedTypes:B}=n,q=v.prototype,Y=F(q,"cloneNode"),X=F(q,"remove"),ne=F(q,"nextSibling"),oe=F(q,"childNodes"),re=F(q,"parentNode");if("function"==typeof D){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ie,ae="";const{implementation:le,createNodeIterator:ue,createDocumentFragment:se,getElementsByTagName:ce}=r,{importNode:fe}=a;let pe={};o.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:de,ERB_EXPR:me,TMPLIT_EXPR:he,DATA_ATTR:Te,ARIA_ATTR:Ae,IS_SCRIPT_OR_DATA:ge,ATTR_WHITESPACE:ye,CUSTOM_ELEMENT:be}=$;let{IS_ALLOWED_URI:Ee}=$,De=null;const Se=L({},[...O,...k,...w,...R,...x]);let Le=null;const ve=L({},[...M,...I,...P,...W]);let _e=Object.seal(l(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}})),Fe=null,Oe=null,ke=!0,we=!0,Ne=!1,Re=!0,Ce=!1,xe=!0,Me=!1,Ie=!1,Pe=!1,We=!1,He=!1,ze=!1,Ue=!0,Ge=!1,Be=!0,je=!1,qe={},Ye=null;const Ke=L({},["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 Xe=null;const $e=L({},["audio","video","img","source","image","track"]);let Ve=null;const Qe=L({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",Je="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,ot=null;const rt=L({},[Ze,Je,et],m);let it=null;const at=["application/xhtml+xml","text/html"];let lt=null,ut=null;const st=r.createElement("form"),ct=function(e){return e instanceof RegExp||e instanceof Function},ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ut||ut!==e){if(e&&"object"==typeof e||(e={}),e=_(e),it=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?m:d,De=y(e,"ALLOWED_TAGS")?L({},e.ALLOWED_TAGS,lt):Se,Le=y(e,"ALLOWED_ATTR")?L({},e.ALLOWED_ATTR,lt):ve,ot=y(e,"ALLOWED_NAMESPACES")?L({},e.ALLOWED_NAMESPACES,m):rt,Ve=y(e,"ADD_URI_SAFE_ATTR")?L(_(Qe),e.ADD_URI_SAFE_ATTR,lt):Qe,Xe=y(e,"ADD_DATA_URI_TAGS")?L(_($e),e.ADD_DATA_URI_TAGS,lt):$e,Ye=y(e,"FORBID_CONTENTS")?L({},e.FORBID_CONTENTS,lt):Ke,Fe=y(e,"FORBID_TAGS")?L({},e.FORBID_TAGS,lt):{},Oe=y(e,"FORBID_ATTR")?L({},e.FORBID_ATTR,lt):{},qe=!!y(e,"USE_PROFILES")&&e.USE_PROFILES,ke=!1!==e.ALLOW_ARIA_ATTR,we=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Re=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ce=e.SAFE_FOR_TEMPLATES||!1,xe=!1!==e.SAFE_FOR_XML,Me=e.WHOLE_DOCUMENT||!1,We=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,ze=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,Ge=e.SANITIZE_NAMED_PROPS||!1,Be=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,Ee=e.ALLOWED_URI_REGEXP||j,tt=e.NAMESPACE||et,_e=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_e.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ce&&(we=!1),He&&(We=!0),qe&&(De=L({},x),Le=[],!0===qe.html&&(L(De,O),L(Le,M)),!0===qe.svg&&(L(De,k),L(Le,I),L(Le,W)),!0===qe.svgFilters&&(L(De,w),L(Le,I),L(Le,W)),!0===qe.mathMl&&(L(De,R),L(Le,P),L(Le,W))),e.ADD_TAGS&&(De===Se&&(De=_(De)),L(De,e.ADD_TAGS,lt)),e.ADD_ATTR&&(Le===ve&&(Le=_(Le)),L(Le,e.ADD_ATTR,lt)),e.ADD_URI_SAFE_ATTR&&L(Ve,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(Ye===Ke&&(Ye=_(Ye)),L(Ye,e.FORBID_CONTENTS,lt)),Be&&(De["#text"]=!0),Me&&L(De,["html","head","body"]),De.table&&(L(De,["tbody"]),delete Fe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw E('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(B,u)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));i&&i(e),ut=e}},pt=L({},["mi","mo","mn","ms","mtext"]),dt=L({},["foreignobject","annotation-xml"]),mt=L({},["title","style","font","a","script"]),ht=L({},[...k,...w,...N]),Tt=L({},[...R,...C]),At=function(e){p(o.removed,{element:e});try{re(e).removeChild(e)}catch(t){X(e)}},gt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Le[e])if(We||He)try{At(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},yt=function(e){let t=null,n=null;if(Pe)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&tt===et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ie?ie.createHTML(e):e;if(tt===et)try{t=(new G).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),tt===et?ce.call(t,Me?"html":"body")[0]:Me?t.documentElement:i},bt=function(e){return ue.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},Et=function(e){return e instanceof U&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Dt=function(e){return"function"==typeof S&&e instanceof S},St=function(e,t,n){pe[e]&&c(pe[e],(e=>{e.call(o,t,n,ut)}))},Lt=function(e){let t=null;if(St("beforeSanitizeElements",e,null),Et(e))return At(e),!0;const n=lt(e.nodeName);if(St("uponSanitizeElement",e,{tagName:n,allowedTags:De}),e.hasChildNodes()&&!Dt(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return At(e),!0;if(e.nodeType===Z)return At(e),!0;if(xe&&e.nodeType===J&&b(/<[/\w]/g,e.data))return At(e),!0;if(!De[n]||Fe[n]){if(!Fe[n]&&_t(n)){if(_e.tagNameCheck instanceof RegExp&&b(_e.tagNameCheck,n))return!1;if(_e.tagNameCheck instanceof Function&&_e.tagNameCheck(n))return!1}if(Be&&!Ye[n]){const t=re(e)||e.parentNode,n=oe(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=Y(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ne(e))}}return At(e),!0}return e instanceof v&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=d(e.tagName),o=d(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===Je?t.namespaceURI===et?"svg"===n:t.namespaceURI===Ze?"svg"===n&&("annotation-xml"===o||pt[o]):Boolean(ht[n]):e.namespaceURI===Ze?t.namespaceURI===et?"math"===n:t.namespaceURI===Je?"math"===n&&dt[o]:Boolean(Tt[n]):e.namespaceURI===et?!(t.namespaceURI===Je&&!dt[o])&&!(t.namespaceURI===Ze&&!pt[o])&&!Tt[n]&&(mt[n]||!ht[n]):!("application/xhtml+xml"!==it||!ot[e.namespaceURI]))}(e)?(At(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ce&&e.nodeType===Q&&(t=e.textContent,c([de,me,he],(e=>{t=T(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),St("afterSanitizeElements",e,null),!1):(At(e),!0)},vt=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in r||n in st))return!1;if(we&&!Oe[t]&&b(Te,t));else if(ke&&b(Ae,t));else if(!Le[t]||Oe[t]){if(!(_t(e)&&(_e.tagNameCheck instanceof RegExp&&b(_e.tagNameCheck,e)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(e))&&(_e.attributeNameCheck instanceof RegExp&&b(_e.attributeNameCheck,t)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(t))||"is"===t&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&b(_e.tagNameCheck,n)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(n))))return!1}else if(Ve[t]);else if(b(Ee,T(n,ye,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==A(n,"data:")||!Xe[e])if(Ne&&!b(ge,T(n,ye,"")));else if(n)return!1;return!0},_t=function(e){return"annotation-xml"!==e&&h(e,be)},Ft=function(e){St("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Le};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:u}=i,s=lt(a);let p="value"===a?u:g(u);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,St("uponSanitizeAttribute",e,n),p=n.attrValue,xe&&b(/((--!?|])>)|<\/(style|title)/i,p)){gt(a,e);continue}if(n.forceKeepAttr)continue;if(gt(a,e),!n.keepAttr)continue;if(!Re&&b(/\/>/i,p)){gt(a,e);continue}Ce&&c([de,me,he],(e=>{p=T(p,e," ")}));const d=lt(e.nodeName);if(vt(d,s,p)){if(!Ge||"id"!==s&&"name"!==s||(gt(a,e),p="user-content-"+p),ie&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(l);else switch(B.getAttributeType(d,s)){case"TrustedHTML":p=ie.createHTML(p);break;case"TrustedScriptURL":p=ie.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),Et(e)?At(e):f(o.removed)}catch(e){}}}St("afterSanitizeAttributes",e,null)},Ot=function e(t){let n=null;const o=bt(t);for(St("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)St("uponSanitizeShadowNode",n,null),Lt(n)||(n.content instanceof s&&e(n.content),Ft(n));St("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Dt(e)){if("function"!=typeof e.toString)throw E("toString is not a function");if("string"!=typeof(e=e.toString()))throw E("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Ie||ft(t),o.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=lt(e.nodeName);if(!De[t]||Fe[t])throw E("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)n=yt("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!We&&!Ce&&!Me&&-1===e.indexOf("<"))return ie&&ze?ie.createHTML(e):e;if(n=yt(e),!n)return We?null:ze?ae:""}n&&Pe&&At(n.firstChild);const u=bt(je?e:n);for(;i=u.nextNode();)Lt(i)||(i.content instanceof s&&Ot(i.content),Ft(i));if(je)return e;if(We){if(He)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Le.shadowroot||Le.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let f=Me?n.outerHTML:n.innerHTML;return Me&&De["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(K,n.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+f),Ce&&c([de,me,he],(e=>{f=T(f,e," ")})),ie&&ze?ie.createHTML(f):f},o.setConfig=function(){ft(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ie=!0},o.clearConfig=function(){ut=null,Ie=!1},o.isValidAttribute=function(e,t,n){ut||ft({});const o=lt(e),r=lt(t);return vt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],p(pe[e],t))},o.removeHook=function(e){if(pe[e])return f(pe[e])},o.removeHooks=function(e){pe[e]&&(pe[e]=[])},o.removeAllHooks=function(){pe={}},o}()}()},912:t=>{"use strict";t.exports=e}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";o.r(r),o.d(r,{default:()=>b});var e=o(912),t=o.n(e),n=o(838),i=o.n(n);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p(o.key),o)}}function p(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function d(e,t,n){return t=h(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}var A=t().import("modules/clipboard"),g=t().import("delta"),y=function(e){function n(e,t){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(o=d(this,n,[e,t])).allowed=t.allowed,o.keepSelection=t.keepSelection,o.substituteBlockElements=t.substituteBlockElements,o.magicPasteLinks=t.magicPasteLinks,o.hooks=t.hooks,o.handleImagePaste=t.handleImagePaste,o.customButtons=t.customButtons,o.removeConsecutiveSubstitutionTags=t.removeConsecutiveSubstitutionTags,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}(n,e),o=n,r=[{key:"onCapturePaste",value:function(e){var n,o,r,a=this;if(!e.defaultPrevented&&this.quill.isEnabled()){e.preventDefault();var l=this.quill.getSelection();if(null!=l){var u=null===(n=e.clipboardData)||void 0===n?void 0:n.getData("text/plain"),s=null===(o=e.clipboardData)||void 0===o?void 0:o.getData("text/html"),f=null===(r=e.clipboardData)||void 0===r||null===(r=r.items)||void 0===r?void 0:r[0],p=(new g).retain(l.index).delete(l.length),d=this.getDOMPurifyOptions(),m=!1,h=u;if(!s&&d.ALLOWED_TAGS.includes("a")&&this.isURL(u)&&l.length>0&&this.magicPasteLinks)h=this.quill.getText(l.index,l.length),p=p.insert(h,{link:u});else if(!s&&d.ALLOWED_TAGS.includes("img")&&f&&"file"===f.kind&&f.type.match(/^image\//i)){var T=f.getAsFile();if(void 0!==this.handleImagePaste)this.handleImagePaste(T);else{var A=new FileReader;A.onload=function(e){a.quill.insertEmbed(l.index,"image",e.target.result),a.keepSelection||a.quill.setSelection(l.index+1)},A.readAsDataURL(T)}}else{var y,b,E,D,S,L,v,_,F;if(s||(m=!0,s=h),"function"==typeof(null===(y=this.hooks)||void 0===y?void 0:y.beforeSanitizeElements)&&i().addHook("beforeSanitizeElements",this.hooks.beforeSanitizeElements),"function"==typeof(null===(b=this.hooks)||void 0===b?void 0:b.uponSanitizeElement)&&i().addHook("uponSanitizeElement",this.hooks.uponSanitizeElement),"function"==typeof(null===(E=this.hooks)||void 0===E?void 0:E.afterSanitizeElements)&&i().addHook("afterSanitizeElements",this.hooks.afterSanitizeElements),"function"==typeof(null===(D=this.hooks)||void 0===D?void 0:D.beforeSanitizeAttributes)&&i().addHook("beforeSanitizeAttributes",this.hooks.beforeSanitizeAttributes),"function"==typeof(null===(S=this.hooks)||void 0===S?void 0:S.uponSanitizeAttribute)&&i().addHook("uponSanitizeAttribute",this.hooks.uponSanitizeAttribute),"function"==typeof(null===(L=this.hooks)||void 0===L?void 0:L.afterSanitizeAttributes)&&i().addHook("afterSanitizeAttributes",this.hooks.afterSanitizeAttributes),"function"==typeof(null===(v=this.hooks)||void 0===v?void 0:v.beforeSanitizeShadowDOM)&&i().addHook("beforeSanitizeShadowDOM",this.hooks.beforeSanitizeShadowDOM),"function"==typeof(null===(_=this.hooks)||void 0===_?void 0:_.uponSanitizeShadowNode)&&i().addHook("uponSanitizeShadowNode",this.hooks.uponSanitizeShadowNode),"function"==typeof(null===(F=this.hooks)||void 0===F?void 0:F.afterSanitizeShadowDOM)&&i().addHook("afterSanitizeShadowDOM",this.hooks.afterSanitizeShadowDOM),m)h=i().sanitize(s,d),p=p.insert(h);else{if(s=d.ALLOWED_TAGS.includes("table")?this.tableHeadersToCells(s):this.convertTableContent(s),!1!==this.substituteBlockElements){var O,k=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(l.push(o.value),l.length!==t);u=!0);}catch(e){s=!0,r=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.substitute(s,d),2);s=k[0],O=k[1],h=s.innerHTML,this.removeConsecutiveSubstitutionTags&&(h=this.collapseConsecutiveSubstitutionTags(h,O))}else h=i().sanitize(s,d);p=p.concat(this.convert({html:h}))}}this.quill.updateContents(p,t().sources.USER),m||(p=this.convert({html:h})),this.keepSelection?this.quill.setSelection(l.index,p.length(),t().sources.SILENT):this.quill.setSelection(l.index+p.length(),t().sources.SILENT),this.quill.scrollSelectionIntoView(),i().removeAllHooks()}}}},{key:"collapseConsecutiveSubstitutionTags",value:function(e,t){var n=(new DOMParser).parseFromString(e,"text/html"),o=n.querySelectorAll(t),r=!1;return o.forEach((function(e){r?null===e.firstChild||3===e.firstChild.nodeType&&""===e.firstChild.nodeValue.trim()?e.parentNode.removeChild(e):r=!1:r=!0})),n.body.innerHTML}},{key:"tableHeadersToCells",value:function(e){var t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll("table").forEach((function(e){var t=e.querySelector("thead");if(t){var n=e.querySelector("tbody");if(n){var o=t.querySelector("tr");n.insertBefore(o,n.firstChild)}}e.querySelectorAll("th").forEach((function(e){var t=document.createElement("td");t.innerHTML=e.innerHTML,e.parentNode.replaceChild(t,e)}))})),"<html>".concat(t.body.outerHTML,"<html>")}},{key:"convertTableContent",value:function(e){var t=(new DOMParser).parseFromString(e,"text/html");return t.querySelectorAll("tr").forEach((function(e){e.outerHTML="<p>".concat(Array.from(e.querySelectorAll("td, th")).map((function(e){return e.innerHTML})).join(" "),"</p>")})),t.querySelectorAll("td, th").forEach((function(e){e.outerHTML="".concat(e.innerHTML," ")})),t.querySelectorAll("thead, tbody, tfoot").forEach((function(e){e.outerHTML=e.innerHTML})),t.querySelectorAll("table").forEach((function(e){e.outerHTML=e.innerHTML})),"<html>".concat(t.body.outerHTML,"<html>")}},{key:"getDOMPurifyOptions",value:function(){var e,t,n={};if(null!==(e=this.allowed)&&void 0!==e&&e.tags&&(n.ALLOWED_TAGS=this.allowed.tags),null!==(t=this.allowed)&&void 0!==t&&t.attributes&&(n.ALLOWED_ATTR=this.allowed.attributes),void 0===n.ALLOWED_TAGS||void 0===n.ALLOWED_ATTR){var o,r=!1;void 0===n.ALLOWED_TAGS&&(r=!0,n.ALLOWED_TAGS=["p","br","span"]);var i=!1;void 0===n.ALLOWED_ATTR&&(i=!0,n.ALLOWED_ATTR=["class"]);var a,l=this.quill.getModule("toolbar");null==l||null===(o=l.controls)||void 0===o||o.forEach((function(e){switch(e[0]){case"bold":r&&(n.ALLOWED_TAGS.push("b"),n.ALLOWED_TAGS.push("strong"));break;case"italic":r&&(n.ALLOWED_TAGS.push("i"),n.ALLOWED_TAGS.push("em"));break;case"underline":r&&n.ALLOWED_TAGS.push("u");break;case"strike":r&&n.ALLOWED_TAGS.push("s");break;case"color":case"background":i&&n.ALLOWED_ATTR.push("style");break;case"script":r&&("super"===e[1].value?n.ALLOWED_TAGS.push("sup"):"sub"===e[1].value&&n.ALLOWED_TAGS.push("sub"));break;case"header":if(r){var t=function(e){"1"===e?n.ALLOWED_TAGS.push("h1"):"2"===e?n.ALLOWED_TAGS.push("h2"):"3"===e?n.ALLOWED_TAGS.push("h3"):"4"===e?n.ALLOWED_TAGS.push("h4"):"5"===e?n.ALLOWED_TAGS.push("h5"):"6"===e&&n.ALLOWED_TAGS.push("h6")};e[1].value?t(e[1].value):e[1].options&&e[1].options.length&&[].forEach.call(e[1].options,(function(e){e.value&&t(e.value)}))}break;case"code-block":r&&n.ALLOWED_TAGS.push("pre"),i&&n.ALLOWED_ATTR.push("spellcheck");break;case"list":r&&("ordered"===e[1].value?n.ALLOWED_TAGS.push("ol"):"bullet"===e[1].value&&n.ALLOWED_TAGS.push("ul"),n.ALLOWED_TAGS.push("li"));break;case"link":r&&n.ALLOWED_TAGS.push("a"),i&&(n.ALLOWED_ATTR.push("href"),n.ALLOWED_ATTR.push("target"),n.ALLOWED_ATTR.push("rel"));break;case"image":r&&n.ALLOWED_TAGS.push("img"),i&&(n.ALLOWED_ATTR.push("src"),n.ALLOWED_ATTR.push("title"),n.ALLOWED_ATTR.push("alt"),n.ALLOWED_ATTR.push("height"),n.ALLOWED_ATTR.push("width"));break;case"video":r&&n.ALLOWED_TAGS.push("iframe"),i&&(n.ALLOWED_ATTR.push("frameborder"),n.ALLOWED_ATTR.push("allowfullscreen"),n.ALLOWED_ATTR.push("src"),n.ALLOWED_ATTR.push("height"),n.ALLOWED_ATTR.push("width"));break;case"blockquote":r&&n.ALLOWED_TAGS.push(e[0]);break;case"table":r&&(n.ALLOWED_TAGS.push("table"),n.ALLOWED_TAGS.push("tr"),n.ALLOWED_TAGS.push("td"))}})),null!=l&&l.controls&&(null===(a=this.customButtons)||void 0===a||a.forEach((function(e){var t,o;l.controls.some((function(t){return t[0]===e.module}))&&(null===(t=e.allowedTags)||void 0===t||t.forEach((function(e){n.ALLOWED_TAGS.push(e)})),null===(o=e.allowedAttr)||void 0===o||o.forEach((function(e){n.ALLOWED_ATTR.push(e)})))})))}return n}},{key:"substitute",value:function(e,t){var n,o=["h1","h2","h3","h4","h5","h6"],r=["p","div","section","article","fieldset","address","aside","blockquote","canvas","dl","figcaption","figure","footer","form","header","main","nav","noscript","ol","pre","ul","video"],a=["li","dt","dd","hr"];return i().addHook("uponSanitizeElement",(function(e,i,l){for(var u=0;!n&&u<3;)t.ALLOWED_TAGS.includes(r[u])&&(n=r[u]),++u;if(n&&e.tagName&&!t.ALLOWED_TAGS.includes(e.tagName.toLowerCase())){var s=e.tagName.toLowerCase();o.includes(s)?e.innerHTML="<".concat(n,"><b>").concat(e.innerHTML,"</b></").concat(n,">"):r.includes(s)?e.innerHTML="<".concat(n,">").concat(e.innerHTML,"</").concat(n,">"):a.includes(s)&&(e.innerHTML="".concat(e.innerHTML,"<br>"))}})),e=i().sanitize(e,u(u({},t),{RETURN_DOM:!0,WHOLE_DOCUMENT:!1})),i().removeAllHooks(),[e,n]}},{key:"isURL",value:function(e){return!!/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\x2D?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\x2D?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:(?![\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uD800-\uDFFF\uFEFF])[\s\S]|[\uD800-\uDBFF][\uDC00-\uDFFF])*)?$/i.test(e)}}],r&&f(o.prototype,r),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,r}(A);t().register("modules/clipboard",y,!0);const b=y})(),r})())); |
{ | ||
"name": "quill-paste-smart", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Quill Extension to paste only supported HTML", | ||
"main": "dist/quill-paste-smart.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.9.0", | ||
"@babel/plugin-proposal-class-properties": "^7.8.3", | ||
"@babel/preset-env": "^7.9.0", | ||
"babel-loader": "^8.1.0", | ||
"webpack": "^4.43.0", | ||
"webpack-cli": "^3.3.11" | ||
"@babel/core": "^7.24.7", | ||
"@babel/plugin-proposal-class-properties": "^7.18.6", | ||
"@babel/preset-env": "^7.24.7", | ||
"babel-loader": "^9.1.3", | ||
"webpack": "^5.92.1", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
@@ -36,6 +36,6 @@ "scripts": { | ||
"dependencies": { | ||
"dompurify": "^3.0.5" | ||
"dompurify": "^3.1.6" | ||
}, | ||
"peerDependencies": { | ||
"quill": "^1.3.5" | ||
"quill": "^2.0.2" | ||
}, | ||
@@ -42,0 +42,0 @@ "eslintConfig": { |
@@ -19,4 +19,4 @@ # Quill Paste Smart | ||
```bash | ||
npm i quill-paste-smart | ||
# or: yarn add quill-paste-smart | ||
npm i quill-paste-smart@^1 | ||
# or: yarn add quill-paste-smart@^1 | ||
``` | ||
@@ -67,2 +67,9 @@ | ||
}, | ||
customButtons: [ | ||
{ | ||
module: 'quillEmbeds', | ||
allowedTags: ['embed'], | ||
allowedAttr: ['width', 'height'], | ||
} | ||
], | ||
keepSelection: true, | ||
@@ -79,3 +86,4 @@ substituteBlockElements: true, | ||
console.log("Image file pasted", image); | ||
} | ||
}, | ||
removeConsecutiveSubstitutionTags: true | ||
}, | ||
@@ -95,10 +103,14 @@ }, | ||
| :---------------------- | :----------------------------------------------------------: | :-----------: | :---------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| allowed.tags | HTML tags | `undefined` | `Array<string>` | Here you can define any HTML tag that should be allowed to be pasted. If this setting is not specified, allowed tags are determined by possible formats in the toolbar | | ||
| allowed.attributes | HTML attributes | `undefined` | `Array<string>` | Here you can define any HTML attributes that should be allowed to be pasted. If this setting is not specified, allowed attributes are determined by possible formats in the toolbar | | ||
| substituteBlockElements | `true` `false` | `true` | `Boolean` | If this setting is set to `true` all forbidden block type tags will be substituted by one of the allowed tags `p`/`div`/`section` | | ||
| keepSelection | `true` `false` | `false` | `Boolean` | If this setting is set to `true` the pasted content will be selected after pasting it. Otherwise the cursor will be placed right after the pasted content | | ||
| magicPasteLinks | `true` `false` | `false` | `Boolean` | If this setting is set to `true` pasted URLs over selected text will be converted to an `a` tag. Example: If you select the word `foo` and paste the URL `https://foo.bar/` the result will be `<a href="https://foo.bar/">foo</a>`. Note: This only works if there is nothing pasted except a valid URL. | | ||
| hooks | [DOMPurify Hooks](https://github.com/cure53/DOMPurify#hooks) | `undefined` | `Array<function>` | Here you can define any of the DOMPurify hooks. This can be handy if you need to cusomtize the HTML sanitizer. For more information see the [hook demos](https://github.com/cure53/DOMPurify/tree/main/demos) from DOMPurify.<br>**BE AWARE**<br>Here you can mess up things. E.g. You could create an infinite loop by adding not allowed tags to the node. | | ||
| handleImagePaste | `function (File)` | `undefined` | `function (File)` | Here you can define custom behavior for handling images being pasted, you can use this to upload the image to a CDN rather than embedding | | ||
| allowed.tags | HTML tags | `undefined` | `Array<string>` | Here you can define any HTML tag that should be allowed to be pasted. If this setting is not specified, allowed tags are determined by possible formats in the toolbar | | ||
| allowed.attributes | HTML attributes | `undefined` | `Array<string>` | Here you can define any HTML attributes that should be allowed to be pasted. If this setting is not specified, allowed attributes are determined by possible formats in the toolbar | | ||
| customButtons | Array of button description objects | `undefined` | `Array<object>` | Here you can add custom toolbar buttons with the associated tags and attributes that are allowed in relation to those buttons. | | ||
| customButtons.module | String | `undefined` | `string` | The module name used in the toolbar button definition | | ||
| customButtons.allowedTags | HTML tags | `undefined` | `Array<string>` | The tags allowed when this custom button is present. | | ||
| customButtons.allowedAttr | HTML attributes | `undefined` | `Array<string>` | The attributes allowed when this custom button is present. | | ||
| substituteBlockElements | `true` `false` | `true` | `Boolean` | If this setting is set to `true` all forbidden block type tags will be substituted by one of the allowed tags `p`/`div`/`section` | | ||
| keepSelection | `true` `false` | `false` | `Boolean` | If this setting is set to `true` the pasted content will be selected after pasting it. Otherwise the cursor will be placed right after the pasted content | | ||
| magicPasteLinks | `true` `false` | `false` | `Boolean` | If this setting is set to `true` pasted URLs over selected text will be converted to an `a` tag. Example: If you select the word `foo` and paste the URL `https://foo.bar/` the result will be `<a href="https://foo.bar/">foo</a>`. Note: This only works if there is nothing pasted except a valid URL. | | ||
| hooks | [DOMPurify Hooks](https://github.com/cure53/DOMPurify#hooks) | `undefined` | `Array<function>` | Here you can define any of the DOMPurify hooks. This can be handy if you need to cusomtize the HTML sanitizer. For more information see the [hook demos](https://github.com/cure53/DOMPurify/tree/main/demos) from DOMPurify.<br>**BE AWARE**<br>Here you can mess up things. E.g. You could create an infinite loop by adding not allowed tags to the node. | | ||
| handleImagePaste | `function (File)` | `undefined` | `function (File)` | Here you can define custom behavior for handling images being pasted, you can use this to upload the image to a CDN rather than embedding | | | ||
| removeConsecutiveSubstitutionTags | `true` `false` | `undefined` | `Boolean` | If this setting is set to `true` the pasted content will have consecutive occurances of the chosen substitution element removed after pasting it. Otherwise the the pasted conntent will not be affected. Note this setting is in effect only when substituteBlockElements is not false. | | ||
<br> | ||
@@ -105,0 +117,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
48633
5
151
1
+ Addedeventemitter3@5.0.1(transitive)
+ Addedfast-diff@1.3.0(transitive)
+ Addedlodash-es@4.17.21(transitive)
+ Addedlodash.clonedeep@4.5.0(transitive)
+ Addedlodash.isequal@4.5.0(transitive)
+ Addedparchment@3.0.0(transitive)
+ Addedquill@2.0.2(transitive)
+ Addedquill-delta@5.1.0(transitive)
- Removedcall-bind@1.0.7(transitive)
- Removedclone@2.1.2(transitive)
- Removeddeep-equal@1.1.2(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removedes-define-property@1.0.0(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedeventemitter3@2.0.3(transitive)
- Removedextend@3.0.2(transitive)
- Removedfast-diff@1.1.2(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-intrinsic@1.2.4(transitive)
- Removedgopd@1.0.1(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.0.3(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-arguments@1.1.1(transitive)
- Removedis-date-object@1.0.5(transitive)
- Removedis-regex@1.1.4(transitive)
- Removedobject-is@1.1.6(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedparchment@1.1.4(transitive)
- Removedquill@1.3.7(transitive)
- Removedquill-delta@3.6.3(transitive)
- Removedregexp.prototype.flags@1.5.2(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-function-name@2.0.2(transitive)
Updateddompurify@^3.1.6