remons-render-markdown 1.0.27 → 2.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +14 -13
- package/package.json +95 -93
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { default as RenderMarkdown } from './components/RenderMarkdown';
|
|
1
|
+
import { default as RenderMarkdown, RenderMarkdownProps } from './components/RenderMarkdown';
|
|
2
2
|
import { default as markdownFormat, initHighlighter } from './components/RenderMarkdown/utils/render-markdown';
|
|
3
3
|
import { default as languagesCommon } from './components/RenderMarkdown/utils/render-markdown/languagesCommon';
|
|
4
4
|
import { renderMermaid } from './components/MermaidRenderer';
|
|
5
5
|
export default RenderMarkdown;
|
|
6
|
+
export type { RenderMarkdownProps };
|
|
6
7
|
export { markdownFormat, languagesCommon, initHighlighter, renderMermaid };
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import e,{createContext as t,forwardRef as n,useCallback as i,useContext as r,useEffect as o,useMemo as a,useRef as s,useState as l}from"react";import{CaretDownOutlined as c,CaretRightOutlined as d,CheckCircleOutlined as u,CloseCircleOutlined as h,CodeOutlined as p,CopyFilled as m,DownOutlined as f,DownloadOutlined as v,DragOutlined as g,ExportOutlined as w,EyeOutlined as b,FullscreenExitOutlined as y,FullscreenOutlined as k,ImportOutlined as x,InfoCircleOutlined as S,LoadingOutlined as _,MinusOutlined as C,PlusOutlined as E,ReloadOutlined as A,UpOutlined as T,WarningOutlined as M,ZoomInOutlined as O,ZoomOutOutlined as L}from"@ant-design/icons";import
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__
|
|
4
|
-
/* @__PURE__
|
|
5
|
-
/* @__PURE__
|
|
6
|
-
/* @__PURE__ */z("line",{x1:"16",y1:"44",x2:"32",y2:"44",stroke:"#d9d9d9",strokeWidth:"2"})]}),/* @__PURE__ */z("span",{className:"_description_1qt26_10",children:e})]})}var he=/* @__PURE__ */U((e,t)=>{!function(n,i){"object"==typeof e&&void 0!==t?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i((n="undefined"!=typeof globalThis?globalThis:n||self).MethodsR={})}(e,function(e){function t(e){return t="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},t(e)}function n(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.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)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}e.IsPC=function(){for(var e=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],n=!0,i=0;i<t.length;i++)if(e.indexOf(t[i])>0){n=!1;break}return n},e.SUM=function(e,t){var n;return e.forEach(function(t,i){"number"!=typeof t&&"string"!=typeof t||(n="number",e[i]=Number(t))}),"number"===n?e.reduce(function(e,t){return e+t}):e.reduce(function(e,n){return e+n[t]},0)},e.arrGroup=function(e,n){if("number"==typeof n){if(e instanceof Array){for(var i=[],r=0,o=e.length;r<o;r+=n)i.push(e.slice(r,r+n));return i}return t(e),e}},e.compareVersion=function(e,t){for(var n=e.split("."),i=t.split("."),r=Math.max(n.length,i.length),o=0;o<r;o++){var a=+n[o],s=+i[o];if(a>s)return e;if(a<s)return t}return!1},e.copy=function(e){if("object"===t(e)){if(document.body.createTextRange){var n=document.body.createTextRange();n.moveToElementText(e),n.select()}else if(window.getSelection){var i=window.getSelection(),r=document.createRange();r.selectNodeContents(e),i.removeAllRanges(),i.addRange(r)}document.execCommand("Copy","false",null),window.getSelection().empty()}else{var o=document.createElement("textarea"),a=document.querySelector("body");o.value=e,o.setAttribute("style","z-index:-1"),a.appendChild(o),o.select(),document.execCommand("copy"),a.removeChild(o)}},e.dateFormat=function(e,t){function n(e){return e<10?"0"+e:e}var i,r=(i=e&&"number"==typeof e?new Date(e):e&&"string"==typeof e?new Date(parseInt(e)):/* @__PURE__ */new Date).getFullYear(),o=n(i.getMonth()+1),a=n(i.getDate()),s=n(i.getHours()),l=n(i.getMinutes()),c=n(i.getSeconds()),d="".concat(r,"-").concat(o,"-").concat(a," ").concat(s,":").concat(l,":").concat(c);return"yyyy/MM/dd HH:mm:ss"==t?d="".concat(r,"/").concat(o,"/").concat(a," ").concat(s,":").concat(l,":").concat(c):"yyyy/MM/dd"==t?d="".concat(r,"/").concat(o,"/").concat(a):"yyyy-MM-dd"==t?d="".concat(r,"-").concat(o,"-").concat(a):"HH:mm:ss"==t?d="".concat(s,":").concat(l,":").concat(c):"yyyy年MM月dd日 HH时mm分ss秒"==t&&(d="".concat(r,"年").concat(o,"月").concat(a,"日 ").concat(s,"时").concat(l,"分").concat(c,"秒")),d},e.debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(n){var i=n;clearTimeout(e.id),e.id=setTimeout(function(){e.call(void 0,i)},t)}},e.deepClone=function e(t){var n=function(e){return Object.prototype.toString.call(e).slice(8,-1)};if(["Null","String","Boolean","Number","Undefined","Function"].includes(n(t)))return t;if("RegExp"===n(t))return new RegExp(t);if("Date"===n(t))return new Date(t);var i="Array"===n(t)?[]:{};for(var r in t)i[r]=e(t[r]);return i},e.download=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=document.createElement("a");if(i.setAttribute("download",n),i.setAttribute("href",e),navigator.msSaveBlob){var r=Blob([e],{type:t});return navigator.msSaveBlob(r,n)}i.click()},e.getSearchParams=function(e){var t=new URLSearchParams(decodeURI(window.location.search)),i={};return n(t.keys()).forEach(function(e){i[e]=t.get(e)}),e?t.get(e):i},e.openApp=function(e){var t=e.url,n=e.params;if(t){var i=new URLSearchParams(n);window.location=i.toString()?"".concat(t,"?").concat(i.toString()):t}},e.removeArrRepeat=function(e,i){if(e.length&&t("object"!==e[0]))return n(new Set(e));var r={};return e.reduce(function(e,t){return!r[t[i]]&&(r[t[i]]=e.push(t)),e},[])},e.viewImg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;if("IMG"===e.target.nodeName&&e.target.currentSrc){var t=document.createElement("div"),n=document.createElement("img");t.setAttribute("style","position: fixed;\n z-index: 2001;\n display: flex;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n background: rgb(0 0 0 / 33%);\n height: 100%;\n top: 0;"),t.setAttribute("id","remons-view-box"),n.setAttribute("src",e.target.currentSrc),n.setAttribute("style","max-height: 100%; max-weight: 100%"),n.setAttribute("id","remons-view-img"),document.body.appendChild(t),document.querySelector("#remons-view-box").appendChild(n);var i=document.querySelector("#remons-view-box");i&&i.addEventListener("click",function(){document.body.removeChild(i)})}},e.watchScroll=function(e,t){t||(t=1e3),(arguments.length>2&&void 0!==arguments[2]?arguments[2]:window).onscroll=function(e,t){var n=null;return function(){n&&clearTimeout(n),n=setTimeout(e,t)}}(e,t)},Object.defineProperty(e,"__esModule",{value:!0})})}),pe=he(),me=!1,fe={false:"push",true:"unshift",after:"push",before:"unshift"},ve={isPermalinkSymbol:!0};function ge(e,t,n,i){var r;me||("object"==typeof process&&process&&process.emitWarning&&process.emitWarning("Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks"),me=!0);var o=[Object.assign(new n.Token("link_open","a",1),{attrs:[].concat(t.permalinkClass?[["class",t.permalinkClass]]:[],[["href",t.permalinkHref(e,n)]],Object.entries(t.permalinkAttrs(e,n)))}),Object.assign(new n.Token("html_block","",0),{content:t.permalinkSymbol,meta:ve}),new n.Token("link_close","a",-1)];t.permalinkSpace&&n.tokens[i+1].children[fe[t.permalinkBefore]](Object.assign(new n.Token("text","",0),{content:" "})),(r=n.tokens[i+1].children)[fe[t.permalinkBefore]].apply(r,o)}function we(e){return"#"+e}function be(e){return{}}var ye={class:"header-anchor",symbol:"#",renderHref:we,renderAttrs:be};function ke(e){function t(n){return n=Object.assign({},t.defaults,n),function(t,i,r,o){return e(t,n,i,r,o)}}return t.defaults=Object.assign({},ye),t.renderPermalinkImpl=e,t}function xe(e){var t=[],n=e.filter(function(e){if("class"!==e[0])return!0;t.push(e[1])});return t.length>0&&n.unshift(["class",t.join(" ")]),n}var Se=ke(function(e,t,n,i,r){var o,a=[Object.assign(new i.Token("link_open","a",1),{attrs:xe([].concat(t.class?[["class",t.class]]:[],[["href",t.renderHref(e,i)]],t.ariaHidden?[["aria-hidden","true"]]:[],Object.entries(t.renderAttrs(e,i))))}),Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:ve}),new i.Token("link_close","a",-1)];if(t.space){var s="string"==typeof t.space?t.space:" ";i.tokens[r+1].children[fe[t.placement]](Object.assign(new i.Token("string"==typeof t.space?"html_inline":"text","",0),{content:s}))}(o=i.tokens[r+1].children)[fe[t.placement]].apply(o,a)});Object.assign(Se.defaults,{space:!0,placement:"after",ariaHidden:!1});var _e=ke(Se.renderPermalinkImpl);_e.defaults=Object.assign({},Se.defaults,{ariaHidden:!0});var Ce=ke(function(e,t,n,i,r){var o=[Object.assign(new i.Token("link_open","a",1),{attrs:xe([].concat(t.class?[["class",t.class]]:[],[["href",t.renderHref(e,i)]],Object.entries(t.renderAttrs(e,i))))})].concat(t.safariReaderFix?[new i.Token("span_open","span",1)]:[],i.tokens[r+1].children,t.safariReaderFix?[new i.Token("span_close","span",-1)]:[],[new i.Token("link_close","a",-1)]);i.tokens[r+1].children=o});Object.assign(Ce.defaults,{safariReaderFix:!1});var Ee=ke(function(e,t,n,i,r){var o;if(!["visually-hidden","aria-label","aria-describedby","aria-labelledby"].includes(t.style))throw new Error("`permalink.linkAfterHeader` called with unknown style option `"+t.style+"`");if(!["aria-describedby","aria-labelledby"].includes(t.style)&&!t.assistiveText)throw new Error("`permalink.linkAfterHeader` called without the `assistiveText` option in `"+t.style+"` style");if("visually-hidden"===t.style&&!t.visuallyHiddenClass)throw new Error("`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style");var a=i.tokens[r+1].children.filter(function(e){return"text"===e.type||"code_inline"===e.type}).reduce(function(e,t){return e+t.content},""),s=[],l=[];if(t.class&&l.push(["class",t.class]),l.push(["href",t.renderHref(e,i)]),l.push.apply(l,Object.entries(t.renderAttrs(e,i))),"visually-hidden"===t.style){if(s.push(Object.assign(new i.Token("span_open","span",1),{attrs:[["class",t.visuallyHiddenClass]]}),Object.assign(new i.Token("text","",0),{content:t.assistiveText(a)}),new i.Token("span_close","span",-1)),t.space){var c="string"==typeof t.space?t.space:" ";s[fe[t.placement]](Object.assign(new i.Token("string"==typeof t.space?"html_inline":"text","",0),{content:c}))}s[fe[t.placement]](Object.assign(new i.Token("span_open","span",1),{attrs:[["aria-hidden","true"]]}),Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:ve}),new i.Token("span_close","span",-1))}else s.push(Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:ve}));"aria-label"===t.style?l.push(["aria-label",t.assistiveText(a)]):["aria-describedby","aria-labelledby"].includes(t.style)&&l.push([t.style,e]);var d=[Object.assign(new i.Token("link_open","a",1),{attrs:xe(l)})].concat(s,[new i.Token("link_close","a",-1)]);(o=i.tokens).splice.apply(o,[r+3,0].concat(d)),t.wrapper&&(i.tokens.splice(r,0,Object.assign(new i.Token("html_block","",0),{content:t.wrapper[0]+"\n"})),i.tokens.splice(r+3+d.length+1,0,Object.assign(new i.Token("html_block","",0),{content:t.wrapper[1]+"\n"})))});function Ae(e,t,n,i){var r=e,o=i;if(n&&Object.prototype.hasOwnProperty.call(t,r))throw new Error("User defined `id` attribute `"+e+"` is not unique. Please fix it in your Markdown to continue.");for(;Object.prototype.hasOwnProperty.call(t,r);)r=e+"-"+o,o+=1;return t[r]=!0,r}function Te(e,t){t=Object.assign({},Te.defaults,t),e.core.ruler.push("anchor",function(e){for(var n,i={},r=e.tokens,o=Array.isArray(t.level)?(n=t.level,function(e){return n.includes(e)}):function(e){return function(t){return t>=e}}(t.level),a=0;a<r.length;a++){var s=r[a];if("heading_open"===s.type&&o(Number(s.tag.substr(1)))){var l=t.getTokensText(r[a+1].children),c=s.attrGet("id");c=null==c?Ae(c=t.slugifyWithState?t.slugifyWithState(l,e):t.slugify(l),i,!1,t.uniqueSlugStartIndex):Ae(c,i,!0,t.uniqueSlugStartIndex),s.attrSet("id",c),!1!==t.tabIndex&&s.attrSet("tabindex",""+t.tabIndex),"function"==typeof t.permalink?t.permalink(c,t,e,a):(t.permalink||t.renderPermalink&&t.renderPermalink!==ge)&&t.renderPermalink(c,t,e,a),a=r.indexOf(s),t.callback&&t.callback(s,{slug:c,title:l})}}})}function Me(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-"))}function Oe(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Le(e,t){var n;t=Object.assign({},{placeholder:"(\\$\\{toc\\}|\\[\\[?_?toc_?\\]?\\]|\\$\\<toc(\\{[^}]*\\})\\>)",slugify:Me,uniqueSlugStartIndex:1,containerClass:"table-of-contents",containerId:void 0,listClass:void 0,itemClass:void 0,linkClass:void 0,level:1,listType:"ol",format:void 0,callback:void 0},t);var i=new RegExp("^"+t.placeholder+"$","i");e.renderer.rules.tocOpen=function(e,n){var i=Object.assign({},t);return e&&n>=0&&(i=Object.assign(i,e[n].inlineOptions)),"<nav"+(i.containerId?' id="'+Oe(i.containerId)+'"':"")+' class="'+Oe(i.containerClass)+'">'},e.renderer.rules.tocClose=function(){return"</nav>"},e.renderer.rules.tocBody=function(e,i){var r=Object.assign({},t);e&&i>=0&&(r=Object.assign(r,e[i].inlineOptions));var o,a={},s=Array.isArray(r.level)?(o=r.level,function(e){return o.includes(e)}):function(e){return function(t){return t>=e}}(r.level);return function e(n){var i=r.listClass?' class="'+Oe(r.listClass)+'"':"",o=r.itemClass?' class="'+Oe(r.itemClass)+'"':"",l=r.linkClass?' class="'+Oe(r.linkClass)+'"':"";if(0===n.c.length)return"";var c="";return(0===n.l||s(n.l))&&(c+="<"+(Oe(r.listType)+i)+">"),n.c.forEach(function(n){s(n.l)?c+="<li"+o+"><a"+l+' href="#'+function(e){for(var t=e,n=r.uniqueSlugStartIndex;Object.prototype.hasOwnProperty.call(a,t);)t=e+"-"+n++;return a[t]=!0,t}(t.slugify(n.n))+'">'+("function"==typeof r.format?r.format(n.n,Oe):Oe(n.n))+"</a>"+e(n)+"</li>":c+=e(n)}),(0===n.l||s(n.l))&&(c+="</"+Oe(r.listType)+">"),c}(n)},e.core.ruler.push("generateTocAst",function(i){n=function(e){for(var t={l:0,n:"",c:[]},n=[t],i=0,r=e.length;i<r;i++){var o=e[i];if("heading_open"===o.type){var a=e[i+1].children.filter(function(e){return"text"===e.type||"code_inline"===e.type}).reduce(function(e,t){return e+t.content},""),s={l:parseInt(o.tag.substr(1),10),n:a,c:[]};if(s.l>n[0].l)n[0].c.push(s),n.unshift(s);else if(s.l===n[0].l)n[1].c.push(s),n[0]=s;else{for(;s.l<=n[0].l;)n.shift();n[0].c.push(s),n.unshift(s)}}}return t}(i.tokens),"function"==typeof t.callback&&t.callback(e.renderer.rules.tocOpen()+e.renderer.rules.tocBody()+e.renderer.rules.tocClose(),n)}),e.block.ruler.before("heading","toc",function(e,t,n,r){var o,a=e.src.slice(e.bMarks[t]+e.tShift[t],e.eMarks[t]).split(" ")[0];if(!i.test(a))return!1;if(r)return!0;var s=i.exec(a),l={};if(null!==s&&3===s.length)try{l=JSON.parse(s[2])}catch(e){}return e.line=t+1,(o=e.push("tocOpen","nav",1)).markup="",o.map=[t,e.line],o.inlineOptions=l,(o=e.push("tocBody","",0)).markup="",o.map=[t,e.line],o.inlineOptions=l,o.children=[],(o=e.push("tocClose","nav",-1)).markup="",!0},{alt:["paragraph","reference","blockquote"]})}Object.assign(Ee.defaults,{style:"visually-hidden",space:!0,placement:"after",wrapper:null}),Te.permalink={__proto__:null,legacy:ge,renderHref:we,renderAttrs:be,makePermalink:ke,linkInsideHeader:Se,ariaHidden:_e,headerLink:Ce,linkAfterHeader:Ee},Te.defaults={level:1,slugify:function(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-"))},uniqueSlugStartIndex:1,tabIndex:"-1",getTokensText:function(e){return e.filter(function(e){return["text","code_inline"].includes(e.type)}).map(function(e){return e.content}).join("")},permalink:!1,renderPermalink:ge,permalinkClass:_e.defaults.class,permalinkSpace:_e.defaults.space,permalinkSymbol:"¶",permalinkBefore:"before"===_e.defaults.placement,permalinkHref:_e.defaults.renderHref,permalinkAttrs:_e.defaults.renderAttrs},Te.default=Te;var Pe={exports:{}};function Ie(e,t){t=t?Array.isArray(t)?t:[t]:[],Object.freeze(t);var n=e.renderer.rules.link_open||this.defaultRender;e.renderer.rules.link_open=function(e,i,r,o,a){var s=function(e,t){var n,i,r=e.attrs[e.attrIndex("href")][1];for(n=0;n<t.length;++n){if("function"!=typeof(i=t[n]).matcher)return i;if(i.matcher(r,i))return i}}(e[i],t),l=s&&s.attrs;return l&&function(e,t,n){Object.keys(n).forEach(function(i){var r,o=n[i];"className"===i&&(i="class"),(r=t[e].attrIndex(i))<0?t[e].attrPush([i,o]):t[e].attrs[r][1]=o})}(i,e,l),n(e,i,r,o,a)}}Ie.defaultRender=function(e,t,n,i,r){return r.renderToken(e,t,n)},Pe.exports=Ie;var $e=(null==Pe.exports?{}:Pe.exports).default||Pe.exports,ze={exports:{}},je=ze.exports,Ne="__lodash_hash_undefined__",De=9007199254740991,Re="[object Arguments]",He="[object Boolean]",Be="[object Date]",Fe="[object Function]",qe="[object GeneratorFunction]",We="[object Map]",Ye="[object Number]",Xe="[object Object]",Ue="[object Promise]",Ve="[object RegExp]",Ze="[object Set]",Ge="[object String]",Ke="[object Symbol]",Je="[object WeakMap]",Qe="[object ArrayBuffer]",et="[object DataView]",tt="[object Float32Array]",nt="[object Float64Array]",it="[object Int8Array]",rt="[object Int16Array]",ot="[object Int32Array]",at="[object Uint8Array]",st="[object Uint8ClampedArray]",lt="[object Uint16Array]",ct="[object Uint32Array]",dt=/\w*$/,ut=/^\[object .+?Constructor\]$/,ht=/^(?:0|[1-9]\d*)$/,pt={};pt[Re]=pt["[object Array]"]=pt[Qe]=pt[et]=pt[He]=pt[Be]=pt[tt]=pt[nt]=pt[it]=pt[rt]=pt[ot]=pt[We]=pt[Ye]=pt[Xe]=pt[Ve]=pt[Ze]=pt[Ge]=pt[Ke]=pt[at]=pt[st]=pt[lt]=pt[ct]=!0,pt["[object Error]"]=pt[Fe]=pt[Je]=!1;var mt="object"==typeof global&&global&&global.Object===Object&&global||"object"==typeof self&&self&&self.Object===Object&&self||Function("return this")(),ft="object"==typeof je&&je&&!je.nodeType&&je,vt=ft&&"object"==typeof ze&&ze&&!ze.nodeType&&ze,gt=vt&&vt.exports===ft;function wt(e,t){return e.set(t[0],t[1]),e}function bt(e,t){return e.add(t),e}function yt(e,t,n,i){var r=-1,o=e?e.length:0;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function kt(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(fr){}return t}function xt(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}function St(e,t){return function(n){return e(t(n))}}function _t(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Ct,Et=Array.prototype,At=Function.prototype,Tt=Object.prototype,Mt=mt["__core-js_shared__"],Ot=(Ct=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||""))?"Symbol(src)_1."+Ct:"",Lt=At.toString,Pt=Tt.hasOwnProperty,It=Tt.toString,$t=RegExp("^"+Lt.call(Pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zt=gt?mt.Buffer:void 0,jt=mt.Symbol,Nt=mt.Uint8Array,Dt=St(Object.getPrototypeOf,Object),Rt=Object.create,Ht=Tt.propertyIsEnumerable,Bt=Et.splice,Ft=Object.getOwnPropertySymbols,qt=zt?zt.isBuffer:void 0,Wt=St(Object.keys,Object),Yt=fn(mt,"DataView"),Xt=fn(mt,"Map"),Ut=fn(mt,"Promise"),Vt=fn(mt,"Set"),Zt=fn(mt,"WeakMap"),Gt=fn(Object,"create"),Kt=yn(Yt),Jt=yn(Xt),Qt=yn(Ut),en=yn(Vt),tn=yn(Zt),nn=jt?jt.prototype:void 0,rn=nn?nn.valueOf:void 0;function on(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function an(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function sn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function ln(e){this.__data__=new an(e)}function cn(e,t,n){var i=e[t];Pt.call(e,t)&&kn(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function dn(e,t){for(var n=e.length;n--;)if(kn(e[n][0],t))return n;return-1}function un(e,t,n,i,r,o,a){var s;if(i&&(s=o?i(e,r,o,a):i(e)),void 0!==s)return s;if(!En(e))return e;var l=xn(e);if(l){if(s=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Pt.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}(e,s)}else{var c=gn(e),d=c==Fe||c==qe;if(_n(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(c==Xe||c==Re||d&&!o){if(kt(e))return o?e:{};if(s=function(e){return"function"!=typeof e.constructor||bn(e)?{}:En(t=Dt(e))?Rt(t):{};var t}(d?{}:e),!t)return function(e,t){return pn(e,vn(e),t)}(e,function(e,t){return e&&pn(t,An(t),e)}(s,e))}else{if(!pt[c])return o?e:{};s=function(e,t,n,i){var r,o=e.constructor;switch(t){case Qe:return hn(e);case He:case Be:return new o(+e);case et:return function(e,t){var n=t?hn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case tt:case nt:case it:case rt:case ot:case at:case st:case lt:case ct:return function(e,t){var n=t?hn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case We:return function(e,t,n){return yt(t?n(xt(e),!0):xt(e),wt,new e.constructor)}(e,i,n);case Ye:case Ge:return new o(e);case Ve:return function(e){var t=new e.constructor(e.source,dt.exec(e));return t.lastIndex=e.lastIndex,t}(e);case Ze:return function(e,t,n){return yt(t?n(_t(e),!0):_t(e),bt,new e.constructor)}(e,i,n);case Ke:return r=e,rn?Object(rn.call(r)):{}}}(e,c,un,t)}}a||(a=new ln);var u=a.get(e);if(u)return u;if(a.set(e,s),!l)var h=n?function(e){return function(e,t,n){var i=An(e);return xn(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,0,vn)}(e):An(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n););}(h||e,function(r,o){h&&(r=e[o=r]),cn(s,o,un(r,t,n,i,o,e,a))}),s}function hn(e){var t=new e.constructor(e.byteLength);return new Nt(t).set(new Nt(e)),t}function pn(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):void 0;cn(n,a,void 0===s?e[a]:s)}return n}function mn(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function fn(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!En(e)||(t=e,Ot&&Ot in t))&&(Cn(e)||kt(e)?$t:ut).test(yn(e));var t}(n)?n:void 0}on.prototype.clear=function(){this.__data__=Gt?Gt(null):{}},on.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},on.prototype.get=function(e){var t=this.__data__;if(Gt){var n=t[e];return n===Ne?void 0:n}return Pt.call(t,e)?t[e]:void 0},on.prototype.has=function(e){var t=this.__data__;return Gt?void 0!==t[e]:Pt.call(t,e)},on.prototype.set=function(e,t){return this.__data__[e]=Gt&&void 0===t?Ne:t,this},an.prototype.clear=function(){this.__data__=[]},an.prototype.delete=function(e){var t=this.__data__,n=dn(t,e);return!(n<0||(n==t.length-1?t.pop():Bt.call(t,n,1),0))},an.prototype.get=function(e){var t=this.__data__,n=dn(t,e);return n<0?void 0:t[n][1]},an.prototype.has=function(e){return dn(this.__data__,e)>-1},an.prototype.set=function(e,t){var n=this.__data__,i=dn(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},sn.prototype.clear=function(){this.__data__={hash:new on,map:new(Xt||an),string:new on}},sn.prototype.delete=function(e){return mn(this,e).delete(e)},sn.prototype.get=function(e){return mn(this,e).get(e)},sn.prototype.has=function(e){return mn(this,e).has(e)},sn.prototype.set=function(e,t){return mn(this,e).set(e,t),this},ln.prototype.clear=function(){this.__data__=new an},ln.prototype.delete=function(e){return this.__data__.delete(e)},ln.prototype.get=function(e){return this.__data__.get(e)},ln.prototype.has=function(e){return this.__data__.has(e)},ln.prototype.set=function(e,t){var n=this.__data__;if(n instanceof an){var i=n.__data__;if(!Xt||i.length<199)return i.push([e,t]),this;n=this.__data__=new sn(i)}return n.set(e,t),this};var vn=Ft?St(Ft,Object):function(){return[]},gn=function(e){return It.call(e)};function wn(e,t){return!!(t=null==t?De:t)&&("number"==typeof e||ht.test(e))&&e>-1&&e%1==0&&e<t}function bn(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Tt)}function yn(e){if(null!=e){try{return Lt.call(e)}catch(fr){}try{return e+""}catch(fr){}}return""}function kn(e,t){return e===t||e!=e&&t!=t}(Yt&&gn(new Yt(/* @__PURE__ */new ArrayBuffer(1)))!=et||Xt&&gn(new Xt)!=We||Ut&&gn(Ut.resolve())!=Ue||Vt&&gn(new Vt)!=Ze||Zt&&gn(new Zt)!=Je)&&(gn=function(e){var t=It.call(e),n=t==Xe?e.constructor:void 0,i=n?yn(n):void 0;if(i)switch(i){case Kt:return et;case Jt:return We;case Qt:return Ue;case en:return Ze;case tn:return Je}return t});var xn=Array.isArray;function Sn(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=De}(e.length)&&!Cn(e)}var _n=qt||function(){return!1};function Cn(e){var t=En(e)?It.call(e):"";return t==Fe||t==qe}function En(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function An(e){return Sn(e)?function(e){var t=xn(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Sn(e)}(e)&&Pt.call(e,"callee")&&(!Ht.call(e,"callee")||It.call(e)==Re)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],n=t.length,i=!!n;for(var r in e)!Pt.call(e,r)||i&&("length"==r||wn(r,n))||t.push(r);return t}(e):function(e){if(!bn(e))return Wt(e);var t=[];for(var n in Object(e))Pt.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}ze.exports=function(e){return un(e,!0,!0)};var Tn=(null==ze.exports?{}:ze.exports).default||ze.exports,Mn=(String.raw`\$&`,e=>e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")),On="@tab",Ln=`${On}:active`,Pn=Ln.length,In=Symbol("tab:name"),$n=Symbol("tab:level"),zn=(e,t,n)=>{if(64!==e.src.charCodeAt(t))return!1;let i=1;for(;i<Pn&&Ln.charCodeAt(i)===e.src.charCodeAt(t+i);i++);let r=i===Pn;if(!r&&4!==i)return!1;let o=t+i,a=e.skipSpaces(o);return a>o&&a<n&&{isActive:r,pos:a}},jn=(e,t)=>{let{name:n="tabs",openRenderer:i=t=>{let{active:i,data:r,id:o}=t,a=r.map(({title:t,id:r},o)=>`<button type="button" class="${n}-tab-button${i===o?" active":""}" data-tab="${o}"${r?` data-id="${Mn(r)}"`:""}${i===o?" data-active":""}>${e.renderInline(t)}</button>`);return`<div class="${n}-tabs-wrapper"${o?` data-id="${e.utils.escapeHtml(o)}"`:""}>\n <div class="${n}-tabs-header">\n ${a.join("\n ")}\n </div>\n <div class="${n}-tabs-container">\n`},closeRenderer:r=()=>" </div>\n</div>\n",tabOpenRenderer:o=t=>{let{index:i,id:r,isActive:o}=t;return`<div class="${n}-tab-content${o?" active":""}" data-index="${i}"${r?` data-id="${e.utils.escapeHtml(r)}"`:""}${o?' data-active=""':""}>\n`},tabCloseRenderer:a=()=>"</div>\n"}=t??{},s=(e=>t=>{let n=t.tokens;for(let i=0;i<n.length;i++){let t=n[i];if(t.type!==`${e}_tabs_open`)continue;let r=[],o=-1,a=!1,s=0,{level:l}=t;for(let d=i+1;d<n.length;d++){let t=n[d],i=t.meta,c=t.type;if(c!==`${e}_tabs_open`)if(c!==`${e}_tabs_close`)t.level>l+1||s>0?a||(t.type=`${e}_tabs_empty`,t.hidden=!0):c!==`${e}_tab_open`?c!==`${e}_tab_close`&&(t.type=`${e}_tabs_empty`,t.hidden=!0):(a=!0,i.index=r.length,i.active&&(-1===o?o=r.length:i.active=!1),r.push({title:t.info,index:r.length,id:i.id,isActive:i.active}));else{if(t.level===l)break;s--}else s++}let c=t.meta;c.tabsData={active:o,data:r,id:c.id}}})(n);e.block.ruler.before("fence",`${n}_tabs`,(e=>(t,n,i,r)=>{let o=t.bMarks[n]+t.tShift[n];if(58!==t.src.charCodeAt(o))return!1;let a=t.eMarks[n],s=o+1;for(;s<=a&&58===t.src.charCodeAt(s);)s++;let l=s-o;if(l<3)return!1;s=t.skipSpaces(s);for(let S=0;S<e.length;S++){if(t.src.charCodeAt(s)!==e.charCodeAt(S))return!1;s++}let c,d=0;for(;s!==a;){if(c=t.src.charCodeAt(s++),35===c){d=s;break}if(!t.md.utils.isSpace(c))return!1}if(r)return!0;let u=t.sCount[n],h=n+1,p=!1;for(;h<i;h++){let e=t.bMarks[h]+t.tShift[h],n=t.eMarks[h];if(e<n&&t.sCount[h]<u)break;if(t.sCount[h]===u&&58===t.src.charCodeAt(e)){for(s=e+1;s<=n&&58===t.src.charCodeAt(s);s++);if(s-e>=l&&(s=t.skipSpaces(s),s>=n)){p=!0;break}}}let m=t.parentType,f=t.lineMax,v=t.blkIndent,g=t.env[In],w=t.env[$n];t.parentType=`${e}_tabs`,t.lineMax=h-+!!p,t.blkIndent=u;let b=":".repeat(l),y="";if(d){d=t.skipSpaces(d);let e=t.skipSpacesBack(a,d);d<e&&(y=t.src.slice(d,e))}let k=t.push(`${e}_tabs_open`,"",1);k.markup=b,k.block=!0,k.info=e,k.meta=y?{id:y}:{},k.map=[n,h-+!!p],t.env[In]=e,t.env[$n]=t.level,t.md.block.tokenize(t,n+1,h-+!!p),t.env[In]=g,t.env[$n]=w;let x=t.push(`${e}_tabs_close`,"",-1);return x.markup=b,x.block=!0,t.parentType=m,t.lineMax=f,t.blkIndent=v,t.line=h+ +!!p,!0})(n),{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph",`${n}_tab`,(e=>(t,n,i,r)=>{if(t.env[In]!==e||t.level!==t.env[$n])return!1;let o=t.bMarks[n]+t.tShift[n],a=t.eMarks[n],s=zn(t,o,a);if(!1===s)return!1;if(r)return!0;let l=t.sCount[n],c=n+1,d=!1;for(;c<i;c++){let e=t.bMarks[c]+t.tShift[c];if(t.sCount[c]===l&&"@"===t.src[e]&&zn(t,e,t.eMarks[c])){d=!0;break}}let u=t.parentType,h=t.lineMax,p=t.blkIndent;t.parentType="tab",t.lineMax=c-+!!d,t.blkIndent=l;let m,f=t.push(`${e}_tab_open`,"",1),v=s.pos,g=t.skipSpacesBack(a,v),w=g;for(;w>v;){if(35===t.src.charCodeAt(w)){for(m=w-1;92===t.src.charCodeAt(m);)m--;if((w-m)%2==1)break}w--}let b,y="";w===v?b=t.src.slice(v,g):(y=t.src.slice(t.skipSpaces(w+1),g),b=t.src.slice(v,t.skipSpacesBack(w,v))),f.block=!0,f.markup=On,f.info=b,f.meta={active:s.isActive},y&&(f.meta.id=y),f.map=[n,c-+!!d],t.md.block.tokenize(t,n+1,c+ +!d);let k=t.push(`${e}_tab_close`,"",-1);return k.block=!0,k.markup="",t.parentType=u,t.lineMax=h,t.blkIndent=p,t.line=c+ +!d,!0})(n),{alt:["paragraph","reference","blockquote","list"]}),e.core.ruler.push(`${n}_tabs_core`,s),e.renderer.rules[`${n}_tabs_open`]=(e,t,n,r,o)=>{let a=e[t].meta;return i(a.tabsData??{active:-1,data:[],id:a.id},e,t,n,r,o)},e.renderer.rules[`${n}_tabs_close`]=r,e.renderer.rules[`${n}_tab_open`]=(e,t,n,i,r)=>{let a=((e,t)=>{let n=e[t],i=n.meta;return{title:n.info,index:i.index,id:i.id,isActive:i.active}})(e,t);return o(a,e,t,n,i,r)},e.renderer.rules[`${n}_tab_close`]=a},Nn={note:'<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>',tip:'<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>',important:'<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',warning:'<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',caution:'<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'},Dn=(e,t={})=>{const{markers:n=["TIP","NOTE","IMPORTANT","WARNING","CAUTION"],icons:i=Nn,matchCaseSensitive:r=!1,titles:o={},classPrefix:a="markdown-alert"}=t,s="*"===n?"\\w+":n.join("|"),l=new RegExp(`^\\\\?\\[\\!(${s})\\]([^\\n\\r]*)`,r?"":"i");e.core.ruler.after("block","github-alerts",e=>{const t=e.tokens;for(let n=0;n<t.length;n++)if("blockquote_open"===t[n].type){const e=t[n],r=n;for(;"blockquote_close"!==t[n]?.type&&n<=t.length;)n+=1;const a=t[n],s=t.slice(r,n+1).find(e=>"inline"===e.type);if(!s)continue;const c=s.content.match(l);if(!c)continue;const d=c[1].toLowerCase(),u=c[2].trim()||(o[d]??Rn(d)),h=i[d]??"";s.content=s.content.slice(c[0].length).trimStart(),e.type="alert_open",e.tag="div",e.meta={title:u,type:d,icon:h},a.type="alert_close",a.tag="div"}}),e.renderer.rules.alert_open=function(e,t){const{title:n,type:i,icon:r}=e[t].meta;return`<div class="${a} ${a}-${i}"><p class="${a}-title">${r}${n}</p>`}};function Rn(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Hn={exports:{}},Bn=!0,Fn=!1,qn=!1;function Wn(e,t,n){var i=e.attrIndex(t),r=[t,n];i<0?e.attrPush(r):e.attrs[i]=r}function Yn(e,t){for(var n=e[t].level-1,i=t-1;i>=0;i--)if(e[i].level===n)return i;return-1}function Xn(e,t){return"inline"===e[t].type&&"paragraph_open"===e[t-1].type&&"list_item_open"===e[t-2].type&&function(e){return 0===e.content.indexOf("[ ] ")||0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] ")}(e[t])}function Un(e,t){if(e.children.unshift(function(e,t){var n=new t("html_inline","",0),i=Bn?' disabled="" ':"";return 0===e.content.indexOf("[ ] ")?n.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':0!==e.content.indexOf("[x] ")&&0!==e.content.indexOf("[X] ")||(n.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">'),n}(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),Fn)if(qn){e.children.pop();var n="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(function(e,t,n){var i=new n("html_inline","",0);return i.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",i.attrs=[{for:t}],i}(e.content,n,t))}else e.children.unshift(function(e){var t=new e("html_inline","",0);return t.content="<label>",t}(t)),e.children.push(function(e){var t=new e("html_inline","",0);return t.content="</label>",t}(t))}Hn.exports=function(e,t){t&&(Bn=!t.enabled,Fn=!!t.label,qn=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(e){for(var t=e.tokens,n=2;n<t.length;n++)Xn(t,n)&&(Un(t[n],e.Token),Wn(t[n-2],"class","task-list-item"+(Bn?"":" enabled")),Wn(t[Yn(t,n-2)],"class","contains-task-list"))})};var Vn=(null==Hn.exports?{}:Hn.exports).default||Hn.exports,Zn={note:"注",tip:"提示",important:"重要",warning:"注意",caution:"警告"},Gn={note:'<i class="iconfont icon-note"></i>',tip:'<i class="iconfont icon-tip"></i>',important:'<i class="iconfont icon-important"></i>',warning:'<i class="iconfont icon-warning"></i>',caution:'<i class="iconfont icon-caution"></i>'};function Kn(e){return e.replace(/[\u{1F000}-\u{1FFFF}\u{200D}\u{FE0F}\u{2600}-\u{27BF}\u{2300}-\u{23FF}\u{2700}-\u{27BF}]/gu,"").trim()}var Jn="markdown-tabs",Qn=null,ei=null,ti="0.18.1",ni=`https://registry.npmmirror.com/katex/${ti}/files/dist/katex.min.css`,ii=`https://registry.npmmirror.com/katex/${ti}/files/dist/katex.min.js`,ri=null;function oi(e,t={}){const n={throwOnError:!1,errorColor:"#cc0000",...t};function i(e,t){try{return function(){if(!window.katex)throw new Error("[katex-loader] KaTeX not loaded. Call ensureKatexLoaded() first.");return window.katex}().renderToString(e,{...n,displayMode:t})}catch(fr){const i=fr instanceof Error?fr.message:String(fr);return`<span style="color:${n.errorColor}" title="${r(i)}">${r(e)}</span>`}}function r(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}"undefined"==typeof window||window.katex,e.inline.ruler.before("emphasis","katex_inline",(e,t)=>{if(36!==e.src.charCodeAt(e.pos))return!1;if(36===e.src.charCodeAt(e.pos+1))return!1;if(e.pos>0&&92===e.src.charCodeAt(e.pos-1))return!1;const n=e.pos+1;if(n>=e.posMax)return!1;if(/\s/.test(e.src[n]))return!1;let i=n;for(;i<e.posMax&&(36!==e.src.charCodeAt(i)||92===e.src.charCodeAt(i-1));)i++;if(i>=e.posMax)return!1;if(i===n)return!1;if(/\s/.test(e.src[i-1]))return!1;if(!t){const t=e.push("katex_inline","math",0);t.markup="$",t.content=e.src.slice(n,i)}return e.pos=i+1,!0}),e.block.ruler.after("blockquote","katex_block",(e,t,n,i)=>{const r=e.bMarks[t]+e.tShift[t];if(r+2>e.eMarks[t]||"$$"!==e.src.slice(r,r+2))return!1;if(i)return!0;let o=t+1,a=!1;for(;o<n;){const t=e.bMarks[o]+e.tShift[o];if("$$"===e.src.slice(t,e.eMarks[o]).trim()){a=!0;break}o++}const s=e.bMarks[t+1],l=a?e.bMarks[o]:e.eMarks[n-1];e.line=o+(a?1:0);const c=e.push("katex_block","math",0);return c.block=!0,c.markup="$$",c.content=e.src.slice(s,l).trim(),c.map=[t,e.line],!0}),e.renderer.rules.katex_inline=(e,t)=>i(e[t].content,!1),e.renderer.rules.katex_block=(e,t)=>`<div class="katex-block">${i(e[t].content,!0)}</div>\n`}function ai(e){return"string"!=typeof e?"":e.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"").replace(/-+/g,"-")}function si(e){return e?e.map(e=>({href:ai(e.n.trim()),title:e.n.trim(),children:si(e.c||[]),nodeName:`H${e.l}`,nodeTitle:`<h${e.l}>${e.n.trim()}</h${e.l}>`})):[]}async function li(e,t){await function(e=15e3){return ri||("undefined"==typeof document||"undefined"==typeof window?Promise.reject(/* @__PURE__ */new Error("[katex-loader] Requires a browser environment.")):window.katex?Promise.resolve():ri=new Promise((t,n)=>{const i=setTimeout(()=>{ri=null,n(/* @__PURE__ */new Error(`[katex-loader] KaTeX CDN timeout after ${e}ms.`))},e);if(!document.querySelector(`link[href="${ni}"]`)){const e=document.createElement("link");e.rel="stylesheet",e.href=ni,document.head.appendChild(e)}const r=document.createElement("script");r.src=ii,r.onload=()=>{clearTimeout(i),t()},r.onerror=()=>{clearTimeout(i),ri=null,r.remove(),n(/* @__PURE__ */new Error(`[katex-loader] Failed to load ${ii}`))},document.head.appendChild(r)}))}();let n=[];const i=new N({langPrefix:"language-",html:!0,highlight:function(e,t){if(t&&D.getLanguage(t))try{return D.highlight(e,{language:t}).value}catch(Mr){}return""}}).use(jn,{name:Jn}).use(Te,{permalink:!0,permalinkBefore:!1,permalinkSymbol:"#",slugify:ai}).use(Le,{callback:(e,t)=>{!n.length&&t.c&&(n=t.c)}}).use($e,{matcher:e=>e.match(/^https?:\/\//),attrs:{target:"_blank",rel:"noopener"}}).use(Dn,{titles:Zn,icons:Gn}).use(oi,{strict:!1,throwOnError:!1}).use(Vn);t&&t.forEach(e=>i.use(e));const r=i.render(e).replace(/class="markdown-alert markdown-alert-(\w+)"[\s\S]*?class="markdown-alert-title"[^>]*>([\s\S]*?)<\/p>/g,(e,t,n)=>{const i=Zn[t];if(!i)return e;const r=Kn(n.replace(/<[^>]*>/g,""));if(r.toLowerCase()===t.toLowerCase()){const t=n.lastIndexOf(">");if(-1!==t){const o=n.substring(0,t+1)+Kn(n.substring(t+1)).replace(r,i);return e.replace(n,o)}}return e});return setTimeout(()=>{requestAnimationFrame(()=>(document.querySelectorAll(`.${Jn}-tabs-wrapper`).forEach(e=>{const t=e.querySelector(`.${Jn}-tabs-header`),n=e.querySelector(`.${Jn}-tabs-container`);if(!t||!n)return;if(t.dataset.clickInited)return;t.dataset.clickInited="true";const i=n.querySelectorAll(`.${Jn}-tab-content`),r=document.querySelector(".markdown");t.addEventListener("click",e=>{const n=e.target.closest(`.${Jn}-tab-button`);if(!n||!t.contains(n))return;const o=t.querySelectorAll(`.${Jn}-tab-button`),a=Array.from(o).indexOf(n);o.forEach(e=>e.classList.remove("active")),i.forEach(e=>e.classList.remove("active")),n.classList.add("active"),i[a]&&i[a].classList.add("active");const s=n.offsetParent;s&&r?.scrollTop&&s.offsetTop&&r?.scrollTop>s.offsetTop&&r?.scrollTo({top:s.offsetTop,behavior:"smooth"})})}),function(){const e=document.querySelector(".markdown");e&&!e.dataset.scrollListenInited&&(e.dataset.scrollListenInited="true",e?.addEventListener("wheel",e=>{const t=e,n=e.target?.closest(`.${Jn}-tabs-header`);n&&0!==Math.abs(t.deltaY)&&n.scrollWidth>n.clientWidth&&(e.preventDefault(),n.scrollLeft+=t.deltaY)},{passive:!1}))}(),void function(){const e=document.querySelector(".markdown");function t(e){if(e.dataset.maskInited)return;e.parentElement.dataset.maskInited="true";const t=()=>{const{scrollLeft:t,scrollWidth:n,clientWidth:i}=e,r=t>1,o=t+i<n-1;e.parentElement.classList.remove("has-left-mask","has-right-mask","has-both-masks"),r&&o?e.parentElement.classList.add("has-both-masks"):r?e.parentElement.classList.add("has-left-mask"):o&&e.parentElement.classList.add("has-right-mask")};e.addEventListener("scroll",t),t()}document.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>t(e)),Qn&&(Qn.disconnect(),Qn=null),Qn=new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(1!==e.nodeType)return;const n=e;n.classList.contains("markdown-tabs-tabs-header")&&t(n),n.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>t(e))})})}),e&&Qn.observe(e,{childList:!0,subtree:!0}),ei&&window.removeEventListener("resize",ei),ei=()=>{document.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>{e.dispatchEvent(new Event("scroll"))})},window.addEventListener("resize",ei)}()))},0),{anchor:si(Tn(n)),info:r}}function ci(e){e&&"object"==typeof e&&Object.entries(e).forEach(([e,t])=>{D.getLanguage(e)||D.registerLanguage(e,t)})}var di={exports:{}},ui=di.exports;!function(e,t){"object"==typeof ui&&void 0!==di?di.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Viewer=t()}(void 0,function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function t(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function i(e){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?n(Object(r),!0).forEach(function(n){t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function r(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function o(e){return o="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},o(e)}var a={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},s="undefined"!=typeof window&&void 0!==window.document,l=s?window:{},c=!(!s||!l.document.documentElement)&&"ontouchstart"in l.document.documentElement,d=!!s&&"PointerEvent"in l,u="viewer",h="move",p="switch",m="zoom",f="".concat(u,"-active"),v="".concat(u,"-close"),g="".concat(u,"-fade"),w="".concat(u,"-fixed"),b="".concat(u,"-fullscreen"),y="".concat(u,"-fullscreen-exit"),k="".concat(u,"-hide"),x="".concat(u,"-hide-md-down"),S="".concat(u,"-hide-sm-down"),_="".concat(u,"-hide-xs-down"),C="".concat(u,"-in"),E="".concat(u,"-invisible"),A="".concat(u,"-loading"),T="".concat(u,"-move"),M="".concat(u,"-open"),O="".concat(u,"-show"),L="".concat(u,"-transition"),P="click",I="dblclick",$="dragstart",z="focusin",j="keydown",N="load",D="error",R=d?"pointerdown":c?"touchstart":"mousedown",H=d?"pointermove":c?"touchmove":"mousemove",B=d?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",F="resize",q="transitionend",W="wheel",Y="ready",X="show",U="shown",V="hide",Z="hidden",G="view",K="viewed",J="move",Q="moved",ee="rotate",te="rotated",ne="scale",ie="scaled",re="zoom",oe="zoomed",ae="play",se="stop",le="".concat(u,"Action"),ce=/\s+/,de=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function ue(e){return"string"==typeof e}var he=Number.isNaN||l.isNaN;function pe(e){return"number"==typeof e&&!he(e)}function me(e){return void 0===e}function fe(e){return"object"===o(e)&&null!==e}var ve=Object.prototype.hasOwnProperty;function ge(e){if(!fe(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&ve.call(n,"isPrototypeOf")}catch(i){return!1}}function we(e){return"function"==typeof e}function be(e,t){if(e&&we(t))if(Array.isArray(e)||pe(e.length)){var n,i=e.length;for(n=0;n<i&&!1!==t.call(e,e[n],n,e);n+=1);}else fe(e)&&Object.keys(e).forEach(function(n){t.call(e,e[n],n,e)});return e}var ye=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return fe(e)&&n.length>0&&n.forEach(function(t){fe(t)&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e},ke=/^(?:width|height|left|top|marginLeft|marginTop)$/;function xe(e,t){var n=e.style;be(t,function(e,t){ke.test(t)&&pe(e)&&(e+="px"),n[t]=e})}function Se(e,t){return!(!e||!t)&&(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)}function _e(e,t){if(e&&t)if(pe(e.length))be(e,function(e){_e(e,t)});else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function Ce(e,t){if(e&&t)if(pe(e.length))be(e,function(e){Ce(e,t)});else if(e.classList)e.classList.remove(t);else{var n=e.className;n&&n.indexOf(t)>=0&&(e.className=n.split(ce).filter(function(e){return e&&e!==t}).join(" "))}}function Ee(e,t,n){t&&(pe(e.length)?be(e,function(e){Ee(e,t,n)}):n?_e(e,t):Ce(e,t))}var Ae=/([a-z\d])([A-Z])/g;function Te(e){return e.replace(Ae,"$1-$2").toLowerCase()}function Me(e,t){return fe(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Te(t)))}function Oe(e,t,n){fe(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(Te(t)),n)}var Le=function(){var e=!1;if(s){var t=!1,n=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});l.addEventListener("test",n,i),l.removeEventListener("test",n,i)}return e}();function Pe(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;t.trim().split(ce).forEach(function(t){if(!Le){var o=e.listeners;o&&o[t]&&o[t][n]&&(r=o[t][n],delete o[t][n],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,r,i)})}function Ie(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;t.trim().split(ce).forEach(function(t){if(i.once&&!Le){var o=e.listeners,a=void 0===o?{}:o;r=function(){delete a[t][n],e.removeEventListener(t,r,i);for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.apply(e,s)},a[t]||(a[t]={}),a[t][n]&&e.removeEventListener(t,a[t][n],i),a[t][n]=r,e.listeners=a}e.addEventListener(t,r,i)})}function $e(e,t,n,r){var o;return we(Event)&&we(CustomEvent)?o=new CustomEvent(t,i({bubbles:!0,cancelable:!0,detail:n},r)):(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(o)}function ze(e){var t=e.rotate,n=e.scaleX,i=e.scaleY,r=e.translateX,o=e.translateY,a=[];pe(r)&&0!==r&&a.push("translateX(".concat(r,"px)")),pe(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),pe(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),pe(n)&&1!==n&&a.push("scaleX(".concat(n,")")),pe(i)&&1!==i&&a.push("scaleY(".concat(i,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}var je=l.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(l.navigator.userAgent);function Ne(e,t,n){var i=document.createElement("img");if(e.naturalWidth&&!je)return n(e.naturalWidth,e.naturalHeight),i;var r=document.body||document.documentElement;return i.onload=function(){n(i.width,i.height),je||r.removeChild(i)},be(t.inheritedAttributes,function(t){var n=e.getAttribute(t);null!==n&&i.setAttribute(t,n)}),i.src=e.src,je||(i.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(i)),i}function De(e){switch(e){case 2:return _;case 3:return S;case 4:return x;default:return""}}function Re(e,t){var n=e.pageX,r=e.pageY,o={endX:n,endY:r};return t?o:i({timeStamp:Date.now(),startX:n,startY:r},o)}var He,Be={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var e=this.element.ownerDocument,t=e.body||e.documentElement;this.body=t,this.scrollbarWidth=window.innerWidth-e.documentElement.clientWidth,this.initialBodyPaddingRight=t.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(t).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var e,t=this.options,n=this.parent;t.inline&&(e={width:Math.max(n.offsetWidth,t.minWidth),height:Math.max(n.offsetHeight,t.minHeight)},this.parentData=e),!this.fulled&&e||(e=this.containerData),this.viewerData=ye({},e)},renderViewer:function(){this.options.inline&&!this.fulled&&xe(this.viewer,this.viewerData)},initList:function(){var e=this,t=this.element,n=this.options,i=this.list,r=[];i.innerHTML="",be(this.images,function(t,o){var a=t.src,s=t.alt||function(e){return ue(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}(a),l=e.getImageURL(t);if(a||l){var c=document.createElement("li"),d=document.createElement("img");be(n.inheritedAttributes,function(e){var n=t.getAttribute(e);null!==n&&d.setAttribute(e,n)}),n.navbar&&(d.src=a||l),d.alt=s,d.setAttribute("data-original-url",l||a),c.setAttribute("data-index",o),c.setAttribute("data-viewer-action","view"),c.setAttribute("role","button"),n.keyboard&&c.setAttribute("tabindex",0),c.appendChild(d),i.appendChild(c),r.push(c)}}),this.items=r,be(r,function(t){var i,r,o=t.firstElementChild;Oe(o,"filled",!0),n.loading&&_e(t,A),Ie(o,N,i=function(i){Pe(o,D,r),n.loading&&Ce(t,A),e.loadImage(i)},{once:!0}),Ie(o,D,r=function(){Pe(o,N,i),n.loading&&Ce(t,A)},{once:!0})}),n.transition&&Ie(t,K,function(){_e(i,L)},{once:!0})},renderList:function(){var e=this.index,t=this.items[e];if(t){var n=t.nextElementSibling,i=parseInt(window.getComputedStyle(n||t).marginLeft,10),r=t.offsetWidth,o=r+i;xe(this.list,ye({width:o*this.length-i},ze({translateX:(this.viewerData.width-r)/2-o*e})))}},resetList:function(){var e=this.list;e.innerHTML="",Ce(e,L),xe(e,ye({width:0},ze({translateX:0})))},initImage:function(e){var t,n=this,i=this.options,r=this.image,o=this.viewerData,a=this.footer.offsetHeight,s=o.width,l=Math.max(o.height-a,a),c=this.imageData||{};this.imageInitializing={abort:function(){t.onload=null}},t=Ne(r,i,function(t,r){var o=t/r,a=Math.max(0,Math.min(1,i.initialCoverage)),d=s,u=l;n.imageInitializing=!1,l*o>s?u=s/o:d=l*o,a=pe(a)?a:.9,d=Math.min(d*a,t),u=Math.min(u*a,r);var h=(s-d)/2,p=(l-u)/2,m={left:h,top:p,x:h,y:p,width:d,height:u,oldRatio:1,ratio:d/t,aspectRatio:o,naturalWidth:t,naturalHeight:r},f=ye({},m);i.rotatable&&(m.rotate=c.rotate||0,f.rotate=0),i.scalable&&(m.scaleX=c.scaleX||1,m.scaleY=c.scaleY||1,f.scaleX=1,f.scaleY=1),n.imageData=m,n.initialImageData=f,e&&e()})},renderImage:function(e){var t=this,n=this.image,i=this.imageData;if(xe(n,ye({width:i.width,height:i.height,marginLeft:i.x,marginTop:i.y},ze(i))),e)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&Se(n,L)){var r=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){Pe(n,q,r)}},Ie(n,q,r,{once:!0})}else e()},resetImage:function(){var e=this.image;e&&(this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null,this.title.innerHTML="")}},Fe={bind:function(){var e=this.options,t=this.viewer,n=this.canvas,i=this.element.ownerDocument;Ie(t,P,this.onClick=this.click.bind(this)),Ie(t,$,this.onDragStart=this.dragstart.bind(this)),Ie(n,R,this.onPointerDown=this.pointerdown.bind(this)),Ie(i,H,this.onPointerMove=this.pointermove.bind(this)),Ie(i,B,this.onPointerUp=this.pointerup.bind(this)),Ie(i,j,this.onKeyDown=this.keydown.bind(this)),Ie(window,F,this.onResize=this.resize.bind(this)),e.zoomable&&e.zoomOnWheel&&Ie(t,W,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleOnDblclick&&Ie(n,I,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,n=this.canvas,i=this.element.ownerDocument;Pe(t,P,this.onClick),Pe(t,$,this.onDragStart),Pe(n,R,this.onPointerDown),Pe(i,H,this.onPointerMove),Pe(i,B,this.onPointerUp),Pe(i,j,this.onKeyDown),Pe(window,F,this.onResize),e.zoomable&&e.zoomOnWheel&&Pe(t,W,this.onWheel,{passive:!1,capture:!0}),e.toggleOnDblclick&&Pe(n,I,this.onDblclick)}},qe={click:function(e){var t=this.options,n=this.imageData,i=e.target,r=Me(i,le);switch(r||"img"!==i.localName||"li"!==i.parentElement.localName||(r=Me(i=i.parentElement,le)),c&&e.isTrusted&&i===this.canvas&&clearTimeout(this.clickCanvasTimeout),r){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(Me(i,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-n.scaleX||-1);break;case"flip-vertical":this.scaleY(-n.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(c&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(e.isTrusted?e:e.detail&&e.detail.originalEvent))},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,n=this.options,i=this.image,r=this.index,o=this.viewerData;Ce(i,E),n.loading&&Ce(this.canvas,A),i.style.cssText="height:0;"+"margin-left:".concat(o.width/2,"px;")+"margin-top:".concat(o.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){Ee(i,T,n.movable),Ee(i,L,n.transition),e.renderImage(function(){e.viewed=!0,e.viewing=!1,we(n.viewed)&&Ie(t,K,n.viewed,{once:!0}),$e(t,K,{originalImage:e.images[r],index:r,image:i},{cancelable:!1})})})},loadImage:function(e){var t=e.target,n=t.parentNode,i=n.offsetWidth||30,r=n.offsetHeight||50,o=!!Me(t,"filled");Ne(t,this.options,function(e,n){var a=e/n,s=i,l=r;r*a>i?o?s=r*a:l=i/a:o?l=i/a:s=r*a,xe(t,ye({width:s,height:l},ze({translateX:(i-s)/2,translateY:(r-l)/2})))})},keydown:function(e){var t=this.options;if(t.keyboard){var n=e.keyCode||e.which||e.charCode;if(13===n&&this.viewer.contains(e.target)&&this.click(e),this.fulled)switch(n){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}}},dragstart:function(e){"img"===e.target.localName&&e.preventDefault()},pointerdown:function(e){var t=this.options,n=this.pointers,i=e.buttons,r=e.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(pe(i)&&1!==i||pe(r)&&0!==r||e.ctrlKey))){e.preventDefault(),e.changedTouches?be(e.changedTouches,function(e){n[e.identifier]=Re(e)}):n[e.pointerId||0]=Re(e);var o=!!t.movable&&h;t.zoomOnTouch&&t.zoomable&&Object.keys(n).length>1?o=m:t.slideOnTouch&&("touch"===e.pointerType||"touchstart"===e.type)&&this.isSwitchable()&&(o=p),!t.transition||o!==h&&o!==m||Ce(this.image,L),this.action=o}},pointermove:function(e){var t=this.pointers,n=this.action;this.viewed&&n&&(e.preventDefault(),e.changedTouches?be(e.changedTouches,function(e){ye(t[e.identifier]||{},Re(e,!0))}):ye(t[e.pointerId||0]||{},Re(e,!0)),this.change(e))},pointerup:function(e){var t,n=this,i=this.options,r=this.action,o=this.pointers;e.changedTouches?be(e.changedTouches,function(e){t=o[e.identifier],delete o[e.identifier]}):(t=o[e.pointerId||0],delete o[e.pointerId||0]),r&&(e.preventDefault(),!i.transition||r!==h&&r!==m||_e(this.image,L),this.action=!1,c&&r!==m&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),i.toggleOnDblclick&&this.viewed&&e.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){$e(n.image,I,{originalEvent:e})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){n.imageClicked=!1},500)):(this.imageClicked=!1,i.backdrop&&"static"!==i.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){$e(n.canvas,P,{originalEvent:e})},50)))))},resize:function(){var e=this;if(this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();be(this.player.getElementsByTagName("img"),function(t){Ie(t,N,e.loadImage.bind(e),{once:!0}),$e(t,N)})}},wheel:function(e){var t=this;if(this.viewed&&(e.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50);var n=Number(this.options.zoomRatio)||.1,i=1;e.deltaY?i=e.deltaY>0?1:-1:e.wheelDelta?i=-e.wheelDelta/120:e.detail&&(i=e.detail>0?1:-1),this.zoom(-i*n,!0,null,e)}}},We={show:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element,n=this.options;if(n.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;if(we(n.show)&&Ie(t,X,n.show,{once:!0}),!1===$e(t,X)||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var i=this.viewer;if(Ce(i,k),i.setAttribute("role","dialog"),i.setAttribute("aria-labelledby",this.title.id),i.setAttribute("aria-modal",!0),i.removeAttribute("aria-hidden"),n.transition&&!e){var r=this.shown.bind(this);this.transitioning={abort:function(){Pe(i,q,r),Ce(i,C)}},_e(i,L),i.initialOffsetWidth=i.offsetWidth,Ie(i,q,r,{once:!0}),_e(i,C)}else _e(i,C),this.shown();return this},hide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.element,i=this.options;if(i.inline||this.hiding||!this.isShown&&!this.showing)return this;if(we(i.hide)&&Ie(n,V,i.hide,{once:!0}),!1===$e(n,V))return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var r=this.viewer,o=this.image,a=function(){Ce(r,C),e.hidden()};if(i.transition&&!t){var s=function(t){t&&t.target===r&&(Pe(r,q,s),e.hidden())},l=function(){Se(r,L)?(Ie(r,q,s),Ce(r,C)):a()};this.transitioning={abort:function(){e.viewed&&Se(o,L)?Pe(o,q,l):Se(r,L)&&Pe(r,q,s)}},this.viewed&&Se(o,L)?(Ie(o,q,l,{once:!0}),this.zoomTo(0,!1,null,null,!0)):l()}else a();return this},view:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===this.index)return this;if(!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var n=this.element,i=this.options,r=this.title,o=this.canvas,a=this.items[t],s=a.querySelector("img"),l=Me(s,"originalUrl"),c=s.getAttribute("alt"),d=document.createElement("img");if(be(i.inheritedAttributes,function(e){var t=s.getAttribute(e);null!==t&&d.setAttribute(e,t)}),d.src=l,d.alt=c,we(i.view)&&Ie(n,G,i.view,{once:!0}),!1===$e(n,G,{originalImage:this.images[t],index:t,image:d})||!this.isShown||this.hiding||this.played)return this;var u=this.items[this.index];u&&(Ce(u,f),u.removeAttribute("aria-selected")),_e(a,f),a.setAttribute("aria-selected",!0),i.focus&&a.focus(),this.image=d,this.viewed=!1,this.index=t,this.imageData={},_e(d,E),i.loading&&_e(o,A),o.innerHTML="",o.appendChild(d),this.renderList(),r.innerHTML="";var h,p,m=function(){var t,n=e.imageData,o=Array.isArray(i.title)?i.title[1]:i.title;r.innerHTML=ue(t=we(o)?o.call(e,d,n):"".concat(c," (").concat(n.naturalWidth," × ").concat(n.naturalHeight,")"))?t.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):t};return Ie(n,K,m,{once:!0}),this.viewing={abort:function(){Pe(n,K,m),d.complete?e.imageRendering?e.imageRendering.abort():e.imageInitializing&&e.imageInitializing.abort():(d.src="",Pe(d,N,h),e.timeout&&clearTimeout(e.timeout))}},d.complete?this.load():(Ie(d,N,h=function(){Pe(d,D,p),e.load()},{once:!0}),Ie(d,D,p=function(){Pe(d,N,h),e.timeout&&(clearTimeout(e.timeout),e.timeout=!1),Ce(d,E),i.loading&&Ce(e.canvas,A)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){Ce(d,E),e.timeout=!1},1e3)),this},prev:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.length-1,n=this.index+1;return n>t&&(n=e?0:t),this.view(n),this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData;return this.moveTo(me(e)?e:n.x+Number(e),me(t)?t:n.y+Number(t)),this},moveTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.element,o=this.options,a=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&o.movable){var s=a.x,l=a.y,c=!1;if(pe(e)?c=!0:e=s,pe(n)?c=!0:n=l,c){if(we(o.move)&&Ie(r,J,o.move,{once:!0}),!1===$e(r,J,{x:e,y:n,oldX:s,oldY:l,originalEvent:i}))return this;a.x=e,a.y=n,a.left=e,a.top=n,this.moving=!0,this.renderImage(function(){t.moving=!1,we(o.moved)&&Ie(r,Q,o.moved,{once:!0}),$e(r,Q,{x:e,y:n,oldX:s,oldY:l,originalEvent:i},{cancelable:!1})})}}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this,n=this.element,i=this.options,r=this.imageData;if(pe(e=Number(e))&&this.viewed&&!this.played&&i.rotatable){var o=r.rotate;if(we(i.rotate)&&Ie(n,ee,i.rotate,{once:!0}),!1===$e(n,ee,{degree:e,oldDegree:o}))return this;r.rotate=e,this.rotating=!0,this.renderImage(function(){t.rotating=!1,we(i.rotated)&&Ie(n,te,i.rotated,{once:!0}),$e(n,te,{degree:e,oldDegree:o},{cancelable:!1})})}return this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.element,r=this.options,o=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&r.scalable){var a=o.scaleX,s=o.scaleY,l=!1;if(pe(e)?l=!0:e=a,pe(n)?l=!0:n=s,l){if(we(r.scale)&&Ie(i,ne,r.scale,{once:!0}),!1===$e(i,ne,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s}))return this;o.scaleX=e,o.scaleY=n,this.scaling=!0,this.renderImage(function(){t.scaling=!1,we(r.scaled)&&Ie(i,ie,r.scaled,{once:!0}),$e(i,ie,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s},{cancelable:!1})})}}return this},zoom:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(r.width*e/r.naturalWidth,t,n,i),this},zoomTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=this.element,s=this.options,l=this.pointers,c=this.imageData,d=c.x,u=c.y,h=c.width,p=c.height,m=c.naturalWidth,f=c.naturalHeight;if(pe(e=Math.max(0,e))&&this.viewed&&!this.played&&(o||s.zoomable)){if(o||(e=Math.min(Math.max(e,Math.max(.01,s.minZoomRatio)),Math.min(100,s.maxZoomRatio))),r)switch(r.type){case"wheel":s.zoomRatio>=.055&&e>.95&&e<1.05&&(e=1);break;case"pointermove":case"touchmove":case"mousemove":e>.99&&e<1.01&&(e=1)}var v=m*e,g=f*e,w=v-h,b=g-p,y=c.ratio;if(we(s.zoom)&&Ie(a,re,s.zoom,{once:!0}),!1===$e(a,re,{ratio:e,oldRatio:y,originalEvent:r}))return this;if(this.zooming=!0,r){var k=function(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}(this.viewer),x=l&&Object.keys(l).length>0?function(e){var t=0,n=0,i=0;return be(e,function(e){var r=e.startX,o=e.startY;t+=r,n+=o,i+=1}),{pageX:t/=i,pageY:n/=i}}(l):{pageX:r.pageX,pageY:r.pageY};c.x-=w*((x.pageX-k.left-d)/h),c.y-=b*((x.pageY-k.top-u)/p)}else ge(i)&&pe(i.x)&&pe(i.y)?(c.x-=w*((i.x-d)/h),c.y-=b*((i.y-u)/p)):(c.x-=w/2,c.y-=b/2);c.left=c.x,c.top=c.y,c.width=v,c.height=g,c.oldRatio=y,c.ratio=e,this.renderImage(function(){t.zooming=!1,we(s.zoomed)&&Ie(a,oe,s.zoomed,{once:!0}),$e(a,oe,{ratio:e,oldRatio:y,originalEvent:r},{cancelable:!1})}),n&&this.tooltip()}return this},play:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var n=this.element,i=this.options;if(we(i.play)&&Ie(n,ae,i.play,{once:!0}),!1===$e(n,ae))return this;var r=this.player,o=this.loadImage.bind(this),a=[],s=0,l=0;if(this.played=!0,this.onLoadWhenPlay=o,t&&this.requestFullscreen(t),_e(r,O),be(this.items,function(e,t){var n=e.querySelector("img"),c=document.createElement("img");c.src=Me(n,"originalUrl"),c.alt=n.getAttribute("alt"),c.referrerPolicy=n.referrerPolicy,s+=1,_e(c,g),Ee(c,L,i.transition),Se(e,f)&&(_e(c,C),l=t),a.push(c),Ie(c,N,o,{once:!0}),r.appendChild(c)}),pe(i.interval)&&i.interval>0){var c=function(){clearTimeout(e.playing.timeout),Ce(a[l],C),_e(a[l=(l-=1)>=0?l:s-1],C),e.playing.timeout=setTimeout(c,i.interval)},d=function(){clearTimeout(e.playing.timeout),Ce(a[l],C),_e(a[l=(l+=1)<s?l:0],C),e.playing.timeout=setTimeout(d,i.interval)};s>1&&(this.playing={prev:c,next:d,timeout:setTimeout(d,i.interval)})}return this},stop:function(){var e=this;if(!this.played)return this;var t=this.element,n=this.options;if(we(n.stop)&&Ie(t,se,n.stop,{once:!0}),!1===$e(t,se))return this;var i=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,be(i.getElementsByTagName("img"),function(t){Pe(t,N,e.onLoadWhenPlay)}),Ce(i,O),i.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,n=this.viewer,i=this.image,r=this.list;return!this.isShown||this.played||this.fulled||!t.inline||(this.fulled=!0,this.open(),_e(this.button,y),t.transition&&(Ce(r,L),this.viewed&&Ce(i,L)),_e(n,w),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("style"),xe(n,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=ye({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){_e(i,L),_e(r,L)},0)})})),this},exit:function(){var e=this,t=this.options,n=this.viewer,i=this.image,r=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline?(this.fulled=!1,this.close(),Ce(this.button,y),t.transition&&(Ce(r,L),this.viewed&&Ce(i,L)),t.focus&&this.clearEnforceFocus(),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),Ce(n,w),xe(n,{zIndex:t.zIndexInline}),this.viewerData=ye({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){_e(i,L),_e(r,L)},0)})}),this):this},tooltip:function(){var e=this,t=this.options,n=this.tooltipBox,i=this.imageData;return this.viewed&&!this.played&&t.tooltip?(n.textContent="".concat(Math.round(100*i.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):t.transition?(this.fading&&$e(n,q),_e(n,O),_e(n,g),_e(n,L),n.removeAttribute("aria-hidden"),n.initialOffsetWidth=n.offsetWidth,_e(n,C)):(_e(n,O),n.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){t.transition?(Ie(n,q,function(){Ce(n,O),Ce(n,g),Ce(n,L),n.setAttribute("aria-hidden",!0),e.fading=!1},{once:!0}),Ce(n,C),e.fading=!0):(Ce(n,O),n.setAttribute("aria-hidden",!0)),e.tooltipping=!1},1e3),this):this},toggle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0,null,e):this.zoomTo(1,!0,null,e),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=ye({},this.initialImageData),this.renderImage()),this},update:function(){var e=this,t=this.element,n=this.options,i=this.isImg;if(i&&!t.parentNode)return this.destroy();var r=[];if(be(i?[t]:t.querySelectorAll("img"),function(t){we(n.filter)?n.filter.call(e,t)&&r.push(t):e.getImageURL(t)&&r.push(t)}),!r.length)return this;if(this.images=r,this.length=r.length,this.ready){var o=[];if(be(this.items,function(e,t){var n=e.querySelector("img"),i=r[t];i&&n&&i.src===n.src&&i.alt===n.alt||o.push(t)}),xe(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var a=o.indexOf(this.index);if(a>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-a,this.length-1),0));else{var s=this.items[this.index];_e(s,f),s.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e[u]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||Pe(e,P,this.onStart),e[u]=void 0,this):this}},Ye={getImageURL:function(e){var t=this.options.url;return ue(t)?e.getAttribute(t):we(t)?t.call(this,e):""},enforceFocus:function(){var e=this;this.clearEnforceFocus(),Ie(document,z,this.onFocusin=function(t){var n=e.viewer,i=t.target;if(i!==document&&i!==n&&!n.contains(i)){for(;i;){if(null!==i.getAttribute("tabindex")||"true"===i.getAttribute("aria-modal"))return;i=i.parentElement}n.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(Pe(document,z,this.onFocusin),this.onFocusin=null)},open:function(){var e=this.body;_e(e,M),this.scrollbarWidth>0&&(e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var e=this.body;Ce(e,M),this.scrollbarWidth>0&&(e.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var e=this.element,t=this.options,n=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(n.focus(),this.enforceFocus()),we(t.shown)&&Ie(e,U,t.shown,{once:!0}),!1!==$e(e,U)&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var e=this.element,t=this.options,n=this.viewer;t.focus&&this.clearEnforceFocus(),this.close(),this.unbind(),_e(n,k),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),n.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(we(t.hidden)&&Ie(e,Z,t.hidden,{once:!0}),$e(e,Z,null,{cancelable:!1}))},requestFullscreen:function(e){var t=this.element.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var n=t.documentElement;n.requestFullscreen?ge(e)?n.requestFullscreen(e):n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen()}},exitFullscreen:function(){var e=this.element.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t=this.options,n=this.pointers,r=n[Object.keys(n)[0]];if(r){var o=r.endX-r.startX,a=r.endY-r.startY;switch(this.action){case h:0===o&&0===a||(this.pointerMoved=!0,this.move(o,a,e));break;case m:this.zoom(function(e){var t=i({},e),n=[];return be(e,function(e,i){delete t[i],be(t,function(t){var i=Math.abs(e.startX-t.startX),r=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(i*i+r*r),l=(Math.sqrt(o*o+a*a)-s)/s;n.push(l)})}),n.sort(function(e,t){return Math.abs(e)<Math.abs(t)}),n[0]}(n),!1,null,e);break;case p:this.action="switched";var s=Math.abs(o);s>1&&s>Math.abs(a)&&(this.pointers={},o>1?this.prev(t.loop):o<-1&&this.next(t.loop))}be(n,function(e){e.startX=e.endX,e.startY=e.endY})}},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return this.length>1&&e.x>=0&&e.y>=0&&e.width<=t.width&&e.height<=t.height}},Xe=l.Viewer,Ue=(He=-1,function(){return He+=1}),Ve=/*#__PURE__*/function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),!e||1!==e.nodeType)throw new Error("The first argument is required and must be an element.");this.element=e,this.options=ye({},a,ge(n)&&n),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=Ue(),this.init()}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"init",value:function(){var e=this,t=this.element,n=this.options;if(!t[u]){t[u]=this,n.focus&&!n.keyboard&&(n.focus=!1);var i="img"===t.localName,r=[];if(be(i?[t]:t.querySelectorAll("img"),function(t){we(n.filter)?n.filter.call(e,t)&&r.push(t):e.getImageURL(t)&&r.push(t)}),this.isImg=i,this.length=r.length,this.images=r,this.initBody(),me(document.createElement(u).style.transition)&&(n.transition=!1),n.inline){var o=0,a=function(){var t;(o+=1)===e.length&&(e.initializing=!1,e.delaying={abort:function(){clearTimeout(t)}},t=setTimeout(function(){e.delaying=!1,e.build()},0))};this.initializing={abort:function(){be(r,function(e){e.complete||(Pe(e,N,a),Pe(e,D,a))})}},be(r,function(e){var t,n;e.complete?a():(Ie(e,N,t=function(){Pe(e,D,n),a()},{once:!0}),Ie(e,D,n=function(){Pe(e,N,t),a()},{once:!0}))})}else Ie(t,P,this.onStart=function(t){var i=t.target;"img"!==i.localName||we(n.filter)&&!n.filter.call(e,i)||e.view(e.images.indexOf(i))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,t=this.options,n=e.parentNode,i=document.createElement("div");i.innerHTML='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>';var r=i.querySelector(".".concat(u,"-container")),o=r.querySelector(".".concat(u,"-title")),a=r.querySelector(".".concat(u,"-toolbar")),s=r.querySelector(".".concat(u,"-navbar")),l=r.querySelector(".".concat(u,"-button")),c=r.querySelector(".".concat(u,"-canvas"));if(this.parent=n,this.viewer=r,this.title=o,this.toolbar=a,this.navbar=s,this.button=l,this.canvas=c,this.footer=r.querySelector(".".concat(u,"-footer")),this.tooltipBox=r.querySelector(".".concat(u,"-tooltip")),this.player=r.querySelector(".".concat(u,"-player")),this.list=r.querySelector(".".concat(u,"-list")),r.id="".concat(u).concat(this.id),o.id="".concat(u,"Title").concat(this.id),_e(o,t.title?De(Array.isArray(t.title)?t.title[0]:t.title):k),_e(s,t.navbar?De(t.navbar):k),Ee(l,k,!t.button),t.keyboard&&l.setAttribute("tabindex",0),t.backdrop&&(_e(r,"".concat(u,"-backdrop")),t.inline||"static"===t.backdrop||Oe(c,le,"hide")),ue(t.className)&&t.className&&t.className.split(ce).forEach(function(e){_e(r,e)}),t.toolbar){var d=document.createElement("ul"),h=ge(t.toolbar),p=de.slice(0,3),m=de.slice(7,9),f=de.slice(9);h||_e(a,De(t.toolbar)),be(h?t.toolbar:de,function(e,n){var i=h&&ge(e),r=h?Te(n):e,o=i&&!me(e.show)?e.show:e;if(o&&(t.zoomable||-1===p.indexOf(r))&&(t.rotatable||-1===m.indexOf(r))&&(t.scalable||-1===f.indexOf(r))){var a=i&&!me(e.size)?e.size:e,s=i&&!me(e.click)?e.click:e,l=document.createElement("li");t.keyboard&&l.setAttribute("tabindex",0),l.setAttribute("role","button"),_e(l,"".concat(u,"-").concat(r)),we(s)||Oe(l,le,r),pe(o)&&_e(l,De(o)),-1!==["small","large"].indexOf(a)?_e(l,"".concat(u,"-").concat(a)):"play"===r&&_e(l,"".concat(u,"-large")),we(s)&&Ie(l,P,s),d.appendChild(l)}}),a.appendChild(d)}else _e(a,k);if(!t.rotatable){var y=a.querySelectorAll('li[class*="rotate"]');_e(y,E),be(y,function(e){a.appendChild(e)})}if(t.inline)_e(l,b),xe(r,{zIndex:t.zIndexInline}),"static"===window.getComputedStyle(n).position&&xe(n,{position:"relative"}),n.insertBefore(r,e.nextSibling);else{_e(l,v),_e(r,w),_e(r,g),_e(r,k),xe(r,{zIndex:t.zIndex});var x=t.container;ue(x)&&(x=e.ownerDocument.querySelector(x)),x||(x=this.body),x.appendChild(r)}t.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,we(t.ready)&&Ie(e,Y,t.ready,{once:!0}),!1!==$e(e,Y)?this.ready&&t.inline&&this.view(this.index):this.ready=!1}}}],[{key:"noConflict",value:function(){return window.Viewer=Xe,t}},{key:"setDefaults",value:function(e){ye(a,ge(e)&&e)}}])}();return ye(Ve.prototype,Be,Fe,qe,We,Ye),Ve});var hi=(null==di.exports?{}:di.exports).default||di.exports,pi="_image-toolbar-wrapper_d4f20_14",mi="_image-toolbar-btn_d4f20_21";function fi({imgElement:e,containerRef:t,onViewerReady:n}){const[i,r]=l(!0),a=s(null);return o(()=>{if(t.current){const i=new hi(t.current,{toolbar:!0,navbar:!0,title:!1,tooltip:!0,zoomable:!0,rotatable:!1,scalable:!1,transition:!0,fullscreen:!0,keyboard:!0});a.current=i,n(e,i)}return()=>{a.current&&(a.current.destroy(),a.current=null)}},[]),/* @__PURE__ */j("div",{className:pi,children:[/* @__PURE__ */z("span",{className:`${mi} remons-markdown-circle`,onClick:()=>{i?(r(!1),e.style.maxHeight="none",e.style.height="auto"):(r(!0),e.style.maxHeight="100px",e.style.height="auto")},title:i?"查看大图":"查看缩略图",children:/* @__PURE__ */z(i?O:L,{})}),/* @__PURE__ */z("span",{className:`${mi} remons-markdown-circle`,onClick:()=>{if(a.current&&t.current){const n=t.current.querySelectorAll("img"),i=Array.from(n).indexOf(e);i>=0&&a.current.view(i),a.current.show()}},title:"预览",children:/* @__PURE__ */z(b,{})})]})}var vi=/* @__PURE__ */new Map,gi=/* @__PURE__ */new Map,wi=["pre"];function bi(e){(Array.isArray(e)?e:[e]).forEach(e=>{wi.includes(e)||wi.push(e)})}var yi=e=>{const t=e.target;"IMG"===t.tagName&&wi.some(e=>null!==t.closest(e))&&e.stopImmediatePropagation()},ki=e=>{const t=e.target;if("IMG"!==t.tagName)return;if(wi.some(e=>null!==t.closest(e)))return;const n=gi.get(t);n&&n.show()},xi=!1;function Si(e,t){const n=e.current;if(!n)return;xi||(n.addEventListener("click",yi,!0),n.addEventListener("click",ki),xi=!0);const i=n.querySelectorAll("img");i.forEach(e=>{e.onclick=null}),i.forEach(n=>{const i=n;if(t)return i.style.maxHeight="none",i.style.width="auto",void(i.style.display="block");if(i.parentElement?.querySelector(".image-toolbar"))return;if(wi.some(e=>null!==i.closest(e)))return;const r=document.createElement("div");r.className="_image-preview-wrapper_d4f20_1",i.parentNode?.insertBefore(r,i),r.appendChild(i);const o=document.createElement("div");o.className=pi,r.appendChild(o);const a=Q(o);vi.set(o,a),a.render(/* @__PURE__ */z(fi,{imgElement:i,containerRef:e,onViewerReady:(e,t)=>{gi.set(e,t)}})),i.style.maxHeight="100px",i.style.width="auto",i.style.display="block",i.style.overflow="hidden"})}var _i=/* @__PURE__ */new Map;function Ci({preNode:e}){const[t,n]=l(!0);/* @__PURE__ */
|
|
7
|
-
return z("
|
|
8
|
-
|
|
9
|
-
/* @__PURE__ */z("div",{className:Ni("modal-body"),children:s}),null!=r&&/* @__PURE__ */z("div",{className:Ni("modal-footer"),children:r})]})}),document.body):null},Ri={mermaid:"https://registry.npmmirror.com/mermaid/11.17.2/files/dist/mermaid.min.js"},Hi=null,Bi=0;"undefined"!=typeof window&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}));var Fi,qi="undefined"!=typeof document&&!!document.documentMode;function Wi(){return Fi||(Fi=document.createElement("div").style)}var Yi=["webkit","moz","ms"],Xi={};function Ui(e){if(Xi[e])return Xi[e];const t=Wi();if(e in t)return Xi[e]=e;const n=e[0].toUpperCase()+e.slice(1);let i=Yi.length;for(;i--;){const r=`${Yi[i]}${n}`;if(r in t)return Xi[e]=r}}function Vi(e,t){return parseFloat(t[Ui(e)])||0}function Zi(e,t,n=window.getComputedStyle(e)){const i="border"===t?"Width":"";return{left:Vi(`${t}Left${i}`,n),right:Vi(`${t}Right${i}`,n),top:Vi(`${t}Top${i}`,n),bottom:Vi(`${t}Bottom${i}`,n)}}function Gi(e,t,n){e.style[Ui(t)]=n}function Ki(e){let t=e.parentNode;t&&1===t.nodeType||(t=document.documentElement);const n=window.getComputedStyle(e),i=window.getComputedStyle(t),r=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{elem:{style:n,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:Zi(e,"margin",n),border:Zi(e,"border",n)},parent:{style:i,width:o.width,height:o.height,top:o.top,bottom:o.bottom,left:o.left,right:o.right,padding:Zi(t,"padding",i),border:Zi(t,"border",i)}}}var Ji={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};function Qi(e,t,n,i){Ji[e].split(" ").forEach(e=>{t.addEventListener(e,n,i)})}function er(e,t,n){Ji[e].split(" ").forEach(e=>{t.removeEventListener(e,n)})}function tr(e,t){let n=e.length;for(;n--;)if(e[n].pointerId===t.pointerId)return n;return-1}function nr(e,t){let n;if(t.touches){n=0;for(const i of t.touches)i.pointerId=n++,nr(e,i)}else n=tr(e,t),n>-1&&e.splice(n,1),e.push(t)}function ir(e){let t,n=(e=e.slice(0)).pop();for(;t=e.pop();)n={clientX:(t.clientX-n.clientX)/2+n.clientX,clientY:(t.clientY-n.clientY)/2+n.clientY};return n}function rr(e){if(e.length<2)return 0;const t=e[0],n=e[1];return Math.sqrt(Math.pow(Math.abs(n.clientX-t.clientX),2)+Math.pow(Math.abs(n.clientY-t.clientY),2))}function or(e,t){return 1===e.nodeType&&` ${function(e){return(e.getAttribute("class")||"").trim()}(e)} `.indexOf(` ${t} `)>-1}"undefined"!=typeof window&&("function"==typeof window.PointerEvent?Ji={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:"function"==typeof window.TouchEvent&&(Ji={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));var ar=/^http:[\w\.\/]+svg$/,sr={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:e=>{e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:function(e,{x:t,y:n,scale:i,isSVG:r},o){if(Gi(e,"transform",`scale(${i}) translate(${t}px, ${n}px)`),r&&qi){const t=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",t)}},startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function lr(e,t){if(!e)throw new Error("Panzoom requires an element as an argument");if(1!==e.nodeType)throw new Error("Panzoom requires an element with a nodeType of 1");if(!function(e){let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t={...sr,...t};const n=function(e){return ar.test(e.namespaceURI)&&"svg"!==e.nodeName.toLowerCase()}(e),i=e.parentNode;i.style.overflow=t.overflow,i.style.userSelect="none",i.style.touchAction=t.touchAction,(t.canvas?i:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,Gi(e,"transformOrigin","string"==typeof t.origin?t.origin:n?"0 0":"50% 50%");let r,o,a,s,l,c,d=0,u=0,h=1,p=!1;function m(t,n,i){if(i.silent)return;const r=new CustomEvent(t,{detail:n});e.dispatchEvent(r)}function f(t,i,r){const o={x:d,y:u,scale:h,isSVG:n,originalEvent:r};return requestAnimationFrame(()=>{"boolean"==typeof i.animate&&(i.animate?function(e,t){Gi(e,"transition",`${Ui("transform")} ${t.duration}ms ${t.easing}`)}(e,i):Gi(e,"transition","none")),i.setTransform(e,o,i),m(t,o,i),m("panzoomchange",o,i)}),o}function v(n,i,r,o){const a={...t,...o},s={x:d,y:u,opts:a};if(!o?.force&&(a.disablePan||a.panOnlyWhenZoomed&&h===a.startScale))return s;if(n=parseFloat(n),i=parseFloat(i),a.disableXAxis||(s.x=(a.relative?d:0)+n),a.disableYAxis||(s.y=(a.relative?u:0)+i),a.contain){const t=Ki(e),n=t.elem.width/h,i=t.elem.height/h,o=n*r,l=i*r,c=(o-n)/2,d=(l-i)/2;if("inside"===a.contain){const e=(-t.elem.margin.left-t.parent.padding.left+c)/r,n=(t.parent.width-o-t.parent.padding.left-t.elem.margin.left-t.parent.border.left-t.parent.border.right+c)/r;s.x=Math.max(Math.min(s.x,n),e);const i=(-t.elem.margin.top-t.parent.padding.top+d)/r,a=(t.parent.height-l-t.parent.padding.top-t.elem.margin.top-t.parent.border.top-t.parent.border.bottom+d)/r;s.y=Math.max(Math.min(s.y,a),i)}else if("outside"===a.contain){const e=(-(o-t.parent.width)-t.parent.padding.left-t.parent.border.left-t.parent.border.right+c)/r,n=(c-t.parent.padding.left)/r;s.x=Math.max(Math.min(s.x,n),e);const i=(-(l-t.parent.height)-t.parent.padding.top-t.parent.border.top-t.parent.border.bottom+d)/r,a=(d-t.parent.padding.top)/r;s.y=Math.max(Math.min(s.y,a),i)}}return a.roundPixels&&(s.x=Math.round(s.x),s.y=Math.round(s.y)),s}function g(n,i){const r={...t,...i},o={scale:h,opts:r};if(!i?.force&&r.disableZoom)return o;let a=t.minScale,s=t.maxScale;if(r.contain){const n=Ki(e),i=n.elem.width/h,r=n.elem.height/h;if(i>1&&r>1){const e=(n.parent.width-n.parent.border.left-n.parent.border.right)/i,o=(n.parent.height-n.parent.border.top-n.parent.border.bottom)/r;"inside"===t.contain?s=Math.min(s,e,o):"outside"===t.contain&&(a=Math.max(a,e,o))}}return o.scale=Math.min(Math.max(n,a),s),o}function w(e,t,i,r){const o=v(e,t,h,i);return d!==o.x||u!==o.y?(d=o.x,u=o.y,f("panzoompan",o.opts,r)):{x:d,y:u,scale:h,isSVG:n,originalEvent:r}}function b(e,t,n){const i=g(e,t),r=i.opts;if(!t?.force&&r.disableZoom)return;e=i.scale;let o=d,a=u;if(r.focal){const t=r.focal;o=(t.x/e-t.x/h+d*e)/e,a=(t.y/e-t.y/h+u*e)/e}const s=v(o,a,e,{relative:!1,force:!0});return d=s.x,u=s.y,h=e,f("panzoomzoom",r,n)}function y(e,n){const i={...t,animate:!0,...n};return b(h*Math.exp((e?1:-1)*i.step),i)}function k(t,i,r,o){const a=Ki(e),s=a.parent.width-a.parent.padding.left-a.parent.padding.right-a.parent.border.left-a.parent.border.right,l=a.parent.height-a.parent.padding.top-a.parent.padding.bottom-a.parent.border.top-a.parent.border.bottom;let c=i.clientX-a.parent.left-a.parent.padding.left-a.parent.border.left-a.elem.margin.left,d=i.clientY-a.parent.top-a.parent.padding.top-a.parent.border.top-a.elem.margin.top;return n||(c-=a.elem.width/h/2,d-=a.elem.height/h/2),b(t,{...r,animate:!1,focal:{x:c/s*(s*t),y:d/l*(l*t)}},o)}b(t.startScale,{animate:!1,force:!0}),setTimeout(()=>{w(t.startX,t.startY,{animate:!1,force:!0})});const x=[];function S(e){if(function(e,t){for(let n=e;null!=n;n=n.parentNode)if(or(n,t.excludeClass)||t.exclude.indexOf(n)>-1)return!0;return!1}(e.target,t))return;nr(x,e),p=!0,t.handleStartEvent(e),r=d,o=u,m("panzoomstart",{x:d,y:u,scale:h,isSVG:n,originalEvent:e},t);const i=ir(x);a=i.clientX,s=i.clientY,l=h,c=rr(x)}function _(e){if(!p||void 0===r||void 0===o||void 0===a||void 0===s)return;nr(x,e);const n=ir(x),i=x.length>1;let d=h;i&&(0===c&&(c=rr(x)),d=g((rr(x)-c)*t.step/80+l).scale,k(d,n,{animate:!1},e)),i&&!t.pinchAndPan||w(r+(n.clientX-a)/d,o+(n.clientY-s)/d,{animate:!1},e)}function C(e){1===x.length&&m("panzoomend",{x:d,y:u,scale:h,isSVG:n,originalEvent:e},t),function(e,t){if(t.touches){for(;e.length;)e.pop();return}const n=tr(e,t);n>-1&&e.splice(n,1)}(x,e),p&&(p=!1,r=o=a=s=void 0)}let E=!1;function A(){E||(E=!0,Qi("down",t.canvas?i:e,S),Qi("move",document,_,{passive:!0}),Qi("up",document,C,{passive:!0}))}return t.noBind||A(),{bind:A,destroy:function(){E=!1,er("down",t.canvas?i:e,S),er("move",document,_),er("up",document,C)},eventNames:Ji,getPan:()=>({x:d,y:u}),getScale:()=>h,getOptions:()=>function(e){const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(t),handleDown:S,handleMove:_,handleUp:C,pan:w,reset:function(e){const n={...t,animate:!0,force:!0,...e};h=g(n.startScale,n).scale;const i=v(n.startX,n.startY,h,n);return d=i.x,u=i.y,f("panzoomreset",n)},resetStyle:function(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",Gi(e,"transformOrigin","")},setOptions:function(n={}){for(const e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);(n.hasOwnProperty("cursor")||n.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),n.hasOwnProperty("overflow")&&(i.style.overflow=n.overflow),n.hasOwnProperty("touchAction")&&(i.style.touchAction=n.touchAction,e.style.touchAction=n.touchAction)},setStyle:(t,n)=>Gi(e,t,n),zoom:b,zoomIn:function(e){return y(!0,e)},zoomOut:function(e){return y(!1,e)},zoomToPoint:k,zoomWithWheel:function(e,n){e.preventDefault();const i={...t,...n,animate:!1};return k(g(h*Math.exp(((0===e.deltaY&&e.deltaX?e.deltaX:e.deltaY)<0?1:-1)*i.step/3),i).scale,e,i,e)}}}lr.defaultOptions=sr;var cr=te.bind({tooltip:"_tooltip_1kuma_4","tooltip-trigger":"_tooltip-trigger_1kuma_7","tooltip-inner":"_tooltip-inner_1kuma_11","tooltip-inner-visible":"_tooltip-inner-visible_1kuma_27","tooltip-content":"_tooltip-content_1kuma_30","tooltip-arrow":"_tooltip-arrow_1kuma_36"}),dr=({title:e,children:t,visible:n,onVisibleChange:i})=>{const[r,a]=l(!1),c=s(null),d=s(null),[u,h]=l({top:0,left:0}),p=void 0!==n?n:r,m=()=>{if(d.current){const e=d.current.getBoundingClientRect();h({top:e.top-8,left:e.left+e.width/2})}};o(()=>{if(!p)return;const e=()=>m(),t=()=>m();return window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",t,{passive:!0}),m(),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",t)}},[p]),o(()=>()=>{c.current&&window.clearTimeout(c.current)},[]);const f=p&&e?I(/* @__PURE__ */j("div",{className:cr("tooltip-inner","tooltip-inner-visible"),style:{top:u.top,left:u.left},children:[/* @__PURE__ */z("span",{className:cr("tooltip-content"),children:e}),/* @__PURE__ */z("span",{className:cr("tooltip-arrow")})]}),document.body):null;/* @__PURE__ */
|
|
10
|
-
return j("div",{ref:d,className:cr("tooltip"),onMouseEnter:()=>{c.current&&window.clearTimeout(c.current),c.current=window.setTimeout(()=>{m(),a(!0),i?.(!0)},150)},onMouseLeave:()=>{c.current&&(window.clearTimeout(c.current),c.current=null),a(!1),i?.(!1)},children:[/* @__PURE__ */z("div",{className:cr("tooltip-trigger"),children:t}),f]})},ur=te.bind({dropdown:"_dropdown_13j0u_4","dropdown-trigger":"_dropdown-trigger_13j0u_8","dropdown-menu":"_dropdown-menu_13j0u_12","dropdown-menu-visible":"_dropdown-menu-visible_13j0u_26","dropdown-item":"_dropdown-item_13j0u_30"}),hr=({items:e,children:t,onClick:n,className:i=""})=>{const[r,a]=l(!1),c=s(null),d=()=>{a(!1)};return o(()=>{const e=e=>{c.current&&!c.current.contains(e.target)&&d()};return r&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[r]),/* @__PURE__ */j("div",{ref:c,className:ur("dropdown",i),children:[/* @__PURE__ */z("div",{className:ur("dropdown-trigger"),onClick:()=>{a(e=>!e)},children:t}),r&&/* @__PURE__ */z("div",{className:ur("dropdown-menu","dropdown-menu-visible"),children:e.map(e=>/* @__PURE__ */z("div",{className:ur("dropdown-item"),onClick:()=>(e=>{n({key:e.key}),d()})(e),children:e.label},e.key))})]})};function pr({showSourceView:e,showCollapse:t,showDownload:n,isFullscreen:i,isCollapsed:r,isMinimize:o,isPanzoomActive:a,isPanzoomAvailable:s,isPanzoomEnabled:l,setIsPanzoomEnabled:c,setIsMinimize:d,setIsCollapsed:u,setShowSource:h,toggleFullscreen:m,downloadMenu:b,panzoomRef:S}){/* @__PURE__ */
|
|
11
|
-
return z("div",{className:"mermaid-toolbar",children:[{isShow:e&&r&&!i,icon:/* @__PURE__ */z(o?w:x,{}),tooltip:o?"缩略图":"最小化",onClick:()=>d(e=>!e),className:"mermaid-minimize-btn"},{isShow:s,icon:/* @__PURE__ */z(g,{}),tooltip:l?"取消拖拽":"启用拖拽",onClick:()=>c(e=>!e),className:l?"mermaid-panzoom-btn active":"mermaid-panzoom-btn"},{isShow:a,icon:/* @__PURE__ */z(E,{}),tooltip:"放大",onClick:()=>S.current?.zoomIn()},{isShow:a,icon:/* @__PURE__ */z(C,{}),tooltip:"缩小",onClick:()=>S.current?.zoomOut()},{isShow:a,icon:/* @__PURE__ */z(A,{}),tooltip:"重置",onClick:()=>S.current?.reset()},{isShow:n&&a,icon:/* @__PURE__ */z(v,{}),tooltip:"下载",dropdown:b},{isShow:!0,icon:/* @__PURE__ */z(i?y:k,{}),tooltip:i?"退出全屏":"全屏",onClick:m,className:"mermaid-fullscreen-btn"},{isShow:e&&!i,icon:/* @__PURE__ */z(p,{}),tooltip:"查看源码",onClick:()=>h(!0),className:"mermaid-showcode-btn"},{isShow:t&&!i,icon:/* @__PURE__ */z(r?f:T,{}),tooltip:r?"展开":"收起",onClick:()=>u(e=>!e),className:"mermaid-collapsed-btn"}].map(e=>{if(!1===e.isShow)return null;const t=e.className||e.tooltip,n=e.dropdown?/* @__PURE__ */z(hr,{items:e.dropdown.items,onClick:e.dropdown.onClick,children:/* @__PURE__ */z("div",{className:`remons-markdown-circle ${e.className||""}`,children:e.icon})},t):/* @__PURE__ */z("div",{className:`remons-markdown-circle ${e.className||""}`,onClick:e.onClick,children:e.icon},t);return e.tooltip&&(0,pe.IsPC)()?/* @__PURE__ */z(dr,{title:e.tooltip,children:n},`${t}-tooltip`):n})})}var mr={previewArea:"_previewArea_1axru_2",previewAreaDisabled:"_previewAreaDisabled_1axru_25",previewContent:"_previewContent_1axru_31",errorTip:"_errorTip_1axru_47",emptyTip:"_emptyTip_1axru_59"},fr=["pointerdown","mousedown","pointerup","mouseup","click"],vr=/* @__PURE__ */new WeakMap;function gr(e,t,n){wr(e);let i=i=>{let r=i.target;e.contains(r)&&((!n||n(r))&&(i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()),"click"===i.type&&t?.(i))};for(let r of fr)document.addEventListener(r,i,!0);vr.set(e,i)}function wr(e){let t=vr.get(e);if(t){for(let e of fr)document.removeEventListener(e,t,!0);vr.delete(e)}}function br(e,t){let{elementDimensions:n,popoverDimensions:i,popoverPadding:r,popoverArrowDimensions:o}=t;return"start"===e?Math.max(Math.min(n.top-r,window.innerHeight-i.realHeight-o.width),o.width):"end"===e?Math.max(Math.min(n.top-i?.realHeight+n.height+r,window.innerHeight-i?.realHeight-o.width),o.width):"center"===e?Math.max(Math.min(n.top+n.height/2-i?.realHeight/2,window.innerHeight-i?.realHeight-o.width),o.width):0}function yr(e,t){let{elementDimensions:n,popoverDimensions:i,popoverPadding:r,popoverArrowDimensions:o}=t;return"start"===e?Math.max(Math.min(n.left-r,window.innerWidth-i.realWidth-o.width),o.width):"end"===e?Math.max(Math.min(n.left-i?.realWidth+n.width+r,window.innerWidth-i?.realWidth-o.width),o.width):"center"===e?Math.max(Math.min(n.left+n.width/2-i?.realWidth/2,window.innerWidth-i?.realWidth-o.width),o.width):0}function kr(e,t,n){let{align:i,side:r}=n,o=n.centered?"over":r,a=n.padding,s=function(e,t){let n=e.wrapper.getBoundingClientRect();return{width:n.width+t,height:n.height+t,realWidth:n.width,realHeight:n.height}}(e,n.offset),l=e.arrow.getBoundingClientRect(),c=t.getBoundingClientRect(),d=c.top-s.height,u=d>=0,h=window.innerHeight-(c.bottom+s.height),p=h>=0,m=c.left-s.width,f=m>=0,v=window.innerWidth-(c.right+s.width),g=v>=0,w=!(u||p||f||g),b=o;if("top"===o&&u?g=f=p=!1:"bottom"===o&&p?g=f=u=!1:"left"===o&&f?g=u=p=!1:"right"===o&&g&&(f=u=p=!1),"over"===o){let t=window.innerWidth/2-s.realWidth/2,n=window.innerHeight/2-s.realHeight/2;e.wrapper.style.left=`${t}px`,e.wrapper.style.right="auto",e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto"}else if(w){let t=window.innerWidth/2-s?.realWidth/2;e.wrapper.style.left=`${t}px`,e.wrapper.style.right="auto",e.wrapper.style.bottom="10px",e.wrapper.style.top="auto"}else if(f){let t=Math.min(m,window.innerWidth-s?.realWidth-l.width),n=br(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.left=`${t}px`,e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.right="auto",b="left"}else if(g){let t=Math.min(v,window.innerWidth-s?.realWidth-l.width),n=br(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.right=`${t}px`,e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.left="auto",b="right"}else if(u){let t=Math.min(d,window.innerHeight-s.realHeight-l.width),n=yr(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.top=`${t}px`,e.wrapper.style.left=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.right="auto",b="top"}else if(p){let t=Math.min(h,window.innerHeight-s?.realHeight-l.width),n=yr(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.left=`${n}px`,e.wrapper.style.bottom=`${t}px`,e.wrapper.style.top="auto",e.wrapper.style.right="auto",b="bottom"}_r(e,w?"over":b,i,t),[...e.wrapper.classList].filter(e=>e.startsWith("driver-popover-side-")||e.startsWith("driver-popover-align-")).forEach(t=>e.wrapper.classList.remove(t)),e.wrapper.classList.add(`driver-popover-side-${b}`),e.wrapper.classList.add(`driver-popover-align-${i}`)}function xr(e,t,n,i,r,o=10){let a=i-n;return e<=n&&t>=i?"start"===r?15+o/2:"end"===r?a-15-o/2:a/2:(Math.min(Math.max(e,n),i)+Math.min(Math.max(t,n),i))/2-n}function Sr(e,t,n=10){let i=t-15-n;if(i<15)return Math.max(0,(t-n)/2);let r=e-n/2;return Math.min(Math.max(r,15),i)}function _r(e,t,n,i){let r=e.arrow;if(r.className="driver-popover-arrow",r.style.top="",r.style.right="",r.style.bottom="",r.style.left="","over"===t)return void r.classList.add("driver-popover-arrow-none");let o=i.getBoundingClientRect(),a=e.wrapper.getBoundingClientRect(),s=function(e,t,n){return"left"===e||"right"===e?t.bottom>n.top&&t.top<n.bottom?e:t.bottom<=n.top?"bottom":"top":t.right>n.left&&t.left<n.right?e:t.right<=n.left?"right":"left"}(t,o,a);r.classList.add(`driver-popover-arrow-side-${s}`);let l=r.getBoundingClientRect().width||10;if("left"===s||"right"===s){let e=xr(o.top,o.bottom,a.top,a.bottom,n,l);r.style.top=`${Sr(e,a.height,l)}px`}else{let e=xr(o.left,o.right,a.left,a.right,n,l);r.style.left=`${Sr(e,a.width,l)}px`}}function Cr(e){return"function"==typeof e?e():"string"==typeof e?document.querySelector(e):e}function Er(e,t,n,i){return(e/=i/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function Ar(e){let t='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap(e=>{let n=e.matches(t),i=Array.from(e.querySelectorAll(t));return[...n?[e]:[],...i]}).filter(e=>"none"!==getComputedStyle(e).pointerEvents&&function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e))}function Tr(e,t){if(!e||function(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e))return;let n=e.offsetHeight>window.innerHeight;e.scrollIntoView({behavior:!t||Mr(e)?"auto":"smooth",inline:"center",block:n?"start":"center"})}function Mr(e){if(!e||!e.parentElement)return;let t=e.parentElement;return t.scrollHeight>t.clientHeight}function Or(e,t){let n=function(){let e=document.createElement("div");e.classList.add("driver-popover");let t=document.createElement("div");t.classList.add("driver-popover-arrow");let n=document.createElement("header");n.id="driver-popover-title",n.classList.add("driver-popover-title"),n.style.display="none",n.innerText="Popover Title";let i=document.createElement("div");i.id="driver-popover-description",i.classList.add("driver-popover-description"),i.style.display="none",i.innerText="Popover description is here";let r=document.createElement("button");r.type="button",r.classList.add("driver-popover-close-btn"),r.setAttribute("aria-label","Close"),r.innerHTML="×";let o=document.createElement("footer");o.classList.add("driver-popover-footer");let a=document.createElement("span");a.classList.add("driver-popover-progress-text"),a.innerText="";let s=document.createElement("span");s.classList.add("driver-popover-navigation-btns");let l=document.createElement("button");l.type="button",l.classList.add("driver-popover-prev-btn","driver-popover-footer-btn"),l.innerHTML="Previous";let c=document.createElement("button");return c.type="button",c.classList.add("driver-popover-next-btn","driver-popover-footer-btn"),c.innerHTML="Next",s.appendChild(l),s.appendChild(c),o.appendChild(a),o.appendChild(s),e.appendChild(r),e.appendChild(t),e.appendChild(n),e.appendChild(i),e.appendChild(o),{wrapper:e,arrow:t,title:n,description:i,footer:o,previousButton:l,nextButton:c,closeButton:r,footerButtons:s,progress:a}}();document.body.appendChild(n.wrapper);let{title:i,description:r,showButtons:o,disableButtons:a,showProgress:s,nextBtnText:l,prevBtnText:c,progressText:d}=t;n.nextButton.innerHTML=l,n.previousButton.innerHTML=c,n.progress.innerHTML=d,t.doneButton&&n.nextButton.classList.add("driver-popover-done-btn"),i?(n.title.innerHTML=i,n.title.style.display="block"):n.title.style.display="none",r?(n.description.innerHTML=r,n.description.style.display="block"):n.description.style.display="none";let u=o.includes("next")||o.includes("previous")||s;n.closeButton.style.display=o.includes("close")?"block":"none",u?(n.footer.style.display="flex",n.progress.style.display=s?"block":"none",n.nextButton.style.display=o.includes("next")?"block":"none",n.previousButton.style.display=o.includes("previous")?"block":"none"):n.footer.style.display="none",a.includes("next")&&(n.nextButton.disabled=!0,n.nextButton.classList.add("driver-popover-btn-disabled")),a.includes("previous")&&(n.previousButton.disabled=!0,n.previousButton.classList.add("driver-popover-btn-disabled")),a.includes("close")&&(n.closeButton.disabled=!0,n.closeButton.classList.add("driver-popover-btn-disabled"));let h=n.wrapper;h.style.display="block",h.style.left="",h.style.top="",h.style.bottom="",h.style.right="",h.id="driver-popover-content",h.setAttribute("role","dialog"),h.setAttribute("aria-labelledby","driver-popover-title"),h.setAttribute("aria-describedby","driver-popover-description"),n.arrow.className="driver-popover-arrow",h.className=`driver-popover ${t.popoverClass||""}`.trim(),gr(n.wrapper,e=>{let n=e.target;return n.closest(".driver-popover-next-btn")?t.onNextClick?.():n.closest(".driver-popover-prev-btn")?t.onPrevClick?.():n.closest(".driver-popover-close-btn")?t.onCloseClick?.():void 0},e=>!n.description.contains(e)&&!n.title.contains(e)&&!!e.closest(".driver-popover-prev-btn, .driver-popover-next-btn, .driver-popover-close-btn")),t.onRender?.(n),kr(n,e,t.position),function(e,t,n){e.wrapper.querySelectorAll("img").forEach(i=>{if(i.complete)return;let r=()=>kr(e,t,n);i.addEventListener("load",r,{once:!0}),i.addEventListener("error",r,{once:!0})})}(n,e,t.position),Tr(h,t.smoothScroll);let p=Ar([h,e]);return p.length>0&&p[0].focus(),n}function Lr(e){e&&(wr(e.wrapper),e.wrapper.parentElement?.removeChild(e.wrapper))}function Pr(e,t){let n=window.innerWidth,i=window.innerHeight,r=t.padding,o=t.radius,a=e.width+2*r,s=e.height+2*r,l=Math.min(o,a/2,s/2),c=Math.floor(Math.max(l,0)),d=a-2*c,u=s-2*c;return`M${n},0L0,0L0,${i}L${n},${i}L${n},0Z\n M${e.x-r+c},${e.y-r} h${d} a${c},${c} 0 0 1 ${c},${c} v${u} a${c},${c} 0 0 1 -${c},${c} h-${d} a${c},${c} 0 0 1 -${c},-${c} v-${u} a${c},${c} 0 0 1 ${c},-${c} z`}function Ir(e,t,n,i,r){let o=e.getState("__activeStagePosition"),a=o||i.getBoundingClientRect(),s=r.getBoundingClientRect();o={x:Er(t,a.x,s.x-a.x,n),y:Er(t,a.y,s.y-a.y,n),width:Er(t,a.width,s.width-a.width,n),height:Er(t,a.height,s.height-a.height,n)},jr(e,o),e.setState("__activeStagePosition",o)}function $r(e,t){if(!t)return;let n=t.getBoundingClientRect(),i={x:n.x,y:n.y,width:n.width,height:n.height};e.setState("__activeStagePosition",i),jr(e,i)}function zr(e,t){let n=function(e,t){let n=window.innerWidth,i=window.innerHeight,r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("driver-overlay","driver-overlay-animated"),r.setAttribute("viewBox",`0 0 ${n} ${i}`),r.setAttribute("xmlSpace","preserve"),r.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("preserveAspectRatio","xMinYMin slice"),r.style.fillRule="evenodd",r.style.clipRule="evenodd",r.style.strokeLinejoin="round",r.style.strokeMiterlimit="2",r.style.zIndex="10000",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%";let o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",Pr(t,Nr(e))),o.style.fill=e.getConfig("overlayColor")||"rgb(0,0,0)",o.style.opacity=`${e.getConfig("overlayOpacity")}`,o.style.pointerEvents="auto",o.style.cursor="auto",r.appendChild(o),r}(e,t);document.body.appendChild(n),gr(n,t=>{"path"===t.target.tagName&&e.emit("overlayClick")}),e.setState("__overlaySvg",n)}function jr(e,t){let n=e.getState("__overlaySvg");if(!n)return void zr(e,t);let i=n.firstElementChild;if("path"!==i?.tagName)throw Error("no path element found in stage svg");i.setAttribute("d",Pr(t,Nr(e)))}function Nr(e){return{padding:e.getConfig("stagePadding")||0,radius:e.getConfig("stageRadius")||0}}function Dr(e){let t=e.getState("__overlaySvg");t&&(wr(t),t.remove())}var Rr="{{current}} of {{total}}";function Hr(e,t){return!(!(t.skipMissingElement??e.getConfig("skipMissingElement"))||!t.element||Cr(t.element))}function Br(e,t,n){let i=e.getConfig("steps")||[];for(let r=t;r>=0&&r<i.length;r+=n)if(!Hr(e,i[r]))return r}function Fr(e,t){let n=e.getState("activeIndex"),i=void 0!==n&&void 0===Br(e,n+1,1),r=t?.popover?.onDoneClick||e.getConfig("onDoneClick");return i&&r?r:t?.popover?.onNextClick||e.getConfig("onNextClick")}function qr(e,t){return t?.popover?.onPrevClick||e.getConfig("onPrevClick")}function Wr(e,t,n){let i=e.getConfig("stagePadding")||0;return{side:n.popover?.side||"bottom",align:n.popover?.align||"start",offset:i+(e.getConfig("popoverOffset")||0),padding:i,centered:"driver-dummy-element"===t.id}}function Yr(e,t,n){Lr(e.getState("popover")),Or(t,function(e,t,n){let i=n.popover||{},r=e.getState("activeIndex"),o=void 0!==r&&void 0===Br(e,r+1,1);return{title:i.title,description:i.description,showButtons:i.showButtons||e.getConfig("showButtons"),disableButtons:i.disableButtons||e.getConfig("disableButtons")||[],showProgress:i.showProgress||e.getConfig("showProgress")||!1,progressText:i.progressText??(e.getConfig("progressText")||Rr),nextBtnText:i.nextBtnText??(e.getConfig("nextBtnText")||"Next"),prevBtnText:i.prevBtnText??(e.getConfig("prevBtnText")||"Previous"),doneButton:o,popoverClass:i.popoverClass||e.getConfig("popoverClass")||"",smoothScroll:e.getConfig("smoothScroll"),onNextClick:()=>{let i=Fr(e,n);return i?i(t,n,e.getHookOpts()):e.emit("nextClick")},onPrevClick:()=>{let i=qr(e,n);return i?i(t,n,e.getHookOpts()):e.emit("prevClick")},onCloseClick:()=>{let i=function(e,t){return t?.popover?.onCloseClick||e.getConfig("onCloseClick")}(e,n);return i?i(t,n,e.getHookOpts()):e.emit("closeClick")},onRender:t=>{e.setState("popover",t),(i.onPopoverRender||e.getConfig("onPopoverRender"))?.(t,e.getHookOpts())},position:Wr(e,t,n)}}(e,t,n))}function Xr(e,t){let n=Cr(t.element);n||(n=function(){let e=document.getElementById("driver-dummy-element");if(e)return e;let t=document.createElement("div");return t.id="driver-dummy-element",t.style.width="0",t.style.height="0",t.style.pointerEvents="none",t.style.opacity="0",t.style.position="fixed",t.style.top="50%",t.style.left="50%",document.body.appendChild(t),t}()),function(e,t,n){let i=e.getConfig("duration")||400,r=Date.now(),o=e.getState("__activeStep"),a=e.getState("__activeElement")||t,s=!a||a===t,l="driver-dummy-element"===t.id,c="driver-dummy-element"===a.id,d=e.getConfig("animate"),u=n.onHighlightStarted||e.getConfig("onHighlightStarted"),h=n?.onHighlighted||e.getConfig("onHighlighted"),p=o?.onDeselected||e.getConfig("onDeselected"),m=e.getHookOpts();!s&&p&&p(c?void 0:a,o,m),u&&u(l?void 0:t,n,m);let f=!s&&d,v=!1;(function(e){e&&(e.wrapper.style.display="none")})(e.getState("popover")),e.setState("previousStep",o),e.setState("previousElement",a),e.setState("activeStep",n),e.setState("activeElement",t);let g=()=>{if(e.getState("__transitionCallback")!==g)return;let s=Date.now()-r,c=i-s<=i/2;n.popover&&c&&!v&&f&&(Yr(e,t,n),v=!0),e.getConfig("animate")&&s<i?Ir(e,s,i,a,t):($r(e,t),h&&h(l?void 0:t,n,e.getHookOpts()),e.setState("__transitionCallback",void 0),e.setState("__previousStep",o),e.setState("__previousElement",a),e.setState("__activeStep",n),e.setState("__activeElement",t)),window.requestAnimationFrame(g)};e.setState("__transitionCallback",g),window.requestAnimationFrame(g),Tr(t,e.getConfig("smoothScroll")),!f&&n.popover&&Yr(e,t,n),document.querySelectorAll(".driver-active-element-parent").forEach(e=>{e.classList.remove("driver-active-element-parent","driver-active-element-parent-no-scroll")}),a.classList.remove("driver-active-element","driver-no-interaction"),a.removeAttribute("aria-haspopup"),a.removeAttribute("aria-expanded"),a.removeAttribute("aria-controls"),(n.disableActiveInteraction??e.getConfig("disableActiveInteraction"))&&t.classList.add("driver-no-interaction");let w=t.parentElement;w&&w!==document.body&&(w.classList.add("driver-active-element-parent"),function(e){let t=window.getComputedStyle(e);return[t.overflow,t.overflowX,t.overflowY].some(e=>"auto"===e||"scroll"===e)}(w)&&w.classList.add("driver-active-element-parent-no-scroll")),t.classList.add("driver-active-element"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","true"),t.setAttribute("aria-controls","driver-popover-content")}(e,n,t)}function Ur(e){let t=e.getState("__resizeTimeout");t&&window.cancelAnimationFrame(t),e.setState("__resizeTimeout",window.requestAnimationFrame(()=>function(e){let t=e.getState("__activeElement"),n=e.getState("__activeStep");t&&($r(e,t),function(e){let t=e.getState("__activeStagePosition"),n=e.getState("__overlaySvg");t&&n&&n.setAttribute("viewBox",`0 0 ${window.innerWidth} ${window.innerHeight}`)}(e),function(e,t,n){let i=e.getState("popover");i&&kr(i,t,Wr(e,t,n))}(e,t,n))}(e)))}function Vr(e){let t=t=>function(e,t){(e.getConfig("allowKeyboardControl")??1)&&("Escape"===t.key?e.emit("escapePress"):"ArrowRight"===t.key?e.emit("arrowRightPress"):"ArrowLeft"===t.key&&e.emit("arrowLeftPress"))}(e,t),n=t=>function(e,t){if(!e.getState("isInitialized")||"Tab"!==t.key&&9!==t.keyCode)return;let n=e.getState("__activeElement"),i=e.getState("popover")?.wrapper,r=Ar([...i?[i]:[],...n?[n]:[]]),o=r[0],a=r[r.length-1];t.preventDefault(),t.shiftKey?(r[r.indexOf(document.activeElement)-1]||a)?.focus():(r[r.indexOf(document.activeElement)+1]||o)?.focus()}(e,t),i=()=>Ur(e),r=()=>Ur(e),o=t=>function(e,t){let n=e.getState("__activeElement"),i=t.target;!n||!i||!n.contains(i)||e.emit("activeElementClick")}(e,t);e.setState("__events",{onKeyup:t,onKeydown:n,onResize:i,onScroll:r,onClick:o}),window.addEventListener("keyup",t,!1),window.addEventListener("keydown",n,!1),window.addEventListener("resize",i),window.addEventListener("scroll",r),document.addEventListener("click",o,!1)}var Zr=null,Gr=[],Kr="docList-mermaid-driver",Jr="docList-menu-driver",Qr="docList-pc-menu-driver";async function eo(t){const n=document.querySelectorAll("code.language-mermaid"),{showDriverGuide:i,isPrintPreview:r=!1,chartConfig:o,defaultCollapsed:a=!0,cdn:s}=t||{};for(const l of n){const t=l.parentElement;if(!t)continue;const n=l.textContent.trim(),c=document.createElement("div");c.className="mermaid-react-root",t.replaceWith(c),Q(c).render(/* @__PURE__ */z(e.StrictMode,{children:/* @__PURE__ */z(ji,{children:/* @__PURE__ */z(no,{source:n,enablePanzoom:!0,showDownload:!0,showSourceView:!0,showCollapse:!0,chartConfig:o,defaultCollapsed:a,isPrintPreview:r,minHeight:200,showDriverGuide:i,cdn:s})})}))}}var to=/* @__PURE__ */V({default:()=>no,renderMermaid:()=>io,renderMermaidWithControls:()=>eo}),no=n(function({source:e,debounceMs:t=300,enablePanzoom:n=!0,showDownload:c=!0,showSourceView:d=!1,showCollapse:u=!1,defaultCollapsed:h=!0,className:p="",minHeight:m=200,showDriverGuide:f,isPrintPreview:v=!1,chartConfig:g,cdn:w}){const{isDark:b}=function(){const e=r(zi);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}(),{svg:y,error:k,loading:x}=function({source:e,debounceMs:t=300,isDark:n,chartConfig:i,cdn:r}){const{mermaid:a,loading:c}=function(e){const[t,n]=l(null),[i,r]=l(!0),[a,s]=l(null);return o(()=>{let t=!1;return function(e){return Hi||(Hi=new Promise((t,n)=>{if(window.mermaid)return void t(window.mermaid);const i=document.createElement("script");i.src=function(e,t){return t?.[e]??Ri[e]??""}("mermaid",e),i.onload=()=>t(window.mermaid),i.onerror=()=>n(/* @__PURE__ */new Error("Mermaid 脚本加载失败")),document.head.appendChild(i)})),Hi}(e).then(e=>{t||(n(()=>e),r(!1))}).catch(e=>{t||(s(e),r(!1))}),()=>{t=!0}},[]),{mermaid:t,loading:i,error:a}}(r),[d,u]=l(""),[h,p]=l(""),m=s(0);return o(()=>{a&&a.initialize({startOnLoad:!1,theme:n?"dark":"default",securityLevel:"loose"})},[a,n]),o(()=>{if(!a)return;const n=(e||"").trim();if(!n)return u(""),void p("");p("");const r=++m.current,o=setTimeout(async()=>{const e="mermaid-render-"+Bi++;try{const{svg:t}=await a.render(e,i?i(n):n);if(r!==m.current)return;u(t),p("")}catch(t){if(r!==m.current)return;const e=t instanceof Error?t.message:String(t);p(e?.split("\n")[0]||e)}finally{const t=document.getElementById(e)||document.getElementById(`d${e}`);t&&t.parentNode&&t.parentNode.removeChild(t)}},t);return()=>clearTimeout(o)},[e,n,a,t,i]),{svg:d,error:h,loading:c}}({source:e,debounceMs:t,isDark:b,chartConfig:g,cdn:w}),S=s(null),C=s(null),{isFullscreen:E,isCollapsed:A,setIsCollapsed:T,showSource:M,setShowSource:O,isMinimize:L,setIsMinimize:P,isPanzoomEnabled:I,setIsPanzoomEnabled:N,toggleFullscreen:D}=function({showCollapse:e,showSourceView:t,defaultCollapsed:n,isPrintPreview:r,svg:a,error:s,loading:c,wrapperRef:d}){const[u,h]=l(!1),[p,m]=l(n),[f,v]=l(!1),[g,w]=l(t),[b,y]=l(!1);return o(()=>{r&&a&&!s&&!c&&m(!1)},[r,a,s,c]),o(()=>{const t=()=>{h(!!document.fullscreenElement),!document.fullscreenElement&&e&&m(!0)};return r||document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[e,r]),{isFullscreen:u,setIsFullscreen:h,isCollapsed:p,setIsCollapsed:m,showSource:f,setShowSource:v,isMinimize:g,setIsMinimize:w,isPanzoomEnabled:b,setIsPanzoomEnabled:y,toggleFullscreen:i(()=>{document.fullscreenElement?document.exitFullscreen():d.current?.requestFullscreen?.()},[d])}}({showCollapse:u,showSourceView:d,defaultCollapsed:h,isPrintPreview:v,svg:y,error:k,loading:x,wrapperRef:S}),R=n&&(E||!A||!u),H=R&&I,B=function({contentRef:e,wrapperRef:t,enabled:n,svg:i,isFullscreen:r}){const a=s(null);return o(()=>{if(!n||!e.current||!i)return void(a.current&&(a.current.destroy(),a.current=null));a.current&&(a.current.destroy(),a.current=null);const r=lr(e.current,{maxScale:5,minScale:.1,startScale:1,contain:"outside"});a.current={destroy:()=>r.destroy(),zoomWithWheel:r.zoomWithWheel,zoomIn:()=>r.zoomIn(),zoomOut:()=>r.zoomOut(),reset:()=>r.reset()};const o=t.current,s=a.current.zoomWithWheel;return o?.addEventListener("wheel",s),()=>{o?.removeEventListener("wheel",s),a.current&&(a.current.destroy(),a.current=null)}},[i,r,n,e,t]),a}({contentRef:C,wrapperRef:S,enabled:H&&!!y&&!v,svg:y,isFullscreen:E});o(()=>{f&&!v&&function(e){if(Gr=e,Zr)return;const t=e=>{const n=Gr;if(e>=n.length)return void(Zr=null);const i=n[e];if(i.condition&&!i.condition())return void t(e+1);i?.onOpen?.();const r=function(e={}){let t=function(e={}){let t=function(){let e={};function t(t={}){e={animate:!0,duration:400,allowClose:!0,allowScroll:!0,overlayClickBehavior:"close",overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,advanceOnClick:!1,skipMissingElement:!1,waitForElement:0,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000",...t}}return t(),{getConfig:t=>t?e[t]:e,configure:t}}();t.configure(e);let n,i=function(){let e={};return{getState:t=>t?e[t]:e,setState:(t,n)=>{e[t]=n},resetState:function(){e={}}}}(),r=function(){let e={};return{listen:function(t,n){e[t]=n},emit:function(t){e[t]?.()},reset:function(){e={}}}}();return{getConfig:t.getConfig,setConfig:t.configure,getState:i.getState,setState:i.setState,resetState:i.resetState,listen:r.listen,emit:r.emit,resetEmitter:r.reset,getDriver:()=>n,setDriver:e=>{n=e},getHookOpts:e=>{let r=e||i.getState();return{config:t.getConfig(),state:r,driver:n,index:r.activeIndex}}}}(e);function n(){t.getConfig("allowClose")&&h()}function i(){let e=t.getConfig("overlayClickBehavior");if(t.getConfig("allowClose")&&"close"===e)h();else{if("function"==typeof e){let n=t.getState("__activeStep");return void e(t.getState("__activeElement"),n,t.getHookOpts())}if("nextStep"===e){let e=t.getState("activeStep"),n=t.getState("activeElement"),i=Fr(t,e);if(i)return void i(n,e,t.getHookOpts());r()}}}function r(){let e=t.getState("activeIndex"),n=t.getConfig("steps")||[];if(void 0===e)return;let i=e+1;n[i]?u(i):h()}function o(){let e=t.getState("activeIndex"),n=t.getConfig("steps")||[];if(void 0===e)return;let i=e-1;n[i]?u(i):h()}function a(){if(t.getState("__transitionCallback"))return;let e=t.getState("__activeStep");if(!e||!(e.advanceOnClick??t.getConfig("advanceOnClick")))return;let n=t.getState("__activeElement"),i=Fr(t,e);i?i(n,e,t.getHookOpts()):r()}function s(){if(t.getState("__transitionCallback"))return;let e=t.getState("activeIndex"),n=t.getState("__activeStep"),i=t.getState("__activeElement");if(void 0===e||void 0===n||!(t.getConfig("steps")||[])[e-1])return;let r=qr(t,n);if(r)return r(i,n,t.getHookOpts());o()}function l(){if(t.getState("__transitionCallback"))return;let e=t.getState("activeIndex"),n=t.getState("__activeStep"),i=t.getState("__activeElement");if(void 0===e||void 0===n)return;let o=Fr(t,n);if(o)return o(i,n,t.getHookOpts());r()}function c(){t.getState("isInitialized")||(t.setState("isInitialized",!0),document.body.classList.add("driver-active",t.getConfig("animate")?"driver-fade":"driver-simple"),t.getConfig("allowScroll")||document.body.classList.add("driver-no-scroll"),document.body.style.setProperty("--driver-animation-duration",`${t.getConfig("duration")||400}ms`),Vr(t),t.listen("overlayClick",i),t.listen("activeElementClick",a),t.listen("escapePress",n),t.listen("closeClick",n),t.listen("arrowLeftPress",s),t.listen("arrowRightPress",l))}function d(){let e=t.getState("__pendingWaitCancel");e&&(t.setState("__pendingWaitCancel",void 0),e())}function u(e=0,n=!1){d();let i=t.getConfig("steps");if(!i)return void h();if(!i[e])return void h();let r=i[e],o=r.waitForElement??t.getConfig("waitForElement")??0;if(!n&&o>0&&r.element&&!Cr(r.element))return void function(e,n,i){let r=()=>{o.disconnect(),window.clearTimeout(a),t.setState("__pendingWaitCancel",void 0),i()},o=new MutationObserver(()=>{Cr(e.element)&&r()}),a=window.setTimeout(r,n);t.setState("__pendingWaitCancel",()=>{o.disconnect(),window.clearTimeout(a)}),o.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0})}(r,o,()=>u(e,!0));if(Hr(t,r)){let n=t.getState("activeIndex"),r="number"==typeof n&&e<n?-1:1;return void(i[e+r]?u(e+r):1===r&&h())}t.setState("__activeOnDestroyed",document.activeElement),t.setState("activeIndex",e);let a=i[e+1];Xr(t,function(e,t,n){let i=e.getConfig("steps")||[],r=i[t],o=r.popover||{},a=void 0!==Br(e,t+1,1),s=void 0!==Br(e,t-1,-1),l=o.doneBtnText||e.getConfig("doneBtnText")||"Done",c=e.getConfig("allowClose"),d=void 0===o.showProgress?e.getConfig("showProgress"):o.showProgress,u=(o.progressText||e.getConfig("progressText")||Rr).replace("{{current}}",`${t+1}`).replace("{{total}}",`${i.length}`),h=o.showButtons||e.getConfig("showButtons"),p=["next","previous",...c?["close"]:[]].filter(e=>!h?.length||h.includes(e)),m=o.onNextClick||e.getConfig("onNextClick"),f=o.onPrevClick||e.getConfig("onPrevClick"),v=o.onCloseClick||e.getConfig("onCloseClick");return{...r,popover:{showButtons:p,nextBtnText:a?void 0:l,disableButtons:[...s?[]:["previous"]],showProgress:d,onNextClick:m||n.onNextClick,onPrevClick:f||n.onPrevClick,onCloseClick:v||n.onCloseClick,...o,progressText:u}}}(t,e,{onNextClick:()=>{a?u(e+1):h()},onPrevClick:()=>{u(e-1)},onCloseClick:()=>{h()}}))}function h(e=!0){let n=t.getState("__activeElement"),i=t.getState("__activeStep"),r=t.getState("__activeOnDestroyed"),o=t.getConfig("onDestroyStarted");if(e&&o)return void o(n&&"driver-dummy-element"!==n?.id?n:void 0,i,t.getHookOpts());let a=i?.onDeselected||t.getConfig("onDeselected"),s=t.getConfig("onDestroyed");document.body.classList.remove("driver-active","driver-fade","driver-simple","driver-no-scroll"),document.body.style.removeProperty("--driver-animation-duration"),d(),function(e){let t=e.getState("__events");t&&(window.removeEventListener("keyup",t.onKeyup),window.removeEventListener("keydown",t.onKeydown),window.removeEventListener("resize",t.onResize),window.removeEventListener("scroll",t.onScroll),document.removeEventListener("click",t.onClick,!1))}(t),Lr(t.getState("popover")),document.getElementById("driver-dummy-element")?.remove(),document.querySelectorAll(".driver-active-element").forEach(e=>{let t=e.parentElement;t&&t!==document.body&&t.classList.remove("driver-active-element-parent","driver-active-element-parent-no-scroll"),e.classList.remove("driver-active-element","driver-no-interaction"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls")}),Dr(t),t.resetEmitter();let l=t.getState();if(t.resetState(),n&&i){let e="driver-dummy-element"===n.id;a&&a(e?void 0:n,i,t.getHookOpts(l)),s&&s(e?void 0:n,i,t.getHookOpts(l))}r&&r.focus()}let p={isActive:()=>t.getState("isInitialized")||!1,refresh:()=>Ur(t),drive:(e=0)=>{c(),u(e)},setConfig:t.setConfig,setSteps:e=>{d(),t.resetState(),t.setConfig({...t.getConfig(),steps:e})},getConfig:t.getConfig,getState:t.getState,getActiveIndex:()=>t.getState("activeIndex"),isFirstStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0===Br(t,e-1,-1)},isLastStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0===Br(t,e+1,1)},getActiveStep:()=>t.getState("activeStep"),getActiveElement:()=>t.getState("activeElement"),getPreviousElement:()=>t.getState("previousElement"),getPreviousStep:()=>t.getState("previousStep"),getNextStep:()=>{let e=t.getConfig("steps")||[],n=t.getState("activeIndex");if(void 0===n)return;let i=Br(t,n+1,1);return void 0===i?void 0:e[i]},moveNext:r,movePrevious:o,moveTo:function(e){(t.getConfig("steps")||[])[e]?u(e):h()},hasNextStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0!==Br(t,e+1,1)},hasPreviousStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0!==Br(t,e-1,-1)},highlight:e=>{c(),Xr(t,{...e,popover:e.popover?{showButtons:[],showProgress:!1,progressText:"",...e.popover}:void 0})},destroy:()=>{h(!1)}};return t.setDriver(p),p}({nextBtnText:"下一步",prevBtnText:"上一步",doneBtnText:"我知道了",showProgress:!0,allowClose:!1,progressText:"第 {{current}} 步,共 {{total}} 步",onDestroyed:()=>{Zr=null,t(e+1)},steps:i.steps.filter(e=>!1!==e.isShow)||[]});Zr=r,r.drive()};t(0)}(function(e,t){return[{id:Jr,condition:()=>!localStorage[Jr]&&e&&!(0,pe.IsPC)()&&"true"!==localStorage.docListMenuVisible,onOpen:()=>{localStorage[Jr]="1"},steps:[{element:".docList-menu-anchor",popover:{title:"大纲",description:"点击此处您可查看大纲"}},{element:".docList-menu-list",popover:{title:"列表",description:"点击此处您可查看当前分类下文章列表"}},{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}}]},{id:Qr,condition:()=>!localStorage[Qr]&&(0,pe.IsPC)()&&e,onOpen:()=>{localStorage[Qr]="1"},steps:[{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}},{element:".docList-menu-mermaid-collapse",popover:{title:"展开收起mermaid",description:"点击此处按钮可一键展开收起mermaid图表"},isShow:t}]},{id:Kr,condition:()=>!(!t||localStorage[Kr]||!e),onOpen:()=>{localStorage[Kr]="1"},steps:[{element:".mermaid-react-root",popover:{title:"mermaid",description:"恭喜您解锁 Mermaid 渲染图表"}},{element:".mermaid-react-root .mermaid-minimize-btn",popover:{title:"缩略图",description:"点击此处按钮可查看缩略图"}},{element:".mermaid-react-root .mermaid-fullscreen-btn",popover:{title:"全屏",description:"点击此处按钮可切换为全屏展示"}},{element:".mermaid-react-root .mermaid-showcode-btn",popover:{title:"源码",description:"点击此处按钮查看源码弹窗"}},{element:".mermaid-react-root .mermaid-collapsed-btn",popover:{title:"展开",description:"点击此处按钮展开大图"}}]}]}(d,!!y))},[y,f,v,d]);const F=function(e){const t=e.match(/---\s*\n\s*title:\s*(.+)\s*\n\s*---/);return t?t[1].trim():"mermaid 图表"}(e),q=i(()=>{y?function(e,t="image"){Ti(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),`${t}.svg`)}(y,F):se.warning("暂无图表")},[y,F]),W=i(()=>{y?function(e,t="image",n=2){const{w:i,h:r}=function(e){const t=e.match(/viewBox=["']?([^"']+)["']/i);let n=0,i=0;if(t){const e=t[1].split(/[\s,]+/).map(Number);4===e.length&&(n=e[2],i=e[3])}const r=e.match(/width=["']?\s*([\d.]+)\s*(?:px|pt|cm|mm|in|%)*["']/i),o=e.match(/height=["']?\s*([\d.]+)\s*(?:px|pt|cm|mm|in|%)*/i),a=r?parseFloat(r[1]):0,s=o?parseFloat(o[1]):0;return n&&i?{w:n,h:i}:{w:a||n||800,h:s||i||600}}(e),o=function(e){return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e)))}`}(e),a=new Image;a.crossOrigin="anonymous",a.src=o,a.onload=()=>{const e=document.createElement("canvas");e.width=Math.max(1,Math.round(i*n)),e.height=Math.max(1,Math.round(r*n));const o=e.getContext("2d");o.fillStyle="#ffffff",o.fillRect(0,0,e.width,e.height),o.scale(n,n),o.drawImage(a,0,0,i,r),e.toBlob(e=>{e?Ti(e,`${t}.png`):se.error("PNG 生成失败")},"image/png")},a.onerror=()=>{se.error("PNG 生成失败:图片加载失败")}}(y,F,2):se.warning("暂无图表")},[y,F]),Y=a(()=>({items:[{key:"svg",label:"下载 SVG"},{key:"png",label:"下载 PNG"}],onClick:({key:e})=>"svg"===e?q():W()}),[q,W]),X=!!y;/* @__PURE__ */
|
|
12
|
-
return j("div",{ref:S,className:te.bind(mr)(E?"mermaid-wrapper-fullscreen":"",u?"mermaid-wrapper":"",A&&u&&!L?"mermaid-collapsed":"",p,L&&A&&!E?"mermaid-mini":"",v?"print-preview":""),style:{minHeight:L?0:m,position:"relative",height:"100%"},children:[!v&&/* @__PURE__ */j($,{children:[d&&/* @__PURE__ */j("div",{className:"mermaid-title",children:[/* @__PURE__ */j("span",{className:"mermaid-title-tag",children:[/* @__PURE__ */z("img",{src:"data:image/svg+xml,%3csvg%20t='1784097187016'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5199'%20width='200'%20height='200'%3e%3cpath%20d='M0%200m125.754386%200l772.491228%200q125.754386%200%20125.754386%20125.754386l0%20772.491228q0%20125.754386-125.754386%20125.754386l-772.491228%200q-125.754386%200-125.754386-125.754386l0-772.491228q0-125.754386%20125.754386-125.754386Z'%20fill='%23FC366E'%20p-id='5200'%3e%3c/path%3e%3cpath%20d='M921.150877%20174.547088a417.091368%20417.091368%200%200%200-409.168842%20274.198456%20417.235088%20417.235088%200%200%200-409.150877-274.198456%20417.360842%20417.360842%200%200%200%20181.625263%20361.992982%20223.914667%20223.914667%200%200%201%2097.010526%20185.038597v128.143719h261.084071v-128.07186a223.914667%20223.914667%200%200%201%2097.010526-185.038596%20417.181193%20417.181193%200%200%200%20181.553403-361.921123z'%20fill='%23FFFFFF'%20p-id='5201'%3e%3c/path%3e%3c/svg%3e",alt:""}),/* @__PURE__ */z("span",{className:"mermaid-title-text",children:"Mermaid"})]}),F]}),!X&&/* @__PURE__ */j("div",{className:"mermaid-toolbar-loading",children:[/* @__PURE__ */z(_,{})," "]}),X&&/* @__PURE__ */z(pr,{showSourceView:d,showCollapse:u,showDownload:c,isFullscreen:E,isCollapsed:A,isMinimize:L,isPanzoomActive:H,isPanzoomAvailable:R,isPanzoomEnabled:I,setIsPanzoomEnabled:N,setIsMinimize:P,setIsCollapsed:T,setShowSource:O,toggleFullscreen:()=>{B.current?.reset(),D()},downloadMenu:Y,panzoomRef:B})]}),k&&/* @__PURE__ */j("div",{className:mr.errorTip,children:["⚠️ ",k]}),
|
|
13
|
-
|
|
1
|
+
import e,{createContext as t,forwardRef as n,useCallback as i,useContext as r,useEffect as o,useMemo as a,useRef as s,useState as l}from"react";import{CaretDownOutlined as c,CaretRightOutlined as d,CheckCircleOutlined as u,CloseCircleOutlined as h,CodeOutlined as p,CopyFilled as m,DownOutlined as f,DownloadOutlined as v,DragOutlined as g,ExportOutlined as w,EyeOutlined as b,FullscreenExitOutlined as y,FullscreenOutlined as k,ImportOutlined as x,InfoCircleOutlined as S,LoadingOutlined as _,MinusOutlined as C,PlusOutlined as E,ReloadOutlined as A,UpOutlined as T,WarningOutlined as M,ZoomInOutlined as O,ZoomOutOutlined as L}from"@ant-design/icons";import{createRoot as P}from"react-dom/client";import{Fragment as I,jsx as $,jsxs as z}from"react/jsx-runtime";import j from"markdown-it";import N from"highlight.js/lib/core";import D from"highlight.js/lib/languages/javascript";import R from"highlight.js/lib/languages/typescript";import H from"highlight.js/lib/languages/css";import B from"highlight.js/lib/languages/json";import F from"highlight.js/lib/languages/bash";import q from"highlight.js/lib/languages/xml";import W from"highlight.js/lib/languages/plaintext";import{createPortal as X}from"react-dom";var Y=Object.defineProperty,V=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),U=(e,t)=>{let n={};for(var i in e)Y(n,i,{get:e[i],enumerable:!0});return t||Y(n,Symbol.toStringTag,{value:"Module"}),n},Z={exports:{}};!function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,n.call(this,r)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return this&&this[n]||n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var r="";for(var o in n)e.call(n,o)&&n[o]&&(r=i(r,this&&this[o]||o));return r}function i(e,t){return t?e?e+" "+t:e+t:e}void 0!==Z&&Z.exports?(t.default=t,Z.exports=t):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return t}):window.classNames=t}();var G=(null==Z.exports?{}:Z.exports).default||Z.exports,K={container:"_container_1a6ji_4",item:"_item_1a6ji_16",toast:"_toast_1a6ji_19",fadeIn:"_fadeIn_1a6ji_1","toast-warning":"_toast-warning_1a6ji_31","toast-info":"_toast-info_1a6ji_34","toast-error":"_toast-error_1a6ji_37","toast-success":"_toast-success_1a6ji_40"},J=G.bind(K),Q={warning:/* @__PURE__ */$(M,{style:{color:"#faad14",fontSize:"16px"}}),info:/* @__PURE__ */$(S,{style:{color:"#1890ff",fontSize:"16px"}}),error:/* @__PURE__ */$(h,{style:{color:"#ff4d4f",fontSize:"16px"}}),success:/* @__PURE__ */$(u,{style:{color:"#52c41a",fontSize:"16px"}})},ee=({config:e})=>/* @__PURE__ */z("div",{className:J("toast",`toast-${e.type}`),children:[Q[e.type],/* @__PURE__ */$("span",{children:e.content})]}),te=()=>{const[e,t]=l([]),n=s(/* @__PURE__ */new Map);return o(()=>{const e=e=>{const{type:i,content:r,duration:o=3e3}=e.detail,a=`message-${Date.now()}-${Math.random()}`,s={key:a,content:r,type:i,duration:o};t(e=>[...e,s]);const l=window.setTimeout(()=>{(e=>{t(t=>t.filter(t=>t.key!==e));const i=n.current.get(e);i&&(clearTimeout(i),n.current.delete(e))})(a)},o);n.current.set(a,l)},i=()=>{t([]),n.current.forEach(e=>clearTimeout(e)),n.current.clear()};return window.addEventListener("custom-message",e),window.addEventListener("custom-message-clear",i),()=>{window.removeEventListener("custom-message",e),window.removeEventListener("custom-message-clear",i),n.current.forEach(e=>clearTimeout(e))}},[]),/* @__PURE__ */$("div",{className:J("container"),children:e.map(e=>/* @__PURE__ */$("div",{className:J("item"),children:/* @__PURE__ */$(ee,{config:e})},e.key))})},ne=!1,ie={dispatch:(e,t,n)=>{(()=>{if(ne)return;ne=!0;const e=document.createElement("div");e.id="custom-message-container",document.body.appendChild(e),P(e).render(/* @__PURE__ */$(te,{}))})(),requestAnimationFrame(()=>{window.dispatchEvent(new CustomEvent("custom-message",{detail:{type:e,content:t,duration:n}}))})},warning:(e,t)=>ie.dispatch("warning",e,t),info:(e,t)=>ie.dispatch("info",e,t),error:(e,t)=>ie.dispatch("error",e,t),success:(e,t)=>ie.dispatch("success",e,t),destroy:()=>{window.dispatchEvent(new Event("custom-message-clear"))}},re=G.bind({"back-top":"_back-top_1q5qf_4"});function oe(e){return e.current||window}var ae=({target:e,visibilityHeight:t=300})=>{const[n,i]=l(!1),r=s(null);o(()=>{if(e)try{r.current=e()}catch{r.current=null}},[e]),o(()=>{const e=oe(r),n=()=>{i(function(e){return e===window?window.scrollY||document.documentElement.scrollTop:e.scrollTop}(e)>t)};return e.addEventListener("scroll",n,{passive:!0}),n(),()=>{e.removeEventListener("scroll",n)}},[t]);return n?/* @__PURE__ */$("div",{className:`${re("back-top")} remons-markdown-circle`,onClick:()=>{oe(r).scrollTo({top:0,behavior:"smooth"})},children:/* @__PURE__ */$(T,{})}):null},se="_empty_container_1qt26_1",le="_description_1qt26_10";function ce({description:e="暂无数据"}){/* @__PURE__ */
|
|
2
|
+
return z("div",{className:se,children:[/* @__PURE__ */z("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",children:[
|
|
3
|
+
/* @__PURE__ */$("rect",{x:"8",y:"16",width:"48",height:"36",rx:"4",stroke:"#d9d9d9",strokeWidth:"2"}),
|
|
4
|
+
/* @__PURE__ */$("line",{x1:"16",y1:"28",x2:"48",y2:"28",stroke:"#d9d9d9",strokeWidth:"2"}),
|
|
5
|
+
/* @__PURE__ */$("line",{x1:"16",y1:"36",x2:"40",y2:"36",stroke:"#d9d9d9",strokeWidth:"2"}),
|
|
6
|
+
/* @__PURE__ */$("line",{x1:"16",y1:"44",x2:"32",y2:"44",stroke:"#d9d9d9",strokeWidth:"2"})]}),/* @__PURE__ */$("span",{className:le,children:e})]})}var de=/* @__PURE__ */V((e,t)=>{!function(n,i){"object"==typeof e&&void 0!==t?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i((n="undefined"!=typeof globalThis?globalThis:n||self).MethodsR={})}(e,function(e){function t(e){return t="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},t(e)}function n(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.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)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}e.IsPC=function(){for(var e=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],n=!0,i=0;i<t.length;i++)if(e.indexOf(t[i])>0){n=!1;break}return n},e.SUM=function(e,t){var n;return e.forEach(function(t,i){"number"!=typeof t&&"string"!=typeof t||(n="number",e[i]=Number(t))}),"number"===n?e.reduce(function(e,t){return e+t}):e.reduce(function(e,n){return e+n[t]},0)},e.arrGroup=function(e,n){if("number"==typeof n){if(e instanceof Array){for(var i=[],r=0,o=e.length;r<o;r+=n)i.push(e.slice(r,r+n));return i}var a=t(e);return console.error("The expected array, get"+a),e}console.error("The second parameter should be a number")},e.compareVersion=function(e,t){for(var n=e.split("."),i=t.split("."),r=Math.max(n.length,i.length),o=0;o<r;o++){var a=+n[o],s=+i[o];if(a>s)return e;if(a<s)return t}return!1},e.copy=function(e){if("object"===t(e)){if(document.body.createTextRange){var n=document.body.createTextRange();n.moveToElementText(e),n.select()}else if(window.getSelection){var i=window.getSelection(),r=document.createRange();r.selectNodeContents(e),i.removeAllRanges(),i.addRange(r)}document.execCommand("Copy","false",null),window.getSelection().empty()}else{var o=document.createElement("textarea"),a=document.querySelector("body");o.value=e,o.setAttribute("style","z-index:-1"),a.appendChild(o),o.select(),document.execCommand("copy"),a.removeChild(o)}},e.dateFormat=function(e,t){function n(e){return e<10?"0"+e:e}var i,r=(i=e&&"number"==typeof e?new Date(e):e&&"string"==typeof e?new Date(parseInt(e)):/* @__PURE__ */new Date).getFullYear(),o=n(i.getMonth()+1),a=n(i.getDate()),s=n(i.getHours()),l=n(i.getMinutes()),c=n(i.getSeconds()),d="".concat(r,"-").concat(o,"-").concat(a," ").concat(s,":").concat(l,":").concat(c);return"yyyy/MM/dd HH:mm:ss"==t?d="".concat(r,"/").concat(o,"/").concat(a," ").concat(s,":").concat(l,":").concat(c):"yyyy/MM/dd"==t?d="".concat(r,"/").concat(o,"/").concat(a):"yyyy-MM-dd"==t?d="".concat(r,"-").concat(o,"-").concat(a):"HH:mm:ss"==t?d="".concat(s,":").concat(l,":").concat(c):"yyyy年MM月dd日 HH时mm分ss秒"==t&&(d="".concat(r,"年").concat(o,"月").concat(a,"日 ").concat(s,"时").concat(l,"分").concat(c,"秒")),d},e.debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(n){var i=n;clearTimeout(e.id),e.id=setTimeout(function(){e.call(void 0,i)},t)}},e.deepClone=function e(t){var n=function(e){return Object.prototype.toString.call(e).slice(8,-1)};if(["Null","String","Boolean","Number","Undefined","Function"].includes(n(t)))return t;if("RegExp"===n(t))return new RegExp(t);if("Date"===n(t))return new Date(t);var i="Array"===n(t)?[]:{};for(var r in t)i[r]=e(t[r]);return i},e.download=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=document.createElement("a");if(i.setAttribute("download",n),i.setAttribute("href",e),navigator.msSaveBlob){var r=Blob([e],{type:t});return navigator.msSaveBlob(r,n)}i.click()},e.getSearchParams=function(e){var t=new URLSearchParams(decodeURI(window.location.search)),i={};return n(t.keys()).forEach(function(e){i[e]=t.get(e)}),e?t.get(e):i},e.openApp=function(e){var t=e.url,n=e.params;if(t){var i=new URLSearchParams(n);window.location=i.toString()?"".concat(t,"?").concat(i.toString()):t}else console.error("url 错误")},e.removeArrRepeat=function(e,i){if(e.length&&t("object"!==e[0]))return n(new Set(e));var r={};return e.reduce(function(e,t){return!r[t[i]]&&(r[t[i]]=e.push(t)),e},[])},e.viewImg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;if("IMG"===e.target.nodeName&&e.target.currentSrc){var t=document.createElement("div"),n=document.createElement("img");t.setAttribute("style","position: fixed;\n z-index: 2001;\n display: flex;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n background: rgb(0 0 0 / 33%);\n height: 100%;\n top: 0;"),t.setAttribute("id","remons-view-box"),n.setAttribute("src",e.target.currentSrc),n.setAttribute("style","max-height: 100%; max-weight: 100%"),n.setAttribute("id","remons-view-img"),document.body.appendChild(t),document.querySelector("#remons-view-box").appendChild(n);var i=document.querySelector("#remons-view-box");i&&i.addEventListener("click",function(){document.body.removeChild(i)})}},e.watchScroll=function(e,t){t||(t=1e3);(arguments.length>2&&void 0!==arguments[2]?arguments[2]:window).onscroll=function(e,t){var n=null;return function(){n&&clearTimeout(n),n=setTimeout(e,t)}}(e,t)},Object.defineProperty(e,"__esModule",{value:!0})})}),ue=de(),he=!1,pe={false:"push",true:"unshift",after:"push",before:"unshift"},me={isPermalinkSymbol:!0};function fe(e,t,n,i){var r;if(!he){var o="Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks";"object"==typeof process&&process&&process.emitWarning?process.emitWarning(o):console.warn(o),he=!0}var a=[Object.assign(new n.Token("link_open","a",1),{attrs:[].concat(t.permalinkClass?[["class",t.permalinkClass]]:[],[["href",t.permalinkHref(e,n)]],Object.entries(t.permalinkAttrs(e,n)))}),Object.assign(new n.Token("html_block","",0),{content:t.permalinkSymbol,meta:me}),new n.Token("link_close","a",-1)];t.permalinkSpace&&n.tokens[i+1].children[pe[t.permalinkBefore]](Object.assign(new n.Token("text","",0),{content:" "})),(r=n.tokens[i+1].children)[pe[t.permalinkBefore]].apply(r,a)}function ve(e){return"#"+e}function ge(e){return{}}var we={class:"header-anchor",symbol:"#",renderHref:ve,renderAttrs:ge};function be(e){function t(n){return n=Object.assign({},t.defaults,n),function(t,i,r,o){return e(t,n,i,r,o)}}return t.defaults=Object.assign({},we),t.renderPermalinkImpl=e,t}function ye(e){var t=[],n=e.filter(function(e){if("class"!==e[0])return!0;t.push(e[1])});return t.length>0&&n.unshift(["class",t.join(" ")]),n}var ke=be(function(e,t,n,i,r){var o,a=[Object.assign(new i.Token("link_open","a",1),{attrs:ye([].concat(t.class?[["class",t.class]]:[],[["href",t.renderHref(e,i)]],t.ariaHidden?[["aria-hidden","true"]]:[],Object.entries(t.renderAttrs(e,i))))}),Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:me}),new i.Token("link_close","a",-1)];if(t.space){var s="string"==typeof t.space?t.space:" ";i.tokens[r+1].children[pe[t.placement]](Object.assign(new i.Token("string"==typeof t.space?"html_inline":"text","",0),{content:s}))}(o=i.tokens[r+1].children)[pe[t.placement]].apply(o,a)});Object.assign(ke.defaults,{space:!0,placement:"after",ariaHidden:!1});var xe=be(ke.renderPermalinkImpl);xe.defaults=Object.assign({},ke.defaults,{ariaHidden:!0});var Se=be(function(e,t,n,i,r){var o=[Object.assign(new i.Token("link_open","a",1),{attrs:ye([].concat(t.class?[["class",t.class]]:[],[["href",t.renderHref(e,i)]],Object.entries(t.renderAttrs(e,i))))})].concat(t.safariReaderFix?[new i.Token("span_open","span",1)]:[],i.tokens[r+1].children,t.safariReaderFix?[new i.Token("span_close","span",-1)]:[],[new i.Token("link_close","a",-1)]);i.tokens[r+1].children=o});Object.assign(Se.defaults,{safariReaderFix:!1});var _e=be(function(e,t,n,i,r){var o;if(!["visually-hidden","aria-label","aria-describedby","aria-labelledby"].includes(t.style))throw new Error("`permalink.linkAfterHeader` called with unknown style option `"+t.style+"`");if(!["aria-describedby","aria-labelledby"].includes(t.style)&&!t.assistiveText)throw new Error("`permalink.linkAfterHeader` called without the `assistiveText` option in `"+t.style+"` style");if("visually-hidden"===t.style&&!t.visuallyHiddenClass)throw new Error("`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style");var a=i.tokens[r+1].children.filter(function(e){return"text"===e.type||"code_inline"===e.type}).reduce(function(e,t){return e+t.content},""),s=[],l=[];if(t.class&&l.push(["class",t.class]),l.push(["href",t.renderHref(e,i)]),l.push.apply(l,Object.entries(t.renderAttrs(e,i))),"visually-hidden"===t.style){if(s.push(Object.assign(new i.Token("span_open","span",1),{attrs:[["class",t.visuallyHiddenClass]]}),Object.assign(new i.Token("text","",0),{content:t.assistiveText(a)}),new i.Token("span_close","span",-1)),t.space){var c="string"==typeof t.space?t.space:" ";s[pe[t.placement]](Object.assign(new i.Token("string"==typeof t.space?"html_inline":"text","",0),{content:c}))}s[pe[t.placement]](Object.assign(new i.Token("span_open","span",1),{attrs:[["aria-hidden","true"]]}),Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:me}),new i.Token("span_close","span",-1))}else s.push(Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:me}));"aria-label"===t.style?l.push(["aria-label",t.assistiveText(a)]):["aria-describedby","aria-labelledby"].includes(t.style)&&l.push([t.style,e]);var d=[Object.assign(new i.Token("link_open","a",1),{attrs:ye(l)})].concat(s,[new i.Token("link_close","a",-1)]);(o=i.tokens).splice.apply(o,[r+3,0].concat(d)),t.wrapper&&(i.tokens.splice(r,0,Object.assign(new i.Token("html_block","",0),{content:t.wrapper[0]+"\n"})),i.tokens.splice(r+3+d.length+1,0,Object.assign(new i.Token("html_block","",0),{content:t.wrapper[1]+"\n"})))});function Ce(e,t,n,i){var r=e,o=i;if(n&&Object.prototype.hasOwnProperty.call(t,r))throw new Error("User defined `id` attribute `"+e+"` is not unique. Please fix it in your Markdown to continue.");for(;Object.prototype.hasOwnProperty.call(t,r);)r=e+"-"+o,o+=1;return t[r]=!0,r}function Ee(e,t){t=Object.assign({},Ee.defaults,t),e.core.ruler.push("anchor",function(e){for(var n,i={},r=e.tokens,o=Array.isArray(t.level)?(n=t.level,function(e){return n.includes(e)}):function(e){return function(t){return t>=e}}(t.level),a=0;a<r.length;a++){var s=r[a];if("heading_open"===s.type&&o(Number(s.tag.substr(1)))){var l=t.getTokensText(r[a+1].children),c=s.attrGet("id");c=null==c?Ce(c=t.slugifyWithState?t.slugifyWithState(l,e):t.slugify(l),i,!1,t.uniqueSlugStartIndex):Ce(c,i,!0,t.uniqueSlugStartIndex),s.attrSet("id",c),!1!==t.tabIndex&&s.attrSet("tabindex",""+t.tabIndex),"function"==typeof t.permalink?t.permalink(c,t,e,a):(t.permalink||t.renderPermalink&&t.renderPermalink!==fe)&&t.renderPermalink(c,t,e,a),a=r.indexOf(s),t.callback&&t.callback(s,{slug:c,title:l})}}})}function Ae(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-"))}function Te(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Me(e,t){var n;t=Object.assign({},{placeholder:"(\\$\\{toc\\}|\\[\\[?_?toc_?\\]?\\]|\\$\\<toc(\\{[^}]*\\})\\>)",slugify:Ae,uniqueSlugStartIndex:1,containerClass:"table-of-contents",containerId:void 0,listClass:void 0,itemClass:void 0,linkClass:void 0,level:1,listType:"ol",format:void 0,callback:void 0},t);var i=new RegExp("^"+t.placeholder+"$","i");e.renderer.rules.tocOpen=function(e,n){var i=Object.assign({},t);return e&&n>=0&&(i=Object.assign(i,e[n].inlineOptions)),"<nav"+(i.containerId?' id="'+Te(i.containerId)+'"':"")+' class="'+Te(i.containerClass)+'">'},e.renderer.rules.tocClose=function(){return"</nav>"},e.renderer.rules.tocBody=function(e,i){var r=Object.assign({},t);e&&i>=0&&(r=Object.assign(r,e[i].inlineOptions));var o,a={},s=Array.isArray(r.level)?(o=r.level,function(e){return o.includes(e)}):function(e){return function(t){return t>=e}}(r.level);return function e(n){var i=r.listClass?' class="'+Te(r.listClass)+'"':"",o=r.itemClass?' class="'+Te(r.itemClass)+'"':"",l=r.linkClass?' class="'+Te(r.linkClass)+'"':"";if(0===n.c.length)return"";var c="";return(0===n.l||s(n.l))&&(c+="<"+(Te(r.listType)+i)+">"),n.c.forEach(function(n){s(n.l)?c+="<li"+o+"><a"+l+' href="#'+function(e){for(var t=e,n=r.uniqueSlugStartIndex;Object.prototype.hasOwnProperty.call(a,t);)t=e+"-"+n++;return a[t]=!0,t}(t.slugify(n.n))+'">'+("function"==typeof r.format?r.format(n.n,Te):Te(n.n))+"</a>"+e(n)+"</li>":c+=e(n)}),(0===n.l||s(n.l))&&(c+="</"+Te(r.listType)+">"),c}(n)},e.core.ruler.push("generateTocAst",function(i){n=function(e){for(var t={l:0,n:"",c:[]},n=[t],i=0,r=e.length;i<r;i++){var o=e[i];if("heading_open"===o.type){var a=e[i+1].children.filter(function(e){return"text"===e.type||"code_inline"===e.type}).reduce(function(e,t){return e+t.content},""),s={l:parseInt(o.tag.substr(1),10),n:a,c:[]};if(s.l>n[0].l)n[0].c.push(s),n.unshift(s);else if(s.l===n[0].l)n[1].c.push(s),n[0]=s;else{for(;s.l<=n[0].l;)n.shift();n[0].c.push(s),n.unshift(s)}}}return t}(i.tokens),"function"==typeof t.callback&&t.callback(e.renderer.rules.tocOpen()+e.renderer.rules.tocBody()+e.renderer.rules.tocClose(),n)}),e.block.ruler.before("heading","toc",function(e,t,n,r){var o,a=e.src.slice(e.bMarks[t]+e.tShift[t],e.eMarks[t]).split(" ")[0];if(!i.test(a))return!1;if(r)return!0;var s=i.exec(a),l={};if(null!==s&&3===s.length)try{l=JSON.parse(s[2])}catch(e){}return e.line=t+1,(o=e.push("tocOpen","nav",1)).markup="",o.map=[t,e.line],o.inlineOptions=l,(o=e.push("tocBody","",0)).markup="",o.map=[t,e.line],o.inlineOptions=l,o.children=[],(o=e.push("tocClose","nav",-1)).markup="",!0},{alt:["paragraph","reference","blockquote"]})}Object.assign(_e.defaults,{style:"visually-hidden",space:!0,placement:"after",wrapper:null}),Ee.permalink={__proto__:null,legacy:fe,renderHref:ve,renderAttrs:ge,makePermalink:be,linkInsideHeader:ke,ariaHidden:xe,headerLink:Se,linkAfterHeader:_e},Ee.defaults={level:1,slugify:function(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-"))},uniqueSlugStartIndex:1,tabIndex:"-1",getTokensText:function(e){return e.filter(function(e){return["text","code_inline"].includes(e.type)}).map(function(e){return e.content}).join("")},permalink:!1,renderPermalink:fe,permalinkClass:xe.defaults.class,permalinkSpace:xe.defaults.space,permalinkSymbol:"¶",permalinkBefore:"before"===xe.defaults.placement,permalinkHref:xe.defaults.renderHref,permalinkAttrs:xe.defaults.renderAttrs},Ee.default=Ee;var Oe={exports:{}};function Le(e,t){t=t?Array.isArray(t)?t:[t]:[],Object.freeze(t);var n=e.renderer.rules.link_open||this.defaultRender;e.renderer.rules.link_open=function(e,i,r,o,a){var s=function(e,t){var n,i,r=e.attrs[e.attrIndex("href")][1];for(n=0;n<t.length;++n){if("function"!=typeof(i=t[n]).matcher)return i;if(i.matcher(r,i))return i}}(e[i],t),l=s&&s.attrs;return l&&function(e,t,n){Object.keys(n).forEach(function(i){var r,o=n[i];"className"===i&&(i="class"),(r=t[e].attrIndex(i))<0?t[e].attrPush([i,o]):t[e].attrs[r][1]=o})}(i,e,l),n(e,i,r,o,a)}}Le.defaultRender=function(e,t,n,i,r){return r.renderToken(e,t,n)},Oe.exports=Le;var Pe=(null==Oe.exports?{}:Oe.exports).default||Oe.exports,Ie={exports:{}},$e=Ie.exports,ze="__lodash_hash_undefined__",je=9007199254740991,Ne="[object Arguments]",De="[object Boolean]",Re="[object Date]",He="[object Function]",Be="[object GeneratorFunction]",Fe="[object Map]",qe="[object Number]",We="[object Object]",Xe="[object Promise]",Ye="[object RegExp]",Ve="[object Set]",Ue="[object String]",Ze="[object Symbol]",Ge="[object WeakMap]",Ke="[object ArrayBuffer]",Je="[object DataView]",Qe="[object Float32Array]",et="[object Float64Array]",tt="[object Int8Array]",nt="[object Int16Array]",it="[object Int32Array]",rt="[object Uint8Array]",ot="[object Uint8ClampedArray]",at="[object Uint16Array]",st="[object Uint32Array]",lt=/\w*$/,ct=/^\[object .+?Constructor\]$/,dt=/^(?:0|[1-9]\d*)$/,ut={};ut[Ne]=ut["[object Array]"]=ut[Ke]=ut[Je]=ut[De]=ut[Re]=ut[Qe]=ut[et]=ut[tt]=ut[nt]=ut[it]=ut[Fe]=ut[qe]=ut[We]=ut[Ye]=ut[Ve]=ut[Ue]=ut[Ze]=ut[rt]=ut[ot]=ut[at]=ut[st]=!0,ut["[object Error]"]=ut[He]=ut[Ge]=!1;var ht="object"==typeof global&&global&&global.Object===Object&&global||"object"==typeof self&&self&&self.Object===Object&&self||Function("return this")(),pt="object"==typeof $e&&$e&&!$e.nodeType&&$e,mt=pt&&"object"==typeof Ie&&Ie&&!Ie.nodeType&&Ie,ft=mt&&mt.exports===pt;function vt(e,t){return e.set(t[0],t[1]),e}function gt(e,t){return e.add(t),e}function wt(e,t,n,i){var r=-1,o=e?e.length:0;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function bt(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(Sr){}return t}function yt(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}function kt(e,t){return function(n){return e(t(n))}}function xt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var St,_t=Array.prototype,Ct=Function.prototype,Et=Object.prototype,At=ht["__core-js_shared__"],Tt=(St=/[^.]+$/.exec(At&&At.keys&&At.keys.IE_PROTO||""))?"Symbol(src)_1."+St:"",Mt=Ct.toString,Ot=Et.hasOwnProperty,Lt=Et.toString,Pt=RegExp("^"+Mt.call(Ot).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),It=ft?ht.Buffer:void 0,$t=ht.Symbol,zt=ht.Uint8Array,jt=kt(Object.getPrototypeOf,Object),Nt=Object.create,Dt=Et.propertyIsEnumerable,Rt=_t.splice,Ht=Object.getOwnPropertySymbols,Bt=It?It.isBuffer:void 0,Ft=kt(Object.keys,Object),qt=fn(ht,"DataView"),Wt=fn(ht,"Map"),Xt=fn(ht,"Promise"),Yt=fn(ht,"Set"),Vt=fn(ht,"WeakMap"),Ut=fn(Object,"create"),Zt=yn(qt),Gt=yn(Wt),Kt=yn(Xt),Jt=yn(Yt),Qt=yn(Vt),en=$t?$t.prototype:void 0,tn=en?en.valueOf:void 0;function nn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function rn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function on(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function an(e){this.__data__=new rn(e)}function sn(e,t){var n=xn(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Sn(e)}(e)&&Ot.call(e,"callee")&&(!Dt.call(e,"callee")||Lt.call(e)==Ne)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var o in e)!t&&!Ot.call(e,o)||r&&("length"==o||wn(o,i))||n.push(o);return n}function ln(e,t,n){var i=e[t];Ot.call(e,t)&&kn(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function cn(e,t){for(var n=e.length;n--;)if(kn(e[n][0],t))return n;return-1}function dn(e,t,n,i,r,o,a){var s;if(i&&(s=o?i(e,r,o,a):i(e)),void 0!==s)return s;if(!En(e))return e;var l=xn(e);if(l){if(s=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&Ot.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,s)}else{var c=gn(e),d=c==He||c==Be;if(_n(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(c==We||c==Ne||d&&!o){if(bt(e))return o?e:{};if(s=function(e){return"function"!=typeof e.constructor||bn(e)?{}:(t=jt(e),En(t)?Nt(t):{});var t}(d?{}:e),!t)return function(e,t){return pn(e,vn(e),t)}(e,function(e,t){return e&&pn(t,An(t),e)}(s,e))}else{if(!ut[c])return o?e:{};s=function(e,t,n,i){var r=e.constructor;switch(t){case Ke:return hn(e);case De:case Re:return new r(+e);case Je:return function(e,t){var n=t?hn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case Qe:case et:case tt:case nt:case it:case rt:case ot:case at:case st:return function(e,t){var n=t?hn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case Fe:return function(e,t,n){return wt(t?n(yt(e),!0):yt(e),vt,new e.constructor)}(e,i,n);case qe:case Ue:return new r(e);case Ye:return function(e){var t=new e.constructor(e.source,lt.exec(e));return t.lastIndex=e.lastIndex,t}(e);case Ve:return function(e,t,n){return wt(t?n(xt(e),!0):xt(e),gt,new e.constructor)}(e,i,n);case Ze:return o=e,tn?Object(tn.call(o)):{}}var o}(e,c,dn,t)}}a||(a=new an);var u=a.get(e);if(u)return u;if(a.set(e,s),!l)var h=n?function(e){return function(e,t,n){var i=t(e);return xn(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,An,vn)}(e):An(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(h||e,function(r,o){h&&(r=e[o=r]),ln(s,o,dn(r,t,n,i,o,e,a))}),s}function un(e){return!(!En(e)||(t=e,Tt&&Tt in t))&&(Cn(e)||bt(e)?Pt:ct).test(yn(e));var t}function hn(e){var t=new e.constructor(e.byteLength);return new zt(t).set(new zt(e)),t}function pn(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):void 0;ln(n,a,void 0===s?e[a]:s)}return n}function mn(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function fn(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return un(n)?n:void 0}nn.prototype.clear=function(){this.__data__=Ut?Ut(null):{}},nn.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},nn.prototype.get=function(e){var t=this.__data__;if(Ut){var n=t[e];return n===ze?void 0:n}return Ot.call(t,e)?t[e]:void 0},nn.prototype.has=function(e){var t=this.__data__;return Ut?void 0!==t[e]:Ot.call(t,e)},nn.prototype.set=function(e,t){return this.__data__[e]=Ut&&void 0===t?ze:t,this},rn.prototype.clear=function(){this.__data__=[]},rn.prototype.delete=function(e){var t=this.__data__,n=cn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Rt.call(t,n,1),!0)},rn.prototype.get=function(e){var t=this.__data__,n=cn(t,e);return n<0?void 0:t[n][1]},rn.prototype.has=function(e){return cn(this.__data__,e)>-1},rn.prototype.set=function(e,t){var n=this.__data__,i=cn(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},on.prototype.clear=function(){this.__data__={hash:new nn,map:new(Wt||rn),string:new nn}},on.prototype.delete=function(e){return mn(this,e).delete(e)},on.prototype.get=function(e){return mn(this,e).get(e)},on.prototype.has=function(e){return mn(this,e).has(e)},on.prototype.set=function(e,t){return mn(this,e).set(e,t),this},an.prototype.clear=function(){this.__data__=new rn},an.prototype.delete=function(e){return this.__data__.delete(e)},an.prototype.get=function(e){return this.__data__.get(e)},an.prototype.has=function(e){return this.__data__.has(e)},an.prototype.set=function(e,t){var n=this.__data__;if(n instanceof rn){var i=n.__data__;if(!Wt||i.length<199)return i.push([e,t]),this;n=this.__data__=new on(i)}return n.set(e,t),this};var vn=Ht?kt(Ht,Object):function(){return[]},gn=function(e){return Lt.call(e)};function wn(e,t){return!!(t=null==t?je:t)&&("number"==typeof e||dt.test(e))&&e>-1&&e%1==0&&e<t}function bn(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Et)}function yn(e){if(null!=e){try{return Mt.call(e)}catch(Sr){}try{return e+""}catch(Sr){}}return""}function kn(e,t){return e===t||e!=e&&t!=t}(qt&&gn(new qt(/* @__PURE__ */new ArrayBuffer(1)))!=Je||Wt&&gn(new Wt)!=Fe||Xt&&gn(Xt.resolve())!=Xe||Yt&&gn(new Yt)!=Ve||Vt&&gn(new Vt)!=Ge)&&(gn=function(e){var t=Lt.call(e),n=t==We?e.constructor:void 0,i=n?yn(n):void 0;if(i)switch(i){case Zt:return Je;case Gt:return Fe;case Kt:return Xe;case Jt:return Ve;case Qt:return Ge}return t});var xn=Array.isArray;function Sn(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=je}(e.length)&&!Cn(e)}var _n=Bt||function(){return!1};function Cn(e){var t=En(e)?Lt.call(e):"";return t==He||t==Be}function En(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function An(e){return Sn(e)?sn(e):function(e){if(!bn(e))return Ft(e);var t=[];for(var n in Object(e))Ot.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}Ie.exports=function(e){return dn(e,!0,!0)};var Tn=(null==Ie.exports?{}:Ie.exports).default||Ie.exports,Mn=(String.raw`\$&`,e=>e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")),On="@tab",Ln=`${On}:active`,Pn=Ln.length,In=Symbol("tab:name"),$n=Symbol("tab:level"),zn=(e,t,n)=>{if(64!==e.src.charCodeAt(t))return!1;let i=1;for(;i<Pn&&Ln.charCodeAt(i)===e.src.charCodeAt(t+i);i++);let r=i===Pn;if(!r&&4!==i)return!1;let o=t+i,a=e.skipSpaces(o);return a>o&&a<n&&{isActive:r,pos:a}},jn=(e,t)=>{let{name:n="tabs",openRenderer:i=t=>{let{active:i,data:r,id:o}=t,a=r.map(({title:t,id:r},o)=>`<button type="button" class="${n}-tab-button${i===o?" active":""}" data-tab="${o}"${r?` data-id="${Mn(r)}"`:""}${i===o?" data-active":""}>${e.renderInline(t)}</button>`);return`<div class="${n}-tabs-wrapper"${o?` data-id="${e.utils.escapeHtml(o)}"`:""}>\n <div class="${n}-tabs-header">\n ${a.join("\n ")}\n </div>\n <div class="${n}-tabs-container">\n`},closeRenderer:r=()=>" </div>\n</div>\n",tabOpenRenderer:o=t=>{let{index:i,id:r,isActive:o}=t;return`<div class="${n}-tab-content${o?" active":""}" data-index="${i}"${r?` data-id="${e.utils.escapeHtml(r)}"`:""}${o?' data-active=""':""}>\n`},tabCloseRenderer:a=()=>"</div>\n"}=t??{},s=(e=>t=>{let n=t.tokens;for(let i=0;i<n.length;i++){let t=n[i];if(t.type!==`${e}_tabs_open`)continue;let r=[],o=-1,a=!1,s=0,{level:l}=t;for(let d=i+1;d<n.length;d++){let t=n[d],i=t.meta,c=t.type;if(c!==`${e}_tabs_open`)if(c!==`${e}_tabs_close`)t.level>l+1||s>0?a||(t.type=`${e}_tabs_empty`,t.hidden=!0):c!==`${e}_tab_open`?c!==`${e}_tab_close`&&(t.type=`${e}_tabs_empty`,t.hidden=!0):(a=!0,i.index=r.length,i.active&&(-1===o?o=r.length:i.active=!1),r.push({title:t.info,index:r.length,id:i.id,isActive:i.active}));else{if(t.level===l)break;s--}else s++}let c=t.meta;c.tabsData={active:o,data:r,id:c.id}}})(n);e.block.ruler.before("fence",`${n}_tabs`,(e=>(t,n,i,r)=>{let o=t.bMarks[n]+t.tShift[n];if(58!==t.src.charCodeAt(o))return!1;let a=t.eMarks[n],s=o+1;for(;s<=a&&58===t.src.charCodeAt(s);)s++;let l=s-o;if(l<3)return!1;s=t.skipSpaces(s);for(let S=0;S<e.length;S++){if(t.src.charCodeAt(s)!==e.charCodeAt(S))return!1;s++}let c,d=0;for(;s!==a;){if(c=t.src.charCodeAt(s++),35===c){d=s;break}if(!t.md.utils.isSpace(c))return!1}if(r)return!0;let u=t.sCount[n],h=n+1,p=!1;for(;h<i;h++){let e=t.bMarks[h]+t.tShift[h],n=t.eMarks[h];if(e<n&&t.sCount[h]<u)break;if(t.sCount[h]===u&&58===t.src.charCodeAt(e)){for(s=e+1;s<=n&&58===t.src.charCodeAt(s);s++);if(s-e>=l&&(s=t.skipSpaces(s),s>=n)){p=!0;break}}}let m=t.parentType,f=t.lineMax,v=t.blkIndent,g=t.env[In],w=t.env[$n];t.parentType=`${e}_tabs`,t.lineMax=h-+!!p,t.blkIndent=u;let b=":".repeat(l),y="";if(d){d=t.skipSpaces(d);let e=t.skipSpacesBack(a,d);d<e&&(y=t.src.slice(d,e))}let k=t.push(`${e}_tabs_open`,"",1);k.markup=b,k.block=!0,k.info=e,k.meta=y?{id:y}:{},k.map=[n,h-+!!p],t.env[In]=e,t.env[$n]=t.level,t.md.block.tokenize(t,n+1,h-+!!p),t.env[In]=g,t.env[$n]=w;let x=t.push(`${e}_tabs_close`,"",-1);return x.markup=b,x.block=!0,t.parentType=m,t.lineMax=f,t.blkIndent=v,t.line=h+ +!!p,!0})(n),{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph",`${n}_tab`,(e=>(t,n,i,r)=>{if(t.env[In]!==e||t.level!==t.env[$n])return!1;let o=t.bMarks[n]+t.tShift[n],a=t.eMarks[n],s=zn(t,o,a);if(!1===s)return!1;if(r)return!0;let l=t.sCount[n],c=n+1,d=!1;for(;c<i;c++){let e=t.bMarks[c]+t.tShift[c];if(t.sCount[c]===l&&"@"===t.src[e]&&zn(t,e,t.eMarks[c])){d=!0;break}}let u=t.parentType,h=t.lineMax,p=t.blkIndent;t.parentType="tab",t.lineMax=c-+!!d,t.blkIndent=l;let m,f=t.push(`${e}_tab_open`,"",1),v=s.pos,g=t.skipSpacesBack(a,v),w=g;for(;w>v;){if(35===t.src.charCodeAt(w)){for(m=w-1;92===t.src.charCodeAt(m);)m--;if((w-m)%2==1)break}w--}let b,y="";w===v?b=t.src.slice(v,g):(y=t.src.slice(t.skipSpaces(w+1),g),b=t.src.slice(v,t.skipSpacesBack(w,v))),f.block=!0,f.markup=On,f.info=b,f.meta={active:s.isActive},y&&(f.meta.id=y),f.map=[n,c-+!!d],t.md.block.tokenize(t,n+1,c+ +!d);let k=t.push(`${e}_tab_close`,"",-1);return k.block=!0,k.markup="",t.parentType=u,t.lineMax=h,t.blkIndent=p,t.line=c+ +!d,!0})(n),{alt:["paragraph","reference","blockquote","list"]}),e.core.ruler.push(`${n}_tabs_core`,s),e.renderer.rules[`${n}_tabs_open`]=(e,t,n,r,o)=>{let a=e[t].meta;return i(a.tabsData??{active:-1,data:[],id:a.id},e,t,n,r,o)},e.renderer.rules[`${n}_tabs_close`]=r,e.renderer.rules[`${n}_tab_open`]=(e,t,n,i,r)=>{let a=((e,t)=>{let n=e[t],i=n.meta;return{title:n.info,index:i.index,id:i.id,isActive:i.active}})(e,t);return o(a,e,t,n,i,r)},e.renderer.rules[`${n}_tab_close`]=a},Nn={note:'<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>',tip:'<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>',important:'<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',warning:'<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',caution:'<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'},Dn=(e,t={})=>{const{markers:n=["TIP","NOTE","IMPORTANT","WARNING","CAUTION"],icons:i=Nn,matchCaseSensitive:r=!1,titles:o={},classPrefix:a="markdown-alert"}=t,s="*"===n?"\\w+":n.join("|"),l=new RegExp(`^\\\\?\\[\\!(${s})\\]([^\\n\\r]*)`,r?"":"i");e.core.ruler.after("block","github-alerts",e=>{const t=e.tokens;for(let n=0;n<t.length;n++)if("blockquote_open"===t[n].type){const e=t[n],r=n;for(;"blockquote_close"!==t[n]?.type&&n<=t.length;)n+=1;const a=t[n],s=t.slice(r,n+1).find(e=>"inline"===e.type);if(!s)continue;const c=s.content.match(l);if(!c)continue;const d=c[1].toLowerCase(),u=c[2].trim()||(o[d]??Rn(d)),h=i[d]??"";s.content=s.content.slice(c[0].length).trimStart(),e.type="alert_open",e.tag="div",e.meta={title:u,type:d,icon:h},a.type="alert_close",a.tag="div"}}),e.renderer.rules.alert_open=function(e,t){const{title:n,type:i,icon:r}=e[t].meta;return`<div class="${a} ${a}-${i}"><p class="${a}-title">${r}${n}</p>`}};function Rn(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Hn={exports:{}},Bn=!0,Fn=!1,qn=!1;function Wn(e,t,n){var i=e.attrIndex(t),r=[t,n];i<0?e.attrPush(r):e.attrs[i]=r}function Xn(e,t){for(var n=e[t].level-1,i=t-1;i>=0;i--)if(e[i].level===n)return i;return-1}function Yn(e,t){return"inline"===e[t].type&&function(e){return"paragraph_open"===e.type}(e[t-1])&&function(e){return"list_item_open"===e.type}(e[t-2])&&function(e){return 0===e.content.indexOf("[ ] ")||0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] ")}(e[t])}function Vn(e,t){if(e.children.unshift(function(e,t){var n=new t("html_inline","",0),i=Bn?' disabled="" ':"";0===e.content.indexOf("[ ] ")?n.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':0!==e.content.indexOf("[x] ")&&0!==e.content.indexOf("[X] ")||(n.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">');return n}(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),Fn)if(qn){e.children.pop();var n="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(function(e,t,n){var i=new n("html_inline","",0);return i.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",i.attrs=[{for:t}],i}(e.content,n,t))}else e.children.unshift(function(e){var t=new e("html_inline","",0);return t.content="<label>",t}(t)),e.children.push(function(e){var t=new e("html_inline","",0);return t.content="</label>",t}(t))}Hn.exports=function(e,t){t&&(Bn=!t.enabled,Fn=!!t.label,qn=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(e){for(var t=e.tokens,n=2;n<t.length;n++)Yn(t,n)&&(Vn(t[n],e.Token),Wn(t[n-2],"class","task-list-item"+(Bn?"":" enabled")),Wn(t[Xn(t,n-2)],"class","contains-task-list"))})};var Un=(null==Hn.exports?{}:Hn.exports).default||Hn.exports,Zn={note:"注",tip:"提示",important:"重要",warning:"注意",caution:"警告"},Gn={note:'<i class="iconfont icon-note"></i>',tip:'<i class="iconfont icon-tip"></i>',important:'<i class="iconfont icon-important"></i>',warning:'<i class="iconfont icon-warning"></i>',caution:'<i class="iconfont icon-caution"></i>'};function Kn(e){return e.replace(/[\u{1F000}-\u{1FFFF}\u{200D}\u{FE0F}\u{2600}-\u{27BF}\u{2300}-\u{23FF}\u{2700}-\u{27BF}]/gu,"").trim()}var Jn="markdown-tabs",Qn=null,ei=null;function ti(){document.querySelectorAll(`.${Jn}-tabs-wrapper`).forEach(e=>{const t=e.querySelector(`.${Jn}-tabs-header`),n=e.querySelector(`.${Jn}-tabs-container`);if(!t||!n)return;if(t.dataset.clickInited)return;t.dataset.clickInited="true";const i=n.querySelectorAll(`.${Jn}-tab-content`),r=document.querySelector(".markdown");t.addEventListener("click",e=>{const n=e.target.closest(`.${Jn}-tab-button`);if(!n||!t.contains(n))return;const o=t.querySelectorAll(`.${Jn}-tab-button`),a=Array.from(o).indexOf(n);o.forEach(e=>e.classList.remove("active")),i.forEach(e=>e.classList.remove("active")),n.classList.add("active"),i[a]&&i[a].classList.add("active");const s=n.offsetParent;s&&r?.scrollTop&&s.offsetTop&&r?.scrollTop>s.offsetTop&&r?.scrollTo({top:s.offsetTop,behavior:"smooth"})})}),function(){const e=document.querySelector(".markdown");e&&!e.dataset.scrollListenInited&&(e.dataset.scrollListenInited="true",e?.addEventListener("wheel",e=>{const t=e,n=e.target?.closest(`.${Jn}-tabs-header`);n&&0!==Math.abs(t.deltaY)&&n.scrollWidth>n.clientWidth&&(e.preventDefault(),n.scrollLeft+=t.deltaY)},{passive:!1}))}(),function(){const e=document.querySelector(".markdown");function t(e){if(e.dataset.maskInited)return;e.parentElement.dataset.maskInited="true";const t=()=>{const{scrollLeft:t,scrollWidth:n,clientWidth:i}=e,r=t>1,o=t+i<n-1;e.parentElement.classList.remove("has-left-mask","has-right-mask","has-both-masks"),r&&o?e.parentElement.classList.add("has-both-masks"):r?e.parentElement.classList.add("has-left-mask"):o&&e.parentElement.classList.add("has-right-mask")};e.addEventListener("scroll",t),t()}document.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>t(e)),Qn&&(Qn.disconnect(),Qn=null),Qn=new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(1!==e.nodeType)return;const n=e;n.classList.contains("markdown-tabs-tabs-header")&&t(n),n.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>t(e))})})}),e&&Qn.observe(e,{childList:!0,subtree:!0}),ei&&window.removeEventListener("resize",ei),ei=()=>{document.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>{e.dispatchEvent(new Event("scroll"))})},window.addEventListener("resize",ei)}()}var ni="0.18.1",ii=`https://registry.npmmirror.com/katex/${ni}/files/dist/katex.min.css`,ri=`https://registry.npmmirror.com/katex/${ni}/files/dist/katex.min.js`,oi=null;function ai(e,t={}){const n={throwOnError:!1,errorColor:"#cc0000",...t};function i(e,t){try{return function(){if(!window.katex)throw new Error("[katex-loader] KaTeX not loaded. Call ensureKatexLoaded() first.");return window.katex}().renderToString(e,{...n,displayMode:t})}catch(Sr){const i=Sr instanceof Error?Sr.message:String(Sr);return`<span style="color:${n.errorColor}" title="${r(i)}">${r(e)}</span>`}}function r(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}"undefined"!=typeof window&&window.katex||console.warn("[markdown-it-katex] KaTeX is not loaded yet. Call `await ensureKatexLoaded()` before using this plugin, or use `renderWithKatex()` helper instead."),e.inline.ruler.before("emphasis","katex_inline",(e,t)=>{if(36!==e.src.charCodeAt(e.pos))return!1;if(36===e.src.charCodeAt(e.pos+1))return!1;if(e.pos>0&&92===e.src.charCodeAt(e.pos-1))return!1;const n=e.pos+1;if(n>=e.posMax)return!1;if(/\s/.test(e.src[n]))return!1;let i=n;for(;i<e.posMax&&(36!==e.src.charCodeAt(i)||92===e.src.charCodeAt(i-1));)i++;if(i>=e.posMax)return!1;if(i===n)return!1;if(/\s/.test(e.src[i-1]))return!1;if(!t){const t=e.push("katex_inline","math",0);t.markup="$",t.content=e.src.slice(n,i)}return e.pos=i+1,!0}),e.block.ruler.after("blockquote","katex_block",(e,t,n,i)=>{const r=e.bMarks[t]+e.tShift[t];if(r+2>e.eMarks[t]||"$$"!==e.src.slice(r,r+2))return!1;if(i)return!0;let o=t+1,a=!1;for(;o<n;){const t=e.bMarks[o]+e.tShift[o];if("$$"===e.src.slice(t,e.eMarks[o]).trim()){a=!0;break}o++}const s=e.bMarks[t+1],l=a?e.bMarks[o]:e.eMarks[n-1];e.line=o+(a?1:0);const c=e.push("katex_block","math",0);return c.block=!0,c.markup="$$",c.content=e.src.slice(s,l).trim(),c.map=[t,e.line],!0}),e.renderer.rules.katex_inline=(e,t)=>i(e[t].content,!1),e.renderer.rules.katex_block=(e,t)=>`<div class="katex-block">${i(e[t].content,!0)}</div>\n`}function si(e){return"string"!=typeof e?"":e.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"").replace(/-+/g,"-")}function li(e){return e?e.map(e=>({href:si(e.n.trim()),title:e.n.trim(),children:li(e.c||[]),nodeName:`H${e.l}`,nodeTitle:`<h${e.l}>${e.n.trim()}</h${e.l}>`})):[]}async function ci(e,t){await function(e=15e3){return oi||("undefined"==typeof document||"undefined"==typeof window?Promise.reject(/* @__PURE__ */new Error("[katex-loader] Requires a browser environment.")):window.katex?Promise.resolve():oi=new Promise((t,n)=>{const i=setTimeout(()=>{oi=null,n(/* @__PURE__ */new Error(`[katex-loader] KaTeX CDN timeout after ${e}ms.`))},e);if(!document.querySelector(`link[href="${ii}"]`)){const e=document.createElement("link");e.rel="stylesheet",e.href=ii,document.head.appendChild(e)}const r=document.createElement("script");r.src=ri,r.onload=()=>{clearTimeout(i),t()},r.onerror=()=>{clearTimeout(i),oi=null,r.remove(),n(/* @__PURE__ */new Error(`[katex-loader] Failed to load ${ri}`))},document.head.appendChild(r)}))}();let n=[];const i=new j({langPrefix:"language-",html:!0,highlight:function(e,t){if(t&&N.getLanguage(t))try{return N.highlight(e,{language:t}).value}catch(Nr){}return""}}).use(jn,{name:Jn}).use(Ee,{permalink:!0,permalinkBefore:!1,permalinkSymbol:"#",slugify:si}).use(Me,{callback:(e,t)=>{!n.length&&t.c&&(n=t.c)}}).use(Pe,{matcher:e=>e.match(/^https?:\/\//),attrs:{target:"_blank",rel:"noopener"}}).use(Dn,{titles:Zn,icons:Gn}).use(ai,{strict:!1,throwOnError:!1}).use(Un);t&&t.forEach(e=>i.use(e));const r=i.render(e).replace(/class="markdown-alert markdown-alert-(\w+)"[\s\S]*?class="markdown-alert-title"[^>]*>([\s\S]*?)<\/p>/g,(e,t,n)=>{const i=Zn[t];if(!i)return e;const r=Kn(n.replace(/<[^>]*>/g,""));if(r.toLowerCase()===t.toLowerCase()){const t=n.lastIndexOf(">");if(-1!==t){const o=n.substring(0,t+1)+Kn(n.substring(t+1)).replace(r,i);return e.replace(n,o)}}return e});return setTimeout(()=>{requestAnimationFrame(()=>ti())},0),{anchor:li(Tn(n)),info:r}}function di(e){e&&"object"==typeof e?Object.entries(e).forEach(([e,t])=>{N.getLanguage(e)||N.registerLanguage(e,t)}):console.warn("[render-markdown] initHighlighter 需要传入一个语言包对象")}var ui={exports:{}},hi=ui.exports;!function(e,t){"object"==typeof hi&&void 0!==ui?ui.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Viewer=t()}(void 0,function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function t(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function i(e){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?n(Object(r),!0).forEach(function(n){t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function r(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function o(e){return o="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},o(e)}var a={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},s="undefined"!=typeof window&&void 0!==window.document,l=s?window:{},c=!(!s||!l.document.documentElement)&&"ontouchstart"in l.document.documentElement,d=!!s&&"PointerEvent"in l,u="viewer",h="move",p="switch",m="zoom",f="".concat(u,"-active"),v="".concat(u,"-close"),g="".concat(u,"-fade"),w="".concat(u,"-fixed"),b="".concat(u,"-fullscreen"),y="".concat(u,"-fullscreen-exit"),k="".concat(u,"-hide"),x="".concat(u,"-hide-md-down"),S="".concat(u,"-hide-sm-down"),_="".concat(u,"-hide-xs-down"),C="".concat(u,"-in"),E="".concat(u,"-invisible"),A="".concat(u,"-loading"),T="".concat(u,"-move"),M="".concat(u,"-open"),O="".concat(u,"-show"),L="".concat(u,"-transition"),P="click",I="dblclick",$="dragstart",z="focusin",j="keydown",N="load",D="error",R=d?"pointerdown":c?"touchstart":"mousedown",H=d?"pointermove":c?"touchmove":"mousemove",B=d?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",F="resize",q="transitionend",W="wheel",X="ready",Y="show",V="shown",U="hide",Z="hidden",G="view",K="viewed",J="move",Q="moved",ee="rotate",te="rotated",ne="scale",ie="scaled",re="zoom",oe="zoomed",ae="play",se="stop",le="".concat(u,"Action"),ce=/\s+/,de=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function ue(e){return"string"==typeof e}var he=Number.isNaN||l.isNaN;function pe(e){return"number"==typeof e&&!he(e)}function me(e){return void 0===e}function fe(e){return"object"===o(e)&&null!==e}var ve=Object.prototype.hasOwnProperty;function ge(e){if(!fe(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&ve.call(n,"isPrototypeOf")}catch(i){return!1}}function we(e){return"function"==typeof e}function be(e,t){if(e&&we(t))if(Array.isArray(e)||pe(e.length)){var n,i=e.length;for(n=0;n<i&&!1!==t.call(e,e[n],n,e);n+=1);}else fe(e)&&Object.keys(e).forEach(function(n){t.call(e,e[n],n,e)});return e}var ye=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return fe(e)&&n.length>0&&n.forEach(function(t){fe(t)&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e},ke=/^(?:width|height|left|top|marginLeft|marginTop)$/;function xe(e,t){var n=e.style;be(t,function(e,t){ke.test(t)&&pe(e)&&(e+="px"),n[t]=e})}function Se(e,t){return!(!e||!t)&&(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)}function _e(e,t){if(e&&t)if(pe(e.length))be(e,function(e){_e(e,t)});else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function Ce(e,t){if(e&&t)if(pe(e.length))be(e,function(e){Ce(e,t)});else if(e.classList)e.classList.remove(t);else{var n=e.className;n&&n.indexOf(t)>=0&&(e.className=n.split(ce).filter(function(e){return e&&e!==t}).join(" "))}}function Ee(e,t,n){t&&(pe(e.length)?be(e,function(e){Ee(e,t,n)}):n?_e(e,t):Ce(e,t))}var Ae=/([a-z\d])([A-Z])/g;function Te(e){return e.replace(Ae,"$1-$2").toLowerCase()}function Me(e,t){return fe(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(Te(t)))}function Oe(e,t,n){fe(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(Te(t)),n)}var Le=function(){var e=!1;if(s){var t=!1,n=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});l.addEventListener("test",n,i),l.removeEventListener("test",n,i)}return e}();function Pe(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;t.trim().split(ce).forEach(function(t){if(!Le){var o=e.listeners;o&&o[t]&&o[t][n]&&(r=o[t][n],delete o[t][n],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,r,i)})}function Ie(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;t.trim().split(ce).forEach(function(t){if(i.once&&!Le){var o=e.listeners,a=void 0===o?{}:o;r=function(){delete a[t][n],e.removeEventListener(t,r,i);for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.apply(e,s)},a[t]||(a[t]={}),a[t][n]&&e.removeEventListener(t,a[t][n],i),a[t][n]=r,e.listeners=a}e.addEventListener(t,r,i)})}function $e(e,t,n,r){var o;return we(Event)&&we(CustomEvent)?o=new CustomEvent(t,i({bubbles:!0,cancelable:!0,detail:n},r)):(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(o)}function ze(e){var t=e.rotate,n=e.scaleX,i=e.scaleY,r=e.translateX,o=e.translateY,a=[];pe(r)&&0!==r&&a.push("translateX(".concat(r,"px)")),pe(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),pe(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),pe(n)&&1!==n&&a.push("scaleX(".concat(n,")")),pe(i)&&1!==i&&a.push("scaleY(".concat(i,")"));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}var je=l.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(l.navigator.userAgent);function Ne(e,t,n){var i=document.createElement("img");if(e.naturalWidth&&!je)return n(e.naturalWidth,e.naturalHeight),i;var r=document.body||document.documentElement;return i.onload=function(){n(i.width,i.height),je||r.removeChild(i)},be(t.inheritedAttributes,function(t){var n=e.getAttribute(t);null!==n&&i.setAttribute(t,n)}),i.src=e.src,je||(i.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(i)),i}function De(e){switch(e){case 2:return _;case 3:return S;case 4:return x;default:return""}}function Re(e,t){var n=e.pageX,r=e.pageY,o={endX:n,endY:r};return t?o:i({timeStamp:Date.now(),startX:n,startY:r},o)}var He,Be={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var e=this.element.ownerDocument,t=e.body||e.documentElement;this.body=t,this.scrollbarWidth=window.innerWidth-e.documentElement.clientWidth,this.initialBodyPaddingRight=t.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(t).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var e,t=this.options,n=this.parent;t.inline&&(e={width:Math.max(n.offsetWidth,t.minWidth),height:Math.max(n.offsetHeight,t.minHeight)},this.parentData=e),!this.fulled&&e||(e=this.containerData),this.viewerData=ye({},e)},renderViewer:function(){this.options.inline&&!this.fulled&&xe(this.viewer,this.viewerData)},initList:function(){var e=this,t=this.element,n=this.options,i=this.list,r=[];i.innerHTML="",be(this.images,function(t,o){var a=t.src,s=t.alt||function(e){return ue(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}(a),l=e.getImageURL(t);if(a||l){var c=document.createElement("li"),d=document.createElement("img");be(n.inheritedAttributes,function(e){var n=t.getAttribute(e);null!==n&&d.setAttribute(e,n)}),n.navbar&&(d.src=a||l),d.alt=s,d.setAttribute("data-original-url",l||a),c.setAttribute("data-index",o),c.setAttribute("data-viewer-action","view"),c.setAttribute("role","button"),n.keyboard&&c.setAttribute("tabindex",0),c.appendChild(d),i.appendChild(c),r.push(c)}}),this.items=r,be(r,function(t){var i,r,o=t.firstElementChild;Oe(o,"filled",!0),n.loading&&_e(t,A),Ie(o,N,i=function(i){Pe(o,D,r),n.loading&&Ce(t,A),e.loadImage(i)},{once:!0}),Ie(o,D,r=function(){Pe(o,N,i),n.loading&&Ce(t,A)},{once:!0})}),n.transition&&Ie(t,K,function(){_e(i,L)},{once:!0})},renderList:function(){var e=this.index,t=this.items[e];if(t){var n=t.nextElementSibling,i=parseInt(window.getComputedStyle(n||t).marginLeft,10),r=t.offsetWidth,o=r+i;xe(this.list,ye({width:o*this.length-i},ze({translateX:(this.viewerData.width-r)/2-o*e})))}},resetList:function(){var e=this.list;e.innerHTML="",Ce(e,L),xe(e,ye({width:0},ze({translateX:0})))},initImage:function(e){var t,n=this,i=this.options,r=this.image,o=this.viewerData,a=this.footer.offsetHeight,s=o.width,l=Math.max(o.height-a,a),c=this.imageData||{};this.imageInitializing={abort:function(){t.onload=null}},t=Ne(r,i,function(t,r){var o=t/r,a=Math.max(0,Math.min(1,i.initialCoverage)),d=s,u=l;n.imageInitializing=!1,l*o>s?u=s/o:d=l*o,a=pe(a)?a:.9,d=Math.min(d*a,t),u=Math.min(u*a,r);var h=(s-d)/2,p=(l-u)/2,m={left:h,top:p,x:h,y:p,width:d,height:u,oldRatio:1,ratio:d/t,aspectRatio:o,naturalWidth:t,naturalHeight:r},f=ye({},m);i.rotatable&&(m.rotate=c.rotate||0,f.rotate=0),i.scalable&&(m.scaleX=c.scaleX||1,m.scaleY=c.scaleY||1,f.scaleX=1,f.scaleY=1),n.imageData=m,n.initialImageData=f,e&&e()})},renderImage:function(e){var t=this,n=this.image,i=this.imageData;if(xe(n,ye({width:i.width,height:i.height,marginLeft:i.x,marginTop:i.y},ze(i))),e)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&Se(n,L)){var r=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){Pe(n,q,r)}},Ie(n,q,r,{once:!0})}else e()},resetImage:function(){var e=this.image;e&&(this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null,this.title.innerHTML="")}},Fe={bind:function(){var e=this.options,t=this.viewer,n=this.canvas,i=this.element.ownerDocument;Ie(t,P,this.onClick=this.click.bind(this)),Ie(t,$,this.onDragStart=this.dragstart.bind(this)),Ie(n,R,this.onPointerDown=this.pointerdown.bind(this)),Ie(i,H,this.onPointerMove=this.pointermove.bind(this)),Ie(i,B,this.onPointerUp=this.pointerup.bind(this)),Ie(i,j,this.onKeyDown=this.keydown.bind(this)),Ie(window,F,this.onResize=this.resize.bind(this)),e.zoomable&&e.zoomOnWheel&&Ie(t,W,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleOnDblclick&&Ie(n,I,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,n=this.canvas,i=this.element.ownerDocument;Pe(t,P,this.onClick),Pe(t,$,this.onDragStart),Pe(n,R,this.onPointerDown),Pe(i,H,this.onPointerMove),Pe(i,B,this.onPointerUp),Pe(i,j,this.onKeyDown),Pe(window,F,this.onResize),e.zoomable&&e.zoomOnWheel&&Pe(t,W,this.onWheel,{passive:!1,capture:!0}),e.toggleOnDblclick&&Pe(n,I,this.onDblclick)}},qe={click:function(e){var t=this.options,n=this.imageData,i=e.target,r=Me(i,le);switch(r||"img"!==i.localName||"li"!==i.parentElement.localName||(r=Me(i=i.parentElement,le)),c&&e.isTrusted&&i===this.canvas&&clearTimeout(this.clickCanvasTimeout),r){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(Me(i,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-n.scaleX||-1);break;case"flip-vertical":this.scaleY(-n.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(c&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(e.isTrusted?e:e.detail&&e.detail.originalEvent))},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,n=this.options,i=this.image,r=this.index,o=this.viewerData;Ce(i,E),n.loading&&Ce(this.canvas,A),i.style.cssText="height:0;"+"margin-left:".concat(o.width/2,"px;")+"margin-top:".concat(o.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){Ee(i,T,n.movable),Ee(i,L,n.transition),e.renderImage(function(){e.viewed=!0,e.viewing=!1,we(n.viewed)&&Ie(t,K,n.viewed,{once:!0}),$e(t,K,{originalImage:e.images[r],index:r,image:i},{cancelable:!1})})})},loadImage:function(e){var t=e.target,n=t.parentNode,i=n.offsetWidth||30,r=n.offsetHeight||50,o=!!Me(t,"filled");Ne(t,this.options,function(e,n){var a=e/n,s=i,l=r;r*a>i?o?s=r*a:l=i/a:o?l=i/a:s=r*a,xe(t,ye({width:s,height:l},ze({translateX:(i-s)/2,translateY:(r-l)/2})))})},keydown:function(e){var t=this.options;if(t.keyboard){var n=e.keyCode||e.which||e.charCode;if(13===n)this.viewer.contains(e.target)&&this.click(e);if(this.fulled)switch(n){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}}},dragstart:function(e){"img"===e.target.localName&&e.preventDefault()},pointerdown:function(e){var t=this.options,n=this.pointers,i=e.buttons,r=e.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(pe(i)&&1!==i||pe(r)&&0!==r||e.ctrlKey))){e.preventDefault(),e.changedTouches?be(e.changedTouches,function(e){n[e.identifier]=Re(e)}):n[e.pointerId||0]=Re(e);var o=!!t.movable&&h;t.zoomOnTouch&&t.zoomable&&Object.keys(n).length>1?o=m:t.slideOnTouch&&("touch"===e.pointerType||"touchstart"===e.type)&&this.isSwitchable()&&(o=p),!t.transition||o!==h&&o!==m||Ce(this.image,L),this.action=o}},pointermove:function(e){var t=this.pointers,n=this.action;this.viewed&&n&&(e.preventDefault(),e.changedTouches?be(e.changedTouches,function(e){ye(t[e.identifier]||{},Re(e,!0))}):ye(t[e.pointerId||0]||{},Re(e,!0)),this.change(e))},pointerup:function(e){var t,n=this,i=this.options,r=this.action,o=this.pointers;e.changedTouches?be(e.changedTouches,function(e){t=o[e.identifier],delete o[e.identifier]}):(t=o[e.pointerId||0],delete o[e.pointerId||0]),r&&(e.preventDefault(),!i.transition||r!==h&&r!==m||_e(this.image,L),this.action=!1,c&&r!==m&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),i.toggleOnDblclick&&this.viewed&&e.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){$e(n.image,I,{originalEvent:e})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){n.imageClicked=!1},500)):(this.imageClicked=!1,i.backdrop&&"static"!==i.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){$e(n.canvas,P,{originalEvent:e})},50)))))},resize:function(){var e=this;if(this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();be(this.player.getElementsByTagName("img"),function(t){Ie(t,N,e.loadImage.bind(e),{once:!0}),$e(t,N)})}},wheel:function(e){var t=this;if(this.viewed&&(e.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50);var n=Number(this.options.zoomRatio)||.1,i=1;e.deltaY?i=e.deltaY>0?1:-1:e.wheelDelta?i=-e.wheelDelta/120:e.detail&&(i=e.detail>0?1:-1),this.zoom(-i*n,!0,null,e)}}},We={show:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element,n=this.options;if(n.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;if(we(n.show)&&Ie(t,Y,n.show,{once:!0}),!1===$e(t,Y)||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var i=this.viewer;if(Ce(i,k),i.setAttribute("role","dialog"),i.setAttribute("aria-labelledby",this.title.id),i.setAttribute("aria-modal",!0),i.removeAttribute("aria-hidden"),n.transition&&!e){var r=this.shown.bind(this);this.transitioning={abort:function(){Pe(i,q,r),Ce(i,C)}},_e(i,L),i.initialOffsetWidth=i.offsetWidth,Ie(i,q,r,{once:!0}),_e(i,C)}else _e(i,C),this.shown();return this},hide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.element,i=this.options;if(i.inline||this.hiding||!this.isShown&&!this.showing)return this;if(we(i.hide)&&Ie(n,U,i.hide,{once:!0}),!1===$e(n,U))return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var r=this.viewer,o=this.image,a=function(){Ce(r,C),e.hidden()};if(i.transition&&!t){var s=function(t){t&&t.target===r&&(Pe(r,q,s),e.hidden())},l=function(){Se(r,L)?(Ie(r,q,s),Ce(r,C)):a()};this.transitioning={abort:function(){e.viewed&&Se(o,L)?Pe(o,q,l):Se(r,L)&&Pe(r,q,s)}},this.viewed&&Se(o,L)?(Ie(o,q,l,{once:!0}),this.zoomTo(0,!1,null,null,!0)):l()}else a();return this},view:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===this.index)return this;if(!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var n=this.element,i=this.options,r=this.title,o=this.canvas,a=this.items[t],s=a.querySelector("img"),l=Me(s,"originalUrl"),c=s.getAttribute("alt"),d=document.createElement("img");if(be(i.inheritedAttributes,function(e){var t=s.getAttribute(e);null!==t&&d.setAttribute(e,t)}),d.src=l,d.alt=c,we(i.view)&&Ie(n,G,i.view,{once:!0}),!1===$e(n,G,{originalImage:this.images[t],index:t,image:d})||!this.isShown||this.hiding||this.played)return this;var u=this.items[this.index];u&&(Ce(u,f),u.removeAttribute("aria-selected")),_e(a,f),a.setAttribute("aria-selected",!0),i.focus&&a.focus(),this.image=d,this.viewed=!1,this.index=t,this.imageData={},_e(d,E),i.loading&&_e(o,A),o.innerHTML="",o.appendChild(d),this.renderList(),r.innerHTML="";var h,p,m=function(){var t,n=e.imageData,o=Array.isArray(i.title)?i.title[1]:i.title;r.innerHTML=ue(t=we(o)?o.call(e,d,n):"".concat(c," (").concat(n.naturalWidth," × ").concat(n.naturalHeight,")"))?t.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):t};return Ie(n,K,m,{once:!0}),this.viewing={abort:function(){Pe(n,K,m),d.complete?e.imageRendering?e.imageRendering.abort():e.imageInitializing&&e.imageInitializing.abort():(d.src="",Pe(d,N,h),e.timeout&&clearTimeout(e.timeout))}},d.complete?this.load():(Ie(d,N,h=function(){Pe(d,D,p),e.load()},{once:!0}),Ie(d,D,p=function(){Pe(d,N,h),e.timeout&&(clearTimeout(e.timeout),e.timeout=!1),Ce(d,E),i.loading&&Ce(e.canvas,A)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){Ce(d,E),e.timeout=!1},1e3)),this},prev:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.length-1,n=this.index+1;return n>t&&(n=e?0:t),this.view(n),this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData;return this.moveTo(me(e)?e:n.x+Number(e),me(t)?t:n.y+Number(t)),this},moveTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.element,o=this.options,a=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&o.movable){var s=a.x,l=a.y,c=!1;if(pe(e)?c=!0:e=s,pe(n)?c=!0:n=l,c){if(we(o.move)&&Ie(r,J,o.move,{once:!0}),!1===$e(r,J,{x:e,y:n,oldX:s,oldY:l,originalEvent:i}))return this;a.x=e,a.y=n,a.left=e,a.top=n,this.moving=!0,this.renderImage(function(){t.moving=!1,we(o.moved)&&Ie(r,Q,o.moved,{once:!0}),$e(r,Q,{x:e,y:n,oldX:s,oldY:l,originalEvent:i},{cancelable:!1})})}}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this,n=this.element,i=this.options,r=this.imageData;if(pe(e=Number(e))&&this.viewed&&!this.played&&i.rotatable){var o=r.rotate;if(we(i.rotate)&&Ie(n,ee,i.rotate,{once:!0}),!1===$e(n,ee,{degree:e,oldDegree:o}))return this;r.rotate=e,this.rotating=!0,this.renderImage(function(){t.rotating=!1,we(i.rotated)&&Ie(n,te,i.rotated,{once:!0}),$e(n,te,{degree:e,oldDegree:o},{cancelable:!1})})}return this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.element,r=this.options,o=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&r.scalable){var a=o.scaleX,s=o.scaleY,l=!1;if(pe(e)?l=!0:e=a,pe(n)?l=!0:n=s,l){if(we(r.scale)&&Ie(i,ne,r.scale,{once:!0}),!1===$e(i,ne,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s}))return this;o.scaleX=e,o.scaleY=n,this.scaling=!0,this.renderImage(function(){t.scaling=!1,we(r.scaled)&&Ie(i,ie,r.scaled,{once:!0}),$e(i,ie,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s},{cancelable:!1})})}}return this},zoom:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,r=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(r.width*e/r.naturalWidth,t,n,i),this},zoomTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=this.element,s=this.options,l=this.pointers,c=this.imageData,d=c.x,u=c.y,h=c.width,p=c.height,m=c.naturalWidth,f=c.naturalHeight;if(pe(e=Math.max(0,e))&&this.viewed&&!this.played&&(o||s.zoomable)){if(o||(e=Math.min(Math.max(e,Math.max(.01,s.minZoomRatio)),Math.min(100,s.maxZoomRatio))),r)switch(r.type){case"wheel":s.zoomRatio>=.055&&e>.95&&e<1.05&&(e=1);break;case"pointermove":case"touchmove":case"mousemove":e>.99&&e<1.01&&(e=1)}var v=m*e,g=f*e,w=v-h,b=g-p,y=c.ratio;if(we(s.zoom)&&Ie(a,re,s.zoom,{once:!0}),!1===$e(a,re,{ratio:e,oldRatio:y,originalEvent:r}))return this;if(this.zooming=!0,r){var k=function(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}(this.viewer),x=l&&Object.keys(l).length>0?function(e){var t=0,n=0,i=0;return be(e,function(e){var r=e.startX,o=e.startY;t+=r,n+=o,i+=1}),{pageX:t/=i,pageY:n/=i}}(l):{pageX:r.pageX,pageY:r.pageY};c.x-=w*((x.pageX-k.left-d)/h),c.y-=b*((x.pageY-k.top-u)/p)}else ge(i)&&pe(i.x)&&pe(i.y)?(c.x-=w*((i.x-d)/h),c.y-=b*((i.y-u)/p)):(c.x-=w/2,c.y-=b/2);c.left=c.x,c.top=c.y,c.width=v,c.height=g,c.oldRatio=y,c.ratio=e,this.renderImage(function(){t.zooming=!1,we(s.zoomed)&&Ie(a,oe,s.zoomed,{once:!0}),$e(a,oe,{ratio:e,oldRatio:y,originalEvent:r},{cancelable:!1})}),n&&this.tooltip()}return this},play:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var n=this.element,i=this.options;if(we(i.play)&&Ie(n,ae,i.play,{once:!0}),!1===$e(n,ae))return this;var r=this.player,o=this.loadImage.bind(this),a=[],s=0,l=0;if(this.played=!0,this.onLoadWhenPlay=o,t&&this.requestFullscreen(t),_e(r,O),be(this.items,function(e,t){var n=e.querySelector("img"),c=document.createElement("img");c.src=Me(n,"originalUrl"),c.alt=n.getAttribute("alt"),c.referrerPolicy=n.referrerPolicy,s+=1,_e(c,g),Ee(c,L,i.transition),Se(e,f)&&(_e(c,C),l=t),a.push(c),Ie(c,N,o,{once:!0}),r.appendChild(c)}),pe(i.interval)&&i.interval>0){var c=function(){clearTimeout(e.playing.timeout),Ce(a[l],C),_e(a[l=(l-=1)>=0?l:s-1],C),e.playing.timeout=setTimeout(c,i.interval)},d=function(){clearTimeout(e.playing.timeout),Ce(a[l],C),_e(a[l=(l+=1)<s?l:0],C),e.playing.timeout=setTimeout(d,i.interval)};s>1&&(this.playing={prev:c,next:d,timeout:setTimeout(d,i.interval)})}return this},stop:function(){var e=this;if(!this.played)return this;var t=this.element,n=this.options;if(we(n.stop)&&Ie(t,se,n.stop,{once:!0}),!1===$e(t,se))return this;var i=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,be(i.getElementsByTagName("img"),function(t){Pe(t,N,e.onLoadWhenPlay)}),Ce(i,O),i.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,n=this.viewer,i=this.image,r=this.list;return!this.isShown||this.played||this.fulled||!t.inline||(this.fulled=!0,this.open(),_e(this.button,y),t.transition&&(Ce(r,L),this.viewed&&Ce(i,L)),_e(n,w),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("style"),xe(n,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=ye({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){_e(i,L),_e(r,L)},0)})})),this},exit:function(){var e=this,t=this.options,n=this.viewer,i=this.image,r=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline?(this.fulled=!1,this.close(),Ce(this.button,y),t.transition&&(Ce(r,L),this.viewed&&Ce(i,L)),t.focus&&this.clearEnforceFocus(),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),Ce(n,w),xe(n,{zIndex:t.zIndexInline}),this.viewerData=ye({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage(function(){t.transition&&setTimeout(function(){_e(i,L),_e(r,L)},0)})}),this):this},tooltip:function(){var e=this,t=this.options,n=this.tooltipBox,i=this.imageData;return this.viewed&&!this.played&&t.tooltip?(n.textContent="".concat(Math.round(100*i.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):t.transition?(this.fading&&$e(n,q),_e(n,O),_e(n,g),_e(n,L),n.removeAttribute("aria-hidden"),n.initialOffsetWidth=n.offsetWidth,_e(n,C)):(_e(n,O),n.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){t.transition?(Ie(n,q,function(){Ce(n,O),Ce(n,g),Ce(n,L),n.setAttribute("aria-hidden",!0),e.fading=!1},{once:!0}),Ce(n,C),e.fading=!0):(Ce(n,O),n.setAttribute("aria-hidden",!0)),e.tooltipping=!1},1e3),this):this},toggle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0,null,e):this.zoomTo(1,!0,null,e),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=ye({},this.initialImageData),this.renderImage()),this},update:function(){var e=this,t=this.element,n=this.options,i=this.isImg;if(i&&!t.parentNode)return this.destroy();var r=[];if(be(i?[t]:t.querySelectorAll("img"),function(t){we(n.filter)?n.filter.call(e,t)&&r.push(t):e.getImageURL(t)&&r.push(t)}),!r.length)return this;if(this.images=r,this.length=r.length,this.ready){var o=[];if(be(this.items,function(e,t){var n=e.querySelector("img"),i=r[t];i&&n&&i.src===n.src&&i.alt===n.alt||o.push(t)}),xe(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var a=o.indexOf(this.index);if(a>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-a,this.length-1),0));else{var s=this.items[this.index];_e(s,f),s.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e[u]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||Pe(e,P,this.onStart),e[u]=void 0,this):this}},Xe={getImageURL:function(e){var t=this.options.url;return t=ue(t)?e.getAttribute(t):we(t)?t.call(this,e):""},enforceFocus:function(){var e=this;this.clearEnforceFocus(),Ie(document,z,this.onFocusin=function(t){var n=e.viewer,i=t.target;if(i!==document&&i!==n&&!n.contains(i)){for(;i;){if(null!==i.getAttribute("tabindex")||"true"===i.getAttribute("aria-modal"))return;i=i.parentElement}n.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(Pe(document,z,this.onFocusin),this.onFocusin=null)},open:function(){var e=this.body;_e(e,M),this.scrollbarWidth>0&&(e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var e=this.body;Ce(e,M),this.scrollbarWidth>0&&(e.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var e=this.element,t=this.options,n=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(n.focus(),this.enforceFocus()),we(t.shown)&&Ie(e,V,t.shown,{once:!0}),!1!==$e(e,V)&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var e=this.element,t=this.options,n=this.viewer;t.focus&&this.clearEnforceFocus(),this.close(),this.unbind(),_e(n,k),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),n.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(we(t.hidden)&&Ie(e,Z,t.hidden,{once:!0}),$e(e,Z,null,{cancelable:!1}))},requestFullscreen:function(e){var t=this.element.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var n=t.documentElement;n.requestFullscreen?ge(e)?n.requestFullscreen(e):n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen()}},exitFullscreen:function(){var e=this.element.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t=this.options,n=this.pointers,r=n[Object.keys(n)[0]];if(r){var o=r.endX-r.startX,a=r.endY-r.startY;switch(this.action){case h:0===o&&0===a||(this.pointerMoved=!0,this.move(o,a,e));break;case m:this.zoom(function(e){var t=i({},e),n=[];return be(e,function(e,i){delete t[i],be(t,function(t){var i=Math.abs(e.startX-t.startX),r=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(i*i+r*r),l=(Math.sqrt(o*o+a*a)-s)/s;n.push(l)})}),n.sort(function(e,t){return Math.abs(e)<Math.abs(t)}),n[0]}(n),!1,null,e);break;case p:this.action="switched";var s=Math.abs(o);s>1&&s>Math.abs(a)&&(this.pointers={},o>1?this.prev(t.loop):o<-1&&this.next(t.loop))}be(n,function(e){e.startX=e.endX,e.startY=e.endY})}},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return this.length>1&&e.x>=0&&e.y>=0&&e.width<=t.width&&e.height<=t.height}},Ye=l.Viewer,Ve=(He=-1,function(){return He+=1}),Ue=/*#__PURE__*/function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),!e||1!==e.nodeType)throw new Error("The first argument is required and must be an element.");this.element=e,this.options=ye({},a,ge(n)&&n),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=Ve(),this.init()}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"init",value:function(){var e=this,t=this.element,n=this.options;if(!t[u]){t[u]=this,n.focus&&!n.keyboard&&(n.focus=!1);var i="img"===t.localName,r=[];if(be(i?[t]:t.querySelectorAll("img"),function(t){we(n.filter)?n.filter.call(e,t)&&r.push(t):e.getImageURL(t)&&r.push(t)}),this.isImg=i,this.length=r.length,this.images=r,this.initBody(),me(document.createElement(u).style.transition)&&(n.transition=!1),n.inline){var o=0,a=function(){var t;(o+=1)===e.length&&(e.initializing=!1,e.delaying={abort:function(){clearTimeout(t)}},t=setTimeout(function(){e.delaying=!1,e.build()},0))};this.initializing={abort:function(){be(r,function(e){e.complete||(Pe(e,N,a),Pe(e,D,a))})}},be(r,function(e){var t,n;e.complete?a():(Ie(e,N,t=function(){Pe(e,D,n),a()},{once:!0}),Ie(e,D,n=function(){Pe(e,N,t),a()},{once:!0}))})}else Ie(t,P,this.onStart=function(t){var i=t.target;"img"!==i.localName||we(n.filter)&&!n.filter.call(e,i)||e.view(e.images.indexOf(i))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,t=this.options,n=e.parentNode,i=document.createElement("div");i.innerHTML='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>';var r=i.querySelector(".".concat(u,"-container")),o=r.querySelector(".".concat(u,"-title")),a=r.querySelector(".".concat(u,"-toolbar")),s=r.querySelector(".".concat(u,"-navbar")),l=r.querySelector(".".concat(u,"-button")),c=r.querySelector(".".concat(u,"-canvas"));if(this.parent=n,this.viewer=r,this.title=o,this.toolbar=a,this.navbar=s,this.button=l,this.canvas=c,this.footer=r.querySelector(".".concat(u,"-footer")),this.tooltipBox=r.querySelector(".".concat(u,"-tooltip")),this.player=r.querySelector(".".concat(u,"-player")),this.list=r.querySelector(".".concat(u,"-list")),r.id="".concat(u).concat(this.id),o.id="".concat(u,"Title").concat(this.id),_e(o,t.title?De(Array.isArray(t.title)?t.title[0]:t.title):k),_e(s,t.navbar?De(t.navbar):k),Ee(l,k,!t.button),t.keyboard&&l.setAttribute("tabindex",0),t.backdrop&&(_e(r,"".concat(u,"-backdrop")),t.inline||"static"===t.backdrop||Oe(c,le,"hide")),ue(t.className)&&t.className&&t.className.split(ce).forEach(function(e){_e(r,e)}),t.toolbar){var d=document.createElement("ul"),h=ge(t.toolbar),p=de.slice(0,3),m=de.slice(7,9),f=de.slice(9);h||_e(a,De(t.toolbar)),be(h?t.toolbar:de,function(e,n){var i=h&&ge(e),r=h?Te(n):e,o=i&&!me(e.show)?e.show:e;if(o&&(t.zoomable||-1===p.indexOf(r))&&(t.rotatable||-1===m.indexOf(r))&&(t.scalable||-1===f.indexOf(r))){var a=i&&!me(e.size)?e.size:e,s=i&&!me(e.click)?e.click:e,l=document.createElement("li");t.keyboard&&l.setAttribute("tabindex",0),l.setAttribute("role","button"),_e(l,"".concat(u,"-").concat(r)),we(s)||Oe(l,le,r),pe(o)&&_e(l,De(o)),-1!==["small","large"].indexOf(a)?_e(l,"".concat(u,"-").concat(a)):"play"===r&&_e(l,"".concat(u,"-large")),we(s)&&Ie(l,P,s),d.appendChild(l)}}),a.appendChild(d)}else _e(a,k);if(!t.rotatable){var y=a.querySelectorAll('li[class*="rotate"]');_e(y,E),be(y,function(e){a.appendChild(e)})}if(t.inline)_e(l,b),xe(r,{zIndex:t.zIndexInline}),"static"===window.getComputedStyle(n).position&&xe(n,{position:"relative"}),n.insertBefore(r,e.nextSibling);else{_e(l,v),_e(r,w),_e(r,g),_e(r,k),xe(r,{zIndex:t.zIndex});var x=t.container;ue(x)&&(x=e.ownerDocument.querySelector(x)),x||(x=this.body),x.appendChild(r)}t.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,we(t.ready)&&Ie(e,X,t.ready,{once:!0}),!1!==$e(e,X)?this.ready&&t.inline&&this.view(this.index):this.ready=!1}}}],[{key:"noConflict",value:function(){return window.Viewer=Ye,t}},{key:"setDefaults",value:function(e){ye(a,ge(e)&&e)}}])}();return ye(Ue.prototype,Be,Fe,qe,We,Xe),Ue});var pi=(null==ui.exports?{}:ui.exports).default||ui.exports,mi="_image-preview-wrapper_d4f20_1",fi="_image-toolbar-wrapper_d4f20_14",vi="_image-toolbar-btn_d4f20_21";function gi({imgElement:e,containerRef:t,onViewerReady:n}){const[i,r]=l(!0),a=s(null);o(()=>{if(t.current){const i=new pi(t.current,{toolbar:!0,navbar:!0,title:!1,tooltip:!0,zoomable:!0,rotatable:!1,scalable:!1,transition:!0,fullscreen:!0,keyboard:!0});a.current=i,n(e,i)}return()=>{a.current&&(a.current.destroy(),a.current=null)}},[]);/* @__PURE__ */
|
|
7
|
+
return z("div",{className:fi,children:[/* @__PURE__ */$("span",{className:`${vi} remons-markdown-circle`,onClick:()=>{i?(r(!1),e.style.maxHeight="none",e.style.height="auto"):(r(!0),e.style.maxHeight="100px",e.style.height="auto")},title:i?"查看大图":"查看缩略图",children:/* @__PURE__ */$(i?O:L,{})}),/* @__PURE__ */$("span",{className:`${vi} remons-markdown-circle`,onClick:()=>{if(a.current&&t.current){const n=t.current.querySelectorAll("img"),i=Array.from(n).indexOf(e);i>=0&&a.current.view(i),a.current.show()}},title:"预览",children:/* @__PURE__ */$(b,{})})]})}var wi=/* @__PURE__ */new Map,bi=/* @__PURE__ */new Map,yi=["pre"];function ki(e){(Array.isArray(e)?e:[e]).forEach(e=>{yi.includes(e)||yi.push(e)})}var xi=e=>{const t=e.target;"IMG"===t.tagName&&yi.some(e=>null!==t.closest(e))&&e.stopImmediatePropagation()},Si=e=>{const t=e.target;if("IMG"!==t.tagName)return;if(yi.some(e=>null!==t.closest(e)))return;const n=bi.get(t);n&&n.show()},_i=!1;function Ci(e,t){const n=e.current;if(!n)return;_i||(n.addEventListener("click",xi,!0),n.addEventListener("click",Si),_i=!0);const i=n.querySelectorAll("img");i.forEach(e=>{e.onclick=null}),i.forEach(n=>{const i=n;if(t)return i.style.maxHeight="none",i.style.width="auto",void(i.style.display="block");if(i.parentElement?.querySelector(".image-toolbar"))return;if(yi.some(e=>null!==i.closest(e)))return;const r=document.createElement("div");r.className=mi,i.parentNode?.insertBefore(r,i),r.appendChild(i);const o=document.createElement("div");o.className=fi,r.appendChild(o);const a=P(o);wi.set(o,a),a.render(/* @__PURE__ */$(gi,{imgElement:i,containerRef:e,onViewerReady:(e,t)=>{bi.set(e,t)}})),i.style.maxHeight="100px",i.style.width="auto",i.style.display="block",i.style.overflow="hidden"})}var Ei=/* @__PURE__ */new Map;function Ai({preNode:e}){const[t,n]=l(!0);/* @__PURE__ */
|
|
8
|
+
return $("span",{className:"code-toggle",onClick:()=>{n(!t),e.classList.toggle("code-collapsed",t)},children:/* @__PURE__ */$(t?c:d,{})})}function Ti(e){const{content:t,showBackTop:n,footer:i,backTopTarget:r=document.body,mermaidDebounce:a}=e,[c,d]=l(""),u=s(null),h=s(e);return h.current=e,o(()=>{let e=null,n=!1;return(async()=>{const{codeType:i}=h.current;let r="";r=i&&"md"!==i?.toLocaleLowerCase()?"```"+i+"\n"+t+"\n```":t;const o=await ci(r,h.current.customRenderers);n||(d(o?.info),e=setTimeout(async()=>{if(n)return;(e=>{const{isSlotMermaid:t=!0,isShowCollapsed:n=!0}=e;document.querySelectorAll('.markdown-html code[class*="language-"]').forEach(e=>{const i=e.className.replace("language-","").trim(),r=t&&"mermaid"===i?"mermaid-render-noCode":"",o=`copy-${crypto.randomUUID()}`,a=e.parentNode;if(a?.querySelector(".pre-handle"))return;const s=document.createElement("div");s.className="pre-handle";const l=a?.querySelector("code");l?.classList.add(o),r&&l?.classList.add(r),a?.insertBefore(s,a.querySelector("code"));const c=/* @__PURE__ */z(I,{children:[/* @__PURE__ */$("img",{src:"https://remons.cn:3008/upload/md_assets/code_icon.png",alt:""}),/* @__PURE__ */$("span",{children:i})]}),d=/* @__PURE__ */$("span",{className:"copy",onClick:()=>{const e=document.querySelector(`.${o}`);e&&((0,ue.copy)(e),ie.success("复制成功"))},children:/* @__PURE__ */$(m,{})}),u=P(s);Ei.set(s,u),u.render(/* @__PURE__ */z(I,{children:[/* @__PURE__ */$("span",{children:c}),/* @__PURE__ */z("span",{className:"code-handle",children:[d,n&&/* @__PURE__ */$(Ai,{preNode:a})]})]}))})})(h.current);const{isPrintPreview:e}=h.current,{excludedSelectors:t}=h.current;t&&ki(t),Ci(u,e);const{isSlotMermaid:i,showDriverGuide:r,chartConfig:o,defaultCollapsed:a,cdn:s}=h.current;if(i){const{renderMermaidWithControls:t}=await Promise.resolve().then(()=>ho);await t({showDriverGuide:r,isPrintPreview:e,chartConfig:o,defaultCollapsed:a,cdn:s})}},a??10))})(),()=>{n=!0,e&&clearTimeout(e),Ei.forEach((e,t)=>{e.unmount(),t.remove()}),Ei.clear(),function(){const e=document.querySelector(".markdown-html");e&&_i&&(e.removeEventListener("click",xi,!0),e.removeEventListener("click",Si),_i=!1),wi.forEach((e,t)=>{e.unmount(),t.remove()}),wi.clear(),bi.forEach(e=>{e.destroy()}),bi.clear()}()}},[t]),/* @__PURE__ */z("div",{className:"markdown",children:[c?/* @__PURE__ */z("div",{className:"markdown-html",ref:u,children:[/* @__PURE__ */$("div",{style:{width:"100%"},dangerouslySetInnerHTML:{__html:c}}),i&&/* @__PURE__ */$("div",{className:"markdown-footer",children:i})]}):/* @__PURE__ */$(ce,{}),n&&/* @__PURE__ */$(ae,{target:()=>r})]})}var Mi={javascript:D,typescript:R,css:H,json:B,bash:F,xml:q,plaintext:W};function Oi(e,t){let n;if(e instanceof Blob)n=URL.createObjectURL(e);else{if("string"!=typeof e)return void ie.error("不支持的下载格式");n=e}const i=document.createElement("a");i.href=n,i.download=t,i.click(),URL.revokeObjectURL(n),ie.success(`${t} 已下载`)}function Li(e,t="image",n=2){const{w:i,h:r}=function(e){const t=e.match(/viewBox=["']?([^"']+)["']/i);let n=0,i=0;if(t){const e=t[1].split(/[\s,]+/).map(Number);4===e.length&&(n=e[2],i=e[3])}const r=e.match(/width=["']?\s*([\d.]+)\s*(?:px|pt|cm|mm|in|%)*["']/i),o=e.match(/height=["']?\s*([\d.]+)\s*(?:px|pt|cm|mm|in|%)*/i),a=r?parseFloat(r[1]):0,s=o?parseFloat(o[1]):0;return n&&i?{w:n,h:i}:{w:a||n||800,h:s||i||600}}(e),o=function(e){return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e)))}`}(e),a=new Image;a.crossOrigin="anonymous",a.src=o,a.onload=()=>{const e=document.createElement("canvas");e.width=Math.max(1,Math.round(i*n)),e.height=Math.max(1,Math.round(r*n));const o=e.getContext("2d");o.fillStyle="#ffffff",o.fillRect(0,0,e.width,e.height),o.scale(n,n),o.drawImage(a,0,0,i,r),e.toBlob(e=>{e?Oi(e,`${t}.png`):ie.error("PNG 生成失败")},"image/png")},a.onerror=()=>{ie.error("PNG 生成失败:图片加载失败")}}var Pi="app-theme-mode",Ii="light",$i="dark";function zi(){try{const e=localStorage.getItem(Pi);if("light"===e||"dark"===e||"system"===e)return e}catch{}return"system"}function ji(e){return"system"===e?"undefined"==typeof window?Ii:window.matchMedia("(prefers-color-scheme: dark)").matches?$i:Ii:e}function Ni(e){"undefined"!=typeof document&&(document.documentElement.dataset.theme=e)}"undefined"!=typeof window&&Ni(ji(zi()));var Di=t(null);function Ri({children:t}){const[n,r]=l(()=>zi()),[s,c]=l(()=>ji(n)),d=i(e=>{r(e);try{localStorage.setItem(Pi,e),window.dispatchEvent(new Event("storage"))}catch{}},[]);o(()=>{const e=ji(n);c(e),Ni(e)},[n]),o(()=>{if("system"!==n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>{const t=e.matches?$i:Ii;c(t),Ni(t)};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[n]),o(()=>{const e=()=>{const e=zi();e!==n&&r(e)};window.addEventListener("storage",e);const t=new MutationObserver(()=>{const e=document.documentElement.dataset.theme;if(e&&e!==s){c(e);const t=zi();t!==n&&r(t)}});return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>{window.removeEventListener("storage",e),t.disconnect()}},[n,s]);const u=s===$i,h=a(()=>({theme:s,mode:n,isDark:u,setMode:d}),[s,n,u,d]);return e.createElement(Di.Provider,{value:h},t)}var Hi={"modal-mask":"_modal-mask_dzv9e_4","modal-mask-visible":"_modal-mask-visible_dzv9e_18",modal:"_modal_dzv9e_4","modal-header":"_modal-header_dzv9e_34","modal-title":"_modal-title_dzv9e_41","modal-close":"_modal-close_dzv9e_46","modal-body":"_modal-body_dzv9e_62","modal-footer":"_modal-footer_dzv9e_67"},Bi=G.bind(Hi),Fi=({open:e,title:t,width:n=520,onCancel:i,footer:r,className:a="",children:s})=>{const l=()=>{i?.()};return o(()=>{if(!e)return;const t=e=>{"Escape"===e.key&&l()};return document.addEventListener("keydown",t),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}},[e]),e?X(/* @__PURE__ */$("div",{className:Bi("modal-mask","modal-mask-visible"),onClick:e=>{e.target===e.currentTarget&&l()},children:/* @__PURE__ */z("div",{className:Bi("modal",a),style:{width:n},onClick:e=>{e.stopPropagation()},children:[
|
|
9
|
+
/* @__PURE__ */z("div",{className:Bi("modal-header"),children:[/* @__PURE__ */$("span",{className:Bi("modal-title"),children:t}),/* @__PURE__ */$("div",{className:Bi("modal-close"),onClick:l,children:"×"})]}),
|
|
10
|
+
/* @__PURE__ */$("div",{className:Bi("modal-body"),children:s}),null!=r&&/* @__PURE__ */$("div",{className:Bi("modal-footer"),children:r})]})}),document.body):null},qi={mermaid:"https://registry.npmmirror.com/mermaid/11.17.2/files/dist/mermaid.min.js"};var Wi=null;function Xi(e){return Wi||(Wi=new Promise((t,n)=>{if(window.mermaid)return void t(window.mermaid);const i=document.createElement("script");i.src=function(e,t){return t?.[e]??qi[e]??""}("mermaid",e),i.onload=()=>t(window.mermaid),i.onerror=()=>n(/* @__PURE__ */new Error("Mermaid 脚本加载失败")),document.head.appendChild(i)})),Wi}var Yi=0;function Vi({source:e,debounceMs:t=300,isDark:n,chartConfig:i,cdn:r}){const{mermaid:a,loading:c}=function(e){const[t,n]=l(null),[i,r]=l(!0),[a,s]=l(null);return o(()=>{let t=!1;return Xi(e).then(e=>{t||(n(()=>e),r(!1))}).catch(e=>{t||(s(e),r(!1))}),()=>{t=!0}},[]),{mermaid:t,loading:i,error:a}}(r),[d,u]=l(""),[h,p]=l(""),m=s(0);return o(()=>{a&&a.initialize({startOnLoad:!1,theme:n?"dark":"default",securityLevel:"loose"})},[a,n]),o(()=>{if(!a)return;const n=(e||"").trim();if(!n)return u(""),void p("");p("");const r=++m.current,o=setTimeout(async()=>{const e="mermaid-render-"+Yi++;try{const{svg:t}=await a.render(e,i?i(n):n);if(r!==m.current)return;u(t),p("")}catch(t){if(r!==m.current)return;console.error("Mermaid render error:",t);const e=t instanceof Error?t.message:String(t);p(e?.split("\n")[0]||e)}finally{const t=document.getElementById(e)||document.getElementById(`d${e}`);t&&t.parentNode&&t.parentNode.removeChild(t)}},t);return()=>clearTimeout(o)},[e,n,a,t,i]),{svg:d,error:h,loading:c}}"undefined"!=typeof window&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}));var Ui,Zi="undefined"!=typeof document&&!!document.documentMode;function Gi(){return Ui||(Ui=document.createElement("div").style)}var Ki=["webkit","moz","ms"],Ji={};function Qi(e){if(Ji[e])return Ji[e];const t=Gi();if(e in t)return Ji[e]=e;const n=e[0].toUpperCase()+e.slice(1);let i=Ki.length;for(;i--;){const r=`${Ki[i]}${n}`;if(r in t)return Ji[e]=r}}function er(e,t){return parseFloat(t[Qi(e)])||0}function tr(e,t,n=window.getComputedStyle(e)){const i="border"===t?"Width":"";return{left:er(`${t}Left${i}`,n),right:er(`${t}Right${i}`,n),top:er(`${t}Top${i}`,n),bottom:er(`${t}Bottom${i}`,n)}}function nr(e,t,n){e.style[Qi(t)]=n}function ir(e){let t=e.parentNode;t&&1===t.nodeType||(t=document.documentElement);const n=window.getComputedStyle(e),i=window.getComputedStyle(t),r=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{elem:{style:n,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:tr(e,"margin",n),border:tr(e,"border",n)},parent:{style:i,width:o.width,height:o.height,top:o.top,bottom:o.bottom,left:o.left,right:o.right,padding:tr(t,"padding",i),border:tr(t,"border",i)}}}var rr={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};function or(e,t,n,i){rr[e].split(" ").forEach(e=>{t.addEventListener(e,n,i)})}function ar(e,t,n){rr[e].split(" ").forEach(e=>{t.removeEventListener(e,n)})}function sr(e,t){let n=e.length;for(;n--;)if(e[n].pointerId===t.pointerId)return n;return-1}function lr(e,t){let n;if(t.touches){n=0;for(const i of t.touches)i.pointerId=n++,lr(e,i)}else n=sr(e,t),n>-1&&e.splice(n,1),e.push(t)}function cr(e){let t,n=(e=e.slice(0)).pop();for(;t=e.pop();)n={clientX:(t.clientX-n.clientX)/2+n.clientX,clientY:(t.clientY-n.clientY)/2+n.clientY};return n}function dr(e){if(e.length<2)return 0;const t=e[0],n=e[1];return Math.sqrt(Math.pow(Math.abs(n.clientX-t.clientX),2)+Math.pow(Math.abs(n.clientY-t.clientY),2))}function ur(e,t){return 1===e.nodeType&&` ${function(e){return(e.getAttribute("class")||"").trim()}(e)} `.indexOf(` ${t} `)>-1}"undefined"!=typeof window&&("function"==typeof window.PointerEvent?rr={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:"function"==typeof window.TouchEvent&&(rr={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));var hr=/^http:[\w\.\/]+svg$/;var pr={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:e=>{e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:function(e,{x:t,y:n,scale:i,isSVG:r},o){if(nr(e,"transform",`scale(${i}) translate(${t}px, ${n}px)`),r&&Zi){const t=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",t)}},startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function mr(e,t){if(!e)throw new Error("Panzoom requires an element as an argument");if(1!==e.nodeType)throw new Error("Panzoom requires an element with a nodeType of 1");if(!function(e){let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t={...pr,...t};const n=function(e){return hr.test(e.namespaceURI)&&"svg"!==e.nodeName.toLowerCase()}(e),i=e.parentNode;i.style.overflow=t.overflow,i.style.userSelect="none",i.style.touchAction=t.touchAction,(t.canvas?i:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,nr(e,"transformOrigin","string"==typeof t.origin?t.origin:n?"0 0":"50% 50%");let r,o,a,s,l,c,d=0,u=0,h=1,p=!1;function m(t,n,i){if(i.silent)return;const r=new CustomEvent(t,{detail:n});e.dispatchEvent(r)}function f(t,i,r){const o={x:d,y:u,scale:h,isSVG:n,originalEvent:r};return requestAnimationFrame(()=>{"boolean"==typeof i.animate&&(i.animate?function(e,t){nr(e,"transition",`${Qi("transform")} ${t.duration}ms ${t.easing}`)}(e,i):nr(e,"transition","none")),i.setTransform(e,o,i),m(t,o,i),m("panzoomchange",o,i)}),o}function v(n,i,r,o){const a={...t,...o},s={x:d,y:u,opts:a};if(!o?.force&&(a.disablePan||a.panOnlyWhenZoomed&&h===a.startScale))return s;if(n=parseFloat(n),i=parseFloat(i),a.disableXAxis||(s.x=(a.relative?d:0)+n),a.disableYAxis||(s.y=(a.relative?u:0)+i),a.contain){const t=ir(e),n=t.elem.width/h,i=t.elem.height/h,o=n*r,l=i*r,c=(o-n)/2,d=(l-i)/2;if("inside"===a.contain){const e=(-t.elem.margin.left-t.parent.padding.left+c)/r,n=(t.parent.width-o-t.parent.padding.left-t.elem.margin.left-t.parent.border.left-t.parent.border.right+c)/r;s.x=Math.max(Math.min(s.x,n),e);const i=(-t.elem.margin.top-t.parent.padding.top+d)/r,a=(t.parent.height-l-t.parent.padding.top-t.elem.margin.top-t.parent.border.top-t.parent.border.bottom+d)/r;s.y=Math.max(Math.min(s.y,a),i)}else if("outside"===a.contain){const e=(-(o-t.parent.width)-t.parent.padding.left-t.parent.border.left-t.parent.border.right+c)/r,n=(c-t.parent.padding.left)/r;s.x=Math.max(Math.min(s.x,n),e);const i=(-(l-t.parent.height)-t.parent.padding.top-t.parent.border.top-t.parent.border.bottom+d)/r,a=(d-t.parent.padding.top)/r;s.y=Math.max(Math.min(s.y,a),i)}}return a.roundPixels&&(s.x=Math.round(s.x),s.y=Math.round(s.y)),s}function g(n,i){const r={...t,...i},o={scale:h,opts:r};if(!i?.force&&r.disableZoom)return o;let a=t.minScale,s=t.maxScale;if(r.contain){const n=ir(e),i=n.elem.width/h,r=n.elem.height/h;if(i>1&&r>1){const e=(n.parent.width-n.parent.border.left-n.parent.border.right)/i,o=(n.parent.height-n.parent.border.top-n.parent.border.bottom)/r;"inside"===t.contain?s=Math.min(s,e,o):"outside"===t.contain&&(a=Math.max(a,e,o))}}return o.scale=Math.min(Math.max(n,a),s),o}function w(e,t,i,r){const o=v(e,t,h,i);return d!==o.x||u!==o.y?(d=o.x,u=o.y,f("panzoompan",o.opts,r)):{x:d,y:u,scale:h,isSVG:n,originalEvent:r}}function b(e,t,n){const i=g(e,t),r=i.opts;if(!t?.force&&r.disableZoom)return;e=i.scale;let o=d,a=u;if(r.focal){const t=r.focal;o=(t.x/e-t.x/h+d*e)/e,a=(t.y/e-t.y/h+u*e)/e}const s=v(o,a,e,{relative:!1,force:!0});return d=s.x,u=s.y,h=e,f("panzoomzoom",r,n)}function y(e,n){const i={...t,animate:!0,...n};return b(h*Math.exp((e?1:-1)*i.step),i)}function k(t,i,r,o){const a=ir(e),s=a.parent.width-a.parent.padding.left-a.parent.padding.right-a.parent.border.left-a.parent.border.right,l=a.parent.height-a.parent.padding.top-a.parent.padding.bottom-a.parent.border.top-a.parent.border.bottom;let c=i.clientX-a.parent.left-a.parent.padding.left-a.parent.border.left-a.elem.margin.left,d=i.clientY-a.parent.top-a.parent.padding.top-a.parent.border.top-a.elem.margin.top;n||(c-=a.elem.width/h/2,d-=a.elem.height/h/2);return b(t,{...r,animate:!1,focal:{x:c/s*(s*t),y:d/l*(l*t)}},o)}b(t.startScale,{animate:!1,force:!0}),setTimeout(()=>{w(t.startX,t.startY,{animate:!1,force:!0})});const x=[];function S(e){if(function(e,t){for(let n=e;null!=n;n=n.parentNode)if(ur(n,t.excludeClass)||t.exclude.indexOf(n)>-1)return!0;return!1}(e.target,t))return;lr(x,e),p=!0,t.handleStartEvent(e),r=d,o=u,m("panzoomstart",{x:d,y:u,scale:h,isSVG:n,originalEvent:e},t);const i=cr(x);a=i.clientX,s=i.clientY,l=h,c=dr(x)}function _(e){if(!p||void 0===r||void 0===o||void 0===a||void 0===s)return;lr(x,e);const n=cr(x),i=x.length>1;let d=h;i&&(0===c&&(c=dr(x)),d=g((dr(x)-c)*t.step/80+l).scale,k(d,n,{animate:!1},e)),i&&!t.pinchAndPan||w(r+(n.clientX-a)/d,o+(n.clientY-s)/d,{animate:!1},e)}function C(e){1===x.length&&m("panzoomend",{x:d,y:u,scale:h,isSVG:n,originalEvent:e},t),function(e,t){if(t.touches){for(;e.length;)e.pop();return}const n=sr(e,t);n>-1&&e.splice(n,1)}(x,e),p&&(p=!1,r=o=a=s=void 0)}let E=!1;function A(){E||(E=!0,or("down",t.canvas?i:e,S),or("move",document,_,{passive:!0}),or("up",document,C,{passive:!0}))}return t.noBind||A(),{bind:A,destroy:function(){E=!1,ar("down",t.canvas?i:e,S),ar("move",document,_),ar("up",document,C)},eventNames:rr,getPan:()=>({x:d,y:u}),getScale:()=>h,getOptions:()=>function(e){const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(t),handleDown:S,handleMove:_,handleUp:C,pan:w,reset:function(e){const n={...t,animate:!0,force:!0,...e};h=g(n.startScale,n).scale;const i=v(n.startX,n.startY,h,n);return d=i.x,u=i.y,f("panzoomreset",n)},resetStyle:function(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",nr(e,"transformOrigin","")},setOptions:function(n={}){for(const e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);(n.hasOwnProperty("cursor")||n.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),n.hasOwnProperty("overflow")&&(i.style.overflow=n.overflow),n.hasOwnProperty("touchAction")&&(i.style.touchAction=n.touchAction,e.style.touchAction=n.touchAction)},setStyle:(t,n)=>nr(e,t,n),zoom:b,zoomIn:function(e){return y(!0,e)},zoomOut:function(e){return y(!1,e)},zoomToPoint:k,zoomWithWheel:function(e,n){e.preventDefault();const i={...t,...n,animate:!1};return k(g(h*Math.exp(((0===e.deltaY&&e.deltaX?e.deltaX:e.deltaY)<0?1:-1)*i.step/3),i).scale,e,i,e)}}}mr.defaultOptions=pr;var fr={tooltip:"_tooltip_1kuma_4","tooltip-trigger":"_tooltip-trigger_1kuma_7","tooltip-inner":"_tooltip-inner_1kuma_11","tooltip-inner-visible":"_tooltip-inner-visible_1kuma_27","tooltip-content":"_tooltip-content_1kuma_30","tooltip-arrow":"_tooltip-arrow_1kuma_36"},vr=G.bind(fr),gr=({title:e,children:t,visible:n,onVisibleChange:i})=>{const[r,a]=l(!1),c=s(null),d=s(null),[u,h]=l({top:0,left:0}),p=void 0!==n?n:r,m=()=>{if(d.current){const e=d.current.getBoundingClientRect();h({top:e.top-8,left:e.left+e.width/2})}};o(()=>{if(!p)return;const e=()=>m(),t=()=>m();return window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",t,{passive:!0}),m(),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",t)}},[p]),o(()=>()=>{c.current&&window.clearTimeout(c.current)},[]);const f=p&&e?X(/* @__PURE__ */z("div",{className:vr("tooltip-inner","tooltip-inner-visible"),style:{top:u.top,left:u.left},children:[/* @__PURE__ */$("span",{className:vr("tooltip-content"),children:e}),/* @__PURE__ */$("span",{className:vr("tooltip-arrow")})]}),document.body):null;/* @__PURE__ */
|
|
11
|
+
return z("div",{ref:d,className:vr("tooltip"),onMouseEnter:()=>{c.current&&window.clearTimeout(c.current),c.current=window.setTimeout(()=>{m(),a(!0),i?.(!0)},150)},onMouseLeave:()=>{c.current&&(window.clearTimeout(c.current),c.current=null),a(!1),i?.(!1)},children:[/* @__PURE__ */$("div",{className:vr("tooltip-trigger"),children:t}),f]})},wr={dropdown:"_dropdown_13j0u_4","dropdown-trigger":"_dropdown-trigger_13j0u_8","dropdown-menu":"_dropdown-menu_13j0u_12","dropdown-menu-visible":"_dropdown-menu-visible_13j0u_26","dropdown-item":"_dropdown-item_13j0u_30"},br=G.bind(wr),yr=({items:e,children:t,onClick:n,className:i=""})=>{const[r,a]=l(!1),c=s(null),d=()=>{a(!1)};return o(()=>{const e=e=>{c.current&&!c.current.contains(e.target)&&d()};return r&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[r]),/* @__PURE__ */z("div",{ref:c,className:br("dropdown",i),children:[/* @__PURE__ */$("div",{className:br("dropdown-trigger"),onClick:()=>{a(e=>!e)},children:t}),r&&/* @__PURE__ */$("div",{className:br("dropdown-menu","dropdown-menu-visible"),children:e.map(e=>/* @__PURE__ */$("div",{className:br("dropdown-item"),onClick:()=>(e=>{n({key:e.key}),d()})(e),children:e.label},e.key))})]})};function kr({showSourceView:e,showCollapse:t,showDownload:n,isFullscreen:i,isCollapsed:r,isMinimize:o,isPanzoomActive:a,isPanzoomAvailable:s,isPanzoomEnabled:l,setIsPanzoomEnabled:c,setIsMinimize:d,setIsCollapsed:u,setShowSource:h,toggleFullscreen:m,downloadMenu:b,panzoomRef:S}){/* @__PURE__ */
|
|
12
|
+
return $("div",{className:"mermaid-toolbar",children:[{isShow:e&&r&&!i,icon:/* @__PURE__ */$(o?w:x,{}),tooltip:o?"缩略图":"最小化",onClick:()=>d(e=>!e),className:"mermaid-minimize-btn"},{isShow:s,icon:/* @__PURE__ */$(g,{}),tooltip:l?"取消拖拽":"启用拖拽",onClick:()=>c(e=>!e),className:l?"mermaid-panzoom-btn active":"mermaid-panzoom-btn"},{isShow:a,icon:/* @__PURE__ */$(E,{}),tooltip:"放大",onClick:()=>S.current?.zoomIn()},{isShow:a,icon:/* @__PURE__ */$(C,{}),tooltip:"缩小",onClick:()=>S.current?.zoomOut()},{isShow:a,icon:/* @__PURE__ */$(A,{}),tooltip:"重置",onClick:()=>S.current?.reset()},{isShow:n&&a,icon:/* @__PURE__ */$(v,{}),tooltip:"下载",dropdown:b},{isShow:!0,icon:/* @__PURE__ */$(i?y:k,{}),tooltip:i?"退出全屏":"全屏",onClick:m,className:"mermaid-fullscreen-btn"},{isShow:e&&!i,icon:/* @__PURE__ */$(p,{}),tooltip:"查看源码",onClick:()=>h(!0),className:"mermaid-showcode-btn"},{isShow:t&&!i,icon:/* @__PURE__ */$(r?f:T,{}),tooltip:r?"展开":"收起",onClick:()=>u(e=>!e),className:"mermaid-collapsed-btn"}].map(e=>{if(!1===e.isShow)return null;const t=e.className||e.tooltip,n=e.dropdown?/* @__PURE__ */$(yr,{items:e.dropdown.items,onClick:e.dropdown.onClick,children:/* @__PURE__ */$("div",{className:`remons-markdown-circle ${e.className||""}`,children:e.icon})},t):/* @__PURE__ */$("div",{className:`remons-markdown-circle ${e.className||""}`,onClick:e.onClick,children:e.icon},t);return e.tooltip&&(0,ue.IsPC)()?/* @__PURE__ */$(gr,{title:e.tooltip,children:n},`${t}-tooltip`):n})})}var xr={previewArea:"_previewArea_1axru_2",previewAreaDisabled:"_previewAreaDisabled_1axru_25",previewContent:"_previewContent_1axru_31",errorTip:"_errorTip_1axru_47",emptyTip:"_emptyTip_1axru_59"},Sr=["pointerdown","mousedown","pointerup","mouseup","click"],_r=/* @__PURE__ */new WeakMap;function Cr(e,t,n){Er(e);let i=i=>{let r=i.target;e.contains(r)&&((!n||n(r))&&(i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()),"click"===i.type&&t?.(i))};for(let r of Sr)document.addEventListener(r,i,!0);_r.set(e,i)}function Er(e){let t=_r.get(e);if(t){for(let e of Sr)document.removeEventListener(e,t,!0);_r.delete(e)}}function Ar(e,t){let{elementDimensions:n,popoverDimensions:i,popoverPadding:r,popoverArrowDimensions:o}=t;return"start"===e?Math.max(Math.min(n.top-r,window.innerHeight-i.realHeight-o.width),o.width):"end"===e?Math.max(Math.min(n.top-i?.realHeight+n.height+r,window.innerHeight-i?.realHeight-o.width),o.width):"center"===e?Math.max(Math.min(n.top+n.height/2-i?.realHeight/2,window.innerHeight-i?.realHeight-o.width),o.width):0}function Tr(e,t){let{elementDimensions:n,popoverDimensions:i,popoverPadding:r,popoverArrowDimensions:o}=t;return"start"===e?Math.max(Math.min(n.left-r,window.innerWidth-i.realWidth-o.width),o.width):"end"===e?Math.max(Math.min(n.left-i?.realWidth+n.width+r,window.innerWidth-i?.realWidth-o.width),o.width):"center"===e?Math.max(Math.min(n.left+n.width/2-i?.realWidth/2,window.innerWidth-i?.realWidth-o.width),o.width):0}function Mr(e,t,n){let{align:i,side:r}=n,o=n.centered?"over":r,a=n.padding,s=function(e,t){let n=e.wrapper.getBoundingClientRect();return{width:n.width+t,height:n.height+t,realWidth:n.width,realHeight:n.height}}(e,n.offset),l=e.arrow.getBoundingClientRect(),c=t.getBoundingClientRect(),d=c.top-s.height,u=d>=0,h=window.innerHeight-(c.bottom+s.height),p=h>=0,m=c.left-s.width,f=m>=0,v=window.innerWidth-(c.right+s.width),g=v>=0,w=!(u||p||f||g),b=o;if("top"===o&&u?g=f=p=!1:"bottom"===o&&p?g=f=u=!1:"left"===o&&f?g=u=p=!1:"right"===o&&g&&(f=u=p=!1),"over"===o){let t=window.innerWidth/2-s.realWidth/2,n=window.innerHeight/2-s.realHeight/2;e.wrapper.style.left=`${t}px`,e.wrapper.style.right="auto",e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto"}else if(w){let t=window.innerWidth/2-s?.realWidth/2;e.wrapper.style.left=`${t}px`,e.wrapper.style.right="auto",e.wrapper.style.bottom="10px",e.wrapper.style.top="auto"}else if(f){let t=Math.min(m,window.innerWidth-s?.realWidth-l.width),n=Ar(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.left=`${t}px`,e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.right="auto",b="left"}else if(g){let t=Math.min(v,window.innerWidth-s?.realWidth-l.width),n=Ar(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.right=`${t}px`,e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.left="auto",b="right"}else if(u){let t=Math.min(d,window.innerHeight-s.realHeight-l.width),n=Tr(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.top=`${t}px`,e.wrapper.style.left=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.right="auto",b="top"}else if(p){let t=Math.min(h,window.innerHeight-s?.realHeight-l.width),n=Tr(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.left=`${n}px`,e.wrapper.style.bottom=`${t}px`,e.wrapper.style.top="auto",e.wrapper.style.right="auto",b="bottom"}Pr(e,w?"over":b,i,t),[...e.wrapper.classList].filter(e=>e.startsWith("driver-popover-side-")||e.startsWith("driver-popover-align-")).forEach(t=>e.wrapper.classList.remove(t)),e.wrapper.classList.add(`driver-popover-side-${b}`),e.wrapper.classList.add(`driver-popover-align-${i}`)}function Or(e,t,n,i,r,o=10){let a=i-n;return e<=n&&t>=i?"start"===r?15+o/2:"end"===r?a-15-o/2:a/2:(Math.min(Math.max(e,n),i)+Math.min(Math.max(t,n),i))/2-n}function Lr(e,t,n=10){let i=t-15-n;if(i<15)return Math.max(0,(t-n)/2);let r=e-n/2;return Math.min(Math.max(r,15),i)}function Pr(e,t,n,i){let r=e.arrow;if(r.className="driver-popover-arrow",r.style.top="",r.style.right="",r.style.bottom="",r.style.left="","over"===t)return void r.classList.add("driver-popover-arrow-none");let o=i.getBoundingClientRect(),a=e.wrapper.getBoundingClientRect(),s=function(e,t,n){return"left"===e||"right"===e?t.bottom>n.top&&t.top<n.bottom?e:t.bottom<=n.top?"bottom":"top":t.right>n.left&&t.left<n.right?e:t.right<=n.left?"right":"left"}(t,o,a);r.classList.add(`driver-popover-arrow-side-${s}`);let l=r.getBoundingClientRect().width||10;if("left"===s||"right"===s){let e=Or(o.top,o.bottom,a.top,a.bottom,n,l);r.style.top=`${Lr(e,a.height,l)}px`}else{let e=Or(o.left,o.right,a.left,a.right,n,l);r.style.left=`${Lr(e,a.width,l)}px`}}function Ir(e){return"function"==typeof e?e():"string"==typeof e?document.querySelector(e):e}function $r(e,t,n,i){return(e/=i/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function zr(e){let t='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap(e=>{let n=e.matches(t),i=Array.from(e.querySelectorAll(t));return[...n?[e]:[],...i]}).filter(e=>"none"!==getComputedStyle(e).pointerEvents&&function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e))}function jr(e,t){if(!e||function(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e))return;let n=e.offsetHeight>window.innerHeight;e.scrollIntoView({behavior:!t||Nr(e)?"auto":"smooth",inline:"center",block:n?"start":"center"})}function Nr(e){if(!e||!e.parentElement)return;let t=e.parentElement;return t.scrollHeight>t.clientHeight}function Dr(e,t){let n=function(){let e=document.createElement("div");e.classList.add("driver-popover");let t=document.createElement("div");t.classList.add("driver-popover-arrow");let n=document.createElement("header");n.id="driver-popover-title",n.classList.add("driver-popover-title"),n.style.display="none",n.innerText="Popover Title";let i=document.createElement("div");i.id="driver-popover-description",i.classList.add("driver-popover-description"),i.style.display="none",i.innerText="Popover description is here";let r=document.createElement("button");r.type="button",r.classList.add("driver-popover-close-btn"),r.setAttribute("aria-label","Close"),r.innerHTML="×";let o=document.createElement("footer");o.classList.add("driver-popover-footer");let a=document.createElement("span");a.classList.add("driver-popover-progress-text"),a.innerText="";let s=document.createElement("span");s.classList.add("driver-popover-navigation-btns");let l=document.createElement("button");l.type="button",l.classList.add("driver-popover-prev-btn","driver-popover-footer-btn"),l.innerHTML="Previous";let c=document.createElement("button");return c.type="button",c.classList.add("driver-popover-next-btn","driver-popover-footer-btn"),c.innerHTML="Next",s.appendChild(l),s.appendChild(c),o.appendChild(a),o.appendChild(s),e.appendChild(r),e.appendChild(t),e.appendChild(n),e.appendChild(i),e.appendChild(o),{wrapper:e,arrow:t,title:n,description:i,footer:o,previousButton:l,nextButton:c,closeButton:r,footerButtons:s,progress:a}}();document.body.appendChild(n.wrapper);let{title:i,description:r,showButtons:o,disableButtons:a,showProgress:s,nextBtnText:l,prevBtnText:c,progressText:d}=t;n.nextButton.innerHTML=l,n.previousButton.innerHTML=c,n.progress.innerHTML=d,t.doneButton&&n.nextButton.classList.add("driver-popover-done-btn"),i?(n.title.innerHTML=i,n.title.style.display="block"):n.title.style.display="none",r?(n.description.innerHTML=r,n.description.style.display="block"):n.description.style.display="none";let u=o.includes("next")||o.includes("previous")||s;n.closeButton.style.display=o.includes("close")?"block":"none",u?(n.footer.style.display="flex",n.progress.style.display=s?"block":"none",n.nextButton.style.display=o.includes("next")?"block":"none",n.previousButton.style.display=o.includes("previous")?"block":"none"):n.footer.style.display="none",a.includes("next")&&(n.nextButton.disabled=!0,n.nextButton.classList.add("driver-popover-btn-disabled")),a.includes("previous")&&(n.previousButton.disabled=!0,n.previousButton.classList.add("driver-popover-btn-disabled")),a.includes("close")&&(n.closeButton.disabled=!0,n.closeButton.classList.add("driver-popover-btn-disabled"));let h=n.wrapper;h.style.display="block",h.style.left="",h.style.top="",h.style.bottom="",h.style.right="",h.id="driver-popover-content",h.setAttribute("role","dialog"),h.setAttribute("aria-labelledby","driver-popover-title"),h.setAttribute("aria-describedby","driver-popover-description"),n.arrow.className="driver-popover-arrow",h.className=`driver-popover ${t.popoverClass||""}`.trim(),Cr(n.wrapper,e=>{let n=e.target;return n.closest(".driver-popover-next-btn")?t.onNextClick?.():n.closest(".driver-popover-prev-btn")?t.onPrevClick?.():n.closest(".driver-popover-close-btn")?t.onCloseClick?.():void 0},e=>!n.description.contains(e)&&!n.title.contains(e)&&!!e.closest(".driver-popover-prev-btn, .driver-popover-next-btn, .driver-popover-close-btn")),t.onRender?.(n),Mr(n,e,t.position),function(e,t,n){e.wrapper.querySelectorAll("img").forEach(i=>{if(i.complete)return;let r=()=>Mr(e,t,n);i.addEventListener("load",r,{once:!0}),i.addEventListener("error",r,{once:!0})})}(n,e,t.position),jr(h,t.smoothScroll);let p=zr([h,e]);return p.length>0&&p[0].focus(),n}function Rr(e){e&&(Er(e.wrapper),e.wrapper.parentElement?.removeChild(e.wrapper))}function Hr(e,t){let n=window.innerWidth,i=window.innerHeight,r=t.padding,o=t.radius,a=e.width+2*r,s=e.height+2*r,l=Math.min(o,a/2,s/2),c=Math.floor(Math.max(l,0)),d=a-2*c,u=s-2*c;return`M${n},0L0,0L0,${i}L${n},${i}L${n},0Z\n M${e.x-r+c},${e.y-r} h${d} a${c},${c} 0 0 1 ${c},${c} v${u} a${c},${c} 0 0 1 -${c},${c} h-${d} a${c},${c} 0 0 1 -${c},-${c} v-${u} a${c},${c} 0 0 1 ${c},-${c} z`}function Br(e,t,n,i,r){let o=e.getState("__activeStagePosition"),a=o||i.getBoundingClientRect(),s=r.getBoundingClientRect();o={x:$r(t,a.x,s.x-a.x,n),y:$r(t,a.y,s.y-a.y,n),width:$r(t,a.width,s.width-a.width,n),height:$r(t,a.height,s.height-a.height,n)},Wr(e,o),e.setState("__activeStagePosition",o)}function Fr(e,t){if(!t)return;let n=t.getBoundingClientRect(),i={x:n.x,y:n.y,width:n.width,height:n.height};e.setState("__activeStagePosition",i),Wr(e,i)}function qr(e,t){let n=function(e,t){let n=window.innerWidth,i=window.innerHeight,r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("driver-overlay","driver-overlay-animated"),r.setAttribute("viewBox",`0 0 ${n} ${i}`),r.setAttribute("xmlSpace","preserve"),r.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("preserveAspectRatio","xMinYMin slice"),r.style.fillRule="evenodd",r.style.clipRule="evenodd",r.style.strokeLinejoin="round",r.style.strokeMiterlimit="2",r.style.zIndex="10000",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%";let o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",Hr(t,Xr(e))),o.style.fill=e.getConfig("overlayColor")||"rgb(0,0,0)",o.style.opacity=`${e.getConfig("overlayOpacity")}`,o.style.pointerEvents="auto",o.style.cursor="auto",r.appendChild(o),r}(e,t);document.body.appendChild(n),Cr(n,t=>{"path"===t.target.tagName&&e.emit("overlayClick")}),e.setState("__overlaySvg",n)}function Wr(e,t){let n=e.getState("__overlaySvg");if(!n)return void qr(e,t);let i=n.firstElementChild;if("path"!==i?.tagName)throw Error("no path element found in stage svg");i.setAttribute("d",Hr(t,Xr(e)))}function Xr(e){return{padding:e.getConfig("stagePadding")||0,radius:e.getConfig("stageRadius")||0}}function Yr(e){let t=e.getState("__overlaySvg");t&&(Er(t),t.remove())}var Vr="{{current}} of {{total}}";function Ur(e,t){return!(!(t.skipMissingElement??e.getConfig("skipMissingElement"))||!t.element)&&!Ir(t.element)}function Zr(e,t,n){let i=e.getConfig("steps")||[];for(let r=t;r>=0&&r<i.length;r+=n)if(!Ur(e,i[r]))return r}function Gr(e,t){let n=e.getState("activeIndex"),i=void 0!==n&&void 0===Zr(e,n+1,1),r=t?.popover?.onDoneClick||e.getConfig("onDoneClick");return i&&r?r:t?.popover?.onNextClick||e.getConfig("onNextClick")}function Kr(e,t){return t?.popover?.onPrevClick||e.getConfig("onPrevClick")}function Jr(e,t,n){let i=e.getConfig("stagePadding")||0;return{side:n.popover?.side||"bottom",align:n.popover?.align||"start",offset:i+(e.getConfig("popoverOffset")||0),padding:i,centered:"driver-dummy-element"===t.id}}function Qr(e,t,n){Rr(e.getState("popover")),Dr(t,function(e,t,n){let i=n.popover||{},r=e.getState("activeIndex"),o=void 0!==r&&void 0===Zr(e,r+1,1);return{title:i.title,description:i.description,showButtons:i.showButtons||e.getConfig("showButtons"),disableButtons:i.disableButtons||e.getConfig("disableButtons")||[],showProgress:i.showProgress||e.getConfig("showProgress")||!1,progressText:i.progressText??(e.getConfig("progressText")||Vr),nextBtnText:i.nextBtnText??(e.getConfig("nextBtnText")||"Next"),prevBtnText:i.prevBtnText??(e.getConfig("prevBtnText")||"Previous"),doneButton:o,popoverClass:i.popoverClass||e.getConfig("popoverClass")||"",smoothScroll:e.getConfig("smoothScroll"),onNextClick:()=>{let i=Gr(e,n);return i?i(t,n,e.getHookOpts()):e.emit("nextClick")},onPrevClick:()=>{let i=Kr(e,n);return i?i(t,n,e.getHookOpts()):e.emit("prevClick")},onCloseClick:()=>{let i=function(e,t){return t?.popover?.onCloseClick||e.getConfig("onCloseClick")}(e,n);return i?i(t,n,e.getHookOpts()):e.emit("closeClick")},onRender:t=>{e.setState("popover",t),(i.onPopoverRender||e.getConfig("onPopoverRender"))?.(t,e.getHookOpts())},position:Jr(e,t,n)}}(e,t,n))}function eo(e,t){let n=Ir(t.element);n||(n=function(){let e=document.getElementById("driver-dummy-element");if(e)return e;let t=document.createElement("div");return t.id="driver-dummy-element",t.style.width="0",t.style.height="0",t.style.pointerEvents="none",t.style.opacity="0",t.style.position="fixed",t.style.top="50%",t.style.left="50%",document.body.appendChild(t),t}()),function(e,t,n){let i=e.getConfig("duration")||400,r=Date.now(),o=e.getState("__activeStep"),a=e.getState("__activeElement")||t,s=!a||a===t,l="driver-dummy-element"===t.id,c="driver-dummy-element"===a.id,d=e.getConfig("animate"),u=n.onHighlightStarted||e.getConfig("onHighlightStarted"),h=n?.onHighlighted||e.getConfig("onHighlighted"),p=o?.onDeselected||e.getConfig("onDeselected"),m=e.getHookOpts();!s&&p&&p(c?void 0:a,o,m),u&&u(l?void 0:t,n,m);let f=!s&&d,v=!1;(function(e){e&&(e.wrapper.style.display="none")})(e.getState("popover")),e.setState("previousStep",o),e.setState("previousElement",a),e.setState("activeStep",n),e.setState("activeElement",t);let g=()=>{if(e.getState("__transitionCallback")!==g)return;let s=Date.now()-r,c=i-s<=i/2;n.popover&&c&&!v&&f&&(Qr(e,t,n),v=!0),e.getConfig("animate")&&s<i?Br(e,s,i,a,t):(Fr(e,t),h&&h(l?void 0:t,n,e.getHookOpts()),e.setState("__transitionCallback",void 0),e.setState("__previousStep",o),e.setState("__previousElement",a),e.setState("__activeStep",n),e.setState("__activeElement",t)),window.requestAnimationFrame(g)};e.setState("__transitionCallback",g),window.requestAnimationFrame(g),jr(t,e.getConfig("smoothScroll")),!f&&n.popover&&Qr(e,t,n),document.querySelectorAll(".driver-active-element-parent").forEach(e=>{e.classList.remove("driver-active-element-parent","driver-active-element-parent-no-scroll")}),a.classList.remove("driver-active-element","driver-no-interaction"),a.removeAttribute("aria-haspopup"),a.removeAttribute("aria-expanded"),a.removeAttribute("aria-controls"),(n.disableActiveInteraction??e.getConfig("disableActiveInteraction"))&&t.classList.add("driver-no-interaction");let w=t.parentElement;w&&w!==document.body&&(w.classList.add("driver-active-element-parent"),function(e){let t=window.getComputedStyle(e);return[t.overflow,t.overflowX,t.overflowY].some(e=>"auto"===e||"scroll"===e)}(w)&&w.classList.add("driver-active-element-parent-no-scroll")),t.classList.add("driver-active-element"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","true"),t.setAttribute("aria-controls","driver-popover-content")}(e,n,t)}function to(e){let t=e.getState("__activeElement"),n=e.getState("__activeStep");t&&(Fr(e,t),function(e){let t=e.getState("__activeStagePosition"),n=e.getState("__overlaySvg");t&&(n?n.setAttribute("viewBox",`0 0 ${window.innerWidth} ${window.innerHeight}`):console.warn("No stage svg found."))}(e),function(e,t,n){let i=e.getState("popover");i&&Mr(i,t,Jr(e,t,n))}(e,t,n))}function no(e){let t=e.getState("__resizeTimeout");t&&window.cancelAnimationFrame(t),e.setState("__resizeTimeout",window.requestAnimationFrame(()=>to(e)))}function io(e){let t=t=>function(e,t){(e.getConfig("allowKeyboardControl")??1)&&("Escape"===t.key?e.emit("escapePress"):"ArrowRight"===t.key?e.emit("arrowRightPress"):"ArrowLeft"===t.key&&e.emit("arrowLeftPress"))}(e,t),n=t=>function(e,t){if(!e.getState("isInitialized")||"Tab"!==t.key&&9!==t.keyCode)return;let n=e.getState("__activeElement"),i=e.getState("popover")?.wrapper,r=zr([...i?[i]:[],...n?[n]:[]]),o=r[0],a=r[r.length-1];t.preventDefault(),t.shiftKey?(r[r.indexOf(document.activeElement)-1]||a)?.focus():(r[r.indexOf(document.activeElement)+1]||o)?.focus()}(e,t),i=()=>no(e),r=()=>no(e),o=t=>function(e,t){let n=e.getState("__activeElement"),i=t.target;!n||!i||!n.contains(i)||e.emit("activeElementClick")}(e,t);e.setState("__events",{onKeyup:t,onKeydown:n,onResize:i,onScroll:r,onClick:o}),window.addEventListener("keyup",t,!1),window.addEventListener("keydown",n,!1),window.addEventListener("resize",i),window.addEventListener("scroll",r),document.addEventListener("click",o,!1)}function ro(e={}){let t=function(e={}){let t=function(){let e={};function t(t={}){e={animate:!0,duration:400,allowClose:!0,allowScroll:!0,overlayClickBehavior:"close",overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,advanceOnClick:!1,skipMissingElement:!1,waitForElement:0,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000",...t}}return t(),{getConfig:t=>t?e[t]:e,configure:t}}();t.configure(e);let n,i=function(){let e={};return{getState:t=>t?e[t]:e,setState:(t,n)=>{e[t]=n},resetState:function(){e={}}}}(),r=function(){let e={};return{listen:function(t,n){e[t]=n},emit:function(t){e[t]?.()},reset:function(){e={}}}}();return{getConfig:t.getConfig,setConfig:t.configure,getState:i.getState,setState:i.setState,resetState:i.resetState,listen:r.listen,emit:r.emit,resetEmitter:r.reset,getDriver:()=>n,setDriver:e=>{n=e},getHookOpts:e=>{let r=e||i.getState();return{config:t.getConfig(),state:r,driver:n,index:r.activeIndex}}}}(e);function n(){t.getConfig("allowClose")&&h()}function i(){let e=t.getConfig("overlayClickBehavior");if(t.getConfig("allowClose")&&"close"===e)h();else{if("function"==typeof e){let n=t.getState("__activeStep");return void e(t.getState("__activeElement"),n,t.getHookOpts())}if("nextStep"===e){let e=t.getState("activeStep"),n=t.getState("activeElement"),i=Gr(t,e);if(i)return void i(n,e,t.getHookOpts());r()}}}function r(){let e=t.getState("activeIndex"),n=t.getConfig("steps")||[];if(void 0===e)return;let i=e+1;n[i]?u(i):h()}function o(){let e=t.getState("activeIndex"),n=t.getConfig("steps")||[];if(void 0===e)return;let i=e-1;n[i]?u(i):h()}function a(){if(t.getState("__transitionCallback"))return;let e=t.getState("__activeStep");if(!e||!(e.advanceOnClick??t.getConfig("advanceOnClick")))return;let n=t.getState("__activeElement"),i=Gr(t,e);i?i(n,e,t.getHookOpts()):r()}function s(){if(t.getState("__transitionCallback"))return;let e=t.getState("activeIndex"),n=t.getState("__activeStep"),i=t.getState("__activeElement");if(void 0===e||void 0===n||!(t.getConfig("steps")||[])[e-1])return;let r=Kr(t,n);if(r)return r(i,n,t.getHookOpts());o()}function l(){if(t.getState("__transitionCallback"))return;let e=t.getState("activeIndex"),n=t.getState("__activeStep"),i=t.getState("__activeElement");if(void 0===e||void 0===n)return;let o=Gr(t,n);if(o)return o(i,n,t.getHookOpts());r()}function c(){t.getState("isInitialized")||(t.setState("isInitialized",!0),document.body.classList.add("driver-active",t.getConfig("animate")?"driver-fade":"driver-simple"),t.getConfig("allowScroll")||document.body.classList.add("driver-no-scroll"),document.body.style.setProperty("--driver-animation-duration",`${t.getConfig("duration")||400}ms`),io(t),t.listen("overlayClick",i),t.listen("activeElementClick",a),t.listen("escapePress",n),t.listen("closeClick",n),t.listen("arrowLeftPress",s),t.listen("arrowRightPress",l))}function d(){let e=t.getState("__pendingWaitCancel");e&&(t.setState("__pendingWaitCancel",void 0),e())}function u(e=0,n=!1){d();let i=t.getConfig("steps");if(!i)return console.error("No steps to drive through"),void h();if(!i[e])return void h();let r=i[e],o=r.waitForElement??t.getConfig("waitForElement")??0;if(!n&&o>0&&r.element&&!Ir(r.element))return void function(e,n,i){let r=()=>{o.disconnect(),window.clearTimeout(a),t.setState("__pendingWaitCancel",void 0),i()},o=new MutationObserver(()=>{Ir(e.element)&&r()}),a=window.setTimeout(r,n);t.setState("__pendingWaitCancel",()=>{o.disconnect(),window.clearTimeout(a)}),o.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0})}(r,o,()=>u(e,!0));if(Ur(t,r)){let n=t.getState("activeIndex"),r="number"==typeof n&&e<n?-1:1;return void(i[e+r]?u(e+r):1===r&&h())}t.setState("__activeOnDestroyed",document.activeElement),t.setState("activeIndex",e);let a=i[e+1];eo(t,function(e,t,n){let i=e.getConfig("steps")||[],r=i[t],o=r.popover||{},a=void 0!==Zr(e,t+1,1),s=void 0!==Zr(e,t-1,-1),l=o.doneBtnText||e.getConfig("doneBtnText")||"Done",c=e.getConfig("allowClose"),d=void 0===o.showProgress?e.getConfig("showProgress"):o.showProgress,u=(o.progressText||e.getConfig("progressText")||Vr).replace("{{current}}",`${t+1}`).replace("{{total}}",`${i.length}`),h=o.showButtons||e.getConfig("showButtons"),p=["next","previous",...c?["close"]:[]].filter(e=>!h?.length||h.includes(e)),m=o.onNextClick||e.getConfig("onNextClick"),f=o.onPrevClick||e.getConfig("onPrevClick"),v=o.onCloseClick||e.getConfig("onCloseClick");return{...r,popover:{showButtons:p,nextBtnText:a?void 0:l,disableButtons:[...s?[]:["previous"]],showProgress:d,onNextClick:m||n.onNextClick,onPrevClick:f||n.onPrevClick,onCloseClick:v||n.onCloseClick,...o,progressText:u}}}(t,e,{onNextClick:()=>{a?u(e+1):h()},onPrevClick:()=>{u(e-1)},onCloseClick:()=>{h()}}))}function h(e=!0){let n=t.getState("__activeElement"),i=t.getState("__activeStep"),r=t.getState("__activeOnDestroyed"),o=t.getConfig("onDestroyStarted");if(e&&o)return void o(n&&"driver-dummy-element"!==n?.id?n:void 0,i,t.getHookOpts());let a=i?.onDeselected||t.getConfig("onDeselected"),s=t.getConfig("onDestroyed");document.body.classList.remove("driver-active","driver-fade","driver-simple","driver-no-scroll"),document.body.style.removeProperty("--driver-animation-duration"),d(),function(e){let t=e.getState("__events");t&&(window.removeEventListener("keyup",t.onKeyup),window.removeEventListener("keydown",t.onKeydown),window.removeEventListener("resize",t.onResize),window.removeEventListener("scroll",t.onScroll),document.removeEventListener("click",t.onClick,!1))}(t),Rr(t.getState("popover")),document.getElementById("driver-dummy-element")?.remove(),document.querySelectorAll(".driver-active-element").forEach(e=>{let t=e.parentElement;t&&t!==document.body&&t.classList.remove("driver-active-element-parent","driver-active-element-parent-no-scroll"),e.classList.remove("driver-active-element","driver-no-interaction"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls")}),Yr(t),t.resetEmitter();let l=t.getState();if(t.resetState(),n&&i){let e="driver-dummy-element"===n.id;a&&a(e?void 0:n,i,t.getHookOpts(l)),s&&s(e?void 0:n,i,t.getHookOpts(l))}r&&r.focus()}let p={isActive:()=>t.getState("isInitialized")||!1,refresh:()=>no(t),drive:(e=0)=>{c(),u(e)},setConfig:t.setConfig,setSteps:e=>{d(),t.resetState(),t.setConfig({...t.getConfig(),steps:e})},getConfig:t.getConfig,getState:t.getState,getActiveIndex:()=>t.getState("activeIndex"),isFirstStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0===Zr(t,e-1,-1)},isLastStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0===Zr(t,e+1,1)},getActiveStep:()=>t.getState("activeStep"),getActiveElement:()=>t.getState("activeElement"),getPreviousElement:()=>t.getState("previousElement"),getPreviousStep:()=>t.getState("previousStep"),getNextStep:()=>{let e=t.getConfig("steps")||[],n=t.getState("activeIndex");if(void 0===n)return;let i=Zr(t,n+1,1);return void 0===i?void 0:e[i]},moveNext:r,movePrevious:o,moveTo:function(e){(t.getConfig("steps")||[])[e]?u(e):h()},hasNextStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0!==Zr(t,e+1,1)},hasPreviousStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0!==Zr(t,e-1,-1)},highlight:e=>{c(),eo(t,{...e,popover:e.popover?{showButtons:[],showProgress:!1,progressText:"",...e.popover}:void 0})},destroy:()=>{h(!1)}};return t.setDriver(p),p}var oo=null,ao=[];var so="docList-mermaid-driver",lo="docList-menu-driver",co="docList-pc-menu-driver";async function uo(t){const n=document.querySelectorAll("code.language-mermaid"),{showDriverGuide:i,isPrintPreview:r=!1,chartConfig:o,defaultCollapsed:a=!0,cdn:s}=t||{};for(const l of n){const t=l.parentElement;if(!t)continue;const n=l.textContent.trim(),c=document.createElement("div");c.className="mermaid-react-root",t.replaceWith(c),P(c).render(/* @__PURE__ */$(e.StrictMode,{children:/* @__PURE__ */$(Ri,{children:/* @__PURE__ */$(po,{source:n,enablePanzoom:!0,showDownload:!0,showSourceView:!0,showCollapse:!0,chartConfig:o,defaultCollapsed:a,isPrintPreview:r,minHeight:200,showDriverGuide:i,cdn:s})})}))}}var ho=/* @__PURE__ */U({default:()=>po,renderMermaid:()=>mo,renderMermaidWithControls:()=>uo}),po=n(function({source:e,debounceMs:t=300,enablePanzoom:n=!0,showDownload:c=!0,showSourceView:d=!1,showCollapse:u=!1,defaultCollapsed:h=!0,className:p="",minHeight:m=200,showDriverGuide:f,isPrintPreview:v=!1,chartConfig:g,cdn:w}){const{isDark:b}=function(){const e=r(Di);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}(),{svg:y,error:k,loading:x}=Vi({source:e,debounceMs:t,isDark:b,chartConfig:g,cdn:w}),S=s(null),C=s(null),{isFullscreen:E,isCollapsed:A,setIsCollapsed:T,showSource:M,setShowSource:O,isMinimize:L,setIsMinimize:P,isPanzoomEnabled:j,setIsPanzoomEnabled:N,toggleFullscreen:D}=function({showCollapse:e,showSourceView:t,defaultCollapsed:n,isPrintPreview:r,svg:a,error:s,loading:c,wrapperRef:d}){const[u,h]=l(!1),[p,m]=l(n),[f,v]=l(!1),[g,w]=l(t),[b,y]=l(!1);return o(()=>{r&&a&&!s&&!c&&m(!1)},[r,a,s,c]),o(()=>{const t=()=>{h(!!document.fullscreenElement),!document.fullscreenElement&&e&&m(!0)};return r||document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[e,r]),{isFullscreen:u,setIsFullscreen:h,isCollapsed:p,setIsCollapsed:m,showSource:f,setShowSource:v,isMinimize:g,setIsMinimize:w,isPanzoomEnabled:b,setIsPanzoomEnabled:y,toggleFullscreen:i(()=>{document.fullscreenElement?document.exitFullscreen():d.current?.requestFullscreen?.()},[d])}}({showCollapse:u,showSourceView:d,defaultCollapsed:h,isPrintPreview:v,svg:y,error:k,loading:x,wrapperRef:S}),R=n&&(E||!A||!u),H=R&&j,B=function({contentRef:e,wrapperRef:t,enabled:n,svg:i,isFullscreen:r}){const a=s(null);return o(()=>{if(!n||!e.current||!i)return void(a.current&&(a.current.destroy(),a.current=null));a.current&&(a.current.destroy(),a.current=null);const r=mr(e.current,{maxScale:5,minScale:.1,startScale:1,contain:"outside"});a.current={destroy:()=>r.destroy(),zoomWithWheel:r.zoomWithWheel,zoomIn:()=>r.zoomIn(),zoomOut:()=>r.zoomOut(),reset:()=>r.reset()};const o=t.current,s=a.current.zoomWithWheel;return o?.addEventListener("wheel",s),()=>{o?.removeEventListener("wheel",s),a.current&&(a.current.destroy(),a.current=null)}},[i,r,n,e,t]),a}({contentRef:C,wrapperRef:S,enabled:H&&!!y&&!v,svg:y,isFullscreen:E});o(()=>{f&&!v&&function(e){if(ao=e,oo)return;const t=e=>{const n=ao;if(e>=n.length)return void(oo=null);const i=n[e];if(i.condition&&!i.condition())return void t(e+1);i?.onOpen?.();const r=ro({nextBtnText:"下一步",prevBtnText:"上一步",doneBtnText:"我知道了",showProgress:!0,allowClose:!1,progressText:"第 {{current}} 步,共 {{total}} 步",onDestroyed:()=>{oo=null,t(e+1)},steps:i.steps.filter(e=>!1!==e.isShow)||[]});oo=r,r.drive()};t(0)}(function(e,t){return[{id:lo,condition:()=>!localStorage[lo]&&e&&!(0,ue.IsPC)()&&"true"!==localStorage.docListMenuVisible,onOpen:()=>{localStorage[lo]="1"},steps:[{element:".docList-menu-anchor",popover:{title:"大纲",description:"点击此处您可查看大纲"}},{element:".docList-menu-list",popover:{title:"列表",description:"点击此处您可查看当前分类下文章列表"}},{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}}]},{id:co,condition:()=>!localStorage[co]&&(0,ue.IsPC)()&&e,onOpen:()=>{localStorage[co]="1"},steps:[{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}},{element:".docList-menu-mermaid-collapse",popover:{title:"展开收起mermaid",description:"点击此处按钮可一键展开收起mermaid图表"},isShow:t}]},{id:so,condition:()=>!(!t||localStorage[so]||!e),onOpen:()=>{localStorage[so]="1"},steps:[{element:".mermaid-react-root",popover:{title:"mermaid",description:"恭喜您解锁 Mermaid 渲染图表"}},{element:".mermaid-react-root .mermaid-minimize-btn",popover:{title:"缩略图",description:"点击此处按钮可查看缩略图"}},{element:".mermaid-react-root .mermaid-fullscreen-btn",popover:{title:"全屏",description:"点击此处按钮可切换为全屏展示"}},{element:".mermaid-react-root .mermaid-showcode-btn",popover:{title:"源码",description:"点击此处按钮查看源码弹窗"}},{element:".mermaid-react-root .mermaid-collapsed-btn",popover:{title:"展开",description:"点击此处按钮展开大图"}}]}]}(d,!!y))},[y,f,v,d]);const F=function(e){const t=e.match(/---\s*\n\s*title:\s*(.+)\s*\n\s*---/);return t?t[1].trim():"mermaid 图表"}(e),q=i(()=>{y?function(e,t="image"){Oi(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),`${t}.svg`)}(y,F):ie.warning("暂无图表")},[y,F]),W=i(()=>{y?Li(y,F,2):ie.warning("暂无图表")},[y,F]),X=a(()=>({items:[{key:"svg",label:"下载 SVG"},{key:"png",label:"下载 PNG"}],onClick:({key:e})=>"svg"===e?q():W()}),[q,W]),Y=!!y;/* @__PURE__ */
|
|
13
|
+
return z("div",{ref:S,className:G.bind(xr)(E?"mermaid-wrapper-fullscreen":"",u?"mermaid-wrapper":"",A&&u&&!L?"mermaid-collapsed":"",p,L&&A&&!E?"mermaid-mini":"",v?"print-preview":""),style:{minHeight:L?0:m,position:"relative",height:"100%"},children:[!v&&/* @__PURE__ */z(I,{children:[d&&/* @__PURE__ */z("div",{className:"mermaid-title",children:[/* @__PURE__ */z("span",{className:"mermaid-title-tag",children:[/* @__PURE__ */$("img",{src:"data:image/svg+xml,%3csvg%20t='1784097187016'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5199'%20width='200'%20height='200'%3e%3cpath%20d='M0%200m125.754386%200l772.491228%200q125.754386%200%20125.754386%20125.754386l0%20772.491228q0%20125.754386-125.754386%20125.754386l-772.491228%200q-125.754386%200-125.754386-125.754386l0-772.491228q0-125.754386%20125.754386-125.754386Z'%20fill='%23FC366E'%20p-id='5200'%3e%3c/path%3e%3cpath%20d='M921.150877%20174.547088a417.091368%20417.091368%200%200%200-409.168842%20274.198456%20417.235088%20417.235088%200%200%200-409.150877-274.198456%20417.360842%20417.360842%200%200%200%20181.625263%20361.992982%20223.914667%20223.914667%200%200%201%2097.010526%20185.038597v128.143719h261.084071v-128.07186a223.914667%20223.914667%200%200%201%2097.010526-185.038596%20417.181193%20417.181193%200%200%200%20181.553403-361.921123z'%20fill='%23FFFFFF'%20p-id='5201'%3e%3c/path%3e%3c/svg%3e",alt:""}),/* @__PURE__ */$("span",{className:"mermaid-title-text",children:"Mermaid"})]}),F]}),!Y&&/* @__PURE__ */z("div",{className:"mermaid-toolbar-loading",children:[/* @__PURE__ */$(_,{})," "]}),Y&&/* @__PURE__ */$(kr,{showSourceView:d,showCollapse:u,showDownload:c,isFullscreen:E,isCollapsed:A,isMinimize:L,isPanzoomActive:H,isPanzoomAvailable:R,isPanzoomEnabled:j,setIsPanzoomEnabled:N,setIsMinimize:P,setIsCollapsed:T,setShowSource:O,toggleFullscreen:()=>{B.current?.reset(),D()},downloadMenu:X,panzoomRef:B})]}),k&&/* @__PURE__ */z("div",{className:xr.errorTip,children:["⚠️ ",k]}),
|
|
14
|
+
/* @__PURE__ */z("div",{className:`${xr.previewArea} ${H?"":xr.previewAreaDisabled}`,style:{minHeight:Y?"auto":m},children:[/* @__PURE__ */$("div",{ref:C,className:xr.previewContent,dangerouslySetInnerHTML:{__html:y||""}}),(!Y&&!k||x)&&/* @__PURE__ */$("div",{className:xr.emptyTip,children:e?.trim()?"渲染中...":"← 输入 Mermaid 源码"})]}),d&&/* @__PURE__ */$(Fi,{open:M,title:"Mermaid 源码",className:"mermaid-code-modal",width:(0,ue.IsPC)()?800:"calc(100% - 20px)",onCancel:()=>O(!1),footer:null,children:/* @__PURE__ */$(Ti,{isShowCollapsed:!1,isSlotMermaid:!1,codeType:"mermaid",content:e})})]})}),mo=e=>/* @__PURE__ */$(Ri,{children:/* @__PURE__ */$(po,{...e})}),fo=Ti;export{fo as default,di as initHighlighter,Mi as languagesCommon,ci as markdownFormat,mo as renderMermaid};
|
package/package.json
CHANGED
|
@@ -1,93 +1,95 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "remons-render-markdown",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "一个基于 React 的 Markdown 渲染组件,支持 GFM(GitHub Flavored Markdown)、代码高亮、Mermaid 图表、Tabs 渲染等功能。",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.mjs",
|
|
7
|
-
"module": "./dist/index.mjs",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./dist/index.mjs",
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
13
|
-
},
|
|
14
|
-
"./dist/index.css": "./dist/index.css"
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "vite build",
|
|
21
|
-
"build:analyze": "vite-bundle-visualizer --output dist/stats.html --open",
|
|
22
|
-
"dev": "vite",
|
|
23
|
-
"lint": "eslint . --ext .ts,.tsx",
|
|
24
|
-
"format": "prettier --write .",
|
|
25
|
-
"changeset": "changeset",
|
|
26
|
-
"version": "changeset version",
|
|
27
|
-
"release": "changeset publish"
|
|
28
|
-
},
|
|
29
|
-
"keywords": [
|
|
30
|
-
"markdown",
|
|
31
|
-
"react",
|
|
32
|
-
"render",
|
|
33
|
-
"gfm",
|
|
34
|
-
"mermaid"
|
|
35
|
-
],
|
|
36
|
-
"author": "remons",
|
|
37
|
-
"license": "MIT",
|
|
38
|
-
"peerDependencies": {
|
|
39
|
-
"@ant-design/icons": ">=5.0.0",
|
|
40
|
-
"react": ">=
|
|
41
|
-
"react-dom": ">=
|
|
42
|
-
},
|
|
43
|
-
"peerDependenciesMeta": {
|
|
44
|
-
"@ant-design/icons": {
|
|
45
|
-
"optional": false
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"devDependencies": {
|
|
49
|
-
"@ant-design/icons": "^6.3.2",
|
|
50
|
-
"@changesets/cli": "^2.27.0",
|
|
51
|
-
"@types/react": "^
|
|
52
|
-
"@types/react-dom": "^
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
54
|
-
"@typescript-eslint/parser": "^6.0.0",
|
|
55
|
-
"@vitejs/plugin-react": "^4.3.0",
|
|
56
|
-
"eslint": "^8.0.0",
|
|
57
|
-
"less": "^4.2.0",
|
|
58
|
-
"prettier": "^3.0.0",
|
|
59
|
-
"react": "^
|
|
60
|
-
"react-dom": "^
|
|
61
|
-
"terser": "^5.50.0",
|
|
62
|
-
"typescript": "^5.3.0",
|
|
63
|
-
"vite": "^8.0.0",
|
|
64
|
-
"vite-bundle-visualizer": "^1.2.1",
|
|
65
|
-
"vite-plugin-commonjs": "^0.10.4",
|
|
66
|
-
"vite-plugin-dts": "^4.0.0"
|
|
67
|
-
},
|
|
68
|
-
"publishConfig": {
|
|
69
|
-
"registry": "https://registry.npmjs.org/",
|
|
70
|
-
"access": "public"
|
|
71
|
-
},
|
|
72
|
-
"dependencies": {
|
|
73
|
-
"@mdit/plugin-alert": "^2.0.0",
|
|
74
|
-
"@mdit/plugin-tab": "^2.0.0",
|
|
75
|
-
"@panzoom/panzoom": "^4.6.2",
|
|
76
|
-
"classnames": "^2.5.1",
|
|
77
|
-
"driver.js": "^1.8.0",
|
|
78
|
-
"highlight.js": "^11.12.0",
|
|
79
|
-
"lodash.clonedeep": "^4.5.0",
|
|
80
|
-
"markdown-it": "^15.0.1",
|
|
81
|
-
"markdown-it-anchor": "^9.2.1",
|
|
82
|
-
"markdown-it-github-alerts": "^1.0.1",
|
|
83
|
-
"markdown-it-link-attributes": "^4.0.1",
|
|
84
|
-
"markdown-it-task-lists": "^2.1.1",
|
|
85
|
-
"markdown-it-toc-done-right": "^4.2.0",
|
|
86
|
-
"methods-r": "^2.0.0-rc.1",
|
|
87
|
-
"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "remons-render-markdown",
|
|
3
|
+
"version": "2.0.1-beta.2",
|
|
4
|
+
"description": "一个基于 React 的 Markdown 渲染组件,支持 GFM(GitHub Flavored Markdown)、代码高亮、Mermaid 图表、Tabs 渲染等功能。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.mjs",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./dist/index.css": "./dist/index.css"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "vite build",
|
|
21
|
+
"build:analyze": "vite-bundle-visualizer --output dist/stats.html --open",
|
|
22
|
+
"dev": "vite",
|
|
23
|
+
"lint": "eslint . --ext .ts,.tsx",
|
|
24
|
+
"format": "prettier --write .",
|
|
25
|
+
"changeset": "changeset",
|
|
26
|
+
"version": "changeset version",
|
|
27
|
+
"release": "changeset publish"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"markdown",
|
|
31
|
+
"react",
|
|
32
|
+
"render",
|
|
33
|
+
"gfm",
|
|
34
|
+
"mermaid"
|
|
35
|
+
],
|
|
36
|
+
"author": "remons",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"@ant-design/icons": ">=5.0.0",
|
|
40
|
+
"react": ">=19.0.0",
|
|
41
|
+
"react-dom": ">=19.0.0"
|
|
42
|
+
},
|
|
43
|
+
"peerDependenciesMeta": {
|
|
44
|
+
"@ant-design/icons": {
|
|
45
|
+
"optional": false
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@ant-design/icons": "^6.3.2",
|
|
50
|
+
"@changesets/cli": "^2.27.0",
|
|
51
|
+
"@types/react": "^19.0.0",
|
|
52
|
+
"@types/react-dom": "^19.0.0",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
54
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
55
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
56
|
+
"eslint": "^8.0.0",
|
|
57
|
+
"less": "^4.2.0",
|
|
58
|
+
"prettier": "^3.0.0",
|
|
59
|
+
"react": "^19.0.0",
|
|
60
|
+
"react-dom": "^19.0.0",
|
|
61
|
+
"terser": "^5.50.0",
|
|
62
|
+
"typescript": "^5.3.0",
|
|
63
|
+
"vite": "^8.0.0",
|
|
64
|
+
"vite-bundle-visualizer": "^1.2.1",
|
|
65
|
+
"vite-plugin-commonjs": "^0.10.4",
|
|
66
|
+
"vite-plugin-dts": "^4.0.0"
|
|
67
|
+
},
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"registry": "https://registry.npmjs.org/",
|
|
70
|
+
"access": "public"
|
|
71
|
+
},
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"@mdit/plugin-alert": "^2.0.0",
|
|
74
|
+
"@mdit/plugin-tab": "^2.0.0",
|
|
75
|
+
"@panzoom/panzoom": "^4.6.2",
|
|
76
|
+
"classnames": "^2.5.1",
|
|
77
|
+
"driver.js": "^1.8.0",
|
|
78
|
+
"highlight.js": "^11.12.0",
|
|
79
|
+
"lodash.clonedeep": "^4.5.0",
|
|
80
|
+
"markdown-it": "^15.0.1",
|
|
81
|
+
"markdown-it-anchor": "^9.2.1",
|
|
82
|
+
"markdown-it-github-alerts": "^1.0.1",
|
|
83
|
+
"markdown-it-link-attributes": "^4.0.1",
|
|
84
|
+
"markdown-it-task-lists": "^2.1.1",
|
|
85
|
+
"markdown-it-toc-done-right": "^4.2.0",
|
|
86
|
+
"methods-r": "^2.0.0-rc.1",
|
|
87
|
+
"react": "^19.3.0",
|
|
88
|
+
"react-dom": "^19.3.0",
|
|
89
|
+
"viewerjs": "^1.11.9"
|
|
90
|
+
},
|
|
91
|
+
"repository": {
|
|
92
|
+
"type": "git",
|
|
93
|
+
"url": "https://github.com/liRemons/render-markdown.git"
|
|
94
|
+
}
|
|
95
|
+
}
|