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

51 lines
89 KiB
JavaScript
Raw Normal View History

const vo=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)}};vo();function V(){}function Ps(e){return e()}function ns(){return Object.create(null)}function oe(e){e.forEach(Ps)}function wo(e){return typeof e=="function"}function pe(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ti;function ko(e,t){return ti||(ti=document.createElement("a")),ti.href=t,e===ti.href}function Mo(e){return Object.keys(e).length===0}function Co(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function Os(e,t,n){e.$$.on_destroy.push(Co(t,n))}function s(e,t){e.appendChild(t)}function h(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function yt(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 To(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function z(e){return document.createTextNode(e)}function m(){return z(" ")}function pi(){return z("")}function S(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function ai(e){return function(t){return t.preventDefault(),e.call(this,t)}}function r(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function se(e){return e===""?null:+e}function Ao(e){return Array.from(e.childNodes)}function Z(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function Ht(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 Vi(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}function ni(e,t,n){e.classList[n?"add":"remove"](t)}class Lo{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=To(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)h(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(p)}}let Zt;function Qt(e){Zt=e}function Rs(){if(!Zt)throw new Error("Function called outside component initialization");return Zt}function _t(e){Rs().$$.on_mount.push(e)}function Xi(e){Rs().$$.on_destroy.push(e)}const Yt=[],ri=[],li=[],is=[],So=Promise.resolve();let Gi=!1;function zo(){Gi||(Gi=!0,So.then(Is))}function Ft(e){li.push(e)}const qi=new Set;let ii=0;function Is(){const e=Zt;do{for(;ii<Yt.length;){const t=Yt[ii];ii++,Qt(t),Eo(t.$$)}for(Qt(null),Yt.length=0,ii=0;ri.length;)ri.pop()();for(let t=0;t<li.length;t+=1){const n=li[t];qi.has(n)||(qi.add(n),n())}li.length=0}while(Yt.length);for(;is.length;)is.pop()();Gi=!1,qi.clear(),Qt(e)}function Eo(e){if(e.fragment!==null){e.update(),oe(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Ft)}}const si=new Set;let bt;function mi(){bt={r:0,c:[],p:bt}}function hi(){bt.r||oe(bt.c),bt=bt.p}function Te(e,t){e&&e.i&&(si.delete(e),e.i(t))}function Ne(e,t,n,i){if(e&&e.o){if(si.has(e))return;si.add(e),bt.c.push(()=>{si.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ui(e){e&&e.c()}function xt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Ft(()=>{const c=o.map(Ps).filter(wo);u?u.push(...c):oe(c),e.$$.on_mount=[]}),d.forEach(Ft)}function $t(e,t){const n=e.$$;n.fragment!==null&&(oe(n.on_destroy),n.f
`),stderr:i.join(`
`)})}),this.spawn().catch(t)})}};async function Ki(e,t){return L({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var Ho={};Me(Ho,{TauriEvent:()=>Bs,emit:()=>_i,listen:()=>tn,once:()=>Vs});async function js(e,t){return L({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Us(e,t,n){await L({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Qi(e,t,n){return L({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:vt(n)}}).then(i=>async()=>js(e,i))}async function qs(e,t,n){return Qi(e,t,i=>{n(i),js(e,i.id).catch(()=>{})})}var Bs=(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))(Bs||{});async function tn(e,t){return Qi(e,null,t)}async function Vs(e,t){return qs(e,null,t)}async function _i(e,t){return Us(e,void 0,t)}var Fo={};Me(Fo,{CloseRequestedEvent:()=>Ks,LogicalPosition:()=>Gs,LogicalSize:()=>di,PhysicalPosition:()=>ot,PhysicalSize:()=>gt,UserAttentionType:()=>Zi,WebviewWindow:()=>wt,WebviewWindowHandle:()=>Xs,WindowManager:()=>Ys,appWindow:()=>Ge,availableMonitors:()=>Uo,currentMonitor:()=>No,getAll:()=>Js,getCurrent:()=>Kt,primaryMonitor:()=>jo});var di=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},gt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new di(this.width/e,this.height/e)}},Gs=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},ot=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Gs(this.x/e,this.y/e)}},Zi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(Zi||{});function Kt(){return new wt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Js(){return window.__TAURI_METADATA__.__windows.map(e=>new wt(e.label,{skip:!0}))}var ls=["tauri://created","tauri://error"],Xs=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)}):Qi(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)}):qs(e,this.label,t)}async emit(e,t){if(ls.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return Us(e,this.label,t)}_handleTauriEvent(e,t){return ls.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Ys=class extends Xs{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 ot(e,t))}async outerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new ot(e,t))}async innerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new gt(e,t))}async outerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new gt(e,t))}async isFullscreen(){return L({__tauriModule:"Window",message:{cmd:"manage",dat
Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),Ge=new wt("main",{skip:!0}));function xi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:Qs(e.position),size:Zs(e.size)}}function Qs(e){return new ot(e.x,e.y)}function Zs(e){return new gt(e.width,e.height)}async function No(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(xi)}async function jo(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(xi)}async function Uo(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(xi))}function qo(){return navigator.appVersion.includes("Win")}var Bo={};Me(Bo,{EOL:()=>Vo,arch:()=>Xo,locale:()=>Ko,platform:()=>xs,tempdir:()=>Yo,type:()=>Jo,version:()=>Go});var Vo=qo()?`\r
`:`
`;async function xs(){return L({__tauriModule:"Os",message:{cmd:"platform"}})}async function Go(){return L({__tauriModule:"Os",message:{cmd:"version"}})}async function Jo(){return L({__tauriModule:"Os",message:{cmd:"osType"}})}async function Xo(){return L({__tauriModule:"Os",message:{cmd:"arch"}})}async function Yo(){return L({__tauriModule:"Os",message:{cmd:"tempdir"}})}async function Ko(){return L({__tauriModule:"Os",message:{cmd:"locale"}})}var Qo={};Me(Qo,{getName:()=>eo,getTauriVersion:()=>to,getVersion:()=>$s,hide:()=>io,show:()=>no});async function $s(){return L({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function eo(){return L({__tauriModule:"App",message:{cmd:"getAppName"}})}async function to(){return L({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function no(){return L({__tauriModule:"App",message:{cmd:"show"}})}async function io(){return L({__tauriModule:"App",message:{cmd:"hide"}})}var Zo={};Me(Zo,{exit:()=>lo,relaunch:()=>$i});async function lo(e=0){return L({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function $i(){return L({__tauriModule:"Process",message:{cmd:"relaunch"}})}function xo(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,A,P,I,O,j,W,C,T,E,M,N;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=m(),i=a("br"),l=m(),o=a("br"),u=m(),d=a("pre"),c=z("App name: "),f=a("code"),g=z(e[2]),k=z(`
App version: `),_=a("code"),v=z(e[0]),y=z(`
Tauri version: `),b=a("code"),A=z(e[1]),P=z(`
`),I=m(),O=a("br"),j=m(),W=a("div"),C=a("button"),C.textContent="Close application",T=m(),E=a("button"),E.textContent="Relaunch application",r(C,"class","btn"),r(E,"class","btn"),r(W,"class","flex flex-wrap gap-1 shadow-")},m(U,J){h(U,t,J),h(U,n,J),h(U,i,J),h(U,l,J),h(U,o,J),h(U,u,J),h(U,d,J),s(d,c),s(d,f),s(f,g),s(d,k),s(d,_),s(_,v),s(d,y),s(d,b),s(b,A),s(d,P),h(U,I,J),h(U,O,J),h(U,j,J),h(U,W,J),s(W,C),s(W,T),s(W,E),M||(N=[S(C,"click",e[3]),S(E,"click",e[4])],M=!0)},p(U,[J]){J&4&&Z(g,U[2]),J&1&&Z(v,U[0]),J&2&&Z(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(I),U&&p(O),U&&p(j),U&&p(W),M=!1,oe(N)}}}function $o(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";eo().then(c=>{n(2,o=c)}),$s().then(c=>{n(0,i=c)}),to().then(c=>{n(1,l=c)});async function u(){await lo()}async function d(){await $i()}return[i,l,o,u,d]}class ea extends ye{constructor(t){super(),ge(this,t,$o,xo,pe,{})}}var ta={};Me(ta,{getMatches:()=>so});async function so(){return L({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}function na(e){let t,n,i,l,o,u,d,c,f,g,k,_,v;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
<code class="code-block flex flex-wrap my-2"><pre> --config &lt;PATH&gt;
--theme &lt;light|dark|system&gt;
--verbose</pre></code>
Additionally, it has a <code>update --background</code> subcommand.`,n=m(),i=a("br"),l=m(),o=a("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=m(),d=a("br"),c=m(),f=a("br"),g=m(),k=a("button"),k.textContent="Get matches",r(o,"class","note"),r(k,"class","btn"),r(k,"id","cli-matches")},m(y,b){h(y,t,b),h(y,n,b),h(y,i,b),h(y,l,b),h(y,o,b),h(y,u,b),h(y,d,b),h(y,c,b),h(y,f,b),h(y,g,b),h(y,k,b),_||(v=S(k,"click",e[0]),_=!0)},p:V,i:V,o:V,d(y){y&&p(t),y&&p(n),y&&p(i),y&&p(l),y&&p(o),y&&p(u),y&&p(d),y&&p(c),y&&p(f),y&&p(g),y&&p(k),_=!1,v()}}}function ia(e,t,n){let{onMessage:i}=t;function l(){so().then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class la extends ye{constructor(t){super(),ge(this,t,ia,na,pe,{onMessage:1})}}function sa(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=m(),l=a("button"),l.textContent="Call Request (async) API",o=m(),u=a("button"),u.textContent="Send event to Rust",r(n,"class","btn"),r(n,"id","log"),r(l,"class","btn"),r(l,"id","request"),r(u,"class","btn"),r(u,"id","event")},m(f,g){h(f,t,g),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[S(n,"click",e[0]),S(l,"click",e[1]),S(u,"click",e[2])],d=!0)},p:V,i:V,o:V,d(f){f&&p(t),d=!1,oe(c)}}}function oa(e,t,n){let{onMessage:i}=t,l;_t(async()=>{l=await tn("rust-event",i)}),Xi(()=>{l&&l()});function o(){ci("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){ci("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){_i("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class aa extends ye{constructor(t){super(),ge(this,t,oa,sa,pe,{onMessage:3})}}var ra={};Me(ra,{ask:()=>ao,confirm:()=>ca,message:()=>ua,open:()=>el,save:()=>oo});async function el(e={}){return typeof e=="object"&&Object.freeze(e),L({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function oo(e={}){return typeof e=="object"&&Object.freeze(e),L({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function ua(e,t){var i,l;let n=typeof t=="string"?{title:t}:t;return L({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()}})}async function ao(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return L({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Yes",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"No"]}})}async function ca(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return L({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Ok",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"Cancel"]}})}var da={};Me(da,{BaseDirectory:()=>en,Dir:()=>en,copyFile:()=>_a,createDir:()=>ma,exists:()=>ya,readBinaryFile:()=>tl,readDir:()=>ro,readTextFile:()=>fa,removeDir:()=>ha,removeFile:()=>ba,renameFile:()=>ga,writeBinaryFile:()=>pa,writeFile:()=>Ji,writeTextFile:()=>Ji});var en=(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.Ap
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 fi(e){return L({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new co(t))}var Bi=null;async function za(e,t){var n;return Bi===null&&(Bi=await fi()),Bi.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function rs(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function us(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,A,P,I=e[5],O=[];for(let T=0;T<I.length;T+=1)O[T]=fs(rs(e,I,T));const j=T=>Ne(O[T],1,1,()=>{O[T]=null});let W=!e[3]&&ps(),C=!e[3]&&e[8]&&ms();return{c(){t=a("span"),n=a("span"),i=z(e[6]),l=m(),o=a("ul");for(let T=0;T<O.length;T+=1)O[T].c();u=m(),d=a("span"),c=z(e[7]),W&&W.c(),f=m(),g=a("span"),k=z(e[6]),_=z(Pa),v=z(e[7]),C&&C.c(),y=pi(),r(n,"class","bracket svelte-gbh3pt"),r(n,"tabindex","0"),r(o,"class","svelte-gbh3pt"),r(d,"class","bracket svelte-gbh3pt"),r(d,"tabindex","0"),r(t,"class","svelte-gbh3pt"),ni(t,"hidden",e[8]),r(g,"class","bracket svelte-gbh3pt"),r(g,"tabindex","0"),ni(g,"hidden",!e[8])},m(T,E){h(T,t,E),s(t,n),s(n,i),s(t,l),s(t,o);for(let M=0;M<O.length;M+=1)O[M].m(o,null);s(t,u),s(t,d),s(d,c),W&&W.m(t,null),h(T,f,E),h(T,g,E),s(g,k),s(g,_),s(g,v),C&&C.m(T,E),h(T,y,E),b=!0,A||(P=[S(n,"click",e[11]),S(d,"click",e[11]),S(g,"click",e[11])],A=!0)},p(T,E){if((!b||E&64)&&Z(i,T[6]),E&1591){I=T[5];let M;for(M=0;M<I.length;M+=1){const N=rs(T,I,M);O[M]?(O[M].p(N,E),Te(O[M],1)):(O[M]=fs(N),O[M].c(),Te(O[M],1),O[M].m(o,null))}for(mi(),M=I.length;M<O.length;M+=1)j(M);hi()}(!b||E&128)&&Z(c,T[7]),T[3]?W&&(W.d(1),W=null):W||(W=ps(),W.c(),W.m(t,null)),E&256&&ni(t,"hidden",T[8]),(!b||E&64)&&Z(k,T[6]),(!b||E&128)&&Z(v,T[7]),E&256&&ni(g,"hidden",!T[8]),!T[3]&&T[8]?C||(C=ms(),C.c(),C.m(y.parentNode,y)):C&&(C.d(1),C=null)},i(T){if(!b){for(let E=0;E<I.length;E+=1)Te(O[E]);b=!0}},o(T){O=O.filter(Boolean);for(let E=0;E<O.length;E+=1)Ne(O[E]);b=!1},d(T){T&&p(t),yt(O,T),W&&W.d(),T&&p(f),T&&p(g),C&&C.d(T),T&&p(y),A=!1,oe(P)}}}function cs(e){let t,n,i=e[12]+"",l,o;return{c(){t=a("span"),n=z('"'),l=z(i),o=z('":'),r(t,"class","key")},m(u,d){h(u,t,d),s(t,n),s(t,l),s(t,o)},p(u,d){d&32&&i!==(i=u[12]+"")&&Z(l,i)},d(u){u&&p(t)}}}function Ea(e){let t,n=e[10](e[0][e[12]])+"",i,l,o=e[14]<e[5].length-1&&ds();return{c(){t=a("span"),i=z(n),o&&o.c(),r(t,"class",l="val "+e[9](e[0][e[12]])+" svelte-gbh3pt")},m(u,d){h(u,t,d),s(t,i),o&&o.m(t,null)},p(u,d){d&33&&n!==(n=u[10](u[0][u[12]])+"")&&Z(i,n),u[14]<u[5].length-1?o||(o=ds(),o.c(),o.m(t,null)):o&&(o.d(1),o=null),d&33&&l!==(l="val "+u[9](u[0][u[12]])+" svelte-gbh3pt")&&r(t,"class",l)},i:V,o:V,d(u){u&&p(t),o&&o.d()}}}function Wa(e){let t,n;return t=new fo({props:{json:e[0][e[12]],depth:e[1],_lvl:e[2]+1,_last:e[14]===e[5].length-1}}),{c(){ui(t.$$.fragment)},m(i,l){xt(t,i,l),n=!0},p(i,l){const o={};l&33&&(o.json=i[0][i[12]]),l&2&&(o.depth=i[1]),l&4&&(o._lvl=i[2]+1),l&32&&(o._last=i[14]===i[5].length-1),t.$set(o)},i(i){n||(Te(t.$$.fragment,i),n=!0)},o(i){Ne(t.$$.fragment,i),n=!1},d(i){$t(t,i)}}}function ds(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function fs(e){let t,n,i,l,o,u,d,c=!e[4]&&cs(e);const f=[Wa,Ea],g=[];function k(_,v){return v&33&&(i=null),i==null&&(i=_[9](_[0][_[12]])==="object"),i?0:1}return l=k(e,-1),o=g[l]=f[l](e),{c(){t=a("li"),c&&c.c(),n=m(),o.c(),u=m()},m(_,v){h(_,t,v),c&&c.m(t,null),s(t,n),g[l].m(t,null),s(t,u),d=!0},p(_,v){_[4]?c&&(c.d(1),c=null):c?c.p(_,v):(c=cs(_),c.c(),c.m(t,n));let y=l;l=k(_,v),l===y?g[l].p(_,v):(mi(),Ne(g[y],1,1,()=>{g[y]=null}),hi(),o=g[l],o?o.p(_,v):(o=g[l]=f[l](_),o.c()),Te(o,1),o.m(t,u))},i(_){d||(Te(o),d=!0)},
Multipart`),te=m(),Y=a("br"),de=m(),x=a("br"),H=m(),X=a("button"),X.textContent="Post it",K=m(),ae=a("br"),ne=m(),he=a("br"),_e=m(),ui(fe.$$.fragment),i.__value="GET",i.value=i.__value,l.__value="POST",l.value=l.__value,o.__value="PUT",o.value=o.__value,u.__value="PATCH",u.value=u.__value,d.__value="DELETE",d.value=d.__value,r(n,"class","input"),r(n,"id","request-method"),e[0]===void 0&&Ft(()=>e[9].call(n)),r(k,"class","input h-auto w-100%"),r(k,"id","request-body"),r(k,"placeholder","Request body"),r(k,"rows","5"),r(b,"class","btn"),r(b,"id","make-request"),r(C,"class","input"),r(E,"class","input"),r(W,"class","flex gap-2 children:grow"),r($,"type","checkbox"),r(X,"class","btn"),r(X,"type","button")},m(D,G){h(D,t,G),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),Ht(n,e[0]),s(t,c),s(t,f),s(t,g),s(t,k),q(k,e[1]),s(t,_),s(t,v),s(t,y),s(t,b),h(D,A,G),h(D,P,G),h(D,I,G),h(D,O,G),h(D,j,G),h(D,W,G),s(W,C),q(C,e[2]),s(W,T),s(W,E),q(E,e[3]),h(D,M,G),h(D,N,G),h(D,U,G),h(D,J,G),s(J,$),$.checked=e[5],s(J,me),h(D,te,G),h(D,Y,G),h(D,de,G),h(D,x,G),h(D,H,G),h(D,X,G),h(D,K,G),h(D,ae,G),h(D,ne,G),h(D,he,G),h(D,_e,G),xt(fe,D,G),re=!0,Ae||(Le=[S(n,"change",e[9]),S(k,"input",e[10]),S(t,"submit",ai(e[6])),S(C,"input",e[11]),S(E,"input",e[12]),S($,"change",e[13]),S(X,"click",e[7])],Ae=!0)},p(D,[G]){G&1&&Ht(n,D[0]),G&2&&q(k,D[1]),G&4&&C.value!==D[2]&&q(C,D[2]),G&8&&E.value!==D[3]&&q(E,D[3]),G&32&&($.checked=D[5]);const Se={};G&16&&(Se.json=D[4]),fe.$set(Se)},i(D){re||(Te(fe.$$.fragment,D),re=!0)},o(D){Ne(fe.$$.fragment,D),re=!1},d(D){D&&p(t),D&&p(A),D&&p(P),D&&p(I),D&&p(O),D&&p(j),D&&p(W),D&&p(M),D&&p(N),D&&p(U),D&&p(J),D&&p(te),D&&p(Y),D&&p(de),D&&p(x),D&&p(H),D&&p(X),D&&p(K),D&&p(ae),D&&p(ne),D&&p(he),D&&p(_e),$t(fe,D),Ae=!1,oe(Le)}}}function Ia(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const P=await fi().catch(j=>{throw o(j),j}),O={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?O.body=at.json(JSON.parse(l)):l!==""&&(O.body=at.text(l)),P.request(O).then(o).catch(o)}let d="baz",c="qux",f=null,g=!0;async function k(){const P=await fi().catch(I=>{throw o(I),I});n(4,f=await P.request({url:"http://localhost:3003",method:"POST",body:at.form({foo:d,bar:c}),headers:g?{"Content-Type":"multipart/form-data"}:void 0,responseType:nl.Text}))}function _(){i=Vi(this),n(0,i)}function v(){l=this.value,n(1,l)}function y(){d=this.value,n(2,d)}function b(){c=this.value,n(3,c)}function A(){g=this.checked,n(5,g)}return e.$$set=P=>{"onMessage"in P&&n(8,o=P.onMessage)},[i,l,d,c,f,g,u,k,o,_,v,y,b,A]}class Ha extends ye{constructor(t){super(),ge(this,t,Ia,Ra,pe,{onMessage:8})}}function Fa(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",r(t,"class","btn"),r(t,"id","notification")},m(l,o){h(l,t,o),n||(i=S(t,"click",Na),n=!0)},p:V,i:V,o:V,d(l){l&&p(t),n=!1,i()}}}function Na(){new Notification("Notification title",{body:"This is the notification body"})}function ja(e,t,n){let{onMessage:i}=t;return e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class Ua extends ye{constructor(t){super(),ge(this,t,ja,Fa,pe,{onMessage:0})}}function hs(e,t,n){const i=e.slice();return i[75]=t[n],i}function _s(e,t,n){const i=e.slice();return i[78]=t[n],i}function bs(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;f<d.length;f+=1)c[f]=gs(_s(e,d,f));return{c(){t=a("span"),t.textContent="Selected window:",n=m(),i=a("select"),l=a("option"),l.textContent="Choose a window...";for(let f=0;f<c.length;f+=1)c[f].c();r(t,"class","font-700 text-sm"),l.__value="",l.value=l.__value,l.disabled=!0,l.selected=!0,r(i,"class","input"),e[0]===void 0&&Ft(()=>e[43].call(i))},m(f,g){h(f,t,g),h(f,n,g),h(f,i,g),s(i,l);for(let k=0;k<c.length;k+=1)c[k].m(i,null);Ht(i,e[0]),o||(u=S(i,"change",e[43]),o=!0)},p(f,g){if(g[0]&2){d=Object.keys(f[1]);let k;for(k=0;k<d.length;k+=1){const _=_s(f,d,k);c[k]?c[k].p(_,g):(c[k]=gs(_),c[k].c(),c[k].m(i,null))}for(;k<c.length;k+=1)c[k].d(1);c.length=d.length}g[0]&3&&Ht(i,f[0])},d(f){f&&p(t),f&&p(n),f&&p(i),yt(c,f),o=!1,u()}}}function gs(e){let t,n=e[78]+""
`),O=a("input"),j=m(),W=a("label"),C=z(`Resizable
`),T=a("input"),E=m(),M=a("label"),N=z(`Maximizable
`),U=a("input"),J=m(),$=a("label"),me=z(`Minimizable
`),te=a("input"),Y=m(),de=a("label"),x=z(`Closable
`),H=a("input"),X=m(),K=a("label"),ae=z(`Has decorations
`),ne=a("input"),he=m(),_e=a("label"),fe=z(`Always on top
`),re=a("input"),Ae=m(),Le=a("label"),D=z(`Content protected
`),G=a("input"),Se=m(),ve=a("label"),ue=z(`Fullscreen
`),we=a("input"),ie=m(),ze=a("br"),Je=m(),le=a("div"),ee=a("div"),F=a("div"),ce=z(`X
`),B=a("input"),He=m(),kt=a("div"),nn=z(`Y
`),De=a("input"),ln=m(),Xe=a("div"),Mt=a("div"),sn=z(`Width
`),Pe=a("input"),on=m(),Ct=a("div"),an=z(`Height
`),Oe=a("input"),rn=m(),Ye=a("div"),Tt=a("div"),un=z(`Min width
`),Fe=a("input"),Q=m(),rt=a("div"),Nt=z(`Min height
`),Re=a("input"),jt=m(),je=a("div"),ut=a("div"),Ut=z(`Max width
`),Ee=a("input"),qt=m(),ct=a("div"),Bt=z(`Max height
`),We=a("input"),At=m(),Lt=a("br"),St=m(),Ce=a("div"),Ue=a("div"),Ie=a("div"),dt=a("div"),dt.textContent="Inner Size",Vt=m(),ft=a("span"),cn=z("Width: "),bi=z(dn),ll=m(),fn=a("span"),sl=z("Height: "),gi=z(pn),ol=m(),Ke=a("div"),mn=a("div"),mn.textContent="Outer Size",al=m(),hn=a("span"),rl=z("Width: "),yi=z(_n),ul=m(),bn=a("span"),cl=z("Height: "),vi=z(gn),dl=m(),zt=a("div"),Qe=a("div"),yn=a("div"),yn.textContent="Inner Logical Size",fl=m(),vn=a("span"),pl=z("Width: "),wi=z(wn),ml=m(),kn=a("span"),hl=z("Height: "),ki=z(Mn),_l=m(),Ze=a("div"),Cn=a("div"),Cn.textContent="Outer Logical Size",bl=m(),Tn=a("span"),gl=z("Width: "),Mi=z(An),yl=m(),Ln=a("span"),vl=z("Height: "),Ci=z(Sn),wl=m(),Et=a("div"),xe=a("div"),zn=a("div"),zn.textContent="Inner Position",kl=m(),En=a("span"),Ml=z("x: "),Ti=z(Wn),Cl=m(),Dn=a("span"),Tl=z("y: "),Ai=z(Pn),Al=m(),$e=a("div"),On=a("div"),On.textContent="Outer Position",Ll=m(),Rn=a("span"),Sl=z("x: "),Li=z(In),zl=m(),Hn=a("span"),El=z("y: "),Si=z(Fn),Wl=m(),Wt=a("div"),et=a("div"),Nn=a("div"),Nn.textContent="Inner Logical Position",Dl=m(),jn=a("span"),Pl=z("x: "),zi=z(Un),Ol=m(),qn=a("span"),Rl=z("y: "),Ei=z(Bn),Il=m(),tt=a("div"),Vn=a("div"),Vn.textContent="Outer Logical Position",Hl=m(),Gn=a("span"),Fl=z("x: "),Wi=z(Jn),Nl=m(),Xn=a("span"),jl=z("y: "),Di=z(Yn),Pi=m(),Oi=a("br"),Ri=m(),Gt=a("h4"),Gt.textContent="Cursor",Ii=m(),qe=a("div"),Kn=a("label"),Dt=a("input"),Ul=z(`
Grab`),ql=m(),Qn=a("label"),Pt=a("input"),Bl=z(`
Visible`),Vl=m(),Zn=a("label"),Ot=a("input"),Gl=z(`
Ignore events`),Hi=m(),Be=a("div"),xn=a("label"),Jl=z(`Icon
`),Ve=a("select");for(let w=0;w<ke.length;w+=1)ke[w].c();Xl=m(),$n=a("label"),Yl=z(`X position
`),nt=a("input"),Kl=m(),ei=a("label"),Ql=z(`Y position
`),it=a("input"),Fi=m(),Ni=a("br"),ji=m(),pt=a("div"),mt=a("form"),lt=a("input"),Zl=m(),Jt=a("button"),Jt.textContent="Set title",xl=m(),ht=a("form"),st=a("input"),$l=m(),Xt=a("button"),Xt.textContent="Open URL",r(l,"class","btn"),r(l,"title","Unminimizes after 2 seconds"),r(u,"class","btn"),r(u,"title","Unminimizes after 2 seconds"),r(c,"class","btn"),r(c,"title","Visible again after 2 seconds"),r(g,"class","btn"),r(_,"class","btn"),r(_,"title","Minimizes the window, requests attention for 3s and then resets it"),r(i,"class","flex flex-wrap gap-2"),r(O,"type","checkbox"),r(T,"type","checkbox"),r(U,"type","checkbox"),r(te,"type","checkbox"),r(H,"type","checkbox"),r(ne,"type","checkbox"),r(re,"type","checkbox"),r(G,"type","checkbox"),r(we,"type","checkbox"),r(A,"class","flex flex-wrap gap-2"),r(B,"class","input"),r(B,"type","number"),r(B,"min","0"),r(De,"class","input"),r(De,"type","number"),r(De,"min","0"),r(ee,"class","flex children:grow flex-col"),r(Pe,"class","input"),r(Pe,"type","number"),r(Pe,"min","400"),r(Oe,"class","input"),r(Oe,"type","number"),r(Oe,"min","400"),r(Xe,"class","flex children:grow flex-col"),r(Fe,"class","input"),r(Fe,"type","number"),r(Re,"class","input"),r(Re,"type","number"),r(Ye,"class","flex children:grow flex-col"),r(Ee,"class","input"),r(Ee,"type","number"),r(Ee,"min","800"),r(We,"class","input"),r(We,"type","number"),r(We,"min","400"),r(je,"class","flex children:grow flex-col"),r(le,"class","flex flex-row gap-2 flex-wrap"),r(dt,"class","text-accent dark:text-darkAccent font-700"),r(Ie,"class","grow"),r(mn,"class","text-accent dark:text-darkAccent font-700"),r(Ke,"class","grow"),r(Ue,"class","flex"),r(yn,"class","text-accent dark:text-darkAccent font-700"),r(Qe,"class","grow"),r(Cn,"class","text-accent dark:text-darkAccent font-700"),r(Ze,"class","grow"),r(zt,"class","flex"),r(zn,"class","text-accent dark:text-darkAccent font-700"),r(xe,"class","grow"),r(On,"class","text-accent dark:text-darkAccent font-700"),r($e,"class","grow"),r(Et,"class","flex"),r(Nn,"class","text-accent dark:text-darkAccent font-700"),r(et,"class","grow"),r(Vn,"class","text-accent dark:text-darkAccent font-700"),r(tt,"class","grow"),r(Wt,"class","flex"),r(Gt,"class","mb-2"),r(Dt,"type","checkbox"),r(Pt,"type","checkbox"),r(Ot,"type","checkbox"),r(qe,"class","flex gap-2"),r(Ve,"class","input"),e[23]===void 0&&Ft(()=>e[65].call(Ve)),r(nt,"class","input"),r(nt,"type","number"),r(it,"class","input"),r(it,"type","number"),r(Be,"class","flex gap-2"),r(lt,"class","input grow"),r(lt,"id","title"),r(Jt,"class","btn"),r(Jt,"type","submit"),r(mt,"class","flex gap-1"),r(st,"class","input grow"),r(st,"id","url"),r(Xt,"class","btn"),r(Xt,"id","open-url"),r(ht,"class","flex gap-1"),r(pt,"class","flex flex-col gap-1")},m(w,R){h(w,t,R),h(w,n,R),h(w,i,R),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,g),s(i,k),s(i,_),h(w,v,R),h(w,y,R),h(w,b,R),h(w,A,R),s(A,P),s(P,I),s(P,O),O.checked=e[6],s(A,j),s(A,W),s(W,C),s(W,T),T.checked=e[2],s(A,E),s(A,M),s(M,N),s(M,U),U.checked=e[3],s(A,J),s(A,$),s($,me),s($,te),te.checked=e[4],s(A,Y),s(A,de),s(de,x),s(de,H),H.checked=e[5],s(A,X),s(A,K),s(K,ae),s(K,ne),ne.checked=e[7],s(A,he),s(A,_e),s(_e,fe),s(_e,re),re.checked=e[8],s(A,Ae),s(A,Le),s(Le,D),s(Le,G),G.checked=e[9],s(A,Se),s(A,ve),s(ve,ue),s(ve,we),we.checked=e[10],h(w,ie,R),h(w,ze,R),h(w,Je,R),h(w,le,R),s(le,ee),s(ee,F),s(F,ce),s(F,B),q(B,e[17]),s(ee,He),s(ee,kt),s(kt,nn),s(kt,De),q(De,e[18]),s(le,ln),s(le,Xe),s(Xe,Mt),s(Mt,sn),s(Mt,Pe),q(Pe,e[11]),s(Xe,on),s(Xe,Ct),s(Ct,an),s(Ct,Oe),q(Oe,e[12]),s(le,rn),s(le,Ye),s(Ye,Tt),s(Tt,un),s(Tt,Fe),q(Fe,e[13]),s(Ye,Q),s(Ye,rt),s(rt,Nt),s(rt,Re),q(Re,e[14]),s(le,jt),s(le,je),s(je,ut),s(ut,Ut),s(ut,Ee),q(Ee,e[15]),s(je,qt),s(je,ct),s(ct,Bt),s(ct,We),q(We,e[16]),h(w,At,R),h(w,Lt,R),h(w,St,R),h(w,Ce,R),s(Ce,Ue),s(Ue,Ie),s(Ie,dt),s(Ie,Vt),s(Ie,ft),s(ft,cn),s(ft,bi),s(Ie,ll),s(Ie,fn),s(fn,sl),s(fn,gi),s(Ue,ol),s(Ue,Ke),s(Ke,mn),s(Ke,al),s(Ke,hn),s(hn,rl),s(hn,yi),s(Ke,ul),s(Ke,bn),s(bn,cl),s(bn,vi),s(Ce,dl),s(Ce,zt),s(zt,Qe),s(Qe,yn),s(Qe,fl),s(Qe,vn),s(vn,pl),s(vn,wi),s(Qe,ml),s(Qe,kn),s(kn,hl),s(kn,ki),
`),l=a("input"),o=m(),u=a("div"),d=z(`Encoding:
`),c=a("input"),f=m(),g=a("div"),k=z(`Working directory:
`),_=a("input"),v=m(),y=a("div"),b=z(`Arguments:
`),A=a("input"),P=m(),I=a("div"),O=a("button"),O.textContent="Run",j=m(),W=a("button"),W.textContent="Kill",C=m(),M&&M.c(),r(l,"class","grow input"),r(n,"class","flex items-center gap-1"),r(c,"class","grow input"),r(u,"class","flex items-center gap-1"),r(_,"class","grow input"),r(_,"placeholder","Working directory"),r(g,"class","flex items-center gap-1"),r(A,"class","grow input"),r(A,"placeholder","Environment variables"),r(y,"class","flex items-center gap-1"),r(O,"class","btn"),r(W,"class","btn"),r(I,"class","flex children:grow gap-1"),r(t,"class","flex flex-col childre:grow gap-1")},m(N,U){h(N,t,U),s(t,n),s(n,i),s(n,l),q(l,e[0]),s(t,o),s(t,u),s(u,d),s(u,c),q(c,e[3]),s(t,f),s(t,g),s(g,k),s(g,_),q(_,e[1]),s(t,v),s(t,y),s(y,b),s(y,A),q(A,e[2]),s(t,P),s(t,I),s(I,O),s(I,j),s(I,W),s(t,C),M&&M.m(t,null),T||(E=[S(l,"input",e[10]),S(c,"input",e[11]),S(_,"input",e[12]),S(A,"input",e[13]),S(O,"click",e[6]),S(W,"click",e[7])],T=!0)},p(N,[U]){U&1&&l.value!==N[0]&&q(l,N[0]),U&8&&c.value!==N[3]&&q(c,N[3]),U&2&&_.value!==N[1]&&q(_,N[1]),U&4&&A.value!==N[2]&&q(A,N[2]),N[5]?M?M.p(N,U):(M=Cs(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,oe(E)}}}function xa(e,t,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",o=i?["/C"]:["-c"],{onMessage:u}=t,d='echo "hello world"',c=null,f="SOMETHING=value ANOTHER=2",g="",k="",_;function v(){return f.split(" ").reduce((C,T)=>{let[E,M]=T.split("=");return{...C,[E]:M}},{})}function y(){n(5,_=null);const C=new Yi(l,[...o,d],{cwd:c||null,env:v(),encoding:g});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 P(){d=this.value,n(0,d)}function I(){g=this.value,n(3,g)}function O(){c=this.value,n(1,c)}function j(){f=this.value,n(2,f)}function W(){k=this.value,n(4,k)}return e.$$set=C=>{"onMessage"in C&&n(9,u=C.onMessage)},[d,c,f,g,k,_,y,b,A,u,P,I,O,j,W]}class $a extends ye{constructor(t){super(),ge(this,t,xa,Za,pe,{onMessage:9})}}var er={};Me(er,{checkUpdate:()=>bo,installUpdate:()=>_o,onUpdaterEvent:()=>il});async function il(e){return tn("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function _o(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error){t(),i(o.error);return}o.status==="DONE"&&(t(),n())}il(l).then(o=>{e=o}).catch(o=>{throw t(),o}),_i("tauri://update-install").catch(o=>{throw t(),o})})}async function bo(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Vs("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),il(o).then(u=>{e=u}).catch(u=>{throw t(),u}),_i("tauri://update").catch(u=>{throw t(),u})})}function tr(e){let t;return{c(){t=a("button"),t.innerHTML='<div class="spinner animate-spin svelte-4xesec"></div>',r(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){h(n,t,i)},p:V,d(n){n&&p(t)}}}function nr(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",r(t,"class","btn")},m(l,o){h(l,t,o),n||(i=S(t,"click",e[4]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function ir(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",r(t,"class","btn")},m(l,o){h(l,t,o),n||(i=S(t,"click",e[3]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function lr(e){let t;function n(o,u){return!o[0]&&!o[2]?ir:!o[1]&&o[2]?nr:tr}let i=n(e),l=i(e);return{c(){t=a("div"),l.c(),r(t,"class","flex children:grow children:h10")},m(o,u){h(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 sr(e,t,n){let{onMessage:i}=t,l;_t(async()=>{l=await tn("tauri://update-status",i)}),X
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`,r(t,"class","flex flex-col gap-2")},m(n,i){h(n,t,i)},p:V,i:V,o:V,d(n){n&&p(t)}}}function fr(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 _t(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Xi(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class pr extends ye{constructor(t){super(),ge(this,t,fr,dr,pe,{onMessage:0})}}function mr(e){let t,n,i,l,o,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=m(),l=a("button"),l.textContent="Hide",r(n,"class","btn"),r(n,"id","show"),r(n,"title","Hides and shows the app after 2 seconds"),r(l,"class","btn"),r(l,"id","hide")},m(d,c){h(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[S(n,"click",e[0]),S(l,"click",e[1])],o=!0)},p:V,i:V,o:V,d(d){d&&p(t),o=!1,oe(u)}}}function hr(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{no().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return io().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class _r extends ye{constructor(t){super(),ge(this,t,hr,mr,pe,{onMessage:2})}}function Ts(e,t,n){const i=e.slice();return i[32]=t[n],i}function As(e,t,n){const i=e.slice();return i[35]=t[n],i}function Ls(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b;function A(C,T){return C[3]?gr:br}let P=A(e),I=P(e);function O(C,T){return C[2]?vr:yr}let j=O(e),W=j(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=m(),l=a("span"),o=a("span"),I.c(),d=m(),c=a("span"),c.innerHTML='<div class="i-codicon-chrome-minimize"></div>',f=m(),g=a("span"),W.c(),_=m(),v=a("span"),v.innerHTML='<div class="i-codicon-chrome-close"></div>',r(n,"class","lt-sm:pl-10 text-darkPrimaryText"),r(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),r(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(c,"title","Minimize"),r(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(g,"title",k=e[2]?"Restore":"Maximize"),r(g,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(v,"title","Close"),r(v,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),r(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),r(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),r(t,"data-tauri-drag-region","")},m(C,T){h(C,t,T),s(t,n),s(t,i),s(t,l),s(l,o),I.m(o,null),s(l,d),s(l,c),s(l,f),s(l,g),W.m(g,null),s(l,_),s(l,v),y||(b=[S(o,"click",e[12]),S(c,"click",e[9]),S(g,"click",e[10]),S(v,"click",e[11])],y=!0)},p(C,T){P!==(P=A(C))&&(I.d(1),I=P(C),I&&(I.c(),I.m(o,null))),T[0]&8&&u!==(u=C[3]?"Switch to Light mode":"Switch to Dark mode")&&r(o,"title",u),j!==(j=O(C))&&(W.d(1),W=j(C),W&&(W.c(),W.m(g,null))),T[0]&4&&k!==(k=C[2]?"Restore":"Maximize")&&r(g,"title",k)},d(C){C&&p(t),I.d(),W.d(),y=!1,oe(b)}}}function br(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-moon")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function gr(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-su
`),n=a("div"),r(n,"class","i-ph-moon")},m(i,l){h(i,t,l),h(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Cr(e){let t,n;return{c(){t=z(`Switch to Light mode
`),n=a("div"),r(n,"class","i-ph-sun")},m(i,l){h(i,t,l),h(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Tr(e){let t,n,i,l,o,u=e[35].label+"",d,c,f,g;function k(){return e[20](e[35])}return{c(){t=a("a"),n=a("div"),l=m(),o=a("p"),d=z(u),r(n,"class",i=e[35].icon+" mr-2"),r(t,"href","##"),r(t,"class",c="nv "+(e[1]===e[35]?"nv_selected":""))},m(_,v){h(_,t,v),s(t,n),s(t,l),s(t,o),s(o,d),f||(g=S(t,"click",k),f=!0)},p(_,v){e=_,v[0]&2&&c!==(c="nv "+(e[1]===e[35]?"nv_selected":""))&&r(t,"class",c)},d(_){_&&p(t),f=!1,g()}}}function zs(e){let t,n=e[35]&&Tr(e);return{c(){n&&n.c(),t=pi()},m(i,l){n&&n.m(i,l),h(i,t,l)},p(i,l){i[35]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function Es(e){let t,n=e[32].html+"",i;return{c(){t=new Lo(!1),i=pi(),t.a=i},m(l,o){t.m(n,l,o),h(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 Ar(e){let t,n,i,l,o,u,d,c,f,g,k,_,v,y,b,A,P,I,O,j,W,C,T,E,M,N,U=e[1].label+"",J,$,me,te,Y,de,x,H,X,K,ae,ne,he,_e,fe,re,Ae,Le,D=e[5]&&Ls(e);function G(F,ce){return F[0]?kr:wr}let Se=G(e),ve=Se(e),ue=!e[5]&&Ss(e),we=e[7],ie=[];for(let F=0;F<we.length;F+=1)ie[F]=zs(As(e,we,F));var ze=e[1].component;function Je(F){return{props:{onMessage:F[14],insecureRenderHtml:F[15]}}}ze&&(Y=new ze(Je(e)));let le=e[6],ee=[];for(let F=0;F<le.length;F+=1)ee[F]=Es(Ts(e,le,F));return{c(){D&&D.c(),t=m(),n=a("div"),ve.c(),i=m(),l=a("div"),o=a("aside"),u=a("img"),c=m(),ue&&ue.c(),f=m(),g=a("a"),g.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,k=m(),_=a("a"),_.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,v=m(),y=a("a"),y.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,b=m(),A=a("br"),P=m(),I=a("div"),O=m(),j=a("br"),W=m(),C=a("div");for(let F=0;F<ie.length;F+=1)ie[F].c();T=m(),E=a("main"),M=a("div"),N=a("h1"),J=z(U),$=m(),me=a("div"),te=a("div"),Y&&ui(Y.$$.fragment),de=m(),x=a("div"),H=a("div"),X=m(),K=a("div"),ae=a("p"),ae.textContent="Console",ne=m(),he=a("div"),he.innerHTML='<div class="i-codicon-clear-all"></div>',_e=m(),fe=a("div");for(let F=0;F<ee.length;F+=1)ee[F].c();r(n,"id","sidebarToggle"),r(n,"class","z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),r(u,"class","self-center p-7 cursor-pointer"),ko(u.src,d="tauri_logo.png")||r(u,"src",d),r(u,"alt","Tauri logo"),r(g,"class","nv justify-between h-8"),r(g,"target","_blank"),r(g,"href","https://tauri.app/v1/guides/"),r(_,"class","nv justify-between h-8"),r(_,"target","_blank"),r(_,"href","https://github.com/tauri-apps/tauri"),r(y,"class","nv justify-between h-8"),r(y,"target","_blank"),r(y,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),r(I,"class","bg-white/5 h-2px"),r(C,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),r(o,"id","sidebar"),r(o,"class","lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"),r(te,"class","mr-2"),r(me,"class","overflow-y-auto"),r(M,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),r(H,"class","bg-black/20 h-2px cursor-ns-resize"),r(ae,"class","font-semibold"),r(he,"class","cursor-pointer h-85% rd-1 p-1 flex justify-center items-center hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25 "),r(K,"class","flex justify-between items-center px-2"),r(fe,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),r(x,"id","console"),r(x,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),r(E,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),r(l,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(F,ce){D&&D.m(F,ce),h(F,t,ce),h(F,n,ce),ve.m(n,null),h(F,i,ce),h(F,l,ce),s(l,o),s(o,u),s(o,c),ue&&ue.m(o,null),s(o,f),s(o,g),s(o,k),s(o,_),s(o,v),s(o,y),s(o,b),s(o,A),s(o,P),s(o,I),s(o,O),s(o,j),s(o,W),s(o,C);for(let B=0;B<ie.length;B+=1)ie[B].m(C,null);s(l,T),s(l,E),s(E,M),s(M,N),s(N,J),s(M,$),s(M,me),s(me,te),Y&&xt(Y,te,null),s(E,de),s(E,x),s(x,H),s(x,X),s(x,K),s(K,ae),s(K,ne),s(K,he),s(x,_e),s(x,fe);for(let B=0;B<ee.length;B+=1)ee[B].m(fe,null);e[21](x),re=!0,Ae||(Le=[S(u,"click",e[19]),S(H,"mousedown",e[17]),S(he,"click",e[16])],Ae=!0)},p(F,ce){if(F[5]?D?D.p(F,ce):(D=Ls(F),D.c(),D.m(t.parentNode,t)):D&&(D.d(1),D=null),Se!==(Se=G(F))&&(ve.d(1),ve=Se(F),ve&&(ve.c(),ve.m(n,null))),F[5]?ue&&(ue.d(1),ue=null):ue?ue.p(F,ce):(ue=Ss(F),ue.c(),ue.m(o,f)),ce[0]&387){we=F[7];let B;for(B=0;B<we.length;B+=1){const He=As(F,we,B);ie[B]?ie[B].p(He,ce):(ie[B]=zs(He),ie[B].c(),ie[B].m(C,null))}for(;B<ie.length;B+=1)ie[B].d(1);ie.length=we.length}if((!re||ce[0]&2)&&U!==(U=F[1].label+"")&&Z(J,U),ze!==(ze=F[1].component)){if(Y){mi();const B=Y;Ne(B.$$.fragment,1,0,()=>{$t(B,1)}),hi()}ze?(Y=new ze(Je(F)),ui(Y.$$.fragment),Te(Y.$$.fragment,1),xt(Y,te,null)):Y=null}if(ce[0]&64){le=F[6];let B;for(B=0;B<le.length;B+=1){const He=Ts(F,le,B);ee[B]?ee[B].p(He,ce):(ee[B]=Es(He),ee[B].c(),ee[B].m(fe,null))}for(;B<ee.length;B+=1)ee[B].d(1);ee.length=le.length}},i(F){re||(Y&&Te(Y.$$.fragment,F),re=!0)},o(F){Y&&Ne(Y.$$.fragment,F),re=!1},d(F){D&&D.d(F),F&&p(t),F&&p(n),ve.d(),F&&p(i),F&&p(l),ue&&ue.d(),yt(ie,F),Y&&$t(Y),yt(ee,F),e[21](null),Ae=!1,oe(Le)}}}let Ws=50;function Ds(e){const t=document.querySelector("html");e?t.classList.add("dark"):t.classList.remove("dark"),localStorage&&localStorage.setItem("theme",e?"dark":"")}function Lr(e,t){e.style.