digital-garden/.obsidian/plugins/obsidian-enhancing-export/main.js

31 lines
178 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"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;c<e.observers.length;c+=1){const i=e.observers[c],s=jt&&jt.running;s&&jt.disposed.has(i),(s?!i.tState:!i.state)&&(i.pure?ie.push(i):He.push(i),i.observers&&An(i)),s||(i.state=ke)}if(ie.length>1e6)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<vt);)e.state&&t.push(e);for(let l=t.length-1;l>=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<e.length;t++)xt(e[t])}function Zc(e){let t,l=0;for(t=0;t<e.length;t++){const n=e[t];n.user?e[l++]=n:xt(n)}for(t=0;t<l;t++)xt(e[t])}function yt(e,t){e.state=0;for(let l=0;l<e.sources.length;l+=1){const n=e.sources[l];if(n.sources){const c=n.state;c===ke?n!==t&&(!n.updatedAt||n.updatedAt<vt)&&xt(n):c===Yt&&yt(n,t)}}}function An(e){for(let t=0;t<e.observers.length;t+=1){const l=e.observers[t];l.state||(l.state=Yt,l.pure?ie.push(l):He.push(l),l.observers&&An(l))}}function St(e){let t;if(e.sources)for(;e.sources.length;){const l=e.sources.pop(),n=e.sourceSlots.pop(),c=l.observers;if(c&&c.length){const i=c.pop(),s=l.observerSlots.pop();n<c.length&&(i.sourceSlots[s]=n,c[n]=i,l.observerSlots[n]=s)}}if(e.owned){for(t=e.owned.length-1;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;l<e.length;l++){const n=rl(e[l]);Array.isArray(n)?t.push.apply(t,n):t.push(n)}return t}return e}function Gc(e,t){return function(n){let c;return ne(()=>c=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;t<e.length;t++)e[t]()}function Ic(e,t,l={}){let n=[],c=[],i=[],s=0,a=t.length>1?[]: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<Y;u++)n[u]=r[u],c[u]=Te(h);s=Y}else{for(O=new Array(Y),b=new Array(Y),a&&(j=new Array(Y)),k=0,z=Math.min(s,Y);k<z&&n[k]===r[k];k++);for(z=s-1,$=Y-1;z>=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;u<Y;u++)u in O?(c[u]=O[u],i[u]=b[u],a&&(a[u]=j[u],a[u](u))):c[u]=Te(h);c=c.slice(0,s=Y),n=r.slice(0)}return c});function h(Y){if(i[u]=Y,a){const[X,M]=oe(u);return a[u]=M,t(r[u],X)}return t(r[u])}}}function G(e,t){return D(()=>e(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<i.length;s++){const a=i[s].when;if(a)return t=!!i[s].keyed,[s,a,i[s]]}return[-1]},void 0,{equals:l});return le(()=>{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(;s<c||a<i;){if(t[s]===l[a]){s++,a++;continue}for(;t[c-1]===l[i-1];)c--,i--;if(c===s){const u=i<n?a?l[a-1].nextSibling:l[i-a]:r;for(;a<i;)e.insertBefore(l[a++],u)}else if(i===a)for(;s<c;)(!C||!C.has(t[s]))&&t[s].remove(),s++;else if(t[s]===l[i-1]&&l[a]===t[c-1]){const u=t[--c].nextSibling;e.insertBefore(l[a++],t[s++].nextSibling),e.insertBefore(l[--i],u),t[c]=l[i]}else{if(!C){C=new Map;let h=a;for(;h<i;)C.set(l[h],h++)}const u=C.get(t[s]);if(u!=null)if(a<u&&u<i){let h=s,Y=1,X;for(;++h<c&&h<i&&!((X=C.get(t[h]))==null||X!==u+Y);)Y++;if(Y>u-a){const M=t[s];for(;a<u;)e.insertBefore(l[a++],M)}else e.replaceChild(l[a++],t[s++])}else s++;else t[s++].remove()}}}const Hl="_$DX_DELEGATE";function me(e,t,l){let n;const c=()=>{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;n<c;n++){const i=e[n];l.has(i)||(l.add(i),t.addEventListener(i,Sc))}}function Ne(e,t,l){l==null?e.removeAttribute(t):e.setAttribute(t,l)}function Bc(e,t,l,n){n==null?e.removeAttributeNS(t,l):e.setAttributeNS(t,l,n)}function Jn(e,t){t==null?e.removeAttribute("class"):e.className=t}function Gl(e,t,l,n){if(n)Array.isArray(l)?(e[`$$${t}`]=l[0],e[`$$${t}Data`]=l[1]):e[`$$${t}`]=l;else if(Array.isArray(l)){const c=l[0];e.addEventListener(t,l[0]=i=>c.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;i<s;i++){const a=c[i];!a||a==="undefined"||t[a]||(Nl(e,a,!1),delete l[a])}for(i=0,s=n.length;i<s;i++){const a=n[i],r=!!t[a];!a||a==="undefined"||l[a]===r||!r||(Nl(e,a,!0),l[a]=r)}return l}function hl(e,t,l){if(!t)return l?Ne(e,"style"):t;const n=e.style;if(typeof t=="string")return n.cssText=t;typeof l=="string"&&(n.cssText=l=void 0),l||(l={}),t||(t={});let c,i;for(i in l)t[i]==null&&n.removeProperty(i),delete l[i];for(i in t)c=t[i],c!==l[i]&&(n.setProperty(i,c),l[i]=c);return l}function Hc(e,t={},l,n){const c={};return ne(()=>c.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<i;c++)e.classList.toggle(n[c],l)}function vl(e,t,l,n,c,i){let s,a,r,C,u;if(t==="style")return hl(e,l,n);if(t==="classList")return Fc(e,l,n);if(l===n)return n;if(t==="ref")i||l(e);else if(t.slice(0,3)==="on:"){const h=t.slice(3);n&&e.removeEventListener(h,n),l&&e.addEventListener(h,l)}else if(t.slice(0,10)==="oncapture:"){const h=t.slice(10);n&&e.removeEventListener(h,n,!0),l&&e.addEventListener(h,l,!0)}else if(t.slice(0,2)==="on"){const h=t.slice(2).toLowerCase(),Y=Yc.has(h);if(!Y&&n){const X=Array.isArray(n)?n[0]:n;e.removeEventListener(h,X)}(Y||l)&&(Gl(e,h,l,Y),Y&&ml([h]))}else if(t.slice(0,5)==="attr:")Ne(e,t.slice(5),l);else if((u=t.slice(0,5)==="prop:")||(r=Xc.has(t))||!c&&((C=Ac(t,e.tagName))||(a=fc.has(t)))||(s=e.nodeName.includes("-")))u&&(t=t.slice(5),a=!0),t==="class"||t==="className"?Jn(e,l):s&&!a&&!r?e[vc(t)]=l:e[C||t]=l;else{const h=c&&t.indexOf(":")>-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<s;i++){let a=t[i],r=l&&l[e.length],C;if(!(a==null||a===!0||a===!1))if((C=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))c=ol(e,a,r)||c;else if(C==="function")if(n){for(;typeof a=="function";)a=a();c=ol(e,Array.isArray(a)?a:[a],Array.isArray(r)?r:[r])||c}else e.push(a),c=!0;else{const u=String(a);r&&r.nodeType===3&&r.data===u?e.push(r):e.push(document.createTextNode(u))}}return c}function Sl(e,t,l=null){for(let n=0,c=t.length;n<c;n++)e.insertBefore(t[n],l)}function Ue(e,t,l,n){if(l===void 0)return e.textContent="";const c=n||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=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;i<e.length;i++){let s=e.charAt(i);n&&(n=!1,s=s.toUpperCase()),i!==0&&(s==="-"||s==="_")?n=!0:s!=="-"&&s!=="_"&&(l+=s)}return l}}function Bn(e,t){const l=e.toLowerCase();t=t||"-";let n="";for(let c=0;c<e.length;c++){const i=l.charAt(c),s=e.charAt(c);i!==s&&c>0?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<e.length;s++){if(l=n,n=e.charAt(s),n===" "&&!c){l!==" "&&t++;continue}n===c?c=null:(n==="'"||n==='"')&&!c&&(c=n),i[t]||(i[t]=""),i[t]+=n}return i}/**
* @license
* Copyright (c) 2016, Contributors
* SPDX-License-Identifier: ISC
*/var he;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(he||(he={}));/**
* @license
* Copyright (c) 2016, Contributors
* SPDX-License-Identifier: ISC
*/let Ye;class Qc{constructor(t){Ye=t}parse(t,l){const n=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},l),c=Kc(t),i=typeof t=="string",s=zc(Object.assign(Object.create(null),n.alias)),a=Object.assign({"boolean-negation":!0,"camel-case-expansion":!0,"combine-arrays":!1,"dot-notation":!0,"duplicate-arguments-array":!0,"flatten-duplicate-arrays":!0,"greedy-arrays":!0,"halt-at-non-option":!1,"nargs-eats-options":!1,"negation-prefix":"no-","parse-numbers":!0,"parse-positional-numbers":!0,"populate--":!1,"set-placeholder-key":!1,"short-option-groups":!0,"strip-aliased":!1,"strip-dashed":!1,"unknown-options-as-args":!1},n.configuration),r=Object.assign(Object.create(null),n.default),C=n.configObjects||[],u=n.envPrefix,h=a["populate--"],Y=h?"--":"_",X=Object.create(null),M=Object.create(null),O=n.__||Ye.format,b={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},j=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,k=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(o){const g=typeof o=="object"?o.key:o,W=Object.keys(o).map(function(Z){return{boolean:"bools",string:"strings",number:"numbers"}[Z]}).filter(Boolean).pop();W&&(b[W][g]=!0),b.arrays[g]=!0,b.keys.push(g)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(o){b.bools[o]=!0,b.keys.push(o)}),[].concat(n.string||[]).filter(Boolean).forEach(function(o){b.strings[o]=!0,b.keys.push(o)}),[].concat(n.number||[]).filter(Boolean).forEach(function(o){b.numbers[o]=!0,b.keys.push(o)}),[].concat(n.count||[]).filter(Boolean).forEach(function(o){b.counts[o]=!0,b.keys.push(o)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(o){b.normalize[o]=!0,b.keys.push(o)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([o,g])=>{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<c.length;o++){const g=c[o],W=g.replace(/^-{3,}/,"---");let Z,d,y,A,J,q;if(g!=="--"&&/^-/.test(g)&&Qe(g))Ze(g);else if(W.match(/^---+(=|$)/)){Ze(g);continue}else if(g.match(/^--.+=/)||!a["short-option-groups"]&&g.match(/^-.+=/))A=g.match(/^--?([^=]+)=([\s\S]*)$/),A!==null&&Array.isArray(A)&&A.length>=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;ae<y.length;ae++){if(J=g.slice(ae+2),y[ae+1]&&y[ae+1]==="="){q=g.slice(ae+3),d=y[ae],V(d,b.arrays)?o=f(o,d,c,q):V(d,b.nargs)!==!1?o=p(o,d,c,q):R(d,q),Z=!0;break}if(J==="-"){R(y[ae],J);continue}if(/[A-Za-z]/.test(y[ae])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(J)&&V(J,b.bools)===!1){R(y[ae],J),Z=!0;break}if(y[ae+1]&&y[ae+1].match(/\W/)){R(y[ae],J),Z=!0;break}else R(y[ae],ze(y[ae]))}d=g.slice(-1)[0],!Z&&d!=="-"&&(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&&(!/^(-|--)[^-]/.test(J)||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(/^-[0-9]$/)&&g.match(j)&&V(g.slice(1),b.bools))d=g.slice(1),R(d,ze(d));else if(g==="--"){$=c.slice(o+1);break}else if(a["halt-at-non-option"]){$=c.slice(o);break}else Ze(g)}F(w,!0),F(w,!1),m(w),B(),E(w,b.aliases,r,!0),x(w),a["set-placeholder-key"]&&v(w),Object.keys(b.counts).forEach(function(o){S(w,o.split("."))||R(o,0)}),h&&$.length&&(w[Y]=[]),$.forEach(function(o){w[Y].push(o)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(w).filter(o=>o!=="--"&&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)+A<y&&(z=Error(O("Not enough arguments following: %s",g))),A=y;else{for(d=o+1;d<W.length&&(!W[d].match(/^-[^0-9]/)||W[d].match(j)||Qe(W[d]));d++)A++;A<y&&(z=Error(O("Not enough arguments following: %s",g)))}let J=Math.min(A,y);for(!Ae(Z)&&J>0&&(R(g,Z),J--),d=o+1;d<J+o+1;d++)R(g,W[d]);return o+J}function f(o,g,W,Z){let d=[],y=Z||W[o+1];const A=V(g,b.nargs);if(V(g,b.bools)&&!/^(true|false)$/.test(y))d.push(!0);else if(Ae(y)||Ae(Z)&&/^-/.test(y)&&!j.test(y)&&!Qe(y)){if(r[g]!==void 0){const J=r[g];d=Array.isArray(J)?J:[J]}}else{Ae(Z)||d.push(_(g,Z,!0));for(let J=o+1;J<W.length&&!(!a["greedy-arrays"]&&d.length>0||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.length<A||isNaN(A)&&d.length===0)&&(z=Error(O("Not enough arguments following: %s",g))),R(g,d),o}function R(o,g,W=i){if(/-/.test(o)&&a["camel-case-expansion"]){const y=o.split(".").map(function(A){return ct(A)}).join(".");N(o,y)}const Z=_(o,g,W),d=o.split(".");K(w,d,Z),b.aliases[o]&&b.aliases[o].forEach(function(y){const A=y.split(".");K(w,A,Z)}),d.length>1&&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;d<Z.length;d++){if(W=o.slice(d+2),!Ge(Z[d])){g=!1;break}if(Z[d+1]&&Z[d+1]==="="||W==="-"||/[A-Za-z]/.test(Z[d])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(W)||Z[d+1]&&Z[d+1].match(/\W/))break}return g}function Qe(o){return a["unknown-options-as-args"]&&Dn(o)}function Dn(o){return o=o.replace(/^-{3,}/,"--"),o.match(j)||Ve(o)?!1:!ce(o,/^-+([^=]+?)=[\s\S]*$/,k,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function ze(o){return!V(o,b.bools)&&!V(o,b.counts)&&`${o}`in r?r[o]:_n(qn(o))}function _n(o){return{[he.BOOLEAN]:!0,[he.STRING]:"",[he.NUMBER]:void 0,[he.ARRAY]:[]}[o]}function qn(o){let g=he.BOOLEAN;return V(o,b.strings)?g=he.STRING:V(o,b.numbers)?g=he.NUMBER:V(o,b.bools)?g=he.BOOLEAN:V(o,b.arrays)&&(g=he.ARRAY),g}function Ae(o){return o===void 0}function ec(){Object.keys(b.counts).find(o=>V(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;c<t.length;c++)for(let i=c+1;i<t.length;i++)if(t[c].filter(function(a){return t[i].indexOf(a)!==-1}).length){t[c]=t[c].concat(t[i]),t.splice(i,1),n=!0;break}}return t.forEach(function(c){c=c.filter(function(s,a,r){return r.indexOf(s)===a});const i=c.pop();i!==void 0&&typeof i=="string"&&(l[i]=c)}),l}function Lt(e){return e!==void 0?e+1:1}function kl(e){return e==="__proto__"?"___proto___":e}function Uc(e){return typeof e=="string"&&(e[0]==="'"||e[0]==='"')&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}/**
* @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
* CJS and ESM environments.
*
* @license
* Copyright (c) 2016, Contributors
* SPDX-License-Identifier: ISC
*/var Tt,$t,Mt;const wl=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,El=($t=(Tt=process==null?void 0:process.versions)===null||Tt===void 0?void 0:Tt.node)!==null&&$t!==void 0?$t:(Mt=process==null?void 0:process.version)===null||Mt===void 0?void 0:Mt.slice(1);if(El&&Number(El.match(/^([^.]+)/)[1])<wl)throw Error(`yargs parser supports a minimum Node.js version of ${wl}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const jc=process?process.env:{},Hn=new Qc({cwd:process.cwd,env:()=>jc,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('<div class=progress-bar><div class="progress-bar-message u-center-text"></div><div class=progress-bar-indicator><div class=progress-bar-line></div><div class=progress-bar-subline style=display:none;></div><div class="progress-bar-subline mod-increase"></div><div class="progress-bar-subline mod-decrease">');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:e<t?-1:1},ri=(e,t)=>vn(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<It)return i}return c}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(ht("SemVer.compare",this.version,this.options,t),!(t instanceof Xe)){if(typeof t=="string"&&t===this.version)return 0;t=new Xe(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Xe||(t=new Xe(t,this.options)),je(this.major,t.major)||je(this.minor,t.minor)||je(this.patch,t.patch)}comparePre(t){if(t instanceof Xe||(t=new Xe(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let l=0;do{const n=this.prerelease[l],c=t.prerelease[l];if(ht("prerelease compare",l,n,c),n===void 0&&c===void 0)return 0;if(c===void 0)return 1;if(n===void 0)return-1;if(n===c)continue;return je(n,c)}while(++l)}compareBuild(t){t instanceof Xe||(t=new Xe(t,this.options));let l=0;do{const n=this.build[l],c=t.build[l];if(ht("prerelease compare",l,n,c),n===void 0&&c===void 0)return 0;if(c===void 0)return 1;if(n===void 0)return-1;if(n===c)continue;return je(n,c)}while(++l)}inc(t,l,n){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",l,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",l,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",l,n),this.inc("pre",l,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",l,n),this.inc("pre",l,n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const c=Number(n)?1:0;if(!l&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[c];else{let i=this.prerelease.length;for(;--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;l<n;l++)t.push(arguments[l]);return t}U.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,l=e.prev;return t&&(t.prev=l),l&&(l.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=l),e.list.length--,e.next=null,e.prev=null,e.list=null,t};U.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};U.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};U.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)Ws(this,arguments[e]);return this.length};U.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)ps(this,arguments[e]);return this.length};U.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};U.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};U.prototype.forEach=function(e,t){t=t||this;for(var l=this.head,n=0;l!==null;n++)e.call(t,l.value,n,this),l=l.next};U.prototype.forEachReverse=function(e,t){t=t||this;for(var l=this.tail,n=this.length-1;l!==null;n--)e.call(t,l.value,n,this),l=l.prev};U.prototype.get=function(e){for(var t=0,l=this.head;l!==null&&t<e;t++)l=l.next;if(t===e&&l!==null)return l.value};U.prototype.getReverse=function(e){for(var t=0,l=this.tail;l!==null&&t<e;t++)l=l.prev;if(t===e&&l!==null)return l.value};U.prototype.map=function(e,t){t=t||this;for(var l=new U,n=this.head;n!==null;)l.push(e.call(t,n.value,this)),n=n.next;return l};U.prototype.mapReverse=function(e,t){t=t||this;for(var l=new U,n=this.tail;n!==null;)l.push(e.call(t,n.value,this)),n=n.prev;return l};U.prototype.reduce=function(e,t){var l,n=this.head;if(arguments.length>1)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(t<e||t<0)return l;e<0&&(e=0),t>this.length&&(t=this.length);for(var n=0,c=this.head;c!==null&&n<e;n++)c=c.next;for(;c!==null&&n<t;n++,c=c.next)l.push(c.value);return l};U.prototype.sliceReverse=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(t<e||t<0)return l;e<0&&(e=0),t>this.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&&n<e;n++)c=c.next;for(var i=[],n=0;c&&n<t;n++)i.push(c.value),c=this.removeNode(c);c===null&&(c=this.tail),c!==this.head&&c!==this.tail&&(c=c.prev);for(var n=0;n<l.length;n++)c=Cs(this,c,l[n]);return i};U.prototype.reverse=function(){for(var e=this.head,t=this.tail,l=e;l!==null;l=l.prev){var n=l.prev;l.prev=l.next,l.next=n}return this.head=t,this.tail=e,this};function Cs(e,t,l){var n=t===e.head?new Ke(l,null,t,e):new Ke(l,t,t.next,e);return n.next===null&&(e.tail=n),n.prev===null&&(e.head=n),e.length++,n}function Ws(e,t){e.tail=new Ke(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function ps(e,t){e.head=new Ke(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function Ke(e,t,l,n){if(!(this instanceof Ke))return new Ke(e,t,l,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,l?(l.prev=this,this.next=l):this.next=null}try{hs()(U)}catch{}const fs=Is,we=Symbol("max"),ye=Symbol("length"),Le=Symbol("lengthCalculator"),at=Symbol("allowStale"),Ee=Symbol("maxAge"),xe=Symbol("dispose"),Dl=Symbol("noDisposeOnSet"),ee=Symbol("lruList"),Ie=Symbol("cache"),Kn=Symbol("updateAgeOnGet"),Pt=()=>1;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;H<this.set.length;H++)if(_(this.set[H],m,this.options))return!0;return!1}}_t=e;const t=Vs,l=new t({max:1e3}),n=Il,c=Qt(),i=Et,s=re,{re:a,t:r,comparatorTrimReplace:C,tildeTrimReplace:u,caretTrimReplace:h}=mt,{FLAG_INCLUDE_PRERELEASE:Y,FLAG_LOOSE:X}=wt,M=I=>I.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;B<I.length;B++)if(!I[B].test(m))return!1;if(m.prerelease.length&&!H.includePrerelease){for(let B=0;B<I.length;B++)if(i(I[B].semver),I[B].semver!==c.ANY&&I[B].semver.prerelease.length>0){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<e.set.length;++n){const c=e.set[n];let i=null;c.forEach(s=>{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<t.set.length;++C){const u=t.set[C];let h=null,Y=null;if(u.forEach(X=>{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<C.length?r:t};const sn=fe(),Rl=Qt(),{ANY:tl}=Rl,nt=zt,Vl=pe,oa=(e,t,l={})=>{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("<button>");const ul=e=>(()=>{var t=lr();return Gl(t,"click",e.onClick,!0),se(t,()=>e.children),ne(()=>t.classList.toggle("mod-cta",!!e.cta)),t})();ml(["click"]);var nr=me("<div><div class=setting-item-info><div class=setting-item-name></div><div class=setting-item-description></div></div><div class=setting-item-control>"),cr=me("<div class=checkbox-container><input type=checkbox>"),ir=me("<div class=setting-editor-extra-setting-button>"),sr=me("<input type=text>"),ar=me("<textarea>"),rr=me("<select class=dropdown>"),or=me("<option>");const jn=dc(),dr=()=>gc(jn),Q=e=>{const t={settingEl:null};return G(jn.Provider,{value:t,get children(){var l=nr(),n=l.firstChild,c=n.firstChild,i=c.nextSibling,s=n.nextSibling;return kt(a=>t.settingEl=a,l),se(c,()=>e.name),se(i,()=>e.description),se(s,()=>e.children),ne(a=>{var r=`setting-item ${e.class??""}`.trimEnd(),C=!!e.heading,u=!!e.disabled;return r!==a.e&&Jn(l,a.e=r),C!==a.t&&l.classList.toggle("setting-item-heading",a.t=C),u!==a.a&&l.classList.toggle("is-disable",a.a=u),a},{e:void 0,t:void 0,a:void 0}),l}})},Ce=e=>{const t=dr();return pn(()=>{t.settingEl.addClass("mod-toggle")}),_e(()=>{t.settingEl.removeClass("mod-toggle")}),(()=>{var l=cr();return l.$$click=()=>e.onChange&&e.onChange(!e.checked),ne(()=>l.classList.toggle("is-enabled",!!e.checked)),l})()},ve=e=>(()=>{var t=ir();return Gl(t,"click",e.onClick,!0),kt(l=>e.icon&&nc.setIcon(l,e.icon),t),ne(l=>{var n=!!(e.icon&&e.onClick),c=e.tooltip;return n!==l.e&&t.classList.toggle("clickable-icon",l.e=n),c!==l.t&&Ne(t,"aria-label",l.t=c),l},{e:void 0,t:void 0}),t})(),ge=e=>(()=>{var t=sr();return t.addEventListener("change",l=>{var n;return(n=e.onChange)==null?void 0:n.call(e,l.target.value)}),ne(l=>{var n=e.title,c=e.readOnly,i=e.placeholder,s=e.spellcheck??!1,a=e.style,r=e.disabled;return n!==l.e&&Ne(t,"title",l.e=n),c!==l.t&&(t.readOnly=l.t=c),i!==l.a&&Ne(t,"placeholder",l.a=i),s!==l.o&&Ne(t,"spellcheck",l.o=s),l.i=hl(t,a,l.i),r!==l.n&&(t.disabled=l.n=r),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),ne(()=>t.value=e.value),t})(),gr=e=>(()=>{var t=ar();return t.addEventListener("change",l=>{var n;return(n=e.onChange)==null?void 0:n.call(e,l.target.value)}),ne(l=>{var n=e.placeholder,c=e.spellcheck??!1,i=e.style,s=e.disabled;return n!==l.e&&Ne(t,"placeholder",l.e=n),c!==l.t&&Ne(t,"spellcheck",l.t=c),l.a=hl(t,i,l.a),s!==l.o&&(t.disabled=l.o=s),l},{e:void 0,t:void 0,a:void 0,o:void 0}),ne(()=>t.value=e.value),t})(),rt=e=>(()=>{var t=rr();return t.addEventListener("change",l=>{var n;return(n=e.onChange)==null?void 0:n.call(e,l.target.value,l.target.selectedIndex)}),t.autofocus=!0,se(t,G(yn,{get each(){return e.options},children:l=>(()=>{var n=or();return se(n,()=>l.name??l.value),ne(()=>n.selected=l.value===e.selected),ne(()=>n.value=l.value),n})()})),t})();ml(["click"]);var ur=me("<div>Unsupported <!> ");const pt={checkbox:e=>G(Q,{get name(){return e.meta.title},get description(){return e.meta.description},get children(){return G(Ce,{get checked(){return it(e.meta)},get onChange(){return e.onChange}})}}),textInput:e=>G(Q,{get name(){return e.meta.title},get description(){return e.meta.description},get children(){return G(ge,{get value(){return it(e.meta)},get onChange(){return e.onChange}})}}),dropdown:e=>G(Q,{get name(){return e.meta.title},get description(){return e.meta.description},get children(){return G(rt,{get selected(){return it(e.meta)},get options(){return e.meta.options},onChange:t=>e.onChange(t)})}}),fileSelectDialog:e=>{const[t,l]=oe(it(e.meta)),n=async()=>{const c=await mn.remote.dialog.showOpenDialog({properties:["openFile"],filters:e.meta.filters});!c.canceled&&c.filePaths.length>0&&(l(c.filePaths[0]),e.onChange&&e.onChange(D(t)))};return G(Q,{get name(){return e.meta.title},get description(){return e.meta.description},get children(){return[G(ge,{get value(){return t()??""},readOnly:!0}),G(ve,{icon:"folder",onClick:n})]}})}},br=(e,t)=>{switch(e.type){case"checkbox":{const l=pt[e.type];return G(l,{meta:e,onChange:t})}case"dropdown":{const l=pt[e.type];return G(l,{meta:e,onChange:t})}case"textInput":{const l=pt[e.type];return G(l,{meta:e,onChange:t})}case"fileSelectDialog":{const l=pt[e.type];return G(l,{meta:e,onChange:t})}default:return(()=>{var l=ur(),n=l.firstChild,c=n.nextSibling;return c.nextSibling,se(l,()=>JSON.stringify(e),c),l})()}},Zr=e=>{let t={};Fe(()=>t=e.value??Ln(e.meta));const l=(c,i)=>{t[c]=i,e.onChange&&e.onChange(t,c)},n=(c,i)=>{const s=r=>l(c,r);let a;return e.customEditor&&(a=e.customEditor(i,s),a)?a:br(i,s)};return G(yn,{get each(){return Object.entries(e.meta)},children:([c,i])=>n(c,i)})},Ln=e=>Object.fromEntries(Object.entries(e).map(([t,l])=>[t,it(l)])),it=e=>{if(e.default)return e.default instanceof Function?e.default():e.default};var mr=me("<div class=modal-button-container>");const Gr=e=>{var p;const{plugin:{app:t,settings:l,lang:n},currentFile:c}=e,[i,s]=oe(!1),[a,r]=oe(l.showOverwriteConfirmation),[C,u]=oe(l.lastExportType??((p=l.items.first())==null?void 0:p.name)),[h,Y]=oe({}),X=le(()=>l.items.find(f=>f.name===C())),M=le(()=>hn(X())),O=le(()=>n.exportDialog.title(X().name)),b=le(()=>ac(X().optionsMeta)),[j,k]=oe(`${ue(l.lastExportDirectory)??Se.remote.app.getPath("documents")}`),[z,$]=oe(`${c.basename}${M()}`);Fe(()=>{const f=b();Y(f?Ln(f):{})}),Fe(()=>{let f=D(z);f=f.includes(".")?f.substring(0,f.lastIndexOf(".")):f,$(`${f}${M()}`)});const w=l.items.map(f=>({name:f.name,value:f.name}));if(l.defaultExportDirectoryMode==="Same"){const f=c.vault.adapter.getBasePath()+"/"+c.parent.path;k(f)}else l.defaultExportDirectoryMode==="Custom"&&k(ue(l.customDefaultExportDirectory));const be=async()=>{var R;const f=await Se.remote.dialog.showOpenDialog({title:n.exportDialog.selectExportFolder,defaultPath:j(),properties:["createDirectory","openDirectory"]});!f.canceled&&((R=f.filePaths)==null?void 0:R.length)>0&&k(f.filePaths[0])},Ze=async()=>{const f=e.plugin;s(!0),await Un(f,c,D(j),D(z),D(X),D(a),h(),async()=>{l.showOverwriteConfirmation=D(a),l.lastExportDirectory=Be(l.lastExportDirectory,D(j)),l.lastExportType=D(X).name,await f.saveSettings(),e.onClose&&e.onClose()},()=>{s(!1)})};return G(gl,{app:t,get title(){return O()},get hidden(){return i()},get onClose(){return e.onClose},get children(){return[G(Q,{get name(){return n.exportDialog.type},get children(){return G(rt,{options:w,onChange:f=>u(f),get selected(){return C()}})}}),G(Q,{get name(){return n.exportDialog.fileName},get children(){return G(ge,{get title(){return z()},get value(){return z()},onChange:f=>$(f)})}}),G(Rt,{get when(){return b()},get children(){return G(Zr,{get meta(){return b()},get value(){return h()},onChange:f=>Y(f)})}}),G(Q,{get name(){return n.exportDialog.exportTo},get children(){return[G(ge,{get title(){return j()},get value(){return j()},disabled:!0}),G(ve,{icon:"folder",onClick:be})]}}),G(Q,{get name(){return n.exportDialog.overwriteConfirmation},class:"mod-toggle",get children(){return G(Ce,{get checked(){return a()},onChange:r})}}),(()=>{var f=mr();return se(f,G(ul,{cta:!0,onClick:Ze,get children(){return n.exportDialog.export}})),f})()]}})},hr=(e,t)=>Te(l=>{let n=!1;const c=()=>{n||(n=!0,l())},i=se(document.body,()=>G(Gr,{onClose:c,plugin:e,currentFile:t}));return _e(()=>{i instanceof Node&&document.body.contains(i)&&document.body.removeChild(i)}),c}),nl={show:hr},Bt=Symbol("store-raw"),Me=Symbol("store-node"),Je=Symbol("store-has"),Tn=Symbol("store-self");function $n(e){let t=e[Re];if(!t&&(Object.defineProperty(e,Re,{value:t=new Proxy(e,Wr)}),!Array.isArray(e))){const l=Object.keys(e),n=Object.getOwnPropertyDescriptors(e);for(let c=0,i=l.length;c<i;c++){const s=l[c];n[s].get&&Object.defineProperty(e,s,{enumerable:n[s].enumerable,get:n[s].get.bind(t)})}}return t}function Oe(e){let t;return e!=null&&typeof e=="object"&&(e[Re]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Pe(e,t=new Set){let l,n,c,i;if(l=e!=null&&e[Bt])return l;if(!Oe(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)c=e[s],(n=Pe(c,t))!==c&&(e[s]=n)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let r=0,C=s.length;r<C;r++)i=s[r],!a[i].get&&(c=e[i],(n=Pe(c,t))!==c&&(e[i]=n))}return e}function Ft(e,t){let l=e[t];return l||Object.defineProperty(e,t,{value:l=Object.create(null)}),l}function gt(e,t,l){if(e[t])return e[t];const[n,c]=oe(l,{equals:!1,internal:!0});return n.$=c,e[t]=n}function Ir(e,t){const l=Reflect.getOwnPropertyDescriptor(e,t);return!l||l.get||!l.configurable||t===Re||t===Me||(delete l.value,delete l.writable,l.get=()=>e[Re][t]),l}function Mn(e){al()&&gt(Ft(e,Me),Tn)()}function Cr(e){return Mn(e),Reflect.ownKeys(e)}const Wr={get(e,t,l){if(t===Bt)return e;if(t===Re)return l;if(t===sl)return Mn(e),l;const n=Ft(e,Me),c=n[t];let i=c?c():e[t];if(t===Me||t===Je||t==="__proto__")return i;if(!c){const s=Object.getOwnPropertyDescriptor(e,t);al()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=gt(n,t,i)())}return Oe(i)?$n(i):i},has(e,t){return t===Bt||t===Re||t===sl||t===Me||t===Je||t==="__proto__"?!0:(al()&&gt(Ft(e,Je),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Cr,getOwnPropertyDescriptor:Ir};function De(e,t,l,n=!1){if(!n&&e[t]===l)return;const c=e[t],i=e.length;l===void 0?(delete e[t],e[Je]&&e[Je][t]&&c!==void 0&&e[Je][t].$()):(e[t]=l,e[Je]&&e[Je][t]&&c===void 0&&e[Je][t].$());let s=Ft(e,Me),a;if((a=gt(s,t,c))&&a.$(()=>l),Array.isArray(e)&&e.length!==i){for(let r=e.length;r<i;r++)(a=s[r])&&a.$();(a=gt(s,"length",i))&&a.$(e.length)}(a=s[Tn])&&a.$()}function On(e,t){const l=Object.keys(t);for(let n=0;n<l.length;n+=1){const c=l[n];De(e,c,t[c])}}function pr(e,t){if(typeof t=="function"&&(t=t(e)),t=Pe(t),Array.isArray(t)){if(e===t)return;let l=0,n=t.length;for(;l<n;l++){const c=t[l];e[l]!==c&&De(e,l,c)}De(e,"length",n)}else On(e,t)}function st(e,t,l=[]){let n,c=e;if(t.length>1){n=t.shift();const s=typeof n,a=Array.isArray(e);if(Array.isArray(n)){for(let r=0;r<n.length;r++)st(e,[n[r]].concat(t),l);return}else if(a&&s==="function"){for(let r=0;r<e.length;r++)n(e[r],r)&&st(e,[r].concat(t),l);return}else if(a&&s==="object"){const{from:r=0,to:C=e.length-1,by:u=1}=n;for(let h=r;h<=C;h+=u)st(e,[h].concat(t),l);return}else if(t.length>1){st(e[n],t,[n].concat(l));return}c=e[n],l=[n].concat(l)}let i=t[0];typeof i=="function"&&(i=i(c,l),i===c)||n===void 0&&i==null||(i=Pe(i),n===void 0||Oe(c)&&Oe(i)&&!Array.isArray(i)?On(c,i):De(e,n,i))}function fr(...[e,t]){const l=Pe(e||{}),n=Array.isArray(l),c=$n(l);function i(...s){Xt(()=>{n&&s.length===1?pr(l,s[0]):st(l,s)})}return[c,i]}const Ht=new WeakMap,Pn={get(e,t){if(t===Bt)return e;const l=e[t];let n;return Oe(l)?Ht.get(l)||(Ht.set(l,n=new Proxy(l,Pn)),n):l},set(e,t,l){return De(e,t,Pe(l)),!0},deleteProperty(e,t){return De(e,t,void 0,!0),!0}};function Xr(e){return t=>{if(Oe(t)){let l;(l=Ht.get(t))||Ht.set(t,l=new Proxy(t,Pn)),e(l)}return t}}var un=me("<div class=modal-button-container>");const Rr=e=>{const{plugin:t,lang:l}=e,[n,c]=fr(t.settings),[i,s]=oe(),a=le(()=>Object.entries(Object.assign({},ue(ot),ue(n.env)??{})).map(([p,f])=>`${p}="${f}"`).join(`
`)),r=(...p)=>{c(...p),t.saveSettings()},C=p=>{try{const f={};for(let R of p.split(`
`)){R=R.trim();const N=R.indexOf("=");if(N>0){const _=R.substring(0,N);let I=R.substring(N+1).trim();I.startsWith('"')&&I.endsWith('"')&&(I=I.substring(1,I.length-1)),f[_]=I}}r("env",Be(n.env??{},f))}catch(f){alert(f)}},u=le(()=>n.items.find(p=>p.name===n.lastEditName)??n.items.first()),h=p=>{const f=u();return p===void 0||p===f.type?f:void 0},Y=le(()=>ue(n.customDefaultExportDirectory)),X=p=>{const f=n.items.findIndex(R=>R.name===n.lastEditName);r("items",f===-1?0:f,Xr(R=>(p(R),R)))},M=le(()=>{const p=i();return p?app.vault.config.useMarkdownLinks&&p.compare(Vt.requiredVersion)===-1?l.settingTab.pandocVersionWithWarning(Vt.requiredVersion):l.settingTab.pandocVersion(p):l.settingTab.pandocNotFound}),[O,b]=oe(),j=()=>{const[p,f]=oe(Object.keys(ft)[0]),[R,N]=oe(),_=()=>{const I=JSON.parse(JSON.stringify(ft[p()]));I.name=R(),Xt(()=>{r("items",m=>[...m,I]),r("lastEditName",I.name)}),b(void 0)};return G(gl,{app,get title(){return l.settingTab.new},onClose:()=>b(void 0),get children(){return[G(Q,{get name(){return l.settingTab.template},get children(){return G(rt,{get options(){return Object.entries(ft).map(([I,m])=>({name:m.name,value:I}))},get selected(){return R()??p()},onChange:I=>f(I)})}}),G(Q,{get name(){return l.settingTab.name},get children(){return G(ge,{get value(){return R()??""},onChange:I=>N(I)})}}),(()=>{var I=un();return se(I,G(ul,{cta:!0,onClick:_,get children(){return l.settingTab.save}})),I})()]}})},k=()=>{const[p,f]=oe(h().name),R=()=>{Xt(()=>{X(N=>N.name=p()),r("lastEditName",p())}),b(void 0)};return G(gl,{app,get title(){return l.settingTab.rename},onClose:()=>b(void 0),get children(){return[G(Q,{get name(){return l.settingTab.name},get children(){return G(ge,{get value(){return p()??""},onChange:N=>f(N)})}}),(()=>{var N=un();return se(N,G(ul,{cta:!0,onClick:R,get children(){return l.settingTab.add}})),N})()]}})},z=()=>{const p=()=>h("pandoc"),f=R=>{X(N=>N.type==="pandoc"?R(N):void 0)};return[G(Q,{get name(){return l.settingTab.arguments},get children(){return G(ge,{style:"width: 100%",get value(){return p().arguments??""},onChange:R=>f(N=>N.arguments=R)})}}),G(Q,{get name(){return l.settingTab.extraArguments},get children(){return G(ge,{style:"width: 100%",get value(){return p().customArguments??""},get title(){return p().customArguments},onChange:R=>f(N=>N.customArguments=R)})}}),G(Q,{get name(){return l.settingTab.afterExport},heading:!0}),G(Q,{get name(){return l.settingTab.openExportedFileLocation},get children(){return G(Ce,{get checked(){return p().openExportedFileLocation??!1},onChange:R=>f(N=>N.openExportedFileLocation=R)})}}),G(Q,{get name(){return l.settingTab.openExportedFile},get children(){return G(Ce,{get checked(){return p().openExportedFile??!1},onChange:R=>f(N=>N.openExportedFile=R)})}}),G(Q,{get name(){return l.settingTab.runCommand},get children(){return G(Ce,{get checked(){return p().runCommand},onChange:R=>f(N=>N.runCommand=R)})}}),G(Rt,{get when(){return p().runCommand},get children(){return G(Q,{get children(){return G(ge,{style:"width: 100%",get value(){return p().command??""},onChange:R=>f(N=>N.command=R)})}})}})]},$=()=>{const p=()=>h("custom"),f=R=>{X(N=>N.type==="custom"?R(N):void 0)};return[G(Q,{get name(){return l.settingTab.command},get children(){return G(ge,{style:"width: 100%",get value(){return p().command},onChange:R=>f(N=>N.command=R)})}}),G(Q,{get name(){return l.settingTab.targetFileExtensions},get children(){return G(ge,{get value(){return p().targetFileExtensions??""},onChange:R=>f(N=>N.targetFileExtensions=R)})}}),G(Q,{get name(){return l.settingTab.afterExport},heading:!0}),G(Q,{get name(){return l.settingTab.showCommandOutput},get children(){return G(Ce,{get checked(){return p().showCommandOutput??!1},onChange:R=>f(N=>N.showCommandOutput=R)})}}),G(Q,{get name(){return l.settingTab.openExportedFileLocation},get children(){return G(Ce,{get checked(){return p().openExportedFileLocation??!1},onChange:R=>f(N=>N.openExportedFileLocation=R)})}}),G(Q,{get name(){return l.settingTab.openExportedFile},get children(){return G(Ce,{get checked(){return p().openExportedFile??!1},onChange:R=>f(N=>N.openExportedFile=R)})}})]},w=async()=>{await t.resetSettings(),r(t.settings)},be=async()=>{const p=await Se.remote.dialog.showOpenDialog({defaultPath:Y()??Se.remote.app.getPath("documents"),properties:["createDirectory","openDirectory"]});!p.canceled&&p.filePaths.length>0&&r("customDefaultExportDirectory",f=>Be(f,p.filePaths[0]))},Ze=async()=>{const p=await Se.remote.dialog.showOpenDialog({filters:Nt.platform=="win32"?[{extensions:["exe"],name:"pandoc"}]:void 0,properties:["openFile"]});!p.canceled&&p.filePaths.length>0&&r("pandocPath",f=>Be(f,p.filePaths[0]))};return Fe(async()=>{try{const p=In(ue(n.env)??{});s(await Vt.getVersion(ue(n.pandocPath),p))}catch{s(void 0)}}),[G(Q,{get name(){return l.settingTab.general},heading:!0,get children(){return G(ve,{icon:"reset",onClick:w})}}),G(Q,{get name(){return l.settingTab.pandocPath},get description(){return M()},get children(){return[G(ge,{get placeholder(){return l.settingTab.pandocPathPlaceholder},get value(){return ue(n.pandocPath)??""},onChange:p=>r("pandocPath",f=>Be(f,p))}),G(ve,{icon:"folder",onClick:Ze})]}}),G(Q,{get name(){return l.settingTab.defaultFolderForExportedFile},get children(){return G(rt,{get options(){return[{name:l.settingTab.auto,value:"Auto"},{name:l.settingTab.sameFolderWithCurrentFile,value:"Same"},{name:l.settingTab.customLocation,value:"Custom"}]},get selected(){return n.defaultExportDirectoryMode},onChange:p=>r("defaultExportDirectoryMode",p)})}}),G(Rt,{get when(){return n.defaultExportDirectoryMode==="Custom"},get children(){return G(Q,{get children(){return[G(ge,{get value(){return Y()??""},get title(){return Y()}}),G(ve,{icon:"folder",onClick:be})]}})}}),G(Q,{get name(){return l.settingTab.openExportedFileLocation},get children(){return G(Ce,{get checked(){return n.openExportedFileLocation},onChange:p=>r("openExportedFileLocation",p)})}}),G(Q,{get name(){return l.settingTab.openExportedFile},get children(){return G(Ce,{get checked(){return n.openExportedFile},onChange:p=>r("openExportedFile",p)})}}),G(Q,{get name(){return l.settingTab.ShowExportProgressBar},get children(){return G(Ce,{get checked(){return n.showExportProgressBar},onChange:p=>r("showExportProgressBar",p)})}}),G(Q,{get name(){return l.settingTab.editCommandTemplate},heading:!0}),G(Q,{get name(){return l.settingTab.chooseCommandTemplate},get children(){return[G(rt,{get options(){return n.items.map(p=>({name:p.name,value:p.name}))},get selected(){return n.lastEditName},onChange:p=>r("lastEditName",p)}),G(ve,{icon:"plus",get tooltip(){return l.settingTab.add},onClick:()=>b(()=>j)}),G(ve,{icon:"pencil",get tooltip(){return l.settingTab.rename},onClick:()=>b(()=>k)}),G(ve,{icon:"trash",get tooltip(){return l.settingTab.remove},onClick:()=>Xt(()=>{var p;r("items",f=>f.filter(R=>{var N;return R.name!==((N=h())==null?void 0:N.name)})),r("lastEditName",(p=n.items.first())==null?void 0:p.name)})})]}}),G(Wc,{get children(){return[G(Fl,{get when(){return h("pandoc")},get children(){return G(z,{})}}),G(Fl,{get when(){return h("custom")},get children(){return G($,{})}})]}}),G(Q,{get name(){return l.settingTab.advanced},heading:!0}),G(Q,{get name(){return l.settingTab.environmentVariables},get description(){return l.settingTab.environmentVariablesDesc},get children(){return G(gr,{style:"width: 100%;height: 5em",get value(){return a()},onChange:C})}}),G(Rt,{get when(){return O()},get children(){return G(Ec,{get component(){return O()},ref:p=>document.body.appendChild(p)})}})]};var ut;class Vr extends We.PluginSettingTab{constructor(l){super(l.app,l);xl(this,ut,void 0);this.plugin=l,this.name=this.plugin.lang.settingTab.title}get lang(){return this.plugin.lang}display(){yl(this,ut,Te(l=>{const n=this;return se(this.containerEl,G(Rr,{get plugin(){return n.plugin},get lang(){return n.lang}})),_e(()=>{this.containerEl.empty()}),l}))}hide(){Yl(this,ut).call(this)}}ut=new WeakMap;const Ar=Uint8Array.from(atob("LS0gY3JlZGl0cyB0byB0YXJsZWIg4oCUIFN0YWNrRXhjaGFuZ2U6IGh0dHBzOi8vdGV4LnN0YWNrZXhjaGFuZ2UuY29tL3F1ZXN0aW9ucy8zOTIwNzAvcGFuZG9jLW1hcmtkb3duLWNyZWF0ZS1zZWxmLWNvbnRhaW5lZC1iaWItZmlsZS1mcm9tLWNpdGVkLXJlZmVyZW5jZXMKZnVuY3Rpb24gUGFuZG9jKGQpCiAgZC5tZXRhLnJlZmVyZW5jZXMgPSBwYW5kb2MudXRpbHMucmVmZXJlbmNlcyhkKQogIGQubWV0YS5iaWJsaW9ncmFwaHkgPSBuaWwKICByZXR1cm4gZAplbmQK"),e=>e.charCodeAt(0)),Yr=Object.freeze(Object.defineProperty({__proto__:null,default:Ar},Symbol.toStringTag,{value:"Module"})),xr=Uint8Array.from(atob("cGFja2FnZS5wYXRoPXBhY2thZ2UucGF0aC4uIjsiIC4uZGVidWcuZ2V0aW5mbygxKS5zb3VyY2U6bWF0Y2goIiguKlsvXFxdKSIpOnN1YigyKSAuLiAiPy5sdWEiCgpNb2RlPSdodWdvJwoKcmVxdWlyZSgnbWFya2Rvd24nKQ=="),e=>e.charCodeAt(0)),yr=Object.freeze(Object.defineProperty({__proto__:null,default:xr},Symbol.toStringTag,{value:"Module"})),Jr=Uint8Array.from(atob("cGFja2FnZS5wYXRoPWRlYnVnLmdldGluZm8oMSkuc291cmNlOmdzdWIoJ0AnLCcnKTpzdWIoMCk6bWF0Y2goJyguKlsvXFxdKScpOnN1YigwKSAuLiAnPy5sdWEnIC4uICc7JyAuLiBwYWNrYWdlLnBhdGgKCnJlcXVpcmUoInBvbHlmaWxsIikKbG9jYWwgdXJsID0gcmVxdWlyZSgndXJsJykKCmxvY2FsIHBhbmRvYz1wYW5kb2MKbG9jYWwgUEFORE9DX1NUQVRFPVBBTkRPQ19TVEFURQoKUEFORE9DX1ZFUlNJT046bXVzdF9iZV9hdF9sZWFzdCAnMy4xLjcnCgpvcy50ZX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WYgaXRlbS50ID09ICdTdHInIGFuZCBzdHJpbmcuc3RhcnRzX3dpdGgoaXRlbS50ZXh0LCAnW1sjJykgdGhlbgogICAgICBpbl9zZWN0aW9uX2xpbmsgPSB0cnVlCiAgICAgIHRhYmxlLmluc2VydChsaW5rRGVzY3JpcHRpb24sIHN0cmluZy5zdWIoaXRlbS50ZXh0LCA0KSkKICAgIGVsc2VpZiBpbl9zZWN0aW9uX2xpbmsgdGhlbgogICAgICBpZiBzdHJpbmcuZW5kc193aXRoKGl0ZW0udGV4dCwgJ11dJykgdGhlbgogICAgICAgIHRhYmxlLmluc2VydChsaW5rRGVzY3JpcHRpb24sIHN0cmluZy5zdWIoaXRlbS50ZXh0LCAxLCAtMykpCiAgICAgICAgaW5zZXJ0TGluayhjb250ZW50LCBsaW5rRGVzY3JpcHRpb24pCiAgICAgICAgaW5fc2VjdGlvbl9saW5rID0gZmFsc2UKICAgICAgICBsaW5rRGVzY3JpcHRpb24gPSB7fQogICAgICBlbHNlCiAgICAgICAgdGFibGUuaW5zZXJ0KGxpbmtEZXNjcmlwdGlvbiwgaXRlbS50ZXh0KQogICAgICBlbmQKICAgIGVsc2UKICAgICAgdGFibGUuaW5zZXJ0KGNvbnRlbnQsIGl0ZW0pCiAgICBlbmQKICBlbmQKICByZXR1cm4gY29udGVudAplbmQKCmZ1bmN0aW9uIFBsYWluKGVsKQogIGVsLmNvbnRlbnQgPSBQcm9jZXNzSW50ZXJuYWxMaW5rcyhlbC5jb250ZW50KQogIHJldHVybiBlbAplbmQKCmZ1bmN0aW9uIFBhbmRvYyhlbCkKICByZXR1cm4gZWwKZW5kCg=="),e=>e.charCodeAt(0)),Br=Object.freeze(Object.defineProperty({__proto__:null,default:Jr},Symbol.toStringTag,{value:"Module"})),Fr=Uint8Array.from(atob("dHJhdmVyc2UgPSAndG9wZG93bicKCm1hdGhfYmxvY2tfdGV4dCA9IG5pbApmdW5jdGlvbiBwcm9jZXNzKGVsKQoKICAgLS0gTWF0aEJsb2N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cm9jZXNzKGVsKQplbmQKCmZ1bmN0aW9uIFN0cihlbCkKICByZXR1cm4gcHJvY2VzcyhlbCkKZW5kCgpmdW5jdGlvbiBTb2Z0QnJlYWsoZWwpCiAgcmV0dXJuIHByb2Nlc3MoZWwpCmVuZAoKZnVuY3Rpb24gSGVhZGVyKGVsKQogIHJldHVybiBwcm9jZXNzKGVsKQplbmQKCmZ1bmN0aW9uIFBhcmEoZWwpCiAgcmV0dXJuIHByb2Nlc3MoZWwpCmVuZAoKZnVuY3Rpb24gUGxhaW4oZWwpCiAgcmV0dXJuIHByb2Nlc3MoZWwpCmVuZAoKZnVuY3Rpb24gQnVsbGV0TGlzdChlbCkKICByZXR1cm4gcHJvY2VzcyhlbCkKZW5kCgoKCgoKCg=="),e=>e.charCodeAt(0)),Hr=Object.freeze(Object.defineProperty({__proto__:null,default:Fr},Symbol.toStringTag,{value:"Module"})),Nr=Uint8Array.from(atob("CnJldHVybiB7CiAgICB7CiAgICAgICAgTWF0aCA9IGZ1bmN0aW9uIChlbGVtKQogICAgICAgICAgICBpZiBlbGVtLnRleHQ6ZmluZCgiXiVzKlxcYmVnaW57Iikgfj0gbmlsIHRoZW4KICAgICAgICAgICAgICAgIHJldHVybiBwYW5kb2MuUmF3SW5saW5lKCd0ZXgnLCBlbGVtLnRleHQpCiAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgIHJldHVybiBlbGVtCiAgICAgICAgICAgIGVuZAogICAgICAgIGVuZCwKICAgIH0KfQo="),e=>e.charCodeAt(0)),vr=Object.freeze(Object.defineProperty({__proto__:null,default:Nr},Symbol.toStringTag,{value:"Module"})),Sr=Uint8Array.from(atob("b3MucGxhdGZvcm0gPSBuaWwKaWYgb3MucGxhdGZvcm0gPT0gbmlsIHRoZW4KICBsb2NhbCBsaWJFeHQgPSBwYWNrYWdlLmNwYXRoOm1hdGNoKCIlcFtcXHwvXT9cXC4lcCglYSspIikKICBpZiBsaWJFeHQgPT0gJ2RsbCcgdGhlbgogICA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QogICAgbG9jYWwgXywgXywgY29kZSA9IG9zLmV4ZWN1dGUoJ2lmIGV4aXN0ICInIC4uIHBhdGggLi4gJyIgKGV4aXQgMCkgZWxzZSAoZXhpdCAxKScpCiAgICByZXR1cm4gY29kZSA9PSAwCiAgZWxzZQogICAgbG9jYWwgXywgXywgY29kZSA9IG9zLmV4ZWN1dGUoJ3Rlc3QgLWUgIicgLi4gcGF0aCAuLiAnIicpCiAgICByZXR1cm4gY29kZSA9PSAwCiAgZW5kCmVuZAoKc3RyaW5nLnN0YXJ0c193aXRoID0gZnVuY3Rpb24oc3RyLCBzdGFydCkKICAgcmV0dXJuIHN0cjpzdWIoMSwgI3N0YXJ0KSA9PSBzdGFydAplbmQKCnN0cmluZy5lbmRzX3dpdGggPSBmdW5jdGlvbihzdHIsIGVuZGluZykKICAgcmV0dXJuIGVuZGluZyA9PSAiIiBvciBzdHI6c3ViKC0jZW5kaW5nKSA9PSBlbmRpbmcKZW5kCgoKcmV0dXJuIHsKICBvcyA9IG9zLAogIHN0cmluZyA9IHN0cmluZwp9"),e=>e.charCodeAt(0)),kr=Object.freeze(Object.defineProperty({__proto__:null,default:Sr},Symbol.toStringTag,{value:"Module"})),wr=Uint8Array.from(atob("bG9jYWwgZnVuY3Rpb24gZW5jb2RlIChzdHIpCiAgc3RyID0gc3RyaW5nLmdzdWIgKHN0ciwgIihbXjAtOWEtekEtWiAhJygpKi5ffi1dKSIsIC0tIGxvY2FsZSBpbmRlcGVuZGVudAogICAgZnVuY3Rpb24gKGMpIHJldHVybiBzdHJpbmcuZm9ybWF0ICgiJSUlMDJYIiwgc3RyaW5nLmJ5dGUoYykpIGVuZCkKICBzdHIgPSBzdHJpbmcuZ3N1YiAoc3RyLCAiICIsICIlJTIwIikKICByZXR1cm4gc3RyCiBlbmQKCgpsb2NhbCBmdW5jdGlvbiBkZWNvZGUgKHN0cikKICBzdHIgPSBzdHJpbmcuZ3N1YiAoc3RyLCAiJSUyMCIsICIgIikKICBzdHIgPSBzdHJpbmcuZ3N1YiAoc3RyLCAiJSUoJXgleCkiLCBmdW5jdGlvbihoKSByZXR1cm4gc3RyaW5nLmNoYXIodG9udW1iZXIoaCwxNikpIGVuZCkKICByZXR1cm4gc3RyCmVuZAoKcmV0dXJuIHsKICBlbmNvZGUgPSBlbmNvZGUsCiAgZGVjb2RlID0gZGVjb2RlCn0="),e=>e.charCodeAt(0)),Er=Object.freeze(Object.defineProperty({__proto__:null,default:wr},Symbol.toStringTag,{value:"Module"})),Kr=Uint8Array.from(atob("JSUKJSBDb3B5cmlnaHQgKGMpIDIwMTcgLSAyMDIxLCBQYXNjYWwgV2FnbGVyOwolIENvcHlyaWdodCAoYykgMjAxNCAtIDIwMjEsIEpvaG4gTWFjRmFybGFuZQolCiUgQWxsIHJpZ2h0cyByZXNlcnZlZC4KJQolIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dAolIG1vZGlmaWNhdGlvbiwgYXJlIHBlcm1pdHRlZCBwcm92aWRlZCB0aGF0IHRoZSBmb2xsb3dpbmcgY29uZGl0aW9ucwolIGFyZSBtZXQ6CiUKJSAtIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0CiUgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZyBkaXNjbGFpbWVyLgolCiUgLSBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgdGhlIGFib3ZlIGNvcHlyaWdodAolIG5vdGljZSwgdGhpcyBsaXN0IG9mIGNvbmRpdGlvbnMgYW5kIHRoZSBmb2xsb3dpbmcgZGlzY2xhaW1lciBpbiB0aGUKJSBkb2N1bWVudGF0aW9uIGFuZC9vciBvdGhlciBtYXRlcmlhbHMgcHJvdm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zLWNoYXB0ZXJzKSQKXHJlbmV3Y29tbWFuZFxiaWJuYW1leyRiaWJsaW8tdGl0bGUkfQokZWxzZSQKXHJlbmV3Y29tbWFuZFxyZWZuYW1leyRiaWJsaW8tdGl0bGUkfQokZW5kaWYkCiRlbmRpZiQKJGlmKGJlYW1lcikkClxiZWdpbntmcmFtZX1bYWxsb3dmcmFtZWJyZWFrc117JGJpYmxpby10aXRsZSR9CiAgXGJpYmxpb2dyYXBoeXRydWUKJGVuZGlmJAogIFxiaWJsaW9ncmFwaHl7JGZvcihiaWJsaW9ncmFwaHkpJCRiaWJsaW9ncmFwaHkkJHNlcCQsJGVuZGZvciR9CiRpZihiZWFtZXIpJApcZW5ke2ZyYW1lfQokZW5kaWYkCgokZW5kaWYkCiRlbmRpZiQKJGlmKGJpYmxhdGV4KSQKJGlmKGJlYW1lcikkClxiZWdpbntmcmFtZX1bYWxsb3dmcmFtZWJyZWFrc117JGJpYmxpby10aXRsZSR9CiAgXGJpYmxpb2dyYXBoeXRydWUKICBccHJpbnRiaWJsaW9ncmFwaHlbaGVhZGluZz1ub25lXQpcZW5ke2ZyYW1lfQokZWxzZSQKXHByaW50YmlibGlvZ3JhcGh5JGlmKGJpYmxpby10aXRsZSkkW3RpdGxlPSRiaWJsaW8tdGl0bGUkXSRlbmRpZiQKJGVuZGlmJAoKJGVuZGlmJAokZm9yKGluY2x1ZGUtYWZ0ZXIpJAokaW5jbHVkZS1hZnRlciQKCiRlbmRmb3IkClxlbmR7ZG9jdW1lbnR9"),e=>e.charCodeAt(0)),Qr=Object.freeze(Object.defineProperty({__proto__:null,default:Kr},Symbol.toStringTag,{value:"Module"})),zr=Uint8Array.from(atob("JSBwYXJ0aWFsIHJld3JpdGUgb2YgdGhlIExhVGVYMmUgcGFja2FnZSBmb3Igc3VibWlzc2lvbnMgdG8gdGhlCiUgQ29uZmVyZW5jZSBvbiBOZXVyYWwgSW5mb3JtYXRpb24gUHJvY2Vzc2luZyBTeXN0ZW1zIChOZXVyS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FxwYXRjaEJvdGhBbXNNYXRoRW52aXJvbm1lbnRzRm9yTGluZW5ve2FsaWdufSUKICAgICAgICBccGF0Y2hCb3RoQW1zTWF0aEVudmlyb25tZW50c0ZvckxpbmVub3tmbGFsaWdufSUKICAgICAgICBccGF0Y2hCb3RoQW1zTWF0aEVudmlyb25tZW50c0ZvckxpbmVub3thbGlnbmF0fSUKICAgICAgICBccGF0Y2hCb3RoQW1zTWF0aEVudmlyb25tZW50c0ZvckxpbmVub3tnYXRoZXJ9JQogICAgICAgIFxwYXRjaEJvdGhBbXNNYXRoRW52aXJvbm1lbnRzRm9yTGluZW5ve211bHRsaW5lfSUKICAgICAgfQogICAgICB7fQogICAgfQogIFxmaQpcZmkKCgpcZW5kaW5wdXQK"),e=>e.charCodeAt(0)),Ur=Object.freeze(Object.defineProperty({__proto__:null,default:zr},Symbol.toStringTag,{value:"Module"})),jr=Uint8Array.from(atob("XGRvY3VtZW50Y2xhc3N7YXJ0aWNsZX0KCgolIGlmIHlvdSBuZWVkIHRvIHBhc3Mgb3B0aW9ucyB0byBuYXRiaWIsIHVzZSwgZS5nLjoKJSAgICAgXFBhc3NPcHRpb25zVG9QYWNrYWdle251bWJlcnMsIGNvbXByZXNzfXtuYXRiaWJ9CiUgYmVmb3JlIGxvYWRpbmcgbmV1cmlwc18yMDIzCgoKJSByZWFkeSBmb3Igc3VibWlzc2lvbgpcdXNlcGFja2FnZVtmaW5hbF17bmV1cmlwc30KCgolIHRvIGNvbXBpbGUgYSBwcmVwcmludCB2ZXJzaW9uLCBlLmcuLCBmb3Igc3VibWlzc2lvbiB0byBhclhpdiwgYWRkIGFkZCB0aGUKJSBbcHJlcHJpbnRdIG9wdGlvbjoKJSAgICAgXHVzZXBhY2thZ2VbcHJlcHJpbnRde25ldXJpcHNfMjAyM30KCgolIHRvIGNvbXBpbGUgYSBjYW1lcmEtcmVhZHkgdmVyc2lvbiwgYWRkIHRoZSBbZmluYWxdIG9wdGlvbiwgZS5nLjoKJSAgICAg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yIFRpdGxlIiAKICBhYnN0cmFjdDogInlvdXIgYWJzdHJhY3QgaGVyZSIKICBhdXRob3JzOgogIC0gbmFtZTogTGVvbmFyZG8gVi4gQ2FzdG9yaW5hCiAgICBhZmZpbGlhdGlvbjogU2Nob29sIG9mIEluZm9ybWF0aWNzCiAgICBpbnN0aXR1dGlvbjogVW5pdmVyc2l0eSBvZiBFZGluYnVyZ2gKICAgIGVtYWlsOiBqdXN0YW5lbWFpbEBkb21haW4uZXh0CiAgICBhZGRyZXNzOiBFZGluYnVyZ2gKICAtIG5hbWU6IENvYXV0aG9yCiAgICBhZmZpbGlhdGlvbjogQWZmaWxpYXRpb24KICAgIGluc3RpdHV0aW9uOiBJbnN0aXR1dGlvbgogICAgZW1haWw6IGNvYXV0aG9yQGV4YW1wbGUuY29tCiAgICBhZGRyZXNzOiBBZGRyZXNzCiAgLS0tCiAgXGVuZHt2ZXJiYXRpbX0KICBUaGlzIGlzIGNhbGxlZCBZQU1MIGZyb250bWF0dGVyLiBJZiB5b3Ugc2V0IHlvdXIgYWJzdHJhY3QgY29ycmVjdGx5IHlvdSBzaG91bGQgbm90IHNlZSB0aGlzIG1lc3NhZ2UuCiAgJGVuZGlmJApcZW5ke2Fic3RyYWN0fQoKCiRib2R5JAoKJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlCgoKXGVuZHtkb2N1bWVudH0="),e=>e.charCodeAt(0)),Lr=Object.freeze(Object.defineProperty({__proto__:null,default:jr},Symbol.toStringTag,{value:"Module"})),bn=(e,t)=>[e,Object.entries(t).map(([l,n])=>[l.substring(e.length+3),n.default])],Zn=[bn("lua",Object.assign({"../lua/citefilter.lua":Yr,"../lua/markdown+hugo.lua":yr,"../lua/markdown.lua":Br,"../lua/math_block.lua":Hr,"../lua/pdf.lua":vr,"../lua/polyfill.lua":kr,"../lua/url.lua":Er})),bn("textemplate",Object.assign({"../textemplate/dissertation.tex":Qr,"../textemplate/neurips.sty":Ur,"../textemplate/neurips.tex":Lr}))];class Tr extends We.Plugin{constructor(t,l){super(t,l),this.lang=Nn.current,this.saveSettings=We.debounce(this.saveSettings.bind(this),1e3,!0)}async onload(){await this.releaseResources(),await this.loadSettings();const{lang:t}=this;this.addSettingTab(new Vr(this)),this.addCommand({id:"obsidian-enhancing-export:export",name:t.exportToOo,icon:"document",callback:()=>{const l=this.app.workspace.getActiveFile();l?nl.show(this,l):new We.Notice(t.pleaseOpenFile,2e3)}}),this.addCommand({id:"obsidian-enhancing-export:export-with-previous",name:t.exportWithPrevious,icon:"document",callback:async()=>{const l=this.app.workspace.getActiveFile();if(l){if(this.settings.lastExportType&&this.settings.lastExportDirectory){const n=this.settings.items.find(c=>c.name===this.settings.lastExportType);if(n){await Un(this,l,ue(this.settings.lastExportDirectory),void 0,n);return}}nl.show(this,l)}else new We.Notice(t.pleaseOpenFile,2e3)}}),this.registerEvent(this.app.workspace.on("file-menu",(l,n)=>{n instanceof We.TFile&&l.addItem(c=>{c.setTitle(t.exportToOo).setIcon("document").onClick(()=>{nl.show(this,n)})}).addSeparator()}))}async resetSettings(){this.settings={...JSON.parse(JSON.stringify(tt)),lastExportDirectory:this.settings.lastExportDirectory},await this.saveSettings()}async loadSettings(){const t=Object.assign({},tt,await this.loadData());t.items.forEach(l=>{Object.assign(l,Object.assign({},tt.items.find(n=>n.name===l.name)??{},l))});for(const l of tt.items)t.items.every(n=>n.name!==l.name)&&t.items.push(l);this.settings=t}async saveSettings(){console.log("[obsidian-enhancing-export] saveSettings",this.settings);const t=JSON.parse(JSON.stringify(this.settings));if(t.items.forEach(l=>{const n=tt.items.find(c=>c.name===l.name);n&&Object.keys(l).forEach(c=>{c!=="name"&&JSON.stringify(l[c])===JSON.stringify(n[c])&&delete l[c]})}),t.env)for(const l of Object.keys(t.env)){const n=t.env[l];if(JSON.stringify(n)===JSON.stringify(ot[l])){delete t.env[l];continue}const c=ue(ot,l);for(const[i,s]of Object.entries(n))s===c[i]&&delete n[i];Object.keys(n).length===0&&delete t.env[l]}await this.saveData(t)}async releaseResources(){const{adapter:t}=this.app.vault;for(const[l,n]of Zn){const c=de.join(this.manifest.dir,l);await t.mkdir(c);for(const[i,s]of n){const a=de.join(c,i);await t.writeBinary(a,s)}}Zn.length=0}}exports.default=Tr;