diff --git a/v2/internal/frontend/runtime/desktop/events.js b/v2/internal/frontend/runtime/desktop/events.js index 464a72c5..30f21364 100644 --- a/v2/internal/frontend/runtime/desktop/events.js +++ b/v2/internal/frontend/runtime/desktop/events.js @@ -152,7 +152,7 @@ export function EventsEmit(eventName) { export function EventsOff(eventName) { // Remove local listeners - eventListeners.delete(eventName); + delete eventListeners[eventName]; // Notify Go listeners window.WailsInvoke('EX' + eventName); diff --git a/v2/internal/frontend/runtime/ipc_websocket.js b/v2/internal/frontend/runtime/ipc_websocket.js index ccf663e7..57ad8bbe 100644 --- a/v2/internal/frontend/runtime/ipc_websocket.js +++ b/v2/internal/frontend/runtime/ipc_websocket.js @@ -4,7 +4,7 @@ }`,f=`__svelte_${qt(y)}_${l}`,u=P(t);N.add(u);let h=u.__svelte_stylesheet||(u.__svelte_stylesheet=Jt(t).sheet),_=u.__svelte_rules||(u.__svelte_rules={});_[f]||(_[f]=!0,h.insertRule(`@keyframes ${f} ${y}`,h.cssRules.length));let w=t.style.animation||"";return t.style.animation=`${w?`${w}, `:""}${f} ${i}ms linear ${r}ms 1 both`,B+=1,f}function Gt(t,e){let n=(t.style.animation||"").split(", "),i=n.filter(e?c=>c.indexOf(e)<0:c=>c.indexOf("__svelte")===-1),r=n.length-i.length;r&&(t.style.animation=i.join(", "),B-=r,B||Kt())}function Kt(){K(()=>{B||(N.forEach(t=>{let e=t.__svelte_stylesheet,n=e.cssRules.length;for(;n--;)e.deleteRule(n);t.__svelte_rules={}}),N.clear())})}var _t;function J(t){_t=t}var $=[];var pt=[],z=[],mt=[],Pt=Promise.resolve(),W=!1;function Rt(){W||(W=!0,Pt.then(yt))}function x(t){z.push(t)}var V=!1,U=new Set;function yt(){if(!V){V=!0;do{for(let t=0;t<$.length;t+=1){let e=$[t];J(e),Nt(e.$$)}for(J(null),$.length=0;pt.length;)pt.pop()();for(let t=0;t{k=null})),k}function X(t,e,n){t.dispatchEvent(Ht(`${e?"intro":"outro"}${n}`))}var T=new Set,m;function gt(){m={r:0,c:[],p:m}}function bt(){m.r||b(m.c),m=m.p}function C(t,e){t&&t.i&&(T.delete(t),t.i(e))}function Z(t,e,n,i){if(t&&t.o){if(T.has(t))return;T.add(t),m.c.push(()=>{T.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}}var Vt={duration:0};function Q(t,e,n,i){let r=e(t,n),c=i?0:1,s=null,l=null,a=null;function o(){a&&Gt(t,a)}function y(u,h){let _=u.b-c;return h*=Math.abs(_),{a:c,b:u.b,d:_,duration:h,start:u.start,end:u.start+h,group:u.group}}function f(u){let{delay:h=0,duration:_=300,easing:w=O,tick:g=p,css:v}=r||Vt,q={start:Ot()+h,b:u};u||(q.group=m,m.r+=1),s||l?l=q:(v&&(o(),a=ht(t,c,u,_,h,w,v)),u&&g(0,1),s=y(q,_),x(()=>X(t,u,"start")),Dt(E=>{if(l&&E>l.start&&(s=y(l,_),l=null,X(t,s.b,"start"),v&&(o(),a=ht(t,c,s.b,s.duration,0,w,r.css))),s){if(E>=s.end)g(c=s.b,1-c),X(t,s.b,"end"),l||(s.b?o():--s.group.r||b(s.group.c)),s=null;else if(E>=s.start){let jt=E-s.start;c=s.a+s.d*w(jt/s.duration),g(c,1-c)}}return!!(s||l)}))}return{run(u){S(r)?Wt().then(()=>{r=r(),f(u)}):f(u)},end(){o(),s=l=null}}}var ce=typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:global;var le=new Set(["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]);function Ut(t,e,n,i){let{fragment:r,on_mount:c,on_destroy:s,after_update:l}=t.$$;r&&r.m(e,n),i||x(()=>{let a=c.map(G).filter(S);s?s.push(...a):b(a),t.$$.on_mount=[]}),l.forEach(x)}function wt(t,e){let n=t.$$;n.fragment!==null&&(b(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Xt(t,e){t.$$.dirty[0]===-1&&($.push(t),Rt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{let _=h.length?h[0]:u;return o.ctx&&r(o.ctx[f],o.ctx[f]=_)&&(!o.skip_bound&&o.bound[f]&&o.bound[f](_),y&&Xt(t,f)),u}):[],o.update(),y=!0,b(o.before_update),o.fragment=i?i(o.ctx):!1,e.target){if(e.hydrate){At();let f=Tt(e.target);o.fragment&&o.fragment.l(f),f.forEach(A)}else o.fragment&&o.fragment.c();e.intro&&C(t.$$.fragment),Ut(t,e.target,e.anchor,e.customElement),Lt(),yt()}J(a)}var Zt;typeof HTMLElement=="function"&&(Zt=class extends HTMLElement{constructor(){super();this.attachShadow({mode:"open"})}connectedCallback(){let{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(G).filter(S);for(let e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){b(this.$$.on_disconnect)}$destroy(){wt(this,1),this.$destroy=p}$on(t,e){let n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{let i=n.indexOf(e);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!it(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var Y=class{$destroy(){wt(this,1),this.$destroy=p}$on(e,n){let i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{let r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!it(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}};var M=[];function Ft(t,e=p){let n,i=new Set;function r(l){if(D(t,l)&&(t=l,n)){let a=!M.length;for(let o of i)o[1](),M.push(o,t);if(a){for(let o=0;o{i.delete(o),i.size===0&&(n(),n=null)}}return{set:r,update:c,subscribe:s}}var H=Ft(!1);function xt(){H.set(!0)}function Mt(){H.set(!1)}function tt(t,{delay:e=0,duration:n=400,easing:i=O}={}){let r=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:i,css:c=>`opacity: ${c*r}`}}function Qt(t){ut(t,"svelte-181h7z",`.wails-reconnect-overlay.svelte-181h7z{position:fixed;top:0;left:0;width:100%;height:100%;backdrop-filter:blur(2px) saturate(0%) contrast(50%) brightness(25%);z-index:999999\r }.wails-reconnect-overlay-content.svelte-181h7z{position:relative;top:50%;transform:translateY(-50%);margin:0;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAAA7CAMAAAAEsocZAAAC91BMVEUAAACzQ0PjMjLkMjLZLS7XLS+vJCjkMjKlEx6uGyHjMDGiFx7GJyrAISjUKy3mMzPlMjLjMzOsGyDKJirkMjK6HyXmMjLgMDC6IiLcMjLULC3MJyrRKSy+IibmMzPmMjK7ISXlMjLIJimzHSLkMjKtGiHZLC7BIifgMDCpGSDFIivcLy+yHSKoGR+eFBzNKCvlMjKxHSPkMTKxHSLmMjLKJyq5ICXDJCe6ISXdLzDkMjLmMzPFJSm2HyTlMTLhMDGyHSKUEBmhFx24HyTCJCjHJijjMzOiFh7mMjJ6BhDaLDCuGyOKABjnMzPGJinJJiquHCGEChSmGB/pMzOiFh7VKy3OKCu1HiSvHCLjMTLMKCrBIyeICxWxHCLDIyjSKizBIyh+CBO9ISa6ISWDChS9Iie1HyXVLC7FJSrLKCrlMjLiMTGPDhicFRywGyKXFBuhFx1/BxO7IiXkMTGeFBx8BxLkMTGnGR/GJCi4ICWsGyGJDxXSLS2yGiHSKi3CJCfnMzPQKiyECRTKJiq6ISWUERq/Iye0HiPDJCjGJSm6ICaPDxiTEBrdLy+3HyXSKiy0HyOQEBi4ICWhFh1+CBO9IieODhfSKyzWLC2LDhh8BxHKKCq7ISWaFBzkMzPqNDTTLC3EJSiHDBacExyvGyO1HyTPKCy+IieoGSC7ISaVEhrMKCvQKyusGyG0HiKACBPIJSq/JCaABxR5BRLEJCnkMzPJJinEJimPDRZ2BRKqHx/jMjLnMzP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-overlay-loadingspinner.svelte-181h7z{pointer-events:none;width:2.5em;height:2.5em;border:.4em solid transparent;border-color:#f00 #eee0 #f00 #eee0;border-radius:50%;animation:svelte-181h7z-loadingspin 1s linear infinite;margin:auto;padding:2.5em\r - }@keyframes svelte-181h7z-loadingspin{100%{transform:rotate(360deg)}}`)}function St(t){let e,n,i;return{c(){e=L("div"),e.innerHTML='
',dt(e,"class","wails-reconnect-overlay svelte-181h7z")},m(r,c){R(r,e,c),i=!0},i(r){i||(x(()=>{n||(n=Q(e,tt,{duration:300},!0)),n.run(1)}),i=!0)},o(r){n||(n=Q(e,tt,{duration:300},!1)),n.run(0),i=!1},d(r){r&&A(e),r&&n&&n.end()}}}function Yt(t){let e,n,i=t[0]&&St(t);return{c(){i&&i.c(),e=ft()},m(r,c){i&&i.m(r,c),R(r,e,c),n=!0},p(r,[c]){r[0]?i?c&1&&C(i,1):(i=St(r),i.c(),C(i,1),i.m(e.parentNode,e)):i&&(gt(),Z(i,1,1,()=>{i=null}),bt())},i(r){n||(C(i),n=!0)},o(r){Z(i),n=!1},d(r){i&&i.d(r),r&&A(e)}}}function te(t,e,n){let i;return ot(t,H,r=>n(0,i=r)),[i]}var $t=class extends Y{constructor(e){super();vt(this,e,te,Yt,D,{},Qt)}},kt=$t;var ee={},et=null,I=[];window.WailsInvoke=t=>{if(!et){console.log("Queueing: "+t),I.push(t);return}et(t)};window.addEventListener("DOMContentLoaded",()=>{ee.overlay=new kt({target:document.body,anchor:document.querySelector("#wails-spinner")})});var d=null,Ct;window.onbeforeunload=function(){d&&(d.onclose=function(){},d.close(),d=null)};Et();function ne(){et=t=>{d.send(t)};for(let t=0;t
',dt(e,"class","wails-reconnect-overlay svelte-181h7z")},m(r,c){R(r,e,c),i=!0},i(r){i||(x(()=>{n||(n=Q(e,tt,{duration:300},!0)),n.run(1)}),i=!0)},o(r){n||(n=Q(e,tt,{duration:300},!1)),n.run(0),i=!1},d(r){r&&A(e),r&&n&&n.end()}}}function Yt(t){let e,n,i=t[0]&&St(t);return{c(){i&&i.c(),e=ft()},m(r,c){i&&i.m(r,c),R(r,e,c),n=!0},p(r,[c]){r[0]?i?c&1&&C(i,1):(i=St(r),i.c(),C(i,1),i.m(e.parentNode,e)):i&&(gt(),Z(i,1,1,()=>{i=null}),bt())},i(r){n||(C(i),n=!0)},o(r){Z(i),n=!1},d(r){i&&i.d(r),r&&A(e)}}}function te(t,e,n){let i;return ot(t,H,r=>n(0,i=r)),[i]}var $t=class extends Y{constructor(e){super();vt(this,e,te,Yt,D,{},Qt)}},kt=$t;var ee={},et=null,I=[];window.WailsInvoke=t=>{if(!et){console.log("Queueing: "+t),I.push(t);return}et(t)};window.addEventListener("DOMContentLoaded",()=>{ee.overlay=new kt({target:document.body,anchor:document.querySelector("#wails-spinner")})});var d=null,Ct;window.onbeforeunload=function(){d&&(d.onclose=function(){},d.close(),d=null)};Et();function ne(){et=t=>{d.send(t)};for(let t=0;t{var E=Object.defineProperty;var O=e=>E(e,"__esModule",{value:!0});var W=(e,n)=>{O(e);for(var o in n)E(e,o,{get:n[o],enumerable:!0})};var p={};W(p,{LogDebug:()=>D,LogError:()=>H,LogFatal:()=>J,LogInfo:()=>B,LogLevel:()=>G,LogPrint:()=>C,LogTrace:()=>R,LogWarning:()=>T,SetLogLevel:()=>F});function w(e,n){window.WailsInvoke("L"+e+n)}function R(e){w("T",e)}function C(e){w("P",e)}function D(e){w("D",e)}function B(e){w("I",e)}function T(e){w("W",e)}function H(e){w("E",e)}function J(e){w("F",e)}function F(e){w("S",e)}var G={TRACE:1,DEBUG:2,INFO:3,WARNING:4,ERROR:5};var m=class{constructor(n,o){o=o||-1,this.Callback=i=>(n.apply(null,i),o===-1?!1:(o-=1,o===0))}},s={};function c(e,n,o){s[e]=s[e]||[];let i=new m(n,o);s[e].push(i)}function b(e,n){c(e,n,-1)}function I(e,n){c(e,n,1)}function y(e){let n=e.name;if(s[n]){let o=s[n].slice();for(let i=0;i0&&(a=setTimeout(function(){t(Error("Call to "+e+" timed out. Request ID: "+r))},o)),d[r]={timeoutHandle:a,reject:t,resolve:i};try{let u={name:e,args:n,callbackID:r};window.WailsInvoke("C"+JSON.stringify(u))}catch(u){console.error(u)}})}function L(e){var n;try{n=JSON.parse(e)}catch(t){let r=`Invalid JSON passed to callback: ${t.message}. Message: ${e}`;throw wails.LogDebug(r),new Error(r)}var o=n.callbackid,i=d[o];if(!i){let t=`Callback '${o}' not registered!!!`;throw console.error(t),new Error(t)}clearTimeout(i.timeoutHandle),delete d[o],n.error?i.reject(n.error):i.resolve(n.result)}window.go={};function z(e){try{e=JSON.parse(e)}catch(n){console.error(n)}window.go=window.go||{},Object.keys(e).forEach(n=>{window.go[n]=window.go[n]||{},Object.keys(e[n]).forEach(o=>{window.go[n][o]=window.go[n][o]||{},Object.keys(e[n][o]).forEach(i=>{window.go[n][o][i]=function(){let t=0;function r(){let a=[].slice.call(arguments);return f([n,o,i].join("."),a,t)}return r.setTimeout=function(a){t=a},r.getTimeout=function(){return t},r}()})})})}var v={};W(v,{WindowCenter:()=>P,WindowFullscreen:()=>X,WindowGetPosition:()=>Z,WindowGetSize:()=>Q,WindowHide:()=>K,WindowMaximise:()=>ee,WindowMinimise:()=>oe,WindowReload:()=>M,WindowSetMaxSize:()=>V,WindowSetMinSize:()=>q,WindowSetPosition:()=>N,WindowSetRGBA:()=>te,WindowSetSize:()=>$,WindowSetTitle:()=>j,WindowShow:()=>_,WindowUnFullscreen:()=>Y,WindowUnmaximise:()=>ne,WindowUnminimise:()=>ie});function M(){window.location.reload()}function P(){window.WailsInvoke("Wc")}function j(e){window.WailsInvoke("WT"+e)}function X(){window.WailsInvoke("WF")}function Y(){window.WailsInvoke("Wf")}function $(e,n){window.WailsInvoke("Ws:"+e+":"+n)}function Q(){return f(":wails:WindowGetSize")}function V(e,n){window.WailsInvoke("WZ:"+e+":"+n)}function q(e,n){window.WailsInvoke("Wz:"+e+":"+n)}function N(e,n){window.WailsInvoke("Wp:"+e+":"+n)}function Z(){return f(":wails:WindowGetPos")}function K(){window.WailsInvoke("WH")}function _(){window.WailsInvoke("WS")}function ee(){window.WailsInvoke("WM")}function ne(){window.WailsInvoke("WU")}function oe(){window.WailsInvoke("Wm")}function ie(){window.WailsInvoke("Wu")}function te(e){let n=JSON.stringify(e);window.WailsInvoke("Wr:"+n)}var x={};W(x,{BrowserOpenURL:()=>re});function re(e){window.WailsInvoke("BO:"+e)}function se(){window.WailsInvoke("Q")}window.runtime={...p,...v,...x,EventsOn:b,EventsOnce:I,EventsOnMultiple:c,EventsEmit:S,EventsOff:h,Quit:se};window.wails={Callback:L,EventsNotify:k,SetBindings:z,eventListeners:s,callbacks:d,flags:{disableScrollbarDrag:!1,disableWailsDefaultContextMenu:!1,enableResize:!1,defaultCursor:null}};window.wails.SetBindings(window.wailsbindings);delete window.wails.SetBindings;window.addEventListener("mousedown",e=>{if(window.wails.flags.resizeEdge){window.WailsInvoke("resize:"+window.wails.flags.resizeEdge),e.preventDefault();return}let n=e.target;for(;n!=null&&!n.hasAttribute("data-wails-no-drag");){if(n.hasAttribute("data-wails-drag")){if(window.wails.flags.disableScrollbarDrag&&(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight))break;window.WailsInvoke("drag"),e.preventDefault();break}n=n.parentElement}});function l(e){document.body.style.cursor=e||window.wails.flags.defaultCursor,window.wails.flags.resizeEdge=e}window.addEventListener("mousemove",function(e){if(!window.wails.flags.enableResize)return;window.wails.flags.defaultCursor==null&&(window.wails.flags.defaultCursor=document.body.style.cursor),window.outerWidth-e.clientX<16&&window.outerHeight-e.clientY<16&&(document.body.style.cursor="se-resize");let n=window.outerWidth-e.clientX<16,o=e.clientX<16,i=e.clientY<16,t=window.outerHeight-e.clientY<16;!o&&!n&&!i&&!t&&window.wails.flags.resizeEdge!==void 0?l():n&&t?l("se-resize"):o&&t?l("sw-resize"):o&&i?l("nw-resize"):i&&n?l("ne-resize"):o?l("w-resize"):i?l("n-resize"):t?l("s-resize"):n&&l("e-resize")});window.addEventListener("contextmenu",function(e){window.wails.flags.disableWailsDefaultContextMenu&&e.preventDefault()});})(); +(()=>{var E=Object.defineProperty;var O=e=>E(e,"__esModule",{value:!0});var W=(e,n)=>{O(e);for(var o in n)E(e,o,{get:n[o],enumerable:!0})};var p={};W(p,{LogDebug:()=>D,LogError:()=>H,LogFatal:()=>J,LogInfo:()=>B,LogLevel:()=>G,LogPrint:()=>C,LogTrace:()=>R,LogWarning:()=>T,SetLogLevel:()=>F});function w(e,n){window.WailsInvoke("L"+e+n)}function R(e){w("T",e)}function C(e){w("P",e)}function D(e){w("D",e)}function B(e){w("I",e)}function T(e){w("W",e)}function H(e){w("E",e)}function J(e){w("F",e)}function F(e){w("S",e)}var G={TRACE:1,DEBUG:2,INFO:3,WARNING:4,ERROR:5};var m=class{constructor(n,o){o=o||-1,this.Callback=i=>(n.apply(null,i),o===-1?!1:(o-=1,o===0))}},s={};function c(e,n,o){s[e]=s[e]||[];let i=new m(n,o);s[e].push(i)}function b(e,n){c(e,n,-1)}function I(e,n){c(e,n,1)}function y(e){let n=e.name;if(s[n]){let o=s[n].slice();for(let i=0;i0&&(a=setTimeout(function(){t(Error("Call to "+e+" timed out. Request ID: "+r))},o)),d[r]={timeoutHandle:a,reject:t,resolve:i};try{let u={name:e,args:n,callbackID:r};window.WailsInvoke("C"+JSON.stringify(u))}catch(u){console.error(u)}})}function L(e){var n;try{n=JSON.parse(e)}catch(t){let r=`Invalid JSON passed to callback: ${t.message}. Message: ${e}`;throw wails.LogDebug(r),new Error(r)}var o=n.callbackid,i=d[o];if(!i){let t=`Callback '${o}' not registered!!!`;throw console.error(t),new Error(t)}clearTimeout(i.timeoutHandle),delete d[o],n.error?i.reject(n.error):i.resolve(n.result)}window.go={};function z(e){try{e=JSON.parse(e)}catch(n){console.error(n)}window.go=window.go||{},Object.keys(e).forEach(n=>{window.go[n]=window.go[n]||{},Object.keys(e[n]).forEach(o=>{window.go[n][o]=window.go[n][o]||{},Object.keys(e[n][o]).forEach(i=>{window.go[n][o][i]=function(){let t=0;function r(){let a=[].slice.call(arguments);return f([n,o,i].join("."),a,t)}return r.setTimeout=function(a){t=a},r.getTimeout=function(){return t},r}()})})})}var v={};W(v,{WindowCenter:()=>P,WindowFullscreen:()=>X,WindowGetPosition:()=>Z,WindowGetSize:()=>Q,WindowHide:()=>K,WindowMaximise:()=>ee,WindowMinimise:()=>oe,WindowReload:()=>M,WindowSetMaxSize:()=>V,WindowSetMinSize:()=>q,WindowSetPosition:()=>N,WindowSetRGBA:()=>te,WindowSetSize:()=>$,WindowSetTitle:()=>j,WindowShow:()=>_,WindowUnFullscreen:()=>Y,WindowUnmaximise:()=>ne,WindowUnminimise:()=>ie});function M(){window.location.reload()}function P(){window.WailsInvoke("Wc")}function j(e){window.WailsInvoke("WT"+e)}function X(){window.WailsInvoke("WF")}function Y(){window.WailsInvoke("Wf")}function $(e,n){window.WailsInvoke("Ws:"+e+":"+n)}function Q(){return f(":wails:WindowGetSize")}function V(e,n){window.WailsInvoke("WZ:"+e+":"+n)}function q(e,n){window.WailsInvoke("Wz:"+e+":"+n)}function N(e,n){window.WailsInvoke("Wp:"+e+":"+n)}function Z(){return f(":wails:WindowGetPos")}function K(){window.WailsInvoke("WH")}function _(){window.WailsInvoke("WS")}function ee(){window.WailsInvoke("WM")}function ne(){window.WailsInvoke("WU")}function oe(){window.WailsInvoke("Wm")}function ie(){window.WailsInvoke("Wu")}function te(e){let n=JSON.stringify(e);window.WailsInvoke("Wr:"+n)}var x={};W(x,{BrowserOpenURL:()=>re});function re(e){window.WailsInvoke("BO:"+e)}function se(){window.WailsInvoke("Q")}window.runtime={...p,...v,...x,EventsOn:b,EventsOnce:I,EventsOnMultiple:c,EventsEmit:S,EventsOff:h,Quit:se};window.wails={Callback:L,EventsNotify:k,SetBindings:z,eventListeners:s,callbacks:d,flags:{disableScrollbarDrag:!1,disableWailsDefaultContextMenu:!1,enableResize:!1,defaultCursor:null}};window.wails.SetBindings(window.wailsbindings);delete window.wails.SetBindings;window.addEventListener("mousedown",e=>{if(window.wails.flags.resizeEdge){window.WailsInvoke("resize:"+window.wails.flags.resizeEdge),e.preventDefault();return}let n=e.target;for(;n!=null&&!n.hasAttribute("data-wails-no-drag");){if(n.hasAttribute("data-wails-drag")){if(window.wails.flags.disableScrollbarDrag&&(e.offsetX>e.target.clientWidth||e.offsetY>e.target.clientHeight))break;window.WailsInvoke("drag"),e.preventDefault();break}n=n.parentElement}});function l(e){document.body.style.cursor=e||window.wails.flags.defaultCursor,window.wails.flags.resizeEdge=e}window.addEventListener("mousemove",function(e){if(!window.wails.flags.enableResize)return;window.wails.flags.defaultCursor==null&&(window.wails.flags.defaultCursor=document.body.style.cursor),window.outerWidth-e.clientX<16&&window.outerHeight-e.clientY<16&&(document.body.style.cursor="se-resize");let n=window.outerWidth-e.clientX<16,o=e.clientX<16,i=e.clientY<16,t=window.outerHeight-e.clientY<16;!o&&!n&&!i&&!t&&window.wails.flags.resizeEdge!==void 0?l():n&&t?l("se-resize"):o&&t?l("sw-resize"):o&&i?l("nw-resize"):i&&n?l("ne-resize"):o?l("w-resize"):i?l("n-resize"):t?l("s-resize"):n&&l("e-resize")});window.addEventListener("contextmenu",function(e){window.wails.flags.disableWailsDefaultContextMenu&&e.preventDefault()});})();