tauri/examples/api/dist/assets/index.js
2023-02-19 11:34:02 -03:00

48 lines
87 KiB
JavaScript

(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function V(){}function ws(e){return e()}function Vl(){return Object.create(null)}function se(e){e.forEach(ws)}function so(e){return typeof e=="function"}function _e(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Gn;function oo(e,t){return Gn||(Gn=document.createElement("a")),Gn.href=t,e===Gn.href}function ao(e){return Object.keys(e).length===0}function ro(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ks(e,t,n){e.$$.on_destroy.push(ro(t,n))}function s(e,t){e.appendChild(t)}function m(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function mt(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function a(e){return document.createElement(e)}function uo(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function z(e){return document.createTextNode(e)}function h(){return z(" ")}function ii(){return z("")}function L(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function Zn(e){return function(t){return t.preventDefault(),e.call(this,t)}}function r(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e===""?null:+e}function co(e){return Array.from(e.childNodes)}function Q(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function Dt(e,t){for(let n=0;n<e.options.length;n+=1){const i=e.options[n];if(i.__value===t){i.selected=!0;return}}e.selectedIndex=-1}function Pi(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}function Jn(e,t,n){e.classList[n?"add":"remove"](t)}class fo{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,i=null){this.e||(this.is_svg?this.e=uo(n.nodeName):this.e=a(n.nodeName),this.t=n,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n<this.n.length;n+=1)m(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(p)}}let Vt;function Bt(e){Vt=e}function Ms(){if(!Vt)throw new Error("Function called outside component initialization");return Vt}function dt(e){Ms().$$.on_mount.push(e)}function Ii(e){Ms().$$.on_destroy.push(e)}const Ut=[],$n=[],Yn=[],Gl=[],po=Promise.resolve();let Oi=!1;function mo(){Oi||(Oi=!0,po.then(Ts))}function Wt(e){Yn.push(e)}const Di=new Set;let Xn=0;function Ts(){const e=Vt;do{for(;Xn<Ut.length;){const t=Ut[Xn];Xn++,Bt(t),ho(t.$$)}for(Bt(null),Ut.length=0,Xn=0;$n.length;)$n.pop()();for(let t=0;t<Yn.length;t+=1){const n=Yn[t];Di.has(n)||(Di.add(n),n())}Yn.length=0}while(Ut.length);for(;Gl.length;)Gl.pop()();Oi=!1,Di.clear(),Bt(e)}function ho(e){if(e.fragment!==null){e.update(),se(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Wt)}}const Kn=new Set;let ft;function li(){ft={r:0,c:[],p:ft}}function si(){ft.r||se(ft.c),ft=ft.p}function Se(e,t){e&&e.i&&(Kn.delete(e),e.i(t))}function Ie(e,t,n,i){if(e&&e.o){if(Kn.has(e))return;Kn.add(e),ft.c.push(()=>{Kn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function xn(e){e&&e.c()}function Gt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Wt(()=>{const c=o.map(ws).filter(so);u?u.push(...c):se(c),e.$$.on_mount=[]}),d.forEach(Wt)}function Jt(e,t){const n=e.$$;n.fragment!==null&&(se(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function _o(e,t){e.$$.dirty[0]===-1&&(Ut.push(e),mo(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ye(e,t,n,i,l,o,u,d=[-1]){const c=Vt;Bt(e);const f=e.$$={fragment:null,ctx:null,props:o,update:V,not_equal:l,bound:Vl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:Vl(),dirty:d,skip_bound:!1,root:t.target||c.$$.root};u&&u(f.root);let g=!1;if(f.ctx=n?n(e,t.props||{},(k,_,...v)=>{const y=v.length?v[0]:_;return f.ctx&&l(f.ctx[k],f.ctx[k]=y)&&(!f.skip_bound&&f.bound[k]&&f.bound[k](y),g&&_o(e,k)),_}):[],f.update(),g=!0,se(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const k=co(t.target);f.fragment&&f.fragment.l(k),k.forEach(p)}else f.fragment&&f.fragment.c();t.intro&&Se(e.$$.fragment),Gt(e,t.target,t.anchor,t.customElement),Ts()}Bt(c)}class ve{$destroy(){Jt(this,1),this.$destroy=V}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(t){this.$$set&&!ao(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const zt=[];function Cs(e,t=V){let n;const i=new Set;function l(d){if(_e(e,d)&&(e=d,n)){const c=!zt.length;for(const f of i)f[1](),zt.push(f,e);if(c){for(let f=0;f<zt.length;f+=2)zt[f][0](zt[f+1]);zt.length=0}}}function o(d){l(d(e))}function u(d,c=V){const f=[d,c];return i.add(f),i.size===1&&(n=t(l)||V),d(e),()=>{i.delete(f),i.size===0&&(n(),n=null)}}return{set:l,update:o,subscribe:u}}var bo=Object.defineProperty,Ce=(e,t)=>{for(var n in t)bo(e,n,{get:t[n],enumerable:!0})},go={};Ce(go,{convertFileSrc:()=>As,invoke:()=>ei,transformCallback:()=>ht});function yo(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function ht(e,t=!1){let n=yo(),i=`_${n}`;return Object.defineProperty(window,i,{value:l=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(l)),writable:!1,configurable:!0}),n}async function ei(e,t={}){return new Promise((n,i)=>{let l=ht(u=>{n(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=ht(u=>{i(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:e,callback:l,error:o,...t})})}function As(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function S(e){return ei("tauri",e)}var vo={};Ce(vo,{Child:()=>Ss,Command:()=>Hi,EventEmitter:()=>Qn,open:()=>Fi});async function wo(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),S({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:ht(e)}})}var Qn=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 n=(...i)=>{this.removeListener(e,n),t(...i)};return this.addListener(e,n)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(n=>n!==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 n=this.eventListeners[e];for(let i of n)i(...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 n=(...i)=>{this.removeListener(e,n),t(...i)};return this.prependListener(e,n)}},Ss=class{constructor(e){this.pid=e}async write(e){return S({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return S({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Hi=class extends Qn{constructor(e,t=[],n){super(),this.stdout=new Qn,this.stderr=new Qn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static sidecar(e,t=[],n){let i=new Hi(e,t,n);return i.options.sidecar=!0,i}async spawn(){return wo(e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload);break}},this.program,this.args,this.options).then(e=>new Ss(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",l=>{n.push(l)}),this.stderr.on("data",l=>{i.push(l)}),this.on("close",l=>{e({code:l.code,signal:l.signal,stdout:n.join(`
`),stderr:i.join(`
`)})}),this.spawn().catch(t)})}};async function Fi(e,t){return S({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var ko={};Ce(ko,{TauriEvent:()=>Ds,emit:()=>oi,listen:()=>Yt,once:()=>Ws});async function Ls(e,t){return S({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Es(e,t,n){await S({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Ni(e,t,n){return S({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:ht(n)}}).then(i=>async()=>Ls(e,i))}async function zs(e,t,n){return Ni(e,t,i=>{n(i),Ls(e,i.id).catch(()=>{})})}var Ds=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(Ds||{});async function Yt(e,t){return Ni(e,null,t)}async function Ws(e,t){return zs(e,null,t)}async function oi(e,t){return Es(e,void 0,t)}var Mo={};Ce(Mo,{CloseRequestedEvent:()=>Hs,LogicalPosition:()=>Ps,LogicalSize:()=>ti,PhysicalPosition:()=>nt,PhysicalSize:()=>pt,UserAttentionType:()=>ji,WebviewWindow:()=>_t,WebviewWindowHandle:()=>Rs,WindowManager:()=>Is,appWindow:()=>qe,availableMonitors:()=>Ao,currentMonitor:()=>To,getAll:()=>Os,getCurrent:()=>qt,primaryMonitor:()=>Co});var ti=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},pt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new ti(this.width/e,this.height/e)}},Ps=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},nt=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Ps(this.x/e,this.y/e)}},ji=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(ji||{});function qt(){return new _t(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Os(){return window.__TAURI_METADATA__.__windows.map(e=>new _t(e.label,{skip:!0}))}var Jl=["tauri://created","tauri://error"],Rs=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Ni(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):zs(e,this.label,t)}async emit(e,t){if(Jl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return Es(e,this.label,t)}_handleTauriEvent(e,t){return Jl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Is=class extends Rs{async scaleFactor(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new nt(e,t))}async outerPosition(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new nt(e,t))}async innerSize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new pt(e,t))}async outerSize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new pt(e,t))}async isFullscreen(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return S({__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"}),S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return S({__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 S({__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 S({__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 S({__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 S({__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 S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return S({__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 S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return S({__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 S({__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 S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return S({__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 n=new Hs(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}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",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),n=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),i=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Hs=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}},_t=class extends Is{constructor(e,t={}){super(e),t!=null&&t.skip||S({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return Os().some(t=>t.label===e)?new _t(e,{skip:!0}):null}},qe;"__TAURI_METADATA__"in window?qe=new _t(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.`),qe=new _t("main",{skip:!0}));function Ui(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new nt(e.position.x,e.position.y),size:new pt(e.size.width,e.size.height)}}async function To(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Ui)}async function Co(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Ui)}async function Ao(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Ui))}function So(){return navigator.appVersion.includes("Win")}var Lo={};Ce(Lo,{EOL:()=>Eo,arch:()=>Wo,platform:()=>Fs,tempdir:()=>Po,type:()=>Do,version:()=>zo});var Eo=So()?`\r
`:`
`;async function Fs(){return S({__tauriModule:"Os",message:{cmd:"platform"}})}async function zo(){return S({__tauriModule:"Os",message:{cmd:"version"}})}async function Do(){return S({__tauriModule:"Os",message:{cmd:"osType"}})}async function Wo(){return S({__tauriModule:"Os",message:{cmd:"arch"}})}async function Po(){return S({__tauriModule:"Os",message:{cmd:"tempdir"}})}var Oo={};Ce(Oo,{getName:()=>js,getTauriVersion:()=>Us,getVersion:()=>Ns,hide:()=>Bs,show:()=>qs});async function Ns(){return S({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function js(){return S({__tauriModule:"App",message:{cmd:"getAppName"}})}async function Us(){return S({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function qs(){return S({__tauriModule:"App",message:{cmd:"show"}})}async function Bs(){return S({__tauriModule:"App",message:{cmd:"hide"}})}var Ro={};Ce(Ro,{exit:()=>Vs,relaunch:()=>qi});async function Vs(e=0){return S({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function qi(){return S({__tauriModule:"Process",message:{cmd:"relaunch"}})}function Io(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j,E,M,A,P,T,F;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri&#39;s API capabilities using the <code>@tauri-apps/api</code> package. It&#39;s used as the main validation app, serving as the test bed of our
development process. In the future, this app will be used on Tauri&#39;s integration
tests.`,n=h(),i=a("br"),l=h(),o=a("br"),u=h(),d=a("pre"),c=z("App name: "),f=a("code"),g=z(e[2]),k=z(`
App version: `),_=a("code"),v=z(e[0]),y=z(`
Tauri version: `),b=a("code"),C=z(e[1]),W=z(`
`),I=h(),O=a("br"),j=h(),E=a("div"),M=a("button"),M.textContent="Close application",A=h(),P=a("button"),P.textContent="Relaunch application",r(M,"class","btn"),r(P,"class","btn"),r(E,"class","flex flex-wrap gap-1 shadow-")},m(U,J){m(U,t,J),m(U,n,J),m(U,i,J),m(U,l,J),m(U,o,J),m(U,u,J),m(U,d,J),s(d,c),s(d,f),s(f,g),s(d,k),s(d,_),s(_,v),s(d,y),s(d,b),s(b,C),s(d,W),m(U,I,J),m(U,O,J),m(U,j,J),m(U,E,J),s(E,M),s(E,A),s(E,P),T||(F=[L(M,"click",e[3]),L(P,"click",e[4])],T=!0)},p(U,[J]){J&4&&Q(g,U[2]),J&1&&Q(v,U[0]),J&2&&Q(C,U[1])},i:V,o:V,d(U){U&&p(t),U&&p(n),U&&p(i),U&&p(l),U&&p(o),U&&p(u),U&&p(d),U&&p(I),U&&p(O),U&&p(j),U&&p(E),T=!1,se(F)}}}function Ho(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";js().then(c=>{n(2,o=c)}),Ns().then(c=>{n(0,i=c)}),Us().then(c=>{n(1,l=c)});async function u(){await Vs()}async function d(){await qi()}return[i,l,o,u,d]}class Fo extends ve{constructor(t){super(),ye(this,t,Ho,Io,_e,{})}}var No={};Ce(No,{getMatches:()=>Gs});async function Gs(){return S({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}function jo(e){let t,n,i,l,o,u,d,c,f,g,k,_,v;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
<code class="code-block flex flex-wrap my-2"><pre> --config &lt;PATH&gt;
--theme &lt;light|dark|system&gt;
--verbose</pre></code>
Additionally, it has a <code>update --background</code> subcommand.`,n=h(),i=a("br"),l=h(),o=a("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=h(),d=a("br"),c=h(),f=a("br"),g=h(),k=a("button"),k.textContent="Get matches",r(o,"class","note"),r(k,"class","btn"),r(k,"id","cli-matches")},m(y,b){m(y,t,b),m(y,n,b),m(y,i,b),m(y,l,b),m(y,o,b),m(y,u,b),m(y,d,b),m(y,c,b),m(y,f,b),m(y,g,b),m(y,k,b),_||(v=L(k,"click",e[0]),_=!0)},p:V,i:V,o:V,d(y){y&&p(t),y&&p(n),y&&p(i),y&&p(l),y&&p(o),y&&p(u),y&&p(d),y&&p(c),y&&p(f),y&&p(g),y&&p(k),_=!1,v()}}}function Uo(e,t,n){let{onMessage:i}=t;function l(){Gs().then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class qo extends ve{constructor(t){super(),ye(this,t,Uo,jo,_e,{onMessage:1})}}function Bo(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=h(),l=a("button"),l.textContent="Call Request (async) API",o=h(),u=a("button"),u.textContent="Send event to Rust",r(n,"class","btn"),r(n,"id","log"),r(l,"class","btn"),r(l,"id","request"),r(u,"class","btn"),r(u,"id","event")},m(f,g){m(f,t,g),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"click",e[0]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p:V,i:V,o:V,d(f){f&&p(t),d=!1,se(c)}}}function Vo(e,t,n){let{onMessage:i}=t,l;dt(async()=>{l=await Yt("rust-event",i)}),Ii(()=>{l&&l()});function o(){ei("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){ei("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){oi("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class Go extends ve{constructor(t){super(),ye(this,t,Vo,Bo,_e,{onMessage:3})}}var Jo={};Ce(Jo,{ask:()=>Xs,confirm:()=>Yo,message:()=>Xo,open:()=>Bi,save:()=>Js});async function Bi(e={}){return typeof e=="object"&&Object.freeze(e),S({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function Js(e={}){return typeof e=="object"&&Object.freeze(e),S({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function Xo(e,t){var i,l;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()}})}async function Xs(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Yes",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"No"]}})}async function Yo(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Ok",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"Cancel"]}})}var Ko={};Ce(Ko,{BaseDirectory:()=>Xt,Dir:()=>Xt,copyFile:()=>ea,createDir:()=>$o,exists:()=>ia,readBinaryFile:()=>Vi,readDir:()=>Ys,readTextFile:()=>Qo,removeDir:()=>xo,removeFile:()=>ta,renameFile:()=>na,writeBinaryFile:()=>Zo,writeFile:()=>Ri,writeTextFile:()=>Ri});var Xt=(e=>(e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Desktop=6]="Desktop",e[e.Document=7]="Document",e[e.Download=8]="Download",e[e.Executable=9]="Executable",e[e.Font=10]="Font",e[e.Home=11]="Home",e[e.Picture=12]="Picture",e[e.Public=13]="Public",e[e.Runtime=14]="Runtime",e[e.Template=15]="Template",e[e.Video=16]="Video",e[e.Resource=17]="Resource",e[e.App=18]="App",e[e.Log=19]="Log",e[e.Temp=20]="Temp",e[e.AppConfig=21]="AppConfig",e[e.AppData=22]="AppData",e[e.AppLocalData=23]="AppLocalData",e[e.AppCache=24]="AppCache",e[e.AppLog=25]="AppLog",e))(Xt||{});async function Qo(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})}async function Vi(e,t={}){let n=await S({__tauriModule:"Fs",message:{cmd:"readFile",path:e,options:t}});return Uint8Array.from(n)}async function Ri(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:""},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),typeof t=="string"?i.contents=t!=null?t:"":l=t,S({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(new TextEncoder().encode(i.contents)),options:l}})}async function Zo(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:[]},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),t&&"dir"in t?l=t:typeof e=="string"&&(i.contents=t!=null?t:[]),S({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(i.contents instanceof ArrayBuffer?new Uint8Array(i.contents):i.contents),options:l}})}async function Ys(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"readDir",path:e,options:t}})}async function $o(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"createDir",path:e,options:t}})}async function xo(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"removeDir",path:e,options:t}})}async function ea(e,t,n={}){return S({__tauriModule:"Fs",message:{cmd:"copyFile",source:e,destination:t,options:n}})}async function ta(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"removeFile",path:e,options:t}})}async function na(e,t,n={}){return S({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:e,newPath:t,options:n}})}async function ia(e,t={}){return S({__tauriModule:"Fs",message:{cmd:"exists",path:e,options:t}})}function la(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j,E,M,A,P;return{c(){t=a("div"),n=a("input"),i=h(),l=a("input"),o=h(),u=a("br"),d=h(),c=a("div"),f=a("input"),g=h(),k=a("label"),k.textContent="Multiple",_=h(),v=a("div"),y=a("input"),b=h(),C=a("label"),C.textContent="Directory",W=h(),I=a("br"),O=h(),j=a("button"),j.textContent="Open dialog",E=h(),M=a("button"),M.textContent="Open save dialog",r(n,"class","input"),r(n,"id","dialog-default-path"),r(n,"placeholder","Default path"),r(l,"class","input"),r(l,"id","dialog-filter"),r(l,"placeholder","Extensions filter, comma-separated"),r(t,"class","flex gap-2 children:grow"),r(f,"type","checkbox"),r(f,"id","dialog-multiple"),r(k,"for","dialog-multiple"),r(y,"type","checkbox"),r(y,"id","dialog-directory"),r(C,"for","dialog-directory"),r(j,"class","btn"),r(j,"id","open-dialog"),r(M,"class","btn"),r(M,"id","save-dialog")},m(T,F){m(T,t,F),s(t,n),q(n,e[0]),s(t,i),s(t,l),q(l,e[1]),m(T,o,F),m(T,u,F),m(T,d,F),m(T,c,F),s(c,f),f.checked=e[2],s(c,g),s(c,k),m(T,_,F),m(T,v,F),s(v,y),y.checked=e[3],s(v,b),s(v,C),m(T,W,F),m(T,I,F),m(T,O,F),m(T,j,F),m(T,E,F),m(T,M,F),A||(P=[L(n,"input",e[8]),L(l,"input",e[9]),L(f,"change",e[10]),L(y,"change",e[11]),L(j,"click",e[4]),L(M,"click",e[5])],A=!0)},p(T,[F]){F&1&&n.value!==T[0]&&q(n,T[0]),F&2&&l.value!==T[1]&&q(l,T[1]),F&4&&(f.checked=T[2]),F&8&&(y.checked=T[3])},i:V,o:V,d(T){T&&p(t),T&&p(o),T&&p(u),T&&p(d),T&&p(c),T&&p(_),T&&p(v),T&&p(W),T&&p(I),T&&p(O),T&&p(j),T&&p(E),T&&p(M),A=!1,se(P)}}}function sa(e,t){var n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(l){var o=l.target.result;t(o.substr(o.indexOf(",")+1))},i.readAsDataURL(n)}function oa(e,t,n){let{onMessage:i}=t,{insecureRenderHtml:l}=t,o=null,u=null,d=!1,c=!1;function f(){Bi({title:"My wonderful open dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[],multiple:d,directory:c}).then(function(b){if(Array.isArray(b))i(b);else{var C=b,W=C.match(/\S+\.\S+$/g);Vi(C).then(function(I){W&&(C.includes(".png")||C.includes(".jpg"))?sa(new Uint8Array(I),function(O){var j="data:image/png;base64,"+O;l('<img src="'+j+'"></img>')}):i(b)}).catch(i(b))}}).catch(i)}function g(){Js({title:"My wonderful save dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[]}).then(i).catch(i)}function k(){o=this.value,n(0,o)}function _(){u=this.value,n(1,u)}function v(){d=this.checked,n(2,d)}function y(){c=this.checked,n(3,c)}return e.$$set=b=>{"onMessage"in b&&n(6,i=b.onMessage),"insecureRenderHtml"in b&&n(7,l=b.insecureRenderHtml)},[o,u,d,c,f,g,i,l,k,_,v,y]}class aa extends ve{constructor(t){super(),ye(this,t,oa,la,_e,{onMessage:6,insecureRenderHtml:7})}}function Xl(e,t,n){const i=e.slice();return i[9]=t[n],i}function Yl(e){let t,n=e[9][0]+"",i;return{c(){t=a("option"),i=z(n),t.__value=e[9][1],t.value=t.__value},m(l,o){m(l,t,o),s(t,i)},p:V,d(l){l&&p(t)}}}function ra(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j=e[2],E=[];for(let M=0;M<j.length;M+=1)E[M]=Yl(Xl(e,j,M));return{c(){t=a("form"),n=a("div"),i=a("select"),l=a("option"),l.textContent="None";for(let M=0;M<E.length;M+=1)E[M].c();o=h(),u=a("input"),d=h(),c=a("br"),f=h(),g=a("div"),k=a("button"),k.textContent="Read",_=h(),v=a("button"),v.textContent="Use as img src",y=h(),b=a("br"),C=h(),W=a("img"),l.__value="",l.value=l.__value,r(i,"class","input"),r(i,"id","dir"),r(u,"class","input grow"),r(u,"id","path-to-read"),r(u,"placeholder","Type the path to read..."),r(n,"class","flex gap-1"),r(k,"class","btn"),r(k,"id","read"),r(v,"class","btn"),r(v,"type","button"),r(t,"class","flex flex-col"),r(W,"alt","")},m(M,A){m(M,t,A),s(t,n),s(n,i),s(i,l);for(let P=0;P<E.length;P+=1)E[P].m(i,null);s(n,o),s(n,u),q(u,e[0]),s(t,d),s(t,c),s(t,f),s(t,g),s(g,k),s(g,_),s(g,v),m(M,y,A),m(M,b,A),m(M,C,A),m(M,W,A),e[8](W),I||(O=[L(u,"input",e[7]),L(v,"click",e[4]),L(t,"submit",Zn(e[3]))],I=!0)},p(M,[A]){if(A&4){j=M[2];let P;for(P=0;P<j.length;P+=1){const T=Xl(M,j,P);E[P]?E[P].p(T,A):(E[P]=Yl(T),E[P].c(),E[P].m(i,null))}for(;P<E.length;P+=1)E[P].d(1);E.length=j.length}A&1&&u.value!==M[0]&&q(u,M[0])},i:V,o:V,d(M){M&&p(t),mt(E,M),M&&p(y),M&&p(b),M&&p(C),M&&p(W),e[8](null),I=!1,se(O)}}}function Kl(){return document.getElementById("dir").value?parseInt(dir.value):null}function ua(e,t){const n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(l){const o=l.target.result;t(o.substr(o.indexOf(",")+1))},i.readAsDataURL(n)}function ca(e,t,n){let{onMessage:i}=t,{insecureRenderHtml:l}=t,o="",u;const d=Object.keys(Xt).filter(_=>isNaN(parseInt(_))).map(_=>[_,Xt[_]]);function c(){const _=o.match(/\S+\.\S+$/g),v={dir:Kl()};(_?Vi(o,v):Ys(o,v)).then(function(b){if(_)if(o.includes(".png")||o.includes(".jpg"))ua(new Uint8Array(b),function(C){const W="data:image/png;base64,"+C;l('<img src="'+W+'"></img>')});else{const C=String.fromCharCode.apply(null,b);l('<textarea id="file-response"></textarea><button id="file-save">Save</button>'),setTimeout(()=>{const W=document.getElementById("file-response");W.value=C,document.getElementById("file-save").addEventListener("click",function(){Ri(o,W.value,{dir:Kl()}).catch(i)})})}else i(b)}).catch(i)}function f(){n(1,u.src=As(o),u)}function g(){o=this.value,n(0,o)}function k(_){$n[_?"unshift":"push"](()=>{u=_,n(1,u)})}return e.$$set=_=>{"onMessage"in _&&n(5,i=_.onMessage),"insecureRenderHtml"in _&&n(6,l=_.insecureRenderHtml)},[o,u,d,c,f,i,l,g,k]}class da extends ve{constructor(t){super(),ye(this,t,ca,ra,_e,{onMessage:5,insecureRenderHtml:6})}}var fa={};Ce(fa,{Body:()=>it,Client:()=>Qs,Response:()=>Ks,ResponseType:()=>Gi,fetch:()=>pa,getClient:()=>ni});var Gi=(e=>(e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary",e))(Gi||{}),it=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},n=(i,l)=>{if(l!==null){let o;typeof l=="string"?o=l:l instanceof Uint8Array||Array.isArray(l)?o=Array.from(l):l instanceof File?o={file:l.name,mime:l.type,fileName:l.name}:typeof l.file=="string"?o={file:l.file,mime:l.mime,fileName:l.fileName}:o={file:Array.from(l.file),mime:l.mime,fileName:l.fileName},t[String(i)]=o}};if(e instanceof FormData)for(let[i,l]of e)n(i,l);else for(let[i,l]of Object.entries(e))n(i,l);return new it("Form",t)}static json(e){return new it("Json",e)}static text(e){return new it("Text",e)}static bytes(e){return new it("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},Ks=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}},Qs=class{constructor(e){this.id=e}async drop(){return S({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),S({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(n=>{let i=new Ks(n);if(t){try{i.data=JSON.parse(i.data)}catch(l){if(i.ok&&i.data==="")i.data={};else if(i.ok)throw Error(`Failed to parse response \`${i.data}\` as JSON: ${l};
try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return i}return i})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}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 ni(e){return S({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new Qs(t))}var Wi=null;async function pa(e,t){var n;return Wi===null&&(Wi=await ni()),Wi.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function Ql(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function Zl(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I=e[5],O=[];for(let A=0;A<I.length;A+=1)O[A]=es(Ql(e,I,A));const j=A=>Ie(O[A],1,1,()=>{O[A]=null});let E=!e[3]&&ts(),M=!e[3]&&e[8]&&ns();return{c(){t=a("span"),n=a("span"),i=z(e[6]),l=h(),o=a("ul");for(let A=0;A<O.length;A+=1)O[A].c();u=h(),d=a("span"),c=z(e[7]),E&&E.c(),f=h(),g=a("span"),k=z(e[6]),_=z(ba),v=z(e[7]),M&&M.c(),y=ii(),r(n,"class","bracket svelte-gbh3pt"),r(n,"tabindex","0"),r(o,"class","svelte-gbh3pt"),r(d,"class","bracket svelte-gbh3pt"),r(d,"tabindex","0"),r(t,"class","svelte-gbh3pt"),Jn(t,"hidden",e[8]),r(g,"class","bracket svelte-gbh3pt"),r(g,"tabindex","0"),Jn(g,"hidden",!e[8])},m(A,P){m(A,t,P),s(t,n),s(n,i),s(t,l),s(t,o);for(let T=0;T<O.length;T+=1)O[T].m(o,null);s(t,u),s(t,d),s(d,c),E&&E.m(t,null),m(A,f,P),m(A,g,P),s(g,k),s(g,_),s(g,v),M&&M.m(A,P),m(A,y,P),b=!0,C||(W=[L(n,"click",e[11]),L(d,"click",e[11]),L(g,"click",e[11])],C=!0)},p(A,P){if((!b||P&64)&&Q(i,A[6]),P&1591){I=A[5];let T;for(T=0;T<I.length;T+=1){const F=Ql(A,I,T);O[T]?(O[T].p(F,P),Se(O[T],1)):(O[T]=es(F),O[T].c(),Se(O[T],1),O[T].m(o,null))}for(li(),T=I.length;T<O.length;T+=1)j(T);si()}(!b||P&128)&&Q(c,A[7]),A[3]?E&&(E.d(1),E=null):E||(E=ts(),E.c(),E.m(t,null)),P&256&&Jn(t,"hidden",A[8]),(!b||P&64)&&Q(k,A[6]),(!b||P&128)&&Q(v,A[7]),P&256&&Jn(g,"hidden",!A[8]),!A[3]&&A[8]?M||(M=ns(),M.c(),M.m(y.parentNode,y)):M&&(M.d(1),M=null)},i(A){if(!b){for(let P=0;P<I.length;P+=1)Se(O[P]);b=!0}},o(A){O=O.filter(Boolean);for(let P=0;P<O.length;P+=1)Ie(O[P]);b=!1},d(A){A&&p(t),mt(O,A),E&&E.d(),A&&p(f),A&&p(g),M&&M.d(A),A&&p(y),C=!1,se(W)}}}function $l(e){let t,n,i=e[12]+"",l,o;return{c(){t=a("span"),n=z('"'),l=z(i),o=z('":'),r(t,"class","key")},m(u,d){m(u,t,d),s(t,n),s(t,l),s(t,o)},p(u,d){d&32&&i!==(i=u[12]+"")&&Q(l,i)},d(u){u&&p(t)}}}function ma(e){let t,n=e[10](e[0][e[12]])+"",i,l,o=e[14]<e[5].length-1&&xl();return{c(){t=a("span"),i=z(n),o&&o.c(),r(t,"class",l="val "+e[9](e[0][e[12]])+" svelte-gbh3pt")},m(u,d){m(u,t,d),s(t,i),o&&o.m(t,null)},p(u,d){d&33&&n!==(n=u[10](u[0][u[12]])+"")&&Q(i,n),u[14]<u[5].length-1?o||(o=xl(),o.c(),o.m(t,null)):o&&(o.d(1),o=null),d&33&&l!==(l="val "+u[9](u[0][u[12]])+" svelte-gbh3pt")&&r(t,"class",l)},i:V,o:V,d(u){u&&p(t),o&&o.d()}}}function ha(e){let t,n;return t=new Zs({props:{json:e[0][e[12]],depth:e[1],_lvl:e[2]+1,_last:e[14]===e[5].length-1}}),{c(){xn(t.$$.fragment)},m(i,l){Gt(t,i,l),n=!0},p(i,l){const o={};l&33&&(o.json=i[0][i[12]]),l&2&&(o.depth=i[1]),l&4&&(o._lvl=i[2]+1),l&32&&(o._last=i[14]===i[5].length-1),t.$set(o)},i(i){n||(Se(t.$$.fragment,i),n=!0)},o(i){Ie(t.$$.fragment,i),n=!1},d(i){Jt(t,i)}}}function xl(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function es(e){let t,n,i,l,o,u,d,c=!e[4]&&$l(e);const f=[ha,ma],g=[];function k(_,v){return v&33&&(i=null),i==null&&(i=_[9](_[0][_[12]])==="object"),i?0:1}return l=k(e,-1),o=g[l]=f[l](e),{c(){t=a("li"),c&&c.c(),n=h(),o.c(),u=h()},m(_,v){m(_,t,v),c&&c.m(t,null),s(t,n),g[l].m(t,null),s(t,u),d=!0},p(_,v){_[4]?c&&(c.d(1),c=null):c?c.p(_,v):(c=$l(_),c.c(),c.m(t,n));let y=l;l=k(_,v),l===y?g[l].p(_,v):(li(),Ie(g[y],1,1,()=>{g[y]=null}),si(),o=g[l],o?o.p(_,v):(o=g[l]=f[l](_),o.c()),Se(o,1),o.m(t,u))},i(_){d||(Se(o),d=!0)},o(_){Ie(o),d=!1},d(_){_&&p(t),c&&c.d(),g[l].d()}}}function ts(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ns(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function _a(e){let t,n,i=e[5].length&&Zl(e);return{c(){i&&i.c(),t=ii()},m(l,o){i&&i.m(l,o),m(l,t,o),n=!0},p(l,[o]){l[5].length?i?(i.p(l,o),o&32&&Se(i,1)):(i=Zl(l),i.c(),Se(i,1),i.m(t.parentNode,t)):i&&(li(),Ie(i,1,1,()=>{i=null}),si())},i(l){n||(Se(i),n=!0)},o(l){Ie(i),n=!1},d(l){i&&i.d(l),l&&p(t)}}}const ba="...";function ga(e,t,n){let{json:i}=t,{depth:l=1/0}=t,{_lvl:o=0}=t,{_last:u=!0}=t;const d=b=>b===null?"null":typeof b;let c,f,g,k,_;const v=b=>{switch(d(b)){case"string":return`"${b}"`;case"function":return"f () {...}";case"symbol":return b.toString();default:return b}},y=()=>{n(8,_=!_)};return e.$$set=b=>{"json"in b&&n(0,i=b.json),"depth"in b&&n(1,l=b.depth),"_lvl"in b&&n(2,o=b._lvl),"_last"in b&&n(3,u=b._last)},e.$$.update=()=>{e.$$.dirty&17&&(n(5,c=d(i)==="object"?Object.keys(i):[]),n(4,f=Array.isArray(i)),n(6,g=f?"[":"{"),n(7,k=f?"]":"}")),e.$$.dirty&6&&n(8,_=l<o)},[i,l,o,u,f,c,g,k,_,d,v,y]}class Zs extends ve{constructor(t){super(),ye(this,t,ga,_a,_e,{json:0,depth:1,_lvl:2,_last:3})}}function ya(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j,E,M,A,P,T,F,U,J,ne,ce,te,Y,oe,ee,H,X,$,be,fe,pe,we,ae,x,me,Le;return ae=new Zs({props:{json:e[4]}}),{c(){t=a("form"),n=a("select"),i=a("option"),i.textContent="GET",l=a("option"),l.textContent="POST",o=a("option"),o.textContent="PUT",u=a("option"),u.textContent="PATCH",d=a("option"),d.textContent="DELETE",c=h(),f=a("br"),g=h(),k=a("textarea"),_=h(),v=a("br"),y=h(),b=a("button"),b.textContent="Make request",C=h(),W=a("br"),I=h(),O=a("h3"),O.textContent="HTTP Form",j=h(),E=a("div"),M=a("input"),A=h(),P=a("input"),T=h(),F=a("br"),U=h(),J=a("label"),ne=a("input"),ce=z(`
Multipart`),te=h(),Y=a("br"),oe=h(),ee=a("br"),H=h(),X=a("button"),X.textContent="Post it",$=h(),be=a("br"),fe=h(),pe=a("br"),we=h(),xn(ae.$$.fragment),i.__value="GET",i.value=i.__value,l.__value="POST",l.value=l.__value,o.__value="PUT",o.value=o.__value,u.__value="PATCH",u.value=u.__value,d.__value="DELETE",d.value=d.__value,r(n,"class","input"),r(n,"id","request-method"),e[0]===void 0&&Wt(()=>e[9].call(n)),r(k,"class","input h-auto w-100%"),r(k,"id","request-body"),r(k,"placeholder","Request body"),r(k,"rows","5"),r(b,"class","btn"),r(b,"id","make-request"),r(M,"class","input"),r(P,"class","input"),r(E,"class","flex gap-2 children:grow"),r(ne,"type","checkbox"),r(X,"class","btn"),r(X,"type","button")},m(D,B){m(D,t,B),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),Dt(n,e[0]),s(t,c),s(t,f),s(t,g),s(t,k),q(k,e[1]),s(t,_),s(t,v),s(t,y),s(t,b),m(D,C,B),m(D,W,B),m(D,I,B),m(D,O,B),m(D,j,B),m(D,E,B),s(E,M),q(M,e[2]),s(E,A),s(E,P),q(P,e[3]),m(D,T,B),m(D,F,B),m(D,U,B),m(D,J,B),s(J,ne),ne.checked=e[5],s(J,ce),m(D,te,B),m(D,Y,B),m(D,oe,B),m(D,ee,B),m(D,H,B),m(D,X,B),m(D,$,B),m(D,be,B),m(D,fe,B),m(D,pe,B),m(D,we,B),Gt(ae,D,B),x=!0,me||(Le=[L(n,"change",e[9]),L(k,"input",e[10]),L(t,"submit",Zn(e[6])),L(M,"input",e[11]),L(P,"input",e[12]),L(ne,"change",e[13]),L(X,"click",e[7])],me=!0)},p(D,[B]){B&1&&Dt(n,D[0]),B&2&&q(k,D[1]),B&4&&M.value!==D[2]&&q(M,D[2]),B&8&&P.value!==D[3]&&q(P,D[3]),B&32&&(ne.checked=D[5]);const Ee={};B&16&&(Ee.json=D[4]),ae.$set(Ee)},i(D){x||(Se(ae.$$.fragment,D),x=!0)},o(D){Ie(ae.$$.fragment,D),x=!1},d(D){D&&p(t),D&&p(C),D&&p(W),D&&p(I),D&&p(O),D&&p(j),D&&p(E),D&&p(T),D&&p(F),D&&p(U),D&&p(J),D&&p(te),D&&p(Y),D&&p(oe),D&&p(ee),D&&p(H),D&&p(X),D&&p($),D&&p(be),D&&p(fe),D&&p(pe),D&&p(we),Jt(ae,D),me=!1,se(Le)}}}function va(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const W=await ni().catch(j=>{throw o(j),j}),O={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?O.body=it.json(JSON.parse(l)):l!==""&&(O.body=it.text(l)),W.request(O).then(o).catch(o)}let d="baz",c="qux",f=null,g=!0;async function k(){const W=await ni().catch(I=>{throw o(I),I});n(4,f=await W.request({url:"http://localhost:3003",method:"POST",body:it.form({foo:d,bar:c}),headers:g?{"Content-Type":"multipart/form-data"}:void 0,responseType:Gi.Text}))}function _(){i=Pi(this),n(0,i)}function v(){l=this.value,n(1,l)}function y(){d=this.value,n(2,d)}function b(){c=this.value,n(3,c)}function C(){g=this.checked,n(5,g)}return e.$$set=W=>{"onMessage"in W&&n(8,o=W.onMessage)},[i,l,d,c,f,g,u,k,o,_,v,y,b,C]}class wa extends ve{constructor(t){super(),ye(this,t,va,ya,_e,{onMessage:8})}}function ka(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",r(t,"class","btn"),r(t,"id","notification")},m(l,o){m(l,t,o),n||(i=L(t,"click",Ma),n=!0)},p:V,i:V,o:V,d(l){l&&p(t),n=!1,i()}}}function Ma(){new Notification("Notification title",{body:"This is the notification body"})}function Ta(e,t,n){let{onMessage:i}=t;return e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class Ca extends ve{constructor(t){super(),ye(this,t,Ta,ka,_e,{onMessage:0})}}function is(e,t,n){const i=e.slice();return i[69]=t[n],i}function ls(e,t,n){const i=e.slice();return i[72]=t[n],i}function ss(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;f<d.length;f+=1)c[f]=os(ls(e,d,f));return{c(){t=a("span"),t.textContent="Selected window:",n=h(),i=a("select"),l=a("option"),l.textContent="Choose a window...";for(let f=0;f<c.length;f+=1)c[f].c();r(t,"class","font-700 text-sm"),l.__value="",l.value=l.__value,l.disabled=!0,l.selected=!0,r(i,"class","input"),e[0]===void 0&&Wt(()=>e[40].call(i))},m(f,g){m(f,t,g),m(f,n,g),m(f,i,g),s(i,l);for(let k=0;k<c.length;k+=1)c[k].m(i,null);Dt(i,e[0]),o||(u=L(i,"change",e[40]),o=!0)},p(f,g){if(g[0]&2){d=Object.keys(f[1]);let k;for(k=0;k<d.length;k+=1){const _=ls(f,d,k);c[k]?c[k].p(_,g):(c[k]=os(_),c[k].c(),c[k].m(i,null))}for(;k<c.length;k+=1)c[k].d(1);c.length=d.length}g[0]&3&&Dt(i,f[0])},d(f){f&&p(t),f&&p(n),f&&p(i),mt(c,f),o=!1,u()}}}function os(e){let t,n=e[72]+"",i,l;return{c(){t=a("option"),i=z(n),t.__value=l=e[72],t.value=t.__value},m(o,u){m(o,t,u),s(t,i)},p(o,u){u[0]&2&&n!==(n=o[72]+"")&&Q(i,n),u[0]&2&&l!==(l=o[72])&&(t.__value=l,t.value=t.__value)},d(o){o&&p(t)}}}function as(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j,E,M,A,P,T,F,U,J,ne,ce,te,Y,oe,ee,H,X,$,be,fe,pe,we,ae,x,me,Le,D,B,Ee,ke,re,de,ue,Me,He,We,Z,N,ie,G,he,Kt,Be,bt,Qt,Oe,Zt,gt,$t,Re,xt,Ve,K,Pt,ze,Ot,lt,Rt,De,yt,vt,wt,Ae,Fe,Pe,st,It,ot,Ht,at=e[27].width+"",kt,en,tn,Xi,nn=e[27].height+"",ai,Yi,Ge,ln,Ki,sn,Qi,on=e[28].width+"",ri,Zi,an,$i,rn=e[28].height+"",ui,xi,Mt,Je,un,el,cn,tl,dn=e[27].toLogical(e[24]).width+"",ci,nl,fn,il,pn=e[27].toLogical(e[24]).height+"",di,ll,Xe,mn,sl,hn,ol,_n=e[28].toLogical(e[24]).width+"",fi,al,bn,rl,gn=e[28].toLogical(e[24]).height+"",pi,ul,Tt,Ye,yn,cl,vn,dl,wn=e[25].x+"",mi,fl,kn,pl,Mn=e[25].y+"",hi,ml,Ke,Tn,hl,Cn,_l,An=e[26].x+"",_i,bl,Sn,gl,Ln=e[26].y+"",bi,yl,Ct,Qe,En,vl,zn,wl,Dn=e[25].toLogical(e[24]).x+"",gi,kl,Wn,Ml,Pn=e[25].toLogical(e[24]).y+"",yi,Tl,Ze,On,Cl,Rn,Al,In=e[26].toLogical(e[24]).x+"",vi,Sl,Hn,Ll,Fn=e[26].toLogical(e[24]).y+"",wi,ki,Mi,Ti,Ft,Ci,Ne,Nn,At,El,zl,jn,St,Dl,Wl,Un,Lt,Pl,Ai,je,qn,Ol,Ue,Rl,Bn,Il,$e,Hl,Vn,Fl,xe,Si,Li,Ei,rt,ut,et,Nl,Nt,jl,ct,tt,Ul,jt,zi,ql,Et=e[30],Te=[];for(let w=0;w<Et.length;w+=1)Te[w]=rs(is(e,Et,w));return{c(){t=a("br"),n=h(),i=a("div"),l=a("button"),l.textContent="Center",o=h(),u=a("button"),u.textContent="Minimize",d=h(),c=a("button"),c.textContent="Hide",f=h(),g=a("button"),g.textContent="Change icon",k=h(),_=a("button"),_.textContent="Request attention",v=h(),y=a("br"),b=h(),C=a("div"),W=a("label"),I=z(`Maximized
`),O=a("input"),j=h(),E=a("label"),M=z(`Resizable
`),A=a("input"),P=h(),T=a("label"),F=z(`Has decorations
`),U=a("input"),J=h(),ne=a("label"),ce=z(`Always on top
`),te=a("input"),Y=h(),oe=a("label"),ee=z(`Content protected
`),H=a("input"),X=h(),$=a("label"),be=z(`Fullscreen
`),fe=a("input"),pe=h(),we=a("br"),ae=h(),x=a("div"),me=a("div"),Le=a("div"),D=z(`X
`),B=a("input"),Ee=h(),ke=a("div"),re=z(`Y
`),de=a("input"),ue=h(),Me=a("div"),He=a("div"),We=z(`Width
`),Z=a("input"),N=h(),ie=a("div"),G=z(`Height
`),he=a("input"),Kt=h(),Be=a("div"),bt=a("div"),Qt=z(`Min width
`),Oe=a("input"),Zt=h(),gt=a("div"),$t=z(`Min height
`),Re=a("input"),xt=h(),Ve=a("div"),K=a("div"),Pt=z(`Max width
`),ze=a("input"),Ot=h(),lt=a("div"),Rt=z(`Max height
`),De=a("input"),yt=h(),vt=a("br"),wt=h(),Ae=a("div"),Fe=a("div"),Pe=a("div"),st=a("div"),st.textContent="Inner Size",It=h(),ot=a("span"),Ht=z("Width: "),kt=z(at),en=h(),tn=a("span"),Xi=z("Height: "),ai=z(nn),Yi=h(),Ge=a("div"),ln=a("div"),ln.textContent="Outer Size",Ki=h(),sn=a("span"),Qi=z("Width: "),ri=z(on),Zi=h(),an=a("span"),$i=z("Height: "),ui=z(rn),xi=h(),Mt=a("div"),Je=a("div"),un=a("div"),un.textContent="Inner Logical Size",el=h(),cn=a("span"),tl=z("Width: "),ci=z(dn),nl=h(),fn=a("span"),il=z("Height: "),di=z(pn),ll=h(),Xe=a("div"),mn=a("div"),mn.textContent="Outer Logical Size",sl=h(),hn=a("span"),ol=z("Width: "),fi=z(_n),al=h(),bn=a("span"),rl=z("Height: "),pi=z(gn),ul=h(),Tt=a("div"),Ye=a("div"),yn=a("div"),yn.textContent="Inner Position",cl=h(),vn=a("span"),dl=z("x: "),mi=z(wn),fl=h(),kn=a("span"),pl=z("y: "),hi=z(Mn),ml=h(),Ke=a("div"),Tn=a("div"),Tn.textContent="Outer Position",hl=h(),Cn=a("span"),_l=z("x: "),_i=z(An),bl=h(),Sn=a("span"),gl=z("y: "),bi=z(Ln),yl=h(),Ct=a("div"),Qe=a("div"),En=a("div"),En.textContent="Inner Logical Position",vl=h(),zn=a("span"),wl=z("x: "),gi=z(Dn),kl=h(),Wn=a("span"),Ml=z("y: "),yi=z(Pn),Tl=h(),Ze=a("div"),On=a("div"),On.textContent="Outer Logical Position",Cl=h(),Rn=a("span"),Al=z("x: "),vi=z(In),Sl=h(),Hn=a("span"),Ll=z("y: "),wi=z(Fn),ki=h(),Mi=a("br"),Ti=h(),Ft=a("h4"),Ft.textContent="Cursor",Ci=h(),Ne=a("div"),Nn=a("label"),At=a("input"),El=z(`
Grab`),zl=h(),jn=a("label"),St=a("input"),Dl=z(`
Visible`),Wl=h(),Un=a("label"),Lt=a("input"),Pl=z(`
Ignore events`),Ai=h(),je=a("div"),qn=a("label"),Ol=z(`Icon
`),Ue=a("select");for(let w=0;w<Te.length;w+=1)Te[w].c();Rl=h(),Bn=a("label"),Il=z(`X position
`),$e=a("input"),Hl=h(),Vn=a("label"),Fl=z(`Y position
`),xe=a("input"),Si=h(),Li=a("br"),Ei=h(),rt=a("div"),ut=a("form"),et=a("input"),Nl=h(),Nt=a("button"),Nt.textContent="Set title",jl=h(),ct=a("form"),tt=a("input"),Ul=h(),jt=a("button"),jt.textContent="Open URL",r(l,"class","btn"),r(l,"title","Unminimizes after 2 seconds"),r(u,"class","btn"),r(u,"title","Unminimizes after 2 seconds"),r(c,"class","btn"),r(c,"title","Visible again after 2 seconds"),r(g,"class","btn"),r(_,"class","btn"),r(_,"title","Minimizes the window, requests attention for 3s and then resets it"),r(i,"class","flex flex-wrap gap-2"),r(O,"type","checkbox"),r(A,"type","checkbox"),r(U,"type","checkbox"),r(te,"type","checkbox"),r(H,"type","checkbox"),r(fe,"type","checkbox"),r(C,"class","flex flex-wrap gap-2"),r(B,"class","input"),r(B,"type","number"),r(B,"min","0"),r(de,"class","input"),r(de,"type","number"),r(de,"min","0"),r(me,"class","flex children:grow flex-col"),r(Z,"class","input"),r(Z,"type","number"),r(Z,"min","400"),r(he,"class","input"),r(he,"type","number"),r(he,"min","400"),r(Me,"class","flex children:grow flex-col"),r(Oe,"class","input"),r(Oe,"type","number"),r(Re,"class","input"),r(Re,"type","number"),r(Be,"class","flex children:grow flex-col"),r(ze,"class","input"),r(ze,"type","number"),r(ze,"min","800"),r(De,"class","input"),r(De,"type","number"),r(De,"min","400"),r(Ve,"class","flex children:grow flex-col"),r(x,"class","flex flex-row gap-2 flex-wrap"),r(st,"class","text-accent dark:text-darkAccent font-700"),r(Pe,"class","grow"),r(ln,"class","text-accent dark:text-darkAccent font-700"),r(Ge,"class","grow"),r(Fe,"class","flex"),r(un,"class","text-accent dark:text-darkAccent font-700"),r(Je,"class","grow"),r(mn,"class","text-accent dark:text-darkAccent font-700"),r(Xe,"class","grow"),r(Mt,"class","flex"),r(yn,"class","text-accent dark:text-darkAccent font-700"),r(Ye,"class","grow"),r(Tn,"class","text-accent dark:text-darkAccent font-700"),r(Ke,"class","grow"),r(Tt,"class","flex"),r(En,"class","text-accent dark:text-darkAccent font-700"),r(Qe,"class","grow"),r(On,"class","text-accent dark:text-darkAccent font-700"),r(Ze,"class","grow"),r(Ct,"class","flex"),r(Ft,"class","mb-2"),r(At,"type","checkbox"),r(St,"type","checkbox"),r(Lt,"type","checkbox"),r(Ne,"class","flex gap-2"),r(Ue,"class","input"),e[20]===void 0&&Wt(()=>e[59].call(Ue)),r($e,"class","input"),r($e,"type","number"),r(xe,"class","input"),r(xe,"type","number"),r(je,"class","flex gap-2"),r(et,"class","input grow"),r(et,"id","title"),r(Nt,"class","btn"),r(Nt,"type","submit"),r(ut,"class","flex gap-1"),r(tt,"class","input grow"),r(tt,"id","url"),r(jt,"class","btn"),r(jt,"id","open-url"),r(ct,"class","flex gap-1"),r(rt,"class","flex flex-col gap-1")},m(w,R){m(w,t,R),m(w,n,R),m(w,i,R),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,g),s(i,k),s(i,_),m(w,v,R),m(w,y,R),m(w,b,R),m(w,C,R),s(C,W),s(W,I),s(W,O),O.checked=e[3],s(C,j),s(C,E),s(E,M),s(E,A),A.checked=e[2],s(C,P),s(C,T),s(T,F),s(T,U),U.checked=e[4],s(C,J),s(C,ne),s(ne,ce),s(ne,te),te.checked=e[5],s(C,Y),s(C,oe),s(oe,ee),s(oe,H),H.checked=e[6],s(C,X),s(C,$),s($,be),s($,fe),fe.checked=e[7],m(w,pe,R),m(w,we,R),m(w,ae,R),m(w,x,R),s(x,me),s(me,Le),s(Le,D),s(Le,B),q(B,e[14]),s(me,Ee),s(me,ke),s(ke,re),s(ke,de),q(de,e[15]),s(x,ue),s(x,Me),s(Me,He),s(He,We),s(He,Z),q(Z,e[8]),s(Me,N),s(Me,ie),s(ie,G),s(ie,he),q(he,e[9]),s(x,Kt),s(x,Be),s(Be,bt),s(bt,Qt),s(bt,Oe),q(Oe,e[10]),s(Be,Zt),s(Be,gt),s(gt,$t),s(gt,Re),q(Re,e[11]),s(x,xt),s(x,Ve),s(Ve,K),s(K,Pt),s(K,ze),q(ze,e[12]),s(Ve,Ot),s(Ve,lt),s(lt,Rt),s(lt,De),q(De,e[13]),m(w,yt,R),m(w,vt,R),m(w,wt,R),m(w,Ae,R),s(Ae,Fe),s(Fe,Pe),s(Pe,st),s(Pe,It),s(Pe,ot),s(ot,Ht),s(ot,kt),s(Pe,en),s(Pe,tn),s(tn,Xi),s(tn,ai),s(Fe,Yi),s(Fe,Ge),s(Ge,ln),s(Ge,Ki),s(Ge,sn),s(sn,Qi),s(sn,ri),s(Ge,Zi),s(Ge,an),s(an,$i),s(an,ui),s(Ae,xi),s(Ae,Mt),s(Mt,Je),s(Je,un),s(Je,el),s(Je,cn),s(cn,tl),s(cn,ci),s(Je,nl),s(Je,fn),s(fn,il),s(fn,di),s(Mt,ll),s(Mt,Xe),s(Xe,mn),s(Xe,sl),s(Xe,hn),s(hn,ol),s(hn,fi),s(Xe,al),s(Xe,bn),s(bn,rl),s(bn,pi),s(Ae,ul),s(Ae,Tt),s(Tt,Ye),s(Ye,yn),s(Ye,cl),s(Ye,vn),s(vn,dl),s(vn,mi),s(Ye,fl),s(Ye,kn),s(kn,pl),s(kn,hi),s(Tt,ml),s(Tt,Ke),s(Ke,Tn),s(Ke,hl),s(Ke,Cn),s(Cn,_l),s(Cn,_i),s(Ke,bl),s(Ke,Sn),s(Sn,gl),s(Sn,bi),s(Ae,yl),s(Ae,Ct),s(Ct,Qe),s(Qe,En),s(Qe,vl),s(Qe,zn),s(zn,wl),s(zn,gi),s(Qe,kl),s(Qe,Wn),s(Wn,Ml),s(Wn,yi),s(Ct,Tl),s(Ct,Ze),s(Ze,On),s(Ze,Cl),s(Ze,Rn),s(Rn,Al),s(Rn,vi),s(Ze,Sl),s(Ze,Hn),s(Hn,Ll),s(Hn,wi),m(w,ki,R),m(w,Mi,R),m(w,Ti,R),m(w,Ft,R),m(w,Ci,R),m(w,Ne,R),s(Ne,Nn),s(Nn,At),At.checked=e[16],s(Nn,El),s(Ne,zl),s(Ne,jn),s(jn,St),St.checked=e[17],s(jn,Dl),s(Ne,Wl),s(Ne,Un),s(Un,Lt),Lt.checked=e[21],s(Un,Pl),m(w,Ai,R),m(w,je,R),s(je,qn),s(qn,Ol),s(qn,Ue);for(let ge=0;ge<Te.length;ge+=1)Te[ge].m(Ue,null);Dt(Ue,e[20]),s(je,Rl),s(je,Bn),s(Bn,Il),s(Bn,$e),q($e,e[18]),s(je,Hl),s(je,Vn),s(Vn,Fl),s(Vn,xe),q(xe,e[19]),m(w,Si,R),m(w,Li,R),m(w,Ei,R),m(w,rt,R),s(rt,ut),s(ut,et),q(et,e[29]),s(ut,Nl),s(ut,Nt),s(rt,jl),s(rt,ct),s(ct,tt),q(tt,e[23]),s(ct,Ul),s(ct,jt),zi||(ql=[L(l,"click",e[41]),L(u,"click",e[34]),L(c,"click",e[33]),L(g,"click",e[35]),L(_,"click",e[37]),L(O,"change",e[42]),L(A,"change",e[43]),L(U,"change",e[44]),L(te,"change",e[45]),L(H,"change",e[46]),L(fe,"change",e[47]),L(B,"input",e[48]),L(de,"input",e[49]),L(Z,"input",e[50]),L(he,"input",e[51]),L(Oe,"input",e[52]),L(Re,"input",e[53]),L(ze,"input",e[54]),L(De,"input",e[55]),L(At,"change",e[56]),L(St,"change",e[57]),L(Lt,"change",e[58]),L(Ue,"change",e[59]),L($e,"input",e[60]),L(xe,"input",e[61]),L(et,"input",e[62]),L(ut,"submit",Zn(e[32])),L(tt,"input",e[63]),L(ct,"submit",Zn(e[31]))],zi=!0)},p(w,R){if(R[0]&8&&(O.checked=w[3]),R[0]&4&&(A.checked=w[2]),R[0]&16&&(U.checked=w[4]),R[0]&32&&(te.checked=w[5]),R[0]&64&&(H.checked=w[6]),R[0]&128&&(fe.checked=w[7]),R[0]&16384&&le(B.value)!==w[14]&&q(B,w[14]),R[0]&32768&&le(de.value)!==w[15]&&q(de,w[15]),R[0]&256&&le(Z.value)!==w[8]&&q(Z,w[8]),R[0]&512&&le(he.value)!==w[9]&&q(he,w[9]),R[0]&1024&&le(Oe.value)!==w[10]&&q(Oe,w[10]),R[0]&2048&&le(Re.value)!==w[11]&&q(Re,w[11]),R[0]&4096&&le(ze.value)!==w[12]&&q(ze,w[12]),R[0]&8192&&le(De.value)!==w[13]&&q(De,w[13]),R[0]&134217728&&at!==(at=w[27].width+"")&&Q(kt,at),R[0]&134217728&&nn!==(nn=w[27].height+"")&&Q(ai,nn),R[0]&268435456&&on!==(on=w[28].width+"")&&Q(ri,on),R[0]&268435456&&rn!==(rn=w[28].height+"")&&Q(ui,rn),R[0]&150994944&&dn!==(dn=w[27].toLogical(w[24]).width+"")&&Q(ci,dn),R[0]&150994944&&pn!==(pn=w[27].toLogical(w[24]).height+"")&&Q(di,pn),R[0]&285212672&&_n!==(_n=w[28].toLogical(w[24]).width+"")&&Q(fi,_n),R[0]&285212672&&gn!==(gn=w[28].toLogical(w[24]).height+"")&&Q(pi,gn),R[0]&33554432&&wn!==(wn=w[25].x+"")&&Q(mi,wn),R[0]&33554432&&Mn!==(Mn=w[25].y+"")&&Q(hi,Mn),R[0]&67108864&&An!==(An=w[26].x+"")&&Q(_i,An),R[0]&67108864&&Ln!==(Ln=w[26].y+"")&&Q(bi,Ln),R[0]&50331648&&Dn!==(Dn=w[25].toLogical(w[24]).x+"")&&Q(gi,Dn),R[0]&50331648&&Pn!==(Pn=w[25].toLogical(w[24]).y+"")&&Q(yi,Pn),R[0]&83886080&&In!==(In=w[26].toLogical(w[24]).x+"")&&Q(vi,In),R[0]&83886080&&Fn!==(Fn=w[26].toLogical(w[24]).y+"")&&Q(wi,Fn),R[0]&65536&&(At.checked=w[16]),R[0]&131072&&(St.checked=w[17]),R[0]&2097152&&(Lt.checked=w[21]),R[0]&1073741824){Et=w[30];let ge;for(ge=0;ge<Et.length;ge+=1){const Bl=is(w,Et,ge);Te[ge]?Te[ge].p(Bl,R):(Te[ge]=rs(Bl),Te[ge].c(),Te[ge].m(Ue,null))}for(;ge<Te.length;ge+=1)Te[ge].d(1);Te.length=Et.length}R[0]&1074790400&&Dt(Ue,w[20]),R[0]&262144&&le($e.value)!==w[18]&&q($e,w[18]),R[0]&524288&&le(xe.value)!==w[19]&&q(xe,w[19]),R[0]&536870912&&et.value!==w[29]&&q(et,w[29]),R[0]&8388608&&tt.value!==w[23]&&q(tt,w[23])},d(w){w&&p(t),w&&p(n),w&&p(i),w&&p(v),w&&p(y),w&&p(b),w&&p(C),w&&p(pe),w&&p(we),w&&p(ae),w&&p(x),w&&p(yt),w&&p(vt),w&&p(wt),w&&p(Ae),w&&p(ki),w&&p(Mi),w&&p(Ti),w&&p(Ft),w&&p(Ci),w&&p(Ne),w&&p(Ai),w&&p(je),mt(Te,w),w&&p(Si),w&&p(Li),w&&p(Ei),w&&p(rt),zi=!1,se(ql)}}}function rs(e){let t,n=e[69]+"",i;return{c(){t=a("option"),i=z(n),t.__value=e[69],t.value=t.__value},m(l,o){m(l,t,o),s(t,i)},p:V,d(l){l&&p(t)}}}function Aa(e){let t,n,i,l,o,u,d,c,f=Object.keys(e[1]).length>=1,g,k,_,v=f&&ss(e),y=e[1][e[0]]&&as(e);return{c(){t=a("div"),n=a("div"),i=a("input"),l=h(),o=a("button"),o.textContent="New window",u=h(),d=a("br"),c=h(),v&&v.c(),g=h(),y&&y.c(),r(i,"class","input grow"),r(i,"type","text"),r(i,"placeholder","New Window label.."),r(o,"class","btn"),r(n,"class","flex gap-1"),r(t,"class","flex flex-col children:grow gap-2")},m(b,C){m(b,t,C),s(t,n),s(n,i),q(i,e[22]),s(n,l),s(n,o),s(t,u),s(t,d),s(t,c),v&&v.m(t,null),s(t,g),y&&y.m(t,null),k||(_=[L(i,"input",e[39]),L(o,"click",e[36])],k=!0)},p(b,C){C[0]&4194304&&i.value!==b[22]&&q(i,b[22]),C[0]&2&&(f=Object.keys(b[1]).length>=1),f?v?v.p(b,C):(v=ss(b),v.c(),v.m(t,g)):v&&(v.d(1),v=null),b[1][b[0]]?y?y.p(b,C):(y=as(b),y.c(),y.m(t,null)):y&&(y.d(1),y=null)},i:V,o:V,d(b){b&&p(t),v&&v.d(),y&&y.d(),k=!1,se(_)}}}function Sa(e,t,n){let i=qe.label;const l={[qe.label]:qe},o=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:u}=t,d,c="https://tauri.app",f=!0,g=!1,k=!0,_=!1,v=!0,y=!1,b=null,C=null,W=null,I=null,O=null,j=null,E=null,M=null,A=1,P=new nt(E,M),T=new nt(E,M),F=new pt(b,C),U=new pt(b,C),J,ne,ce=!1,te=!0,Y=null,oe=null,ee="default",H=!1,X="Awesome Tauri Example!";function $(){Fi(c)}function be(){l[i].setTitle(X)}function fe(){l[i].hide(),setTimeout(l[i].show,2e3)}function pe(){l[i].minimize(),setTimeout(l[i].unminimize,2e3)}function we(){Bi({multiple:!1}).then(K=>{typeof K=="string"&&l[i].setIcon(K)})}function ae(){if(!d)return;const K=new _t(d);n(1,l[d]=K,l),K.once("tauri://error",function(){u("Error creating new webview")})}function x(){l[i].innerSize().then(K=>{n(27,F=K),n(8,b=F.width),n(9,C=F.height)}),l[i].outerSize().then(K=>{n(28,U=K)})}function me(){l[i].innerPosition().then(K=>{n(25,P=K)}),l[i].outerPosition().then(K=>{n(26,T=K),n(14,E=T.x),n(15,M=T.y)})}async function Le(K){!K||(J&&J(),ne&&ne(),ne=await K.listen("tauri://move",me),J=await K.listen("tauri://resize",x))}async function D(){await l[i].minimize(),await l[i].requestUserAttention(ji.Critical),await new Promise(K=>setTimeout(K,3e3)),await l[i].requestUserAttention(null)}function B(){d=this.value,n(22,d)}function Ee(){i=Pi(this),n(0,i),n(1,l)}const ke=()=>l[i].center();function re(){g=this.checked,n(3,g)}function de(){f=this.checked,n(2,f)}function ue(){k=this.checked,n(4,k)}function Me(){_=this.checked,n(5,_)}function He(){v=this.checked,n(6,v)}function We(){y=this.checked,n(7,y)}function Z(){E=le(this.value),n(14,E)}function N(){M=le(this.value),n(15,M)}function ie(){b=le(this.value),n(8,b)}function G(){C=le(this.value),n(9,C)}function he(){W=le(this.value),n(10,W)}function Kt(){I=le(this.value),n(11,I)}function Be(){O=le(this.value),n(12,O)}function bt(){j=le(this.value),n(13,j)}function Qt(){ce=this.checked,n(16,ce)}function Oe(){te=this.checked,n(17,te)}function Zt(){H=this.checked,n(21,H)}function gt(){ee=Pi(this),n(20,ee),n(30,o)}function $t(){Y=le(this.value),n(18,Y)}function Re(){oe=le(this.value),n(19,oe)}function xt(){X=this.value,n(29,X)}function Ve(){c=this.value,n(23,c)}return e.$$set=K=>{"onMessage"in K&&n(38,u=K.onMessage)},e.$$.update=()=>{var K,Pt,ze,Ot,lt,Rt,De,yt,vt,wt,Ae,Fe,Pe,st,It,ot,Ht,at,kt;e.$$.dirty[0]&3&&(l[i],me(),x()),e.$$.dirty[0]&7&&((K=l[i])==null||K.setResizable(f)),e.$$.dirty[0]&11&&(g?(Pt=l[i])==null||Pt.maximize():(ze=l[i])==null||ze.unmaximize()),e.$$.dirty[0]&19&&((Ot=l[i])==null||Ot.setDecorations(k)),e.$$.dirty[0]&35&&((lt=l[i])==null||lt.setAlwaysOnTop(_)),e.$$.dirty[0]&67&&((Rt=l[i])==null||Rt.setContentProtected(v)),e.$$.dirty[0]&131&&((De=l[i])==null||De.setFullscreen(y)),e.$$.dirty[0]&771&&b&&C&&((yt=l[i])==null||yt.setSize(new pt(b,C))),e.$$.dirty[0]&3075&&(W&&I?(vt=l[i])==null||vt.setMinSize(new ti(W,I)):(wt=l[i])==null||wt.setMinSize(null)),e.$$.dirty[0]&12291&&(O>800&&j>400?(Ae=l[i])==null||Ae.setMaxSize(new ti(O,j)):(Fe=l[i])==null||Fe.setMaxSize(null)),e.$$.dirty[0]&49155&&E!==null&&M!==null&&((Pe=l[i])==null||Pe.setPosition(new nt(E,M))),e.$$.dirty[0]&3&&((st=l[i])==null||st.scaleFactor().then(en=>n(24,A=en))),e.$$.dirty[0]&3&&Le(l[i]),e.$$.dirty[0]&65539&&((It=l[i])==null||It.setCursorGrab(ce)),e.$$.dirty[0]&131075&&((ot=l[i])==null||ot.setCursorVisible(te)),e.$$.dirty[0]&1048579&&((Ht=l[i])==null||Ht.setCursorIcon(ee)),e.$$.dirty[0]&786435&&Y!==null&&oe!==null&&((at=l[i])==null||at.setCursorPosition(new nt(Y,oe))),e.$$.dirty[0]&2097155&&((kt=l[i])==null||kt.setIgnoreCursorEvents(H))},[i,l,f,g,k,_,v,y,b,C,W,I,O,j,E,M,ce,te,Y,oe,ee,H,d,c,A,P,T,F,U,X,o,$,be,fe,pe,we,ae,D,u,B,Ee,ke,re,de,ue,Me,He,We,Z,N,ie,G,he,Kt,Be,bt,Qt,Oe,Zt,gt,$t,Re,xt,Ve]}class La extends ve{constructor(t){super(),ye(this,t,Sa,Aa,_e,{onMessage:38},null,[-1,-1,-1])}}var Ea={};Ce(Ea,{isRegistered:()=>Da,register:()=>$s,registerAll:()=>za,unregister:()=>xs,unregisterAll:()=>eo});async function $s(e,t){return S({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:ht(t)}})}async function za(e,t){return S({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:ht(t)}})}async function Da(e){return S({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})}async function xs(e){return S({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function eo(){return S({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function us(e,t,n){const i=e.slice();return i[9]=t[n],i}function cs(e){let t,n=e[9]+"",i,l,o,u,d;function c(){return e[8](e[9])}return{c(){t=a("div"),i=z(n),l=h(),o=a("button"),o.textContent="Unregister",r(o,"class","btn"),r(o,"type","button"),r(t,"class","flex justify-between")},m(f,g){m(f,t,g),s(t,i),s(t,l),s(t,o),u||(d=L(o,"click",c),u=!0)},p(f,g){e=f,g&2&&n!==(n=e[9]+"")&&Q(i,n)},d(f){f&&p(t),u=!1,d()}}}function ds(e){let t,n,i,l,o;return{c(){t=a("br"),n=h(),i=a("button"),i.textContent="Unregister all",r(i,"class","btn"),r(i,"type","button")},m(u,d){m(u,t,d),m(u,n,d),m(u,i,d),l||(o=L(i,"click",e[5]),l=!0)},p:V,d(u){u&&p(t),u&&p(n),u&&p(i),l=!1,o()}}}function Wa(e){let t,n,i,l,o,u,d,c,f,g,k,_=e[1],v=[];for(let b=0;b<_.length;b+=1)v[b]=cs(us(e,_,b));let y=e[1].length>1&&ds(e);return{c(){t=a("div"),n=a("input"),i=h(),l=a("button"),l.textContent="Register",o=h(),u=a("br"),d=h(),c=a("div");for(let b=0;b<v.length;b+=1)v[b].c();f=h(),y&&y.c(),r(n,"class","input grow"),r(n,"placeholder","Type a shortcut with '+' as separator..."),r(l,"class","btn"),r(l,"type","button"),r(t,"class","flex gap-1"),r(c,"class","flex flex-col gap-1")},m(b,C){m(b,t,C),s(t,n),q(n,e[0]),s(t,i),s(t,l),m(b,o,C),m(b,u,C),m(b,d,C),m(b,c,C);for(let W=0;W<v.length;W+=1)v[W].m(c,null);s(c,f),y&&y.m(c,null),g||(k=[L(n,"input",e[7]),L(l,"click",e[3])],g=!0)},p(b,[C]){if(C&1&&n.value!==b[0]&&q(n,b[0]),C&18){_=b[1];let W;for(W=0;W<_.length;W+=1){const I=us(b,_,W);v[W]?v[W].p(I,C):(v[W]=cs(I),v[W].c(),v[W].m(c,f))}for(;W<v.length;W+=1)v[W].d(1);v.length=_.length}b[1].length>1?y?y.p(b,C):(y=ds(b),y.c(),y.m(c,null)):y&&(y.d(1),y=null)},i:V,o:V,d(b){b&&p(t),b&&p(o),b&&p(u),b&&p(d),b&&p(c),mt(v,b),y&&y.d(),g=!1,se(k)}}}function Pa(e,t,n){let i,{onMessage:l}=t;const o=Cs([]);ks(e,o,_=>n(1,i=_));let u="CmdOrControl+X";function d(){const _=u;$s(_,()=>{l(`Shortcut ${_} triggered`)}).then(()=>{o.update(v=>[...v,_]),l(`Shortcut ${_} registered successfully`)}).catch(l)}function c(_){const v=_;xs(v).then(()=>{o.update(y=>y.filter(b=>b!==v)),l(`Shortcut ${v} unregistered`)}).catch(l)}function f(){eo().then(()=>{o.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function g(){u=this.value,n(0,u)}const k=_=>c(_);return e.$$set=_=>{"onMessage"in _&&n(6,l=_.onMessage)},[u,i,o,d,c,f,l,g,k]}class Oa extends ve{constructor(t){super(),ye(this,t,Pa,Wa,_e,{onMessage:6})}}function fs(e){let t,n,i,l,o,u,d;return{c(){t=a("br"),n=h(),i=a("input"),l=h(),o=a("button"),o.textContent="Write",r(i,"class","input"),r(i,"placeholder","write to stdin"),r(o,"class","btn")},m(c,f){m(c,t,f),m(c,n,f),m(c,i,f),q(i,e[4]),m(c,l,f),m(c,o,f),u||(d=[L(i,"input",e[14]),L(o,"click",e[8])],u=!0)},p(c,f){f&16&&i.value!==c[4]&&q(i,c[4])},d(c){c&&p(t),c&&p(n),c&&p(i),c&&p(l),c&&p(o),u=!1,se(d)}}}function Ra(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j,E,M,A,P,T=e[5]&&fs(e);return{c(){t=a("div"),n=a("div"),i=z(`Script:
`),l=a("input"),o=h(),u=a("div"),d=z(`Encoding:
`),c=a("input"),f=h(),g=a("div"),k=z(`Working directory:
`),_=a("input"),v=h(),y=a("div"),b=z(`Arguments:
`),C=a("input"),W=h(),I=a("div"),O=a("button"),O.textContent="Run",j=h(),E=a("button"),E.textContent="Kill",M=h(),T&&T.c(),r(l,"class","grow input"),r(n,"class","flex items-center gap-1"),r(c,"class","grow input"),r(u,"class","flex items-center gap-1"),r(_,"class","grow input"),r(_,"placeholder","Working directory"),r(g,"class","flex items-center gap-1"),r(C,"class","grow input"),r(C,"placeholder","Environment variables"),r(y,"class","flex items-center gap-1"),r(O,"class","btn"),r(E,"class","btn"),r(I,"class","flex children:grow gap-1"),r(t,"class","flex flex-col childre:grow gap-1")},m(F,U){m(F,t,U),s(t,n),s(n,i),s(n,l),q(l,e[0]),s(t,o),s(t,u),s(u,d),s(u,c),q(c,e[3]),s(t,f),s(t,g),s(g,k),s(g,_),q(_,e[1]),s(t,v),s(t,y),s(y,b),s(y,C),q(C,e[2]),s(t,W),s(t,I),s(I,O),s(I,j),s(I,E),s(t,M),T&&T.m(t,null),A||(P=[L(l,"input",e[10]),L(c,"input",e[11]),L(_,"input",e[12]),L(C,"input",e[13]),L(O,"click",e[6]),L(E,"click",e[7])],A=!0)},p(F,[U]){U&1&&l.value!==F[0]&&q(l,F[0]),U&8&&c.value!==F[3]&&q(c,F[3]),U&2&&_.value!==F[1]&&q(_,F[1]),U&4&&C.value!==F[2]&&q(C,F[2]),F[5]?T?T.p(F,U):(T=fs(F),T.c(),T.m(t,null)):T&&(T.d(1),T=null)},i:V,o:V,d(F){F&&p(t),T&&T.d(),A=!1,se(P)}}}function Ia(e,t,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",o=i?["/C"]:["-c"],{onMessage:u}=t,d='echo "hello world"',c=null,f="SOMETHING=value ANOTHER=2",g="",k="",_;function v(){return f.split(" ").reduce((M,A)=>{let[P,T]=A.split("=");return{...M,[P]:T}},{})}function y(){n(5,_=null);const M=new Hi(l,[...o,d],{cwd:c||null,env:v(),encoding:g});M.on("close",A=>{u(`command finished with code ${A.code} and signal ${A.signal}`),n(5,_=null)}),M.on("error",A=>u(`command error: "${A}"`)),M.stdout.on("data",A=>u(`command stdout: "${A}"`)),M.stderr.on("data",A=>u(`command stderr: "${A}"`)),M.spawn().then(A=>{n(5,_=A)}).catch(u)}function b(){_.kill().then(()=>u("killed child process")).catch(u)}function C(){_.write(k).catch(u)}function W(){d=this.value,n(0,d)}function I(){g=this.value,n(3,g)}function O(){c=this.value,n(1,c)}function j(){f=this.value,n(2,f)}function E(){k=this.value,n(4,k)}return e.$$set=M=>{"onMessage"in M&&n(9,u=M.onMessage)},[d,c,f,g,k,_,y,b,C,u,W,I,O,j,E]}class Ha extends ve{constructor(t){super(),ye(this,t,Ia,Ra,_e,{onMessage:9})}}var Fa={};Ce(Fa,{checkUpdate:()=>no,installUpdate:()=>to,onUpdaterEvent:()=>Ji});async function Ji(e){return Yt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function to(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error){t(),i(o.error);return}o.status==="DONE"&&(t(),n())}Ji(l).then(o=>{e=o}).catch(o=>{throw t(),o}),oi("tauri://update-install").catch(o=>{throw t(),o})})}async function no(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Ws("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),Ji(o).then(u=>{e=u}).catch(u=>{throw t(),u}),oi("tauri://update").catch(u=>{throw t(),u})})}function Na(e){let t;return{c(){t=a("button"),t.innerHTML='<div class="spinner animate-spin svelte-4xesec"></div>',r(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){m(n,t,i)},p:V,d(n){n&&p(t)}}}function ja(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[4]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function Ua(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[3]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function qa(e){let t;function n(o,u){return!o[0]&&!o[2]?Ua:!o[1]&&o[2]?ja:Na}let i=n(e),l=i(e);return{c(){t=a("div"),l.c(),r(t,"class","flex children:grow children:h10")},m(o,u){m(o,t,u),l.m(t,null)},p(o,[u]){i===(i=n(o))&&l?l.p(o,u):(l.d(1),l=i(o),l&&(l.c(),l.m(t,null)))},i:V,o:V,d(o){o&&p(t),l.d()}}}function Ba(e,t,n){let{onMessage:i}=t,l;dt(async()=>{l=await Yt("tauri://update-status",i)}),Ii(()=>{l&&l()});let o,u,d;async function c(){n(0,o=!0);try{const{shouldUpdate:g,manifest:k}=await no();i(`Should update: ${g}`),i(k),n(2,d=g)}catch(g){i(g)}finally{n(0,o=!1)}}async function f(){n(1,u=!0);try{await to(),i("Installation complete, restart required."),await qi()}catch(g){i(g)}finally{n(1,u=!1)}}return e.$$set=g=>{"onMessage"in g&&n(5,i=g.onMessage)},[o,u,d,c,f,i]}class Va extends ve{constructor(t){super(),ye(this,t,Ba,qa,_e,{onMessage:5})}}var Ga={};Ce(Ga,{readText:()=>lo,writeText:()=>io});async function io(e){return S({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function lo(){return S({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}function Ja(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("input"),i=h(),l=a("button"),l.textContent="Write",o=h(),u=a("button"),u.textContent="Read",r(n,"class","grow input"),r(n,"placeholder","Text to write to the clipboard"),r(l,"class","btn"),r(l,"type","button"),r(u,"class","btn"),r(u,"type","button"),r(t,"class","flex gap-1")},m(f,g){m(f,t,g),s(t,n),q(n,e[0]),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"input",e[4]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p(f,[g]){g&1&&n.value!==f[0]&&q(n,f[0])},i:V,o:V,d(f){f&&p(t),d=!1,se(c)}}}function Xa(e,t,n){let{onMessage:i}=t,l="clipboard message";function o(){io(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){lo().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function d(){l=this.value,n(0,l)}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,o,u,i,d]}class Ya extends ve{constructor(t){super(),ye(this,t,Xa,Ja,_e,{onMessage:3})}}function Ka(e){let t;return{c(){t=a("div"),t.innerHTML=`<div class="note-red grow">Not available for Linux</div>
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`,r(t,"class","flex flex-col gap-2")},m(n,i){m(n,t,i)},p:V,i:V,o:V,d(n){n&&p(t)}}}function Qa(e,t,n){let{onMessage:i}=t;const l=window.constraints={audio:!0,video:!0};function o(d){const c=document.querySelector("video"),f=d.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=d,c.srcObject=d}function u(d){if(d.name==="ConstraintNotSatisfiedError"){const c=l.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else d.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${d.name}`,d)}return dt(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Ii(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class Za extends ve{constructor(t){super(),ye(this,t,Qa,Ka,_e,{onMessage:0})}}function $a(e){let t,n,i,l,o,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=h(),l=a("button"),l.textContent="Hide",r(n,"class","btn"),r(n,"id","show"),r(n,"title","Hides and shows the app after 2 seconds"),r(l,"class","btn"),r(l,"id","hide")},m(d,c){m(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[L(n,"click",e[0]),L(l,"click",e[1])],o=!0)},p:V,i:V,o:V,d(d){d&&p(t),o=!1,se(u)}}}function xa(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{qs().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return Bs().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class er extends ve{constructor(t){super(),ye(this,t,xa,$a,_e,{onMessage:2})}}function ps(e,t,n){const i=e.slice();return i[32]=t[n],i}function ms(e,t,n){const i=e.slice();return i[35]=t[n],i}function hs(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b;function C(M,A){return M[3]?nr:tr}let W=C(e),I=W(e);function O(M,A){return M[2]?lr:ir}let j=O(e),E=j(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=h(),l=a("span"),o=a("span"),I.c(),d=h(),c=a("span"),c.innerHTML='<div class="i-codicon-chrome-minimize"></div>',f=h(),g=a("span"),E.c(),_=h(),v=a("span"),v.innerHTML='<div class="i-codicon-chrome-close"></div>',r(n,"class","lt-sm:pl-10 text-darkPrimaryText"),r(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),r(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(c,"title","Minimize"),r(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(g,"title",k=e[2]?"Restore":"Maximize"),r(g,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(v,"title","Close"),r(v,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),r(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),r(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),r(t,"data-tauri-drag-region","")},m(M,A){m(M,t,A),s(t,n),s(t,i),s(t,l),s(l,o),I.m(o,null),s(l,d),s(l,c),s(l,f),s(l,g),E.m(g,null),s(l,_),s(l,v),y||(b=[L(o,"click",e[12]),L(c,"click",e[9]),L(g,"click",e[10]),L(v,"click",e[11])],y=!0)},p(M,A){W!==(W=C(M))&&(I.d(1),I=W(M),I&&(I.c(),I.m(o,null))),A[0]&8&&u!==(u=M[3]?"Switch to Light mode":"Switch to Dark mode")&&r(o,"title",u),j!==(j=O(M))&&(E.d(1),E=j(M),E&&(E.c(),E.m(g,null))),A[0]&4&&k!==(k=M[2]?"Restore":"Maximize")&&r(g,"title",k)},d(M){M&&p(t),I.d(),E.d(),y=!1,se(b)}}}function tr(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-moon")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function nr(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-sun")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ir(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-maximize")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function lr(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-restore")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function sr(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function or(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function _s(e){let t,n,i,l,o,u,d,c,f;function g(v,y){return v[3]?rr:ar}let k=g(e),_=k(e);return{c(){t=a("a"),_.c(),n=h(),i=a("br"),l=h(),o=a("div"),u=h(),d=a("br"),r(t,"href","##"),r(t,"class","nv justify-between h-8"),r(o,"class","bg-white/5 h-2px")},m(v,y){m(v,t,y),_.m(t,null),m(v,n,y),m(v,i,y),m(v,l,y),m(v,o,y),m(v,u,y),m(v,d,y),c||(f=L(t,"click",e[12]),c=!0)},p(v,y){k!==(k=g(v))&&(_.d(1),_=k(v),_&&(_.c(),_.m(t,null)))},d(v){v&&p(t),_.d(),v&&p(n),v&&p(i),v&&p(l),v&&p(o),v&&p(u),v&&p(d),c=!1,f()}}}function ar(e){let t,n;return{c(){t=z(`Switch to Dark mode
`),n=a("div"),r(n,"class","i-ph-moon")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function rr(e){let t,n;return{c(){t=z(`Switch to Light mode
`),n=a("div"),r(n,"class","i-ph-sun")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function ur(e){let t,n,i,l,o=e[35].label+"",u,d,c,f;function g(){return e[20](e[35])}return{c(){t=a("a"),n=a("div"),i=h(),l=a("p"),u=z(o),r(n,"class",e[35].icon+" mr-2"),r(t,"href","##"),r(t,"class",d="nv "+(e[1]===e[35]?"nv_selected":""))},m(k,_){m(k,t,_),s(t,n),s(t,i),s(t,l),s(l,u),c||(f=L(t,"click",g),c=!0)},p(k,_){e=k,_[0]&2&&d!==(d="nv "+(e[1]===e[35]?"nv_selected":""))&&r(t,"class",d)},d(k){k&&p(t),c=!1,f()}}}function bs(e){let t,n=e[35]&&ur(e);return{c(){n&&n.c(),t=ii()},m(i,l){n&&n.m(i,l),m(i,t,l)},p(i,l){i[35]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function gs(e){let t,n=e[32].html+"",i;return{c(){t=new fo(!1),i=ii(),t.a=i},m(l,o){t.m(n,l,o),m(l,i,o)},p(l,o){o[0]&64&&n!==(n=l[32].html+"")&&t.p(n)},d(l){l&&p(i),l&&t.d()}}}function cr(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,C,W,I,O,j,E,M,A,P,T,F,U=e[1].label+"",J,ne,ce,te,Y,oe,ee,H,X,$,be,fe,pe,we,ae,x,me,Le,D=e[5]&&hs(e);function B(N,ie){return N[0]?or:sr}let Ee=B(e),ke=Ee(e),re=!e[5]&&_s(e),de=e[7],ue=[];for(let N=0;N<de.length;N+=1)ue[N]=bs(ms(e,de,N));var Me=e[1].component;function He(N){return{props:{onMessage:N[14],insecureRenderHtml:N[15]}}}Me&&(Y=new Me(He(e)));let We=e[6],Z=[];for(let N=0;N<We.length;N+=1)Z[N]=gs(ps(e,We,N));return{c(){D&&D.c(),t=h(),n=a("div"),ke.c(),i=h(),l=a("div"),o=a("aside"),u=a("img"),c=h(),re&&re.c(),f=h(),g=a("a"),g.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,k=h(),_=a("a"),_.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,v=h(),y=a("a"),y.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,b=h(),C=a("br"),W=h(),I=a("div"),O=h(),j=a("br"),E=h(),M=a("div");for(let N=0;N<ue.length;N+=1)ue[N].c();A=h(),P=a("main"),T=a("div"),F=a("h1"),J=z(U),ne=h(),ce=a("div"),te=a("div"),Y&&xn(Y.$$.fragment),oe=h(),ee=a("div"),H=a("div"),X=h(),$=a("div"),be=a("p"),be.textContent="Console",fe=h(),pe=a("div"),pe.innerHTML='<div class="i-codicon-clear-all"></div>',we=h(),ae=a("div");for(let N=0;N<Z.length;N+=1)Z[N].c();r(n,"id","sidebarToggle"),r(n,"class","z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),r(u,"class","self-center p-7 cursor-pointer"),oo(u.src,d="tauri_logo.png")||r(u,"src",d),r(u,"alt","Tauri logo"),r(g,"class","nv justify-between h-8"),r(g,"target","_blank"),r(g,"href","https://tauri.app/v1/guides/"),r(_,"class","nv justify-between h-8"),r(_,"target","_blank"),r(_,"href","https://github.com/tauri-apps/tauri"),r(y,"class","nv justify-between h-8"),r(y,"target","_blank"),r(y,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),r(I,"class","bg-white/5 h-2px"),r(M,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),r(o,"id","sidebar"),r(o,"class","lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"),r(te,"class","mr-2"),r(ce,"class","overflow-y-auto"),r(T,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),r(H,"class","bg-black/20 h-2px cursor-ns-resize"),r(be,"class","font-semibold"),r(pe,"class","cursor-pointer h-85% rd-1 p-1 flex justify-center items-center hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25 "),r($,"class","flex justify-between items-center px-2"),r(ae,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),r(ee,"id","console"),r(ee,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),r(P,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),r(l,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(N,ie){D&&D.m(N,ie),m(N,t,ie),m(N,n,ie),ke.m(n,null),m(N,i,ie),m(N,l,ie),s(l,o),s(o,u),s(o,c),re&&re.m(o,null),s(o,f),s(o,g),s(o,k),s(o,_),s(o,v),s(o,y),s(o,b),s(o,C),s(o,W),s(o,I),s(o,O),s(o,j),s(o,E),s(o,M);for(let G=0;G<ue.length;G+=1)ue[G].m(M,null);s(l,A),s(l,P),s(P,T),s(T,F),s(F,J),s(T,ne),s(T,ce),s(ce,te),Y&&Gt(Y,te,null),s(P,oe),s(P,ee),s(ee,H),s(ee,X),s(ee,$),s($,be),s($,fe),s($,pe),s(ee,we),s(ee,ae);for(let G=0;G<Z.length;G+=1)Z[G].m(ae,null);e[21](ee),x=!0,me||(Le=[L(u,"click",e[19]),L(H,"mousedown",e[17]),L(pe,"click",e[16])],me=!0)},p(N,ie){if(N[5]?D?D.p(N,ie):(D=hs(N),D.c(),D.m(t.parentNode,t)):D&&(D.d(1),D=null),Ee!==(Ee=B(N))&&(ke.d(1),ke=Ee(N),ke&&(ke.c(),ke.m(n,null))),N[5]?re&&(re.d(1),re=null):re?re.p(N,ie):(re=_s(N),re.c(),re.m(o,f)),ie[0]&387){de=N[7];let G;for(G=0;G<de.length;G+=1){const he=ms(N,de,G);ue[G]?ue[G].p(he,ie):(ue[G]=bs(he),ue[G].c(),ue[G].m(M,null))}for(;G<ue.length;G+=1)ue[G].d(1);ue.length=de.length}if((!x||ie[0]&2)&&U!==(U=N[1].label+"")&&Q(J,U),Me!==(Me=N[1].component)){if(Y){li();const G=Y;Ie(G.$$.fragment,1,0,()=>{Jt(G,1)}),si()}Me?(Y=new Me(He(N)),xn(Y.$$.fragment),Se(Y.$$.fragment,1),Gt(Y,te,null)):Y=null}if(ie[0]&64){We=N[6];let G;for(G=0;G<We.length;G+=1){const he=ps(N,We,G);Z[G]?Z[G].p(he,ie):(Z[G]=gs(he),Z[G].c(),Z[G].m(ae,null))}for(;G<Z.length;G+=1)Z[G].d(1);Z.length=We.length}},i(N){x||(Y&&Se(Y.$$.fragment,N),x=!0)},o(N){Y&&Ie(Y.$$.fragment,N),x=!1},d(N){D&&D.d(N),N&&p(t),N&&p(n),ke.d(),N&&p(i),N&&p(l),re&&re.d(),mt(ue,N),Y&&Jt(Y),mt(Z,N),e[21](null),me=!1,se(Le)}}}let ys=50;function vs(e){const t=document.querySelector("html");e?t.classList.add("dark"):t.classList.remove("dark"),localStorage&&localStorage.setItem("theme",e?"dark":"")}function dr(e,t){e.style.setProperty("--translate-x",`${t?"0":"-18.75"}rem`)}function fr(e,t,n){let i;qe.label!=="main"&&qe.onCloseRequested(async H=>{await confirm("Are you sure?")||H.preventDefault()}),qe.onFileDropEvent(H=>{W(`File drop: ${JSON.stringify(H.payload)}`)});const l=navigator.userAgent.toLowerCase(),o=l.includes("android")||l.includes("iphone"),u=[{label:"Welcome",component:Fo,icon:"i-ph-hand-waving"},{label:"Communication",component:Go,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:qo,icon:"i-codicon-terminal"},!o&&{label:"Dialog",component:aa,icon:"i-codicon-multiple-windows"},{label:"File system",component:da,icon:"i-codicon-files"},{label:"HTTP",component:wa,icon:"i-ph-globe-hemisphere-west"},!o&&{label:"Notifications",component:Ca,icon:"i-codicon-bell-dot"},!o&&{label:"App",component:er,icon:"i-codicon-hubot"},!o&&{label:"Window",component:La,icon:"i-codicon-window"},!o&&{label:"Shortcuts",component:Oa,icon:"i-codicon-record-keys"},{label:"Shell",component:Ha,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:Va,icon:"i-codicon-cloud-download"},!o&&{label:"Clipboard",component:Ya,icon:"i-codicon-clippy"},{label:"WebRTC",component:Za,icon:"i-ph-broadcast"}];let d=u[0];function c(H){n(1,d=H)}let f;dt(async()=>{const H=qt();n(2,f=await H.isMaximized()),Yt("tauri://resize",async()=>{n(2,f=await H.isMaximized())})});function g(){qt().minimize()}async function k(){const H=qt();await H.isMaximized()?H.unmaximize():H.maximize()}let _=!1;async function v(){_||(_=await Xs("Are you sure that you want to close this window?",{title:"Tauri API"}),_&&qt().close())}let y;dt(()=>{n(3,y=localStorage&&localStorage.getItem("theme")=="dark"),vs(y)});function b(){n(3,y=!y),vs(y)}let C=Cs([]);ks(e,C,H=>n(6,i=H));function W(H){C.update(X=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+(typeof H=="string"?H:JSON.stringify(H,null,1))+"</pre>"},...X])}function I(H){C.update(X=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+H+"</pre>"},...X])}function O(){C.update(()=>[])}let j,E,M;function A(H){M=H.clientY;const X=window.getComputedStyle(j);E=parseInt(X.height,10);const $=fe=>{const pe=fe.clientY-M,we=E-pe;n(4,j.style.height=`${we<ys?ys:we}px`,j)},be=()=>{document.removeEventListener("mouseup",be),document.removeEventListener("mousemove",$)};document.addEventListener("mouseup",be),document.addEventListener("mousemove",$)}let P;dt(async()=>{n(5,P=await Fs()==="win32")});let T=!1,F,U,J=!1,ne=0,ce=0;const te=(H,X,$)=>Math.min(Math.max(X,H),$);dt(()=>{n(18,F=document.querySelector("#sidebar")),U=document.querySelector("#sidebarToggle"),document.addEventListener("click",H=>{U.contains(H.target)?n(0,T=!T):T&&!F.contains(H.target)&&n(0,T=!1)}),document.addEventListener("touchstart",H=>{if(U.contains(H.target))return;const X=H.touches[0].clientX;(0<X&&X<20&&!T||T)&&(J=!0,ne=X)}),document.addEventListener("touchmove",H=>{if(J){const X=H.touches[0].clientX;ce=X;const $=(X-ne)/10;F.style.setProperty("--translate-x",`-${te(0,T?0-$:18.75-$,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(J){const H=(ce-ne)/10;n(0,T=T?H>-(18.75/2):H>18.75/2)}J=!1})});const Y=()=>Fi("https://tauri.app/"),oe=H=>{c(H),n(0,T=!1)};function ee(H){$n[H?"unshift":"push"](()=>{j=H,n(4,j)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const H=document.querySelector("#sidebar");H&&dr(H,T)}},[T,d,f,y,j,P,i,u,c,g,k,v,b,C,W,I,O,A,F,Y,oe,ee]}class pr extends ve{constructor(t){super(),ye(this,t,fr,cr,_e,{},null,[-1,-1])}}new pr({target:document.querySelector("#app")});