var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function i(t){t.forEach(e)}function o(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function u(e,n,i){e.$$.on_destroy.push(function(e,...n){if(null==e)return t;const i=e.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}(n,i))}function s(t,e){t.appendChild(e)}function a(t,e,n){t.insertBefore(e,n||null)}function c(t){t.parentNode.removeChild(t)}function l(t,e){for(let n=0;nt.removeEventListener(e,n,i)}function g(t){return function(e){return e.preventDefault(),t.call(this,e)}}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t){return""===t?null:+t}function y(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function b(t,e){t.value=null==e?"":e}function w(t,e,n,i){t.style.setProperty(e,n,i?"important":"")}function _(t,e){for(let n=0;n{I.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}}function K(t){t&&t.c()}function H(t,n,r,u){const{fragment:s,on_mount:a,on_destroy:c,after_update:l}=t.$$;s&&s.m(n,r),u||W((()=>{const n=a.map(e).filter(o);c?c.push(...n):i(n),t.$$.on_mount=[]})),l.forEach(W)}function B(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function G(t,e){-1===t.$$.dirty[0]&&(S.push(t),A||(A=!0,L.then(F)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const o=i.length?i[0]:n;return h.ctx&&s(h.ctx[t],h.ctx[t]=o)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](o),f&&G(e,t)),n})):[],h.update(),f=!0,i(h.before_update),h.fragment=!!u&&u(h.ctx),o.target){if(o.hydrate){const t=function(t){return Array.from(t.childNodes)}(o.target);h.fragment&&h.fragment.l(t),t.forEach(c)}else h.fragment&&h.fragment.c();o.intro&&N(e.$$.fragment),H(e,o.target,o.anchor,o.customElement),F()}C(d)}class J{$destroy(){B(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const X=[];function Y(e,n=t){let i;const o=[];function u(t){if(r(e,t)&&(e=t,i)){const t=!X.length;for(let t=0;t{const t=o.indexOf(a);-1!==t&&o.splice(t,1),0===o.length&&(i(),i=null)}}}} /*! * hotkeys-js v3.8.5 * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. * * Copyright (c) 2021 kenny wong * http://jaywcjlove.github.io/hotkeys * * Licensed under the MIT license. */var Q="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function Z(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on".concat(e),(function(){n(window.event)}))}function tt(t,e){for(var n=e.slice(0,e.length-1),i=0;i=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}for(var nt={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Q?173:189,"=":Q?61:187,";":Q?59:186,"'":222,"[":219,"]":221,"\\":220},it={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},ot={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},rt={16:!1,18:!1,17:!1,91:!1},ut={},st=1;st<20;st++)nt["f".concat(st)]=111+st;var at=[],ct="all",lt=[],dt=function(t){return nt[t.toLowerCase()]||it[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function ht(t){ct=t||"all"}function ft(){return ct||"all"}var pt=function(t){var e=t.key,n=t.scope,i=t.method,o=t.splitKey,r=void 0===o?"+":o;et(e).forEach((function(t){var e=t.split(r),o=e.length,u=e[o-1],s="*"===u?"*":dt(u);if(ut[s]){n||(n=ft());var a=o>1?tt(it,e):[];ut[s]=ut[s].map((function(t){return(!i||t.method===i)&&t.scope===n&&function(t,e){for(var n=t.length>=e.length?t:e,i=t.length>=e.length?e:t,o=!0,r=0;r0,rt)Object.prototype.hasOwnProperty.call(rt,o)&&(!rt[o]&&e.mods.indexOf(+o)>-1||rt[o]&&-1===e.mods.indexOf(+o))&&(i=!1);(0!==e.mods.length||rt[16]||rt[18]||rt[17]||rt[91])&&!i&&"*"!==e.shortcut||!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function mt(t){var e=ut["*"],n=t.keyCode||t.which||t.charCode;if(vt.filter.call(this,t)){if(93!==n&&224!==n||(n=91),-1===at.indexOf(n)&&229!==n&&at.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach((function(e){var n=ot[e];t[e]&&-1===at.indexOf(n)?at.push(n):!t[e]&&at.indexOf(n)>-1?at.splice(at.indexOf(n),1):"metaKey"===e&&t[e]&&3===at.length&&(t.ctrlKey||t.shiftKey||t.altKey||(at=at.slice(at.indexOf(n))))})),n in rt){for(var i in rt[n]=!0,it)it[i]===n&&(vt[i]=!0);if(!e)return}for(var o in rt)Object.prototype.hasOwnProperty.call(rt,o)&&(rt[o]=t[ot[o]]);t.getModifierState&&(!t.altKey||t.ctrlKey)&&t.getModifierState("AltGraph")&&(-1===at.indexOf(17)&&at.push(17),-1===at.indexOf(18)&&at.push(18),rt[17]=!0,rt[18]=!0);var r=ft();if(e)for(var u=0;u1&&(o=tt(it,t)),(t="*"===(t=t[t.length-1])?"*":dt(t))in ut||(ut[t]=[]),ut[t].push({keyup:a,keydown:c,scope:r,mods:o,shortcut:i[s],method:n,key:i[s],splitKey:l});void 0!==u&&!function(t){return lt.indexOf(t)>-1}(u)&&window&&(lt.push(u),Z(u,"keydown",(function(t){mt(t)})),Z(window,"focus",(function(){at=[]})),Z(u,"keyup",(function(t){mt(t),function(t){var e=t.keyCode||t.which||t.charCode,n=at.indexOf(e);if(n>=0&&at.splice(n,1),t.key&&"meta"===t.key.toLowerCase()&&at.splice(0,at.length),93!==e&&224!==e||(e=91),e in rt)for(var i in rt[e]=!1,it)it[i]===e&&(vt[i]=!1)}(t)})))}var yt={setScope:ht,getScope:ft,deleteScope:function(t,e){var n,i;for(var o in t||(t=ft()),ut)if(Object.prototype.hasOwnProperty.call(ut,o))for(n=ut[o],i=0;i1?e-1:0),i=1;i0&&o[o.length-1])||6!==r[0]&&2!==r[0])){u=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]{n(2,r=t)})),Dt().then((t=>{n(0,i=t)})),Rt().then((t=>{n(1,o=t)})),[i,o,r,async function(){await It()},async function(){await Ut()}]}Object.freeze({__proto__:null,Command:Wt,Child:At,open:jt}),Object.freeze({__proto__:null,getName:Ft,getVersion:Dt,getTauriVersion:Rt}),Object.freeze({__proto__:null,exit:It,relaunch:Ut});class Kt extends J{constructor(t){super(),V(this,t,qt,Nt,r,{})}}function Ht(){return kt(this,void 0,void 0,(function(){return Ct(this,(function(t){return[2,St({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]}))}))}function Bt(e){let n,i,o,r,u,l,g,v,y,b,w;return{c(){n=d("div"),i=h("This binary can be run on the terminal and takes the following arguments:\n "),o=d("ul"),o.innerHTML="
  • --config PATH
  • \n
  • --theme light|dark|system
  • \n
  • --verbose
  • ",r=h("\n Additionally, it has a "),u=d("i"),u.textContent="update --background",l=h(" subcommand.\n Note that the arguments are only parsed, not implemented.\n "),g=d("br"),v=f(),y=d("button"),y.textContent="Get matches",m(y,"class","button"),m(y,"id","cli-matches")},m(t,c){a(t,n,c),s(n,i),s(n,o),s(n,r),s(n,u),s(n,l),s(n,g),s(n,v),s(n,y),b||(w=p(y,"click",e[0]),b=!0)},p:t,i:t,o:t,d(t){t&&c(n),b=!1,w()}}}function Gt(t,e,n){let{onMessage:i}=e;return t.$$set=t=>{"onMessage"in t&&n(1,i=t.onMessage)},[function(){Ht().then(i).catch(i)},i]}Object.freeze({__proto__:null,getMatches:Ht});class Vt extends J{constructor(t){super(),V(this,t,Gt,Bt,r,{onMessage:1})}}function Jt(t,e,n){return kt(this,void 0,void 0,(function(){return Ct(this,(function(i){switch(i.label){case 0:return[4,St({__tauriModule:"Event",message:{cmd:"emit",event:t,windowLabel:e,payload:n}})];case 1:return i.sent(),[2]}}))}))}function Xt(t){return kt(this,void 0,void 0,(function(){return Ct(this,(function(e){return[2,St({__tauriModule:"Event",message:{cmd:"unlisten",eventId:t}})]}))}))}function Yt(t,e){return kt(this,void 0,void 0,(function(){var n=this;return Ct(this,(function(i){return[2,St({__tauriModule:"Event",message:{cmd:"listen",event:t,handler:$t(e)}}).then((function(t){return function(){return kt(n,void 0,void 0,(function(){return Ct(this,(function(e){return[2,Xt(t)]}))}))}}))]}))}))}function Qt(t,e){return kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,Yt(t,(function(t){e(t),Xt(t.id).catch((function(){}))}))]}))}))}function Zt(t,e){return kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,Jt(t,void 0,e)]}))}))}function te(e){let n,o,r,u,l,h,g,v;return{c(){n=d("div"),o=d("button"),o.textContent="Call Log API",r=f(),u=d("button"),u.textContent="Call Request (async) API",l=f(),h=d("button"),h.textContent="Send event to Rust",m(o,"class","button"),m(o,"id","log"),m(u,"class","button"),m(u,"id","request"),m(h,"class","button"),m(h,"id","event")},m(t,i){a(t,n,i),s(n,o),s(n,r),s(n,u),s(n,l),s(n,h),g||(v=[p(o,"click",e[0]),p(u,"click",e[1]),p(h,"click",e[2])],g=!0)},p:t,i:t,o:t,d(t){t&&c(n),g=!1,i(v)}}}function ee(t,e,n){let i,{onMessage:o}=e;return T((async()=>{i=await Yt("rust-event",o)})),O((()=>{i&&i()})),t.$$set=t=>{"onMessage"in t&&n(3,o=t.onMessage)},[function(){Tt("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})},function(){Tt("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(o).catch(o)},function(){Zt("js-event","this is the payload string")},o]}Object.freeze({__proto__:null,listen:Yt,once:Qt,emit:Zt});class ne extends J{constructor(t){super(),V(this,t,ee,te,r,{onMessage:3})}}function ie(t){return void 0===t&&(t={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(e){return"object"==typeof t&&Object.freeze(t),[2,St({__tauriModule:"Dialog",message:{cmd:"openDialog",options:t}})]}))}))}function oe(t){return void 0===t&&(t={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(e){return"object"==typeof t&&Object.freeze(t),[2,St({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:t}})]}))}))}function re(t,e){return void 0===e&&(e={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,St({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:t,options:e}})]}))}))}function ue(t){var e=function(t){if(t.length<65536)return String.fromCharCode.apply(null,Array.from(t));for(var e="",n=t.length,i=0;i{"onMessage"in t&&n(6,i=t.onMessage)},[o,r,u,s,function(){ie({defaultPath:o,filters:r?[{name:"Tauri Example",extensions:r.split(",").map((t=>t.trim()))}]:[],multiple:u,directory:s}).then((function(t){if(Array.isArray(t))i(t);else{var e=t,n=e.match(/\S+\.\S+$/g);re(e).then((function(o){var r,u,s,a;n&&(e.includes(".png")||e.includes(".jpg"))?(r=new Uint8Array(o),u=function(t){i('')},s=new Blob([r],{type:"application/octet-binary"}),(a=new FileReader).onload=function(t){var e=t.target.result;u(e.substr(e.indexOf(",")+1))},a.readAsDataURL(s)):i(t)})).catch(i(t))}})).catch(i)},function(){oe({defaultPath:o,filters:r?[{name:"Tauri Example",extensions:r.split(",").map((t=>t.trim()))}]:[]}).then(i).catch(i)},i,function(){o=this.value,n(0,o)},function(){r=this.value,n(1,r)},function(){u=this.checked,n(2,u)},function(){s=this.checked,n(3,s)}]}Object.freeze({__proto__:null,open:ie,save:oe,message:function(t){return kt(this,void 0,void 0,(function(){return Ct(this,(function(e){return[2,St({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:t}})]}))}))},ask:function(t,e){return kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,St({__tauriModule:"Dialog",message:{cmd:"askDialog",title:e,message:t}})]}))}))},confirm:function(t,e){return kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,St({__tauriModule:"Dialog",message:{cmd:"confirmDialog",title:e,message:t}})]}))}))}}),function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Desktop=6]="Desktop",t[t.Document=7]="Document",t[t.Download=8]="Download",t[t.Executable=9]="Executable",t[t.Font=10]="Font",t[t.Home=11]="Home",t[t.Picture=12]="Picture",t[t.Public=13]="Public",t[t.Runtime=14]="Runtime",t[t.Template=15]="Template",t[t.Video=16]="Video",t[t.Resource=17]="Resource",t[t.App=18]="App",t[t.Current=19]="Current"}(zt||(zt={})),Object.freeze({__proto__:null,get BaseDirectory(){return zt},get Dir(){return zt},readTextFile:function(t,e){return void 0===e&&(e={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,St({__tauriModule:"Fs",message:{cmd:"readTextFile",path:t,options:e}})]}))}))},readBinaryFile:re,writeFile:function(t,e){return void 0===e&&(e={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return"object"==typeof e&&Object.freeze(e),"object"==typeof t&&Object.freeze(t),[2,St({__tauriModule:"Fs",message:{cmd:"writeFile",path:t.path,contents:t.contents,options:e}})]}))}))},writeBinaryFile:function(t,e){return void 0===e&&(e={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return"object"==typeof e&&Object.freeze(e),"object"==typeof t&&Object.freeze(t),[2,St({__tauriModule:"Fs",message:{cmd:"writeBinaryFile",path:t.path,contents:ue(t.contents),options:e}})]}))}))},readDir:se,createDir:function(t,e){return void 0===e&&(e={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,St({__tauriModule:"Fs",message:{cmd:"createDir",path:t,options:e}})]}))}))},removeDir:function(t,e){return void 0===e&&(e={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,St({__tauriModule:"Fs",message:{cmd:"removeDir",path:t,options:e}})]}))}))},copyFile:function(t,e,n){return void 0===n&&(n={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(i){return[2,St({__tauriModule:"Fs",message:{cmd:"copyFile",source:t,destination:e,options:n}})]}))}))},removeFile:function(t,e){return void 0===e&&(e={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,St({__tauriModule:"Fs",message:{cmd:"removeFile",path:t,options:e}})]}))}))},renameFile:function(t,e,n){return void 0===n&&(n={}),kt(this,void 0,void 0,(function(){return Ct(this,(function(i){return[2,St({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:t,newPath:e,options:n}})]}))}))}});class le extends J{constructor(t){var e;super(),document.getElementById("svelte-1eg58yg-style")||((e=d("style")).id="svelte-1eg58yg-style",e.textContent="#dialog-filter.svelte-1eg58yg{width:260px}",s(document.head,e)),V(this,t,ce,ae,r,{onMessage:6})}}function de(t,e,n){const i=t.slice();return i[8]=e[n],i}function he(e){let n,i,o=e[8][0]+"";return{c(){n=d("option"),i=h(o),n.__value=e[8][1],n.value=n.__value},m(t,e){a(t,n,e),s(n,i)},p:t,d(t){t&&c(n)}}}function fe(e){let n,o,r,u,h,v,y,w,_,x,M,k,C,$=e[2],T=[];for(let t=0;t<$.length;t+=1)T[t]=he(de(e,$,t));return{c(){n=d("form"),o=d("select"),r=d("option"),r.textContent="None";for(let t=0;tisNaN(parseInt(t)))).map((t=>[t,zt[t]]));return t.$$set=t=>{"onMessage"in t&&n(5,o=t.onMessage)},[r,i,u,function(){const t=r.match(/\S+\.\S+$/g),e={dir:pe()};(t?re(r,e):se(r,e)).then((function(e){if(t)if(r.includes(".png")||r.includes(".jpg"))!function(t,e){const n=new Blob([t],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(t){const n=t.target.result;e(n.substr(n.indexOf(",")+1))},i.readAsDataURL(n)}(new Uint8Array(e),(function(t){o('')}));else{const t=String.fromCharCode.apply(null,e);o(''),setTimeout((()=>{const e=document.getElementById("file-response");e.value=t,document.getElementById("file-save").addEventListener("click",(function(){writeFile({file:r,contents:e.value},{dir:pe()}).catch(o)}))}))}else o(e)})).catch(o)},function(){n(1,i.src=Ot(r),i)},o,function(){r=this.value,n(0,r)},function(t){P[t?"unshift":"push"]((()=>{i=t,n(1,i)}))}]}class me extends J{constructor(t){super(),V(this,t,ge,fe,r,{onMessage:5})}}!function(t){t[t.JSON=1]="JSON",t[t.Text=2]="Text",t[t.Binary=3]="Binary"}(Et||(Et={}));var ve=function(){function t(t,e){this.type=t,this.payload=e}return t.form=function(e){return new t("Form",e)},t.json=function(e){return new t("Json",e)},t.text=function(e){return new t("Text",e)},t.bytes=function(e){return new t("Bytes",e)},t}(),ye=function(t){this.url=t.url,this.status=t.status,this.ok=this.status>=200&&this.status<300,this.headers=t.headers,this.data=t.data},be=function(){function t(t){this.id=t}return t.prototype.drop=function(){return kt(this,void 0,void 0,(function(){return Ct(this,(function(t){return[2,St({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})]}))}))},t.prototype.request=function(t){return kt(this,void 0,void 0,(function(){var e;return Ct(this,(function(n){return(e=!t.responseType||t.responseType===Et.JSON)&&(t.responseType=Et.Text),[2,St({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:t}}).then((function(t){var n=new ye(t);if(e){try{n.data=JSON.parse(n.data)}catch(t){if(n.ok)throw Error("Failed to parse response `"+n.data+"` as JSON: "+t+";\n try setting the `responseType` option to `ResponseType.Text` or `ResponseType.Binary` if the API does not return a JSON response.")}return n}return n}))]}))}))},t.prototype.get=function(t,e){return kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,this.request(Mt({method:"GET",url:t},e))]}))}))},t.prototype.post=function(t,e,n){return kt(this,void 0,void 0,(function(){return Ct(this,(function(i){return[2,this.request(Mt({method:"POST",url:t,body:e},n))]}))}))},t.prototype.put=function(t,e,n){return kt(this,void 0,void 0,(function(){return Ct(this,(function(i){return[2,this.request(Mt({method:"PUT",url:t,body:e},n))]}))}))},t.prototype.patch=function(t,e){return kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,this.request(Mt({method:"PATCH",url:t},e))]}))}))},t.prototype.delete=function(t,e){return kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,this.request(Mt({method:"DELETE",url:t},e))]}))}))},t}();function we(t){return kt(this,void 0,void 0,(function(){return Ct(this,(function(e){return[2,St({__tauriModule:"Http",message:{cmd:"createClient",options:t}}).then((function(t){return new be(t)}))]}))}))}var _e=null;function xe(e){let n,o,r,u,l,h,v,y,x,M,k,C,$,T,O,S,P;return{c(){n=d("form"),o=d("select"),r=d("option"),r.textContent="GET",u=d("option"),u.textContent="POST",l=d("option"),l.textContent="PUT",h=d("option"),h.textContent="PATCH",v=d("option"),v.textContent="DELETE",y=f(),x=d("input"),M=f(),k=d("br"),C=f(),$=d("textarea"),T=f(),O=d("button"),O.textContent="Make request",r.__value="GET",r.value=r.__value,u.__value="POST",u.value=u.__value,l.__value="PUT",l.value=l.__value,h.__value="PATCH",h.value=h.__value,v.__value="DELETE",v.value=v.__value,m(o,"class","button"),m(o,"id","request-method"),void 0===e[0]&&W((()=>e[5].call(o))),m(x,"id","request-url"),m(x,"placeholder","Type the request URL..."),m($,"id","request-body"),m($,"placeholder","Request body"),m($,"rows","5"),w($,"width","100%"),w($,"margin-right","10px"),w($,"font-size","12px"),m(O,"class","button"),m(O,"id","make-request")},m(t,i){a(t,n,i),s(n,o),s(o,r),s(o,u),s(o,l),s(o,h),s(o,v),_(o,e[0]),s(n,y),s(n,x),b(x,e[1]),s(n,M),s(n,k),s(n,C),s(n,$),b($,e[2]),s(n,T),s(n,O),S||(P=[p(o,"change",e[5]),p(x,"input",e[6]),p($,"input",e[7]),p(n,"submit",g(e[3]))],S=!0)},p(t,[e]){1&e&&_(o,t[0]),2&e&&x.value!==t[1]&&b(x,t[1]),4&e&&b($,t[2])},i:t,o:t,d(t){t&&c(n),S=!1,i(P)}}}function Me(t,e,n){let i="GET",o="https://jsonplaceholder.typicode.com/todos/1",r="",{onMessage:u}=e;return t.$$set=t=>{"onMessage"in t&&n(4,u=t.onMessage)},[i,o,r,async function(){const t=await we(),e={url:o||""||"",method:i||"GET"||"GET"};r.startsWith("{")&&r.endsWith("}")||r.startsWith("[")&&r.endsWith("]")?e.body=ve.json(JSON.parse(r)):""!==r&&(e.body=ve.text(r)),t.request(e).then(u).catch(u)},u,function(){i=x(this),n(0,i)},function(){o=this.value,n(1,o)},function(){r=this.value,n(2,r)}]}Object.freeze({__proto__:null,getClient:we,fetch:function(t,e){var n;return kt(this,void 0,void 0,(function(){return Ct(this,(function(i){switch(i.label){case 0:return null!==_e?[3,2]:[4,we()];case 1:_e=i.sent(),i.label=2;case 2:return[2,_e.request(Mt({url:t,method:null!==(n=null==e?void 0:e.method)&&void 0!==n?n:"GET"},e))]}}))}))},Body:ve,Client:be,Response:ye,get ResponseType(){return Et}});class ke extends J{constructor(t){super(),V(this,t,Me,xe,r,{onMessage:4})}}function Ce(e){let n,i,o;return{c(){n=d("button"),n.textContent="Send test notification",m(n,"class","button"),m(n,"id","notification")},m(t,r){a(t,n,r),i||(o=p(n,"click",e[0]),i=!0)},p:t,i:t,o:t,d(t){t&&c(n),i=!1,o()}}}function $e(){new Notification("Notification title",{body:"This is the notification body"})}function Te(t,e,n){let{onMessage:i}=e;return t.$$set=t=>{"onMessage"in t&&n(1,i=t.onMessage)},[function(){"default"===Notification.permission?Notification.requestPermission().then((function(t){"granted"===t?$e():i("Permission is "+t)})).catch(i):"granted"===Notification.permission?$e():i("Permission is denied")},i]}class Oe extends J{constructor(t){super(),V(this,t,Te,Ce,r,{onMessage:1})}}var Se,Pe=function(t,e){this.type="Logical",this.width=t,this.height=e},ze=function(){function t(t,e){this.type="Physical",this.width=t,this.height=e}return t.prototype.toLogical=function(t){return new Pe(this.width/t,this.height/t)},t}(),Ee=function(t,e){this.type="Logical",this.x=t,this.y=e},Le=function(){function t(t,e){this.type="Physical",this.x=t,this.y=e}return t.prototype.toLogical=function(t){return new Ee(this.x/t,this.y/t)},t}();function Ae(){return window.__TAURI__.__windows.map((function(t){return new Fe(t.label,{skip:!0})}))}!function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"}(Se||(Se={}));var We=["tauri://created","tauri://error"],je=function(){function t(t){try{this.label=null!=t?t:window.__TAURI__.__currentWindow.label}catch(t){this.label=""}this.listeners=Object.create(null)}return t.prototype.listen=function(t,e){return kt(this,void 0,void 0,(function(){var n=this;return Ct(this,(function(i){return this._handleTauriEvent(t,e)?[2,Promise.resolve((function(){var i=n.listeners[t];i.splice(i.indexOf(e),1)}))]:[2,Yt(t,e)]}))}))},t.prototype.once=function(t,e){return kt(this,void 0,void 0,(function(){var n=this;return Ct(this,(function(i){return this._handleTauriEvent(t,e)?[2,Promise.resolve((function(){var i=n.listeners[t];i.splice(i.indexOf(e),1)}))]:[2,Qt(t,e)]}))}))},t.prototype.emit=function(t,e){return kt(this,void 0,void 0,(function(){var n,i;return Ct(this,(function(o){if(We.includes(t)){for(n=0,i=this.listeners[t]||[];ne[31].call(o))),m(M,"type","checkbox"),m(T,"type","checkbox"),m(P,"title","Unminimizes after 2 seconds"),m(E,"title","Unminimizes after 2 seconds"),m(A,"title","Visible again after 2 seconds"),m(F,"type","checkbox"),m(N,"type","checkbox"),m(B,"type","checkbox"),m(X,"type","checkbox"),m(ut,"type","number"),m(ut,"min","0"),m(ut,"class","svelte-12ggtr4"),m(lt,"type","number"),m(lt,"min","0"),m(lt,"class","svelte-12ggtr4"),m(it,"class","flex col grow svelte-12ggtr4"),m(gt,"type","number"),m(gt,"min","400"),m(gt,"class","svelte-12ggtr4"),m(bt,"type","number"),m(bt,"min","400"),m(bt,"class","svelte-12ggtr4"),m(ht,"class","flex col grow svelte-12ggtr4"),m(kt,"type","number"),m(kt,"class","svelte-12ggtr4"),m(Ot,"type","number"),m(Ot,"class","svelte-12ggtr4"),m(_t,"class","flex col grow svelte-12ggtr4"),m(Lt,"type","number"),m(Lt,"min","400"),m(Lt,"class","svelte-12ggtr4"),m(Dt,"type","number"),m(Dt,"min","400"),m(Dt,"class","svelte-12ggtr4"),m(Pt,"class","flex col grow svelte-12ggtr4"),m(nt,"class","window-controls flex flex-row svelte-12ggtr4"),m(n,"class","flex col"),m(Kt,"class","svelte-12ggtr4"),m(Vt,"class","svelte-12ggtr4"),m(Ut,"class","grow window-property svelte-12ggtr4"),m(ee,"class","svelte-12ggtr4"),m(re,"class","svelte-12ggtr4"),m(Qt,"class","grow window-property svelte-12ggtr4"),m(It,"class","flex"),m(fe,"class","svelte-12ggtr4"),m(ve,"class","svelte-12ggtr4"),m(le,"class","grow window-property svelte-12ggtr4"),m(ke,"class","svelte-12ggtr4"),m(Oe,"class","svelte-12ggtr4"),m(_e,"class","grow window-property svelte-12ggtr4"),m(ce,"class","flex"),m(je,"class","svelte-12ggtr4"),m(Ne,"class","svelte-12ggtr4"),m(Le,"class","grow window-property svelte-12ggtr4"),m(Je,"class","svelte-12ggtr4"),m(Ze,"class","svelte-12ggtr4"),m(Be,"class","grow window-property svelte-12ggtr4"),m(Ee,"class","flex"),m(an,"class","svelte-12ggtr4"),m(hn,"class","svelte-12ggtr4"),m(rn,"class","grow window-property svelte-12ggtr4"),m(bn,"class","svelte-12ggtr4"),m(Mn,"class","svelte-12ggtr4"),m(mn,"class","grow window-property svelte-12ggtr4"),m(on,"class","flex"),m(On,"id","title"),m(Pn,"class","button"),m(Pn,"type","submit"),w(Tn,"margin-top","24px"),m(Ln,"id","url"),m(Wn,"class","button"),m(Wn,"id","open-url"),w(En,"margin-top","24px"),m(Dn,"class","button"),m(Dn,"title","Minimizes the window, requests attention for 3s and then resets it"),m(Rn,"class","button")},m(t,i){a(t,n,i),s(n,o);for(let t=0;t{n(20,O=t),n(7,g=O.width),n(8,m=O.height)})),o[i].outerSize().then((t=>{n(21,S=t)}))}function E(){o[i].innerPosition().then((t=>{n(18,$=t)})),o[i].outerPosition().then((t=>{n(19,T=t),n(13,M=T.x),n(14,k=T.y)}))}return t.$$set=t=>{"onMessage"in t&&n(30,s=t.onMessage)},t.$$.update=()=>{7&t.$$.dirty[0]&&o[i].setResizable(c),11&t.$$.dirty[0]&&(l?o[i].maximize():o[i].unmaximize()),19&t.$$.dirty[0]&&o[i].setDecorations(h),35&t.$$.dirty[0]&&o[i].setAlwaysOnTop(f),67&t.$$.dirty[0]&&o[i].setFullscreen(p),387&t.$$.dirty[0]&&o[i].setSize(new Pe(g,m)),1539&t.$$.dirty[0]&&(y&&b?o[i].setMinSize(new Pe(y,b)):o[i].setMinSize(null)),6147&t.$$.dirty[0]&&(w&&_?o[i].setMaxSize(new Pe(w,_)):o[i].setMaxSize(null)),24579&t.$$.dirty[0]&&o[i].setPosition(new Ee(M,k)),3&t.$$.dirty[0]&&o[i].scaleFactor().then((t=>n(17,C=t))),3&t.$$.dirty[0]&&function(t){r&&r(),u&&u(),u=t.listen("tauri://move",E),r=t.listen("tauri://resize",z)}(o[i])},[i,o,c,l,h,f,p,g,m,y,b,w,_,M,k,a,d,C,$,T,O,S,P,function(){jt(a)},function(){o[i].setTitle(P)},function(){o[i].hide(),setTimeout(o[i].show,2e3)},function(){o[i].minimize(),setTimeout(o[i].unminimize,2e3)},function(){ie({multiple:!1}).then(o[i].setIcon)},function(){const t=Math.random().toString(),e=new Fe(t);n(1,o[t]=e,o),e.once("tauri://error",(function(){s("Error creating new webview")}))},async function(){await o[i].minimize(),await o[i].requestUserAttention(Se.Critical),await new Promise((t=>setTimeout(t,3e3))),await o[i].requestUserAttention(null)},s,function(){i=x(this),n(0,i),n(1,o)},function(){c=this.checked,n(2,c)},function(){l=this.checked,n(3,l)},()=>o[i].center(),function(){d=this.checked,n(16,d)},function(){h=this.checked,n(4,h)},function(){f=this.checked,n(5,f)},function(){p=this.checked,n(6,p)},function(){M=v(this.value),n(13,M)},function(){k=v(this.value),n(14,k)},function(){g=v(this.value),n(7,g)},function(){m=v(this.value),n(8,m)},function(){y=v(this.value),n(9,y)},function(){b=v(this.value),n(10,b)},function(){w=v(this.value),n(11,w)},function(){_=v(this.value),n(12,_)},function(){P=this.value,n(22,P)},function(){a=this.value,n(15,a)}]}Object.freeze({__proto__:null,WebviewWindow:Fe,WebviewWindowHandle:je,WindowManager:De,getCurrent:function(){return new Fe(window.__TAURI__.__currentWindow.label,{skip:!0})},getAll:Ae,appWindow:Re,LogicalSize:Pe,PhysicalSize:ze,LogicalPosition:Ee,PhysicalPosition:Le,get UserAttentionType(){return Se},currentMonitor:function(){return kt(this,void 0,void 0,(function(){return Ct(this,(function(t){return[2,St({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}})]}))}))},primaryMonitor:function(){return kt(this,void 0,void 0,(function(){return Ct(this,(function(t){return[2,St({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}})]}))}))},availableMonitors:function(){return kt(this,void 0,void 0,(function(){return Ct(this,(function(t){return[2,St({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}})]}))}))}});class Ke extends J{constructor(t){var e;super(),document.getElementById("svelte-12ggtr4-style")||((e=d("style")).id="svelte-12ggtr4-style",e.textContent=".flex-row.svelte-12ggtr4.svelte-12ggtr4{flex-direction:row}.grow.svelte-12ggtr4.svelte-12ggtr4{flex-grow:1}.window-controls.svelte-12ggtr4 input.svelte-12ggtr4{width:50px}.window-property.svelte-12ggtr4.svelte-12ggtr4{margin-top:12px}.window-property.svelte-12ggtr4 span.svelte-12ggtr4{font-size:0.8rem}",s(document.head,e)),V(this,t,qe,Ne,r,{onMessage:30},[-1,-1])}}function He(t,e){return kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,St({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:t,handler:$t(e)}})]}))}))}function Be(t){return kt(this,void 0,void 0,(function(){return Ct(this,(function(e){return[2,St({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:t}})]}))}))}function Ge(){return kt(this,void 0,void 0,(function(){return Ct(this,(function(t){return[2,St({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]}))}))}function Ve(t,e,n){const i=t.slice();return i[9]=e[n],i}function Je(t){let e,n,i,o,r,u,l=t[9]+"";function g(){return t[8](t[9])}return{c(){e=d("div"),n=h(l),i=f(),o=d("button"),o.textContent="Unregister",m(o,"type","button")},m(t,c){a(t,e,c),s(e,n),s(e,i),s(e,o),r||(u=p(o,"click",g),r=!0)},p(e,i){t=e,2&i&&l!==(l=t[9]+"")&&y(n,l)},d(t){t&&c(e),r=!1,u()}}}function Xe(e){let n,i,o;return{c(){n=d("button"),n.textContent="Unregister all",m(n,"type","button")},m(t,r){a(t,n,r),i||(o=p(n,"click",e[5]),i=!0)},p:t,d(t){t&&c(n),i=!1,o()}}}function Ye(e){let n,o,r,u,h,g,v,y,w,_,x=e[1],M=[];for(let t=0;tn(1,i=t)));let s="CmdOrControl+X";function a(t){const e=t;Be(e).then((()=>{r.update((t=>t.filter((t=>t!==e)))),o(`Shortcut ${e} unregistered`)})).catch(o)}return t.$$set=t=>{"onMessage"in t&&n(6,o=t.onMessage)},[s,i,r,function(){const t=s;He(t,(()=>{o(`Shortcut ${t} triggered`)})).then((()=>{r.update((e=>[...e,t])),o(`Shortcut ${t} registered successfully`)})).catch(o)},a,function(){Ge().then((()=>{r.update((()=>[])),o("Unregistered all shortcuts")})).catch(o)},o,function(){s=this.value,n(0,s)},t=>a(t)]}Object.freeze({__proto__:null,register:He,registerAll:function(t,e){return kt(this,void 0,void 0,(function(){return Ct(this,(function(n){return[2,St({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:t,handler:$t(e)}})]}))}))},isRegistered:function(t){return kt(this,void 0,void 0,(function(){return Ct(this,(function(e){return[2,St({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:t}})]}))}))},unregister:Be,unregisterAll:Ge});class Ze extends J{constructor(t){super(),V(this,t,Qe,Ye,r,{onMessage:6})}}function tn(t){let e,n,o,r,u;return{c(){e=d("input"),n=f(),o=d("button"),o.textContent="Write",m(e,"placeholder","write to stdin"),m(o,"class","button")},m(i,s){a(i,e,s),b(e,t[3]),a(i,n,s),a(i,o,s),r||(u=[p(e,"input",t[10]),p(o,"click",t[7])],r=!0)},p(t,n){8&n&&e.value!==t[3]&&b(e,t[3])},d(t){t&&c(e),t&&c(n),t&&c(o),r=!1,i(u)}}}function en(e){let n,o,r,u,l,h,g,v,y,_,x,M,k,C,$,T=e[4]&&tn(e);return{c(){n=d("div"),o=d("div"),r=d("input"),u=f(),l=d("button"),l.textContent="Run",h=f(),g=d("button"),g.textContent="Kill",v=f(),T&&T.c(),y=f(),_=d("div"),x=d("input"),M=f(),k=d("input"),m(l,"class","button"),m(g,"class","button"),m(x,"placeholder","Working directory"),m(k,"placeholder","Environment variables"),w(k,"width","300px")},m(t,i){a(t,n,i),s(n,o),s(o,r),b(r,e[0]),s(o,u),s(o,l),s(o,h),s(o,g),s(o,v),T&&T.m(o,null),s(n,y),s(n,_),s(_,x),b(x,e[1]),s(_,M),s(_,k),b(k,e[2]),C||($=[p(r,"input",e[9]),p(l,"click",e[5]),p(g,"click",e[6]),p(x,"input",e[11]),p(k,"input",e[12])],C=!0)},p(t,[e]){1&e&&r.value!==t[0]&&b(r,t[0]),t[4]?T?T.p(t,e):(T=tn(t),T.c(),T.m(o,null)):T&&(T.d(1),T=null),2&e&&x.value!==t[1]&&b(x,t[1]),4&e&&k.value!==t[2]&&b(k,t[2])},i:t,o:t,d(t){t&&c(n),T&&T.d(),C=!1,i($)}}}function nn(t,e,n){const i=navigator.userAgent.includes("Windows");let o,r=i?"cmd":"sh",u=i?["/C"]:["-c"],{onMessage:s}=e,a='echo "hello world"',c=null,l="SOMETHING=value ANOTHER=2",d="";return t.$$set=t=>{"onMessage"in t&&n(8,s=t.onMessage)},[a,c,l,d,o,function(){n(4,o=null);const t=new Wt(r,[...u,a],{cwd:c||null,env:l.split(" ").reduce(((t,e)=>{let[n,i]=e.split("=");return{...t,[n]:i}}),{})});t.on("close",(t=>{s(`command finished with code ${t.code} and signal ${t.signal}`),n(4,o=null)})),t.on("error",(t=>s(`command error: "${t}"`))),t.stdout.on("data",(t=>s(`command stdout: "${t}"`))),t.stderr.on("data",(t=>s(`command stderr: "${t}"`))),t.spawn().then((t=>{n(4,o=t)})).catch(s)},function(){o.kill().then((()=>s("killed child process"))).catch(s)},function(){o.write(d).catch(s)},s,function(){a=this.value,n(0,a)},function(){d=this.value,n(3,d)},function(){c=this.value,n(1,c)},function(){l=this.value,n(2,l)}]}class on extends J{constructor(t){super(),V(this,t,nn,en,r,{onMessage:8})}}function rn(){return kt(this,void 0,void 0,(function(){function t(){e&&e(),e=void 0}var e;return Ct(this,(function(n){return[2,new Promise((function(n,i){Yt("tauri://update-status",(function(e){var o;(o=null==e?void 0:e.payload).error?(t(),i(o.error)):"DONE"===o.status&&(t(),n())})).then((function(t){e=t})).catch((function(e){throw t(),e})),Zt("tauri://update-install").catch((function(e){throw t(),e}))}))]}))}))}function un(){return kt(this,void 0,void 0,(function(){function t(){e&&e(),e=void 0}var e;return Ct(this,(function(n){return[2,new Promise((function(n,i){Qt("tauri://update-available",(function(e){var i;i=null==e?void 0:e.payload,t(),n({manifest:i,shouldUpdate:!0})})).catch((function(e){throw t(),e})),Yt("tauri://update-status",(function(e){var o;(o=null==e?void 0:e.payload).error?(t(),i(o.error)):"UPTODATE"===o.status&&(t(),n({shouldUpdate:!1}))})).then((function(t){e=t})).catch((function(e){throw t(),e})),Zt("tauri://update").catch((function(e){throw t(),e}))}))]}))}))}function sn(e){let n,o,r,u,l,h;return{c(){n=d("div"),o=d("button"),o.textContent="Check update",r=f(),u=d("button"),u.textContent="Install update",m(o,"class","button"),m(o,"id","check_update"),m(u,"class","button hidden"),m(u,"id","start_update")},m(t,i){a(t,n,i),s(n,o),s(n,r),s(n,u),l||(h=[p(o,"click",e[0]),p(u,"click",e[1])],l=!0)},p:t,i:t,o:t,d(t){t&&c(n),l=!1,i(h)}}}function an(t,e,n){let i,{onMessage:o}=e;return T((async()=>{i=await Yt("tauri://update-status",o)})),O((()=>{i&&i()})),t.$$set=t=>{"onMessage"in t&&n(2,o=t.onMessage)},[async function(){try{document.getElementById("check_update").classList.add("hidden");const{shouldUpdate:t,manifest:e}=await un();o(`Should update: ${t}`),o(e),t&&document.getElementById("start_update").classList.remove("hidden")}catch(t){o(t)}},async function(){try{document.getElementById("start_update").classList.add("hidden"),await rn(),o("Installation complete, restart required."),await Ut()}catch(t){o(t)}},o]}Object.freeze({__proto__:null,installUpdate:rn,checkUpdate:un});class cn extends J{constructor(t){super(),V(this,t,an,sn,r,{onMessage:2})}}function ln(t){return kt(this,void 0,void 0,(function(){return Ct(this,(function(e){return[2,St({__tauriModule:"Clipboard",message:{cmd:"writeText",data:t}})]}))}))}function dn(){return kt(this,void 0,void 0,(function(){return Ct(this,(function(t){return[2,St({__tauriModule:"Clipboard",message:{cmd:"readText"}})]}))}))}function hn(e){let n,o,r,u,l,h,g,v,y;return{c(){n=d("div"),o=d("div"),r=d("input"),u=f(),l=d("button"),l.textContent="Write",h=f(),g=d("button"),g.textContent="Read",m(r,"placeholder","Text to write to the clipboard"),m(l,"type","button"),m(g,"type","button")},m(t,i){a(t,n,i),s(n,o),s(o,r),b(r,e[0]),s(o,u),s(o,l),s(n,h),s(n,g),v||(y=[p(r,"input",e[4]),p(l,"click",e[1]),p(g,"click",e[2])],v=!0)},p(t,[e]){1&e&&r.value!==t[0]&&b(r,t[0])},i:t,o:t,d(t){t&&c(n),v=!1,i(y)}}}function fn(t,e,n){let{onMessage:i}=e,o="clipboard message";return t.$$set=t=>{"onMessage"in t&&n(3,i=t.onMessage)},[o,function(){ln(o).then((()=>{i("Wrote to the clipboard")})).catch(i)},function(){dn().then((t=>{i(`Clipboard contents: ${t}`)})).catch(i)},i,function(){o=this.value,n(0,o)}]}Object.freeze({__proto__:null,writeText:ln,readText:dn});class pn extends J{constructor(t){super(),V(this,t,fn,hn,r,{onMessage:3})}}function gn(e){let n;return{c(){n=d("div"),n.innerHTML='

    Not available for Linux

    \n '},m(t,e){a(t,n,e)},p:t,i:t,o:t,d(t){t&&c(n)}}}function mn(t,e,n){let{onMessage:i}=e;const o=window.constraints={audio:!0,video:!0};return T((async()=>{try{!function(t){const e=document.querySelector("video"),n=t.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${n[0].label}`),window.stream=t,e.srcObject=t}(await navigator.mediaDevices.getUserMedia(o))}catch(t){!function(t){if("ConstraintNotSatisfiedError"===t.name){const t=o.video;i(`The resolution ${t.width.exact}x${t.height.exact} px is not supported by your device.`)}else"PermissionDeniedError"===t.name&&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: ${t.name}`,t)}(t)}})),O((()=>{window.stream.getTracks().forEach((function(t){t.stop()}))})),t.$$set=t=>{"onMessage"in t&&n(0,i=t.onMessage)},[i]}class vn extends J{constructor(t){super(),V(this,t,mn,gn,r,{onMessage:0})}}function yn(e){let n,o,r,u,l,g,v,w,_,x,M,k;return{c(){n=d("input"),o=f(),r=d("input"),u=f(),l=d("button"),l.textContent="Post it.",g=f(),v=d("p"),v.textContent="Result:",w=f(),_=d("pre"),x=h(e[2]),m(l,"type","button")},m(t,i){a(t,n,i),b(n,e[0]),a(t,o,i),a(t,r,i),b(r,e[1]),a(t,u,i),a(t,l,i),a(t,g,i),a(t,v,i),a(t,w,i),a(t,_,i),s(_,x),M||(k=[p(n,"input",e[4]),p(r,"input",e[5]),p(l,"click",e[3])],M=!0)},p(t,[e]){1&e&&n.value!==t[0]&&b(n,t[0]),2&e&&r.value!==t[1]&&b(r,t[1]),4&e&&y(x,t[2])},i:t,o:t,d(t){t&&c(n),t&&c(o),t&&c(r),t&&c(u),t&&c(l),t&&c(g),t&&c(v),t&&c(w),t&&c(_),M=!1,i(k)}}}function bn(t,e,n){let i="baz",o="qux",r=null;return[i,o,r,async function(){let t=navigator.userAgent.includes("Windows")?"https://customprotocol.test/example.html":"customprotocol://test/example.html";const e=await fetch(t,{method:"POST",body:JSON.stringify({foo:i,bar:o})}),u=await e.json();n(2,r=JSON.stringify(u))},function(){i=this.value,n(0,i)},function(){o=this.value,n(1,o)}]}class wn extends J{constructor(t){super(),V(this,t,bn,yn,r,{})}}function _n(t,e,n){const i=t.slice();return i[9]=e[n],i}function xn(t){let e,n,i,o,r,u,l=t[9].label+"";function g(){return t[7](t[9])}return{c(){e=d("p"),n=h(l),i=f(),m(e,"class",o="nv noselect "+(t[0]===t[9]?"nv_selected":""))},m(t,o){a(t,e,o),s(e,n),s(e,i),r||(u=p(e,"click",g),r=!0)},p(n,i){t=n,1&i&&o!==(o="nv noselect "+(t[0]===t[9]?"nv_selected":""))&&m(e,"class",o)},d(t){t&&c(e),r=!1,u()}}}function Mn(t){let e,n,o,r,u,h,g,v,y,b,_,x,k,C,$,T,O,S,P,z,E,L,A,W=t[2],j=[];for(let e=0;eDocumentation \n Github \n Source',g=f(),v=d("div"),y=d("div");for(let t=0;t{B(t,1)})),U.r||i(U.c),U=U.p}D?(x=new D(F(t)),K(x.$$.fragment),N(x.$$.fragment,1),H(x,_,null)):x=null}(!E||2&e)&&z.p(t[1])},i(t){E||(x&&N(x.$$.fragment,t),E=!0)},o(t){x&&q(x.$$.fragment,t),E=!1},d(t){t&&c(e),l(j,t),x&&B(x),L=!1,i(A)}}}function kn(t,e,n){T((()=>{vt("ctrl+b",(()=>{Tt("menu_toggle")}))}));const i=[{label:"Welcome",component:Kt},{label:"Messages",component:ne},{label:"CLI",component:Vt},{label:"Dialog",component:le},{label:"File system",component:me},{label:"HTTP",component:ke},{label:"HTTP Form",component:wn},{label:"Notifications",component:Oe},{label:"Window",component:Ke},{label:"Shortcuts",component:Ze},{label:"Shell",component:on},{label:"Updater",component:cn},{label:"Clipboard",component:pn},{label:"WebRTC",component:vn}];let o=i[0],r=Y([]),u="";function s(t){n(0,o=t)}T((()=>{r.subscribe((t=>{n(1,u=t.join("\n"))}))}));return[o,u,i,r,s,function(t){r.update((e=>[`[${(new Date).toLocaleTimeString()}]: `+("string"==typeof t?t:JSON.stringify(t)),...e]))},function(){jt("https://tauri.studio/")},t=>s(t),()=>{r.update((()=>[]))}]}return new class extends J{constructor(t){super(),V(this,t,kn,Mn,r,{})}}({target:document.body})}(); //# sourceMappingURL=bundle.js.map