12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- const to=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}};to();function V(){}function bs(e){return e()}function jl(){return Object.create(null)}function se(e){e.forEach(bs)}function no(e){return typeof e=="function"}function me(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Un;function io(e,t){return Un||(Un=document.createElement("a")),Un.href=t,e===Un.href}function lo(e){return Object.keys(e).length===0}function so(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function gs(e,t,n){e.$$.on_destroy.push(so(t,n))}function s(e,t){e.appendChild(t)}function m(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function ft(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function r(e){return document.createElement(e)}function oo(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function z(e){return document.createTextNode(e)}function h(){return z(" ")}function xn(){return z("")}function E(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function Xn(e){return function(t){return t.preventDefault(),e.call(this,t)}}function a(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e===""?null:+e}function ro(e){return Array.from(e.childNodes)}function K(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function B(e,t){e.value=t==null?"":t}function zt(e,t){for(let n=0;n<e.options.length;n+=1){const i=e.options[n];if(i.__value===t){i.selected=!0;return}}e.selectedIndex=-1}function Ei(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}function qn(e,t,n){e.classList[n?"add":"remove"](t)}class ao{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=oo(n.nodeName):this.e=r(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)m(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(p)}}let Bt;function qt(e){Bt=e}function vs(){if(!Bt)throw new Error("Function called outside component initialization");return Bt}function ut(e){vs().$$.on_mount.push(e)}function Pi(e){vs().$$.on_destroy.push(e)}const jt=[],Yn=[],Vn=[],Ul=[],uo=Promise.resolve();let zi=!1;function co(){zi||(zi=!0,uo.then(ys))}function Dt(e){Vn.push(e)}const Li=new Set;let Bn=0;function ys(){const e=Bt;do{for(;Bn<jt.length;){const t=jt[Bn];Bn++,qt(t),fo(t.$$)}for(qt(null),jt.length=0,Bn=0;Yn.length;)Yn.pop()();for(let t=0;t<Vn.length;t+=1){const n=Vn[t];Li.has(n)||(Li.add(n),n())}Vn.length=0}while(jt.length);for(;Ul.length;)Ul.pop()();zi=!1,Li.clear(),qt(e)}function fo(e){if(e.fragment!==null){e.update(),se(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Dt)}}const Gn=new Set;let ct;function ei(){ct={r:0,c:[],p:ct}}function ti(){ct.r||se(ct.c),ct=ct.p}function ze(e,t){e&&e.i&&(Gn.delete(e),e.i(t))}function Re(e,t,n,i){if(e&&e.o){if(Gn.has(e))return;Gn.add(e),ct.c.push(()=>{Gn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function $n(e){e&&e.c()}function Vt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Dt(()=>{const c=o.map(bs).filter(no);u?u.push(...c):se(c),e.$$.on_mount=[]}),d.forEach(Dt)}function Gt(e,t){const n=e.$$;n.fragment!==null&&(se(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function po(e,t){e.$$.dirty[0]===-1&&(jt.push(e),co(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ye(e,t,n,i,l,o,u,d=[-1]){const c=Bt;qt(e);const f=e.$$={fragment:null,ctx:null,props:o,update:V,not_equal:l,bound:jl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:jl(),dirty:d,skip_bound:!1,root:t.target||c.$$.root};u&&u(f.root);let v=!1;if(f.ctx=n?n(e,t.props||{},(k,_,...y)=>{const g=y.length?y[0]:_;return f.ctx&&l(f.ctx[k],f.ctx[k]=g)&&(!f.skip_bound&&f.bound[k]&&f.bound[k](g),v&&po(e,k)),_}):[],f.update(),v=!0,se(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const k=ro(t.target);f.fragment&&f.fragment.l(k),k.forEach(p)}else f.fragment&&f.fragment.c();t.intro&&ze(e.$$.fragment),Vt(e,t.target,t.anchor,t.customElement),ys()}qt(c)}class we{$destroy(){Gt(this,1),this.$destroy=V}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(t){this.$$set&&!lo(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Et=[];function ws(e,t=V){let n;const i=new Set;function l(d){if(me(e,d)&&(e=d,n)){const c=!Et.length;for(const f of i)f[1](),Et.push(f,e);if(c){for(let f=0;f<Et.length;f+=2)Et[f][0](Et[f+1]);Et.length=0}}}function o(d){l(d(e))}function u(d,c=V){const f=[d,c];return i.add(f),i.size===1&&(n=t(l)||V),d(e),()=>{i.delete(f),i.size===0&&(n(),n=null)}}return{set:l,update:o,subscribe:u}}var mo=Object.defineProperty,Te=(e,t)=>{for(var n in t)mo(e,n,{get:t[n],enumerable:!0})},ho={};Te(ho,{convertFileSrc:()=>ks,invoke:()=>Kn,transformCallback:()=>pt});function _o(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function pt(e,t=!1){let n=_o(),i=`_${n}`;return Object.defineProperty(window,i,{value:l=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(l)),writable:!1,configurable:!0}),n}async function Kn(e,t={}){return new Promise((n,i)=>{let l=pt(u=>{n(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=pt(u=>{i(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:e,callback:l,error:o,...t})})}function ks(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function L(e){return Kn("tauri",e)}var bo={};Te(bo,{Child:()=>Ms,Command:()=>Wi,EventEmitter:()=>Jn,open:()=>Oi});async function go(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),L({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:pt(e)}})}var Jn=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let n=(...i)=>{this.removeListener(e,n),t(...i)};return this.addListener(e,n)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(n=>n!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,...t){if(e in this.eventListeners){let n=this.eventListeners[e];for(let i of n)i(...t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let n=(...i)=>{this.removeListener(e,n),t(...i)};return this.prependListener(e,n)}},Ms=class{constructor(e){this.pid=e}async write(e){return L({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return L({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Wi=class extends Jn{constructor(e,t=[],n){super(),this.stdout=new Jn,this.stderr=new Jn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static sidecar(e,t=[],n){let i=new Wi(e,t,n);return i.options.sidecar=!0,i}async spawn(){return go(e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload);break}},this.program,this.args,this.options).then(e=>new Ms(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",l=>{n.push(l)}),this.stderr.on("data",l=>{i.push(l)}),this.on("close",l=>{e({code:l.code,signal:l.signal,stdout:n.join(`
- `),stderr:i.join(`
- `)})}),this.spawn().catch(t)})}};async function Oi(e,t){return L({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var vo={};Te(vo,{TauriEvent:()=>Ls,emit:()=>ni,listen:()=>Xt,once:()=>Ss});async function Cs(e,t){return L({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Ts(e,t,n){await L({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Ri(e,t,n){return L({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:pt(n)}}).then(i=>async()=>Cs(e,i))}async function As(e,t,n){return Ri(e,t,i=>{n(i),Cs(e,i.id).catch(()=>{})})}var Ls=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(Ls||{});async function Xt(e,t){return Ri(e,null,t)}async function Ss(e,t){return As(e,null,t)}async function ni(e,t){return Ts(e,void 0,t)}var yo={};Te(yo,{CloseRequestedEvent:()=>Ws,LogicalPosition:()=>Es,LogicalSize:()=>Qn,PhysicalPosition:()=>xe,PhysicalSize:()=>dt,UserAttentionType:()=>Ii,WebviewWindow:()=>mt,WebviewWindowHandle:()=>Ds,WindowManager:()=>Ps,appWindow:()=>je,availableMonitors:()=>Mo,currentMonitor:()=>wo,getAll:()=>zs,getCurrent:()=>Ut,primaryMonitor:()=>ko});var Qn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},dt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Qn(this.width/e,this.height/e)}},Es=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},xe=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Es(this.x/e,this.y/e)}},Ii=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(Ii||{});function Ut(){return new mt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function zs(){return window.__TAURI_METADATA__.__windows.map(e=>new mt(e.label,{skip:!0}))}var ql=["tauri://created","tauri://error"],Ds=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Ri(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):As(e,this.label,t)}async emit(e,t){if(ql.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return Ts(e,this.label,t)}_handleTauriEvent(e,t){return ql.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Ps=class extends Ds{async scaleFactor(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new xe(e,t))}async outerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new xe(e,t))}async innerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new dt(e,t))}async outerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new dt(e,t))}async isFullscreen(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMaximized(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async theme(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setAlwaysOnTop(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new Ws(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),n=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),i=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Ws=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},mt=class extends Ps{constructor(e,t={}){super(e),t!=null&&t.skip||L({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return zs().some(t=>t.label===e)?new mt(e,{skip:!0}):null}},je;"__TAURI_METADATA__"in window?je=new mt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label.
- Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),je=new mt("main",{skip:!0}));function Hi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new xe(e.position.x,e.position.y),size:new dt(e.size.width,e.size.height)}}async function wo(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Hi)}async function ko(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Hi)}async function Mo(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Hi))}function Co(){return navigator.appVersion.includes("Win")}var To={};Te(To,{EOL:()=>Ao,arch:()=>Eo,platform:()=>Os,tempdir:()=>zo,type:()=>So,version:()=>Lo});var Ao=Co()?`\r
- `:`
- `;async function Os(){return L({__tauriModule:"Os",message:{cmd:"platform"}})}async function Lo(){return L({__tauriModule:"Os",message:{cmd:"version"}})}async function So(){return L({__tauriModule:"Os",message:{cmd:"osType"}})}async function Eo(){return L({__tauriModule:"Os",message:{cmd:"arch"}})}async function zo(){return L({__tauriModule:"Os",message:{cmd:"tempdir"}})}var Do={};Te(Do,{getName:()=>Is,getTauriVersion:()=>Hs,getVersion:()=>Rs,hide:()=>Ns,show:()=>Fs});async function Rs(){return L({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function Is(){return L({__tauriModule:"App",message:{cmd:"getAppName"}})}async function Hs(){return L({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function Fs(){return L({__tauriModule:"App",message:{cmd:"show"}})}async function Ns(){return L({__tauriModule:"App",message:{cmd:"hide"}})}var Po={};Te(Po,{exit:()=>js,relaunch:()=>Fi});async function js(e=0){return L({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function Fi(){return L({__tauriModule:"Process",message:{cmd:"relaunch"}})}function Wo(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j,S,C,T,P,M,N;return{c(){t=r("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the <code>@tauri-apps/api</code> package. It's used as the main validation app, serving as the test bed of our
- development process. In the future, this app will be used on Tauri's integration
- tests.`,n=h(),i=r("br"),l=h(),o=r("br"),u=h(),d=r("pre"),c=z("App name: "),f=r("code"),v=z(e[2]),k=z(`
- App version: `),_=r("code"),y=z(e[0]),g=z(`
- Tauri version: `),b=r("code"),A=z(e[1]),D=z(`
- `),F=h(),W=r("br"),j=h(),S=r("div"),C=r("button"),C.textContent="Close application",T=h(),P=r("button"),P.textContent="Relaunch application",a(C,"class","btn"),a(P,"class","btn"),a(S,"class","flex flex-wrap gap-1 shadow-")},m(U,J){m(U,t,J),m(U,n,J),m(U,i,J),m(U,l,J),m(U,o,J),m(U,u,J),m(U,d,J),s(d,c),s(d,f),s(f,v),s(d,k),s(d,_),s(_,y),s(d,g),s(d,b),s(b,A),s(d,D),m(U,F,J),m(U,W,J),m(U,j,J),m(U,S,J),s(S,C),s(S,T),s(S,P),M||(N=[E(C,"click",e[3]),E(P,"click",e[4])],M=!0)},p(U,[J]){J&4&&K(v,U[2]),J&1&&K(y,U[0]),J&2&&K(A,U[1])},i:V,o:V,d(U){U&&p(t),U&&p(n),U&&p(i),U&&p(l),U&&p(o),U&&p(u),U&&p(d),U&&p(F),U&&p(W),U&&p(j),U&&p(S),M=!1,se(N)}}}function Oo(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";Is().then(c=>{n(2,o=c)}),Rs().then(c=>{n(0,i=c)}),Hs().then(c=>{n(1,l=c)});async function u(){await js()}async function d(){await Fi()}return[i,l,o,u,d]}class Ro extends we{constructor(t){super(),ye(this,t,Oo,Wo,me,{})}}var Io={};Te(Io,{getMatches:()=>Us});async function Us(){return L({__tauriModule:"Cli",message:{cmd:"cliMatches"}})}function Ho(e){let t,n,i,l,o,u,d,c,f,v,k,_,y;return{c(){t=r("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
- <code class="code-block flex flex-wrap my-2"><pre> --config <PATH>
- --theme <light|dark|system>
- --verbose</pre></code>
- Additionally, it has a <code>update --background</code> subcommand.`,n=h(),i=r("br"),l=h(),o=r("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=h(),d=r("br"),c=h(),f=r("br"),v=h(),k=r("button"),k.textContent="Get matches",a(o,"class","note"),a(k,"class","btn"),a(k,"id","cli-matches")},m(g,b){m(g,t,b),m(g,n,b),m(g,i,b),m(g,l,b),m(g,o,b),m(g,u,b),m(g,d,b),m(g,c,b),m(g,f,b),m(g,v,b),m(g,k,b),_||(y=E(k,"click",e[0]),_=!0)},p:V,i:V,o:V,d(g){g&&p(t),g&&p(n),g&&p(i),g&&p(l),g&&p(o),g&&p(u),g&&p(d),g&&p(c),g&&p(f),g&&p(v),g&&p(k),_=!1,y()}}}function Fo(e,t,n){let{onMessage:i}=t;function l(){Us().then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class No extends we{constructor(t){super(),ye(this,t,Fo,Ho,me,{onMessage:1})}}function jo(e){let t,n,i,l,o,u,d,c;return{c(){t=r("div"),n=r("button"),n.textContent="Call Log API",i=h(),l=r("button"),l.textContent="Call Request (async) API",o=h(),u=r("button"),u.textContent="Send event to Rust",a(n,"class","btn"),a(n,"id","log"),a(l,"class","btn"),a(l,"id","request"),a(u,"class","btn"),a(u,"id","event")},m(f,v){m(f,t,v),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[E(n,"click",e[0]),E(l,"click",e[1]),E(u,"click",e[2])],d=!0)},p:V,i:V,o:V,d(f){f&&p(t),d=!1,se(c)}}}function Uo(e,t,n){let{onMessage:i}=t,l;ut(async()=>{l=await Xt("rust-event",i)}),Pi(()=>{l&&l()});function o(){Kn("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){Kn("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){ni("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class qo extends we{constructor(t){super(),ye(this,t,Uo,jo,me,{onMessage:3})}}var Bo={};Te(Bo,{ask:()=>Bs,confirm:()=>Go,message:()=>Vo,open:()=>Ni,save:()=>qs});async function Ni(e={}){return typeof e=="object"&&Object.freeze(e),L({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function qs(e={}){return typeof e=="object"&&Object.freeze(e),L({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function Vo(e,t){var n;let i=typeof t=="string"?{title:t}:t;return L({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(n=i==null?void 0:i.title)==null?void 0:n.toString(),type:i==null?void 0:i.type}})}async function Bs(e,t){var n;let i=typeof t=="string"?{title:t}:t;return L({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(n=i==null?void 0:i.title)==null?void 0:n.toString(),type:i==null?void 0:i.type}})}async function Go(e,t){var n;let i=typeof t=="string"?{title:t}:t;return L({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(n=i==null?void 0:i.title)==null?void 0:n.toString(),type:i==null?void 0:i.type}})}var Jo={};Te(Jo,{BaseDirectory:()=>Jt,Dir:()=>Jt,copyFile:()=>Qo,createDir:()=>$o,exists:()=>er,readBinaryFile:()=>ji,readDir:()=>Vs,readTextFile:()=>Xo,removeDir:()=>Ko,removeFile:()=>Zo,renameFile:()=>xo,writeBinaryFile:()=>Yo,writeFile:()=>Di,writeTextFile:()=>Di});var Jt=(e=>(e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Desktop=6]="Desktop",e[e.Document=7]="Document",e[e.Download=8]="Download",e[e.Executable=9]="Executable",e[e.Font=10]="Font",e[e.Home=11]="Home",e[e.Picture=12]="Picture",e[e.Public=13]="Public",e[e.Runtime=14]="Runtime",e[e.Template=15]="Template",e[e.Video=16]="Video",e[e.Resource=17]="Resource",e[e.App=18]="App",e[e.Log=19]="Log",e[e.Temp=20]="Temp",e[e.AppConfig=21]="AppConfig",e[e.AppData=22]="AppData",e[e.AppLocalData=23]="AppLocalData",e[e.AppCache=24]="AppCache",e[e.AppLog=25]="AppLog",e))(Jt||{});async function Xo(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})}async function ji(e,t={}){let n=await L({__tauriModule:"Fs",message:{cmd:"readFile",path:e,options:t}});return Uint8Array.from(n)}async function Di(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:""},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),typeof t=="string"?i.contents=t!=null?t:"":l=t,L({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(new TextEncoder().encode(i.contents)),options:l}})}async function Yo(e,t,n){typeof n=="object"&&Object.freeze(n),typeof e=="object"&&Object.freeze(e);let i={path:"",contents:[]},l=n;return typeof e=="string"?i.path=e:(i.path=e.path,i.contents=e.contents),t&&"dir"in t?l=t:typeof e=="string"&&(i.contents=t!=null?t:[]),L({__tauriModule:"Fs",message:{cmd:"writeFile",path:i.path,contents:Array.from(i.contents instanceof ArrayBuffer?new Uint8Array(i.contents):i.contents),options:l}})}async function Vs(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"readDir",path:e,options:t}})}async function $o(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"createDir",path:e,options:t}})}async function Ko(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"removeDir",path:e,options:t}})}async function Qo(e,t,n={}){return L({__tauriModule:"Fs",message:{cmd:"copyFile",source:e,destination:t,options:n}})}async function Zo(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"removeFile",path:e,options:t}})}async function xo(e,t,n={}){return L({__tauriModule:"Fs",message:{cmd:"renameFile",oldPath:e,newPath:t,options:n}})}async function er(e,t={}){return L({__tauriModule:"Fs",message:{cmd:"exists",path:e,options:t}})}function tr(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j,S,C,T,P;return{c(){t=r("div"),n=r("input"),i=h(),l=r("input"),o=h(),u=r("br"),d=h(),c=r("div"),f=r("input"),v=h(),k=r("label"),k.textContent="Multiple",_=h(),y=r("div"),g=r("input"),b=h(),A=r("label"),A.textContent="Directory",D=h(),F=r("br"),W=h(),j=r("button"),j.textContent="Open dialog",S=h(),C=r("button"),C.textContent="Open save dialog",a(n,"class","input"),a(n,"id","dialog-default-path"),a(n,"placeholder","Default path"),a(l,"class","input"),a(l,"id","dialog-filter"),a(l,"placeholder","Extensions filter, comma-separated"),a(t,"class","flex gap-2 children:grow"),a(f,"type","checkbox"),a(f,"id","dialog-multiple"),a(k,"for","dialog-multiple"),a(g,"type","checkbox"),a(g,"id","dialog-directory"),a(A,"for","dialog-directory"),a(j,"class","btn"),a(j,"id","open-dialog"),a(C,"class","btn"),a(C,"id","save-dialog")},m(M,N){m(M,t,N),s(t,n),B(n,e[0]),s(t,i),s(t,l),B(l,e[1]),m(M,o,N),m(M,u,N),m(M,d,N),m(M,c,N),s(c,f),f.checked=e[2],s(c,v),s(c,k),m(M,_,N),m(M,y,N),s(y,g),g.checked=e[3],s(y,b),s(y,A),m(M,D,N),m(M,F,N),m(M,W,N),m(M,j,N),m(M,S,N),m(M,C,N),T||(P=[E(n,"input",e[8]),E(l,"input",e[9]),E(f,"change",e[10]),E(g,"change",e[11]),E(j,"click",e[4]),E(C,"click",e[5])],T=!0)},p(M,[N]){N&1&&n.value!==M[0]&&B(n,M[0]),N&2&&l.value!==M[1]&&B(l,M[1]),N&4&&(f.checked=M[2]),N&8&&(g.checked=M[3])},i:V,o:V,d(M){M&&p(t),M&&p(o),M&&p(u),M&&p(d),M&&p(c),M&&p(_),M&&p(y),M&&p(D),M&&p(F),M&&p(W),M&&p(j),M&&p(S),M&&p(C),T=!1,se(P)}}}function nr(e,t){var n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(l){var o=l.target.result;t(o.substr(o.indexOf(",")+1))},i.readAsDataURL(n)}function ir(e,t,n){let{onMessage:i}=t,{insecureRenderHtml:l}=t,o=null,u=null,d=!1,c=!1;function f(){Ni({title:"My wonderful open dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[],multiple:d,directory:c}).then(function(b){if(Array.isArray(b))i(b);else{var A=b,D=A.match(/\S+\.\S+$/g);ji(A).then(function(F){D&&(A.includes(".png")||A.includes(".jpg"))?nr(new Uint8Array(F),function(W){var j="data:image/png;base64,"+W;l('<img src="'+j+'"></img>')}):i(b)}).catch(i(b))}}).catch(i)}function v(){qs({title:"My wonderful save dialog",defaultPath:o,filters:u?[{name:"Tauri Example",extensions:u.split(",").map(b=>b.trim())}]:[]}).then(i).catch(i)}function k(){o=this.value,n(0,o)}function _(){u=this.value,n(1,u)}function y(){d=this.checked,n(2,d)}function g(){c=this.checked,n(3,c)}return e.$$set=b=>{"onMessage"in b&&n(6,i=b.onMessage),"insecureRenderHtml"in b&&n(7,l=b.insecureRenderHtml)},[o,u,d,c,f,v,i,l,k,_,y,g]}class lr extends we{constructor(t){super(),ye(this,t,ir,tr,me,{onMessage:6,insecureRenderHtml:7})}}function Bl(e,t,n){const i=e.slice();return i[9]=t[n],i}function Vl(e){let t,n=e[9][0]+"",i,l;return{c(){t=r("option"),i=z(n),t.__value=l=e[9][1],t.value=t.__value},m(o,u){m(o,t,u),s(t,i)},p:V,d(o){o&&p(t)}}}function sr(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j=e[2],S=[];for(let C=0;C<j.length;C+=1)S[C]=Vl(Bl(e,j,C));return{c(){t=r("form"),n=r("div"),i=r("select"),l=r("option"),l.textContent="None";for(let C=0;C<S.length;C+=1)S[C].c();o=h(),u=r("input"),d=h(),c=r("br"),f=h(),v=r("div"),k=r("button"),k.textContent="Read",_=h(),y=r("button"),y.textContent="Use as img src",g=h(),b=r("br"),A=h(),D=r("img"),l.__value="",l.value=l.__value,a(i,"class","input"),a(i,"id","dir"),a(u,"class","input grow"),a(u,"id","path-to-read"),a(u,"placeholder","Type the path to read..."),a(n,"class","flex gap-1"),a(k,"class","btn"),a(k,"id","read"),a(y,"class","btn"),a(y,"type","button"),a(t,"class","flex flex-col"),a(D,"alt","")},m(C,T){m(C,t,T),s(t,n),s(n,i),s(i,l);for(let P=0;P<S.length;P+=1)S[P].m(i,null);s(n,o),s(n,u),B(u,e[0]),s(t,d),s(t,c),s(t,f),s(t,v),s(v,k),s(v,_),s(v,y),m(C,g,T),m(C,b,T),m(C,A,T),m(C,D,T),e[8](D),F||(W=[E(u,"input",e[7]),E(y,"click",e[4]),E(t,"submit",Xn(e[3]))],F=!0)},p(C,[T]){if(T&4){j=C[2];let P;for(P=0;P<j.length;P+=1){const M=Bl(C,j,P);S[P]?S[P].p(M,T):(S[P]=Vl(M),S[P].c(),S[P].m(i,null))}for(;P<S.length;P+=1)S[P].d(1);S.length=j.length}T&1&&u.value!==C[0]&&B(u,C[0])},i:V,o:V,d(C){C&&p(t),ft(S,C),C&&p(g),C&&p(b),C&&p(A),C&&p(D),e[8](null),F=!1,se(W)}}}function Gl(){return document.getElementById("dir").value?parseInt(dir.value):null}function or(e,t){const n=new Blob([e],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(l){const o=l.target.result;t(o.substr(o.indexOf(",")+1))},i.readAsDataURL(n)}function rr(e,t,n){let{onMessage:i}=t,{insecureRenderHtml:l}=t,o="",u;const d=Object.keys(Jt).filter(_=>isNaN(parseInt(_))).map(_=>[_,Jt[_]]);function c(){const _=o.match(/\S+\.\S+$/g),y={dir:Gl()};(_?ji(o,y):Vs(o,y)).then(function(b){if(_)if(o.includes(".png")||o.includes(".jpg"))or(new Uint8Array(b),function(A){const D="data:image/png;base64,"+A;l('<img src="'+D+'"></img>')});else{const A=String.fromCharCode.apply(null,b);l('<textarea id="file-response"></textarea><button id="file-save">Save</button>'),setTimeout(()=>{const D=document.getElementById("file-response");D.value=A,document.getElementById("file-save").addEventListener("click",function(){Di(o,D.value,{dir:Gl()}).catch(i)})})}else i(b)}).catch(i)}function f(){n(1,u.src=ks(o),u)}function v(){o=this.value,n(0,o)}function k(_){Yn[_?"unshift":"push"](()=>{u=_,n(1,u)})}return e.$$set=_=>{"onMessage"in _&&n(5,i=_.onMessage),"insecureRenderHtml"in _&&n(6,l=_.insecureRenderHtml)},[o,u,d,c,f,i,l,v,k]}class ar extends we{constructor(t){super(),ye(this,t,rr,sr,me,{onMessage:5,insecureRenderHtml:6})}}var ur={};Te(ur,{Body:()=>et,Client:()=>Js,Response:()=>Gs,ResponseType:()=>Ui,fetch:()=>cr,getClient:()=>Zn});var Ui=(e=>(e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary",e))(Ui||{}),et=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},n=(i,l)=>{if(l!==null){let o;typeof l=="string"?o=l:l instanceof Uint8Array||Array.isArray(l)?o=Array.from(l):l instanceof File?o={file:l.name,mime:l.type,fileName:l.name}:typeof l.file=="string"?o={file:l.file,mime:l.mime,fileName:l.fileName}:o={file:Array.from(l.file),mime:l.mime,fileName:l.fileName},t[i]=o}};if(e instanceof FormData)for(let[i,l]of e)n(i,l);else for(let i in e){let l=e[i];n(i,l)}return new et("Form",t)}static json(e){return new et("Json",e)}static text(e){return new et("Text",e)}static bytes(e){return new et("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},Gs=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},Js=class{constructor(e){this.id=e}async drop(){return L({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),L({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(n=>{let i=new Gs(n);if(t){try{i.data=JSON.parse(i.data)}catch(l){if(i.ok&&i.data==="")i.data={};else if(i.ok)throw Error(`Failed to parse response \`${i.data}\` as JSON: ${l};
- try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return i}return i})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function Zn(e){return L({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new Js(t))}var Si=null;async function cr(e,t){var n;return Si===null&&(Si=await Zn()),Si.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function Jl(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function Xl(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F=e[5],W=[];for(let T=0;T<F.length;T+=1)W[T]=Kl(Jl(e,F,T));const j=T=>Re(W[T],1,1,()=>{W[T]=null});let S=!e[3]&&Ql(),C=!e[3]&&e[8]&&Zl();return{c(){t=r("span"),n=r("span"),i=z(e[6]),l=h(),o=r("ul");for(let T=0;T<W.length;T+=1)W[T].c();u=h(),d=r("span"),c=z(e[7]),S&&S.c(),f=h(),v=r("span"),k=z(e[6]),_=z(mr),y=z(e[7]),C&&C.c(),g=xn(),a(n,"class","bracket svelte-gbh3pt"),a(n,"tabindex","0"),a(o,"class","svelte-gbh3pt"),a(d,"class","bracket svelte-gbh3pt"),a(d,"tabindex","0"),a(t,"class","svelte-gbh3pt"),qn(t,"hidden",e[8]),a(v,"class","bracket svelte-gbh3pt"),a(v,"tabindex","0"),qn(v,"hidden",!e[8])},m(T,P){m(T,t,P),s(t,n),s(n,i),s(t,l),s(t,o);for(let M=0;M<W.length;M+=1)W[M].m(o,null);s(t,u),s(t,d),s(d,c),S&&S.m(t,null),m(T,f,P),m(T,v,P),s(v,k),s(v,_),s(v,y),C&&C.m(T,P),m(T,g,P),b=!0,A||(D=[E(n,"click",e[11]),E(d,"click",e[11]),E(v,"click",e[11])],A=!0)},p(T,P){if((!b||P&64)&&K(i,T[6]),P&1591){F=T[5];let M;for(M=0;M<F.length;M+=1){const N=Jl(T,F,M);W[M]?(W[M].p(N,P),ze(W[M],1)):(W[M]=Kl(N),W[M].c(),ze(W[M],1),W[M].m(o,null))}for(ei(),M=F.length;M<W.length;M+=1)j(M);ti()}(!b||P&128)&&K(c,T[7]),T[3]?S&&(S.d(1),S=null):S||(S=Ql(),S.c(),S.m(t,null)),P&256&&qn(t,"hidden",T[8]),(!b||P&64)&&K(k,T[6]),(!b||P&128)&&K(y,T[7]),P&256&&qn(v,"hidden",!T[8]),!T[3]&&T[8]?C||(C=Zl(),C.c(),C.m(g.parentNode,g)):C&&(C.d(1),C=null)},i(T){if(!b){for(let P=0;P<F.length;P+=1)ze(W[P]);b=!0}},o(T){W=W.filter(Boolean);for(let P=0;P<W.length;P+=1)Re(W[P]);b=!1},d(T){T&&p(t),ft(W,T),S&&S.d(),T&&p(f),T&&p(v),C&&C.d(T),T&&p(g),A=!1,se(D)}}}function Yl(e){let t,n,i=e[12]+"",l,o;return{c(){t=r("span"),n=z('"'),l=z(i),o=z('":'),a(t,"class","key")},m(u,d){m(u,t,d),s(t,n),s(t,l),s(t,o)},p(u,d){d&32&&i!==(i=u[12]+"")&&K(l,i)},d(u){u&&p(t)}}}function dr(e){let t,n=e[10](e[0][e[12]])+"",i,l,o=e[14]<e[5].length-1&&$l();return{c(){t=r("span"),i=z(n),o&&o.c(),a(t,"class",l="val "+e[9](e[0][e[12]])+" svelte-gbh3pt")},m(u,d){m(u,t,d),s(t,i),o&&o.m(t,null)},p(u,d){d&33&&n!==(n=u[10](u[0][u[12]])+"")&&K(i,n),u[14]<u[5].length-1?o||(o=$l(),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")&&a(t,"class",l)},i:V,o:V,d(u){u&&p(t),o&&o.d()}}}function fr(e){let t,n;return t=new Xs({props:{json:e[0][e[12]],depth:e[1],_lvl:e[2]+1,_last:e[14]===e[5].length-1}}),{c(){$n(t.$$.fragment)},m(i,l){Vt(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||(ze(t.$$.fragment,i),n=!0)},o(i){Re(t.$$.fragment,i),n=!1},d(i){Gt(t,i)}}}function $l(e){let t;return{c(){t=r("span"),t.textContent=",",a(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Kl(e){let t,n,i,l,o,u,d,c=!e[4]&&Yl(e);const f=[fr,dr],v=[];function k(_,y){return y&33&&(i=null),i==null&&(i=_[9](_[0][_[12]])==="object"),i?0:1}return l=k(e,-1),o=v[l]=f[l](e),{c(){t=r("li"),c&&c.c(),n=h(),o.c(),u=h()},m(_,y){m(_,t,y),c&&c.m(t,null),s(t,n),v[l].m(t,null),s(t,u),d=!0},p(_,y){_[4]?c&&(c.d(1),c=null):c?c.p(_,y):(c=Yl(_),c.c(),c.m(t,n));let g=l;l=k(_,y),l===g?v[l].p(_,y):(ei(),Re(v[g],1,1,()=>{v[g]=null}),ti(),o=v[l],o?o.p(_,y):(o=v[l]=f[l](_),o.c()),ze(o,1),o.m(t,u))},i(_){d||(ze(o),d=!0)},o(_){Re(o),d=!1},d(_){_&&p(t),c&&c.d(),v[l].d()}}}function Ql(e){let t;return{c(){t=r("span"),t.textContent=",",a(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Zl(e){let t;return{c(){t=r("span"),t.textContent=",",a(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function pr(e){let t,n,i=e[5].length&&Xl(e);return{c(){i&&i.c(),t=xn()},m(l,o){i&&i.m(l,o),m(l,t,o),n=!0},p(l,[o]){l[5].length?i?(i.p(l,o),o&32&&ze(i,1)):(i=Xl(l),i.c(),ze(i,1),i.m(t.parentNode,t)):i&&(ei(),Re(i,1,1,()=>{i=null}),ti())},i(l){n||(ze(i),n=!0)},o(l){Re(i),n=!1},d(l){i&&i.d(l),l&&p(t)}}}const mr="...";function hr(e,t,n){let{json:i}=t,{depth:l=1/0}=t,{_lvl:o=0}=t,{_last:u=!0}=t;const d=b=>b===null?"null":typeof b;let c,f,v,k,_;const y=b=>{switch(d(b)){case"string":return`"${b}"`;case"function":return"f () {...}";case"symbol":return b.toString();default:return b}},g=()=>{n(8,_=!_)};return e.$$set=b=>{"json"in b&&n(0,i=b.json),"depth"in b&&n(1,l=b.depth),"_lvl"in b&&n(2,o=b._lvl),"_last"in b&&n(3,u=b._last)},e.$$.update=()=>{e.$$.dirty&17&&(n(5,c=d(i)==="object"?Object.keys(i):[]),n(4,f=Array.isArray(i)),n(6,v=f?"[":"{"),n(7,k=f?"]":"}")),e.$$.dirty&6&&n(8,_=l<o)},[i,l,o,u,f,c,v,k,_,d,y,g]}class Xs extends we{constructor(t){super(),ye(this,t,hr,pr,me,{json:0,depth:1,_lvl:2,_last:3})}}function _r(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j,S,C,T,P,M,N,U,J,Q,he,x,ne,Y,_e,O,$,ie,oe,Z,pe,re,be,ee,ke,Ae;return be=new Xs({props:{json:e[4]}}),{c(){t=r("form"),n=r("select"),i=r("option"),i.textContent="GET",l=r("option"),l.textContent="POST",o=r("option"),o.textContent="PUT",u=r("option"),u.textContent="PATCH",d=r("option"),d.textContent="DELETE",c=h(),f=r("br"),v=h(),k=r("textarea"),_=h(),y=r("br"),g=h(),b=r("button"),b.textContent="Make request",A=h(),D=r("br"),F=h(),W=r("h3"),W.textContent="HTTP Form",j=h(),S=r("div"),C=r("input"),T=h(),P=r("input"),M=h(),N=r("br"),U=h(),J=r("label"),Q=r("input"),he=z(`
- Multipart`),x=h(),ne=r("br"),Y=h(),_e=r("br"),O=h(),$=r("button"),$.textContent="Post it",ie=h(),oe=r("br"),Z=h(),pe=r("br"),re=h(),$n(be.$$.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,a(n,"class","input"),a(n,"id","request-method"),e[0]===void 0&&Dt(()=>e[9].call(n)),a(k,"class","input h-auto w-100%"),a(k,"id","request-body"),a(k,"placeholder","Request body"),a(k,"rows","5"),a(b,"class","btn"),a(b,"id","make-request"),a(C,"class","input"),a(P,"class","input"),a(S,"class","flex gap-2 children:grow"),a(Q,"type","checkbox"),a($,"class","btn"),a($,"type","button")},m(R,q){m(R,t,q),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),zt(n,e[0]),s(t,c),s(t,f),s(t,v),s(t,k),B(k,e[1]),s(t,_),s(t,y),s(t,g),s(t,b),m(R,A,q),m(R,D,q),m(R,F,q),m(R,W,q),m(R,j,q),m(R,S,q),s(S,C),B(C,e[2]),s(S,T),s(S,P),B(P,e[3]),m(R,M,q),m(R,N,q),m(R,U,q),m(R,J,q),s(J,Q),Q.checked=e[5],s(J,he),m(R,x,q),m(R,ne,q),m(R,Y,q),m(R,_e,q),m(R,O,q),m(R,$,q),m(R,ie,q),m(R,oe,q),m(R,Z,q),m(R,pe,q),m(R,re,q),Vt(be,R,q),ee=!0,ke||(Ae=[E(n,"change",e[9]),E(k,"input",e[10]),E(t,"submit",Xn(e[6])),E(C,"input",e[11]),E(P,"input",e[12]),E(Q,"change",e[13]),E($,"click",e[7])],ke=!0)},p(R,[q]){q&1&&zt(n,R[0]),q&2&&B(k,R[1]),q&4&&C.value!==R[2]&&B(C,R[2]),q&8&&P.value!==R[3]&&B(P,R[3]),q&32&&(Q.checked=R[5]);const We={};q&16&&(We.json=R[4]),be.$set(We)},i(R){ee||(ze(be.$$.fragment,R),ee=!0)},o(R){Re(be.$$.fragment,R),ee=!1},d(R){R&&p(t),R&&p(A),R&&p(D),R&&p(F),R&&p(W),R&&p(j),R&&p(S),R&&p(M),R&&p(N),R&&p(U),R&&p(J),R&&p(x),R&&p(ne),R&&p(Y),R&&p(_e),R&&p(O),R&&p($),R&&p(ie),R&&p(oe),R&&p(Z),R&&p(pe),R&&p(re),Gt(be,R),ke=!1,se(Ae)}}}function br(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const D=await Zn().catch(j=>{throw o(j),j}),W={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?W.body=et.json(JSON.parse(l)):l!==""&&(W.body=et.text(l)),D.request(W).then(o).catch(o)}let d="baz",c="qux",f=null,v=!0;async function k(){const D=await Zn().catch(F=>{throw o(F),F});n(4,f=await D.request({url:"http://localhost:3003",method:"POST",body:et.form({foo:d,bar:c}),headers:v?{"Content-Type":"multipart/form-data"}:void 0,responseType:Ui.Text}))}function _(){i=Ei(this),n(0,i)}function y(){l=this.value,n(1,l)}function g(){d=this.value,n(2,d)}function b(){c=this.value,n(3,c)}function A(){v=this.checked,n(5,v)}return e.$$set=D=>{"onMessage"in D&&n(8,o=D.onMessage)},[i,l,d,c,f,v,u,k,o,_,y,g,b,A]}class gr extends we{constructor(t){super(),ye(this,t,br,_r,me,{onMessage:8})}}function vr(e){let t,n,i;return{c(){t=r("button"),t.textContent="Send test notification",a(t,"class","btn"),a(t,"id","notification")},m(l,o){m(l,t,o),n||(i=E(t,"click",yr),n=!0)},p:V,i:V,o:V,d(l){l&&p(t),n=!1,i()}}}function yr(){new Notification("Notification title",{body:"This is the notification body"})}function wr(e,t,n){let{onMessage:i}=t;return e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class kr extends we{constructor(t){super(),ye(this,t,wr,vr,me,{onMessage:0})}}function xl(e,t,n){const i=e.slice();return i[67]=t[n],i}function es(e,t,n){const i=e.slice();return i[70]=t[n],i}function ts(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;f<d.length;f+=1)c[f]=ns(es(e,d,f));return{c(){t=r("span"),t.textContent="Selected window:",n=h(),i=r("select"),l=r("option"),l.textContent="Choose a window...";for(let f=0;f<c.length;f+=1)c[f].c();a(t,"class","font-700 text-sm"),l.__value="",l.value=l.__value,l.disabled=!0,l.selected=!0,a(i,"class","input"),e[0]===void 0&&Dt(()=>e[39].call(i))},m(f,v){m(f,t,v),m(f,n,v),m(f,i,v),s(i,l);for(let k=0;k<c.length;k+=1)c[k].m(i,null);zt(i,e[0]),o||(u=E(i,"change",e[39]),o=!0)},p(f,v){if(v[0]&2){d=Object.keys(f[1]);let k;for(k=0;k<d.length;k+=1){const _=es(f,d,k);c[k]?c[k].p(_,v):(c[k]=ns(_),c[k].c(),c[k].m(i,null))}for(;k<c.length;k+=1)c[k].d(1);c.length=d.length}v[0]&3&&zt(i,f[0])},d(f){f&&p(t),f&&p(n),f&&p(i),ft(c,f),o=!1,u()}}}function ns(e){let t,n=e[70]+"",i,l;return{c(){t=r("option"),i=z(n),t.__value=l=e[70],t.value=t.__value},m(o,u){m(o,t,u),s(t,i)},p(o,u){u[0]&2&&n!==(n=o[70]+"")&&K(i,n),u[0]&2&&l!==(l=o[70])&&(t.__value=l,t.value=t.__value)},d(o){o&&p(t)}}}function is(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j,S,C,T,P,M,N,U,J,Q,he,x,ne,Y,_e,O,$,ie,oe,Z,pe,re,be,ee,ke,Ae,R,q,We,Le,Me,ae,de,ue,Se,tt,fe,ce,H,te,G,ge,Yt,ht,$t,Oe,Kt,Ue,_t,Qt,X,Pt,nt,Wt,De,bt,gt,vt,Ee,Ie,Pe,it,Ot,lt,Rt,st=e[26].width+"",yt,It,wt,Bi,Zt=e[26].height+"",ii,Vi,qe,xt,Gi,en,Ji,tn=e[27].width+"",li,Xi,nn,Yi,ln=e[27].height+"",si,$i,kt,Be,sn,Ki,on,Qi,rn=e[26].toLogical(e[23]).width+"",oi,Zi,an,xi,un=e[26].toLogical(e[23]).height+"",ri,el,Ve,cn,tl,dn,nl,fn=e[27].toLogical(e[23]).width+"",ai,il,pn,ll,mn=e[27].toLogical(e[23]).height+"",ui,sl,Mt,Ge,hn,ol,_n,rl,bn=e[24].x+"",ci,al,gn,ul,vn=e[24].y+"",di,cl,Je,yn,dl,wn,fl,kn=e[25].x+"",fi,pl,Mn,ml,Cn=e[25].y+"",pi,hl,Ct,Xe,Tn,_l,An,bl,Ln=e[24].toLogical(e[23]).x+"",mi,gl,Sn,vl,En=e[24].toLogical(e[23]).y+"",hi,yl,Ye,zn,wl,Dn,kl,Pn=e[25].toLogical(e[23]).x+"",_i,Ml,Wn,Cl,On=e[25].toLogical(e[23]).y+"",bi,gi,vi,yi,Ht,wi,He,Rn,Tt,Tl,Al,In,At,Ll,Sl,Hn,Lt,El,ki,Fe,Fn,zl,Ne,Dl,Nn,Pl,$e,Wl,jn,Ol,Ke,Mi,Ci,Ti,ot,rt,Qe,Rl,Ft,Il,at,Ze,Hl,Nt,Ai,Fl,St=e[29],Ce=[];for(let w=0;w<St.length;w+=1)Ce[w]=ls(xl(e,St,w));return{c(){t=r("br"),n=h(),i=r("div"),l=r("button"),l.textContent="Center",o=h(),u=r("button"),u.textContent="Minimize",d=h(),c=r("button"),c.textContent="Hide",f=h(),v=r("button"),v.textContent="Change icon",k=h(),_=r("button"),_.textContent="Request attention",y=h(),g=r("br"),b=h(),A=r("div"),D=r("label"),F=z(`Maximized
- `),W=r("input"),j=h(),S=r("label"),C=z(`Resizable
- `),T=r("input"),P=h(),M=r("label"),N=z(`Has decorations
- `),U=r("input"),J=h(),Q=r("label"),he=z(`Always on top
- `),x=r("input"),ne=h(),Y=r("label"),_e=z(`Fullscreen
- `),O=r("input"),$=h(),ie=r("br"),oe=h(),Z=r("div"),pe=r("div"),re=r("div"),be=z(`X
- `),ee=r("input"),ke=h(),Ae=r("div"),R=z(`Y
- `),q=r("input"),We=h(),Le=r("div"),Me=r("div"),ae=z(`Width
- `),de=r("input"),ue=h(),Se=r("div"),tt=z(`Height
- `),fe=r("input"),ce=h(),H=r("div"),te=r("div"),G=z(`Min width
- `),ge=r("input"),Yt=h(),ht=r("div"),$t=z(`Min height
- `),Oe=r("input"),Kt=h(),Ue=r("div"),_t=r("div"),Qt=z(`Max width
- `),X=r("input"),Pt=h(),nt=r("div"),Wt=z(`Max height
- `),De=r("input"),bt=h(),gt=r("br"),vt=h(),Ee=r("div"),Ie=r("div"),Pe=r("div"),it=r("div"),it.textContent="Inner Size",Ot=h(),lt=r("span"),Rt=z("Width: "),yt=z(st),It=h(),wt=r("span"),Bi=z("Height: "),ii=z(Zt),Vi=h(),qe=r("div"),xt=r("div"),xt.textContent="Outer Size",Gi=h(),en=r("span"),Ji=z("Width: "),li=z(tn),Xi=h(),nn=r("span"),Yi=z("Height: "),si=z(ln),$i=h(),kt=r("div"),Be=r("div"),sn=r("div"),sn.textContent="Inner Logical Size",Ki=h(),on=r("span"),Qi=z("Width: "),oi=z(rn),Zi=h(),an=r("span"),xi=z("Height: "),ri=z(un),el=h(),Ve=r("div"),cn=r("div"),cn.textContent="Outer Logical Size",tl=h(),dn=r("span"),nl=z("Width: "),ai=z(fn),il=h(),pn=r("span"),ll=z("Height: "),ui=z(mn),sl=h(),Mt=r("div"),Ge=r("div"),hn=r("div"),hn.textContent="Inner Position",ol=h(),_n=r("span"),rl=z("x: "),ci=z(bn),al=h(),gn=r("span"),ul=z("y: "),di=z(vn),cl=h(),Je=r("div"),yn=r("div"),yn.textContent="Outer Position",dl=h(),wn=r("span"),fl=z("x: "),fi=z(kn),pl=h(),Mn=r("span"),ml=z("y: "),pi=z(Cn),hl=h(),Ct=r("div"),Xe=r("div"),Tn=r("div"),Tn.textContent="Inner Logical Position",_l=h(),An=r("span"),bl=z("x: "),mi=z(Ln),gl=h(),Sn=r("span"),vl=z("y: "),hi=z(En),yl=h(),Ye=r("div"),zn=r("div"),zn.textContent="Outer Logical Position",wl=h(),Dn=r("span"),kl=z("x: "),_i=z(Pn),Ml=h(),Wn=r("span"),Cl=z("y: "),bi=z(On),gi=h(),vi=r("br"),yi=h(),Ht=r("h4"),Ht.textContent="Cursor",wi=h(),He=r("div"),Rn=r("label"),Tt=r("input"),Tl=z(`
- Grab`),Al=h(),In=r("label"),At=r("input"),Ll=z(`
- Visible`),Sl=h(),Hn=r("label"),Lt=r("input"),El=z(`
- Ignore events`),ki=h(),Fe=r("div"),Fn=r("label"),zl=z(`Icon
- `),Ne=r("select");for(let w=0;w<Ce.length;w+=1)Ce[w].c();Dl=h(),Nn=r("label"),Pl=z(`X position
- `),$e=r("input"),Wl=h(),jn=r("label"),Ol=z(`Y position
- `),Ke=r("input"),Mi=h(),Ci=r("br"),Ti=h(),ot=r("div"),rt=r("form"),Qe=r("input"),Rl=h(),Ft=r("button"),Ft.textContent="Set title",Il=h(),at=r("form"),Ze=r("input"),Hl=h(),Nt=r("button"),Nt.textContent="Open URL",a(l,"class","btn"),a(l,"title","Unminimizes after 2 seconds"),a(u,"class","btn"),a(u,"title","Unminimizes after 2 seconds"),a(c,"class","btn"),a(c,"title","Visible again after 2 seconds"),a(v,"class","btn"),a(_,"class","btn"),a(_,"title","Minimizes the window, requests attention for 3s and then resets it"),a(i,"class","flex flex-wrap gap-2"),a(W,"type","checkbox"),a(T,"type","checkbox"),a(U,"type","checkbox"),a(x,"type","checkbox"),a(O,"type","checkbox"),a(A,"class","flex flex-wrap gap-2"),a(ee,"class","input"),a(ee,"type","number"),a(ee,"min","0"),a(q,"class","input"),a(q,"type","number"),a(q,"min","0"),a(pe,"class","flex children:grow flex-col"),a(de,"class","input"),a(de,"type","number"),a(de,"min","400"),a(fe,"class","input"),a(fe,"type","number"),a(fe,"min","400"),a(Le,"class","flex children:grow flex-col"),a(ge,"class","input"),a(ge,"type","number"),a(Oe,"class","input"),a(Oe,"type","number"),a(H,"class","flex children:grow flex-col"),a(X,"class","input"),a(X,"type","number"),a(X,"min","800"),a(De,"class","input"),a(De,"type","number"),a(De,"min","400"),a(Ue,"class","flex children:grow flex-col"),a(Z,"class","flex flex-row gap-2 flex-wrap"),a(it,"class","text-accent dark:text-darkAccent font-700"),a(Pe,"class","grow"),a(xt,"class","text-accent dark:text-darkAccent font-700"),a(qe,"class","grow"),a(Ie,"class","flex"),a(sn,"class","text-accent dark:text-darkAccent font-700"),a(Be,"class","grow"),a(cn,"class","text-accent dark:text-darkAccent font-700"),a(Ve,"class","grow"),a(kt,"class","flex"),a(hn,"class","text-accent dark:text-darkAccent font-700"),a(Ge,"class","grow"),a(yn,"class","text-accent dark:text-darkAccent font-700"),a(Je,"class","grow"),a(Mt,"class","flex"),a(Tn,"class","text-accent dark:text-darkAccent font-700"),a(Xe,"class","grow"),a(zn,"class","text-accent dark:text-darkAccent font-700"),a(Ye,"class","grow"),a(Ct,"class","flex"),a(Ht,"class","mb-2"),a(Tt,"type","checkbox"),a(At,"type","checkbox"),a(Lt,"type","checkbox"),a(He,"class","flex gap-2"),a(Ne,"class","input"),e[19]===void 0&&Dt(()=>e[57].call(Ne)),a($e,"class","input"),a($e,"type","number"),a(Ke,"class","input"),a(Ke,"type","number"),a(Fe,"class","flex gap-2"),a(Qe,"class","input grow"),a(Qe,"id","title"),a(Ft,"class","btn"),a(Ft,"type","submit"),a(rt,"class","flex gap-1"),a(Ze,"class","input grow"),a(Ze,"id","url"),a(Nt,"class","btn"),a(Nt,"id","open-url"),a(at,"class","flex gap-1"),a(ot,"class","flex flex-col gap-1")},m(w,I){m(w,t,I),m(w,n,I),m(w,i,I),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,v),s(i,k),s(i,_),m(w,y,I),m(w,g,I),m(w,b,I),m(w,A,I),s(A,D),s(D,F),s(D,W),W.checked=e[3],s(A,j),s(A,S),s(S,C),s(S,T),T.checked=e[2],s(A,P),s(A,M),s(M,N),s(M,U),U.checked=e[4],s(A,J),s(A,Q),s(Q,he),s(Q,x),x.checked=e[5],s(A,ne),s(A,Y),s(Y,_e),s(Y,O),O.checked=e[6],m(w,$,I),m(w,ie,I),m(w,oe,I),m(w,Z,I),s(Z,pe),s(pe,re),s(re,be),s(re,ee),B(ee,e[13]),s(pe,ke),s(pe,Ae),s(Ae,R),s(Ae,q),B(q,e[14]),s(Z,We),s(Z,Le),s(Le,Me),s(Me,ae),s(Me,de),B(de,e[7]),s(Le,ue),s(Le,Se),s(Se,tt),s(Se,fe),B(fe,e[8]),s(Z,ce),s(Z,H),s(H,te),s(te,G),s(te,ge),B(ge,e[9]),s(H,Yt),s(H,ht),s(ht,$t),s(ht,Oe),B(Oe,e[10]),s(Z,Kt),s(Z,Ue),s(Ue,_t),s(_t,Qt),s(_t,X),B(X,e[11]),s(Ue,Pt),s(Ue,nt),s(nt,Wt),s(nt,De),B(De,e[12]),m(w,bt,I),m(w,gt,I),m(w,vt,I),m(w,Ee,I),s(Ee,Ie),s(Ie,Pe),s(Pe,it),s(Pe,Ot),s(Pe,lt),s(lt,Rt),s(lt,yt),s(Pe,It),s(Pe,wt),s(wt,Bi),s(wt,ii),s(Ie,Vi),s(Ie,qe),s(qe,xt),s(qe,Gi),s(qe,en),s(en,Ji),s(en,li),s(qe,Xi),s(qe,nn),s(nn,Yi),s(nn,si),s(Ee,$i),s(Ee,kt),s(kt,Be),s(Be,sn),s(Be,Ki),s(Be,on),s(on,Qi),s(on,oi),s(Be,Zi),s(Be,an),s(an,xi),s(an,ri),s(kt,el),s(kt,Ve),s(Ve,cn),s(Ve,tl),s(Ve,dn),s(dn,nl),s(dn,ai),s(Ve,il),s(Ve,pn),s(pn,ll),s(pn,ui),s(Ee,sl),s(Ee,Mt),s(Mt,Ge),s(Ge,hn),s(Ge,ol),s(Ge,_n),s(_n,rl),s(_n,ci),s(Ge,al),s(Ge,gn),s(gn,ul),s(gn,di),s(Mt,cl),s(Mt,Je),s(Je,yn),s(Je,dl),s(Je,wn),s(wn,fl),s(wn,fi),s(Je,pl),s(Je,Mn),s(Mn,ml),s(Mn,pi),s(Ee,hl),s(Ee,Ct),s(Ct,Xe),s(Xe,Tn),s(Xe,_l),s(Xe,An),s(An,bl),s(An,mi),s(Xe,gl),s(Xe,Sn),s(Sn,vl),s(Sn,hi),s(Ct,yl),s(Ct,Ye),s(Ye,zn),s(Ye,wl),s(Ye,Dn),s(Dn,kl),s(Dn,_i),s(Ye,Ml),s(Ye,Wn),s(Wn,Cl),s(Wn,bi),m(w,gi,I),m(w,vi,I),m(w,yi,I),m(w,Ht,I),m(w,wi,I),m(w,He,I),s(He,Rn),s(Rn,Tt),Tt.checked=e[15],s(Rn,Tl),s(He,Al),s(He,In),s(In,At),At.checked=e[16],s(In,Ll),s(He,Sl),s(He,Hn),s(Hn,Lt),Lt.checked=e[20],s(Hn,El),m(w,ki,I),m(w,Fe,I),s(Fe,Fn),s(Fn,zl),s(Fn,Ne);for(let ve=0;ve<Ce.length;ve+=1)Ce[ve].m(Ne,null);zt(Ne,e[19]),s(Fe,Dl),s(Fe,Nn),s(Nn,Pl),s(Nn,$e),B($e,e[17]),s(Fe,Wl),s(Fe,jn),s(jn,Ol),s(jn,Ke),B(Ke,e[18]),m(w,Mi,I),m(w,Ci,I),m(w,Ti,I),m(w,ot,I),s(ot,rt),s(rt,Qe),B(Qe,e[28]),s(rt,Rl),s(rt,Ft),s(ot,Il),s(ot,at),s(at,Ze),B(Ze,e[22]),s(at,Hl),s(at,Nt),Ai||(Fl=[E(l,"click",e[40]),E(u,"click",e[33]),E(c,"click",e[32]),E(v,"click",e[34]),E(_,"click",e[36]),E(W,"change",e[41]),E(T,"change",e[42]),E(U,"change",e[43]),E(x,"change",e[44]),E(O,"change",e[45]),E(ee,"input",e[46]),E(q,"input",e[47]),E(de,"input",e[48]),E(fe,"input",e[49]),E(ge,"input",e[50]),E(Oe,"input",e[51]),E(X,"input",e[52]),E(De,"input",e[53]),E(Tt,"change",e[54]),E(At,"change",e[55]),E(Lt,"change",e[56]),E(Ne,"change",e[57]),E($e,"input",e[58]),E(Ke,"input",e[59]),E(Qe,"input",e[60]),E(rt,"submit",Xn(e[31])),E(Ze,"input",e[61]),E(at,"submit",Xn(e[30]))],Ai=!0)},p(w,I){if(I[0]&8&&(W.checked=w[3]),I[0]&4&&(T.checked=w[2]),I[0]&16&&(U.checked=w[4]),I[0]&32&&(x.checked=w[5]),I[0]&64&&(O.checked=w[6]),I[0]&8192&&le(ee.value)!==w[13]&&B(ee,w[13]),I[0]&16384&&le(q.value)!==w[14]&&B(q,w[14]),I[0]&128&&le(de.value)!==w[7]&&B(de,w[7]),I[0]&256&&le(fe.value)!==w[8]&&B(fe,w[8]),I[0]&512&&le(ge.value)!==w[9]&&B(ge,w[9]),I[0]&1024&&le(Oe.value)!==w[10]&&B(Oe,w[10]),I[0]&2048&&le(X.value)!==w[11]&&B(X,w[11]),I[0]&4096&&le(De.value)!==w[12]&&B(De,w[12]),I[0]&67108864&&st!==(st=w[26].width+"")&&K(yt,st),I[0]&67108864&&Zt!==(Zt=w[26].height+"")&&K(ii,Zt),I[0]&134217728&&tn!==(tn=w[27].width+"")&&K(li,tn),I[0]&134217728&&ln!==(ln=w[27].height+"")&&K(si,ln),I[0]&75497472&&rn!==(rn=w[26].toLogical(w[23]).width+"")&&K(oi,rn),I[0]&75497472&&un!==(un=w[26].toLogical(w[23]).height+"")&&K(ri,un),I[0]&142606336&&fn!==(fn=w[27].toLogical(w[23]).width+"")&&K(ai,fn),I[0]&142606336&&mn!==(mn=w[27].toLogical(w[23]).height+"")&&K(ui,mn),I[0]&16777216&&bn!==(bn=w[24].x+"")&&K(ci,bn),I[0]&16777216&&vn!==(vn=w[24].y+"")&&K(di,vn),I[0]&33554432&&kn!==(kn=w[25].x+"")&&K(fi,kn),I[0]&33554432&&Cn!==(Cn=w[25].y+"")&&K(pi,Cn),I[0]&25165824&&Ln!==(Ln=w[24].toLogical(w[23]).x+"")&&K(mi,Ln),I[0]&25165824&&En!==(En=w[24].toLogical(w[23]).y+"")&&K(hi,En),I[0]&41943040&&Pn!==(Pn=w[25].toLogical(w[23]).x+"")&&K(_i,Pn),I[0]&41943040&&On!==(On=w[25].toLogical(w[23]).y+"")&&K(bi,On),I[0]&32768&&(Tt.checked=w[15]),I[0]&65536&&(At.checked=w[16]),I[0]&1048576&&(Lt.checked=w[20]),I[0]&536870912){St=w[29];let ve;for(ve=0;ve<St.length;ve+=1){const Nl=xl(w,St,ve);Ce[ve]?Ce[ve].p(Nl,I):(Ce[ve]=ls(Nl),Ce[ve].c(),Ce[ve].m(Ne,null))}for(;ve<Ce.length;ve+=1)Ce[ve].d(1);Ce.length=St.length}I[0]&537395200&&zt(Ne,w[19]),I[0]&131072&&le($e.value)!==w[17]&&B($e,w[17]),I[0]&262144&&le(Ke.value)!==w[18]&&B(Ke,w[18]),I[0]&268435456&&Qe.value!==w[28]&&B(Qe,w[28]),I[0]&4194304&&Ze.value!==w[22]&&B(Ze,w[22])},d(w){w&&p(t),w&&p(n),w&&p(i),w&&p(y),w&&p(g),w&&p(b),w&&p(A),w&&p($),w&&p(ie),w&&p(oe),w&&p(Z),w&&p(bt),w&&p(gt),w&&p(vt),w&&p(Ee),w&&p(gi),w&&p(vi),w&&p(yi),w&&p(Ht),w&&p(wi),w&&p(He),w&&p(ki),w&&p(Fe),ft(Ce,w),w&&p(Mi),w&&p(Ci),w&&p(Ti),w&&p(ot),Ai=!1,se(Fl)}}}function ls(e){let t,n=e[67]+"",i,l;return{c(){t=r("option"),i=z(n),t.__value=l=e[67],t.value=t.__value},m(o,u){m(o,t,u),s(t,i)},p:V,d(o){o&&p(t)}}}function Mr(e){let t,n,i,l,o,u,d,c,f=Object.keys(e[1]).length>=1,v,k,_,y=f&&ts(e),g=e[1][e[0]]&&is(e);return{c(){t=r("div"),n=r("div"),i=r("input"),l=h(),o=r("button"),o.textContent="New window",u=h(),d=r("br"),c=h(),y&&y.c(),v=h(),g&&g.c(),a(i,"class","input grow"),a(i,"type","text"),a(i,"placeholder","New Window label.."),a(o,"class","btn"),a(n,"class","flex gap-1"),a(t,"class","flex flex-col children:grow gap-2")},m(b,A){m(b,t,A),s(t,n),s(n,i),B(i,e[21]),s(n,l),s(n,o),s(t,u),s(t,d),s(t,c),y&&y.m(t,null),s(t,v),g&&g.m(t,null),k||(_=[E(i,"input",e[38]),E(o,"click",e[35])],k=!0)},p(b,A){A[0]&2097152&&i.value!==b[21]&&B(i,b[21]),A[0]&2&&(f=Object.keys(b[1]).length>=1),f?y?y.p(b,A):(y=ts(b),y.c(),y.m(t,v)):y&&(y.d(1),y=null),b[1][b[0]]?g?g.p(b,A):(g=is(b),g.c(),g.m(t,null)):g&&(g.d(1),g=null)},i:V,o:V,d(b){b&&p(t),y&&y.d(),g&&g.d(),k=!1,se(_)}}}function Cr(e,t,n){let i=je.label;const l={[je.label]:je},o=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:u}=t,d,c="https://tauri.app",f=!0,v=!1,k=!0,_=!1,y=!1,g=null,b=null,A=null,D=null,F=null,W=null,j=null,S=null,C=1,T=new xe(j,S),P=new xe(j,S),M=new dt(g,b),N=new dt(g,b),U,J,Q=!1,he=!0,x=null,ne=null,Y="default",_e=!1,O="Awesome Tauri Example!";function $(){Oi(c)}function ie(){l[i].setTitle(O)}function oe(){l[i].hide(),setTimeout(l[i].show,2e3)}function Z(){l[i].minimize(),setTimeout(l[i].unminimize,2e3)}function pe(){Ni({multiple:!1}).then(X=>{typeof X=="string"&&l[i].setIcon(X)})}function re(){if(!d)return;const X=new mt(d);n(1,l[d]=X,l),X.once("tauri://error",function(){u("Error creating new webview")})}function be(){l[i].innerSize().then(X=>{n(26,M=X),n(7,g=M.width),n(8,b=M.height)}),l[i].outerSize().then(X=>{n(27,N=X)})}function ee(){l[i].innerPosition().then(X=>{n(24,T=X)}),l[i].outerPosition().then(X=>{n(25,P=X),n(13,j=P.x),n(14,S=P.y)})}async function ke(X){!X||(U&&U(),J&&J(),J=await X.listen("tauri://move",ee),U=await X.listen("tauri://resize",be))}async function Ae(){await l[i].minimize(),await l[i].requestUserAttention(Ii.Critical),await new Promise(X=>setTimeout(X,3e3)),await l[i].requestUserAttention(null)}function R(){d=this.value,n(21,d)}function q(){i=Ei(this),n(0,i),n(1,l)}const We=()=>l[i].center();function Le(){v=this.checked,n(3,v)}function Me(){f=this.checked,n(2,f)}function ae(){k=this.checked,n(4,k)}function de(){_=this.checked,n(5,_)}function ue(){y=this.checked,n(6,y)}function Se(){j=le(this.value),n(13,j)}function tt(){S=le(this.value),n(14,S)}function fe(){g=le(this.value),n(7,g)}function ce(){b=le(this.value),n(8,b)}function H(){A=le(this.value),n(9,A)}function te(){D=le(this.value),n(10,D)}function G(){F=le(this.value),n(11,F)}function ge(){W=le(this.value),n(12,W)}function Yt(){Q=this.checked,n(15,Q)}function ht(){he=this.checked,n(16,he)}function $t(){_e=this.checked,n(20,_e)}function Oe(){Y=Ei(this),n(19,Y),n(29,o)}function Kt(){x=le(this.value),n(17,x)}function Ue(){ne=le(this.value),n(18,ne)}function _t(){O=this.value,n(28,O)}function Qt(){c=this.value,n(22,c)}return e.$$set=X=>{"onMessage"in X&&n(37,u=X.onMessage)},e.$$.update=()=>{var X,Pt,nt,Wt,De,bt,gt,vt,Ee,Ie,Pe,it,Ot,lt,Rt,st,yt,It;e.$$.dirty[0]&3&&(l[i],ee(),be()),e.$$.dirty[0]&7&&((X=l[i])==null||X.setResizable(f)),e.$$.dirty[0]&11&&(v?(Pt=l[i])==null||Pt.maximize():(nt=l[i])==null||nt.unmaximize()),e.$$.dirty[0]&19&&((Wt=l[i])==null||Wt.setDecorations(k)),e.$$.dirty[0]&35&&((De=l[i])==null||De.setAlwaysOnTop(_)),e.$$.dirty[0]&67&&((bt=l[i])==null||bt.setFullscreen(y)),e.$$.dirty[0]&387&&g&&b&&((gt=l[i])==null||gt.setSize(new dt(g,b))),e.$$.dirty[0]&1539&&(A&&D?(vt=l[i])==null||vt.setMinSize(new Qn(A,D)):(Ee=l[i])==null||Ee.setMinSize(null)),e.$$.dirty[0]&6147&&(F>800&&W>400?(Ie=l[i])==null||Ie.setMaxSize(new Qn(F,W)):(Pe=l[i])==null||Pe.setMaxSize(null)),e.$$.dirty[0]&24579&&j!==null&&S!==null&&((it=l[i])==null||it.setPosition(new xe(j,S))),e.$$.dirty[0]&3&&((Ot=l[i])==null||Ot.scaleFactor().then(wt=>n(23,C=wt))),e.$$.dirty[0]&3&&ke(l[i]),e.$$.dirty[0]&32771&&((lt=l[i])==null||lt.setCursorGrab(Q)),e.$$.dirty[0]&65539&&((Rt=l[i])==null||Rt.setCursorVisible(he)),e.$$.dirty[0]&524291&&((st=l[i])==null||st.setCursorIcon(Y)),e.$$.dirty[0]&393219&&x!==null&&ne!==null&&((yt=l[i])==null||yt.setCursorPosition(new xe(x,ne))),e.$$.dirty[0]&1048579&&((It=l[i])==null||It.setIgnoreCursorEvents(_e))},[i,l,f,v,k,_,y,g,b,A,D,F,W,j,S,Q,he,x,ne,Y,_e,d,c,C,T,P,M,N,O,o,$,ie,oe,Z,pe,re,Ae,u,R,q,We,Le,Me,ae,de,ue,Se,tt,fe,ce,H,te,G,ge,Yt,ht,$t,Oe,Kt,Ue,_t,Qt]}class Tr extends we{constructor(t){super(),ye(this,t,Cr,Mr,me,{onMessage:37},null,[-1,-1,-1])}}var Ar={};Te(Ar,{isRegistered:()=>Sr,register:()=>Ys,registerAll:()=>Lr,unregister:()=>$s,unregisterAll:()=>Ks});async function Ys(e,t){return L({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:pt(t)}})}async function Lr(e,t){return L({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:pt(t)}})}async function Sr(e){return L({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})}async function $s(e){return L({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function Ks(){return L({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function ss(e,t,n){const i=e.slice();return i[9]=t[n],i}function os(e){let t,n=e[9]+"",i,l,o,u,d;function c(){return e[8](e[9])}return{c(){t=r("div"),i=z(n),l=h(),o=r("button"),o.textContent="Unregister",a(o,"class","btn"),a(o,"type","button"),a(t,"class","flex justify-between")},m(f,v){m(f,t,v),s(t,i),s(t,l),s(t,o),u||(d=E(o,"click",c),u=!0)},p(f,v){e=f,v&2&&n!==(n=e[9]+"")&&K(i,n)},d(f){f&&p(t),u=!1,d()}}}function rs(e){let t,n,i,l,o;return{c(){t=r("br"),n=h(),i=r("button"),i.textContent="Unregister all",a(i,"class","btn"),a(i,"type","button")},m(u,d){m(u,t,d),m(u,n,d),m(u,i,d),l||(o=E(i,"click",e[5]),l=!0)},p:V,d(u){u&&p(t),u&&p(n),u&&p(i),l=!1,o()}}}function Er(e){let t,n,i,l,o,u,d,c,f,v,k,_=e[1],y=[];for(let b=0;b<_.length;b+=1)y[b]=os(ss(e,_,b));let g=e[1].length>1&&rs(e);return{c(){t=r("div"),n=r("input"),i=h(),l=r("button"),l.textContent="Register",o=h(),u=r("br"),d=h(),c=r("div");for(let b=0;b<y.length;b+=1)y[b].c();f=h(),g&&g.c(),a(n,"class","input grow"),a(n,"placeholder","Type a shortcut with '+' as separator..."),a(l,"class","btn"),a(l,"type","button"),a(t,"class","flex gap-1"),a(c,"class","flex flex-col gap-1")},m(b,A){m(b,t,A),s(t,n),B(n,e[0]),s(t,i),s(t,l),m(b,o,A),m(b,u,A),m(b,d,A),m(b,c,A);for(let D=0;D<y.length;D+=1)y[D].m(c,null);s(c,f),g&&g.m(c,null),v||(k=[E(n,"input",e[7]),E(l,"click",e[3])],v=!0)},p(b,[A]){if(A&1&&n.value!==b[0]&&B(n,b[0]),A&18){_=b[1];let D;for(D=0;D<_.length;D+=1){const F=ss(b,_,D);y[D]?y[D].p(F,A):(y[D]=os(F),y[D].c(),y[D].m(c,f))}for(;D<y.length;D+=1)y[D].d(1);y.length=_.length}b[1].length>1?g?g.p(b,A):(g=rs(b),g.c(),g.m(c,null)):g&&(g.d(1),g=null)},i:V,o:V,d(b){b&&p(t),b&&p(o),b&&p(u),b&&p(d),b&&p(c),ft(y,b),g&&g.d(),v=!1,se(k)}}}function zr(e,t,n){let i,{onMessage:l}=t;const o=ws([]);gs(e,o,_=>n(1,i=_));let u="CmdOrControl+X";function d(){const _=u;Ys(_,()=>{l(`Shortcut ${_} triggered`)}).then(()=>{o.update(y=>[...y,_]),l(`Shortcut ${_} registered successfully`)}).catch(l)}function c(_){const y=_;$s(y).then(()=>{o.update(g=>g.filter(b=>b!==y)),l(`Shortcut ${y} unregistered`)}).catch(l)}function f(){Ks().then(()=>{o.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function v(){u=this.value,n(0,u)}const k=_=>c(_);return e.$$set=_=>{"onMessage"in _&&n(6,l=_.onMessage)},[u,i,o,d,c,f,l,v,k]}class Dr extends we{constructor(t){super(),ye(this,t,zr,Er,me,{onMessage:6})}}function as(e){let t,n,i,l,o,u,d;return{c(){t=r("br"),n=h(),i=r("input"),l=h(),o=r("button"),o.textContent="Write",a(i,"class","input"),a(i,"placeholder","write to stdin"),a(o,"class","btn")},m(c,f){m(c,t,f),m(c,n,f),m(c,i,f),B(i,e[4]),m(c,l,f),m(c,o,f),u||(d=[E(i,"input",e[14]),E(o,"click",e[8])],u=!0)},p(c,f){f&16&&i.value!==c[4]&&B(i,c[4])},d(c){c&&p(t),c&&p(n),c&&p(i),c&&p(l),c&&p(o),u=!1,se(d)}}}function Pr(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j,S,C,T,P,M=e[5]&&as(e);return{c(){t=r("div"),n=r("div"),i=z(`Script:
- `),l=r("input"),o=h(),u=r("div"),d=z(`Encoding:
- `),c=r("input"),f=h(),v=r("div"),k=z(`Working directory:
- `),_=r("input"),y=h(),g=r("div"),b=z(`Arguments:
- `),A=r("input"),D=h(),F=r("div"),W=r("button"),W.textContent="Run",j=h(),S=r("button"),S.textContent="Kill",C=h(),M&&M.c(),a(l,"class","grow input"),a(n,"class","flex items-center gap-1"),a(c,"class","grow input"),a(u,"class","flex items-center gap-1"),a(_,"class","grow input"),a(_,"placeholder","Working directory"),a(v,"class","flex items-center gap-1"),a(A,"class","grow input"),a(A,"placeholder","Environment variables"),a(g,"class","flex items-center gap-1"),a(W,"class","btn"),a(S,"class","btn"),a(F,"class","flex children:grow gap-1"),a(t,"class","flex flex-col childre:grow gap-1")},m(N,U){m(N,t,U),s(t,n),s(n,i),s(n,l),B(l,e[0]),s(t,o),s(t,u),s(u,d),s(u,c),B(c,e[3]),s(t,f),s(t,v),s(v,k),s(v,_),B(_,e[1]),s(t,y),s(t,g),s(g,b),s(g,A),B(A,e[2]),s(t,D),s(t,F),s(F,W),s(F,j),s(F,S),s(t,C),M&&M.m(t,null),T||(P=[E(l,"input",e[10]),E(c,"input",e[11]),E(_,"input",e[12]),E(A,"input",e[13]),E(W,"click",e[6]),E(S,"click",e[7])],T=!0)},p(N,[U]){U&1&&l.value!==N[0]&&B(l,N[0]),U&8&&c.value!==N[3]&&B(c,N[3]),U&2&&_.value!==N[1]&&B(_,N[1]),U&4&&A.value!==N[2]&&B(A,N[2]),N[5]?M?M.p(N,U):(M=as(N),M.c(),M.m(t,null)):M&&(M.d(1),M=null)},i:V,o:V,d(N){N&&p(t),M&&M.d(),T=!1,se(P)}}}function Wr(e,t,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",o=i?["/C"]:["-c"],{onMessage:u}=t,d='echo "hello world"',c=null,f="SOMETHING=value ANOTHER=2",v="",k="",_;function y(){return f.split(" ").reduce((C,T)=>{let[P,M]=T.split("=");return{...C,[P]:M}},{})}function g(){n(5,_=null);const C=new Wi(l,[...o,d],{cwd:c||null,env:y(),encoding:v});C.on("close",T=>{u(`command finished with code ${T.code} and signal ${T.signal}`),n(5,_=null)}),C.on("error",T=>u(`command error: "${T}"`)),C.stdout.on("data",T=>u(`command stdout: "${T}"`)),C.stderr.on("data",T=>u(`command stderr: "${T}"`)),C.spawn().then(T=>{n(5,_=T)}).catch(u)}function b(){_.kill().then(()=>u("killed child process")).catch(u)}function A(){_.write(k).catch(u)}function D(){d=this.value,n(0,d)}function F(){v=this.value,n(3,v)}function W(){c=this.value,n(1,c)}function j(){f=this.value,n(2,f)}function S(){k=this.value,n(4,k)}return e.$$set=C=>{"onMessage"in C&&n(9,u=C.onMessage)},[d,c,f,v,k,_,g,b,A,u,D,F,W,j,S]}class Or extends we{constructor(t){super(),ye(this,t,Wr,Pr,me,{onMessage:9})}}var Rr={};Te(Rr,{checkUpdate:()=>Zs,installUpdate:()=>Qs,onUpdaterEvent:()=>qi});async function qi(e){return Xt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function Qs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error)return t(),i(o.error);if(o.status==="DONE")return t(),n()}qi(l).then(o=>{e=o}).catch(o=>{throw t(),o}),ni("tauri://update-install").catch(o=>{throw t(),o})})}async function Zs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){return t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error)return t(),i(u.error);if(u.status==="UPTODATE")return t(),n({shouldUpdate:!1})}Ss("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),qi(o).then(u=>{e=u}).catch(u=>{throw t(),u}),ni("tauri://update").catch(u=>{throw t(),u})})}function Ir(e){let t;return{c(){t=r("button"),t.innerHTML='<div class="spinner animate-spin svelte-4xesec"></div>',a(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){m(n,t,i)},p:V,d(n){n&&p(t)}}}function Hr(e){let t,n,i;return{c(){t=r("button"),t.textContent="Install update",a(t,"class","btn")},m(l,o){m(l,t,o),n||(i=E(t,"click",e[4]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function Fr(e){let t,n,i;return{c(){t=r("button"),t.textContent="Check update",a(t,"class","btn")},m(l,o){m(l,t,o),n||(i=E(t,"click",e[3]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function Nr(e){let t;function n(o,u){return!o[0]&&!o[2]?Fr:!o[1]&&o[2]?Hr:Ir}let i=n(e),l=i(e);return{c(){t=r("div"),l.c(),a(t,"class","flex children:grow children:h10")},m(o,u){m(o,t,u),l.m(t,null)},p(o,[u]){i===(i=n(o))&&l?l.p(o,u):(l.d(1),l=i(o),l&&(l.c(),l.m(t,null)))},i:V,o:V,d(o){o&&p(t),l.d()}}}function jr(e,t,n){let{onMessage:i}=t,l;ut(async()=>{l=await Xt("tauri://update-status",i)}),Pi(()=>{l&&l()});let o,u,d;async function c(){n(0,o=!0);try{const{shouldUpdate:v,manifest:k}=await Zs();i(`Should update: ${v}`),i(k),n(2,d=v)}catch(v){i(v)}finally{n(0,o=!1)}}async function f(){n(1,u=!0);try{await Qs(),i("Installation complete, restart required."),await Fi()}catch(v){i(v)}finally{n(1,u=!1)}}return e.$$set=v=>{"onMessage"in v&&n(5,i=v.onMessage)},[o,u,d,c,f,i]}class Ur extends we{constructor(t){super(),ye(this,t,jr,Nr,me,{onMessage:5})}}var qr={};Te(qr,{readText:()=>eo,writeText:()=>xs});async function xs(e){return L({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function eo(){return L({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}function Br(e){let t,n,i,l,o,u,d,c;return{c(){t=r("div"),n=r("input"),i=h(),l=r("button"),l.textContent="Write",o=h(),u=r("button"),u.textContent="Read",a(n,"class","grow input"),a(n,"placeholder","Text to write to the clipboard"),a(l,"class","btn"),a(l,"type","button"),a(u,"class","btn"),a(u,"type","button"),a(t,"class","flex gap-1")},m(f,v){m(f,t,v),s(t,n),B(n,e[0]),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[E(n,"input",e[4]),E(l,"click",e[1]),E(u,"click",e[2])],d=!0)},p(f,[v]){v&1&&n.value!==f[0]&&B(n,f[0])},i:V,o:V,d(f){f&&p(t),d=!1,se(c)}}}function Vr(e,t,n){let{onMessage:i}=t,l="clipboard message";function o(){xs(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){eo().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function d(){l=this.value,n(0,l)}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,o,u,i,d]}class Gr extends we{constructor(t){super(),ye(this,t,Vr,Br,me,{onMessage:3})}}function Jr(e){let t;return{c(){t=r("div"),t.innerHTML=`<div class="note-red grow">Not available for Linux</div>
- <video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`,a(t,"class","flex flex-col gap-2")},m(n,i){m(n,t,i)},p:V,i:V,o:V,d(n){n&&p(t)}}}function Xr(e,t,n){let{onMessage:i}=t;const l=window.constraints={audio:!0,video:!0};function o(d){const c=document.querySelector("video"),f=d.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=d,c.srcObject=d}function u(d){if(d.name==="ConstraintNotSatisfiedError"){const c=l.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else d.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${d.name}`,d)}return ut(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Pi(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class Yr extends we{constructor(t){super(),ye(this,t,Xr,Jr,me,{onMessage:0})}}function $r(e){let t,n,i,l,o,u;return{c(){t=r("div"),n=r("button"),n.textContent="Show",i=h(),l=r("button"),l.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(l,"class","btn"),a(l,"id","hide")},m(d,c){m(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[E(n,"click",e[0]),E(l,"click",e[1])],o=!0)},p:V,i:V,o:V,d(d){d&&p(t),o=!1,se(u)}}}function Kr(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{Fs().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return Ns().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class Qr extends we{constructor(t){super(),ye(this,t,Kr,$r,me,{onMessage:2})}}function us(e,t,n){const i=e.slice();return i[32]=t[n],i}function cs(e,t,n){const i=e.slice();return i[35]=t[n],i}function ds(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b;function A(C,T){return C[3]?xr:Zr}let D=A(e),F=D(e);function W(C,T){return C[2]?ta:ea}let j=W(e),S=j(e);return{c(){t=r("div"),n=r("span"),n.textContent="Tauri API Validation",i=h(),l=r("span"),o=r("span"),F.c(),d=h(),c=r("span"),c.innerHTML='<div class="i-codicon-chrome-minimize"></div>',f=h(),v=r("span"),S.c(),_=h(),y=r("span"),y.innerHTML='<div class="i-codicon-chrome-close"></div>',a(n,"class","lt-sm:pl-10 text-darkPrimaryText"),a(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),a(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(c,"title","Minimize"),a(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(v,"title",k=e[2]?"Restore":"Maximize"),a(v,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),a(y,"title","Close"),a(y,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),a(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),a(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),a(t,"data-tauri-drag-region","")},m(C,T){m(C,t,T),s(t,n),s(t,i),s(t,l),s(l,o),F.m(o,null),s(l,d),s(l,c),s(l,f),s(l,v),S.m(v,null),s(l,_),s(l,y),g||(b=[E(o,"click",e[12]),E(c,"click",e[9]),E(v,"click",e[10]),E(y,"click",e[11])],g=!0)},p(C,T){D!==(D=A(C))&&(F.d(1),F=D(C),F&&(F.c(),F.m(o,null))),T[0]&8&&u!==(u=C[3]?"Switch to Light mode":"Switch to Dark mode")&&a(o,"title",u),j!==(j=W(C))&&(S.d(1),S=j(C),S&&(S.c(),S.m(v,null))),T[0]&4&&k!==(k=C[2]?"Restore":"Maximize")&&a(v,"title",k)},d(C){C&&p(t),F.d(),S.d(),g=!1,se(b)}}}function Zr(e){let t;return{c(){t=r("div"),a(t,"class","i-ph-moon")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function xr(e){let t;return{c(){t=r("div"),a(t,"class","i-ph-sun")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ea(e){let t;return{c(){t=r("div"),a(t,"class","i-codicon-chrome-maximize")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ta(e){let t;return{c(){t=r("div"),a(t,"class","i-codicon-chrome-restore")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function na(e){let t;return{c(){t=r("span"),a(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function ia(e){let t;return{c(){t=r("span"),a(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function fs(e){let t,n,i,l,o,u,d,c,f;function v(y,g){return y[3]?sa:la}let k=v(e),_=k(e);return{c(){t=r("a"),_.c(),n=h(),i=r("br"),l=h(),o=r("div"),u=h(),d=r("br"),a(t,"href","##"),a(t,"class","nv justify-between h-8"),a(o,"class","bg-white/5 h-2px")},m(y,g){m(y,t,g),_.m(t,null),m(y,n,g),m(y,i,g),m(y,l,g),m(y,o,g),m(y,u,g),m(y,d,g),c||(f=E(t,"click",e[12]),c=!0)},p(y,g){k!==(k=v(y))&&(_.d(1),_=k(y),_&&(_.c(),_.m(t,null)))},d(y){y&&p(t),_.d(),y&&p(n),y&&p(i),y&&p(l),y&&p(o),y&&p(u),y&&p(d),c=!1,f()}}}function la(e){let t,n;return{c(){t=z(`Switch to Dark mode
- `),n=r("div"),a(n,"class","i-ph-moon")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function sa(e){let t,n;return{c(){t=z(`Switch to Light mode
- `),n=r("div"),a(n,"class","i-ph-sun")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function oa(e){let t,n,i,l,o,u=e[35].label+"",d,c,f,v;function k(){return e[20](e[35])}return{c(){t=r("a"),n=r("div"),l=h(),o=r("p"),d=z(u),a(n,"class",i=e[35].icon+" mr-2"),a(t,"href","##"),a(t,"class",c="nv "+(e[1]===e[35]?"nv_selected":""))},m(_,y){m(_,t,y),s(t,n),s(t,l),s(t,o),s(o,d),f||(v=E(t,"click",k),f=!0)},p(_,y){e=_,y[0]&2&&c!==(c="nv "+(e[1]===e[35]?"nv_selected":""))&&a(t,"class",c)},d(_){_&&p(t),f=!1,v()}}}function ps(e){let t,n=e[35]&&oa(e);return{c(){n&&n.c(),t=xn()},m(i,l){n&&n.m(i,l),m(i,t,l)},p(i,l){i[35]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function ms(e){let t,n=e[32].html+"",i;return{c(){t=new ao(!1),i=xn(),t.a=i},m(l,o){t.m(n,l,o),m(l,i,o)},p(l,o){o[0]&64&&n!==(n=l[32].html+"")&&t.p(n)},d(l){l&&p(i),l&&t.d()}}}function ra(e){let t,n,i,l,o,u,d,c,f,v,k,_,y,g,b,A,D,F,W,j,S,C,T,P,M,N,U,J=e[1].label+"",Q,he,x,ne,Y,_e,O,$,ie,oe,Z,pe,re,be,ee,ke,Ae,R,q=e[5]&&ds(e);function We(H,te){return H[0]?ia:na}let Le=We(e),Me=Le(e),ae=!e[5]&&fs(e),de=e[7],ue=[];for(let H=0;H<de.length;H+=1)ue[H]=ps(cs(e,de,H));var Se=e[1].component;function tt(H){return{props:{onMessage:H[14],insecureRenderHtml:H[15]}}}Se&&(Y=new Se(tt(e)));let fe=e[6],ce=[];for(let H=0;H<fe.length;H+=1)ce[H]=ms(us(e,fe,H));return{c(){q&&q.c(),t=h(),n=r("div"),Me.c(),i=h(),l=r("div"),o=r("aside"),u=r("img"),c=h(),ae&&ae.c(),f=h(),v=r("a"),v.innerHTML=`Documentation
- <span class="i-codicon-link-external"></span>`,k=h(),_=r("a"),_.innerHTML=`GitHub
- <span class="i-codicon-link-external"></span>`,y=h(),g=r("a"),g.innerHTML=`Source
- <span class="i-codicon-link-external"></span>`,b=h(),A=r("br"),D=h(),F=r("div"),W=h(),j=r("br"),S=h(),C=r("div");for(let H=0;H<ue.length;H+=1)ue[H].c();P=h(),M=r("main"),N=r("div"),U=r("h1"),Q=z(J),he=h(),x=r("div"),ne=r("div"),Y&&$n(Y.$$.fragment),_e=h(),O=r("div"),$=r("div"),ie=h(),oe=r("div"),Z=r("p"),Z.textContent="Console",pe=h(),re=r("div"),re.innerHTML='<div class="i-codicon-clear-all"></div>',be=h(),ee=r("div");for(let H=0;H<ce.length;H+=1)ce[H].c();a(n,"id","sidebarToggle"),a(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"),a(u,"class","self-center p-7 cursor-pointer"),io(u.src,d="tauri_logo.png")||a(u,"src",d),a(u,"alt","Tauri logo"),a(v,"class","nv justify-between h-8"),a(v,"target","_blank"),a(v,"href","https://tauri.app/v1/guides/"),a(_,"class","nv justify-between h-8"),a(_,"target","_blank"),a(_,"href","https://github.com/tauri-apps/tauri"),a(g,"class","nv justify-between h-8"),a(g,"target","_blank"),a(g,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),a(F,"class","bg-white/5 h-2px"),a(C,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),a(o,"id","sidebar"),a(o,"class",T="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 "+(e[5]?"bg-darkPrimaryLighter/60 lt-sm:bg-darkPrimaryLighter":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"),a(ne,"class","mr-2"),a(x,"class","overflow-y-auto"),a(N,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),a($,"class","bg-black/20 h-2px cursor-ns-resize"),a(Z,"class","font-semibold"),a(re,"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 "),a(oe,"class","flex justify-between items-center px-2"),a(ee,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),a(O,"id","console"),a(O,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),a(M,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),a(l,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(H,te){q&&q.m(H,te),m(H,t,te),m(H,n,te),Me.m(n,null),m(H,i,te),m(H,l,te),s(l,o),s(o,u),s(o,c),ae&&ae.m(o,null),s(o,f),s(o,v),s(o,k),s(o,_),s(o,y),s(o,g),s(o,b),s(o,A),s(o,D),s(o,F),s(o,W),s(o,j),s(o,S),s(o,C);for(let G=0;G<ue.length;G+=1)ue[G].m(C,null);s(l,P),s(l,M),s(M,N),s(N,U),s(U,Q),s(N,he),s(N,x),s(x,ne),Y&&Vt(Y,ne,null),s(M,_e),s(M,O),s(O,$),s(O,ie),s(O,oe),s(oe,Z),s(oe,pe),s(oe,re),s(O,be),s(O,ee);for(let G=0;G<ce.length;G+=1)ce[G].m(ee,null);e[21](O),ke=!0,Ae||(R=[E(u,"click",e[19]),E($,"mousedown",e[17]),E(re,"click",e[16])],Ae=!0)},p(H,te){if(H[5]?q?q.p(H,te):(q=ds(H),q.c(),q.m(t.parentNode,t)):q&&(q.d(1),q=null),Le!==(Le=We(H))&&(Me.d(1),Me=Le(H),Me&&(Me.c(),Me.m(n,null))),H[5]?ae&&(ae.d(1),ae=null):ae?ae.p(H,te):(ae=fs(H),ae.c(),ae.m(o,f)),te[0]&387){de=H[7];let G;for(G=0;G<de.length;G+=1){const ge=cs(H,de,G);ue[G]?ue[G].p(ge,te):(ue[G]=ps(ge),ue[G].c(),ue[G].m(C,null))}for(;G<ue.length;G+=1)ue[G].d(1);ue.length=de.length}if((!ke||te[0]&32&&T!==(T="lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 "+(H[5]?"bg-darkPrimaryLighter/60 lt-sm:bg-darkPrimaryLighter":"bg-darkPrimaryLighter")+" transition-colors-250 overflow-hidden grid select-none px-2"))&&a(o,"class",T),(!ke||te[0]&2)&&J!==(J=H[1].label+"")&&K(Q,J),Se!==(Se=H[1].component)){if(Y){ei();const G=Y;Re(G.$$.fragment,1,0,()=>{Gt(G,1)}),ti()}Se?(Y=new Se(tt(H)),$n(Y.$$.fragment),ze(Y.$$.fragment,1),Vt(Y,ne,null)):Y=null}if(te[0]&64){fe=H[6];let G;for(G=0;G<fe.length;G+=1){const ge=us(H,fe,G);ce[G]?ce[G].p(ge,te):(ce[G]=ms(ge),ce[G].c(),ce[G].m(ee,null))}for(;G<ce.length;G+=1)ce[G].d(1);ce.length=fe.length}},i(H){ke||(Y&&ze(Y.$$.fragment,H),ke=!0)},o(H){Y&&Re(Y.$$.fragment,H),ke=!1},d(H){q&&q.d(H),H&&p(t),H&&p(n),Me.d(),H&&p(i),H&&p(l),ae&&ae.d(),ft(ue,H),Y&&Gt(Y),ft(ce,H),e[21](null),Ae=!1,se(R)}}}let hs=50;function _s(e){const t=document.querySelector("html");e?t.classList.add("dark"):t.classList.remove("dark"),localStorage&&localStorage.setItem("theme",e?"dark":"")}function aa(e,t){e.style.setProperty("--translate-x",`${t?"0":"-18.75"}rem`)}function ua(e,t,n){let i;je.label!=="main"&&je.onCloseRequested(async O=>{await confirm("Are you sure?")||O.preventDefault()}),je.onFileDropEvent(O=>{D(`File drop: ${JSON.stringify(O.payload)}`)});const l=navigator.userAgent.toLowerCase(),o=l.includes("android")||l.includes("iphone"),u=[{label:"Welcome",component:Ro,icon:"i-ph-hand-waving"},{label:"Communication",component:qo,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:No,icon:"i-codicon-terminal"},!o&&{label:"Dialog",component:lr,icon:"i-codicon-multiple-windows"},{label:"File system",component:ar,icon:"i-codicon-files"},{label:"HTTP",component:gr,icon:"i-ph-globe-hemisphere-west"},!o&&{label:"Notifications",component:kr,icon:"i-codicon-bell-dot"},!o&&{label:"App",component:Qr,icon:"i-codicon-hubot"},!o&&{label:"Window",component:Tr,icon:"i-codicon-window"},!o&&{label:"Shortcuts",component:Dr,icon:"i-codicon-record-keys"},{label:"Shell",component:Or,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:Ur,icon:"i-codicon-cloud-download"},!o&&{label:"Clipboard",component:Gr,icon:"i-codicon-clippy"},{label:"WebRTC",component:Yr,icon:"i-ph-broadcast"}];let d=u[0];function c(O){n(1,d=O)}let f;ut(async()=>{const O=Ut();n(2,f=await O.isMaximized()),Xt("tauri://resize",async()=>{n(2,f=await O.isMaximized())})});function v(){Ut().minimize()}async function k(){const O=Ut();await O.isMaximized()?O.unmaximize():O.maximize()}let _=!1;async function y(){_||(_=await Bs("Are you sure that you want to close this window?",{title:"Tauri API"}),_&&Ut().close())}let g;ut(()=>{n(3,g=localStorage&&localStorage.getItem("theme")=="dark"),_s(g)});function b(){n(3,g=!g),_s(g)}let A=ws([]);gs(e,A,O=>n(6,i=O));function D(O){A.update($=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+(typeof O=="string"?O:JSON.stringify(O,null,1))+"</pre>"},...$])}function F(O){A.update($=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+O+"</pre>"},...$])}function W(){A.update(()=>[])}let j,S,C;function T(O){C=O.clientY;const $=window.getComputedStyle(j);S=parseInt($.height,10);const ie=Z=>{const pe=Z.clientY-C,re=S-pe;n(4,j.style.height=`${re<hs?hs:re}px`,j)},oe=()=>{document.removeEventListener("mouseup",oe),document.removeEventListener("mousemove",ie)};document.addEventListener("mouseup",oe),document.addEventListener("mousemove",ie)}let P;ut(async()=>{n(5,P=await Os()==="win32")});let M=!1,N,U,J=!1,Q=0,he=0;const x=(O,$,ie)=>Math.min(Math.max($,O),ie);ut(()=>{n(18,N=document.querySelector("#sidebar")),U=document.querySelector("#sidebarToggle"),document.addEventListener("click",O=>{U.contains(O.target)?n(0,M=!M):M&&!N.contains(O.target)&&n(0,M=!1)}),document.addEventListener("touchstart",O=>{if(U.contains(O.target))return;const $=O.touches[0].clientX;(0<$&&$<20&&!M||M)&&(J=!0,Q=$)}),document.addEventListener("touchmove",O=>{if(J){const $=O.touches[0].clientX;he=$;const ie=($-Q)/10;N.style.setProperty("--translate-x",`-${x(0,M?0-ie:18.75-ie,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(J){const O=(he-Q)/10;n(0,M=M?O>-(18.75/2):O>18.75/2)}J=!1})});const ne=()=>Oi("https://tauri.app/"),Y=O=>{c(O),n(0,M=!1)};function _e(O){Yn[O?"unshift":"push"](()=>{j=O,n(4,j)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const O=document.querySelector("#sidebar");O&&aa(O,M)}},[M,d,f,g,j,P,i,u,c,v,k,y,b,A,D,F,W,T,N,ne,Y,_e]}class ca extends we{constructor(t){super(),ye(this,t,ua,ra,me,{},null,[-1,-1])}}new ca({target:document.querySelector("#app")});
|