tauri/examples/api/dist/assets/index.js
2023-05-12 07:55:39 -03:00

35 lines
51 KiB
JavaScript

(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const b of u.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&l(b)}).observe(document,{childList:!0,subtree:!0});function n(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerpolicy&&(u.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?u.credentials="include":s.crossorigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(s){if(s.ep)return;s.ep=!0;const u=n(s);fetch(s.href,u)}})();function V(){}function Dl(e){return e()}function hl(){return Object.create(null)}function Ce(e){e.forEach(Dl)}function Zl(e){return typeof e=="function"}function lt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Tn;function $l(e,t){return Tn||(Tn=document.createElement("a")),Tn.href=t,e===Tn.href}function es(e){return Object.keys(e).length===0}function ts(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ns(e,t,n){e.$$.on_destroy.push(ts(t,n))}function i(e,t){e.appendChild(t)}function _(e,t,n){e.insertBefore(t,n||null)}function h(e){e.parentNode.removeChild(e)}function Dn(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function a(e){return document.createElement(e)}function is(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function w(e){return document.createTextNode(e)}function d(){return w(" ")}function Il(){return w("")}function T(e,t,n,l){return e.addEventListener(t,n,l),()=>e.removeEventListener(t,n,l)}function ls(e){return function(t){return t.preventDefault(),e.call(this,t)}}function o(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Y(e){return e===""?null:+e}function ss(e){return Array.from(e.childNodes)}function K(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function In(e,t){for(let n=0;n<e.options.length;n+=1){const l=e.options[n];if(l.__value===t){l.selected=!0;return}}e.selectedIndex=-1}function _l(e){const t=e.querySelector(":checked")||e.options[0];return t&&t.__value}class as{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,l=null){this.e||(this.is_svg?this.e=is(n.nodeName):this.e=a(n.nodeName),this.t=n,this.c(t)),this.i(l)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n<this.n.length;n+=1)_(this.t,this.n[n],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(h)}}let Ot;function Pt(e){Ot=e}function Rl(){if(!Ot)throw new Error("Function called outside component initialization");return Ot}function At(e){Rl().$$.on_mount.push(e)}function Hl(e){Rl().$$.on_destroy.push(e)}const Tt=[],ui=[],Pn=[],bl=[],os=Promise.resolve();let ci=!1;function rs(){ci||(ci=!0,os.then(Nl))}function Dt(e){Pn.push(e)}const ri=new Set;let En=0;function Nl(){const e=Ot;do{for(;En<Tt.length;){const t=Tt[En];En++,Pt(t),us(t.$$)}for(Pt(null),Tt.length=0,En=0;ui.length;)ui.pop()();for(let t=0;t<Pn.length;t+=1){const n=Pn[t];ri.has(n)||(ri.add(n),n())}Pn.length=0}while(Tt.length);for(;bl.length;)bl.pop()();ci=!1,ri.clear(),Pt(e)}function us(e){if(e.fragment!==null){e.update(),Ce(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Dt)}}const An=new Set;let et;function cs(){et={r:0,c:[],p:et}}function ds(){et.r||Ce(et.c),et=et.p}function di(e,t){e&&e.i&&(An.delete(e),e.i(t))}function gl(e,t,n,l){if(e&&e.o){if(An.has(e))return;An.add(e),et.c.push(()=>{An.delete(e),l&&(n&&e.d(1),l())}),e.o(t)}else l&&l()}function yl(e){e&&e.c()}function fi(e,t,n,l){const{fragment:s,on_mount:u,on_destroy:b,after_update:p}=e.$$;s&&s.m(t,n),l||Dt(()=>{const f=u.map(Dl).filter(Zl);b?b.push(...f):Ce(f),e.$$.on_mount=[]}),p.forEach(Dt)}function mi(e,t){const n=e.$$;n.fragment!==null&&(Ce(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function fs(e,t){e.$$.dirty[0]===-1&&(Tt.push(e),rs(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function yt(e,t,n,l,s,u,b,p=[-1]){const f=Ot;Pt(e);const c=e.$$={fragment:null,ctx:null,props:u,update:V,not_equal:s,bound:hl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(f?f.$$.context:[])),callbacks:hl(),dirty:p,skip_bound:!1,root:t.target||f.$$.root};b&&b(c.root);let z=!1;if(c.ctx=n?n(e,t.props||{},(y,W,...M)=>{const m=M.length?M[0]:W;return c.ctx&&s(c.ctx[y],c.ctx[y]=m)&&(!c.skip_bound&&c.bound[y]&&c.bound[y](m),z&&fs(e,y)),W}):[],c.update(),z=!0,Ce(c.before_update),c.fragment=l?l(c.ctx):!1,t.target){if(t.hydrate){const y=ss(t.target);c.fragment&&c.fragment.l(y),y.forEach(h)}else c.fragment&&c.fragment.c();t.intro&&di(e.$$.fragment),fi(e,t.target,t.anchor,t.customElement),Nl()}Pt(f)}class vt{$destroy(){mi(this,1),this.$destroy=V}$on(t,n){const l=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return l.push(n),()=>{const s=l.indexOf(n);s!==-1&&l.splice(s,1)}}$set(t){this.$$set&&!es(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const gt=[];function ms(e,t=V){let n;const l=new Set;function s(p){if(lt(e,p)&&(e=p,n)){const f=!gt.length;for(const c of l)c[1](),gt.push(c,e);if(f){for(let c=0;c<gt.length;c+=2)gt[c][0](gt[c+1]);gt.length=0}}}function u(p){s(p(e))}function b(p,f=V){const c=[p,f];return l.add(c),l.size===1&&(n=t(s)||V),p(e),()=>{l.delete(c),l.size===0&&(n(),n=null)}}return{set:s,update:u,subscribe:b}}var ps=Object.defineProperty,pi=(e,t)=>{for(var n in t)ps(e,n,{get:t[n],enumerable:!0})},ql=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},vl=(e,t,n)=>(ql(e,t,"read from private field"),n?n.call(e):t.get(e)),hs=(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)},_s=(e,t,n,l)=>(ql(e,t,"write to private field"),l?l.call(e,n):t.set(e,n),n),bs={};pi(bs,{Channel:()=>ys,convertFileSrc:()=>vs,invoke:()=>Be,transformCallback:()=>It});function gs(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function It(e,t=!1){let n=gs(),l=`_${n}`;return Object.defineProperty(window,l,{value:s=>(t&&Reflect.deleteProperty(window,l),e==null?void 0:e(s)),writable:!1,configurable:!0}),n}var Et,ys=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,hs(this,Et,()=>{}),this.id=It(e=>{vl(this,Et).call(this,e)})}set onmessage(e){_s(this,Et,e)}get onmessage(){return vl(this,Et)}toJSON(){return`__CHANNEL__:${this.id}`}};Et=new WeakMap;async function Be(e,t={}){return new Promise((n,l)=>{let s=It(b=>{n(b),Reflect.deleteProperty(window,`_${u}`)},!0),u=It(b=>{l(b),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:e,callback:s,error:u,...t})})}function vs(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}var ws={};pi(ws,{TauriEvent:()=>jl,emit:()=>Vl,listen:()=>_i,once:()=>ks});async function Fl(e,t){await Be("plugin:event|unlisten",{event:e,eventId:t})}async function Ul(e,t,n){await Be("plugin:event|emit",{event:e,windowLabel:t,payload:n})}async function hi(e,t,n){return Be("plugin:event|listen",{event:e,windowLabel:t,handler:It(n)}).then(l=>async()=>Fl(e,l))}async function xl(e,t,n){return hi(e,t,l=>{n(l),Fl(e,l.id).catch(()=>{})})}var jl=(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))(jl||{});async function _i(e,t){return hi(e,null,t)}async function ks(e,t){return xl(e,null,t)}async function Vl(e,t){return Ul(e,void 0,t)}var Ms={};pi(Ms,{CloseRequestedEvent:()=>Jl,LogicalPosition:()=>Gl,LogicalSize:()=>Rn,PhysicalPosition:()=>Ye,PhysicalSize:()=>tt,UserAttentionType:()=>bi,WebviewWindow:()=>it,WebviewWindowHandle:()=>Yl,WindowManager:()=>Bl,appWindow:()=>nt,availableMonitors:()=>Cs,currentMonitor:()=>zs,getAll:()=>Xl,getCurrent:()=>On,primaryMonitor:()=>Ws});async function L(e){return Be("tauri",e)}var Rn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},tt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Rn(this.width/e,this.height/e)}},Gl=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},Ye=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Gl(this.x/e,this.y/e)}},bi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(bi||{});function On(){return new it(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Xl(){return window.__TAURI_METADATA__.__windows.map(e=>new it(e.label,{skip:!0}))}var wl=["tauri://created","tauri://error"],Yl=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):hi(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):xl(e,this.label,t)}async emit(e,t){if(wl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return Ul(e,this.label,t)}_handleTauriEvent(e,t){return wl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Bl=class extends Yl{async scaleFactor(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new Ye(e,t))}async outerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new Ye(e,t))}async innerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new tt(e,t))}async outerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new tt(e,t))}async isFullscreen(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=Ql(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=Kl(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new Jl(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),n=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),n=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),l=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),n(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Jl=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}},it=class extends Bl{constructor(e,t={}){super(e),t!=null&&t.skip||L({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return Xl().some(t=>t.label===e)?new it(e,{skip:!0}):null}},nt;"__TAURI_METADATA__"in window?nt=new it(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label.
Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),nt=new it("main",{skip:!0}));function gi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:Kl(e.position),size:Ql(e.size)}}function Kl(e){return new Ye(e.x,e.y)}function Ql(e){return new tt(e.width,e.height)}async function zs(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(gi)}async function Ws(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(gi)}async function Cs(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(gi))}function Ls(e){let t,n,l,s,u,b,p;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri&#39;s API capabilities using the <code>@tauri-apps/api</code> package. It&#39;s used as the main validation app, serving as the test bed of our
development process. In the future, this app will be used on Tauri&#39;s integration
tests.`,n=d(),l=a("br"),s=d(),u=a("br"),b=d(),p=a("br")},m(f,c){_(f,t,c),_(f,n,c),_(f,l,c),_(f,s,c),_(f,u,c),_(f,b,c),_(f,p,c)},p:V,i:V,o:V,d(f){f&&h(t),f&&h(n),f&&h(l),f&&h(s),f&&h(u),f&&h(b),f&&h(p)}}}class Ss extends vt{constructor(t){super(),yt(this,t,null,Ls,lt,{})}}function Ts(e){let t,n,l,s,u,b,p,f,c,z,y,W,M;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
<code class="code-block flex flex-wrap my-2"><pre> --config &lt;PATH&gt;
--theme &lt;light|dark|system&gt;
--verbose</pre></code>
Additionally, it has a <code>update --background</code> subcommand.`,n=d(),l=a("br"),s=d(),u=a("div"),u.textContent="Note that the arguments are only parsed, not implemented.",b=d(),p=a("br"),f=d(),c=a("br"),z=d(),y=a("button"),y.textContent="Get matches",o(u,"class","note"),o(y,"class","btn"),o(y,"id","cli-matches")},m(m,C){_(m,t,C),_(m,n,C),_(m,l,C),_(m,s,C),_(m,u,C),_(m,b,C),_(m,p,C),_(m,f,C),_(m,c,C),_(m,z,C),_(m,y,C),W||(M=T(y,"click",e[0]),W=!0)},p:V,i:V,o:V,d(m){m&&h(t),m&&h(n),m&&h(l),m&&h(s),m&&h(u),m&&h(b),m&&h(p),m&&h(f),m&&h(c),m&&h(z),m&&h(y),W=!1,M()}}}function Es(e,t,n){let{onMessage:l}=t;function s(){Be("plugin:cli|cli_matches").then(l).catch(l)}return e.$$set=u=>{"onMessage"in u&&n(1,l=u.onMessage)},[s,l]}class Ps extends vt{constructor(t){super(),yt(this,t,Es,Ts,lt,{onMessage:1})}}function As(e){let t,n,l,s,u,b,p,f;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",l=d(),s=a("button"),s.textContent="Call Request (async) API",u=d(),b=a("button"),b.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(b,"class","btn"),o(b,"id","event")},m(c,z){_(c,t,z),i(t,n),i(t,l),i(t,s),i(t,u),i(t,b),p||(f=[T(n,"click",e[0]),T(s,"click",e[1]),T(b,"click",e[2])],p=!0)},p:V,i:V,o:V,d(c){c&&h(t),p=!1,Ce(f)}}}function Os(e,t,n){let{onMessage:l}=t,s;At(async()=>{s=await _i("rust-event",l)}),Hl(()=>{s&&s()});function u(){Be("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function b(){Be("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(l).catch(l)}function p(){Vl("js-event","this is the payload string")}return e.$$set=f=>{"onMessage"in f&&n(3,l=f.onMessage)},[u,b,p,l]}class Ds extends vt{constructor(t){super(),yt(this,t,Os,As,lt,{onMessage:3})}}function kl(e,t,n){const l=e.slice();return l[65]=t[n],l}function Ml(e,t,n){const l=e.slice();return l[68]=t[n],l}function zl(e){let t,n,l,s,u,b,p=Object.keys(e[1]),f=[];for(let c=0;c<p.length;c+=1)f[c]=Wl(Ml(e,p,c));return{c(){t=a("span"),t.textContent="Selected window:",n=d(),l=a("select"),s=a("option"),s.textContent="Choose a window...";for(let c=0;c<f.length;c+=1)f[c].c();o(t,"class","font-700 text-sm"),s.__value="",s.value=s.__value,s.disabled=!0,s.selected=!0,o(l,"class","input"),e[0]===void 0&&Dt(()=>e[37].call(l))},m(c,z){_(c,t,z),_(c,n,z),_(c,l,z),i(l,s);for(let y=0;y<f.length;y+=1)f[y].m(l,null);In(l,e[0]),u||(b=T(l,"change",e[37]),u=!0)},p(c,z){if(z[0]&2){p=Object.keys(c[1]);let y;for(y=0;y<p.length;y+=1){const W=Ml(c,p,y);f[y]?f[y].p(W,z):(f[y]=Wl(W),f[y].c(),f[y].m(l,null))}for(;y<f.length;y+=1)f[y].d(1);f.length=p.length}z[0]&3&&In(l,c[0])},d(c){c&&h(t),c&&h(n),c&&h(l),Dn(f,c),u=!1,b()}}}function Wl(e){let t,n=e[68]+"",l,s;return{c(){t=a("option"),l=w(n),t.__value=s=e[68],t.value=t.__value},m(u,b){_(u,t,b),i(t,l)},p(u,b){b[0]&2&&n!==(n=u[68]+"")&&K(l,n),b[0]&2&&s!==(s=u[68])&&(t.__value=s,t.value=t.__value)},d(u){u&&h(t)}}}function Cl(e){let t,n,l,s,u,b,p,f,c,z,y,W,M,m,C,P,G,N,R,E,O,de,F,B,U,le,Q,fe,te,se,J,g,A,D,Z,Le,$,me,Ie,he,ee,ae,_e,Re,oe,be,Se,Te,X,ge,ie,x,we,re,ke,j,k,I,S,ue,st,Rt,ze,Ht,at,Nt,We,H,Ee,Je,wt,ye,kt,Ke,Mt,ve,ot,rt,ut,pe,Pe,Me,Qe,zt,Ze,Wt,ct=e[26].width+"",Hn,yi,qt,vi,Ft=e[26].height+"",Nn,wi,He,Ut,ki,xt,Mi,jt=e[27].width+"",qn,zi,Vt,Wi,Gt=e[27].height+"",Fn,Ci,dt,Ne,Xt,Li,Yt,Si,Bt=e[26].toLogical(e[23]).width+"",Un,Ti,Jt,Ei,Kt=e[26].toLogical(e[23]).height+"",xn,Pi,qe,Qt,Ai,Zt,Oi,$t=e[27].toLogical(e[23]).width+"",jn,Di,en,Ii,tn=e[27].toLogical(e[23]).height+"",Vn,Ri,ft,Fe,nn,Hi,ln,Ni,sn=e[24].x+"",Gn,qi,an,Fi,on=e[24].y+"",Xn,Ui,Ue,rn,xi,un,ji,cn=e[25].x+"",Yn,Vi,dn,Gi,fn=e[25].y+"",Bn,Xi,mt,xe,mn,Yi,pn,Bi,hn=e[24].toLogical(e[23]).x+"",Jn,Ji,_n,Ki,bn=e[24].toLogical(e[23]).y+"",Kn,Qi,je,gn,Zi,yn,$i,vn=e[25].toLogical(e[23]).x+"",Qn,el,wn,tl,kn=e[25].toLogical(e[23]).y+"",Zn,$n,ei,ti,Ct,ni,Ae,Mn,pt,nl,il,zn,ht,ll,sl,Wn,_t,al,ii,Oe,Cn,ol,De,rl,Ln,ul,Ve,cl,Sn,dl,Ge,li,si,ai,Lt,$e,Xe,fl,St,oi,ml,bt=e[29],ce=[];for(let r=0;r<bt.length;r+=1)ce[r]=Ll(kl(e,bt,r));return{c(){t=a("br"),n=d(),l=a("div"),s=a("button"),s.textContent="Center",u=d(),b=a("button"),b.textContent="Minimize",p=d(),f=a("button"),f.textContent="Hide",c=d(),z=a("button"),z.textContent="Request attention",y=d(),W=a("br"),M=d(),m=a("div"),C=a("label"),P=w(`Maximized
`),G=a("input"),N=d(),R=a("label"),E=w(`Resizable
`),O=a("input"),de=d(),F=a("label"),B=w(`Has decorations
`),U=a("input"),le=d(),Q=a("label"),fe=w(`Always on top
`),te=a("input"),se=d(),J=a("label"),g=w(`Content protected
`),A=a("input"),D=d(),Z=a("label"),Le=w(`Fullscreen
`),$=a("input"),me=d(),Ie=a("br"),he=d(),ee=a("div"),ae=a("div"),_e=a("div"),Re=w(`X
`),oe=a("input"),be=d(),Se=a("div"),Te=w(`Y
`),X=a("input"),ge=d(),ie=a("div"),x=a("div"),we=w(`Width
`),re=a("input"),ke=d(),j=a("div"),k=w(`Height
`),I=a("input"),S=d(),ue=a("div"),st=a("div"),Rt=w(`Min width
`),ze=a("input"),Ht=d(),at=a("div"),Nt=w(`Min height
`),We=a("input"),H=d(),Ee=a("div"),Je=a("div"),wt=w(`Max width
`),ye=a("input"),kt=d(),Ke=a("div"),Mt=w(`Max height
`),ve=a("input"),ot=d(),rt=a("br"),ut=d(),pe=a("div"),Pe=a("div"),Me=a("div"),Qe=a("div"),Qe.textContent="Inner Size",zt=d(),Ze=a("span"),Wt=w("Width: "),Hn=w(ct),yi=d(),qt=a("span"),vi=w("Height: "),Nn=w(Ft),wi=d(),He=a("div"),Ut=a("div"),Ut.textContent="Outer Size",ki=d(),xt=a("span"),Mi=w("Width: "),qn=w(jt),zi=d(),Vt=a("span"),Wi=w("Height: "),Fn=w(Gt),Ci=d(),dt=a("div"),Ne=a("div"),Xt=a("div"),Xt.textContent="Inner Logical Size",Li=d(),Yt=a("span"),Si=w("Width: "),Un=w(Bt),Ti=d(),Jt=a("span"),Ei=w("Height: "),xn=w(Kt),Pi=d(),qe=a("div"),Qt=a("div"),Qt.textContent="Outer Logical Size",Ai=d(),Zt=a("span"),Oi=w("Width: "),jn=w($t),Di=d(),en=a("span"),Ii=w("Height: "),Vn=w(tn),Ri=d(),ft=a("div"),Fe=a("div"),nn=a("div"),nn.textContent="Inner Position",Hi=d(),ln=a("span"),Ni=w("x: "),Gn=w(sn),qi=d(),an=a("span"),Fi=w("y: "),Xn=w(on),Ui=d(),Ue=a("div"),rn=a("div"),rn.textContent="Outer Position",xi=d(),un=a("span"),ji=w("x: "),Yn=w(cn),Vi=d(),dn=a("span"),Gi=w("y: "),Bn=w(fn),Xi=d(),mt=a("div"),xe=a("div"),mn=a("div"),mn.textContent="Inner Logical Position",Yi=d(),pn=a("span"),Bi=w("x: "),Jn=w(hn),Ji=d(),_n=a("span"),Ki=w("y: "),Kn=w(bn),Qi=d(),je=a("div"),gn=a("div"),gn.textContent="Outer Logical Position",Zi=d(),yn=a("span"),$i=w("x: "),Qn=w(vn),el=d(),wn=a("span"),tl=w("y: "),Zn=w(kn),$n=d(),ei=a("br"),ti=d(),Ct=a("h4"),Ct.textContent="Cursor",ni=d(),Ae=a("div"),Mn=a("label"),pt=a("input"),nl=w(`
Grab`),il=d(),zn=a("label"),ht=a("input"),ll=w(`
Visible`),sl=d(),Wn=a("label"),_t=a("input"),al=w(`
Ignore events`),ii=d(),Oe=a("div"),Cn=a("label"),ol=w(`Icon
`),De=a("select");for(let r=0;r<ce.length;r+=1)ce[r].c();rl=d(),Ln=a("label"),ul=w(`X position
`),Ve=a("input"),cl=d(),Sn=a("label"),dl=w(`Y position
`),Ge=a("input"),li=d(),si=a("br"),ai=d(),Lt=a("div"),$e=a("form"),Xe=a("input"),fl=d(),St=a("button"),St.textContent="Set title",o(s,"class","btn"),o(s,"title","Unminimizes after 2 seconds"),o(b,"class","btn"),o(b,"title","Unminimizes after 2 seconds"),o(f,"class","btn"),o(f,"title","Visible again after 2 seconds"),o(z,"class","btn"),o(z,"title","Minimizes the window, requests attention for 3s and then resets it"),o(l,"class","flex flex-wrap gap-2"),o(G,"type","checkbox"),o(O,"type","checkbox"),o(U,"type","checkbox"),o(te,"type","checkbox"),o(A,"type","checkbox"),o($,"type","checkbox"),o(m,"class","flex flex-wrap gap-2"),o(oe,"class","input"),o(oe,"type","number"),o(oe,"min","0"),o(X,"class","input"),o(X,"type","number"),o(X,"min","0"),o(ae,"class","flex children:grow flex-col"),o(re,"class","input"),o(re,"type","number"),o(re,"min","400"),o(I,"class","input"),o(I,"type","number"),o(I,"min","400"),o(ie,"class","flex children:grow flex-col"),o(ze,"class","input"),o(ze,"type","number"),o(We,"class","input"),o(We,"type","number"),o(ue,"class","flex children:grow flex-col"),o(ye,"class","input"),o(ye,"type","number"),o(ye,"min","800"),o(ve,"class","input"),o(ve,"type","number"),o(ve,"min","400"),o(Ee,"class","flex children:grow flex-col"),o(ee,"class","flex flex-row gap-2 flex-wrap"),o(Qe,"class","text-accent dark:text-darkAccent font-700"),o(Me,"class","grow"),o(Ut,"class","text-accent dark:text-darkAccent font-700"),o(He,"class","grow"),o(Pe,"class","flex"),o(Xt,"class","text-accent dark:text-darkAccent font-700"),o(Ne,"class","grow"),o(Qt,"class","text-accent dark:text-darkAccent font-700"),o(qe,"class","grow"),o(dt,"class","flex"),o(nn,"class","text-accent dark:text-darkAccent font-700"),o(Fe,"class","grow"),o(rn,"class","text-accent dark:text-darkAccent font-700"),o(Ue,"class","grow"),o(ft,"class","flex"),o(mn,"class","text-accent dark:text-darkAccent font-700"),o(xe,"class","grow"),o(gn,"class","text-accent dark:text-darkAccent font-700"),o(je,"class","grow"),o(mt,"class","flex"),o(Ct,"class","mb-2"),o(pt,"type","checkbox"),o(ht,"type","checkbox"),o(_t,"type","checkbox"),o(Ae,"class","flex gap-2"),o(De,"class","input"),e[20]===void 0&&Dt(()=>e[56].call(De)),o(Ve,"class","input"),o(Ve,"type","number"),o(Ge,"class","input"),o(Ge,"type","number"),o(Oe,"class","flex gap-2"),o(Xe,"class","input grow"),o(Xe,"id","title"),o(St,"class","btn"),o(St,"type","submit"),o($e,"class","flex gap-1"),o(Lt,"class","flex flex-col gap-1")},m(r,v){_(r,t,v),_(r,n,v),_(r,l,v),i(l,s),i(l,u),i(l,b),i(l,p),i(l,f),i(l,c),i(l,z),_(r,y,v),_(r,W,v),_(r,M,v),_(r,m,v),i(m,C),i(C,P),i(C,G),G.checked=e[3],i(m,N),i(m,R),i(R,E),i(R,O),O.checked=e[2],i(m,de),i(m,F),i(F,B),i(F,U),U.checked=e[4],i(m,le),i(m,Q),i(Q,fe),i(Q,te),te.checked=e[5],i(m,se),i(m,J),i(J,g),i(J,A),A.checked=e[6],i(m,D),i(m,Z),i(Z,Le),i(Z,$),$.checked=e[7],_(r,me,v),_(r,Ie,v),_(r,he,v),_(r,ee,v),i(ee,ae),i(ae,_e),i(_e,Re),i(_e,oe),q(oe,e[14]),i(ae,be),i(ae,Se),i(Se,Te),i(Se,X),q(X,e[15]),i(ee,ge),i(ee,ie),i(ie,x),i(x,we),i(x,re),q(re,e[8]),i(ie,ke),i(ie,j),i(j,k),i(j,I),q(I,e[9]),i(ee,S),i(ee,ue),i(ue,st),i(st,Rt),i(st,ze),q(ze,e[10]),i(ue,Ht),i(ue,at),i(at,Nt),i(at,We),q(We,e[11]),i(ee,H),i(ee,Ee),i(Ee,Je),i(Je,wt),i(Je,ye),q(ye,e[12]),i(Ee,kt),i(Ee,Ke),i(Ke,Mt),i(Ke,ve),q(ve,e[13]),_(r,ot,v),_(r,rt,v),_(r,ut,v),_(r,pe,v),i(pe,Pe),i(Pe,Me),i(Me,Qe),i(Me,zt),i(Me,Ze),i(Ze,Wt),i(Ze,Hn),i(Me,yi),i(Me,qt),i(qt,vi),i(qt,Nn),i(Pe,wi),i(Pe,He),i(He,Ut),i(He,ki),i(He,xt),i(xt,Mi),i(xt,qn),i(He,zi),i(He,Vt),i(Vt,Wi),i(Vt,Fn),i(pe,Ci),i(pe,dt),i(dt,Ne),i(Ne,Xt),i(Ne,Li),i(Ne,Yt),i(Yt,Si),i(Yt,Un),i(Ne,Ti),i(Ne,Jt),i(Jt,Ei),i(Jt,xn),i(dt,Pi),i(dt,qe),i(qe,Qt),i(qe,Ai),i(qe,Zt),i(Zt,Oi),i(Zt,jn),i(qe,Di),i(qe,en),i(en,Ii),i(en,Vn),i(pe,Ri),i(pe,ft),i(ft,Fe),i(Fe,nn),i(Fe,Hi),i(Fe,ln),i(ln,Ni),i(ln,Gn),i(Fe,qi),i(Fe,an),i(an,Fi),i(an,Xn),i(ft,Ui),i(ft,Ue),i(Ue,rn),i(Ue,xi),i(Ue,un),i(un,ji),i(un,Yn),i(Ue,Vi),i(Ue,dn),i(dn,Gi),i(dn,Bn),i(pe,Xi),i(pe,mt),i(mt,xe),i(xe,mn),i(xe,Yi),i(xe,pn),i(pn,Bi),i(pn,Jn),i(xe,Ji),i(xe,_n),i(_n,Ki),i(_n,Kn),i(mt,Qi),i(mt,je),i(je,gn),i(je,Zi),i(je,yn),i(yn,$i),i(yn,Qn),i(je,el),i(je,wn),i(wn,tl),i(wn,Zn),_(r,$n,v),_(r,ei,v),_(r,ti,v),_(r,Ct,v),_(r,ni,v),_(r,Ae,v),i(Ae,Mn),i(Mn,pt),pt.checked=e[16],i(Mn,nl),i(Ae,il),i(Ae,zn),i(zn,ht),ht.checked=e[17],i(zn,ll),i(Ae,sl),i(Ae,Wn),i(Wn,_t),_t.checked=e[21],i(Wn,al),_(r,ii,v),_(r,Oe,v),i(Oe,Cn),i(Cn,ol),i(Cn,De);for(let ne=0;ne<ce.length;ne+=1)ce[ne].m(De,null);In(De,e[20]),i(Oe,rl),i(Oe,Ln),i(Ln,ul),i(Ln,Ve),q(Ve,e[18]),i(Oe,cl),i(Oe,Sn),i(Sn,dl),i(Sn,Ge),q(Ge,e[19]),_(r,li,v),_(r,si,v),_(r,ai,v),_(r,Lt,v),i(Lt,$e),i($e,Xe),q(Xe,e[28]),i($e,fl),i($e,St),oi||(ml=[T(s,"click",e[38]),T(b,"click",e[32]),T(f,"click",e[31]),T(z,"click",e[34]),T(G,"change",e[39]),T(O,"change",e[40]),T(U,"change",e[41]),T(te,"change",e[42]),T(A,"change",e[43]),T($,"change",e[44]),T(oe,"input",e[45]),T(X,"input",e[46]),T(re,"input",e[47]),T(I,"input",e[48]),T(ze,"input",e[49]),T(We,"input",e[50]),T(ye,"input",e[51]),T(ve,"input",e[52]),T(pt,"change",e[53]),T(ht,"change",e[54]),T(_t,"change",e[55]),T(De,"change",e[56]),T(Ve,"input",e[57]),T(Ge,"input",e[58]),T(Xe,"input",e[59]),T($e,"submit",ls(e[30]))],oi=!0)},p(r,v){if(v[0]&8&&(G.checked=r[3]),v[0]&4&&(O.checked=r[2]),v[0]&16&&(U.checked=r[4]),v[0]&32&&(te.checked=r[5]),v[0]&64&&(A.checked=r[6]),v[0]&128&&($.checked=r[7]),v[0]&16384&&Y(oe.value)!==r[14]&&q(oe,r[14]),v[0]&32768&&Y(X.value)!==r[15]&&q(X,r[15]),v[0]&256&&Y(re.value)!==r[8]&&q(re,r[8]),v[0]&512&&Y(I.value)!==r[9]&&q(I,r[9]),v[0]&1024&&Y(ze.value)!==r[10]&&q(ze,r[10]),v[0]&2048&&Y(We.value)!==r[11]&&q(We,r[11]),v[0]&4096&&Y(ye.value)!==r[12]&&q(ye,r[12]),v[0]&8192&&Y(ve.value)!==r[13]&&q(ve,r[13]),v[0]&67108864&&ct!==(ct=r[26].width+"")&&K(Hn,ct),v[0]&67108864&&Ft!==(Ft=r[26].height+"")&&K(Nn,Ft),v[0]&134217728&&jt!==(jt=r[27].width+"")&&K(qn,jt),v[0]&134217728&&Gt!==(Gt=r[27].height+"")&&K(Fn,Gt),v[0]&75497472&&Bt!==(Bt=r[26].toLogical(r[23]).width+"")&&K(Un,Bt),v[0]&75497472&&Kt!==(Kt=r[26].toLogical(r[23]).height+"")&&K(xn,Kt),v[0]&142606336&&$t!==($t=r[27].toLogical(r[23]).width+"")&&K(jn,$t),v[0]&142606336&&tn!==(tn=r[27].toLogical(r[23]).height+"")&&K(Vn,tn),v[0]&16777216&&sn!==(sn=r[24].x+"")&&K(Gn,sn),v[0]&16777216&&on!==(on=r[24].y+"")&&K(Xn,on),v[0]&33554432&&cn!==(cn=r[25].x+"")&&K(Yn,cn),v[0]&33554432&&fn!==(fn=r[25].y+"")&&K(Bn,fn),v[0]&25165824&&hn!==(hn=r[24].toLogical(r[23]).x+"")&&K(Jn,hn),v[0]&25165824&&bn!==(bn=r[24].toLogical(r[23]).y+"")&&K(Kn,bn),v[0]&41943040&&vn!==(vn=r[25].toLogical(r[23]).x+"")&&K(Qn,vn),v[0]&41943040&&kn!==(kn=r[25].toLogical(r[23]).y+"")&&K(Zn,kn),v[0]&65536&&(pt.checked=r[16]),v[0]&131072&&(ht.checked=r[17]),v[0]&2097152&&(_t.checked=r[21]),v[0]&536870912){bt=r[29];let ne;for(ne=0;ne<bt.length;ne+=1){const pl=kl(r,bt,ne);ce[ne]?ce[ne].p(pl,v):(ce[ne]=Ll(pl),ce[ne].c(),ce[ne].m(De,null))}for(;ne<ce.length;ne+=1)ce[ne].d(1);ce.length=bt.length}v[0]&537919488&&In(De,r[20]),v[0]&262144&&Y(Ve.value)!==r[18]&&q(Ve,r[18]),v[0]&524288&&Y(Ge.value)!==r[19]&&q(Ge,r[19]),v[0]&268435456&&Xe.value!==r[28]&&q(Xe,r[28])},d(r){r&&h(t),r&&h(n),r&&h(l),r&&h(y),r&&h(W),r&&h(M),r&&h(m),r&&h(me),r&&h(Ie),r&&h(he),r&&h(ee),r&&h(ot),r&&h(rt),r&&h(ut),r&&h(pe),r&&h($n),r&&h(ei),r&&h(ti),r&&h(Ct),r&&h(ni),r&&h(Ae),r&&h(ii),r&&h(Oe),Dn(ce,r),r&&h(li),r&&h(si),r&&h(ai),r&&h(Lt),oi=!1,Ce(ml)}}}function Ll(e){let t,n=e[65]+"",l;return{c(){t=a("option"),l=w(n),t.__value=e[65],t.value=t.__value},m(s,u){_(s,t,u),i(t,l)},p:V,d(s){s&&h(t)}}}function Is(e){let t,n,l,s,u,b,p,f,c=Object.keys(e[1]).length>=1,z,y,W,M=c&&zl(e),m=e[1][e[0]]&&Cl(e);return{c(){t=a("div"),n=a("div"),l=a("input"),s=d(),u=a("button"),u.textContent="New window",b=d(),p=a("br"),f=d(),M&&M.c(),z=d(),m&&m.c(),o(l,"class","input grow"),o(l,"type","text"),o(l,"placeholder","New Window label.."),o(u,"class","btn"),o(n,"class","flex gap-1"),o(t,"class","flex flex-col children:grow gap-2")},m(C,P){_(C,t,P),i(t,n),i(n,l),q(l,e[22]),i(n,s),i(n,u),i(t,b),i(t,p),i(t,f),M&&M.m(t,null),i(t,z),m&&m.m(t,null),y||(W=[T(l,"input",e[36]),T(u,"click",e[33])],y=!0)},p(C,P){P[0]&4194304&&l.value!==C[22]&&q(l,C[22]),P[0]&2&&(c=Object.keys(C[1]).length>=1),c?M?M.p(C,P):(M=zl(C),M.c(),M.m(t,z)):M&&(M.d(1),M=null),C[1][C[0]]?m?m.p(C,P):(m=Cl(C),m.c(),m.m(t,null)):m&&(m.d(1),m=null)},i:V,o:V,d(C){C&&h(t),M&&M.d(),m&&m.d(),y=!1,Ce(W)}}}function Rs(e,t,n){let l=nt.label;const s={[nt.label]:nt},u=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:b}=t,p,f=!0,c=!1,z=!0,y=!1,W=!0,M=!1,m=null,C=null,P=null,G=null,N=null,R=null,E=null,O=null,de=1,F=new Ye(E,O),B=new Ye(E,O),U=new tt(m,C),le=new tt(m,C),Q,fe,te=!1,se=!0,J=null,g=null,A="default",D=!1,Z="Awesome Tauri Example!";function Le(){s[l].setTitle(Z)}function $(){s[l].hide(),setTimeout(s[l].show,2e3)}function me(){s[l].minimize(),setTimeout(s[l].unminimize,2e3)}function Ie(){if(!p)return;const H=new it(p);n(1,s[p]=H,s),H.once("tauri://error",function(){b("Error creating new webview")})}function he(){s[l].innerSize().then(H=>{n(26,U=H),n(8,m=U.width),n(9,C=U.height)}),s[l].outerSize().then(H=>{n(27,le=H)})}function ee(){s[l].innerPosition().then(H=>{n(24,F=H)}),s[l].outerPosition().then(H=>{n(25,B=H),n(14,E=B.x),n(15,O=B.y)})}async function ae(H){!H||(Q&&Q(),fe&&fe(),fe=await H.listen("tauri://move",ee),Q=await H.listen("tauri://resize",he))}async function _e(){await s[l].minimize(),await s[l].requestUserAttention(bi.Critical),await new Promise(H=>setTimeout(H,3e3)),await s[l].requestUserAttention(null)}function Re(){p=this.value,n(22,p)}function oe(){l=_l(this),n(0,l),n(1,s)}const be=()=>s[l].center();function Se(){c=this.checked,n(3,c)}function Te(){f=this.checked,n(2,f)}function X(){z=this.checked,n(4,z)}function ge(){y=this.checked,n(5,y)}function ie(){W=this.checked,n(6,W)}function x(){M=this.checked,n(7,M)}function we(){E=Y(this.value),n(14,E)}function re(){O=Y(this.value),n(15,O)}function ke(){m=Y(this.value),n(8,m)}function j(){C=Y(this.value),n(9,C)}function k(){P=Y(this.value),n(10,P)}function I(){G=Y(this.value),n(11,G)}function S(){N=Y(this.value),n(12,N)}function ue(){R=Y(this.value),n(13,R)}function st(){te=this.checked,n(16,te)}function Rt(){se=this.checked,n(17,se)}function ze(){D=this.checked,n(21,D)}function Ht(){A=_l(this),n(20,A),n(29,u)}function at(){J=Y(this.value),n(18,J)}function Nt(){g=Y(this.value),n(19,g)}function We(){Z=this.value,n(28,Z)}return e.$$set=H=>{"onMessage"in H&&n(35,b=H.onMessage)},e.$$.update=()=>{var H,Ee,Je,wt,ye,kt,Ke,Mt,ve,ot,rt,ut,pe,Pe,Me,Qe,zt,Ze,Wt;e.$$.dirty[0]&3&&(s[l],ee(),he()),e.$$.dirty[0]&7&&((H=s[l])==null||H.setResizable(f)),e.$$.dirty[0]&11&&(c?(Ee=s[l])==null||Ee.maximize():(Je=s[l])==null||Je.unmaximize()),e.$$.dirty[0]&19&&((wt=s[l])==null||wt.setDecorations(z)),e.$$.dirty[0]&35&&((ye=s[l])==null||ye.setAlwaysOnTop(y)),e.$$.dirty[0]&67&&((kt=s[l])==null||kt.setContentProtected(W)),e.$$.dirty[0]&131&&((Ke=s[l])==null||Ke.setFullscreen(M)),e.$$.dirty[0]&771&&m&&C&&((Mt=s[l])==null||Mt.setSize(new tt(m,C))),e.$$.dirty[0]&3075&&(P&&G?(ve=s[l])==null||ve.setMinSize(new Rn(P,G)):(ot=s[l])==null||ot.setMinSize(null)),e.$$.dirty[0]&12291&&(N>800&&R>400?(rt=s[l])==null||rt.setMaxSize(new Rn(N,R)):(ut=s[l])==null||ut.setMaxSize(null)),e.$$.dirty[0]&49155&&E!==null&&O!==null&&((pe=s[l])==null||pe.setPosition(new Ye(E,O))),e.$$.dirty[0]&3&&((Pe=s[l])==null||Pe.scaleFactor().then(ct=>n(23,de=ct))),e.$$.dirty[0]&3&&ae(s[l]),e.$$.dirty[0]&65539&&((Me=s[l])==null||Me.setCursorGrab(te)),e.$$.dirty[0]&131075&&((Qe=s[l])==null||Qe.setCursorVisible(se)),e.$$.dirty[0]&1048579&&((zt=s[l])==null||zt.setCursorIcon(A)),e.$$.dirty[0]&786435&&J!==null&&g!==null&&((Ze=s[l])==null||Ze.setCursorPosition(new Ye(J,g))),e.$$.dirty[0]&2097155&&((Wt=s[l])==null||Wt.setIgnoreCursorEvents(D))},[l,s,f,c,z,y,W,M,m,C,P,G,N,R,E,O,te,se,J,g,A,D,p,de,F,B,U,le,Z,u,Le,$,me,Ie,_e,b,Re,oe,be,Se,Te,X,ge,ie,x,we,re,ke,j,k,I,S,ue,st,Rt,ze,Ht,at,Nt,We]}class Hs extends vt{constructor(t){super(),yt(this,t,Rs,Is,lt,{onMessage:35},null,[-1,-1,-1])}}function Ns(e){let t;return{c(){t=a("div"),t.innerHTML=`<div class="note-red grow">Not available for Linux</div>
<video id="localVideo" autoplay="" playsinline=""><track kind="captions"/></video>`,o(t,"class","flex flex-col gap-2")},m(n,l){_(n,t,l)},p:V,i:V,o:V,d(n){n&&h(t)}}}function qs(e,t,n){let{onMessage:l}=t;const s=window.constraints={audio:!0,video:!0};function u(p){const f=document.querySelector("video"),c=p.getVideoTracks();l("Got stream with constraints:",s),l(`Using video device: ${c[0].label}`),window.stream=p,f.srcObject=p}function b(p){if(p.name==="ConstraintNotSatisfiedError"){const f=s.video;l(`The resolution ${f.width.exact}x${f.height.exact} px is not supported by your device.`)}else p.name==="PermissionDeniedError"&&l("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.");l(`getUserMedia error: ${p.name}`,p)}return At(async()=>{try{const p=await navigator.mediaDevices.getUserMedia(s);u(p)}catch(p){b(p)}}),Hl(()=>{window.stream.getTracks().forEach(function(p){p.stop()})}),e.$$set=p=>{"onMessage"in p&&n(0,l=p.onMessage)},[l]}class Fs extends vt{constructor(t){super(),yt(this,t,qs,Ns,lt,{onMessage:0})}}function Sl(e,t,n){const l=e.slice();return l[29]=t[n],l}function Tl(e,t,n){const l=e.slice();return l[32]=t[n],l}function Us(e){let t,n,l,s,u,b,p,f,c,z,y,W,M;function m(E,O){return E[3]?js:xs}let C=m(e),P=C(e);function G(E,O){return E[2]?Gs:Vs}let N=G(e),R=N(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",l=d(),s=a("span"),u=a("span"),P.c(),p=d(),f=a("span"),f.innerHTML='<div class="i-codicon-chrome-minimize"></div>',c=d(),z=a("span"),R.c(),o(n,"class","lt-sm:pl-10 text-darkPrimaryText"),o(u,"title",b=e[3]?"Switch to Light mode":"Switch to Dark mode"),o(u,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(f,"title","Minimize"),o(f,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(z,"title",y=e[2]?"Restore":"Maximize"),o(z,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(s,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),o(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),o(t,"data-tauri-drag-region","")},m(E,O){_(E,t,O),i(t,n),i(t,l),i(t,s),i(s,u),P.m(u,null),i(s,p),i(s,f),i(s,c),i(s,z),R.m(z,null),W||(M=[T(u,"click",e[10]),T(f,"click",e[8]),T(z,"click",e[9])],W=!0)},p(E,O){C!==(C=m(E))&&(P.d(1),P=C(E),P&&(P.c(),P.m(u,null))),O[0]&8&&b!==(b=E[3]?"Switch to Light mode":"Switch to Dark mode")&&o(u,"title",b),N!==(N=G(E))&&(R.d(1),R=N(E),R&&(R.c(),R.m(z,null))),O[0]&4&&y!==(y=E[2]?"Restore":"Maximize")&&o(z,"title",y)},d(E){E&&h(t),P.d(),R.d(),W=!1,Ce(M)}}}function xs(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-moon")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function js(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-sun")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Vs(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-maximize")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Gs(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-restore")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Xs(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Ys(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Bs(e){let t,n,l,s,u,b,p,f,c;function z(M,m){return M[3]?Ks:Js}let y=z(e),W=y(e);return{c(){t=a("a"),W.c(),n=d(),l=a("br"),s=d(),u=a("div"),b=d(),p=a("br"),o(t,"href","##"),o(t,"class","nv justify-between h-8"),o(u,"class","bg-white/5 h-2px")},m(M,m){_(M,t,m),W.m(t,null),_(M,n,m),_(M,l,m),_(M,s,m),_(M,u,m),_(M,b,m),_(M,p,m),f||(c=T(t,"click",e[10]),f=!0)},p(M,m){y!==(y=z(M))&&(W.d(1),W=y(M),W&&(W.c(),W.m(t,null)))},d(M){M&&h(t),W.d(),M&&h(n),M&&h(l),M&&h(s),M&&h(u),M&&h(b),M&&h(p),f=!1,c()}}}function Js(e){let t,n;return{c(){t=w(`Switch to Dark mode
`),n=a("div"),o(n,"class","i-ph-moon")},m(l,s){_(l,t,s),_(l,n,s)},d(l){l&&h(t),l&&h(n)}}}function Ks(e){let t,n;return{c(){t=w(`Switch to Light mode
`),n=a("div"),o(n,"class","i-ph-sun")},m(l,s){_(l,t,s),_(l,n,s)},d(l){l&&h(t),l&&h(n)}}}function Qs(e){let t,n,l,s,u=e[32].label+"",b,p,f,c;function z(){return e[18](e[32])}return{c(){t=a("a"),n=a("div"),l=d(),s=a("p"),b=w(u),o(n,"class",e[32].icon+" mr-2"),o(t,"href","##"),o(t,"class",p="nv "+(e[1]===e[32]?"nv_selected":""))},m(y,W){_(y,t,W),i(t,n),i(t,l),i(t,s),i(s,b),f||(c=T(t,"click",z),f=!0)},p(y,W){e=y,W[0]&2&&p!==(p="nv "+(e[1]===e[32]?"nv_selected":""))&&o(t,"class",p)},d(y){y&&h(t),f=!1,c()}}}function El(e){let t,n=e[32]&&Qs(e);return{c(){n&&n.c(),t=Il()},m(l,s){n&&n.m(l,s),_(l,t,s)},p(l,s){l[32]&&n.p(l,s)},d(l){n&&n.d(l),l&&h(t)}}}function Pl(e){let t,n=e[29].html+"",l;return{c(){t=new as(!1),l=Il(),t.a=l},m(s,u){t.m(n,s,u),_(s,l,u)},p(s,u){u[0]&32&&n!==(n=s[29].html+"")&&t.p(n)},d(s){s&&h(l),s&&t.d()}}}function Zs(e){let t,n,l,s,u,b,p,f,c,z,y,W,M,m,C,P,G,N,R,E,O,de,F,B,U,le,Q=e[1].label+"",fe,te,se,J,g,A,D,Z,Le,$,me,Ie,he,ee,ae,_e,Re,oe,be=e[16]&&Us(e);function Se(k,I){return k[0]?Ys:Xs}let Te=Se(e),X=Te(e),ge=!e[16]&&Bs(e),ie=e[6],x=[];for(let k=0;k<ie.length;k+=1)x[k]=El(Tl(e,ie,k));var we=e[1].component;function re(k){return{props:{onMessage:k[12],insecureRenderHtml:k[13]}}}we&&(g=new we(re(e)));let ke=e[5],j=[];for(let k=0;k<ke.length;k+=1)j[k]=Pl(Sl(e,ke,k));return{c(){be&&be.c(),t=d(),n=a("div"),X.c(),l=d(),s=a("div"),u=a("aside"),b=a("img"),f=d(),ge&&ge.c(),c=d(),z=a("a"),z.innerHTML=`Documentation
<span class="i-codicon-link-external"></span>`,y=d(),W=a("a"),W.innerHTML=`GitHub
<span class="i-codicon-link-external"></span>`,M=d(),m=a("a"),m.innerHTML=`Source
<span class="i-codicon-link-external"></span>`,C=d(),P=a("br"),G=d(),N=a("div"),R=d(),E=a("br"),O=d(),de=a("div");for(let k=0;k<x.length;k+=1)x[k].c();F=d(),B=a("main"),U=a("div"),le=a("h1"),fe=w(Q),te=d(),se=a("div"),J=a("div"),g&&yl(g.$$.fragment),A=d(),D=a("div"),Z=a("div"),Le=d(),$=a("div"),me=a("p"),me.textContent="Console",Ie=d(),he=a("div"),he.innerHTML='<div class="i-codicon-clear-all"></div>',ee=d(),ae=a("div");for(let k=0;k<j.length;k+=1)j[k].c();o(n,"id","sidebarToggle"),o(n,"class","z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),o(b,"class","self-center p-7 cursor-pointer"),$l(b.src,p="tauri_logo.png")||o(b,"src",p),o(b,"alt","Tauri logo"),o(z,"class","nv justify-between h-8"),o(z,"target","_blank"),o(z,"href","https://tauri.app/v1/guides/"),o(W,"class","nv justify-between h-8"),o(W,"target","_blank"),o(W,"href","https://github.com/tauri-apps/tauri"),o(m,"class","nv justify-between h-8"),o(m,"target","_blank"),o(m,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),o(N,"class","bg-white/5 h-2px"),o(de,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),o(u,"id","sidebar"),o(u,"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"),o(J,"class","mr-2"),o(se,"class","overflow-y-auto"),o(U,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),o(Z,"class","bg-black/20 h-2px cursor-ns-resize"),o(me,"class","font-semibold"),o(he,"class","cursor-pointer h-85% rd-1 p-1 flex justify-center items-center hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25 "),o($,"class","flex justify-between items-center px-2"),o(ae,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),o(D,"id","console"),o(D,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),o(B,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),o(s,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(k,I){be&&be.m(k,I),_(k,t,I),_(k,n,I),X.m(n,null),_(k,l,I),_(k,s,I),i(s,u),i(u,b),i(u,f),ge&&ge.m(u,null),i(u,c),i(u,z),i(u,y),i(u,W),i(u,M),i(u,m),i(u,C),i(u,P),i(u,G),i(u,N),i(u,R),i(u,E),i(u,O),i(u,de);for(let S=0;S<x.length;S+=1)x[S].m(de,null);i(s,F),i(s,B),i(B,U),i(U,le),i(le,fe),i(U,te),i(U,se),i(se,J),g&&fi(g,J,null),i(B,A),i(B,D),i(D,Z),i(D,Le),i(D,$),i($,me),i($,Ie),i($,he),i(D,ee),i(D,ae);for(let S=0;S<j.length;S+=1)j[S].m(ae,null);e[19](D),_e=!0,Re||(oe=[T(Z,"mousedown",e[15]),T(he,"click",e[14])],Re=!0)},p(k,I){if(k[16]&&be.p(k,I),Te!==(Te=Se(k))&&(X.d(1),X=Te(k),X&&(X.c(),X.m(n,null))),k[16]||ge.p(k,I),I[0]&195){ie=k[6];let S;for(S=0;S<ie.length;S+=1){const ue=Tl(k,ie,S);x[S]?x[S].p(ue,I):(x[S]=El(ue),x[S].c(),x[S].m(de,null))}for(;S<x.length;S+=1)x[S].d(1);x.length=ie.length}if((!_e||I[0]&2)&&Q!==(Q=k[1].label+"")&&K(fe,Q),we!==(we=k[1].component)){if(g){cs();const S=g;gl(S.$$.fragment,1,0,()=>{mi(S,1)}),ds()}we?(g=new we(re(k)),yl(g.$$.fragment),di(g.$$.fragment,1),fi(g,J,null)):g=null}if(I[0]&32){ke=k[5];let S;for(S=0;S<ke.length;S+=1){const ue=Sl(k,ke,S);j[S]?j[S].p(ue,I):(j[S]=Pl(ue),j[S].c(),j[S].m(ae,null))}for(;S<j.length;S+=1)j[S].d(1);j.length=ke.length}},i(k){_e||(g&&di(g.$$.fragment,k),_e=!0)},o(k){g&&gl(g.$$.fragment,k),_e=!1},d(k){be&&be.d(k),k&&h(t),k&&h(n),X.d(),k&&h(l),k&&h(s),ge&&ge.d(),Dn(x,k),g&&mi(g),Dn(j,k),e[19](null),Re=!1,Ce(oe)}}}let Al=50;function Ol(e){const t=document.querySelector("html");e?t.classList.add("dark"):t.classList.remove("dark"),localStorage&&localStorage.setItem("theme",e?"dark":"")}function $s(e,t){e.style.setProperty("--translate-x",`${t?"0":"-18.75"}rem`)}function ea(e,t,n){let l;nt.onFileDropEvent(g=>{C(`File drop: ${JSON.stringify(g.payload)}`)});const s=navigator.userAgent.toLowerCase(),u=s.includes("android")||s.includes("iphone"),b=[{label:"Welcome",component:Ss,icon:"i-ph-hand-waving"},{label:"Communication",component:Ds,icon:"i-codicon-radio-tower"},!u&&{label:"CLI",component:Ps,icon:"i-codicon-terminal"},!u&&{label:"Window",component:Hs,icon:"i-codicon-window"},{label:"WebRTC",component:Fs,icon:"i-ph-broadcast"}];let p=b[0];function f(g){n(1,p=g)}let c;At(async()=>{const g=On();n(2,c=await g.isMaximized()),_i("tauri://resize",async()=>{n(2,c=await g.isMaximized())})});function z(){On().minimize()}async function y(){const g=On();await g.isMaximized()?g.unmaximize():g.maximize()}let W;At(()=>{n(3,W=localStorage&&localStorage.getItem("theme")=="dark"),Ol(W)});function M(){n(3,W=!W),Ol(W)}let m=ms([]);ns(e,m,g=>n(5,l=g));function C(g){m.update(A=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+(typeof g=="string"?g:JSON.stringify(g,null,1))+"</pre>"},...A])}function P(g){m.update(A=>[{html:`<pre><strong class="text-accent dark:text-darkAccent">[${new Date().toLocaleTimeString()}]:</strong> `+g+"</pre>"},...A])}function G(){m.update(()=>[])}let N,R,E;function O(g){E=g.clientY;const A=window.getComputedStyle(N);R=parseInt(A.height,10);const D=Le=>{const $=Le.clientY-E,me=R-$;n(4,N.style.height=`${me<Al?Al:me}px`,N)},Z=()=>{document.removeEventListener("mouseup",Z),document.removeEventListener("mousemove",D)};document.addEventListener("mouseup",Z),document.addEventListener("mousemove",D)}const de=navigator.appVersion.includes("Win");let F=!1,B,U,le=!1,Q=0,fe=0;const te=(g,A,D)=>Math.min(Math.max(A,g),D);At(()=>{n(17,B=document.querySelector("#sidebar")),U=document.querySelector("#sidebarToggle"),document.addEventListener("click",g=>{U.contains(g.target)?n(0,F=!F):F&&!B.contains(g.target)&&n(0,F=!1)}),document.addEventListener("touchstart",g=>{if(U.contains(g.target))return;const A=g.touches[0].clientX;(0<A&&A<20&&!F||F)&&(le=!0,Q=A)}),document.addEventListener("touchmove",g=>{if(le){const A=g.touches[0].clientX;fe=A;const D=(A-Q)/10;B.style.setProperty("--translate-x",`-${te(0,F?0-D:18.75-D,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(le){const g=(fe-Q)/10;n(0,F=F?g>-(18.75/2):g>18.75/2)}le=!1})});const se=g=>{f(g),n(0,F=!1)};function J(g){ui[g?"unshift":"push"](()=>{N=g,n(4,N)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const g=document.querySelector("#sidebar");g&&$s(g,F)}},[F,p,c,W,N,l,b,f,z,y,M,m,C,P,G,O,de,B,se,J]}class ta extends vt{constructor(t){super(),yt(this,t,ea,Zs,lt,{},null,[-1,-1])}}new ta({target:document.querySelector("#app")});