12 |
- "use strict";var __TAURI_IIFE__=(()=>{var m=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var p=(n,e)=>{for(var i in e)m(n,i,{get:e[i],enumerable:!0})},W=(n,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of E(e))!O.call(n,a)&&a!==i&&m(n,a,{get:()=>e[a],enumerable:!(o=C(e,a))||o.enumerable});return n};var N=n=>W(m({},"__esModule",{value:!0}),n);var P=(n,e,i)=>{if(!e.has(n))throw TypeError("Cannot "+i)};var _=(n,e,i)=>(P(n,e,"read from private field"),i?i.call(n):e.get(n)),D=(n,e,i)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,i)},w=(n,e,i,o)=>(P(n,e,"write to private field"),o?o.call(n,i):e.set(n,i),i);var hn={};p(hn,{event:()=>f,invoke:()=>fn,path:()=>h,tauri:()=>y});var f={};p(f,{TauriEvent:()=>b,emit:()=>F,listen:()=>I,once:()=>U});var y={};p(y,{Channel:()=>l,PluginListener:()=>g,addPluginListener:()=>L,convertFileSrc:()=>k,invoke:()=>t,transformCallback:()=>u});function T(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function u(n,e=!1){let i=T(),o=`_${i}`;return Object.defineProperty(window,o,{value:a=>(e&&Reflect.deleteProperty(window,o),n?.(a)),writable:!1,configurable:!0}),i}var c,l=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;D(this,c,()=>{});this.id=u(e=>{_(this,c).call(this,e)})}set onmessage(e){w(this,c,e)}get onmessage(){return _(this,c)}toJSON(){return`__CHANNEL__:${this.id}`}};c=new WeakMap;var g=class{constructor(e,i,o){this.plugin=e,this.event=i,this.channelId=o}async unregister(){return t(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function L(n,e,i){let o=new l;return o.onmessage=i,t(`plugin:${n}|register_listener`,{event:e,handler:o}).then(()=>new g(n,e,o.id))}async function t(n,e={}){return new Promise((i,o)=>{let a=u(d=>{i(d),Reflect.deleteProperty(window,`_${v}`)},!0),v=u(d=>{o(d),Reflect.deleteProperty(window,`_${a}`)},!0);window.__TAURI_IPC__({cmd:n,callback:a,error:v,...e})})}function k(n,e="asset"){let i=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${i}`:`${e}://localhost/${i}`}var b=(s=>(s.WINDOW_RESIZED="tauri://resize",s.WINDOW_MOVED="tauri://move",s.WINDOW_CLOSE_REQUESTED="tauri://close-requested",s.WINDOW_CREATED="tauri://window-created",s.WINDOW_DESTROYED="tauri://destroyed",s.WINDOW_FOCUS="tauri://focus",s.WINDOW_BLUR="tauri://blur",s.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",s.WINDOW_THEME_CHANGED="tauri://theme-changed",s.WINDOW_FILE_DROP="tauri://file-drop",s.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",s.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",s.MENU="tauri://menu",s))(b||{});async function A(n,e){await t("plugin:event|unlisten",{event:n,eventId:e})}async function I(n,e,i){return t("plugin:event|listen",{event:n,windowLabel:i?.target,handler:u(e)}).then(o=>async()=>A(n,o))}async function U(n,e,i){return I(n,o=>{e(o),A(n,o.id).catch(()=>{})},i)}async function F(n,e,i){await t("plugin:event|emit",{event:n,windowLabel:i?.target,payload:e})}var h={};p(h,{BaseDirectory:()=>R,appCacheDir:()=>S,appConfigDir:()=>x,appDataDir:()=>$,appLocalDataDir:()=>H,appLogDir:()=>sn,audioDir:()=>M,basename:()=>_n,cacheDir:()=>V,configDir:()=>j,dataDir:()=>z,delimiter:()=>un,desktopDir:()=>G,dirname:()=>dn,documentDir:()=>q,downloadDir:()=>J,executableDir:()=>K,extname:()=>mn,fontDir:()=>Q,homeDir:()=>Y,isAbsolute:()=>yn,join:()=>gn,localDataDir:()=>Z,normalize:()=>ln,pictureDir:()=>X,publicDir:()=>B,resolve:()=>pn,resolveResource:()=>en,resourceDir:()=>nn,runtimeDir:()=>rn,sep:()=>cn,tempDir:()=>an,templateDir:()=>tn,videoDir:()=>on});var R=(r=>(r[r.Audio=1]="Audio",r[r.Cache=2]="Cache",r[r.Config=3]="Config",r[r.Data=4]="Data",r[r.LocalData=5]="LocalData",r[r.Document=6]="Document",r[r.Download=7]="Download",r[r.Picture=8]="Picture",r[r.Public=9]="Public",r[r.Video=10]="Video",r[r.Resource=11]="Resource",r[r.Temp=12]="Temp",r[r.AppConfig=13]="AppConfig",r[r.AppData=14]="AppData",r[r.AppLocalData=15]="AppLocalData",r[r.AppCache=16]="AppCache",r[r.AppLog=17]="AppLog",r[r.Desktop=18]="Desktop",r[r.Executable=19]="Executable",r[r.Font=20]="Font",r[r.Home=21]="Home",r[r.Runtime=22]="Runtime",r[r.Template=23]="Template",r))(R||{});async function x(){return t("plugin:path|resolve_directory",{directory:13})}async function $(){return t("plugin:path|resolve_directory",{directory:14})}async function H(){return t("plugin:path|resolve_directory",{directory:15})}async function S(){return t("plugin:path|resolve_directory",{directory:16})}async function M(){return t("plugin:path|resolve_directory",{directory:1})}async function V(){return t("plugin:path|resolve_directory",{directory:2})}async function j(){return t("plugin:path|resolve_directory",{directory:3})}async function z(){return t("plugin:path|resolve_directory",{directory:4})}async function G(){return t("plugin:path|resolve_directory",{directory:18})}async function q(){return t("plugin:path|resolve_directory",{directory:6})}async function J(){return t("plugin:path|resolve_directory",{directory:7})}async function K(){return t("plugin:path|resolve_directory",{directory:19})}async function Q(){return t("plugin:path|resolve_directory",{directory:20})}async function Y(){return t("plugin:path|resolve_directory",{directory:21})}async function Z(){return t("plugin:path|resolve_directory",{directory:5})}async function X(){return t("plugin:path|resolve_directory",{directory:8})}async function B(){return t("plugin:path|resolve_directory",{directory:9})}async function nn(){return t("plugin:path|resolve_directory",{directory:11})}async function en(n){return t("plugin:path|resolve_directory",{directory:11,path:n})}async function rn(){return t("plugin:path|resolve_directory",{directory:22})}async function tn(){return t("plugin:path|resolve_directory",{directory:23})}async function on(){return t("plugin:path|resolve_directory",{directory:10})}async function sn(){return t("plugin:path|resolve_directory",{directory:17})}async function an(n){return t("plugin:path|resolve_directory",{directory:12})}function cn(){return window.__TAURI__.path.__sep}function un(){return window.__TAURI__.path.__delimiter}async function pn(...n){return t("plugin:path|resolve",{paths:n})}async function ln(n){return t("plugin:path|normalize",{path:n})}async function gn(...n){return t("plugin:path|join",{paths:n})}async function dn(n){return t("plugin:path|dirname",{path:n})}async function mn(n){return t("plugin:path|extname",{path:n})}async function _n(n,e){return t("plugin:path|basename",{path:n,ext:e})}async function yn(n){return t("plugin:path|isAbsolute",{path:n})}var fn=t;return N(hn);})();
- window.__TAURI__ = __TAURI_IIFE__
|