tauri/examples/api/dist/assets/index.js
2023-10-20 08:56:02 -03:00

42 lines
57 KiB
JavaScript

var no=Object.defineProperty;var lo=(e,t,n)=>t in e?no(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ft=(e,t,n)=>(lo(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const _ of r.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&i(_)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();function ee(){}function Rs(e){return e()}function cs(){return Object.create(null)}function Fe(e){e.forEach(Rs)}function Ds(e){return typeof e=="function"}function Pt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Sl;function io(e,t){return e===t?!0:(Sl||(Sl=document.createElement("a")),Sl.href=t,e===Sl.href)}function so(e){return Object.keys(e).length===0}function oo(e,...t){if(e==null){for(const i of t)i(void 0);return ee}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ao(e,t,n){e.$$.on_destroy.push(oo(t,n))}function l(e,t){e.appendChild(t)}function w(e,t,n){e.insertBefore(t,n||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function Ct(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function s(e){return document.createElement(e)}function ro(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function p(e){return document.createTextNode(e)}function c(){return p(" ")}function hi(){return p("")}function k(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function ds(e){return function(t){return t.preventDefault(),e.call(this,t)}}function a(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e){return e===""?null:+e}function uo(e){return Array.from(e.childNodes)}function se(e,t){t=""+t,e.data!==t&&(e.data=t)}function T(e,t){e.value=t??""}function Jt(e,t,n,i){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,i?"important":"")}function Ye(e,t,n){for(let i=0;i<e.options.length;i+=1){const o=e.options[i];if(o.__value===t){o.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function vn(e){const t=e.querySelector(":checked");return t&&t.__value}class co{constructor(t=!1){ft(this,"is_svg",!1);ft(this,"e");ft(this,"n");ft(this,"t");ft(this,"a");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=ro(n.nodeName):this.e=s(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let n=0;n<this.n.length;n+=1)w(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(m)}}function fs(e,t){return new e(t)}let zn;function kn(e){zn=e}function Hs(){if(!zn)throw new Error("Function called outside component initialization");return zn}function Tl(e){Hs().$$.on_mount.push(e)}function Us(e){Hs().$$.on_destroy.push(e)}const xt=[],ri=[];let $t=[];const hs=[],fo=Promise.resolve();let ui=!1;function ho(){ui||(ui=!0,fo.then(qs))}function pt(e){$t.push(e)}const ai=new Set;let Qt=0;function qs(){if(Qt!==0)return;const e=zn;do{try{for(;Qt<xt.length;){const t=xt[Qt];Qt++,kn(t),po(t.$$)}}catch(t){throw xt.length=0,Qt=0,t}for(kn(null),xt.length=0,Qt=0;ri.length;)ri.pop()();for(let t=0;t<$t.length;t+=1){const n=$t[t];ai.has(n)||(ai.add(n),n())}$t.length=0}while(xt.length);for(;hs.length;)hs.pop()();ui=!1,ai.clear(),kn(e)}function po(e){if(e.fragment!==null){e.update(),Fe(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(pt)}}function bo(e){const t=[],n=[];$t.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),$t=t}const Cl=new Set;let St;function go(){St={r:0,c:[],p:St}}function _o(){St.r||Fe(St.c),St=St.p}function ci(e,t){e&&e.i&&(Cl.delete(e),e.i(t))}function ps(e,t,n,i){if(e&&e.o){if(Cl.has(e))return;Cl.add(e),St.c.push(()=>{Cl.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ye(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function bs(e){e&&e.c()}function di(e,t,n){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),pt(()=>{const r=e.$$.on_mount.map(Rs).filter(Ds);e.$$.on_destroy?e.$$.on_destroy.push(...r):Fe(r),e.$$.on_mount=[]}),o.forEach(pt)}function fi(e,t){const n=e.$$;n.fragment!==null&&(bo(n.after_update),Fe(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function mo(e,t){e.$$.dirty[0]===-1&&(xt.push(e),ho(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function en(e,t,n,i,o,r,_=null,h=[-1]){const g=zn;kn(e);const d=e.$$={fragment:null,ctx:[],props:r,update:ee,not_equal:o,bound:cs(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(g?g.$$.context:[])),callbacks:cs(),dirty:h,skip_bound:!1,root:t.target||g.$$.root};_&&_(d.root);let I=!1;if(d.ctx=n?n(e,t.props||{},(z,Y,...E)=>{const A=E.length?E[0]:Y;return d.ctx&&o(d.ctx[z],d.ctx[z]=A)&&(!d.skip_bound&&d.bound[z]&&d.bound[z](A),I&&mo(e,z)),Y}):[],d.update(),I=!0,Fe(d.before_update),d.fragment=i?i(d.ctx):!1,t.target){if(t.hydrate){const z=uo(t.target);d.fragment&&d.fragment.l(z),z.forEach(m)}else d.fragment&&d.fragment.c();t.intro&&ci(e.$$.fragment),di(e,t.target,t.anchor),qs()}kn(g)}class tn{constructor(){ft(this,"$$");ft(this,"$$set")}$destroy(){fi(this,1),this.$destroy=ee}$on(t,n){if(!Ds(n))return ee;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!so(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const wo="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(wo);const Zt=[];function vo(e,t=ee){let n;const i=new Set;function o(h){if(Pt(e,h)&&(e=h,n)){const g=!Zt.length;for(const d of i)d[1](),Zt.push(d,e);if(g){for(let d=0;d<Zt.length;d+=2)Zt[d][0](Zt[d+1]);Zt.length=0}}}function r(h){o(h(e))}function _(h,g=ee){const d=[h,g];return i.add(d),i.size===1&&(n=t(o,r)||ee),h(e),()=>{i.delete(d),i.size===0&&n&&(n(),n=null)}}return{set:o,update:r,subscribe:_}}var yo=Object.defineProperty,En=(e,t)=>{for(var n in t)yo(e,n,{get:t[n],enumerable:!0})},Bs=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},gs=(e,t,n)=>(Bs(e,t,"read from private field"),n?n.call(e):t.get(e)),ko=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},zo=(e,t,n,i)=>(Bs(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Lo={};En(Lo,{Channel:()=>Fs,PluginListener:()=>js,addPluginListener:()=>Eo,convertFileSrc:()=>So,invoke:()=>b,transformCallback:()=>pi});function pi(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}var yn,Fs=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,ko(this,yn,()=>{}),this.id=pi(t=>{gs(this,yn).call(this,t)})}set onmessage(t){zo(this,yn,t)}get onmessage(){return gs(this,yn)}toJSON(){return`__CHANNEL__:${this.id}`}};yn=new WeakMap;var js=class{constructor(t,n,i){this.plugin=t,this.event=n,this.channelId=i}async unregister(){return b(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function Eo(e,t,n){let i=new Fs;return i.onmessage=n,b(`plugin:${e}|register_listener`,{event:t,handler:i}).then(()=>new js(e,t,i.id))}async function b(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function So(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}var Co={};En(Co,{getName:()=>Gs,getTauriVersion:()=>Xs,getVersion:()=>Vs,hide:()=>Ks,show:()=>Ys});async function Vs(){return b("plugin:app|version")}async function Gs(){return b("plugin:app|name")}async function Xs(){return b("plugin:app|tauri_version")}async function Ys(){return b("plugin:app|app_show")}async function Ks(){return b("plugin:app|app_hide")}function Po(e){let t,n,i,o,r,_,h,g,d,I,z,Y,E,A,M,N,ae,H,W,V,G,P,F,re;return{c(){t=s("div"),n=s("p"),n.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.`,i=c(),o=s("br"),r=c(),_=s("br"),h=c(),g=s("pre"),d=p(" App name: "),I=s("code"),z=p(e[2]),Y=p(`
App version: `),E=s("code"),A=p(e[0]),M=p(`
Tauri version: `),N=s("code"),ae=p(e[1]),H=p(`
`),W=c(),V=s("br"),G=c(),P=s("button"),P.textContent="Context menu",a(P,"class","btn")},m(R,x){w(R,t,x),l(t,n),l(t,i),l(t,o),l(t,r),l(t,_),l(t,h),l(t,g),l(g,d),l(g,I),l(I,z),l(g,Y),l(g,E),l(E,A),l(g,M),l(g,N),l(N,ae),l(g,H),l(t,W),l(t,V),l(t,G),l(t,P),F||(re=k(P,"click",e[3]),F=!0)},p(R,[x]){x&4&&se(z,R[2]),x&1&&se(A,R[0]),x&2&&se(ae,R[1])},i:ee,o:ee,d(R){R&&m(t),F=!1,re()}}}function To(e,t,n){let i="1.0.0",o="1.0.0",r="Unknown";Gs().then(h=>{n(2,r=h)}),Vs().then(h=>{n(0,i=h)}),Xs().then(h=>{n(1,o=h)});function _(){b("popup_context_menu")}return[i,o,r,_]}class Ao extends tn{constructor(t){super(),en(this,t,To,Po,Pt,{})}}var Mo={};En(Mo,{TauriEvent:()=>Js,emit:()=>bi,listen:()=>Ol,once:()=>Zs});var Js=(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))(Js||{});async function Qs(e,t){await b("plugin:event|unlisten",{event:e,eventId:t})}async function Ol(e,t,n){return b("plugin:event|listen",{event:e,windowLabel:n==null?void 0:n.target,handler:pi(t)}).then(i=>async()=>Qs(e,i))}async function Zs(e,t,n){return Ol(e,i=>{t(i),Qs(e,i.id).catch(()=>{})},n)}async function bi(e,t,n){await b("plugin:event|emit",{event:e,windowLabel:n==null?void 0:n.target,payload:t})}function Io(e){let t,n,i,o,r,_,h,g;return{c(){t=s("div"),n=s("button"),n.textContent="Call Log API",i=c(),o=s("button"),o.textContent="Call Request (async) API",r=c(),_=s("button"),_.textContent="Send event to Rust",a(n,"class","btn"),a(n,"id","log"),a(o,"class","btn"),a(o,"id","request"),a(_,"class","btn"),a(_,"id","event")},m(d,I){w(d,t,I),l(t,n),l(t,i),l(t,o),l(t,r),l(t,_),h||(g=[k(n,"click",e[0]),k(o,"click",e[1]),k(_,"click",e[2])],h=!0)},p:ee,i:ee,o:ee,d(d){d&&m(t),h=!1,Fe(g)}}}function Oo(e,t,n){let{onMessage:i}=t,o;Tl(async()=>{o=await Ol("rust-event",i)}),Us(()=>{o&&o()});function r(){b("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function _(){b("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function h(){bi("js-event","this is the payload string")}return e.$$set=g=>{"onMessage"in g&&n(3,i=g.onMessage)},[r,_,h,i]}class No extends tn{constructor(t){super(),en(this,t,Oo,Io,Pt,{onMessage:3})}}var Wo={};En(Wo,{LogicalPosition:()=>gi,LogicalSize:()=>Ln,PhysicalPosition:()=>xe,PhysicalSize:()=>ht});var Ln=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},ht=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Ln(this.width/e,this.height/e)}},gi=class{constructor(t,n){this.type="Logical",this.x=t,this.y=n}},xe=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new gi(this.x/e,this.y/e)}},Ro={};En(Ro,{CloseRequestedEvent:()=>xs,Effect:()=>Ml,EffectState:()=>Il,LogicalPosition:()=>gi,LogicalSize:()=>Ln,PhysicalPosition:()=>xe,PhysicalSize:()=>ht,ProgressBarStatus:()=>Al,UserAttentionType:()=>_i,Window:()=>Nl,availableMonitors:()=>Uo,currentMonitor:()=>Do,getAll:()=>Pl,getCurrent:()=>mi,primaryMonitor:()=>Ho});var _i=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(_i||{}),xs=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}},Al=(e=>(e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error",e))(Al||{});function mi(){return new Nl(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function Pl(){return window.__TAURI_INTERNALS__.metadata.windows.map(e=>new Nl(e.label,{skip:!0}))}var _s=["tauri://created","tauri://error"],Nl=class $s{constructor(t,n={}){this.label=t,this.listeners=Object.create(null),n!=null&&n.skip||b("plugin:window|create",{options:{...n,label:t}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static getByLabel(t){return Pl().some(n=>n.label===t)?new $s(t,{skip:!0}):null}static getCurrent(){return mi()}static getAll(){return Pl()}static async getFocusedWindow(){for(let t of Pl())if(await t.isFocused())return t;return null}async listen(t,n){return this._handleTauriEvent(t,n)?Promise.resolve(()=>{let i=this.listeners[t];i.splice(i.indexOf(n),1)}):Ol(t,n,{target:this.label})}async once(t,n){return this._handleTauriEvent(t,n)?Promise.resolve(()=>{let i=this.listeners[t];i.splice(i.indexOf(n),1)}):Zs(t,n,{target:this.label})}async emit(t,n){if(_s.includes(t)){for(let i of this.listeners[t]||[])i({event:t,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return bi(t,n,{target:this.label})}_handleTauriEvent(t,n){return _s.includes(t)?(t in this.listeners?this.listeners[t].push(n):this.listeners[t]=[n],!0):!1}async scaleFactor(){return b("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return b("plugin:window|inner_position",{label:this.label}).then(({x:t,y:n})=>new xe(t,n))}async outerPosition(){return b("plugin:window|outer_position",{label:this.label}).then(({x:t,y:n})=>new xe(t,n))}async innerSize(){return b("plugin:window|inner_size",{label:this.label}).then(({width:t,height:n})=>new ht(t,n))}async outerSize(){return b("plugin:window|outer_size",{label:this.label}).then(({width:t,height:n})=>new ht(t,n))}async isFullscreen(){return b("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return b("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return b("plugin:window|is_maximized",{label:this.label})}async isFocused(){return b("plugin:window|is_focused",{label:this.label})}async isDecorated(){return b("plugin:window|is_decorated",{label:this.label})}async isResizable(){return b("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return b("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return b("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return b("plugin:window|is_closable",{label:this.label})}async isVisible(){return b("plugin:window|is_visible",{label:this.label})}async title(){return b("plugin:window|title",{label:this.label})}async theme(){return b("plugin:window|theme",{label:this.label})}async center(){return b("plugin:window|center",{label:this.label})}async requestUserAttention(t){let n=null;return t&&(t===1?n={type:"Critical"}:n={type:"Informational"}),b("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(t){return b("plugin:window|set_resizable",{label:this.label,value:t})}async setMaximizable(t){return b("plugin:window|set_maximizable",{label:this.label,value:t})}async setMinimizable(t){return b("plugin:window|set_minimizable",{label:this.label,value:t})}async setClosable(t){return b("plugin:window|set_closable",{label:this.label,value:t})}async setTitle(t){return b("plugin:window|set_title",{label:this.label,value:t})}async maximize(){return b("plugin:window|maximize",{label:this.label})}async unmaximize(){return b("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return b("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return b("plugin:window|minimize",{label:this.label})}async unminimize(){return b("plugin:window|unminimize",{label:this.label})}async show(){return b("plugin:window|show",{label:this.label})}async hide(){return b("plugin:window|hide",{label:this.label})}async close(){return b("plugin:window|close",{label:this.label})}async setDecorations(t){return b("plugin:window|set_decorations",{label:this.label,value:t})}async setShadow(t){return b("plugin:window|set_shadow",{label:this.label,value:t})}async setEffects(t){return b("plugin:window|set_effects",{label:this.label,value:t})}async clearEffects(){return b("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(t){return b("plugin:window|set_always_on_top",{label:this.label,value:t})}async setAlwaysOnBottom(t){return b("plugin:window|set_always_on_bottom",{label:this.label,value:t})}async setContentProtected(t){return b("plugin:window|set_content_protected",{label:this.label,value:t})}async setSize(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_size",{label:this.label,value:{type:t.type,data:{width:t.width,height:t.height}}})}async setMinSize(t){if(t&&t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_min_size",{label:this.label,value:t?{type:t.type,data:{width:t.width,height:t.height}}:null})}async setMaxSize(t){if(t&&t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_max_size",{label:this.label,value:t?{type:t.type,data:{width:t.width,height:t.height}}:null})}async setPosition(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return b("plugin:window|set_position",{label:this.label,value:{type:t.type,data:{x:t.x,y:t.y}}})}async setFullscreen(t){return b("plugin:window|set_fullscreen",{label:this.label,value:t})}async setFocus(){return b("plugin:window|set_focus",{label:this.label})}async setIcon(t){return b("plugin:window|set_icon",{label:this.label,value:typeof t=="string"?t:Array.from(t)})}async setSkipTaskbar(t){return b("plugin:window|set_skip_taskbar",{label:this.label,value:t})}async setCursorGrab(t){return b("plugin:window|set_cursor_grab",{label:this.label,value:t})}async setCursorVisible(t){return b("plugin:window|set_cursor_visible",{label:this.label,value:t})}async setCursorIcon(t){return b("plugin:window|set_cursor_icon",{label:this.label,value:t})}async setCursorPosition(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return b("plugin:window|set_cursor_position",{label:this.label,value:{type:t.type,data:{x:t.x,y:t.y}}})}async setIgnoreCursorEvents(t){return b("plugin:window|set_ignore_cursor_events",{label:this.label,value:t})}async startDragging(){return b("plugin:window|start_dragging",{label:this.label})}async setProgressBar(t){return b("plugin:window|set_progress_bar",{label:this.label,value:t})}async onResized(t){return this.listen("tauri://resize",n=>{n.payload=to(n.payload),t(n)})}async onMoved(t){return this.listen("tauri://move",n=>{n.payload=eo(n.payload),t(n)})}async onCloseRequested(t){return this.listen("tauri://close-requested",n=>{let i=new xs(n);Promise.resolve(t(i)).then(()=>{if(!i.isPreventDefault())return this.close()})})}async onFocusChanged(t){let n=await this.listen("tauri://focus",o=>{t({...o,payload:!0})}),i=await this.listen("tauri://blur",o=>{t({...o,payload:!1})});return()=>{n(),i()}}async onScaleChanged(t){return this.listen("tauri://scale-change",t)}async onMenuClicked(t){return this.listen("tauri://menu",t)}async onFileDropEvent(t){let n=await this.listen("tauri://file-drop",r=>{t({...r,payload:{type:"drop",paths:r.payload}})}),i=await this.listen("tauri://file-drop-hover",r=>{t({...r,payload:{type:"hover",paths:r.payload}})}),o=await this.listen("tauri://file-drop-cancelled",r=>{t({...r,payload:{type:"cancel"}})});return()=>{n(),i(),o()}}async onThemeChanged(t){return this.listen("tauri://theme-changed",t)}},Ml=(e=>(e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight",e))(Ml||{}),Il=(e=>(e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive",e))(Il||{});function wi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:eo(e.position),size:to(e.size)}}function eo(e){return new xe(e.x,e.y)}function to(e){return new ht(e.width,e.height)}async function Do(){return b("plugin:window|current_monitor").then(wi)}async function Ho(){return b("plugin:window|primary_monitor").then(wi)}async function Uo(){return b("plugin:window|available_monitors").then(e=>e.map(wi))}function ms(e,t,n){const i=e.slice();return i[105]=t[n],i}function ws(e,t,n){const i=e.slice();return i[108]=t[n],i}function vs(e,t,n){const i=e.slice();return i[111]=t[n],i}function ys(e,t,n){const i=e.slice();return i[114]=t[n],i}function ks(e,t,n){const i=e.slice();return i[117]=t[n],i}function zs(e){let t,n,i,o,r,_,h=ye(Object.keys(e[1])),g=[];for(let d=0;d<h.length;d+=1)g[d]=Ls(ks(e,h,d));return{c(){t=s("span"),t.textContent="Selected window:",n=c(),i=s("select"),o=s("option"),o.textContent="Choose a window...";for(let d=0;d<g.length;d+=1)g[d].c();a(t,"class","font-700 text-sm"),o.__value="",T(o,o.__value),o.disabled=!0,o.selected=!0,a(i,"class","input"),e[0]===void 0&&pt(()=>e[59].call(i))},m(d,I){w(d,t,I),w(d,n,I),w(d,i,I),l(i,o);for(let z=0;z<g.length;z+=1)g[z]&&g[z].m(i,null);Ye(i,e[0],!0),r||(_=k(i,"change",e[59]),r=!0)},p(d,I){if(I[0]&2){h=ye(Object.keys(d[1]));let z;for(z=0;z<h.length;z+=1){const Y=ks(d,h,z);g[z]?g[z].p(Y,I):(g[z]=Ls(Y),g[z].c(),g[z].m(i,null))}for(;z<g.length;z+=1)g[z].d(1);g.length=h.length}I[0]&3&&Ye(i,d[0])},d(d){d&&(m(t),m(n),m(i)),Ct(g,d),r=!1,_()}}}function Ls(e){let t,n=e[117]+"",i,o;return{c(){t=s("option"),i=p(n),t.__value=o=e[117],T(t,t.__value)},m(r,_){w(r,t,_),l(t,i)},p(r,_){_[0]&2&&n!==(n=r[117]+"")&&se(i,n),_[0]&2&&o!==(o=r[117])&&(t.__value=o,T(t,t.__value))},d(r){r&&m(t)}}}function Es(e){let t,n,i,o,r,_,h,g,d,I,z,Y,E,A,M,N,ae,H,W,V,G,P,F,re,R,x,te,y,U,j,$,ue,K,_e,ke,de,oe,J,he,q,ne,Z,v,X,S,fe,Ee,me,pe,Me,Se,Ie,be,ge,ze,Ce,ce,Le,le,Oe,Ne,Pe,ie,L,Q,C,Te,Sn,We,Cn,Tt,Pn,Re,Tn,$e,At,An,De,Mn,Mt,In,He,On,et,It,Nn,je,Wn,Ot,Rn,Ve,Dn,tt,Nt,Hn,Ue,Un,Wt,qn,qe,nn,ln,sn,Ae,nt,Ge,O,on,bt,an,gt=e[32].width+"",Rt,rn,_t,un,mt=e[32].height+"",Dt,cn,Be,wt,dn,vt,fn,yt=e[33].width+"",Ht,hn,kt,pn,zt=e[33].height+"",Ut,Bn,qt,lt,Fn,vi,jn,yi,Vn=e[32].toLogical(e[29]).width+"",Wl,ki,Gn,zi,Xn=e[32].toLogical(e[29]).height+"",Rl,Li,it,Yn,Ei,Kn,Si,Jn=e[33].toLogical(e[29]).width+"",Dl,Ci,Qn,Pi,Zn=e[33].toLogical(e[29]).height+"",Hl,Ti,Bt,st,xn,Ai,$n,Mi,el=e[30].x+"",Ul,Ii,tl,Oi,nl=e[30].y+"",ql,Ni,ot,ll,Wi,il,Ri,sl=e[31].x+"",Bl,Di,ol,Hi,al=e[31].y+"",Fl,Ui,Ft,at,rl,qi,ul,Bi,cl=e[30].toLogical(e[29]).x+"",jl,Fi,dl,ji,fl=e[30].toLogical(e[29]).y+"",Vl,Vi,rt,hl,Gi,pl,Xi,bl=e[31].toLogical(e[29]).x+"",Gl,Yi,gl,Ki,_l=e[31].toLogical(e[29]).y+"",Xl,Yl,Kl,Jl,bn,Ql,Ke,ml,jt,Ji,Qi,wl,Vt,Zi,xi,vl,Gt,$i,Zl,Je,yl,es,Qe,ts,kl,ns,ut,ls,zl,is,ct,xl,$l,ei,gn,Lt,dt,ss,_n,ti,ni,li,mn,Xt,Ll,os,Ze,as,El,rs,Xe,ii,si,oi,us,Yt=ye(e[44]),we=[];for(let u=0;u<Yt.length;u+=1)we[u]=Ss(ys(e,Yt,u));let Kt=ye(e[49]),ve=[];for(let u=0;u<Kt.length;u+=1)ve[u]=Cs(vs(e,Kt,u));let Et=(e[45]||e[46])&&qo(e);return{c(){t=s("br"),n=c(),i=s("div"),o=s("label"),o.textContent="Icon path",r=c(),_=s("form"),h=s("input"),g=c(),d=s("button"),d.textContent="Change window icon",I=c(),z=s("br"),Y=c(),E=s("div"),A=s("button"),A.textContent="Center",M=c(),N=s("button"),N.textContent="Minimize",ae=c(),H=s("button"),H.textContent="Hide",W=c(),V=s("button"),V.textContent="Request attention",G=c(),P=s("div"),F=s("label"),re=p(`Maximized
`),R=s("input"),x=c(),te=s("label"),y=p(`Resizable
`),U=s("input"),j=c(),$=s("label"),ue=p(`Maximizable
`),K=s("input"),_e=c(),ke=s("label"),de=p(`Minimizable
`),oe=s("input"),J=c(),he=s("label"),q=p(`Closable
`),ne=s("input"),Z=c(),v=s("label"),X=p(`Has decorations
`),S=s("input"),fe=c(),Ee=s("label"),me=p(`Always on top
`),pe=s("input"),Me=c(),Se=s("label"),Ie=p(`Always on bottom
`),be=s("input"),ge=c(),ze=s("label"),Ce=p(`Content protected
`),ce=s("input"),Le=c(),le=s("label"),Oe=p(`Fullscreen
`),Ne=s("input"),Pe=c(),ie=s("br"),L=c(),Q=s("div"),C=s("div"),Te=s("div"),Sn=p(`X
`),We=s("input"),Cn=c(),Tt=s("div"),Pn=p(`Y
`),Re=s("input"),Tn=c(),$e=s("div"),At=s("div"),An=p(`Width
`),De=s("input"),Mn=c(),Mt=s("div"),In=p(`Height
`),He=s("input"),On=c(),et=s("div"),It=s("div"),Nn=p(`Min width
`),je=s("input"),Wn=c(),Ot=s("div"),Rn=p(`Min height
`),Ve=s("input"),Dn=c(),tt=s("div"),Nt=s("div"),Hn=p(`Max width
`),Ue=s("input"),Un=c(),Wt=s("div"),qn=p(`Max height
`),qe=s("input"),nn=c(),ln=s("br"),sn=c(),Ae=s("div"),nt=s("div"),Ge=s("div"),O=s("div"),O.textContent="Inner Size",on=c(),bt=s("span"),an=p("Width: "),Rt=p(gt),rn=c(),_t=s("span"),un=p("Height: "),Dt=p(mt),cn=c(),Be=s("div"),wt=s("div"),wt.textContent="Outer Size",dn=c(),vt=s("span"),fn=p("Width: "),Ht=p(yt),hn=c(),kt=s("span"),pn=p("Height: "),Ut=p(zt),Bn=c(),qt=s("div"),lt=s("div"),Fn=s("div"),Fn.textContent="Inner Logical Size",vi=c(),jn=s("span"),yi=p("Width: "),Wl=p(Vn),ki=c(),Gn=s("span"),zi=p("Height: "),Rl=p(Xn),Li=c(),it=s("div"),Yn=s("div"),Yn.textContent="Outer Logical Size",Ei=c(),Kn=s("span"),Si=p("Width: "),Dl=p(Jn),Ci=c(),Qn=s("span"),Pi=p("Height: "),Hl=p(Zn),Ti=c(),Bt=s("div"),st=s("div"),xn=s("div"),xn.textContent="Inner Position",Ai=c(),$n=s("span"),Mi=p("x: "),Ul=p(el),Ii=c(),tl=s("span"),Oi=p("y: "),ql=p(nl),Ni=c(),ot=s("div"),ll=s("div"),ll.textContent="Outer Position",Wi=c(),il=s("span"),Ri=p("x: "),Bl=p(sl),Di=c(),ol=s("span"),Hi=p("y: "),Fl=p(al),Ui=c(),Ft=s("div"),at=s("div"),rl=s("div"),rl.textContent="Inner Logical Position",qi=c(),ul=s("span"),Bi=p("x: "),jl=p(cl),Fi=c(),dl=s("span"),ji=p("y: "),Vl=p(fl),Vi=c(),rt=s("div"),hl=s("div"),hl.textContent="Outer Logical Position",Gi=c(),pl=s("span"),Xi=p("x: "),Gl=p(bl),Yi=c(),gl=s("span"),Ki=p("y: "),Xl=p(_l),Yl=c(),Kl=s("br"),Jl=c(),bn=s("h4"),bn.textContent="Cursor",Ql=c(),Ke=s("div"),ml=s("label"),jt=s("input"),Ji=p(`
Grab`),Qi=c(),wl=s("label"),Vt=s("input"),Zi=p(`
Visible`),xi=c(),vl=s("label"),Gt=s("input"),$i=p(`
Ignore events`),Zl=c(),Je=s("div"),yl=s("label"),es=p(`Icon
`),Qe=s("select");for(let u=0;u<we.length;u+=1)we[u].c();ts=c(),kl=s("label"),ns=p(`X position
`),ut=s("input"),ls=c(),zl=s("label"),is=p(`Y position
`),ct=s("input"),xl=c(),$l=s("br"),ei=c(),gn=s("div"),Lt=s("form"),dt=s("input"),ss=c(),_n=s("button"),_n.textContent="Set title",ti=c(),ni=s("br"),li=c(),mn=s("div"),Xt=s("div"),Ll=s("label"),os=p(`Progress Status
`),Ze=s("select");for(let u=0;u<ve.length;u+=1)ve[u].c();as=c(),El=s("label"),rs=p(`Progress
`),Xe=s("input"),ii=c(),Et&&Et.c(),si=hi(),a(h,"class","input grow"),a(d,"class","btn"),a(d,"type","submit"),a(_,"class","flex gap-1 grow"),a(i,"class","flex gap-1 items-center"),a(A,"class","btn"),a(A,"title","Unminimizes after 2 seconds"),a(N,"class","btn"),a(N,"title","Unminimizes after 2 seconds"),a(H,"class","btn"),a(H,"title","Visible again after 2 seconds"),a(V,"class","btn"),a(V,"title","Minimizes the window, requests attention for 3s and then resets it"),a(E,"class","flex flex-wrap gap-2"),a(R,"type","checkbox"),a(U,"type","checkbox"),a(K,"type","checkbox"),a(oe,"type","checkbox"),a(ne,"type","checkbox"),a(S,"type","checkbox"),a(pe,"type","checkbox"),a(be,"type","checkbox"),a(ce,"type","checkbox"),a(Ne,"type","checkbox"),a(P,"class","flex flex-wrap gap-2"),a(We,"class","input"),a(We,"type","number"),a(We,"min","0"),a(Re,"class","input"),a(Re,"type","number"),a(Re,"min","0"),a(C,"class","flex children:grow flex-col"),a(De,"class","input"),a(De,"type","number"),a(De,"min","400"),a(He,"class","input"),a(He,"type","number"),a(He,"min","400"),a($e,"class","flex children:grow flex-col"),a(je,"class","input"),a(je,"type","number"),a(Ve,"class","input"),a(Ve,"type","number"),a(et,"class","flex children:grow flex-col"),a(Ue,"class","input"),a(Ue,"type","number"),a(Ue,"min","800"),a(qe,"class","input"),a(qe,"type","number"),a(qe,"min","400"),a(tt,"class","flex children:grow flex-col"),a(Q,"class","flex flex-row gap-2 flex-wrap"),a(O,"class","text-accent dark:text-darkAccent font-700"),a(Ge,"class","grow"),a(wt,"class","text-accent dark:text-darkAccent font-700"),a(Be,"class","grow"),a(nt,"class","flex"),a(Fn,"class","text-accent dark:text-darkAccent font-700"),a(lt,"class","grow"),a(Yn,"class","text-accent dark:text-darkAccent font-700"),a(it,"class","grow"),a(qt,"class","flex"),a(xn,"class","text-accent dark:text-darkAccent font-700"),a(st,"class","grow"),a(ll,"class","text-accent dark:text-darkAccent font-700"),a(ot,"class","grow"),a(Bt,"class","flex"),a(rl,"class","text-accent dark:text-darkAccent font-700"),a(at,"class","grow"),a(hl,"class","text-accent dark:text-darkAccent font-700"),a(rt,"class","grow"),a(Ft,"class","flex"),a(bn,"class","mb-2"),a(jt,"type","checkbox"),a(Vt,"type","checkbox"),a(Gt,"type","checkbox"),a(Ke,"class","flex gap-2"),a(Qe,"class","input"),e[24]===void 0&&pt(()=>e[83].call(Qe)),a(ut,"class","input"),a(ut,"type","number"),a(ct,"class","input"),a(ct,"type","number"),a(Je,"class","flex gap-2"),a(dt,"class","input grow"),a(dt,"id","title"),a(_n,"class","btn"),a(_n,"type","submit"),a(Lt,"class","flex gap-1"),a(gn,"class","flex flex-col gap-1"),a(Ze,"class","input"),e[26]===void 0&&pt(()=>e[87].call(Ze)),a(Xe,"class","input"),a(Xe,"type","number"),a(Xe,"min","0"),a(Xe,"max","100"),a(Xt,"class","flex gap-2"),a(mn,"class","flex flex-col gap-1")},m(u,f){w(u,t,f),w(u,n,f),w(u,i,f),l(i,o),l(i,r),l(i,_),l(_,h),T(h,e[43]),l(_,g),l(_,d),w(u,I,f),w(u,z,f),w(u,Y,f),w(u,E,f),l(E,A),l(E,M),l(E,N),l(E,ae),l(E,H),l(E,W),l(E,V),w(u,G,f),w(u,P,f),l(P,F),l(F,re),l(F,R),R.checked=e[6],l(P,x),l(P,te),l(te,y),l(te,U),U.checked=e[2],l(P,j),l(P,$),l($,ue),l($,K),K.checked=e[3],l(P,_e),l(P,ke),l(ke,de),l(ke,oe),oe.checked=e[4],l(P,J),l(P,he),l(he,q),l(he,ne),ne.checked=e[5],l(P,Z),l(P,v),l(v,X),l(v,S),S.checked=e[7],l(P,fe),l(P,Ee),l(Ee,me),l(Ee,pe),pe.checked=e[8],l(P,Me),l(P,Se),l(Se,Ie),l(Se,be),be.checked=e[9],l(P,ge),l(P,ze),l(ze,Ce),l(ze,ce),ce.checked=e[10],l(P,Le),l(P,le),l(le,Oe),l(le,Ne),Ne.checked=e[11],w(u,Pe,f),w(u,ie,f),w(u,L,f),w(u,Q,f),l(Q,C),l(C,Te),l(Te,Sn),l(Te,We),T(We,e[18]),l(C,Cn),l(C,Tt),l(Tt,Pn),l(Tt,Re),T(Re,e[19]),l(Q,Tn),l(Q,$e),l($e,At),l(At,An),l(At,De),T(De,e[12]),l($e,Mn),l($e,Mt),l(Mt,In),l(Mt,He),T(He,e[13]),l(Q,On),l(Q,et),l(et,It),l(It,Nn),l(It,je),T(je,e[14]),l(et,Wn),l(et,Ot),l(Ot,Rn),l(Ot,Ve),T(Ve,e[15]),l(Q,Dn),l(Q,tt),l(tt,Nt),l(Nt,Hn),l(Nt,Ue),T(Ue,e[16]),l(tt,Un),l(tt,Wt),l(Wt,qn),l(Wt,qe),T(qe,e[17]),w(u,nn,f),w(u,ln,f),w(u,sn,f),w(u,Ae,f),l(Ae,nt),l(nt,Ge),l(Ge,O),l(Ge,on),l(Ge,bt),l(bt,an),l(bt,Rt),l(Ge,rn),l(Ge,_t),l(_t,un),l(_t,Dt),l(nt,cn),l(nt,Be),l(Be,wt),l(Be,dn),l(Be,vt),l(vt,fn),l(vt,Ht),l(Be,hn),l(Be,kt),l(kt,pn),l(kt,Ut),l(Ae,Bn),l(Ae,qt),l(qt,lt),l(lt,Fn),l(lt,vi),l(lt,jn),l(jn,yi),l(jn,Wl),l(lt,ki),l(lt,Gn),l(Gn,zi),l(Gn,Rl),l(qt,Li),l(qt,it),l(it,Yn),l(it,Ei),l(it,Kn),l(Kn,Si),l(Kn,Dl),l(it,Ci),l(it,Qn),l(Qn,Pi),l(Qn,Hl),l(Ae,Ti),l(Ae,Bt),l(Bt,st),l(st,xn),l(st,Ai),l(st,$n),l($n,Mi),l($n,Ul),l(st,Ii),l(st,tl),l(tl,Oi),l(tl,ql),l(Bt,Ni),l(Bt,ot),l(ot,ll),l(ot,Wi),l(ot,il),l(il,Ri),l(il,Bl),l(ot,Di),l(ot,ol),l(ol,Hi),l(ol,Fl),l(Ae,Ui),l(Ae,Ft),l(Ft,at),l(at,rl),l(at,qi),l(at,ul),l(ul,Bi),l(ul,jl),l(at,Fi),l(at,dl),l(dl,ji),l(dl,Vl),l(Ft,Vi),l(Ft,rt),l(rt,hl),l(rt,Gi),l(rt,pl),l(pl,Xi),l(pl,Gl),l(rt,Yi),l(rt,gl),l(gl,Ki),l(gl,Xl),w(u,Yl,f),w(u,Kl,f),w(u,Jl,f),w(u,bn,f),w(u,Ql,f),w(u,Ke,f),l(Ke,ml),l(ml,jt),jt.checked=e[20],l(ml,Ji),l(Ke,Qi),l(Ke,wl),l(wl,Vt),Vt.checked=e[21],l(wl,Zi),l(Ke,xi),l(Ke,vl),l(vl,Gt),Gt.checked=e[25],l(vl,$i),w(u,Zl,f),w(u,Je,f),l(Je,yl),l(yl,es),l(yl,Qe);for(let D=0;D<we.length;D+=1)we[D]&&we[D].m(Qe,null);Ye(Qe,e[24],!0),l(Je,ts),l(Je,kl),l(kl,ns),l(kl,ut),T(ut,e[22]),l(Je,ls),l(Je,zl),l(zl,is),l(zl,ct),T(ct,e[23]),w(u,xl,f),w(u,$l,f),w(u,ei,f),w(u,gn,f),l(gn,Lt),l(Lt,dt),T(dt,e[34]),l(Lt,ss),l(Lt,_n),w(u,ti,f),w(u,ni,f),w(u,li,f),w(u,mn,f),l(mn,Xt),l(Xt,Ll),l(Ll,os),l(Ll,Ze);for(let D=0;D<ve.length;D+=1)ve[D]&&ve[D].m(Ze,null);Ye(Ze,e[26],!0),l(Xt,as),l(Xt,El),l(El,rs),l(El,Xe),T(Xe,e[27]),w(u,ii,f),Et&&Et.m(u,f),w(u,si,f),oi||(us=[k(h,"input",e[60]),k(_,"submit",ds(e[50])),k(A,"click",e[61]),k(N,"click",e[52]),k(H,"click",e[51]),k(V,"click",e[54]),k(R,"change",e[62]),k(U,"change",e[63]),k(K,"change",e[64]),k(oe,"change",e[65]),k(ne,"change",e[66]),k(S,"change",e[67]),k(pe,"change",e[68]),k(be,"change",e[69]),k(ce,"change",e[70]),k(Ne,"change",e[71]),k(We,"input",e[72]),k(Re,"input",e[73]),k(De,"input",e[74]),k(He,"input",e[75]),k(je,"input",e[76]),k(Ve,"input",e[77]),k(Ue,"input",e[78]),k(qe,"input",e[79]),k(jt,"change",e[80]),k(Vt,"change",e[81]),k(Gt,"change",e[82]),k(Qe,"change",e[83]),k(ut,"input",e[84]),k(ct,"input",e[85]),k(dt,"input",e[86]),k(Lt,"submit",ds(e[50])),k(Ze,"change",e[87]),k(Xe,"input",e[88])],oi=!0)},p(u,f){if(f[1]&4096&&h.value!==u[43]&&T(h,u[43]),f[0]&64&&(R.checked=u[6]),f[0]&4&&(U.checked=u[2]),f[0]&8&&(K.checked=u[3]),f[0]&16&&(oe.checked=u[4]),f[0]&32&&(ne.checked=u[5]),f[0]&128&&(S.checked=u[7]),f[0]&256&&(pe.checked=u[8]),f[0]&512&&(be.checked=u[9]),f[0]&1024&&(ce.checked=u[10]),f[0]&2048&&(Ne.checked=u[11]),f[0]&262144&&B(We.value)!==u[18]&&T(We,u[18]),f[0]&524288&&B(Re.value)!==u[19]&&T(Re,u[19]),f[0]&4096&&B(De.value)!==u[12]&&T(De,u[12]),f[0]&8192&&B(He.value)!==u[13]&&T(He,u[13]),f[0]&16384&&B(je.value)!==u[14]&&T(je,u[14]),f[0]&32768&&B(Ve.value)!==u[15]&&T(Ve,u[15]),f[0]&65536&&B(Ue.value)!==u[16]&&T(Ue,u[16]),f[0]&131072&&B(qe.value)!==u[17]&&T(qe,u[17]),f[1]&2&&gt!==(gt=u[32].width+"")&&se(Rt,gt),f[1]&2&&mt!==(mt=u[32].height+"")&&se(Dt,mt),f[1]&4&&yt!==(yt=u[33].width+"")&&se(Ht,yt),f[1]&4&&zt!==(zt=u[33].height+"")&&se(Ut,zt),f[0]&536870912|f[1]&2&&Vn!==(Vn=u[32].toLogical(u[29]).width+"")&&se(Wl,Vn),f[0]&536870912|f[1]&2&&Xn!==(Xn=u[32].toLogical(u[29]).height+"")&&se(Rl,Xn),f[0]&536870912|f[1]&4&&Jn!==(Jn=u[33].toLogical(u[29]).width+"")&&se(Dl,Jn),f[0]&536870912|f[1]&4&&Zn!==(Zn=u[33].toLogical(u[29]).height+"")&&se(Hl,Zn),f[0]&1073741824&&el!==(el=u[30].x+"")&&se(Ul,el),f[0]&1073741824&&nl!==(nl=u[30].y+"")&&se(ql,nl),f[1]&1&&sl!==(sl=u[31].x+"")&&se(Bl,sl),f[1]&1&&al!==(al=u[31].y+"")&&se(Fl,al),f[0]&1610612736&&cl!==(cl=u[30].toLogical(u[29]).x+"")&&se(jl,cl),f[0]&1610612736&&fl!==(fl=u[30].toLogical(u[29]).y+"")&&se(Vl,fl),f[0]&536870912|f[1]&1&&bl!==(bl=u[31].toLogical(u[29]).x+"")&&se(Gl,bl),f[0]&536870912|f[1]&1&&_l!==(_l=u[31].toLogical(u[29]).y+"")&&se(Xl,_l),f[0]&1048576&&(jt.checked=u[20]),f[0]&2097152&&(Vt.checked=u[21]),f[0]&33554432&&(Gt.checked=u[25]),f[1]&8192){Yt=ye(u[44]);let D;for(D=0;D<Yt.length;D+=1){const wn=ys(u,Yt,D);we[D]?we[D].p(wn,f):(we[D]=Ss(wn),we[D].c(),we[D].m(Qe,null))}for(;D<we.length;D+=1)we[D].d(1);we.length=Yt.length}if(f[0]&16777216|f[1]&8192&&Ye(Qe,u[24]),f[0]&4194304&&B(ut.value)!==u[22]&&T(ut,u[22]),f[0]&8388608&&B(ct.value)!==u[23]&&T(ct,u[23]),f[1]&8&&dt.value!==u[34]&&T(dt,u[34]),f[1]&262144){Kt=ye(u[49]);let D;for(D=0;D<Kt.length;D+=1){const wn=vs(u,Kt,D);ve[D]?ve[D].p(wn,f):(ve[D]=Cs(wn),ve[D].c(),ve[D].m(Ze,null))}for(;D<ve.length;D+=1)ve[D].d(1);ve.length=Kt.length}f[0]&67108864|f[1]&262144&&Ye(Ze,u[26]),f[0]&134217728&&B(Xe.value)!==u[27]&&T(Xe,u[27]),(u[45]||u[46])&&Et.p(u,f)},d(u){u&&(m(t),m(n),m(i),m(I),m(z),m(Y),m(E),m(G),m(P),m(Pe),m(ie),m(L),m(Q),m(nn),m(ln),m(sn),m(Ae),m(Yl),m(Kl),m(Jl),m(bn),m(Ql),m(Ke),m(Zl),m(Je),m(xl),m($l),m(ei),m(gn),m(ti),m(ni),m(li),m(mn),m(ii),m(si)),Ct(we,u),Ct(ve,u),Et&&Et.d(u),oi=!1,Fe(us)}}}function Ss(e){let t,n=e[114]+"",i;return{c(){t=s("option"),i=p(n),t.__value=e[114],T(t,t.__value)},m(o,r){w(o,t,r),l(t,i)},p:ee,d(o){o&&m(t)}}}function Cs(e){let t,n=e[111]+"",i;return{c(){t=s("option"),i=p(n),t.__value=e[111],T(t,t.__value)},m(o,r){w(o,t,r),l(t,i)},p:ee,d(o){o&&m(t)}}}function qo(e){let t,n,i,o,r,_,h,g,d,I,z,Y,E,A,M,N,ae,H,W,V,G,P,F,re,R,x,te,y,U,j,$,ue,K=(e[35].length?e[35].join(","):"None")+"",_e,ke,de,oe,J,he=ye(e[47]),q=[];for(let v=0;v<he.length;v+=1)q[v]=Ps(ws(e,he,v));let ne=ye(e[48]),Z=[];for(let v=0;v<ne.length;v+=1)Z[v]=Ts(ms(e,ne,v));return{c(){t=s("div"),n=s("div"),i=s("label"),o=p(`Effect
`),r=s("select");for(let v=0;v<q.length;v+=1)q[v].c();_=c(),h=s("label"),g=p(`State
`),d=s("select");for(let v=0;v<Z.length;v+=1)Z[v].c();I=c(),z=s("label"),Y=p(`Radius
`),E=s("input"),A=c(),M=s("div"),N=s("label"),ae=p(`Color
`),H=s("div"),W=s("input"),V=c(),G=s("input"),P=c(),F=s("input"),re=c(),R=s("input"),x=c(),te=s("div"),y=s("button"),y.textContent="Add",U=c(),j=s("div"),$=s("div"),ue=p("Applied effects: "),_e=p(K),ke=c(),de=s("button"),de.textContent="Clear",a(r,"class","input"),e[36]===void 0&&pt(()=>e[89].call(r)),a(d,"class","input"),e[37]===void 0&&pt(()=>e[90].call(d)),a(E,"class","input"),a(E,"type","number"),a(n,"class","flex"),Jt(W,"max-width","120px"),a(W,"class","input"),a(W,"type","number"),a(W,"placeholder","R"),Jt(G,"max-width","120px"),a(G,"class","input"),a(G,"type","number"),a(G,"placeholder","G"),Jt(F,"max-width","120px"),a(F,"class","input"),a(F,"type","number"),a(F,"placeholder","B"),Jt(R,"max-width","120px"),a(R,"class","input"),a(R,"type","number"),a(R,"placeholder","A"),a(H,"class","flex"),a(M,"class","flex"),a(y,"class","btn"),Jt(y,"width","80px"),a(te,"class","flex"),a(de,"class","btn"),Jt(de,"width","80px"),a(j,"class","flex"),a(t,"class","flex flex-col gap-1")},m(v,X){w(v,t,X),l(t,n),l(n,i),l(i,o),l(i,r);for(let S=0;S<q.length;S+=1)q[S]&&q[S].m(r,null);Ye(r,e[36],!0),l(n,_),l(n,h),l(h,g),l(h,d);for(let S=0;S<Z.length;S+=1)Z[S]&&Z[S].m(d,null);Ye(d,e[37],!0),l(n,I),l(n,z),l(z,Y),l(z,E),T(E,e[38]),l(t,A),l(t,M),l(M,N),l(N,ae),l(N,H),l(H,W),T(W,e[39]),l(H,V),l(H,G),T(G,e[40]),l(H,P),l(H,F),T(F,e[41]),l(H,re),l(H,R),T(R,e[42]),l(t,x),l(t,te),l(te,y),l(t,U),l(t,j),l(j,$),l($,ue),l($,_e),l(j,ke),l(j,de),oe||(J=[k(r,"change",e[89]),k(d,"change",e[90]),k(E,"input",e[91]),k(W,"input",e[92]),k(G,"input",e[93]),k(F,"input",e[94]),k(R,"input",e[95]),k(y,"click",e[55]),k(de,"click",e[56])],oe=!0)},p(v,X){if(X[1]&65536){he=ye(v[47]);let S;for(S=0;S<he.length;S+=1){const fe=ws(v,he,S);q[S]?q[S].p(fe,X):(q[S]=Ps(fe),q[S].c(),q[S].m(r,null))}for(;S<q.length;S+=1)q[S].d(1);q.length=he.length}if(X[1]&65568&&Ye(r,v[36]),X[1]&131072){ne=ye(v[48]);let S;for(S=0;S<ne.length;S+=1){const fe=ms(v,ne,S);Z[S]?Z[S].p(fe,X):(Z[S]=Ts(fe),Z[S].c(),Z[S].m(d,null))}for(;S<Z.length;S+=1)Z[S].d(1);Z.length=ne.length}X[1]&131136&&Ye(d,v[37]),X[1]&128&&B(E.value)!==v[38]&&T(E,v[38]),X[1]&256&&B(W.value)!==v[39]&&T(W,v[39]),X[1]&512&&B(G.value)!==v[40]&&T(G,v[40]),X[1]&1024&&B(F.value)!==v[41]&&T(F,v[41]),X[1]&2048&&B(R.value)!==v[42]&&T(R,v[42]),X[1]&16&&K!==(K=(v[35].length?v[35].join(","):"None")+"")&&se(_e,K)},d(v){v&&m(t),Ct(q,v),Ct(Z,v),oe=!1,Fe(J)}}}function Ps(e){let t,n=e[108]+"",i;return{c(){t=s("option"),i=p(n),t.__value=e[108],T(t,t.__value)},m(o,r){w(o,t,r),l(t,i)},p:ee,d(o){o&&m(t)}}}function Ts(e){let t,n=e[105]+"",i;return{c(){t=s("option"),i=p(n),t.__value=e[105],T(t,t.__value)},m(o,r){w(o,t,r),l(t,i)},p:ee,d(o){o&&m(t)}}}function Bo(e){let t,n,i,o,r,_,h,g,d=Object.keys(e[1]).length>=1,I,z,Y,E=d&&zs(e),A=e[1][e[0]]&&Es(e);return{c(){t=s("div"),n=s("div"),i=s("input"),o=c(),r=s("button"),r.textContent="New window",_=c(),h=s("br"),g=c(),E&&E.c(),I=c(),A&&A.c(),a(i,"class","input grow"),a(i,"type","text"),a(i,"placeholder","New Window label.."),a(r,"class","btn"),a(n,"class","flex gap-1"),a(t,"class","flex flex-col children:grow gap-2")},m(M,N){w(M,t,N),l(t,n),l(n,i),T(i,e[28]),l(n,o),l(n,r),l(t,_),l(t,h),l(t,g),E&&E.m(t,null),l(t,I),A&&A.m(t,null),z||(Y=[k(i,"input",e[58]),k(r,"click",e[53])],z=!0)},p(M,N){N[0]&268435456&&i.value!==M[28]&&T(i,M[28]),N[0]&2&&(d=Object.keys(M[1]).length>=1),d?E?E.p(M,N):(E=zs(M),E.c(),E.m(t,I)):E&&(E.d(1),E=null),M[1][M[0]]?A?A.p(M,N):(A=Es(M),A.c(),A.m(t,null)):A&&(A.d(1),A=null)},i:ee,o:ee,d(M){M&&m(t),E&&E.d(),A&&A.d(),z=!1,Fe(Y)}}}function Fo(e,t,n){const i=mi();let o=i.label;const r={[i.label]:i},_=["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"],h=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],g=navigator.appVersion.includes("Windows"),d=navigator.appVersion.includes("Macintosh");let I=g?h:Object.keys(Ml).map(O=>Ml[O]).filter(O=>!h.includes(O));const z=Object.keys(Il).map(O=>Il[O]),Y=Object.keys(Al).map(O=>Al[O]);let{onMessage:E}=t;const A=document.querySelector("main");let M,N=!0,ae=!0,H=!0,W=!0,V=!1,G=!0,P=!1,F=!1,re=!0,R=!1,x=null,te=null,y=null,U=null,j=null,$=null,ue=null,K=null,_e=1,ke=new xe(ue,K),de=new xe(ue,K),oe=new ht(x,te),J=new ht(x,te),he,q,ne=!1,Z=!0,v=null,X=null,S="default",fe=!1,Ee="Awesome Tauri Example!",me=[],pe,Me,Se,Ie,be,ge,ze,Ce="none",ce=0,Le;function le(){r[o].setTitle(Ee)}function Oe(){r[o].hide(),setTimeout(r[o].show,2e3)}function Ne(){r[o].minimize(),setTimeout(r[o].unminimize,2e3)}function Pe(){if(!M)return;const O=new Nl(M);n(1,r[M]=O,r),O.once("tauri://error",function(){E("Error creating new webview")})}function ie(){r[o].innerSize().then(O=>{n(32,oe=O),n(12,x=oe.width),n(13,te=oe.height)}),r[o].outerSize().then(O=>{n(33,J=O)})}function L(){r[o].innerPosition().then(O=>{n(30,ke=O)}),r[o].outerPosition().then(O=>{n(31,de=O),n(18,ue=de.x),n(19,K=de.y)})}async function Q(O){O&&(he&&he(),q&&q(),q=await O.listen("tauri://move",L),he=await O.listen("tauri://resize",ie))}async function C(){await r[o].minimize(),await r[o].requestUserAttention(_i.Critical),await new Promise(O=>setTimeout(O,3e3)),await r[o].requestUserAttention(null)}async function Te(){me.includes(pe)||n(35,me=[...me,pe]);const O={effects:me,state:Me,radius:Se};Number.isInteger(Ie)&&Number.isInteger(be)&&Number.isInteger(ge)&&Number.isInteger(ze)&&(O.color=[Ie,be,ge,ze]),A.classList.remove("bg-primary"),A.classList.remove("dark:bg-darkPrimary"),await r[o].clearEffects(),await r[o].setEffects(O)}async function Sn(){n(35,me=[]),await r[o].clearEffects(),A.classList.add("bg-primary"),A.classList.add("dark:bg-darkPrimary")}function We(){M=this.value,n(28,M)}function Cn(){o=vn(this),n(0,o),n(1,r)}function Tt(){Le=this.value,n(43,Le)}const Pn=()=>r[o].center();function Re(){V=this.checked,n(6,V)}function Tn(){N=this.checked,n(2,N)}function $e(){ae=this.checked,n(3,ae)}function At(){H=this.checked,n(4,H)}function An(){W=this.checked,n(5,W)}function De(){G=this.checked,n(7,G)}function Mn(){P=this.checked,n(8,P)}function Mt(){F=this.checked,n(9,F)}function In(){re=this.checked,n(10,re)}function He(){R=this.checked,n(11,R)}function On(){ue=B(this.value),n(18,ue)}function et(){K=B(this.value),n(19,K)}function It(){x=B(this.value),n(12,x)}function Nn(){te=B(this.value),n(13,te)}function je(){y=B(this.value),n(14,y)}function Wn(){U=B(this.value),n(15,U)}function Ot(){j=B(this.value),n(16,j)}function Rn(){$=B(this.value),n(17,$)}function Ve(){ne=this.checked,n(20,ne)}function Dn(){Z=this.checked,n(21,Z)}function tt(){fe=this.checked,n(25,fe)}function Nt(){S=vn(this),n(24,S),n(44,_)}function Hn(){v=B(this.value),n(22,v)}function Ue(){X=B(this.value),n(23,X)}function Un(){Ee=this.value,n(34,Ee)}function Wt(){Ce=vn(this),n(26,Ce),n(49,Y)}function qn(){ce=B(this.value),n(27,ce)}function qe(){pe=vn(this),n(36,pe),n(47,I)}function nn(){Me=vn(this),n(37,Me),n(48,z)}function ln(){Se=B(this.value),n(38,Se)}function sn(){Ie=B(this.value),n(39,Ie)}function Ae(){be=B(this.value),n(40,be)}function nt(){ge=B(this.value),n(41,ge)}function Ge(){ze=B(this.value),n(42,ze)}return e.$$set=O=>{"onMessage"in O&&n(57,E=O.onMessage)},e.$$.update=()=>{var O,on,bt,an,gt,Rt,rn,_t,un,mt,Dt,cn,Be,wt,dn,vt,fn,yt,Ht,hn,kt,pn,zt,Ut;e.$$.dirty[0]&3&&(r[o],L(),ie()),e.$$.dirty[0]&7&&((O=r[o])==null||O.setResizable(N)),e.$$.dirty[0]&11&&((on=r[o])==null||on.setMaximizable(ae)),e.$$.dirty[0]&19&&((bt=r[o])==null||bt.setMinimizable(H)),e.$$.dirty[0]&35&&((an=r[o])==null||an.setClosable(W)),e.$$.dirty[0]&67&&(V?(gt=r[o])==null||gt.maximize():(Rt=r[o])==null||Rt.unmaximize()),e.$$.dirty[0]&131&&((rn=r[o])==null||rn.setDecorations(G)),e.$$.dirty[0]&259&&((_t=r[o])==null||_t.setAlwaysOnTop(P)),e.$$.dirty[0]&515&&((un=r[o])==null||un.setAlwaysOnBottom(F)),e.$$.dirty[0]&1027&&((mt=r[o])==null||mt.setContentProtected(re)),e.$$.dirty[0]&2051&&((Dt=r[o])==null||Dt.setFullscreen(R)),e.$$.dirty[0]&12291&&x&&te&&((cn=r[o])==null||cn.setSize(new ht(x,te))),e.$$.dirty[0]&49155&&(y&&U?(Be=r[o])==null||Be.setMinSize(new Ln(y,U)):(wt=r[o])==null||wt.setMinSize(null)),e.$$.dirty[0]&196611&&(j>800&&$>400?(dn=r[o])==null||dn.setMaxSize(new Ln(j,$)):(vt=r[o])==null||vt.setMaxSize(null)),e.$$.dirty[0]&786435&&ue!==null&&K!==null&&((fn=r[o])==null||fn.setPosition(new xe(ue,K))),e.$$.dirty[0]&3&&((yt=r[o])==null||yt.scaleFactor().then(Bn=>n(29,_e=Bn))),e.$$.dirty[0]&3&&Q(r[o]),e.$$.dirty[0]&1048579&&((Ht=r[o])==null||Ht.setCursorGrab(ne)),e.$$.dirty[0]&2097155&&((hn=r[o])==null||hn.setCursorVisible(Z)),e.$$.dirty[0]&16777219&&((kt=r[o])==null||kt.setCursorIcon(S)),e.$$.dirty[0]&12582915&&v!==null&&X!==null&&((pn=r[o])==null||pn.setCursorPosition(new xe(v,X))),e.$$.dirty[0]&33554435&&((zt=r[o])==null||zt.setIgnoreCursorEvents(fe)),e.$$.dirty[0]&201326595&&((Ut=r[o])==null||Ut.setProgressBar({status:Ce,progress:ce}))},[o,r,N,ae,H,W,V,G,P,F,re,R,x,te,y,U,j,$,ue,K,ne,Z,v,X,S,fe,Ce,ce,M,_e,ke,de,oe,J,Ee,me,pe,Me,Se,Ie,be,ge,ze,Le,_,g,d,I,z,Y,le,Oe,Ne,Pe,C,Te,Sn,E,We,Cn,Tt,Pn,Re,Tn,$e,At,An,De,Mn,Mt,In,He,On,et,It,Nn,je,Wn,Ot,Rn,Ve,Dn,tt,Nt,Hn,Ue,Un,Wt,qn,qe,nn,ln,sn,Ae,nt,Ge]}class jo extends tn{constructor(t){super(),en(this,t,Fo,Bo,Pt,{onMessage:57},null,[-1,-1,-1,-1])}}function Vo(e){let t;return{c(){t=s("div"),t.innerHTML='<div class="note-red grow">Not available for Linux</div> <video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>',a(t,"class","flex flex-col gap-2")},m(n,i){w(n,t,i)},p:ee,i:ee,o:ee,d(n){n&&m(t)}}}function Go(e,t,n){let{onMessage:i}=t;const o=window.constraints={audio:!0,video:!0};function r(h){const g=document.querySelector("video"),d=h.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${d[0].label}`),window.stream=h,g.srcObject=h}function _(h){if(h.name==="ConstraintNotSatisfiedError"){const g=o.video;i(`The resolution ${g.width.exact}x${g.height.exact} px is not supported by your device.`)}else h.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: ${h.name}`,h)}return Tl(async()=>{try{const h=await navigator.mediaDevices.getUserMedia(o);r(h)}catch(h){_(h)}}),Us(()=>{window.stream.getTracks().forEach(function(h){h.stop()})}),e.$$set=h=>{"onMessage"in h&&n(0,i=h.onMessage)},[i]}class Xo extends tn{constructor(t){super(),en(this,t,Go,Vo,Pt,{onMessage:0})}}function Yo(e){let t,n,i,o,r,_;return{c(){t=s("div"),n=s("button"),n.textContent="Show",i=c(),o=s("button"),o.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(o,"class","btn"),a(o,"id","hide")},m(h,g){w(h,t,g),l(t,n),l(t,i),l(t,o),r||(_=[k(n,"click",e[0]),k(o,"click",e[1])],r=!0)},p:ee,i:ee,o:ee,d(h){h&&m(t),r=!1,Fe(_)}}}function Ko(e,t,n){let{onMessage:i}=t;function o(){r().then(()=>{setTimeout(()=>{Ys().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return Ks().then(()=>i("Hide app")).catch(i)}return e.$$set=_=>{"onMessage"in _&&n(2,i=_.onMessage)},[o,r,i]}class Jo extends tn{constructor(t){super(),en(this,t,Ko,Yo,Pt,{onMessage:2})}}function As(e,t,n){const i=e.slice();return i[25]=t[n],i}function Ms(e,t,n){const i=e.slice();return i[28]=t[n],i}function Qo(e){let t;return{c(){t=s("span"),a(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&m(t)}}}function Zo(e){let t;return{c(){t=s("span"),a(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&m(t)}}}function xo(e){let t,n;return{c(){t=p(`Switch to Dark mode
`),n=s("div"),a(n,"class","i-ph-moon")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&(m(t),m(n))}}}function $o(e){let t,n;return{c(){t=p(`Switch to Light mode
`),n=s("div"),a(n,"class","i-ph-sun")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&(m(t),m(n))}}}function ea(e){let t,n,i,o,r,_,h;function g(){return e[14](e[28])}return{c(){t=s("a"),n=s("div"),i=c(),o=s("p"),o.textContent=`${e[28].label}`,a(n,"class",e[28].icon+" mr-2"),a(t,"href","##"),a(t,"class",r="nv "+(e[1]===e[28]?"nv_selected":""))},m(d,I){w(d,t,I),l(t,n),l(t,i),l(t,o),_||(h=k(t,"click",g),_=!0)},p(d,I){e=d,I&2&&r!==(r="nv "+(e[1]===e[28]?"nv_selected":""))&&a(t,"class",r)},d(d){d&&m(t),_=!1,h()}}}function Is(e){let t,n=e[28]&&ea(e);return{c(){n&&n.c(),t=hi()},m(i,o){n&&n.m(i,o),w(i,t,o)},p(i,o){i[28]&&n.p(i,o)},d(i){i&&m(t),n&&n.d(i)}}}function Os(e){let t,n=e[25].html+"",i;return{c(){t=new co(!1),i=hi(),t.a=i},m(o,r){t.m(n,o,r),w(o,i,r)},p(o,r){r&16&&n!==(n=o[25].html+"")&&t.p(n)},d(o){o&&(m(i),t.d())}}}function ta(e){let t,n,i,o,r,_,h,g,d,I,z,Y,E,A,M,N,ae,H,W,V,G,P,F,re,R,x,te,y,U,j,$,ue,K=e[1].label+"",_e,ke,de,oe,J,he,q,ne,Z,v,X,S,fe,Ee,me,pe,Me,Se;function Ie(L,Q){return L[0]?Zo:Qo}let be=Ie(e),ge=be(e);function ze(L,Q){return L[2]?$o:xo}let Ce=ze(e),ce=Ce(e),Le=ye(e[5]),le=[];for(let L=0;L<Le.length;L+=1)le[L]=Is(Ms(e,Le,L));var Oe=e[1].component;function Ne(L,Q){return{props:{onMessage:L[9],insecureRenderHtml:L[10]}}}Oe&&(J=fs(Oe,Ne(e)));let Pe=ye(e[4]),ie=[];for(let L=0;L<Pe.length;L+=1)ie[L]=Os(As(e,Pe,L));return{c(){t=s("div"),ge.c(),n=c(),i=s("div"),o=s("aside"),r=s("img"),h=c(),g=s("a"),ce.c(),d=c(),I=s("br"),z=c(),Y=s("div"),E=c(),A=s("br"),M=c(),N=s("a"),N.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,ae=c(),H=s("a"),H.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,W=c(),V=s("a"),V.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,G=c(),P=s("br"),F=c(),re=s("div"),R=c(),x=s("br"),te=c(),y=s("div");for(let L=0;L<le.length;L+=1)le[L].c();U=c(),j=s("main"),$=s("div"),ue=s("h1"),_e=p(K),ke=c(),de=s("div"),oe=s("div"),J&&bs(J.$$.fragment),he=c(),q=s("div"),ne=s("div"),Z=c(),v=s("div"),X=s("p"),X.textContent="Console",S=c(),fe=s("div"),fe.innerHTML='<div class="i-codicon-clear-all"></div>',Ee=c(),me=s("div");for(let L=0;L<ie.length;L+=1)ie[L].c();a(t,"id","sidebarToggle"),a(t,"class","z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),a(r,"class","self-center p-7 cursor-pointer"),io(r.src,_="tauri_logo.png")||a(r,"src",_),a(r,"alt","Tauri logo"),a(g,"href","##"),a(g,"class","nv justify-between h-8"),a(Y,"class","bg-white/5 h-2px"),a(N,"class","nv justify-between h-8"),a(N,"target","_blank"),a(N,"href","https://tauri.app/v1/guides/"),a(H,"class","nv justify-between h-8"),a(H,"target","_blank"),a(H,"href","https://github.com/tauri-apps/tauri"),a(V,"class","nv justify-between h-8"),a(V,"target","_blank"),a(V,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),a(re,"class","bg-white/5 h-2px"),a(y,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),a(o,"id","sidebar"),a(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 grid-rows-[min-content_auto] select-none px-2"),a(oe,"class","mr-2"),a(de,"class","overflow-y-auto"),a($,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),a(ne,"class","bg-black/20 h-2px cursor-ns-resize"),a(X,"class","font-semibold"),a(fe,"class","cursor-pointer h-85% rd-1 p-1 flex justify-center items-center hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25 "),a(v,"class","flex justify-between items-center px-2"),a(me,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),a(q,"id","console"),a(q,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),a(j,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),a(i,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(L,Q){w(L,t,Q),ge.m(t,null),w(L,n,Q),w(L,i,Q),l(i,o),l(o,r),l(o,h),l(o,g),ce.m(g,null),l(o,d),l(o,I),l(o,z),l(o,Y),l(o,E),l(o,A),l(o,M),l(o,N),l(o,ae),l(o,H),l(o,W),l(o,V),l(o,G),l(o,P),l(o,F),l(o,re),l(o,R),l(o,x),l(o,te),l(o,y);for(let C=0;C<le.length;C+=1)le[C]&&le[C].m(y,null);l(i,U),l(i,j),l(j,$),l($,ue),l(ue,_e),l($,ke),l($,de),l(de,oe),J&&di(J,oe,null),l(j,he),l(j,q),l(q,ne),l(q,Z),l(q,v),l(v,X),l(v,S),l(v,fe),l(q,Ee),l(q,me);for(let C=0;C<ie.length;C+=1)ie[C]&&ie[C].m(me,null);e[15](q),pe=!0,Me||(Se=[k(g,"click",e[7]),k(ne,"mousedown",e[12]),k(fe,"click",e[11])],Me=!0)},p(L,[Q]){if(be!==(be=Ie(L))&&(ge.d(1),ge=be(L),ge&&(ge.c(),ge.m(t,null))),Ce!==(Ce=ze(L))&&(ce.d(1),ce=Ce(L),ce&&(ce.c(),ce.m(g,null))),Q&99){Le=ye(L[5]);let C;for(C=0;C<Le.length;C+=1){const Te=Ms(L,Le,C);le[C]?le[C].p(Te,Q):(le[C]=Is(Te),le[C].c(),le[C].m(y,null))}for(;C<le.length;C+=1)le[C].d(1);le.length=Le.length}if((!pe||Q&2)&&K!==(K=L[1].label+"")&&se(_e,K),Q&2&&Oe!==(Oe=L[1].component)){if(J){go();const C=J;ps(C.$$.fragment,1,0,()=>{fi(C,1)}),_o()}Oe?(J=fs(Oe,Ne(L)),bs(J.$$.fragment),ci(J.$$.fragment,1),di(J,oe,null)):J=null}if(Q&16){Pe=ye(L[4]);let C;for(C=0;C<Pe.length;C+=1){const Te=As(L,Pe,C);ie[C]?ie[C].p(Te,Q):(ie[C]=Os(Te),ie[C].c(),ie[C].m(me,null))}for(;C<ie.length;C+=1)ie[C].d(1);ie.length=Pe.length}},i(L){pe||(J&&ci(J.$$.fragment,L),pe=!0)},o(L){J&&ps(J.$$.fragment,L),pe=!1},d(L){L&&(m(t),m(n),m(i)),ge.d(),ce.d(),Ct(le,L),J&&fi(J),Ct(ie,L),e[15](null),Me=!1,Fe(Se)}}}let Ns=50;function Ws(e){const t=document.querySelector("html");e?t.classList.add("dark"):t.classList.remove("dark"),localStorage&&localStorage.setItem("theme",e?"dark":"")}function na(e,t){e.style.setProperty("--translate-x",`${t?"0":"-18.75"}rem`)}function la(e,t,n){let i;document.addEventListener("keydown",y=>{y.ctrlKey&&y.key==="b"&&b("toggle_menu")});const o=navigator.userAgent.toLowerCase(),r=o.includes("android")||o.includes("iphone"),_=[{label:"Welcome",component:Ao,icon:"i-ph-hand-waving"},{label:"Communication",component:No,icon:"i-codicon-radio-tower"},!r&&{label:"App",component:Jo,icon:"i-codicon-hubot"},{label:"Window",component:jo,icon:"i-codicon-window"},{label:"WebRTC",component:Xo,icon:"i-ph-broadcast"}];let h=_[0];function g(y){n(1,h=y)}let d;Tl(()=>{n(2,d=localStorage&&localStorage.getItem("theme")=="dark"),Ws(d)});function I(){n(2,d=!d),Ws(d)}let z=vo([]);ao(e,z,y=>n(4,i=y));function Y(y){z.update(U=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+(typeof y=="string"?y:JSON.stringify(y,null,1))+"</pre>"},...U])}function E(y){z.update(U=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+y+"</pre>"},...U])}function A(){z.update(()=>[])}let M,N,ae;function H(y){ae=y.clientY;const U=window.getComputedStyle(M);N=parseInt(U.height,10);const j=ue=>{const K=ue.clientY-ae,_e=N-K;n(3,M.style.height=`${_e<Ns?Ns:_e}px`,M)},$=()=>{document.removeEventListener("mouseup",$),document.removeEventListener("mousemove",j)};document.addEventListener("mouseup",$),document.addEventListener("mousemove",j)}let W=!1,V,G,P=!1,F=0,re=0;const R=(y,U,j)=>Math.min(Math.max(U,y),j);Tl(()=>{n(13,V=document.querySelector("#sidebar")),G=document.querySelector("#sidebarToggle"),document.addEventListener("click",y=>{G.contains(y.target)?n(0,W=!W):W&&!V.contains(y.target)&&n(0,W=!1)}),document.addEventListener("touchstart",y=>{if(G.contains(y.target))return;const U=y.touches[0].clientX;(0<U&&U<20&&!W||W)&&(P=!0,F=U)}),document.addEventListener("touchmove",y=>{if(P){const U=y.touches[0].clientX;re=U;const j=(U-F)/10;V.style.setProperty("--translate-x",`-${R(0,W?0-j:18.75-j,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(P){const y=(re-F)/10;n(0,W=W?y>-(18.75/2):y>18.75/2)}P=!1})});const x=y=>{g(y),n(0,W=!1)};function te(y){ri[y?"unshift":"push"](()=>{M=y,n(3,M)})}return e.$$.update=()=>{if(e.$$.dirty&1){const y=document.querySelector("#sidebar");y&&na(y,W)}},[W,h,d,M,i,_,g,I,z,Y,E,A,H,V,x,te]}class ia extends tn{constructor(t){super(),en(this,t,la,ta,Pt,{})}}new ia({target:document.querySelector("#app")});