digital-garden/.obsidian/plugins/obsidian-enhancing-export/main.js
2024-06-13 21:01:37 +03:00

31 lines
170 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 dl=(e,l,t)=>{if(!l.has(e))throw TypeError("Cannot "+t)};var gl=(e,l,t)=>(dl(e,l,"read from private field"),t?t.call(e):l.get(e)),bl=(e,l,t)=>{if(l.has(e))throw TypeError("Cannot add the same private member more than once");l instanceof WeakSet?l.add(e):l.set(e,t)},Zl=(e,l,t,n)=>(dl(e,l,"write to private field"),n?n.call(e,t):l.set(e,t),t);/*!
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 Ge=require("obsidian"),kn=require("child_process"),pt=require("process"),Ol=require("electron"),Pl=require("fs"),oe=require("path"),Sn=require("util");function Pt(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(l,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return l.default=e,Object.freeze(l)}const wn=Pt(Ge),ye=Pt(Ol),Jt=Pt(Pl),dt={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 Ae(e,l,t){return typeof l=="string"&&l.trim()===""&&(l=void 0),t instanceof Array?t.reduce((n,c)=>Ae(n,l,c),e):(t??(t=pt.platform),{...e??{},[t]:l})}function de(e,l){e??(e={});const t=e[l??pt.platform],n=e["*"];return n&&typeof n=="object"?Object.assign({},n,t):t??n}function T(e,...l){return function(...t){const n=t[t.length-1]||{},c=[e[0]];return l.forEach(function(i,s){const a=Number.isInteger(i)?t[i]:n[i];c.push(a,e[s+1])}),c.join("")}}function Qt(e,l){return l=l??{},new Promise((t,n)=>{kn.exec(e,l,(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),t(i)})})}function En(e){return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.substring(1,e.length-1):e}function zt(e,l={}){for(;;)try{const t=Object.keys(l).filter(Kn),n=t.map(c=>l[c]);return new Function(...t,`{ return \`${e.replaceAll("\\","\\\\")}\` }`).bind(l)(...n)}catch(t){if(t instanceof ReferenceError&&t.message.endsWith("is not defined")){const n=t.message.substring(0,t.message.indexOf(" ")),c=Object.keys(l).filter(i=>i.toLowerCase()===n.toLowerCase()).map(i=>l[i])[0]??`\${${n}}`;l[n]=c}else throw t}}const Kn=e=>{if(typeof e!="string"||e.trim()!==e)return!1;try{new Function(e,"var "+e)}catch{return!1}return!0},Qn={textemplate:{title:"Latex Template",type:"dropdown",options:[{name:"None",value:null},{name:"Dissertation",value:"dissertation.tex"},{name:"Academic Paper",value:"neurips.tex"}]}},De=(()=>{let e={};return e=Ae(e,{HOME:"${HOME}",PATH:"${PATH}",TEXINPUTS:"${pluginDir}/textemplate/:"},"*"),e=Ae(e,{TEXINPUTS:"${pluginDir}/textemplate/;",PATH:"${HOME}\\AppData\\Local\\Pandoc;${PATH}"},"win32"),e=Ae(e,{PATH:"/opt/homebrew/bin:/usr/local/bin:/Library/TeX/texbin:${PATH}"},"darwin"),e})(),je={items:Object.values(dt).filter(e=>e.type!=="custom"),pandocPath:void 0,defaultExportDirectoryMode:"Auto",openExportedFile:!0,env:De,showExportProgressBar:!0};function Dl(e){var l;return e.type==="pandoc"?e.extension:e.type==="custom"?(l=e.targetFileExtensions)==null?void 0:l.split(",")[0]:""}function _l(e,l){return e=Object.assign({},de(De),e),l=Object.assign({HOME:process.env.HOME??process.env.USERPROFILE},process.env,l??{}),Object.fromEntries(Object.entries(e).map(([t,n])=>[t,zt(n,l)]))}function zn(e){return e?Object.fromEntries(Object.entries(e).map(([l,t])=>[l,typeof t=="string"?Qn[t.startsWith("preset:")?t.substring(7):""]:t])):{}}const Un=(e,l)=>e===l,pe=Symbol("solid-proxy"),Ut=Symbol("solid-track"),ut={equals:Un};let ql=an;const Fe=1,mt=2,en={owned:null,cleanups:null,context:null,owner:null};var $=null;let Bt=null,jn=null,P=null,te=null,xe=null,Xt=0;function Oe(e,l){const t=P,n=$,c=e.length===0,i=l===void 0?n:l,s=c?en:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=c?e:()=>e(()=>O(()=>ft(s)));$=s,P=null;try{return ze(a,!0)}finally{P=t,$=n}}function ae(e,l){l=l?Object.assign({},ut,l):ut;const t={value:e,observers:null,observerSlots:null,comparator:l.equals||void 0},n=c=>(typeof c=="function"&&(c=c(t.value)),cn(t,c));return[nn.bind(t),n]}function ee(e,l,t){const n=Dt(e,l,!1,Fe);tt(n)}function Ye(e,l,t){ql=On;const n=Dt(e,l,!1,Fe);(!t||!t.render)&&(n.user=!0),xe?xe.push(n):tt(n)}function q(e,l,t){t=t?Object.assign({},ut,t):ut;const n=Dt(e,l,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=t.equals||void 0,tt(n),nn.bind(n)}function gt(e){return ze(e,!1)}function O(e){if(P===null)return e();const l=P;P=null;try{return e()}finally{P=l}}function tn(e){Ye(()=>O(e))}function et(e){return $===null||($.cleanups===null?$.cleanups=[e]:$.cleanups.push(e)),e}function jt(){return P}function Ln(e,l){const t=Symbol("context");return{id:t,Provider:Dn(t),defaultValue:e}}function Tn(e){return $&&$.context&&$.context[e.id]!==void 0?$.context[e.id]:e.defaultValue}function ln(e){const l=q(e),t=q(()=>Lt(l()));return t.toArray=()=>{const n=t();return Array.isArray(n)?n:n!=null?[n]:[]},t}function nn(){if(this.sources&&this.state)if(this.state===Fe)tt(this);else{const e=te;te=null,ze(()=>It(this),!1),te=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 cn(e,l,t){let n=e.value;return(!e.comparator||!e.comparator(n,l))&&(e.value=l,e.observers&&e.observers.length&&ze(()=>{for(let c=0;c<e.observers.length;c+=1){const i=e.observers[c],s=Bt&&Bt.running;s&&Bt.disposed.has(i),(s?!i.tState:!i.state)&&(i.pure?te.push(i):xe.push(i),i.observers&&sn(i)),s||(i.state=Fe)}if(te.length>1e6)throw te=[],new Error},!1)),l}function tt(e){if(!e.fn)return;ft(e);const l=Xt;$n(e,e.value,l)}function $n(e,l,t){let n;const c=$,i=P;P=$=e;try{n=e.fn(l)}catch(s){return e.pure&&(e.state=Fe,e.owned&&e.owned.forEach(ft),e.owned=null),e.updatedAt=t+1,on(s)}finally{P=i,$=c}(!e.updatedAt||e.updatedAt<=t)&&(e.updatedAt!=null&&"observers"in e?cn(e,n):e.value=n,e.updatedAt=t)}function Dt(e,l,t,n=Fe,c){const i={fn:e,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:l,owner:$,context:$?$.context:null,pure:t};return $===null||$!==en&&($.owned?$.owned.push(i):$.owned=[i]),i}function Gt(e){if(e.state===0)return;if(e.state===mt)return It(e);if(e.suspense&&O(e.suspense.inFallback))return e.suspense.effects.push(e);const l=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Xt);)e.state&&l.push(e);for(let t=l.length-1;t>=0;t--)if(e=l[t],e.state===Fe)tt(e);else if(e.state===mt){const n=te;te=null,ze(()=>It(e,l[0]),!1),te=n}}function ze(e,l){if(te)return e();let t=!1;l||(te=[]),xe?t=!0:xe=[],Xt++;try{const n=e();return Mn(t),n}catch(n){t||(xe=null),te=null,on(n)}}function Mn(e){if(te&&(an(te),te=null),e)return;const l=xe;xe=null,l.length&&ze(()=>ql(l),!1)}function an(e){for(let l=0;l<e.length;l++)Gt(e[l])}function On(e){let l,t=0;for(l=0;l<e.length;l++){const n=e[l];n.user?e[t++]=n:Gt(n)}for(l=0;l<t;l++)Gt(e[l])}function It(e,l){e.state=0;for(let t=0;t<e.sources.length;t+=1){const n=e.sources[t];if(n.sources){const c=n.state;c===Fe?n!==l&&(!n.updatedAt||n.updatedAt<Xt)&&Gt(n):c===mt&&It(n,l)}}}function sn(e){for(let l=0;l<e.observers.length;l+=1){const t=e.observers[l];t.state||(t.state=mt,t.pure?te.push(t):xe.push(t),t.observers&&sn(t))}}function ft(e){let l;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),c=t.observers;if(c&&c.length){const i=c.pop(),s=t.observerSlots.pop();n<c.length&&(i.sourceSlots[s]=n,c[n]=i,t.observerSlots[n]=s)}}if(e.owned){for(l=e.owned.length-1;l>=0;l--)ft(e.owned[l]);e.owned=null}if(e.cleanups){for(l=e.cleanups.length-1;l>=0;l--)e.cleanups[l]();e.cleanups=null}e.state=0}function Pn(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function on(e,l=$){throw Pn(e)}function Lt(e){if(typeof e=="function"&&!e.length)return Lt(e());if(Array.isArray(e)){const l=[];for(let t=0;t<e.length;t++){const n=Lt(e[t]);Array.isArray(n)?l.push.apply(l,n):l.push(n)}return l}return e}function Dn(e,l){return function(n){let c;return ee(()=>c=O(()=>($.context={...$.context,[e]:n.value},ln(()=>n.children))),void 0),c}}const _n=Symbol("fallback");function ul(e){for(let l=0;l<e.length;l++)e[l]()}function qn(e,l,t={}){let n=[],c=[],i=[],s=0,a=l.length>1?[]:null;return et(()=>ul(i)),()=>{let o=e()||[],g,b;return o[Ut],O(()=>{let J=o.length,W,x,L,u,j,w,E,M,K;if(J===0)s!==0&&(ul(i),i=[],n=[],c=[],s=0,a&&(a=[])),t.fallback&&(n=[_n],c[0]=Oe(ie=>(i[0]=ie,t.fallback())),s=1);else if(s===0){for(c=new Array(J),b=0;b<J;b++)n[b]=o[b],c[b]=Oe(G);s=J}else{for(L=new Array(J),u=new Array(J),a&&(j=new Array(J)),w=0,E=Math.min(s,J);w<E&&n[w]===o[w];w++);for(E=s-1,M=J-1;E>=w&&M>=w&&n[E]===o[M];E--,M--)L[M]=c[E],u[M]=i[E],a&&(j[M]=a[E]);for(W=new Map,x=new Array(M+1),b=M;b>=w;b--)K=o[b],g=W.get(K),x[b]=g===void 0?-1:g,W.set(K,b);for(g=w;g<=E;g++)K=n[g],b=W.get(K),b!==void 0&&b!==-1?(L[b]=c[g],u[b]=i[g],a&&(j[b]=a[g]),b=x[b],W.set(K,b)):i[g]();for(b=w;b<J;b++)b in L?(c[b]=L[b],i[b]=u[b],a&&(a[b]=j[b],a[b](b))):c[b]=Oe(G);c=c.slice(0,s=J),n=o.slice(0)}return c});function G(J){if(i[b]=J,a){const[W,x]=ae(b);return a[b]=x,l(o[b],W)}return l(o[b])}}}function I(e,l){return O(()=>e(l||{}))}function ct(){return!0}const ml={get(e,l,t){return l===pe?t:e.get(l)},has(e,l){return l===pe?!0:e.has(l)},set:ct,deleteProperty:ct,getOwnPropertyDescriptor(e,l){return{configurable:!0,enumerable:!0,get(){return e.get(l)},set:ct,deleteProperty:ct}},ownKeys(e){return e.keys()}};function ec(e,...l){if(pe in e){const c=new Set(l.length>1?l.flat():l[0]),i=l.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)}},ml));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))}},ml)),i}const t={},n=l.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,o=0;for(const g of l)g.includes(c)&&(a=!0,s?n[o][c]=i.value:Object.defineProperty(n[o],c,i)),++o;a||(s?t[c]=i.value:Object.defineProperty(t,c,i))}return[...n,t]}const rn=e=>`Stale read from <${e}>.`;function dn(e){const l="fallback"in e&&{fallback:()=>e.fallback};return q(qn(()=>e.each,e.children,l||void 0))}function bt(e){const l=e.keyed,t=q(()=>e.when,void 0,{equals:(n,c)=>l?n===c:!n==!c});return q(()=>{const n=t();if(n){const c=e.children;return typeof c=="function"&&c.length>0?O(()=>c(l?n:()=>{if(!O(t))throw rn("Show");return e.when})):c}return e.fallback},void 0,void 0)}function tc(e){let l=!1;const t=(i,s)=>(l?i[1]===s[1]:!i[1]==!s[1])&&i[2]===s[2],n=ln(()=>e.children),c=q(()=>{let i=n();Array.isArray(i)||(i=[i]);for(let s=0;s<i.length;s++){const a=i[s].when;if(a)return l=!!i[s].keyed,[s,a,i[s]]}return[-1]},void 0,{equals:t});return q(()=>{const[i,s,a]=c();if(i<0)return e.fallback;const o=a.children;return typeof o=="function"&&o.length>0?O(()=>o(l?s:()=>{if(O(c)[0]!==i)throw rn("Match");return a.when})):o},void 0,void 0)}function Gl(e){return e}const lc=["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"],nc=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...lc]),cc=new Set(["innerHTML","textContent","innerText","children"]),ic=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),ac=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 sc(e,l){const t=ac[e];return typeof t=="object"?t[l]?t.$:void 0:t}const oc=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),rc=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"]),dc={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function gc(e,l,t){let n=t.length,c=l.length,i=n,s=0,a=0,o=l[c-1].nextSibling,g=null;for(;s<c||a<i;){if(l[s]===t[a]){s++,a++;continue}for(;l[c-1]===t[i-1];)c--,i--;if(c===s){const b=i<n?a?t[a-1].nextSibling:t[i-a]:o;for(;a<i;)e.insertBefore(t[a++],b)}else if(i===a)for(;s<c;)(!g||!g.has(l[s]))&&l[s].remove(),s++;else if(l[s]===t[i-1]&&t[a]===l[c-1]){const b=l[--c].nextSibling;e.insertBefore(t[a++],l[s++].nextSibling),e.insertBefore(t[--i],b),l[c]=t[i]}else{if(!g){g=new Map;let G=a;for(;G<i;)g.set(t[G],G++)}const b=g.get(l[s]);if(b!=null)if(a<b&&b<i){let G=s,J=1,W;for(;++G<c&&G<i&&!((W=g.get(l[G]))==null||W!==b+J);)J++;if(J>b-a){const x=l[s];for(;a<b;)e.insertBefore(t[a++],x)}else e.replaceChild(t[a++],l[s++])}else s++;else l[s++].remove()}}}const Il="_$DX_DELEGATE";function Ie(e,l,t){let n;const c=()=>{const s=document.createElement("template");return s.innerHTML=e,t?s.content.firstChild.firstChild:s.content.firstChild},i=l?()=>O(()=>document.importNode(n||(n=c()),!0)):()=>(n||(n=c())).cloneNode(!0);return i.cloneNode=i,i}function _t(e,l=window.document){const t=l[Il]||(l[Il]=new Set);for(let n=0,c=e.length;n<c;n++){const i=e[n];t.has(i)||(t.add(i),l.addEventListener(i,Ic))}}function Je(e,l,t){t==null?e.removeAttribute(l):e.setAttribute(l,t)}function bc(e,l,t,n){n==null?e.removeAttributeNS(l,t):e.setAttributeNS(l,t,n)}function gn(e,l){l==null?e.removeAttribute("class"):e.className=l}function qt(e,l,t,n){if(n)Array.isArray(t)?(e[`$$${l}`]=t[0],e[`$$${l}Data`]=t[1]):e[`$$${l}`]=t;else if(Array.isArray(t)){const c=t[0];e.addEventListener(l,t[0]=i=>c.call(e,t[1],i))}else e.addEventListener(l,t)}function Zc(e,l,t={}){const n=Object.keys(l||{}),c=Object.keys(t);let i,s;for(i=0,s=c.length;i<s;i++){const a=c[i];!a||a==="undefined"||l[a]||(Cl(e,a,!1),delete t[a])}for(i=0,s=n.length;i<s;i++){const a=n[i],o=!!l[a];!a||a==="undefined"||t[a]===o||!o||(Cl(e,a,!0),t[a]=o)}return t}function el(e,l,t){if(!l)return t?Je(e,"style"):l;const n=e.style;if(typeof l=="string")return n.cssText=l;typeof t=="string"&&(n.cssText=t=void 0),t||(t={}),l||(l={});let c,i;for(i in t)l[i]==null&&n.removeProperty(i),delete t[i];for(i in l)c=l[i],c!==t[i]&&(n.setProperty(i,c),t[i]=c);return t}function uc(e,l={},t,n){const c={};return n||ee(()=>c.children=we(e,l.children,c.children)),ee(()=>typeof l.ref=="function"?tl(l.ref,e):l.ref=e),ee(()=>mc(e,l,t,!0,c,!0)),c}function tl(e,l,t){return O(()=>e(l,t))}function se(e,l,t,n){if(t!==void 0&&!n&&(n=[]),typeof l!="function")return we(e,l,n,t);ee(c=>we(e,l(),c,t),n)}function mc(e,l,t,n,c={},i=!1){l||(l={});for(const s in c)if(!(s in l)){if(s==="children")continue;c[s]=hl(e,s,null,c[s],t,i)}for(const s in l){if(s==="children"){n||we(e,l.children);continue}const a=l[s];c[s]=hl(e,s,a,c[s],t,i)}}function Gc(e){return e.toLowerCase().replace(/-([a-z])/g,(l,t)=>t.toUpperCase())}function Cl(e,l,t){const n=l.trim().split(/\s+/);for(let c=0,i=n.length;c<i;c++)e.classList.toggle(n[c],t)}function hl(e,l,t,n,c,i){let s,a,o,g,b;if(l==="style")return el(e,t,n);if(l==="classList")return Zc(e,t,n);if(t===n)return n;if(l==="ref")i||t(e);else if(l.slice(0,3)==="on:"){const G=l.slice(3);n&&e.removeEventListener(G,n),t&&e.addEventListener(G,t)}else if(l.slice(0,10)==="oncapture:"){const G=l.slice(10);n&&e.removeEventListener(G,n,!0),t&&e.addEventListener(G,t,!0)}else if(l.slice(0,2)==="on"){const G=l.slice(2).toLowerCase(),J=oc.has(G);if(!J&&n){const W=Array.isArray(n)?n[0]:n;e.removeEventListener(G,W)}(J||t)&&(qt(e,G,t,J),J&&_t([G]))}else if(l.slice(0,5)==="attr:")Je(e,l.slice(5),t);else if((b=l.slice(0,5)==="prop:")||(o=cc.has(l))||!c&&((g=sc(l,e.tagName))||(a=nc.has(l)))||(s=e.nodeName.includes("-")))b&&(l=l.slice(5),a=!0),l==="class"||l==="className"?gn(e,t):s&&!a&&!o?e[Gc(l)]=t:e[g||l]=t;else{const G=c&&l.indexOf(":")>-1&&dc[l.split(":")[0]];G?bc(e,G,l,t):Je(e,ic[l]||l,t)}return t}function Ic(e){const l=`$$${e.type}`;let t=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==t&&Object.defineProperty(e,"target",{configurable:!0,value:t}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}});t;){const n=t[l];if(n&&!t.disabled){const c=t[`${l}Data`];if(c!==void 0?n.call(t,c,e):n.call(t,e),e.cancelBubble)return}t=t._$host||t.parentNode||t.host}}function we(e,l,t,n,c){for(;typeof t=="function";)t=t();if(l===t)return t;const i=typeof l,s=n!==void 0;if(e=s&&t[0]&&t[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(l=l.toString()),s){let a=t[0];a&&a.nodeType===3?a.data!==l&&(a.data=l):a=document.createTextNode(l),t=ve(e,t,n,a)}else t!==""&&typeof t=="string"?t=e.firstChild.data=l:t=e.textContent=l;else if(l==null||i==="boolean")t=ve(e,t,n);else{if(i==="function")return ee(()=>{let a=l();for(;typeof a=="function";)a=a();t=we(e,a,t,n)}),()=>t;if(Array.isArray(l)){const a=[],o=t&&Array.isArray(t);if(Tt(a,l,t,c))return ee(()=>t=we(e,a,t,n,!0)),()=>t;if(a.length===0){if(t=ve(e,t,n),s)return t}else o?t.length===0?Wl(e,a,n):gc(e,t,a):(t&&ve(e),Wl(e,a));t=a}else if(l.nodeType){if(Array.isArray(t)){if(s)return t=ve(e,t,n,l);ve(e,t,null,l)}else t==null||t===""||!e.firstChild?e.appendChild(l):e.replaceChild(l,e.firstChild);t=l}}return t}function Tt(e,l,t,n){let c=!1;for(let i=0,s=l.length;i<s;i++){let a=l[i],o=t&&t[e.length],g;if(!(a==null||a===!0||a===!1))if((g=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))c=Tt(e,a,o)||c;else if(g==="function")if(n){for(;typeof a=="function";)a=a();c=Tt(e,Array.isArray(a)?a:[a],Array.isArray(o)?o:[o])||c}else e.push(a),c=!0;else{const b=String(a);o&&o.nodeType===3&&o.data===b?e.push(o):e.push(document.createTextNode(b))}}return c}function Wl(e,l,t=null){for(let n=0,c=l.length;n<c;n++)e.insertBefore(l[n],t)}function ve(e,l,t,n){if(t===void 0)return e.textContent="";const c=n||document.createTextNode("");if(l.length){let i=!1;for(let s=l.length-1;s>=0;s--){const a=l[s];if(c!==a){const o=a.parentNode===e;!i&&!s?o?e.replaceChild(c,a):e.insertBefore(c,t):o&&a.remove()}else i=!0}}else e.insertBefore(c,t);return[c]}const Cc="http://www.w3.org/2000/svg";function hc(e,l=!1){return l?document.createElementNS(Cc,e):document.createElement(e)}function Wc(e){const[l,t]=ec(e,["component"]),n=q(()=>l.component);return q(()=>{const c=n();switch(typeof c){case"function":return O(()=>c(t));case"string":const i=rc.has(c),s=hc(c,i);return uc(s,t,i),s}})}/**
* @license
* Copyright (c) 2016, Contributors
* SPDX-License-Identifier: ISC
*/function Te(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let t="",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!=="_"&&(t+=s)}return t}}function bn(e,l){const t=e.toLowerCase();l=l||"-";let n="";for(let c=0;c<e.length;c++){const i=t.charAt(c),s=e.charAt(c);i!==s&&c>0?n+=`${l}${t.charAt(c)}`:n+=s}return n}function Zn(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 pc(e){if(Array.isArray(e))return e.map(s=>typeof s!="string"?s+"":s);e=e.trim();let l=0,t=null,n=null,c=null;const i=[];for(let s=0;s<e.length;s++){if(t=n,n=e.charAt(s),n===" "&&!c){t!==" "&&l++;continue}n===c?c=null:(n==="'"||n==='"')&&!c&&(c=n),i[l]||(i[l]=""),i[l]+=n}return i}/**
* @license
* Copyright (c) 2016, Contributors
* SPDX-License-Identifier: ISC
*/var ue;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array"})(ue||(ue={}));/**
* @license
* Copyright (c) 2016, Contributors
* SPDX-License-Identifier: ISC
*/let Re;class Xc{constructor(l){Re=l}parse(l,t){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},t),c=pc(l),i=typeof l=="string",s=fc(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),o=Object.assign(Object.create(null),n.default),g=n.configObjects||[],b=n.envPrefix,G=a["populate--"],J=G?"--":"_",W=Object.create(null),x=Object.create(null),L=n.__||Re.format,u={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]+)$/,w=new RegExp("^--"+a["negation-prefix"]+"(.+)");[].concat(n.array||[]).filter(Boolean).forEach(function(r){const Z=typeof r=="object"?r.key:r,h=Object.keys(r).map(function(m){return{boolean:"bools",string:"strings",number:"numbers"}[m]}).filter(Boolean).pop();h&&(u[h][Z]=!0),u.arrays[Z]=!0,u.keys.push(Z)}),[].concat(n.boolean||[]).filter(Boolean).forEach(function(r){u.bools[r]=!0,u.keys.push(r)}),[].concat(n.string||[]).filter(Boolean).forEach(function(r){u.strings[r]=!0,u.keys.push(r)}),[].concat(n.number||[]).filter(Boolean).forEach(function(r){u.numbers[r]=!0,u.keys.push(r)}),[].concat(n.count||[]).filter(Boolean).forEach(function(r){u.counts[r]=!0,u.keys.push(r)}),[].concat(n.normalize||[]).filter(Boolean).forEach(function(r){u.normalize[r]=!0,u.keys.push(r)}),typeof n.narg=="object"&&Object.entries(n.narg).forEach(([r,Z])=>{typeof Z=="number"&&(u.nargs[r]=Z,u.keys.push(r))}),typeof n.coerce=="object"&&Object.entries(n.coerce).forEach(([r,Z])=>{typeof Z=="function"&&(u.coercions[r]=Z,u.keys.push(r))}),typeof n.config<"u"&&(Array.isArray(n.config)||typeof n.config=="string"?[].concat(n.config).filter(Boolean).forEach(function(r){u.configs[r]=!0}):typeof n.config=="object"&&Object.entries(n.config).forEach(([r,Z])=>{(typeof Z=="boolean"||typeof Z=="function")&&(u.configs[r]=Z)})),_(n.key,s,n.default,u.arrays),Object.keys(o).forEach(function(r){(u.aliases[r]||[]).forEach(function(Z){o[Z]=o[r]})});let E=null;vn();let M=[];const K=Object.assign(Object.create(null),{_:[]}),ie={};for(let r=0;r<c.length;r++){const Z=c[r],h=Z.replace(/^-{3,}/,"---");let m,d,B,Y,F,D;if(Z!=="--"&&/^-/.test(Z)&&He(Z))ge(Z);else if(h.match(/^---+(=|$)/)){ge(Z);continue}else if(Z.match(/^--.+=/)||!a["short-option-groups"]&&Z.match(/^-.+=/))Y=Z.match(/^--?([^=]+)=([\s\S]*)$/),Y!==null&&Array.isArray(Y)&&Y.length>=3&&(A(Y[1],u.arrays)?r=X(r,Y[1],c,Y[2]):A(Y[1],u.nargs)!==!1?r=p(r,Y[1],c,Y[2]):R(Y[1],Y[2],!0));else if(Z.match(w)&&a["boolean-negation"])Y=Z.match(w),Y!==null&&Array.isArray(Y)&&Y.length>=2&&(d=Y[1],R(d,A(d,u.arrays)?[!1]:!1));else if(Z.match(/^--.+/)||!a["short-option-groups"]&&Z.match(/^-[^-]+/))Y=Z.match(/^--?(.+)/),Y!==null&&Array.isArray(Y)&&Y.length>=2&&(d=Y[1],A(d,u.arrays)?r=X(r,d,c):A(d,u.nargs)!==!1?r=p(r,d,c):(F=c[r+1],F!==void 0&&(!F.match(/^-/)||F.match(j))&&!A(d,u.bools)&&!A(d,u.counts)||/^(true|false)$/.test(F)?(R(d,F),r++):R(d,Ne(d))));else if(Z.match(/^-.\..+=/))Y=Z.match(/^-([^=]+)=([\s\S]*)$/),Y!==null&&Array.isArray(Y)&&Y.length>=3&&R(Y[1],Y[2]);else if(Z.match(/^-.\..+/)&&!Z.match(j))F=c[r+1],Y=Z.match(/^-(.\..+)/),Y!==null&&Array.isArray(Y)&&Y.length>=2&&(d=Y[1],F!==void 0&&!F.match(/^-/)&&!A(d,u.bools)&&!A(d,u.counts)?(R(d,F),r++):R(d,Ne(d)));else if(Z.match(/^-[^-]+/)&&!Z.match(j)){B=Z.slice(1,-1).split(""),m=!1;for(let ne=0;ne<B.length;ne++){if(F=Z.slice(ne+2),B[ne+1]&&B[ne+1]==="="){D=Z.slice(ne+3),d=B[ne],A(d,u.arrays)?r=X(r,d,c,D):A(d,u.nargs)!==!1?r=p(r,d,c,D):R(d,D),m=!0;break}if(F==="-"){R(B[ne],F);continue}if(/[A-Za-z]/.test(B[ne])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(F)&&A(F,u.bools)===!1){R(B[ne],F),m=!0;break}if(B[ne+1]&&B[ne+1].match(/\W/)){R(B[ne],F),m=!0;break}else R(B[ne],Ne(B[ne]))}d=Z.slice(-1)[0],!m&&d!=="-"&&(A(d,u.arrays)?r=X(r,d,c):A(d,u.nargs)!==!1?r=p(r,d,c):(F=c[r+1],F!==void 0&&(!/^(-|--)[^-]/.test(F)||F.match(j))&&!A(d,u.bools)&&!A(d,u.counts)||/^(true|false)$/.test(F)?(R(d,F),r++):R(d,Ne(d))))}else if(Z.match(/^-[0-9]$/)&&Z.match(j)&&A(Z.slice(1),u.bools))d=Z.slice(1),R(d,Ne(d));else if(Z==="--"){M=c.slice(r+1);break}else if(a["halt-at-non-option"]){M=c.slice(r);break}else ge(Z)}N(K,!0),N(K,!1),f(K),H(),Q(K,u.aliases,o,!0),y(K),a["set-placeholder-key"]&&k(K),Object.keys(u.counts).forEach(function(r){S(K,r.split("."))||R(r,0)}),G&&M.length&&(K[J]=[]),M.forEach(function(r){K[J].push(r)}),a["camel-case-expansion"]&&a["strip-dashed"]&&Object.keys(K).filter(r=>r!=="--"&&r.includes("-")).forEach(r=>{delete K[r]}),a["strip-aliased"]&&[].concat(...Object.keys(s).map(r=>s[r])).forEach(r=>{a["camel-case-expansion"]&&r.includes("-")&&delete K[r.split(".").map(Z=>Te(Z)).join(".")],delete K[r]});function ge(r){const Z=C("_",r);(typeof Z=="string"||typeof Z=="number")&&K._.push(Z)}function p(r,Z,h,m){let d,B=A(Z,u.nargs);if(B=typeof B!="number"||isNaN(B)?1:B,B===0)return fe(m)||(E=Error(L("Argument unexpected for: %s",Z))),R(Z,Ne(Z)),r;let Y=fe(m)?0:1;if(a["nargs-eats-options"])h.length-(r+1)+Y<B&&(E=Error(L("Not enough arguments following: %s",Z))),Y=B;else{for(d=r+1;d<h.length&&(!h[d].match(/^-[^0-9]/)||h[d].match(j)||He(h[d]));d++)Y++;Y<B&&(E=Error(L("Not enough arguments following: %s",Z)))}let F=Math.min(Y,B);for(!fe(m)&&F>0&&(R(Z,m),F--),d=r+1;d<F+r+1;d++)R(Z,h[d]);return r+F}function X(r,Z,h,m){let d=[],B=m||h[r+1];const Y=A(Z,u.nargs);if(A(Z,u.bools)&&!/^(true|false)$/.test(B))d.push(!0);else if(fe(B)||fe(m)&&/^-/.test(B)&&!j.test(B)&&!He(B)){if(o[Z]!==void 0){const F=o[Z];d=Array.isArray(F)?F:[F]}}else{fe(m)||d.push(be(Z,m,!0));for(let F=r+1;F<h.length&&!(!a["greedy-arrays"]&&d.length>0||Y&&typeof Y=="number"&&d.length>=Y||(B=h[F],/^-/.test(B)&&!j.test(B)&&!He(B)));F++)r=F,d.push(be(Z,B,i))}return typeof Y=="number"&&(Y&&d.length<Y||isNaN(Y)&&d.length===0)&&(E=Error(L("Not enough arguments following: %s",Z))),R(Z,d),r}function R(r,Z,h=i){if(/-/.test(r)&&a["camel-case-expansion"]){const B=r.split(".").map(function(Y){return Te(Y)}).join(".");v(r,B)}const m=be(r,Z,h),d=r.split(".");z(K,d,m),u.aliases[r]&&u.aliases[r].forEach(function(B){const Y=B.split(".");z(K,Y,m)}),d.length>1&&a["dot-notation"]&&(u.aliases[d[0]]||[]).forEach(function(B){let Y=B.split(".");const F=[].concat(d);F.shift(),Y=Y.concat(F),(u.aliases[r]||[]).includes(Y.join("."))||z(K,Y,m)}),A(r,u.normalize)&&!A(r,u.arrays)&&[r].concat(u.aliases[r]||[]).forEach(function(Y){Object.defineProperty(ie,Y,{enumerable:!0,get(){return Z},set(F){Z=typeof F=="string"?Re.normalize(F):F}})})}function v(r,Z){u.aliases[r]&&u.aliases[r].length||(u.aliases[r]=[Z],W[Z]=!0),u.aliases[Z]&&u.aliases[Z].length||v(Z,r)}function be(r,Z,h){h&&(Z=Rc(Z)),(A(r,u.bools)||A(r,u.counts))&&typeof Z=="string"&&(Z=Z==="true");let m=Array.isArray(Z)?Z.map(function(d){return C(r,d)}):C(r,Z);return A(r,u.counts)&&(fe(m)||typeof m=="boolean")&&(m=yt()),A(r,u.normalize)&&A(r,u.arrays)&&(Array.isArray(Z)?m=Z.map(d=>Re.normalize(d)):m=Re.normalize(Z)),m}function C(r,Z){return!a["parse-positional-numbers"]&&r==="_"||!A(r,u.strings)&&!A(r,u.bools)&&!Array.isArray(Z)&&(Zn(Z)&&a["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${Z}`)))||!fe(Z)&&A(r,u.numbers))&&(Z=Number(Z)),Z}function f(r){const Z=Object.create(null);Q(Z,u.aliases,o),Object.keys(u.configs).forEach(function(h){const m=r[h]||Z[h];if(m)try{let d=null;const B=Re.resolve(Re.cwd(),m),Y=u.configs[h];if(typeof Y=="function"){try{d=Y(B)}catch(F){d=F}if(d instanceof Error){E=d;return}}else d=Re.require(B);V(d)}catch(d){d.name==="PermissionDenied"?E=d:r[h]&&(E=Error(L("Invalid JSON config file: %s",m)))}})}function V(r,Z){Object.keys(r).forEach(function(h){const m=r[h],d=Z?Z+"."+h:h;typeof m=="object"&&m!==null&&!Array.isArray(m)&&a["dot-notation"]?V(m,d):(!S(K,d.split("."))||A(d,u.arrays)&&a["combine-arrays"])&&R(d,m)})}function H(){typeof g<"u"&&g.forEach(function(r){V(r)})}function N(r,Z){if(typeof b>"u")return;const h=typeof b=="string"?b:"",m=Re.env();Object.keys(m).forEach(function(d){if(h===""||d.lastIndexOf(h,0)===0){const B=d.split("__").map(function(Y,F){return F===0&&(Y=Y.substring(h.length)),Te(Y)});(Z&&u.configs[B.join(".")]||!Z)&&!S(r,B)&&R(B.join("."),m[d])}})}function y(r){let Z;const h=new Set;Object.keys(r).forEach(function(m){if(!h.has(m)&&(Z=A(m,u.coercions),typeof Z=="function"))try{const d=C(m,Z(r[m]));[].concat(u.aliases[m]||[],m).forEach(B=>{h.add(B),r[B]=d})}catch(d){E=d}})}function k(r){return u.keys.forEach(Z=>{~Z.indexOf(".")||typeof r[Z]>"u"&&(r[Z]=void 0)}),r}function Q(r,Z,h,m=!1){Object.keys(h).forEach(function(d){S(r,d.split("."))||(z(r,d.split("."),h[d]),m&&(x[d]=!0),(Z[d]||[]).forEach(function(B){S(r,B.split("."))||z(r,B.split("."),h[d])}))})}function S(r,Z){let h=r;a["dot-notation"]||(Z=[Z.join(".")]),Z.slice(0,-1).forEach(function(d){h=h[d]||{}});const m=Z[Z.length-1];return typeof h!="object"?!1:m in h}function z(r,Z,h){let m=r;a["dot-notation"]||(Z=[Z.join(".")]),Z.slice(0,-1).forEach(function(D){D=pl(D),typeof m=="object"&&m[D]===void 0&&(m[D]={}),typeof m[D]!="object"||Array.isArray(m[D])?(Array.isArray(m[D])?m[D].push({}):m[D]=[m[D],{}],m=m[D][m[D].length-1]):m=m[D]});const d=pl(Z[Z.length-1]),B=A(Z.join("."),u.arrays),Y=Array.isArray(h);let F=a["duplicate-arguments-array"];!F&&A(d,u.nargs)&&(F=!0,(!fe(m[d])&&u.nargs[d]===1||Array.isArray(m[d])&&m[d].length===u.nargs[d])&&(m[d]=void 0)),h===yt()?m[d]=yt(m[d]):Array.isArray(m[d])?F&&B&&Y?m[d]=a["flatten-duplicate-arrays"]?m[d].concat(h):(Array.isArray(m[d][0])?m[d]:[m[d]]).concat([h]):!F&&!!B==!!Y?m[d]=h:m[d]=m[d].concat([h]):m[d]===void 0&&B?m[d]=Y?h:[h]:F&&!(m[d]===void 0||A(d,u.counts)||A(d,u.bools))?m[d]=[m[d],h]:m[d]=h}function _(...r){r.forEach(function(Z){Object.keys(Z||{}).forEach(function(h){u.aliases[h]||(u.aliases[h]=[].concat(s[h]||[]),u.aliases[h].concat(h).forEach(function(m){if(/-/.test(m)&&a["camel-case-expansion"]){const d=Te(m);d!==h&&u.aliases[h].indexOf(d)===-1&&(u.aliases[h].push(d),W[d]=!0)}}),u.aliases[h].concat(h).forEach(function(m){if(m.length>1&&/[A-Z]/.test(m)&&a["camel-case-expansion"]){const d=bn(m,"-");d!==h&&u.aliases[h].indexOf(d)===-1&&(u.aliases[h].push(d),W[d]=!0)}}),u.aliases[h].forEach(function(m){u.aliases[m]=[h].concat(u.aliases[h].filter(function(d){return m!==d}))}))})})}function A(r,Z){const h=[].concat(u.aliases[r]||[],r),m=Object.keys(Z),d=h.find(B=>m.includes(B));return d?Z[d]:!1}function Ze(r){const Z=Object.keys(u);return[].concat(Z.map(m=>u[m])).some(function(m){return Array.isArray(m)?m.includes(r):m[r]})}function le(r,...Z){return[].concat(...Z).some(function(m){const d=r.match(m);return d&&Ze(d[1])})}function Xe(r){if(r.match(j)||!r.match(/^-[^-]+/))return!1;let Z=!0,h;const m=r.slice(1).split("");for(let d=0;d<m.length;d++){if(h=r.slice(d+2),!Ze(m[d])){Z=!1;break}if(m[d+1]&&m[d+1]==="="||h==="-"||/[A-Za-z]/.test(m[d])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(h)||m[d+1]&&m[d+1].match(/\W/))break}return Z}function He(r){return a["unknown-options-as-args"]&&Fn(r)}function Fn(r){return r=r.replace(/^-{3,}/,"--"),r.match(j)||Xe(r)?!1:!le(r,/^-+([^=]+?)=[\s\S]*$/,w,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function Ne(r){return!A(r,u.bools)&&!A(r,u.counts)&&`${r}`in o?o[r]:Hn(Nn(r))}function Hn(r){return{[ue.BOOLEAN]:!0,[ue.STRING]:"",[ue.NUMBER]:void 0,[ue.ARRAY]:[]}[r]}function Nn(r){let Z=ue.BOOLEAN;return A(r,u.strings)?Z=ue.STRING:A(r,u.numbers)?Z=ue.NUMBER:A(r,u.bools)?Z=ue.BOOLEAN:A(r,u.arrays)&&(Z=ue.ARRAY),Z}function fe(r){return r===void 0}function vn(){Object.keys(u.counts).find(r=>A(r,u.arrays)?(E=Error(L("Invalid configuration: %s, opts.count excludes opts.array.",r)),!0):A(r,u.nargs)?(E=Error(L("Invalid configuration: %s, opts.count excludes opts.narg.",r)),!0):!1)}return{aliases:Object.assign({},u.aliases),argv:Object.assign(ie,K),configuration:a,defaulted:Object.assign({},x),error:E,newAliases:Object.assign({},W)}}}function fc(e){const l=[],t=Object.create(null);let n=!0;for(Object.keys(e).forEach(function(c){l.push([].concat(e[c],c))});n;){n=!1;for(let c=0;c<l.length;c++)for(let i=c+1;i<l.length;i++)if(l[c].filter(function(a){return l[i].indexOf(a)!==-1}).length){l[c]=l[c].concat(l[i]),l.splice(i,1),n=!0;break}}return l.forEach(function(c){c=c.filter(function(s,a,o){return o.indexOf(s)===a});const i=c.pop();i!==void 0&&typeof i=="string"&&(t[i]=c)}),t}function yt(e){return e!==void 0?e+1:1}function pl(e){return e==="__proto__"?"___proto___":e}function Rc(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 Ft,Ht,Nt;const Xl=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):12,fl=(Ht=(Ft=process==null?void 0:process.versions)===null||Ft===void 0?void 0:Ft.node)!==null&&Ht!==void 0?Ht:(Nt=process==null?void 0:process.version)===null||Nt===void 0?void 0:Nt.slice(1);if(fl&&Number(fl.match(/^([^.]+)/)[1])<Xl)throw Error(`yargs parser supports a minimum Node.js version of ${Xl}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);const Vc=process?process.env:{},un=new Xc({cwd:process.cwd,env:()=>Vc,format:Sn.format,normalize:oe.normalize,resolve:oe.resolve,require:e=>{if(typeof require<"u")return require(e);if(e.match(/\.json$/))return JSON.parse(Pl.readFileSync(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),lt=function(l,t){return un.parse(l.slice(),t).argv};lt.detailed=function(e,l){return un.parse(e.slice(),l)};lt.camelCase=Te;lt.decamelize=bn;lt.looksLikeNumber=Zn;const Ac={exportToOo:"导出为......",exportWithPrevious:"使用上一次设置导出",exportSuccessNotice:T`导出文件 ${0} 成功!`,exportCommandOutputMessage:T`命令:${0}`,exportErrorOutputMessage:T`命令 ${0},错误:${1}`,pleaseOpenFile:"请打开一个文件先。",preparing:T`正在生成 "${0}" ......`,exportDialog:{fileName:"文件名",type:"类型",exportTo:"导出到",title:T`导出为 ${0}`,export:"导出",selectExportFolder:"请选择导出文件夹",overwriteConfirmation:"覆盖提示"},messageBox:{yes:"是",no:"否",ok:"确认",cancel:"取消"},overwriteConfirmationDialog:{replace:"替换",title:T`"${0}" 已经存在。您要替换它吗?`,message:T`"${0}" 文件夹中已有相同的文件或文件夹,若替换,则会覆盖其当前内容。`},settingTab:{title:"导出设置",general:"通用",name:"名称",customLocation:"自定义",pandocVersion:T`版本: ${0}`,pandocVersionWithWarning:T`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:"显示导出进度条"}},Yc={exportToOo:"Export to...",exportSuccessNotice:T`Export file ${0} success!`,exportCommandOutputMessage:T`Command: ${0}`,exportErrorOutputMessage:T`Command: ${0}Error:${1}`,exportWithPrevious:"Export with Previous",pleaseOpenFile:"Please open a file first.",preparing:T`generating "${0}"...`,exportDialog:{exportTo:"Export to",fileName:"File Name",title:T`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:T`"${0}" already exists. Do you want to replace it?`,message:T`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:T`Version: ${0}`,pandocVersionWithWarning:T`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."}},xc={exportToOo:"Export to...",exportSuccessNotice:T`Export der Datei ${0} erfolgreich!`,exportCommandOutputMessage:T`Command: ${0}`,exportErrorOutputMessage:T`Command: ${0}Fehler:${1}`,exportWithPrevious:"Exportiere mit Vorherigem",pleaseOpenFile:"Bitte öffne zunächst eine Datei.",preparing:T`generating "${0}"...`,exportDialog:{exportTo:"Exportiere nach",fileName:"Dateiname",title:T`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:T`"${0}" existiert bereits. Soll er ersetzt werden?`,message:T`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:T`Version: ${0}`,pandocVersionWithWarning:T`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"}},mn={"de-DE":xc,"en-US":Yc,"zh-CN":Ac,get current(){const e=Object.keys(this),l=Ge.moment.locale().toLowerCase();let t=e.find(c=>c.toLowerCase()===l.toLowerCase());if(t)return this[t];const n=l.split("-")[0];return t=e.find(c=>c.toLowerCase().startsWith(n)),t?this[t]:this["en-US"]}};class Rl extends Ge.Modal{constructor(l,t,n){super(l),this.options=typeof t=="string"?{message:t,buttons:"Ok",title:n}:t,this.lang=mn.current}onOpen(){const{titleEl:l,contentEl:t,lang:n,options:{message:c,title:i,buttons:s,callback:a,buttonsLabel:o,buttonsClass:g}}=this;switch(i&&l.setText(i),t.createDiv({text:c}),s){case"Yes":t.createEl("div",{cls:["modal-button-container"],parent:t},b=>{b.createEl("button",{text:(o==null?void 0:o.yes)??n.messageBox.yes,cls:["mod-cta",g==null?void 0:g.yes],parent:b}).onclick=()=>this.call(a==null?void 0:a.yes)});break;case"YesNo":t.createEl("div",{cls:["modal-button-container"],parent:t},b=>{b.createEl("button",{text:(o==null?void 0:o.yes)??n.messageBox.yes,cls:["mod-cta",g==null?void 0:g.yes],parent:b}).onclick=()=>this.call(a==null?void 0:a.yes),b.createEl("button",{text:(o==null?void 0:o.no)??n.messageBox.no,cls:["mod-cta",g==null?void 0:g.no],parent:b}).onclick=()=>this.call(a==null?void 0:a.no)});break;case"Ok":t.createEl("div",{cls:["modal-button-container"],parent:t},b=>{b.createEl("button",{text:(o==null?void 0:o.ok)??n.messageBox.ok,cls:["mod-cta",g==null?void 0:g.no],parent:b}).onclick=()=>this.call(a==null?void 0:a.ok)});break;case"OkCancel":t.createEl("div",{cls:["modal-button-container"],parent:t},b=>{b.createEl("button",{text:(o==null?void 0:o.ok)??n.messageBox.ok,cls:["mod-cta",g==null?void 0:g.ok],parent:b}).onclick=()=>this.call(a==null?void 0:a.ok),b.createEl("button",{text:(o==null?void 0:o.cancel)??n.messageBox.cancel,cls:["mod-cta",g==null?void 0:g.cancel],parent:b}).onclick=()=>this.call(a==null?void 0:a.cancel)});break}}call(l){l&&l(),this.close()}onClose(){const{contentEl:l}=this;l.empty()}}function Jc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $t={exports:{}};const Bc="2.0.0",Gn=256,yc=Number.MAX_SAFE_INTEGER||9007199254740991,Fc=16,Hc=Gn-6,Nc=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Rt={MAX_LENGTH:Gn,MAX_SAFE_COMPONENT_LENGTH:Fc,MAX_SAFE_BUILD_LENGTH:Hc,MAX_SAFE_INTEGER:yc,RELEASE_TYPES:Nc,SEMVER_SPEC_VERSION:Bc,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const vc=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Vt=vc;(function(e,l){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:c}=Rt,i=Vt;l=e.exports={};const s=l.re=[],a=l.safeRe=[],o=l.src=[],g=l.t={};let b=0;const G="[a-zA-Z0-9-]",J=[["\\s",1],["\\d",c],[G,n]],W=L=>{for(const[u,j]of J)L=L.split(`${u}*`).join(`${u}{0,${j}}`).split(`${u}+`).join(`${u}{1,${j}}`);return L},x=(L,u,j)=>{const w=W(u),E=b++;i(L,E,u),g[L]=E,o[E]=u,s[E]=new RegExp(u,j?"g":void 0),a[E]=new RegExp(w,j?"g":void 0)};x("NUMERICIDENTIFIER","0|[1-9]\\d*"),x("NUMERICIDENTIFIERLOOSE","\\d+"),x("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${G}*`),x("MAINVERSION",`(${o[g.NUMERICIDENTIFIER]})\\.(${o[g.NUMERICIDENTIFIER]})\\.(${o[g.NUMERICIDENTIFIER]})`),x("MAINVERSIONLOOSE",`(${o[g.NUMERICIDENTIFIERLOOSE]})\\.(${o[g.NUMERICIDENTIFIERLOOSE]})\\.(${o[g.NUMERICIDENTIFIERLOOSE]})`),x("PRERELEASEIDENTIFIER",`(?:${o[g.NUMERICIDENTIFIER]}|${o[g.NONNUMERICIDENTIFIER]})`),x("PRERELEASEIDENTIFIERLOOSE",`(?:${o[g.NUMERICIDENTIFIERLOOSE]}|${o[g.NONNUMERICIDENTIFIER]})`),x("PRERELEASE",`(?:-(${o[g.PRERELEASEIDENTIFIER]}(?:\\.${o[g.PRERELEASEIDENTIFIER]})*))`),x("PRERELEASELOOSE",`(?:-?(${o[g.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[g.PRERELEASEIDENTIFIERLOOSE]})*))`),x("BUILDIDENTIFIER",`${G}+`),x("BUILD",`(?:\\+(${o[g.BUILDIDENTIFIER]}(?:\\.${o[g.BUILDIDENTIFIER]})*))`),x("FULLPLAIN",`v?${o[g.MAINVERSION]}${o[g.PRERELEASE]}?${o[g.BUILD]}?`),x("FULL",`^${o[g.FULLPLAIN]}$`),x("LOOSEPLAIN",`[v=\\s]*${o[g.MAINVERSIONLOOSE]}${o[g.PRERELEASELOOSE]}?${o[g.BUILD]}?`),x("LOOSE",`^${o[g.LOOSEPLAIN]}$`),x("GTLT","((?:<|>)?=?)"),x("XRANGEIDENTIFIERLOOSE",`${o[g.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),x("XRANGEIDENTIFIER",`${o[g.NUMERICIDENTIFIER]}|x|X|\\*`),x("XRANGEPLAIN",`[v=\\s]*(${o[g.XRANGEIDENTIFIER]})(?:\\.(${o[g.XRANGEIDENTIFIER]})(?:\\.(${o[g.XRANGEIDENTIFIER]})(?:${o[g.PRERELEASE]})?${o[g.BUILD]}?)?)?`),x("XRANGEPLAINLOOSE",`[v=\\s]*(${o[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[g.XRANGEIDENTIFIERLOOSE]})(?:${o[g.PRERELEASELOOSE]})?${o[g.BUILD]}?)?)?`),x("XRANGE",`^${o[g.GTLT]}\\s*${o[g.XRANGEPLAIN]}$`),x("XRANGELOOSE",`^${o[g.GTLT]}\\s*${o[g.XRANGEPLAINLOOSE]}$`),x("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),x("COERCE",`${o[g.COERCEPLAIN]}(?:$|[^\\d])`),x("COERCEFULL",o[g.COERCEPLAIN]+`(?:${o[g.PRERELEASE]})?(?:${o[g.BUILD]})?(?:$|[^\\d])`),x("COERCERTL",o[g.COERCE],!0),x("COERCERTLFULL",o[g.COERCEFULL],!0),x("LONETILDE","(?:~>?)"),x("TILDETRIM",`(\\s*)${o[g.LONETILDE]}\\s+`,!0),l.tildeTrimReplace="$1~",x("TILDE",`^${o[g.LONETILDE]}${o[g.XRANGEPLAIN]}$`),x("TILDELOOSE",`^${o[g.LONETILDE]}${o[g.XRANGEPLAINLOOSE]}$`),x("LONECARET","(?:\\^)"),x("CARETTRIM",`(\\s*)${o[g.LONECARET]}\\s+`,!0),l.caretTrimReplace="$1^",x("CARET",`^${o[g.LONECARET]}${o[g.XRANGEPLAIN]}$`),x("CARETLOOSE",`^${o[g.LONECARET]}${o[g.XRANGEPLAINLOOSE]}$`),x("COMPARATORLOOSE",`^${o[g.GTLT]}\\s*(${o[g.LOOSEPLAIN]})$|^$`),x("COMPARATOR",`^${o[g.GTLT]}\\s*(${o[g.FULLPLAIN]})$|^$`),x("COMPARATORTRIM",`(\\s*)${o[g.GTLT]}\\s*(${o[g.LOOSEPLAIN]}|${o[g.XRANGEPLAIN]})`,!0),l.comparatorTrimReplace="$1$2$3",x("HYPHENRANGE",`^\\s*(${o[g.XRANGEPLAIN]})\\s+-\\s+(${o[g.XRANGEPLAIN]})\\s*$`),x("HYPHENRANGELOOSE",`^\\s*(${o[g.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[g.XRANGEPLAINLOOSE]})\\s*$`),x("STAR","(<|>)?=?\\s*\\*"),x("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),x("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})($t,$t.exports);var nt=$t.exports;const kc=Object.freeze({loose:!0}),Sc=Object.freeze({}),wc=e=>e?typeof e!="object"?kc:e:Sc;var ll=wc;const Vl=/^[0-9]+$/,In=(e,l)=>{const t=Vl.test(e),n=Vl.test(l);return t&&n&&(e=+e,l=+l),e===l?0:t&&!n?-1:n&&!t?1:e<l?-1:1},Ec=(e,l)=>In(l,e);var Cn={compareIdentifiers:In,rcompareIdentifiers:Ec};const it=Vt,{MAX_LENGTH:Al,MAX_SAFE_INTEGER:at}=Rt,{safeRe:Yl,t:xl}=nt,Kc=ll,{compareIdentifiers:ke}=Cn;let Qc=class We{constructor(l,t){if(t=Kc(t),l instanceof We){if(l.loose===!!t.loose&&l.includePrerelease===!!t.includePrerelease)return l;l=l.version}else if(typeof l!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof l}".`);if(l.length>Al)throw new TypeError(`version is longer than ${Al} characters`);it("SemVer",l,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=l.trim().match(t.loose?Yl[xl.LOOSE]:Yl[xl.FULL]);if(!n)throw new TypeError(`Invalid Version: ${l}`);if(this.raw=l,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>at||this.major<0)throw new TypeError("Invalid major version");if(this.minor>at||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>at||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<at)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(l){if(it("SemVer.compare",this.version,this.options,l),!(l instanceof We)){if(typeof l=="string"&&l===this.version)return 0;l=new We(l,this.options)}return l.version===this.version?0:this.compareMain(l)||this.comparePre(l)}compareMain(l){return l instanceof We||(l=new We(l,this.options)),ke(this.major,l.major)||ke(this.minor,l.minor)||ke(this.patch,l.patch)}comparePre(l){if(l instanceof We||(l=new We(l,this.options)),this.prerelease.length&&!l.prerelease.length)return-1;if(!this.prerelease.length&&l.prerelease.length)return 1;if(!this.prerelease.length&&!l.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],c=l.prerelease[t];if(it("prerelease compare",t,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 ke(n,c)}while(++t)}compareBuild(l){l instanceof We||(l=new We(l,this.options));let t=0;do{const n=this.build[t],c=l.build[t];if(it("build compare",t,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 ke(n,c)}while(++t)}inc(l,t,n){switch(l){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,n),this.inc("pre",t,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(!t&&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(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(c)}}if(t){let i=[t,c];n===!1&&(i=[t]),ke(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${l}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var ce=Qc;const Jl=ce,zc=(e,l,t=!1)=>{if(e instanceof Jl)return e;try{return new Jl(e,l)}catch(n){if(!t)return null;throw n}};var Ue=zc;const Uc=Ue,jc=(e,l)=>{const t=Uc(e,l);return t?t.version:null};var Lc=jc;const Tc=Ue,$c=(e,l)=>{const t=Tc(e.trim().replace(/^[=v]+/,""),l);return t?t.version:null};var Mc=$c;const Bl=ce,Oc=(e,l,t,n,c)=>{typeof t=="string"&&(c=n,n=t,t=void 0);try{return new Bl(e instanceof Bl?e.version:e,t).inc(l,n,c).version}catch{return null}};var Pc=Oc;const yl=Ue,Dc=(e,l)=>{const t=yl(e,null,!0),n=yl(l,null,!0),c=t.compare(n);if(c===0)return null;const i=c>0,s=i?t:n,a=i?n:t,o=!!s.prerelease.length;if(!!a.prerelease.length&&!o)return!a.patch&&!a.minor?"major":s.patch?"patch":s.minor?"minor":"major";const b=o?"pre":"";return t.major!==n.major?b+"major":t.minor!==n.minor?b+"minor":t.patch!==n.patch?b+"patch":"prerelease"};var _c=Dc;const qc=ce,ei=(e,l)=>new qc(e,l).major;var ti=ei;const li=ce,ni=(e,l)=>new li(e,l).minor;var ci=ni;const ii=ce,ai=(e,l)=>new ii(e,l).patch;var si=ai;const oi=Ue,ri=(e,l)=>{const t=oi(e,l);return t&&t.prerelease.length?t.prerelease:null};var di=ri;const Fl=ce,gi=(e,l,t)=>new Fl(e,t).compare(new Fl(l,t));var Ce=gi;const bi=Ce,Zi=(e,l,t)=>bi(l,e,t);var ui=Zi;const mi=Ce,Gi=(e,l)=>mi(e,l,!0);var Ii=Gi;const Hl=ce,Ci=(e,l,t)=>{const n=new Hl(e,t),c=new Hl(l,t);return n.compare(c)||n.compareBuild(c)};var nl=Ci;const hi=nl,Wi=(e,l)=>e.sort((t,n)=>hi(t,n,l));var pi=Wi;const Xi=nl,fi=(e,l)=>e.sort((t,n)=>Xi(n,t,l));var Ri=fi;const Vi=Ce,Ai=(e,l,t)=>Vi(e,l,t)>0;var At=Ai;const Yi=Ce,xi=(e,l,t)=>Yi(e,l,t)<0;var cl=xi;const Ji=Ce,Bi=(e,l,t)=>Ji(e,l,t)===0;var hn=Bi;const yi=Ce,Fi=(e,l,t)=>yi(e,l,t)!==0;var Wn=Fi;const Hi=Ce,Ni=(e,l,t)=>Hi(e,l,t)>=0;var il=Ni;const vi=Ce,ki=(e,l,t)=>vi(e,l,t)<=0;var al=ki;const Si=hn,wi=Wn,Ei=At,Ki=il,Qi=cl,zi=al,Ui=(e,l,t,n)=>{switch(l){case"===":return typeof e=="object"&&(e=e.version),typeof t=="object"&&(t=t.version),e===t;case"!==":return typeof e=="object"&&(e=e.version),typeof t=="object"&&(t=t.version),e!==t;case"":case"=":case"==":return Si(e,t,n);case"!=":return wi(e,t,n);case">":return Ei(e,t,n);case">=":return Ki(e,t,n);case"<":return Qi(e,t,n);case"<=":return zi(e,t,n);default:throw new TypeError(`Invalid operator: ${l}`)}};var pn=Ui;const ji=ce,Li=Ue,{safeRe:st,t:ot}=nt,Ti=(e,l)=>{if(e instanceof ji)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;l=l||{};let t=null;if(!l.rtl)t=e.match(l.includePrerelease?st[ot.COERCEFULL]:st[ot.COERCE]);else{const o=l.includePrerelease?st[ot.COERCERTLFULL]:st[ot.COERCERTL];let g;for(;(g=o.exec(e))&&(!t||t.index+t[0].length!==e.length);)(!t||g.index+g[0].length!==t.index+t[0].length)&&(t=g),o.lastIndex=g.index+g[1].length+g[2].length;o.lastIndex=-1}if(t===null)return null;const n=t[2],c=t[3]||"0",i=t[4]||"0",s=l.includePrerelease&&t[5]?`-${t[5]}`:"",a=l.includePrerelease&&t[6]?`+${t[6]}`:"";return Li(`${n}.${c}.${i}${s}${a}`,l)};var $i=Ti;class Mi{constructor(){this.max=1e3,this.map=new Map}get(l){const t=this.map.get(l);if(t!==void 0)return this.map.delete(l),this.map.set(l,t),t}delete(l){return this.map.delete(l)}set(l,t){if(!this.delete(l)&&t!==void 0){if(this.map.size>=this.max){const c=this.map.keys().next().value;this.delete(c)}this.map.set(l,t)}return this}}var Oi=Mi,vt,Nl;function he(){if(Nl)return vt;Nl=1;class e{constructor(f,V){if(V=n(V),f instanceof e)return f.loose===!!V.loose&&f.includePrerelease===!!V.includePrerelease?f:new e(f.raw,V);if(f instanceof c)return this.raw=f.value,this.set=[[f]],this.format(),this;if(this.options=V,this.loose=!!V.loose,this.includePrerelease=!!V.includePrerelease,this.raw=f.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(H=>this.parseRange(H.trim())).filter(H=>H.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const H=this.set[0];if(this.set=this.set.filter(N=>!x(N[0])),this.set.length===0)this.set=[H];else if(this.set.length>1){for(const N of this.set)if(N.length===1&&L(N[0])){this.set=[N];break}}}this.format()}format(){return this.range=this.set.map(f=>f.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(f){const H=((this.options.includePrerelease&&J)|(this.options.loose&&W))+":"+f,N=t.get(H);if(N)return N;const y=this.options.loose,k=y?a[o.HYPHENRANGELOOSE]:a[o.HYPHENRANGE];f=f.replace(k,v(this.options.includePrerelease)),i("hyphen replace",f),f=f.replace(a[o.COMPARATORTRIM],g),i("comparator trim",f),f=f.replace(a[o.TILDETRIM],b),i("tilde trim",f),f=f.replace(a[o.CARETTRIM],G),i("caret trim",f);let Q=f.split(" ").map(A=>j(A,this.options)).join(" ").split(/\s+/).map(A=>R(A,this.options));y&&(Q=Q.filter(A=>(i("loose invalid filter",A,this.options),!!A.match(a[o.COMPARATORLOOSE])))),i("range list",Q);const S=new Map,z=Q.map(A=>new c(A,this.options));for(const A of z){if(x(A))return[A];S.set(A.value,A)}S.size>1&&S.has("")&&S.delete("");const _=[...S.values()];return t.set(H,_),_}intersects(f,V){if(!(f instanceof e))throw new TypeError("a Range is required");return this.set.some(H=>u(H,V)&&f.set.some(N=>u(N,V)&&H.every(y=>N.every(k=>y.intersects(k,V)))))}test(f){if(!f)return!1;if(typeof f=="string")try{f=new s(f,this.options)}catch{return!1}for(let V=0;V<this.set.length;V++)if(be(this.set[V],f,this.options))return!0;return!1}}vt=e;const l=Oi,t=new l,n=ll,c=Yt(),i=Vt,s=ce,{safeRe:a,t:o,comparatorTrimReplace:g,tildeTrimReplace:b,caretTrimReplace:G}=nt,{FLAG_INCLUDE_PRERELEASE:J,FLAG_LOOSE:W}=Rt,x=C=>C.value==="<0.0.0-0",L=C=>C.value==="",u=(C,f)=>{let V=!0;const H=C.slice();let N=H.pop();for(;V&&H.length;)V=H.every(y=>N.intersects(y,f)),N=H.pop();return V},j=(C,f)=>(i("comp",C,f),C=K(C,f),i("caret",C),C=E(C,f),i("tildes",C),C=ge(C,f),i("xrange",C),C=X(C,f),i("stars",C),C),w=C=>!C||C.toLowerCase()==="x"||C==="*",E=(C,f)=>C.trim().split(/\s+/).map(V=>M(V,f)).join(" "),M=(C,f)=>{const V=f.loose?a[o.TILDELOOSE]:a[o.TILDE];return C.replace(V,(H,N,y,k,Q)=>{i("tilde",C,H,N,y,k,Q);let S;return w(N)?S="":w(y)?S=`>=${N}.0.0 <${+N+1}.0.0-0`:w(k)?S=`>=${N}.${y}.0 <${N}.${+y+1}.0-0`:Q?(i("replaceTilde pr",Q),S=`>=${N}.${y}.${k}-${Q} <${N}.${+y+1}.0-0`):S=`>=${N}.${y}.${k} <${N}.${+y+1}.0-0`,i("tilde return",S),S})},K=(C,f)=>C.trim().split(/\s+/).map(V=>ie(V,f)).join(" "),ie=(C,f)=>{i("caret",C,f);const V=f.loose?a[o.CARETLOOSE]:a[o.CARET],H=f.includePrerelease?"-0":"";return C.replace(V,(N,y,k,Q,S)=>{i("caret",C,N,y,k,Q,S);let z;return w(y)?z="":w(k)?z=`>=${y}.0.0${H} <${+y+1}.0.0-0`:w(Q)?y==="0"?z=`>=${y}.${k}.0${H} <${y}.${+k+1}.0-0`:z=`>=${y}.${k}.0${H} <${+y+1}.0.0-0`:S?(i("replaceCaret pr",S),y==="0"?k==="0"?z=`>=${y}.${k}.${Q}-${S} <${y}.${k}.${+Q+1}-0`:z=`>=${y}.${k}.${Q}-${S} <${y}.${+k+1}.0-0`:z=`>=${y}.${k}.${Q}-${S} <${+y+1}.0.0-0`):(i("no pr"),y==="0"?k==="0"?z=`>=${y}.${k}.${Q}${H} <${y}.${k}.${+Q+1}-0`:z=`>=${y}.${k}.${Q}${H} <${y}.${+k+1}.0-0`:z=`>=${y}.${k}.${Q} <${+y+1}.0.0-0`),i("caret return",z),z})},ge=(C,f)=>(i("replaceXRanges",C,f),C.split(/\s+/).map(V=>p(V,f)).join(" ")),p=(C,f)=>{C=C.trim();const V=f.loose?a[o.XRANGELOOSE]:a[o.XRANGE];return C.replace(V,(H,N,y,k,Q,S)=>{i("xRange",C,H,N,y,k,Q,S);const z=w(y),_=z||w(k),A=_||w(Q),Ze=A;return N==="="&&Ze&&(N=""),S=f.includePrerelease?"-0":"",z?N===">"||N==="<"?H="<0.0.0-0":H="*":N&&Ze?(_&&(k=0),Q=0,N===">"?(N=">=",_?(y=+y+1,k=0,Q=0):(k=+k+1,Q=0)):N==="<="&&(N="<",_?y=+y+1:k=+k+1),N==="<"&&(S="-0"),H=`${N+y}.${k}.${Q}${S}`):_?H=`>=${y}.0.0${S} <${+y+1}.0.0-0`:A&&(H=`>=${y}.${k}.0${S} <${y}.${+k+1}.0-0`),i("xRange return",H),H})},X=(C,f)=>(i("replaceStars",C,f),C.trim().replace(a[o.STAR],"")),R=(C,f)=>(i("replaceGTE0",C,f),C.trim().replace(a[f.includePrerelease?o.GTE0PRE:o.GTE0],"")),v=C=>(f,V,H,N,y,k,Q,S,z,_,A,Ze)=>(w(H)?V="":w(N)?V=`>=${H}.0.0${C?"-0":""}`:w(y)?V=`>=${H}.${N}.0${C?"-0":""}`:k?V=`>=${V}`:V=`>=${V}${C?"-0":""}`,w(z)?S="":w(_)?S=`<${+z+1}.0.0-0`:w(A)?S=`<${z}.${+_+1}.0-0`:Ze?S=`<=${z}.${_}.${A}-${Ze}`:C?S=`<${z}.${_}.${+A+1}-0`:S=`<=${S}`,`${V} ${S}`.trim()),be=(C,f,V)=>{for(let H=0;H<C.length;H++)if(!C[H].test(f))return!1;if(f.prerelease.length&&!V.includePrerelease){for(let H=0;H<C.length;H++)if(i(C[H].semver),C[H].semver!==c.ANY&&C[H].semver.prerelease.length>0){const N=C[H].semver;if(N.major===f.major&&N.minor===f.minor&&N.patch===f.patch)return!0}return!1}return!0};return vt}var kt,vl;function Yt(){if(vl)return kt;vl=1;const e=Symbol("SemVer ANY");class l{static get ANY(){return e}constructor(b,G){if(G=t(G),b instanceof l){if(b.loose===!!G.loose)return b;b=b.value}b=b.trim().split(/\s+/).join(" "),s("comparator",b,G),this.options=G,this.loose=!!G.loose,this.parse(b),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(b){const G=this.options.loose?n[c.COMPARATORLOOSE]:n[c.COMPARATOR],J=b.match(G);if(!J)throw new TypeError(`Invalid comparator: ${b}`);this.operator=J[1]!==void 0?J[1]:"",this.operator==="="&&(this.operator=""),J[2]?this.semver=new a(J[2],this.options.loose):this.semver=e}toString(){return this.value}test(b){if(s("Comparator.test",b,this.options.loose),this.semver===e||b===e)return!0;if(typeof b=="string")try{b=new a(b,this.options)}catch{return!1}return i(b,this.operator,this.semver,this.options)}intersects(b,G){if(!(b instanceof l))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new o(b.value,G).test(this.value):b.operator===""?b.value===""?!0:new o(this.value,G).test(b.semver):(G=t(G),G.includePrerelease&&(this.value==="<0.0.0-0"||b.value==="<0.0.0-0")||!G.includePrerelease&&(this.value.startsWith("<0.0.0")||b.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&b.operator.startsWith(">")||this.operator.startsWith("<")&&b.operator.startsWith("<")||this.semver.version===b.semver.version&&this.operator.includes("=")&&b.operator.includes("=")||i(this.semver,"<",b.semver,G)&&this.operator.startsWith(">")&&b.operator.startsWith("<")||i(this.semver,">",b.semver,G)&&this.operator.startsWith("<")&&b.operator.startsWith(">")))}}kt=l;const t=ll,{safeRe:n,t:c}=nt,i=pn,s=Vt,a=ce,o=he();return kt}const Pi=he(),Di=(e,l,t)=>{try{l=new Pi(l,t)}catch{return!1}return l.test(e)};var xt=Di;const _i=he(),qi=(e,l)=>new _i(e,l).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));var ea=qi;const ta=ce,la=he(),na=(e,l,t)=>{let n=null,c=null,i=null;try{i=new la(l,t)}catch{return null}return e.forEach(s=>{i.test(s)&&(!n||c.compare(s)===-1)&&(n=s,c=new ta(n,t))}),n};var ca=na;const ia=ce,aa=he(),sa=(e,l,t)=>{let n=null,c=null,i=null;try{i=new aa(l,t)}catch{return null}return e.forEach(s=>{i.test(s)&&(!n||c.compare(s)===1)&&(n=s,c=new ia(n,t))}),n};var oa=sa;const St=ce,ra=he(),kl=At,da=(e,l)=>{e=new ra(e,l);let t=new St("0.0.0");if(e.test(t)||(t=new St("0.0.0-0"),e.test(t)))return t;t=null;for(let n=0;n<e.set.length;++n){const c=e.set[n];let i=null;c.forEach(s=>{const a=new St(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||kl(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),i&&(!t||kl(t,i))&&(t=i)}return t&&e.test(t)?t:null};var ga=da;const ba=he(),Za=(e,l)=>{try{return new ba(e,l).range||"*"}catch{return null}};var ua=Za;const ma=ce,Xn=Yt(),{ANY:Ga}=Xn,Ia=he(),Ca=xt,Sl=At,wl=cl,ha=al,Wa=il,pa=(e,l,t,n)=>{e=new ma(e,n),l=new Ia(l,n);let c,i,s,a,o;switch(t){case">":c=Sl,i=ha,s=wl,a=">",o=">=";break;case"<":c=wl,i=Wa,s=Sl,a="<",o="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ca(e,l,n))return!1;for(let g=0;g<l.set.length;++g){const b=l.set[g];let G=null,J=null;if(b.forEach(W=>{W.semver===Ga&&(W=new Xn(">=0.0.0")),G=G||W,J=J||W,c(W.semver,G.semver,n)?G=W:s(W.semver,J.semver,n)&&(J=W)}),G.operator===a||G.operator===o||(!J.operator||J.operator===a)&&i(e,J.semver))return!1;if(J.operator===o&&s(e,J.semver))return!1}return!0};var sl=pa;const Xa=sl,fa=(e,l,t)=>Xa(e,l,">",t);var Ra=fa;const Va=sl,Aa=(e,l,t)=>Va(e,l,"<",t);var Ya=Aa;const El=he(),xa=(e,l,t)=>(e=new El(e,t),l=new El(l,t),e.intersects(l,t));var Ja=xa;const Ba=xt,ya=Ce;var Fa=(e,l,t)=>{const n=[];let c=null,i=null;const s=e.sort((b,G)=>ya(b,G,t));for(const b of s)Ba(b,l,t)?(i=b,c||(c=b)):(i&&n.push([c,i]),i=null,c=null);c&&n.push([c,null]);const a=[];for(const[b,G]of n)b===G?a.push(b):!G&&b===s[0]?a.push("*"):G?b===s[0]?a.push(`<=${G}`):a.push(`${b} - ${G}`):a.push(`>=${b}`);const o=a.join(" || "),g=typeof l.raw=="string"?l.raw:String(l);return o.length<g.length?o:l};const Kl=he(),ol=Yt(),{ANY:wt}=ol,Le=xt,rl=Ce,Ha=(e,l,t={})=>{if(e===l)return!0;e=new Kl(e,t),l=new Kl(l,t);let n=!1;e:for(const c of e.set){for(const i of l.set){const s=va(c,i,t);if(n=n||s!==null,s)continue e}if(n)return!1}return!0},Na=[new ol(">=0.0.0-0")],Ql=[new ol(">=0.0.0")],va=(e,l,t)=>{if(e===l)return!0;if(e.length===1&&e[0].semver===wt){if(l.length===1&&l[0].semver===wt)return!0;t.includePrerelease?e=Na:e=Ql}if(l.length===1&&l[0].semver===wt){if(t.includePrerelease)return!0;l=Ql}const n=new Set;let c,i;for(const W of e)W.operator===">"||W.operator===">="?c=zl(c,W,t):W.operator==="<"||W.operator==="<="?i=Ul(i,W,t):n.add(W.semver);if(n.size>1)return null;let s;if(c&&i){if(s=rl(c.semver,i.semver,t),s>0)return null;if(s===0&&(c.operator!==">="||i.operator!=="<="))return null}for(const W of n){if(c&&!Le(W,String(c),t)||i&&!Le(W,String(i),t))return null;for(const x of l)if(!Le(W,String(x),t))return!1;return!0}let a,o,g,b,G=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,J=c&&!t.includePrerelease&&c.semver.prerelease.length?c.semver:!1;G&&G.prerelease.length===1&&i.operator==="<"&&G.prerelease[0]===0&&(G=!1);for(const W of l){if(b=b||W.operator===">"||W.operator===">=",g=g||W.operator==="<"||W.operator==="<=",c){if(J&&W.semver.prerelease&&W.semver.prerelease.length&&W.semver.major===J.major&&W.semver.minor===J.minor&&W.semver.patch===J.patch&&(J=!1),W.operator===">"||W.operator===">="){if(a=zl(c,W,t),a===W&&a!==c)return!1}else if(c.operator===">="&&!Le(c.semver,String(W),t))return!1}if(i){if(G&&W.semver.prerelease&&W.semver.prerelease.length&&W.semver.major===G.major&&W.semver.minor===G.minor&&W.semver.patch===G.patch&&(G=!1),W.operator==="<"||W.operator==="<="){if(o=Ul(i,W,t),o===W&&o!==i)return!1}else if(i.operator==="<="&&!Le(i.semver,String(W),t))return!1}if(!W.operator&&(i||c)&&s!==0)return!1}return!(c&&g&&!i&&s!==0||i&&b&&!c&&s!==0||J||G)},zl=(e,l,t)=>{if(!e)return l;const n=rl(e.semver,l.semver,t);return n>0?e:n<0||l.operator===">"&&e.operator===">="?l:e},Ul=(e,l,t)=>{if(!e)return l;const n=rl(e.semver,l.semver,t);return n<0?e:n>0||l.operator==="<"&&e.operator==="<="?l:e};var ka=Ha;const Et=nt,jl=Rt,Sa=ce,Ll=Cn,wa=Ue,Ea=Lc,Ka=Mc,Qa=Pc,za=_c,Ua=ti,ja=ci,La=si,Ta=di,$a=Ce,Ma=ui,Oa=Ii,Pa=nl,Da=pi,_a=Ri,qa=At,es=cl,ts=hn,ls=Wn,ns=il,cs=al,is=pn,as=$i,ss=Yt(),os=he(),rs=xt,ds=ea,gs=ca,bs=oa,Zs=ga,us=ua,ms=sl,Gs=Ra,Is=Ya,Cs=Ja,hs=Fa,Ws=ka;var ps={parse:wa,valid:Ea,clean:Ka,inc:Qa,diff:za,major:Ua,minor:ja,patch:La,prerelease:Ta,compare:$a,rcompare:Ma,compareLoose:Oa,compareBuild:Pa,sort:Da,rsort:_a,gt:qa,lt:es,eq:ts,neq:ls,gte:ns,lte:cs,cmp:is,coerce:as,Comparator:ss,Range:os,satisfies:rs,toComparators:ds,maxSatisfying:gs,minSatisfying:bs,minVersion:Zs,validRange:us,outside:ms,gtr:Gs,ltr:Is,intersects:Cs,simplifyRange:hs,subset:Ws,SemVer:Sa,re:Et.re,src:Et.src,tokens:Et.t,SEMVER_SPEC_VERSION:jl.SEMVER_SPEC_VERSION,RELEASE_TYPES:jl.RELEASE_TYPES,compareIdentifiers:Ll.compareIdentifiers,rcompareIdentifiers:Ll.rcompareIdentifiers},Xs=ps;const fs=Jc(Xs),fn=e=>e!=null&&e.includes(" ")?`"${e}"`:`${e??"pandoc"}`;async function Rs(e,l){e=fn(e);let t=await Qt(`${e} --version`,{env:l});t=t.substring(0,t.indexOf(`
`)).replace("pandoc.exe","").replace("pandoc","").trim();let n=[...t].filter(c=>c===".").length;for(;n>2;)t=t.substring(0,t.lastIndexOf(".")),n-=1;return fs.parse(t)}const Vs="3.1.7",Zt={normalizePath:fn,getVersion:Rs,requiredVersion:Vs};async function Rn(e,l,t,n,c,i,s,a,o,g){const{settings:b,lang:G,manifest:J,app:{vault:{adapter:W,config:x},loadProgress:L,metadataCache:u}}=e;if(!n){const le=Dl(c);n=`${l.basename}${le}`}i==null&&(i=b.showOverwriteConfirmation);const j=b.showExportProgressBar,w=W.getBasePath(),E=`${w}/${J.dir}`,M=`${E}/lua`,K=t,ie=`${K}/${n}`,ge=n.substring(0,n.lastIndexOf(".")),p=n,X=W.getFullPath(l.path),R=oe.dirname(X),v=l.basename,be=l.name;let C=x.attachmentFolderPath??"/";C==="/"?C=w:C.startsWith(".")?C=oe.join(R,C.substring(1)):C=oe.join(w,C);let f=null;try{f=u.getCache(l.path).frontmatter}catch(le){console.error(le)}const V={pluginDir:E,luaDir:M,outputDir:K,outputPath:ie,outputFileName:ge,outputFileFullName:p,currentDir:R,currentPath:X,currentFileName:v,currentFileFullName:be,attachmentFolderPath:C,vaultDir:w,metadata:f,options:s,fromFormat:app.vault.config.useMarkdownLinks?"markdown":"markdown+wikilinks_title_after_pipe"},H=c.type==="custom"&&c.showCommandOutput,N=c.openExportedFileLocation??b.openExportedFileLocation,y=c.openExportedFile??b.openExportedFile;if(i&&Jt.existsSync(ie)){const le=await ye.remote.dialog.showSaveDialog({title:G.overwriteConfirmationDialog.title(p),defaultPath:ie,properties:["showOverwriteConfirmation","createDirectory"]});if(le.canceled)return;V.outputPath=le.filePath,V.outputDir=oe.dirname(V.outputPath),V.outputFileFullName=oe.basename(V.outputPath),V.outputFileName=oe.basename(V.outputFileFullName,oe.extname(V.outputFileFullName))}j&&(L.setMessage(G.preparing(V.outputFileFullName)),g==null||g(),L.show());const k=V.env=_l(de(b.env)??{},V);let Q=Zt.normalizePath(de(b.pandocPath));if(pt.platform==="win32"){Q=Q.replaceAll("\\","/");const le=["pluginDir","luaDir","outputDir","outputPath","currentDir","currentPath","attachmentFolderPath","vaultDir"];for(const Xe of le){const He=V[Xe];V[Xe]=He.replaceAll("\\","/")}}const S=c.type==="pandoc"?`${Q} "\${currentPath}" ${c.arguments??""} ${c.customArguments??""}`:c.command,z=zt(S,V),_=lt(z.match(/(?:[^\s"]+|"[^"]*")+/g),{alias:{output:["o"]}}),A=oe.normalize(En(_.output)),Ze=oe.dirname(A);Jt.existsSync(Ze)||Jt.mkdirSync(Ze);try{console.log(`[${e.manifest.name}]: export command and options:`,{cmd:z,options:{cwd:V.currentDir,env:k}}),await Qt(z,{cwd:V.currentDir,env:k}),j&&L.hide();const le=async()=>{if(N&&setTimeout(()=>{ye.remote.shell.showItemInFolder(A)},1e3),y&&await ye.remote.shell.openPath(A),c.type==="pandoc"&&c.runCommand===!0&&c.command){const Xe=zt(c.command,V);await Qt(Xe,{cwd:V.currentDir,env:k})}a&&a()};if(H){const Xe=new Rl(app,G.exportCommandOutputMessage(z));Xe.onClose=le,Xe.open()}else new Ge.Notice(G.exportSuccessNotice(V.outputFileFullName),1500),await le()}catch(le){L.hide(),new Rl(app,G.exportErrorOutputMessage(z,le)).open(),o&&o()}}const Mt=e=>{const l=new Ge.Modal(e.app);let t=[],n=!1;return Ye(()=>{se(l.titleEl,()=>e.title)}),Ye(()=>{se(l.contentEl,()=>e.children)}),Ye(()=>{const c=Object.entries(e.classList??{}).filter(([,i])=>i).map(([i])=>i);t.length>0&&l.containerEl.removeClasses(t),c.length>0&&l.containerEl.addClasses(c),t=c}),Ye(()=>{l.containerEl.style.display=e.hidden?"None":""}),l.onClose=()=>{n||(n=!0,e.onClose())},tn(()=>l.open()),et(()=>{n||l.close()}),document.createTextNode("")};var As=Ie("<button>");const Ot=e=>(()=>{var l=As();return qt(l,"click",e.onClick,!0),se(l,()=>e.children),ee(()=>l.classList.toggle("mod-cta",!!e.cta)),l})();_t(["click"]);var Ys=Ie("<div><div class=setting-item-info><div class=setting-item-name></div><div class=setting-item-description></div></div><div class=setting-item-control>"),xs=Ie("<div class=checkbox-container><input type=checkbox>"),Js=Ie("<div class=setting-editor-extra-setting-button>"),Bs=Ie("<input type=text>"),ys=Ie("<textarea>"),Fs=Ie("<select class=dropdown>"),Hs=Ie("<option>");const Vn=Ln(),Ns=()=>Tn(Vn),U=e=>{const l={settingEl:null};return I(Vn.Provider,{value:l,get children(){var t=Ys(),n=t.firstChild,c=n.firstChild,i=c.nextSibling,s=n.nextSibling;return tl(a=>l.settingEl=a,t),se(c,()=>e.name),se(i,()=>e.description),se(s,()=>e.children),ee(a=>{var o=`setting-item ${e.class??""}`.trimEnd(),g=!!e.heading,b=!!e.disabled;return o!==a.e&&gn(t,a.e=o),g!==a.t&&t.classList.toggle("setting-item-heading",a.t=g),b!==a.a&&t.classList.toggle("is-disable",a.a=b),a},{e:void 0,t:void 0,a:void 0}),t}})},me=e=>{const l=Ns();return tn(()=>{l.settingEl.addClass("mod-toggle")}),et(()=>{l.settingEl.removeClass("mod-toggle")}),(()=>{var t=xs();return t.$$click=()=>e.onChange&&e.onChange(!e.checked),ee(()=>t.classList.toggle("is-enabled",!!e.checked)),t})()},Be=e=>(()=>{var l=Js();return qt(l,"click",e.onClick,!0),tl(t=>e.icon&&wn.setIcon(t,e.icon),l),ee(t=>{var n=!!(e.icon&&e.onClick),c=e.tooltip;return n!==t.e&&l.classList.toggle("clickable-icon",t.e=n),c!==t.t&&Je(l,"aria-label",t.t=c),t},{e:void 0,t:void 0}),l})(),re=e=>(()=>{var l=Bs();return l.addEventListener("change",t=>{var n;return(n=e.onChange)==null?void 0:n.call(e,t.target.value)}),ee(t=>{var n=e.title,c=e.readOnly,i=e.placeholder,s=e.spellcheck??!1,a=e.style,o=e.disabled;return n!==t.e&&Je(l,"title",t.e=n),c!==t.t&&(l.readOnly=t.t=c),i!==t.a&&Je(l,"placeholder",t.a=i),s!==t.o&&Je(l,"spellcheck",t.o=s),t.i=el(l,a,t.i),o!==t.n&&(l.disabled=t.n=o),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),ee(()=>l.value=e.value),l})(),vs=e=>(()=>{var l=ys();return l.addEventListener("change",t=>{var n;return(n=e.onChange)==null?void 0:n.call(e,t.target.value)}),ee(t=>{var n=e.placeholder,c=e.spellcheck??!1,i=e.style,s=e.disabled;return n!==t.e&&Je(l,"placeholder",t.e=n),c!==t.t&&Je(l,"spellcheck",t.t=c),t.a=el(l,i,t.a),s!==t.o&&(l.disabled=t.o=s),t},{e:void 0,t:void 0,a:void 0,o:void 0}),ee(()=>l.value=e.value),l})(),Pe=e=>(()=>{var l=Fs();return l.addEventListener("change",t=>{var n;return(n=e.onChange)==null?void 0:n.call(e,t.target.value,t.target.selectedIndex)}),l.autofocus=!0,se(l,I(dn,{get each(){return e.options},children:t=>(()=>{var n=Hs();return se(n,()=>t.name??t.value),ee(()=>n.selected=t.value===e.selected),ee(()=>n.value=t.value),n})()})),l})();_t(["click"]);var ks=Ie("<div>Unsupported <!> ");const rt={checkbox:e=>I(U,{get name(){return e.meta.title},get description(){return e.meta.description},get children(){return I(me,{get checked(){return $e(e.meta)},get onChange(){return e.onChange}})}}),textInput:e=>I(U,{get name(){return e.meta.title},get description(){return e.meta.description},get children(){return I(re,{get value(){return $e(e.meta)},get onChange(){return e.onChange}})}}),dropdown:e=>I(U,{get name(){return e.meta.title},get description(){return e.meta.description},get children(){return I(Pe,{get selected(){return $e(e.meta)},get options(){return e.meta.options},onChange:l=>e.onChange(l)})}}),fileSelectDialog:e=>{const[l,t]=ae($e(e.meta)),n=async()=>{const c=await Ol.remote.dialog.showOpenDialog({properties:["openFile"],filters:e.meta.filters});!c.canceled&&c.filePaths.length>0&&(t(c.filePaths[0]),e.onChange&&e.onChange(O(l)))};return I(U,{get name(){return e.meta.title},get description(){return e.meta.description},get children(){return[I(re,{get value(){return l()??""},readOnly:!0}),I(Be,{icon:"folder",onClick:n})]}})}},Ss=(e,l)=>{switch(e.type){case"checkbox":{const t=rt[e.type];return I(t,{meta:e,onChange:l})}case"dropdown":{const t=rt[e.type];return I(t,{meta:e,onChange:l})}case"textInput":{const t=rt[e.type];return I(t,{meta:e,onChange:l})}case"fileSelectDialog":{const t=rt[e.type];return I(t,{meta:e,onChange:l})}default:return(()=>{var t=ks(),n=t.firstChild,c=n.nextSibling;return c.nextSibling,se(t,()=>JSON.stringify(e),c),t})()}},ws=e=>{let l={};Ye(()=>l=e.value??An(e.meta));const t=(c,i)=>{l[c]=i,e.onChange&&e.onChange(l,c)},n=(c,i)=>{const s=o=>t(c,o);let a;return e.customEditor&&(a=e.customEditor(i,s),a)?a:Ss(i,s)};return I(dn,{get each(){return Object.entries(e.meta)},children:([c,i])=>n(c,i)})},An=e=>Object.fromEntries(Object.entries(e).map(([l,t])=>[l,$e(t)])),$e=e=>{if(e.default)return e.default instanceof Function?e.default():e.default};var Es=Ie("<div class=modal-button-container>");const Ks=e=>{var p;const{plugin:{app:l,settings:t,lang:n},currentFile:c}=e,[i,s]=ae(!1),[a,o]=ae(t.showOverwriteConfirmation),[g,b]=ae(t.lastExportType??((p=t.items.first())==null?void 0:p.name)),[G,J]=ae({}),W=q(()=>t.items.find(X=>X.name===g())),x=q(()=>Dl(W())),L=q(()=>n.exportDialog.title(W().name)),u=q(()=>zn(W().optionsMeta)),[j,w]=ae(`${de(t.lastExportDirectory)??ye.remote.app.getPath("documents")}`),[E,M]=ae(`${c.basename}${x()}`);Ye(()=>{const X=u();J(X?An(X):{})}),Ye(()=>{let X=O(E);X=X.includes(".")?X.substring(0,X.lastIndexOf(".")):X,M(`${X}${x()}`)});const K=t.items.map(X=>({name:X.name,value:X.name}));if(t.defaultExportDirectoryMode==="Same"){const X=c.vault.adapter.getBasePath()+"/"+c.parent.path;w(X)}else t.defaultExportDirectoryMode==="Custom"&&w(de(t.customDefaultExportDirectory));const ie=async()=>{var R;const X=await ye.remote.dialog.showOpenDialog({title:n.exportDialog.selectExportFolder,defaultPath:j(),properties:["createDirectory","openDirectory"]});!X.canceled&&((R=X.filePaths)==null?void 0:R.length)>0&&w(X.filePaths[0])},ge=async()=>{const X=e.plugin;s(!0),await Rn(X,c,O(j),O(E),O(W),O(a),G(),async()=>{t.showOverwriteConfirmation=O(a),t.lastExportDirectory=Ae(t.lastExportDirectory,O(j)),t.lastExportType=O(W).name,await X.saveSettings(),e.onClose&&e.onClose()},()=>{s(!1)})};return I(Mt,{app:l,get title(){return L()},get hidden(){return i()},get onClose(){return e.onClose},get children(){return[I(U,{get name(){return n.exportDialog.type},get children(){return I(Pe,{options:K,onChange:X=>b(X),get selected(){return g()}})}}),I(U,{get name(){return n.exportDialog.fileName},get children(){return I(re,{get title(){return E()},get value(){return E()},onChange:X=>M(X)})}}),I(bt,{get when(){return u()},get children(){return I(ws,{get meta(){return u()},get value(){return G()},onChange:X=>J(X)})}}),I(U,{get name(){return n.exportDialog.exportTo},get children(){return[I(re,{get title(){return j()},get value(){return j()},disabled:!0}),I(Be,{icon:"folder",onClick:ie})]}}),I(U,{get name(){return n.exportDialog.overwriteConfirmation},class:"mod-toggle",get children(){return I(me,{get checked(){return a()},onChange:o})}}),(()=>{var X=Es();return se(X,I(Ot,{cta:!0,onClick:ge,get children(){return n.exportDialog.export}})),X})()]}})},Qs=(e,l)=>Oe(t=>{let n=!1;const c=()=>{n||(n=!0,t())},i=se(document.body,()=>I(Ks,{onClose:c,plugin:e,currentFile:l}));return et(()=>{i instanceof Node&&document.body.contains(i)&&document.body.removeChild(i)}),c}),Kt={show:Qs},Ct=Symbol("store-raw"),Se=Symbol("store-node"),Ve=Symbol("store-has"),Yn=Symbol("store-self");function xn(e){let l=e[pe];if(!l&&(Object.defineProperty(e,pe,{value:l=new Proxy(e,js)}),!Array.isArray(e))){const t=Object.keys(e),n=Object.getOwnPropertyDescriptors(e);for(let c=0,i=t.length;c<i;c++){const s=t[c];n[s].get&&Object.defineProperty(e,s,{enumerable:n[s].enumerable,get:n[s].get.bind(l)})}}return l}function Ee(e){let l;return e!=null&&typeof e=="object"&&(e[pe]||!(l=Object.getPrototypeOf(e))||l===Object.prototype||Array.isArray(e))}function Ke(e,l=new Set){let t,n,c,i;if(t=e!=null&&e[Ct])return t;if(!Ee(e)||l.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):l.add(e);for(let s=0,a=e.length;s<a;s++)c=e[s],(n=Ke(c,l))!==c&&(e[s]=n)}else{Object.isFrozen(e)?e=Object.assign({},e):l.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let o=0,g=s.length;o<g;o++)i=s[o],!a[i].get&&(c=e[i],(n=Ke(c,l))!==c&&(e[i]=n))}return e}function ht(e,l){let t=e[l];return t||Object.defineProperty(e,l,{value:t=Object.create(null)}),t}function _e(e,l,t){if(e[l])return e[l];const[n,c]=ae(t,{equals:!1,internal:!0});return n.$=c,e[l]=n}function zs(e,l){const t=Reflect.getOwnPropertyDescriptor(e,l);return!t||t.get||!t.configurable||l===pe||l===Se||(delete t.value,delete t.writable,t.get=()=>e[pe][l]),t}function Jn(e){jt()&&_e(ht(e,Se),Yn)()}function Us(e){return Jn(e),Reflect.ownKeys(e)}const js={get(e,l,t){if(l===Ct)return e;if(l===pe)return t;if(l===Ut)return Jn(e),t;const n=ht(e,Se),c=n[l];let i=c?c():e[l];if(l===Se||l===Ve||l==="__proto__")return i;if(!c){const s=Object.getOwnPropertyDescriptor(e,l);jt()&&(typeof i!="function"||e.hasOwnProperty(l))&&!(s&&s.get)&&(i=_e(n,l,i)())}return Ee(i)?xn(i):i},has(e,l){return l===Ct||l===pe||l===Ut||l===Se||l===Ve||l==="__proto__"?!0:(jt()&&_e(ht(e,Ve),l)(),l in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Us,getOwnPropertyDescriptor:zs};function Qe(e,l,t,n=!1){if(!n&&e[l]===t)return;const c=e[l],i=e.length;t===void 0?(delete e[l],e[Ve]&&e[Ve][l]&&c!==void 0&&e[Ve][l].$()):(e[l]=t,e[Ve]&&e[Ve][l]&&c===void 0&&e[Ve][l].$());let s=ht(e,Se),a;if((a=_e(s,l,c))&&a.$(()=>t),Array.isArray(e)&&e.length!==i){for(let o=e.length;o<i;o++)(a=s[o])&&a.$();(a=_e(s,"length",i))&&a.$(e.length)}(a=s[Yn])&&a.$()}function Bn(e,l){const t=Object.keys(l);for(let n=0;n<t.length;n+=1){const c=t[n];Qe(e,c,l[c])}}function Ls(e,l){if(typeof l=="function"&&(l=l(e)),l=Ke(l),Array.isArray(l)){if(e===l)return;let t=0,n=l.length;for(;t<n;t++){const c=l[t];e[t]!==c&&Qe(e,t,c)}Qe(e,"length",n)}else Bn(e,l)}function Me(e,l,t=[]){let n,c=e;if(l.length>1){n=l.shift();const s=typeof n,a=Array.isArray(e);if(Array.isArray(n)){for(let o=0;o<n.length;o++)Me(e,[n[o]].concat(l),t);return}else if(a&&s==="function"){for(let o=0;o<e.length;o++)n(e[o],o)&&Me(e,[o].concat(l),t);return}else if(a&&s==="object"){const{from:o=0,to:g=e.length-1,by:b=1}=n;for(let G=o;G<=g;G+=b)Me(e,[G].concat(l),t);return}else if(l.length>1){Me(e[n],l,[n].concat(t));return}c=e[n],t=[n].concat(t)}let i=l[0];typeof i=="function"&&(i=i(c,t),i===c)||n===void 0&&i==null||(i=Ke(i),n===void 0||Ee(c)&&Ee(i)&&!Array.isArray(i)?Bn(c,i):Qe(e,n,i))}function Ts(...[e,l]){const t=Ke(e||{}),n=Array.isArray(t),c=xn(t);function i(...s){gt(()=>{n&&s.length===1?Ls(t,s[0]):Me(t,s)})}return[c,i]}const Wt=new WeakMap,yn={get(e,l){if(l===Ct)return e;const t=e[l];let n;return Ee(t)?Wt.get(t)||(Wt.set(t,n=new Proxy(t,yn)),n):t},set(e,l,t){return Qe(e,l,Ke(t)),!0},deleteProperty(e,l){return Qe(e,l,void 0,!0),!0}};function $s(e){return l=>{if(Ee(l)){let t;(t=Wt.get(l))||Wt.set(l,t=new Proxy(l,yn)),e(t)}return l}}var Tl=Ie("<div class=modal-button-container>");const Ms=e=>{const{plugin:l,lang:t}=e,[n,c]=Ts(l.settings),[i,s]=ae(),a=q(()=>Object.entries(Object.assign({},de(De),de(n.env)??{})).map(([p,X])=>`${p}="${X}"`).join(`
`)),o=(...p)=>{c(...p),l.saveSettings()},g=p=>{try{const X={};for(let R of p.split(`
`)){R=R.trim();const v=R.indexOf("=");if(v>0){const be=R.substring(0,v);let C=R.substring(v+1).trim();C.startsWith('"')&&C.endsWith('"')&&(C=C.substring(1,C.length-1)),X[be]=C}}o("env",Ae(n.env??{},X))}catch(X){alert(X)}},b=q(()=>n.items.find(p=>p.name===n.lastEditName)??n.items.first()),G=p=>{const X=b();return p===void 0||p===X.type?X:void 0},J=q(()=>de(n.customDefaultExportDirectory)),W=p=>{const X=n.items.findIndex(R=>R.name===n.lastEditName);o("items",X===-1?0:X,$s(R=>(p(R),R)))},x=q(()=>{const p=i();return p?app.vault.config.useMarkdownLinks&&p.compare(Zt.requiredVersion)===-1?t.settingTab.pandocVersionWithWarning(Zt.requiredVersion):t.settingTab.pandocVersion(p):t.settingTab.pandocNotFound}),[L,u]=ae(),j=()=>{const[p,X]=ae(Object.keys(dt)[0]),[R,v]=ae(),be=()=>{const C=JSON.parse(JSON.stringify(dt[p()]));C.name=R(),gt(()=>{o("items",f=>[...f,C]),o("lastEditName",C.name)}),u(void 0)};return I(Mt,{app,get title(){return t.settingTab.new},onClose:()=>u(void 0),get children(){return[I(U,{get name(){return t.settingTab.template},get children(){return I(Pe,{get options(){return Object.entries(dt).map(([C,f])=>({name:f.name,value:C}))},get selected(){return R()??p()},onChange:C=>X(C)})}}),I(U,{get name(){return t.settingTab.name},get children(){return I(re,{get value(){return R()??""},onChange:C=>v(C)})}}),(()=>{var C=Tl();return se(C,I(Ot,{cta:!0,onClick:be,get children(){return t.settingTab.save}})),C})()]}})},w=()=>{const[p,X]=ae(G().name),R=()=>{gt(()=>{W(v=>v.name=p()),o("lastEditName",p())}),u(void 0)};return I(Mt,{app,get title(){return t.settingTab.rename},onClose:()=>u(void 0),get children(){return[I(U,{get name(){return t.settingTab.name},get children(){return I(re,{get value(){return p()??""},onChange:v=>X(v)})}}),(()=>{var v=Tl();return se(v,I(Ot,{cta:!0,onClick:R,get children(){return t.settingTab.add}})),v})()]}})},E=()=>{const p=()=>G("pandoc"),X=R=>{W(v=>v.type==="pandoc"?R(v):void 0)};return[I(U,{get name(){return t.settingTab.arguments},get children(){return I(re,{style:"width: 100%",get value(){return p().arguments??""},onChange:R=>X(v=>v.arguments=R)})}}),I(U,{get name(){return t.settingTab.extraArguments},get children(){return I(re,{style:"width: 100%",get value(){return p().customArguments??""},get title(){return p().customArguments},onChange:R=>X(v=>v.customArguments=R)})}}),I(U,{get name(){return t.settingTab.afterExport},heading:!0}),I(U,{get name(){return t.settingTab.openExportedFileLocation},get children(){return I(me,{get checked(){return p().openExportedFileLocation??!1},onChange:R=>X(v=>v.openExportedFileLocation=R)})}}),I(U,{get name(){return t.settingTab.openExportedFile},get children(){return I(me,{get checked(){return p().openExportedFile??!1},onChange:R=>X(v=>v.openExportedFile=R)})}}),I(U,{get name(){return t.settingTab.runCommand},get children(){return I(me,{get checked(){return p().runCommand},onChange:R=>X(v=>v.runCommand=R)})}}),I(bt,{get when(){return p().runCommand},get children(){return I(U,{get children(){return I(re,{style:"width: 100%",get value(){return p().command??""},onChange:R=>X(v=>v.command=R)})}})}})]},M=()=>{const p=()=>G("custom"),X=R=>{W(v=>v.type==="custom"?R(v):void 0)};return[I(U,{get name(){return t.settingTab.command},get children(){return I(re,{style:"width: 100%",get value(){return p().command},onChange:R=>X(v=>v.command=R)})}}),I(U,{get name(){return t.settingTab.targetFileExtensions},get children(){return I(re,{get value(){return p().targetFileExtensions??""},onChange:R=>X(v=>v.targetFileExtensions=R)})}}),I(U,{get name(){return t.settingTab.afterExport},heading:!0}),I(U,{get name(){return t.settingTab.showCommandOutput},get children(){return I(me,{get checked(){return p().showCommandOutput??!1},onChange:R=>X(v=>v.showCommandOutput=R)})}}),I(U,{get name(){return t.settingTab.openExportedFileLocation},get children(){return I(me,{get checked(){return p().openExportedFileLocation??!1},onChange:R=>X(v=>v.openExportedFileLocation=R)})}}),I(U,{get name(){return t.settingTab.openExportedFile},get children(){return I(me,{get checked(){return p().openExportedFile??!1},onChange:R=>X(v=>v.openExportedFile=R)})}})]},K=async()=>{await l.resetSettings(),o(l.settings)},ie=async()=>{const p=await ye.remote.dialog.showOpenDialog({defaultPath:J()??ye.remote.app.getPath("documents"),properties:["createDirectory","openDirectory"]});!p.canceled&&p.filePaths.length>0&&o("customDefaultExportDirectory",X=>Ae(X,p.filePaths[0]))},ge=async()=>{const p=await ye.remote.dialog.showOpenDialog({filters:pt.platform=="win32"?[{extensions:["exe"],name:"pandoc"}]:void 0,properties:["openFile"]});!p.canceled&&p.filePaths.length>0&&o("pandocPath",X=>Ae(X,p.filePaths[0]))};return Ye(async()=>{try{const p=_l(de(n.env)??{});s(await Zt.getVersion(de(n.pandocPath),p))}catch{s(void 0)}}),[I(U,{get name(){return t.settingTab.general},heading:!0,get children(){return I(Be,{icon:"reset",onClick:K})}}),I(U,{get name(){return t.settingTab.pandocPath},get description(){return x()},get children(){return[I(re,{get placeholder(){return t.settingTab.pandocPathPlaceholder},get value(){return de(n.pandocPath)??""},onChange:p=>o("pandocPath",X=>Ae(X,p))}),I(Be,{icon:"folder",onClick:ge})]}}),I(U,{get name(){return t.settingTab.defaultFolderForExportedFile},get children(){return I(Pe,{get options(){return[{name:t.settingTab.auto,value:"Auto"},{name:t.settingTab.sameFolderWithCurrentFile,value:"Same"},{name:t.settingTab.customLocation,value:"Custom"}]},get selected(){return n.defaultExportDirectoryMode},onChange:p=>o("defaultExportDirectoryMode",p)})}}),I(bt,{get when(){return n.defaultExportDirectoryMode==="Custom"},get children(){return I(U,{get children(){return[I(re,{get value(){return J()??""},get title(){return J()}}),I(Be,{icon:"folder",onClick:ie})]}})}}),I(U,{get name(){return t.settingTab.openExportedFileLocation},get children(){return I(me,{get checked(){return n.openExportedFileLocation},onChange:p=>o("openExportedFileLocation",p)})}}),I(U,{get name(){return t.settingTab.openExportedFile},get children(){return I(me,{get checked(){return n.openExportedFile},onChange:p=>o("openExportedFile",p)})}}),I(U,{get name(){return t.settingTab.ShowExportProgressBar},get children(){return I(me,{get checked(){return n.showExportProgressBar},onChange:p=>o("showExportProgressBar",p)})}}),I(U,{get name(){return t.settingTab.editCommandTemplate},heading:!0}),I(U,{get name(){return t.settingTab.chooseCommandTemplate},get children(){return[I(Pe,{get options(){return n.items.map(p=>({name:p.name,value:p.name}))},get selected(){return n.lastEditName},onChange:p=>o("lastEditName",p)}),I(Be,{icon:"plus",get tooltip(){return t.settingTab.add},onClick:()=>u(()=>j)}),I(Be,{icon:"pencil",get tooltip(){return t.settingTab.rename},onClick:()=>u(()=>w)}),I(Be,{icon:"trash",get tooltip(){return t.settingTab.remove},onClick:()=>gt(()=>{var p;o("items",X=>X.filter(R=>{var v;return R.name!==((v=G())==null?void 0:v.name)})),o("lastEditName",(p=n.items.first())==null?void 0:p.name)})})]}}),I(tc,{get children(){return[I(Gl,{get when(){return G("pandoc")},get children(){return I(E,{})}}),I(Gl,{get when(){return G("custom")},get children(){return I(M,{})}})]}}),I(U,{get name(){return t.settingTab.advanced},heading:!0}),I(U,{get name(){return t.settingTab.environmentVariables},get description(){return t.settingTab.environmentVariablesDesc},get children(){return I(vs,{style:"width: 100%;height: 5em",get value(){return a()},onChange:g})}}),I(bt,{get when(){return L()},get children(){return I(Wc,{get component(){return L()},ref:p=>document.body.appendChild(p)})}})]};var qe;class Os extends Ge.PluginSettingTab{constructor(t){super(t.app,t);bl(this,qe,void 0);this.plugin=t,this.name=this.plugin.lang.settingTab.title}get lang(){return this.plugin.lang}display(){Zl(this,qe,Oe(t=>{const n=this;return se(this.containerEl,I(Ms,{get plugin(){return n.plugin},get lang(){return n.lang}})),et(()=>{this.containerEl.empty()}),t}))}hide(){gl(this,qe).call(this)}}qe=new WeakMap;const Ps=Uint8Array.from(atob("LS0gY3JlZGl0cyB0byB0YXJsZWIg4oCUIFN0YWNrRXhjaGFuZ2U6IGh0dHBzOi8vdGV4LnN0YWNrZXhjaGFuZ2UuY29tL3F1ZXN0aW9ucy8zOTIwNzAvcGFuZG9jLW1hcmtkb3duLWNyZWF0ZS1zZWxmLWNvbnRhaW5lZC1iaWItZmlsZS1mcm9tLWNpdGVkLXJlZmVyZW5jZXMKZnVuY3Rpb24gUGFuZG9jKGQpCiAgZC5tZXRhLnJlZmVyZW5jZXMgPSBwYW5kb2MudXRpbHMucmVmZXJlbmNlcyhkKQogIGQubWV0YS5iaWJsaW9ncmFwaHkgPSBuaWwKICByZXR1cm4gZAplbmQK"),e=>e.charCodeAt(0)),Ds=Object.freeze(Object.defineProperty({__proto__:null,default:Ps},Symbol.toStringTag,{value:"Module"})),_s=Uint8Array.from(atob("cGFja2FnZS5wYXRoPXBhY2thZ2UucGF0aC4uIjsiIC4uZGVidWcuZ2V0aW5mbygxKS5zb3VyY2U6bWF0Y2goIiguKlsvXFxdKSIpOnN1YigyKSAuLiAiPy5sdWEiCgpNb2RlPSdodWdvJwoKcmVxdWlyZSgnbWFya2Rvd24nKQ=="),e=>e.charCodeAt(0)),qs=Object.freeze(Object.defineProperty({__proto__:null,default:_s},Symbol.toStringTag,{value:"Module"})),eo=Uint8Array.from(atob("cGFja2FnZS5wYXRoPWRlYnVnLmdldGluZm8oMSkuc291cmNlOmdzdWIoJ0AnLCcnKTpzdWIoMCk6bWF0Y2goJyguKlsvXFxdKScpOnN1YigwKSAuLiAnPy5sdWEnIC4uICc7JyAuLiBwYWNrYWdlLnBhdGgKCnJlcXVpcmUoInBvbHlmaWxsIikKbG9jYWwgdXJsID0gcmVxdWlyZSgndXJsJykKCmxvY2FsIHBhbmRvYz1wYW5kb2MKbG9jYWwgUEFORE9DX1NUQVRFPVBBTkRPQ19TVEFURQoKUEFORE9DX1ZFUlNJT046bXVzdF9iZV9hdF9sZWFzdCAnMy4xLjcnCgpvcy50ZXh0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aXRlbS50ID09ICdTdHInIGFuZCBzdHJpbmcuc3RhcnRzX3dpdGgoaXRlbS50ZXh0LCAnW1sjJykgdGhlbgogICAgICBpbl9zZWN0aW9uX2xpbmsgPSB0cnVlCiAgICAgIHRhYmxlLmluc2VydChsaW5rRGVzY3JpcHRpb24sIHN0cmluZy5zdWIoaXRlbS50ZXh0LCA0KSkKICAgIGVsc2VpZiBpbl9zZWN0aW9uX2xpbmsgdGhlbgogICAgICBpZiBzdHJpbmcuZW5kc193aXRoKGl0ZW0udGV4dCwgJ11dJykgdGhlbgogICAgICAgIHRhYmxlLmluc2VydChsaW5rRGVzY3JpcHRpb24sIHN0cmluZy5zdWIoaXRlbS50ZXh0LCAxLCAtMykpCiAgICAgICAgaW5zZXJ0TGluayhjb250ZW50LCBsaW5rRGVzY3JpcHRpb24pCiAgICAgICAgaW5fc2VjdGlvbl9saW5rID0gZmFsc2UKICAgICAgICBsaW5rRGVzY3JpcHRpb24gPSB7fQogICAgICBlbHNlCiAgICAgICAgdGFibGUuaW5zZXJ0KGxpbmtEZXNjcmlwdGlvbiwgaXRlbS50ZXh0KQogICAgICBlbmQKICAgIGVsc2UKICAgICAgdGFibGUuaW5zZXJ0KGNvbnRlbnQsIGl0ZW0pCiAgICBlbmQKICBlbmQKICByZXR1cm4gY29udGVudAplbmQKCmZ1bmN0aW9uIFBsYWluKGVsKQogIGVsLmNvbnRlbnQgPSBQcm9jZXNzSW50ZXJuYWxMaW5rcyhlbC5jb250ZW50KQogIHJldHVybiBlbAplbmQKCmZ1bmN0aW9uIFBhbmRvYyhlbCkKICByZXR1cm4gZWwKZW5kCg=="),e=>e.charCodeAt(0)),to=Object.freeze(Object.defineProperty({__proto__:null,default:eo},Symbol.toStringTag,{value:"Module"})),lo=Uint8Array.from(atob("dHJhdmVyc2UgPSAndG9wZG93bicKCm1hdGhfYmxvY2tfdGV4dCA9IG5pbApmdW5jdGlvbiBwcm9jZXNzKGVsKQoKICAgLS0gTWF0aEJsb2NrIHN0Y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NzKGVsKQplbmQKCmZ1bmN0aW9uIFN0cihlbCkKICByZXR1cm4gcHJvY2VzcyhlbCkKZW5kCgpmdW5jdGlvbiBTb2Z0QnJlYWsoZWwpCiAgcmV0dXJuIHByb2Nlc3MoZWwpCmVuZAoKZnVuY3Rpb24gSGVhZGVyKGVsKQogIHJldHVybiBwcm9jZXNzKGVsKQplbmQKCmZ1bmN0aW9uIFBhcmEoZWwpCiAgcmV0dXJuIHByb2Nlc3MoZWwpCmVuZAoKZnVuY3Rpb24gUGxhaW4oZWwpCiAgcmV0dXJuIHByb2Nlc3MoZWwpCmVuZAoKZnVuY3Rpb24gQnVsbGV0TGlzdChlbCkKICByZXR1cm4gcHJvY2VzcyhlbCkKZW5kCgoKCgoKCg=="),e=>e.charCodeAt(0)),no=Object.freeze(Object.defineProperty({__proto__:null,default:lo},Symbol.toStringTag,{value:"Module"})),co=Uint8Array.from(atob("CnJldHVybiB7CiAgICB7CiAgICAgICAgTWF0aCA9IGZ1bmN0aW9uIChlbGVtKQogICAgICAgICAgICBpZiBlbGVtLnRleHQ6ZmluZCgiXiVzKlxcYmVnaW57Iikgfj0gbmlsIHRoZW4KICAgICAgICAgICAgICAgIHJldHVybiBwYW5kb2MuUmF3SW5saW5lKCd0ZXgnLCBlbGVtLnRleHQpCiAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgIHJldHVybiBlbGVtCiAgICAgICAgICAgIGVuZAogICAgICAgIGVuZCwKICAgIH0KfQo="),e=>e.charCodeAt(0)),io=Object.freeze(Object.defineProperty({__proto__:null,default:co},Symbol.toStringTag,{value:"Module"})),ao=Uint8Array.from(atob("b3MucGxhdGZvcm0gPSBuaWwKaWYgb3MucGxhdGZvcm0gPT0gbmlsIHRoZW4KICBsb2NhbCBsaWJFeHQgPSBwYWNrYWdlLmNwYXRoOm1hdGNoKCIlcFtcXHwvXT9cXC4lcCglYSspIikKICBpZiBsaWJFeHQgPT0gJ2RsbCcgdGhlbgogICAgb3MucGxhdGZvcm0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gXywgY29kZSA9IG9zLmV4ZWN1dGUoJ2lmIGV4aXN0ICInIC4uIHBhdGggLi4gJyIgKGV4aXQgMCkgZWxzZSAoZXhpdCAxKScpCiAgICByZXR1cm4gY29kZSA9PSAwCiAgZWxzZQogICAgbG9jYWwgXywgXywgY29kZSA9IG9zLmV4ZWN1dGUoJ3Rlc3QgLWUgIicgLi4gcGF0aCAuLiAnIicpCiAgICByZXR1cm4gY29kZSA9PSAwCiAgZW5kCmVuZAoKc3RyaW5nLnN0YXJ0c193aXRoID0gZnVuY3Rpb24oc3RyLCBzdGFydCkKICAgcmV0dXJuIHN0cjpzdWIoMSwgI3N0YXJ0KSA9PSBzdGFydAplbmQKCnN0cmluZy5lbmRzX3dpdGggPSBmdW5jdGlvbihzdHIsIGVuZGluZykKICAgcmV0dXJuIGVuZGluZyA9PSAiIiBvciBzdHI6c3ViKC0jZW5kaW5nKSA9PSBlbmRpbmcKZW5kCgoKcmV0dXJuIHsKICBvcyA9IG9zLAogIHN0cmluZyA9IHN0cmluZwp9"),e=>e.charCodeAt(0)),so=Object.freeze(Object.defineProperty({__proto__:null,default:ao},Symbol.toStringTag,{value:"Module"})),oo=Uint8Array.from(atob("bG9jYWwgZnVuY3Rpb24gZW5jb2RlIChzdHIpCiAgc3RyID0gc3RyaW5nLmdzdWIgKHN0ciwgIihbXjAtOWEtekEtWiAhJygpKi5ffi1dKSIsIC0tIGxvY2FsZSBpbmRlcGVuZGVudAogICAgZnVuY3Rpb24gKGMpIHJldHVybiBzdHJpbmcuZm9ybWF0ICgiJSUlMDJYIiwgc3RyaW5nLmJ5dGUoYykpIGVuZCkKICBzdHIgPSBzdHJpbmcuZ3N1YiAoc3RyLCAiICIsICIlJTIwIikKICByZXR1cm4gc3RyCiBlbmQKCgpsb2NhbCBmdW5jdGlvbiBkZWNvZGUgKHN0cikKICBzdHIgPSBzdHJpbmcuZ3N1YiAoc3RyLCAiJSUyMCIsICIgIikKICBzdHIgPSBzdHJpbmcuZ3N1YiAoc3RyLCAiJSUoJXgleCkiLCBmdW5jdGlvbihoKSByZXR1cm4gc3RyaW5nLmNoYXIodG9udW1iZXIoaCwxNikpIGVuZCkKICByZXR1cm4gc3RyCmVuZAoKcmV0dXJuIHsKICBlbmNvZGUgPSBlbmNvZGUsCiAgZGVjb2RlID0gZGVjb2RlCn0="),e=>e.charCodeAt(0)),ro=Object.freeze(Object.defineProperty({__proto__:null,default:oo},Symbol.toStringTag,{value:"Module"})),go=Uint8Array.from(atob("JSUKJSBDb3B5cmlnaHQgKGMpIDIwMTcgLSAyMDIxLCBQYXNjYWwgV2FnbGVyOwolIENvcHlyaWdodCAoYykgMjAxNCAtIDIwMjEsIEpvaG4gTWFjRmFybGFuZQolCiUgQWxsIHJpZ2h0cyByZXNlcnZlZC4KJQolIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dAolIG1vZGlmaWNhdGlvbiwgYXJlIHBlcm1pdHRlZCBwcm92aWRlZCB0aGF0IHRoZSBmb2xsb3dpbmcgY29uZGl0aW9ucwolIGFyZSBtZXQ6CiUKJSAtIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0CiUgbm90aWNlLCB0aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZyBkaXNjbGFpbWVyLgolCiUgLSBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgdGhlIGFib3ZlIGNvcHlyaWdodAolIG5vdGljZSwgdGhpcyBsaXN0IG9mIGNvbmRpdGlvbnMgYW5kIHRoZSBmb2xsb3dpbmcgZGlzY2xhaW1lciBpbiB0aGUKJSBkb2N1bWVudGF0aW9uIGFuZC9vciBvdGhlciBtYXRlcmlhbHMgcHJvdmlkZWQgd2l0aCB0aGUgZ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HJlbmV3Y29tbWFuZFxiaWJuYW1leyRiaWJsaW8tdGl0bGUkfQokZWxzZSQKXHJlbmV3Y29tbWFuZFxyZWZuYW1leyRiaWJsaW8tdGl0bGUkfQokZW5kaWYkCiRlbmRpZiQKJGlmKGJlYW1lcikkClxiZWdpbntmcmFtZX1bYWxsb3dmcmFtZWJyZWFrc117JGJpYmxpby10aXRsZSR9CiAgXGJpYmxpb2dyYXBoeXRydWUKJGVuZGlmJAogIFxiaWJsaW9ncmFwaHl7JGZvcihiaWJsaW9ncmFwaHkpJCRiaWJsaW9ncmFwaHkkJHNlcCQsJGVuZGZvciR9CiRpZihiZWFtZXIpJApcZW5ke2ZyYW1lfQokZW5kaWYkCgokZW5kaWYkCiRlbmRpZiQKJGlmKGJpYmxhdGV4KSQKJGlmKGJlYW1lcikkClxiZWdpbntmcmFtZX1bYWxsb3dmcmFtZWJyZWFrc117JGJpYmxpby10aXRsZSR9CiAgXGJpYmxpb2dyYXBoeXRydWUKICBccHJpbnRiaWJsaW9ncmFwaHlbaGVhZGluZz1ub25lXQpcZW5ke2ZyYW1lfQokZWxzZSQKXHByaW50YmlibGlvZ3JhcGh5JGlmKGJpYmxpby10aXRsZSkkW3RpdGxlPSRiaWJsaW8tdGl0bGUkXSRlbmRpZiQKJGVuZGlmJAoKJGVuZGlmJAokZm9yKGluY2x1ZGUtYWZ0ZXIpJAokaW5jbHVkZS1hZnRlciQKCiRlbmRmb3IkClxlbmR7ZG9jdW1lbnR9"),e=>e.charCodeAt(0)),bo=Object.freeze(Object.defineProperty({__proto__:null,default:go},Symbol.toStringTag,{value:"Module"})),Zo=Uint8Array.from(atob("JSBwYXJ0aWFsIHJld3JpdGUgb2YgdGhlIExhVGVYMmUgcGFja2FnZSBmb3Igc3VibWlzc2lvbnMgdG8gdGhlCiUgQ29uZmVyZW5jZSBvbiBOZXVyYWwgSW5mb3JtYXRpb24gUHJvY2Vzc2luZyBTeXN0ZW1zIChOZXVySVBTKToKJQolIC0gdXNlcyBt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RoRW52aXJvbm1lbnRzRm9yTGluZW5ve2FsaWdufSUKICAgICAgICBccGF0Y2hCb3RoQW1zTWF0aEVudmlyb25tZW50c0ZvckxpbmVub3tmbGFsaWdufSUKICAgICAgICBccGF0Y2hCb3RoQW1zTWF0aEVudmlyb25tZW50c0ZvckxpbmVub3thbGlnbmF0fSUKICAgICAgICBccGF0Y2hCb3RoQW1zTWF0aEVudmlyb25tZW50c0ZvckxpbmVub3tnYXRoZXJ9JQogICAgICAgIFxwYXRjaEJvdGhBbXNNYXRoRW52aXJvbm1lbnRzRm9yTGluZW5ve211bHRsaW5lfSUKICAgICAgfQogICAgICB7fQogICAgfQogIFxmaQpcZmkKCgpcZW5kaW5wdXQK"),e=>e.charCodeAt(0)),uo=Object.freeze(Object.defineProperty({__proto__:null,default:Zo},Symbol.toStringTag,{value:"Module"})),mo=Uint8Array.from(atob("XGRvY3VtZW50Y2xhc3N7YXJ0aWNsZX0KCgolIGlmIHlvdSBuZWVkIHRvIHBhc3Mgb3B0aW9ucyB0byBuYXRiaWIsIHVzZSwgZS5nLjoKJSAgICAgXFBhc3NPcHRpb25zVG9QYWNrYWdle251bWJlcnMsIGNvbXByZXNzfXtuYXRiaWJ9CiUgYmVmb3JlIGxvYWRpbmcgbmV1cmlwc18yMDIzCgoKJSByZWFkeSBmb3Igc3VibWlzc2lvbgpcdXNlcGFja2FnZVtmaW5hbF17bmV1cmlwc30KCgolIHRvIGNvbXBpbGUgYSBwcmVwcmludCB2ZXJzaW9uLCBlLmcuLCBmb3Igc3VibWlzc2lvbiB0byBhclhpdiwgYWRkIGFkZCB0aGUKJSBbcHJlcHJpbnRdIG9wdGlvbjoKJSAgICAgXHVzZXBhY2thZ2VbcHJlcHJpbnRde25ldXJpcHNfMjAyM30KCgolIHRvIGNvbXBpbGUgYSBjYW1lcmEtcmVhZHkgdmVyc2lvbiwgYWRkIHRoZSBbZmluYWxdIG9wdGlvbiwgZS5nLjoKJSAgICAgXHVzZXBhY2thZ2VbZmluYW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mFjdDogInlvdXIgYWJzdHJhY3QgaGVyZSIKICBhdXRob3JzOgogIC0gbmFtZTogTGVvbmFyZG8gVi4gQ2FzdG9yaW5hCiAgICBhZmZpbGlhdGlvbjogU2Nob29sIG9mIEluZm9ybWF0aWNzCiAgICBpbnN0aXR1dGlvbjogVW5pdmVyc2l0eSBvZiBFZGluYnVyZ2gKICAgIGVtYWlsOiBqdXN0YW5lbWFpbEBkb21haW4uZXh0CiAgICBhZGRyZXNzOiBFZGluYnVyZ2gKICAtIG5hbWU6IENvYXV0aG9yCiAgICBhZmZpbGlhdGlvbjogQWZmaWxpYXRpb24KICAgIGluc3RpdHV0aW9uOiBJbnN0aXR1dGlvbgogICAgZW1haWw6IGNvYXV0aG9yQGV4YW1wbGUuY29tCiAgICBhZGRyZXNzOiBBZGRyZXNzCiAgLS0tCiAgXGVuZHt2ZXJiYXRpbX0KICBUaGlzIGlzIGNhbGxlZCBZQU1MIGZyb250bWF0dGVyLiBJZiB5b3Ugc2V0IHlvdXIgYWJzdHJhY3QgY29ycmVjdGx5IHlvdSBzaG91bGQgbm90IHNlZSB0aGlzIG1lc3NhZ2UuCiAgJGVuZGlmJApcZW5ke2Fic3RyYWN0fQoKCiRib2R5JAoKJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlJSUlCgoKXGVuZHtkb2N1bWVudH0="),e=>e.charCodeAt(0)),Go=Object.freeze(Object.defineProperty({__proto__:null,default:mo},Symbol.toStringTag,{value:"Module"})),$l=(e,l)=>[e,Object.entries(l).map(([t,n])=>[t.substring(e.length+3),n.default])],Ml=[$l("lua",Object.assign({"../lua/citefilter.lua":Ds,"../lua/markdown+hugo.lua":qs,"../lua/markdown.lua":to,"../lua/math_block.lua":no,"../lua/pdf.lua":io,"../lua/polyfill.lua":so,"../lua/url.lua":ro})),$l("textemplate",Object.assign({"../textemplate/dissertation.tex":bo,"../textemplate/neurips.sty":uo,"../textemplate/neurips.tex":Go}))];class Io extends Ge.Plugin{constructor(l,t){super(l,t),this.lang=mn.current,this.saveSettings=Ge.debounce(this.saveSettings.bind(this),1e3,!0)}async onload(){await this.releaseResources(),await this.loadSettings();const{lang:l}=this;this.addSettingTab(new Os(this)),this.addCommand({id:"obsidian-enhancing-export:export",name:l.exportToOo,icon:"document",callback:()=>{const t=this.app.workspace.getActiveFile();t?Kt.show(this,t):new Ge.Notice(l.pleaseOpenFile,2e3)}}),this.addCommand({id:"obsidian-enhancing-export:export-with-previous",name:l.exportWithPrevious,icon:"document",callback:async()=>{const t=this.app.workspace.getActiveFile();if(t){if(this.settings.lastExportType&&this.settings.lastExportDirectory){const n=this.settings.items.find(c=>c.name===this.settings.lastExportType);if(n){await Rn(this,t,de(this.settings.lastExportDirectory),void 0,n);return}}Kt.show(this,t)}else new Ge.Notice(l.pleaseOpenFile,2e3)}}),this.registerEvent(this.app.workspace.on("file-menu",(t,n)=>{n instanceof Ge.TFile&&t.addItem(c=>{c.setTitle(l.exportToOo).setIcon("document").onClick(()=>{Kt.show(this,n)})}).addSeparator()}))}async resetSettings(){this.settings={...JSON.parse(JSON.stringify(je)),lastExportDirectory:this.settings.lastExportDirectory},await this.saveSettings()}async loadSettings(){const l=Object.assign({},je,await this.loadData());l.items.forEach(t=>{Object.assign(t,Object.assign({},je.items.find(n=>n.name===t.name)??{},t))});for(const t of je.items)l.items.every(n=>n.name!==t.name)&&l.items.push(t);this.settings=l}async saveSettings(){console.log("[obsidian-enhancing-export] saveSettings",this.settings);const l=JSON.parse(JSON.stringify(this.settings));if(l.items.forEach(t=>{const n=je.items.find(c=>c.name===t.name);n&&Object.keys(t).forEach(c=>{c!=="name"&&JSON.stringify(t[c])===JSON.stringify(n[c])&&delete t[c]})}),l.env)for(const t of Object.keys(l.env)){const n=l.env[t];if(JSON.stringify(n)===JSON.stringify(De[t])){delete l.env[t];continue}const c=de(De,t);for(const[i,s]of Object.entries(n))s===c[i]&&delete n[i];Object.keys(n).length===0&&delete l.env[t]}await this.saveData(l)}async releaseResources(){const{adapter:l}=this.app.vault;for(const[t,n]of Ml){const c=oe.join(this.manifest.dir,t);await l.mkdir(c);for(const[i,s]of n){const a=oe.join(c,i);await l.writeBinary(a,s)}}Ml.length=0}}exports.default=Io;