/
bundle.global.js
7 lines (7 loc) · 23.9 KB
/
bundle.global.js
1
2
3
4
5
6
7
"use strict";var __TAURI_IIFE__=(()=>{var R=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var se=Object.getOwnPropertyNames;var ae=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var t in e)R(n,t,{get:e[t],enumerable:!0})},oe=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of se(e))!ae.call(n,s)&&s!==t&&R(n,s,{get:()=>e[s],enumerable:!(r=re(e,s))||r.enumerable});return n};var le=n=>oe(R({},"__esModule",{value:!0}),n);var ht={};c(ht,{app:()=>N,event:()=>I,http:()=>z,invoke:()=>gt,notification:()=>H,os:()=>Z,path:()=>V,process:()=>q,shell:()=>G,tauri:()=>L,updater:()=>$,window:()=>Q});var N={};c(N,{getName:()=>me,getTauriVersion:()=>pe,getVersion:()=>ce,hide:()=>ge,show:()=>ye});var L={};c(L,{convertFileSrc:()=>ue,invoke:()=>l,transformCallback:()=>y});function de(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function y(n,e=!1){let t=de(),r=`_${t}`;return Object.defineProperty(window,r,{value:s=>(e&&Reflect.deleteProperty(window,r),n?.(s)),writable:!1,configurable:!0}),t}async function l(n,e={}){return new Promise((t,r)=>{let s=y(d=>{t(d),Reflect.deleteProperty(window,`_${a}`)},!0),a=y(d=>{r(d),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:a,...e})})}function ue(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return l("tauri",n)}async function ce(){return i({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function me(){return i({__tauriModule:"App",message:{cmd:"getAppName"}})}async function pe(){return i({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function ye(){return i({__tauriModule:"App",message:{cmd:"show"}})}async function ge(){return i({__tauriModule:"App",message:{cmd:"hide"}})}var I={};c(I,{TauriEvent:()=>O,emit:()=>E,listen:()=>U,once:()=>k});async function Y(n,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:n,eventId:e}})}async function _(n,e,t){await i({__tauriModule:"Event",message:{cmd:"emit",event:n,windowLabel:e,payload:t}})}async function w(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:y(t)}}).then(r=>async()=>Y(n,r))}async function v(n,e,t){return w(n,e,r=>{t(r),Y(n,r.id).catch(()=>{})})}var O=(u=>(u.WINDOW_RESIZED="tauri://resize",u.WINDOW_MOVED="tauri://move",u.WINDOW_CLOSE_REQUESTED="tauri://close-requested",u.WINDOW_CREATED="tauri://window-created",u.WINDOW_DESTROYED="tauri://destroyed",u.WINDOW_FOCUS="tauri://focus",u.WINDOW_BLUR="tauri://blur",u.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",u.WINDOW_THEME_CHANGED="tauri://theme-changed",u.WINDOW_FILE_DROP="tauri://file-drop",u.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",u.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",u.MENU="tauri://menu",u.CHECK_UPDATE="tauri://update",u.UPDATE_AVAILABLE="tauri://update-available",u.INSTALL_UPDATE="tauri://update-install",u.STATUS_UPDATE="tauri://update-status",u.DOWNLOAD_PROGRESS="tauri://update-download-progress",u))(O||{});async function U(n,e){return w(n,null,e)}async function k(n,e){return v(n,null,e)}async function E(n,e){return _(n,void 0,e)}var z={};c(z,{Body:()=>p,Client:()=>A,Response:()=>T,ResponseType:()=>X,fetch:()=>fe,getClient:()=>B});var X=(r=>(r[r.JSON=1]="JSON",r[r.Text=2]="Text",r[r.Binary=3]="Binary",r))(X||{}),p=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},r=(s,a)=>{if(a!==null){let d;typeof a=="string"?d=a:a instanceof Uint8Array||Array.isArray(a)?d=Array.from(a):a instanceof File?d={file:a.name,mime:a.type,fileName:a.name}:typeof a.file=="string"?d={file:a.file,mime:a.mime,fileName:a.fileName}:d={file:Array.from(a.file),mime:a.mime,fileName:a.fileName},t[String(s)]=d}};if(e instanceof FormData)for(let[s,a]of e)r(s,a);else for(let[s,a]of Object.entries(e))r(s,a);return new p("Form",t)}static json(e){return new p("Json",e)}static text(e){return new p("Text",e)}static bytes(e){return new p("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},T=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},A=class{constructor(e){this.id=e}async drop(){return i({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),i({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(r=>{let s=new T(r);if(t){try{s.data=JSON.parse(s.data)}catch(a){if(s.ok&&s.data==="")s.data={};else if(s.ok)throw Error(`Failed to parse response \`${s.data}\` as JSON: ${a};
try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return s}return s})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,r){return this.request({method:"POST",url:e,body:t,...r})}async put(e,t,r){return this.request({method:"PUT",url:e,body:t,...r})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function B(n){return i({__tauriModule:"Http",message:{cmd:"createClient",options:n}}).then(e=>new A(e))}var F=null;async function fe(n,e){return F===null&&(F=await B()),F.request({url:n,method:e?.method??"GET",...e})}var H={};c(H,{isPermissionGranted:()=>be,requestPermission:()=>we,sendNotification:()=>Pe});async function be(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):i({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function we(){return window.Notification.requestPermission()}function Pe(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}var V={};c(V,{BaseDirectory:()=>ee,appCacheDir:()=>Ee,appConfigDir:()=>_e,appDataDir:()=>ve,appLocalDataDir:()=>Oe,appLogDir:()=>qe,audioDir:()=>Te,basename:()=>Ye,cacheDir:()=>Ae,configDir:()=>Ce,dataDir:()=>Me,delimiter:()=>je,desktopDir:()=>We,dirname:()=>Qe,documentDir:()=>De,downloadDir:()=>xe,executableDir:()=>Se,extname:()=>Ze,fontDir:()=>Re,homeDir:()=>Le,isAbsolute:()=>Xe,join:()=>Ke,localDataDir:()=>Ne,normalize:()=>Je,pictureDir:()=>Ue,publicDir:()=>ke,resolve:()=>$e,resolveResource:()=>Fe,resourceDir:()=>Ie,runtimeDir:()=>ze,sep:()=>Ge,templateDir:()=>He,videoDir:()=>Ve});function P(){return navigator.appVersion.includes("Win")}var ee=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(ee||{});async function _e(){return l("plugin:path|resolve_directory",{directory:13})}async function ve(){return l("plugin:path|resolve_directory",{directory:14})}async function Oe(){return l("plugin:path|resolve_directory",{directory:15})}async function Ee(){return l("plugin:path|resolve_directory",{directory:16})}async function Te(){return l("plugin:path|resolve_directory",{directory:1})}async function Ae(){return l("plugin:path|resolve_directory",{directory:2})}async function Ce(){return l("plugin:path|resolve_directory",{directory:3})}async function Me(){return l("plugin:path|resolve_directory",{directory:4})}async function We(){return l("plugin:path|resolve_directory",{directory:18})}async function De(){return l("plugin:path|resolve_directory",{directory:6})}async function xe(){return l("plugin:path|resolve_directory",{directory:7})}async function Se(){return l("plugin:path|resolve_directory",{directory:19})}async function Re(){return l("plugin:path|resolve_directory",{directory:20})}async function Le(){return l("plugin:path|resolve_directory",{directory:21})}async function Ne(){return l("plugin:path|resolve_directory",{directory:5})}async function Ue(){return l("plugin:path|resolve_directory",{directory:8})}async function ke(){return l("plugin:path|resolve_directory",{directory:9})}async function Ie(){return l("plugin:path|resolve_directory",{directory:11})}async function Fe(n){return l("plugin:path|resolve_directory",{directory:11,path:n})}async function ze(){return l("plugin:path|resolve_directory",{directory:22})}async function He(){return l("plugin:path|resolve_directory",{directory:23})}async function Ve(){return l("plugin:path|resolve_directory",{directory:10})}async function qe(){return l("plugin:path|resolve_directory",{directory:17})}var Ge=P()?"\\":"/",je=P()?";":":";async function $e(...n){return l("plugin:path|resolve",{paths:n})}async function Je(n){return l("plugin:path|normalize",{path:n})}async function Ke(...n){return l("plugin:path|join",{paths:n})}async function Qe(n){return l("plugin:path|dirname",{path:n})}async function Ze(n){return l("plugin:path|extname",{path:n})}async function Ye(n,e){return l("plugin:path|basename",{path:n,ext:e})}async function Xe(n){return l("plugin:path|isAbsolute",{path:n})}var q={};c(q,{exit:()=>Be,relaunch:()=>et});async function Be(n=0){return i({__tauriModule:"Process",message:{cmd:"exit",exitCode:n}})}async function et(){return i({__tauriModule:"Process",message:{cmd:"relaunch"}})}var G={};c(G,{Child:()=>C,Command:()=>h,EventEmitter:()=>g,open:()=>nt});async function tt(n,e,t=[],r){return typeof t=="object"&&Object.freeze(t),i({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:t,options:r,onEventFn:y(n)}})}var g=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.addListener(e,r)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(r=>r!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let r=this.eventListeners[e];for(let s of r)s(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.prependListener(e,r)}},C=class{constructor(e){this.pid=e}async write(e){return i({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return i({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},h=class extends g{constructor(t,r=[],s){super();this.stdout=new g;this.stderr=new g;this.program=t,this.args=typeof r=="string"?[r]:r,this.options=s??{}}static create(t,r=[],s){return new h(t,r,s)}static sidecar(t,r=[],s){let a=new h(t,r,s);return a.options.sidecar=!0,a}async spawn(){return tt(t=>{switch(t.event){case"Error":this.emit("error",t.payload);break;case"Terminated":this.emit("close",t.payload);break;case"Stdout":this.stdout.emit("data",t.payload);break;case"Stderr":this.stderr.emit("data",t.payload);break}},this.program,this.args,this.options).then(t=>new C(t))}async execute(){return new Promise((t,r)=>{this.on("error",r);let s=[],a=[];this.stdout.on("data",d=>{s.push(d)}),this.stderr.on("data",d=>{a.push(d)}),this.on("close",d=>{t({code:d.code,signal:d.signal,stdout:this.collectOutput(s),stderr:this.collectOutput(a)})}),this.spawn().catch(r)})}collectOutput(t){return this.options.encoding==="raw"?t.reduce((r,s)=>new Uint8Array([...r,...s,10]),new Uint8Array):t.join(`
`)}};async function nt(n,e){return i({__tauriModule:"Shell",message:{cmd:"open",path:n,with:e}})}var $={};c($,{checkUpdate:()=>rt,installUpdate:()=>it,onUpdaterEvent:()=>j});async function j(n){return U("tauri://update-status",e=>{n(e?.payload)})}async function it(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(a){if(a.error){e(),r(a.error);return}a.status==="DONE"&&(e(),t())}j(s).then(a=>{n=a}).catch(a=>{throw e(),a}),E("tauri://update-install").catch(a=>{throw e(),a})})}async function rt(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(d){e(),t({manifest:d,shouldUpdate:!0})}function a(d){if(d.error){e(),r(d.error);return}d.status==="UPTODATE"&&(e(),t({shouldUpdate:!1}))}k("tauri://update-available",d=>{s(d?.payload)}).catch(d=>{throw e(),d}),j(a).then(d=>{n=d}).catch(d=>{throw e(),d}),E("tauri://update").catch(d=>{throw e(),d})})}var Q={};c(Q,{CloseRequestedEvent:()=>S,LogicalPosition:()=>W,LogicalSize:()=>M,PhysicalPosition:()=>b,PhysicalSize:()=>f,UserAttentionType:()=>ne,WebviewWindow:()=>m,WebviewWindowHandle:()=>D,WindowManager:()=>x,appWindow:()=>J,availableMonitors:()=>lt,currentMonitor:()=>at,getAll:()=>ie,getCurrent:()=>st,primaryMonitor:()=>ot});var M=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},f=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new M(this.width/e,this.height/e)}},W=class{constructor(e,t){this.type="Logical";this.x=e,this.y=t}},b=class{constructor(e,t){this.type="Physical";this.x=e,this.y=t}toLogical(e){return new W(this.x/e,this.y/e)}},ne=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(ne||{});function st(){return new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function ie(){return window.__TAURI_METADATA__.__windows.map(n=>new m(n.label,{skip:!0}))}var te=["tauri://created","tauri://error"],D=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):w(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):v(e,this.label,t)}async emit(e,t){if(te.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return _(e,this.label,t)}_handleTauriEvent(e,t){return te.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},x=class extends D{async scaleFactor(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new f(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new f(e,t))}async isFullscreen(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let r=new S(t);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),r=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{t(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",a=>{e({...a,payload:{type:"drop",paths:a.payload}})}),r=await this.listen("tauri://file-drop-hover",a=>{e({...a,payload:{type:"hover",paths:a.payload}})}),s=await this.listen("tauri://file-drop-cancelled",a=>{e({...a,payload:{type:"cancel"}})});return()=>{t(),r(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},S=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},m=class extends x{constructor(e,t={}){super(e),t?.skip||i({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return ie().some(t=>t.label===e)?new m(e,{skip:!0}):null}},J;"__TAURI_METADATA__"in window?J=new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label.
Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),J=new m("main",{skip:!0}));function K(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:new b(n.position.x,n.position.y),size:new f(n.size.width,n.size.height)}}async function at(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(K)}async function ot(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(K)}async function lt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(K))}var Z={};c(Z,{EOL:()=>dt,arch:()=>pt,platform:()=>ut,tempdir:()=>yt,type:()=>mt,version:()=>ct});var dt=P()?`\r
`:`
`;async function ut(){return i({__tauriModule:"Os",message:{cmd:"platform"}})}async function ct(){return i({__tauriModule:"Os",message:{cmd:"version"}})}async function mt(){return i({__tauriModule:"Os",message:{cmd:"osType"}})}async function pt(){return i({__tauriModule:"Os",message:{cmd:"arch"}})}async function yt(){return i({__tauriModule:"Os",message:{cmd:"tempdir"}})}var gt=l;return le(ht);})();
window.__TAURI__ = __TAURI_IIFE__