tauri/examples/api/dist/assets/index.js
2023-04-20 09:19:47 -03:00

40 lines
56 KiB
JavaScript

(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const c of r.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerpolicy&&(r.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?r.credentials="include":s.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();function U(){}function Ul(e){return e()}function gl(){return Object.create(null)}function we(e){e.forEach(Ul)}function os(e){return typeof e=="function"}function Ie(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Ln;function rs(e,t){return Ln||(Ln=document.createElement("a")),Ln.href=t,e===Ln.href}function us(e){return Object.keys(e).length===0}function cs(e,...t){if(e==null)return U;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ds(e,t,n){e.$$.on_destroy.push(cs(t,n))}function l(e,t){e.appendChild(t)}function b(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode.removeChild(e)}function Dn(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 fs(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function k(e){return document.createTextNode(e)}function d(){return k(" ")}function Nl(){return k("")}function A(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function ps(e){return function(t){return t.preventDefault(),e.call(this,t)}}function o(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Q(e){return e===""?null:+e}function ms(e){return Array.from(e.childNodes)}function $(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function G(e,t){e.value=t==null?"":t}function In(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 yl(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}class hs{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=fs(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)b(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(_)}}let Pt;function St(e){Pt=e}function xl(){if(!Pt)throw new Error("Function called outside component initialization");return Pt}function nt(e){xl().$$.on_mount.push(e)}function _i(e){xl().$$.on_destroy.push(e)}const Et=[],di=[],Sn=[],vl=[],_s=Promise.resolve();let fi=!1;function bs(){fi||(fi=!0,_s.then(ql))}function Ot(e){Sn.push(e)}const ci=new Set;let En=0;function ql(){const e=Pt;do{for(;En<Et.length;){const t=Et[En];En++,St(t),gs(t.$$)}for(St(null),Et.length=0,En=0;di.length;)di.pop()();for(let t=0;t<Sn.length;t+=1){const n=Sn[t];ci.has(n)||(ci.add(n),n())}Sn.length=0}while(Et.length);for(;vl.length;)vl.pop()();fi=!1,ci.clear(),St(e)}function gs(e){if(e.fragment!==null){e.update(),we(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Ot)}}const Pn=new Set;let it;function ys(){it={r:0,c:[],p:it}}function vs(){it.r||we(it.c),it=it.p}function pi(e,t){e&&e.i&&(Pn.delete(e),e.i(t))}function wl(e,t,n,i){if(e&&e.o){if(Pn.has(e))return;Pn.add(e),it.c.push(()=>{Pn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function kl(e){e&&e.c()}function mi(e,t,n,i){const{fragment:s,on_mount:r,on_destroy:c,after_update:f}=e.$$;s&&s.m(t,n),i||Ot(()=>{const h=r.map(Ul).filter(os);c?c.push(...h):we(h),e.$$.on_mount=[]}),f.forEach(Ot)}function hi(e,t){const n=e.$$;n.fragment!==null&&(we(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ws(e,t){e.$$.dirty[0]===-1&&(Et.push(e),bs(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function $e(e,t,n,i,s,r,c,f=[-1]){const h=Pt;St(e);const m=e.$$={fragment:null,ctx:null,props:r,update:U,not_equal:s,bound:gl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(h?h.$$.context:[])),callbacks:gl(),dirty:f,skip_bound:!1,root:t.target||h.$$.root};c&&c(m.root);let y=!1;if(m.ctx=n?n(e,t.props||{},(g,C,...M)=>{const p=M.length?M[0]:C;return m.ctx&&s(m.ctx[g],m.ctx[g]=p)&&(!m.skip_bound&&m.bound[g]&&m.bound[g](p),y&&ws(e,g)),C}):[],m.update(),y=!0,we(m.before_update),m.fragment=i?i(m.ctx):!1,t.target){if(t.hydrate){const g=ms(t.target);m.fragment&&m.fragment.l(g),g.forEach(_)}else m.fragment&&m.fragment.c();t.intro&&pi(e.$$.fragment),mi(e,t.target,t.anchor,t.customElement),ql()}St(h)}class Je{$destroy(){hi(this,1),this.$destroy=U}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!us(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const wt=[];function ks(e,t=U){let n;const i=new Set;function s(f){if(Ie(e,f)&&(e=f,n)){const h=!wt.length;for(const m of i)m[1](),wt.push(m,e);if(h){for(let m=0;m<wt.length;m+=2)wt[m][0](wt[m+1]);wt.length=0}}}function r(f){s(f(e))}function c(f,h=U){const m=[f,h];return i.add(m),i.size===1&&(n=t(s)||U),f(e),()=>{i.delete(m),i.size===0&&(n(),n=null)}}return{set:s,update:r,subscribe:c}}var Ms=Object.defineProperty,ot=(e,t)=>{for(var n in t)Ms(e,n,{get:t[n],enumerable:!0})},zs={};ot(zs,{convertFileSrc:()=>Cs,invoke:()=>Dt,transformCallback:()=>Rn});function Ws(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function Rn(e,t=!1){let n=Ws(),i=`_${n}`;return Object.defineProperty(window,i,{value:s=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(s)),writable:!1,configurable:!0}),n}async function Dt(e,t={}){return new Promise((n,i)=>{let s=Rn(c=>{n(c),Reflect.deleteProperty(window,`_${r}`)},!0),r=Rn(c=>{i(c),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:e,callback:s,error:r,...t})})}function Cs(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function z(e){return Dt("tauri",e)}var Ts={};ot(Ts,{TauriEvent:()=>Gl,emit:()=>Un,listen:()=>It,once:()=>Xl});async function Fl(e,t){return z({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function jl(e,t,n){await z({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function bi(e,t,n){return z({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:Rn(n)}}).then(i=>async()=>Fl(e,i))}async function Vl(e,t,n){return bi(e,t,i=>{n(i),Fl(e,i.id).catch(()=>{})})}var Gl=(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))(Gl||{});async function It(e,t){return bi(e,null,t)}async function Xl(e,t){return Vl(e,null,t)}async function Un(e,t){return jl(e,void 0,t)}var As={};ot(As,{CloseRequestedEvent:()=>Kl,LogicalPosition:()=>Yl,LogicalSize:()=>Hn,PhysicalPosition:()=>Be,PhysicalSize:()=>lt,UserAttentionType:()=>gi,WebviewWindow:()=>at,WebviewWindowHandle:()=>$l,WindowManager:()=>Jl,appWindow:()=>st,availableMonitors:()=>Ss,currentMonitor:()=>Ls,getAll:()=>Bl,getCurrent:()=>On,primaryMonitor:()=>Es});var Hn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},lt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Hn(this.width/e,this.height/e)}},Yl=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},Be=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Yl(this.x/e,this.y/e)}},gi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(gi||{});function On(){return new at(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Bl(){return window.__TAURI_METADATA__.__windows.map(e=>new at(e.label,{skip:!0}))}var Ml=["tauri://created","tauri://error"],$l=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)}):bi(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)}):Vl(e,this.label,t)}async emit(e,t){if(Ml.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return jl(e,this.label,t)}_handleTauriEvent(e,t){return Ml.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Jl=class extends $l{async scaleFactor(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new Be(e,t))}async outerPosition(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new Be(e,t))}async innerSize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new lt(e,t))}async outerSize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new lt(e,t))}async isFullscreen(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return z({__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"}),z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return z({__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 z({__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 z({__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 z({__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 z({__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 z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return z({__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 z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return z({__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 z({__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 z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return z({__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 Kl(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",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),n=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),i=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Kl=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}},at=class extends Jl{constructor(e,t={}){super(e),t!=null&&t.skip||z({__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 Bl().some(t=>t.label===e)?new at(e,{skip:!0}):null}},st;"__TAURI_METADATA__"in window?st=new at(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.`),st=new at("main",{skip:!0}));function yi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new Be(e.position.x,e.position.y),size:new lt(e.size.width,e.size.height)}}async function Ls(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(yi)}async function Es(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(yi)}async function Ss(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(yi))}function Ps(){return navigator.appVersion.includes("Win")}var Os={};ot(Os,{EOL:()=>Ds,arch:()=>Hs,platform:()=>Ql,tempdir:()=>Us,type:()=>Rs,version:()=>Is});var Ds=Ps()?`\r
`:`
`;async function Ql(){return z({__tauriModule:"Os",message:{cmd:"platform"}})}async function Is(){return z({__tauriModule:"Os",message:{cmd:"version"}})}async function Rs(){return z({__tauriModule:"Os",message:{cmd:"osType"}})}async function Hs(){return z({__tauriModule:"Os",message:{cmd:"arch"}})}async function Us(){return z({__tauriModule:"Os",message:{cmd:"tempdir"}})}var Ns={};ot(Ns,{getName:()=>es,getTauriVersion:()=>ts,getVersion:()=>Zl,hide:()=>is,show:()=>ns});async function Zl(){return z({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function es(){return z({__tauriModule:"App",message:{cmd:"getAppName"}})}async function ts(){return z({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function ns(){return z({__tauriModule:"App",message:{cmd:"show"}})}async function is(){return z({__tauriModule:"App",message:{cmd:"hide"}})}var xs={};ot(xs,{exit:()=>ls,relaunch:()=>vi});async function ls(e=0){return z({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function vi(){return z({__tauriModule:"Process",message:{cmd:"relaunch"}})}function qs(e){let t,n,i,s,r,c,f,h,m,y,g,C,M,p,T,O,X,H,D,S,P,J,N,j,x,ne;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=d(),i=a("br"),s=d(),r=a("br"),c=d(),f=a("pre"),h=k("App name: "),m=a("code"),y=k(e[2]),g=k(`
App version: `),C=a("code"),M=k(e[0]),p=k(`
Tauri version: `),T=a("code"),O=k(e[1]),X=k(`
`),H=d(),D=a("br"),S=d(),P=a("div"),J=a("button"),J.textContent="Close application",N=d(),j=a("button"),j.textContent="Relaunch application",o(J,"class","btn"),o(j,"class","btn"),o(P,"class","flex flex-wrap gap-1 shadow-")},m(L,I){b(L,t,I),b(L,n,I),b(L,i,I),b(L,s,I),b(L,r,I),b(L,c,I),b(L,f,I),l(f,h),l(f,m),l(m,y),l(f,g),l(f,C),l(C,M),l(f,p),l(f,T),l(T,O),l(f,X),b(L,H,I),b(L,D,I),b(L,S,I),b(L,P,I),l(P,J),l(P,N),l(P,j),x||(ne=[A(J,"click",e[3]),A(j,"click",e[4])],x=!0)},p(L,[I]){I&4&&$(y,L[2]),I&1&&$(M,L[0]),I&2&&$(O,L[1])},i:U,o:U,d(L){L&&_(t),L&&_(n),L&&_(i),L&&_(s),L&&_(r),L&&_(c),L&&_(f),L&&_(H),L&&_(D),L&&_(S),L&&_(P),x=!1,we(ne)}}}function Fs(e,t,n){let i="0.0.0",s="0.0.0",r="Unknown";es().then(h=>{n(2,r=h)}),Zl().then(h=>{n(0,i=h)}),ts().then(h=>{n(1,s=h)});async function c(){await ls()}async function f(){await vi()}return[i,s,r,c,f]}class js extends Je{constructor(t){super(),$e(this,t,Fs,qs,Ie,{})}}function Vs(e){let t,n,i,s,r,c,f,h,m,y,g,C,M;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=d(),i=a("br"),s=d(),r=a("div"),r.textContent="Note that the arguments are only parsed, not implemented.",c=d(),f=a("br"),h=d(),m=a("br"),y=d(),g=a("button"),g.textContent="Get matches",o(r,"class","note"),o(g,"class","btn"),o(g,"id","cli-matches")},m(p,T){b(p,t,T),b(p,n,T),b(p,i,T),b(p,s,T),b(p,r,T),b(p,c,T),b(p,f,T),b(p,h,T),b(p,m,T),b(p,y,T),b(p,g,T),C||(M=A(g,"click",e[0]),C=!0)},p:U,i:U,o:U,d(p){p&&_(t),p&&_(n),p&&_(i),p&&_(s),p&&_(r),p&&_(c),p&&_(f),p&&_(h),p&&_(m),p&&_(y),p&&_(g),C=!1,M()}}}function Gs(e,t,n){let{onMessage:i}=t;function s(){Dt("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=r=>{"onMessage"in r&&n(1,i=r.onMessage)},[s,i]}class Xs extends Je{constructor(t){super(),$e(this,t,Gs,Vs,Ie,{onMessage:1})}}function Ys(e){let t,n,i,s,r,c,f,h;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=d(),s=a("button"),s.textContent="Call Request (async) API",r=d(),c=a("button"),c.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(c,"class","btn"),o(c,"id","event")},m(m,y){b(m,t,y),l(t,n),l(t,i),l(t,s),l(t,r),l(t,c),f||(h=[A(n,"click",e[0]),A(s,"click",e[1]),A(c,"click",e[2])],f=!0)},p:U,i:U,o:U,d(m){m&&_(t),f=!1,we(h)}}}function Bs(e,t,n){let{onMessage:i}=t,s;nt(async()=>{s=await It("rust-event",i)}),_i(()=>{s&&s()});function r(){Dt("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function c(){Dt("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function f(){Un("js-event","this is the payload string")}return e.$$set=h=>{"onMessage"in h&&n(3,i=h.onMessage)},[r,c,f,i]}class $s extends Je{constructor(t){super(),$e(this,t,Bs,Ys,Ie,{onMessage:3})}}function zl(e,t,n){const i=e.slice();return i[65]=t[n],i}function Wl(e,t,n){const i=e.slice();return i[68]=t[n],i}function Cl(e){let t,n,i,s,r,c,f=Object.keys(e[1]),h=[];for(let m=0;m<f.length;m+=1)h[m]=Tl(Wl(e,f,m));return{c(){t=a("span"),t.textContent="Selected window:",n=d(),i=a("select"),s=a("option"),s.textContent="Choose a window...";for(let m=0;m<h.length;m+=1)h[m].c();o(t,"class","font-700 text-sm"),s.__value="",s.value=s.__value,s.disabled=!0,s.selected=!0,o(i,"class","input"),e[0]===void 0&&Ot(()=>e[37].call(i))},m(m,y){b(m,t,y),b(m,n,y),b(m,i,y),l(i,s);for(let g=0;g<h.length;g+=1)h[g].m(i,null);In(i,e[0]),r||(c=A(i,"change",e[37]),r=!0)},p(m,y){if(y[0]&2){f=Object.keys(m[1]);let g;for(g=0;g<f.length;g+=1){const C=Wl(m,f,g);h[g]?h[g].p(C,y):(h[g]=Tl(C),h[g].c(),h[g].m(i,null))}for(;g<h.length;g+=1)h[g].d(1);h.length=f.length}y[0]&3&&In(i,m[0])},d(m){m&&_(t),m&&_(n),m&&_(i),Dn(h,m),r=!1,c()}}}function Tl(e){let t,n=e[68]+"",i,s;return{c(){t=a("option"),i=k(n),t.__value=s=e[68],t.value=t.__value},m(r,c){b(r,t,c),l(t,i)},p(r,c){c[0]&2&&n!==(n=r[68]+"")&&$(i,n),c[0]&2&&s!==(s=r[68])&&(t.__value=s,t.value=t.__value)},d(r){r&&_(t)}}}function Al(e){let t,n,i,s,r,c,f,h,m,y,g,C,M,p,T,O,X,H,D,S,P,J,N,j,x,ne,L,I,ae,ue,te,v,R,q,ie,Te,le,he,Re,be,se,ce,ge,He,de,Z,Ae,Le,K,ee,re,Y,ke,fe,Me,B,W,F,E,pe,rt,Rt,We,Ht,ut,Ut,Ce,V,Ee,Ke,kt,ye,Mt,Qe,zt,ve,ct,dt,ft,_e,Se,ze,Ze,Wt,et,Ct,pt=e[26].width+"",Nn,ki,Nt,Mi,xt=e[26].height+"",xn,zi,Ue,qt,Wi,Ft,Ci,jt=e[27].width+"",qn,Ti,Vt,Ai,Gt=e[27].height+"",Fn,Li,mt,Ne,Xt,Ei,Yt,Si,Bt=e[26].toLogical(e[23]).width+"",jn,Pi,$t,Oi,Jt=e[26].toLogical(e[23]).height+"",Vn,Di,xe,Kt,Ii,Qt,Ri,Zt=e[27].toLogical(e[23]).width+"",Gn,Hi,en,Ui,tn=e[27].toLogical(e[23]).height+"",Xn,Ni,ht,qe,nn,xi,ln,qi,sn=e[24].x+"",Yn,Fi,an,ji,on=e[24].y+"",Bn,Vi,Fe,rn,Gi,un,Xi,cn=e[25].x+"",$n,Yi,dn,Bi,fn=e[25].y+"",Jn,$i,_t,je,pn,Ji,mn,Ki,hn=e[24].toLogical(e[23]).x+"",Kn,Qi,_n,Zi,bn=e[24].toLogical(e[23]).y+"",Qn,el,Ve,gn,tl,yn,nl,vn=e[25].toLogical(e[23]).x+"",Zn,il,wn,ll,kn=e[25].toLogical(e[23]).y+"",ei,ti,ni,ii,Tt,li,Pe,Mn,bt,sl,al,zn,gt,ol,rl,Wn,yt,ul,si,Oe,Cn,cl,De,dl,Tn,fl,Ge,pl,An,ml,Xe,ai,oi,ri,At,tt,Ye,hl,Lt,ui,_l,vt=e[29],me=[];for(let u=0;u<vt.length;u+=1)me[u]=Ll(zl(e,vt,u));return{c(){t=a("br"),n=d(),i=a("div"),s=a("button"),s.textContent="Center",r=d(),c=a("button"),c.textContent="Minimize",f=d(),h=a("button"),h.textContent="Hide",m=d(),y=a("button"),y.textContent="Request attention",g=d(),C=a("br"),M=d(),p=a("div"),T=a("label"),O=k(`Maximized
`),X=a("input"),H=d(),D=a("label"),S=k(`Resizable
`),P=a("input"),J=d(),N=a("label"),j=k(`Has decorations
`),x=a("input"),ne=d(),L=a("label"),I=k(`Always on top
`),ae=a("input"),ue=d(),te=a("label"),v=k(`Content protected
`),R=a("input"),q=d(),ie=a("label"),Te=k(`Fullscreen
`),le=a("input"),he=d(),Re=a("br"),be=d(),se=a("div"),ce=a("div"),ge=a("div"),He=k(`X
`),de=a("input"),Z=d(),Ae=a("div"),Le=k(`Y
`),K=a("input"),ee=d(),re=a("div"),Y=a("div"),ke=k(`Width
`),fe=a("input"),Me=d(),B=a("div"),W=k(`Height
`),F=a("input"),E=d(),pe=a("div"),rt=a("div"),Rt=k(`Min width
`),We=a("input"),Ht=d(),ut=a("div"),Ut=k(`Min height
`),Ce=a("input"),V=d(),Ee=a("div"),Ke=a("div"),kt=k(`Max width
`),ye=a("input"),Mt=d(),Qe=a("div"),zt=k(`Max height
`),ve=a("input"),ct=d(),dt=a("br"),ft=d(),_e=a("div"),Se=a("div"),ze=a("div"),Ze=a("div"),Ze.textContent="Inner Size",Wt=d(),et=a("span"),Ct=k("Width: "),Nn=k(pt),ki=d(),Nt=a("span"),Mi=k("Height: "),xn=k(xt),zi=d(),Ue=a("div"),qt=a("div"),qt.textContent="Outer Size",Wi=d(),Ft=a("span"),Ci=k("Width: "),qn=k(jt),Ti=d(),Vt=a("span"),Ai=k("Height: "),Fn=k(Gt),Li=d(),mt=a("div"),Ne=a("div"),Xt=a("div"),Xt.textContent="Inner Logical Size",Ei=d(),Yt=a("span"),Si=k("Width: "),jn=k(Bt),Pi=d(),$t=a("span"),Oi=k("Height: "),Vn=k(Jt),Di=d(),xe=a("div"),Kt=a("div"),Kt.textContent="Outer Logical Size",Ii=d(),Qt=a("span"),Ri=k("Width: "),Gn=k(Zt),Hi=d(),en=a("span"),Ui=k("Height: "),Xn=k(tn),Ni=d(),ht=a("div"),qe=a("div"),nn=a("div"),nn.textContent="Inner Position",xi=d(),ln=a("span"),qi=k("x: "),Yn=k(sn),Fi=d(),an=a("span"),ji=k("y: "),Bn=k(on),Vi=d(),Fe=a("div"),rn=a("div"),rn.textContent="Outer Position",Gi=d(),un=a("span"),Xi=k("x: "),$n=k(cn),Yi=d(),dn=a("span"),Bi=k("y: "),Jn=k(fn),$i=d(),_t=a("div"),je=a("div"),pn=a("div"),pn.textContent="Inner Logical Position",Ji=d(),mn=a("span"),Ki=k("x: "),Kn=k(hn),Qi=d(),_n=a("span"),Zi=k("y: "),Qn=k(bn),el=d(),Ve=a("div"),gn=a("div"),gn.textContent="Outer Logical Position",tl=d(),yn=a("span"),nl=k("x: "),Zn=k(vn),il=d(),wn=a("span"),ll=k("y: "),ei=k(kn),ti=d(),ni=a("br"),ii=d(),Tt=a("h4"),Tt.textContent="Cursor",li=d(),Pe=a("div"),Mn=a("label"),bt=a("input"),sl=k(`
Grab`),al=d(),zn=a("label"),gt=a("input"),ol=k(`
Visible`),rl=d(),Wn=a("label"),yt=a("input"),ul=k(`
Ignore events`),si=d(),Oe=a("div"),Cn=a("label"),cl=k(`Icon
`),De=a("select");for(let u=0;u<me.length;u+=1)me[u].c();dl=d(),Tn=a("label"),fl=k(`X position
`),Ge=a("input"),pl=d(),An=a("label"),ml=k(`Y position
`),Xe=a("input"),ai=d(),oi=a("br"),ri=d(),At=a("div"),tt=a("form"),Ye=a("input"),hl=d(),Lt=a("button"),Lt.textContent="Set title",o(s,"class","btn"),o(s,"title","Unminimizes after 2 seconds"),o(c,"class","btn"),o(c,"title","Unminimizes after 2 seconds"),o(h,"class","btn"),o(h,"title","Visible again after 2 seconds"),o(y,"class","btn"),o(y,"title","Minimizes the window, requests attention for 3s and then resets it"),o(i,"class","flex flex-wrap gap-2"),o(X,"type","checkbox"),o(P,"type","checkbox"),o(x,"type","checkbox"),o(ae,"type","checkbox"),o(R,"type","checkbox"),o(le,"type","checkbox"),o(p,"class","flex flex-wrap gap-2"),o(de,"class","input"),o(de,"type","number"),o(de,"min","0"),o(K,"class","input"),o(K,"type","number"),o(K,"min","0"),o(ce,"class","flex children:grow flex-col"),o(fe,"class","input"),o(fe,"type","number"),o(fe,"min","400"),o(F,"class","input"),o(F,"type","number"),o(F,"min","400"),o(re,"class","flex children:grow flex-col"),o(We,"class","input"),o(We,"type","number"),o(Ce,"class","input"),o(Ce,"type","number"),o(pe,"class","flex children:grow flex-col"),o(ye,"class","input"),o(ye,"type","number"),o(ye,"min","800"),o(ve,"class","input"),o(ve,"type","number"),o(ve,"min","400"),o(Ee,"class","flex children:grow flex-col"),o(se,"class","flex flex-row gap-2 flex-wrap"),o(Ze,"class","text-accent dark:text-darkAccent font-700"),o(ze,"class","grow"),o(qt,"class","text-accent dark:text-darkAccent font-700"),o(Ue,"class","grow"),o(Se,"class","flex"),o(Xt,"class","text-accent dark:text-darkAccent font-700"),o(Ne,"class","grow"),o(Kt,"class","text-accent dark:text-darkAccent font-700"),o(xe,"class","grow"),o(mt,"class","flex"),o(nn,"class","text-accent dark:text-darkAccent font-700"),o(qe,"class","grow"),o(rn,"class","text-accent dark:text-darkAccent font-700"),o(Fe,"class","grow"),o(ht,"class","flex"),o(pn,"class","text-accent dark:text-darkAccent font-700"),o(je,"class","grow"),o(gn,"class","text-accent dark:text-darkAccent font-700"),o(Ve,"class","grow"),o(_t,"class","flex"),o(Tt,"class","mb-2"),o(bt,"type","checkbox"),o(gt,"type","checkbox"),o(yt,"type","checkbox"),o(Pe,"class","flex gap-2"),o(De,"class","input"),e[20]===void 0&&Ot(()=>e[56].call(De)),o(Ge,"class","input"),o(Ge,"type","number"),o(Xe,"class","input"),o(Xe,"type","number"),o(Oe,"class","flex gap-2"),o(Ye,"class","input grow"),o(Ye,"id","title"),o(Lt,"class","btn"),o(Lt,"type","submit"),o(tt,"class","flex gap-1"),o(At,"class","flex flex-col gap-1")},m(u,w){b(u,t,w),b(u,n,w),b(u,i,w),l(i,s),l(i,r),l(i,c),l(i,f),l(i,h),l(i,m),l(i,y),b(u,g,w),b(u,C,w),b(u,M,w),b(u,p,w),l(p,T),l(T,O),l(T,X),X.checked=e[3],l(p,H),l(p,D),l(D,S),l(D,P),P.checked=e[2],l(p,J),l(p,N),l(N,j),l(N,x),x.checked=e[4],l(p,ne),l(p,L),l(L,I),l(L,ae),ae.checked=e[5],l(p,ue),l(p,te),l(te,v),l(te,R),R.checked=e[6],l(p,q),l(p,ie),l(ie,Te),l(ie,le),le.checked=e[7],b(u,he,w),b(u,Re,w),b(u,be,w),b(u,se,w),l(se,ce),l(ce,ge),l(ge,He),l(ge,de),G(de,e[14]),l(ce,Z),l(ce,Ae),l(Ae,Le),l(Ae,K),G(K,e[15]),l(se,ee),l(se,re),l(re,Y),l(Y,ke),l(Y,fe),G(fe,e[8]),l(re,Me),l(re,B),l(B,W),l(B,F),G(F,e[9]),l(se,E),l(se,pe),l(pe,rt),l(rt,Rt),l(rt,We),G(We,e[10]),l(pe,Ht),l(pe,ut),l(ut,Ut),l(ut,Ce),G(Ce,e[11]),l(se,V),l(se,Ee),l(Ee,Ke),l(Ke,kt),l(Ke,ye),G(ye,e[12]),l(Ee,Mt),l(Ee,Qe),l(Qe,zt),l(Qe,ve),G(ve,e[13]),b(u,ct,w),b(u,dt,w),b(u,ft,w),b(u,_e,w),l(_e,Se),l(Se,ze),l(ze,Ze),l(ze,Wt),l(ze,et),l(et,Ct),l(et,Nn),l(ze,ki),l(ze,Nt),l(Nt,Mi),l(Nt,xn),l(Se,zi),l(Se,Ue),l(Ue,qt),l(Ue,Wi),l(Ue,Ft),l(Ft,Ci),l(Ft,qn),l(Ue,Ti),l(Ue,Vt),l(Vt,Ai),l(Vt,Fn),l(_e,Li),l(_e,mt),l(mt,Ne),l(Ne,Xt),l(Ne,Ei),l(Ne,Yt),l(Yt,Si),l(Yt,jn),l(Ne,Pi),l(Ne,$t),l($t,Oi),l($t,Vn),l(mt,Di),l(mt,xe),l(xe,Kt),l(xe,Ii),l(xe,Qt),l(Qt,Ri),l(Qt,Gn),l(xe,Hi),l(xe,en),l(en,Ui),l(en,Xn),l(_e,Ni),l(_e,ht),l(ht,qe),l(qe,nn),l(qe,xi),l(qe,ln),l(ln,qi),l(ln,Yn),l(qe,Fi),l(qe,an),l(an,ji),l(an,Bn),l(ht,Vi),l(ht,Fe),l(Fe,rn),l(Fe,Gi),l(Fe,un),l(un,Xi),l(un,$n),l(Fe,Yi),l(Fe,dn),l(dn,Bi),l(dn,Jn),l(_e,$i),l(_e,_t),l(_t,je),l(je,pn),l(je,Ji),l(je,mn),l(mn,Ki),l(mn,Kn),l(je,Qi),l(je,_n),l(_n,Zi),l(_n,Qn),l(_t,el),l(_t,Ve),l(Ve,gn),l(Ve,tl),l(Ve,yn),l(yn,nl),l(yn,Zn),l(Ve,il),l(Ve,wn),l(wn,ll),l(wn,ei),b(u,ti,w),b(u,ni,w),b(u,ii,w),b(u,Tt,w),b(u,li,w),b(u,Pe,w),l(Pe,Mn),l(Mn,bt),bt.checked=e[16],l(Mn,sl),l(Pe,al),l(Pe,zn),l(zn,gt),gt.checked=e[17],l(zn,ol),l(Pe,rl),l(Pe,Wn),l(Wn,yt),yt.checked=e[21],l(Wn,ul),b(u,si,w),b(u,Oe,w),l(Oe,Cn),l(Cn,cl),l(Cn,De);for(let oe=0;oe<me.length;oe+=1)me[oe].m(De,null);In(De,e[20]),l(Oe,dl),l(Oe,Tn),l(Tn,fl),l(Tn,Ge),G(Ge,e[18]),l(Oe,pl),l(Oe,An),l(An,ml),l(An,Xe),G(Xe,e[19]),b(u,ai,w),b(u,oi,w),b(u,ri,w),b(u,At,w),l(At,tt),l(tt,Ye),G(Ye,e[28]),l(tt,hl),l(tt,Lt),ui||(_l=[A(s,"click",e[38]),A(c,"click",e[32]),A(h,"click",e[31]),A(y,"click",e[34]),A(X,"change",e[39]),A(P,"change",e[40]),A(x,"change",e[41]),A(ae,"change",e[42]),A(R,"change",e[43]),A(le,"change",e[44]),A(de,"input",e[45]),A(K,"input",e[46]),A(fe,"input",e[47]),A(F,"input",e[48]),A(We,"input",e[49]),A(Ce,"input",e[50]),A(ye,"input",e[51]),A(ve,"input",e[52]),A(bt,"change",e[53]),A(gt,"change",e[54]),A(yt,"change",e[55]),A(De,"change",e[56]),A(Ge,"input",e[57]),A(Xe,"input",e[58]),A(Ye,"input",e[59]),A(tt,"submit",ps(e[30]))],ui=!0)},p(u,w){if(w[0]&8&&(X.checked=u[3]),w[0]&4&&(P.checked=u[2]),w[0]&16&&(x.checked=u[4]),w[0]&32&&(ae.checked=u[5]),w[0]&64&&(R.checked=u[6]),w[0]&128&&(le.checked=u[7]),w[0]&16384&&Q(de.value)!==u[14]&&G(de,u[14]),w[0]&32768&&Q(K.value)!==u[15]&&G(K,u[15]),w[0]&256&&Q(fe.value)!==u[8]&&G(fe,u[8]),w[0]&512&&Q(F.value)!==u[9]&&G(F,u[9]),w[0]&1024&&Q(We.value)!==u[10]&&G(We,u[10]),w[0]&2048&&Q(Ce.value)!==u[11]&&G(Ce,u[11]),w[0]&4096&&Q(ye.value)!==u[12]&&G(ye,u[12]),w[0]&8192&&Q(ve.value)!==u[13]&&G(ve,u[13]),w[0]&67108864&&pt!==(pt=u[26].width+"")&&$(Nn,pt),w[0]&67108864&&xt!==(xt=u[26].height+"")&&$(xn,xt),w[0]&134217728&&jt!==(jt=u[27].width+"")&&$(qn,jt),w[0]&134217728&&Gt!==(Gt=u[27].height+"")&&$(Fn,Gt),w[0]&75497472&&Bt!==(Bt=u[26].toLogical(u[23]).width+"")&&$(jn,Bt),w[0]&75497472&&Jt!==(Jt=u[26].toLogical(u[23]).height+"")&&$(Vn,Jt),w[0]&142606336&&Zt!==(Zt=u[27].toLogical(u[23]).width+"")&&$(Gn,Zt),w[0]&142606336&&tn!==(tn=u[27].toLogical(u[23]).height+"")&&$(Xn,tn),w[0]&16777216&&sn!==(sn=u[24].x+"")&&$(Yn,sn),w[0]&16777216&&on!==(on=u[24].y+"")&&$(Bn,on),w[0]&33554432&&cn!==(cn=u[25].x+"")&&$($n,cn),w[0]&33554432&&fn!==(fn=u[25].y+"")&&$(Jn,fn),w[0]&25165824&&hn!==(hn=u[24].toLogical(u[23]).x+"")&&$(Kn,hn),w[0]&25165824&&bn!==(bn=u[24].toLogical(u[23]).y+"")&&$(Qn,bn),w[0]&41943040&&vn!==(vn=u[25].toLogical(u[23]).x+"")&&$(Zn,vn),w[0]&41943040&&kn!==(kn=u[25].toLogical(u[23]).y+"")&&$(ei,kn),w[0]&65536&&(bt.checked=u[16]),w[0]&131072&&(gt.checked=u[17]),w[0]&2097152&&(yt.checked=u[21]),w[0]&536870912){vt=u[29];let oe;for(oe=0;oe<vt.length;oe+=1){const bl=zl(u,vt,oe);me[oe]?me[oe].p(bl,w):(me[oe]=Ll(bl),me[oe].c(),me[oe].m(De,null))}for(;oe<me.length;oe+=1)me[oe].d(1);me.length=vt.length}w[0]&537919488&&In(De,u[20]),w[0]&262144&&Q(Ge.value)!==u[18]&&G(Ge,u[18]),w[0]&524288&&Q(Xe.value)!==u[19]&&G(Xe,u[19]),w[0]&268435456&&Ye.value!==u[28]&&G(Ye,u[28])},d(u){u&&_(t),u&&_(n),u&&_(i),u&&_(g),u&&_(C),u&&_(M),u&&_(p),u&&_(he),u&&_(Re),u&&_(be),u&&_(se),u&&_(ct),u&&_(dt),u&&_(ft),u&&_(_e),u&&_(ti),u&&_(ni),u&&_(ii),u&&_(Tt),u&&_(li),u&&_(Pe),u&&_(si),u&&_(Oe),Dn(me,u),u&&_(ai),u&&_(oi),u&&_(ri),u&&_(At),ui=!1,we(_l)}}}function Ll(e){let t,n=e[65]+"",i;return{c(){t=a("option"),i=k(n),t.__value=e[65],t.value=t.__value},m(s,r){b(s,t,r),l(t,i)},p:U,d(s){s&&_(t)}}}function Js(e){let t,n,i,s,r,c,f,h,m=Object.keys(e[1]).length>=1,y,g,C,M=m&&Cl(e),p=e[1][e[0]]&&Al(e);return{c(){t=a("div"),n=a("div"),i=a("input"),s=d(),r=a("button"),r.textContent="New window",c=d(),f=a("br"),h=d(),M&&M.c(),y=d(),p&&p.c(),o(i,"class","input grow"),o(i,"type","text"),o(i,"placeholder","New Window label.."),o(r,"class","btn"),o(n,"class","flex gap-1"),o(t,"class","flex flex-col children:grow gap-2")},m(T,O){b(T,t,O),l(t,n),l(n,i),G(i,e[22]),l(n,s),l(n,r),l(t,c),l(t,f),l(t,h),M&&M.m(t,null),l(t,y),p&&p.m(t,null),g||(C=[A(i,"input",e[36]),A(r,"click",e[33])],g=!0)},p(T,O){O[0]&4194304&&i.value!==T[22]&&G(i,T[22]),O[0]&2&&(m=Object.keys(T[1]).length>=1),m?M?M.p(T,O):(M=Cl(T),M.c(),M.m(t,y)):M&&(M.d(1),M=null),T[1][T[0]]?p?p.p(T,O):(p=Al(T),p.c(),p.m(t,null)):p&&(p.d(1),p=null)},i:U,o:U,d(T){T&&_(t),M&&M.d(),p&&p.d(),g=!1,we(C)}}}function Ks(e,t,n){let i=st.label;const s={[st.label]:st},r=["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:c}=t,f,h=!0,m=!1,y=!0,g=!1,C=!0,M=!1,p=null,T=null,O=null,X=null,H=null,D=null,S=null,P=null,J=1,N=new Be(S,P),j=new Be(S,P),x=new lt(p,T),ne=new lt(p,T),L,I,ae=!1,ue=!0,te=null,v=null,R="default",q=!1,ie="Awesome Tauri Example!";function Te(){s[i].setTitle(ie)}function le(){s[i].hide(),setTimeout(s[i].show,2e3)}function he(){s[i].minimize(),setTimeout(s[i].unminimize,2e3)}function Re(){if(!f)return;const V=new at(f);n(1,s[f]=V,s),V.once("tauri://error",function(){c("Error creating new webview")})}function be(){s[i].innerSize().then(V=>{n(26,x=V),n(8,p=x.width),n(9,T=x.height)}),s[i].outerSize().then(V=>{n(27,ne=V)})}function se(){s[i].innerPosition().then(V=>{n(24,N=V)}),s[i].outerPosition().then(V=>{n(25,j=V),n(14,S=j.x),n(15,P=j.y)})}async function ce(V){!V||(L&&L(),I&&I(),I=await V.listen("tauri://move",se),L=await V.listen("tauri://resize",be))}async function ge(){await s[i].minimize(),await s[i].requestUserAttention(gi.Critical),await new Promise(V=>setTimeout(V,3e3)),await s[i].requestUserAttention(null)}function He(){f=this.value,n(22,f)}function de(){i=yl(this),n(0,i),n(1,s)}const Z=()=>s[i].center();function Ae(){m=this.checked,n(3,m)}function Le(){h=this.checked,n(2,h)}function K(){y=this.checked,n(4,y)}function ee(){g=this.checked,n(5,g)}function re(){C=this.checked,n(6,C)}function Y(){M=this.checked,n(7,M)}function ke(){S=Q(this.value),n(14,S)}function fe(){P=Q(this.value),n(15,P)}function Me(){p=Q(this.value),n(8,p)}function B(){T=Q(this.value),n(9,T)}function W(){O=Q(this.value),n(10,O)}function F(){X=Q(this.value),n(11,X)}function E(){H=Q(this.value),n(12,H)}function pe(){D=Q(this.value),n(13,D)}function rt(){ae=this.checked,n(16,ae)}function Rt(){ue=this.checked,n(17,ue)}function We(){q=this.checked,n(21,q)}function Ht(){R=yl(this),n(20,R),n(29,r)}function ut(){te=Q(this.value),n(18,te)}function Ut(){v=Q(this.value),n(19,v)}function Ce(){ie=this.value,n(28,ie)}return e.$$set=V=>{"onMessage"in V&&n(35,c=V.onMessage)},e.$$.update=()=>{var V,Ee,Ke,kt,ye,Mt,Qe,zt,ve,ct,dt,ft,_e,Se,ze,Ze,Wt,et,Ct;e.$$.dirty[0]&3&&(s[i],se(),be()),e.$$.dirty[0]&7&&((V=s[i])==null||V.setResizable(h)),e.$$.dirty[0]&11&&(m?(Ee=s[i])==null||Ee.maximize():(Ke=s[i])==null||Ke.unmaximize()),e.$$.dirty[0]&19&&((kt=s[i])==null||kt.setDecorations(y)),e.$$.dirty[0]&35&&((ye=s[i])==null||ye.setAlwaysOnTop(g)),e.$$.dirty[0]&67&&((Mt=s[i])==null||Mt.setContentProtected(C)),e.$$.dirty[0]&131&&((Qe=s[i])==null||Qe.setFullscreen(M)),e.$$.dirty[0]&771&&p&&T&&((zt=s[i])==null||zt.setSize(new lt(p,T))),e.$$.dirty[0]&3075&&(O&&X?(ve=s[i])==null||ve.setMinSize(new Hn(O,X)):(ct=s[i])==null||ct.setMinSize(null)),e.$$.dirty[0]&12291&&(H>800&&D>400?(dt=s[i])==null||dt.setMaxSize(new Hn(H,D)):(ft=s[i])==null||ft.setMaxSize(null)),e.$$.dirty[0]&49155&&S!==null&&P!==null&&((_e=s[i])==null||_e.setPosition(new Be(S,P))),e.$$.dirty[0]&3&&((Se=s[i])==null||Se.scaleFactor().then(pt=>n(23,J=pt))),e.$$.dirty[0]&3&&ce(s[i]),e.$$.dirty[0]&65539&&((ze=s[i])==null||ze.setCursorGrab(ae)),e.$$.dirty[0]&131075&&((Ze=s[i])==null||Ze.setCursorVisible(ue)),e.$$.dirty[0]&1048579&&((Wt=s[i])==null||Wt.setCursorIcon(R)),e.$$.dirty[0]&786435&&te!==null&&v!==null&&((et=s[i])==null||et.setCursorPosition(new Be(te,v))),e.$$.dirty[0]&2097155&&((Ct=s[i])==null||Ct.setIgnoreCursorEvents(q))},[i,s,h,m,y,g,C,M,p,T,O,X,H,D,S,P,ae,ue,te,v,R,q,f,J,N,j,x,ne,ie,r,Te,le,he,Re,ge,c,He,de,Z,Ae,Le,K,ee,re,Y,ke,fe,Me,B,W,F,E,pe,rt,Rt,We,Ht,ut,Ut,Ce]}class Qs extends Je{constructor(t){super(),$e(this,t,Ks,Js,Ie,{onMessage:35},null,[-1,-1,-1])}}var Zs={};ot(Zs,{checkUpdate:()=>as,installUpdate:()=>ss,onUpdaterEvent:()=>wi});async function wi(e){return It("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function ss(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(r){if(r.error){t(),i(r.error);return}r.status==="DONE"&&(t(),n())}wi(s).then(r=>{e=r}).catch(r=>{throw t(),r}),Un("tauri://update-install").catch(r=>{throw t(),r})})}async function as(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(c){t(),n({manifest:c,shouldUpdate:!0})}function r(c){if(c.error){t(),i(c.error);return}c.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Xl("tauri://update-available",c=>{s(c==null?void 0:c.payload)}).catch(c=>{throw t(),c}),wi(r).then(c=>{e=c}).catch(c=>{throw t(),c}),Un("tauri://update").catch(c=>{throw t(),c})})}function ea(e){let t;return{c(){t=a("button"),t.innerHTML='<div class="spinner animate-spin svelte-4xesec"></div>',o(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){b(n,t,i)},p:U,d(n){n&&_(t)}}}function ta(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",o(t,"class","btn")},m(s,r){b(s,t,r),n||(i=A(t,"click",e[4]),n=!0)},p:U,d(s){s&&_(t),n=!1,i()}}}function na(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",o(t,"class","btn")},m(s,r){b(s,t,r),n||(i=A(t,"click",e[3]),n=!0)},p:U,d(s){s&&_(t),n=!1,i()}}}function ia(e){let t;function n(r,c){return!r[0]&&!r[2]?na:!r[1]&&r[2]?ta:ea}let i=n(e),s=i(e);return{c(){t=a("div"),s.c(),o(t,"class","flex children:grow children:h10")},m(r,c){b(r,t,c),s.m(t,null)},p(r,[c]){i===(i=n(r))&&s?s.p(r,c):(s.d(1),s=i(r),s&&(s.c(),s.m(t,null)))},i:U,o:U,d(r){r&&_(t),s.d()}}}function la(e,t,n){let{onMessage:i}=t,s;nt(async()=>{s=await It("tauri://update-status",i)}),_i(()=>{s&&s()});let r,c,f;async function h(){n(0,r=!0);try{const{shouldUpdate:y,manifest:g}=await as();i(`Should update: ${y}`),i(g),n(2,f=y)}catch(y){i(y)}finally{n(0,r=!1)}}async function m(){n(1,c=!0);try{await ss(),i("Installation complete, restart required."),await vi()}catch(y){i(y)}finally{n(1,c=!1)}}return e.$$set=y=>{"onMessage"in y&&n(5,i=y.onMessage)},[r,c,f,h,m,i]}class sa extends Je{constructor(t){super(),$e(this,t,la,ia,Ie,{onMessage:5})}}function aa(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>`,o(t,"class","flex flex-col gap-2")},m(n,i){b(n,t,i)},p:U,i:U,o:U,d(n){n&&_(t)}}}function oa(e,t,n){let{onMessage:i}=t;const s=window.constraints={audio:!0,video:!0};function r(f){const h=document.querySelector("video"),m=f.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${m[0].label}`),window.stream=f,h.srcObject=f}function c(f){if(f.name==="ConstraintNotSatisfiedError"){const h=s.video;i(`The resolution ${h.width.exact}x${h.height.exact} px is not supported by your device.`)}else f.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: ${f.name}`,f)}return nt(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(s);r(f)}catch(f){c(f)}}),_i(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),e.$$set=f=>{"onMessage"in f&&n(0,i=f.onMessage)},[i]}class ra extends Je{constructor(t){super(),$e(this,t,oa,aa,Ie,{onMessage:0})}}function ua(e){let t,n,i,s,r,c;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=d(),s=a("button"),s.textContent="Hide",o(n,"class","btn"),o(n,"id","show"),o(n,"title","Hides and shows the app after 2 seconds"),o(s,"class","btn"),o(s,"id","hide")},m(f,h){b(f,t,h),l(t,n),l(t,i),l(t,s),r||(c=[A(n,"click",e[0]),A(s,"click",e[1])],r=!0)},p:U,i:U,o:U,d(f){f&&_(t),r=!1,we(c)}}}function ca(e,t,n){let{onMessage:i}=t;function s(){r().then(()=>{setTimeout(()=>{ns().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return is().then(()=>i("Hide app")).catch(i)}return e.$$set=c=>{"onMessage"in c&&n(2,i=c.onMessage)},[s,r,i]}class da extends Je{constructor(t){super(),$e(this,t,ca,ua,Ie,{onMessage:2})}}function El(e,t,n){const i=e.slice();return i[29]=t[n],i}function Sl(e,t,n){const i=e.slice();return i[32]=t[n],i}function Pl(e){let t,n,i,s,r,c,f,h,m,y,g,C,M;function p(S,P){return S[3]?pa:fa}let T=p(e),O=T(e);function X(S,P){return S[2]?ha:ma}let H=X(e),D=H(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=d(),s=a("span"),r=a("span"),O.c(),f=d(),h=a("span"),h.innerHTML='<div class="i-codicon-chrome-minimize"></div>',m=d(),y=a("span"),D.c(),o(n,"class","lt-sm:pl-10 text-darkPrimaryText"),o(r,"title",c=e[3]?"Switch to Light mode":"Switch to Dark mode"),o(r,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(h,"title","Minimize"),o(h,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(y,"title",g=e[2]?"Restore":"Maximize"),o(y,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(s,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),o(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),o(t,"data-tauri-drag-region","")},m(S,P){b(S,t,P),l(t,n),l(t,i),l(t,s),l(s,r),O.m(r,null),l(s,f),l(s,h),l(s,m),l(s,y),D.m(y,null),C||(M=[A(r,"click",e[11]),A(h,"click",e[9]),A(y,"click",e[10])],C=!0)},p(S,P){T!==(T=p(S))&&(O.d(1),O=T(S),O&&(O.c(),O.m(r,null))),P[0]&8&&c!==(c=S[3]?"Switch to Light mode":"Switch to Dark mode")&&o(r,"title",c),H!==(H=X(S))&&(D.d(1),D=H(S),D&&(D.c(),D.m(y,null))),P[0]&4&&g!==(g=S[2]?"Restore":"Maximize")&&o(y,"title",g)},d(S){S&&_(t),O.d(),D.d(),C=!1,we(M)}}}function fa(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-moon")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function pa(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-sun")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function ma(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-maximize")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function ha(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-restore")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function _a(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function ba(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Ol(e){let t,n,i,s,r,c,f,h,m;function y(M,p){return M[3]?ya:ga}let g=y(e),C=g(e);return{c(){t=a("a"),C.c(),n=d(),i=a("br"),s=d(),r=a("div"),c=d(),f=a("br"),o(t,"href","##"),o(t,"class","nv justify-between h-8"),o(r,"class","bg-white/5 h-2px")},m(M,p){b(M,t,p),C.m(t,null),b(M,n,p),b(M,i,p),b(M,s,p),b(M,r,p),b(M,c,p),b(M,f,p),h||(m=A(t,"click",e[11]),h=!0)},p(M,p){g!==(g=y(M))&&(C.d(1),C=g(M),C&&(C.c(),C.m(t,null)))},d(M){M&&_(t),C.d(),M&&_(n),M&&_(i),M&&_(s),M&&_(r),M&&_(c),M&&_(f),h=!1,m()}}}function ga(e){let t,n;return{c(){t=k(`Switch to Dark mode
`),n=a("div"),o(n,"class","i-ph-moon")},m(i,s){b(i,t,s),b(i,n,s)},d(i){i&&_(t),i&&_(n)}}}function ya(e){let t,n;return{c(){t=k(`Switch to Light mode
`),n=a("div"),o(n,"class","i-ph-sun")},m(i,s){b(i,t,s),b(i,n,s)},d(i){i&&_(t),i&&_(n)}}}function va(e){let t,n,i,s,r=e[32].label+"",c,f,h,m;function y(){return e[18](e[32])}return{c(){t=a("a"),n=a("div"),i=d(),s=a("p"),c=k(r),o(n,"class",e[32].icon+" mr-2"),o(t,"href","##"),o(t,"class",f="nv "+(e[1]===e[32]?"nv_selected":""))},m(g,C){b(g,t,C),l(t,n),l(t,i),l(t,s),l(s,c),h||(m=A(t,"click",y),h=!0)},p(g,C){e=g,C[0]&2&&f!==(f="nv "+(e[1]===e[32]?"nv_selected":""))&&o(t,"class",f)},d(g){g&&_(t),h=!1,m()}}}function Dl(e){let t,n=e[32]&&va(e);return{c(){n&&n.c(),t=Nl()},m(i,s){n&&n.m(i,s),b(i,t,s)},p(i,s){i[32]&&n.p(i,s)},d(i){n&&n.d(i),i&&_(t)}}}function Il(e){let t,n=e[29].html+"",i;return{c(){t=new hs(!1),i=Nl(),t.a=i},m(s,r){t.m(n,s,r),b(s,i,r)},p(s,r){r[0]&64&&n!==(n=s[29].html+"")&&t.p(n)},d(s){s&&_(i),s&&t.d()}}}function wa(e){let t,n,i,s,r,c,f,h,m,y,g,C,M,p,T,O,X,H,D,S,P,J,N,j,x,ne,L=e[1].label+"",I,ae,ue,te,v,R,q,ie,Te,le,he,Re,be,se,ce,ge,He,de,Z=e[5]&&Pl(e);function Ae(W,F){return W[0]?ba:_a}let Le=Ae(e),K=Le(e),ee=!e[5]&&Ol(e),re=e[7],Y=[];for(let W=0;W<re.length;W+=1)Y[W]=Dl(Sl(e,re,W));var ke=e[1].component;function fe(W){return{props:{onMessage:W[13],insecureRenderHtml:W[14]}}}ke&&(v=new ke(fe(e)));let Me=e[6],B=[];for(let W=0;W<Me.length;W+=1)B[W]=Il(El(e,Me,W));return{c(){Z&&Z.c(),t=d(),n=a("div"),K.c(),i=d(),s=a("div"),r=a("aside"),c=a("img"),h=d(),ee&&ee.c(),m=d(),y=a("a"),y.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,g=d(),C=a("a"),C.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,M=d(),p=a("a"),p.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,T=d(),O=a("br"),X=d(),H=a("div"),D=d(),S=a("br"),P=d(),J=a("div");for(let W=0;W<Y.length;W+=1)Y[W].c();N=d(),j=a("main"),x=a("div"),ne=a("h1"),I=k(L),ae=d(),ue=a("div"),te=a("div"),v&&kl(v.$$.fragment),R=d(),q=a("div"),ie=a("div"),Te=d(),le=a("div"),he=a("p"),he.textContent="Console",Re=d(),be=a("div"),be.innerHTML='<div class="i-codicon-clear-all"></div>',se=d(),ce=a("div");for(let W=0;W<B.length;W+=1)B[W].c();o(n,"id","sidebarToggle"),o(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"),o(c,"class","self-center p-7 cursor-pointer"),rs(c.src,f="tauri_logo.png")||o(c,"src",f),o(c,"alt","Tauri logo"),o(y,"class","nv justify-between h-8"),o(y,"target","_blank"),o(y,"href","https://tauri.app/v1/guides/"),o(C,"class","nv justify-between h-8"),o(C,"target","_blank"),o(C,"href","https://github.com/tauri-apps/tauri"),o(p,"class","nv justify-between h-8"),o(p,"target","_blank"),o(p,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),o(H,"class","bg-white/5 h-2px"),o(J,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),o(r,"id","sidebar"),o(r,"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"),o(te,"class","mr-2"),o(ue,"class","overflow-y-auto"),o(x,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),o(ie,"class","bg-black/20 h-2px cursor-ns-resize"),o(he,"class","font-semibold"),o(be,"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 "),o(le,"class","flex justify-between items-center px-2"),o(ce,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),o(q,"id","console"),o(q,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),o(j,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),o(s,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(W,F){Z&&Z.m(W,F),b(W,t,F),b(W,n,F),K.m(n,null),b(W,i,F),b(W,s,F),l(s,r),l(r,c),l(r,h),ee&&ee.m(r,null),l(r,m),l(r,y),l(r,g),l(r,C),l(r,M),l(r,p),l(r,T),l(r,O),l(r,X),l(r,H),l(r,D),l(r,S),l(r,P),l(r,J);for(let E=0;E<Y.length;E+=1)Y[E].m(J,null);l(s,N),l(s,j),l(j,x),l(x,ne),l(ne,I),l(x,ae),l(x,ue),l(ue,te),v&&mi(v,te,null),l(j,R),l(j,q),l(q,ie),l(q,Te),l(q,le),l(le,he),l(le,Re),l(le,be),l(q,se),l(q,ce);for(let E=0;E<B.length;E+=1)B[E].m(ce,null);e[19](q),ge=!0,He||(de=[A(ie,"mousedown",e[16]),A(be,"click",e[15])],He=!0)},p(W,F){if(W[5]?Z?Z.p(W,F):(Z=Pl(W),Z.c(),Z.m(t.parentNode,t)):Z&&(Z.d(1),Z=null),Le!==(Le=Ae(W))&&(K.d(1),K=Le(W),K&&(K.c(),K.m(n,null))),W[5]?ee&&(ee.d(1),ee=null):ee?ee.p(W,F):(ee=Ol(W),ee.c(),ee.m(r,m)),F[0]&387){re=W[7];let E;for(E=0;E<re.length;E+=1){const pe=Sl(W,re,E);Y[E]?Y[E].p(pe,F):(Y[E]=Dl(pe),Y[E].c(),Y[E].m(J,null))}for(;E<Y.length;E+=1)Y[E].d(1);Y.length=re.length}if((!ge||F[0]&2)&&L!==(L=W[1].label+"")&&$(I,L),ke!==(ke=W[1].component)){if(v){ys();const E=v;wl(E.$$.fragment,1,0,()=>{hi(E,1)}),vs()}ke?(v=new ke(fe(W)),kl(v.$$.fragment),pi(v.$$.fragment,1),mi(v,te,null)):v=null}if(F[0]&64){Me=W[6];let E;for(E=0;E<Me.length;E+=1){const pe=El(W,Me,E);B[E]?B[E].p(pe,F):(B[E]=Il(pe),B[E].c(),B[E].m(ce,null))}for(;E<B.length;E+=1)B[E].d(1);B.length=Me.length}},i(W){ge||(v&&pi(v.$$.fragment,W),ge=!0)},o(W){v&&wl(v.$$.fragment,W),ge=!1},d(W){Z&&Z.d(W),W&&_(t),W&&_(n),K.d(),W&&_(i),W&&_(s),ee&&ee.d(),Dn(Y,W),v&&hi(v),Dn(B,W),e[19](null),He=!1,we(de)}}}let Rl=50;function Hl(e){const t=document.querySelector("html");e?t.classList.add("dark"):t.classList.remove("dark"),localStorage&&localStorage.setItem("theme",e?"dark":"")}function ka(e,t){e.style.setProperty("--translate-x",`${t?"0":"-18.75"}rem`)}function Ma(e,t,n){let i;st.onFileDropEvent(v=>{T(`File drop: ${JSON.stringify(v.payload)}`)});const s=navigator.userAgent.toLowerCase(),r=s.includes("android")||s.includes("iphone"),c=[{label:"Welcome",component:js,icon:"i-ph-hand-waving"},{label:"Communication",component:$s,icon:"i-codicon-radio-tower"},!r&&{label:"CLI",component:Xs,icon:"i-codicon-terminal"},!r&&{label:"App",component:da,icon:"i-codicon-hubot"},!r&&{label:"Window",component:Qs,icon:"i-codicon-window"},!r&&{label:"Updater",component:sa,icon:"i-codicon-cloud-download"},{label:"WebRTC",component:ra,icon:"i-ph-broadcast"}];let f=c[0];function h(v){n(1,f=v)}let m;nt(async()=>{const v=On();n(2,m=await v.isMaximized()),It("tauri://resize",async()=>{n(2,m=await v.isMaximized())})});function y(){On().minimize()}async function g(){const v=On();await v.isMaximized()?v.unmaximize():v.maximize()}let C;nt(()=>{n(3,C=localStorage&&localStorage.getItem("theme")=="dark"),Hl(C)});function M(){n(3,C=!C),Hl(C)}let p=ks([]);ds(e,p,v=>n(6,i=v));function T(v){p.update(R=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+(typeof v=="string"?v:JSON.stringify(v,null,1))+"</pre>"},...R])}function O(v){p.update(R=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+v+"</pre>"},...R])}function X(){p.update(()=>[])}let H,D,S;function P(v){S=v.clientY;const R=window.getComputedStyle(H);D=parseInt(R.height,10);const q=Te=>{const le=Te.clientY-S,he=D-le;n(4,H.style.height=`${he<Rl?Rl:he}px`,H)},ie=()=>{document.removeEventListener("mouseup",ie),document.removeEventListener("mousemove",q)};document.addEventListener("mouseup",ie),document.addEventListener("mousemove",q)}let J;nt(async()=>{n(5,J=await Ql()==="win32")});let N=!1,j,x,ne=!1,L=0,I=0;const ae=(v,R,q)=>Math.min(Math.max(R,v),q);nt(()=>{n(17,j=document.querySelector("#sidebar")),x=document.querySelector("#sidebarToggle"),document.addEventListener("click",v=>{x.contains(v.target)?n(0,N=!N):N&&!j.contains(v.target)&&n(0,N=!1)}),document.addEventListener("touchstart",v=>{if(x.contains(v.target))return;const R=v.touches[0].clientX;(0<R&&R<20&&!N||N)&&(ne=!0,L=R)}),document.addEventListener("touchmove",v=>{if(ne){const R=v.touches[0].clientX;I=R;const q=(R-L)/10;j.style.setProperty("--translate-x",`-${ae(0,N?0-q:18.75-q,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(ne){const v=(I-L)/10;n(0,N=N?v>-(18.75/2):v>18.75/2)}ne=!1})});const ue=v=>{h(v),n(0,N=!1)};function te(v){di[v?"unshift":"push"](()=>{H=v,n(4,H)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const v=document.querySelector("#sidebar");v&&ka(v,N)}},[N,f,m,C,H,J,i,c,h,y,g,M,p,T,O,X,P,j,ue,te]}class za extends Je{constructor(t){super(),$e(this,t,Ma,wa,Ie,{},null,[-1,-1])}}new za({target:document.querySelector("#app")});