You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tauri-plugins-workspace/examples/api/dist/assets/index.js

21 lines
82 KiB

var Rn=Object.defineProperty;var Pn=(t,e,n)=>e in t?Rn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Te=(t,e,n)=>(Pn(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(l){if(l.ep)return;l.ep=!0;const s=n(l);fetch(l.href,s)}})();function x(){}function on(t){return t()}function _t(){return Object.create(null)}function $(t){t.forEach(on)}function rn(t){return typeof t=="function"}function se(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Be;function On(t,e){return t===e?!0:(Be||(Be=document.createElement("a")),Be.href=e,t===Be.href)}function In(t){return Object.keys(t).length===0}function Un(t,...e){if(t==null){for(const i of e)i(void 0);return x}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function an(t,e,n){t.$$.on_destroy.push(Un(e,n))}function a(t,e){t.appendChild(e)}function g(t,e,n){t.insertBefore(e,n||null)}function m(t){t.parentNode&&t.parentNode.removeChild(t)}function We(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function d(t){return document.createElement(t)}function Dn(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Z(t){return document.createTextNode(t)}function y(){return Z(" ")}function Ie(){return Z("")}function M(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function Nn(t){return function(e){return e.preventDefault(),t.call(this,e)}}function c(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function zn(t){return Array.from(t.childNodes)}function he(t,e){e=""+e,t.data!==e&&(t.data=e)}function q(t,e){t.value=e??""}function Ve(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function et(t,e,n){for(let i=0;i<t.options.length;i+=1){const l=t.options[i];if(l.__value===e){l.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function wt(t,e){for(let n=0;n<t.options.length;n+=1){const i=t.options[n];i.selected=~e.indexOf(i.__value)}}function cn(t){const e=t.querySelector(":checked");return e&&e.__value}function Wn(t){return[].map.call(t.querySelectorAll(":checked"),e=>e.__value)}function be(t,e,n){t.classList.toggle(e,!!n)}class jn{constructor(e=!1){Te(this,"is_svg",!1);Te(this,"e");Te(this,"n");Te(this,"t");Te(this,"a");this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,i=null){this.e||(this.is_svg?this.e=Dn(n.nodeName):this.e=d(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(e)),this.i(i)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)g(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(m)}}function vt(t,e){return new t(e)}let Ge;function Fe(t){Ge=t}function un(){if(!Ge)throw new Error("Function called outside component initialization");return Ge}function Pe(t){un().$$.on_mount.push(t)}function dn(t){un().$$.on_destroy.push(t)}const Ne=[],Qe=[];let ze=[];const yt=[],fn=Promise.resolve();let dt=!1;function pn(){dt||(dt=!0,fn.then(hn))}function kt(){return pn(),fn}function je(t){ze.push(t)}const rt=new Set;let Ue=0;function hn(){if(Ue!==0)return;const t=Ge;do{try{for(;Ue<Ne.length;){const e=Ne[Ue];Ue++,Fe(e),Hn(e.$$)}}catch(e){throw Ne.length=0,Ue=0,e}for(Fe(null),Ne.length=0,Ue=0;Qe.length;)Qe.pop()();for(let e=0;e<ze.length;e+=1){const n=ze[e];rt.has(n)||(rt.add(n),n())}ze.length=0}while(Ne.length);for(;yt.length;)yt.pop()();dt=!1,rt.clear(),Fe(t)}function Hn(t){if(t.fragment!==null){t.update(),$(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(je)}}function qn(t){const e=[],n=[];ze.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),ze=e}const Ke=new Set;let Oe;function st(){Oe={r:0,c:[],p:Oe}}function ot(){Oe.r||$(Oe.c),Oe=Oe.p}function _e(t,e){t&&t.i&&(Ke.delete(t),t.i(e))}function Le(t,e,n,i){if(t&&t.o){if(Ke.has(t))return;Ke.add(t),Oe.c.push(()=>{Ke.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function ge(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function tt(t){t&&t.c()}function Xe(t,e,n){const{fragment:i,after_update:l}=t.$$;i&&i.m(e,n),je(()=>{const s=t.$$.on_mount.map(on).filter(rn);t.$$.on_destroy?t.$$.on_destroy.push(...s):$(s),t.$$.on_mount=[]}),l.forEach(je)}function Ye(t,e){const n=t.$$;n.fragment!==null&&(qn(n.after_update),$(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Vn(t,e){t.$$.dirty[0]===-1&&(Ne.push(t),pn(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function ue(t,e,n,i,l,s,o=null,r=[-1]){const u=Ge;Fe(t);const f=t.$$={fragment:null,ctx:[],props:s,update:x,not_equal:l,bound:_t(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:_t(),dirty:r,skip_bound:!1,root:e.target||u.$$.root};o&&o(f.root);let h=!1;if(f.ctx=n?n(t,e.props||{},(w,p,...b)=>{const k=b.length?b[0]:p;return f.ctx&&l(f.ctx[w],f.ctx[w]=k)&&(!f.skip_bound&&f.bound[w]&&f.bound[w](k),h&&Vn(t,w)),p}):[],f.update(),h=!0,$(f.before_update),f.fragment=i?i(f.ctx):!1,e.target){if(e.hydrate){const w=zn(e.target);f.fragment&&f.fragment.l(w),w.forEach(m)}else f.fragment&&f.fragment.c();e.intro&&_e(t.$$.fragment),Xe(t,e.target,e.anchor),hn()}Fe(u)}class de{constructor(){Te(this,"$$");Te(this,"$$set")}$destroy(){Ye(this,1),this.$destroy=x}$on(e,n){if(!rn(n))return x;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(e){this.$$set&&!In(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Fn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Fn);const De=[];function bn(t,e=x){let n;const i=new Set;function l(r){if(se(t,r)&&(t=r,n)){const u=!De.length;for(const f of i)f[1](),De.push(f,t);if(u){for(let f=0;f<De.length;f+=2)De[f][0](De[f+1]);De.length=0}}}function s(r){l(r(t))}function o(r,u=x){const f=[r,u];return i.add(f),i.size===1&&(n=e(l,s)||x),r(t),()=>{i.delete(f),i.size===0&&n&&(n(),n=null)}}return{set:l,update:s,subscribe:o}}function ft(t,e,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:e.get(t)}function mn(t,e,n,i,l){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?l.call(t,n):l?l.value=n:e.set(t,n),n}var qe,$e;function gn(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}class Ze{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,qe.set(this,()=>{}),this.id=gn(e=>{ft(this,qe,"f").call(this,e)})}set onmessage(e){mn(this,qe,e,"f")}get onmessage(){return ft(this,qe,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}qe=new WeakMap;async function C(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function xn(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}class _n{get rid(){return ft(this,$e,"f")}constructor(e){$e.set(this,void 0),mn(this,$e,e,"f")}async close(){return C("plugin:resources|close",{rid:this.rid})}}$e=new WeakMap;async function Gn(t,e,n=[],i){typeof n=="object"&&Object.freeze(n);const l=new Ze;return l.onmessage=t,C("plugin:shell|execute",{program:e,args:n,options:i,onEvent:l})}class at{constructor(){this.eventListeners=Object.create(null)}addListener(e,n){return this.on(e,n)}removeListener(e,n){return this.off(e,n)}on(e,n){return e in this.eventListeners?this.eventListeners[e].push(n):this.eventListeners[e]=[n],this}once(e,n){const i=l=>{this.removeListener(e,i),n(l)};return this.addListener(e,i)}off(e,n){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(i=>i!==n)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,n){if(e in this.eventListeners){const i=this.eventListeners[e];for(const l of i)l(n);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,n){return e in this.eventListeners?this.eventListeners[e].unshift(n):this.eventListeners[e]=[n],this}prependOnceListener(e,n){const i=l=>{this.removeListener(e,i),n(l)};return this.prependListener(e,i)}}class Qn{constructor(e){this.pid=e}async write(e){return C("plugin:shell|stdin_write",{pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)})}async kill(){return C("plugin:shell|kill",{cmd:"killChild",pid:this.pid})}}class nt extends at{constructor(e,n=[],i){super(),this.stdout=new at,this.stderr=new at,this.program=e,this.args=typeof n=="string"?[n]:n,this.options=i??{}}static create(e,n=[],i){return new nt(e,n,i)}static sidecar(e,n=[],i){const l=new nt(e,n,i);return l.options.sidecar=!0,l}async spawn(){return Gn(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 Qn(e))}async execute(){return new Promise((e,n)=>{this.on("error",n);const i=[],l=[];this.stdout.on("data",s=>{i.push(s)}),this.stderr.on("data",s=>{l.push(s)}),this.on("close",s=>{e({code:s.code,signal:s.signal,stdout:this.collectOutput(i),stderr:this.collectOutput(l)})}),this.spawn().catch(n)})}collectOutput(e){return this.options.encoding==="raw"?e.reduce((n,i)=>new Uint8Array([...n,...i,10]),new Uint8Array):e.join(`
`)}}async function Xn(t,e){return C("plugin:shell|open",{path:t,with:e})}class Yn{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class pt{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new Yn(this.width/e,this.height/e)}}class Jn{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class ht{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new Jn(this.x/e,this.y/e)}}var Se;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WEBVIEW_CREATED="tauri://webview-created",t.WEBVIEW_FILE_DROP="tauri://file-drop",t.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"})(Se||(Se={}));async function wn(t,e){await C("plugin:event|unlisten",{event:t,eventId:e})}async function vn(t,e,n){const i=typeof(n==null?void 0:n.target)=="string"?{kind:"AnyLabel",label:n.target}:(n==null?void 0:n.target)??{kind:"Any"};return C("plugin:event|listen",{event:t,target:i,handler:gn(e)}).then(l=>async()=>wn(t,l))}async function Zn(t,e,n){return vn(t,i=>{e(i),wn(t,i.id).catch(()=>{})},n)}async function Bn(t,e){await C("plugin:event|emit",{event:t,payload:e})}async function Kn(t,e,n){await C("plugin:event|emit_to",{target:typeof t=="string"?{kind:"AnyLabel",label:t}:t,event:e,payload:n})}var bt;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(bt||(bt={}));class $n{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}var Ct;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(Ct||(Ct={}));function mt(){return new yn(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function ct(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new yn(t.label,{skip:!0}))}const ut=["tauri://created","tauri://error"];class yn{constructor(e,n={}){var i;this.label=e,this.listeners=Object.create(null),n!=null&&n.skip||C("plugin:window|create",{options:{...n,parent:typeof n.parent=="string"?n.parent:(i=n.parent)==null?void 0:i.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async l=>this.emit("tauri://error",l))}static getByLabel(e){return ct().find(n=>n.label===e)??null}static getCurrent(){return mt()}static getAll(){return ct()}static async getFocusedWindow(){for(const e of ct())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const i=this.listeners[e];i.splice(i.indexOf(n),1)}):vn(e,n,{target:{kind:"Window",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const i=this.listeners[e];i.splice(i.indexOf(n),1)}):Zn(e,n,{target:{kind:"Window",label:this.label}})}async emit(e,n){if(ut.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,payload:n});return Promise.resolve()}return Bn(e,n)}async emitTo(e,n,i){if(ut.includes(n)){for(const l of this.listeners[n]||[])l({event:n,id:-1,payload:i});return Promise.resolve()}return Kn(e,n,i)}_handleTauriEvent(e,n){return ut.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return C("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return C("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new ht(e,n))}async outerPosition(){return C("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new ht(e,n))}async innerSize(){return C("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new pt(e,n))}async outerSize(){return C("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new pt(e,n))}async isFullscreen(){return C("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return C("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return C("plugin:window|is_maximized",{label:this.label})}async isFocused(){return C("plugin:window|is_focused",{label:this.label})}async isDecorated(){return C("plugin:window|is_decorated",{label:this.label})}async isResizable(){return C("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return C("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return C("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return C("plugin:window|is_closable",{label:this.label})}async isVisible(){return C("plugin:window|is_visible",{label:this.label})}async title(){return C("plugin:window|title",{label:this.label})}async theme(){return C("plugin:window|theme",{label:this.label})}async center(){return C("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===bt.Critical?n={type:"Critical"}:n={type:"Informational"}),C("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return C("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return C("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return C("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return C("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return C("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return C("plugin:window|maximize",{label:this.label})}async unmaximize(){return C("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return C("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return C("plugin:window|minimize",{label:this.label})}async unminimize(){return C("plugin:window|unminimize",{label:this.label})}async show(){return C("plugin:window|show",{label:this.label})}async hide(){return C("plugin:window|hide",{label:this.label})}async close(){return C("plugin:window|close",{label:this.label})}async destroy(){return C("plugin:window|destroy",{label:this.label})}async setDecorations(e){return C("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return C("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return C("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return C("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return C("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return C("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return C("plugin:window|set_content_protected",{label:this.label,value: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 C("plugin:window|set_size",{label:this.label,value:{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 C("plugin:window|set_min_size",{label:this.label,value: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 C("plugin:window|set_max_size",{label:this.label,value: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 C("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return C("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return C("plugin:window|set_focus",{label:this.label})}async setIcon(e){return C("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return C("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return C("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return C("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return C("plugin:window|set_cursor_icon",{label:this.label,value: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 C("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return C("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return C("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return C("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setProgressBar(e){return C("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return C("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async onResized(e){return this.listen(Se.WINDOW_RESIZED,n=>{n.payload=ti(n.payload),e(n)})}async onMoved(e){return this.listen(Se.WINDOW_MOVED,n=>{n.payload=ei(n.payload),e(n)})}async onCloseRequested(e){return this.listen(Se.WINDOW_CLOSE_REQUESTED,n=>{const i=new $n(n);Promise.resolve(e(i)).then(()=>{if(!i.isPreventDefault())return this.destroy()})})}async onFocusChanged(e){const n=await this.listen(Se.WINDOW_FOCUS,l=>{e({...l,payload:!0})}),i=await this.listen(Se.WINDOW_BLUR,l=>{e({...l,payload:!1})});return()=>{n(),i()}}async onScaleChanged(e){return this.listen(Se.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(Se.WINDOW_THEME_CHANGED,e)}}var Lt;(function(t){t.AppearanceBased="appearanceBased",t.Light="light",t.Dark="dark",t.MediumLight="mediumLight",t.UltraDark="ultraDark",t.Titlebar="titlebar",t.Selection="selection",t.Menu="menu",t.Popover="popover",t.Sidebar="sidebar",t.HeaderView="headerView",t.Sheet="sheet",t.WindowBackground="windowBackground",t.HudWindow="hudWindow",t.FullScreenUI="fullScreenUI",t.Tooltip="tooltip",t.ContentBackground="contentBackground",t.UnderWindowBackground="underWindowBackground",t.UnderPageBackground="underPageBackground",t.Mica="mica",t.Blur="blur",t.Acrylic="acrylic",t.Tabbed="tabbed",t.TabbedDark="tabbedDark",t.TabbedLight="tabbedLight"})(Lt||(Lt={}));var At;(function(t){t.FollowsWindowActiveState="followsWindowActiveState",t.Active="active",t.Inactive="inactive"})(At||(At={}));function ei(t){return new ht(t.x,t.y)}function ti(t){return new pt(t.width,t.height)}async function kn(){return C("plugin:os|platform")}async function ni(){return C("plugin:app|version")}async function ii(){return C("plugin:app|name")}async function li(){return C("plugin:app|tauri_version")}async function si(t=0){return C("plugin:process|exit",{code:t})}async function Cn(){return C("plugin:process|restart")}function oi(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k,_,A,L,v,E,O,U,S,j,T,I,W;return{c(){e=d("p"),e.innerHTML=`This is a demo of Tauri&#39;s API capabilities using the <code>@tauri-apps/api</code> package. It&#39;s used as the main validation app, serving as the test bed of our
development process. In the future, this app will be used on Tauri&#39;s integration
tests.`,n=y(),i=d("br"),l=y(),s=d("br"),o=y(),r=d("pre"),u=Z("App name: "),f=d("code"),h=Z(t[2]),w=Z(`
App version: `),p=d("code"),b=Z(t[0]),k=Z(`
Tauri version: `),_=d("code"),A=Z(t[1]),L=Z(`
`),v=y(),E=d("br"),O=y(),U=d("div"),S=d("button"),S.textContent="Close application",j=y(),T=d("button"),T.textContent="Relaunch application",c(S,"class","btn"),c(T,"class","btn"),c(U,"class","flex flex-wrap gap-1 shadow-")},m(R,D){g(R,e,D),g(R,n,D),g(R,i,D),g(R,l,D),g(R,s,D),g(R,o,D),g(R,r,D),a(r,u),a(r,f),a(f,h),a(r,w),a(r,p),a(p,b),a(r,k),a(r,_),a(_,A),a(r,L),g(R,v,D),g(R,E,D),g(R,O,D),g(R,U,D),a(U,S),a(U,j),a(U,T),I||(W=[M(S,"click",t[3]),M(T,"click",t[4])],I=!0)},p(R,[D]){D&4&&he(h,R[2]),D&1&&he(b,R[0]),D&2&&he(A,R[1])},i:x,o:x,d(R){R&&(m(e),m(n),m(i),m(l),m(s),m(o),m(r),m(v),m(E),m(O),m(U)),I=!1,$(W)}}}function ri(t,e,n){let i="1.0.0",l="1.0.0",s="Unknown";ii().then(u=>{n(2,s=u)}),ni().then(u=>{n(0,i=u)}),li().then(u=>{n(1,l=u)});async function o(){await si()}async function r(){await Cn()}return[i,l,s,o,r]}class ai extends de{constructor(e){super(),ue(this,e,ri,oi,se,{})}}async function ci(){return await C("plugin:cli|cli_matches")}function ui(t){let e,n,i,l,s,o,r,u,f,h,w,p,b;return{c(){e=d("p"),e.innerHTML=`This binary can be run from the terminal and takes the following arguments:
<code class="code-block flex flex-wrap my-2"><pre> --config &lt;PATH&gt;
--theme &lt;light|dark|system&gt;
--verbose</pre></code>
Additionally, it has a <code>update --background</code> subcommand.`,n=y(),i=d("br"),l=y(),s=d("div"),s.textContent="Note that the arguments are only parsed, not implemented.",o=y(),r=d("br"),u=y(),f=d("br"),h=y(),w=d("button"),w.textContent="Get matches",c(s,"class","note"),c(w,"class","btn"),c(w,"id","cli-matches")},m(k,_){g(k,e,_),g(k,n,_),g(k,i,_),g(k,l,_),g(k,s,_),g(k,o,_),g(k,r,_),g(k,u,_),g(k,f,_),g(k,h,_),g(k,w,_),p||(b=M(w,"click",t[0]),p=!0)},p:x,i:x,o:x,d(k){k&&(m(e),m(n),m(i),m(l),m(s),m(o),m(r),m(u),m(f),m(h),m(w)),p=!1,b()}}}function di(t,e,n){let{onMessage:i}=e;function l(){ci().then(i).catch(i)}return t.$$set=s=>{"onMessage"in s&&n(1,i=s.onMessage)},[l,i]}class fi extends de{constructor(e){super(),ue(this,e,di,ui,se,{onMessage:1})}}function pi(t){let e,n,i,l,s,o,r,u;return{c(){e=d("div"),n=d("button"),n.textContent="Call Log API",i=y(),l=d("button"),l.textContent="Call Request (async) API",s=y(),o=d("button"),o.textContent="Send event to Rust",c(n,"class","btn"),c(n,"id","log"),c(l,"class","btn"),c(l,"id","request"),c(o,"class","btn"),c(o,"id","event")},m(f,h){g(f,e,h),a(e,n),a(e,i),a(e,l),a(e,s),a(e,o),r||(u=[M(n,"click",t[0]),M(l,"click",t[1]),M(o,"click",t[2])],r=!0)},p:x,i:x,o:x,d(f){f&&m(e),r=!1,$(u)}}}function hi(t,e,n){const i=mt();let{onMessage:l}=e,s;Pe(async()=>{s=await i.listen("rust-event",l)}),dn(()=>{s&&s()});function o(){C("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function r(){C("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(l).catch(l)}function u(){i.emit("js-event","this is the payload string")}return t.$$set=f=>{"onMessage"in f&&n(3,l=f.onMessage)},[o,r,u,l]}class bi extends de{constructor(e){super(),ue(this,e,hi,pi,se,{onMessage:3})}}async function mi(t={}){return typeof t=="object"&&Object.freeze(t),C("plugin:dialog|open",{options:t})}async function gi(t={}){return typeof t=="object"&&Object.freeze(t),C("plugin:dialog|save",{options:t})}async function _i(t,e){var i,l;const n=typeof e=="string"?{title:e}:e;return C("plugin:dialog|message",{message:t.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type_:n==null?void 0:n.type,okButtonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()})}async function wi(t,e){var i,l,s;const n=typeof e=="string"?{title:e}:e;return C("plugin:dialog|ask",{message:t.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type_:n==null?void 0:n.type,okButtonLabel:((l=n==null?void 0:n.okLabel)==null?void 0:l.toString())??"Yes",cancelButtonLabel:((s=n==null?void 0:n.cancelLabel)==null?void 0:s.toString())??"No"})}async function St(t,e){var i,l,s;const n=typeof e=="string"?{title:e}:e;return C("plugin:dialog|confirm",{message:t.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type_:n==null?void 0:n.type,okButtonLabel:((l=n==null?void 0:n.okLabel)==null?void 0:l.toString())??"Ok",cancelButtonLabel:((s=n==null?void 0:n.cancelLabel)==null?void 0:s.toString())??"Cancel"})}var it;(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template"})(it||(it={}));var Et;(function(t){t[t.Start=0]="Start",t[t.Current=1]="Current",t[t.End=2]="End"})(Et||(Et={}));function Ln(t){return{isFile:t.isFile,isDirectory:t.isDirectory,isSymlink:t.isSymlink,size:t.size,mtime:t.mtime!=null?new Date(t.mtime):null,atime:t.atime!=null?new Date(t.atime):null,birthtime:t.birthtime!=null?new Date(t.birthtime):null,readonly:t.readonly,fileAttributes:t.fileAttributes,dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,blksize:t.blksize,blocks:t.blocks}}class vi extends _n{constructor(e){super(e)}async read(e){if(e.byteLength===0)return 0;const[n,i]=await C("plugin:fs|read",{rid:this.rid,len:e.byteLength});return e.set(n),i===0?null:i}async seek(e,n){return C("plugin:fs|seek",{rid:this.rid,offset:e,whence:n})}async stat(){const e=await C("plugin:fs|fstat",{rid:this.rid});return Ln(e)}async truncate(e){return C("plugin:fs|ftruncate",{rid:this.rid,len:e})}async write(e){return C("plugin:fs|write",{rid:this.rid,data:Array.from(e)})}}async function yi(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=await C("plugin:fs|open",{path:t instanceof URL?t.toString():t,options:e});return new vi(n)}async function ki(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return C("plugin:fs|mkdir",{path:t instanceof URL?t.toString():t,options:e})}async function Ci(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return C("plugin:fs|read_dir",{path:t instanceof URL?t.toString():t,options:e})}async function An(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=await C("plugin:fs|read_file",{path:t instanceof URL?t.toString():t,options:e});return Uint8Array.from(n)}async function Li(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return C("plugin:fs|remove",{path:t instanceof URL?t.toString():t,options:e})}async function Ai(t,e,n){if(t instanceof URL&&t.protocol!=="file:"||e instanceof URL&&e.protocol!=="file:")throw new TypeError("Must be a file URL.");return C("plugin:fs|rename",{oldPath:t instanceof URL?t.toString():t,newPath:e instanceof URL?e.toString():e,options:n})}async function Si(t,e){const n=await C("plugin:fs|stat",{path:t instanceof URL?t.toString():t,options:e});return Ln(n)}async function Ei(t,e,n){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return C("plugin:fs|write_text_file",{path:t instanceof URL?t.toString():t,data:e,options:n})}async function Sn(t){await C("plugin:fs|unwatch",{rid:t})}async function Mi(t,e,n){const i={recursive:!1,delayMs:2e3,...n},l=Array.isArray(t)?t:[t];for(const r of l)if(r instanceof URL&&r.protocol!=="file:")throw new TypeError("Must be a file URL.");const s=new Ze;s.onmessage=e;const o=await C("plugin:fs|watch",{paths:l.map(r=>r instanceof URL?r.toString():r),options:i,onEvent:s});return()=>{Sn(o)}}async function Ti(t,e,n){const i={recursive:!1,...n,delayMs:null},l=Array.isArray(t)?t:[t];for(const r of l)if(r instanceof URL&&r.protocol!=="file:")throw new TypeError("Must be a file URL.");const s=new Ze;s.onmessage=e;const o=await C("plugin:fs|watch",{paths:l.map(r=>r instanceof URL?r.toString():r),options:i,onEvent:s});return()=>{Sn(o)}}function Ri(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k,_,A,L,v,E,O,U,S,j,T,I,W,R,D,Y,G;return{c(){e=d("div"),n=d("input"),i=y(),l=d("input"),s=y(),o=d("br"),r=y(),u=d("div"),f=d("input"),h=y(),w=d("label"),w.textContent="Multiple",p=y(),b=d("div"),k=d("input"),_=y(),A=d("label"),A.textContent="Directory",L=y(),v=d("br"),E=y(),O=d("button"),O.textContent="Open dialog",U=y(),S=d("button"),S.textContent="Open save dialog",j=y(),T=d("button"),T.textContent="Prompt",I=y(),W=d("button"),W.textContent="Prompt (custom)",R=y(),D=d("button"),D.textContent="Message",c(n,"class","input"),c(n,"id","dialog-default-path"),c(n,"placeholder","Default path"),c(l,"class","input"),c(l,"id","dialog-filter"),c(l,"placeholder","Extensions filter, comma-separated"),c(e,"class","flex gap-2 children:grow"),c(f,"type","checkbox"),c(f,"id","dialog-multiple"),c(w,"for","dialog-multiple"),c(k,"type","checkbox"),c(k,"id","dialog-directory"),c(A,"for","dialog-directory"),c(O,"class","btn"),c(O,"id","open-dialog"),c(S,"class","btn"),c(S,"id","save-dialog"),c(T,"class","btn"),c(T,"id","prompt-dialog"),c(W,"class","btn"),c(W,"id","custom-prompt-dialog"),c(D,"class","btn"),c(D,"id","message-dialog")},m(P,z){g(P,e,z),a(e,n),q(n,t[0]),a(e,i),a(e,l),q(l,t[1]),g(P,s,z),g(P,o,z),g(P,r,z),g(P,u,z),a(u,f),f.checked=t[2],a(u,h),a(u,w),g(P,p,z),g(P,b,z),a(b,k),k.checked=t[3],a(b,_),a(b,A),g(P,L,z),g(P,v,z),g(P,E,z),g(P,O,z),g(P,U,z),g(P,S,z),g(P,j,z),g(P,T,z),g(P,I,z),g(P,W,z),g(P,R,z),g(P,D,z),Y||(G=[M(n,"input",t[11]),M(l,"input",t[12]),M(f,"change",t[13]),M(k,"change",t[14]),M(O,"click",t[7]),M(S,"click",t[8]),M(T,"click",t[4]),M(W,"click",t[5]),M(D,"click",t[6])],Y=!0)},p(P,[z]){z&1&&n.value!==P[0]&&q(n,P[0]),z&2&&l.value!==P[1]&&q(l,P[1]),z&4&&(f.checked=P[2]),z&8&&(k.checked=P[3])},i:x,o:x,d(P){P&&(m(e),m(s),m(o),m(r),m(u),m(p),m(b),m(L),m(v),m(E),m(O),m(U),m(S),m(j),m(T),m(I),m(W),m(R),m(D)),Y=!1,$(G)}}}function Pi(t,e){var n=new Blob([t],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(l){var s=l.target.result;e(s.substr(s.indexOf(",")+1))},i.readAsDataURL(n)}function Oi(t,e,n){let{onMessage:i}=e,{insecureRenderHtml:l}=e,s=null,o=null,r=!1,u=!1;async function f(){St("Do you want to do something?").then(v=>i(v?"Yes":"No")).catch(i)}async function h(){St("Is Tauri awesome?",{okLabel:"Absolutely",cancelLabel:"Totally"}).then(v=>i(v?"Tauri is absolutely awesome":"Tauri is totally awesome")).catch(i)}async function w(){await _i("Tauri is awesome!")}function p(){mi({title:"My wonderful open dialog",defaultPath:s,filters:o?[{name:"Tauri Example",extensions:o.split(",").map(v=>v.trim())}]:[],multiple:r,directory:u}).then(function(v){if(Array.isArray(v))i(v);else{var E=typeof v=="string"?v:v.path,O=E.match(/\S+\.\S+$/g);An(E).then(function(U){O&&(E.includes(".png")||E.includes(".jpg"))?Pi(new Uint8Array(U),function(S){var j="data:image/png;base64,"+S;l('<img src="'+j+'"></img>')}):i(v)}).catch(i(v))}}).catch(i)}function b(){gi({title:"My wonderful save dialog",defaultPath:s,filters:o?[{name:"Tauri Example",extensions:o.split(",").map(v=>v.trim())}]:[]}).then(i).catch(i)}function k(){s=this.value,n(0,s)}function _(){o=this.value,n(1,o)}function A(){r=this.checked,n(2,r)}function L(){u=this.checked,n(3,u)}return t.$$set=v=>{"onMessage"in v&&n(9,i=v.onMessage),"insecureRenderHtml"in v&&n(10,l=v.insecureRenderHtml)},[s,o,r,u,f,h,w,p,b,i,l,k,_,A,L]}class Ii extends de{constructor(e){super(),ue(this,e,Oi,Ri,se,{onMessage:9,insecureRenderHtml:10})}}function Mt(t,e,n){const i=t.slice();return i[28]=e[n],i}function Tt(t){let e,n=t[28][0]+"",i;return{c(){e=d("option"),i=Z(n),e.__value=t[28][1],q(e,e.__value)},m(l,s){g(l,e,s),a(e,i)},p:x,d(l){l&&m(e)}}}function Rt(t){let e,n,i,l,s,o;return{c(){e=d("div"),n=d("button"),n.textContent="Truncate",i=y(),l=d("button"),l.textContent="Stat",c(n,"class","btn"),c(l,"class","btn")},m(r,u){g(r,e,u),a(e,n),a(e,i),a(e,l),s||(o=[M(n,"click",t[12]),M(l,"click",t[13])],s=!0)},p:x,d(r){r&&m(e),s=!1,$(o)}}}function Ui(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k,_,A,L,v,E,O,U,S,j,T,I,W,R,D,Y,G,P,z,oe,ee,re,B,te,F,K,H,Q,fe,me,Ae,He,ae,Ee,ve,we,ne,ye,ie,ke,Me,Ce,le,N=ge(t[7]),J=[];for(let X=0;X<N.length;X+=1)J[X]=Tt(Mt(t,N,X));let V=t[2]&&Rt(t);return{c(){e=d("div"),n=d("div"),i=d("select"),l=d("option"),l.textContent="None";for(let X=0;X<J.length;X+=1)J[X].c();s=y(),o=d("input"),r=y(),u=d("br"),f=y(),h=d("div"),w=d("button"),w.textContent="Open",p=y(),b=d("button"),b.textContent="Read",k=y(),_=d("button"),_.textContent="Mkdir",A=y(),L=d("button"),L.textContent="Remove",v=y(),E=d("div"),O=d("button"),O.textContent="Rename",U=y(),S=d("input"),j=y(),T=d("button"),T.textContent="Use as img src",I=y(),V&&V.c(),W=y(),R=d("h3"),R.textContent="Watch",D=y(),Y=d("input"),G=y(),P=d("br"),z=y(),oe=d("div"),ee=d("label"),ee.textContent="Debounce delay in milliseconds (`0` disables the debouncer)",re=y(),B=d("input"),te=y(),F=d("br"),K=y(),H=d("div"),Q=d("input"),fe=y(),me=d("label"),me.textContent="Recursive",Ae=y(),He=d("br"),ae=y(),Ee=d("div"),ve=d("button"),ve.textContent="Watch",we=y(),ne=d("button"),ne.textContent="Unwatch",ye=y(),ie=d("br"),ke=y(),Me=d("img"),l.__value="",q(l,l.__value),c(i,"class","input"),c(i,"id","dir"),c(o,"class","input grow"),c(o,"placeholder","Type the path to read..."),c(n,"class","flex gap-1"),c(w,"class","btn"),c(b,"class","btn"),c(_,"class","btn"),c(L,"class","btn"),c(O,"class","btn"),c(S,"class","input"),c(S,"placeholder","To"),c(E,"class","flex flex-row"),c(T,"class","btn"),c(T,"type","button"),c(Y,"class","input grow"),c(Y,"placeholder","Type the path to watch..."),c(ee,"for","watch-debounce-delay"),c(B,"class","input"),c(B,"id","watch-debounce-delay"),c(Q,"type","checkbox"),c(Q,"id","watch-recursive"),c(me,"for","watch-recursive"),c(ve,"class","btn"),c(ne,"class","btn"),c(e,"class","flex flex-col"),c(Me,"alt","")},m(X,pe){g(X,e,pe),a(e,n),a(n,i),a(i,l);for(let ce=0;ce<J.length;ce+=1)J[ce]&&J[ce].m(i,null);a(n,s),a(n,o),q(o,t[0]),a(e,r),a(e,u),a(e,f),a(e,h),a(h,w),a(h,p),a(h,b),a(h,k),a(h,_),a(h,A),a(h,L),a(h,v),a(h,E),a(E,O),a(E,U),a(E,S),q(S,t[3]),a(h,j),a(h,T),a(e,I),V&&V.m(e,null),a(e,W),a(e,R),a(e,D),a(e,Y),q(Y,t[4]),a(e,G),a(e,P),a(e,z),a(e,oe),a(oe,ee),a(oe,re),a(oe,B),q(B,t[5]),a(e,te),a(e,F),a(e,K),a(e,H),a(H,Q),Q.checked=t[6],a(H,fe),a(H,me),a(e,Ae),a(e,He),a(e,ae),a(e,Ee),a(Ee,ve),a(Ee,we),a(Ee,ne),g(X,ye,pe),g(X,ie,pe),g(X,ke,pe),g(X,Me,pe),t[25](Me),Ce||(le=[M(o,"input",t[20]),M(w,"click",t[8]),M(b,"click",t[14]),M(_,"click",t[9]),M(L,"click",t[10]),M(O,"click",t[11]),M(S,"input",t[21]),M(T,"click",t[15]),M(Y,"input",t[22]),M(B,"input",t[23]),M(Q,"change",t[24]),M(ve,"click",t[16]),M(ne,"click",t[17])],Ce=!0)},p(X,[pe]){if(pe&128){N=ge(X[7]);let ce;for(ce=0;ce<N.length;ce+=1){const gt=Mt(X,N,ce);J[ce]?J[ce].p(gt,pe):(J[ce]=Tt(gt),J[ce].c(),J[ce].m(i,null))}for(;ce<J.length;ce+=1)J[ce].d(1);J.length=N.length}pe&1&&o.value!==X[0]&&q(o,X[0]),pe&8&&S.value!==X[3]&&q(S,X[3]),X[2]?V?V.p(X,pe):(V=Rt(X),V.c(),V.m(e,W)):V&&(V.d(1),V=null),pe&16&&Y.value!==X[4]&&q(Y,X[4]),pe&32&&B.value!==X[5]&&q(B,X[5]),pe&64&&(Q.checked=X[6])},i:x,o:x,d(X){X&&(m(e),m(ye),m(ie),m(ke),m(Me)),We(J,X),V&&V.d(),t[25](null),Ce=!1,$(le)}}}function Re(){return document.getElementById("dir").value?parseInt(dir.value):null}function Di(t,e){const n=new Blob([t],{type:"application/octet-binary"}),i=new FileReader;i.onload=function(l){const s=l.target.result;e(s.substr(s.indexOf(",")+1))},i.readAsDataURL(n)}function Ni(t,e,n){let{onMessage:i}=e,{insecureRenderHtml:l}=e,s="",o,r,u,f="",h=0,w=!1,p,b="";const k=Object.keys(it).filter(P=>isNaN(parseInt(P))).map(P=>[P,it[P]]);function _(){yi(s,{baseDir:Re(),read:!0,write:!0,create:!0}).then(P=>{n(2,r=P),i(`Opened ${s}`)}).catch(i)}function A(){ki(s,{baseDir:Re()}).then(()=>{i(`Created dir ${s}`)}).catch(i)}function L(){Li(s,{baseDir:Re()}).then(()=>{i(`Removed ${s}`)}).catch(i)}function v(){Ai(s,u,{oldPathBaseDir:Re(),newPathBaseDir:Re()}).then(()=>{i(`Renamed ${s} to ${u}`)}).catch(i)}function E(){r.truncate(0).then(()=>{i("Truncated file")}).catch(i)}function O(){r.stat().then(P=>{i(`File stat ${JSON.stringify(P)}`)}).catch(i)}function U(){const P={baseDir:Re()};Si(s,P).then(z=>{const oe=z.isFile;(oe?An(s,P):Ci(s,P)).then(function(re){if(oe)if(s.includes(".png")||s.includes(".jpg"))Di(new Uint8Array(re),function(B){const te="data:image/png;base64,"+B;l('<img src="'+te+'"></img>')});else{const B=String.fromCharCode.apply(null,re);l('<textarea id="file-response"></textarea><button id="file-save">Save</button>'),setTimeout(()=>{const te=document.getElementById("file-response");te.value=B,document.getElementById("file-save").addEventListener("click",function(){Ei(s,te.value,{dir:Re()}).catch(i)})})}else i(re)}).catch(i)}).catch(i)}function S(){n(1,o.src=xn(s),o)}function j(){if(T(),f){i(`Watching ${f} for changes`);let P={recursive:w,delayMs:parseInt(h)};P.delayMs===0?Ti(f,i,P).then(z=>{p=z,b=f}).catch(i):Mi(f,i,P).then(z=>{p=z,b=f}).catch(i)}}function T(){p&&(i(`Stopped watching ${b} for changes`),p()),p=void 0,b=void 0}function I(){s=this.value,n(0,s)}function W(){u=this.value,n(3,u)}function R(){f=this.value,n(4,f)}function D(){h=this.value,n(5,h)}function Y(){w=this.checked,n(6,w)}function G(P){Qe[P?"unshift":"push"](()=>{o=P,n(1,o)})}return t.$$set=P=>{"onMessage"in P&&n(18,i=P.onMessage),"insecureRenderHtml"in P&&n(19,l=P.insecureRenderHtml)},[s,o,r,u,f,h,w,k,_,A,L,v,E,O,U,S,j,T,i,l,I,W,R,D,Y,G]}class zi extends de{constructor(e){super(),ue(this,e,Ni,Ui,se,{onMessage:18,insecureRenderHtml:19})}}async function Pt(t,e){const n=e==null?void 0:e.maxRedirections,i=e==null?void 0:e.connectTimeout,l=e==null?void 0:e.proxy;e&&(delete e.maxRedirections,delete e.connectTimeout,delete e.proxy);const s=e==null?void 0:e.signal,o=new Request(t,e),r=await o.arrayBuffer(),u=r.byteLength?Array.from(new Uint8Array(r)):null,f=await C("plugin:http|fetch",{clientConfig:{method:o.method,url:o.url,headers:Array.from(o.headers.entries()),data:u,maxRedirections:n,connectTimeout:i,proxy:l}});s==null||s.addEventListener("abort",()=>{C("plugin:http|fetch_cancel",{rid:f})});const{status:h,statusText:w,url:p,headers:b,rid:k}=await C("plugin:http|fetch_send",{rid:f}),_=await C("plugin:http|fetch_read_body",{rid:k}),A=new Response(new Uint8Array(_),{headers:b,status:h,statusText:w});return Object.defineProperty(A,"url",{value:p}),A}function Ot(t,e,n){const i=t.slice();return i[10]=e[n],i[12]=n,i}function Wi(t){let e,n=t[6][0]+"",i,l,s,o,r,u=t[6][1]+"",f,h,w,p,b,k=ge(t[5]),_=[];for(let v=0;v<k.length;v+=1)_[v]=Dt(Ot(t,k,v));const A=v=>Le(_[v],1,1,()=>{_[v]=null});let L=!t[3]&&Nt();return{c(){e=d("span"),i=Z(n),l=y(),s=d("ul");for(let v=0;v<_.length;v+=1)_[v].c();o=y(),r=d("span"),f=Z(u),L&&L.c(),h=Ie(),c(e,"class","_jsonBkt svelte-6z96o6"),c(e,"role","button"),c(e,"tabindex","0"),be(e,"isArray",t[4]),c(s,"class","_jsonList svelte-6z96o6"),c(r,"class","_jsonBkt svelte-6z96o6"),c(r,"role","button"),c(r,"tabindex","0"),be(r,"isArray",t[4])},m(v,E){g(v,e,E),a(e,i),g(v,l,E),g(v,s,E);for(let O=0;O<_.length;O+=1)_[O]&&_[O].m(s,null);g(v,o,E),g(v,r,E),a(r,f),L&&L.m(v,E),g(v,h,E),w=!0,p||(b=[M(e,"click",t[8]),M(e,"keydown",t[9]),M(r,"click",t[8]),M(r,"keydown",t[9])],p=!0)},p(v,E){if((!w||E&64)&&n!==(n=v[6][0]+"")&&he(i,n),(!w||E&16)&&be(e,"isArray",v[4]),E&55){k=ge(v[5]);let O;for(O=0;O<k.length;O+=1){const U=Ot(v,k,O);_[O]?(_[O].p(U,E),_e(_[O],1)):(_[O]=Dt(U),_[O].c(),_e(_[O],1),_[O].m(s,null))}for(st(),O=k.length;O<_.length;O+=1)A(O);ot()}(!w||E&64)&&u!==(u=v[6][1]+"")&&he(f,u),(!w||E&16)&&be(r,"isArray",v[4]),v[3]?L&&(L.d(1),L=null):L||(L=Nt(),L.c(),L.m(h.parentNode,h))},i(v){if(!w){for(let E=0;E<k.length;E+=1)_e(_[E]);w=!0}},o(v){_=_.filter(Boolean);for(let E=0;E<_.length;E+=1)Le(_[E]);w=!1},d(v){v&&(m(e),m(l),m(s),m(o),m(r),m(h)),We(_,v),L&&L.d(v),p=!1,$(b)}}}function ji(t){let e,n=t[6][0]+"",i,l,s=t[6][1]+"",o,r,u,f,h=!t[3]&&t[7]&&zt();return{c(){e=d("span"),i=Z(n),l=Z("..."),o=Z(s),h&&h.c(),r=Ie(),c(e,"class","_jsonBkt svelte-6z96o6"),c(e,"role","button"),c(e,"tabindex","0"),be(e,"isArray",t[4])},m(w,p){g(w,e,p),a(e,i),a(e,l),a(e,o),h&&h.m(w,p),g(w,r,p),u||(f=[M(e,"click",t[8]),M(e,"keydown",t[9])],u=!0)},p(w,p){p&64&&n!==(n=w[6][0]+"")&&he(i,n),p&64&&s!==(s=w[6][1]+"")&&he(o,s),p&16&&be(e,"isArray",w[4]),!w[3]&&w[7]?h||(h=zt(),h.c(),h.m(r.parentNode,r)):h&&(h.d(1),h=null)},i:x,o:x,d(w){w&&(m(e),m(r)),h&&h.d(w),u=!1,$(f)}}}function Hi(t){let e,n=t[6][0]+"",i,l=t[6][1]+"",s,o,r=!t[3]&&Wt();return{c(){e=d("span"),i=Z(n),s=Z(l),r&&r.c(),o=Ie(),c(e,"class","_jsonBkt empty svelte-6z96o6"),be(e,"isArray",t[4])},m(u,f){g(u,e,f),a(e,i),a(e,s),r&&r.m(u,f),g(u,o,f)},p(u,f){f&64&&n!==(n=u[6][0]+"")&&he(i,n),f&64&&l!==(l=u[6][1]+"")&&he(s,l),f&16&&be(e,"isArray",u[4]),u[3]?r&&(r.d(1),r=null):r||(r=Wt(),r.c(),r.m(o.parentNode,o))},i:x,o:x,d(u){u&&(m(e),m(o)),r&&r.d(u)}}}function It(t){let e,n,i=t[10]+"",l,s,o;return{c(){e=d("span"),n=Z('"'),l=Z(i),s=Z('"'),o=d("span"),o.textContent=":",c(e,"class","_jsonKey svelte-6z96o6"),c(o,"class","_jsonSep svelte-6z96o6")},m(r,u){g(r,e,u),a(e,n),a(e,l),a(e,s),g(r,o,u)},p(r,u){u&32&&i!==(i=r[10]+"")&&he(l,i)},d(r){r&&(m(e),m(o))}}}function qi(t){let e,n=jt(t[0][t[10]])+"",i,l,s,o=t[12]<t[5].length-1&&Ut();return{c(){e=d("span"),i=Z(n),o&&o.c(),s=Ie(),c(e,"class",l="_jsonVal "+Je(t[0][t[10]])+" svelte-6z96o6")},m(r,u){g(r,e,u),a(e,i),o&&o.m(r,u),g(r,s,u)},p(r,u){u&33&&n!==(n=jt(r[0][r[10]])+"")&&he(i,n),u&33&&l!==(l="_jsonVal "+Je(r[0][r[10]])+" svelte-6z96o6")&&c(e,"class",l),r[12]<r[5].length-1?o||(o=Ut(),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i:x,o:x,d(r){r&&(m(e),m(s)),o&&o.d(r)}}}function Vi(t){let e,n;return e=new En({props:{json:t[0][t[10]],depth:t[1],_cur:t[2]+1,_last:t[12]===t[5].length-1}}),{c(){tt(e.$$.fragment)},m(i,l){Xe(e,i,l),n=!0},p(i,l){const s={};l&33&&(s.json=i[0][i[10]]),l&2&&(s.depth=i[1]),l&4&&(s._cur=i[2]+1),l&32&&(s._last=i[12]===i[5].length-1),e.$set(s)},i(i){n||(_e(e.$$.fragment,i),n=!0)},o(i){Le(e.$$.fragment,i),n=!1},d(i){Ye(e,i)}}}function Ut(t){let e;return{c(){e=d("span"),e.textContent=",",c(e,"class","_jsonSep svelte-6z96o6")},m(n,i){g(n,e,i)},d(n){n&&m(e)}}}function Dt(t){let e,n,i,l,s,o,r,u=!t[4]&&It(t);const f=[Vi,qi],h=[];function w(p,b){return b&33&&(i=null),i==null&&(i=Je(p[0][p[10]])==="object"),i?0:1}return l=w(t,-1),s=h[l]=f[l](t),{c(){e=d("li"),u&&u.c(),n=y(),s.c(),o=y(),c(e,"class","svelte-6z96o6")},m(p,b){g(p,e,b),u&&u.m(e,null),a(e,n),h[l].m(e,null),a(e,o),r=!0},p(p,b){p[4]?u&&(u.d(1),u=null):u?u.p(p,b):(u=It(p),u.c(),u.m(e,n));let k=l;l=w(p,b),l===k?h[l].p(p,b):(st(),Le(h[k],1,1,()=>{h[k]=null}),ot(),s=h[l],s?s.p(p,b):(s=h[l]=f[l](p),s.c()),_e(s,1),s.m(e,o))},i(p){r||(_e(s),r=!0)},o(p){Le(s),r=!1},d(p){p&&m(e),u&&u.d(),h[l].d()}}}function Nt(t){let e;return{c(){e=d("span"),e.textContent=",",c(e,"class","_jsonSep svelte-6z96o6")},m(n,i){g(n,e,i)},d(n){n&&m(e)}}}function zt(t){let e;return{c(){e=d("span"),e.textContent=",",c(e,"class","_jsonSep svelte-6z96o6")},m(n,i){g(n,e,i)},d(n){n&&m(e)}}}function Wt(t){let e;return{c(){e=d("span"),e.textContent=",",c(e,"class","_jsonSep svelte-6z96o6")},m(n,i){g(n,e,i)},d(n){n&&m(e)}}}function Fi(t){let e,n,i,l;const s=[Hi,ji,Wi],o=[];function r(u,f){return u[5].length?u[7]?1:2:0}return e=r(t),n=o[e]=s[e](t),{c(){n.c(),i=Ie()},m(u,f){o[e].m(u,f),g(u,i,f),l=!0},p(u,[f]){let h=e;e=r(u),e===h?o[e].p(u,f):(st(),Le(o[h],1,1,()=>{o[h]=null}),ot(),n=o[e],n?n.p(u,f):(n=o[e]=s[e](u),n.c()),_e(n,1),n.m(i.parentNode,i))},i(u){l||(_e(n),l=!0)},o(u){Le(n),l=!1},d(u){u&&m(i),o[e].d(u)}}}function Je(t){return t===null?"null":typeof t}function jt(t){const e=Je(t);return e==="string"?`"${t}"`:e==="function"?"f () {...}":e==="symbol"?t.toString():t}function xi(t,e,n){let{json:i}=e,{depth:l=1/0}=e,{_cur:s=0}=e,{_last:o=!0}=e,r,u=!1,f=["",""],h=!1;function w(){n(7,h=!h)}function p(b){b instanceof KeyboardEvent&&["Enter"," "].includes(b.key)&&w()}return t.$$set=b=>{"json"in b&&n(0,i=b.json),"depth"in b&&n(1,l=b.depth),"_cur"in b&&n(2,s=b._cur),"_last"in b&&n(3,o=b._last)},t.$$.update=()=>{t.$$.dirty&17&&(n(5,r=Je(i)==="object"?Object.keys(i):[]),n(4,u=Array.isArray(i)),n(6,f=u?["[","]"]:["{","}"])),t.$$.dirty&6&&n(7,h=l<s)},[i,l,s,o,u,r,f,h,w,p]}class En extends de{constructor(e){super(),ue(this,e,xi,Fi,se,{json:0,depth:1,_cur:2,_last:3})}}function Gi(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k,_,A,L,v,E,O,U,S,j,T,I,W,R,D,Y,G,P,z,oe,ee,re,B,te,F,K;return B=new En({props:{json:t[4]}}),{c(){e=d("form"),n=d("select"),i=d("option"),i.textContent="GET",l=d("option"),l.textContent="POST",s=d("option"),s.textContent="PUT",o=d("option"),o.textContent="PATCH",r=d("option"),r.textContent="DELETE",u=y(),f=d("br"),h=y(),w=d("textarea"),p=y(),b=d("br"),k=y(),_=d("button"),_.textContent="Make request",A=y(),L=d("br"),v=y(),E=d("h3"),E.textContent="HTTP Form",O=y(),U=d("div"),S=d("input"),j=y(),T=d("input"),I=y(),W=d("br"),R=y(),D=d("br"),Y=y(),G=d("button"),G.textContent="Post it",P=y(),z=d("br"),oe=y(),ee=d("br"),re=y(),tt(B.$$.fragment),i.__value="GET",q(i,i.__value),l.__value="POST",q(l,l.__value),s.__value="PUT",q(s,s.__value),o.__value="PATCH",q(o,o.__value),r.__value="DELETE",q(r,r.__value),c(n,"class","input"),c(n,"id","request-method"),t[0]===void 0&&je(()=>t[8].call(n)),c(w,"class","input h-auto w-100%"),c(w,"id","request-body"),c(w,"placeholder","Request body"),c(w,"rows","5"),c(_,"class","btn"),c(_,"id","make-request"),c(S,"class","input"),c(T,"class","input"),c(U,"class","flex gap-2 children:grow"),c(G,"class","btn"),c(G,"type","button")},m(H,Q){g(H,e,Q),a(e,n),a(n,i),a(n,l),a(n,s),a(n,o),a(n,r),et(n,t[0],!0),a(e,u),a(e,f),a(e,h),a(e,w),q(w,t[1]),a(e,p),a(e,b),a(e,k),a(e,_),g(H,A,Q),g(H,L,Q),g(H,v,Q),g(H,E,Q),g(H,O,Q),g(H,U,Q),a(U,S),q(S,t[2]),a(U,j),a(U,T),q(T,t[3]),g(H,I,Q),g(H,W,Q),g(H,R,Q),g(H,D,Q),g(H,Y,Q),g(H,G,Q),g(H,P,Q),g(H,z,Q),g(H,oe,Q),g(H,ee,Q),g(H,re,Q),Xe(B,H,Q),te=!0,F||(K=[M(n,"change",t[8]),M(w,"input",t[9]),M(e,"submit",Nn(t[5])),M(S,"input",t[10]),M(T,"input",t[11]),M(G,"click",t[6])],F=!0)},p(H,[Q]){Q&1&&et(n,H[0]),Q&2&&q(w,H[1]),Q&4&&S.value!==H[2]&&q(S,H[2]),Q&8&&T.value!==H[3]&&q(T,H[3]);const fe={};Q&16&&(fe.json=H[4]),B.$set(fe)},i(H){te||(_e(B.$$.fragment,H),te=!0)},o(H){Le(B.$$.fragment,H),te=!1},d(H){H&&(m(e),m(A),m(L),m(v),m(E),m(O),m(U),m(I),m(W),m(R),m(D),m(Y),m(G),m(P),m(z),m(oe),m(ee),m(re)),Ye(B,H),F=!1,$(K)}}}function Qi(t,e,n){let i="GET",l="",{onMessage:s}=e;async function o(){let _=i||"GET";const A={method:_||"GET",headers:{}};let L;_!=="GET"&&(A.body=l,l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?(A.headers["Content-Type"]="application/json",L="json"):l!==""&&(L="text"));const v=await Pt("http://localhost:3003",A),E=L==="json"?await v.json():await v.text();s({url:v.url,status:v.status,ok:v.ok,headers:Object.fromEntries(v.headers.entries()),body:E})}let r="baz",u="qux",f=null;async function h(){const _=new FormData;_.append("foo",r),_.append("bar",u);const A=await Pt("http://localhost:3003",{method:"POST",body:_});n(4,f={url:A.url,status:A.status,ok:A.ok,headers:Object.fromEntries(A.headers.entries()),body:await A.text()})}function w(){i=cn(this),n(0,i)}function p(){l=this.value,n(1,l)}function b(){r=this.value,n(2,r)}function k(){u=this.value,n(3,u)}return t.$$set=_=>{"onMessage"in _&&n(7,s=_.onMessage)},[i,l,r,u,f,o,h,s,w,p,b,k]}class Xi extends de{constructor(e){super(),ue(this,e,Qi,Gi,se,{onMessage:7})}}function Yi(t){let e,n,i;return{c(){e=d("button"),e.textContent="Send test notification",c(e,"class","btn"),c(e,"id","notification")},m(l,s){g(l,e,s),n||(i=M(e,"click",t[0]),n=!0)},p:x,i:x,o:x,d(l){l&&m(e),n=!1,i()}}}function Ht(){new Notification("Notification title",{body:"This is the notification body"})}function Ji(t,e,n){let{onMessage:i}=e;function l(){Notification.permission==="default"?Notification.requestPermission().then(function(s){s==="granted"?Ht():i("Permission is "+s)}).catch(i):Notification.permission==="granted"?Ht():i("Permission is denied")}return t.$$set=s=>{"onMessage"in s&&n(1,i=s.onMessage)},[l,i]}class Zi extends de{constructor(e){super(),ue(this,e,Ji,Yi,se,{onMessage:1})}}async function Bi(t,e){const n=new Ze;return n.onmessage=e,await C("plugin:global-shortcut|register",{shortcut:t,handler:n})}async function Ki(t){return await C("plugin:global-shortcut|unregister",{shortcut:t})}async function $i(){return await C("plugin:global-shortcut|unregister_all")}function qt(t,e,n){const i=t.slice();return i[9]=e[n],i}function Vt(t){let e,n=t[9]+"",i,l,s,o,r;function u(){return t[8](t[9])}return{c(){e=d("div"),i=Z(n),l=y(),s=d("button"),s.textContent="Unregister",c(s,"class","btn"),c(s,"type","button"),c(e,"class","flex justify-between")},m(f,h){g(f,e,h),a(e,i),a(e,l),a(e,s),o||(r=M(s,"click",u),o=!0)},p(f,h){t=f,h&2&&n!==(n=t[9]+"")&&he(i,n)},d(f){f&&m(e),o=!1,r()}}}function Ft(t){let e,n,i,l,s;return{c(){e=d("br"),n=y(),i=d("button"),i.textContent="Unregister all",c(i,"class","btn"),c(i,"type","button")},m(o,r){g(o,e,r),g(o,n,r),g(o,i,r),l||(s=M(i,"click",t[5]),l=!0)},p:x,d(o){o&&(m(e),m(n),m(i)),l=!1,s()}}}function el(t){let e,n,i,l,s,o,r,u,f,h,w,p=ge(t[1]),b=[];for(let _=0;_<p.length;_+=1)b[_]=Vt(qt(t,p,_));let k=t[1].length>1&&Ft(t);return{c(){e=d("div"),n=d("input"),i=y(),l=d("button"),l.textContent="Register",s=y(),o=d("br"),r=y(),u=d("div");for(let _=0;_<b.length;_+=1)b[_].c();f=y(),k&&k.c(),c(n,"class","input grow"),c(n,"placeholder","Type a shortcut with '+' as separator..."),c(l,"class","btn"),c(l,"type","button"),c(e,"class","flex gap-1"),c(u,"class","flex flex-col gap-1")},m(_,A){g(_,e,A),a(e,n),q(n,t[0]),a(e,i),a(e,l),g(_,s,A),g(_,o,A),g(_,r,A),g(_,u,A);for(let L=0;L<b.length;L+=1)b[L]&&b[L].m(u,null);a(u,f),k&&k.m(u,null),h||(w=[M(n,"input",t[7]),M(l,"click",t[3])],h=!0)},p(_,[A]){if(A&1&&n.value!==_[0]&&q(n,_[0]),A&18){p=ge(_[1]);let L;for(L=0;L<p.length;L+=1){const v=qt(_,p,L);b[L]?b[L].p(v,A):(b[L]=Vt(v),b[L].c(),b[L].m(u,f))}for(;L<b.length;L+=1)b[L].d(1);b.length=p.length}_[1].length>1?k?k.p(_,A):(k=Ft(_),k.c(),k.m(u,null)):k&&(k.d(1),k=null)},i:x,o:x,d(_){_&&(m(e),m(s),m(o),m(r),m(u)),We(b,_),k&&k.d(),h=!1,$(w)}}}function tl(t,e,n){let i,{onMessage:l}=e;const s=bn([]);an(t,s,p=>n(1,i=p));let o="CmdOrControl+X";function r(){const p=o;Bi(p,()=>{l(`Shortcut ${p} triggered`)}).then(()=>{s.update(b=>[...b,p]),l(`Shortcut ${p} registered successfully`)}).catch(l)}function u(p){const b=p;Ki(b).then(()=>{s.update(k=>k.filter(_=>_!==b)),l(`Shortcut ${b} unregistered`)}).catch(l)}function f(){$i().then(()=>{s.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function h(){o=this.value,n(0,o)}const w=p=>u(p);return t.$$set=p=>{"onMessage"in p&&n(6,l=p.onMessage)},[o,i,s,r,u,f,l,h,w]}class nl extends de{constructor(e){super(),ue(this,e,tl,el,se,{onMessage:6})}}function xt(t){let e,n,i,l,s,o,r;return{c(){e=d("br"),n=y(),i=d("input"),l=y(),s=d("button"),s.textContent="Write",c(i,"class","input"),c(i,"placeholder","write to stdin"),c(s,"class","btn")},m(u,f){g(u,e,f),g(u,n,f),g(u,i,f),q(i,t[4]),g(u,l,f),g(u,s,f),o||(r=[M(i,"input",t[14]),M(s,"click",t[8])],o=!0)},p(u,f){f&16&&i.value!==u[4]&&q(i,u[4])},d(u){u&&(m(e),m(n),m(i),m(l),m(s)),o=!1,$(r)}}}function il(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k,_,A,L,v,E,O,U,S,j,T,I=t[5]&&xt(t);return{c(){e=d("div"),n=d("div"),i=Z(`Script:
`),l=d("input"),s=y(),o=d("div"),r=Z(`Encoding:
`),u=d("input"),f=y(),h=d("div"),w=Z(`Working directory:
`),p=d("input"),b=y(),k=d("div"),_=Z(`Arguments:
`),A=d("input"),L=y(),v=d("div"),E=d("button"),E.textContent="Run",O=y(),U=d("button"),U.textContent="Kill",S=y(),I&&I.c(),c(l,"class","grow input"),c(n,"class","flex items-center gap-1"),c(u,"class","grow input"),c(o,"class","flex items-center gap-1"),c(p,"class","grow input"),c(p,"placeholder","Working directory"),c(h,"class","flex items-center gap-1"),c(A,"class","grow input"),c(A,"placeholder","Environment variables"),c(k,"class","flex items-center gap-1"),c(E,"class","btn"),c(U,"class","btn"),c(v,"class","flex children:grow gap-1"),c(e,"class","flex flex-col childre:grow gap-1")},m(W,R){g(W,e,R),a(e,n),a(n,i),a(n,l),q(l,t[0]),a(e,s),a(e,o),a(o,r),a(o,u),q(u,t[3]),a(e,f),a(e,h),a(h,w),a(h,p),q(p,t[1]),a(e,b),a(e,k),a(k,_),a(k,A),q(A,t[2]),a(e,L),a(e,v),a(v,E),a(v,O),a(v,U),a(e,S),I&&I.m(e,null),j||(T=[M(l,"input",t[10]),M(u,"input",t[11]),M(p,"input",t[12]),M(A,"input",t[13]),M(E,"click",t[6]),M(U,"click",t[7])],j=!0)},p(W,[R]){R&1&&l.value!==W[0]&&q(l,W[0]),R&8&&u.value!==W[3]&&q(u,W[3]),R&2&&p.value!==W[1]&&q(p,W[1]),R&4&&A.value!==W[2]&&q(A,W[2]),W[5]?I?I.p(W,R):(I=xt(W),I.c(),I.m(e,null)):I&&(I.d(1),I=null)},i:x,o:x,d(W){W&&m(e),I&&I.d(),j=!1,$(T)}}}function ll(t,e,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",s=i?["/C"]:["-c"],{onMessage:o}=e,r='echo "hello world"',u=null,f="SOMETHING=value ANOTHER=2",h="",w="",p;function b(){return f.split(" ").reduce((S,j)=>{let[T,I]=j.split("=");return{...S,[T]:I}},{})}function k(){n(5,p=null);const S=nt.create(l,[...s,r],{cwd:u||null,env:b(),encoding:h||void 0});S.on("close",j=>{o(`command finished with code ${j.code} and signal ${j.signal}`),n(5,p=null)}),S.on("error",j=>o(`command error: "${j}"`)),S.stdout.on("data",j=>o(`command stdout: "${j}"`)),S.stderr.on("data",j=>o(`command stderr: "${j}"`)),S.spawn().then(j=>{n(5,p=j)}).catch(o)}function _(){p.kill().then(()=>o("killed child process")).catch(o)}function A(){p.write(w).catch(o)}function L(){r=this.value,n(0,r)}function v(){h=this.value,n(3,h)}function E(){u=this.value,n(1,u)}function O(){f=this.value,n(2,f)}function U(){w=this.value,n(4,w)}return t.$$set=S=>{"onMessage"in S&&n(9,o=S.onMessage)},[r,u,f,h,w,p,k,_,A,o,L,v,E,O,U]}class sl extends de{constructor(e){super(),ue(this,e,ll,il,se,{onMessage:9})}}class ol extends _n{constructor(e){super(e.rid),this.available=e.available,this.currentVersion=e.currentVersion,this.version=e.version,this.date=e.date,this.body=e.body}async downloadAndInstall(e){const n=new Ze;return e&&(n.onmessage=e),C("plugin:updater|download_and_install",{onEvent:n,rid:this.rid})}}async function rl(t){return t!=null&&t.headers&&(t.headers=Array.from(new Headers(t.headers).entries())),C("plugin:updater|check",{...t}).then(e=>e.available?new ol(e):null)}function al(t){let e,n,i,l,s,o;return{c(){e=d("div"),n=d("span"),i=Z(t[3]),l=Z("%"),s=y(),o=d("div"),c(n,"class","svelte-1xfvu87"),c(o,"class","progress-bar svelte-1xfvu87"),Ve(o,"width",t[3]+"%"),c(e,"class","progress svelte-1xfvu87")},m(r,u){g(r,e,u),a(e,n),a(n,i),a(n,l),a(e,s),a(e,o)},p(r,u){u&8&&he(i,r[3]),u&8&&Ve(o,"width",r[3]+"%")},d(r){r&&m(e)}}}function cl(t){let e,n,i;return{c(){e=d("button"),e.textContent="Install update",c(e,"class","btn")},m(l,s){g(l,e,s),n||(i=M(e,"click",t[5]),n=!0)},p:x,d(l){l&&m(e),n=!1,i()}}}function ul(t){let e,n,i;return{c(){e=d("button"),e.textContent="Check update",c(e,"class","btn")},m(l,s){g(l,e,s),n||(i=M(e,"click",t[4]),n=!0)},p:x,d(l){l&&m(e),n=!1,i()}}}function dl(t){let e;function n(s,o){return!s[0]&&!s[2]?ul:!s[1]&&s[2]?cl:al}let i=n(t),l=i(t);return{c(){e=d("div"),l.c(),c(e,"class","flex children:grow children:h10")},m(s,o){g(s,e,o),l.m(e,null)},p(s,[o]){i===(i=n(s))&&l?l.p(s,o):(l.d(1),l=i(s),l&&(l.c(),l.m(e,null)))},i:x,o:x,d(s){s&&m(e),l.d()}}}function fl(t,e,n){let i,{onMessage:l}=e,s,o,r,u=0,f=0;async function h(){n(0,s=!0);try{const p=await rl();l(`Should update: ${p.response.available}`),l(p.response),n(2,r=p)}catch(p){l(p)}finally{n(0,s=!1)}}async function w(){n(1,o=!0),n(8,f=0);try{await r.downloadAndInstall(p=>{switch(p.event){case"Started":n(7,u=p.data.contentLength);break;case"Progress":n(8,f+=p.data.chunkLength);break;case"Finished":break}}),l("Installation complete, restarting..."),await new Promise(p=>setTimeout(p,2e3)),await Cn()}catch(p){console.error(p),l(p)}finally{n(1,o=!1)}}return t.$$set=p=>{"onMessage"in p&&n(6,l=p.onMessage)},t.$$.update=()=>{t.$$.dirty&384&&n(3,i=u?Math.round(f/u*100):0)},[s,o,r,i,h,w,l,u,f]}class pl extends de{constructor(e){super(),ue(this,e,fl,dl,se,{onMessage:6})}}async function hl(t,e){return C("plugin:clipboard-manager|write",{data:{plainText:{label:e==null?void 0:e.label,text:t}}})}async function bl(){return(await C("plugin:clipboard-manager|read")).plainText.text}function ml(t){let e,n,i,l,s,o,r,u;return{c(){e=d("div"),n=d("input"),i=y(),l=d("button"),l.textContent="Write",s=y(),o=d("button"),o.textContent="Read",c(n,"class","grow input"),c(n,"placeholder","Text to write to the clipboard"),c(l,"class","btn"),c(l,"type","button"),c(o,"class","btn"),c(o,"type","button"),c(e,"class","flex gap-1")},m(f,h){g(f,e,h),a(e,n),q(n,t[0]),a(e,i),a(e,l),a(e,s),a(e,o),r||(u=[M(n,"input",t[4]),M(l,"click",t[1]),M(o,"click",t[2])],r=!0)},p(f,[h]){h&1&&n.value!==f[0]&&q(n,f[0])},i:x,o:x,d(f){f&&m(e),r=!1,$(u)}}}function gl(t,e,n){let{onMessage:i}=e,l="clipboard message";function s(){hl(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function o(){bl().then(u=>{i(`Clipboard contents: ${u}`)}).catch(i)}function r(){l=this.value,n(0,l)}return t.$$set=u=>{"onMessage"in u&&n(3,i=u.onMessage)},[l,s,o,i,r]}class _l extends de{constructor(e){super(),ue(this,e,gl,ml,se,{onMessage:3})}}function wl(t){let e;return{c(){e=d("div"),e.innerHTML='<div class="note-red grow">Not available for Linux</div> <video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>',c(e,"class","flex flex-col gap-2")},m(n,i){g(n,e,i)},p:x,i:x,o:x,d(n){n&&m(e)}}}function vl(t,e,n){let{onMessage:i}=e;const l=window.constraints={audio:!0,video:!0};function s(r){const u=document.querySelector("video"),f=r.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=r,u.srcObject=r}function o(r){if(r.name==="ConstraintNotSatisfiedError"){const u=l.video;i(`The resolution ${u.width.exact}x${u.height.exact} px is not supported by your device.`)}else r.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: ${r.name}`,r)}return Pe(async()=>{try{const r=await navigator.mediaDevices.getUserMedia(l);s(r)}catch(r){o(r)}}),dn(()=>{window.stream.getTracks().forEach(function(r){r.stop()})}),t.$$set=r=>{"onMessage"in r&&n(0,i=r.onMessage)},[i]}class yl extends de{constructor(e){super(),ue(this,e,vl,wl,se,{onMessage:0})}}var xe;(function(t){t.QRCode="QR_CODE",t.UPC_A="UPC_A",t.UPC_E="UPC_E",t.EAN8="EAN_8",t.EAN13="EAN_13",t.Code39="CODE_39",t.Code93="CODE_93",t.Code128="CODE_128",t.Codabar="CODABAR",t.ITF="ITF",t.Aztec="AZTEC",t.DataMatrix="DATA_MATRIX",t.PDF417="PDF_417"})(xe||(xe={}));async function kl(t){return await C("plugin:barcode-scanner|scan",{...t})}async function Cl(){return await C("plugin:barcode-scanner|cancel")}async function Ll(){return await C("plugin:barcode-scanner|check_permissions").then(t=>t.camera)}async function Al(){return await C("plugin:barcode-scanner|request_permissions").then(t=>t.camera)}function Gt(t,e,n){const i=t.slice();return i[9]=e[n],i}function Qt(t){let e,n=t[9]+"",i;return{c(){e=d("option"),i=Z(n),e.__value=t[9],q(e,e.__value)},m(l,s){g(l,e,s),a(e,i)},p:x,d(l){l&&m(e)}}}function Sl(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k,_,A,L,v,E,O,U,S,j,T,I,W=ge(t[3]),R=[];for(let D=0;D<W.length;D+=1)R[D]=Qt(Gt(t,W,D));return{c(){e=d("div"),n=d("div"),i=d("div"),l=d("input"),s=y(),o=d("label"),o.textContent="Windowed",r=y(),u=d("div"),f=d("select");for(let D=0;D<R.length;D+=1)R[D].c();h=y(),w=d("button"),w.textContent="Scan",p=y(),b=d("div"),k=d("div"),k.innerHTML="",_=y(),A=d("div"),L=d("div"),v=d("div"),E=d("p"),E.textContent="Aim your camera at a QR code",O=y(),U=d("button"),U.textContent="Cancel",S=y(),j=d("div"),j.innerHTML='<div class="barcode-scanner--area--outer surround-cover svelte-u74si6"><div class="barcode-scanner--area--inner svelte-u74si6"></div></div>',c(l,"type","checkbox"),c(l,"id","scanner-windowed"),c(o,"for","scanner-windowed"),c(f,"class","input"),c(f,"id","format"),f.multiple=!0,t[2]===void 0&&je(()=>t[8].call(f)),c(w,"class","btn"),c(w,"type","button"),c(n,"class","svelte-u74si6"),be(n,"invisible",t[0]),c(k,"class","scanner-background svelte-u74si6"),c(E,"class","svelte-u74si6"),c(U,"class","btn"),c(U,"type","button"),c(v,"class","relative svelte-u74si6"),c(j,"class","square surround-cover svelte-u74si6"),c(L,"class","barcode-scanner--area--container svelte-u74si6"),c(A,"class","container full-height svelte-u74si6"),c(b,"class","scanning full-height svelte-u74si6"),be(b,"invisible",!t[0]),c(e,"class","full-height svelte-u74si6")},m(D,Y){g(D,e,Y),a(e,n),a(n,i),a(i,l),l.checked=t[1],a(i,s),a(i,o),a(n,r),a(n,u),a(u,f);for(let G=0;G<R.length;G+=1)R[G]&&R[G].m(f,null);wt(f,t[2]),a(n,h),a(n,w),a(e,p),a(e,b),a(b,k),a(b,_),a(b,A),a(A,L),a(L,v),a(v,E),a(v,O),a(v,U),a(L,S),a(L,j),T||(I=[M(l,"change",t[7]),M(f,"change",t[8]),M(w,"click",t[4]),M(U,"click",t[5])],T=!0)},p(D,[Y]){if(Y&2&&(l.checked=D[1]),Y&8){W=ge(D[3]);let G;for(G=0;G<W.length;G+=1){const P=Gt(D,W,G);R[G]?R[G].p(P,Y):(R[G]=Qt(P),R[G].c(),R[G].m(f,null))}for(;G<R.length;G+=1)R[G].d(1);R.length=W.length}Y&12&&wt(f,D[2]),Y&1&&be(n,"invisible",D[0]),Y&1&&be(b,"invisible",!D[0])},i:x,o:x,d(D){D&&m(e),We(R,D),T=!1,$(I)}}}function El(t,e,n){let{onMessage:i}=e,l=!1,s=!0,o=[xe.QRCode];const r=[xe.QRCode,xe.EAN13];async function u(){let p=await Ll();p==="prompt"&&(p=await Al()),p==="granted"?(n(0,l=!0),kl({windowed:s,formats:o}).then(b=>{n(0,l=!1),i(b)}).catch(b=>{n(0,l=!1),i(b)})):i("Permission denied")}async function f(){await Cl(),n(0,l=!1),i("cancelled")}function h(){s=this.checked,n(1,s)}function w(){o=Wn(this),n(2,o),n(3,r)}return t.$$set=p=>{"onMessage"in p&&n(6,i=p.onMessage)},[l,s,o,r,u,f,i,h,w]}class Ml extends de{constructor(e){super(),ue(this,e,El,Sl,se,{onMessage:6})}}var Xt;(function(t){t[t.None=0]="None",t[t.TouchID=1]="TouchID",t[t.FaceID=2]="FaceID",t[t.Iris=3]="Iris"})(Xt||(Xt={}));async function Tl(t,e){return C("plugin:biometric|authenticate",{reason:t,...e})}function Rl(t){let e,n,i,l,s,o,r,u;return{c(){e=d("div"),n=d("input"),i=y(),l=d("label"),l.textContent="Allow device credential",s=y(),o=d("button"),o.textContent="Authenticate",c(n,"type","checkbox"),c(n,"id","dllowDeviceCredential"),c(l,"for","allowDeviceCredentiale"),c(o,"class","btn"),c(o,"id","cli-matches")},m(f,h){g(f,e,h),a(e,n),n.checked=t[0],a(e,i),a(e,l),g(f,s,h),g(f,o,h),r||(u=[M(n,"change",t[3]),M(o,"click",t[1])],r=!0)},p(f,[h]){h&1&&(n.checked=f[0])},i:x,o:x,d(f){f&&(m(e),m(s),m(o)),r=!1,$(u)}}}function Pl(t,e,n){let{onMessage:i}=e,l=!0;function s(){Tl("Tauri API wants to show it is awesome :)",{allowDeviceCredential:l,cancelTitle:"Cancel request",fallbackTitle:"Trying the fallback option",title:"Tauri API Auth",subtitle:"Please authenticate :)",confirmationRequired:!1,maxAttemps:1}).then(i).catch(i)}function o(){l=this.checked,n(0,l)}return t.$$set=r=>{"onMessage"in r&&n(2,i=r.onMessage)},[l,s,i,o]}class Ol extends de{constructor(e){super(),ue(this,e,Pl,Rl,se,{onMessage:2})}}const Il=[84],Ul=[85];var Yt;(function(t){t[t.IsoDep=0]="IsoDep",t[t.MifareClassic=1]="MifareClassic",t[t.MifareUltralight=2]="MifareUltralight",t[t.Ndef=3]="Ndef",t[t.NdefFormatable=4]="NdefFormatable",t[t.NfcA=5]="NfcA",t[t.NfcB=6]="NfcB",t[t.NfcBarcode=7]="NfcBarcode",t[t.NfcF=8]="NfcF",t[t.NfcV=9]="NfcV"})(Yt||(Yt={}));var lt;(function(t){t[t.Empty=0]="Empty",t[t.NfcWellKnown=1]="NfcWellKnown",t[t.Media=2]="Media",t[t.AbsoluteURI=3]="AbsoluteURI",t[t.NfcExternal=4]="NfcExternal",t[t.Unknown=5]="Unknown",t[t.Unchanged=6]="Unchanged"})(lt||(lt={}));function Mn(t,e,n,i){return{format:t,kind:typeof e=="string"?Array.from(new TextEncoder().encode(e)):e,id:typeof n=="string"?Array.from(new TextEncoder().encode(n)):n,payload:typeof i=="string"?Array.from(new TextEncoder().encode(i)):i}}function Dl(t,e,n="en"){const i=Array.from(new TextEncoder().encode(n+t));return i.unshift(n.length),Mn(lt.NfcWellKnown,Il,e||[],i)}const Jt=["","http://www.","https://www.","http://","https://","tel:","mailto:","ftp://anonymous:anonymous@","ftp://ftp.","ftps://","sftp://","smb://","nfs://","ftp://","dav://","news:","telnet://","imap:","rtsp://","urn:","pop:","sip:","sips:","tftp:","btspp://","btl2cap://","btgoep://","tcpobex://","irdaobex://","file://","urn:epc:id:","urn:epc:tag:","urn:epc:pat:","urn:epc:raw:","urn:epc:","urn:nfc:"];function Nl(t){let e="";Jt.slice(1).forEach(function(l){(!e||e==="urn:")&&t.indexOf(l)===0&&(e=l)}),e||(e="");const n=Array.from(new TextEncoder().encode(t.slice(e.length))),i=Jt.indexOf(e);return n.unshift(i),n}function zl(t,e){return Mn(lt.NfcWellKnown,Ul,e||[],Nl(t))}function Tn(t){const{type:e,...n}=t;return{[e]:n}}async function Wl(t,e){return await C("plugin:nfc|scan",{kind:Tn(t),...e})}async function jl(t,e){const{kind:n,...i}=e||{};return n&&(i.kind=Tn(n)),await C("plugin:nfc|write",{records:t,...i})}function Zt(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k;return{c(){e=d("div"),n=d("p"),n.textContent="Filters",i=y(),l=d("div"),s=d("input"),o=y(),r=d("input"),u=y(),f=d("input"),h=y(),w=d("div"),p=d("input"),c(s,"class","input"),c(s,"placeholder","Scheme"),Ve(s,"width","33%"),c(r,"class","input"),c(r,"placeholder","Host"),Ve(r,"width","33%"),c(f,"class","input"),c(f,"placeholder","Path prefix"),Ve(f,"width","33%"),c(l,"class","flex gap-2"),c(p,"class","input"),c(p,"placeholder","Mime type"),c(w,"class","flex gap-2"),c(e,"class","flex flex-col gap-2 children:grow")},m(_,A){g(_,e,A),a(e,n),a(e,i),a(e,l),a(l,s),q(s,t[4]),a(l,o),a(l,r),q(r,t[5]),a(l,u),a(l,f),q(f,t[6]),a(e,h),a(e,w),a(w,p),q(p,t[7]),b||(k=[M(s,"input",t[13]),M(r,"input",t[14]),M(f,"input",t[15]),M(p,"input",t[16])],b=!0)},p(_,A){A&16&&s.value!==_[4]&&q(s,_[4]),A&32&&r.value!==_[5]&&q(r,_[5]),A&64&&f.value!==_[6]&&q(f,_[6]),A&128&&p.value!==_[7]&&q(p,_[7])},d(_){_&&m(e),b=!1,$(k)}}}function Hl(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k,_,A,L,v,E,O,U,S,j,T=t[8]&&Zt(t);return{c(){e=d("div"),n=d("div"),i=d("div"),l=d("input"),s=y(),o=d("label"),o.textContent="Write data",r=y(),u=d("select"),f=d("option"),f.textContent="TAG",h=d("option"),h.textContent="NDEF",w=y(),T&&T.c(),p=y(),b=d("div"),k=d("p"),k.textContent="Write Records",_=y(),A=d("div"),L=d("input"),v=y(),E=d("input"),O=y(),U=d("button"),U.textContent="Scan",c(l,"type","checkbox"),c(l,"id","nfc-write"),c(o,"for","nfc-write"),f.__value="tag",q(f,f.__value),h.__value="ndef",q(h,h.__value),c(u,"class","input"),c(u,"id","request-method"),t[0]===void 0&&je(()=>t[12].call(u)),c(n,"class","flex gap-2 children:grow items-center"),c(L,"class","input"),c(L,"placeholder","Text record"),c(E,"class","input"),c(E,"placeholder","URI record"),c(A,"class","flex"),c(b,"class","flex flex-col gap-2 children:grow"),c(U,"class","btn")},m(I,W){g(I,e,W),a(e,n),a(n,i),a(i,l),l.checked=t[1],a(i,s),a(i,o),a(n,r),a(n,u),a(u,f),a(u,h),et(u,t[0],!0),a(e,w),T&&T.m(e,null),a(e,p),a(e,b),a(b,k),a(b,_),a(b,A),a(A,L),q(L,t[2]),a(A,v),a(A,E),q(E,t[3]),a(e,O),a(e,U),S||(j=[M(l,"change",t[11]),M(u,"change",t[12]),M(L,"input",t[17]),M(E,"input",t[18]),M(U,"click",t[9])],S=!0)},p(I,[W]){W&2&&(l.checked=I[1]),W&1&&et(u,I[0]),I[8]?T?T.p(I,W):(T=Zt(I),T.c(),T.m(e,p)):T&&(T.d(1),T=null),W&4&&L.value!==I[2]&&q(L,I[2]),W&8&&E.value!==I[3]&&q(E,I[3])},i:x,o:x,d(I){I&&m(e),T&&T.d(),S=!1,$(j)}}}function ql(t,e,n){let{onMessage:i}=e;const l=new TextDecoder;let s="tag",o=!1,r="",u="",f="",h="",w="",p="",b;Pe(async()=>{n(8,b=await kn()==="android")});async function k(){i(`NFC scanning ${s}`);const T=await Wl({type:s,uri:{scheme:f||null,host:h||null,pathPrefix:w||null},mimeType:p||null},{keepSessionAlive:o,message:"Hold your iPhone near an NFC tag",successMessage:"Tag successfully read"});if(i({id:l.decode(new Uint8Array(T.id)),kind:T.kind,records:T.records.map(I=>({id:l.decode(new Uint8Array(I.id)),kind:l.decode(new Uint8Array(I.kind)),payload:l.decode(new Uint8Array(I.payload)),tnf:I.tnf}))}),o){const I=[];r&&I.push(Dl(r,"tauriTextId")),u&&I.push(zl(u,"tauriUriId")),await jl(I,{successMessage:"Data written to tag"}),i("Wrote to tag")}}function _(){k().catch(i)}function A(){o=this.checked,n(1,o)}function L(){s=cn(this),n(0,s)}function v(){f=this.value,n(4,f)}function E(){h=this.value,n(5,h)}function O(){w=this.value,n(6,w)}function U(){p=this.value,n(7,p)}function S(){r=this.value,n(2,r)}function j(){u=this.value,n(3,u)}return t.$$set=T=>{"onMessage"in T&&n(10,i=T.onMessage)},[s,o,r,u,f,h,w,p,b,_,i,A,L,v,E,O,U,S,j]}class Vl extends de{constructor(e){super(),ue(this,e,ql,Hl,se,{onMessage:10})}}function Bt(t,e,n){const i=t.slice();return i[35]=e[n],i}function Kt(t,e,n){const i=t.slice();return i[38]=e[n],i}function $t(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k,_;function A(S,j){return S[3]?xl:Fl}let L=A(t),v=L(t);function E(S,j){return S[2]?Ql:Gl}let O=E(t),U=O(t);return{c(){e=d("div"),n=d("span"),n.textContent="Tauri API Validation",i=y(),l=d("span"),s=d("span"),v.c(),r=y(),u=d("span"),u.innerHTML='<div class="i-codicon-chrome-minimize"></div>',f=y(),h=d("span"),U.c(),p=y(),b=d("span"),b.innerHTML='<div class="i-codicon-chrome-close"></div>',c(n,"class","lt-sm:pl-10 text-darkPrimaryText"),c(s,"title",o=t[3]?"Switch to Light mode":"Switch to Dark mode"),c(s,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),c(u,"title","Minimize"),c(u,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),c(h,"title",w=t[2]?"Restore":"Maximize"),c(h,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),c(b,"title","Close"),c(b,"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"),c(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),c(e,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),c(e,"data-tauri-drag-region","")},m(S,j){g(S,e,j),a(e,n),a(e,i),a(e,l),a(l,s),v.m(s,null),a(l,r),a(l,u),a(l,f),a(l,h),U.m(h,null),a(l,p),a(l,b),k||(_=[M(s,"click",t[14]),M(u,"click",t[11]),M(h,"click",t[12]),M(b,"click",t[13])],k=!0)},p(S,j){L!==(L=A(S))&&(v.d(1),v=L(S),v&&(v.c(),v.m(s,null))),j[0]&8&&o!==(o=S[3]?"Switch to Light mode":"Switch to Dark mode")&&c(s,"title",o),O!==(O=E(S))&&(U.d(1),U=O(S),U&&(U.c(),U.m(h,null))),j[0]&4&&w!==(w=S[2]?"Restore":"Maximize")&&c(h,"title",w)},d(S){S&&m(e),v.d(),U.d(),k=!1,$(_)}}}function Fl(t){let e;return{c(){e=d("div"),c(e,"class","i-ph-moon")},m(n,i){g(n,e,i)},d(n){n&&m(e)}}}function xl(t){let e;return{c(){e=d("div"),c(e,"class","i-ph-sun")},m(n,i){g(n,e,i)},d(n){n&&m(e)}}}function Gl(t){let e;return{c(){e=d("div"),c(e,"class","i-codicon-chrome-maximize")},m(n,i){g(n,e,i)},d(n){n&&m(e)}}}function Ql(t){let e;return{c(){e=d("div"),c(e,"class","i-codicon-chrome-restore")},m(n,i){g(n,e,i)},d(n){n&&m(e)}}}function Xl(t){let e;return{c(){e=d("span"),c(e,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){g(n,e,i)},d(n){n&&m(e)}}}function Yl(t){let e;return{c(){e=d("span"),c(e,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){g(n,e,i)},d(n){n&&m(e)}}}function en(t){let e,n,i,l,s,o,r,u,f;function h(b,k){return b[3]?Zl:Jl}let w=h(t),p=w(t);return{c(){e=d("a"),p.c(),n=y(),i=d("br"),l=y(),s=d("div"),o=y(),r=d("br"),c(e,"href","##"),c(e,"class","nv justify-between h-8"),c(s,"class","bg-white/5 h-2px")},m(b,k){g(b,e,k),p.m(e,null),g(b,n,k),g(b,i,k),g(b,l,k),g(b,s,k),g(b,o,k),g(b,r,k),u||(f=M(e,"click",t[14]),u=!0)},p(b,k){w!==(w=h(b))&&(p.d(1),p=w(b),p&&(p.c(),p.m(e,null)))},d(b){b&&(m(e),m(n),m(i),m(l),m(s),m(o),m(r)),p.d(),u=!1,f()}}}function Jl(t){let e,n;return{c(){e=Z(`Switch to Dark mode
`),n=d("div"),c(n,"class","i-ph-moon")},m(i,l){g(i,e,l),g(i,n,l)},d(i){i&&(m(e),m(n))}}}function Zl(t){let e,n;return{c(){e=Z(`Switch to Light mode
`),n=d("div"),c(n,"class","i-ph-sun")},m(i,l){g(i,e,l),g(i,n,l)},d(i){i&&(m(e),m(n))}}}function Bl(t){let e,n,i,l,s,o,r;function u(){return t[22](t[38])}return{c(){e=d("a"),n=d("div"),i=y(),l=d("p"),l.textContent=`${t[38].label}`,c(n,"class",t[38].icon+" mr-2"),c(e,"href","##"),c(e,"class",s="nv "+(t[1]===t[38]?"nv_selected":""))},m(f,h){g(f,e,h),a(e,n),a(e,i),a(e,l),o||(r=M(e,"click",u),o=!0)},p(f,h){t=f,h[0]&2&&s!==(s="nv "+(t[1]===t[38]?"nv_selected":""))&&c(e,"class",s)},d(f){f&&m(e),o=!1,r()}}}function tn(t){let e,n=t[38]&&Bl(t);return{c(){n&&n.c(),e=Ie()},m(i,l){n&&n.m(i,l),g(i,e,l)},p(i,l){i[38]&&n.p(i,l)},d(i){i&&m(e),n&&n.d(i)}}}function nn(t){let e,n=t[35].html+"",i;return{c(){e=new jn(!1),i=Ie(),e.a=i},m(l,s){e.m(n,l,s),g(l,i,s)},p(l,s){s[0]&128&&n!==(n=l[35].html+"")&&e.p(n)},d(l){l&&(m(i),e.d())}}}function Kl(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k,_,A,L,v,E,O,U,S,j,T,I,W,R=t[1].label+"",D,Y,G,P,z,oe,ee,re,B,te,F,K,H,Q,fe,me,Ae,He,ae=t[6]&&$t(t);function Ee(N,J){return N[0]?Yl:Xl}let ve=Ee(t),we=ve(t),ne=!t[6]&&en(t),ye=ge(t[9]),ie=[];for(let N=0;N<ye.length;N+=1)ie[N]=tn(Kt(t,ye,N));var ke=t[1].component;function Me(N,J){return{props:{onMessage:N[16],insecureRenderHtml:N[17]}}}ke&&(z=vt(ke,Me(t)));let Ce=ge(t[7]),le=[];for(let N=0;N<Ce.length;N+=1)le[N]=nn(Bt(t,Ce,N));return{c(){ae&&ae.c(),e=y(),n=d("div"),we.c(),i=y(),l=d("div"),s=d("aside"),o=d("img"),u=y(),ne&&ne.c(),f=y(),h=d("a"),h.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,w=y(),p=d("a"),p.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,b=y(),k=d("a"),k.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,_=y(),A=d("br"),L=y(),v=d("div"),E=y(),O=d("br"),U=y(),S=d("div");for(let N=0;N<ie.length;N+=1)ie[N].c();j=y(),T=d("main"),I=d("div"),W=d("h1"),D=Z(R),Y=y(),G=d("div"),P=d("div"),z&&tt(z.$$.fragment),oe=y(),ee=d("div"),re=d("div"),B=y(),te=d("div"),F=d("p"),F.textContent="Console",K=y(),H=d("div"),H.innerHTML='<div class="i-codicon-clear-all"></div>',Q=y(),fe=d("div");for(let N=0;N<le.length;N+=1)le[N].c();c(n,"id","sidebarToggle"),c(n,"class","z-2000 sidebar-toggle display-none lt-sm:flex justify-center absolute items-center w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),c(o,"class","self-center p-7 cursor-pointer"),On(o.src,r="tauri_logo.png")||c(o,"src",r),c(o,"alt","Tauri logo"),c(h,"class","nv justify-between h-8"),c(h,"target","_blank"),c(h,"href","https://tauri.app/v1/guides/"),c(p,"class","nv justify-between h-8"),c(p,"target","_blank"),c(p,"href","https://github.com/tauri-apps/tauri"),c(k,"class","nv justify-between h-8"),c(k,"target","_blank"),c(k,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),c(v,"class","bg-white/5 h-2px"),c(S,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),c(s,"id","sidebar"),c(s,"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"),c(P,"class","mr-2"),c(G,"class","overflow-y-auto"),c(I,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),c(re,"class","bg-black/20 h-2px cursor-ns-resize"),c(F,"class","font-semibold"),c(H,"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 "),c(te,"class","flex justify-between items-center px-2"),c(fe,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs select-text mr-2"),c(ee,"id","console"),c(ee,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),c(T,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),be(T,"transparent",t[8]),c(l,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(N,J){ae&&ae.m(N,J),g(N,e,J),g(N,n,J),we.m(n,null),g(N,i,J),g(N,l,J),a(l,s),a(s,o),a(s,u),ne&&ne.m(s,null),a(s,f),a(s,h),a(s,w),a(s,p),a(s,b),a(s,k),a(s,_),a(s,A),a(s,L),a(s,v),a(s,E),a(s,O),a(s,U),a(s,S);for(let V=0;V<ie.length;V+=1)ie[V]&&ie[V].m(S,null);a(l,j),a(l,T),a(T,I),a(I,W),a(W,D),a(I,Y),a(I,G),a(G,P),z&&Xe(z,P,null),a(T,oe),a(T,ee),a(ee,re),a(ee,B),a(ee,te),a(te,F),a(te,K),a(te,H),a(ee,Q),a(ee,fe);for(let V=0;V<le.length;V+=1)le[V]&&le[V].m(fe,null);t[23](fe),t[24](ee),me=!0,Ae||(He=[M(o,"click",t[21]),M(re,"mousedown",t[19]),M(H,"click",t[18])],Ae=!0)},p(N,J){if(N[6]?ae?ae.p(N,J):(ae=$t(N),ae.c(),ae.m(e.parentNode,e)):ae&&(ae.d(1),ae=null),ve!==(ve=Ee(N))&&(we.d(1),we=ve(N),we&&(we.c(),we.m(n,null))),N[6]?ne&&(ne.d(1),ne=null):ne?ne.p(N,J):(ne=en(N),ne.c(),ne.m(s,f)),J[0]&1539){ye=ge(N[9]);let V;for(V=0;V<ye.length;V+=1){const X=Kt(N,ye,V);ie[V]?ie[V].p(X,J):(ie[V]=tn(X),ie[V].c(),ie[V].m(S,null))}for(;V<ie.length;V+=1)ie[V].d(1);ie.length=ye.length}if((!me||J[0]&2)&&R!==(R=N[1].label+"")&&he(D,R),J[0]&2&&ke!==(ke=N[1].component)){if(z){st();const V=z;Le(V.$$.fragment,1,0,()=>{Ye(V,1)}),ot()}ke?(z=vt(ke,Me(N)),tt(z.$$.fragment),_e(z.$$.fragment,1),Xe(z,P,null)):z=null}if(J[0]&128){Ce=ge(N[7]);let V;for(V=0;V<Ce.length;V+=1){const X=Bt(N,Ce,V);le[V]?le[V].p(X,J):(le[V]=nn(X),le[V].c(),le[V].m(fe,null))}for(;V<le.length;V+=1)le[V].d(1);le.length=Ce.length}},i(N){me||(z&&_e(z.$$.fragment,N),me=!0)},o(N){z&&Le(z.$$.fragment,N),me=!1},d(N){N&&(m(e),m(n),m(i),m(l)),ae&&ae.d(N),we.d(),ne&&ne.d(),We(ie,N),z&&Ye(z),We(le,N),t[23](null),t[24](null),Ae=!1,$(He)}}}let ln=50;function sn(t){const e=document.querySelector("html");t?e.classList.add("dark"):e.classList.remove("dark"),localStorage&&localStorage.setItem("theme",t?"dark":"")}function $l(t,e){t.style.setProperty("--translate-x",`${e?"0":"-18.75"}rem`)}function es(t,e,n){let i;const l=mt();l.label!=="main"&&l.onCloseRequested(async F=>{await confirm("Are you sure?")||F.preventDefault()}),l.onFileDropEvent(F=>{E(`File drop: ${JSON.stringify(F.payload)}`)});const s=navigator.userAgent.toLowerCase(),o=s.includes("android")||s.includes("iphone"),r=[{label:"Welcome",component:ai,icon:"i-ph-hand-waving"},{label:"Communication",component:bi,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:fi,icon:"i-codicon-terminal"},{label:"Dialog",component:Ii,icon:"i-codicon-multiple-windows"},{label:"File system",component:zi,icon:"i-codicon-files"},{label:"HTTP",component:Xi,icon:"i-ph-globe-hemisphere-west"},{label:"Notifications",component:Zi,icon:"i-codicon-bell-dot"},!o&&{label:"Shortcuts",component:nl,icon:"i-codicon-record-keys"},{label:"Shell",component:sl,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:pl,icon:"i-codicon-cloud-download"},{label:"Clipboard",component:_l,icon:"i-codicon-clippy"},{label:"WebRTC",component:yl,icon:"i-ph-broadcast"},o&&{label:"Scanner",component:Ml,icon:"i-ph-scan"},o&&{label:"NFC",component:Vl,icon:"i-ph-nfc"},o&&{label:"Biometric",component:Ol,icon:"i-ph-scan"}];let u=r[0];function f(F){n(1,u=F)}let h;Pe(async()=>{n(2,h=await l.isMaximized()),l.onResized(async()=>{n(2,h=await l.isMaximized())})});function w(){l.minimize()}async function p(){await l.isMaximized()?l.unmaximize():l.maximize()}let b=!1;async function k(){b||(b=await wi("Are you sure that you want to close this window?",{title:"Tauri API"}),b&&l.close())}let _;Pe(()=>{n(3,_=localStorage&&localStorage.getItem("theme")=="dark"),sn(_)});function A(){n(3,_=!_),sn(_)}let L=bn([]);an(t,L,F=>n(7,i=F));let v;async function E(F){L.update(K=>[...K,{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+(typeof F=="string"?F:JSON.stringify(F,null,1))+"</pre>"}]),await kt(),v&&n(4,v.scrollTop=v.scrollHeight,v)}async function O(F){L.update(K=>[...K,{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+F+"</pre>"}]),await kt(),v&&n(4,v.scrollTop=v.scrollHeight,v)}function U(){L.update(()=>[])}let S,j,T;function I(F){T=F.clientY;const K=window.getComputedStyle(S);j=parseInt(K.height,10);const H=fe=>{const me=fe.clientY-T,Ae=j-me;n(5,S.style.height=`${Ae<ln?ln:Ae}px`,S)},Q=()=>{document.removeEventListener("mouseup",Q),document.removeEventListener("mousemove",H)};document.addEventListener("mouseup",Q),document.addEventListener("mousemove",H)}let W;Pe(async()=>{n(6,W=await kn()==="windows")});let R=!1,D,Y,G=!1,P=0,z=0;const oe=(F,K,H)=>Math.min(Math.max(K,F),H);Pe(()=>{n(20,D=document.querySelector("#sidebar")),Y=document.querySelector("#sidebarToggle"),document.addEventListener("click",F=>{Y.contains(F.target)?n(0,R=!R):R&&!D.contains(F.target)&&n(0,R=!1)}),document.addEventListener("touchstart",F=>{if(Y.contains(F.target))return;const K=F.touches[0].clientX;(0<K&&K<20&&!R||R)&&(G=!0,P=K)}),document.addEventListener("touchmove",F=>{if(G){const K=F.touches[0].clientX;z=K;const H=(K-P)/10;D.style.setProperty("--translate-x",`-${oe(0,R?0-H:18.75-H,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(G){const F=(z-P)/10;n(0,R=R?F>-(18.75/2):F>18.75/2)}G=!1})});const ee=()=>Xn("https://tauri.app/"),re=F=>{f(F),n(0,R=!1)};function B(F){Qe[F?"unshift":"push"](()=>{v=F,n(4,v)})}function te(F){Qe[F?"unshift":"push"](()=>{S=F,n(5,S)})}return t.$$.update=()=>{if(t.$$.dirty[0]&1){const F=document.querySelector("#sidebar");F&&$l(F,R)}},[R,u,h,_,v,S,W,i,o,r,f,w,p,k,A,L,E,O,U,I,D,ee,re,B,te]}class ts extends de{constructor(e){super(),ue(this,e,es,Kl,se,{},null,[-1,-1])}}new ts({target:document.querySelector("#app")});