var d=Object.defineProperty;var e=(c,a)=>{for(var b in a)d(c,b,{get:a[b],enumerable:!0});}; var f={};e(f,{convertFileSrc:()=>w,invoke:()=>c,transformCallback:()=>s});function u(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function s(e,r=!1){let n=u(),t=`_${n}`;return Object.defineProperty(window,t,{value:o=>(r&&Reflect.deleteProperty(window,t),e==null?void 0:e(o)),writable:!1,configurable:!0}),n}async function c(e,r={}){return new Promise((n,t)=>{let o=s(i=>{n(i),Reflect.deleteProperty(window,`_${a}`);},!0),a=s(i=>{t(i),Reflect.deleteProperty(window,`_${o}`);},!0);window.__TAURI_IPC__({cmd:e,callback:o,error:a,...r});})}function w(e,r="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${r}.localhost/${n}`:`${r}://localhost/${n}`} // Copyright 2021 Jonas Kruckenberg /** * Well known window positions. */ var Position; (function (Position) { Position[Position["TopLeft"] = 0] = "TopLeft"; Position[Position["TopRight"] = 1] = "TopRight"; Position[Position["BottomLeft"] = 2] = "BottomLeft"; Position[Position["BottomRight"] = 3] = "BottomRight"; Position[Position["TopCenter"] = 4] = "TopCenter"; Position[Position["BottomCenter"] = 5] = "BottomCenter"; Position[Position["LeftCenter"] = 6] = "LeftCenter"; Position[Position["RightCenter"] = 7] = "RightCenter"; Position[Position["Center"] = 8] = "Center"; Position[Position["TrayLeft"] = 9] = "TrayLeft"; Position[Position["TrayBottomLeft"] = 10] = "TrayBottomLeft"; Position[Position["TrayRight"] = 11] = "TrayRight"; Position[Position["TrayBottomRight"] = 12] = "TrayBottomRight"; Position[Position["TrayCenter"] = 13] = "TrayCenter"; Position[Position["TrayBottomCenter"] = 14] = "TrayBottomCenter"; })(Position || (Position = {})); /** * Moves the `Window` to the given {@link Position} using `WindowExt.move_window()` * All positions are relative to the **current** screen. * * @param to The {@link Position} to move to. */ async function moveWindow(to) { await c("plugin:positioner|move_window", { position: to, }); } export { Position, moveWindow }; //# sourceMappingURL=index.min.js.map