diff --git a/.changes/move-http-api.md b/.changes/move-http-api.md new file mode 100644 index 00000000000..5c0e0a15b73 --- /dev/null +++ b/.changes/move-http-api.md @@ -0,0 +1,6 @@ +--- +"api": patch +"tauri": patch +--- + +Moved the `http` feature to its own plugin in the plugins-workspace repository. diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 5a997857dcc..d981136ba2a 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -144,11 +144,9 @@ updater = [ "minisign-verify", "time", "base64", - "http-api", "dialog-ask", "fs-extract-api" ] -http-api = [ ] http-multipart = [ "reqwest/multipart" ] shell-open-api = [ "open", "regex", "tauri-macros/shell-scope" ] fs-extract-api = [ "zip" ] @@ -212,7 +210,7 @@ fs-rename-file = [ ] fs-write-file = [ ] global-shortcut-all = [ ] http-all = [ "http-request" ] -http-request = [ "http-api" ] +http-request = [ ] notification-all = [ "notification", "dialog-ask" ] os-all = [ "os_info" ] path-all = [ ] diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 0c873768950..0791f02c8be 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,7 +1,6 @@ -"use strict";var __TAURI_IIFE__=(()=>{var R=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var se=Object.getOwnPropertyNames;var ae=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var t in e)R(n,t,{get:e[t],enumerable:!0})},oe=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of se(e))!ae.call(n,s)&&s!==t&&R(n,s,{get:()=>e[s],enumerable:!(r=re(e,s))||r.enumerable});return n};var le=n=>oe(R({},"__esModule",{value:!0}),n);var ht={};c(ht,{app:()=>N,event:()=>I,http:()=>z,invoke:()=>gt,notification:()=>H,os:()=>Z,path:()=>V,process:()=>q,shell:()=>G,tauri:()=>L,updater:()=>$,window:()=>Q});var N={};c(N,{getName:()=>me,getTauriVersion:()=>pe,getVersion:()=>ce,hide:()=>ge,show:()=>ye});var L={};c(L,{convertFileSrc:()=>ue,invoke:()=>l,transformCallback:()=>y});function de(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function y(n,e=!1){let t=de(),r=`_${t}`;return Object.defineProperty(window,r,{value:s=>(e&&Reflect.deleteProperty(window,r),n?.(s)),writable:!1,configurable:!0}),t}async function l(n,e={}){return new Promise((t,r)=>{let s=y(d=>{t(d),Reflect.deleteProperty(window,`_${a}`)},!0),a=y(d=>{r(d),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:a,...e})})}function ue(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return l("tauri",n)}async function ce(){return i({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function me(){return i({__tauriModule:"App",message:{cmd:"getAppName"}})}async function pe(){return i({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function ye(){return i({__tauriModule:"App",message:{cmd:"show"}})}async function ge(){return i({__tauriModule:"App",message:{cmd:"hide"}})}var I={};c(I,{TauriEvent:()=>O,emit:()=>E,listen:()=>U,once:()=>k});async function Y(n,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:n,eventId:e}})}async function _(n,e,t){await i({__tauriModule:"Event",message:{cmd:"emit",event:n,windowLabel:e,payload:t}})}async function w(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:y(t)}}).then(r=>async()=>Y(n,r))}async function v(n,e,t){return w(n,e,r=>{t(r),Y(n,r.id).catch(()=>{})})}var O=(u=>(u.WINDOW_RESIZED="tauri://resize",u.WINDOW_MOVED="tauri://move",u.WINDOW_CLOSE_REQUESTED="tauri://close-requested",u.WINDOW_CREATED="tauri://window-created",u.WINDOW_DESTROYED="tauri://destroyed",u.WINDOW_FOCUS="tauri://focus",u.WINDOW_BLUR="tauri://blur",u.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",u.WINDOW_THEME_CHANGED="tauri://theme-changed",u.WINDOW_FILE_DROP="tauri://file-drop",u.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",u.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",u.MENU="tauri://menu",u.CHECK_UPDATE="tauri://update",u.UPDATE_AVAILABLE="tauri://update-available",u.INSTALL_UPDATE="tauri://update-install",u.STATUS_UPDATE="tauri://update-status",u.DOWNLOAD_PROGRESS="tauri://update-download-progress",u))(O||{});async function U(n,e){return w(n,null,e)}async function k(n,e){return v(n,null,e)}async function E(n,e){return _(n,void 0,e)}var z={};c(z,{Body:()=>p,Client:()=>A,Response:()=>T,ResponseType:()=>X,fetch:()=>fe,getClient:()=>B});var X=(r=>(r[r.JSON=1]="JSON",r[r.Text=2]="Text",r[r.Binary=3]="Binary",r))(X||{}),p=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},r=(s,a)=>{if(a!==null){let d;typeof a=="string"?d=a:a instanceof Uint8Array||Array.isArray(a)?d=Array.from(a):a instanceof File?d={file:a.name,mime:a.type,fileName:a.name}:typeof a.file=="string"?d={file:a.file,mime:a.mime,fileName:a.fileName}:d={file:Array.from(a.file),mime:a.mime,fileName:a.fileName},t[String(s)]=d}};if(e instanceof FormData)for(let[s,a]of e)r(s,a);else for(let[s,a]of Object.entries(e))r(s,a);return new p("Form",t)}static json(e){return new p("Json",e)}static text(e){return new p("Text",e)}static bytes(e){return new p("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},T=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},A=class{constructor(e){this.id=e}async drop(){return i({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),i({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(r=>{let s=new T(r);if(t){try{s.data=JSON.parse(s.data)}catch(a){if(s.ok&&s.data==="")s.data={};else if(s.ok)throw Error(`Failed to parse response \`${s.data}\` as JSON: ${a}; - try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return s}return s})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,r){return this.request({method:"POST",url:e,body:t,...r})}async put(e,t,r){return this.request({method:"PUT",url:e,body:t,...r})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function B(n){return i({__tauriModule:"Http",message:{cmd:"createClient",options:n}}).then(e=>new A(e))}var F=null;async function fe(n,e){return F===null&&(F=await B()),F.request({url:n,method:e?.method??"GET",...e})}var H={};c(H,{isPermissionGranted:()=>be,requestPermission:()=>we,sendNotification:()=>Pe});async function be(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):i({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function we(){return window.Notification.requestPermission()}function Pe(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}var V={};c(V,{BaseDirectory:()=>ee,appCacheDir:()=>Ee,appConfigDir:()=>_e,appDataDir:()=>ve,appLocalDataDir:()=>Oe,appLogDir:()=>qe,audioDir:()=>Te,basename:()=>Ye,cacheDir:()=>Ae,configDir:()=>Ce,dataDir:()=>Me,delimiter:()=>je,desktopDir:()=>We,dirname:()=>Qe,documentDir:()=>De,downloadDir:()=>xe,executableDir:()=>Se,extname:()=>Ze,fontDir:()=>Re,homeDir:()=>Le,isAbsolute:()=>Xe,join:()=>Ke,localDataDir:()=>Ne,normalize:()=>Je,pictureDir:()=>Ue,publicDir:()=>ke,resolve:()=>$e,resolveResource:()=>Fe,resourceDir:()=>Ie,runtimeDir:()=>ze,sep:()=>Ge,templateDir:()=>He,videoDir:()=>Ve});function P(){return navigator.appVersion.includes("Win")}var ee=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(ee||{});async function _e(){return l("plugin:path|resolve_directory",{directory:13})}async function ve(){return l("plugin:path|resolve_directory",{directory:14})}async function Oe(){return l("plugin:path|resolve_directory",{directory:15})}async function Ee(){return l("plugin:path|resolve_directory",{directory:16})}async function Te(){return l("plugin:path|resolve_directory",{directory:1})}async function Ae(){return l("plugin:path|resolve_directory",{directory:2})}async function Ce(){return l("plugin:path|resolve_directory",{directory:3})}async function Me(){return l("plugin:path|resolve_directory",{directory:4})}async function We(){return l("plugin:path|resolve_directory",{directory:18})}async function De(){return l("plugin:path|resolve_directory",{directory:6})}async function xe(){return l("plugin:path|resolve_directory",{directory:7})}async function Se(){return l("plugin:path|resolve_directory",{directory:19})}async function Re(){return l("plugin:path|resolve_directory",{directory:20})}async function Le(){return l("plugin:path|resolve_directory",{directory:21})}async function Ne(){return l("plugin:path|resolve_directory",{directory:5})}async function Ue(){return l("plugin:path|resolve_directory",{directory:8})}async function ke(){return l("plugin:path|resolve_directory",{directory:9})}async function Ie(){return l("plugin:path|resolve_directory",{directory:11})}async function Fe(n){return l("plugin:path|resolve_directory",{directory:11,path:n})}async function ze(){return l("plugin:path|resolve_directory",{directory:22})}async function He(){return l("plugin:path|resolve_directory",{directory:23})}async function Ve(){return l("plugin:path|resolve_directory",{directory:10})}async function qe(){return l("plugin:path|resolve_directory",{directory:17})}var Ge=P()?"\\":"/",je=P()?";":":";async function $e(...n){return l("plugin:path|resolve",{paths:n})}async function Je(n){return l("plugin:path|normalize",{path:n})}async function Ke(...n){return l("plugin:path|join",{paths:n})}async function Qe(n){return l("plugin:path|dirname",{path:n})}async function Ze(n){return l("plugin:path|extname",{path:n})}async function Ye(n,e){return l("plugin:path|basename",{path:n,ext:e})}async function Xe(n){return l("plugin:path|isAbsolute",{path:n})}var q={};c(q,{exit:()=>Be,relaunch:()=>et});async function Be(n=0){return i({__tauriModule:"Process",message:{cmd:"exit",exitCode:n}})}async function et(){return i({__tauriModule:"Process",message:{cmd:"relaunch"}})}var G={};c(G,{Child:()=>C,Command:()=>h,EventEmitter:()=>g,open:()=>nt});async function tt(n,e,t=[],r){return typeof t=="object"&&Object.freeze(t),i({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:t,options:r,onEventFn:y(n)}})}var g=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.addListener(e,r)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(r=>r!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let r=this.eventListeners[e];for(let s of r)s(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.prependListener(e,r)}},C=class{constructor(e){this.pid=e}async write(e){return i({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return i({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},h=class extends g{constructor(t,r=[],s){super();this.stdout=new g;this.stderr=new g;this.program=t,this.args=typeof r=="string"?[r]:r,this.options=s??{}}static create(t,r=[],s){return new h(t,r,s)}static sidecar(t,r=[],s){let a=new h(t,r,s);return a.options.sidecar=!0,a}async spawn(){return tt(t=>{switch(t.event){case"Error":this.emit("error",t.payload);break;case"Terminated":this.emit("close",t.payload);break;case"Stdout":this.stdout.emit("data",t.payload);break;case"Stderr":this.stderr.emit("data",t.payload);break}},this.program,this.args,this.options).then(t=>new C(t))}async execute(){return new Promise((t,r)=>{this.on("error",r);let s=[],a=[];this.stdout.on("data",d=>{s.push(d)}),this.stderr.on("data",d=>{a.push(d)}),this.on("close",d=>{t({code:d.code,signal:d.signal,stdout:this.collectOutput(s),stderr:this.collectOutput(a)})}),this.spawn().catch(r)})}collectOutput(t){return this.options.encoding==="raw"?t.reduce((r,s)=>new Uint8Array([...r,...s,10]),new Uint8Array):t.join(` -`)}};async function nt(n,e){return i({__tauriModule:"Shell",message:{cmd:"open",path:n,with:e}})}var $={};c($,{checkUpdate:()=>rt,installUpdate:()=>it,onUpdaterEvent:()=>j});async function j(n){return U("tauri://update-status",e=>{n(e?.payload)})}async function it(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(a){if(a.error){e(),r(a.error);return}a.status==="DONE"&&(e(),t())}j(s).then(a=>{n=a}).catch(a=>{throw e(),a}),E("tauri://update-install").catch(a=>{throw e(),a})})}async function rt(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(d){e(),t({manifest:d,shouldUpdate:!0})}function a(d){if(d.error){e(),r(d.error);return}d.status==="UPTODATE"&&(e(),t({shouldUpdate:!1}))}k("tauri://update-available",d=>{s(d?.payload)}).catch(d=>{throw e(),d}),j(a).then(d=>{n=d}).catch(d=>{throw e(),d}),E("tauri://update").catch(d=>{throw e(),d})})}var Q={};c(Q,{CloseRequestedEvent:()=>S,LogicalPosition:()=>W,LogicalSize:()=>M,PhysicalPosition:()=>b,PhysicalSize:()=>f,UserAttentionType:()=>ne,WebviewWindow:()=>m,WebviewWindowHandle:()=>D,WindowManager:()=>x,appWindow:()=>J,availableMonitors:()=>lt,currentMonitor:()=>at,getAll:()=>ie,getCurrent:()=>st,primaryMonitor:()=>ot});var M=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},f=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new M(this.width/e,this.height/e)}},W=class{constructor(e,t){this.type="Logical";this.x=e,this.y=t}},b=class{constructor(e,t){this.type="Physical";this.x=e,this.y=t}toLogical(e){return new W(this.x/e,this.y/e)}},ne=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(ne||{});function st(){return new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function ie(){return window.__TAURI_METADATA__.__windows.map(n=>new m(n.label,{skip:!0}))}var te=["tauri://created","tauri://error"],D=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):w(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):v(e,this.label,t)}async emit(e,t){if(te.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return _(e,this.label,t)}_handleTauriEvent(e,t){return te.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},x=class extends D{async scaleFactor(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new f(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new f(e,t))}async isFullscreen(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return i({__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"}),i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return i({__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 i({__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 i({__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 i({__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 i({__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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return i({__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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return i({__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 i({__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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let r=new S(t);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),r=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{t(),r()}}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",a=>{e({...a,payload:{type:"drop",paths:a.payload}})}),r=await this.listen("tauri://file-drop-hover",a=>{e({...a,payload:{type:"hover",paths:a.payload}})}),s=await this.listen("tauri://file-drop-cancelled",a=>{e({...a,payload:{type:"cancel"}})});return()=>{t(),r(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},S=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},m=class extends x{constructor(e,t={}){super(e),t?.skip||i({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return ie().some(t=>t.label===e)?new m(e,{skip:!0}):null}},J;"__TAURI_METADATA__"in window?J=new m(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.`),J=new m("main",{skip:!0}));function K(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:new b(n.position.x,n.position.y),size:new f(n.size.width,n.size.height)}}async function at(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(K)}async function ot(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(K)}async function lt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(K))}var Z={};c(Z,{EOL:()=>dt,arch:()=>pt,platform:()=>ut,tempdir:()=>yt,type:()=>mt,version:()=>ct});var dt=P()?`\r +"use strict";var __TAURI_IIFE__=(()=>{var D=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var t in e)D(n,t,{get:e[t],enumerable:!0})},ee=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of X(e))!B.call(n,s)&&s!==t&&D(n,s,{get:()=>e[s],enumerable:!(r=J(e,s))||r.enumerable});return n};var te=n=>ee(D({},"__esModule",{value:!0}),n);var lt={};c(lt,{app:()=>S,event:()=>k,invoke:()=>ot,notification:()=>N,os:()=>$,path:()=>I,process:()=>R,shell:()=>F,tauri:()=>x,updater:()=>V,window:()=>j});var S={};c(S,{getName:()=>ae,getTauriVersion:()=>se,getVersion:()=>re,hide:()=>le,show:()=>oe});var x={};c(x,{convertFileSrc:()=>ie,invoke:()=>o,transformCallback:()=>p});function ne(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function p(n,e=!1){let t=ne(),r=`_${t}`;return Object.defineProperty(window,r,{value:s=>(e&&Reflect.deleteProperty(window,r),n?.(s)),writable:!1,configurable:!0}),t}async function o(n,e={}){return new Promise((t,r)=>{let s=p(d=>{t(d),Reflect.deleteProperty(window,`_${l}`)},!0),l=p(d=>{r(d),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:l,...e})})}function ie(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return o("tauri",n)}async function re(){return i({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function ae(){return i({__tauriModule:"App",message:{cmd:"getAppName"}})}async function se(){return i({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function oe(){return i({__tauriModule:"App",message:{cmd:"show"}})}async function le(){return i({__tauriModule:"App",message:{cmd:"hide"}})}var k={};c(k,{TauriEvent:()=>v,emit:()=>E,listen:()=>L,once:()=>U});async function q(n,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:n,eventId:e}})}async function w(n,e,t){await i({__tauriModule:"Event",message:{cmd:"emit",event:n,windowLabel:e,payload:t}})}async function f(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:p(t)}}).then(r=>async()=>q(n,r))}async function P(n,e,t){return f(n,e,r=>{t(r),q(n,r.id).catch(()=>{})})}var v=(u=>(u.WINDOW_RESIZED="tauri://resize",u.WINDOW_MOVED="tauri://move",u.WINDOW_CLOSE_REQUESTED="tauri://close-requested",u.WINDOW_CREATED="tauri://window-created",u.WINDOW_DESTROYED="tauri://destroyed",u.WINDOW_FOCUS="tauri://focus",u.WINDOW_BLUR="tauri://blur",u.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",u.WINDOW_THEME_CHANGED="tauri://theme-changed",u.WINDOW_FILE_DROP="tauri://file-drop",u.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",u.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",u.MENU="tauri://menu",u.CHECK_UPDATE="tauri://update",u.UPDATE_AVAILABLE="tauri://update-available",u.INSTALL_UPDATE="tauri://update-install",u.STATUS_UPDATE="tauri://update-status",u.DOWNLOAD_PROGRESS="tauri://update-download-progress",u))(v||{});async function L(n,e){return f(n,null,e)}async function U(n,e){return P(n,null,e)}async function E(n,e){return w(n,void 0,e)}var N={};c(N,{isPermissionGranted:()=>ue,requestPermission:()=>ce,sendNotification:()=>me});async function ue(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):i({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function ce(){return window.Notification.requestPermission()}function me(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}var I={};c(I,{BaseDirectory:()=>K,appCacheDir:()=>he,appConfigDir:()=>pe,appDataDir:()=>ge,appLocalDataDir:()=>ye,appLogDir:()=>ke,audioDir:()=>be,basename:()=>Ge,cacheDir:()=>fe,configDir:()=>_e,dataDir:()=>we,delimiter:()=>Ie,desktopDir:()=>Pe,dirname:()=>Ve,documentDir:()=>ve,downloadDir:()=>Ee,executableDir:()=>Oe,extname:()=>He,fontDir:()=>We,homeDir:()=>Me,isAbsolute:()=>je,join:()=>ze,localDataDir:()=>Ce,normalize:()=>Fe,pictureDir:()=>Ae,publicDir:()=>Te,resolve:()=>Re,resolveResource:()=>xe,resourceDir:()=>De,runtimeDir:()=>Se,sep:()=>Ne,templateDir:()=>Le,videoDir:()=>Ue});function _(){return navigator.appVersion.includes("Win")}var K=(a=>(a[a.Audio=1]="Audio",a[a.Cache=2]="Cache",a[a.Config=3]="Config",a[a.Data=4]="Data",a[a.LocalData=5]="LocalData",a[a.Document=6]="Document",a[a.Download=7]="Download",a[a.Picture=8]="Picture",a[a.Public=9]="Public",a[a.Video=10]="Video",a[a.Resource=11]="Resource",a[a.Temp=12]="Temp",a[a.AppConfig=13]="AppConfig",a[a.AppData=14]="AppData",a[a.AppLocalData=15]="AppLocalData",a[a.AppCache=16]="AppCache",a[a.AppLog=17]="AppLog",a[a.Desktop=18]="Desktop",a[a.Executable=19]="Executable",a[a.Font=20]="Font",a[a.Home=21]="Home",a[a.Runtime=22]="Runtime",a[a.Template=23]="Template",a))(K||{});async function pe(){return o("plugin:path|resolve_directory",{directory:13})}async function ge(){return o("plugin:path|resolve_directory",{directory:14})}async function ye(){return o("plugin:path|resolve_directory",{directory:15})}async function he(){return o("plugin:path|resolve_directory",{directory:16})}async function be(){return o("plugin:path|resolve_directory",{directory:1})}async function fe(){return o("plugin:path|resolve_directory",{directory:2})}async function _e(){return o("plugin:path|resolve_directory",{directory:3})}async function we(){return o("plugin:path|resolve_directory",{directory:4})}async function Pe(){return o("plugin:path|resolve_directory",{directory:18})}async function ve(){return o("plugin:path|resolve_directory",{directory:6})}async function Ee(){return o("plugin:path|resolve_directory",{directory:7})}async function Oe(){return o("plugin:path|resolve_directory",{directory:19})}async function We(){return o("plugin:path|resolve_directory",{directory:20})}async function Me(){return o("plugin:path|resolve_directory",{directory:21})}async function Ce(){return o("plugin:path|resolve_directory",{directory:5})}async function Ae(){return o("plugin:path|resolve_directory",{directory:8})}async function Te(){return o("plugin:path|resolve_directory",{directory:9})}async function De(){return o("plugin:path|resolve_directory",{directory:11})}async function xe(n){return o("plugin:path|resolve_directory",{directory:11,path:n})}async function Se(){return o("plugin:path|resolve_directory",{directory:22})}async function Le(){return o("plugin:path|resolve_directory",{directory:23})}async function Ue(){return o("plugin:path|resolve_directory",{directory:10})}async function ke(){return o("plugin:path|resolve_directory",{directory:17})}var Ne=_()?"\\":"/",Ie=_()?";":":";async function Re(...n){return o("plugin:path|resolve",{paths:n})}async function Fe(n){return o("plugin:path|normalize",{path:n})}async function ze(...n){return o("plugin:path|join",{paths:n})}async function Ve(n){return o("plugin:path|dirname",{path:n})}async function He(n){return o("plugin:path|extname",{path:n})}async function Ge(n,e){return o("plugin:path|basename",{path:n,ext:e})}async function je(n){return o("plugin:path|isAbsolute",{path:n})}var R={};c(R,{exit:()=>$e,relaunch:()=>qe});async function $e(n=0){return i({__tauriModule:"Process",message:{cmd:"exit",exitCode:n}})}async function qe(){return i({__tauriModule:"Process",message:{cmd:"relaunch"}})}var F={};c(F,{Child:()=>O,Command:()=>y,EventEmitter:()=>g,open:()=>Qe});async function Ke(n,e,t=[],r){return typeof t=="object"&&Object.freeze(t),i({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:t,options:r,onEventFn:p(n)}})}var g=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.addListener(e,r)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(r=>r!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let r=this.eventListeners[e];for(let s of r)s(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.prependListener(e,r)}},O=class{constructor(e){this.pid=e}async write(e){return i({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return i({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},y=class extends g{constructor(t,r=[],s){super();this.stdout=new g;this.stderr=new g;this.program=t,this.args=typeof r=="string"?[r]:r,this.options=s??{}}static create(t,r=[],s){return new y(t,r,s)}static sidecar(t,r=[],s){let l=new y(t,r,s);return l.options.sidecar=!0,l}async spawn(){return Ke(t=>{switch(t.event){case"Error":this.emit("error",t.payload);break;case"Terminated":this.emit("close",t.payload);break;case"Stdout":this.stdout.emit("data",t.payload);break;case"Stderr":this.stderr.emit("data",t.payload);break}},this.program,this.args,this.options).then(t=>new O(t))}async execute(){return new Promise((t,r)=>{this.on("error",r);let s=[],l=[];this.stdout.on("data",d=>{s.push(d)}),this.stderr.on("data",d=>{l.push(d)}),this.on("close",d=>{t({code:d.code,signal:d.signal,stdout:this.collectOutput(s),stderr:this.collectOutput(l)})}),this.spawn().catch(r)})}collectOutput(t){return this.options.encoding==="raw"?t.reduce((r,s)=>new Uint8Array([...r,...s,10]),new Uint8Array):t.join(` +`)}};async function Qe(n,e){return i({__tauriModule:"Shell",message:{cmd:"open",path:n,with:e}})}var V={};c(V,{checkUpdate:()=>Ye,installUpdate:()=>Ze,onUpdaterEvent:()=>z});async function z(n){return L("tauri://update-status",e=>{n(e?.payload)})}async function Ze(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(l){if(l.error){e(),r(l.error);return}l.status==="DONE"&&(e(),t())}z(s).then(l=>{n=l}).catch(l=>{throw e(),l}),E("tauri://update-install").catch(l=>{throw e(),l})})}async function Ye(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(d){e(),t({manifest:d,shouldUpdate:!0})}function l(d){if(d.error){e(),r(d.error);return}d.status==="UPTODATE"&&(e(),t({shouldUpdate:!1}))}U("tauri://update-available",d=>{s(d?.payload)}).catch(d=>{throw e(),d}),z(l).then(d=>{n=d}).catch(d=>{throw e(),d}),E("tauri://update").catch(d=>{throw e(),d})})}var j={};c(j,{CloseRequestedEvent:()=>T,LogicalPosition:()=>M,LogicalSize:()=>W,PhysicalPosition:()=>b,PhysicalSize:()=>h,UserAttentionType:()=>Z,WebviewWindow:()=>m,WebviewWindowHandle:()=>C,WindowManager:()=>A,appWindow:()=>H,availableMonitors:()=>et,currentMonitor:()=>Xe,getAll:()=>Y,getCurrent:()=>Je,primaryMonitor:()=>Be});var W=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},h=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new W(this.width/e,this.height/e)}},M=class{constructor(e,t){this.type="Logical";this.x=e,this.y=t}},b=class{constructor(e,t){this.type="Physical";this.x=e,this.y=t}toLogical(e){return new M(this.x/e,this.y/e)}},Z=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(Z||{});function Je(){return new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Y(){return window.__TAURI_METADATA__.__windows.map(n=>new m(n.label,{skip:!0}))}var Q=["tauri://created","tauri://error"],C=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):f(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):P(e,this.label,t)}async emit(e,t){if(Q.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return w(e,this.label,t)}_handleTauriEvent(e,t){return Q.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},A=class extends C{async scaleFactor(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new h(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new h(e,t))}async isFullscreen(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return i({__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"}),i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return i({__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 i({__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 i({__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 i({__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 i({__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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return i({__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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return i({__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 i({__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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let r=new T(t);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),r=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{t(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),r=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),s=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),r(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},T=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}},m=class extends A{constructor(e,t={}){super(e),t?.skip||i({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return Y().some(t=>t.label===e)?new m(e,{skip:!0}):null}},H;"__TAURI_METADATA__"in window?H=new m(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.`),H=new m("main",{skip:!0}));function G(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:new b(n.position.x,n.position.y),size:new h(n.size.width,n.size.height)}}async function Xe(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(G)}async function Be(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(G)}async function et(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(G))}var $={};c($,{EOL:()=>tt,arch:()=>at,platform:()=>nt,tempdir:()=>st,type:()=>rt,version:()=>it});var tt=_()?`\r `:` -`;async function ut(){return i({__tauriModule:"Os",message:{cmd:"platform"}})}async function ct(){return i({__tauriModule:"Os",message:{cmd:"version"}})}async function mt(){return i({__tauriModule:"Os",message:{cmd:"osType"}})}async function pt(){return i({__tauriModule:"Os",message:{cmd:"arch"}})}async function yt(){return i({__tauriModule:"Os",message:{cmd:"tempdir"}})}var gt=l;return le(ht);})(); +`;async function nt(){return i({__tauriModule:"Os",message:{cmd:"platform"}})}async function it(){return i({__tauriModule:"Os",message:{cmd:"version"}})}async function rt(){return i({__tauriModule:"Os",message:{cmd:"osType"}})}async function at(){return i({__tauriModule:"Os",message:{cmd:"arch"}})}async function st(){return i({__tauriModule:"Os",message:{cmd:"tempdir"}})}var ot=o;return te(lt);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/api/error.rs b/core/tauri/src/api/error.rs index 4457c6356bf..c1db7a094ab 100644 --- a/core/tauri/src/api/error.rs +++ b/core/tauri/src/api/error.rs @@ -24,16 +24,13 @@ pub enum Error { /// The network error. #[error("Network Error: {0}")] Network(#[from] reqwest::Error), - /// HTTP method error. - #[error(transparent)] - HttpMethod(#[from] http::method::InvalidMethod), /// Invalid HTTP header value. #[error(transparent)] HttpHeaderValue(#[from] http::header::InvalidHeaderValue), /// Invalid HTTP header value. #[error(transparent)] HttpHeader(#[from] http::header::InvalidHeaderName), - /// Failed to serialize header value as string. + /// Failed to convert bytes to string. #[error(transparent)] Utf8(#[from] std::string::FromUtf8Error), /// HTTP form to must be an object. diff --git a/core/tauri/src/api/http.rs b/core/tauri/src/api/http.rs deleted file mode 100644 index 3f7b9d45f27..00000000000 --- a/core/tauri/src/api/http.rs +++ /dev/null @@ -1,542 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -//! Types and functions related to HTTP request. - -use http::Method; -pub use http::StatusCode; -use serde::{Deserialize, Deserializer, Serialize}; -use serde_json::Value; -use serde_repr::{Deserialize_repr, Serialize_repr}; -use url::Url; - -use std::{collections::HashMap, path::PathBuf, time::Duration}; - -pub use reqwest::header; - -use header::{HeaderName, HeaderValue}; - -#[derive(Deserialize)] -#[serde(untagged)] -enum SerdeDuration { - Seconds(u64), - Duration(Duration), -} - -fn deserialize_duration<'de, D: Deserializer<'de>>( - deserializer: D, -) -> Result, D::Error> { - if let Some(duration) = Option::::deserialize(deserializer)? { - Ok(Some(match duration { - SerdeDuration::Seconds(s) => Duration::from_secs(s), - SerdeDuration::Duration(d) => d, - })) - } else { - Ok(None) - } -} - -/// The builder of [`Client`]. -#[derive(Debug, Clone, Default, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct ClientBuilder { - /// Max number of redirections to follow. - pub max_redirections: Option, - /// Connect timeout for the request. - #[serde(deserialize_with = "deserialize_duration", default)] - pub connect_timeout: Option, -} - -impl ClientBuilder { - /// Creates a new client builder with the default options. - pub fn new() -> Self { - Default::default() - } - - /// Sets the maximum number of redirections. - #[must_use] - pub fn max_redirections(mut self, max_redirections: usize) -> Self { - self.max_redirections = Some(max_redirections); - self - } - - /// Sets the connection timeout. - #[must_use] - pub fn connect_timeout(mut self, connect_timeout: Duration) -> Self { - self.connect_timeout.replace(connect_timeout); - self - } - - /// Builds the Client. - pub fn build(self) -> crate::api::Result { - let mut client_builder = reqwest::Client::builder(); - - if let Some(max_redirections) = self.max_redirections { - client_builder = client_builder.redirect(if max_redirections == 0 { - reqwest::redirect::Policy::none() - } else { - reqwest::redirect::Policy::limited(max_redirections) - }); - } - - if let Some(connect_timeout) = self.connect_timeout { - client_builder = client_builder.connect_timeout(connect_timeout); - } - - let client = client_builder.build()?; - Ok(Client(client)) - } -} - -/// The HTTP client based on [`reqwest`]. -#[derive(Debug, Clone)] -pub struct Client(reqwest::Client); - -impl Client { - /// Executes an HTTP request - /// - /// # Examples - pub async fn send(&self, mut request: HttpRequestBuilder) -> crate::api::Result { - let method = Method::from_bytes(request.method.to_uppercase().as_bytes())?; - - let mut request_builder = self.0.request(method, request.url.as_str()); - - if let Some(query) = request.query { - request_builder = request_builder.query(&query); - } - - if let Some(timeout) = request.timeout { - request_builder = request_builder.timeout(timeout); - } - - if let Some(body) = request.body { - request_builder = match body { - Body::Bytes(data) => request_builder.body(bytes::Bytes::from(data)), - Body::Text(text) => request_builder.body(bytes::Bytes::from(text)), - Body::Json(json) => request_builder.json(&json), - Body::Form(form_body) => { - #[allow(unused_variables)] - fn send_form( - request_builder: reqwest::RequestBuilder, - headers: &mut Option, - form_body: FormBody, - ) -> crate::api::Result { - #[cfg(feature = "http-multipart")] - if matches!( - headers - .as_ref() - .and_then(|h| h.0.get("content-type")) - .map(|v| v.as_bytes()), - Some(b"multipart/form-data") - ) { - // the Content-Type header will be set by reqwest in the `.multipart` call - headers.as_mut().map(|h| h.0.remove("content-type")); - let mut multipart = reqwest::multipart::Form::new(); - - for (name, part) in form_body.0 { - let part = match part { - FormPart::File { - file, - mime, - file_name, - } => { - let bytes: Vec = file.try_into()?; - let mut part = reqwest::multipart::Part::bytes(bytes); - if let Some(mime) = mime { - part = part.mime_str(&mime)?; - } - if let Some(file_name) = file_name { - part = part.file_name(file_name); - } - part - } - FormPart::Text(value) => reqwest::multipart::Part::text(value), - }; - - multipart = multipart.part(name, part); - } - - return Ok(request_builder.multipart(multipart)); - } - - let mut form = Vec::new(); - for (name, part) in form_body.0 { - match part { - FormPart::File { file, .. } => { - let bytes: Vec = file.try_into()?; - form.push((name, serde_json::to_string(&bytes)?)) - } - FormPart::Text(value) => form.push((name, value)), - } - } - Ok(request_builder.form(&form)) - } - send_form(request_builder, &mut request.headers, form_body)? - } - }; - } - - if let Some(headers) = request.headers { - request_builder = request_builder.headers(headers.0); - } - - let http_request = request_builder.build()?; - - let response = self.0.execute(http_request).await?; - - Ok(Response( - request.response_type.unwrap_or(ResponseType::Json), - response, - )) - } -} - -#[derive(Serialize_repr, Deserialize_repr, Clone, Debug)] -#[repr(u16)] -#[non_exhaustive] -/// The HTTP response type. -pub enum ResponseType { - /// Read the response as JSON - Json = 1, - /// Read the response as text - Text, - /// Read the response as binary - Binary, -} - -/// A file path or contents. -#[derive(Debug, Clone, Deserialize)] -#[serde(untagged)] -#[non_exhaustive] -pub enum FilePart { - /// File path. - Path(PathBuf), - /// File contents. - Contents(Vec), -} - -impl TryFrom for Vec { - type Error = crate::api::Error; - fn try_from(file: FilePart) -> crate::api::Result { - let bytes = match file { - FilePart::Path(path) => std::fs::read(path)?, - FilePart::Contents(bytes) => bytes, - }; - Ok(bytes) - } -} - -/// [`FormBody`] data types. -#[derive(Debug, Deserialize)] -#[serde(untagged)] -#[non_exhaustive] -pub enum FormPart { - /// A string value. - Text(String), - /// A file value. - #[serde(rename_all = "camelCase")] - File { - /// File path or content. - file: FilePart, - /// Mime type of this part. - /// Only used when the `Content-Type` header is set to `multipart/form-data`. - mime: Option, - /// File name. - /// Only used when the `Content-Type` header is set to `multipart/form-data`. - file_name: Option, - }, -} - -/// Form body definition. -#[derive(Debug, Deserialize)] -pub struct FormBody(pub(crate) HashMap); - -impl FormBody { - /// Creates a new form body. - pub fn new(data: HashMap) -> Self { - Self(data) - } -} - -/// A body for the request. -#[derive(Debug, Deserialize)] -#[serde(tag = "type", content = "payload")] -#[non_exhaustive] -pub enum Body { - /// A form body. - Form(FormBody), - /// A JSON body. - Json(Value), - /// A text string body. - Text(String), - /// A byte array body. - Bytes(Vec), -} - -/// A set of HTTP headers. -#[derive(Debug, Default)] -pub struct HeaderMap(header::HeaderMap); - -impl<'de> Deserialize<'de> for HeaderMap { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let map = HashMap::::deserialize(deserializer)?; - let mut headers = header::HeaderMap::default(); - for (key, value) in map { - if let (Ok(key), Ok(value)) = ( - header::HeaderName::from_bytes(key.as_bytes()), - header::HeaderValue::from_str(&value), - ) { - headers.insert(key, value); - } else { - return Err(serde::de::Error::custom(format!( - "invalid header `{key}` `{value}`" - ))); - } - } - Ok(Self(headers)) - } -} - -/// The builder for a HTTP request. -/// -/// # Examples -/// ```rust,no_run -/// use tauri::api::http::{HttpRequestBuilder, ResponseType, ClientBuilder}; -/// async fn run() { -/// let client = ClientBuilder::new() -/// .max_redirections(3) -/// .build() -/// .unwrap(); -/// let request = HttpRequestBuilder::new("GET", "http://example.com").unwrap() -/// .response_type(ResponseType::Text); -/// if let Ok(response) = client.send(request).await { -/// println!("got response"); -/// } else { -/// println!("Something Happened!"); -/// } -/// } -/// ``` -#[derive(Debug, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct HttpRequestBuilder { - /// The request method (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, CONNECT or TRACE) - pub method: String, - /// The request URL - pub url: Url, - /// The request query params - pub query: Option>, - /// The request headers - pub headers: Option, - /// The request body - pub body: Option, - /// Timeout for the whole request - #[serde(deserialize_with = "deserialize_duration", default)] - pub timeout: Option, - /// The response type (defaults to Json) - pub response_type: Option, -} - -impl HttpRequestBuilder { - /// Initializes a new instance of the HttpRequestrequest_builder. - pub fn new(method: impl Into, url: impl AsRef) -> crate::api::Result { - Ok(Self { - method: method.into(), - url: Url::parse(url.as_ref())?, - query: None, - headers: None, - body: None, - timeout: None, - response_type: None, - }) - } - - /// Sets the request parameters. - #[must_use] - pub fn query(mut self, query: HashMap) -> Self { - self.query = Some(query); - self - } - - /// Adds a header. - pub fn header(mut self, key: K, value: V) -> crate::api::Result - where - HeaderName: TryFrom, - >::Error: Into, - HeaderValue: TryFrom, - >::Error: Into, - { - let key: Result = key.try_into().map_err(Into::into); - let value: Result = value.try_into().map_err(Into::into); - self - .headers - .get_or_insert_with(Default::default) - .0 - .insert(key?, value?); - Ok(self) - } - - /// Sets the request headers. - #[must_use] - pub fn headers(mut self, headers: header::HeaderMap) -> Self { - self.headers.replace(HeaderMap(headers)); - self - } - - /// Sets the request body. - #[must_use] - pub fn body(mut self, body: Body) -> Self { - self.body = Some(body); - self - } - - /// Sets the general request timeout. - #[must_use] - pub fn timeout(mut self, timeout: Duration) -> Self { - self.timeout.replace(timeout); - self - } - - /// Sets the type of the response. Interferes with the way we read the response. - #[must_use] - pub fn response_type(mut self, response_type: ResponseType) -> Self { - self.response_type = Some(response_type); - self - } -} - -/// The HTTP response. -#[derive(Debug)] -pub struct Response(ResponseType, reqwest::Response); - -impl Response { - /// Get the [`StatusCode`] of this Response. - pub fn status(&self) -> StatusCode { - self.1.status() - } - - /// Get the headers of this Response. - pub fn headers(&self) -> &header::HeaderMap { - self.1.headers() - } - - /// Reads the response as raw bytes. - pub async fn bytes(self) -> crate::api::Result { - let status = self.status().as_u16(); - let data = self.1.bytes().await?.to_vec(); - Ok(RawResponse { status, data }) - } - - // Convert the response into a Stream of [`bytes::Bytes`] from the body. - // - // # Examples - // - // ```no_run - // use futures_util::StreamExt; - // - // # async fn run() -> Result<(), Box> { - // let client = tauri::api::http::ClientBuilder::new().build()?; - // let mut stream = client.send(tauri::api::http::HttpRequestBuilder::new("GET", "http://httpbin.org/ip")?) - // .await? - // .bytes_stream(); - // - // while let Some(item) = stream.next().await { - // println!("Chunk: {:?}", item?); - // } - // # Ok(()) - // # } - // ``` - #[allow(dead_code)] - pub(crate) fn bytes_stream( - self, - ) -> impl futures_util::Stream> { - use futures_util::StreamExt; - self.1.bytes_stream().map(|res| res.map_err(Into::into)) - } - - /// Reads the response. - /// - /// Note that the body is serialized to a [`Value`]. - pub async fn read(self) -> crate::api::Result { - let url = self.1.url().clone(); - - let mut headers = HashMap::new(); - let mut raw_headers = HashMap::new(); - for (name, value) in self.1.headers() { - headers.insert( - name.as_str().to_string(), - String::from_utf8(value.as_bytes().to_vec())?, - ); - raw_headers.insert( - name.as_str().to_string(), - self - .1 - .headers() - .get_all(name) - .into_iter() - .map(|v| String::from_utf8(v.as_bytes().to_vec()).map_err(Into::into)) - .collect::>>()?, - ); - } - let status = self.1.status().as_u16(); - - let data = match self.0 { - ResponseType::Json => self.1.json().await?, - ResponseType::Text => Value::String(self.1.text().await?), - ResponseType::Binary => serde_json::to_value(&self.1.bytes().await?)?, - }; - - Ok(ResponseData { - url, - status, - headers, - raw_headers, - data, - }) - } -} - -/// A response with raw bytes. -#[non_exhaustive] -#[derive(Debug)] -pub struct RawResponse { - /// Response status code. - pub status: u16, - /// Response bytes. - pub data: Vec, -} - -/// The response data. -#[derive(Debug, Serialize)] -#[serde(rename_all = "camelCase")] -#[non_exhaustive] -pub struct ResponseData { - /// Response URL. Useful if it followed redirects. - pub url: Url, - /// Response status code. - pub status: u16, - /// Response headers. - pub headers: HashMap, - /// Response raw headers. - pub raw_headers: HashMap>, - /// Response data. - pub data: Value, -} - -#[cfg(test)] -mod test { - use super::ClientBuilder; - use quickcheck::{Arbitrary, Gen}; - - impl Arbitrary for ClientBuilder { - fn arbitrary(g: &mut Gen) -> Self { - Self { - max_redirections: Option::arbitrary(g), - connect_timeout: Option::arbitrary(g), - } - } - } -} diff --git a/core/tauri/src/api/mod.rs b/core/tauri/src/api/mod.rs index 55a61320252..f9333ca8c4a 100644 --- a/core/tauri/src/api/mod.rs +++ b/core/tauri/src/api/mod.rs @@ -6,9 +6,6 @@ pub mod dir; pub mod file; -#[cfg(feature = "http-api")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "http-api")))] -pub mod http; pub mod ipc; pub mod process; #[cfg(feature = "shell-open-api")] diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 92e186bcf51..b9dfa644ada 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -1462,8 +1462,6 @@ impl Builder { &app, &app.config().tauri.allowlist.protocol.asset_scope, )?, - #[cfg(http_request)] - http: crate::scope::HttpScope::for_http_api(&app.config().tauri.allowlist.http.scope), #[cfg(shell_scope)] shell: ShellScope::new(&app, shell_scope), }); diff --git a/core/tauri/src/endpoints.rs b/core/tauri/src/endpoints.rs index f46a547b402..5440ee02722 100644 --- a/core/tauri/src/endpoints.rs +++ b/core/tauri/src/endpoints.rs @@ -14,8 +14,6 @@ use std::sync::Arc; mod app; mod event; -#[cfg(http_any)] -mod http; mod notification; #[cfg(os_any)] mod operating_system; @@ -69,8 +67,6 @@ enum Module { Shell(shell::Cmd), Event(event::Cmd), Notification(notification::Cmd), - #[cfg(http_any)] - Http(http::Cmd), } impl Module { @@ -133,14 +129,6 @@ impl Module { .and_then(|r| r.json) .map_err(InvokeError::from_anyhow) }), - #[cfg(http_any)] - Self::Http(cmd) => resolver.respond_async(async move { - cmd - .run(context) - .await - .and_then(|r| r.json) - .map_err(InvokeError::from_anyhow) - }), } } } diff --git a/core/tauri/src/endpoints/http.rs b/core/tauri/src/endpoints/http.rs deleted file mode 100644 index 50df3f2a0b0..00000000000 --- a/core/tauri/src/endpoints/http.rs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -#![allow(unused_imports)] - -use super::InvokeContext; -use crate::Runtime; -use serde::Deserialize; -use tauri_macros::{command_enum, module_command_handler, CommandModule}; - -#[cfg(http_request)] -use std::{ - collections::HashMap, - sync::{Arc, Mutex}, -}; - -#[cfg(http_request)] -use crate::api::http::{ClientBuilder, HttpRequestBuilder, ResponseData}; -#[cfg(not(http_request))] -type ClientBuilder = (); -#[cfg(not(http_request))] -type HttpRequestBuilder = (); -#[cfg(not(http_request))] -#[allow(dead_code)] -type ResponseData = (); - -type ClientId = u32; -#[cfg(http_request)] -type ClientStore = Arc>>; - -#[cfg(http_request)] -fn clients() -> &'static ClientStore { - use once_cell::sync::Lazy; - static STORE: Lazy = Lazy::new(Default::default); - &STORE -} - -/// The API descriptor. -#[command_enum] -#[derive(Deserialize, CommandModule)] -#[cmd(async)] -#[serde(tag = "cmd", rename_all = "camelCase")] -pub enum Cmd { - /// Create a new HTTP client. - #[cmd(http_request, "http > request")] - CreateClient { options: Option }, - /// Drop a HTTP client. - #[cmd(http_request, "http > request")] - DropClient { client: ClientId }, - /// The HTTP request API. - #[cmd(http_request, "http > request")] - HttpRequest { - client: ClientId, - options: Box, - }, -} - -impl Cmd { - #[module_command_handler(http_request)] - async fn create_client( - _context: InvokeContext, - options: Option, - ) -> super::Result { - let client = options.unwrap_or_default().build()?; - let mut store = clients().lock().unwrap(); - let id = rand::random::(); - store.insert(id, client); - Ok(id) - } - - #[module_command_handler(http_request)] - async fn drop_client( - _context: InvokeContext, - client: ClientId, - ) -> super::Result<()> { - let mut store = clients().lock().unwrap(); - store.remove(&client); - Ok(()) - } - - #[module_command_handler(http_request)] - async fn http_request( - context: InvokeContext, - client_id: ClientId, - options: Box, - ) -> super::Result { - use crate::Manager; - let scopes = context.window.state::(); - if scopes.http.is_allowed(&options.url) { - let client = clients() - .lock() - .unwrap() - .get(&client_id) - .ok_or_else(|| crate::Error::HttpClientNotInitialized.into_anyhow())? - .clone(); - let options = *options; - if let Some(crate::api::http::Body::Form(form)) = &options.body { - for value in form.0.values() { - if let crate::api::http::FormPart::File { - file: crate::api::http::FilePart::Path(path), - .. - } = value - { - if crate::path::SafePathBuf::new(path.clone()).is_err() || !scopes.fs.is_allowed(path) { - return Err(crate::Error::PathNotAllowed(path.clone()).into_anyhow()); - } - } - } - } - let response = client.send(options).await?; - Ok(response.read().await?) - } else { - Err(crate::Error::UrlNotAllowed(options.url).into_anyhow()) - } - } -} - -#[cfg(test)] -mod tests { - use super::{ClientBuilder, ClientId}; - - #[tauri_macros::module_command_test(http_request, "http > request")] - #[quickcheck_macros::quickcheck] - fn create_client(options: Option) { - assert!(crate::async_runtime::block_on(super::Cmd::create_client( - crate::test::mock_invoke_context(), - options - )) - .is_ok()); - } - - #[tauri_macros::module_command_test(http_request, "http > request")] - #[quickcheck_macros::quickcheck] - fn drop_client(client_id: ClientId) { - crate::async_runtime::block_on(async move { - assert!( - super::Cmd::drop_client(crate::test::mock_invoke_context(), client_id) - .await - .is_ok() - ); - let id = super::Cmd::create_client(crate::test::mock_invoke_context(), None) - .await - .unwrap(); - assert!( - super::Cmd::drop_client(crate::test::mock_invoke_context(), id) - .await - .is_ok() - ); - }); - } -} diff --git a/core/tauri/src/error.rs b/core/tauri/src/error.rs index 7f5cde2fb5c..9e2e7173942 100644 --- a/core/tauri/src/error.rs +++ b/core/tauri/src/error.rs @@ -68,9 +68,6 @@ pub enum Error { /// Failed to load window icon. #[error("invalid icon: {0}")] InvalidIcon(std::io::Error), - /// Client with specified ID not found. - #[error("http client dropped or not initialized")] - HttpClientNotInitialized, /// API not whitelisted on tauri.conf.json #[error("'{0}' not in the allowlist (https://tauri.app/docs/api/config#tauri.allowlist)")] ApiNotAllowlisted(String), @@ -95,15 +92,9 @@ pub enum Error { /// Task join error. #[error(transparent)] JoinError(#[from] tokio::task::JoinError), - /// Path not allowed by the scope. - #[error("path not allowed on the configured scope: {0}")] - PathNotAllowed(PathBuf), /// The user did not allow sending notifications. #[error("sending notification was not allowed by the user")] NotificationNotAllowed, - /// URL not allowed by the scope. - #[error("url not allowed on the configured scope: {0}")] - UrlNotAllowed(url::Url), /// Sidecar not allowed by the configuration. #[error("sidecar not configured under `tauri.conf.json > tauri > bundle > externalBin`: {0}")] SidecarNotAllowed(PathBuf), diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 79ba8fa7b3f..ddb97afe53b 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -20,7 +20,6 @@ //! - **devtools**: Enables the developer tools (Web inspector) and [`Window::open_devtools`]. Enabled by default on debug builds. //! On macOS it uses private APIs, so you can't enable it if your app will be published to the App Store. //! - **shell-open-api**: Enables the [`api::shell`] module. -//! - **http-api**: Enables the [`api::http`] module. //! - **http-multipart**: Adds support to `multipart/form-data` requests. //! - **native-tls**: Provides TLS support to connect over HTTPS. //! - **native-tls-vendored**: Compile and statically link to a vendored copy of OpenSSL. @@ -976,7 +975,6 @@ mod tests { // features that look like an allowlist feature, but are not let allowed = [ "fs-extract-api", - "http-api", "http-multipart", "process-command-api", "process-relaunch-dangerous-allow-symlink-macos", diff --git a/core/tauri/src/scope/http.rs b/core/tauri/src/scope/http.rs deleted file mode 100644 index c2a49d2e455..00000000000 --- a/core/tauri/src/scope/http.rs +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use glob::Pattern; -use tauri_utils::config::HttpAllowlistScope; - -/// Scope for filesystem access. -#[derive(Debug, Clone)] -pub struct Scope { - allowed_urls: Vec, -} - -impl Scope { - /// Creates a new scope from the allowlist's `http` scope configuration. - #[allow(dead_code)] - pub(crate) fn for_http_api(scope: &HttpAllowlistScope) -> Self { - Self { - allowed_urls: scope - .0 - .iter() - .map(|url| { - glob::Pattern::new(url.as_str()) - .unwrap_or_else(|_| panic!("scoped URL is not a valid glob pattern: `{url}`")) - }) - .collect(), - } - } - - /// Determines if the given URL is allowed on this scope. - pub fn is_allowed(&self, url: &url::Url) -> bool { - self - .allowed_urls - .iter() - .any(|allowed| allowed.matches(url.as_str())) - } -} - -#[cfg(test)] -mod tests { - use tauri_utils::config::HttpAllowlistScope; - - #[test] - fn is_allowed() { - // plain URL - let scope = super::Scope::for_http_api(&HttpAllowlistScope(vec!["http://localhost:8080" - .parse() - .unwrap()])); - assert!(scope.is_allowed(&"http://localhost:8080".parse().unwrap())); - assert!(scope.is_allowed(&"http://localhost:8080/".parse().unwrap())); - - assert!(!scope.is_allowed(&"http://localhost:8080/file".parse().unwrap())); - assert!(!scope.is_allowed(&"http://localhost:8080/path/to/asset.png".parse().unwrap())); - assert!(!scope.is_allowed(&"https://localhost:8080".parse().unwrap())); - assert!(!scope.is_allowed(&"http://localhost:8081".parse().unwrap())); - assert!(!scope.is_allowed(&"http://local:8080".parse().unwrap())); - - // URL with fixed path - let scope = - super::Scope::for_http_api(&HttpAllowlistScope(vec!["http://localhost:8080/file.png" - .parse() - .unwrap()])); - - assert!(scope.is_allowed(&"http://localhost:8080/file.png".parse().unwrap())); - - assert!(!scope.is_allowed(&"http://localhost:8080".parse().unwrap())); - assert!(!scope.is_allowed(&"http://localhost:8080/file".parse().unwrap())); - assert!(!scope.is_allowed(&"http://localhost:8080/file.png/other.jpg".parse().unwrap())); - - // URL with glob pattern - let scope = - super::Scope::for_http_api(&HttpAllowlistScope(vec!["http://localhost:8080/*.png" - .parse() - .unwrap()])); - - assert!(scope.is_allowed(&"http://localhost:8080/file.png".parse().unwrap())); - assert!(scope.is_allowed(&"http://localhost:8080/assets/file.png".parse().unwrap())); - - assert!(!scope.is_allowed(&"http://localhost:8080/file.jpeg".parse().unwrap())); - - let scope = super::Scope::for_http_api(&HttpAllowlistScope(vec!["http://*".parse().unwrap()])); - - assert!(scope.is_allowed(&"http://something.else".parse().unwrap())); - assert!(!scope.is_allowed(&"http://something.else/path/to/file".parse().unwrap())); - assert!(!scope.is_allowed(&"https://something.else".parse().unwrap())); - - let scope = super::Scope::for_http_api(&HttpAllowlistScope(vec!["http://**".parse().unwrap()])); - - assert!(scope.is_allowed(&"http://something.else".parse().unwrap())); - assert!(scope.is_allowed(&"http://something.else/path/to/file".parse().unwrap())); - } -} diff --git a/core/tauri/src/scope/mod.rs b/core/tauri/src/scope/mod.rs index f0eaf5e5235..1f7a79a203a 100644 --- a/core/tauri/src/scope/mod.rs +++ b/core/tauri/src/scope/mod.rs @@ -3,11 +3,9 @@ // SPDX-License-Identifier: MIT mod fs; -mod http; #[cfg(shell_scope)] mod shell; -pub use self::http::Scope as HttpScope; pub use fs::{Event as FsScopeEvent, Pattern as GlobPattern, Scope as FsScope}; #[cfg(shell_scope)] pub use shell::{ @@ -21,8 +19,6 @@ pub(crate) struct Scopes { pub fs: FsScope, #[cfg(protocol_asset)] pub asset_protocol: FsScope, - #[cfg(http_request)] - pub http: HttpScope, #[cfg(shell_scope)] pub shell: ShellScope, } diff --git a/core/tauri/src/test/mod.rs b/core/tauri/src/test/mod.rs index f7972ac5bdc..f31789c49e3 100644 --- a/core/tauri/src/test/mod.rs +++ b/core/tauri/src/test/mod.rs @@ -90,6 +90,7 @@ pub fn mock_app() -> crate::App { app } +#[allow(dead_code)] pub(crate) fn mock_invoke_context() -> crate::endpoints::InvokeContext { let app = mock_app(); crate::endpoints::InvokeContext { diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index 6fda9c64807..a69621392af 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -5,17 +5,15 @@ use super::error::{Error, Result}; #[cfg(desktop)] use crate::api::file::{ArchiveFormat, Extract, Move}; -use crate::{ - api::http::{ClientBuilder, HttpRequestBuilder}, - AppHandle, Manager, Runtime, -}; +use crate::{AppHandle, Manager, Runtime}; use base64::Engine; use futures_util::StreamExt; use http::{ header::{HeaderName, HeaderValue}, - HeaderMap, StatusCode, + HeaderMap, Method, StatusCode, }; use minisign_verify::{PublicKey, Signature}; +use reqwest::ClientBuilder; use semver::Version; use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize}; use tauri_utils::{platform::current_exe, Env}; @@ -375,15 +373,17 @@ impl UpdateBuilder { .replace("{{target}}", &target) .replace("{{arch}}", arch); - let mut request = HttpRequestBuilder::new("GET", &fixed_link)?.headers(headers.clone()); + let client = ClientBuilder::new().build()?; + let mut request = client + .request(Method::GET, &fixed_link) + .headers(headers.clone()); if let Some(timeout) = self.timeout { request = request.timeout(timeout); } - let resp = ClientBuilder::new().build()?.send(request).await; // If we got a success, we stop the loop // and we set our remote_release variable - if let Ok(res) = resp { + if let Ok(res) = request.send().await { let status = res.status(); // got status code 2XX if status.is_success() { @@ -393,9 +393,9 @@ impl UpdateBuilder { // we should catch on the client return Err(Error::UpToDate); }; - let res = res.read().await?; + let data = res.bytes().await?; // Convert the remote result to our local struct - let built_release = serde_json::from_value(res.data).map_err(Into::into); + let built_release = serde_json::from_slice(&data).map_err(Into::into); // make sure all went well and the remote data is compatible // with what we need locally match built_release { @@ -538,19 +538,18 @@ impl Update { let client = ClientBuilder::new().build()?; // Create our request - let mut req = HttpRequestBuilder::new("GET", self.download_url.as_str())?.headers(headers); + let mut req = client + .request(Method::GET, self.download_url.clone()) + .headers(headers); if let Some(timeout) = self.timeout { req = req.timeout(timeout); } - let response = client.send(req).await?; + let response = req.send().await?; // make sure it's success if !response.status().is_success() { - return Err(Error::Network(format!( - "Download request failed with status: {}", - response.status() - ))); + return Err(Error::DownloadFailed(response.status())); } let content_length: Option = response diff --git a/core/tauri/src/updater/error.rs b/core/tauri/src/updater/error.rs index b94ad0dda42..a8874e7607e 100644 --- a/core/tauri/src/updater/error.rs +++ b/core/tauri/src/updater/error.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +use http::StatusCode; use thiserror::Error; /// All errors that can occur while running the updater. @@ -30,8 +31,14 @@ pub enum Error { #[error("Tauri API error: {0}")] TauriApi(#[from] crate::api::Error), /// Network error. + #[error("Download request failed with status: {0}")] + DownloadFailed(StatusCode), + /// Network error. #[error("Network error: {0}")] - Network(String), + Network(#[from] reqwest::Error), + /// Failed to serialize header value as string. + #[error(transparent)] + Utf8(#[from] std::string::FromUtf8Error), /// Could not fetch a valid response from the server. #[error("Could not fetch a valid release JSON from the remote")] ReleaseNotFound, diff --git a/examples/api/dist/assets/index.css b/examples/api/dist/assets/index.css index 1925e615159..c4527ce9d18 100644 --- a/examples/api/dist/assets/index.css +++ b/examples/api/dist/assets/index.css @@ -1 +1 @@ -*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v21/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v26/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-bell-dot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M12.994 7.875A4.008 4.008 0 0 1 12 8h-.01v.217c0 .909.143 1.818.442 2.691l.371 1.113h-9.63v-.012l.37-1.113a8.633 8.633 0 0 0 .443-2.691V6.004c0-.563.12-1.113.347-1.616c.227-.514.55-.969.969-1.34c.419-.382.91-.67 1.436-.837c.538-.18 1.1-.24 1.65-.18l.12.018a4 4 0 0 1 .673-.887a5.15 5.15 0 0 0-.697-.135c-.694-.072-1.4 0-2.07.227c-.67.215-1.28.574-1.794 1.053a4.923 4.923 0 0 0-1.208 1.675a5.067 5.067 0 0 0-.431 2.022v2.2a7.61 7.61 0 0 1-.383 2.37L2 12.343l.479.658h3.505c0 .526.215 1.04.586 1.412c.37.37.885.586 1.412.586c.526 0 1.04-.215 1.411-.586s.587-.886.587-1.412h3.505l.478-.658l-.586-1.77a7.63 7.63 0 0 1-.383-2.381v-.318ZM7.982 14.02a.997.997 0 0 0 .706-.3a.939.939 0 0 0 .287-.705H6.977c0 .263.107.514.299.706a.999.999 0 0 0 .706.299Z' clip-rule='evenodd'/%3E%3Cpath d='M12 7a3 3 0 1 0 0-6a3 3 0 0 0 0 6Z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-maximize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 3v10h10V3H3zm9 9H4V4h8v8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-minimize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14 8v1H3V8h11z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-restore{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M3 5v9h9V5H3zm8 8H4V6h7v7z'/%3E%3Cpath fill-rule='evenodd' d='M5 5h1V4h7v7h-1v1h2V3H5v2z' clip-rule='evenodd'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-clippy{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M7 13.992H4v-9h8v2h1v-2.5l-.5-.5H11v-1h-1a2 2 0 0 0-4 0H4.94v1H3.5l-.5.5v10l.5.5H7v-1zm0-11.2a1 1 0 0 1 .8-.8a1 1 0 0 1 .58.06a.94.94 0 0 1 .45.36a1 1 0 1 1-1.75.94a1 1 0 0 1-.08-.56zm7.08 9.46L13 13.342v-5.35h-1v5.34l-1.08-1.08l-.71.71l1.94 1.93h.71l1.93-1.93l-.71-.71zm-5.92-4.16h.71l1.93 1.93l-.71.71l-1.08-1.08v5.34h-1v-5.35l-1.08 1.09l-.71-.71l1.94-1.93z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m8 8.707l3.646 3.647l.708-.707L8.707 8l3.647-3.646l-.707-.708L8 7.293L4.354 3.646l-.707.708L7.293 8l-3.646 3.646l.707.708L8 8.707z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-cloud-download{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.957 6h.05a2.99 2.99 0 0 1 2.116.879a3.003 3.003 0 0 1 0 4.242a2.99 2.99 0 0 1-2.117.879v-1a2.002 2.002 0 0 0 0-4h-.914l-.123-.857a2.49 2.49 0 0 0-2.126-2.122A2.478 2.478 0 0 0 6.231 5.5l-.333.762l-.809-.189A2.49 2.49 0 0 0 4.523 6c-.662 0-1.297.263-1.764.732A2.503 2.503 0 0 0 4.523 11h.498v1h-.498a3.486 3.486 0 0 1-2.628-1.16a3.502 3.502 0 0 1 1.958-5.78a3.462 3.462 0 0 1 1.468.04a3.486 3.486 0 0 1 3.657-2.06A3.479 3.479 0 0 1 11.957 6zm-5.25 5.121l1.314 1.314V7h.994v5.4l1.278-1.279l.707.707l-2.146 2.147h-.708L6 11.829l.707-.708z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-hubot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M8.48 4h4l.5.5v2.03h.52l.5.5V8l-.5.5h-.52v3l-.5.5H9.36l-2.5 2.76L6 14.4V12H3.5l-.5-.64V8.5h-.5L2 8v-.97l.5-.5H3V4.36L3.53 4h4V2.86A1 1 0 0 1 7 2a1 1 0 0 1 2 0a1 1 0 0 1-.52.83V4zM12 8V5H4v5.86l2.5.14H7v2.19l1.8-2.04l.35-.15H12V8zm-2.12.51a2.71 2.71 0 0 1-1.37.74v-.01a2.71 2.71 0 0 1-2.42-.74l-.7.71c.34.34.745.608 1.19.79c.45.188.932.286 1.42.29a3.7 3.7 0 0 0 2.58-1.07l-.7-.71zM6.49 6.5h-1v1h1v-1zm3 0h1v1h-1v-1z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-menu{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-record-keys{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M14 3H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm0 8H3V4h11v7zm-3-6h-1v1h1V5zm-1 2H9v1h1V7zm2-2h1v1h-1V5zm1 4h-1v1h1V9zM6 9h5v1H6V9zm7-2h-2v1h2V7zM8 5h1v1H8V5zm0 2H7v1h1V7zM4 9h1v1H4V9zm0-4h1v1H4V5zm3 0H6v1h1V5zM4 7h2v1H4V7z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3 1.5L1.5 3v18L3 22.5h18l1.5-1.5V3L21 1.5H3zM3 21V3h18v18H3zm5.656-4.01l1.038 1.061l5.26-5.243v-.912l-5.26-5.26l-1.035 1.06l4.59 4.702l-4.593 4.592z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal-bash{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M13.655 3.56L8.918.75a1.785 1.785 0 0 0-1.82 0L2.363 3.56a1.889 1.889 0 0 0-.921 1.628v5.624a1.889 1.889 0 0 0 .913 1.627l4.736 2.812a1.785 1.785 0 0 0 1.82 0l4.736-2.812a1.888 1.888 0 0 0 .913-1.627V5.188a1.889 1.889 0 0 0-.904-1.627zm-3.669 8.781v.404a.149.149 0 0 1-.07.124l-.239.137c-.038.02-.07 0-.07-.053v-.396a.78.78 0 0 1-.545.053a.073.073 0 0 1-.027-.09l.086-.365a.153.153 0 0 1 .071-.096a.048.048 0 0 1 .038 0a.662.662 0 0 0 .497-.063a.662.662 0 0 0 .37-.567c0-.206-.112-.292-.384-.293c-.344 0-.661-.066-.67-.574A1.47 1.47 0 0 1 9.6 9.437V9.03a.147.147 0 0 1 .07-.126l.231-.147c.038-.02.07 0 .07.054v.409a.754.754 0 0 1 .453-.055a.073.073 0 0 1 .03.095l-.081.362a.156.156 0 0 1-.065.09a.055.055 0 0 1-.035 0a.6.6 0 0 0-.436.072a.549.549 0 0 0-.331.486c0 .185.098.242.425.248c.438 0 .627.199.632.639a1.568 1.568 0 0 1-.576 1.185zm2.481-.68a.094.094 0 0 1-.036.092l-1.198.727a.034.034 0 0 1-.04.003a.035.035 0 0 1-.016-.037v-.31a.086.086 0 0 1 .055-.076l1.179-.706a.035.035 0 0 1 .056.035v.273zm.827-6.914L8.812 7.515c-.559.331-.97.693-.97 1.367v5.52c0 .404.165.662.413.741a1.465 1.465 0 0 1-.248.025c-.264 0-.522-.072-.748-.207L2.522 12.15a1.558 1.558 0 0 1-.75-1.338V5.188a1.558 1.558 0 0 1 .75-1.34l4.738-2.81a1.46 1.46 0 0 1 1.489 0l4.736 2.812a1.548 1.548 0 0 1 .728 1.083c-.154-.334-.508-.427-.92-.185h.002z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-window{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14.5 2h-13l-.5.5v11l.5.5h13l.5-.5v-11l-.5-.5zM14 13H2V6h12v7zm0-8H2V3h12v2z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-globe-hemisphere-west{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M221.6 173.3A102.9 102.9 0 0 0 232 128a104.2 104.2 0 0 0-77.2-100.5h-.5A103.8 103.8 0 0 0 60.4 49l-1.3 1.2A103.9 103.9 0 0 0 128 232h2.4a104.3 104.3 0 0 0 90.6-57.4ZM216 128a89.3 89.3 0 0 1-5.5 30.7l-46.4-28.5a16.6 16.6 0 0 0-6.3-2.3l-22.8-3a16.1 16.1 0 0 0-15.3 6.8h-8.6l-3.8-7.9a15.9 15.9 0 0 0-11-8.7l-6.6-1.4l4.6-10.8h21.4a16.1 16.1 0 0 0 7.7-2l12.2-6.8a16.1 16.1 0 0 0 3-2.1l26.9-24.4a15.7 15.7 0 0 0 4.5-16.9a88 88 0 0 1 46 77.3Zm-68.8-85.9l7.6 13.7l-26.9 24.3l-12.2 6.8H94.3a15.9 15.9 0 0 0-14.7 9.8l-5.3 12.4l-10.9-29.2l8.1-19.3a88 88 0 0 1 75.7-18.5ZM40 128a87.1 87.1 0 0 1 9.5-39.7l10.4 27.9a16.1 16.1 0 0 0 11.6 10l5.5 1.2h.1l15.8 3.4l3.8 7.9a16.3 16.3 0 0 0 14.4 9h1.2l-7.7 17.2a15.9 15.9 0 0 0 2.8 17.4l18.8 20.4l-2.5 13.2A88.1 88.1 0 0 1 40 128Zm100.1 87.2l1.8-9.5a16 16 0 0 0-3.9-13.9l-18.8-20.3l12.7-28.7l1-2.1l22.8 3.1l47.8 29.4a88.5 88.5 0 0 1-63.4 42Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);padding:0.5rem;text-decoration:none;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .visible{visibility:visible;}.absolute{position:absolute;}.left-2{left:0.5rem;}.top-2{top:0.5rem;}.z-2000{z-index:2000;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.my-2{margin-top:0.5rem;margin-bottom:0.5rem;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none,.hidden{display:none;}.children-h-10>*,.children\:h10>*{height:2.5rem;}.children\:h-100\%>*,.h-100\%{height:100%;}.children\:w-12>*{width:3rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-auto{height:auto;}.h-screen{height:100vh;}.w-100\%{width:100%;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.children\:inline-flex>*{display:inline-flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.children\:grow>*,.grow{flex-grow:1;}.flex-row{flex-direction:row;}.flex-col{flex-direction:column;}.flex-wrap{flex-wrap:wrap;}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.animate-fade-in{animation:fade-in 1s linear 1;}.animate-spin{animation:spin 1s linear infinite;}.animate-duration-300ms{animation-duration:300ms;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.children\:items-center>*,.items-center{align-items:center;}.self-center{align-self:center;}.children\:justify-center>*,.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.rd-1{border-radius:0.25rem;}.rd-8{border-radius:2rem;}.bg-accent{--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkAccent{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-accentDark:active{--un-bg-opacity:1;background-color:rgba(48,108,206,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.active\:bg-hoverOverlayDarker:active{--un-bg-opacity:.1;background-color:rgba(0,0,0,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkAccentDark:active{--un-bg-opacity:1;background-color:rgba(73,206,233,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.dark .dark\:active\:bg-darkHoverOverlayDarker:active{--un-bg-opacity:.1;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.pl-2{padding-left:0.5rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.text-sm{font-size:0.875rem;line-height:1.25rem;}.font-700{font-weight:700;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkAccentText,.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText,.text-darkPrimaryText{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-accentText{--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\:pl-10{padding-left:2.5rem;}.lt-sm\:shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}#sidebar{width:18.75rem}@media screen and (max-width: 640px){#sidebar{--translate-x: -18.75rem;transform:translate(var(--translate-x))}}ul.svelte-gbh3pt{list-style:none;margin:0;padding:0;padding-left:var(--nodePaddingLeft, 1rem);border-left:var(--nodeBorderLeft, 1px dotted #9ca3af);color:var(--nodeColor, #374151)}.hidden.svelte-gbh3pt{display:none}.bracket.svelte-gbh3pt{cursor:pointer}.bracket.svelte-gbh3pt:hover{background:var(--bracketHoverBackground, #d1d5db)}.comma.svelte-gbh3pt{color:var(--nodeColor, #374151)}.val.svelte-gbh3pt{color:var(--leafDefaultColor, #9ca3af)}.val.string.svelte-gbh3pt{color:var(--leafStringColor, #059669)}.val.number.svelte-gbh3pt{color:var(--leafNumberColor, #d97706)}.val.boolean.svelte-gbh3pt{color:var(--leafBooleanColor, #2563eb)}.spinner.svelte-4xesec{height:1.2rem;width:1.2rem;border-radius:50rem;color:currentColor;border:2px dashed currentColor} +*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v21/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v26/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-bell-dot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M12.994 7.875A4.008 4.008 0 0 1 12 8h-.01v.217c0 .909.143 1.818.442 2.691l.371 1.113h-9.63v-.012l.37-1.113a8.633 8.633 0 0 0 .443-2.691V6.004c0-.563.12-1.113.347-1.616c.227-.514.55-.969.969-1.34c.419-.382.91-.67 1.436-.837c.538-.18 1.1-.24 1.65-.18l.12.018a4 4 0 0 1 .673-.887a5.15 5.15 0 0 0-.697-.135c-.694-.072-1.4 0-2.07.227c-.67.215-1.28.574-1.794 1.053a4.923 4.923 0 0 0-1.208 1.675a5.067 5.067 0 0 0-.431 2.022v2.2a7.61 7.61 0 0 1-.383 2.37L2 12.343l.479.658h3.505c0 .526.215 1.04.586 1.412c.37.37.885.586 1.412.586c.526 0 1.04-.215 1.411-.586s.587-.886.587-1.412h3.505l.478-.658l-.586-1.77a7.63 7.63 0 0 1-.383-2.381v-.318ZM7.982 14.02a.997.997 0 0 0 .706-.3a.939.939 0 0 0 .287-.705H6.977c0 .263.107.514.299.706a.999.999 0 0 0 .706.299Z' clip-rule='evenodd'/%3E%3Cpath d='M12 7a3 3 0 1 0 0-6a3 3 0 0 0 0 6Z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-maximize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 3v10h10V3H3zm9 9H4V4h8v8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-minimize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14 8v1H3V8h11z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-restore{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M3 5v9h9V5H3zm8 8H4V6h7v7z'/%3E%3Cpath fill-rule='evenodd' d='M5 5h1V4h7v7h-1v1h2V3H5v2z' clip-rule='evenodd'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m8 8.707l3.646 3.647l.708-.707L8.707 8l3.647-3.646l-.707-.708L8 7.293L4.354 3.646l-.707.708L7.293 8l-3.646 3.646l.707.708L8 8.707z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-cloud-download{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.957 6h.05a2.99 2.99 0 0 1 2.116.879a3.003 3.003 0 0 1 0 4.242a2.99 2.99 0 0 1-2.117.879v-1a2.002 2.002 0 0 0 0-4h-.914l-.123-.857a2.49 2.49 0 0 0-2.126-2.122A2.478 2.478 0 0 0 6.231 5.5l-.333.762l-.809-.189A2.49 2.49 0 0 0 4.523 6c-.662 0-1.297.263-1.764.732A2.503 2.503 0 0 0 4.523 11h.498v1h-.498a3.486 3.486 0 0 1-2.628-1.16a3.502 3.502 0 0 1 1.958-5.78a3.462 3.462 0 0 1 1.468.04a3.486 3.486 0 0 1 3.657-2.06A3.479 3.479 0 0 1 11.957 6zm-5.25 5.121l1.314 1.314V7h.994v5.4l1.278-1.279l.707.707l-2.146 2.147h-.708L6 11.829l.707-.708z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-hubot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M8.48 4h4l.5.5v2.03h.52l.5.5V8l-.5.5h-.52v3l-.5.5H9.36l-2.5 2.76L6 14.4V12H3.5l-.5-.64V8.5h-.5L2 8v-.97l.5-.5H3V4.36L3.53 4h4V2.86A1 1 0 0 1 7 2a1 1 0 0 1 2 0a1 1 0 0 1-.52.83V4zM12 8V5H4v5.86l2.5.14H7v2.19l1.8-2.04l.35-.15H12V8zm-2.12.51a2.71 2.71 0 0 1-1.37.74v-.01a2.71 2.71 0 0 1-2.42-.74l-.7.71c.34.34.745.608 1.19.79c.45.188.932.286 1.42.29a3.7 3.7 0 0 0 2.58-1.07l-.7-.71zM6.49 6.5h-1v1h1v-1zm3 0h1v1h-1v-1z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-menu{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3 1.5L1.5 3v18L3 22.5h18l1.5-1.5V3L21 1.5H3zM3 21V3h18v18H3zm5.656-4.01l1.038 1.061l5.26-5.243v-.912l-5.26-5.26l-1.035 1.06l4.59 4.702l-4.593 4.592z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal-bash{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M13.655 3.56L8.918.75a1.785 1.785 0 0 0-1.82 0L2.363 3.56a1.889 1.889 0 0 0-.921 1.628v5.624a1.889 1.889 0 0 0 .913 1.627l4.736 2.812a1.785 1.785 0 0 0 1.82 0l4.736-2.812a1.888 1.888 0 0 0 .913-1.627V5.188a1.889 1.889 0 0 0-.904-1.627zm-3.669 8.781v.404a.149.149 0 0 1-.07.124l-.239.137c-.038.02-.07 0-.07-.053v-.396a.78.78 0 0 1-.545.053a.073.073 0 0 1-.027-.09l.086-.365a.153.153 0 0 1 .071-.096a.048.048 0 0 1 .038 0a.662.662 0 0 0 .497-.063a.662.662 0 0 0 .37-.567c0-.206-.112-.292-.384-.293c-.344 0-.661-.066-.67-.574A1.47 1.47 0 0 1 9.6 9.437V9.03a.147.147 0 0 1 .07-.126l.231-.147c.038-.02.07 0 .07.054v.409a.754.754 0 0 1 .453-.055a.073.073 0 0 1 .03.095l-.081.362a.156.156 0 0 1-.065.09a.055.055 0 0 1-.035 0a.6.6 0 0 0-.436.072a.549.549 0 0 0-.331.486c0 .185.098.242.425.248c.438 0 .627.199.632.639a1.568 1.568 0 0 1-.576 1.185zm2.481-.68a.094.094 0 0 1-.036.092l-1.198.727a.034.034 0 0 1-.04.003a.035.035 0 0 1-.016-.037v-.31a.086.086 0 0 1 .055-.076l1.179-.706a.035.035 0 0 1 .056.035v.273zm.827-6.914L8.812 7.515c-.559.331-.97.693-.97 1.367v5.52c0 .404.165.662.413.741a1.465 1.465 0 0 1-.248.025c-.264 0-.522-.072-.748-.207L2.522 12.15a1.558 1.558 0 0 1-.75-1.338V5.188a1.558 1.558 0 0 1 .75-1.34l4.738-2.81a1.46 1.46 0 0 1 1.489 0l4.736 2.812a1.548 1.548 0 0 1 .728 1.083c-.154-.334-.508-.427-.92-.185h.002z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-window{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14.5 2h-13l-.5.5v11l.5.5h13l.5-.5v-11l-.5-.5zM14 13H2V6h12v7zm0-8H2V3h12v2z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);padding:0.5rem;text-decoration:none;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .visible{visibility:visible;}.absolute{position:absolute;}.left-2{left:0.5rem;}.top-2{top:0.5rem;}.z-2000{z-index:2000;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.my-2{margin-top:0.5rem;margin-bottom:0.5rem;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*,.children\:h10>*{height:2.5rem;}.children\:h-100\%>*,.h-100\%{height:100%;}.children\:w-12>*{width:3rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.children\:inline-flex>*{display:inline-flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.children\:grow>*,.grow{flex-grow:1;}.flex-row{flex-direction:row;}.flex-col{flex-direction:column;}.flex-wrap{flex-wrap:wrap;}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.animate-fade-in{animation:fade-in 1s linear 1;}.animate-spin{animation:spin 1s linear infinite;}.animate-duration-300ms{animation-duration:300ms;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.children\:items-center>*,.items-center{align-items:center;}.self-center{align-self:center;}.children\:justify-center>*,.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.rd-1{border-radius:0.25rem;}.rd-8{border-radius:2rem;}.bg-accent{--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkAccent{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-accentDark:active{--un-bg-opacity:1;background-color:rgba(48,108,206,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.active\:bg-hoverOverlayDarker:active{--un-bg-opacity:.1;background-color:rgba(0,0,0,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkAccentDark:active{--un-bg-opacity:1;background-color:rgba(73,206,233,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.dark .dark\:active\:bg-darkHoverOverlayDarker:active{--un-bg-opacity:.1;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.pl-2{padding-left:0.5rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.text-sm{font-size:0.875rem;line-height:1.25rem;}.font-700{font-weight:700;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkAccentText,.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText,.text-darkPrimaryText{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-accentText{--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\:pl-10{padding-left:2.5rem;}.lt-sm\:shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}#sidebar{width:18.75rem}@media screen and (max-width: 640px){#sidebar{--translate-x: -18.75rem;transform:translate(var(--translate-x))}}.spinner.svelte-4xesec{height:1.2rem;width:1.2rem;border-radius:50rem;color:currentColor;border:2px dashed currentColor} diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index 67d356fe1bd..5f931eb2106 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,46 +1,44 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function B(){}function ms(e){return e()}function jl(){return Object.create(null)}function de(e){e.forEach(ms)}function Xs(e){return typeof e=="function"}function ve(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Vn;function Ys(e,t){return Vn||(Vn=document.createElement("a")),Vn.href=t,e===Vn.href}function Ks(e){return Object.keys(e).length===0}function Qs(e,...t){if(e==null)return B;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function hs(e,t,n){e.$$.on_destroy.push(Qs(t,n))}function s(e,t){e.appendChild(t)}function h(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function Et(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function Wi(e){return function(t){return t.preventDefault(),e.call(this,t)}}function r(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e===""?null:+e}function xs(e){return Array.from(e.childNodes)}function Q(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function Wt(e,t){for(let n=0;n{Xn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Qn(e){e&&e.c()}function Vt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Pt(()=>{const c=o.map(ms).filter(Xs);u?u.push(...c):de(c),e.$$.on_mount=[]}),d.forEach(Pt)}function Bt(e,t){const n=e.$$;n.fragment!==null&&(de(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function lo(e,t){e.$$.dirty[0]===-1&&(qt.push(e),no(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const v=w.length?w[0]:_;return f.ctx&&l(f.ctx[k],f.ctx[k]=v)&&(!f.skip_bound&&f.bound[k]&&f.bound[k](v),g&&lo(e,k)),_}):[],f.update(),g=!0,de(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const k=xs(t.target);f.fragment&&f.fragment.l(k),k.forEach(p)}else f.fragment&&f.fragment.c();t.intro&&Ce(e.$$.fragment),Vt(e,t.target,t.anchor,t.customElement),bs()}Ft(c)}class Me{$destroy(){Bt(this,1),this.$destroy=B}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(t){this.$$set&&!Ks(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const zt=[];function gs(e,t=B){let n;const i=new Set;function l(d){if(ve(e,d)&&(e=d,n)){const c=!zt.length;for(const f of i)f[1](),zt.push(f,e);if(c){for(let f=0;f{i.delete(f),i.size===0&&(n(),n=null)}}return{set:l,update:o,subscribe:u}}var so=Object.defineProperty,We=(e,t)=>{for(var n in t)so(e,n,{get:t[n],enumerable:!0})},oo={};We(oo,{convertFileSrc:()=>ro,invoke:()=>$t,transformCallback:()=>mt});function ao(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function mt(e,t=!1){let n=ao(),i=`_${n}`;return Object.defineProperty(window,i,{value:l=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(l)),writable:!1,configurable:!0}),n}async function $t(e,t={}){return new Promise((n,i)=>{let l=mt(u=>{n(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=mt(u=>{i(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:e,callback:l,error:o,...t})})}function ro(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function S(e){return $t("tauri",e)}var uo={};We(uo,{Child:()=>ys,Command:()=>Zn,EventEmitter:()=>Yn,open:()=>Ii});async function co(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),S({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:mt(e)}})}var Yn=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let n=i=>{this.removeListener(e,n),t(i)};return this.addListener(e,n)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(n=>n!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let n=this.eventListeners[e];for(let i of n)i(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let n=i=>{this.removeListener(e,n),t(i)};return this.prependListener(e,n)}},ys=class{constructor(e){this.pid=e}async write(e){return S({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return S({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Zn=class extends Yn{constructor(e,t=[],n){super(),this.stdout=new Yn,this.stderr=new Yn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static create(e,t=[],n){return new Zn(e,t,n)}static sidecar(e,t=[],n){let i=new Zn(e,t,n);return i.options.sidecar=!0,i}async spawn(){return co(e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload);break}},this.program,this.args,this.options).then(e=>new ys(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",l=>{n.push(l)}),this.stderr.on("data",l=>{i.push(l)}),this.on("close",l=>{e({code:l.code,signal:l.signal,stdout:this.collectOutput(n),stderr:this.collectOutput(i)})}),this.spawn().catch(t)})}collectOutput(e){return this.options.encoding==="raw"?e.reduce((t,n)=>new Uint8Array([...t,...n,10]),new Uint8Array):e.join(` -`)}};async function Ii(e,t){return S({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var fo={};We(fo,{TauriEvent:()=>Ms,emit:()=>li,listen:()=>Jt,once:()=>Ts});async function vs(e,t){return S({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function ws(e,t,n){await S({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Ni(e,t,n){return S({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:mt(n)}}).then(i=>async()=>vs(e,i))}async function ks(e,t,n){return Ni(e,t,i=>{n(i),vs(e,i.id).catch(()=>{})})}var Ms=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(Ms||{});async function Jt(e,t){return Ni(e,null,t)}async function Ts(e,t){return ks(e,null,t)}async function li(e,t){return ws(e,void 0,t)}var po={};We(po,{CloseRequestedEvent:()=>zs,LogicalPosition:()=>Cs,LogicalSize:()=>xn,PhysicalPosition:()=>tt,PhysicalSize:()=>ft,UserAttentionType:()=>Hi,WebviewWindow:()=>ht,WebviewWindowHandle:()=>Ls,WindowManager:()=>As,appWindow:()=>pt,availableMonitors:()=>_o,currentMonitor:()=>mo,getAll:()=>Ss,getCurrent:()=>Kn,primaryMonitor:()=>ho});var xn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},ft=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new xn(this.width/e,this.height/e)}},Cs=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},tt=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Cs(this.x/e,this.y/e)}},Hi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(Hi||{});function Kn(){return new ht(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Ss(){return window.__TAURI_METADATA__.__windows.map(e=>new ht(e.label,{skip:!0}))}var Fl=["tauri://created","tauri://error"],Ls=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)}):Ni(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)}):ks(e,this.label,t)}async emit(e,t){if(Fl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return ws(e,this.label,t)}_handleTauriEvent(e,t){return Fl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},As=class extends Ls{async scaleFactor(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new tt(e,t))}async outerPosition(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new tt(e,t))}async innerSize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new ft(e,t))}async outerSize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new ft(e,t))}async isFullscreen(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return S({__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 S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new zs(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),n=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),i=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},zs=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}},ht=class extends As{constructor(e,t={}){super(e),t!=null&&t.skip||S({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return Ss().some(t=>t.label===e)?new ht(e,{skip:!0}):null}},pt;"__TAURI_METADATA__"in window?pt=new ht(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.`),pt=new ht("main",{skip:!0}));function Ui(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new tt(e.position.x,e.position.y),size:new ft(e.size.width,e.size.height)}}async function mo(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Ui)}async function ho(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Ui)}async function _o(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Ui))}function bo(){return navigator.appVersion.includes("Win")}var go={};We(go,{EOL:()=>yo,arch:()=>ko,platform:()=>Es,tempdir:()=>Mo,type:()=>wo,version:()=>vo});var yo=bo()?`\r +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const u of r.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerpolicy&&(r.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?r.credentials="include":s.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();function F(){}function Kl(e){return e()}function Wl(){return Object.create(null)}function me(e){e.forEach(Kl)}function ws(e){return typeof e=="function"}function Se(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Nn;function ks(e,t){return Nn||(Nn=document.createElement("a")),Nn.href=t,e===Nn.href}function Ms(e){return Object.keys(e).length===0}function Ls(e,...t){if(e==null)return F;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function zs(e,t,n){e.$$.on_destroy.push(Ls(t,n))}function l(e,t){e.appendChild(t)}function _(e,t,n){e.insertBefore(t,n||null)}function h(e){e.parentNode.removeChild(e)}function Vn(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function Al(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 Z(e){return e===""?null:+e}function Cs(e){return Array.from(e.childNodes)}function J(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function U(e,t){e.value=t==null?"":t}function xn(e,t){for(let n=0;n{jn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Pl(e){e&&e.c()}function ki(e,t,n,i){const{fragment:s,on_mount:r,on_destroy:u,after_update:f}=e.$$;s&&s.m(t,n),i||Nt(()=>{const d=r.map(Kl).filter(ws);u?u.push(...d):me(d),e.$$.on_mount=[]}),f.forEach(Nt)}function Mi(e,t){const n=e.$$;n.fragment!==null&&(me(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Ds(e,t){e.$$.dirty[0]===-1&&(Dt.push(e),Ts(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const b=L.length?L[0]:v;return p.ctx&&s(p.ctx[y],p.ctx[y]=b)&&(!p.skip_bound&&p.bound[y]&&p.bound[y](b),g&&Ds(e,y)),v}):[],p.update(),g=!0,me(p.before_update),p.fragment=i?i(p.ctx):!1,t.target){if(t.hydrate){const y=Cs(t.target);p.fragment&&p.fragment.l(y),y.forEach(h)}else p.fragment&&p.fragment.c();t.intro&&wi(e.$$.fragment),ki(e,t.target,t.anchor,t.customElement),Zl()}It(d)}class Te{$destroy(){Mi(this,1),this.$destroy=F}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!Ms(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const zt=[];function Is(e,t=F){let n;const i=new Set;function s(f){if(Se(e,f)&&(e=f,n)){const d=!zt.length;for(const p of i)p[1](),zt.push(p,e);if(d){for(let p=0;p{i.delete(p),i.size===0&&(n(),n=null)}}return{set:s,update:r,subscribe:u}}var Rs=Object.defineProperty,He=(e,t)=>{for(var n in t)Rs(e,n,{get:t[n],enumerable:!0})},Ns={};He(Ns,{convertFileSrc:()=>Us,invoke:()=>Ut,transformCallback:()=>Ht});function Hs(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function Ht(e,t=!1){let n=Hs(),i=`_${n}`;return Object.defineProperty(window,i,{value:s=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(s)),writable:!1,configurable:!0}),n}async function Ut(e,t={}){return new Promise((n,i)=>{let s=Ht(u=>{n(u),Reflect.deleteProperty(window,`_${r}`)},!0),r=Ht(u=>{i(u),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:e,callback:s,error:r,...t})})}function Us(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function k(e){return Ut("tauri",e)}var js={};He(js,{Child:()=>es,Command:()=>Gn,EventEmitter:()=>qn,open:()=>zi});async function qs(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),k({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:Ht(e)}})}var qn=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let n=i=>{this.removeListener(e,n),t(i)};return this.addListener(e,n)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(n=>n!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let n=this.eventListeners[e];for(let i of n)i(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let n=i=>{this.removeListener(e,n),t(i)};return this.prependListener(e,n)}},es=class{constructor(e){this.pid=e}async write(e){return k({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return k({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Gn=class extends qn{constructor(e,t=[],n){super(),this.stdout=new qn,this.stderr=new qn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static create(e,t=[],n){return new Gn(e,t,n)}static sidecar(e,t=[],n){let i=new Gn(e,t,n);return i.options.sidecar=!0,i}async spawn(){return qs(e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload);break}},this.program,this.args,this.options).then(e=>new es(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",s=>{n.push(s)}),this.stderr.on("data",s=>{i.push(s)}),this.on("close",s=>{e({code:s.code,signal:s.signal,stdout:this.collectOutput(n),stderr:this.collectOutput(i)})}),this.spawn().catch(t)})}collectOutput(e){return this.options.encoding==="raw"?e.reduce((t,n)=>new Uint8Array([...t,...n,10]),new Uint8Array):e.join(` +`)}};async function zi(e,t){return k({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var Fs={};He(Fs,{TauriEvent:()=>ls,emit:()=>Yn,listen:()=>jt,once:()=>ss});async function ts(e,t){return k({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function ns(e,t,n){await k({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Si(e,t,n){return k({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:Ht(n)}}).then(i=>async()=>ts(e,i))}async function is(e,t,n){return Si(e,t,i=>{n(i),ts(e,i.id).catch(()=>{})})}var ls=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(ls||{});async function jt(e,t){return Si(e,null,t)}async function ss(e,t){return is(e,null,t)}async function Yn(e,t){return ns(e,void 0,t)}var Vs={};He(Vs,{CloseRequestedEvent:()=>cs,LogicalPosition:()=>as,LogicalSize:()=>$n,PhysicalPosition:()=>Ze,PhysicalSize:()=>ut,UserAttentionType:()=>Ci,WebviewWindow:()=>dt,WebviewWindowHandle:()=>rs,WindowManager:()=>us,appWindow:()=>ct,availableMonitors:()=>$s,currentMonitor:()=>xs,getAll:()=>os,getCurrent:()=>Fn,primaryMonitor:()=>Gs});var $n=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},ut=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new $n(this.width/e,this.height/e)}},as=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},Ze=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new as(this.x/e,this.y/e)}},Ci=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(Ci||{});function Fn(){return new dt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function os(){return window.__TAURI_METADATA__.__windows.map(e=>new dt(e.label,{skip:!0}))}var Dl=["tauri://created","tauri://error"],rs=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)}):Si(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)}):is(e,this.label,t)}async emit(e,t){if(Dl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return ns(e,this.label,t)}_handleTauriEvent(e,t){return Dl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},us=class extends rs{async scaleFactor(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new Ze(e,t))}async outerPosition(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new Ze(e,t))}async innerSize(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new ut(e,t))}async outerSize(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new ut(e,t))}async isFullscreen(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return k({__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"}),k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return k({__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 k({__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 k({__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 k({__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 k({__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 k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return k({__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 k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return k({__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 k({__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 k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new cs(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",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}})}),i=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},cs=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}},dt=class extends us{constructor(e,t={}){super(e),t!=null&&t.skip||k({__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 os().some(t=>t.label===e)?new dt(e,{skip:!0}):null}},ct;"__TAURI_METADATA__"in window?ct=new dt(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.`),ct=new dt("main",{skip:!0}));function Wi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new Ze(e.position.x,e.position.y),size:new ut(e.size.width,e.size.height)}}async function xs(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Wi)}async function Gs(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Wi)}async function $s(){return k({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Wi))}function Ys(){return navigator.appVersion.includes("Win")}var Xs={};He(Xs,{EOL:()=>Bs,arch:()=>Qs,platform:()=>ds,tempdir:()=>Zs,type:()=>Js,version:()=>Ks});var Bs=Ys()?`\r `:` -`;async function Es(){return S({__tauriModule:"Os",message:{cmd:"platform"}})}async function vo(){return S({__tauriModule:"Os",message:{cmd:"version"}})}async function wo(){return S({__tauriModule:"Os",message:{cmd:"osType"}})}async function ko(){return S({__tauriModule:"Os",message:{cmd:"arch"}})}async function Mo(){return S({__tauriModule:"Os",message:{cmd:"tempdir"}})}var To={};We(To,{getName:()=>Ps,getTauriVersion:()=>Os,getVersion:()=>Ws,hide:()=>Rs,show:()=>Ds});async function Ws(){return S({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function Ps(){return S({__tauriModule:"App",message:{cmd:"getAppName"}})}async function Os(){return S({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function Ds(){return S({__tauriModule:"App",message:{cmd:"show"}})}async function Rs(){return S({__tauriModule:"App",message:{cmd:"hide"}})}var Co={};We(Co,{exit:()=>Is,relaunch:()=>ji});async function Is(e=0){return S({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function ji(){return S({__tauriModule:"Process",message:{cmd:"relaunch"}})}function So(e){let t,n,i,l,o,u,d,c,f,g,k,_,w,v,y,C,H,U,z,j,P,O,M,R,W,G;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our +`;async function ds(){return k({__tauriModule:"Os",message:{cmd:"platform"}})}async function Ks(){return k({__tauriModule:"Os",message:{cmd:"version"}})}async function Js(){return k({__tauriModule:"Os",message:{cmd:"osType"}})}async function Qs(){return k({__tauriModule:"Os",message:{cmd:"arch"}})}async function Zs(){return k({__tauriModule:"Os",message:{cmd:"tempdir"}})}var ea={};He(ea,{getName:()=>ps,getTauriVersion:()=>ms,getVersion:()=>fs,hide:()=>_s,show:()=>hs});async function fs(){return k({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function ps(){return k({__tauriModule:"App",message:{cmd:"getAppName"}})}async function ms(){return k({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function hs(){return k({__tauriModule:"App",message:{cmd:"show"}})}async function _s(){return k({__tauriModule:"App",message:{cmd:"hide"}})}var ta={};He(ta,{exit:()=>bs,relaunch:()=>Ai});async function bs(e=0){return k({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function Ai(){return k({__tauriModule:"Process",message:{cmd:"relaunch"}})}function na(e){let t,n,i,s,r,u,f,d,p,g,y,v,L,b,W,S,Y,H,R,N,O,I,E,$,P,j;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our development process. In the future, this app will be used on Tauri's integration - tests.`,n=m(),i=a("br"),l=m(),o=a("br"),u=m(),d=a("pre"),c=T("App name: "),f=a("code"),g=T(e[2]),k=T(` -App version: `),_=a("code"),w=T(e[0]),v=T(` -Tauri version: `),y=a("code"),C=T(e[1]),H=T(` -`),U=m(),z=a("br"),j=m(),P=a("div"),O=a("button"),O.textContent="Close application",M=m(),R=a("button"),R.textContent="Relaunch application",r(O,"class","btn"),r(R,"class","btn"),r(P,"class","flex flex-wrap gap-1 shadow-")},m(N,J){h(N,t,J),h(N,n,J),h(N,i,J),h(N,l,J),h(N,o,J),h(N,u,J),h(N,d,J),s(d,c),s(d,f),s(f,g),s(d,k),s(d,_),s(_,w),s(d,v),s(d,y),s(y,C),s(d,H),h(N,U,J),h(N,z,J),h(N,j,J),h(N,P,J),s(P,O),s(P,M),s(P,R),W||(G=[A(O,"click",e[3]),A(R,"click",e[4])],W=!0)},p(N,[J]){J&4&&Q(g,N[2]),J&1&&Q(w,N[0]),J&2&&Q(C,N[1])},i:B,o:B,d(N){N&&p(t),N&&p(n),N&&p(i),N&&p(l),N&&p(o),N&&p(u),N&&p(d),N&&p(U),N&&p(z),N&&p(j),N&&p(P),W=!1,de(G)}}}function Lo(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";Ps().then(c=>{n(2,o=c)}),Ws().then(c=>{n(0,i=c)}),Os().then(c=>{n(1,l=c)});async function u(){await Is()}async function d(){await ji()}return[i,l,o,u,d]}class Ao extends Me{constructor(t){super(),ke(this,t,Lo,So,ve,{})}}function zo(e){let t,n,i,l,o,u,d,c,f,g,k,_,w;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments: + tests.`,n=m(),i=a("br"),s=m(),r=a("br"),u=m(),f=a("pre"),d=w("App name: "),p=a("code"),g=w(e[2]),y=w(` +App version: `),v=a("code"),L=w(e[0]),b=w(` +Tauri version: `),W=a("code"),S=w(e[1]),Y=w(` +`),H=m(),R=a("br"),N=m(),O=a("div"),I=a("button"),I.textContent="Close application",E=m(),$=a("button"),$.textContent="Relaunch application",o(I,"class","btn"),o($,"class","btn"),o(O,"class","flex flex-wrap gap-1 shadow-")},m(T,x){_(T,t,x),_(T,n,x),_(T,i,x),_(T,s,x),_(T,r,x),_(T,u,x),_(T,f,x),l(f,d),l(f,p),l(p,g),l(f,y),l(f,v),l(v,L),l(f,b),l(f,W),l(W,S),l(f,Y),_(T,H,x),_(T,R,x),_(T,N,x),_(T,O,x),l(O,I),l(O,E),l(O,$),P||(j=[C(I,"click",e[3]),C($,"click",e[4])],P=!0)},p(T,[x]){x&4&&J(g,T[2]),x&1&&J(L,T[0]),x&2&&J(S,T[1])},i:F,o:F,d(T){T&&h(t),T&&h(n),T&&h(i),T&&h(s),T&&h(r),T&&h(u),T&&h(f),T&&h(H),T&&h(R),T&&h(N),T&&h(O),P=!1,me(j)}}}function ia(e,t,n){let i="0.0.0",s="0.0.0",r="Unknown";ps().then(d=>{n(2,r=d)}),fs().then(d=>{n(0,i=d)}),ms().then(d=>{n(1,s=d)});async function u(){await bs()}async function f(){await Ai()}return[i,s,r,u,f]}class la extends Te{constructor(t){super(),Ae(this,t,ia,na,Se,{})}}function sa(e){let t,n,i,s,r,u,f,d,p,g,y,v,L;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
  --config <PATH>
   --theme <light|dark|system>
   --verbose
- Additionally, it has a update --background subcommand.`,n=m(),i=a("br"),l=m(),o=a("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=m(),d=a("br"),c=m(),f=a("br"),g=m(),k=a("button"),k.textContent="Get matches",r(o,"class","note"),r(k,"class","btn"),r(k,"id","cli-matches")},m(v,y){h(v,t,y),h(v,n,y),h(v,i,y),h(v,l,y),h(v,o,y),h(v,u,y),h(v,d,y),h(v,c,y),h(v,f,y),h(v,g,y),h(v,k,y),_||(w=A(k,"click",e[0]),_=!0)},p:B,i:B,o:B,d(v){v&&p(t),v&&p(n),v&&p(i),v&&p(l),v&&p(o),v&&p(u),v&&p(d),v&&p(c),v&&p(f),v&&p(g),v&&p(k),_=!1,w()}}}function Eo(e,t,n){let{onMessage:i}=t;function l(){$t("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class Wo extends Me{constructor(t){super(),ke(this,t,Eo,zo,ve,{onMessage:1})}}function Po(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=m(),l=a("button"),l.textContent="Call Request (async) API",o=m(),u=a("button"),u.textContent="Send event to Rust",r(n,"class","btn"),r(n,"id","log"),r(l,"class","btn"),r(l,"id","request"),r(u,"class","btn"),r(u,"id","event")},m(f,g){h(f,t,g),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[A(n,"click",e[0]),A(l,"click",e[1]),A(u,"click",e[2])],d=!0)},p:B,i:B,o:B,d(f){f&&p(t),d=!1,de(c)}}}function Oo(e,t,n){let{onMessage:i}=t,l;ct(async()=>{l=await Jt("rust-event",i)}),Ri(()=>{l&&l()});function o(){$t("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){$t("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){li("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class Do extends Me{constructor(t){super(),ke(this,t,Oo,Po,ve,{onMessage:3})}}var Ro={};We(Ro,{Body:()=>nt,Client:()=>Hs,Response:()=>Ns,ResponseType:()=>qi,fetch:()=>Io,getClient:()=>ei});var qi=(e=>(e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary",e))(qi||{}),nt=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},n=(i,l)=>{if(l!==null){let o;typeof l=="string"?o=l:l instanceof Uint8Array||Array.isArray(l)?o=Array.from(l):l instanceof File?o={file:l.name,mime:l.type,fileName:l.name}:typeof l.file=="string"?o={file:l.file,mime:l.mime,fileName:l.fileName}:o={file:Array.from(l.file),mime:l.mime,fileName:l.fileName},t[String(i)]=o}};if(e instanceof FormData)for(let[i,l]of e)n(i,l);else for(let[i,l]of Object.entries(e))n(i,l);return new nt("Form",t)}static json(e){return new nt("Json",e)}static text(e){return new nt("Text",e)}static bytes(e){return new nt("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},Ns=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},Hs=class{constructor(e){this.id=e}async drop(){return S({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),S({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(n=>{let i=new Ns(n);if(t){try{i.data=JSON.parse(i.data)}catch(l){if(i.ok&&i.data==="")i.data={};else if(i.ok)throw Error(`Failed to parse response \`${i.data}\` as JSON: ${l}; - try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return i}return i})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function ei(e){return S({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new Hs(t))}var Ei=null;async function Io(e,t){var n;return Ei===null&&(Ei=await ei()),Ei.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function Gl(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function Vl(e){let t,n,i,l,o,u,d,c,f,g,k,_,w,v,y,C,H,U=e[5],z=[];for(let M=0;MIe(z[M],1,1,()=>{z[M]=null});let P=!e[3]&&Xl(),O=!e[3]&&e[8]&&Yl();return{c(){t=a("span"),n=a("span"),i=T(e[6]),l=m(),o=a("ul");for(let M=0;M{g[v]=null}),ii(),o=g[l],o?o.p(_,w):(o=g[l]=f[l](_),o.c()),Ce(o,1),o.m(t,u))},i(_){d||(Ce(o),d=!0)},o(_){Ie(o),d=!1},d(_){_&&p(t),c&&c.d(),g[l].d()}}}function Xl(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Yl(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Uo(e){let t,n,i=e[5].length&&Vl(e);return{c(){i&&i.c(),t=ti()},m(l,o){i&&i.m(l,o),h(l,t,o),n=!0},p(l,[o]){l[5].length?i?(i.p(l,o),o&32&&Ce(i,1)):(i=Vl(l),i.c(),Ce(i,1),i.m(t.parentNode,t)):i&&(ni(),Ie(i,1,1,()=>{i=null}),ii())},i(l){n||(Ce(i),n=!0)},o(l){Ie(i),n=!1},d(l){i&&i.d(l),l&&p(t)}}}const jo="...";function qo(e,t,n){let{json:i}=t,{depth:l=1/0}=t,{_lvl:o=0}=t,{_last:u=!0}=t;const d=y=>y===null?"null":typeof y;let c,f,g,k,_;const w=y=>{switch(d(y)){case"string":return`"${y}"`;case"function":return"f () {...}";case"symbol":return y.toString();default:return y}},v=()=>{n(8,_=!_)};return e.$$set=y=>{"json"in y&&n(0,i=y.json),"depth"in y&&n(1,l=y.depth),"_lvl"in y&&n(2,o=y._lvl),"_last"in y&&n(3,u=y._last)},e.$$.update=()=>{e.$$.dirty&17&&(n(5,c=d(i)==="object"?Object.keys(i):[]),n(4,f=Array.isArray(i)),n(6,g=f?"[":"{"),n(7,k=f?"]":"}")),e.$$.dirty&6&&n(8,_=le[9].call(n)),r(k,"class","input h-auto w-100%"),r(k,"id","request-body"),r(k,"placeholder","Request body"),r(k,"rows","5"),r(y,"class","btn"),r(y,"id","make-request"),r(O,"class","input"),r(R,"class","input"),r(P,"class","flex gap-2 children:grow"),r(ie,"type","checkbox"),r(te,"class","btn"),r(te,"type","button")},m(L,F){h(L,t,F),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),Wt(n,e[0]),s(t,c),s(t,f),s(t,g),s(t,k),q(k,e[1]),s(t,_),s(t,w),s(t,v),s(t,y),h(L,C,F),h(L,H,F),h(L,U,F),h(L,z,F),h(L,j,F),h(L,P,F),s(P,O),q(O,e[2]),s(P,M),s(P,R),q(R,e[3]),h(L,W,F),h(L,G,F),h(L,N,F),h(L,J,F),s(J,ie),ie.checked=e[5],s(J,fe),h(L,ee,F),h(L,X,F),h(L,I,F),h(L,$,F),h(L,K,F),h(L,te,F),h(L,se,F),h(L,_e,F),h(L,ue,F),h(L,be,F),h(L,Se,F),Vt(oe,L,F),x=!0,pe||(Le=[A(n,"change",e[9]),A(k,"input",e[10]),A(t,"submit",Wi(e[6])),A(O,"input",e[11]),A(R,"input",e[12]),A(ie,"change",e[13]),A(te,"click",e[7])],pe=!0)},p(L,[F]){F&1&&Wt(n,L[0]),F&2&&q(k,L[1]),F&4&&O.value!==L[2]&&q(O,L[2]),F&8&&R.value!==L[3]&&q(R,L[3]),F&32&&(ie.checked=L[5]);const Ae={};F&16&&(Ae.json=L[4]),oe.$set(Ae)},i(L){x||(Ce(oe.$$.fragment,L),x=!0)},o(L){Ie(oe.$$.fragment,L),x=!1},d(L){L&&p(t),L&&p(C),L&&p(H),L&&p(U),L&&p(z),L&&p(j),L&&p(P),L&&p(W),L&&p(G),L&&p(N),L&&p(J),L&&p(ee),L&&p(X),L&&p(I),L&&p($),L&&p(K),L&&p(te),L&&p(se),L&&p(_e),L&&p(ue),L&&p(be),L&&p(Se),Bt(oe,L),pe=!1,de(Le)}}}function Go(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const H=await ei().catch(j=>{throw o(j),j}),z={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?z.body=nt.json(JSON.parse(l)):l!==""&&(z.body=nt.text(l)),H.request(z).then(o).catch(o)}let d="baz",c="qux",f=null,g=!0;async function k(){const H=await ei().catch(U=>{throw o(U),U});n(4,f=await H.request({url:"http://localhost:3003",method:"POST",body:nt.form({foo:d,bar:c}),headers:g?{"Content-Type":"multipart/form-data"}:void 0,responseType:qi.Text}))}function _(){i=Pi(this),n(0,i)}function w(){l=this.value,n(1,l)}function v(){d=this.value,n(2,d)}function y(){c=this.value,n(3,c)}function C(){g=this.checked,n(5,g)}return e.$$set=H=>{"onMessage"in H&&n(8,o=H.onMessage)},[i,l,d,c,f,g,u,k,o,_,w,v,y,C]}class Vo extends Me{constructor(t){super(),ke(this,t,Go,Fo,ve,{onMessage:8})}}function Bo(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",r(t,"class","btn"),r(t,"id","notification")},m(l,o){h(l,t,o),n||(i=A(t,"click",$o),n=!0)},p:B,i:B,o:B,d(l){l&&p(t),n=!1,i()}}}function $o(){new Notification("Notification title",{body:"This is the notification body"})}function Jo(e,t,n){let{onMessage:i}=t;return e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class Xo extends Me{constructor(t){super(),ke(this,t,Jo,Bo,ve,{onMessage:0})}}var Yo={};We(Yo,{ask:()=>Zo,confirm:()=>xo,message:()=>Qo,open:()=>js,save:()=>Ko});async function js(e={}){return typeof e=="object"&&Object.freeze(e),S({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function Ko(e={}){return typeof e=="object"&&Object.freeze(e),S({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function Qo(e,t){var i,l;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()}})}async function Zo(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Yes",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"No"]}})}async function xo(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Ok",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"Cancel"]}})}function Kl(e,t,n){const i=e.slice();return i[69]=t[n],i}function Ql(e,t,n){const i=e.slice();return i[72]=t[n],i}function Zl(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;fe[40].call(i))},m(f,g){h(f,t,g),h(f,n,g),h(f,i,g),s(i,l);for(let k=0;ke[59].call(qe)),r(Qe,"class","input"),r(Qe,"type","number"),r(Ze,"class","input"),r(Ze,"type","number"),r(je,"class","flex gap-2"),r(xe,"class","input grow"),r(xe,"id","title"),r(Ut,"class","btn"),r(Ut,"type","submit"),r(rt,"class","flex gap-1"),r(et,"class","input grow"),r(et,"id","url"),r(jt,"class","btn"),r(jt,"id","open-url"),r(ut,"class","flex gap-1"),r(at,"class","flex flex-col gap-1")},m(b,E){h(b,t,E),h(b,n,E),h(b,i,E),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,g),s(i,k),s(i,_),h(b,w,E),h(b,v,E),h(b,y,E),h(b,C,E),s(C,H),s(H,U),s(H,z),z.checked=e[3],s(C,j),s(C,P),s(P,O),s(P,M),M.checked=e[2],s(C,R),s(C,W),s(W,G),s(W,N),N.checked=e[4],s(C,J),s(C,ie),s(ie,fe),s(ie,ee),ee.checked=e[5],s(C,X),s(C,I),s(I,$),s(I,K),K.checked=e[6],s(C,te),s(C,se),s(se,_e),s(se,ue),ue.checked=e[7],h(b,be,E),h(b,Se,E),h(b,oe,E),h(b,x,E),s(x,pe),s(pe,Le),s(Le,L),s(Le,F),q(F,e[14]),s(pe,Ae),s(pe,ge),s(ge,ae),s(ge,ce),q(ce,e[15]),s(x,re),s(x,ye),s(ye,Ne),s(Ne,Pe),s(Ne,Z),q(Z,e[8]),s(ye,D),s(ye,ne),s(ne,V),s(ne,me),q(me,e[9]),s(x,Xt),s(x,Fe),s(Fe,_t),s(_t,Yt),s(_t,De),q(De,e[10]),s(Fe,Kt),s(Fe,bt),s(bt,Qt),s(bt,Re),q(Re,e[11]),s(x,Zt),s(x,Ge),s(Ge,Y),s(Y,Ot),s(Y,ze),q(ze,e[12]),s(Ge,Dt),s(Ge,it),s(it,Rt),s(it,Ee),q(Ee,e[13]),h(b,gt,E),h(b,yt,E),h(b,vt,E),h(b,Te,E),s(Te,He),s(He,Oe),s(Oe,lt),s(Oe,It),s(Oe,st),s(st,Nt),s(st,wt),s(Oe,xt),s(Oe,en),s(en,Gi),s(en,si),s(He,Vi),s(He,Ve),s(Ve,nn),s(Ve,Bi),s(Ve,ln),s(ln,$i),s(ln,oi),s(Ve,Ji),s(Ve,on),s(on,Xi),s(on,ai),s(Te,Yi),s(Te,kt),s(kt,Be),s(Be,rn),s(Be,Ki),s(Be,un),s(un,Qi),s(un,ri),s(Be,Zi),s(Be,dn),s(dn,xi),s(dn,ui),s(kt,el),s(kt,$e),s($e,pn),s($e,tl),s($e,mn),s(mn,nl),s(mn,ci),s($e,il),s($e,_n),s(_n,ll),s(_n,di),s(Te,sl),s(Te,Mt),s(Mt,Je),s(Je,gn),s(Je,ol),s(Je,yn),s(yn,al),s(yn,fi),s(Je,rl),s(Je,wn),s(wn,ul),s(wn,pi),s(Mt,cl),s(Mt,Xe),s(Xe,Mn),s(Xe,dl),s(Xe,Tn),s(Tn,fl),s(Tn,mi),s(Xe,pl),s(Xe,Sn),s(Sn,ml),s(Sn,hi),s(Te,hl),s(Te,Tt),s(Tt,Ye),s(Ye,An),s(Ye,_l),s(Ye,zn),s(zn,bl),s(zn,_i),s(Ye,gl),s(Ye,Wn),s(Wn,yl),s(Wn,bi),s(Tt,vl),s(Tt,Ke),s(Ke,On),s(Ke,wl),s(Ke,Dn),s(Dn,kl),s(Dn,gi),s(Ke,Ml),s(Ke,In),s(In,Tl),s(In,yi),h(b,vi,E),h(b,wi,E),h(b,ki,E),h(b,Ht,E),h(b,Mi,E),h(b,Ue,E),s(Ue,Hn),s(Hn,Ct),Ct.checked=e[16],s(Hn,Cl),s(Ue,Sl),s(Ue,Un),s(Un,St),St.checked=e[17],s(Un,Ll),s(Ue,Al),s(Ue,jn),s(jn,Lt),Lt.checked=e[21],s(jn,zl),h(b,Ti,E),h(b,je,E),s(je,qn),s(qn,El),s(qn,qe);for(let he=0;he=1,g,k,_,w=f&&Zl(e),v=e[1][e[0]]&&es(e);return{c(){t=a("div"),n=a("div"),i=a("input"),l=m(),o=a("button"),o.textContent="New window",u=m(),d=a("br"),c=m(),w&&w.c(),g=m(),v&&v.c(),r(i,"class","input grow"),r(i,"type","text"),r(i,"placeholder","New Window label.."),r(o,"class","btn"),r(n,"class","flex gap-1"),r(t,"class","flex flex-col children:grow gap-2")},m(y,C){h(y,t,C),s(t,n),s(n,i),q(i,e[22]),s(n,l),s(n,o),s(t,u),s(t,d),s(t,c),w&&w.m(t,null),s(t,g),v&&v.m(t,null),k||(_=[A(i,"input",e[39]),A(o,"click",e[36])],k=!0)},p(y,C){C[0]&4194304&&i.value!==y[22]&&q(i,y[22]),C[0]&2&&(f=Object.keys(y[1]).length>=1),f?w?w.p(y,C):(w=Zl(y),w.c(),w.m(t,g)):w&&(w.d(1),w=null),y[1][y[0]]?v?v.p(y,C):(v=es(y),v.c(),v.m(t,null)):v&&(v.d(1),v=null)},i:B,o:B,d(y){y&&p(t),w&&w.d(),v&&v.d(),k=!1,de(_)}}}function ta(e,t,n){let i=pt.label;const l={[pt.label]:pt},o=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:u}=t,d,c="https://tauri.app",f=!0,g=!1,k=!0,_=!1,w=!0,v=!1,y=null,C=null,H=null,U=null,z=null,j=null,P=null,O=null,M=1,R=new tt(P,O),W=new tt(P,O),G=new ft(y,C),N=new ft(y,C),J,ie,fe=!1,ee=!0,X=null,I=null,$="default",K=!1,te="Awesome Tauri Example!";function se(){Ii(c)}function _e(){l[i].setTitle(te)}function ue(){l[i].hide(),setTimeout(l[i].show,2e3)}function be(){l[i].minimize(),setTimeout(l[i].unminimize,2e3)}function Se(){js({multiple:!1}).then(Y=>{typeof Y=="string"&&l[i].setIcon(Y)})}function oe(){if(!d)return;const Y=new ht(d);n(1,l[d]=Y,l),Y.once("tauri://error",function(){u("Error creating new webview")})}function x(){l[i].innerSize().then(Y=>{n(27,G=Y),n(8,y=G.width),n(9,C=G.height)}),l[i].outerSize().then(Y=>{n(28,N=Y)})}function pe(){l[i].innerPosition().then(Y=>{n(25,R=Y)}),l[i].outerPosition().then(Y=>{n(26,W=Y),n(14,P=W.x),n(15,O=W.y)})}async function Le(Y){!Y||(J&&J(),ie&&ie(),ie=await Y.listen("tauri://move",pe),J=await Y.listen("tauri://resize",x))}async function L(){await l[i].minimize(),await l[i].requestUserAttention(Hi.Critical),await new Promise(Y=>setTimeout(Y,3e3)),await l[i].requestUserAttention(null)}function F(){d=this.value,n(22,d)}function Ae(){i=Pi(this),n(0,i),n(1,l)}const ge=()=>l[i].center();function ae(){g=this.checked,n(3,g)}function ce(){f=this.checked,n(2,f)}function re(){k=this.checked,n(4,k)}function ye(){_=this.checked,n(5,_)}function Ne(){w=this.checked,n(6,w)}function Pe(){v=this.checked,n(7,v)}function Z(){P=le(this.value),n(14,P)}function D(){O=le(this.value),n(15,O)}function ne(){y=le(this.value),n(8,y)}function V(){C=le(this.value),n(9,C)}function me(){H=le(this.value),n(10,H)}function Xt(){U=le(this.value),n(11,U)}function Fe(){z=le(this.value),n(12,z)}function _t(){j=le(this.value),n(13,j)}function Yt(){fe=this.checked,n(16,fe)}function De(){ee=this.checked,n(17,ee)}function Kt(){K=this.checked,n(21,K)}function bt(){$=Pi(this),n(20,$),n(30,o)}function Qt(){X=le(this.value),n(18,X)}function Re(){I=le(this.value),n(19,I)}function Zt(){te=this.value,n(29,te)}function Ge(){c=this.value,n(23,c)}return e.$$set=Y=>{"onMessage"in Y&&n(38,u=Y.onMessage)},e.$$.update=()=>{var Y,Ot,ze,Dt,it,Rt,Ee,gt,yt,vt,Te,He,Oe,lt,It,st,Nt,ot,wt;e.$$.dirty[0]&3&&(l[i],pe(),x()),e.$$.dirty[0]&7&&((Y=l[i])==null||Y.setResizable(f)),e.$$.dirty[0]&11&&(g?(Ot=l[i])==null||Ot.maximize():(ze=l[i])==null||ze.unmaximize()),e.$$.dirty[0]&19&&((Dt=l[i])==null||Dt.setDecorations(k)),e.$$.dirty[0]&35&&((it=l[i])==null||it.setAlwaysOnTop(_)),e.$$.dirty[0]&67&&((Rt=l[i])==null||Rt.setContentProtected(w)),e.$$.dirty[0]&131&&((Ee=l[i])==null||Ee.setFullscreen(v)),e.$$.dirty[0]&771&&y&&C&&((gt=l[i])==null||gt.setSize(new ft(y,C))),e.$$.dirty[0]&3075&&(H&&U?(yt=l[i])==null||yt.setMinSize(new xn(H,U)):(vt=l[i])==null||vt.setMinSize(null)),e.$$.dirty[0]&12291&&(z>800&&j>400?(Te=l[i])==null||Te.setMaxSize(new xn(z,j)):(He=l[i])==null||He.setMaxSize(null)),e.$$.dirty[0]&49155&&P!==null&&O!==null&&((Oe=l[i])==null||Oe.setPosition(new tt(P,O))),e.$$.dirty[0]&3&&((lt=l[i])==null||lt.scaleFactor().then(xt=>n(24,M=xt))),e.$$.dirty[0]&3&&Le(l[i]),e.$$.dirty[0]&65539&&((It=l[i])==null||It.setCursorGrab(fe)),e.$$.dirty[0]&131075&&((st=l[i])==null||st.setCursorVisible(ee)),e.$$.dirty[0]&1048579&&((Nt=l[i])==null||Nt.setCursorIcon($)),e.$$.dirty[0]&786435&&X!==null&&I!==null&&((ot=l[i])==null||ot.setCursorPosition(new tt(X,I))),e.$$.dirty[0]&2097155&&((wt=l[i])==null||wt.setIgnoreCursorEvents(K))},[i,l,f,g,k,_,w,v,y,C,H,U,z,j,P,O,fe,ee,X,I,$,K,d,c,M,R,W,G,N,te,o,se,_e,ue,be,Se,oe,L,u,F,Ae,ge,ae,ce,re,ye,Ne,Pe,Z,D,ne,V,me,Xt,Fe,_t,Yt,De,Kt,bt,Qt,Re,Zt,Ge]}class na extends Me{constructor(t){super(),ke(this,t,ta,ea,ve,{onMessage:38},null,[-1,-1,-1])}}var ia={};We(ia,{isRegistered:()=>sa,register:()=>qs,registerAll:()=>la,unregister:()=>Fs,unregisterAll:()=>Gs});async function qs(e,t){return S({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:mt(t)}})}async function la(e,t){return S({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:mt(t)}})}async function sa(e){return S({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})}async function Fs(e){return S({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function Gs(){return S({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function ns(e,t,n){const i=e.slice();return i[9]=t[n],i}function is(e){let t,n=e[9]+"",i,l,o,u,d;function c(){return e[8](e[9])}return{c(){t=a("div"),i=T(n),l=m(),o=a("button"),o.textContent="Unregister",r(o,"class","btn"),r(o,"type","button"),r(t,"class","flex justify-between")},m(f,g){h(f,t,g),s(t,i),s(t,l),s(t,o),u||(d=A(o,"click",c),u=!0)},p(f,g){e=f,g&2&&n!==(n=e[9]+"")&&Q(i,n)},d(f){f&&p(t),u=!1,d()}}}function ls(e){let t,n,i,l,o;return{c(){t=a("br"),n=m(),i=a("button"),i.textContent="Unregister all",r(i,"class","btn"),r(i,"type","button")},m(u,d){h(u,t,d),h(u,n,d),h(u,i,d),l||(o=A(i,"click",e[5]),l=!0)},p:B,d(u){u&&p(t),u&&p(n),u&&p(i),l=!1,o()}}}function oa(e){let t,n,i,l,o,u,d,c,f,g,k,_=e[1],w=[];for(let y=0;y<_.length;y+=1)w[y]=is(ns(e,_,y));let v=e[1].length>1&&ls(e);return{c(){t=a("div"),n=a("input"),i=m(),l=a("button"),l.textContent="Register",o=m(),u=a("br"),d=m(),c=a("div");for(let y=0;y1?v?v.p(y,C):(v=ls(y),v.c(),v.m(c,null)):v&&(v.d(1),v=null)},i:B,o:B,d(y){y&&p(t),y&&p(o),y&&p(u),y&&p(d),y&&p(c),Et(w,y),v&&v.d(),g=!1,de(k)}}}function aa(e,t,n){let i,{onMessage:l}=t;const o=gs([]);hs(e,o,_=>n(1,i=_));let u="CmdOrControl+X";function d(){const _=u;qs(_,()=>{l(`Shortcut ${_} triggered`)}).then(()=>{o.update(w=>[...w,_]),l(`Shortcut ${_} registered successfully`)}).catch(l)}function c(_){const w=_;Fs(w).then(()=>{o.update(v=>v.filter(y=>y!==w)),l(`Shortcut ${w} unregistered`)}).catch(l)}function f(){Gs().then(()=>{o.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function g(){u=this.value,n(0,u)}const k=_=>c(_);return e.$$set=_=>{"onMessage"in _&&n(6,l=_.onMessage)},[u,i,o,d,c,f,l,g,k]}class ra extends Me{constructor(t){super(),ke(this,t,aa,oa,ve,{onMessage:6})}}function ss(e){let t,n,i,l,o,u,d;return{c(){t=a("br"),n=m(),i=a("input"),l=m(),o=a("button"),o.textContent="Write",r(i,"class","input"),r(i,"placeholder","write to stdin"),r(o,"class","btn")},m(c,f){h(c,t,f),h(c,n,f),h(c,i,f),q(i,e[4]),h(c,l,f),h(c,o,f),u||(d=[A(i,"input",e[14]),A(o,"click",e[8])],u=!0)},p(c,f){f&16&&i.value!==c[4]&&q(i,c[4])},d(c){c&&p(t),c&&p(n),c&&p(i),c&&p(l),c&&p(o),u=!1,de(d)}}}function ua(e){let t,n,i,l,o,u,d,c,f,g,k,_,w,v,y,C,H,U,z,j,P,O,M,R,W=e[5]&&ss(e);return{c(){t=a("div"),n=a("div"),i=T(`Script: - `),l=a("input"),o=m(),u=a("div"),d=T(`Encoding: - `),c=a("input"),f=m(),g=a("div"),k=T(`Working directory: - `),_=a("input"),w=m(),v=a("div"),y=T(`Arguments: - `),C=a("input"),H=m(),U=a("div"),z=a("button"),z.textContent="Run",j=m(),P=a("button"),P.textContent="Kill",O=m(),W&&W.c(),r(l,"class","grow input"),r(n,"class","flex items-center gap-1"),r(c,"class","grow input"),r(u,"class","flex items-center gap-1"),r(_,"class","grow input"),r(_,"placeholder","Working directory"),r(g,"class","flex items-center gap-1"),r(C,"class","grow input"),r(C,"placeholder","Environment variables"),r(v,"class","flex items-center gap-1"),r(z,"class","btn"),r(P,"class","btn"),r(U,"class","flex children:grow gap-1"),r(t,"class","flex flex-col childre:grow gap-1")},m(G,N){h(G,t,N),s(t,n),s(n,i),s(n,l),q(l,e[0]),s(t,o),s(t,u),s(u,d),s(u,c),q(c,e[3]),s(t,f),s(t,g),s(g,k),s(g,_),q(_,e[1]),s(t,w),s(t,v),s(v,y),s(v,C),q(C,e[2]),s(t,H),s(t,U),s(U,z),s(U,j),s(U,P),s(t,O),W&&W.m(t,null),M||(R=[A(l,"input",e[10]),A(c,"input",e[11]),A(_,"input",e[12]),A(C,"input",e[13]),A(z,"click",e[6]),A(P,"click",e[7])],M=!0)},p(G,[N]){N&1&&l.value!==G[0]&&q(l,G[0]),N&8&&c.value!==G[3]&&q(c,G[3]),N&2&&_.value!==G[1]&&q(_,G[1]),N&4&&C.value!==G[2]&&q(C,G[2]),G[5]?W?W.p(G,N):(W=ss(G),W.c(),W.m(t,null)):W&&(W.d(1),W=null)},i:B,o:B,d(G){G&&p(t),W&&W.d(),M=!1,de(R)}}}function ca(e,t,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",o=i?["/C"]:["-c"],{onMessage:u}=t,d='echo "hello world"',c=null,f="SOMETHING=value ANOTHER=2",g="",k="",_;function w(){return f.split(" ").reduce((O,M)=>{let[R,W]=M.split("=");return{...O,[R]:W}},{})}function v(){n(5,_=null);const O=Zn.create(l,[...o,d],{cwd:c||null,env:w(),encoding:g||void 0});O.on("close",M=>{u(`command finished with code ${M.code} and signal ${M.signal}`),n(5,_=null)}),O.on("error",M=>u(`command error: "${M}"`)),O.stdout.on("data",M=>u(`command stdout: "${M}"`)),O.stderr.on("data",M=>u(`command stderr: "${M}"`)),O.spawn().then(M=>{n(5,_=M)}).catch(u)}function y(){_.kill().then(()=>u("killed child process")).catch(u)}function C(){_.write(k).catch(u)}function H(){d=this.value,n(0,d)}function U(){g=this.value,n(3,g)}function z(){c=this.value,n(1,c)}function j(){f=this.value,n(2,f)}function P(){k=this.value,n(4,k)}return e.$$set=O=>{"onMessage"in O&&n(9,u=O.onMessage)},[d,c,f,g,k,_,v,y,C,u,H,U,z,j,P]}class da extends Me{constructor(t){super(),ke(this,t,ca,ua,ve,{onMessage:9})}}var fa={};We(fa,{checkUpdate:()=>Bs,installUpdate:()=>Vs,onUpdaterEvent:()=>Fi});async function Fi(e){return Jt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function Vs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error){t(),i(o.error);return}o.status==="DONE"&&(t(),n())}Fi(l).then(o=>{e=o}).catch(o=>{throw t(),o}),li("tauri://update-install").catch(o=>{throw t(),o})})}async function Bs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Ts("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),Fi(o).then(u=>{e=u}).catch(u=>{throw t(),u}),li("tauri://update").catch(u=>{throw t(),u})})}function pa(e){let t;return{c(){t=a("button"),t.innerHTML='
',r(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){h(n,t,i)},p:B,d(n){n&&p(t)}}}function ma(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",r(t,"class","btn")},m(l,o){h(l,t,o),n||(i=A(t,"click",e[4]),n=!0)},p:B,d(l){l&&p(t),n=!1,i()}}}function ha(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",r(t,"class","btn")},m(l,o){h(l,t,o),n||(i=A(t,"click",e[3]),n=!0)},p:B,d(l){l&&p(t),n=!1,i()}}}function _a(e){let t;function n(o,u){return!o[0]&&!o[2]?ha:!o[1]&&o[2]?ma:pa}let i=n(e),l=i(e);return{c(){t=a("div"),l.c(),r(t,"class","flex children:grow children:h10")},m(o,u){h(o,t,u),l.m(t,null)},p(o,[u]){i===(i=n(o))&&l?l.p(o,u):(l.d(1),l=i(o),l&&(l.c(),l.m(t,null)))},i:B,o:B,d(o){o&&p(t),l.d()}}}function ba(e,t,n){let{onMessage:i}=t,l;ct(async()=>{l=await Jt("tauri://update-status",i)}),Ri(()=>{l&&l()});let o,u,d;async function c(){n(0,o=!0);try{const{shouldUpdate:g,manifest:k}=await Bs();i(`Should update: ${g}`),i(k),n(2,d=g)}catch(g){i(g)}finally{n(0,o=!1)}}async function f(){n(1,u=!0);try{await Vs(),i("Installation complete, restart required."),await ji()}catch(g){i(g)}finally{n(1,u=!1)}}return e.$$set=g=>{"onMessage"in g&&n(5,i=g.onMessage)},[o,u,d,c,f,i]}class ga extends Me{constructor(t){super(),ke(this,t,ba,_a,ve,{onMessage:5})}}var ya={};We(ya,{readText:()=>Js,writeText:()=>$s});async function $s(e){return S({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function Js(){return S({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}function va(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("input"),i=m(),l=a("button"),l.textContent="Write",o=m(),u=a("button"),u.textContent="Read",r(n,"class","grow input"),r(n,"placeholder","Text to write to the clipboard"),r(l,"class","btn"),r(l,"type","button"),r(u,"class","btn"),r(u,"type","button"),r(t,"class","flex gap-1")},m(f,g){h(f,t,g),s(t,n),q(n,e[0]),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[A(n,"input",e[4]),A(l,"click",e[1]),A(u,"click",e[2])],d=!0)},p(f,[g]){g&1&&n.value!==f[0]&&q(n,f[0])},i:B,o:B,d(f){f&&p(t),d=!1,de(c)}}}function wa(e,t,n){let{onMessage:i}=t,l="clipboard message";function o(){$s(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){Js().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function d(){l=this.value,n(0,l)}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,o,u,i,d]}class ka extends Me{constructor(t){super(),ke(this,t,wa,va,ve,{onMessage:3})}}function Ma(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
- `,r(t,"class","flex flex-col gap-2")},m(n,i){h(n,t,i)},p:B,i:B,o:B,d(n){n&&p(t)}}}function Ta(e,t,n){let{onMessage:i}=t;const l=window.constraints={audio:!0,video:!0};function o(d){const c=document.querySelector("video"),f=d.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=d,c.srcObject=d}function u(d){if(d.name==="ConstraintNotSatisfiedError"){const c=l.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else d.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${d.name}`,d)}return ct(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Ri(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class Ca extends Me{constructor(t){super(),ke(this,t,Ta,Ma,ve,{onMessage:0})}}function Sa(e){let t,n,i,l,o,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=m(),l=a("button"),l.textContent="Hide",r(n,"class","btn"),r(n,"id","show"),r(n,"title","Hides and shows the app after 2 seconds"),r(l,"class","btn"),r(l,"id","hide")},m(d,c){h(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[A(n,"click",e[0]),A(l,"click",e[1])],o=!0)},p:B,i:B,o:B,d(d){d&&p(t),o=!1,de(u)}}}function La(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{Ds().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return Rs().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class Aa extends Me{constructor(t){super(),ke(this,t,La,Sa,ve,{onMessage:2})}}function os(e,t,n){const i=e.slice();return i[30]=t[n],i}function as(e,t,n){const i=e.slice();return i[33]=t[n],i}function rs(e){let t,n,i,l,o,u,d,c,f,g,k,_,w;function v(j,P){return j[3]?Ea:za}let y=v(e),C=y(e);function H(j,P){return j[2]?Pa:Wa}let U=H(e),z=U(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=m(),l=a("span"),o=a("span"),C.c(),d=m(),c=a("span"),c.innerHTML='
',f=m(),g=a("span"),z.c(),r(n,"class","lt-sm:pl-10 text-darkPrimaryText"),r(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),r(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(c,"title","Minimize"),r(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(g,"title",k=e[2]?"Restore":"Maximize"),r(g,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),r(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),r(t,"data-tauri-drag-region","")},m(j,P){h(j,t,P),s(t,n),s(t,i),s(t,l),s(l,o),C.m(o,null),s(l,d),s(l,c),s(l,f),s(l,g),z.m(g,null),_||(w=[A(o,"click",e[11]),A(c,"click",e[9]),A(g,"click",e[10])],_=!0)},p(j,P){y!==(y=v(j))&&(C.d(1),C=y(j),C&&(C.c(),C.m(o,null))),P[0]&8&&u!==(u=j[3]?"Switch to Light mode":"Switch to Dark mode")&&r(o,"title",u),U!==(U=H(j))&&(z.d(1),z=U(j),z&&(z.c(),z.m(g,null))),P[0]&4&&k!==(k=j[2]?"Restore":"Maximize")&&r(g,"title",k)},d(j){j&&p(t),C.d(),z.d(),_=!1,de(w)}}}function za(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-moon")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Ea(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-sun")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Wa(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-maximize")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Pa(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-restore")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Oa(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Da(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function us(e){let t,n,i,l,o,u,d,c,f;function g(w,v){return w[3]?Ia:Ra}let k=g(e),_=k(e);return{c(){t=a("a"),_.c(),n=m(),i=a("br"),l=m(),o=a("div"),u=m(),d=a("br"),r(t,"href","##"),r(t,"class","nv justify-between h-8"),r(o,"class","bg-white/5 h-2px")},m(w,v){h(w,t,v),_.m(t,null),h(w,n,v),h(w,i,v),h(w,l,v),h(w,o,v),h(w,u,v),h(w,d,v),c||(f=A(t,"click",e[11]),c=!0)},p(w,v){k!==(k=g(w))&&(_.d(1),_=k(w),_&&(_.c(),_.m(t,null)))},d(w){w&&p(t),_.d(),w&&p(n),w&&p(i),w&&p(l),w&&p(o),w&&p(u),w&&p(d),c=!1,f()}}}function Ra(e){let t,n;return{c(){t=T(`Switch to Dark mode - `),n=a("div"),r(n,"class","i-ph-moon")},m(i,l){h(i,t,l),h(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Ia(e){let t,n;return{c(){t=T(`Switch to Light mode - `),n=a("div"),r(n,"class","i-ph-sun")},m(i,l){h(i,t,l),h(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Na(e){let t,n,i,l,o=e[33].label+"",u,d,c,f;function g(){return e[19](e[33])}return{c(){t=a("a"),n=a("div"),i=m(),l=a("p"),u=T(o),r(n,"class",e[33].icon+" mr-2"),r(t,"href","##"),r(t,"class",d="nv "+(e[1]===e[33]?"nv_selected":""))},m(k,_){h(k,t,_),s(t,n),s(t,i),s(t,l),s(l,u),c||(f=A(t,"click",g),c=!0)},p(k,_){e=k,_[0]&2&&d!==(d="nv "+(e[1]===e[33]?"nv_selected":""))&&r(t,"class",d)},d(k){k&&p(t),c=!1,f()}}}function cs(e){let t,n=e[33]&&Na(e);return{c(){n&&n.c(),t=ti()},m(i,l){n&&n.m(i,l),h(i,t,l)},p(i,l){i[33]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function ds(e){let t,n=e[30].html+"",i;return{c(){t=new eo(!1),i=ti(),t.a=i},m(l,o){t.m(n,l,o),h(l,i,o)},p(l,o){o[0]&64&&n!==(n=l[30].html+"")&&t.p(n)},d(l){l&&p(i),l&&t.d()}}}function Ha(e){let t,n,i,l,o,u,d,c,f,g,k,_,w,v,y,C,H,U,z,j,P,O,M,R,W,G,N=e[1].label+"",J,ie,fe,ee,X,I,$,K,te,se,_e,ue,be,Se,oe,x,pe,Le,L=e[5]&&rs(e);function F(D,ne){return D[0]?Da:Oa}let Ae=F(e),ge=Ae(e),ae=!e[5]&&us(e),ce=e[7],re=[];for(let D=0;D`,k=m(),_=a("a"),_.innerHTML=`GitHub - `,w=m(),v=a("a"),v.innerHTML=`Source - `,y=m(),C=a("br"),H=m(),U=a("div"),z=m(),j=a("br"),P=m(),O=a("div");for(let D=0;D',Se=m(),oe=a("div");for(let D=0;D{Bt(V,1)}),ii()}ye?(X=new ye(Ne(D)),Qn(X.$$.fragment),Ce(X.$$.fragment,1),Vt(X,ee,null)):X=null}if(ne[0]&64){Pe=D[6];let V;for(V=0;V{y(`File drop: ${JSON.stringify(I.payload)}`)});const l=navigator.userAgent.toLowerCase(),o=l.includes("android")||l.includes("iphone"),u=[{label:"Welcome",component:Ao,icon:"i-ph-hand-waving"},{label:"Communication",component:Do,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:Wo,icon:"i-codicon-terminal"},{label:"HTTP",component:Vo,icon:"i-ph-globe-hemisphere-west"},!o&&{label:"Notifications",component:Xo,icon:"i-codicon-bell-dot"},!o&&{label:"App",component:Aa,icon:"i-codicon-hubot"},!o&&{label:"Window",component:na,icon:"i-codicon-window"},!o&&{label:"Shortcuts",component:ra,icon:"i-codicon-record-keys"},{label:"Shell",component:da,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:ga,icon:"i-codicon-cloud-download"},!o&&{label:"Clipboard",component:ka,icon:"i-codicon-clippy"},{label:"WebRTC",component:Ca,icon:"i-ph-broadcast"}];let d=u[0];function c(I){n(1,d=I)}let f;ct(async()=>{const I=Kn();n(2,f=await I.isMaximized()),Jt("tauri://resize",async()=>{n(2,f=await I.isMaximized())})});function g(){Kn().minimize()}async function k(){const I=Kn();await I.isMaximized()?I.unmaximize():I.maximize()}let _;ct(()=>{n(3,_=localStorage&&localStorage.getItem("theme")=="dark"),ps(_)});function w(){n(3,_=!_),ps(_)}let v=gs([]);hs(e,v,I=>n(6,i=I));function y(I){v.update($=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof I=="string"?I:JSON.stringify(I,null,1))+"
"},...$])}function C(I){v.update($=>[{html:`
[${new Date().toLocaleTimeString()}]: `+I+"
"},...$])}function H(){v.update(()=>[])}let U,z,j;function P(I){j=I.clientY;const $=window.getComputedStyle(U);z=parseInt($.height,10);const K=se=>{const _e=se.clientY-j,ue=z-_e;n(4,U.style.height=`${ue{document.removeEventListener("mouseup",te),document.removeEventListener("mousemove",K)};document.addEventListener("mouseup",te),document.addEventListener("mousemove",K)}let O;ct(async()=>{n(5,O=await Es()==="win32")});let M=!1,R,W,G=!1,N=0,J=0;const ie=(I,$,K)=>Math.min(Math.max($,I),K);ct(()=>{n(17,R=document.querySelector("#sidebar")),W=document.querySelector("#sidebarToggle"),document.addEventListener("click",I=>{W.contains(I.target)?n(0,M=!M):M&&!R.contains(I.target)&&n(0,M=!1)}),document.addEventListener("touchstart",I=>{if(W.contains(I.target))return;const $=I.touches[0].clientX;(0<$&&$<20&&!M||M)&&(G=!0,N=$)}),document.addEventListener("touchmove",I=>{if(G){const $=I.touches[0].clientX;J=$;const K=($-N)/10;R.style.setProperty("--translate-x",`-${ie(0,M?0-K:18.75-K,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(G){const I=(J-N)/10;n(0,M=M?I>-(18.75/2):I>18.75/2)}G=!1})});const fe=()=>Ii("https://tauri.app/"),ee=I=>{c(I),n(0,M=!1)};function X(I){Oi[I?"unshift":"push"](()=>{U=I,n(4,U)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const I=document.querySelector("#sidebar");I&&Ua(I,M)}},[M,d,f,_,U,O,i,u,c,g,k,w,v,y,C,H,P,R,fe,ee,X]}class qa extends Me{constructor(t){super(),ke(this,t,ja,Ha,ve,{},null,[-1,-1])}}new qa({target:document.querySelector("#app")}); + Additionally, it has a update --background subcommand.`,n=m(),i=a("br"),s=m(),r=a("div"),r.textContent="Note that the arguments are only parsed, not implemented.",u=m(),f=a("br"),d=m(),p=a("br"),g=m(),y=a("button"),y.textContent="Get matches",o(r,"class","note"),o(y,"class","btn"),o(y,"id","cli-matches")},m(b,W){_(b,t,W),_(b,n,W),_(b,i,W),_(b,s,W),_(b,r,W),_(b,u,W),_(b,f,W),_(b,d,W),_(b,p,W),_(b,g,W),_(b,y,W),v||(L=C(y,"click",e[0]),v=!0)},p:F,i:F,o:F,d(b){b&&h(t),b&&h(n),b&&h(i),b&&h(s),b&&h(r),b&&h(u),b&&h(f),b&&h(d),b&&h(p),b&&h(g),b&&h(y),v=!1,L()}}}function aa(e,t,n){let{onMessage:i}=t;function s(){Ut("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=r=>{"onMessage"in r&&n(1,i=r.onMessage)},[s,i]}class oa extends Te{constructor(t){super(),Ae(this,t,aa,sa,Se,{onMessage:1})}}function ra(e){let t,n,i,s,r,u,f,d;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=m(),s=a("button"),s.textContent="Call Request (async) API",r=m(),u=a("button"),u.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(u,"class","btn"),o(u,"id","event")},m(p,g){_(p,t,g),l(t,n),l(t,i),l(t,s),l(t,r),l(t,u),f||(d=[C(n,"click",e[0]),C(s,"click",e[1]),C(u,"click",e[2])],f=!0)},p:F,i:F,o:F,d(p){p&&h(t),f=!1,me(d)}}}function ua(e,t,n){let{onMessage:i}=t,s;ot(async()=>{s=await jt("rust-event",i)}),Li(()=>{s&&s()});function r(){Ut("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){Ut("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function f(){Yn("js-event","this is the payload string")}return e.$$set=d=>{"onMessage"in d&&n(3,i=d.onMessage)},[r,u,f,i]}class ca extends Te{constructor(t){super(),Ae(this,t,ua,ra,Se,{onMessage:3})}}function da(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",o(t,"class","btn"),o(t,"id","notification")},m(s,r){_(s,t,r),n||(i=C(t,"click",fa),n=!0)},p:F,i:F,o:F,d(s){s&&h(t),n=!1,i()}}}function fa(){new Notification("Notification title",{body:"This is the notification body"})}function pa(e,t,n){let{onMessage:i}=t;return e.$$set=s=>{"onMessage"in s&&n(0,i=s.onMessage)},[i]}class ma extends Te{constructor(t){super(),Ae(this,t,pa,da,Se,{onMessage:0})}}var ha={};He(ha,{ask:()=>ga,confirm:()=>ya,message:()=>ba,open:()=>gs,save:()=>_a});async function gs(e={}){return typeof e=="object"&&Object.freeze(e),k({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function _a(e={}){return typeof e=="object"&&Object.freeze(e),k({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function ba(e,t){var i,s;let n=typeof t=="string"?{title:t}:t;return k({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabel:(s=n==null?void 0:n.okLabel)==null?void 0:s.toString()}})}async function ga(e,t){var i,s,r,u,f;let n=typeof t=="string"?{title:t}:t;return k({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(r=(s=n==null?void 0:n.okLabel)==null?void 0:s.toString())!=null?r:"Yes",(f=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?f:"No"]}})}async function ya(e,t){var i,s,r,u,f;let n=typeof t=="string"?{title:t}:t;return k({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(r=(s=n==null?void 0:n.okLabel)==null?void 0:s.toString())!=null?r:"Ok",(f=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?f:"Cancel"]}})}function Il(e,t,n){const i=e.slice();return i[69]=t[n],i}function Rl(e,t,n){const i=e.slice();return i[72]=t[n],i}function Nl(e){let t,n,i,s,r,u,f=Object.keys(e[1]),d=[];for(let p=0;pe[40].call(i))},m(p,g){_(p,t,g),_(p,n,g),_(p,i,g),l(i,s);for(let y=0;ye[59].call(Ne)),o(Be,"class","input"),o(Be,"type","number"),o(Ke,"class","input"),o(Ke,"type","number"),o(Re,"class","flex gap-2"),o(Je,"class","input grow"),o(Je,"id","title"),o(Ot,"class","btn"),o(Ot,"type","submit"),o(st,"class","flex gap-1"),o(Qe,"class","input grow"),o(Qe,"id","url"),o(Pt,"class","btn"),o(Pt,"id","open-url"),o(at,"class","flex gap-1"),o(lt,"class","flex flex-col gap-1")},m(c,M){_(c,t,M),_(c,n,M),_(c,i,M),l(i,s),l(i,r),l(i,u),l(i,f),l(i,d),l(i,p),l(i,g),l(i,y),l(i,v),_(c,L,M),_(c,b,M),_(c,W,M),_(c,S,M),l(S,Y),l(Y,H),l(Y,R),R.checked=e[3],l(S,N),l(S,O),l(O,I),l(O,E),E.checked=e[2],l(S,$),l(S,P),l(P,j),l(P,T),T.checked=e[4],l(S,x),l(S,he),l(he,ce),l(he,ee),ee.checked=e[5],l(S,G),l(S,A),l(A,q),l(A,B),B.checked=e[6],l(S,_e),l(S,oe),l(oe,we),l(oe,de),de.checked=e[7],_(c,ke,M),_(c,Ue,M),_(c,Me,M),_(c,Q,M),l(Q,be),l(be,Ee),l(Ee,te),l(Ee,fe),U(fe,e[14]),l(be,Oe),l(be,re),l(re,ne),l(re,le),U(le,e[15]),l(Q,ie),l(Q,ue),l(ue,Pe),l(Pe,Le),l(Pe,X),U(X,e[8]),l(ue,z),l(ue,K),l(K,D),l(K,se),U(se,e[9]),l(Q,qt),l(Q,je),l(je,ft),l(ft,Ft),l(ft,Ce),U(Ce,e[10]),l(je,Vt),l(je,pt),l(pt,xt),l(pt,We),U(We,e[11]),l(Q,Gt),l(Q,qe),l(qe,V),l(V,St),l(V,ye),U(ye,e[12]),l(qe,Ct),l(qe,et),l(et,Wt),l(et,ve),U(ve,e[13]),_(c,mt,M),_(c,ht,M),_(c,_t,M),_(c,ge,M),l(ge,De),l(De,ze),l(ze,tt),l(ze,At),l(ze,nt),l(nt,Tt),l(nt,bt),l(ze,$t),l(ze,Yt),l(Yt,Ei),l(Yt,Xn),l(De,Oi),l(De,Fe),l(Fe,Bt),l(Fe,Pi),l(Fe,Kt),l(Kt,Di),l(Kt,Bn),l(Fe,Ii),l(Fe,Qt),l(Qt,Ri),l(Qt,Kn),l(ge,Ni),l(ge,gt),l(gt,Ve),l(Ve,en),l(Ve,Hi),l(Ve,tn),l(tn,Ui),l(tn,Jn),l(Ve,ji),l(Ve,ln),l(ln,qi),l(ln,Qn),l(gt,Fi),l(gt,xe),l(xe,an),l(xe,Vi),l(xe,on),l(on,xi),l(on,Zn),l(xe,Gi),l(xe,un),l(un,$i),l(un,ei),l(ge,Yi),l(ge,yt),l(yt,Ge),l(Ge,dn),l(Ge,Xi),l(Ge,fn),l(fn,Bi),l(fn,ti),l(Ge,Ki),l(Ge,mn),l(mn,Ji),l(mn,ni),l(yt,Qi),l(yt,$e),l($e,_n),l($e,Zi),l($e,bn),l(bn,el),l(bn,ii),l($e,tl),l($e,yn),l(yn,nl),l(yn,li),l(ge,il),l(ge,vt),l(vt,Ye),l(Ye,wn),l(Ye,ll),l(Ye,kn),l(kn,sl),l(kn,si),l(Ye,al),l(Ye,Ln),l(Ln,ol),l(Ln,ai),l(vt,rl),l(vt,Xe),l(Xe,Sn),l(Xe,ul),l(Xe,Cn),l(Cn,cl),l(Cn,oi),l(Xe,dl),l(Xe,An),l(An,fl),l(An,ri),_(c,ui,M),_(c,ci,M),_(c,di,M),_(c,Et,M),_(c,fi,M),_(c,Ie,M),l(Ie,En),l(En,wt),wt.checked=e[16],l(En,pl),l(Ie,ml),l(Ie,On),l(On,kt),kt.checked=e[17],l(On,hl),l(Ie,_l),l(Ie,Pn),l(Pn,Mt),Mt.checked=e[21],l(Pn,bl),_(c,pi,M),_(c,Re,M),l(Re,Dn),l(Dn,gl),l(Dn,Ne);for(let ae=0;ae=1,g,y,v,L=p&&Nl(e),b=e[1][e[0]]&&Ul(e);return{c(){t=a("div"),n=a("div"),i=a("input"),s=m(),r=a("button"),r.textContent="New window",u=m(),f=a("br"),d=m(),L&&L.c(),g=m(),b&&b.c(),o(i,"class","input grow"),o(i,"type","text"),o(i,"placeholder","New Window label.."),o(r,"class","btn"),o(n,"class","flex gap-1"),o(t,"class","flex flex-col children:grow gap-2")},m(W,S){_(W,t,S),l(t,n),l(n,i),U(i,e[22]),l(n,s),l(n,r),l(t,u),l(t,f),l(t,d),L&&L.m(t,null),l(t,g),b&&b.m(t,null),y||(v=[C(i,"input",e[39]),C(r,"click",e[36])],y=!0)},p(W,S){S[0]&4194304&&i.value!==W[22]&&U(i,W[22]),S[0]&2&&(p=Object.keys(W[1]).length>=1),p?L?L.p(W,S):(L=Nl(W),L.c(),L.m(t,g)):L&&(L.d(1),L=null),W[1][W[0]]?b?b.p(W,S):(b=Ul(W),b.c(),b.m(t,null)):b&&(b.d(1),b=null)},i:F,o:F,d(W){W&&h(t),L&&L.d(),b&&b.d(),y=!1,me(v)}}}function wa(e,t,n){let i=ct.label;const s={[ct.label]:ct},r=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:u}=t,f,d="https://tauri.app",p=!0,g=!1,y=!0,v=!1,L=!0,b=!1,W=null,S=null,Y=null,H=null,R=null,N=null,O=null,I=null,E=1,$=new Ze(O,I),P=new Ze(O,I),j=new ut(W,S),T=new ut(W,S),x,he,ce=!1,ee=!0,G=null,A=null,q="default",B=!1,_e="Awesome Tauri Example!";function oe(){zi(d)}function we(){s[i].setTitle(_e)}function de(){s[i].hide(),setTimeout(s[i].show,2e3)}function ke(){s[i].minimize(),setTimeout(s[i].unminimize,2e3)}function Ue(){gs({multiple:!1}).then(V=>{typeof V=="string"&&s[i].setIcon(V)})}function Me(){if(!f)return;const V=new dt(f);n(1,s[f]=V,s),V.once("tauri://error",function(){u("Error creating new webview")})}function Q(){s[i].innerSize().then(V=>{n(27,j=V),n(8,W=j.width),n(9,S=j.height)}),s[i].outerSize().then(V=>{n(28,T=V)})}function be(){s[i].innerPosition().then(V=>{n(25,$=V)}),s[i].outerPosition().then(V=>{n(26,P=V),n(14,O=P.x),n(15,I=P.y)})}async function Ee(V){!V||(x&&x(),he&&he(),he=await V.listen("tauri://move",be),x=await V.listen("tauri://resize",Q))}async function te(){await s[i].minimize(),await s[i].requestUserAttention(Ci.Critical),await new Promise(V=>setTimeout(V,3e3)),await s[i].requestUserAttention(null)}function fe(){f=this.value,n(22,f)}function Oe(){i=Tl(this),n(0,i),n(1,s)}const re=()=>s[i].center();function ne(){g=this.checked,n(3,g)}function le(){p=this.checked,n(2,p)}function ie(){y=this.checked,n(4,y)}function ue(){v=this.checked,n(5,v)}function Pe(){L=this.checked,n(6,L)}function Le(){b=this.checked,n(7,b)}function X(){O=Z(this.value),n(14,O)}function z(){I=Z(this.value),n(15,I)}function K(){W=Z(this.value),n(8,W)}function D(){S=Z(this.value),n(9,S)}function se(){Y=Z(this.value),n(10,Y)}function qt(){H=Z(this.value),n(11,H)}function je(){R=Z(this.value),n(12,R)}function ft(){N=Z(this.value),n(13,N)}function Ft(){ce=this.checked,n(16,ce)}function Ce(){ee=this.checked,n(17,ee)}function Vt(){B=this.checked,n(21,B)}function pt(){q=Tl(this),n(20,q),n(30,r)}function xt(){G=Z(this.value),n(18,G)}function We(){A=Z(this.value),n(19,A)}function Gt(){_e=this.value,n(29,_e)}function qe(){d=this.value,n(23,d)}return e.$$set=V=>{"onMessage"in V&&n(38,u=V.onMessage)},e.$$.update=()=>{var V,St,ye,Ct,et,Wt,ve,mt,ht,_t,ge,De,ze,tt,At,nt,Tt,it,bt;e.$$.dirty[0]&3&&(s[i],be(),Q()),e.$$.dirty[0]&7&&((V=s[i])==null||V.setResizable(p)),e.$$.dirty[0]&11&&(g?(St=s[i])==null||St.maximize():(ye=s[i])==null||ye.unmaximize()),e.$$.dirty[0]&19&&((Ct=s[i])==null||Ct.setDecorations(y)),e.$$.dirty[0]&35&&((et=s[i])==null||et.setAlwaysOnTop(v)),e.$$.dirty[0]&67&&((Wt=s[i])==null||Wt.setContentProtected(L)),e.$$.dirty[0]&131&&((ve=s[i])==null||ve.setFullscreen(b)),e.$$.dirty[0]&771&&W&&S&&((mt=s[i])==null||mt.setSize(new ut(W,S))),e.$$.dirty[0]&3075&&(Y&&H?(ht=s[i])==null||ht.setMinSize(new $n(Y,H)):(_t=s[i])==null||_t.setMinSize(null)),e.$$.dirty[0]&12291&&(R>800&&N>400?(ge=s[i])==null||ge.setMaxSize(new $n(R,N)):(De=s[i])==null||De.setMaxSize(null)),e.$$.dirty[0]&49155&&O!==null&&I!==null&&((ze=s[i])==null||ze.setPosition(new Ze(O,I))),e.$$.dirty[0]&3&&((tt=s[i])==null||tt.scaleFactor().then($t=>n(24,E=$t))),e.$$.dirty[0]&3&&Ee(s[i]),e.$$.dirty[0]&65539&&((At=s[i])==null||At.setCursorGrab(ce)),e.$$.dirty[0]&131075&&((nt=s[i])==null||nt.setCursorVisible(ee)),e.$$.dirty[0]&1048579&&((Tt=s[i])==null||Tt.setCursorIcon(q)),e.$$.dirty[0]&786435&&G!==null&&A!==null&&((it=s[i])==null||it.setCursorPosition(new Ze(G,A))),e.$$.dirty[0]&2097155&&((bt=s[i])==null||bt.setIgnoreCursorEvents(B))},[i,s,p,g,y,v,L,b,W,S,Y,H,R,N,O,I,ce,ee,G,A,q,B,f,d,E,$,P,j,T,_e,r,oe,we,de,ke,Ue,Me,te,u,fe,Oe,re,ne,le,ie,ue,Pe,Le,X,z,K,D,se,qt,je,ft,Ft,Ce,Vt,pt,xt,We,Gt,qe]}class ka extends Te{constructor(t){super(),Ae(this,t,wa,va,Se,{onMessage:38},null,[-1,-1,-1])}}function ql(e){let t,n,i,s,r,u,f;return{c(){t=a("br"),n=m(),i=a("input"),s=m(),r=a("button"),r.textContent="Write",o(i,"class","input"),o(i,"placeholder","write to stdin"),o(r,"class","btn")},m(d,p){_(d,t,p),_(d,n,p),_(d,i,p),U(i,e[4]),_(d,s,p),_(d,r,p),u||(f=[C(i,"input",e[14]),C(r,"click",e[8])],u=!0)},p(d,p){p&16&&i.value!==d[4]&&U(i,d[4])},d(d){d&&h(t),d&&h(n),d&&h(i),d&&h(s),d&&h(r),u=!1,me(f)}}}function Ma(e){let t,n,i,s,r,u,f,d,p,g,y,v,L,b,W,S,Y,H,R,N,O,I,E,$,P=e[5]&&ql(e);return{c(){t=a("div"),n=a("div"),i=w(`Script: + `),s=a("input"),r=m(),u=a("div"),f=w(`Encoding: + `),d=a("input"),p=m(),g=a("div"),y=w(`Working directory: + `),v=a("input"),L=m(),b=a("div"),W=w(`Arguments: + `),S=a("input"),Y=m(),H=a("div"),R=a("button"),R.textContent="Run",N=m(),O=a("button"),O.textContent="Kill",I=m(),P&&P.c(),o(s,"class","grow input"),o(n,"class","flex items-center gap-1"),o(d,"class","grow input"),o(u,"class","flex items-center gap-1"),o(v,"class","grow input"),o(v,"placeholder","Working directory"),o(g,"class","flex items-center gap-1"),o(S,"class","grow input"),o(S,"placeholder","Environment variables"),o(b,"class","flex items-center gap-1"),o(R,"class","btn"),o(O,"class","btn"),o(H,"class","flex children:grow gap-1"),o(t,"class","flex flex-col childre:grow gap-1")},m(j,T){_(j,t,T),l(t,n),l(n,i),l(n,s),U(s,e[0]),l(t,r),l(t,u),l(u,f),l(u,d),U(d,e[3]),l(t,p),l(t,g),l(g,y),l(g,v),U(v,e[1]),l(t,L),l(t,b),l(b,W),l(b,S),U(S,e[2]),l(t,Y),l(t,H),l(H,R),l(H,N),l(H,O),l(t,I),P&&P.m(t,null),E||($=[C(s,"input",e[10]),C(d,"input",e[11]),C(v,"input",e[12]),C(S,"input",e[13]),C(R,"click",e[6]),C(O,"click",e[7])],E=!0)},p(j,[T]){T&1&&s.value!==j[0]&&U(s,j[0]),T&8&&d.value!==j[3]&&U(d,j[3]),T&2&&v.value!==j[1]&&U(v,j[1]),T&4&&S.value!==j[2]&&U(S,j[2]),j[5]?P?P.p(j,T):(P=ql(j),P.c(),P.m(t,null)):P&&(P.d(1),P=null)},i:F,o:F,d(j){j&&h(t),P&&P.d(),E=!1,me($)}}}function La(e,t,n){const i=navigator.userAgent.includes("Windows");let s=i?"cmd":"sh",r=i?["/C"]:["-c"],{onMessage:u}=t,f='echo "hello world"',d=null,p="SOMETHING=value ANOTHER=2",g="",y="",v;function L(){return p.split(" ").reduce((I,E)=>{let[$,P]=E.split("=");return{...I,[$]:P}},{})}function b(){n(5,v=null);const I=Gn.create(s,[...r,f],{cwd:d||null,env:L(),encoding:g||void 0});I.on("close",E=>{u(`command finished with code ${E.code} and signal ${E.signal}`),n(5,v=null)}),I.on("error",E=>u(`command error: "${E}"`)),I.stdout.on("data",E=>u(`command stdout: "${E}"`)),I.stderr.on("data",E=>u(`command stderr: "${E}"`)),I.spawn().then(E=>{n(5,v=E)}).catch(u)}function W(){v.kill().then(()=>u("killed child process")).catch(u)}function S(){v.write(y).catch(u)}function Y(){f=this.value,n(0,f)}function H(){g=this.value,n(3,g)}function R(){d=this.value,n(1,d)}function N(){p=this.value,n(2,p)}function O(){y=this.value,n(4,y)}return e.$$set=I=>{"onMessage"in I&&n(9,u=I.onMessage)},[f,d,p,g,y,v,b,W,S,u,Y,H,R,N,O]}class za extends Te{constructor(t){super(),Ae(this,t,La,Ma,Se,{onMessage:9})}}var Sa={};He(Sa,{checkUpdate:()=>vs,installUpdate:()=>ys,onUpdaterEvent:()=>Ti});async function Ti(e){return jt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function ys(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(r){if(r.error){t(),i(r.error);return}r.status==="DONE"&&(t(),n())}Ti(s).then(r=>{e=r}).catch(r=>{throw t(),r}),Yn("tauri://update-install").catch(r=>{throw t(),r})})}async function vs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(u){t(),n({manifest:u,shouldUpdate:!0})}function r(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}ss("tauri://update-available",u=>{s(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),Ti(r).then(u=>{e=u}).catch(u=>{throw t(),u}),Yn("tauri://update").catch(u=>{throw t(),u})})}function Ca(e){let t;return{c(){t=a("button"),t.innerHTML='
',o(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){_(n,t,i)},p:F,d(n){n&&h(t)}}}function Wa(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",o(t,"class","btn")},m(s,r){_(s,t,r),n||(i=C(t,"click",e[4]),n=!0)},p:F,d(s){s&&h(t),n=!1,i()}}}function Aa(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",o(t,"class","btn")},m(s,r){_(s,t,r),n||(i=C(t,"click",e[3]),n=!0)},p:F,d(s){s&&h(t),n=!1,i()}}}function Ta(e){let t;function n(r,u){return!r[0]&&!r[2]?Aa:!r[1]&&r[2]?Wa:Ca}let i=n(e),s=i(e);return{c(){t=a("div"),s.c(),o(t,"class","flex children:grow children:h10")},m(r,u){_(r,t,u),s.m(t,null)},p(r,[u]){i===(i=n(r))&&s?s.p(r,u):(s.d(1),s=i(r),s&&(s.c(),s.m(t,null)))},i:F,o:F,d(r){r&&h(t),s.d()}}}function Ea(e,t,n){let{onMessage:i}=t,s;ot(async()=>{s=await jt("tauri://update-status",i)}),Li(()=>{s&&s()});let r,u,f;async function d(){n(0,r=!0);try{const{shouldUpdate:g,manifest:y}=await vs();i(`Should update: ${g}`),i(y),n(2,f=g)}catch(g){i(g)}finally{n(0,r=!1)}}async function p(){n(1,u=!0);try{await ys(),i("Installation complete, restart required."),await Ai()}catch(g){i(g)}finally{n(1,u=!1)}}return e.$$set=g=>{"onMessage"in g&&n(5,i=g.onMessage)},[r,u,f,d,p,i]}class Oa extends Te{constructor(t){super(),Ae(this,t,Ea,Ta,Se,{onMessage:5})}}function Pa(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
+ `,o(t,"class","flex flex-col gap-2")},m(n,i){_(n,t,i)},p:F,i:F,o:F,d(n){n&&h(t)}}}function Da(e,t,n){let{onMessage:i}=t;const s=window.constraints={audio:!0,video:!0};function r(f){const d=document.querySelector("video"),p=f.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${p[0].label}`),window.stream=f,d.srcObject=f}function u(f){if(f.name==="ConstraintNotSatisfiedError"){const d=s.video;i(`The resolution ${d.width.exact}x${d.height.exact} px is not supported by your device.`)}else f.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: ${f.name}`,f)}return ot(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(s);r(f)}catch(f){u(f)}}),Li(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),e.$$set=f=>{"onMessage"in f&&n(0,i=f.onMessage)},[i]}class Ia extends Te{constructor(t){super(),Ae(this,t,Da,Pa,Se,{onMessage:0})}}function Ra(e){let t,n,i,s,r,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=m(),s=a("button"),s.textContent="Hide",o(n,"class","btn"),o(n,"id","show"),o(n,"title","Hides and shows the app after 2 seconds"),o(s,"class","btn"),o(s,"id","hide")},m(f,d){_(f,t,d),l(t,n),l(t,i),l(t,s),r||(u=[C(n,"click",e[0]),C(s,"click",e[1])],r=!0)},p:F,i:F,o:F,d(f){f&&h(t),r=!1,me(u)}}}function Na(e,t,n){let{onMessage:i}=t;function s(){r().then(()=>{setTimeout(()=>{hs().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return _s().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[s,r,i]}class Ha extends Te{constructor(t){super(),Ae(this,t,Na,Ra,Se,{onMessage:2})}}function Fl(e,t,n){const i=e.slice();return i[30]=t[n],i}function Vl(e,t,n){const i=e.slice();return i[33]=t[n],i}function xl(e){let t,n,i,s,r,u,f,d,p,g,y,v,L;function b(N,O){return N[3]?ja:Ua}let W=b(e),S=W(e);function Y(N,O){return N[2]?Fa:qa}let H=Y(e),R=H(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=m(),s=a("span"),r=a("span"),S.c(),f=m(),d=a("span"),d.innerHTML='
',p=m(),g=a("span"),R.c(),o(n,"class","lt-sm:pl-10 text-darkPrimaryText"),o(r,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),o(r,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(d,"title","Minimize"),o(d,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(g,"title",y=e[2]?"Restore":"Maximize"),o(g,"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(N,O){_(N,t,O),l(t,n),l(t,i),l(t,s),l(s,r),S.m(r,null),l(s,f),l(s,d),l(s,p),l(s,g),R.m(g,null),v||(L=[C(r,"click",e[11]),C(d,"click",e[9]),C(g,"click",e[10])],v=!0)},p(N,O){W!==(W=b(N))&&(S.d(1),S=W(N),S&&(S.c(),S.m(r,null))),O[0]&8&&u!==(u=N[3]?"Switch to Light mode":"Switch to Dark mode")&&o(r,"title",u),H!==(H=Y(N))&&(R.d(1),R=H(N),R&&(R.c(),R.m(g,null))),O[0]&4&&y!==(y=N[2]?"Restore":"Maximize")&&o(g,"title",y)},d(N){N&&h(t),S.d(),R.d(),v=!1,me(L)}}}function Ua(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-moon")},m(n,i){_(n,t,i)},d(n){n&&h(t)}}}function ja(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-sun")},m(n,i){_(n,t,i)},d(n){n&&h(t)}}}function qa(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-maximize")},m(n,i){_(n,t,i)},d(n){n&&h(t)}}}function Fa(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-restore")},m(n,i){_(n,t,i)},d(n){n&&h(t)}}}function Va(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){_(n,t,i)},d(n){n&&h(t)}}}function xa(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){_(n,t,i)},d(n){n&&h(t)}}}function Gl(e){let t,n,i,s,r,u,f,d,p;function g(L,b){return L[3]?$a:Ga}let y=g(e),v=y(e);return{c(){t=a("a"),v.c(),n=m(),i=a("br"),s=m(),r=a("div"),u=m(),f=a("br"),o(t,"href","##"),o(t,"class","nv justify-between h-8"),o(r,"class","bg-white/5 h-2px")},m(L,b){_(L,t,b),v.m(t,null),_(L,n,b),_(L,i,b),_(L,s,b),_(L,r,b),_(L,u,b),_(L,f,b),d||(p=C(t,"click",e[11]),d=!0)},p(L,b){y!==(y=g(L))&&(v.d(1),v=y(L),v&&(v.c(),v.m(t,null)))},d(L){L&&h(t),v.d(),L&&h(n),L&&h(i),L&&h(s),L&&h(r),L&&h(u),L&&h(f),d=!1,p()}}}function Ga(e){let t,n;return{c(){t=w(`Switch to Dark mode + `),n=a("div"),o(n,"class","i-ph-moon")},m(i,s){_(i,t,s),_(i,n,s)},d(i){i&&h(t),i&&h(n)}}}function $a(e){let t,n;return{c(){t=w(`Switch to Light mode + `),n=a("div"),o(n,"class","i-ph-sun")},m(i,s){_(i,t,s),_(i,n,s)},d(i){i&&h(t),i&&h(n)}}}function Ya(e){let t,n,i,s,r=e[33].label+"",u,f,d,p;function g(){return e[19](e[33])}return{c(){t=a("a"),n=a("div"),i=m(),s=a("p"),u=w(r),o(n,"class",e[33].icon+" mr-2"),o(t,"href","##"),o(t,"class",f="nv "+(e[1]===e[33]?"nv_selected":""))},m(y,v){_(y,t,v),l(t,n),l(t,i),l(t,s),l(s,u),d||(p=C(t,"click",g),d=!0)},p(y,v){e=y,v[0]&2&&f!==(f="nv "+(e[1]===e[33]?"nv_selected":""))&&o(t,"class",f)},d(y){y&&h(t),d=!1,p()}}}function $l(e){let t,n=e[33]&&Ya(e);return{c(){n&&n.c(),t=Jl()},m(i,s){n&&n.m(i,s),_(i,t,s)},p(i,s){i[33]&&n.p(i,s)},d(i){n&&n.d(i),i&&h(t)}}}function Yl(e){let t,n=e[30].html+"",i;return{c(){t=new Ws(!1),i=Jl(),t.a=i},m(s,r){t.m(n,s,r),_(s,i,r)},p(s,r){r[0]&64&&n!==(n=s[30].html+"")&&t.p(n)},d(s){s&&h(i),s&&t.d()}}}function Xa(e){let t,n,i,s,r,u,f,d,p,g,y,v,L,b,W,S,Y,H,R,N,O,I,E,$,P,j,T=e[1].label+"",x,he,ce,ee,G,A,q,B,_e,oe,we,de,ke,Ue,Me,Q,be,Ee,te=e[5]&&xl(e);function fe(z,K){return z[0]?xa:Va}let Oe=fe(e),re=Oe(e),ne=!e[5]&&Gl(e),le=e[7],ie=[];for(let z=0;z`,y=m(),v=a("a"),v.innerHTML=`GitHub + `,L=m(),b=a("a"),b.innerHTML=`Source + `,W=m(),S=a("br"),Y=m(),H=a("div"),R=m(),N=a("br"),O=m(),I=a("div");for(let z=0;z',Ue=m(),Me=a("div");for(let z=0;z{Mi(D,1)}),Ps()}ue?(G=new ue(Pe(z)),Pl(G.$$.fragment),wi(G.$$.fragment,1),ki(G,ee,null)):G=null}if(K[0]&64){Le=z[6];let D;for(D=0;D{W(`File drop: ${JSON.stringify(A.payload)}`)});const s=navigator.userAgent.toLowerCase(),r=s.includes("android")||s.includes("iphone"),u=[{label:"Welcome",component:la,icon:"i-ph-hand-waving"},{label:"Communication",component:ca,icon:"i-codicon-radio-tower"},!r&&{label:"CLI",component:oa,icon:"i-codicon-terminal"},!r&&{label:"Notifications",component:ma,icon:"i-codicon-bell-dot"},!r&&{label:"App",component:Ha,icon:"i-codicon-hubot"},!r&&{label:"Window",component:ka,icon:"i-codicon-window"},{label:"Shell",component:za,icon:"i-codicon-terminal-bash"},!r&&{label:"Updater",component:Oa,icon:"i-codicon-cloud-download"},{label:"WebRTC",component:Ia,icon:"i-ph-broadcast"}];let f=u[0];function d(A){n(1,f=A)}let p;ot(async()=>{const A=Fn();n(2,p=await A.isMaximized()),jt("tauri://resize",async()=>{n(2,p=await A.isMaximized())})});function g(){Fn().minimize()}async function y(){const A=Fn();await A.isMaximized()?A.unmaximize():A.maximize()}let v;ot(()=>{n(3,v=localStorage&&localStorage.getItem("theme")=="dark"),Bl(v)});function L(){n(3,v=!v),Bl(v)}let b=Is([]);zs(e,b,A=>n(6,i=A));function W(A){b.update(q=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof A=="string"?A:JSON.stringify(A,null,1))+"
"},...q])}function S(A){b.update(q=>[{html:`
[${new Date().toLocaleTimeString()}]: `+A+"
"},...q])}function Y(){b.update(()=>[])}let H,R,N;function O(A){N=A.clientY;const q=window.getComputedStyle(H);R=parseInt(q.height,10);const B=oe=>{const we=oe.clientY-N,de=R-we;n(4,H.style.height=`${de{document.removeEventListener("mouseup",_e),document.removeEventListener("mousemove",B)};document.addEventListener("mouseup",_e),document.addEventListener("mousemove",B)}let I;ot(async()=>{n(5,I=await ds()==="win32")});let E=!1,$,P,j=!1,T=0,x=0;const he=(A,q,B)=>Math.min(Math.max(q,A),B);ot(()=>{n(17,$=document.querySelector("#sidebar")),P=document.querySelector("#sidebarToggle"),document.addEventListener("click",A=>{P.contains(A.target)?n(0,E=!E):E&&!$.contains(A.target)&&n(0,E=!1)}),document.addEventListener("touchstart",A=>{if(P.contains(A.target))return;const q=A.touches[0].clientX;(0{if(j){const q=A.touches[0].clientX;x=q;const B=(q-T)/10;$.style.setProperty("--translate-x",`-${he(0,E?0-B:18.75-B,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(j){const A=(x-T)/10;n(0,E=E?A>-(18.75/2):A>18.75/2)}j=!1})});const ce=()=>zi("https://tauri.app/"),ee=A=>{d(A),n(0,E=!1)};function G(A){yi[A?"unshift":"push"](()=>{H=A,n(4,H)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const A=document.querySelector("#sidebar");A&&Ba(A,E)}},[E,f,p,v,H,I,i,u,d,g,y,L,b,W,S,Y,O,$,ce,ee,G]}class Ja extends Te{constructor(t){super(),Ae(this,t,Ka,Xa,Se,{},null,[-1,-1])}}new Ja({target:document.querySelector("#app")}); diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index 16b99f6edf1..c12c494e8c5 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -7,10 +7,8 @@ import Welcome from './views/Welcome.svelte' import Cli from './views/Cli.svelte' import Communication from './views/Communication.svelte' - import Http from './views/Http.svelte' import Notifications from './views/Notifications.svelte' import Window from './views/Window.svelte' - import Shortcuts from './views/Shortcuts.svelte' import Shell from './views/Shell.svelte' import Updater from './views/Updater.svelte' import WebRTC from './views/WebRTC.svelte' @@ -42,11 +40,6 @@ component: Cli, icon: 'i-codicon-terminal' }, - { - label: 'HTTP', - component: Http, - icon: 'i-ph-globe-hemisphere-west' - }, !isMobile && { label: 'Notifications', component: Notifications, @@ -62,11 +55,6 @@ component: Window, icon: 'i-codicon-window' }, - !isMobile && { - label: 'Shortcuts', - component: Shortcuts, - icon: 'i-codicon-record-keys' - }, { label: 'Shell', component: Shell, diff --git a/examples/api/src/views/Http.svelte b/examples/api/src/views/Http.svelte deleted file mode 100644 index 16e6d47c4b9..00000000000 --- a/examples/api/src/views/Http.svelte +++ /dev/null @@ -1,99 +0,0 @@ - - -
- -
-