"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("./chunks/Editor.cjs"),de=require("./MdPreview.cjs"),pe=require("./NormalToolbar.cjs"),ve=require("./DropdownToolbar.cjs"),he=require("./ModalToolbar.cjs"),be=require("./chunks/index.cjs"),me=require("./chunks/index2.cjs"),F=require("./chunks/ContentPreview.cjs"),we=require("react/jsx-runtime"),C=require("./chunks/config.cjs"),Q=require("./config.cjs");function ye(e,r){for(var t=0;ta[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const Ae=e=>we.jsx("div",{className:`${C.prefix}-footer-item`,onClick:e.onClick,children:e.children});function Te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $={exports:{}},g={},X={exports:{}},y={};function Z(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function Se(e,r,t){}function ke(e,r,t){}var xe=/javascript\s*\:/img;function Ee(e,r){return xe.test(r)?"":r}y.whiteList=Z();y.getDefaultWhiteList=Z;y.onAttr=Se;y.onIgnoreAttr=ke;y.safeAttrValue=Ee;var Ce={indexOf:function(e,r){var t,a;if(Array.prototype.indexOf)return e.indexOf(r);for(t=0,a=e.length;t/g,Ge=/"/g,qe=/"/g,ze=/&#([a-zA-Z0-9]*);?/gim,Ue=/:?/gim,Be=/&newline;?/gim,O=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,U=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,B=/u\s*r\s*l\s*\(.*/gi;function te(e){return e.replace(Ge,""")}function re(e){return e.replace(qe,'"')}function ae(e){return e.replace(ze,function(t,a){return a[0]==="x"||a[0]==="X"?String.fromCharCode(parseInt(a.substr(1),16)):String.fromCharCode(parseInt(a,10))})}function ie(e){return e.replace(Ue,":").replace(Be," ")}function ne(e){for(var r="",t=0,a=e.length;t",a);if(o===-1)break;t=o+3}return r}function Ze(e){var r=e.split("");return r=r.filter(function(t){var a=t.charCodeAt(0);return a===127?!1:a<=31?a===10||a===13:!0}),r.join("")}g.whiteList=K();g.getDefaultWhiteList=K;g.onTag=We;g.onIgnoreTag=De;g.onTagAttr=Fe;g.onIgnoreTagAttr=$e;g.safeAttrValue=Xe;g.escapeHtml=ee;g.escapeQuote=te;g.unescapeQuote=re;g.escapeHtmlEntities=ae;g.escapeDangerHtml5Entities=ie;g.clearNonPrintableCharacter=ne;g.friendlyAttrValue=se;g.escapeAttrValue=oe;g.onIgnoreTagStripAll=je;g.StripTagBody=He;g.stripCommentTag=Qe;g.stripBlankChar=Ze;g.attributeWrapSign='"';g.cssFilter=Y;g.getDefaultCSSWhiteList=Re;var W={},w=M;function Je(e){var r=w.spaceIndex(e),t;return r===-1?t=e.slice(1,-1):t=e.slice(1,r+1),t=w.trim(t).toLowerCase(),t.slice(0,1)==="/"&&(t=t.slice(1)),t.slice(-1)==="/"&&(t=t.slice(0,-1)),t}function Ke(e){return e.slice(0,2)===""||s===n-1){a+=t(e.slice(o,i)),u=e.slice(i,s+1),c=Je(u),a+=r(i,a.length,c,u,Ke(u)),o=s+1,i=!1;continue}if(l==='"'||l==="'")for(var d=1,p=e.charAt(s-d);p.trim()===""||p==="=";){if(p==="="){f=l;continue e}p=e.charAt(s-++d)}}else if(l===f){f=!1;continue}}return o0;r--){var t=e[r];if(t!==" ")return t==="="?r:-1}}function nt(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function j(e){return nt(e)?e.substr(1,e.length-2):e}W.parseTag=Ye;W.parseAttr=tt;var st=V.FilterCSS,b=g,le=W,ot=le.parseTag,lt=le.parseAttr,N=M;function P(e){return e==null}function ft(e){var r=N.spaceIndex(e);if(r===-1)return{html:"",closing:e[e.length-2]==="/"};e=N.trim(e.slice(r+1,-1));var t=e[e.length-1]==="/";return t&&(e=N.trim(e.slice(0,-1))),{html:e,closing:t}}function ut(e){var r={};for(var t in e)r[t]=e[t];return r}function ct(e){var r={};for(var t in e)Array.isArray(e[t])?r[t.toLowerCase()]=e[t].map(function(a){return a.toLowerCase()}):r[t.toLowerCase()]=e[t];return r}function fe(e){e=ut(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=b.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=ct(e.whiteList||e.allowList):e.whiteList=b.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":b.attributeWrapSign,e.onTag=e.onTag||b.onTag,e.onTagAttr=e.onTagAttr||b.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||b.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||b.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||b.safeAttrValue,e.escapeHtml=e.escapeHtml||b.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new st(e.css))}fe.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var r=this,t=r.options,a=t.whiteList,o=t.onTag,i=t.onIgnoreTag,f=t.onTagAttr,s=t.onIgnoreTagAttr,n=t.safeAttrValue,c=t.escapeHtml,u=r.attributeWrapSign,l=r.cssFilter;t.stripBlankChar&&(e=b.stripBlankChar(e)),t.allowCommentTag||(e=b.stripCommentTag(e));var d=!1;t.stripIgnoreTagBody&&(d=b.StripTagBody(t.stripIgnoreTagBody,i),i=d.onIgnoreTag);var p=ot(e,function(v,_,h,m,ue){var I={sourcePosition:v,position:_,isClosing:ue,isWhite:Object.prototype.hasOwnProperty.call(a,h)},S=o(h,m,I);if(!P(S))return S;if(I.isWhite){if(I.isClosing)return"";var G=ft(m),ce=a[h],q=lt(G.html,function(A,T){var D=N.indexOf(ce,A)!==-1,k=f(h,A,T,D);return P(k)?D?(T=n(h,A,T,l),T?A+"="+u+T+u:A):(k=s(h,A,T,D),P(k)?void 0:k):k});return m="<"+h,q&&(m+=" "+q),G.closing&&(m+=" /"),m+=">",m}else return S=i(h,m,I),P(S)?c(m):S},c);return d&&(p=d.remove(p)),p};var gt=fe;(function(e,r){var t=g,a=W,o=gt;function i(s,n){var c=new o(n);return c.process(s)}r=e.exports=i,r.filterXSS=i,r.FilterXSS=o,function(){for(var s in t)r[s]=t[s];for(var n in a)r[n]=a[n]}(),typeof window<"u"&&(window.filterXSS=e.exports);function f(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}f()&&(self.filterXSS=e.exports)})($,$.exports);var E=$.exports;const dt=Te(E),pt=ye({__proto__:null,default:dt},[E]),H={img:["class"],input:["class","disabled","type","checked"],iframe:["class","width","height","src","title","border","frameborder","framespacing","allow","allowfullscreen"]},vt=(e,r)=>{const{extendedWhiteList:t={},xss:a={}}=r;let o;if(typeof a=="function")o=new E.FilterXSS(a(pt));else{const i=E.getDefaultWhiteList();[...Object.keys(t),...Object.keys(H)].forEach(s=>{const n=i[s]||[],c=H[s]||[],u=t[s]||[];i[s]=[...new Set([...n,...c,...u])]}),o=new E.FilterXSS({whiteList:i,...a})}e.core.ruler.after("linkify","xss",i=>{for(let f=0;f{c.type==="html_inline"&&(c.content=o.process(c.content))});break}}}})},ht=()=>{Object.keys(F.CDN_IDS).forEach(e=>{const r=document.getElementById(F.CDN_IDS[e]);r&&r.remove()})};exports.MdEditor=ge.Editor;exports.MdPreview=de;exports.NormalToolbar=pe;exports.DropdownToolbar=ve;exports.ModalToolbar=he;exports.MdCatalog=be.MdCatalog;exports.MdModal=me.Modal;exports.StrIcon=F.StrIcon;exports.allFooter=C.allFooter;exports.allToolbar=C.allToolbar;exports.config=C.config;exports.editorExtensionsAttrs=C.editorExtensionsAttrs;exports.en_US=Q.en_US;exports.zh_CN=Q.zh_CN;exports.NormalFooterToolbar=Ae;exports.XSSPlugin=vt;exports.clearSideEffects=ht;