index.js 91 KB

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