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