const to=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)}};to();function V(){}function bs(e){return e()}function jl(){return Object.create(null)}function se(e){e.forEach(bs)}function no(e){return typeof e=="function"}function me(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Un;function io(e,t){return Un||(Un=document.createElement("a")),Un.href=t,e===Un.href}function lo(e){return Object.keys(e).length===0}function so(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function gs(e,t,n){e.$$.on_destroy.push(so(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 ft(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function Xn(e){return function(t){return t.preventDefault(),e.call(this,t)}}function a(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e===""?null:+e}function ro(e){return Array.from(e.childNodes)}function K(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function B(e,t){e.value=t==null?"":t}function zt(e,t){for(let n=0;n{Gn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function $n(e){e&&e.c()}function Vt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Dt(()=>{const c=o.map(bs).filter(no);u?u.push(...c):se(c),e.$$.on_mount=[]}),d.forEach(Dt)}function Gt(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 po(e,t){e.$$.dirty[0]===-1&&(jt.push(e),co(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const g=y.length?y[0]:_;return f.ctx&&l(f.ctx[k],f.ctx[k]=g)&&(!f.skip_bound&&f.bound[k]&&f.bound[k](g),v&&po(e,k)),_}):[],f.update(),v=!0,se(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const k=ro(t.target);f.fragment&&f.fragment.l(k),k.forEach(p)}else f.fragment&&f.fragment.c();t.intro&&ze(e.$$.fragment),Vt(e,t.target,t.anchor,t.customElement),ys()}qt(c)}class we{$destroy(){Gt(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&&!lo(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Et=[];function ws(e,t=V){let n;const i=new Set;function l(d){if(me(e,d)&&(e=d,n)){const c=!Et.length;for(const f of i)f[1](),Et.push(f,e);if(c){for(let f=0;f{i.delete(f),i.size===0&&(n(),n=null)}}return{set:l,update:o,subscribe:u}}var mo=Object.defineProperty,Te=(e,t)=>{for(var n in t)mo(e,n,{get:t[n],enumerable:!0})},ho={};Te(ho,{convertFileSrc:()=>ks,invoke:()=>Kn,transformCallback:()=>pt});function _o(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function pt(e,t=!1){let n=_o(),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 Kn(e,t={}){return new Promise((n,i)=>{let l=pt(u=>{n(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=pt(u=>{i(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:e,callback:l,error:o,...t})})}function ks(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function L(e){return Kn("tauri",e)}var bo={};Te(bo,{Child:()=>Ms,Command:()=>Wi,EventEmitter:()=>Jn,open:()=>Oi});async function go(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),L({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:pt(e)}})}var Jn=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)}},Ms=class{constructor(e){this.pid=e}async write(e){return L({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return L({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Wi=class extends Jn{constructor(e,t=[],n){super(),this.stdout=new Jn,this.stderr=new Jn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static sidecar(e,t=[],n){let i=new Wi(e,t,n);return i.options.sidecar=!0,i}async spawn(){return go(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 Ms(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 Oi(e,t){return L({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var vo={};Te(vo,{TauriEvent:()=>Ls,emit:()=>ni,listen:()=>Xt,once:()=>Ss});async function Cs(e,t){return L({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Ts(e,t,n){await L({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Ri(e,t,n){return L({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:pt(n)}}).then(i=>async()=>Cs(e,i))}async function As(e,t,n){return Ri(e,t,i=>{n(i),Cs(e,i.id).catch(()=>{})})}var Ls=(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))(Ls||{});async function Xt(e,t){return Ri(e,null,t)}async function Ss(e,t){return As(e,null,t)}async function ni(e,t){return Ts(e,void 0,t)}var yo={};Te(yo,{CloseRequestedEvent:()=>Ws,LogicalPosition:()=>Es,LogicalSize:()=>Qn,PhysicalPosition:()=>xe,PhysicalSize:()=>dt,UserAttentionType:()=>Ii,WebviewWindow:()=>mt,WebviewWindowHandle:()=>Ds,WindowManager:()=>Ps,appWindow:()=>je,availableMonitors:()=>Mo,currentMonitor:()=>wo,getAll:()=>zs,getCurrent:()=>Ut,primaryMonitor:()=>ko});var Qn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},dt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Qn(this.width/e,this.height/e)}},Es=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},xe=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Es(this.x/e,this.y/e)}},Ii=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(Ii||{});function Ut(){return new mt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function zs(){return window.__TAURI_METADATA__.__windows.map(e=>new mt(e.label,{skip:!0}))}var ql=["tauri://created","tauri://error"],Ds=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)}):Ri(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)}):As(e,this.label,t)}async emit(e,t){if(ql.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return Ts(e,this.label,t)}_handleTauriEvent(e,t){return ql.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Ps=class extends Ds{async scaleFactor(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new xe(e,t))}async outerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new xe(e,t))}async innerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new dt(e,t))}async outerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new dt(e,t))}async isFullscreen(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMaximized(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async theme(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return L({__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"}),L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setAlwaysOnTop(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",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 L({__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 L({__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 L({__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 L({__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 L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return L({__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 L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return L({__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 L({__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 L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return L({__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 Ws(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)}},Ws=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}},mt=class extends Ps{constructor(e,t={}){super(e),t!=null&&t.skip||L({__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 zs().some(t=>t.label===e)?new mt(e,{skip:!0}):null}},je;"__TAURI_METADATA__"in window?je=new mt(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.`),je=new mt("main",{skip:!0}));function Hi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new xe(e.position.x,e.position.y),size:new dt(e.size.width,e.size.height)}}async function wo(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Hi)}async function ko(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Hi)}async function Mo(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Hi))}function Co(){return navigator.appVersion.includes("Win")}var To={};Te(To,{EOL:()=>Ao,arch:()=>Eo,platform:()=>Os,tempdir:()=>zo,type:()=>So,version:()=>Lo});var Ao=Co()?`\r `:` `;async function Os(){return L({__tauriModule:"Os",message:{cmd:"platform"}})}async function Lo(){return L({__tauriModule:"Os",message:{cmd:"version"}})}async function So(){return L({__tauriModule:"Os",message:{cmd:"osType"}})}async function Eo(){return L({__tauriModule:"Os",message:{cmd:"arch"}})}async function zo(){return L({__tauriModule:"Os",message:{cmd:"tempdir"}})}var Do={};Te(Do,{getName:()=>Is,getTauriVersion:()=>Hs,getVersion:()=>Rs,hide:()=>Ns,show:()=>Fs});async function Rs(){return L({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function Is(){return L({__tauriModule:"App",message:{cmd:"getAppName"}})}async function Hs(){return L({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function Fs(){return L({__tauriModule:"App",message:{cmd:"show"}})}async function Ns(){return L({__tauriModule:"App",message:{cmd:"hide"}})}var Po={};Te(Po,{exit:()=>js,relaunch:()=>Fi});async function js(e=0){return L({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function Fi(){return L({__tauriModule:"Process",message:{cmd:"relaunch"}})}function Wo(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j,S,C,T,P,M,N;return{c(){t=r("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It'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's integration tests.`,n=h(),i=r("br"),l=h(),o=r("br"),u=h(),d=r("pre"),c=z("App name: "),f=r("code"),v=z(e[2]),k=z(` App version: `),_=r("code"),y=z(e[0]),g=z(` Tauri version: `),b=r("code"),A=z(e[1]),D=z(` `),F=h(),W=r("br"),j=h(),S=r("div"),C=r("button"),C.textContent="Close application",T=h(),P=r("button"),P.textContent="Relaunch application",a(C,"class","btn"),a(P,"class","btn"),a(S,"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,v),s(d,k),s(d,_),s(_,y),s(d,g),s(d,b),s(b,A),s(d,D),m(U,F,J),m(U,W,J),m(U,j,J),m(U,S,J),s(S,C),s(S,T),s(S,P),M||(N=[E(C,"click",e[3]),E(P,"click",e[4])],M=!0)},p(U,[J]){J&4&&K(v,U[2]),J&1&&K(y,U[0]),J&2&&K(A,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(F),U&&p(W),U&&p(j),U&&p(S),M=!1,se(N)}}}function Oo(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";Is().then(c=>{n(2,o=c)}),Rs().then(c=>{n(0,i=c)}),Hs().then(c=>{n(1,l=c)});async function u(){await js()}async function d(){await Fi()}return[i,l,o,u,d]}class Ro extends we{constructor(t){super(),ye(this,t,Oo,Wo,me,{})}}var Io={};Te(Io,{getMatches:()=>Us});async function Us(){return L({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}function Ho(e){let t,n,i,l,o,u,d,c,f,v,k,_,y;return{c(){t=r("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
  --config <PATH>
  --theme <light|dark|system>
  --verbose
Additionally, it has a update --background subcommand.`,n=h(),i=r("br"),l=h(),o=r("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=h(),d=r("br"),c=h(),f=r("br"),v=h(),k=r("button"),k.textContent="Get matches",a(o,"class","note"),a(k,"class","btn"),a(k,"id","cli-matches")},m(g,b){m(g,t,b),m(g,n,b),m(g,i,b),m(g,l,b),m(g,o,b),m(g,u,b),m(g,d,b),m(g,c,b),m(g,f,b),m(g,v,b),m(g,k,b),_||(y=E(k,"click",e[0]),_=!0)},p:V,i:V,o:V,d(g){g&&p(t),g&&p(n),g&&p(i),g&&p(l),g&&p(o),g&&p(u),g&&p(d),g&&p(c),g&&p(f),g&&p(v),g&&p(k),_=!1,y()}}}function Fo(e,t,n){let{onMessage:i}=t;function l(){Us().then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class No extends we{constructor(t){super(),ye(this,t,Fo,Ho,me,{onMessage:1})}}function jo(e){let t,n,i,l,o,u,d,c;return{c(){t=r("div"),n=r("button"),n.textContent="Call Log API",i=h(),l=r("button"),l.textContent="Call Request (async) API",o=h(),u=r("button"),u.textContent="Send event to Rust",a(n,"class","btn"),a(n,"id","log"),a(l,"class","btn"),a(l,"id","request"),a(u,"class","btn"),a(u,"id","event")},m(f,v){m(f,t,v),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[E(n,"click",e[0]),E(l,"click",e[1]),E(u,"click",e[2])],d=!0)},p:V,i:V,o:V,d(f){f&&p(t),d=!1,se(c)}}}function Uo(e,t,n){let{onMessage:i}=t,l;ut(async()=>{l=await Xt("rust-event",i)}),Pi(()=>{l&&l()});function o(){Kn("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){Kn("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){ni("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class qo extends we{constructor(t){super(),ye(this,t,Uo,jo,me,{onMessage:3})}}var Bo={};Te(Bo,{ask:()=>Bs,confirm:()=>Go,message:()=>Vo,open:()=>Ni,save:()=>qs});async function Ni(e={}){return typeof e=="object"&&Object.freeze(e),L({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function qs(e={}){return typeof e=="object"&&Object.freeze(e),L({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function Vo(e,t){var n;let i=typeof t=="string"?{title:t}:t;return L({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(n=i==null?void 0:i.title)==null?void 0:n.toString(),type:i==null?void 0:i.type}})}async function Bs(e,t){var n;let i=typeof t=="string"?{title:t}:t;return L({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(n=i==null?void 0:i.title)==null?void 0:n.toString(),type:i==null?void 0:i.type}})}async function Go(e,t){var n;let i=typeof t=="string"?{title:t}:t;return L({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(n=i==null?void 0:i.title)==null?void 0:n.toString(),type:i==null?void 0:i.type}})}var Jo={};Te(Jo,{BaseDirectory:()=>Jt,Dir:()=>Jt,copyFile:()=>Qo,createDir:()=>$o,exists:()=>er,readBinaryFile:()=>ji,readDir:()=>Vs,readTextFile:()=>Xo,removeDir:()=>Ko,removeFile:()=>Zo,renameFile:()=>xo,writeBinaryFile:()=>Yo,writeFile:()=>Di,writeTextFile:()=>Di});var Jt=(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))(Jt||{});async function Xo(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})}async function ji(e,t={}){let n=await L({__tauriModule:"Fs",message:{cmd:"readFile",path:e,options:t}});return Uint8Array.from(n)}async function Di(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,L({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(new TextEncoder().encode(i.contents)),options:l}})}async function Yo(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:[]),L({__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 Vs(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"readDir",path:e,options:t}})}async function $o(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"createDir",path:e,options:t}})}async function Ko(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"removeDir",path:e,options:t}})}async function Qo(e,t,n={}){return L({__tauriModule:"Fs",message:{cmd:"copyFile",source:e,destination:t,options:n}})}async function Zo(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"removeFile",path:e,options:t}})}async function xo(e,t,n={}){return L({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:e,newPath:t,options:n}})}async function er(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"exists",path:e,options:t}})}function tr(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j,S,C,T,P;return{c(){t=r("div"),n=r("input"),i=h(),l=r("input"),o=h(),u=r("br"),d=h(),c=r("div"),f=r("input"),v=h(),k=r("label"),k.textContent="Multiple",_=h(),y=r("div"),g=r("input"),b=h(),A=r("label"),A.textContent="Directory",D=h(),F=r("br"),W=h(),j=r("button"),j.textContent="Open dialog",S=h(),C=r("button"),C.textContent="Open save dialog",a(n,"class","input"),a(n,"id","dialog-default-path"),a(n,"placeholder","Default path"),a(l,"class","input"),a(l,"id","dialog-filter"),a(l,"placeholder","Extensions filter, comma-separated"),a(t,"class","flex gap-2 children:grow"),a(f,"type","checkbox"),a(f,"id","dialog-multiple"),a(k,"for","dialog-multiple"),a(g,"type","checkbox"),a(g,"id","dialog-directory"),a(A,"for","dialog-directory"),a(j,"class","btn"),a(j,"id","open-dialog"),a(C,"class","btn"),a(C,"id","save-dialog")},m(M,N){m(M,t,N),s(t,n),B(n,e[0]),s(t,i),s(t,l),B(l,e[1]),m(M,o,N),m(M,u,N),m(M,d,N),m(M,c,N),s(c,f),f.checked=e[2],s(c,v),s(c,k),m(M,_,N),m(M,y,N),s(y,g),g.checked=e[3],s(y,b),s(y,A),m(M,D,N),m(M,F,N),m(M,W,N),m(M,j,N),m(M,S,N),m(M,C,N),T||(P=[E(n,"input",e[8]),E(l,"input",e[9]),E(f,"change",e[10]),E(g,"change",e[11]),E(j,"click",e[4]),E(C,"click",e[5])],T=!0)},p(M,[N]){N&1&&n.value!==M[0]&&B(n,M[0]),N&2&&l.value!==M[1]&&B(l,M[1]),N&4&&(f.checked=M[2]),N&8&&(g.checked=M[3])},i:V,o:V,d(M){M&&p(t),M&&p(o),M&&p(u),M&&p(d),M&&p(c),M&&p(_),M&&p(y),M&&p(D),M&&p(F),M&&p(W),M&&p(j),M&&p(S),M&&p(C),T=!1,se(P)}}}function nr(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 ir(e,t,n){let{onMessage:i}=t,{insecureRenderHtml:l}=t,o=null,u=null,d=!1,c=!1;function f(){Ni({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 A=b,D=A.match(/\S+\.\S+$/g);ji(A).then(function(F){D&&(A.includes(".png")||A.includes(".jpg"))?nr(new Uint8Array(F),function(W){var j="data:image/png;base64,"+W;l('')}):i(b)}).catch(i(b))}}).catch(i)}function v(){qs({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 y(){d=this.checked,n(2,d)}function g(){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,v,i,l,k,_,y,g]}class lr extends we{constructor(t){super(),ye(this,t,ir,tr,me,{onMessage:6,insecureRenderHtml:7})}}function Bl(e,t,n){const i=e.slice();return i[9]=t[n],i}function Vl(e){let t,n=e[9][0]+"",i,l;return{c(){t=r("option"),i=z(n),t.__value=l=e[9][1],t.value=t.__value},m(o,u){m(o,t,u),s(t,i)},p:V,d(o){o&&p(t)}}}function sr(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j=e[2],S=[];for(let C=0;CisNaN(parseInt(_))).map(_=>[_,Jt[_]]);function c(){const _=o.match(/\S+\.\S+$/g),y={dir:Gl()};(_?ji(o,y):Vs(o,y)).then(function(b){if(_)if(o.includes(".png")||o.includes(".jpg"))or(new Uint8Array(b),function(A){const D="data:image/png;base64,"+A;l('')});else{const A=String.fromCharCode.apply(null,b);l(''),setTimeout(()=>{const D=document.getElementById("file-response");D.value=A,document.getElementById("file-save").addEventListener("click",function(){Di(o,D.value,{dir:Gl()}).catch(i)})})}else i(b)}).catch(i)}function f(){n(1,u.src=ks(o),u)}function v(){o=this.value,n(0,o)}function k(_){Yn[_?"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,v,k]}class ar extends we{constructor(t){super(),ye(this,t,rr,sr,me,{onMessage:5,insecureRenderHtml:6})}}var ur={};Te(ur,{Body:()=>et,Client:()=>Js,Response:()=>Gs,ResponseType:()=>Ui,fetch:()=>cr,getClient:()=>Zn});var Ui=(e=>(e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary",e))(Ui||{}),et=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[i]=o}};if(e instanceof FormData)for(let[i,l]of e)n(i,l);else for(let i in e){let l=e[i];n(i,l)}return new et("Form",t)}static json(e){return new et("Json",e)}static text(e){return new et("Text",e)}static bytes(e){return new et("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},Gs=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}},Js=class{constructor(e){this.id=e}async drop(){return L({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),L({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(n=>{let i=new Gs(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 Zn(e){return L({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new Js(t))}var Si=null;async function cr(e,t){var n;return Si===null&&(Si=await Zn()),Si.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function Jl(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function Xl(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F=e[5],W=[];for(let T=0;TRe(W[T],1,1,()=>{W[T]=null});let S=!e[3]&&Ql(),C=!e[3]&&e[8]&&Zl();return{c(){t=r("span"),n=r("span"),i=z(e[6]),l=h(),o=r("ul");for(let T=0;T{v[g]=null}),ti(),o=v[l],o?o.p(_,y):(o=v[l]=f[l](_),o.c()),ze(o,1),o.m(t,u))},i(_){d||(ze(o),d=!0)},o(_){Re(o),d=!1},d(_){_&&p(t),c&&c.d(),v[l].d()}}}function Ql(e){let t;return{c(){t=r("span"),t.textContent=",",a(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Zl(e){let t;return{c(){t=r("span"),t.textContent=",",a(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function pr(e){let t,n,i=e[5].length&&Xl(e);return{c(){i&&i.c(),t=xn()},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&&ze(i,1)):(i=Xl(l),i.c(),ze(i,1),i.m(t.parentNode,t)):i&&(ei(),Re(i,1,1,()=>{i=null}),ti())},i(l){n||(ze(i),n=!0)},o(l){Re(i),n=!1},d(l){i&&i.d(l),l&&p(t)}}}const mr="...";function hr(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,v,k,_;const y=b=>{switch(d(b)){case"string":return`"${b}"`;case"function":return"f () {...}";case"symbol":return b.toString();default:return b}},g=()=>{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,v=f?"[":"{"),n(7,k=f?"]":"}")),e.$$.dirty&6&&n(8,_=le[9].call(n)),a(k,"class","input h-auto w-100%"),a(k,"id","request-body"),a(k,"placeholder","Request body"),a(k,"rows","5"),a(b,"class","btn"),a(b,"id","make-request"),a(C,"class","input"),a(P,"class","input"),a(S,"class","flex gap-2 children:grow"),a(Q,"type","checkbox"),a($,"class","btn"),a($,"type","button")},m(R,q){m(R,t,q),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),zt(n,e[0]),s(t,c),s(t,f),s(t,v),s(t,k),B(k,e[1]),s(t,_),s(t,y),s(t,g),s(t,b),m(R,A,q),m(R,D,q),m(R,F,q),m(R,W,q),m(R,j,q),m(R,S,q),s(S,C),B(C,e[2]),s(S,T),s(S,P),B(P,e[3]),m(R,M,q),m(R,N,q),m(R,U,q),m(R,J,q),s(J,Q),Q.checked=e[5],s(J,he),m(R,x,q),m(R,ne,q),m(R,Y,q),m(R,_e,q),m(R,O,q),m(R,$,q),m(R,ie,q),m(R,oe,q),m(R,Z,q),m(R,pe,q),m(R,re,q),Vt(be,R,q),ee=!0,ke||(Ae=[E(n,"change",e[9]),E(k,"input",e[10]),E(t,"submit",Xn(e[6])),E(C,"input",e[11]),E(P,"input",e[12]),E(Q,"change",e[13]),E($,"click",e[7])],ke=!0)},p(R,[q]){q&1&&zt(n,R[0]),q&2&&B(k,R[1]),q&4&&C.value!==R[2]&&B(C,R[2]),q&8&&P.value!==R[3]&&B(P,R[3]),q&32&&(Q.checked=R[5]);const We={};q&16&&(We.json=R[4]),be.$set(We)},i(R){ee||(ze(be.$$.fragment,R),ee=!0)},o(R){Re(be.$$.fragment,R),ee=!1},d(R){R&&p(t),R&&p(A),R&&p(D),R&&p(F),R&&p(W),R&&p(j),R&&p(S),R&&p(M),R&&p(N),R&&p(U),R&&p(J),R&&p(x),R&&p(ne),R&&p(Y),R&&p(_e),R&&p(O),R&&p($),R&&p(ie),R&&p(oe),R&&p(Z),R&&p(pe),R&&p(re),Gt(be,R),ke=!1,se(Ae)}}}function br(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const D=await Zn().catch(j=>{throw o(j),j}),W={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?W.body=et.json(JSON.parse(l)):l!==""&&(W.body=et.text(l)),D.request(W).then(o).catch(o)}let d="baz",c="qux",f=null,v=!0;async function k(){const D=await Zn().catch(F=>{throw o(F),F});n(4,f=await D.request({url:"http://localhost:3003",method:"POST",body:et.form({foo:d,bar:c}),headers:v?{"Content-Type":"multipart/form-data"}:void 0,responseType:Ui.Text}))}function _(){i=Ei(this),n(0,i)}function y(){l=this.value,n(1,l)}function g(){d=this.value,n(2,d)}function b(){c=this.value,n(3,c)}function A(){v=this.checked,n(5,v)}return e.$$set=D=>{"onMessage"in D&&n(8,o=D.onMessage)},[i,l,d,c,f,v,u,k,o,_,y,g,b,A]}class gr extends we{constructor(t){super(),ye(this,t,br,_r,me,{onMessage:8})}}function vr(e){let t,n,i;return{c(){t=r("button"),t.textContent="Send test notification",a(t,"class","btn"),a(t,"id","notification")},m(l,o){m(l,t,o),n||(i=E(t,"click",yr),n=!0)},p:V,i:V,o:V,d(l){l&&p(t),n=!1,i()}}}function yr(){new Notification("Notification title",{body:"This is the notification body"})}function wr(e,t,n){let{onMessage:i}=t;return e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class kr extends we{constructor(t){super(),ye(this,t,wr,vr,me,{onMessage:0})}}function xl(e,t,n){const i=e.slice();return i[67]=t[n],i}function es(e,t,n){const i=e.slice();return i[70]=t[n],i}function ts(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;fe[39].call(i))},m(f,v){m(f,t,v),m(f,n,v),m(f,i,v),s(i,l);for(let k=0;ke[57].call(Ne)),a($e,"class","input"),a($e,"type","number"),a(Ke,"class","input"),a(Ke,"type","number"),a(Fe,"class","flex gap-2"),a(Qe,"class","input grow"),a(Qe,"id","title"),a(Ft,"class","btn"),a(Ft,"type","submit"),a(rt,"class","flex gap-1"),a(Ze,"class","input grow"),a(Ze,"id","url"),a(Nt,"class","btn"),a(Nt,"id","open-url"),a(at,"class","flex gap-1"),a(ot,"class","flex flex-col gap-1")},m(w,I){m(w,t,I),m(w,n,I),m(w,i,I),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,v),s(i,k),s(i,_),m(w,y,I),m(w,g,I),m(w,b,I),m(w,A,I),s(A,D),s(D,F),s(D,W),W.checked=e[3],s(A,j),s(A,S),s(S,C),s(S,T),T.checked=e[2],s(A,P),s(A,M),s(M,N),s(M,U),U.checked=e[4],s(A,J),s(A,Q),s(Q,he),s(Q,x),x.checked=e[5],s(A,ne),s(A,Y),s(Y,_e),s(Y,O),O.checked=e[6],m(w,$,I),m(w,ie,I),m(w,oe,I),m(w,Z,I),s(Z,pe),s(pe,re),s(re,be),s(re,ee),B(ee,e[13]),s(pe,ke),s(pe,Ae),s(Ae,R),s(Ae,q),B(q,e[14]),s(Z,We),s(Z,Le),s(Le,Me),s(Me,ae),s(Me,de),B(de,e[7]),s(Le,ue),s(Le,Se),s(Se,tt),s(Se,fe),B(fe,e[8]),s(Z,ce),s(Z,H),s(H,te),s(te,G),s(te,ge),B(ge,e[9]),s(H,Yt),s(H,ht),s(ht,$t),s(ht,Oe),B(Oe,e[10]),s(Z,Kt),s(Z,Ue),s(Ue,_t),s(_t,Qt),s(_t,X),B(X,e[11]),s(Ue,Pt),s(Ue,nt),s(nt,Wt),s(nt,De),B(De,e[12]),m(w,bt,I),m(w,gt,I),m(w,vt,I),m(w,Ee,I),s(Ee,Ie),s(Ie,Pe),s(Pe,it),s(Pe,Ot),s(Pe,lt),s(lt,Rt),s(lt,yt),s(Pe,It),s(Pe,wt),s(wt,Bi),s(wt,ii),s(Ie,Vi),s(Ie,qe),s(qe,xt),s(qe,Gi),s(qe,en),s(en,Ji),s(en,li),s(qe,Xi),s(qe,nn),s(nn,Yi),s(nn,si),s(Ee,$i),s(Ee,kt),s(kt,Be),s(Be,sn),s(Be,Ki),s(Be,on),s(on,Qi),s(on,oi),s(Be,Zi),s(Be,an),s(an,xi),s(an,ri),s(kt,el),s(kt,Ve),s(Ve,cn),s(Ve,tl),s(Ve,dn),s(dn,nl),s(dn,ai),s(Ve,il),s(Ve,pn),s(pn,ll),s(pn,ui),s(Ee,sl),s(Ee,Mt),s(Mt,Ge),s(Ge,hn),s(Ge,ol),s(Ge,_n),s(_n,rl),s(_n,ci),s(Ge,al),s(Ge,gn),s(gn,ul),s(gn,di),s(Mt,cl),s(Mt,Je),s(Je,yn),s(Je,dl),s(Je,wn),s(wn,fl),s(wn,fi),s(Je,pl),s(Je,Mn),s(Mn,ml),s(Mn,pi),s(Ee,hl),s(Ee,Ct),s(Ct,Xe),s(Xe,Tn),s(Xe,_l),s(Xe,An),s(An,bl),s(An,mi),s(Xe,gl),s(Xe,Sn),s(Sn,vl),s(Sn,hi),s(Ct,yl),s(Ct,Ye),s(Ye,zn),s(Ye,wl),s(Ye,Dn),s(Dn,kl),s(Dn,_i),s(Ye,Ml),s(Ye,Wn),s(Wn,Cl),s(Wn,bi),m(w,gi,I),m(w,vi,I),m(w,yi,I),m(w,Ht,I),m(w,wi,I),m(w,He,I),s(He,Rn),s(Rn,Tt),Tt.checked=e[15],s(Rn,Tl),s(He,Al),s(He,In),s(In,At),At.checked=e[16],s(In,Ll),s(He,Sl),s(He,Hn),s(Hn,Lt),Lt.checked=e[20],s(Hn,El),m(w,ki,I),m(w,Fe,I),s(Fe,Fn),s(Fn,zl),s(Fn,Ne);for(let ve=0;ve=1,v,k,_,y=f&&ts(e),g=e[1][e[0]]&&is(e);return{c(){t=r("div"),n=r("div"),i=r("input"),l=h(),o=r("button"),o.textContent="New window",u=h(),d=r("br"),c=h(),y&&y.c(),v=h(),g&&g.c(),a(i,"class","input grow"),a(i,"type","text"),a(i,"placeholder","New Window label.."),a(o,"class","btn"),a(n,"class","flex gap-1"),a(t,"class","flex flex-col children:grow gap-2")},m(b,A){m(b,t,A),s(t,n),s(n,i),B(i,e[21]),s(n,l),s(n,o),s(t,u),s(t,d),s(t,c),y&&y.m(t,null),s(t,v),g&&g.m(t,null),k||(_=[E(i,"input",e[38]),E(o,"click",e[35])],k=!0)},p(b,A){A[0]&2097152&&i.value!==b[21]&&B(i,b[21]),A[0]&2&&(f=Object.keys(b[1]).length>=1),f?y?y.p(b,A):(y=ts(b),y.c(),y.m(t,v)):y&&(y.d(1),y=null),b[1][b[0]]?g?g.p(b,A):(g=is(b),g.c(),g.m(t,null)):g&&(g.d(1),g=null)},i:V,o:V,d(b){b&&p(t),y&&y.d(),g&&g.d(),k=!1,se(_)}}}function Cr(e,t,n){let i=je.label;const l={[je.label]:je},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,v=!1,k=!0,_=!1,y=!1,g=null,b=null,A=null,D=null,F=null,W=null,j=null,S=null,C=1,T=new xe(j,S),P=new xe(j,S),M=new dt(g,b),N=new dt(g,b),U,J,Q=!1,he=!0,x=null,ne=null,Y="default",_e=!1,O="Awesome Tauri Example!";function $(){Oi(c)}function ie(){l[i].setTitle(O)}function oe(){l[i].hide(),setTimeout(l[i].show,2e3)}function Z(){l[i].minimize(),setTimeout(l[i].unminimize,2e3)}function pe(){Ni({multiple:!1}).then(X=>{typeof X=="string"&&l[i].setIcon(X)})}function re(){if(!d)return;const X=new mt(d);n(1,l[d]=X,l),X.once("tauri://error",function(){u("Error creating new webview")})}function be(){l[i].innerSize().then(X=>{n(26,M=X),n(7,g=M.width),n(8,b=M.height)}),l[i].outerSize().then(X=>{n(27,N=X)})}function ee(){l[i].innerPosition().then(X=>{n(24,T=X)}),l[i].outerPosition().then(X=>{n(25,P=X),n(13,j=P.x),n(14,S=P.y)})}async function ke(X){!X||(U&&U(),J&&J(),J=await X.listen("tauri://move",ee),U=await X.listen("tauri://resize",be))}async function Ae(){await l[i].minimize(),await l[i].requestUserAttention(Ii.Critical),await new Promise(X=>setTimeout(X,3e3)),await l[i].requestUserAttention(null)}function R(){d=this.value,n(21,d)}function q(){i=Ei(this),n(0,i),n(1,l)}const We=()=>l[i].center();function Le(){v=this.checked,n(3,v)}function Me(){f=this.checked,n(2,f)}function ae(){k=this.checked,n(4,k)}function de(){_=this.checked,n(5,_)}function ue(){y=this.checked,n(6,y)}function Se(){j=le(this.value),n(13,j)}function tt(){S=le(this.value),n(14,S)}function fe(){g=le(this.value),n(7,g)}function ce(){b=le(this.value),n(8,b)}function H(){A=le(this.value),n(9,A)}function te(){D=le(this.value),n(10,D)}function G(){F=le(this.value),n(11,F)}function ge(){W=le(this.value),n(12,W)}function Yt(){Q=this.checked,n(15,Q)}function ht(){he=this.checked,n(16,he)}function $t(){_e=this.checked,n(20,_e)}function Oe(){Y=Ei(this),n(19,Y),n(29,o)}function Kt(){x=le(this.value),n(17,x)}function Ue(){ne=le(this.value),n(18,ne)}function _t(){O=this.value,n(28,O)}function Qt(){c=this.value,n(22,c)}return e.$$set=X=>{"onMessage"in X&&n(37,u=X.onMessage)},e.$$.update=()=>{var X,Pt,nt,Wt,De,bt,gt,vt,Ee,Ie,Pe,it,Ot,lt,Rt,st,yt,It;e.$$.dirty[0]&3&&(l[i],ee(),be()),e.$$.dirty[0]&7&&((X=l[i])==null||X.setResizable(f)),e.$$.dirty[0]&11&&(v?(Pt=l[i])==null||Pt.maximize():(nt=l[i])==null||nt.unmaximize()),e.$$.dirty[0]&19&&((Wt=l[i])==null||Wt.setDecorations(k)),e.$$.dirty[0]&35&&((De=l[i])==null||De.setAlwaysOnTop(_)),e.$$.dirty[0]&67&&((bt=l[i])==null||bt.setFullscreen(y)),e.$$.dirty[0]&387&&g&&b&&((gt=l[i])==null||gt.setSize(new dt(g,b))),e.$$.dirty[0]&1539&&(A&&D?(vt=l[i])==null||vt.setMinSize(new Qn(A,D)):(Ee=l[i])==null||Ee.setMinSize(null)),e.$$.dirty[0]&6147&&(F>800&&W>400?(Ie=l[i])==null||Ie.setMaxSize(new Qn(F,W)):(Pe=l[i])==null||Pe.setMaxSize(null)),e.$$.dirty[0]&24579&&j!==null&&S!==null&&((it=l[i])==null||it.setPosition(new xe(j,S))),e.$$.dirty[0]&3&&((Ot=l[i])==null||Ot.scaleFactor().then(wt=>n(23,C=wt))),e.$$.dirty[0]&3&&ke(l[i]),e.$$.dirty[0]&32771&&((lt=l[i])==null||lt.setCursorGrab(Q)),e.$$.dirty[0]&65539&&((Rt=l[i])==null||Rt.setCursorVisible(he)),e.$$.dirty[0]&524291&&((st=l[i])==null||st.setCursorIcon(Y)),e.$$.dirty[0]&393219&&x!==null&&ne!==null&&((yt=l[i])==null||yt.setCursorPosition(new xe(x,ne))),e.$$.dirty[0]&1048579&&((It=l[i])==null||It.setIgnoreCursorEvents(_e))},[i,l,f,v,k,_,y,g,b,A,D,F,W,j,S,Q,he,x,ne,Y,_e,d,c,C,T,P,M,N,O,o,$,ie,oe,Z,pe,re,Ae,u,R,q,We,Le,Me,ae,de,ue,Se,tt,fe,ce,H,te,G,ge,Yt,ht,$t,Oe,Kt,Ue,_t,Qt]}class Tr extends we{constructor(t){super(),ye(this,t,Cr,Mr,me,{onMessage:37},null,[-1,-1,-1])}}var Ar={};Te(Ar,{isRegistered:()=>Sr,register:()=>Ys,registerAll:()=>Lr,unregister:()=>$s,unregisterAll:()=>Ks});async function Ys(e,t){return L({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:pt(t)}})}async function Lr(e,t){return L({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:pt(t)}})}async function Sr(e){return L({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})}async function $s(e){return L({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function Ks(){return L({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function ss(e,t,n){const i=e.slice();return i[9]=t[n],i}function os(e){let t,n=e[9]+"",i,l,o,u,d;function c(){return e[8](e[9])}return{c(){t=r("div"),i=z(n),l=h(),o=r("button"),o.textContent="Unregister",a(o,"class","btn"),a(o,"type","button"),a(t,"class","flex justify-between")},m(f,v){m(f,t,v),s(t,i),s(t,l),s(t,o),u||(d=E(o,"click",c),u=!0)},p(f,v){e=f,v&2&&n!==(n=e[9]+"")&&K(i,n)},d(f){f&&p(t),u=!1,d()}}}function rs(e){let t,n,i,l,o;return{c(){t=r("br"),n=h(),i=r("button"),i.textContent="Unregister all",a(i,"class","btn"),a(i,"type","button")},m(u,d){m(u,t,d),m(u,n,d),m(u,i,d),l||(o=E(i,"click",e[5]),l=!0)},p:V,d(u){u&&p(t),u&&p(n),u&&p(i),l=!1,o()}}}function Er(e){let t,n,i,l,o,u,d,c,f,v,k,_=e[1],y=[];for(let b=0;b<_.length;b+=1)y[b]=os(ss(e,_,b));let g=e[1].length>1&&rs(e);return{c(){t=r("div"),n=r("input"),i=h(),l=r("button"),l.textContent="Register",o=h(),u=r("br"),d=h(),c=r("div");for(let b=0;b1?g?g.p(b,A):(g=rs(b),g.c(),g.m(c,null)):g&&(g.d(1),g=null)},i:V,o:V,d(b){b&&p(t),b&&p(o),b&&p(u),b&&p(d),b&&p(c),ft(y,b),g&&g.d(),v=!1,se(k)}}}function zr(e,t,n){let i,{onMessage:l}=t;const o=ws([]);gs(e,o,_=>n(1,i=_));let u="CmdOrControl+X";function d(){const _=u;Ys(_,()=>{l(`Shortcut ${_} triggered`)}).then(()=>{o.update(y=>[...y,_]),l(`Shortcut ${_} registered successfully`)}).catch(l)}function c(_){const y=_;$s(y).then(()=>{o.update(g=>g.filter(b=>b!==y)),l(`Shortcut ${y} unregistered`)}).catch(l)}function f(){Ks().then(()=>{o.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function v(){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,v,k]}class Dr extends we{constructor(t){super(),ye(this,t,zr,Er,me,{onMessage:6})}}function as(e){let t,n,i,l,o,u,d;return{c(){t=r("br"),n=h(),i=r("input"),l=h(),o=r("button"),o.textContent="Write",a(i,"class","input"),a(i,"placeholder","write to stdin"),a(o,"class","btn")},m(c,f){m(c,t,f),m(c,n,f),m(c,i,f),B(i,e[4]),m(c,l,f),m(c,o,f),u||(d=[E(i,"input",e[14]),E(o,"click",e[8])],u=!0)},p(c,f){f&16&&i.value!==c[4]&&B(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 Pr(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j,S,C,T,P,M=e[5]&&as(e);return{c(){t=r("div"),n=r("div"),i=z(`Script: `),l=r("input"),o=h(),u=r("div"),d=z(`Encoding: `),c=r("input"),f=h(),v=r("div"),k=z(`Working directory: `),_=r("input"),y=h(),g=r("div"),b=z(`Arguments: `),A=r("input"),D=h(),F=r("div"),W=r("button"),W.textContent="Run",j=h(),S=r("button"),S.textContent="Kill",C=h(),M&&M.c(),a(l,"class","grow input"),a(n,"class","flex items-center gap-1"),a(c,"class","grow input"),a(u,"class","flex items-center gap-1"),a(_,"class","grow input"),a(_,"placeholder","Working directory"),a(v,"class","flex items-center gap-1"),a(A,"class","grow input"),a(A,"placeholder","Environment variables"),a(g,"class","flex items-center gap-1"),a(W,"class","btn"),a(S,"class","btn"),a(F,"class","flex children:grow gap-1"),a(t,"class","flex flex-col childre:grow gap-1")},m(N,U){m(N,t,U),s(t,n),s(n,i),s(n,l),B(l,e[0]),s(t,o),s(t,u),s(u,d),s(u,c),B(c,e[3]),s(t,f),s(t,v),s(v,k),s(v,_),B(_,e[1]),s(t,y),s(t,g),s(g,b),s(g,A),B(A,e[2]),s(t,D),s(t,F),s(F,W),s(F,j),s(F,S),s(t,C),M&&M.m(t,null),T||(P=[E(l,"input",e[10]),E(c,"input",e[11]),E(_,"input",e[12]),E(A,"input",e[13]),E(W,"click",e[6]),E(S,"click",e[7])],T=!0)},p(N,[U]){U&1&&l.value!==N[0]&&B(l,N[0]),U&8&&c.value!==N[3]&&B(c,N[3]),U&2&&_.value!==N[1]&&B(_,N[1]),U&4&&A.value!==N[2]&&B(A,N[2]),N[5]?M?M.p(N,U):(M=as(N),M.c(),M.m(t,null)):M&&(M.d(1),M=null)},i:V,o:V,d(N){N&&p(t),M&&M.d(),T=!1,se(P)}}}function Wr(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",v="",k="",_;function y(){return f.split(" ").reduce((C,T)=>{let[P,M]=T.split("=");return{...C,[P]:M}},{})}function g(){n(5,_=null);const C=new Wi(l,[...o,d],{cwd:c||null,env:y(),encoding:v});C.on("close",T=>{u(`command finished with code ${T.code} and signal ${T.signal}`),n(5,_=null)}),C.on("error",T=>u(`command error: "${T}"`)),C.stdout.on("data",T=>u(`command stdout: "${T}"`)),C.stderr.on("data",T=>u(`command stderr: "${T}"`)),C.spawn().then(T=>{n(5,_=T)}).catch(u)}function b(){_.kill().then(()=>u("killed child process")).catch(u)}function A(){_.write(k).catch(u)}function D(){d=this.value,n(0,d)}function F(){v=this.value,n(3,v)}function W(){c=this.value,n(1,c)}function j(){f=this.value,n(2,f)}function S(){k=this.value,n(4,k)}return e.$$set=C=>{"onMessage"in C&&n(9,u=C.onMessage)},[d,c,f,v,k,_,g,b,A,u,D,F,W,j,S]}class Or extends we{constructor(t){super(),ye(this,t,Wr,Pr,me,{onMessage:9})}}var Rr={};Te(Rr,{checkUpdate:()=>Zs,installUpdate:()=>Qs,onUpdaterEvent:()=>qi});async function qi(e){return Xt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function Qs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error)return t(),i(o.error);if(o.status==="DONE")return t(),n()}qi(l).then(o=>{e=o}).catch(o=>{throw t(),o}),ni("tauri://update-install").catch(o=>{throw t(),o})})}async function Zs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){return t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error)return t(),i(u.error);if(u.status==="UPTODATE")return t(),n({shouldUpdate:!1})}Ss("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),qi(o).then(u=>{e=u}).catch(u=>{throw t(),u}),ni("tauri://update").catch(u=>{throw t(),u})})}function Ir(e){let t;return{c(){t=r("button"),t.innerHTML='
',a(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 Hr(e){let t,n,i;return{c(){t=r("button"),t.textContent="Install update",a(t,"class","btn")},m(l,o){m(l,t,o),n||(i=E(t,"click",e[4]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function Fr(e){let t,n,i;return{c(){t=r("button"),t.textContent="Check update",a(t,"class","btn")},m(l,o){m(l,t,o),n||(i=E(t,"click",e[3]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function Nr(e){let t;function n(o,u){return!o[0]&&!o[2]?Fr:!o[1]&&o[2]?Hr:Ir}let i=n(e),l=i(e);return{c(){t=r("div"),l.c(),a(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 jr(e,t,n){let{onMessage:i}=t,l;ut(async()=>{l=await Xt("tauri://update-status",i)}),Pi(()=>{l&&l()});let o,u,d;async function c(){n(0,o=!0);try{const{shouldUpdate:v,manifest:k}=await Zs();i(`Should update: ${v}`),i(k),n(2,d=v)}catch(v){i(v)}finally{n(0,o=!1)}}async function f(){n(1,u=!0);try{await Qs(),i("Installation complete, restart required."),await Fi()}catch(v){i(v)}finally{n(1,u=!1)}}return e.$$set=v=>{"onMessage"in v&&n(5,i=v.onMessage)},[o,u,d,c,f,i]}class Ur extends we{constructor(t){super(),ye(this,t,jr,Nr,me,{onMessage:5})}}var qr={};Te(qr,{readText:()=>eo,writeText:()=>xs});async function xs(e){return L({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function eo(){return L({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}function Br(e){let t,n,i,l,o,u,d,c;return{c(){t=r("div"),n=r("input"),i=h(),l=r("button"),l.textContent="Write",o=h(),u=r("button"),u.textContent="Read",a(n,"class","grow input"),a(n,"placeholder","Text to write to the clipboard"),a(l,"class","btn"),a(l,"type","button"),a(u,"class","btn"),a(u,"type","button"),a(t,"class","flex gap-1")},m(f,v){m(f,t,v),s(t,n),B(n,e[0]),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[E(n,"input",e[4]),E(l,"click",e[1]),E(u,"click",e[2])],d=!0)},p(f,[v]){v&1&&n.value!==f[0]&&B(n,f[0])},i:V,o:V,d(f){f&&p(t),d=!1,se(c)}}}function Vr(e,t,n){let{onMessage:i}=t,l="clipboard message";function o(){xs(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){eo().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 Gr extends we{constructor(t){super(),ye(this,t,Vr,Br,me,{onMessage:3})}}function Jr(e){let t;return{c(){t=r("div"),t.innerHTML=`
Not available for Linux
`,a(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 Xr(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 ut(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Pi(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class Yr extends we{constructor(t){super(),ye(this,t,Xr,Jr,me,{onMessage:0})}}function $r(e){let t,n,i,l,o,u;return{c(){t=r("div"),n=r("button"),n.textContent="Show",i=h(),l=r("button"),l.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(l,"class","btn"),a(l,"id","hide")},m(d,c){m(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[E(n,"click",e[0]),E(l,"click",e[1])],o=!0)},p:V,i:V,o:V,d(d){d&&p(t),o=!1,se(u)}}}function Kr(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{Fs().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return Ns().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class Qr extends we{constructor(t){super(),ye(this,t,Kr,$r,me,{onMessage:2})}}function us(e,t,n){const i=e.slice();return i[32]=t[n],i}function cs(e,t,n){const i=e.slice();return i[35]=t[n],i}function ds(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b;function A(C,T){return C[3]?xr:Zr}let D=A(e),F=D(e);function W(C,T){return C[2]?ta:ea}let j=W(e),S=j(e);return{c(){t=r("div"),n=r("span"),n.textContent="Tauri API Validation",i=h(),l=r("span"),o=r("span"),F.c(),d=h(),c=r("span"),c.innerHTML='
',f=h(),v=r("span"),S.c(),_=h(),y=r("span"),y.innerHTML='
',a(n,"class","lt-sm:pl-10 text-darkPrimaryText"),a(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),a(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(c,"title","Minimize"),a(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(v,"title",k=e[2]?"Restore":"Maximize"),a(v,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(y,"title","Close"),a(y,"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 "),a(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),a(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),a(t,"data-tauri-drag-region","")},m(C,T){m(C,t,T),s(t,n),s(t,i),s(t,l),s(l,o),F.m(o,null),s(l,d),s(l,c),s(l,f),s(l,v),S.m(v,null),s(l,_),s(l,y),g||(b=[E(o,"click",e[12]),E(c,"click",e[9]),E(v,"click",e[10]),E(y,"click",e[11])],g=!0)},p(C,T){D!==(D=A(C))&&(F.d(1),F=D(C),F&&(F.c(),F.m(o,null))),T[0]&8&&u!==(u=C[3]?"Switch to Light mode":"Switch to Dark mode")&&a(o,"title",u),j!==(j=W(C))&&(S.d(1),S=j(C),S&&(S.c(),S.m(v,null))),T[0]&4&&k!==(k=C[2]?"Restore":"Maximize")&&a(v,"title",k)},d(C){C&&p(t),F.d(),S.d(),g=!1,se(b)}}}function Zr(e){let t;return{c(){t=r("div"),a(t,"class","i-ph-moon")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function xr(e){let t;return{c(){t=r("div"),a(t,"class","i-ph-sun")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ea(e){let t;return{c(){t=r("div"),a(t,"class","i-codicon-chrome-maximize")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ta(e){let t;return{c(){t=r("div"),a(t,"class","i-codicon-chrome-restore")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function na(e){let t;return{c(){t=r("span"),a(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ia(e){let t;return{c(){t=r("span"),a(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function fs(e){let t,n,i,l,o,u,d,c,f;function v(y,g){return y[3]?sa:la}let k=v(e),_=k(e);return{c(){t=r("a"),_.c(),n=h(),i=r("br"),l=h(),o=r("div"),u=h(),d=r("br"),a(t,"href","##"),a(t,"class","nv justify-between h-8"),a(o,"class","bg-white/5 h-2px")},m(y,g){m(y,t,g),_.m(t,null),m(y,n,g),m(y,i,g),m(y,l,g),m(y,o,g),m(y,u,g),m(y,d,g),c||(f=E(t,"click",e[12]),c=!0)},p(y,g){k!==(k=v(y))&&(_.d(1),_=k(y),_&&(_.c(),_.m(t,null)))},d(y){y&&p(t),_.d(),y&&p(n),y&&p(i),y&&p(l),y&&p(o),y&&p(u),y&&p(d),c=!1,f()}}}function la(e){let t,n;return{c(){t=z(`Switch to Dark mode `),n=r("div"),a(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 sa(e){let t,n;return{c(){t=z(`Switch to Light mode `),n=r("div"),a(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 oa(e){let t,n,i,l,o,u=e[35].label+"",d,c,f,v;function k(){return e[20](e[35])}return{c(){t=r("a"),n=r("div"),l=h(),o=r("p"),d=z(u),a(n,"class",i=e[35].icon+" mr-2"),a(t,"href","##"),a(t,"class",c="nv "+(e[1]===e[35]?"nv_selected":""))},m(_,y){m(_,t,y),s(t,n),s(t,l),s(t,o),s(o,d),f||(v=E(t,"click",k),f=!0)},p(_,y){e=_,y[0]&2&&c!==(c="nv "+(e[1]===e[35]?"nv_selected":""))&&a(t,"class",c)},d(_){_&&p(t),f=!1,v()}}}function ps(e){let t,n=e[35]&&oa(e);return{c(){n&&n.c(),t=xn()},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 ms(e){let t,n=e[32].html+"",i;return{c(){t=new ao(!1),i=xn(),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 ra(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j,S,C,T,P,M,N,U,J=e[1].label+"",Q,he,x,ne,Y,_e,O,$,ie,oe,Z,pe,re,be,ee,ke,Ae,R,q=e[5]&&ds(e);function We(H,te){return H[0]?ia:na}let Le=We(e),Me=Le(e),ae=!e[5]&&fs(e),de=e[7],ue=[];for(let H=0;H`,k=h(),_=r("a"),_.innerHTML=`GitHub `,y=h(),g=r("a"),g.innerHTML=`Source `,b=h(),A=r("br"),D=h(),F=r("div"),W=h(),j=r("br"),S=h(),C=r("div");for(let H=0;H',be=h(),ee=r("div");for(let H=0;H{Gt(G,1)}),ti()}Se?(Y=new Se(tt(H)),$n(Y.$$.fragment),ze(Y.$$.fragment,1),Vt(Y,ne,null)):Y=null}if(te[0]&64){fe=H[6];let G;for(G=0;G{await confirm("Are you sure?")||O.preventDefault()}),je.onFileDropEvent(O=>{D(`File drop: ${JSON.stringify(O.payload)}`)});const l=navigator.userAgent.toLowerCase(),o=l.includes("android")||l.includes("iphone"),u=[{label:"Welcome",component:Ro,icon:"i-ph-hand-waving"},{label:"Communication",component:qo,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:No,icon:"i-codicon-terminal"},!o&&{label:"Dialog",component:lr,icon:"i-codicon-multiple-windows"},{label:"File system",component:ar,icon:"i-codicon-files"},{label:"HTTP",component:gr,icon:"i-ph-globe-hemisphere-west"},!o&&{label:"Notifications",component:kr,icon:"i-codicon-bell-dot"},!o&&{label:"App",component:Qr,icon:"i-codicon-hubot"},!o&&{label:"Window",component:Tr,icon:"i-codicon-window"},!o&&{label:"Shortcuts",component:Dr,icon:"i-codicon-record-keys"},{label:"Shell",component:Or,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:Ur,icon:"i-codicon-cloud-download"},!o&&{label:"Clipboard",component:Gr,icon:"i-codicon-clippy"},{label:"WebRTC",component:Yr,icon:"i-ph-broadcast"}];let d=u[0];function c(O){n(1,d=O)}let f;ut(async()=>{const O=Ut();n(2,f=await O.isMaximized()),Xt("tauri://resize",async()=>{n(2,f=await O.isMaximized())})});function v(){Ut().minimize()}async function k(){const O=Ut();await O.isMaximized()?O.unmaximize():O.maximize()}let _=!1;async function y(){_||(_=await Bs("Are you sure that you want to close this window?",{title:"Tauri API"}),_&&Ut().close())}let g;ut(()=>{n(3,g=localStorage&&localStorage.getItem("theme")=="dark"),_s(g)});function b(){n(3,g=!g),_s(g)}let A=ws([]);gs(e,A,O=>n(6,i=O));function D(O){A.update($=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof O=="string"?O:JSON.stringify(O,null,1))+"
"},...$])}function F(O){A.update($=>[{html:`
[${new Date().toLocaleTimeString()}]: `+O+"
"},...$])}function W(){A.update(()=>[])}let j,S,C;function T(O){C=O.clientY;const $=window.getComputedStyle(j);S=parseInt($.height,10);const ie=Z=>{const pe=Z.clientY-C,re=S-pe;n(4,j.style.height=`${re{document.removeEventListener("mouseup",oe),document.removeEventListener("mousemove",ie)};document.addEventListener("mouseup",oe),document.addEventListener("mousemove",ie)}let P;ut(async()=>{n(5,P=await Os()==="win32")});let M=!1,N,U,J=!1,Q=0,he=0;const x=(O,$,ie)=>Math.min(Math.max($,O),ie);ut(()=>{n(18,N=document.querySelector("#sidebar")),U=document.querySelector("#sidebarToggle"),document.addEventListener("click",O=>{U.contains(O.target)?n(0,M=!M):M&&!N.contains(O.target)&&n(0,M=!1)}),document.addEventListener("touchstart",O=>{if(U.contains(O.target))return;const $=O.touches[0].clientX;(0<$&&$<20&&!M||M)&&(J=!0,Q=$)}),document.addEventListener("touchmove",O=>{if(J){const $=O.touches[0].clientX;he=$;const ie=($-Q)/10;N.style.setProperty("--translate-x",`-${x(0,M?0-ie:18.75-ie,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(J){const O=(he-Q)/10;n(0,M=M?O>-(18.75/2):O>18.75/2)}J=!1})});const ne=()=>Oi("https://tauri.app/"),Y=O=>{c(O),n(0,M=!1)};function _e(O){Yn[O?"unshift":"push"](()=>{j=O,n(4,j)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const O=document.querySelector("#sidebar");O&&aa(O,M)}},[M,d,f,g,j,P,i,u,c,v,k,y,b,A,D,F,W,T,N,ne,Y,_e]}class ca extends we{constructor(t){super(),ye(this,t,ua,ra,me,{},null,[-1,-1])}}new ca({target:document.querySelector("#app")});