"use strict";var e,t=require("./tauri-d45d58c1.js");function r(e,r){return void 0===r&&(r={}),t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(i){switch(i.label){case 0:return[4,t.promisified({cmd:"readTextFile",path:e,options:r})];case 1:return[2,i.sent()]}}))}))}function i(e,r){return void 0===r&&(r={}),t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(i){switch(i.label){case 0:return[4,t.promisified({cmd:"readBinaryFile",path:e,options:r})];case 1:return[2,i.sent()]}}))}))}function o(e,r){return void 0===r&&(r={}),t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(i){switch(i.label){case 0:return"object"==typeof r&&Object.freeze(r),"object"==typeof e&&Object.freeze(e),[4,t.promisified({cmd:"writeFile",path:e.path,contents:e.contents,options:r})];case 1:return[2,i.sent()]}}))}))}(e=exports.BaseDirectory||(exports.BaseDirectory={}))[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Desktop=6]="Desktop",e[e.Document=7]="Document",e[e.Download=8]="Download",e[e.Executable=9]="Executable",e[e.Font=10]="Font",e[e.Home=11]="Home",e[e.Picture=12]="Picture",e[e.Public=13]="Public",e[e.Runtime=14]="Runtime",e[e.Template=15]="Template",e[e.Video=16]="Video",e[e.Resource=17]="Resource",e[e.App=18]="App";function n(e){var t=function(e){if(e.length<65536)return String.fromCharCode.apply(null,Array.from(e));for(var t="",r=e.length,i=0;i<r;i++){var o=e.subarray(65536*i,65536*(i+1));t+=String.fromCharCode.apply(null,Array.from(o))}return t}(new Uint8Array(e));return btoa(t)}function a(e,r){return void 0===r&&(r={}),t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(i){switch(i.label){case 0:return"object"==typeof r&&Object.freeze(r),"object"==typeof e&&Object.freeze(e),[4,t.promisified({cmd:"writeFile",path:e.path,contents:n(e.contents),options:r})];case 1:return[2,i.sent()]}}))}))}function s(e,r){return void 0===r&&(r={}),t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(i){switch(i.label){case 0:return[4,t.promisified({cmd:"readDir",path:e,options:r})];case 1:return[2,i.sent()]}}))}))}function c(e,r){return void 0===r&&(r={}),t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(i){switch(i.label){case 0:return[4,t.promisified({cmd:"createDir",path:e,options:r})];case 1:return[2,i.sent()]}}))}))}function u(e,r){return void 0===r&&(r={}),t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(i){switch(i.label){case 0:return[4,t.promisified({cmd:"removeDir",path:e,options:r})];case 1:return[2,i.sent()]}}))}))}function d(e,r,i){return void 0===i&&(i={}),t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(o){switch(o.label){case 0:return[4,t.promisified({cmd:"copyFile",source:e,destination:r,options:i})];case 1:return[2,o.sent()]}}))}))}function p(e,r){return void 0===r&&(r={}),t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(i){switch(i.label){case 0:return[4,t.promisified({cmd:"removeFile",path:e,options:r})];case 1:return[2,i.sent()]}}))}))}function l(e,r,i){return void 0===i&&(i={}),t.__awaiter(this,void 0,void 0,(function(){return t.__generator(this,(function(o){switch(o.label){case 0:return[4,t.promisified({cmd:"renameFile",oldPath:e,newPath:r,options:i})];case 1:return[2,o.sent()]}}))}))}var f=Object.freeze({__proto__:null,get BaseDirectory(){return exports.BaseDirectory},get Dir(){return exports.BaseDirectory},readTextFile:r,readBinaryFile:i,writeFile:o,writeBinaryFile:a,readDir:s,createDir:c,removeDir:u,copyFile:d,removeFile:p,renameFile:l});exports.copyFile=d,exports.createDir=c,exports.fs=f,exports.readBinaryFile=i,exports.readDir=s,exports.readTextFile=r,exports.removeDir=u,exports.removeFile=p,exports.renameFile=l,exports.writeBinaryFile=a,exports.writeFile=o;
