varqf=Object.create;var_n=Object.defineProperty,Gf=Object.defineProperties,Kf=Object.getOwnPropertyDescriptor,Yf=Object.getOwnPropertyDescriptors,Zf=Object.getOwnPropertyNames,Jn=Object.getOwnPropertySymbols,Xf=Object.getPrototypeOf,go=Object.prototype.hasOwnProperty,fa=Object.prototype.propertyIsEnumerable;varda=(e,t,n)=>tine?_n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ue=(e,t)=>{for(varnint||(t={}))go.call(t,n)&&da(e,n,t[n]);if(Jn)for(varnofJn(t))fa.call(t,n)&&da(e,n,t[n]);returne},_t=(e,t)=>Gf(e,Yf(t)),pa=e=>_n(e,"__esModule",{value:!0});varha=(e,t)=>{varn={};for(varrine)go.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jn)for(varrofJn(e))t.indexOf(r)<0&&fa.call(e,r)&&(n[r]=e[r]);returnn};varze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Jf=(e,t)=>{pa(e);for(varnint)_n(e,n,{get:t[n],enumerable:!0})},Qf=(e,t,n)=>{if(t&&typeoft=="object"||typeoft=="function")for(letrofZf(t))!go.call(e,r)&&r!=="default"&&_n(e,r,{get:()=>t[r],enumerable:!(n=Kf(t,r))||n.enumerable});returne},Re=e=>Qf(pa(_n(e!=null?qf(Xf(e)):{},"default",e&&e.__esModule&&"default"ine?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);varEe=(e,t,n)=>newPromise((r,o)=>{vari=l=>{try{s(n.next(l))}catch(c){o(c)}},a=l=>{try{s(n.throw(l))}catch(c){o(c)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,a);s((n=n.apply(e,t)).next())});varns=ze((H0,ts)=>{"use strict";varCd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ts.exports=Cd});varas=ze((q0,is)=>{"use strict";varNd=ns();functionrs(){}functionos(){}os.resetWarningCache=rs;is.exports=function(){functione(r,o,i,a,s,l){if(l!==Nd){varc=newError("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throwc.name="Invariant Violation",c}}e.isRequired=e;functiont(){returne}varn={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:os,resetWarningCache:rs};returnn.PropTypes=n,n}});varko=ze((Y0,ss)=>{ss.exports=as()();varG0,K0});varFs=ze((Z0,sr)=>{varls,cs,us,fs,ds,ps,hs,ms,vs,ir,Lo,_s,gs,ys,Ht,bs,ws,Ss,Ts,xs,Es,Rs,As,ar;(function(e){vart=typeofglobal=="object"?global:typeofself=="object"?self:typeofthis=="object"?this:{};typeofdefine=="function"&&define.amd?define("tslib",["exports"],function(r){e(n(t,n(r)))}):typeofsr=="object"&&typeofsr.exports=="object"?e(n(t,n(sr.exports))):e(n(t));functionn(r,o){returnr!==t&&(typeofObject.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(i,a){returnr[i]=o?o(i,a):a}}})(function(e){vart=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(r,o){r.__proto__=o}||function(r,o){for(variino)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])};ls=function(r,o){if(typeofo!="function"&&o!==null)thrownewTypeError("Class extends value "+String(o)+" is not a constructor or null");t(r,o);functioni(){this.constructor=r}r.prototype=o===null?Object.create(o):(i.prototype=o.prototype,newi)},cs=Object.assign||function(r){for(varo,i=1,a=arguments.length;i<a;i++){o=arguments[i];for(varsino)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])}returnr},us=function(r,o){vari={};for(varainr)Object.prototype.hasOwnProperty.call(r,a)&&o.indexOf(a)<0&&(i[a]=r[a]);if(r!=null&&typeofObject.getOwnPropertySymbols=="function")for(vars=0,a=Object.getOwnPropertySymbols(r);s<a.length;s++)o.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(r,a[s])&&(i[a[s]]=r[a[s]]);returni},fs=function(r,o,i,a){vars=arguments.length,l=s<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,i):a,c;if(typeofReflect=="object"&&typeofReflect.decorate=="function")l=Reflect.decorate(r,o,i,a);elsefor(varu=r.length-1;u>=0;u--)(c=r[u])&&(l=(s<3?c(l):s>3?c(o,i,l):c(o,i))||l);returns>3&&l&&Object.defineProperty(o,i,l),l},ds=function(r,o){returnfunction(i,a){o(i,a,r)}},ps=function(r,o){if
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}function jd(e,t){if(!!e){if(typeof e=="string")return Ms(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ms(e,t)}}function Ms(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bd(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Wd(e){if(Array.isArray(e))return e}var Hd="file-invalid-type",qd="file-too-large",Gd="file-too-small",Kd="too-many-files";var Yd=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:Hd,message:"File type must be ".concat(n)}},$s=function(t){return{code:qd,message:"File is larger than ".concat(t," bytes")}},Us=function(t){return{code:Gd,message:"File is smaller than ".concat(t," bytes")}},zs={code:Kd,message:"Too many files"};function Vo(e,t){var n=e.type==="application/x-moz-file"||(0,Is.default)(e,t);return[n,n?null:Yd(t)]}function Mo(e,t,n){if(En(e.size))if(En(t)&&En(n)){if(e.size>n)return[!1,$s(n)];if(e.size<t)return[!1,Us(t)]}else{if(En(t)&&e.size<t)return[!1,Us(t)];if(En(n)&&e.size>n)return[!1,$s(n)]}return[!0,null]}function En(e){return e!=null}function js(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(s){var l=Vo(s,n),c=Vs(l,1),u=c[0],d=Mo(s,r,o),f=Vs(d,1),m=f[0];return u&&m})}function Rn(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble!="undefined"?e.cancelBubble:!1}function An(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Io(e){e.preventDefault()}function Zd(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Xd(e){return e.indexOf("Edge/")!==-1}function Bs(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Zd(e)||Xd(e)}function st(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!Rn(r)&&s&&s.apply(void 0,[r].concat(i)),Rn(r)})}}var Jd=["children"],Qd=["open"],ep=["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],tp=["refKey","onChange","onClick"];function np(e){return ip(e)||op(e)||Ws(e)||rp()}function rp(){throw new TypeError(`Invalidattempttospreadnon-iterableinstance.
Allsubfoldersaregoingtobeexcluded,aswell.Youneedtoreloadthevaulttomakechangeseffective.`).addTextArea(a=>a.setValue(this.plugin.settings.excludedFolders).onChange(s=>{this.plugin.settings.excludedFolders=s,this.plugin.saveSettings()})),t.createEl("h2",{text:"Clear Data"}),new Fe.Setting(t).setName("Clear All Cache Data").setDesc(`Thisbuttonwillclearthefollowingcachedata:"Last position of the divider"&"List of expanded folders in the folder pane",
&"Last active folder path".Itwillnottouchyoursettingsaboveandlistofpinnedfiles.Itisrecommendedtodothisclearingonceinawhile.`).addButton(a=>{let s=a.setTooltip("Click here to clear the cache data").setButtonText("Click for Clearing the Cache").onClick(()=>Ee(this,null,function*(){n.removeFromLocalStorage({key:this.plugin.keys.customHeightKey}),n.removeFromLocalStorage({key:this.plugin.keys.openFoldersKey}),n.removeFromLocalStorage({key:this.plugin.keys.activeFolderPathKey}),this.plugin.refreshTreeLeafs(),new Fe.Notice("The plugin cache is cleared...")}))}),new Fe.Setting(t).setName("Clear Pinned Files").setDesc("This button will clear the pinned files in the file list pane.").addButton(a=>{let s=a.setTooltip("Click here to clear the pinned files").setButtonText("Click for Clearing the Pinned files").onClick(()=>Ee(this,null,function*(){n.removeFromLocalStorage({key:this.plugin.keys.pinnedFilesKey}),this.plugin.refreshTreeLeafs(),new Fe.Notice("The pinned files are cleared...")}))})}};var ca=class extends un.Plugin{constructor(){super(...arguments);this.ribbonIconEl=void 0;this.keys={activeFolderPathKey:"fileTreePlugin-ActiveFolderPath",pinnedFilesKey:"fileTreePlugin-PinnedFiles",openFoldersKey:"fileTreePlugin-OpenFolders",customHeightKey:"fileTreePlugin-CustomHeight"};this.refreshIconRibbon=()=>{var t;(t=this.ribbonIconEl)==null||t.remove(),this.settings.ribbonIcon&&(this.ribbonIconEl=this.addRibbonIcon(aa,"File Tree Alternative Plugin",()=>Ee(this,null,function*(){yield this.openFileTreeLeaf(!0)})))};this.openFileTreeLeaf=t=>Ee(this,null,function*(){if(this.app.workspace.getLeavesOfType(cn).length==0){let n=this.app.workspace.getLeftLeaf(!1);yield n.setViewState({type:cn}),t&&this.app.workspace.revealLeaf(n)}});this.detachFileTreeLeafs=()=>{let t=this.app.workspace.getLeavesOfType(cn);for(let n of t)n.view.destroy(),n.detach()};this.refreshTreeLeafs=()=>{this.detachFileTreeLeafs(),this.openFileTreeLeaf(!0)}}onload(){return Ee(this,null,function*(){console.log("Loading Alternative File Tree Plugin"),(0,un.addIcon)("zoomInIcon",zc),(0,un.addIcon)("zoomOutIcon",$c),(0,un.addIcon)("zoomOutDoubleIcon",Uc),this.addSettingTab(new la(this.app,this)),yield this.loadSettings(),this.registerView(cn,t=>new sa(t,this)),this.app.workspace.onLayoutReady(()=>Ee(this,null,function*(){return yield this.openFileTreeLeaf(!0)})),this.addCommand({id:"open-file-tree-leaf",name:"Open File Tree Leaf",callback:()=>Ee(this,null,function*(){return yield this.openFileTreeLeaf(!0)})}),this.refreshIconRibbon()})}onunload(){console.log("Unloading Alternative File Tree Plugin"),this.detachFileTreeLeafs()}loadSettings(){return Ee(this,null,function*(){this.settings=Object.assign({},Bf,yield this.loadData())})}saveSettings(){return Ee(this,null,function*(){yield this.saveData(this.settings)})}};0&&(module.exports={});