tauri/examples/api/dist/assets/index.js

40 lines
56 KiB
JavaScript
Raw Normal View History

(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=[])
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"),
`),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,y
<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
`),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`