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