(()=>{var le=Object.defineProperty;var g=(e,t)=>{for(var n in t)le(e,n,{get:t[n],enumerable:!0})};var M={};g(M,{SetText:()=>ue,Text:()=>ce});var ae=window.location.origin+"/wails/runtime";function se(e,t,n){let i=new URL(ae);i.searchParams.append("method",e),n&&i.searchParams.append("args",JSON.stringify(n));let o={headers:{}};return t&&(o.headers["x-wails-window-name"]=t),new Promise((r,a)=>{fetch(i,o).then(s=>{if(s.ok)return s.headers.get("Content-Type")&&s.headers.get("Content-Type").indexOf("application/json")!==-1?s.json():s.text();a(Error(s.statusText))}).then(s=>r(s)).catch(s=>a(s))})}function l(e,t){return function(n,i=null){return se(e+"."+n,t,i)}}var T=l("clipboard");function ue(e){T("SetText",{text:e})}function ce(){return T("Text")}var E={};g(E,{Hide:()=>fe,Quit:()=>me,Show:()=>de});var S=l("application");function fe(){S("Hide")}function de(){S("Show")}function me(){S("Quit")}var W={};g(W,{Log:()=>we});var pe=l("log");function we(e){return pe("Log",e)}var L={};g(L,{GetAll:()=>ge,GetCurrent:()=>xe,GetPrimary:()=>he});var k=l("screens");function ge(){return k("GetAll")}function he(){return k("GetPrimary")}function xe(){return k("GetCurrent")}var ve="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var h=(e=21)=>{let t="",n=e;for(;n--;)t+=ve[Math.random()*64|0];return t};var Ce=l("call"),f=new Map;function be(){let e;do e=h();while(f.has(e));return e}function D(e,t,n){let i=f.get(e);i&&(n?i.resolve(JSON.parse(t)):i.resolve(t),f.delete(e))}function P(e,t){let n=f.get(e);n&&(n.reject(t),f.delete(e))}function H(e,t){return new Promise((n,i)=>{let o=be();t=t||{},t["call-id"]=o,f.set(o,{resolve:n,reject:i}),Ce(e,t).catch(r=>{i(r),f.delete(o)})})}function N(e){return H("Call",e)}function F(e,t,...n){return H("Call",{packageName:"wails-plugins",structName:e,methodName:t,args:n})}function B(e){let t=l("window",e);return{Center:()=>void t("Center"),SetTitle:n=>void t("SetTitle",{title:n}),Fullscreen:()=>void t("Fullscreen"),UnFullscreen:()=>void t("UnFullscreen"),SetSize:(n,i)=>t("SetSize",{width:n,height:i}),Size:()=>t("Size"),SetMaxSize:(n,i)=>void t("SetMaxSize",{width:n,height:i}),SetMinSize:(n,i)=>void t("SetMinSize",{width:n,height:i}),SetAlwaysOnTop:n=>void t("SetAlwaysOnTop",{alwaysOnTop:n}),SetPosition:(n,i)=>t("SetPosition",{x:n,y:i}),Position:()=>t("Position"),Screen:()=>t("Screen"),Hide:()=>void t("Hide"),Maximise:()=>void t("Maximise"),Show:()=>void t("Show"),Close:()=>void t("Close"),ToggleMaximise:()=>void t("ToggleMaximise"),UnMaximise:()=>void t("UnMaximise"),Minimise:()=>void t("Minimise"),UnMinimise:()=>void t("UnMinimise"),Restore:()=>void t("Restore"),SetBackgroundColour:(n,i,o,r)=>void t("SetBackgroundColour",{r:n,g:i,b:o,a:r})}}var Me=l("events"),O=class{constructor(t,n,i){this.eventName=t,this.maxCallbacks=i||-1,this.Callback=o=>(n(o),this.maxCallbacks===-1?!1:(this.maxCallbacks-=1,this.maxCallbacks===0))}},x=class{constructor(t,n=null){this.name=t,this.data=n}},u=new Map;function v(e,t,n){let i=u.get(e)||[],o=new O(e,t,n);return i.push(o),u.set(e,i),()=>Se(o)}function G(e,t){return v(e,t,-1)}function I(e,t){return v(e,t,1)}function Se(e){let t=e.eventName,n=u.get(t).filter(i=>i!==e);n.length===0?u.delete(t):u.set(t,n)}function U(e){console.log("dispatching event: ",{event:e});let t=u.get(e.name);if(t){let n=[];t.forEach(i=>{i.Callback(e)&&n.push(i)}),n.length>0&&(t=t.filter(i=>!n.includes(i)),t.length===0?u.delete(e.name):u.set(e.name,t))}}function Q(e,...t){[e,...t].forEach(i=>{u.delete(i)})}function Y(){u.clear()}function C(e){Me("Emit",e)}var Ee=l("dialog"),d=new Map;function We(){let e;do e=h();while(d.has(e));return e}function X(e,t,n){let i=d.get(e);i&&(n?i.resolve(JSON.parse(t)):i.resolve(t),d.delete(e))}function j(e,t){let n=d.get(e);n&&(n.reject(t),d.delete(e))}function m(e,t){return new Promise((n,i)=>{let o=We();t=t||{},t["dialog-id"]=o,d.set(o,{resolve:n,reject:i}),Ee(e,t).catch(r=>{i(r),d.delete(o)})})}function J(e){return m("Info",e)}function q(e){return m("Warning",e)}function V(e){return m("Error",e)}function p(e){return m("Question",e)}function _(e){return m("OpenFile",e)}function K(e){return m("SaveFile",e)}var ke=l("contextmenu");function Le(e,t,n,i){return ke("OpenContextMenu",{id:e,x:t,y:n,data:i})}function $(e){e?window.addEventListener("contextmenu",Z):window.removeEventListener("contextmenu",Z)}function Z(e){ee(e.target,e)}function ee(e,t){let n=e.getAttribute("data-contextmenu");if(n)t.preventDefault(),Le(n,t.clientX,t.clientY,e.getAttribute("data-contextmenu-data"));else{let i=e.parentElement;i&&ee(i,t)}}function te(e,t=null){let n=new x(e,t);C(n)}function Oe(){document.querySelectorAll("[data-wml-event]").forEach(function(t){let n=t.getAttribute("data-wml-event"),i=t.getAttribute("data-wml-confirm"),o=t.getAttribute("data-wml-trigger")||"click",r=function(){if(i){p({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(a){a!=="No"&&te(n)});return}te(n)};t.removeEventListener(o,r),t.addEventListener(o,r)})}function ne(e){wails.Window[e]===void 0&&console.log("Window method "+e+" not found"),wails.Window[e]()}function ze(){document.querySelectorAll("[data-wml-window]").forEach(function(t){let n=t.getAttribute("data-wml-window"),i=t.getAttribute("data-wml-confirm"),o=t.getAttribute("data-wml-trigger")||"click",r=function(){if(i){p({Title:"Confirm",Message:i,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(function(a){a!=="No"&&ne(n)});return}ne(n)};t.removeEventListener(o,r),t.addEventListener(o,r)})}function z(){Oe(),ze()}var R=function(e){chrome.webview.postMessage(e)};var ie=new Map;fetch("/wails/flags").then(e=>{e.json().then(t=>{ie.Set(t)})});function Re(e){let t=e.split("."),n=ie;for(let i of t)if(n instanceof Map?n=n.get(i):n=n[i],n===void 0)break;return n}function y(e){return Re(e)}var w=!1;function ye(e){if(window.wails.Capabilities.HasNativeDrag===!0)return!1;let t=window.getComputedStyle(e.target).getPropertyValue("app-region");return t&&(t=t.trim()),t!=="drag"||e.buttons!==1?!1:e.detail===1}function oe(){window.addEventListener("mousedown",Te),window.addEventListener("mousemove",Pe),window.addEventListener("mouseup",De)}var b=null;function Ae(e){return b!==null?(R("resize:"+b),!0):!1}function Te(e){if(!Ae())if(ye(e)){if(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight)return;w=!0}else w=!1}function De(e){(e.buttons!==void 0?e.buttons:e.which)>0&&A()}function A(){document.body.style.cursor="default",w=!1}function c(e){document.documentElement.style.cursor=e||He,b=e}function Pe(e){w&&(w=!1,(e.buttons!==void 0?e.buttons:e.which)>0&&R("drag")),Ne(e)}var He="auto";function Ne(e){let t=y("system.resizeHandleHeight")||5,n=y("system.resizeHandleWidth")||5,i=window.outerWidth-e.clientX{e.json().then(t=>{window.wails.Capabilities=t})});window._wails={dialogCallback:X,dialogErrorCallback:j,dispatchWailsEvent:U,callCallback:D,callErrorCallback:P,endDrag:A};function re(e){return{Clipboard:{...M},Application:{...E,GetWindowByName(t){return re(t)}},Log:W,Screens:L,Call:N,Plugin:F,WML:{Reload:z},Dialog:{Info:J,Warning:q,Error:V,Question:p,OpenFile:_,SaveFile:K},Events:{Emit:C,On:G,Once:I,OnMultiple:v,Off:Q,OffAll:Y},Window:B(e)}}console.log("Wails v3.0.0 Debug Mode Enabled");$(!0);oe();document.addEventListener("DOMContentLoaded",function(e){z()});})();