"use strict";var Al=(e,t,l)=>{if(!t.has(e))throw TypeError("Cannot "+l)};var Yl=(e,t,l)=>(Al(e,t,"read from private field"),l?l.call(e):t.get(e)),xl=(e,t,l)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,l)},yl=(e,t,l,n)=>(Al(e,t,"write to private field"),n?n.call(e,l):t.set(e,l),l);/*! THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository https://github.com/mokeyish/obsidian-enhancing-export . */Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const We=require("obsidian"),tc=require("child_process"),Nt=require("process"),mn=require("electron"),Gn=require("fs"),de=require("path"),lc=require("util");function bl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const n=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(t,l,n.get?n:{enumerable:!0,get:()=>e[l]})}}return t.default=e,Object.freeze(t)}const nc=bl(We),Se=bl(mn),Ut=bl(Gn),ft={Markdown:{name:"Markdown",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown.lua" -s -o "${outputPath}" -t commonmark_x-attributes',extension:".md"},"Markdown (Hugo)":{name:"Markdown (Hugo)",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown+hugo.lua" -s -o "${outputPath}" -t commonmark_x-attributes',extension:".md"},Html:{name:"Html",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/math_block.lua" --embed-resources --standalone --metadata title="${currentFileName}" -s -o "${outputPath}" -t html',customArguments:'--mathjax="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg-full.js"',extension:".html"},TextBundle:{name:"TextBundle",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown.lua" -V media_dir="${outputDir}/${outputFileName}.textbundle/assets" -s -o "${outputDir}/${outputFileName}.textbundle/text.md" -t commonmark_x-attributes',extension:".md"},Typst:{name:"Typst",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown.lua" -s -o "${outputPath}" -t typst',extension:".typ"},PDF:{name:"PDF",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/pdf.lua" ${ options.textemplate ? `--resource-path="${pluginDir}/textemplate" --template="${options.textemplate}"` : ` ` } -o "${outputPath}" -t pdf',customArguments:"--pdf-engine=pdflatex",optionsMeta:{textemplate:"preset:textemplate"},extension:".pdf"},"Word (.docx)":{name:"Word (.docx)",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -o "${outputPath}" -t docx',extension:".docx"},OpenOffice:{name:"OpenOffice",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -o "${outputPath}" -t odt',extension:".odt"},RTF:{name:"RTF",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t rtf',extension:".rtf"},Epub:{name:"Epub",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -o "${outputPath}" -t epub',extension:".epub"},Latex:{name:"Latex",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" ${ options.textemplate ? `--resource-path="${pluginDir}/textemplate" --template="${options.textemplate}"` : ` ` } --extract-media="${outputDir}" -s -o "${outputPath}" -t latex',optionsMeta:{textemplate:"preset:textemplate"},extension:".tex"},"Media Wiki":{name:"Media Wiki",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t mediawiki',extension:".mediawiki"},reStructuredText:{name:"reStructuredText",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t rst',extension:".rst"},Textile:{name:"Textile",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t textile',extension:".textile"},OPML:{name:"OPML",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" -s -o "${outputPath}" -t opml',extension:".opml"},"Bibliography (.bib)":{name:"Bibliography",type:"pandoc",arguments:'-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/citefilter.lua" -o "${outputPath}" --to=bibtex "${currentPath}"',extension:".bib"},Custom:{name:"Custom",type:"custom",command:"your command",targetFileExtensions:".ext"}};function Be(e,t,l){return typeof t=="string"&&t.trim()===""&&(t=void 0),l instanceof Array?l.reduce((n,c)=>Be(n,t,c),e):(l??(l=Nt.platform),{...e??{},[l]:t})}function ue(e,t){e??(e={});const l=e[t??Nt.platform],n=e["*"];return n&&typeof n=="object"?Object.assign({},n,l):l??n}function L(e,...t){return function(...l){const n=l[l.length-1]||{},c=[e[0]];return t.forEach(function(i,s){const a=Number.isInteger(i)?l[i]:n[i];c.push(a,e[s+1])}),c.join("")}}function cl(e,t){return t=t??{},new Promise((l,n)=>{tc.exec(e,t,(c,i,s)=>{if(c){n(c),console.error(i,c);return}if(s&&s!==""){n(s),console.error(i,c);return}(i==null?void 0:i.trim().length)===0&&localStorage.getItem("debug-plugin")==="1"&&console.log(i),l(i)})})}function cc(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.substring(1,e.length-1):e}function il(e,t={}){for(;;)try{const l=Object.keys(t).filter(ic),n=l.map(c=>t[c]);return new Function(...l,`{ return \`${e.replaceAll("\\","\\\\")}\` }`).bind(t)(...n)}catch(l){if(l instanceof ReferenceError&&l.message.endsWith("is not defined")){const n=l.message.substring(0,l.message.indexOf(" ")),c=Object.keys(t).filter(i=>i.toLowerCase()===n.toLowerCase()).map(i=>t[i])[0]??`\${${n}}`;t[n]=c}else throw l}}const ic=e=>{if(typeof e!="string"||e.trim()!==e)return!1;try{new Function(e,"var "+e)}catch{return!1}return!0},sc={textemplate:{title:"Latex Template",type:"dropdown",options:[{name:"None",value:null},{name:"Dissertation",value:"dissertation.tex"},{name:"Academic Paper",value:"neurips.tex"}]}},ot=(()=>{let e={};return e=Be(e,{HOME:"${HOME}",PATH:"${PATH}",TEXINPUTS:"${pluginDir}/textemplate/:"},"*"),e=Be(e,{TEXINPUTS:"${pluginDir}/textemplate/;",PATH:"${HOME}\\AppData\\Local\\Pandoc;${PATH}"},"win32"),e=Be(e,{PATH:"/opt/homebrew/bin:/usr/local/bin:/Library/TeX/texbin:${PATH}"},"darwin"),e})(),tt={items:Object.values(ft).filter(e=>e.type!=="custom"),pandocPath:void 0,defaultExportDirectoryMode:"Auto",openExportedFile:!0,env:ot,showExportProgressBar:!0};function hn(e){var t;return e.type==="pandoc"?e.extension:e.type==="custom"?(t=e.targetFileExtensions)==null?void 0:t.split(",")[0]:""}function In(e,t){return e=Object.assign({},ue(ot),e),t=Object.assign({HOME:process.env.HOME??process.env.USERPROFILE},process.env,t??{}),Object.fromEntries(Object.entries(e).map(([l,n])=>[l,il(n,t)]))}function ac(e){return e?Object.fromEntries(Object.entries(e).map(([t,l])=>[t,typeof l=="string"?sc[l.startsWith("preset:")?l.substring(7):""]:l])):{}}const rc=(e,t)=>e===t,Re=Symbol("solid-proxy"),sl=Symbol("solid-track"),At={equals:rc};let Cn=Vn;const ke=1,Yt=2,Wn={owned:null,cleanups:null,context:null,owner:null};var T=null;let jt=null,oc=null,P=null,ie=null,He=null,vt=0;function Te(e,t){const l=P,n=T,c=e.length===0,i=n,s=c?Wn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=c?e:()=>e(()=>D(()=>St(s)));T=s,P=null;try{return qe(a,!0)}finally{P=l,T=n}}function oe(e,t){t=t?Object.assign({},At,t):At;const l={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},n=c=>(typeof c=="function"&&(c=c(l.value)),Rn(l,c));return[Xn.bind(l),n]}function ne(e,t,l){const n=Zl(e,t,!1,ke);bt(n)}function Fe(e,t,l){Cn=Zc;const n=Zl(e,t,!1,ke);n.user=!0,He?He.push(n):bt(n)}function le(e,t,l){l=l?Object.assign({},At,l):At;const n=Zl(e,t,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=l.equals||void 0,bt(n),Xn.bind(n)}function Xt(e){return qe(e,!1)}function D(e){if(P===null)return e();const t=P;P=null;try{return e()}finally{P=t}}function pn(e){Fe(()=>D(e))}function _e(e){return T===null||(T.cleanups===null?T.cleanups=[e]:T.cleanups.push(e)),e}function al(){return P}function dc(e,t){const l=Symbol("context");return{id:l,Provider:Gc(l),defaultValue:e}}function gc(e){return T&&T.context&&T.context[e.id]!==void 0?T.context[e.id]:e.defaultValue}function fn(e){const t=le(e),l=le(()=>rl(t()));return l.toArray=()=>{const n=l();return Array.isArray(n)?n:n!=null?[n]:[]},l}function Xn(){if(this.sources&&this.state)if(this.state===ke)bt(this);else{const e=ie;ie=null,qe(()=>yt(this),!1),ie=e}if(P){const e=this.observers?this.observers.length:0;P.sources?(P.sources.push(this),P.sourceSlots.push(e)):(P.sources=[this],P.sourceSlots=[e]),this.observers?(this.observers.push(P),this.observerSlots.push(P.sources.length-1)):(this.observers=[P],this.observerSlots=[P.sources.length-1])}return this.value}function Rn(e,t,l){let n=e.value;return(!e.comparator||!e.comparator(n,t))&&(e.value=t,e.observers&&e.observers.length&&qe(()=>{for(let c=0;c1e6)throw ie=[],new Error},!1)),t}function bt(e){if(!e.fn)return;St(e);const t=vt;uc(e,e.value,t)}function uc(e,t,l){let n;const c=T,i=P;P=T=e;try{n=e.fn(t)}catch(s){return e.pure&&(e.state=ke,e.owned&&e.owned.forEach(St),e.owned=null),e.updatedAt=l+1,Yn(s)}finally{P=i,T=c}(!e.updatedAt||e.updatedAt<=l)&&(e.updatedAt!=null&&"observers"in e?Rn(e,n):e.value=n,e.updatedAt=l)}function Zl(e,t,l,n=ke,c){const i={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:T,context:T?T.context:null,pure:l};return T===null||T!==Wn&&(T.owned?T.owned.push(i):T.owned=[i]),i}function xt(e){if(e.state===0)return;if(e.state===Yt)return yt(e);if(e.suspense&&D(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;l--)if(e=t[l],e.state===ke)bt(e);else if(e.state===Yt){const n=ie;ie=null,qe(()=>yt(e,t[0]),!1),ie=n}}function qe(e,t){if(ie)return e();let l=!1;t||(ie=[]),He?l=!0:He=[],vt++;try{const n=e();return bc(l),n}catch(n){l||(He=null),ie=null,Yn(n)}}function bc(e){if(ie&&(Vn(ie),ie=null),e)return;const t=He;He=null,t.length&&qe(()=>Cn(t),!1)}function Vn(e){for(let t=0;t=0;t--)St(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function mc(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Yn(e,t=T){throw mc(e)}function rl(e){if(typeof e=="function"&&!e.length)return rl(e());if(Array.isArray(e)){const t=[];for(let l=0;lc=D(()=>(T.context={...T.context,[e]:n.value},fn(()=>n.children))),void 0),c}}const hc=Symbol("fallback");function Jl(e){for(let t=0;t1?[]:null;return _e(()=>Jl(i)),()=>{let r=e()||[],C,u;return r[sl],D(()=>{let Y=r.length,X,M,O,b,j,k,z,$,w;if(Y===0)s!==0&&(Jl(i),i=[],n=[],c=[],s=0,a&&(a=[])),l.fallback&&(n=[hc],c[0]=Te(be=>(i[0]=be,l.fallback())),s=1);else if(s===0){for(c=new Array(Y),u=0;u=k&&$>=k&&n[z]===r[$];z--,$--)O[$]=c[z],b[$]=i[z],a&&(j[$]=a[z]);for(X=new Map,M=new Array($+1),u=$;u>=k;u--)w=r[u],C=X.get(w),M[u]=C===void 0?-1:C,X.set(w,u);for(C=k;C<=z;C++)w=n[C],u=X.get(w),u!==void 0&&u!==-1?(O[u]=c[C],b[u]=i[C],a&&(j[u]=a[C]),u=M[u],X.set(w,u)):i[C]();for(u=k;ue(t||{}))}function Gt(){return!0}const Bl={get(e,t,l){return t===Re?l:e.get(t)},has(e,t){return t===Re?!0:e.has(t)},set:Gt,deleteProperty:Gt,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Gt,deleteProperty:Gt}},ownKeys(e){return e.keys()}};function Cc(e,...t){if(Re in e){const c=new Set(t.length>1?t.flat():t[0]),i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},Bl));return i.push(new Proxy({get(s){return c.has(s)?void 0:e[s]},has(s){return c.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!c.has(s))}},Bl)),i}const l={},n=t.map(()=>({}));for(const c of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,c),s=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let a=!1,r=0;for(const C of t)C.includes(c)&&(a=!0,s?n[r][c]=i.value:Object.defineProperty(n[r],c,i)),++r;a||(s?l[c]=i.value:Object.defineProperty(l,c,i))}return[...n,l]}const xn=e=>`Stale read from <${e}>.`;function yn(e){const t="fallback"in e&&{fallback:()=>e.fallback};return le(Ic(()=>e.each,e.children,t||void 0))}function Rt(e){const t=e.keyed,l=le(()=>e.when,void 0,{equals:(n,c)=>t?n===c:!n==!c});return le(()=>{const n=l();if(n){const c=e.children;return typeof c=="function"&&c.length>0?D(()=>c(t?n:()=>{if(!D(l))throw xn("Show");return e.when})):c}return e.fallback},void 0,void 0)}function Wc(e){let t=!1;const l=(i,s)=>(t?i[1]===s[1]:!i[1]==!s[1])&&i[2]===s[2],n=fn(()=>e.children),c=le(()=>{let i=n();Array.isArray(i)||(i=[i]);for(let s=0;s{const[i,s,a]=c();if(i<0)return e.fallback;const r=a.children;return typeof r=="function"&&r.length>0?D(()=>r(t?s:()=>{if(D(c)[0]!==i)throw xn("Match");return a.when})):r},void 0,void 0)}function Fl(e){return e}const pc=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],fc=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...pc]),Xc=new Set(["innerHTML","textContent","innerText","children"]),Rc=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Vc=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Ac(e,t){const l=Vc[e];return typeof l=="object"?l[t]?l.$:void 0:l}const Yc=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),xc=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),yc={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Jc(e,t,l){let n=l.length,c=t.length,i=n,s=0,a=0,r=t[c-1].nextSibling,C=null;for(;su-a){const M=t[s];for(;a{const s=document.createElement("template");return s.innerHTML=e,s.content.firstChild},i=()=>(n||(n=c())).cloneNode(!0);return i.cloneNode=i,i}function ml(e,t=window.document){const l=t[Hl]||(t[Hl]=new Set);for(let n=0,c=e.length;nc.call(e,l[1],i))}else e.addEventListener(t,l)}function Fc(e,t,l={}){const n=Object.keys(t||{}),c=Object.keys(l);let i,s;for(i=0,s=c.length;ic.children=dt(e,t.children,c.children)),ne(()=>typeof t.ref=="function"?kt(t.ref,e):t.ref=e),ne(()=>Nc(e,t,l,!0,c,!0)),c}function kt(e,t,l){return D(()=>e(t,l))}function se(e,t,l,n){if(l!==void 0&&!n&&(n=[]),typeof t!="function")return dt(e,t,n,l);ne(c=>dt(e,t(),c,l),n)}function Nc(e,t,l,n,c={},i=!1){t||(t={});for(const s in c)if(!(s in t)){if(s==="children")continue;c[s]=vl(e,s,null,c[s],l,i)}for(const s in t){if(s==="children")continue;const a=t[s];c[s]=vl(e,s,a,c[s],l,i)}}function vc(e){return e.toLowerCase().replace(/-([a-z])/g,(t,l)=>l.toUpperCase())}function Nl(e,t,l){const n=t.trim().split(/\s+/);for(let c=0,i=n.length;c-1&&yc[t.split(":")[0]];h?Bc(e,h,t,l):Ne(e,Rc[t]||t,l)}return l}function Sc(e){const t=`$$${e.type}`;let l=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==l&&Object.defineProperty(e,"target",{configurable:!0,value:l}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return l||document}});l;){const n=l[t];if(n&&!l.disabled){const c=l[`${t}Data`];if(c!==void 0?n.call(l,c,e):n.call(l,e),e.cancelBubble)return}l=l._$host||l.parentNode||l.host}}function dt(e,t,l,n,c){for(;typeof l=="function";)l=l();if(t===l)return l;const i=typeof t,s=n!==void 0;if(e=s&&l[0]&&l[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(t=t.toString()),s){let a=l[0];a&&a.nodeType===3?a.data!==t&&(a.data=t):a=document.createTextNode(t),l=Ue(e,l,n,a)}else l!==""&&typeof l=="string"?l=e.firstChild.data=t:l=e.textContent=t;else if(t==null||i==="boolean")l=Ue(e,l,n);else{if(i==="function")return ne(()=>{let a=t();for(;typeof a=="function";)a=a();l=dt(e,a,l,n)}),()=>l;if(Array.isArray(t)){const a=[],r=l&&Array.isArray(l);if(ol(a,t,l,c))return ne(()=>l=dt(e,a,l,n,!0)),()=>l;if(a.length===0){if(l=Ue(e,l,n),s)return l}else r?l.length===0?Sl(e,a,n):Jc(e,l,a):(l&&Ue(e),Sl(e,a));l=a}else if(t.nodeType){if(Array.isArray(l)){if(s)return l=Ue(e,l,n,t);Ue(e,l,null,t)}else l==null||l===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);l=t}}return l}function ol(e,t,l,n){let c=!1;for(let i=0,s=t.length;i=0;s--){const a=t[s];if(c!==a){const r=a.parentNode===e;!i&&!s?r?e.replaceChild(c,a):e.insertBefore(c,l):r&&a.remove()}else i=!0}}else e.insertBefore(c,l);return[c]}const kc="http://www.w3.org/2000/svg";function wc(e,t=!1){return t?document.createElementNS(kc,e):document.createElement(e)}function Ec(e){const[t,l]=Cc(e,["component"]),n=le(()=>t.component);return le(()=>{const c=n();switch(typeof c){case"function":return D(()=>c(l));case"string":const i=xc.has(c),s=wc(c,i);return Hc(s,l,i),s}})}/** * @license * Copyright (c) 2016, Contributors * SPDX-License-Identifier: ISC */function ct(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let l="",n=!1;const c=e.match(/^-+/);for(let i=c?c[0].length:0;i0?n+=`${t}${l.charAt(c)}`:n+=s}return n}function Fn(e){return e==null?!1:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?!0:/^0[^.]/.test(e)?!1:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}/** * @license * Copyright (c) 2016, Contributors * SPDX-License-Identifier: ISC */function Kc(e){if(Array.isArray(e))return e.map(s=>typeof s!="string"?s+"":s);e=e.trim();let t=0,l=null,n=null,c=null;const i=[];for(let s=0;s{typeof g=="number"&&(b.nargs[o]=g,b.keys.push(o))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([o,g])=>{typeof g=="function"&&(b.coercions[o]=g,b.keys.push(o))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(o){b.configs[o]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([o,g])=>{(typeof g=="boolean"||typeof g=="function")&&(b.configs[o]=g)})),te(n.key,s,n.default,b.arrays),Object.keys(r).forEach(function(o){(b.aliases[o]||[]).forEach(function(g){r[g]=r[o]})});let z=null;ec();let $=[];const w=Object.assign(Object.create(null),{_:[]}),be={};for(let o=0;o=3&&(V(A[1],b.arrays)?o=f(o,A[1],c,A[2]):V(A[1],b.nargs)!==!1?o=p(o,A[1],c,A[2]):R(A[1],A[2],!0));else if(g.match(k)&&a["boolean-negation"])A=g.match(k),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],R(d,V(d,b.arrays)?[!1]:!1));else if(g.match(/^--.+/)||!a["short-option-groups"]&&g.match(/^-[^-]+/))A=g.match(/^--?(.+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],V(d,b.arrays)?o=f(o,d,c):V(d,b.nargs)!==!1?o=p(o,d,c):(J=c[o+1],J!==void 0&&(!J.match(/^-/)||J.match(j))&&!V(d,b.bools)&&!V(d,b.counts)||/^(true|false)$/.test(J)?(R(d,J),o++):R(d,ze(d))));else if(g.match(/^-.\..+=/))A=g.match(/^-([^=]+)=([\s\S]*)$/),A!==null&&Array.isArray(A)&&A.length>=3&&R(A[1],A[2]);else if(g.match(/^-.\..+/)&&!g.match(j))J=c[o+1],A=g.match(/^-(.\..+)/),A!==null&&Array.isArray(A)&&A.length>=2&&(d=A[1],J!==void 0&&!J.match(/^-/)&&!V(d,b.bools)&&!V(d,b.counts)?(R(d,J),o++):R(d,ze(d)));else if(g.match(/^-[^-]+/)&&!g.match(j)){y=g.slice(1,-1).split(""),Z=!1;for(let ae=0;aeo!=="--"&&o.includes("-")).forEach(o=>{delete w[o]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(o=>s[o])).forEach(o=>{a["camel-case-expansion"]&&o.includes("-")&&delete w[o.split(".").map(g=>ct(g)).join(".")],delete w[o]});function Ze(o){const g=I("_",o);(typeof g=="string"||typeof g=="number")&&w._.push(g)}function p(o,g,W,Z){let d,y=V(g,b.nargs);if(y=typeof y!="number"||isNaN(y)?1:y,y===0)return Ae(Z)||(z=Error(O("Argument unexpected for: %s",g))),R(g,ze(g)),o;let A=Ae(Z)?0:1;if(a["nargs-eats-options"])W.length-(o+1)+A0&&(R(g,Z),J--),d=o+1;d0||A&&typeof A=="number"&&d.length>=A||(y=W[J],/^-/.test(y)&&!j.test(y)&&!Qe(y)));J++)o=J,d.push(_(g,y,i))}return typeof A=="number"&&(A&&d.length1&&a["dot-notation"]&&(b.aliases[d[0]]||[]).forEach(function(y){let A=y.split(".");const J=[].concat(d);J.shift(),A=A.concat(J),(b.aliases[o]||[]).includes(A.join("."))||K(w,A,Z)}),V(o,b.normalize)&&!V(o,b.arrays)&&[o].concat(b.aliases[o]||[]).forEach(function(A){Object.defineProperty(be,A,{enumerable:!0,get(){return g},set(J){g=typeof J=="string"?Ye.normalize(J):J}})})}function N(o,g){b.aliases[o]&&b.aliases[o].length||(b.aliases[o]=[g],X[g]=!0),b.aliases[g]&&b.aliases[g].length||N(g,o)}function _(o,g,W){W&&(g=Uc(g)),(V(o,b.bools)||V(o,b.counts))&&typeof g=="string"&&(g=g==="true");let Z=Array.isArray(g)?g.map(function(d){return I(o,d)}):I(o,g);return V(o,b.counts)&&(Ae(Z)||typeof Z=="boolean")&&(Z=Lt()),V(o,b.normalize)&&V(o,b.arrays)&&(Array.isArray(g)?Z=g.map(d=>Ye.normalize(d)):Z=Ye.normalize(g)),Z}function I(o,g){return!a["parse-positional-numbers"]&&o==="_"||!V(o,b.strings)&&!V(o,b.bools)&&!Array.isArray(g)&&(Fn(g)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${g}`)))||!Ae(g)&&V(o,b.numbers))&&(g=Number(g)),g}function m(o){const g=Object.create(null);E(g,b.aliases,r),Object.keys(b.configs).forEach(function(W){const Z=o[W]||g[W];if(Z)try{let d=null;const y=Ye.resolve(Ye.cwd(),Z),A=b.configs[W];if(typeof A=="function"){try{d=A(y)}catch(J){d=J}if(d instanceof Error){z=d;return}}else d=Ye.require(y);H(d)}catch(d){d.name==="PermissionDenied"?z=d:o[W]&&(z=Error(O("Invalid JSON config file: %s",Z)))}})}function H(o,g){Object.keys(o).forEach(function(W){const Z=o[W],d=g?g+"."+W:W;typeof Z=="object"&&Z!==null&&!Array.isArray(Z)&&a["dot-notation"]?H(Z,d):(!S(w,d.split("."))||V(d,b.arrays)&&a["combine-arrays"])&&R(d,Z)})}function B(){typeof C<"u"&&C.forEach(function(o){H(o)})}function F(o,g){if(typeof u>"u")return;const W=typeof u=="string"?u:"",Z=Ye.env();Object.keys(Z).forEach(function(d){if(W===""||d.lastIndexOf(W,0)===0){const y=d.split("__").map(function(A,J){return J===0&&(A=A.substring(W.length)),ct(A)});(g&&b.configs[y.join(".")]||!g)&&!S(o,y)&&R(y.join("."),Z[d])}})}function x(o){let g;const W=new Set;Object.keys(o).forEach(function(Z){if(!W.has(Z)&&(g=V(Z,b.coercions),typeof g=="function"))try{const d=I(Z,g(o[Z]));[].concat(b.aliases[Z]||[],Z).forEach(y=>{W.add(y),o[y]=d})}catch(d){z=d}})}function v(o){return b.keys.forEach(g=>{~g.indexOf(".")||typeof o[g]>"u"&&(o[g]=void 0)}),o}function E(o,g,W,Z=!1){Object.keys(W).forEach(function(d){S(o,d.split("."))||(K(o,d.split("."),W[d]),Z&&(M[d]=!0),(g[d]||[]).forEach(function(y){S(o,y.split("."))||K(o,y.split("."),W[d])}))})}function S(o,g){let W=o;a["dot-notation"]||(g=[g.join(".")]),g.slice(0,-1).forEach(function(d){W=W[d]||{}});const Z=g[g.length-1];return typeof W!="object"?!1:Z in W}function K(o,g,W){let Z=o;a["dot-notation"]||(g=[g.join(".")]),g.slice(0,-1).forEach(function(q){q=kl(q),typeof Z=="object"&&Z[q]===void 0&&(Z[q]={}),typeof Z[q]!="object"||Array.isArray(Z[q])?(Array.isArray(Z[q])?Z[q].push({}):Z[q]=[Z[q],{}],Z=Z[q][Z[q].length-1]):Z=Z[q]});const d=kl(g[g.length-1]),y=V(g.join("."),b.arrays),A=Array.isArray(W);let J=a["duplicate-arguments-array"];!J&&V(d,b.nargs)&&(J=!0,(!Ae(Z[d])&&b.nargs[d]===1||Array.isArray(Z[d])&&Z[d].length===b.nargs[d])&&(Z[d]=void 0)),W===Lt()?Z[d]=Lt(Z[d]):Array.isArray(Z[d])?J&&y&&A?Z[d]=a["flatten-duplicate-arrays"]?Z[d].concat(W):(Array.isArray(Z[d][0])?Z[d]:[Z[d]]).concat([W]):!J&&!!y==!!A?Z[d]=W:Z[d]=Z[d].concat([W]):Z[d]===void 0&&y?Z[d]=A?W:[W]:J&&!(Z[d]===void 0||V(d,b.counts)||V(d,b.bools))?Z[d]=[Z[d],W]:Z[d]=W}function te(...o){o.forEach(function(g){Object.keys(g||{}).forEach(function(W){b.aliases[W]||(b.aliases[W]=[].concat(s[W]||[]),b.aliases[W].concat(W).forEach(function(Z){if(/-/.test(Z)&&a["camel-case-expansion"]){const d=ct(Z);d!==W&&b.aliases[W].indexOf(d)===-1&&(b.aliases[W].push(d),X[d]=!0)}}),b.aliases[W].concat(W).forEach(function(Z){if(Z.length>1&&/[A-Z]/.test(Z)&&a["camel-case-expansion"]){const d=Bn(Z,"-");d!==W&&b.aliases[W].indexOf(d)===-1&&(b.aliases[W].push(d),X[d]=!0)}}),b.aliases[W].forEach(function(Z){b.aliases[Z]=[W].concat(b.aliases[W].filter(function(d){return Z!==d}))}))})})}function V(o,g){const W=[].concat(b.aliases[o]||[],o),Z=Object.keys(g),d=W.find(y=>Z.includes(y));return d?g[d]:!1}function Ge(o){const g=Object.keys(b);return[].concat(g.map(Z=>b[Z])).some(function(Z){return Array.isArray(Z)?Z.includes(o):Z[o]})}function ce(o,...g){return[].concat(...g).some(function(Z){const d=o.match(Z);return d&&Ge(d[1])})}function Ve(o){if(o.match(j)||!o.match(/^-[^-]+/))return!1;let g=!0,W;const Z=o.slice(1).split("");for(let d=0;dV(o,b.arrays)?(z=Error(O("Invalid configuration: %s, opts.count excludes opts.array.",o)),!0):V(o,b.nargs)?(z=Error(O("Invalid configuration: %s, opts.count excludes opts.narg.",o)),!0):!1)}return{aliases:Object.assign({},b.aliases),argv:Object.assign(be,w),configuration:a,defaulted:Object.assign({},M),error:z,newAliases:Object.assign({},X)}}}function zc(e){const t=[],l=Object.create(null);let n=!0;for(Object.keys(e).forEach(function(c){t.push([].concat(e[c],c))});n;){n=!1;for(let c=0;cjc,format:lc.format,normalize:de.normalize,resolve:de.resolve,require:e=>{if(typeof require<"u")return require(e);if(e.match(/\.json$/))return JSON.parse(Gn.readFileSync(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),Zt=function(t,l){return Hn.parse(t.slice(),l).argv};Zt.detailed=function(e,t){return Hn.parse(e.slice(),t)};Zt.camelCase=ct;Zt.decamelize=Bn;Zt.looksLikeNumber=Fn;const Lc={exportToOo:"导出为......",exportWithPrevious:"使用上一次设置导出",exportSuccessNotice:L`导出文件 ${0} 成功!`,exportCommandOutputMessage:L`命令:${0}`,exportErrorOutputMessage:L`命令 ${0},错误:${1}`,pleaseOpenFile:"请打开一个文件先。",preparing:L`正在生成 "${0}" ......`,exportDialog:{fileName:"文件名",type:"类型",exportTo:"导出到",title:L`导出为 ${0}`,export:"导出",selectExportFolder:"请选择导出文件夹",overwriteConfirmation:"覆盖提示"},messageBox:{yes:"是",no:"否",ok:"确认",cancel:"取消"},overwriteConfirmationDialog:{replace:"替换",title:L`"${0}" 已经存在。您要替换它吗?`,message:L`"${0}" 文件夹中已有相同的文件或文件夹,若替换,则会覆盖其当前内容。`},settingTab:{title:"导出设置",general:"通用",name:"名称",customLocation:"自定义",pandocVersion:L`版本: ${0}`,pandocVersionWithWarning:L`Version: ${0}, 请升级版本到 ${1}`,pandocNotFound:"找不到 Pandoc,请填写 Pandoc 文件路径,或者将其添加到系统环境变量中。",pandocPath:"Pandoc 路径",defaultFolderForExportedFile:"默认的导出文件夹",openExportedFileLocation:"打开导出文件所在目录",sameFolderWithCurrentFile:"与原文件同一目录下",openExportedFile:"打开导出文件",pandocPathPlaceholder:"(自动检测)",editCommandTemplate:"编辑命令模板",chooseCommandTemplate:"选择模板",afterExport:"导出后",command:"命令",arguments:"参数",auto:"自动",reset:"重置",add:"添加",remove:"移除",rename:"重命名",targetFileExtensions:"目标文件扩展名",targetFileExtensionsTip:"(用空格分开)",showCommandOutput:"显示命令行输出",runCommand:"运行自定义命令",extraArguments:"自定义参数",save:"保存",new:"新建",template:"模板",advanced:"高级",environmentVariables:"环境变量",environmentVariablesDesc:"定义导出的环境变量.",ShowExportProgressBar:"显示导出进度条"}},Tc={exportToOo:"Export to...",exportSuccessNotice:L`Export file ${0} success!`,exportCommandOutputMessage:L`Command: ${0}`,exportErrorOutputMessage:L`Command: ${0},Error:${1}`,exportWithPrevious:"Export with Previous",pleaseOpenFile:"Please open a file first.",preparing:L`generating "${0}"...`,exportDialog:{exportTo:"Export to",fileName:"File Name",title:L`Export to ${0}`,export:"Export",selectExportFolder:"Please select an export folder.",overwriteConfirmation:"Overwrite confirmation",type:"Type"},messageBox:{yes:"Yes",no:"No",ok:"Ok",cancel:"Cancel"},overwriteConfirmationDialog:{replace:"Replace",title:L`"${0}" already exists. Do you want to replace it?`,message:L`A file or folder with the same name already exists in the folder "${0}". Replacing it will overwrite its current contents.`},settingTab:{general:"General",name:"Name",title:"Export Settings",pandocVersion:L`Version: ${0}`,pandocVersionWithWarning:L`Version: ${0}, please upgrade version to ${1}`,pandocNotFound:"Pandoc not found, please fill in the Pandoc file path, or add it to the system environment variables.",defaultFolderForExportedFile:"Default Folder for Exported File",openExportedFileLocation:"Open exported file location",ShowExportProgressBar:"Show export progress bar",openExportedFile:"Open exported file",pandocPath:"Pandoc path",pandocPathPlaceholder:"(Auto Detect)",editCommandTemplate:"Edit Command Template",chooseCommandTemplate:"Choose template",customLocation:"Custom location",template:"Template",command:"Command",reset:"Reset",auto:"Auto",add:"Add",remove:"Remove",rename:"Rename",sameFolderWithCurrentFile:"Same folder with current file",afterExport:"After Export",targetFileExtensions:"Target file extensions",targetFileExtensionsTip:"(Separated by whitespace)",showCommandOutput:"Show command output",runCommand:"Run command",extraArguments:"Extra arguments",save:"Save",new:"New",arguments:"Arguments",advanced:"Advanced",environmentVariables:"Environment Variables",environmentVariablesDesc:"Define the Environment Variables for exporting."}},$c={exportToOo:"Export to...",exportSuccessNotice:L`Export der Datei ${0} erfolgreich!`,exportCommandOutputMessage:L`Command: ${0}`,exportErrorOutputMessage:L`Command: ${0},Fehler:${1}`,exportWithPrevious:"Exportiere mit Vorherigem",pleaseOpenFile:"Bitte öffne zunächst eine Datei.",preparing:L`generating "${0}"...`,exportDialog:{exportTo:"Exportiere nach",fileName:"Dateiname",title:L`Export to ${0}`,export:"Export",selectExportFolder:"Zielordner auswählen",overwriteConfirmation:"Überschreibe den Zielordner",type:"Typ"},messageBox:{yes:"Ja",no:"Nein",ok:"Ok",cancel:"Abbrechen"},overwriteConfirmationDialog:{replace:"Ersetze",title:L`"${0}" existiert bereits. Soll er ersetzt werden?`,message:L`Eine Datei oder ein Ordner mit dem gleichen Namen existiert bereits im Ordner "${0}". Das Ersetzen wird die jetzigen Inhalte überschreiben.`},settingTab:{general:"Allgemein",name:"Name",title:"Export-Einstellungen",pandocVersion:L`Version: ${0}`,pandocVersionWithWarning:L`Version: ${0}, please upgrade version to ${1}`,pandocNotFound:"Pandoc.exe wurde nicht gefunden. Bitte geben Sie den Pfad zur Pandoc.exe ein oder fügen Sie ihn den Window Systemumgebungsvariablen hinzu.",defaultFolderForExportedFile:"Standardordner für exportierte Dateien",openExportedFileLocation:"Speicherort der exportierten Datei öffnen",openExportedFile:"Exportierte Datei öffnen",pandocPath:"Pfad zur Datei Pandoc.exe",pandocPathPlaceholder:"(Automatische Erkennung)",editCommandTemplate:"‘Befehlsvorlage bearbeiten",chooseCommandTemplate:"Vorlage auswählen",customLocation:"Benutzerdefinierter Speicherort",template:"Vorlage",command:"Befehl",reset:"Zurücksetzen",auto:"Auto",add:"Hinzufügen",remove:"Entfernen",rename:"Umbenennen",sameFolderWithCurrentFile:"Der gleiche Ordner mit der aktuellen Datei",afterExport:"Nach dem Export",targetFileExtensions:"Dateinamenserweiterung der Zieldatei",targetFileExtensionsTip:"(Mit Leerzeichen getrennt)",showCommandOutput:"Zeige die Ausgabe des Befehls",runCommand:"Starte den Befehl",extraArguments:"Zusätzliche Parameter",save:"Speichern",new:"Neu",arguments:"Parameter",advanced:"Advanced",environmentVariables:"Environment Variables",environmentVariablesDesc:"Define the Environment Variables for exporting.",ShowExportProgressBar:"Show export progressBar"}},Nn={"de-DE":$c,"en-US":Tc,"zh-CN":Lc,get current(){const e=Object.keys(this),t=We.moment.locale().toLowerCase();let l=e.find(c=>c.toLowerCase()===t.toLowerCase());if(l)return this[l];const n=t.split("-")[0];return l=e.find(c=>c.toLowerCase().startsWith(n)),l?this[l]:this["en-US"]}};class Kl extends We.Modal{constructor(t,l,n){super(t),this.options=typeof l=="string"?{message:l,buttons:"Ok",title:n}:l,this.lang=Nn.current}onOpen(){const{titleEl:t,contentEl:l,lang:n,options:{message:c,title:i,buttons:s,callback:a,buttonsLabel:r,buttonsClass:C}}=this;switch(i&&t.setText(i),l.createDiv({text:c}),s){case"Yes":l.createEl("div",{cls:["modal-button-container"],parent:l},u=>{u.createEl("button",{text:(r==null?void 0:r.yes)??n.messageBox.yes,cls:["mod-cta",C==null?void 0:C.yes],parent:u}).onclick=()=>this.call(a==null?void 0:a.yes)});break;case"YesNo":l.createEl("div",{cls:["modal-button-container"],parent:l},u=>{u.createEl("button",{text:(r==null?void 0:r.yes)??n.messageBox.yes,cls:["mod-cta",C==null?void 0:C.yes],parent:u}).onclick=()=>this.call(a==null?void 0:a.yes),u.createEl("button",{text:(r==null?void 0:r.no)??n.messageBox.no,cls:["mod-cta",C==null?void 0:C.no],parent:u}).onclick=()=>this.call(a==null?void 0:a.no)});break;case"Ok":l.createEl("div",{cls:["modal-button-container"],parent:l},u=>{u.createEl("button",{text:(r==null?void 0:r.ok)??n.messageBox.ok,cls:["mod-cta",C==null?void 0:C.no],parent:u}).onclick=()=>this.call(a==null?void 0:a.ok)});break;case"OkCancel":l.createEl("div",{cls:["modal-button-container"],parent:l},u=>{u.createEl("button",{text:(r==null?void 0:r.ok)??n.messageBox.ok,cls:["mod-cta",C==null?void 0:C.ok],parent:u}).onclick=()=>this.call(a==null?void 0:a.ok),u.createEl("button",{text:(r==null?void 0:r.cancel)??n.messageBox.cancel,cls:["mod-cta",C==null?void 0:C.cancel],parent:u}).onclick=()=>this.call(a==null?void 0:a.cancel)});break}}call(t){t&&t(),this.close()}onClose(){const{contentEl:t}=this;t.empty()}}var Mc=me('
');const Oc=e=>(()=>{var t=Mc(),l=t.firstChild,n=e.ref;return typeof n=="function"?kt(n,t):e.ref=t,se(l,()=>e.message),t})(),Pc=e=>Te(t=>{let l=!1;const n=()=>{l||(l=!0,t())};let c;return se(document.body,()=>G(Oc,{ref(i){var s=c;typeof s=="function"?s(i):c=i},message:e})),_e(()=>{c instanceof Node&&document.body.contains(c)&&document.body.removeChild(c)}),n}),Dc={show:Pc};function _c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dl={exports:{}};const qc="2.0.0",ei=256,ti=Number.MAX_SAFE_INTEGER||9007199254740991,li=16,ni=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var wt={MAX_LENGTH:ei,MAX_SAFE_COMPONENT_LENGTH:li,MAX_SAFE_INTEGER:ti,RELEASE_TYPES:ni,SEMVER_SPEC_VERSION:qc,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const ci=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Et=ci;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:l}=wt,n=Et;t=e.exports={};const c=t.re=[],i=t.src=[],s=t.t={};let a=0;const r=(C,u,h)=>{const Y=a++;n(C,Y,u),s[C]=Y,i[Y]=u,c[Y]=new RegExp(u,h?"g":void 0)};r("NUMERICIDENTIFIER","0|[1-9]\\d*"),r("NUMERICIDENTIFIERLOOSE","[0-9]+"),r("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),r("MAINVERSION",`(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})\\.(${i[s.NUMERICIDENTIFIER]})`),r("MAINVERSIONLOOSE",`(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})\\.(${i[s.NUMERICIDENTIFIERLOOSE]})`),r("PRERELEASEIDENTIFIER",`(?:${i[s.NUMERICIDENTIFIER]}|${i[s.NONNUMERICIDENTIFIER]})`),r("PRERELEASEIDENTIFIERLOOSE",`(?:${i[s.NUMERICIDENTIFIERLOOSE]}|${i[s.NONNUMERICIDENTIFIER]})`),r("PRERELEASE",`(?:-(${i[s.PRERELEASEIDENTIFIER]}(?:\\.${i[s.PRERELEASEIDENTIFIER]})*))`),r("PRERELEASELOOSE",`(?:-?(${i[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[s.PRERELEASEIDENTIFIERLOOSE]})*))`),r("BUILDIDENTIFIER","[0-9A-Za-z-]+"),r("BUILD",`(?:\\+(${i[s.BUILDIDENTIFIER]}(?:\\.${i[s.BUILDIDENTIFIER]})*))`),r("FULLPLAIN",`v?${i[s.MAINVERSION]}${i[s.PRERELEASE]}?${i[s.BUILD]}?`),r("FULL",`^${i[s.FULLPLAIN]}$`),r("LOOSEPLAIN",`[v=\\s]*${i[s.MAINVERSIONLOOSE]}${i[s.PRERELEASELOOSE]}?${i[s.BUILD]}?`),r("LOOSE",`^${i[s.LOOSEPLAIN]}$`),r("GTLT","((?:<|>)?=?)"),r("XRANGEIDENTIFIERLOOSE",`${i[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),r("XRANGEIDENTIFIER",`${i[s.NUMERICIDENTIFIER]}|x|X|\\*`),r("XRANGEPLAIN",`[v=\\s]*(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:\\.(${i[s.XRANGEIDENTIFIER]})(?:${i[s.PRERELEASE]})?${i[s.BUILD]}?)?)?`),r("XRANGEPLAINLOOSE",`[v=\\s]*(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[s.XRANGEIDENTIFIERLOOSE]})(?:${i[s.PRERELEASELOOSE]})?${i[s.BUILD]}?)?)?`),r("XRANGE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAIN]}$`),r("XRANGELOOSE",`^${i[s.GTLT]}\\s*${i[s.XRANGEPLAINLOOSE]}$`),r("COERCE",`(^|[^\\d])(\\d{1,${l}})(?:\\.(\\d{1,${l}}))?(?:\\.(\\d{1,${l}}))?(?:$|[^\\d])`),r("COERCERTL",i[s.COERCE],!0),r("LONETILDE","(?:~>?)"),r("TILDETRIM",`(\\s*)${i[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",r("TILDE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAIN]}$`),r("TILDELOOSE",`^${i[s.LONETILDE]}${i[s.XRANGEPLAINLOOSE]}$`),r("LONECARET","(?:\\^)"),r("CARETTRIM",`(\\s*)${i[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",r("CARET",`^${i[s.LONECARET]}${i[s.XRANGEPLAIN]}$`),r("CARETLOOSE",`^${i[s.LONECARET]}${i[s.XRANGEPLAINLOOSE]}$`),r("COMPARATORLOOSE",`^${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]})$|^$`),r("COMPARATOR",`^${i[s.GTLT]}\\s*(${i[s.FULLPLAIN]})$|^$`),r("COMPARATORTRIM",`(\\s*)${i[s.GTLT]}\\s*(${i[s.LOOSEPLAIN]}|${i[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",r("HYPHENRANGE",`^\\s*(${i[s.XRANGEPLAIN]})\\s+-\\s+(${i[s.XRANGEPLAIN]})\\s*$`),r("HYPHENRANGELOOSE",`^\\s*(${i[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[s.XRANGEPLAINLOOSE]})\\s*$`),r("STAR","(<|>)?=?\\s*\\*"),r("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),r("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(dl,dl.exports);var mt=dl.exports;const ii=Object.freeze({loose:!0}),si=Object.freeze({}),ai=e=>e?typeof e!="object"?ii:e:si;var Il=ai;const Ql=/^[0-9]+$/,vn=(e,t)=>{const l=Ql.test(e),n=Ql.test(t);return l&&n&&(e=+e,t=+t),e===t?0:l&&!n?-1:n&&!l?1:evn(t,e);var Sn={compareIdentifiers:vn,rcompareIdentifiers:ri};const ht=Et,{MAX_LENGTH:zl,MAX_SAFE_INTEGER:It}=wt,{re:Ul,t:jl}=mt,oi=Il,{compareIdentifiers:je}=Sn;let di=class Xe{constructor(t,l){if(l=oi(l),t instanceof Xe){if(t.loose===!!l.loose&&t.includePrerelease===!!l.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>zl)throw new TypeError(`version is longer than ${zl} characters`);ht("SemVer",t,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const n=t.trim().match(l.loose?Ul[jl.LOOSE]:Ul[jl.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>It||this.major<0)throw new TypeError("Invalid major version");if(this.minor>It||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>It||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(c=>{if(/^[0-9]+$/.test(c)){const i=+c;if(i>=0&&i=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(l===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(c)}}if(l){let i=[l,c];n===!1&&(i=[l]),je(this.prerelease[0],l)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.format(),this.raw=this.version,this}};var re=di;const Ll=re,gi=(e,t,l=!1)=>{if(e instanceof Ll)return e;try{return new Ll(e,t)}catch(n){if(!l)return null;throw n}};var et=gi;const ui=et,bi=(e,t)=>{const l=ui(e,t);return l?l.version:null};var Zi=bi;const mi=et,Gi=(e,t)=>{const l=mi(e.trim().replace(/^[=v]+/,""),t);return l?l.version:null};var hi=Gi;const Tl=re,Ii=(e,t,l,n,c)=>{typeof l=="string"&&(c=n,n=l,l=void 0);try{return new Tl(e instanceof Tl?e.version:e,l).inc(t,n,c).version}catch{return null}};var Ci=Ii;const $l=et,Wi=(e,t)=>{const l=$l(e,null,!0),n=$l(t,null,!0),c=l.compare(n);if(c===0)return null;const i=c>0,s=i?l:n,a=i?n:l,r=!!s.prerelease.length,C=r?"pre":"";return l.major!==n.major?C+"major":l.minor!==n.minor?C+"minor":l.patch!==n.patch?C+"patch":r?"prerelease":a.patch?"patch":a.minor?"minor":"major"};var pi=Wi;const fi=re,Xi=(e,t)=>new fi(e,t).major;var Ri=Xi;const Vi=re,Ai=(e,t)=>new Vi(e,t).minor;var Yi=Ai;const xi=re,yi=(e,t)=>new xi(e,t).patch;var Ji=yi;const Bi=et,Fi=(e,t)=>{const l=Bi(e,t);return l&&l.prerelease.length?l.prerelease:null};var Hi=Fi;const Ml=re,Ni=(e,t,l)=>new Ml(e,l).compare(new Ml(t,l));var pe=Ni;const vi=pe,Si=(e,t,l)=>vi(t,e,l);var ki=Si;const wi=pe,Ei=(e,t)=>wi(e,t,!0);var Ki=Ei;const Ol=re,Qi=(e,t,l)=>{const n=new Ol(e,l),c=new Ol(t,l);return n.compare(c)||n.compareBuild(c)};var Cl=Qi;const zi=Cl,Ui=(e,t)=>e.sort((l,n)=>zi(l,n,t));var ji=Ui;const Li=Cl,Ti=(e,t)=>e.sort((l,n)=>Li(n,l,t));var $i=Ti;const Mi=pe,Oi=(e,t,l)=>Mi(e,t,l)>0;var Kt=Oi;const Pi=pe,Di=(e,t,l)=>Pi(e,t,l)<0;var Wl=Di;const _i=pe,qi=(e,t,l)=>_i(e,t,l)===0;var kn=qi;const es=pe,ts=(e,t,l)=>es(e,t,l)!==0;var wn=ts;const ls=pe,ns=(e,t,l)=>ls(e,t,l)>=0;var pl=ns;const cs=pe,is=(e,t,l)=>cs(e,t,l)<=0;var fl=is;const ss=kn,as=wn,rs=Kt,os=pl,ds=Wl,gs=fl,us=(e,t,l,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof l=="object"&&(l=l.version),e===l;case"!==":return typeof e=="object"&&(e=e.version),typeof l=="object"&&(l=l.version),e!==l;case"":case"=":case"==":return ss(e,l,n);case"!=":return as(e,l,n);case">":return rs(e,l,n);case">=":return os(e,l,n);case"<":return ds(e,l,n);case"<=":return gs(e,l,n);default:throw new TypeError(`Invalid operator: ${t}`)}};var En=us;const bs=re,Zs=et,{re:Ct,t:Wt}=mt,ms=(e,t)=>{if(e instanceof bs)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let l=null;if(!t.rtl)l=e.match(Ct[Wt.COERCE]);else{let n;for(;(n=Ct[Wt.COERCERTL].exec(e))&&(!l||l.index+l[0].length!==e.length);)(!l||n.index+n[0].length!==l.index+l[0].length)&&(l=n),Ct[Wt.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;Ct[Wt.COERCERTL].lastIndex=-1}return l===null?null:Zs(`${l[2]}.${l[3]||"0"}.${l[4]||"0"}`,t)};var Gs=ms,Ot,Pl;function hs(){return Pl||(Pl=1,Ot=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),Ot}var Is=U;U.Node=Ke;U.create=U;function U(e){var t=this;if(t instanceof U||(t=new U),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(c){t.push(c)});else if(arguments.length>0)for(var l=0,n=arguments.length;l1)l=t;else if(this.head)n=this.head.next,l=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var c=0;n!==null;c++)l=e(l,n.value,c),n=n.next;return l};U.prototype.reduceReverse=function(e,t){var l,n=this.tail;if(arguments.length>1)l=t;else if(this.tail)n=this.tail.prev,l=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var c=this.length-1;n!==null;c--)l=e(l,n.value,c),n=n.prev;return l};U.prototype.toArray=function(){for(var e=new Array(this.length),t=0,l=this.head;l!==null;t++)e[t]=l.value,l=l.next;return e};U.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,l=this.tail;l!==null;t++)e[t]=l.value,l=l.prev;return e};U.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var l=new U;if(tthis.length&&(t=this.length);for(var n=0,c=this.head;c!==null&&nthis.length&&(t=this.length);for(var n=this.length,c=this.tail;c!==null&&n>t;n--)c=c.prev;for(;c!==null&&n>e;n--,c=c.prev)l.push(c.value);return l};U.prototype.splice=function(e,t,...l){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,c=this.head;c!==null&&n1;class Xs{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[we]=t.max||1/0;const l=t.length||Pt;if(this[Le]=typeof l!="function"?Pt:l,this[at]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ee]=t.maxAge||0,this[xe]=t.dispose,this[Dl]=t.noDisposeOnSet||!1,this[Kn]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[we]=t||1/0,lt(this)}get max(){return this[we]}set allowStale(t){this[at]=!!t}get allowStale(){return this[at]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[Ee]=t,lt(this)}get maxAge(){return this[Ee]}set lengthCalculator(t){typeof t!="function"&&(t=Pt),t!==this[Le]&&(this[Le]=t,this[ye]=0,this[ee].forEach(l=>{l.length=this[Le](l.value,l.key),this[ye]+=l.length})),lt(this)}get lengthCalculator(){return this[Le]}get length(){return this[ye]}get itemCount(){return this[ee].length}rforEach(t,l){l=l||this;for(let n=this[ee].tail;n!==null;){const c=n.prev;_l(this,t,n,l),n=c}}forEach(t,l){l=l||this;for(let n=this[ee].head;n!==null;){const c=n.next;_l(this,t,n,l),n=c}}keys(){return this[ee].toArray().map(t=>t.key)}values(){return this[ee].toArray().map(t=>t.value)}reset(){this[xe]&&this[ee]&&this[ee].length&&this[ee].forEach(t=>this[xe](t.key,t.value)),this[Ie]=new Map,this[ee]=new fs,this[ye]=0}dump(){return this[ee].map(t=>Jt(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[ee]}set(t,l,n){if(n=n||this[Ee],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const c=n?Date.now():0,i=this[Le](l,t);if(this[Ie].has(t)){if(i>this[we])return $e(this,this[Ie].get(t)),!1;const r=this[Ie].get(t).value;return this[xe]&&(this[Dl]||this[xe](t,r.value)),r.now=c,r.maxAge=n,r.value=l,this[ye]+=i-r.length,r.length=i,this.get(t),lt(this),!0}const s=new Rs(t,l,i,c,n);return s.length>this[we]?(this[xe]&&this[xe](t,l),!1):(this[ye]+=s.length,this[ee].unshift(s),this[Ie].set(t,this[ee].head),lt(this),!0)}has(t){if(!this[Ie].has(t))return!1;const l=this[Ie].get(t).value;return!Jt(this,l)}get(t){return Dt(this,t,!0)}peek(t){return Dt(this,t,!1)}pop(){const t=this[ee].tail;return t?($e(this,t),t.value):null}del(t){$e(this,this[Ie].get(t))}load(t){this.reset();const l=Date.now();for(let n=t.length-1;n>=0;n--){const c=t[n],i=c.e||0;if(i===0)this.set(c.k,c.v);else{const s=i-l;s>0&&this.set(c.k,c.v,s)}}}prune(){this[Ie].forEach((t,l)=>Dt(this,l,!1))}}const Dt=(e,t,l)=>{const n=e[Ie].get(t);if(n){const c=n.value;if(Jt(e,c)){if($e(e,n),!e[at])return}else l&&(e[Kn]&&(n.value.now=Date.now()),e[ee].unshiftNode(n));return c.value}},Jt=(e,t)=>{if(!t||!t.maxAge&&!e[Ee])return!1;const l=Date.now()-t.now;return t.maxAge?l>t.maxAge:e[Ee]&&l>e[Ee]},lt=e=>{if(e[ye]>e[we])for(let t=e[ee].tail;e[ye]>e[we]&&t!==null;){const l=t.prev;$e(e,t),t=l}},$e=(e,t)=>{if(t){const l=t.value;e[xe]&&e[xe](l.key,l.value),e[ye]-=l.length,e[Ie].delete(l.key),e[ee].removeNode(t)}};class Rs{constructor(t,l,n,c,i){this.key=t,this.value=l,this.length=n,this.now=c,this.maxAge=i||0}}const _l=(e,t,l,n)=>{let c=l.value;Jt(e,c)&&($e(e,l),e[at]||(c=void 0)),c&&t.call(n,c.value,c.key,e)};var Vs=Xs,_t,ql;function fe(){if(ql)return _t;ql=1;class e{constructor(m,H){if(H=n(H),m instanceof e)return m.loose===!!H.loose&&m.includePrerelease===!!H.includePrerelease?m:new e(m.raw,H);if(m instanceof c)return this.raw=m.value,this.set=[[m]],this.format(),this;if(this.options=H,this.loose=!!H.loose,this.includePrerelease=!!H.includePrerelease,this.raw=m,this.set=m.split("||").map(B=>this.parseRange(B.trim())).filter(B=>B.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${m}`);if(this.set.length>1){const B=this.set[0];if(this.set=this.set.filter(F=>!M(F[0])),this.set.length===0)this.set=[B];else if(this.set.length>1){for(const F of this.set)if(F.length===1&&O(F[0])){this.set=[F];break}}}this.format()}format(){return this.range=this.set.map(m=>m.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(m){m=m.trim();const B=((this.options.includePrerelease&&Y)|(this.options.loose&&X))+":"+m,F=l.get(B);if(F)return F;const x=this.options.loose,v=x?a[r.HYPHENRANGELOOSE]:a[r.HYPHENRANGE];m=m.replace(v,N(this.options.includePrerelease)),i("hyphen replace",m),m=m.replace(a[r.COMPARATORTRIM],C),i("comparator trim",m),m=m.replace(a[r.TILDETRIM],u),m=m.replace(a[r.CARETTRIM],h),m=m.split(/\s+/).join(" ");let E=m.split(" ").map(V=>j(V,this.options)).join(" ").split(/\s+/).map(V=>R(V,this.options));x&&(E=E.filter(V=>(i("loose invalid filter",V,this.options),!!V.match(a[r.COMPARATORLOOSE])))),i("range list",E);const S=new Map,K=E.map(V=>new c(V,this.options));for(const V of K){if(M(V))return[V];S.set(V.value,V)}S.size>1&&S.has("")&&S.delete("");const te=[...S.values()];return l.set(B,te),te}intersects(m,H){if(!(m instanceof e))throw new TypeError("a Range is required");return this.set.some(B=>b(B,H)&&m.set.some(F=>b(F,H)&&B.every(x=>F.every(v=>x.intersects(v,H)))))}test(m){if(!m)return!1;if(typeof m=="string")try{m=new s(m,this.options)}catch{return!1}for(let H=0;HI.value==="<0.0.0-0",O=I=>I.value==="",b=(I,m)=>{let H=!0;const B=I.slice();let F=B.pop();for(;H&&B.length;)H=B.every(x=>F.intersects(x,m)),F=B.pop();return H},j=(I,m)=>(i("comp",I,m),I=w(I,m),i("caret",I),I=z(I,m),i("tildes",I),I=Ze(I,m),i("xrange",I),I=f(I,m),i("stars",I),I),k=I=>!I||I.toLowerCase()==="x"||I==="*",z=(I,m)=>I.trim().split(/\s+/).map(H=>$(H,m)).join(" "),$=(I,m)=>{const H=m.loose?a[r.TILDELOOSE]:a[r.TILDE];return I.replace(H,(B,F,x,v,E)=>{i("tilde",I,B,F,x,v,E);let S;return k(F)?S="":k(x)?S=`>=${F}.0.0 <${+F+1}.0.0-0`:k(v)?S=`>=${F}.${x}.0 <${F}.${+x+1}.0-0`:E?(i("replaceTilde pr",E),S=`>=${F}.${x}.${v}-${E} <${F}.${+x+1}.0-0`):S=`>=${F}.${x}.${v} <${F}.${+x+1}.0-0`,i("tilde return",S),S})},w=(I,m)=>I.trim().split(/\s+/).map(H=>be(H,m)).join(" "),be=(I,m)=>{i("caret",I,m);const H=m.loose?a[r.CARETLOOSE]:a[r.CARET],B=m.includePrerelease?"-0":"";return I.replace(H,(F,x,v,E,S)=>{i("caret",I,F,x,v,E,S);let K;return k(x)?K="":k(v)?K=`>=${x}.0.0${B} <${+x+1}.0.0-0`:k(E)?x==="0"?K=`>=${x}.${v}.0${B} <${x}.${+v+1}.0-0`:K=`>=${x}.${v}.0${B} <${+x+1}.0.0-0`:S?(i("replaceCaret pr",S),x==="0"?v==="0"?K=`>=${x}.${v}.${E}-${S} <${x}.${v}.${+E+1}-0`:K=`>=${x}.${v}.${E}-${S} <${x}.${+v+1}.0-0`:K=`>=${x}.${v}.${E}-${S} <${+x+1}.0.0-0`):(i("no pr"),x==="0"?v==="0"?K=`>=${x}.${v}.${E}${B} <${x}.${v}.${+E+1}-0`:K=`>=${x}.${v}.${E}${B} <${x}.${+v+1}.0-0`:K=`>=${x}.${v}.${E} <${+x+1}.0.0-0`),i("caret return",K),K})},Ze=(I,m)=>(i("replaceXRanges",I,m),I.split(/\s+/).map(H=>p(H,m)).join(" ")),p=(I,m)=>{I=I.trim();const H=m.loose?a[r.XRANGELOOSE]:a[r.XRANGE];return I.replace(H,(B,F,x,v,E,S)=>{i("xRange",I,B,F,x,v,E,S);const K=k(x),te=K||k(v),V=te||k(E),Ge=V;return F==="="&&Ge&&(F=""),S=m.includePrerelease?"-0":"",K?F===">"||F==="<"?B="<0.0.0-0":B="*":F&&Ge?(te&&(v=0),E=0,F===">"?(F=">=",te?(x=+x+1,v=0,E=0):(v=+v+1,E=0)):F==="<="&&(F="<",te?x=+x+1:v=+v+1),F==="<"&&(S="-0"),B=`${F+x}.${v}.${E}${S}`):te?B=`>=${x}.0.0${S} <${+x+1}.0.0-0`:V&&(B=`>=${x}.${v}.0${S} <${x}.${+v+1}.0-0`),i("xRange return",B),B})},f=(I,m)=>(i("replaceStars",I,m),I.trim().replace(a[r.STAR],"")),R=(I,m)=>(i("replaceGTE0",I,m),I.trim().replace(a[m.includePrerelease?r.GTE0PRE:r.GTE0],"")),N=I=>(m,H,B,F,x,v,E,S,K,te,V,Ge,ce)=>(k(B)?H="":k(F)?H=`>=${B}.0.0${I?"-0":""}`:k(x)?H=`>=${B}.${F}.0${I?"-0":""}`:v?H=`>=${H}`:H=`>=${H}${I?"-0":""}`,k(K)?S="":k(te)?S=`<${+K+1}.0.0-0`:k(V)?S=`<${K}.${+te+1}.0-0`:Ge?S=`<=${K}.${te}.${V}-${Ge}`:I?S=`<${K}.${te}.${+V+1}-0`:S=`<=${S}`,`${H} ${S}`.trim()),_=(I,m,H)=>{for(let B=0;B0){const F=I[B].semver;if(F.major===m.major&&F.minor===m.minor&&F.patch===m.patch)return!0}return!1}return!0};return _t}var qt,en;function Qt(){if(en)return qt;en=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,h){if(h=l(h),u instanceof t){if(u.loose===!!h.loose)return u;u=u.value}s("comparator",u,h),this.options=h,this.loose=!!h.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(u){const h=this.options.loose?n[c.COMPARATORLOOSE]:n[c.COMPARATOR],Y=u.match(h);if(!Y)throw new TypeError(`Invalid comparator: ${u}`);this.operator=Y[1]!==void 0?Y[1]:"",this.operator==="="&&(this.operator=""),Y[2]?this.semver=new a(Y[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(s("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new a(u,this.options)}catch{return!1}return i(u,this.operator,this.semver,this.options)}intersects(u,h){if(!(u instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new r(u.value,h).test(this.value):u.operator===""?u.value===""?!0:new r(this.value,h).test(u.semver):(h=l(h),h.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!h.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||i(this.semver,"<",u.semver,h)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||i(this.semver,">",u.semver,h)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}qt=t;const l=Il,{re:n,t:c}=mt,i=En,s=Et,a=re,r=fe();return qt}const As=fe(),Ys=(e,t,l)=>{try{t=new As(t,l)}catch{return!1}return t.test(e)};var zt=Ys;const xs=fe(),ys=(e,t)=>new xs(e,t).set.map(l=>l.map(n=>n.value).join(" ").trim().split(" "));var Js=ys;const Bs=re,Fs=fe(),Hs=(e,t,l)=>{let n=null,c=null,i=null;try{i=new Fs(t,l)}catch{return null}return e.forEach(s=>{i.test(s)&&(!n||c.compare(s)===-1)&&(n=s,c=new Bs(n,l))}),n};var Ns=Hs;const vs=re,Ss=fe(),ks=(e,t,l)=>{let n=null,c=null,i=null;try{i=new Ss(t,l)}catch{return null}return e.forEach(s=>{i.test(s)&&(!n||c.compare(s)===1)&&(n=s,c=new vs(n,l))}),n};var ws=ks;const el=re,Es=fe(),tn=Kt,Ks=(e,t)=>{e=new Es(e,t);let l=new el("0.0.0");if(e.test(l)||(l=new el("0.0.0-0"),e.test(l)))return l;l=null;for(let n=0;n{const a=new el(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||tn(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),i&&(!l||tn(l,i))&&(l=i)}return l&&e.test(l)?l:null};var Qs=Ks;const zs=fe(),Us=(e,t)=>{try{return new zs(e,t).range||"*"}catch{return null}};var js=Us;const Ls=re,Qn=Qt(),{ANY:Ts}=Qn,$s=fe(),Ms=zt,ln=Kt,nn=Wl,Os=fl,Ps=pl,Ds=(e,t,l,n)=>{e=new Ls(e,n),t=new $s(t,n);let c,i,s,a,r;switch(l){case">":c=ln,i=Os,s=nn,a=">",r=">=";break;case"<":c=nn,i=Ps,s=ln,a="<",r="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ms(e,t,n))return!1;for(let C=0;C{X.semver===Ts&&(X=new Qn(">=0.0.0")),h=h||X,Y=Y||X,c(X.semver,h.semver,n)?h=X:s(X.semver,Y.semver,n)&&(Y=X)}),h.operator===a||h.operator===r||(!Y.operator||Y.operator===a)&&i(e,Y.semver))return!1;if(Y.operator===r&&s(e,Y.semver))return!1}return!0};var Xl=Ds;const _s=Xl,qs=(e,t,l)=>_s(e,t,">",l);var ea=qs;const ta=Xl,la=(e,t,l)=>ta(e,t,"<",l);var na=la;const cn=fe(),ca=(e,t,l)=>(e=new cn(e,l),t=new cn(t,l),e.intersects(t,l));var ia=ca;const sa=zt,aa=pe;var ra=(e,t,l)=>{const n=[];let c=null,i=null;const s=e.sort((u,h)=>aa(u,h,l));for(const u of s)sa(u,t,l)?(i=u,c||(c=u)):(i&&n.push([c,i]),i=null,c=null);c&&n.push([c,null]);const a=[];for(const[u,h]of n)u===h?a.push(u):!h&&u===s[0]?a.push("*"):h?u===s[0]?a.push(`<=${h}`):a.push(`${u} - ${h}`):a.push(`>=${u}`);const r=a.join(" || "),C=typeof t.raw=="string"?t.raw:String(t);return r.length{if(e===t)return!0;e=new sn(e,l),t=new sn(t,l);let n=!1;e:for(const c of e.set){for(const i of t.set){const s=ga(c,i,l);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},da=[new Rl(">=0.0.0-0")],an=[new Rl(">=0.0.0")],ga=(e,t,l)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===tl){if(t.length===1&&t[0].semver===tl)return!0;l.includePrerelease?e=da:e=an}if(t.length===1&&t[0].semver===tl){if(l.includePrerelease)return!0;t=an}const n=new Set;let c,i;for(const X of e)X.operator===">"||X.operator===">="?c=rn(c,X,l):X.operator==="<"||X.operator==="<="?i=on(i,X,l):n.add(X.semver);if(n.size>1)return null;let s;if(c&&i){if(s=Vl(c.semver,i.semver,l),s>0)return null;if(s===0&&(c.operator!==">="||i.operator!=="<="))return null}for(const X of n){if(c&&!nt(X,String(c),l)||i&&!nt(X,String(i),l))return null;for(const M of t)if(!nt(X,String(M),l))return!1;return!0}let a,r,C,u,h=i&&!l.includePrerelease&&i.semver.prerelease.length?i.semver:!1,Y=c&&!l.includePrerelease&&c.semver.prerelease.length?c.semver:!1;h&&h.prerelease.length===1&&i.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(const X of t){if(u=u||X.operator===">"||X.operator===">=",C=C||X.operator==="<"||X.operator==="<=",c){if(Y&&X.semver.prerelease&&X.semver.prerelease.length&&X.semver.major===Y.major&&X.semver.minor===Y.minor&&X.semver.patch===Y.patch&&(Y=!1),X.operator===">"||X.operator===">="){if(a=rn(c,X,l),a===X&&a!==c)return!1}else if(c.operator===">="&&!nt(c.semver,String(X),l))return!1}if(i){if(h&&X.semver.prerelease&&X.semver.prerelease.length&&X.semver.major===h.major&&X.semver.minor===h.minor&&X.semver.patch===h.patch&&(h=!1),X.operator==="<"||X.operator==="<="){if(r=on(i,X,l),r===X&&r!==i)return!1}else if(i.operator==="<="&&!nt(i.semver,String(X),l))return!1}if(!X.operator&&(i||c)&&s!==0)return!1}return!(c&&C&&!i&&s!==0||i&&u&&!c&&s!==0||Y||h)},rn=(e,t,l)=>{if(!e)return t;const n=Vl(e.semver,t.semver,l);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},on=(e,t,l)=>{if(!e)return t;const n=Vl(e.semver,t.semver,l);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};var ua=oa;const ll=mt,dn=wt,ba=re,gn=Sn,Za=et,ma=Zi,Ga=hi,ha=Ci,Ia=pi,Ca=Ri,Wa=Yi,pa=Ji,fa=Hi,Xa=pe,Ra=ki,Va=Ki,Aa=Cl,Ya=ji,xa=$i,ya=Kt,Ja=Wl,Ba=kn,Fa=wn,Ha=pl,Na=fl,va=En,Sa=Gs,ka=Qt(),wa=fe(),Ea=zt,Ka=Js,Qa=Ns,za=ws,Ua=Qs,ja=js,La=Xl,Ta=ea,$a=na,Ma=ia,Oa=ra,Pa=ua;var Da={parse:Za,valid:ma,clean:Ga,inc:ha,diff:Ia,major:Ca,minor:Wa,patch:pa,prerelease:fa,compare:Xa,rcompare:Ra,compareLoose:Va,compareBuild:Aa,sort:Ya,rsort:xa,gt:ya,lt:Ja,eq:Ba,neq:Fa,gte:Ha,lte:Na,cmp:va,coerce:Sa,Comparator:ka,Range:wa,satisfies:Ea,toComparators:Ka,maxSatisfying:Qa,minSatisfying:za,minVersion:Ua,validRange:ja,outside:La,gtr:Ta,ltr:$a,intersects:Ma,simplifyRange:Oa,subset:Pa,SemVer:ba,re:ll.re,src:ll.src,tokens:ll.t,SEMVER_SPEC_VERSION:dn.SEMVER_SPEC_VERSION,RELEASE_TYPES:dn.RELEASE_TYPES,compareIdentifiers:gn.compareIdentifiers,rcompareIdentifiers:gn.rcompareIdentifiers},_a=Da;const qa=_c(_a),zn=e=>e!=null&&e.includes(" ")?`"${e}"`:`${e??"pandoc"}`;async function er(e,t){e=zn(e);let l=await cl(`${e} --version`,{env:t});l=l.substring(0,l.indexOf(` `)).replace("pandoc.exe","").replace("pandoc","").trim();let n=[...l].filter(c=>c===".").length;if(n===1)l=`${l}.0`;else for(;n>2;)l=l.substring(0,l.lastIndexOf(".")),n-=1;return qa.parse(l,!0)}const tr="3.1.7",Vt={normalizePath:zn,getVersion:er,requiredVersion:tr};async function Un(e,t,l,n,c,i,s,a,r,C){const{settings:u,lang:h,manifest:Y,app:{vault:{adapter:X,config:M},metadataCache:O}}=e;if(!n){const ce=hn(c);n=`${t.basename}${ce}`}i==null&&(i=u.showOverwriteConfirmation);const b=u.showExportProgressBar,j=X.getBasePath(),k=`${j}/${Y.dir}`,z=`${k}/lua`,$=l,w=`${$}/${n}`,be=n.substring(0,n.lastIndexOf(".")),Ze=n,p=X.getFullPath(t.path),f=de.dirname(p),R=t.basename,N=t.name;let _=M.attachmentFolderPath??"/";_==="/"?_=j:_.startsWith(".")?_=de.join(f,_.substring(1)):_=de.join(j,_);let I=null;try{I=O.getCache(t.path).frontmatter}catch(ce){console.error(ce)}const m={pluginDir:k,luaDir:z,outputDir:$,outputPath:w,outputFileName:be,outputFileFullName:Ze,currentDir:f,currentPath:p,currentFileName:R,currentFileFullName:N,attachmentFolderPath:_,vaultDir:j,metadata:I,options:s,fromFormat:app.vault.config.useMarkdownLinks?"markdown":"markdown+wikilinks_title_after_pipe"},H=c.type==="custom"&&c.showCommandOutput,B=c.openExportedFileLocation??u.openExportedFileLocation,F=c.openExportedFile??u.openExportedFile;if(i&&Ut.existsSync(w)){const ce=await Se.remote.dialog.showSaveDialog({title:h.overwriteConfirmationDialog.title(Ze),defaultPath:w,properties:["showOverwriteConfirmation","createDirectory"]});if(ce.canceled)return;m.outputPath=ce.filePath,m.outputDir=de.dirname(m.outputPath),m.outputFileFullName=de.basename(m.outputPath),m.outputFileName=de.basename(m.outputFileFullName,de.extname(m.outputFileFullName))}let x;b&&(x=Dc.show(h.preparing(m.outputFileFullName)));const v=m.env=In(ue(u.env)??{},m);let E=Vt.normalizePath(ue(u.pandocPath));if(Nt.platform==="win32"){E=E.replaceAll("\\","/");const ce=["pluginDir","luaDir","outputDir","outputPath","currentDir","currentPath","attachmentFolderPath","vaultDir"];for(const Ve of ce){const Qe=m[Ve];m[Ve]=Qe.replaceAll("\\","/")}}const S=c.type==="pandoc"?`${E} "\${currentPath}" ${c.arguments??""} ${c.customArguments??""}`:c.command,K=il(S,m),te=Zt(K.match(/(?:[^\s"]+|"[^"]*")+/g),{alias:{output:["o"]}}),V=de.normalize(cc(te.output)),Ge=de.dirname(V);Ut.existsSync(Ge)||Ut.mkdirSync(Ge);try{console.log(`[${e.manifest.name}]: export command and options:`,{cmd:K,options:{cwd:m.currentDir,env:v}}),await cl(K,{cwd:m.currentDir,env:v}),x==null||x();const ce=async()=>{if(B&&setTimeout(()=>{Se.remote.shell.showItemInFolder(V)},1e3),F&&await Se.remote.shell.openPath(V),c.type==="pandoc"&&c.runCommand===!0&&c.command){const Ve=il(c.command,m);await cl(Ve,{cwd:m.currentDir,env:v})}a&&a()};if(H){const Ve=new Kl(app,h.exportCommandOutputMessage(K));Ve.onClose=ce,Ve.open()}else new We.Notice(h.exportSuccessNotice(m.outputFileFullName),1500),await ce()}catch(ce){x==null||x(),new Kl(app,h.exportErrorOutputMessage(K,ce)).open(),r&&r()}}const gl=e=>{const t=new We.Modal(e.app);let l=[],n=!1;return Fe(()=>{se(t.titleEl,()=>e.title)}),Fe(()=>{se(t.contentEl,()=>e.children)}),Fe(()=>{const c=Object.entries(e.classList??{}).filter(([,i])=>i).map(([i])=>i);l.length>0&&t.containerEl.removeClasses(l),c.length>0&&t.containerEl.addClasses(c),l=c}),Fe(()=>{t.containerEl.style.display=e.hidden?"None":""}),t.onClose=()=>{n||(n=!0,e.onClose())},pn(()=>t.open()),_e(()=>{n||t.close()}),document.createTextNode("")};var lr=me("