From 44232d09ad7f5985779147664b5dde9b57a3f5b2 Mon Sep 17 00:00:00 2001 From: Ondrej Tuma Date: Wed, 8 Mar 2023 17:30:24 +0100 Subject: [PATCH] Static web update - fixes --- Prusa-Link-Web | 2 +- prusa/link/static/index.html | 2 +- ...ain.c6c0262e61cc666a7f80.js => main.e5f614e6d7448007932f.js} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename prusa/link/static/{main.c6c0262e61cc666a7f80.js => main.e5f614e6d7448007932f.js} (57%) diff --git a/Prusa-Link-Web b/Prusa-Link-Web index 987ee7fd..e56c1951 160000 --- a/Prusa-Link-Web +++ b/Prusa-Link-Web @@ -1 +1 @@ -Subproject commit 987ee7fdbed7da109418c267da3832f2ca598c4e +Subproject commit e56c19514e26d55e47590b9b8c862ab5da6f68ff diff --git a/prusa/link/static/index.html b/prusa/link/static/index.html index e4e7f4b5..f30cb99a 100644 --- a/prusa/link/static/index.html +++ b/prusa/link/static/index.html @@ -1 +1 @@ -PrusaLink

Printer status

NA

Nozzle Temperature

NA / NA

Heatbed

NA / NA

Printing Speed

NA

Z - Height

NA

Nozzle Diameter

NA

+PrusaLink

Printer status

NA

Nozzle Temperature

NA / NA

Heatbed

NA / NA

Printing Speed

NA

Z - Height

NA

Nozzle Diameter

NA

diff --git a/prusa/link/static/main.c6c0262e61cc666a7f80.js b/prusa/link/static/main.e5f614e6d7448007932f.js similarity index 57% rename from prusa/link/static/main.c6c0262e61cc666a7f80.js rename to prusa/link/static/main.e5f614e6d7448007932f.js index c5f13b7a..45a24e7c 100644 --- a/prusa/link/static/main.c6c0262e61cc666a7f80.js +++ b/prusa/link/static/main.e5f614e6d7448007932f.js @@ -1 +1 @@ -(()=>{var e={5862:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"f844a0a85dde310826fce450c3e149d3.svg"},340:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"d0ce7d704590cb0b868ae92249ee86e8.svg"},3246:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"e6e0734bc2dad609a3e92f1873412f11.svg"},6730:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"557f3616d5a1b407b59795b8328bb51f.svg"},8065:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"2e842fcb7b83af8e1e0d26afd80f8fd9.svg"},2456:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"f6a7f34a841f532dd1e3e4d610d164f6.svg"},9819:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"53df9c11e268c2390b147239f9ee8796.svg"},7038:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"9332c323b291ba7226ddcdabb0c8e7c4.svg"},1656:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"79e90794ba3b36a64a12414decda0932.svg"},931:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"926f52aea63cfd597b30096bfe4077c6.svg"},7336:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"44b654f4ca724e154a9bc60335e98847.svg"},9387:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"8657650f85be23655543d28f58941616.svg"},5300:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"ea93bcffb8771234f8c641f3b7e9f848.svg"},3482:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"ccd215a92d0427a21339a8c38e2a40f3.svg"},5515:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"997c391425907810b4a6e42663d11fd4.svg"},4578:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"24e2e49c87df140cf16aa18b4e261f12.svg"},2e3:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"58151992d28dfb34ee417e0ebf6a66b6.svg"},2290:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"c8a0ca767f73685bbe06863f81e9d3cb.svg"},3174:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"39e93870e6b8fd4ef2d9ed668f8c1545.svg"},8796:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"1218694688ee15ee97bcded9e1a75cc8.svg"},1373:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"dfb811cc28f8e3d7c14bcedbe7ef35b8.svg"},4622:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"b891ace1622f34bac5a2b4edb7adc733.svg"},5464:(e,t,a)=>{var n=a(7091),s=a(8065),i=a(4622),l=a(6730),o='

  • Camera Name

    -

  • Snapshot Time

    -

    ';e.exports=o},3478:(e,t,a)=>{var n=a(7091),s=a(340),i=a(5862),l=a(1656),o=n(s),r=n(i),d=n(l),c='

    printer coordinates

    X axis

    0 mm

    Y axis

    0 mm

    Z axis

    0 mm

    stepper motors

    heated bed X and Y move

    move step [mm]

    nozzle Z move

    extruder

    extrude/retract step [mm]

    nozzle temperature

    0°C

    speed

    100%

    heated bed temperature

    0°C

    flow

    100%

    ';e.exports=c},2373:(e,t,a)=>{var n=a(7091),s=a(2e3),i=a(2290),l=a(3246),o=a(4578),r=a(7038),d=a(2456),c=a(9819),u=a(9387),p=a(5300),m=a(3482),v=a(4622),g=a(6730),h=a(3174),b=a(8796),f=n(s),y=n(i),x=n(l),w=n(o),k=n(r),S=n(d),z=n(c),E=n(u),P=n(p),L=n(m),I=n(v),_=n(g),T='

    Upload file

    Add file from

     

    Click to choose a *.sl1 file or drag it here

    Source URL

    Type URL of G-CODE file

    File name

    Type or edit file name

    Progress

    NA

    Size

    NA

    Download Started

    NA

    Remaining Time

    NA

    Autostart

    NA

    Temperatures

    Cameras

    • -

    • -

    ';e.exports=T},7189:(e,t,a)=>{var n=a(7091),s=a(2e3),i=a(2290),l=a(3246),o=a(4578),r=a(7038),d=a(2456),c=a(9819),u=a(9387),p=a(5300),m=a(3482),v=a(4622),g=a(6730),h=a(931),b=a(5515),f=a(3174),y=a(8796),x=a(8065),w=n(s),k=n(i),S=n(l),z=n(o),E=n(r),P=n(d),L=n(c),I=n(u),_=n(p),T=n(m),N=n(v),j=n(g),A=n(h),C=n(b),B='

    Local

    0%

    0 GB of 0 GB free

    Add file from

     

    Click to choose a *.sl1 file or drag it here

    Source URL

    Type URL of G-CODE file

    File name

    Type or edit file name

    Progress

    NA

    Size

    NA

    Download Started

    NA

    Remaining Time

    NA

    Autostart

    NA

    ';e.exports=B},5198:(e,t,a)=>{var n=a(7091),s=a(4622),i=a(6730),l='

    ';e.exports=l},2936:(e,t,a)=>{var n=a(7091),s=a(7038),i=a(7336),l=a(1373),o=n(s),r=n(i),d=n(l),c='

    version

    api

    hostname

    firmware

    server

    text

    sdk

    frontend

    3.12.0

    system version

    updates

    connection

    PRUSA CONNECT

    connection status

    Successfully connected

    3D printer connection status

    Successfully connected

    printer

    printer name

    printer location

    user

    username

    new password

    repeat password

    current password

    serial number

    serial number

    api key

    api key

    logs

    select file

    • No log file is selected!
    ';e.exports=c},7091:e=>{"use strict";e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(t.hash&&(e+=t.hash),t.maybeNeedQuotes&&/[\t\n\f\r "'=<>`]/.test(e)?'"'.concat(e,'"'):e)}},6648:(e,t,a)=>{"use strict";a.d(t,{LK:()=>r,Z5:()=>v,gJ:()=>p,iT:()=>d,wU:()=>l});var n=a(8236),s=a(1351);const i=()=>new Promise(((e,t)=>{(0,n.o)((e=>t=>{const a=document.getElementById("modal-apiKey"),n=document.importNode(a.content,!0);return n.getElementById("apiKey").addEventListener("keydown",(a=>{"Enter"==a.key&&(t(),e(a.target.value))})),n.getElementById("login").addEventListener("click",(a=>{a.preventDefault();let n=document.getElementById("apiKey").value;t(),e(n)})),n})(e),{timeout:0,closeOutside:!1})})).then((e=>sessionStorage.setItem("apiKey",e))),l=(e="application/json")=>"ApiKey"==sessionStorage.getItem("authType")?{"X-Api-Key":sessionStorage.getItem("apiKey"),Accept:e}:{Accept:e},o=()=>new Promise(((e,t)=>(sessionStorage.setItem("auth","pending"),fetch("/api/v1/info",{headers:l()}).then((t=>{if(401==t.status){const a=t.headers.get("WWW-Authenticate").split(" ")[0];return sessionStorage.setItem("authType",a),sessionStorage.removeItem("apiKey"),"ApiKey"==a?i().then((()=>o().then((t=>e(t))))):o().then((t=>e(t)))}{const e=t.json();return 200!=t.status&&e.then((e=>(0,s.S)({data:e}))),e}})).then((t=>{sessionStorage.setItem("auth","true"),e(t)}))))),r=(e,t={})=>c(e,t,"application/json","json"),d=(e,t={})=>c(e,t,"text/plain","text");async function c(e,t={},a,n){if("true"!=sessionStorage.getItem("auth"))throw{code:401};{t.headers={...t.headers,...l(a)};const s=await fetch(e,t),i=s.status,o={code:i,eTag:s.headers.get("etag")};switch(i){case 401:throw sessionStorage.setItem("auth","false"),o;case 204:case 304:return o;default:const e=await s.text();if(!s.ok){if(e.length>0)try{o.data=JSON.parse(e)}catch{}throw o.data=o.data||{title:`Error ${i}`,message:s.statusText},o}return o.data="json"===n?0===e.length?{}:JSON.parse(e):e,o}}}const u=(e,t,a)=>new Promise(((n,s)=>{"true"==sessionStorage.getItem("auth")?(t.headers={...l(),...t.headers},fetch(a?`${e}?ct=${a}`:e,t).then((e=>{401==e.status&&(sessionStorage.setItem("auth","false"),s(e)),e.ok?e.blob().then((t=>n({url:URL.createObjectURL(t),headers:e.headers}))):s(e)})).catch((e=>s(e)))):s()})),p=(e,t,a={})=>u(e,{...a,headers:{...a.headers,Accept:"image/*"}},t),m=e=>{const t=document.getElementById("modal-welcome"),a=document.importNode(t.content,!0);return a.querySelector(".close-button").addEventListener("click",e),a},v=()=>null==localStorage.getItem("showWelcome")?new Promise(((e,t)=>{(0,n.o)(m,{closeCallback:()=>{localStorage.setItem("showWelcome",!0),e()}})})).then((()=>o())):o()},1972:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n=function(e,t){let a=document.createElement("a");a.href=e,a.download=t||"",a.click(),a.remove()}},646:(e,t,a)=>{"use strict";function n(e,t=!0){e&&(t&&!e.hasAttribute("hidden")&&e.setAttribute("hidden",!0),!t&&e.hasAttribute("hidden")&&e.removeAttribute("hidden"))}function s(e,t=!0){n(e,!t)}function i(e,t=!0){e&&(t&&!e.hasAttribute("disabled")&&e.setAttribute("disabled",!0),!t&&e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}function l(e,t=!0){return i(e,!t)}function o(){s(document.querySelector("#job .loading-overlay"))}function r(){n(document.querySelector("#job .loading-overlay"))}function d(e,...t){const a=n=>{if(t)for(const e of t)if(e&&e.contains(n.target))return;e&&e(),window.removeEventListener("pointerup",a)};window.addEventListener("pointerup",a)}a.d(t,{H:()=>i,QH:()=>n,QP:()=>o,Ti:()=>d,Zk:()=>r,gL:()=>l,yx:()=>s})},5537:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n=function(e){return"string"==typeof e?document.getElementById(e):e||document.body}},9741:e=>{e.exports=function(e,t){let a=t.split("."),n=e;for(const e of a)if(n=n[e],!n)break;return n}},7780:(e,t,a)=>{"use strict";a.d(t,{G3:()=>v,Iu:()=>h,Vb:()=>g,m0:()=>m,ot:()=>f});var n=a(5537),s=a(9741),i=a.n(s);const l=a(4977),o=l.langs,r=l.texts,d=o.indexOf("en");let c,u;function p(){return navigator.language||navigator.userLanguage||""}function m(e){const t=o.indexOf(e);return-1!==t&&(u=t,c=e,localStorage.setItem("lang",c),!0)}function v(){return c}function g(){return[...o]}function h(e,t){let a=i()(r,`${e}.${u}`);if(!a)return a=i()(r,`${e}.${d}`),a||(a=e),b(a,t),a;let n=null;if(t&&(n=Object.assign({},t),delete n.query,delete n.ref),n&&Object.keys(n).length>0){let e,n=a,s=/{{(.*?)}}/g;for(;e=s.exec(a);){let s=a.substr(e.index+2,e[0].length-4);if("query"!==s&&"ref"!==s)if(s in t){let a=t[s];n=n.replace(e[0],a)}else 0}a=n}return b(a,t),a}function b(e,t){if(t)if(t.ref){t.ref.innerHTML=e}else if(t.query){let a=document.querySelector(t.query);a?a.innerHTML=e:console.warn(`cannot find element with "${t.query}" query`)}}function f(e){(0,n.Z)(e).querySelectorAll('[data-label]:not([data-label=""])').forEach((e=>{const t=h(e.getAttribute("data-label")),a=e.getAttribute("data-label-target");a?e.setAttribute(a,t):e.innerHTML=t}))}m(localStorage.getItem("lang"))||m(p().toLowerCase())||m(p().toLowerCase().split("-")[0])||m("en")},2451:(e,t,a)=>{"use strict";a.d(t,{Z:()=>L});var n=a(6648),s=a(646),i=a(7780),l=a(3707),o=a(8236),r=a(5412),d=a(1351);let c=!1,u=null,p=[];const m={TEN_SEC:"TEN_SEC",THIRTY_SEC:"THIRTY_SEC",SIXTY_SEC:"SIXTY_SEC",EACH_LAYER:"EACH_LAYER",FIFTH_LAYER:"FIFTH_LAYER",MANUAL:"MANUAL"},v=e=>{switch(e){case m.TEN_SEC:return(0,i.Iu)("cameras.trigger-scheme.ten-sec");case m.THIRTY_SEC:return(0,i.Iu)("cameras.trigger-scheme.thirty-sec");case m.SIXTY_SEC:return(0,i.Iu)("cameras.trigger-scheme.sixty-sec");case m.EACH_LAYER:return(0,i.Iu)("cameras.trigger-scheme.each-layer");case m.FIFTH_LAYER:return(0,i.Iu)("cameras.trigger-scheme.fifth-layer");case m.MANUAL:return(0,i.Iu)("cameras.trigger-scheme.manual");default:return`${e}`}},g=()=>(0,l.Vp)((0,i.Iu)("ntf.success"),(0,i.Iu)("ntf.camera-suc")),h=(e,t=E)=>{c=e.connection.states.connect.ok,(0,n.LK)("/api/v1/cameras").then((e=>{const a=(e?.data?.camera_list||[]).map((e=>{let t=p.find((t=>t.id===e.camera_id))||{};return e.camera_id===u&&(e.connected||(u=null)),{id:e.camera_id,config:e.config,connected:e.connected,detected:e.detected,stored:e.stored,registered:e.registered,nextSnapshotAt:t?.nextSnapshotAt,lastSnapshotAt:t?.lastSnapshotAt,lastSnapshotUrl:t?.lastSnapshotUrl}})),n=p.filter((e=>!a.find((t=>e.id===t.id))));t&&t(a,n),p=a})).catch(d.S),p.filter((e=>e.connected)).forEach((e=>y(e.id)))},b=e=>`camera_${e}`,f=e=>document.getElementById(b(e)),y=e=>{const t=p.find((t=>t.id===e));if(!t)return;const a=new Date;t.lastSnapshotAt&&t.nextSnapshotAt&&a{const i=p.find((t=>t.id===e)),l=b(e),o=document.querySelector(`#${l} .camera__no-snapshot`),r=document.querySelector(`#${l} .camera__snapshot`);if(o&&(0,s.yx)(o,!1),r&&((0,s.yx)(r,!0),r.src=t),i){const e=`${n.get("cache-control")}`.match(/max-age=(\d+)/);let s;e&&(s=parseInt(e[1],10)),s||(s=11);const l=n.get("expires"),o=n.get("last-modified"),r=e=>{const t=new Date;return new Date(t.getTime()+1e3*e)};i.nextSnapshotAt=l?new Date(l):r(s),i.nextSnapshotAt{e||(e=u);const t=e?p.find((t=>t.id===e)):null,a=document.getElementById("camera-snapshot-picture"),n=document.getElementById("camera-snapshot-time"),s=document.getElementById("camera-snapshot-name"),[i,l,o,r]=t?.lastSnapshotAt?[t.id,t.config.name,t.lastSnapshotAt.toLocaleString(),t.lastSnapshotUrl]:[null,"-","-",""];u=i,a&&(a.src=r),n&&(n.innerText=o),s&&(s.innerText=l)},w=(e,t,a=!1)=>{e.querySelector(".camera__name").innerText=t.config.name,e.querySelector(".camera__path").innerText=t.config.path,e.querySelector(".camera__driver").innerText=t.config.driver,e.querySelector(".camera__cloud").innerText=t.registered?(0,i.Iu)("camera.cloud.linked"):(0,i.Iu)("camera.cloud.not-linked");const n=e.querySelector(".camera__register"),l=e.querySelector(".camera__unregister"),o=e.querySelector(".camera__add"),r=e.querySelector(".camera__remove"),d=e.querySelector(".camera__settings");(0,s.yx)(n,c&&t.connected&&!t.registered),(0,s.yx)(l,c&&t.connected&&t.registered),(0,s.yx)(o,!1),(0,s.yx)(r,!t.connected),(0,s.yx)(d,t.connected),a&&(o.title=(0,i.Iu)("camera.btn.connect"),d.title=(0,i.Iu)("camera.btn.settings"),n.title=(0,i.Iu)("camera.btn.link"),l.title=(0,i.Iu)("camera.btn.unlink"),o.addEventListener("click",(e=>{e.stopPropagation(),S(t.id)}),!1),r.addEventListener("click",(e=>{e.stopPropagation(),z(t.id)}),!1),d.addEventListener("click",(e=>{e.stopPropagation(),P(t.id)}),!1),n.addEventListener("click",(e=>{e.stopPropagation(),k(t.id,"POST")}),!1),l.addEventListener("click",(e=>{e.stopPropagation(),k(t.id,"DELETE")}),!1))},k=(e,t)=>{(0,n.LK)(`/api/v1/cameras/${e}/connection`,{method:t}).then((()=>g())).catch(d.S)},S=e=>{const t=p.find((t=>t.id===e));t&&(0,n.LK)(`/api/v1/cameras/${t.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:t.config})}).then((()=>g())).catch(d.S)},z=e=>{const t=p.find((t=>t.id===e));t&&(0,n.LK)(`/api/v1/cameras/${t.id}`,{method:"DELETE"}).then((()=>g())).catch(d.S)},E=(e,t)=>{const a=document.getElementById("cameras-list");t.forEach((e=>{const t=f(e.id);t&&a.removeChild(t)})),e.sort(((e,t)=>t.connected-e.connected)).forEach((e=>{const t=f(e.id);if(t)w(t,e);else{const t=(e=>{const t=document.getElementById("camera-list-item")?.content;if(!t)return null;const a=document.importNode(t,!0),n=a.querySelector("li"),l=e.id;return n.addEventListener("click",(e=>{const t=p.find((e=>e.id===l));t&&t.connected&&x(t.id),e.preventDefault()}),!1),n.id=b(e.id),a.querySelector(".camera__path__label").innerText=(0,i.Iu)("camera.path"),a.querySelector(".camera__driver__label").innerText=(0,i.Iu)("camera.driver"),a.querySelector(".camera__cloud__label").innerText=(0,i.Iu)("camera.cloud.label"),(0,s.yx)(a.querySelector(".camera__snapshot"),!1),w(a,e,!0),a})(e);t&&a.appendChild(t)}}))},P=e=>new Promise(((t,a)=>{(0,o.o)(((e,t)=>t=>{const a=`/api/v1/cameras/${e}`,s=document.getElementById("modal-camera-settings"),o=document.importNode(s.content,!0),c=o.getElementById("camera-settings__name"),u=r.L.init(o.getElementById("camera-settings__resolution"),"camera-settings__resolution"),p=r.L.init(o.getElementById("camera-settings__trigger-scheme"),"camera-settings__trigger-scheme"),g=o.getElementById("yes");return(0,n.LK)(a).then((e=>{const s=e.data,o=s.available_resolutions.sort(((e,t)=>e.width===t.width?t.height-e.height:t.width-e.width)).map(((e,t)=>`${e.width}x${e.height}`)),r=Object.keys(m),h=r.map((e=>v(e)));c.value=s.name,u.setOptions(o),u.value=`${s.resolution.width}x${s.resolution.height}`,p.setOptions(h),p.value=v(s.trigger_scheme),g.addEventListener("click",(()=>{const[e,s]=u.value.split("x").map((e=>parseInt(e))),o=r[h.indexOf(p.value)];(0,n.LK)(`${a}/config`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.value,resolution:{width:e,height:s},trigger_scheme:o})}).then((()=>(0,l.Vp)((0,i.Iu)("ntf.success"),(0,i.Iu)("ntf.camera-config-success")))).catch(d.S).finally(t)}))})).catch(d.S),o.getElementById("no").addEventListener("click",(()=>t())),o})(e),{timeout:0,closeOutside:!1})})).then((()=>{lastUpdated=null,h()})),L={load:e=>{p=[],(0,i.Iu)("cameras.link",{query:"#title-status-label"}),h(e)},update:h,getCameraNode:f,getCameraNodeId:b,updateCurrentCamera:x}},732:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(7780),s=a(646),i=a(5489),l=a(6648);var o=a(1351);let r=1,d=1;const c=e=>{(0,i.ZP)("control",{temperature:e.printer.temperature,telemetry:e.printer.telemetry,job:e.current}),function(e,t,a){const n=document.querySelectorAll("#control button"),i=["extrude","retract"],l=["flowrate","bed","nozzle","speed"],o=[...l,...i,"move-step","extrude-retract-step","heated-bed-xy-move"];if(e.flags.printing||e.flags.pausing||e.flags.paused){const t=e.flags.paused?o:l;n.forEach((e=>{const a=e.id||e.parentNode.id||e.parentNode.parentNode.id;(0,s.H)(e,!t.includes(a))}))}const r=t&&a&&t["temp-nozzle"]>=a.min_extrusion_temp;i.forEach((e=>(0,s.H)(document.getElementById(e),!r)))}(e.printer.state,e.printer.telemetry,e.version)};function u(e,t){if("move"===e){(e=>(0,l.LK)("/api/printer/printhead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"jog",...e})}))(function(e){const t=e.includes("-"),a=e.replace(RegExp("[+-]"),"");return a?{[a]:t?-r:r}:(console.error(`"${e}" is not valid direction`),{})}(t)).catch((e=>(0,o.S)(e)))}else if("home"===e){(e=>(0,l.LK)("/api/printer/printhead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"home",axes:e})}))(t.split(",")).catch((e=>(0,o.S)(e)))}}function p(e,t,a){function n(e){return Number.parseFloat(e.getAttribute("data-step"))}if(e){const i=e.querySelectorAll("button[data-step]"),l=e=>{i.forEach((t=>{n(t)===e?((0,s.H)(t),t.setAttribute("selected",!0)):((0,s.gL)(t),t.hasAttribute("selected")&&t.removeAttribute("selected"))}))};i.forEach((e=>{const t=n(e);isNaN(t)||(e.onclick=()=>{l(t),a(t)})})),l(t)}}const m={load:e=>{(0,n.Iu)("control.title",{query:"#title-status-label"}),function(e){function t(e,t){switch(e){case"bed":return n=t,(0,l.LK)("/api/printer/bed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"target",target:n})});case"flowrate":return a=t,(0,l.LK)("/api/printer/tool",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"flowrate",factor:a})});case"nozzle":return(e=>(0,l.LK)("/api/printer/tool",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"target",targets:{tool0:e}})}))(t);case"speed":return(e=>(0,l.LK)("/api/printer/printhead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"speed",factor:e})}))(t);default:throw Error("Unknown property!")}var a,n}e&&e.querySelectorAll(".input-wrapper").forEach((e=>{const a=e.querySelector("input"),n=e.querySelector("button");if(a){const e=()=>{const e=a.getAttribute("data-action"),n=Number.parseFloat(a.value);isNaN(n)||t(e,n).then((e=>{a.value=""})).catch((e=>(0,o.S)(e)))};a.onkeyup=t=>{"Enter"===t.key&&(e(),a.blur())},n&&(n.onclick=e)}}))}(document.querySelector("#control")),p(document.querySelector("#control #move-step"),r,(e=>r=e)),p(document.querySelector("#control #extrude-retract-step"),d,(e=>d=e)),function(){const e=document.querySelector("#control #disable-steppers");e&&(e.onclick=()=>{(0,l.LK)("/api/printer/printhead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"disable_steppers"})}).catch((e=>(0,o.S)(e)))})}(),function(){const e=document.querySelector("#control #extrude");e&&(e.onclick=()=>{var e;(e=d,(0,l.LK)("/api/printer/tool",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"extrude",amount:e})})).catch((e=>(0,o.S)(e)))})}(),function(){const e=document.querySelector("#control #retract");e&&(e.onclick=()=>{var e;(e=d,(0,l.LK)("/api/printer/tool",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"extrude",amount:-e})})).catch((e=>(0,o.S)(e)))})}(),function(){const e=document.querySelector("#control #heated-bed-xy-move");e&&e.querySelectorAll("button[data-action]").forEach((e=>{e.onclick=()=>{u(e.getAttribute("data-action"),e.getAttribute("data-value"))}}))}(),function(){const e=document.querySelector("#control #nozzle-z-move");e&&e.querySelectorAll("button[data-action]").forEach((e=>{e.onclick=()=>{u(e.getAttribute("data-action"),e.getAttribute("data-value"))}}))}(),c(e)},update:c}},5502:(e,t,a)=>{"use strict";a.d(t,{Z:()=>z});var n=a(7780);const s=(0,n.Iu)("prop.at"),i=(0,n.Iu)("unit.h"),l=(0,n.Iu)("prop.less-than"),o=(0,n.Iu)("unit.min"),r=((0,n.Iu)("unit.ml"),(0,n.Iu)("unit.rpm")),d=(0,n.Iu)("prop.today-at"),c=(0,n.Iu)("prop.tmw-at"),u=(0,n.Iu)("unit.b"),p=(0,n.Iu)("unit.kb"),m=(0,n.Iu)("unit.mb"),v=(0,n.Iu)("unit.gb"),g=(0,n.Iu)("prop.true"),h=(0,n.Iu)("prop.false");function b(e,t=!0,a=1){return e>0?t?e.toFixed(a):e:0}function f(e){const t=new Date(1e3*e);var a=localStorage.getItem("lang");return(t.toLocaleDateString(a,{year:"numeric",month:"numeric",day:"numeric"})+" "+t.toLocaleTimeString(a,{hour:"numeric",minute:"numeric"})).substring(0,25)}function y(e){let t="00:00";if(e){let a=new Date,n=new Date(a.getTime()+1e3*e),i=new Date(a);i.setDate(i.getDate()+1);let l="";if(n.getDate()==a.getDate()&&n.getMonth()==a.getMonth())l=`${d} `;else if(n.getDate()==i.getDate()&&n.getMonth()==i.getMonth())l=`${c} `;else{let e={month:"numeric",day:"numeric"};l=`${n.toLocaleString(window.navigator.language,e)} ${s} `}t=l+("0"+n.getHours()).substr(-2)+":"+("0"+n.getMinutes()).substr(-2)}return t}function x(e){if(e<60)return l;const t=Math.floor(e/60%60),a=Math.floor(e/3600);return(a>0?`${a} ${i}`:"")+(t>0?` ${t} ${o}`:"")}function w(e){let t=e;const a=[u,p,m,v];for(let e=0;e{if(void 0===t||null===t&&"progress"!==e)return(0,n.Iu)("prop.na");switch(e){case"number":return b(t);case"temp":return b(t)+" °C";case"temp_int":return b(t,0)+"°C";case"fan":return b(t)+` ${r}`;case"print":return b(t||0,!0,0)+"%";case"pos":return b(t)+" mm";case"date":return f(t);case"time":return x(t);case"timeEst":return y(t);case"progress":return b(100*(t||0),!0,0)+"%";case"percent":return`${b(t||0,!0,0)}%`;case"material":return t||(0,n.Iu)("prop.na");case"size":return w(t);case"boolean":return k(t);case"diameter":return b(t,!0,2)+" mm";default:return t}},z=(e,t)=>S(e,t)},5412:(e,t,a)=>{"use strict";a.d(t,{L:()=>s});var n=a(5537);class s{set value(e){this._value=e,this.updateLabel()}get value(){return this._value}constructor(e,t,a){const n=this;this._label=t,this._ul=a,this._value=t.innerHTML,this.is_open=!1,this._options=[],this._onKeyDown=e=>{if(n.is_open){switch(e.key.toLowerCase()){case"escape":return void n.close();case"arrowdown":let e=!1;for(const t of this._ul.childNodes){if(e){this._highlight(t);break}t.classList?.contains("select")&&(e=!0)}break;case"arrowup":let t=null;for(const e of this._ul.childNodes){if(e.classList?.contains("select")){t&&this._highlight(t);break}t=e}break;case"enter":for(const e of this._ul.childNodes)if(e.classList.contains("select")){const t=e.innerText;this.value=t,this.onselect&&this.onselect(t),this.close();break}}e.preventDefault()}},this._onClick=t=>{const a=t.target.parentNode;if(!n.is_open)return!0;a!==e&&n.close()},window.addEventListener("keydown",this._onKeyDown,!1),window.addEventListener("click",this._onClick,!1),this.onselect=void 0,e.onclick=e=>{e.preventDefault(),this.is_open?this.close():this.open()}}_highlight(e){this._ul.childNodes.forEach((t=>{t===e?t.classList.add("select"):t.classList.remove("select")}))}destructor(){window.removeEventListener("keypress",this._onKeyPress),window.removeEventListener("click",this._onClick)}static init(e,t){let a=(0,n.Z)(e);const i=document.getElementById("dropdown-template"),l="dropdown"===a.getAttribute("data-type")?a:a.querySelector('select[data-type="dropdown"]');if(!l)return;l.after(document.importNode(i.content,!0));const o=l.nextElementSibling;o.id=t,l.remove();const r=o.querySelector(".dropdown-btn"),d=r.querySelector(".dropdown-label"),c=o.querySelector(".dropdown-content ul");return r&&d&&c?new s(r,d,c):void 0}setOptions(e){this._options=e}updateLabel(){this._label.innerHTML=this._value}select(e){this._label.innerHTML=e}open(){this._ul.classList.contains("open")||(this._options.forEach((e=>{const t=document.createElement("li");e===this._value&&(t.className="select selected"),t.innerText=e,t.onclick=()=>{this.select(e),this.value=e,this.onselect&&this.onselect(e),this.close()},t.onmouseover=()=>this._highlight(t),this._ul.appendChild(t)})),this._ul.classList.add("open")),this.is_open=!0}close(){for(this._ul.classList.remove(["open"]);this._ul.firstChild;)this._ul.removeChild(this._ul.firstChild);this.is_open=!1}}},1351:(e,t,a)=>{"use strict";a.d(t,{S:()=>i});var n=a(3707);let s={};function i(e,t){let a=e?.data?.title||t?.fallbackMessage?.title||"Error",i=e?.data?.message||t?.fallbackMessage?.message||"Action can not be performed",l=!1;if(e?.data){const t=e.data;t.code&&(a+=`- ${t.code}`,"7"==`${t.code}`[3]&&(l=!0)),t.url&&(i+=`
    more info`)}const o=e?.data?.code||`${a}\n${i}`;if(s[o])return;s[o]=!0;const r=()=>s[o]=!1;l?(0,n.Kp)(a,i,r):(0,n.vU)(a,i,r)}},8236:(e,t,a)=>{"use strict";a.d(t,{o:()=>i});var n=a(7780);const s={count:0,current:0},i=(e,t={})=>{const a=Object.assign({timeout:5500,closeOutside:!0},t),i=s.count;s.count=s.count+1;const l=document.querySelector(".modal-box");t.className&&l.classList.add(t.className);const o=l.parentElement;for(;l.firstChild;)l.removeChild(l.firstChild);const r=()=>{i==s.current&&o.classList.contains("show-modal")&&(o.classList.remove("show-modal"),a.closeCallback&&a.closeCallback())},d=e=>{e.target===o&&r()};a.closeOutside&&window.addEventListener("click",d);const c=e(r);s.current=i,l.appendChild(c),(0,n.ot)(l),o.classList.add("show-modal"),a.timeout>0&&setTimeout(r,a.timeout)}},5951:(e,t,a)=>{"use strict";function n(e,t,a="right"){if(!e)return;const n=e.querySelector(".fill");if(n){const e=`${["top","right","bottom","left"].map((e=>(e=>e===a?100-100*t+"%":0)(e))).join(" ")}`;n.style.inset=e}}a.d(t,{g:()=>n})},2957:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var n=a(7780),s=a(5489),i=a(6648),l=a(646),o=a(1351);var r=a(3707);let d=null;const c=a(5493).Z,u=()=>(0,r.Vp)((0,n.Iu)("ntf.success"),(0,n.Iu)("ntf.settings-suc"));function p(e){const t=document.getElementById("api_key");t&&(t.innerText=e)}function m(e,t){e.connection&&((0,s.ZP)("con-settings",e.connection),function(e,t){const a=document.getElementById("conn-prusa-connect-status"),n=document.getElementById("conn-prusa-connect-url"),s=document.getElementById("edit-connect-del"),i="FINISHED"===e.connect.registration,{hostname:o,tls:r}=e.connect,{ok:d,message:c}=e.states.connect,u=d&&i,p=document.getElementById("conn-prusa-connect-status-"+(u?"ok":"not-ok")),m=r?"https":"http",g=e.connect.port?`:${e.connect.port}`:"",h=`${m}://${o}${g}`,b=`(${h})`;t&&(n.value=h);(0,l.QH)(n.parentNode.parentNode,i),s&&(0,l.yx)(s,i||!d);v(a,p,u,c,b)}(e.connection,t),function(e){const t=document.getElementById("conn-printer-status"),{port:a,baudrate:n}=e.current,{ok:s,message:i}=e.states.printer,l=document.getElementById("conn-printer-status-"+(s?"ok":"not-ok"));v(t,l,s,i,`(${a||"/dev/ttyACM0"} @ ${n||0}bps)`)}(e.connection))}function v(e,t,a,s,i){e&&e.setAttribute("ok",Boolean(a)),t&&(t.innerHTML=(a?(0,n.Iu)("conn.suc"):s)+"
    "+i)}function g(e){switch(e.toLowerCase()){case"python":return(0,n.Iu)("sys-version.python");case"description":return(0,n.Iu)("sys-version.description");case"id":return(0,n.Iu)("sys-version.id");case"os":return(0,n.Iu)("sys-version.os");default:return e}}const h={load:e=>{(0,n.Iu)("settings.title",{query:"#title-status-label"}),(0,i.LK)("api/version?system=1").then((e=>{const t={version:e.data};(0,s.ZP)("settings",t),function(e){const t=document.querySelector("#sys-version .table");if(t)for(const[a,n]of Object.entries(e.version.system)){const e=document.createElement("div");e.className="row";const s=document.createElement("div");s.className="col txt-sm",s.innerHTML=`

    ${g(a)}

    `,e.appendChild(s);const i=document.createElement("div");i.className="col txt-md",i.innerHTML=`

    ${n}

    `,e.appendChild(i),t.appendChild(e)}}(t)})).catch((e=>(0,o.S)(e))),function(){const e=document.getElementById("updates-check"),t=document.getElementById("updates-check__spinner"),a=a=>{a&&document.querySelectorAll(".update-pkg").forEach((e=>{e.parentNode.removeChild(e)})),(0,l.yx)(t,a),(0,l.gL)(e,!a)};e&&t&&(e.onclick=()=>{a(!0),(0,i.LK)("/api/v1/update/prusalink").then((t=>{const s=t.data?.new_version,l=[{name:"PrusaLink",new_version:s}],d=e.parentNode.parentNode.parentNode;l.forEach((e=>{const t=document.createElement("div"),s=document.createElement("div"),l=document.createElement("p"),c=document.createElement("div"),u=document.createElement("p"),p=document.createElement("div"),m=document.createElement("span");if(t.className="row update-pkg",s.className="col",c.className="col",p.className="col",l.className="txt-bold txt-grey txt-sm",u.className="txt-md",m.className="txt-grey txt-sm",l.innerText="PrusaLink",e.new_version){m.innerText=e.new_version;const t=document.createElement("button"),s=document.createElement("p");s.innerText=(0,n.Iu)("btn.upgrade"),t.className="action",t.appendChild(s),p.appendChild(t),t.onclick=()=>{a(!0),(0,i.LK)("/api/v1/update/prusalink",{method:"POST"}).then((()=>{(0,r.Vp)((0,n.Iu)("upgrade.success.title"),(0,n.Iu)("upgrade.success.message")),setTimeout((()=>window.location.href="/"),5e3)})).catch((e=>(0,o.S)(e))).finally((()=>a(!1)))}}else m.innerText="The package is up to date";u.appendChild(m),s.appendChild(l),c.appendChild(u),t.appendChild(s),t.appendChild(c),t.appendChild(p),d.appendChild(t)}))})).catch((e=>(0,o.S)(e))).finally((()=>a(!1)))})}(),function(e){m(e,!0),document.getElementById("edit-connect-del").addEventListener("click",(e=>{(0,i.LK)("api/connection",{method:"DELETE"}).then(u).catch((e=>(0,o.S)(e)))})),document.getElementById("edit-connect-set").addEventListener("click",(e=>{const t=document.getElementById("conn-prusa-connect-url")?.value;if(!t)return;const a=new URL(t);(0,i.LK)("api/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connect:{hostname:a.hostname,port:a.port?parseInt(a.port):0,tls:a.protocol.startsWith("https")?1:0}})}).then((e=>{const t=e?.data?.url;t&&window.open(t,"_blank")})).catch((e=>(0,o.S)(e)))}))}(e),(0,i.LK)("api/settings").then((e=>{const t=e.data;!function(e){const t=document.querySelector("#settings #printer-name"),a=document.querySelector("#settings #printer-location"),n=document.querySelector("#settings #edit-printer"),s=()=>{(0,l.gL)(n,t.value.length>0&&a.value.length>0)};t.oninput=s,a.oninput=s,t.value=e.printer?.name||"",a.value=e.printer?.location||"","api-key"in e&&p(e["api-key"]),n.onclick=()=>{var e,n;(e=t.value,n=a.value,(0,i.LK)("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({printer:{name:e,location:n}})})).then((()=>u())).catch((e=>(0,o.S)(e)))},s()}(t),function(e){const t=document.querySelector("#settings #username"),a=document.querySelector("#settings #password"),n=document.querySelector("#settings #new-password"),s=document.querySelector("#settings #re-password"),r=document.querySelector("#settings #edit-user"),d=()=>{(0,l.gL)(r,a.value.length>0&&(t.value.length>0||n.value.length>0&&s.value.length>0))};t.oninput=d,a.oninput=d,n.oninput=d,s.oninput=d,t.value=e.username||"",d(),r.onclick=()=>{((e,{username:t,newPassword:a,rePassword:n})=>(0,i.LK)("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user:{password:e,username:t,new_password:a,new_repassword:n}})}))(a.value,{username:t.value||void 0,newPassword:n.value||void 0,rePassword:s.value||void 0}).then((()=>u())).catch((e=>(0,o.S)(e)))}}(t)})).catch((e=>(0,o.S)(e))),function(){const e=document.querySelector("#settings #serial"),t=document.querySelector("#settings #edit-serial"),a=()=>{if(e&&t){d&&(e.value=`${d}`);const n=()=>{(0,l.gL)(t,!d&&e.value.length>0),(0,l.yx)(t,!d)};n(),e.oninput=n,(0,l.gL)(e,!d);const s=()=>{var t;(t=e.value,(0,i.LK)("/api/settings/sn",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serial:t})})).then((e=>{d=e.data.serial,u()})).catch((e=>(0,o.S)(e))).finally((()=>a()))};e.onkeyup=t=>{"Enter"===t.key&&(s(),e.blur())},t.onclick=s}};(0,i.LK)("/api/settings/sn",{headers:{"Content-Type":"application/json"}}).then((e=>{d=e.data.serial})).catch((e=>(0,o.S)(e))).finally((()=>a()))}(),function(){const e=document.getElementById("api_key-reset");e&&e.addEventListener("click",(()=>{(0,i.LK)("api/settings/apikey",{method:"POST"}).then((e=>{p(e.data["api-key"]),u()})).catch((e=>(0,o.S)(e)))}),!1)}(),c?.load()},update:e=>{c?.update(),m(e,!1)}}},5493:(e,t,a)=>{"use strict";a.d(t,{Z:()=>v});var n=a(7780),s=a(6648),i=a(1972),l=a(5412),o=a(1351),r=a(5502);let d=null,c=null;const u=67108864;function p(e){return`
  • ${e}
  • `}const m=()=>{(0,s.LK)("api/logs").then((e=>{const t=e.data.files;if(d){const e=t.find((e=>e.name===d));e&&(!c||e.date>c)&&(c=e.date,e.size>u?function(){const e=document.querySelector("ul.logs"),t=(0,n.Iu)("logs.file-too-large",{size:(0,r.Z)("size",u)});e&&(e.innerHTML=p(t))}():(a=d,(0,s.iT)(`api/logs/${a}`).then((e=>{const t=document.querySelector("ul.logs");t&&(e.data?t.innerHTML=e.data.split("\n").map((e=>p(e))).join(""):t.innerHTML=p((0,n.Iu)("logs.empty-file")))}))))}var a})).catch((e=>(0,o.S)(e)))},v={load:()=>{(0,s.LK)("api/logs").then((e=>{const t=e.data.files,a=l.L.init("settings","log-list"),s=t.map((e=>e.name)),o=(0,n.Iu)("logs.select-file-placeholder");a.setOptions(s),a.select(o),a.onselect=e=>{!function(e){d=e,c=null,document.getElementById("download-log").onclick=()=>{(0,i.Z)(`api/logs/${e}`,e)},m()}(e)}})).catch((e=>(0,o.S)(e)))},update:m}},3707:(e,t,a)=>{"use strict";a.d(t,{Kp:()=>l,Vp:()=>o,vU:()=>r});const n=document.getElementById("prusa-toast"),s={info:10500,success:10500,warning:10500,error:10500};function i({title:e,message:t,type:a,onClose:i}){const l=((e,t,a)=>{const n=document.getElementById("toast"),s=document.importNode(n.content,!0),i=s.querySelector("article");return i.className=a,s.querySelector("p").innerHTML=e,s.querySelector(".toast-body").innerHTML=t,i})(e,t,a),o=()=>{n.removeChild(l),i?.()};l.querySelector("span").addEventListener("click",(e=>{e.preventDefault(),o()}));const r=s[a];r&&setTimeout(o,r),n.appendChild(l)}function l(e,t,a){i({type:"warning",title:e,message:t,onClose:a})}function o(e,t,a){i({type:"success",title:e,message:t,onClose:a})}function r(e,t,a){i({type:"error",title:e,message:t,onClose:a})}},5489:(e,t,a)=>{"use strict";a.d(t,{NA:()=>s,ZP:()=>l,zR:()=>i});var n=a(5502);const s=(e,t)=>{try{const a=e.split(".");let n=t;for(;a.length;)n=n[a.shift()];return n}catch(e){return}},i=(e,t)=>{document.querySelectorAll(`[data-type="${e}"]`).forEach((e=>{const a=e.dataset.where,i=a?s(a,t):t;e.innerHTML=(0,n.Z)(e.dataset.format,i)}))},l=i},2038:(e,t,a)=>{"use strict";a.d(t,{i:()=>l});var n=a(8236),s=a(646),i=a(4800);const l=e=>{e.addEventListener("change",(t=>{e.checked&&e.getAttribute("data-link-state")!==i.PT.READY&&(0,n.o)((t=>((e,t)=>{const a=document.getElementById("modal-confirm"),n=document.importNode(a.content,!0),i=n.getElementById("yes"),l=n.getElementById("no");return i.addEventListener("click",(a=>{a.preventDefault(),(0,s.H)(i,!0),(0,s.H)(l,!0),t.checked=!0,e()})),l.addEventListener("click",(()=>{t.checked=!1,e()})),n})(t,e)),{timeout:0,closeOutside:!1})}))}},7049:(e,t,a)=>{"use strict";a.d(t,{Z:()=>y});var n=a(6648),s=a(1351),i=a(646),l=a(3707),o=a(7780),r=a(5951),d=a(2038),c=a(5489),u=a(4800);let p=!1,m=null;function v(e){const t=u.cG.includes(e),a=document.querySelector("#upld-remote-start-pt");a&&(a.setAttribute("data-link-state",e),t||(a.checked=!1),(0,i.H)(a,!t)),(0,n.LK)("api/download").then((e=>{m=e,g(e)})).catch((e=>{e.code&&(0,s.S)(e),b()}))}function g(e){const t=e.data;if(t){if("FROM_WEB"===t.type){f("uploading"),(0,c.ZP)("download",t);const e=document.querySelector("#upld-remote .progress-bar");(0,r.g)(e,t.progress||0)}}else{if(p)return function(){const e=(0,o.Iu)("ntf.success"),t=(0,o.Iu)("ntf.upld-suc",{file_name:""});(0,l.Vp)(e,t)}(),void b();f("choose")}}const h=(e,t,a,s)=>{if("local"===t)return e=e.split("?")[0].split("&")[0].split("#")[0],(0,n.LK)(`/api/download/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e,destination:a,...s})}).then((e=>function(e){f("uploading");const t=document.querySelector("#upld-remote .progress-bar");(0,r.g)(t,0);const a=(0,o.Iu)("ntf.success"),n=(0,o.Iu)("ntf.upld-start");(0,l.Vp)(a,n)}())).catch((e=>g(e)));(0,l.vU)("Can't upload to "+t,"You can upload only to local storage via remote upload!")};function b(){f("choose"),function(e){const t=document.querySelector("#upld-remote .progress-bar");t&&(0,r.g)(t,e||0)}(0),(0,c.ZP)("download",{}),m=null}function f(e){p="uploading"==e;const t=document.getElementById("upld-remote");t&&t.setAttribute("data-state",e)}const y={init:function(e,t){const a=document.getElementById("upld-remote");if(a){const n=a.querySelector("#remote-url"),s=a.querySelector("#remote-file-name"),l=a.querySelector("#upld-file"),o=a.querySelector("#upld-remote-start-pt");o&&(0,d.i)(o),l.onclick=()=>h(n.value,e,t,{to_print:o.checked,rename:s.value});const r=()=>{(0,i.H)(l,""===n.value)};r(),n.oninput=r}p&&(f("uploading"),m&&g(m)),v()},update:v,get isUploading(){return p}}},3283:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>pt});var n=a(7780);const s=500;let i=100,l=new Map;const o=(e,t)=>{l=e,i=t};function r(){const e=document.getElementById("graph");e&&(0==e.childElementCount&&function(){const e=document.getElementById("graph-template"),t=document.importNode(e.content,!0);document.getElementById("graph").appendChild(t),(0,n.ot)("graph")}(),l.forEach(((e,t)=>{!function(e,t){const a=(new Date).getTime();let n=[];if(e.length>1){let t=e[0],l=s-2.66*(a-t[0]-1e4)/1e3;for(let e=1;e1&&e[1][0]{var i=new XMLHttpRequest;const l=()=>{s(void 0)};!function(e,t){if(t){const a=e=>{if(!e.lengthComputable)return;let a=Math.round(e.loaded/e.total*100);t({loaded:e.loaded,total:e.total,percentage:a})};e.upload.addEventListener("progress",a,!1)}}(i,a.onProgress),i.addEventListener("load",(e=>{const t=function(e){function t(e){try{return JSON.parse(e)}catch{return}}return{status:e.status,statusText:e.statusText,ok:e.status>=200&&e.status<=299,data:t(e.response)}}(e.target);t.ok?n(t):s(t)}),!1),i.addEventListener("error",l,!1),i.addEventListener("abort",l,!1),i.open("PUT",e),a.print&&i.setRequestHeader("Print-After-Upload","1"),i.setRequestHeader("Content-Type","text/x.gcode");for(const[e,t]of Object.entries((0,m.wU)()))i.setRequestHeader(e,t);i.send(t)}))};var g=a(2038),h=a(4800);let b=!1,f=0;function y(e,t,a,n,s){const i=document.querySelector(e);i&&(i.setAttribute("accept",n.join(", ")),i.onchange=()=>{if(i.files.length>0&&!b){let e=i.files[0];k(e,t,a,s?.checked||!1)}})}function x(e){b="uploading"===e;const t=document.getElementById("upld-direct");t&&t.setAttribute("data-state",e)}function w(e){f=e;const t=document.getElementById("upld-progress");t&&(t.innerHTML=`${e} %`)}const k=(e,t,a,s)=>{const i=["/api/v1/files",t,a,e.name].filter((e=>!!e)).join("/");e.arrayBuffer().then((t=>{x("uploading"),w(0),v(i,t,{onProgress:e=>{return t=e.percentage,x("uploading"),void w(t);var t},print:s}).then((()=>function(e){const t=(0,n.Iu)("ntf.success"),a=(0,n.Iu)("ntf.upld-suc",{file_name:e});(0,c.Vp)(t,a)}(e.display_name||e.name))).catch((t=>function(e,t){if(t)(0,u.S)(t);else{const t=(0,n.Iu)("ntf.error"),a=(0,n.Iu)("ntf.upld-unsuc",{file_name:e});(0,c.vU)(t,a)}}(e.display_name||e.name,t))).finally((()=>function(){const e=document.querySelector('#upld-direct input[type="file"]');e&&(e.value=""),w(0),x("choose")}()))}))};const S={init:function(e,t,a){(0,n.Iu)("upld.direct.choose",{query:"#upld-direct p",file:a.join(", ")}),function(e,t,a){const n=document.getElementById("upld-direct-start-pt");n&&(0,g.i)(n);const s=document.getElementById("drop-zone");s&&(document.ondragenter=e=>(0,p.yx)(s,!0),s.ondragleave=e=>(0,p.yx)(s,!1),document.ondrop=e=>(0,p.yx)(s,!1),y('#drop-zone input[type="file"]',e,t,a,n));y('#upld-direct input[type="file"]',e,t,a,n)}(e,t,a),b&&(x("uploading"),w(f))},update:function(e){const t=h.cG.includes(e),a=document.querySelector("#upld-direct-start-pt");a&&(a.setAttribute("data-link-state",e),t||(a.checked=!1),(0,p.H)(a,!t))},get isUploading(){return b},initInputByQuery:y};const z=class{get selected(){return this._selected}get isLocked(){return this._isLocked}lock(){this._isLocked=!0,this._root&&this._root.querySelectorAll("[data-tab-btn]").forEach((e=>{e.getAttribute("data-tab-btn")!==this.selected&&e.setAttribute("locked",!0)}))}unlock(){this._isLocked=!1,this._root&&this._root.querySelectorAll("[data-tab-btn]").forEach((e=>{e.hasAttribute("locked")&&e.removeAttribute("locked")}))}constructor(){this._root=null,this._selected=null,this._isLocked=!1}init(e){this._root=e,this._root&&(e.querySelectorAll("[data-tab-btn]").forEach((e=>{e.onclick=()=>{if(!this._isLocked){const t=e.getAttribute("data-tab-btn");t===this._selected||(this.closeTab(),this.openTab(t))}}})),this.openTab(this._selected,!0))}openTab(e){if(this._root&&e){const t=this._root.querySelector(`[data-tab="${e}"]`);t&&t.setAttribute("opened",!0);const a=this._root.querySelector(`[data-tab-btn="${e}"]`);a&&a.setAttribute("selected",!0),this._selected=e}}closeTab(){if(this._root&&this._selected){const e=this._root.querySelector(`[data-tab="${this._selected}"]`);e&&e.setAttribute("opened",!1);const t=this._root.querySelector(`[data-tab-btn="${this._selected}"]`);t&&t.setAttribute("selected",!1),this._selected=null}}},E=a(7049).Z,P=new z;function L(){S.isUploading?(P.openTab("direct"),P.lock()):E?.isUploading?(P.openTab("remote"),P.lock()):(P.unlock(),P.selected||P.openTab("direct"))}const I={init:function(e,t="",a){S.init(e,t,a),E?.init(e,t),P.init(document.getElementById("upld")),L()},update:function(e){S?.update(e),E?.update(e),L()},hide:function(e){(0,p.QH)(document.getElementById("upld"),e)}};var _=a(2451);const T=function(...e){let t=[];return e.forEach((e=>{Array.isArray(e)?t.push(...e):e&&t.push(e)})),t.map((e=>("/"===e[0]&&(e=e.substring(1)),"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),e))).filter((e=>""!==e)).join("/")};var N=a(5489),j=a(8236),A=a(8751);const C=e=>(0,m.LK)(e,{method:"POST",headers:{"Content-Type":"application/json"}}),B=()=>(0,m.LK)("/api/job",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"pause",action:"resume"})}).catch((e=>(0,u.S)(e))),D=e=>{(0,j.o)((t=>((e,t)=>{const a=document.getElementById("modal-question"),s=document.importNode(a.content,!0);s.getElementById("modal-question-label").innerText=(0,n.Iu)("msg.cancel");const i=s.getElementById("yes"),l=s.getElementById("no");return i.addEventListener("click",(a=>{a.preventDefault(),t&&t(),(0,p.H)(i,!0),(0,p.H)(l,!0),(0,m.LK)("/api/job",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"cancel"})}).catch((e=>(0,u.S)(e))),e()})),l.addEventListener("click",e),s})(t,e)),{timeout:0,closeOutside:!1})},q=(e,t)=>{e?(0,j.o)((e=>((e,t)=>{const a=document.getElementById("modal-confirm"),n=document.importNode(a.content,!0),s=n.getElementById("yes"),i=n.getElementById("no");return s.addEventListener("click",(a=>{a.preventDefault(),(0,p.H)(s,!0),(0,p.H)(i,!0),C(t).then((()=>(0,A.c4)("#dashboard"))).catch((e=>(0,u.S)(e))).finally((()=>e()))})),i.addEventListener("click",e),n})(e,t)),{timeout:0,closeOutside:!1}):C(t).then((()=>(0,A.c4)("#dashboard"))).catch((e=>(0,u.S)(e)))},O=()=>(0,m.LK)("/api/job",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"cancel"})}).catch((e=>(0,u.S)(e)));var M=a(1972);const H=(e,t,a)=>{(0,M.Z)(e,t),a()},R=(e,t,a)=>{(0,j.o)((s=>((e,t,a,s)=>{const i=document.getElementById("modal-question"),l=document.importNode(i.content,!0);l.getElementById("modal-question-label").innerText=(0,n.Iu)("msg.del-proj",{file_name:a});const o=l.getElementById("yes"),r=l.getElementById("no");return r.addEventListener("click",e),o.addEventListener("click",(a=>{a.preventDefault(),(0,p.H)(o,!0),(0,p.H)(r,!0),(0,m.LK)(t,{method:"DELETE"}).then((()=>s&&s())).catch((e=>(0,u.S)(e))).finally((t=>e()))})),l})(s,e,t,a)),{timeout:0,closeOutside:!1})};function V(e){return`inset(${100-100*e}% 0% 0% 0%)`}var Z=a(5951);const U={},K=()=>{U.title=null,U.questionChildren=null,U.yes=null,U.no=null,(0,A.g9)(U.next)},$={load:()=>{U.title||(0,A.c4)("#dashboard"),document.getElementById("title-status-label").innerHTML=U.title;const e=document.getElementById("question"),t=U.questionChildren;Array.isArray(t)?t.forEach((t=>e.appendChild(t))):e.innerHTML=t;for(let e of["yes","no"]){const t=document.getElementById(e),a=U[e];t.querySelector("p").innerHTML=U[e+"Text"],t.addEventListener("click",(e=>{e.stopPropagation(),a(K)}))}}};(0,n.Iu)("exp-times.exp-time"),(0,n.Iu)("exp-times.inc"),(0,n.Iu)("exp-times.layer-1st"),(0,n.Iu)("exp-times.profile");const F=e=>{const t=e.querySelector("img");(0,p.gL)(e,!1),t&&(t.setAttribute("data-src",t.src),t.src=document.querySelector(".loading-overlay img").src)},G=e=>{const t=e.querySelector("img");if((0,p.gL)(e,!0),t){const e=t.getAttribute("data-src");e&&(t.src=e,t.setAttribute("data-src",""))}};let Y=null,W={path:null,lastPrintingResult:null,file:{ready:!1,data:null},thumbnail:{ready:!1,url:null}},Q={file:null,path:null,thumbnail:{ready:!1,url:null}},J=null,X=null;function ee(e){return["Busy","Cancelling"].includes(e)}function te(){return Q.path}function ae(e,t){if(!e)return void(Q={file:null,path:null,thumbnail:{ready:!1,url:null}});Q={file:null,path:null,thumbnail:{ready:!1,url:null}},Q.file=e,Q.path=t;const a=e.refs?.thumbnail;a?((0,p.QP)(),oe(a,e.date).then((({url:t})=>{var a;a=e,Q.file===a?Q.thumbnail={ready:!0,url:t}:console.warn("Can't edit file preview metadata because path was changed")}))):(Q.thumbnail.ready=!0,Q.thumbnail.url=null)}function ne(e,t=!1){const a=se(e,t);Y&&Y.state!==e.printer.state.text&&(Y=null),a&&function(e,t){if(!t){if(!e?.current?.job?.file)return console.error("No job file was provided!"),void(0,p.Zk)();const t=e.current.job.file;let a=t.path;const n=t.origin?.replace("/","");if(n){const e=["/PrusaLink gcodes/","/SD Card/"].map((e=>a.startsWith(e)?a.replace(e,`/${n}/`):null)).find((e=>!!e));e&&(a=e)}let s=ee(e.current.state);a&&a!==W.path&&(W={path:null,lastPrintingResult:null,file:{ready:!1,data:null},thumbnail:{ready:!1,url:null}},W.path=a,s=!0,function(e){(0,m.LK)(`/api/v1/files${e}`).then((t=>{t?.data||console.error("No data from BE!");const a=t.data;ie(e)?W.file={ready:!0,data:a}:console.warn("Can't edit metadata because path was changed"),a.refs||console.warn("Missing refs for "+e);const n=a.refs?.thumbnail;n?oe(n,a.m_timestamp).then((({url:t})=>{ie(e)?W.thumbnail={ready:!0,url:t}:console.warn("Can't edit metadata because path was changed")})):(W.thumbnail.url=null,W.thumbnail.ready=!0)})).catch((e=>(0,u.S)(e)))}(a)),s&&(0,p.QP)(),W.lastPrintingResult="Printing"===e.current.state?e.current:W.lastPrintingResult}le(e,t)}(e,t)}function se(e,t){const a=document.getElementById("job");if(!a)return!1;const n=t?Boolean(Q.file):Boolean(e?.current?.job?.file?.name);return(0,p.yx)(a,n),n}function ie(e){return W.path===e}function le(e,t){const a=document.querySelector("#job .preview-img");if(J||(J=document.querySelector("#job #preview-img")?.src),t){const{file:n,thumbnail:s}=Q;ce(!0),(0,p.yx)(a),de(!1),(0,N.ZP)("job",null),(0,N.ZP)("file",n);const i=document.querySelector('#job [data-where="job.file.display"]');i&&(i.innerHTML=n.display_name||n.display||n.name),pe(e,null,n,t);ue(e.printer.state,t),s.ready&&(re(s.url),(0,p.Zk)())}else if(!t){const n=W.lastPrintingResult||e.current;if(!n)return void console.warn("No job result was provided!");const{file:s,thumbnail:i}=W,l=e.printer.state;0;const o=h.PT.fromApi(l);ce(h.cG.includes(o)),(0,N.ZP)("job",n);const r=l.flags.printing||l.flags.pausing||l.flags.paused;(0,p.QH)(a,r),de(r),s.ready&&(0,N.ZP)("file",s.data),pe(e,n,s,t),i.ready&&re(i.url),ue(l,t),i.ready&&!ee(l.text)&&(0,p.Zk)()}}async function oe(e,t){if(!e)return null;try{return await(0,m.gJ)(e,t)}catch(e){return console.error("Error while getting image!"),console.error(e),null}}function re(e){const t=e||J,a=document.getElementById("preview-img"),n=a.parentElement;if(a&&a.src!==t){const e=document.createElement("img");e.src=t,e.id="preview-img",n.removeChild(a),n.appendChild(e)}}function de(e){const{thumbnail:t}=W;let a=!1;const n=document.querySelector(".progress-with-img"),s=document.querySelector(".progress-without-img");if(!e)return(0,p.QH)(n),void(0,p.QH)(s);const i=document.querySelector(".progress-img-wrapper");i.getAttribute("data-file")!==t.url&&(a=!0,i.setAttribute("data-file",t.url));const l=Boolean(t.ready&&t.url);l&&t.url&&!a&&function(e,t,a=0){if(!e)return;for(;e.firstChild;)e.removeChild(e.firstChild);const n=document.createElement("div");n.className="progress-img";const s=document.createElement("img");s.src=t,s.className="background",n.appendChild(s);const i=document.createElement("img");i.src=t,i.className="foreground",i.style.clipPath=V(a),n.appendChild(i),e.appendChild(n)}(i,t.url),(0,p.yx)(n,l),(0,p.QH)(s,l);const o=W.lastPrintingResult?.progress?.completion||0;l?(!function(e,t){if(!e)return;const a=e.querySelector(".foreground");a&&(a.style.clipPath=V(t))}(i,o),(0,Z.g)(n,o,"top")):(0,Z.g)(s,o,"right")}function ce(e){(0,p.QH)(document.querySelector("#job #pnt-time"),e),(0,p.QH)(document.querySelector("#job #rem-time"),e);const t=document.querySelector("#job #est-end p[data-format]");t&&(t.setAttribute("data-where",e?"meta.estimatedPrintTime":"progress.printTimeLeft"),t.setAttribute("data-type",e?"file":"job"))}function ue(e,t){const a=(0,n.Iu)("prop.na");document.getElementById("job").querySelectorAll(".job-details .job-prop").forEach((e=>{const t=e.querySelector(".job-prop-grid").children;let n=!0;for(const e of t){var s=e.querySelector("[data-type]")?.innerHTML.trim()===a;(0,p.QH)(e,s),s||(n=!1)}(0,p.QH)(e,n)}))}function pe(e,t,a,n){const s=e.printer.state,i=e.current.state;if(n){if(me(s,n),a){const e=Q.path;ve(s,e,n),ge(i,a,e,n),he(i,a,n)}}else{if(me(s,n),a.ready){ve(s,a?.refs?.resource||T("api/files",a.data.origin,a.data.path),n),ge(i,a.data,n),he(i,a.data,n)}!function(e,t){const a=document.querySelector(t);(0,p.yx)(a,e.flags.printing&&!e.flags.paused),(0,p.gL)(a,!Y&&e.flags.printing&&!e.flags.pausing),a&&(a.onclick=()=>{(0,p.gL)(a,!1),Y={code:"pause",state:e.text},(0,m.LK)("/api/job",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"pause",action:"pause"})}).catch((e=>(0,u.S)(e)))})}(s,"#job #pause"),function(e){const t=document.querySelector("#job #resume");(0,p.yx)(t,e.flags.paused),(0,p.gL)(t,!Y&&e.flags.paused),t&&(t.onclick=()=>{(0,p.gL)(t,!1),Y={code:"resume",state:e.text},B()})}(s)}}function me(e,t){const a=document.querySelector("#job #stop"),n=document.querySelector("#job-close"),s=h.PT.fromApi(e),i=h.cG.includes(s);if((0,p.gL)(a,!Y&&(e.flags.printing||e.flags.paused)&&!e.flags.cancelling),a&&!t){const t=!i||!1;(0,p.yx)(a,t),a.onclick=()=>{D((()=>{Y={code:"stop",state:e.text},(0,p.gL)(a,!1)}))}}n&&((0,p.yx)(n,i||t),n.onclick=t?()=>ae(null):O)}function ve(e,t,a){const n=h.PT.fromApi(e),s=document.querySelector("#job #start"),i=h.cG.includes(n);if(s){const n=h.PT.fromApi(e);(0,p.yx)(s,a||i),(0,p.gL)(s,i),s.onclick=()=>q(n!==h.PT.READY,t)}}function ge(e,t,a,n){const s=document.querySelector("#job #delete"),i=t.display_name||t.display||t.name;s&&((0,p.gL)(s,!t.ro&&a),(0,p.yx)(s,n||"Operational"===e),s.onclick=()=>{R(a,i,(()=>{n&&(Q={file:null,path:null,thumbnail:{ready:!1,url:null}})}))})}function he(e,t,a){const n=document.querySelector("#job #download");if(n){const s=t.refs?.download&&(a||"Operational"===e)&&(!X||X===t.refs.download),i=t.display_name||t.display||t.name;(0,p.yx)(n,s),s&&(n.onclick=()=>{X=t.refs.download,F(n),H(t.refs.download,i,(()=>{X=null,G(n)}))})}}p.QP,p.Zk;const be=e=>[...e].filter((e=>!!e)).map((e=>e.trim())).join(" - "),fe=e=>{if(!e.printer)return;const t=h.PT.fromApi(e.printer.state);ne(e),I.update(t),_.Z.update(e,null)},ye={load:e=>{(0,n.Iu)("home.link",{query:"#title-status-label"}),r(),fe(e),_.Z.update(e,null),_.Z.updateCurrentCamera(),(0,m.LK)("/api/v1/storage").then((t=>{const a=t.data.storage_list.find((e=>e.available&&!e.read_only));if(a){const t=a.path.replace("/","");I.init(t,"",e.fileExtensions)}}))},update:fe};var xe=a(5502),we=a(8495);const ke=function(e,t="smooth"){if(!e)return;const a=e.getBoundingClientRect(),n=document.body.getBoundingClientRect(),s=a.top-(n.top+function(){const e=document.querySelector(".header");return e&&"sticky"===getComputedStyle(e).position?e.getBoundingClientRect().height:0}());(a.bottom>window.innerHeight||a.top<0)&&window.scroll({top:s,behavior:t})};var Se=a(5537);const ze=e=>{const t=(0,Se.Z)(e).querySelector(".kebab"),a=t.querySelector(".kebab-menu"),n=t.querySelector("ul");a.addEventListener("click",(e=>{e.stopPropagation(),function(e){return e&&e.classList.contains("open")}(n)?Ee(n):function(e,t){e.classList.add("open"),(0,p.Ti)((()=>Ee(e)),e,t)}(n,a)})),n.querySelectorAll("li").forEach((e=>{e.addEventListener("click",(()=>Ee(n)))}))};function Ee(e){e.classList.remove("open")}const Pe=e=>{const t=document.querySelectorAll(".storage-select-content li");t&&t.forEach((t=>t.setAttribute("selected",t.getAttribute("data-storage")===e)))},Le=e=>{const t=document.querySelector("#node-storage .storage-select-btn-inner");t&&(t.innerHTML=e)},Ie=(e,t)=>{e&&t&&(t.classList.toggle("open"),(0,p.Ti)((()=>{t?.classList.remove("open")}),e,t))},_e=e=>{const t=document.querySelector(".node-storage-space");if(!t)return;const a=e.available&&!!e.totalSpace;if((0,p.yx)(t,a),a){const a=e.freeSpace,s=e.totalSpace,i=1-(a&&s?a/s:0),l=(0,n.Iu)("prop.storage-space",{free:(0,xe.Z)("size",a),total:(0,xe.Z)("size",s)});(0,Z.g)(t,i),document.getElementById("storage-pct").innerHTML=(0,xe.Z)("progress",i),document.getElementById("storage-space").innerHTML=l}},Te=()=>{const e=document.querySelector("#node-storage .storage-select-btn");e&&(e.onclick=t=>{t.stopPropagation(),Ie(e,dropdownContent)})},Ne=(e,t,a,n=!1)=>{const s=document.querySelector(".storage-select-content");document.querySelectorAll(".storage-select-content li").forEach((n=>{const i=n.getAttribute("data-storage");let l=!1;if(i in e){const o=e[i];l=!0,n.querySelector("p").innerText=o.name,n.setAttribute("selected",i===t),n.onclick=e=>{e.stopPropagation(),Le(n.innerHTML),Pe(i),s.classList.remove("open"),_e(o),a(i)}}(0,p.yx)(n,l)})),n&&_e(e[t])},je="FOLDER",Ae="PRINT_FILE",Ce="FIRMWARE",Be=["name","date","size"];let De=null;const qe={origin:null,current_path:[],storages:{},files:[],eTag:null,sort:{field:"date",order:"desc"}};function Oe(){const e=qe.origin;return qe.storages[e]}function Me(){return qe.current_path.map((e=>e.path)).join("/")}function He(e){const t=Oe(),a=Me();return Re(t.path,a,e)}function Re(e,t,a){const n=["/api/v1/files",e,t,a].filter((e=>!!e)).join("/");return a?n:`${n}/`}const Ve=(e={})=>{(0,m.LK)("/api/v1/storage",{}).then((t=>{const a=t.data?.storage_list;let n=!!e.redraw,s=!!e.redraw;if(a&&a.forEach((e=>{const t=e.type,a={name:e.name||e.type,path:e.path.replaceAll("/",""),available:e.available,readOnly:e.read_only,freeSpace:e.free_space,totalSpace:e.total_space};if(t in qe.storages){const e=qe.storages[t];e.available!==a.available&&(n=!0),e.freeSpace!==a.freeSpace&&qe.origin===t&&(s=!0)}else n=!0,s=!0;qe.storages[t]=a})),!qe.origin){let e=Object.keys(qe.storages).find((e=>qe.storages[e].available));e||(e=Object.keys(qe.storages).find((()=>!0))),e&&Qe(e)}n&&Ne(qe.storages,qe.origin,Qe,s)}))},Ze=(e={})=>{if(!Oe())return;const t=He();let a=qe.eTag;e.force&&(qe.eTag=null,a=null,function(e){const t=Oe(),a=Me();I.init(t.path,a,e?.fileExtensions),I.hide(!!t?.readOnly)}(we.Z.getContext())),(0,m.LK)(t,{headers:{"If-None-Match":a}}).then((n=>{if(t!==He())return;const s=n.eTag;if(!s||s!==a){qe.eTag=s;const t=n.data.children||[];if(!s&&!e.force){const e=(e,t)=>e.display_name.localeCompare(t.display_name);if(JSON.stringify([...qe.files].sort(e))===JSON.stringify(t.sort(e)))return}qe.files=t,Ue(),Ke()}}))},Ue=()=>{const e=document.getElementById("files");if(e){for(;e?.firstChild;)e.removeChild(e.firstChild);e.appendChild(function(){const e=[Oe().name,...qe.current_path.map((e=>e.name))],t=$e("node-current",e.pop()||"Root");t.getElementById("path").innerHTML=`${e.join("/")}/`;const a=t.getElementById("create");a&&(a.onclick=e=>{e.stopPropagation(),console.log("createFolder")});t.querySelector("#sort-by-name p").innerText=(0,n.Iu)("sort.by-name"),t.querySelector("#sort-by-date p").innerText=(0,n.Iu)("sort.by-date"),t.querySelector("#sort-by-size p").innerText=(0,n.Iu)("sort.by-size");return t.querySelector(`#sort-by-${qe.sort.field}`).classList.add(qe.sort.order),Be.forEach((e=>{t.getElementById(`sort-by-${e}`).addEventListener("click",(t=>{const a=document.getElementById(`sort-by-${e}`);document.getElementById(`sort-by-${qe.sort.field}`).classList.remove(qe.sort.order);const n=qe.sort.field===e&&"asc"===qe.sort.order?"desc":"asc";a.classList.add(n),qe.sort.field=e,qe.sort.order=n,Ue(),Ke()}),!1)})),t}()),qe.current_path.length&&e.appendChild(function(){const e=$e("node-up","",(()=>{qe.current_path.pop(),Ue(),Ze({force:!0})}));return(0,n.ot)(e),e}())}},Ke=()=>{const e=document.getElementById("files");let t;if(e)for(let a of(e=>(e.sort(((e,t)=>{if(e.type===je&&t.type!==je)return-1;if(e.type!==je&&t.type===je)return 1;const a="desc"===qe.sort.order?-1:1;switch(qe.sort.field){case"date":return a*((e.m_timestamp||0)-(t.m_timestamp||0));case"size":return a*((e.size||0)-(t.size||0));default:return a*e.display_name.localeCompare(t.display_name)}})),e))(qe.files)){switch(a.type.toUpperCase()){case je:t=Fe(a.display_name||a.name,a.name,{files:void 0,folders:void 0});break;case Ae:t=Ye(a);break;case Ce:t=We(a,"firmware");break;default:t=We(a,"file")}e.appendChild(t)}};function $e(e,t,a){const n=document.getElementById(e).content,s=document.importNode(n,!0);return a&&s.querySelector(".node").addEventListener("click",(e=>{a(e),e.preventDefault()})),s.querySelector("#name")?.appendChild(document.createTextNode(t)),s}function Fe(e,t,a,n){const s=$e("node-folder",e,(()=>{qe.current_path.push({path:t.replace("/",""),name:e}),Ue(),Ze({force:!0})})),i=[a?.files?`${a.files} files`:null,a?.folders?`${a.folders} folders`:null].filter((e=>null!=e)).join(" | ");s.getElementById("details").innerHTML=i;const l=s.getElementById("delete");l&&(l.onclick=e=>{e.stopPropagation(),console.log("deleteFolder")});const o=s.getElementById("rename");return o&&(o.onclick=e=>{e.stopPropagation(),console.log("renameFolder")}),s}const Ge=e=>{!function(e){const t=te(),a=He(e.name);if(t===a)return;(0,m.LK)(a).then((e=>{ae(e.data,a),ne(we.Z.getContext(),!0)}));const n=document.getElementById("job");n&&ke(n)}(e)};function Ye(e){const t=$e("node-file",e.display_name||e.name,(t=>Ge(e))),a=t.querySelector(".node-details");a.querySelectorAll(".details").forEach((t=>{(0,n.ot)(t);const s=(0,N.NA)(t.dataset.where,e);if(s){const e=(0,xe.Z)(t.dataset.format,s);t.querySelector("p[data-value]").innerHTML=e}else a.removeChild(t)}));const s=e?.refs?.thumbnail;if(s){const a=t.querySelector("img.node-img");a.setAttribute("data-src",e.date?`${s}?ct=${e.date}`:s),De.observe(a)}return ze(t),function(e,t){const a=He(e.name),n=e.display_name||e.name,s=t.getElementById("details");s&&(s.onclick=t=>{Ge(e)});const i=t.getElementById("start");i&&(i.onclick=e=>{e.stopPropagation(),console.log("startPrint")});const l=t.getElementById("rename");l&&(l.onclick=e=>{e.stopPropagation(),console.log("renameFile")});const o=t.getElementById("delete");o&&((0,p.gL)(o,!e.ro),o.onclick=e=>{R(a,n),e.stopPropagation()});const r=t.getElementById("download");r&&((0,p.gL)(r,e.refs?.download),r.onclick=t=>{F(r),H(e.refs?.download,n,(()=>G(r))),t.stopPropagation()})}(e,t),(0,n.ot)(t),t}function We(e,t){const a=$e("node-file",e.display_name||e.name,(e=>{})),s=a.querySelector(".node-details");s.querySelectorAll(".details").forEach((t=>{(0,n.ot)(t);const a=(0,N.NA)(t.dataset.where,e);if(a){const e=(0,xe.Z)(t.dataset.format,a);t.querySelector("p[data-value]").innerHTML=e}else s.removeChild(t)}));const i=a.querySelector("img.node-img");if(t){const e=i.getAttribute(`data-${t}`);e&&(i.src=e),De.observe(i)}else(0,p.yx)(i,!1);return function(e){["details","start","rename","delete","download"].forEach((t=>{const a=e.getElementById(t);a&&(0,p.yx)(a,!1)}))}(a),a}function Qe(e){if(e in qe.storages){const t=qe.storages[e];qe.origin=e,qe.current_path=[],Ue(),t.available&&Ze({force:!0})}}const Je={load:function(e){if(qe.eTag=null,(0,n.Iu)("proj.link",{query:"#title-status-label"}),!De){De=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(0,m.gJ)(e.target.getAttribute("data-src")).then((({url:t})=>{e.target.src=t}))}))}),{rootMargin:"0px 0px 50px 0px",threshold:0})}e||(e=we.Z.getContext());const t=te();if(t){const e=function(e,t){if(!e||!t)return null;let a=qe.files.find((t=>t.origin===e));const n=t.split("/").filter((e=>e)).slice(1);for(const e of n){if(!a)break;a=a.children.find((t=>t.name===e))}return"machinecode"===a?.type?a:null}(t.origin,t.path);e?e.date>t.data&&ae(e):ae(null)}ne(e,!0),Te(),Ve({redraw:!0}),Ze({force:!0})},update:e=>{const t=h.PT.fromApi(e.printer.state);Ve(),Ze(),ne(e,!0),I.update(t)},getApiPath:Re};let Xe=0,et=null;const tt=()=>{const e=e=>{const t=document.getElementById("offline-screen"),a=document.importNode(t.content,!0);return["not-responsing","please-wait"].forEach((e=>{const t=a.getElementById(`offline-screen.${e}`);t&&(t.innerHTML=(e=>{switch(e){case"not-responsing":return(0,n.Iu)("msg.offline.not-responsing");case"please-wait":return(0,n.Iu)("msg.offline.please-wait");default:return""}})(e))})),et={node:a,close:()=>{e(),et=null}},a};(0,j.o)((t=>e(t)),{timeout:0,closeOutside:!1,className:"offline-screen"})},at=({connection:e,isConnected:t})=>{const a={printer:{ok:t,message:(0,n.Iu)("conn.printer.not-connected")}},s=t?{...a,...e?.states}:a,i=["connect"];for(const e in s){const{ok:t,message:a}=s[e],l=document.getElementById(`conn-status-${e}-msg`);l&&(l.innerHTML=t&&"connect"===e?"ok"===a.toLowerCase()?(0,n.Iu)("conn.connect.linked"):(0,n.Iu)("conn.connect.not-linked"):a);const o=document.getElementById(`conn-status-${e}`),r=o.querySelector(".icon-success"),d=o.querySelector(".icon-warning"),c=t&&!i.includes(e);(0,p.QH)(o,c),c||((0,p.QH)(r,!t),(0,p.QH)(d,t))}const l=e=>{Xe<3?Xe+=1:(e?tt():et.close(),Xe=0)};t?et&&l(!1):!et&&l(!0)},nt={version:void 0,printer:void 0,current:void 0,connection:void 0,fileExtensions:[]},st=e=>{const t=e.load;return e.load=()=>{(()=>{const e=document.getElementById("title-printer");e&&(e.innerHTML=it())})(),t(nt)},e},it=()=>(e=>be([e.version?.location,e.version?.name]))(nt);let lt=ye;const ot={routes:[{path:"dashboard",html:a(2373),module:st(ye),getTitle:()=>(0,n.Iu)("home.link")},{path:"question",html:a(5198),module:st($)},{path:"files",html:a(7189),module:st(Je),getTitle:()=>(0,n.Iu)("proj.storage")},{path:"settings",html:a(2936),module:st(a(2957).Z),getTitle:()=>(0,n.Iu)("settings.title")},{path:"control",html:a(3478),module:st(a(732).Z),getTitle:()=>(0,n.Iu)("control.link")},{path:"cameras",html:a(5464),module:st(a(2451).Z),getTitle:()=>(0,n.Iu)("cameras.link")}].filter((e=>null!=e)),init:e=>{rt(e),nt.fileExtensions=[".gcode"],dt()},update:e=>{const t=(0,A.nC)(),a=(e=>{const t=h.PT.fromApi(e.printer.state);let a=(0,h.ny)(t);switch(t){case"IDLE":return"";case"PRINTING":return`${a} ${Math.round(100*(e?.current?.progress?.completion||0))}%`;default:return a}})(nt);var n;document.title=(n=[a,ot.routes.find((e=>e.path===t)).getTitle()],be([...n,it(),"PrusaLink"])),rt(e),(0,N.zR)("telemetry",{...nt.printer,version:nt.version}),(e=>{const t=h.PT.fromApi(e),a=document.getElementById("printer-status");a&&(a.innerHTML=(0,h.ny)(t))})(nt.printer.state),ct(nt.printer),ut()},setConnected:e=>{at({connection:nt.connection,isConnected:e})},setModule:e=>{lt=e},getContext:()=>nt},rt=({connection:e,job:t,printer:a,version:n})=>{e?.ok&&e.payload&&(nt.connection=e.payload.data),t?.ok&&t.payload&&(nt.current=t.payload.data),a?.ok&&a.payload&&(nt.printer=a.payload.data),n?.ok&&n.payload&&(nt.version=n.payload)},dt=()=>{let e=new Map([["temp-line-blue",[]],["temp-line-orange",[]]]);o(e,300),r()},ct=e=>{const t=(new Date).getTime();d("temp-line-blue",[t,e.temperature.bed.actual]),d("temp-line-orange",[t,e.temperature.tool0.actual]),r()},ut=()=>{lt&<.update&<.update(nt)},pt=ot},8495:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n=a(3283).default},8751:(e,t,a)=>{"use strict";a.d(t,{c4:()=>r,g9:()=>d,nC:()=>l});var n=a(7780),s=a(8495);const i=e=>{const[t,a]=e.split("#");return a||"dashboard"},l=()=>i(window.location.hash);function o(e,t){const a=i(e),l=s.Z.routes.find((e=>e.path===a));if(!l)return!1;t&&function(e){window.location.hash!=e&&history.pushState(null,"",e)}("#"+a);const o=document.getElementById("root");var r;return function(e,t){t.innerHTML="",(new DOMParser).parseFromString(e,"text/html").body.childNodes.forEach((e=>t.appendChild(e)))}(l.html,o),(0,n.ot)(o),function(e){const t=document.querySelector(`a[href="#${e}"]`);t&&(document.getElementById("navbar").childNodes.forEach((e=>{"li"===e.nodeName.toLowerCase()&&e.classList.remove(["active"])})),t.parentNode.className="active")}(a),(r=l.getTitle)&&(document.title=r()),window.scrollTo({top:0}),l.module.load(),s.Z.setModule(l.module),!0}const r=e=>o(e,!0),d=e=>o(e,!1)},4800:(e,t,a)=>{"use strict";a.d(t,{PT:()=>s,cG:()=>i,ny:()=>r});var n=a(7780);const s={UNKNOWN:"UNKNOWN",IDLE:"IDLE",READY:"READY",BUSY:"BUSY",PRINTING:"PRINTING",PAUSED:"PAUSED",FINISHED:"FINISHED",STOPPED:"STOPPED",ERROR:"ERROR",ATTENTION:"ATTENTION",fromApi:e=>e.flags.link_state?l(e.flags.link_state):o(e)},i=[s.IDLE,s.READY,s.FINISHED],l=e=>{switch(e.toUpperCase()){case"IDLE":return s.IDLE;case"READY":return s.READY;case"BUSY":return s.BUSY;case"PRINTING":return s.PRINTING;case"PAUSED":return s.PAUSED;case"FINISHED":return s.FINISHED;case"STOPPED":return s.STOPPED;case"ERROR":return s.ERROR;case"ATTENTION":return s.ATTENTION;default:return console.error(`Unsupported state: ${e}`),s.UNKNOWN}},o=e=>e.flags.error?s.ERROR:e.text.toUpperCase()==s.BUSY?s.BUSY:e.flags.finished?s.FINISHED:e.flags.pausing||e.flags.paused?s.PAUSED:e.flags.printing?s.PRINTING:e.flags.ready&&e.flags.operational?s.READY:s.IDLE,r=e=>{switch(e){case s.IDLE:return(0,n.Iu)("prop.st-idle");case s.READY:return(0,n.Iu)("prop.st-ready");case s.BUSY:return(0,n.Iu)("prop.st-busy");case s.PRINTING:return(0,n.Iu)("prop.st-printing");case s.PAUSED:return(0,n.Iu)("prop.st-paused");case s.FINISHED:return(0,n.Iu)("prop.st-finished");case s.STOPPED:return(0,n.Iu)("prop.st-stopped");case s.ERROR:return(0,n.Iu)("prop.st-error");case s.ATTENTION:return(0,n.Iu)("prop.st-attention");default:return console.error(`Unsupported state: ${e}`),(0,n.Iu)("prop.st-unknown")}}},4977:e=>{"use strict";e.exports=JSON.parse('{"langs":["cs","de","en","es","fr","it","kr","nl","pl","sk"],"texts":{"home":{"link":["Přehled","Dashboard","Dashboard","Panel principal","Tableau de bord","Dashboard","대쉬보드","Dashboard","Panel kontrolny","Prehľad"],"title":["Stav tiskárny","Druckerstatus","Printer Status","Estado de la impresora","État de l\'imprimante","Stato della stampante","프린터 상태","Printerstatus","Stan drukarki","Stav tlačiarne"]},"proj":{"link":["Úložiště","Projekte","Storage","Proyectos","Projets","Progetti","저장장치","Opslag","Projekty","Úložisko"],"storage":["Úložiště","Speicher","Storage",null,null,null,"저장장치","Opslag",null,"Úložisko"],"add-from":{"title":["Nahrát soubor z","Datei hinzufügen von","Add file from",null,null,null,"에서 파일 추가하기","Bestanden toevoegen van",null,"Nahrať súbor z"],"local":["Lokálního úložiště","Lokaler Speicher","Local storage",null,null,null,"로컬 저장장치","Lokale opslag",null,"Lokálneho úložiska"],"remote":["Vzdálené url","Remote-URL","Remote url",null,null,null,"원격 URL","Externe URL",null,"Vzdialenej URL"]},"details":["Detaily souboru","Datei-Details","File details",null,null,null,"파일 상세정보","Bestandseigenschappen",null,"Detaily súboru"],"del":["Smazat","Datei löschen","Delete","Borrar archivo","Supprimer le Fichier","Elimina File","삭제","Verwijderen","Usuń plik","Zmazať"],"download":["Stáhnout","Herunterladen","Download",null,null,null,"다운로드","Downloaden",null,"Stiahnuť"],"up-folder":["nadřazená složka","übergeordneter Ordner","parent folder",null,null,null,"상위폴더","Bovenliggende map",null,"nadradený priečinok"]},"control":{"link":["Ovládání","Kontrolle","Control",null,"Contrôle",null,"제어","Bediening",null,"Ovládanie"],"coordinates":["Souřadnice tiskárny","Drucker-Koordinaten","Printer Coordinates",null,"Coordonnées de l\'imprimante",null,"프린터 좌표","Printercoördinaten",null,"Súradnice tlačiarne"],"axis":{"x":["Osa X","X-Achse","X axis",null,"axe X",null,"X축","X-as",null,"Os X"],"y":["Osa Y","Y-Achse","Y axis",null,"axe Y",null,"Y축","Y-as",null,"Os Y"],"z":["Osa Z","Z-Achse","Z axis",null,"axe Z",null,"Z축","Z-as",null,"Os Z"]},"stepper-motors":["Krokové motory","Schrittmotoren","Stepper Motors",null,"moteurs",null,"스텝 모터","Stappenmotors",null,"Krokové motory"],"heated-bed-move":["Pohyb podložky v ose X a Y","Heizbett X und Y bewegen","Heated Bed X and Y Move",null,"Mouvement en x/y",null,"히트베드 X 및 Y 이동","Beweeg verwarmd bed in X en Y",null,"Pohyb podložky v osi X a Y"],"move-step":["Krok pohybu [mm]","Schrittweite [mm]","Move Step [mm]",null,"déplacement [mm]",null,"[mm]mm 스텝 이동","Beweegafstand [mm]",null,"Krok pohybu [mm]"],"nozzle-z-move":["Pohyb extrudéru v ose Z","Düse Z Bewegung","Nozzle Z Move",null,"déplacement en z",null,"노즐 Z 이동","Beweeg omhoog/omlaag",null,"Pohyb extruderu v osi Z"],"extruder":["Extrudér","Extruder","Extruder",null,"extrudeur",null,"익스트루더","Extruder",null,"Extruder"],"extrude-retract-step":["Krok vytlačení/vtažení [mm]","Extrudieren/Zurückziehen Schritt [mm]","Extrude/Retract Step [mm]",null,"longueur d\'extrusion ou de rétractation [mm]",null,"[mm]mm 스텝 압출/철회","Extrude/retract-afstand [mm]",null,"Krok vysunutia/zasunutia [mm]"],"nozzle-temp":["Teplota trysky","Düsentemperatur","Nozzle Temperature",null,"température de la buse",null,"노즐 온도","Temperatuur nozzle",null,"Teplota trysky"],"speed":["Rychlost","Geschwindigkeit","Speed",null,"vitesse",null,"속도","Snelheid",null,"Rýchlosť"],"heated-bed-temp":["Teplota vyhřívané podložky","Temperatur des Heizbettes","Heated Bed Temperature",null,"Température du lit",null,"히트베드 온도","Temperatuur verwarmd bed",null,"Teplota vyhrievanej podložky"],"flow":["Průtok","Flow","Flow",null,"flux",null,"흐름","Extrusiefactor",null,"Prietok"],"title":["Ovládání tiskárny","Druckersteuerung","Printer Control",null,"Contrôle de l\'imprimante",null,"프린터 제어","Printerbediening",null,"Ovládanie tlačiarne"]},"cameras":{"link":["Kamery","","Cameras","","","","카메라","Camera\'s","",""],"trigger-scheme":{"ten-sec":["Každých 10 sekund","","Every 10 seconds","","","","매 10초","Elke 10 seconden","",""],"thirty-sec":["Každých 30 sekund","","Every 30 seconds","","","","매 30초","Elke 30 seconden","",""],"sixty-sec":["Každých 60 sekund","","Every 60 seconds","","","","매 60초","Elke minuut","",""],"each-layer":["Při změně vrstvy","","On layer change","","","","매 레이어","Bij laagwissel","",""],"fifth-layer":["Každou pátou vrstvu","","Every fifth layer","","","","매 5레이어","Elke 5 lagen","",""],"manual":["Ručně","","Manual","","","","수동","Handmatig","",""]}},"settings":{"title":["Nastavení","Einstellungen","Settings",null,"Réglages",null,"세팅","Instellingen",null,"Nastavenie"]},"conn":{"prusa-connect-status":["Stav připojení PrusaConnect","PrusaConnect Status","PrusaConnect Status",null,"Informations de connexion à PrusaConnect",null,"프루사커넥트 상태","Status van PrusaConnect",null,"Stav pripojenia PrusaConnect"],"printer-status":["Stav připojení 3D tiskárny","3D-Drucker Verbindungsstatus","3D Printer Connection Status",null,"Informations de connexion à l\'imprimante 3D",null,"3D 프린터 연결 상태","Verbindingsstatus van 3D-printer",null,"Stav pripojenia 3D tlačiarne"],"title":["připojení","Verbindung","Connection",null,"connexion",null,"연결","Verbinding",null,"pripojenie"],"prusa-connect-url":["Adresa PRUSA CONNECT","PRUSA CONNECT Adresse","PRUSA CONNECT Address",null,null,null,"프루사커넥트 주소","Adres van PRUSA CONNECT",null,"Adresa PrusaConnect"],"suc":["Úspěšně připojeno","Erfolgreich verbunden","Successfully connected",null,"Connecté avec succès",null,"연결 성공","Succesvol verbonden",null,"Úspešne pripojené"],"printer":{"not-connected":["","","Not Connected","","","","접속안됨","Niet verbonden","",""]},"connect":{"linked":["","","Linked","","","","연결됨","Verbonden","",""],"not-linked":["","","Not Linked","","","","연결안됨","Niet verbonden","",""]}},"prop":{"temp-nozzle":["Teplota trysky","Düsentemperatur","Nozzle Temperature","Temperatura del nozzle","Température de la buse","Temperatura ugello","노즐 온도","Nozzletemperatuur","Temperatura dyszy","Teplota trysky"],"temp-bed":["Vyhřívaná podložka","Heizbett","Heatbed","Base calefactable","Plateau chauffant","Piano riscaldato","히트베드","Verwarmd bed","Stół","Vyhrievaná podložka"],"speed":["Rychlost tisku","Druckgeschwindigkeit","Printing Speed","Velocidad de impresión","Vitesse d\'impression","Velocità di stampa","출력속도","Printsnelheid","Prędkość drukowania","Rýchlosť tlače"],"z-height":["Výška Z","Z-Höhe","Z-Height","Altura-Z","Hauteur en z","Altezza-Z","Z높이","Z-Hoogte","Wysokość Z","Výška Z"],"nozzle-diameter":["Velikost trysky","Düsendurchmesser","Nozzle Diameter",null,null,null,"노즐지름","Nozzlediameter",null,"Veľkosť trysky"],"rem-time":["Zbývající čas","Restzeit","Remaining time","Tiempo restante","Temps restant","Tempo residuo","남은시간","Resterende tijd","Pozostały czas","Zostávajúci čas"],"time-est":["Odhad doby tisku","Druckzeit Schätzen","Print Time Estimate","Tiempo Estimado de Impresión","Estimation du temps d\'impression","Stima del Tempo di Stampa","예상 출력 시간","Geschatte printtijd","Szacowany Czas Druku","Odhad času tlače"],"est-end":["Odhadovaný konec","Erwartetes Ende","Estimated end","Fin estimado","Fin d\'impression estimée","Fine prevista","예상완료","geschatte eindtijd","Szacowane zakończenie","Odhadovaný koniec"],"pnt-time":["Doba tisku","Druckzeit","Printing time","Tiempo de impresión","Temps d\'impression","Tempo di stampa","출력시간","Printtijd","Czas druku","Čas tlače"],"last-mod":["Naposledy upraveno","Zuletzt Geändert","Last Modified","Ultima Modificación","Dernière Modification","Ultima Modifica","최종 수정됨","Laatst gewijzigd","Ostatnio Zmodyfikowany","Posledná úprava"],"material":["Materiál","Material","Material","Material","Matériau","Materiale","재료","Materiaal","Materiał","Materiál"],"layer-ht":["Výška vrstvy","Schichthöhe","Layer Height","Altura de Capa","Hauteur de Couche","Altezza Layer","레이어 높이","Laagdikte","Wysokość Warstwy","Výška vrstvy"],"size":["Velikost souboru","Größe der Datei","File size",null,"Taille du fichier",null,"파일크기","Bestandsgrootte",null,"Veľkosť súboru"],"progress":["Postup","Fortschritt","Progress",null,"Progression",null,"진행","Voortgang",null,"Progres"],"st-idle":["Nečinná","Leerlauf","Idle","En espera","Repos","Inattivo","대기","Inactief","Oczekuje","Nečinná"],"st-ready":["Připravena","","Ready","","","","준비","Gereed voor gebruik","","Pripravené"],"st-busy":["Zaneprázdeněná","Beschäftigt","Busy",null,"Occupée",null,"작업중","Bezig",null,"Zaneprázdnená"],"st-printing":["Probíhá tisk","Druckt","Printing","Imprimiendo","Impression","Stampa","출력중","Printen","Drukowanie","Prebieha tlač"],"st-paused":["Pozastavena","Pausiert","Paused",null,"En pause",null,"일시정지","Gepauzeeerd",null,"Pozastavená"],"st-finished":["Dokončeno","","Finished","","","","완료됨","Klaar","","Dokončené"],"st-stopped":["Zastaveno","","Stopped","","","","정지됨","Gestopt","","Zastavené"],"st-error":["Chyba","","Error","","","","에러","Fout","","Chyba"],"st-attention":["Vyžaduje pozornost","","Attention","","","","주의","Attentie","","Pozor"],"st-unknown":["Neznámý","","Unknown","","","","알수없음","Onbekend","","Neznáme"],"at":["v","um","at","a las","à","alle","에서","op","o","v"],"less-than":["Méně než minuta","Weniger als eine Minute","Less than a minute","Menos de un minuto","Moins d\'une minute","Meno di un minuto","1분 미만","Minder dan een minuut","Mniej niż minuta","Menej ako minúta"],"today-at":["Dnes v","Heute um","Today at","Hoy a las","Aujourd\'hui à","Oggi alle","오늘","Vandaag om","Dzisiaj o","Dnes o"],"tmw-at":["Zítra v","Morgen um","Tomorrow at","Mañana a las","Demain à","Domani alle","내일","Morgen om","Jutro o","Zajtra o"],"true":["Ano","Ja","Yes",null,"Oui",null,"예","Ja",null,"Áno"],"false":["Ne","Nein","No",null,"Non",null,"아니오","Nee",null,"Nie"],"na":["N/A","NV","NA","NA","NA","ND","없음","N.v.t.","N/D","N/A"],"cover-closed":["Uzavřené","Geschlossen","Closed","Cerrada","Fermé","Chiuso","닫힘","Gesloten","Zamknięta","Zavreté"],"cover-opened":["Otevřené","Geöffnet","Opened","Abierta","Ouvert","Aperto","열림","Open","Otwarta","Otvorené"],"storage-space":["{{free}} volných z {{total}}","{{free}} von {{total}} frei","{{free}} of {{total}} free",null,null,null,"{{total}} 중 {{free}} 남음","{{free}} van {{total}} vrij",null,"{{free}} voľných z {{total}}"]},"msg":{"modal-p1":["Vítejte na webovém rozhraní vaší","Willkommen zur Weboberfläche Ihres","Welcome to the web interface of your","Bienvenido a la interfaz web de tu","Bienvenue dans l\'interface web de votre","Benvenuto nell\'interfaccia web del tuo","당신의 웹 인터페이스에 오신 것을 환영합니다.","Welkom bij de webinterface van uw","Witaj w interfejsie Twojej","Vitajte vo webovom rozhraní vašej"],"modal-p2":["Upozornění: některé hodnoty jsou zobrazeny pouze v průběhu tisku.","Bitte beachten Sie, dass die Werte nur angezeigt werden, wenn der Drucker gerade druckt.","Please note that values are shown only when the printer is printing.","Tenga en cuenta que los valores se muestran solo cuando la impresora está imprimiendo.","Veuillez noter que les valeurs sont affichées uniquement lorsque l\'imprimante imprime.","Si noti che i valori vengono visualizzati solo durante la stampa.","프린터가 출력중일 경우에만 값이 표시됩니다.","De waarden worden alleen getoond tijdens het printen.","Wartości będą wyświetlane tylko podczas drukowania.","Upozornenie: niektoré hodnoty sú zobrazené len počas tlače."],"api-key-1":["Vítejte ve webovém rozhraní PrusaLink Web!","Willkommen auf der Web-Oberfläche von PrusaLink Web.","Welcome to the PrusaLink Web web interface.","Bienvenido a la interfaz web de PrusaLink Web.","Bienvenue sur l\'interface web locale de PrusaLink Web.","Benvenuti nell\'interfaccia web di PrusaLink Web.","프루사 커넥트 웹 웹인터페이스에 오신 것을 환영합니다.","Welkom bij de PrusaLink Web webinterface.","Witaj w interfejsie sieciowym PrusaLink Web.","Vitajte vo webovom rozhraní PrusaLink Web!"],"api-key-2":["Vložte API klíč.","Bitte geben Sie den API-Schlüssel ein.","Please insert the API key.","Por favor introduce la clave API.","Veuillez insérer la clé API.","Si prega di inserire la chiave API.","API키를 입력하십시오.","Voer de API-sleutel in","Wpisz klucz API.","Vložte API kľúč."],"api-key-3":["Otevřete menu Nastavení -> Síť -> PrusaLink.","Sie finden ihn in Einstellungen -> Netzwerk -> PrusaLink.","You can find it in Settings -> Network -> PrusaLink.","Puedes encontrarla en Ajustes -> Red -> PrusaLink.","Vous pouvez la trouver dans Réglages -> Réseau -> Informations de connexion.","È possibile trovarla in Impostazioni -> Rete -> PrusaLink","설정 -> 네트워크 -> 프루사링크에서 찾을 수 있습니다.","Deze kan gevonden worden bij Settings -> -> Network -> PrusaLink.","Możesz znaleźć go w sekcji Ustawienia -> Sieć -> PrusaLink.","Nájdete ho v Nastavenia -> Sieť -> PrusaLink."],"offline":{"not-responsing":["Tiskárna nereaguje.","Der Drucker antwortet nicht.","Printer is not responding.",null,null,null,"프린터가 응답하지 않습니다.","Printer reageert niet.",null,"Tlačiareň nereaguje."],"please-wait":["Prosím, čekejte...","Bitte warten...","Please wait...",null,null,null,"기다려주십시오...","Even geduld...",null,"Prosím, čakajte..."]},"drop-zone":{"label":["Přetažením souboru zahájíte nahrávání","","Drop file here to start the uploading","","","","파일을 여기로 끌어놓으면 업로드가 시작됩니다.","Sleep het bestand hierheen om het te uploaden","",""]},"del-proj":["Opravdu chcete smazat {{file_name}}?","Wollen Sie wirklich {{file_name}} löschen?","Do you really want to delete {{file_name}}?","¿Realmente deseas borrar {{file_name}}?","Voulez-vous vraiment supprimer le fichier {{file_name}} ?","Vuoi davvero eliminare il file {{file_name}}?","{{file_name}}을 정말로 삭제하겠습니까?","Weet u zeker dat u {{file_name}} wilt verwijderen?","Czy na pewno chcesz usunąć plik {{file_name}}?","Naozaj chcete zmazať {{file_name}}?"],"sla-pour-resin":["Nalijte do vaničky dostatečné množství resinu pro vybraný soubor a zavřete víko. Minimální objem resinu je zobrazen na dotykovém displeji tiskárny.","Füllen Sie genügend Harz für die ausgewählte Datei in den Tank und schließen Sie den Deckel. Die minimale Menge des Harzes wird auf dem Touchscreen angezeigt.","Pour enough resin for selected file into the tank and close the lid. Minimal amount of the resin is displayed on the touchscreen.",null,"Versez suffisamment de résine dans le réservoir pour le projet sélectionné et fermez le capot.",null,"선택한 파일을 위한 레진을 탱크에 붓고 뚜껑을 닫습니다. 터치스크린에 최소량의 레진이 표시됩니다.","Doe genoeg resin voor het geselcteerde bestand in het vat en sluit de kap. De minimale hoeveelheid resin wordt aangegeven op het touchscreen.",null,"Do nádržky nalejte dostatočné množstvo resinu pre vybraný súbor a zatvorte veko. Minimálne množstvo resinu sa zobrazí na dotykovom displeji."],"cancel":["Chcete opravdu zrušit tisk?","Wollen Sie den Druck wirklich abbrechen?","Do you really want to cancel print?","¿Realmente quieres cancelar la impresión?","Voulez-vous vraiment annuler l\'impression ?","Vuoi davvero annullare la stampa?","출력을 취소하겠습니까?","Weet u zeker dat u de print wilt stoppen?","Czy na pewno chcesz anulować wydruk?","Chcete naozaj zrušiť tlač?"]},"btn":{"login":["Přihlášení","Login","Login","Iniciar sesión","Connexion","Accedi","로그인","Login","Zaloguj","Prihlásenie"],"confirm":["Potvrdit","Bestätigen","Confirm","Confirmar","Confirmer","Conferma","결정","Bevestigen","Potwierdzam","Potvrdiť"],"cancel":["Zrušit","Abbrechen","Cancel","Cancelar","Annuler","Annulla","취소","Annuleren","Anuluj","Zrušiť"],"del":["Smazat","löschen","Delete","borrar","supprimer","elimina","삭제","Verwijderen","usuń","Zmazať"],"download":["Stáhnout","Herunterladen","Download",null,"télécharger",null,"다운로드","Download",null,"Stiahnuť"],"pause-pt":["Pozastavit tisk","Druck pausieren","Pause Print",null,"Mettre l\'impression en pause",null,"출력 일시 정지","Pauzeer print",null,"Pozastaviť tlač"],"resume-pt":["Pokračovat v tisku","Druck fortsetzen","Resume Print",null,"Redémarrer l\'impression",null,"출력 복귀","Hervat print",null,"Pokračovať v tlači"],"start-pt":["Start tisku","Druck starten","Start Print","Empezar impresión","Lancer l\'impression","Inizia stampa","출력 시작","Start print","Start druku","Štart tlače"],"stop-print":["Zrušit tisk","Druck abbrechen","Stop Print","Cancelar impresión","Annuler l\'impression","Annulla stampa","출력 정지","Stop print","Anuluj wydruk","Zrušiť tlač"],"upld-file":["Nahrát soubor","Datei hochladen","Upload File",null,null,null,"파일 업로드","Upload bestand",null,"Nahrať súbor"],"check-updates":["Kontrola aktualizací","","Check Updates","","","","업데이트 체크","","",""],"connect":{"link":["Spárovat","","Link","","","","연결","Verbinden","",""],"unlink":["Odpojit","","Unlink","","","","연결끊기","Verbinding verbreken","",""]},"chg":["Změnit","Ändern","Change",null,"Mettre à jour",null,"변경","Wijzig",null,"Zmeniť"],"reset":["","","Reset","","","","리셋","Reset","",""],"disable-steppers":["Vypnout motory","Schrittmotoren deaktivieren","Disable Steppers",null,"Desactiver les moteurs",null,"모터 정지","Stappenmotors uitschakelen",null,"Vypnúť motory"],"extrude":["Vytlačit","Extrudieren","Extrude",null,"extruder",null,"압출","Extrudeer",null,"Vysunúť"],"retract":["Vtáhnout","Zurückziehen","Retract",null,"Retracter",null,"리트렉트","Retract",null,"Zasunúť"],"set":["Nastavit","Setzen","Set",null,"Régler",null,"설정","Instellen",null,"Nastaviť"],"upgrade":["","","Upgrade","","","","업그레이드","","",""],"yes":["Ano","Ja","Yes","Sí","Oui","Sì","예","Ja","Tak","Áno"],"no":["Ne","Nein","No","No","Non","No","아니오","Nee","Nie","Nie"],"chg-print-set":["Tisková nastavení","Druckeinstellungen","Print Settings","Ajustes de Impresión","Réglages d\'Impression","Impostazioni di stampa","프린트 설정","Printinstellingen","Ustawienia druku",""],"save-chgs":["Uložit změny","Änderungen speichern","Save changes","Guardar cambios","Enregistrer les modifications","Salva le modifiche","변경내용 저장","Wijzigingen opslaan","Zapisz zmiany","Uložiť zmeny"]},"camera":{"settings":["Nastavení kamery","","Camera Settings","","","","카메라 세팅","Camera-instellingen","",""],"name":["Název kamery","","Camera Name","","","","카메라 명칭","Cameranaam","",""],"resolution":["Rozlišení","","Resolution","","","","해상도","Resolutie","",""],"trigger-scheme":["","","Trigger Scheme","","","","트리거 계획","Triggerschema","",""],"title":["Kamery","","Cameras","","","","카메라","Camera\'s","",""],"time":["Čas snímku","","Snapshot Time","","","","스냅샷 시간","Snapshot-tijd","",""],"cloud":{"linked":["Připojeno","","Linked","","","","연결됨","Verbonden","",""],"not-linked":["Nepřipojeno","","Not Linked","","","","연결되지 않음","Niet verbonden","",""],"label":["","","CONNECT","","","","CONNECT","CONNECT","",""]},"btn":{"connect":["Zkusit povolit kameru","","Try to enable camera","","","","카메라 활성화 시도중","Probeer de camera in te schakelen","",""],"settings":["Otevřít nastavení kamery","","Open camera settings","","","","카메라 설정 열기","Open camera-instellingen","",""],"link":["Připojit kameru do Connectu","","Link camera to CONNECT","","","","카메라를 CONNECT에 연결하기","Verbind camera met CONNECT","",""],"unlink":["Odpojit kameru z Connectu","","Unlink camera from CONNECT","","","","카메라를 CONNECT에서 연결 해제하기","Verbreek verbinding van camera met CONNECT","",""]},"path":["Cesta","","Path","","","","경로","Pad","",""],"driver":["Ovladač","","Driver","","","","드라이버","Driver","",""]},"printer":{"title":["Tiskárna","Drucker","Printer",null,"imprimante",null,"프린터","Printer",null,"Tlačiareň"],"name":["Název tiskárny","Name des Druckers","Printer name",null,"nom de l\'imprimante",null,"프린터 이름","Naam van de printer",null,"Názov tlačiarne"],"location":["Umístění tiskárny","Standort des Druckers","Printer location",null,"localisation de l\'imprimante",null,"프린터 위치","Locatie van de printer",null,"Umiestnenie tlačiarne"]},"print":{"fdm":{"1":["Je tiskárna připravena?","Ist der Drucker bereit?","Is the printer ready?",null,"L\'imprimante est-elle prête ?",null,"프린터가 준비되었습니까?","Is de printer klaar voor gebruik?",null,"Je tlačiareň pripravená?"],"2":["Je tisková podložka prázdná a čistá?","Ist der Druckbogen leer und sauber?","Is printing sheet empty and clean?",null,"Le surface d\'impression est-elle vide et propre ?",null,"프린트 시트가 비어있고 깨끗합니까?","Is het printplatform leeg en schoon?",null,"Je tlačová podložka prázdna a čistá?"]}},"upld":{"title":["Nahrát soubor","Projekt hochladen","Upload file","envía proyecto","Téléversement de projet","carica progetto","파일업로드","Bestand uploaden","prześlij projekt","Nahrať súbor"],"start-pt":["po přenosu zahájit tisk","Druck nach der Übertragung starten","Start print after transfer",null,"Démarrer l\'impression après le transfert",null,"전송 후 출력 시작","Start print na het omzetten",null,"po prenose spustiť tlač"],"remote":{"source":["URL zdroje","Quell-URL","Source URL",null,"URL de la source",null,"원본 URL","Bron van URL",null,"URL zdroja"],"hint-fdm":["Zadejte URL souboru G-CODE","URL der G-CODE-Datei eingeben","Type URL of G-CODE file",null,"Entrez l\'URL du fichier G-CODE du projet",null,"G코드 파일의 주소를 입력하십시오","Type de URL van het gcode-bestand",null,"Zadajte URL súboru G-code"],"file":["Název souboru","Dateiname","File name",null,null,null,"파일명","Bestandsnaam",null,"Názov súboru"],"file-hint":["Zadejte název souboru","Dateiname eingeben","Type file name",null,null,null,"파일명을 입력하십시오","Type de bestandsnaam",null,"Zadajte názov súboru"]},"direct":{"choose":["Vyberte {{file}} nebo jej přetáhněte sem.","Klicke um eine {{file}} Datei auszuwählen oder ziehe sie hier hin","Click to choose a {{file}} file or drag it here",null,"Cliquer pour choisir un fichier {{file}} ou déposez le ici",null,"선택한 {{file}} 파일을 클릭하거나 여기로 드래그하십시오","Klik om een {{file}}-bestand te kiezen of sleep het hierheen",null,"Kliknutím vyberte súbor {{file}} alebo ho sem potiahnite."]}},"download":{"dl-started":["Začátek stahování","Herunterladen Gestartet","Download Started",null,"téléchargement démarré",null,"다운로드가 시작됨","Downloaden gestart",null,"Sťahovanie začalo"],"start-pt":["Spustit tisk","Autostart","Autostart",null,"Démarrage automatique",null,"자동시작","Autostart",null,"Spustiť tlač"]},"temps":{"title":["Teploty","Temperaturen","Temperatures","Temperaturas","Températures","Temperature","온도","Temperatuur","Temperatury","Teploty"]},"version":{"title":["Verze","Version","Version",null,"version",null,"버전","Versie",null,"Verzia"],"api":["API","API","API",null,"api",null,"API","API",null,"API"],"hostname":["Hostname","Hostname","Hostname",null,"nom d\'hôte",null,"호스트명","Hostnaam",null,"Hostname"],"firmware":["Firmware","Firmware","Firmware",null,"micrologiciel",null,"펌웨어","Firmware",null,"Firmware"],"server":["Server","Server","Server",null,"serveur",null,"서버","Server",null,"Server"],"text":["Text","Text","Text",null,"texte",null,"텍스트","Tekst",null,"Text"],"sdk":["SDK","SDK","SDK",null,"sdk",null,"SDK","SDK",null,"SDK"],"fe":["Frontend","Frontend","Frontend",null,"frontend",null,"프론트엔드","Frontend",null,"Frontend"]},"sys-version":{"title":["Verze systému","Systemversion","System Version",null,"version du système",null,"시스템버전","Systeenversie",null,"Verzia systému"],"python":["Python","Python","Python",null,"python",null,"파이썬","Python",null,"Python"],"description":["Popis","Beschreibung","Description",null,"description",null,"설명","Beschrijving",null,"Popis"],"id":["ID","ID","ID",null,"ID",null,"ID","ID",null,"ID"],"os":["OS","OS","OS",null,"Système d\'exploitation",null,"OS","OS",null,"OS"]},"updates":{"title":[null,null,"System Updates",null,null,null,null,null,null,null]},"user":{"title":["Uživatel","Benutzer","User",null,"utilisateur",null,"유저","Gebruiker",null,"Používateľ"],"username":["Uživatelské jméno","Benutzername","User Name",null,"nom d\'utilisateur",null,"유저명","Gebruikersnaam",null,"Používateľské meno"],"format":{"name":["Uživatelské jméno musí obsahovat alespoň 3 znaky.","Der Benutzername muss mindestens 3 Zeichen lang sein.","Username length must be at least 3 characters long.","","","","유저명은 최소 3자리 이상 입력하십시오.","De gebruikersnaam moet minimaal 3 karakters lang zijn.","","Používateľské meno musí obsahovať aspoň 3 znaky."],"password-1":["Heslo nesmí začínat či končit mezerami, a zároveň musí splňovat jednu z následujících podmínek:","Das Passwort darf weder am Anfang noch am Ende Leerzeichen enthalten und muss mindestens eine der folgenden Optionen erfüllen:","Password can\'t contain spaces on the beggining nor the end and must meet at least one of these options:","","","","암호는 시작부분에 공백을 둘 수 없으며 다음옵션 중 하나이상을 충족해야 합니다.","Het wachtwoord mag geen spaties aan het begin of het einde bevatten en moet aan minstens één van deze opties voldoen:","","Heslo nesmie začínať ani končiť medzerami a musí spĺňať aspoň jednu z týchto podmienok:"],"password-2":["- Heslo musí obsahovat minimálně 8 znaků, zahrnujících alespoň 1 malé písmeno, 1 velké písmeno a 1 číslo","- Minimale Länge 8 Zeichen, davon ein Kleinbuchstabe, ein Großbuchstabe und eine Zahl","- Minimal length 8 characters, including one lowercase letter, one uppercase letter and one number","","","","- 최소 길이 8자(소문자 1개, 대문자 1개, 숫자 1개 포함)","- Minimaal 8 karakters lang, met tenminste een kleine letter, een hoofdletter en een nummber","","- Heslo musí obsahovať minimálne 8 znakov, vrátane aspoň 1 malého písmena, 1 veľkého písmena a 1 číslice"],"password-3":["- Heslo musí obsahovat minimálně 8 znaků, zahrnujících alespoň 1 speciální symbol (např. @)","- Mindestlänge 8 Zeichen, einschließlich eines nicht alphanumerischen Zeichens (z. B. @)","- Minimal length 8 characters, including one non-alphanumeric character (e.g. @)","","","","- 영숫자가 아닌 문자(예: @) 1개를 포함한 최소 길이 8자","- Minimaal 8 karakters lang, met tenminste één niet-alfanumeriek karakter (bijv. @)","","- Heslo musí obsahovať minimálne 8 znakov, vrátane aspoň 1 špeciálneho symbolu (napr. @)"],"password-4":["- Heslo musí obsahovat minimálně 15 znaků","- Minimale Länge 15 Zeichen","- Minimal length 15 characters","","","","- 최소 길이 15자","- Minimaal 15 karakters lang","","- Heslo musí obsahovať minimálne 15 znakov"]},"new-password":["Nové heslo","Neues Passwort","New Password",null,"nouveau mot de passe",null,"신규 암호","Nieuw wachtwoord",null,"Nové heslo"],"re-password":["Zopakujte heslo","Passwort wiederholen","Repeat Password",null,"répéter le mot de passe",null,"암호 재입력","Herhaal wachtwoord",null,"Zopakujte heslo"],"password":["Heslo","Passwort","Password",null,"mot de passe",null,"암호","Wachtwoord",null,"Heslo"]},"serial":{"label":["Sériové číslo","Seriennummer","Serial Number",null,"numéro de série",null,"시리얼넘버","Serienummer",null,"Sériové číslo"]},"api_key":{"label":["","","API Key","","","","API KEY","API-sleutel","",""]},"logs":{"title":["Logy","Protokolle","Logs",null,"logs",null,"로그","Logbestanden",null,"Logy"],"select-file":["Vyberte soubor","Datei auswählen","Select File",null,"Sélectionnez une fichier",null,"파일 선택","Selecteer bestand",null,"Vyberte súbor"],"not-selected":["Není vybrán soubor logů!","Es ist keine Protokolldatei ausgewählt!","No log file is selected!",null,"Pas de fichier de log sélectionné!",null,"로그 파일이 선택되지 않았습니다!","Geen logbestand geselecteerd!",null,"Nie je vybraný žiadny logovací súbor!"],"select-file-placeholder":["Vyberte soubor logů","Protokolldatei auswählen","Select log file",null,"selectionnez un fichier de log",null,"로그 파일 선택","Selecteer logbestand",null,"Vyberte logovací súbor"],"empty-file":["Soubor je prázdný!","Die Protokolldatei ist leer!","Log file is empty!",null,"Le fichier de log est vide!",null,"로그파일이 비어있음!","Logbestand is leeg!",null,"Logovací súbor je prázdny!"],"file-too-large":["Soubory logů o velikosti větší než {{size}} jsou k dispozici pouze ke stažení!","Protokolldateien, die größer als {{size}} sind, stehen nur zum Herunterladen zur Verfügung.","Log files of size larger than {{size}} are available only for downloading.",null,"Les fichiers de log d\'une taille supérieure à {{size}} ne sont disponibles que pour le téléchargement.",null,"로그 파일을 다운로드 하기 위해서는 최소 {{size}} 이상의 용량이 필요합니다.","Logbestanden groter dan {{size}} kunnen alleen gedownload worden.",null,"Logovacie súbory s veľkosťou väčšou ako {{size}} sú k dispozícii len na stiahnutie.!"]},"ntf":{"success":["Požadavek byl úspěšný","Erfolg","The request was successful","Éxito","la demande a été traitée avec succès","Successo","요청이 성공했습니다.","De aanvraag was succesvol","Sukces","Žiadosť bola úspešná"],"settings-suc":["Nastavení bylo úspěšně změněno.","Die Einstellungen wurden erfolgreich geändert.","Settings was changed successfully.",null,"Paramètres modifiés avec succès.",null,"설정이 성공적으로 변경되었습니다.","Instelling succesvol gewijzigd.",null,"Nastavenia boli úspešne zmenené."],"camera-suc":["","","Camera control request has been sent","","","","카메라 조작 요청이 전송되었습니다.","Aanvraag voor camerabesturing is verzonden","",""],"camera-config-success":["Konfigurace kamery byla aktualizovaná","","Camera configuration has been updated","","","","카메라 구성이 업데이트되었습니다.","Cameraconfiguration is geüpdatet","",""],"upld-suc":["Soubor {{file_name}} byl úspěšně nahrán.","Das Hochladen des Projekts {{file_name}} war erfolgreich.","The file {{file_name}} was uploaded successfully.","El envío del proyecto {{file_name}} se completó.","Le projet {{file_name}} a été téléversé correctement.","Caricamento del progetto {{file_name}} riuscito.","{{file_name}}파일이 성공적으로 업로드되었습니다.","Het bestand {{file_name}} is succesvol geüpload.","Przesyłanie projektu {{file_name}} powiodło się.","Súbor {{file_name}} bol úspešne nahraný."],"error":["Chyba","Fehler","Error","Error","Erreur","Errore","에러","Fout","Błąd","Chyba"],"upld-unsuc":["Nahrání souboru {{file_name}} selhalo.","Das Hochladen des Projekts {{file_name}} war nicht erfolgreich.","The file {{file_name}} upload was unsuccessful.","El envío del proyecto {{file_name}} ha fallado.","Le téléversement du projet {{file_name}} a échoué.","Caricamento del progetto {{file_name}} non riuscito.","{{file_name}}파일의 업로드가 실패하였습니다.","Het bestand {{file_name}} is niet succesvol geüpload.","Przesyłanie projektu {{file_name}} nie powiodło się.","Nahrávanie súboru {{file_name}} zlyhalo."],"upld-start":["Požadavek na nahrání souboru byl přijat","Upload-Anfrage wurde angenommen","Upload request has been accepted",null,null,null,"업로드 요청이 수락되었습니다.","Uploadverzoek is geaccepteerd",null,"Žiadosť o odoslanie bola prijatá"]},"upgrade":{"success":{"title":["","","Upgrade Successful","","","","업그레이드 성공","","",""],"message":["","","Page will be reloaded in 5 seconds","","","","페이지가 5초 뒤 다시 시작됩니다.","","",""]}},"sort":{"by-name":["Název","","Name","","","","이름으로 정렬하기","Naam","",""],"by-date":["Datum","","Date","","","","날짜로 정렬하기","Datum","",""],"by-size":["Velikost","","Size","","","","크기로 정렬하기","Grootte","",""]},"unit":{"h":["h","h","h","h","h","h","h","u","g","h"],"min":["min","min","min","min","min","min","min","min","min","min"],"ml":["ml","ml","ml","ml","mL","ml","ml","ml","ml","ml"],"rpm":["RPM","UPM","RPM","RPM","TPM","RPM","RPM","RPM","Obr./min","RPM"],"b":["B","B","B",null,"B",null,"B","B",null,"B"],"kb":["KB","KB","KB",null,"KB",null,"KB","kB",null,"KB"],"mb":["MB","MB","MB",null,"MB",null,"MB","MB",null,"MB"],"gb":["GB","GB","GB",null,"GB",null,"GB","GB",null,"GB"]},"exp-times":{"exp-time":["Doba osvitu [s]","Belichtung [s]","Exposure [s]","Exposición [s]","Exposition [s]","Esposizione [s]","[s]초 노출","Belichting [s]","Czas naświetlania [s]","Osvit [s]"],"inc":["Navýšení expozice (s)","Belichtungszeit inkr. [s]","Exposure time incr. [s]","Incremento tiempo exp. [s]","Incr. du temps d\'exposition [s]","Incremento tempo di esposizione [s]","[s]초 노출 시간 증가","Belichtingstijd verhogen [s]","Przyrost czasu naświetl. [s]","Prírastok osvitu (s)"],"layer-1st":["Osvit první vrstvy [s]","Erste Schicht Bel. [s]","First Layer Expo. [s]","Primera Capa Expo. [s]","Première couche Expo. [s]","Esposizione Primo layer [s]","첫번째 레이어 노출시간 [s]초","Belichtingstijd eerste laag [s]","Naśw. 1. warstwy [s]","Osvit prvej vrstvy [s]"],"profile":["Tiskový profil","Druckprofil","Print profile","Perfil de Impresión","Profil d\'Impression","Profilo di stampa","출력 프로필","Printprofielen","Profil druku","Tlačový profil"],"faster":["Rychlejší","Schneller","Faster","Rápido","Plus rapide","Più veloce","빠르게","Sneller","Szybciej","Rýchlejšie"],"slower":["Pomalejší","Langsamer","Slower","Lento","Plus lent","Più lento","느리게","Langzamer","Wolniej","Pomalšie"],"high-viscosity":["Velmi Viskózní","Hohe Viskosität","High Viscosity",null,"Haute viscosité",null,"고점도","Hoge viscositeit",null,"Vysoká viskozita"]}}}')}},t={};function a(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,a),i.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.p="",(()=>{"use strict";var e=a(8751),t=a(8495),n=a(6648);const s=()=>{document.getElementById("menu").addEventListener("click",(()=>{document.getElementById("menu").classList.contains("burger-open")?i():(document.getElementById("menu").classList.add("burger-open"),document.getElementById("navbar").classList.remove("burger-menu"))})),document.getElementById("navbar").querySelectorAll("a[href]").forEach((e=>{e.addEventListener("click",i)}))};function i(){document.getElementById("menu").classList.remove("burger-open"),document.getElementById("navbar").classList.add("burger-menu")}var l=a(7780),o=a(1351),r=a(5412);const d=(e,t)=>{const a=r.L.init(e,t);a&&(a.setOptions((0,l.Vb)()),a.value=(0,l.G3)(),a.onselect=e=>{(0,l.m0)(e),window.location.reload()})};let c=!1;const u={printer:{get:()=>(0,n.LK)("/api/printer"),init:!0,update:!0},profiles:{get:()=>new Promise((e=>e({}))),init:!0,update:!1},job:{get:()=>(0,n.LK)("/api/job"),init:!1,update:!0},connection:{get:()=>(0,n.LK)("/api/connection"),init:!0,update:!0,updateInterval:5e3}};async function p(e){const t=(new Date).getTime(),a=Object.fromEntries(Object.entries(u).map((([a,n])=>[a,(()=>{if(!e)return n.init;if(n.update){if(!n.updateInterval)return!0;if(n.timestamp||(n.timestamp=t+n.updateInterval),t>=n.timestamp)return n.timestamp=t+n.updateInterval,!0}})()?n.get():void 0])).filter((([,e])=>void 0!==e))),n=Object.values(a),s=await Promise.all(n.map((e=>e.then((e=>({ok:!0,payload:e}))).catch((e=>({ok:!e.code&&null,error:e}))))));return Object.fromEntries(Object.entries(a).map((([e],t)=>[e,s[t]])))}function m(a){try{t.Z.init(a),window.onpopstate=t=>t&&(0,e.g9)(t.currentTarget.location.hash||"#dashboard"),(0,e.g9)(window.location.hash||"#dashboard")}catch(e){h(e)}}function v(e){try{t.Z.update(e)}catch(e){h(e)}}function g(e){(0,o.S)(e,{fallbackMessage:{title:"API error",message:"Cannot connect to printer"}})}function h(e){(0,o.S)(e,{fallbackMessage:{title:"Application error",message:"Something bad happened on application side"}}),console.error(e)}window.onload=()=>{console.log("PrusaLink v.3.12.0 #b'b7eb1ab'"),s(),d("lang-dropdown","lang-dropdown"),(0,l.ot)(),document.querySelectorAll("a[href]").forEach((t=>{t.addEventListener("click",(a=>{(0,e.c4)(t.href)&&a.preventDefault()}))})),(0,n.Z5)().then((e=>{e&&async function(e){let a=!1;for(;;){let n=!1;try{const t=await p(a);t.printer&&(c=null===t.printer.ok),Object.values(t).forEach((({ok:e,error:t})=>{e||(n=!0,null!==e&&g(t))})),a?v(t):n||(t.version={ok:!0,payload:e},m(t),a=!0)}catch(e){h(e)}t.Z.setConnected(!c),await new Promise((e=>setTimeout(e,1e3)))}}(e)}))}})()})(); +(()=>{var e={5862:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"f844a0a85dde310826fce450c3e149d3.svg"},340:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"d0ce7d704590cb0b868ae92249ee86e8.svg"},3246:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"e6e0734bc2dad609a3e92f1873412f11.svg"},6730:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"557f3616d5a1b407b59795b8328bb51f.svg"},8065:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"2e842fcb7b83af8e1e0d26afd80f8fd9.svg"},2456:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"f6a7f34a841f532dd1e3e4d610d164f6.svg"},9819:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"53df9c11e268c2390b147239f9ee8796.svg"},7038:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"9332c323b291ba7226ddcdabb0c8e7c4.svg"},1656:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"79e90794ba3b36a64a12414decda0932.svg"},931:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"926f52aea63cfd597b30096bfe4077c6.svg"},7336:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"44b654f4ca724e154a9bc60335e98847.svg"},9387:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"8657650f85be23655543d28f58941616.svg"},5300:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"ea93bcffb8771234f8c641f3b7e9f848.svg"},3482:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"ccd215a92d0427a21339a8c38e2a40f3.svg"},5515:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"997c391425907810b4a6e42663d11fd4.svg"},4578:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"24e2e49c87df140cf16aa18b4e261f12.svg"},2e3:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"58151992d28dfb34ee417e0ebf6a66b6.svg"},2290:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"c8a0ca767f73685bbe06863f81e9d3cb.svg"},3174:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"39e93870e6b8fd4ef2d9ed668f8c1545.svg"},8796:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"1218694688ee15ee97bcded9e1a75cc8.svg"},1373:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"dfb811cc28f8e3d7c14bcedbe7ef35b8.svg"},4622:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>n});const n=a.p+"b891ace1622f34bac5a2b4edb7adc733.svg"},5464:(e,t,a)=>{var n=a(7091),s=a(8065),i=a(4622),l=a(6730),o='

    • Camera Name

      -

    • Snapshot Time

      -

      ';e.exports=o},3478:(e,t,a)=>{var n=a(7091),s=a(340),i=a(5862),l=a(1656),o=n(s),r=n(i),d=n(l),c='

      printer coordinates

      X axis

      0 mm

      Y axis

      0 mm

      Z axis

      0 mm

      stepper motors

      heated bed X and Y move

      move step [mm]

      nozzle Z move

      extruder

      extrude/retract step [mm]

      nozzle temperature

      0°C

      speed

      100%

      heated bed temperature

      0°C

      flow

      100%

      ';e.exports=c},2373:(e,t,a)=>{var n=a(7091),s=a(2e3),i=a(2290),l=a(3246),o=a(4578),r=a(7038),d=a(2456),c=a(9819),u=a(9387),p=a(5300),m=a(3482),v=a(4622),g=a(6730),h=a(3174),b=a(8796),f=n(s),y=n(i),x=n(l),w=n(o),k=n(r),S=n(d),z=n(c),E=n(u),P=n(p),L=n(m),I=n(v),_=n(g),T='

      Upload file

      Add file from

       

      Click to choose a *.sl1 file or drag it here

      Source URL

      Type URL of G-CODE file

      File name

      Type or edit file name

      Progress

      NA

      Size

      NA

      Download Started

      NA

      Remaining Time

      NA

      Autostart

      NA

      Temperatures

      Cameras

      • -

      • -

      ';e.exports=T},7189:(e,t,a)=>{var n=a(7091),s=a(2e3),i=a(2290),l=a(3246),o=a(4578),r=a(7038),d=a(2456),c=a(9819),u=a(9387),p=a(5300),m=a(3482),v=a(4622),g=a(6730),h=a(931),b=a(5515),f=a(3174),y=a(8796),x=a(8065),w=n(s),k=n(i),S=n(l),z=n(o),E=n(r),P=n(d),L=n(c),I=n(u),_=n(p),T=n(m),N=n(v),j=n(g),A=n(h),C=n(b),B='

      Local

      0%

      0 GB of 0 GB free

      Add file from

       

      Click to choose a *.sl1 file or drag it here

      Source URL

      Type URL of G-CODE file

      File name

      Type or edit file name

      Progress

      NA

      Size

      NA

      Download Started

      NA

      Remaining Time

      NA

      Autostart

      NA

      ';e.exports=B},5198:(e,t,a)=>{var n=a(7091),s=a(4622),i=a(6730),l='

      ';e.exports=l},2936:(e,t,a)=>{var n=a(7091),s=a(7038),i=a(7336),l=a(1373),o=n(s),r=n(i),d=n(l),c='

      version

      api

      hostname

      firmware

      server

      text

      sdk

      frontend

      3.12.0

      system version

      updates

      connection

      PRUSA CONNECT

      connection status

      Successfully connected

      3D printer connection status

      Successfully connected

      printer

      printer name

      printer location

      user

      username

      new password

      repeat password

      current password

      serial number

      serial number

      api key

      api key

      logs

      select file

      • No log file is selected!
      ';e.exports=c},7091:e=>{"use strict";e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(t.hash&&(e+=t.hash),t.maybeNeedQuotes&&/[\t\n\f\r "'=<>`]/.test(e)?'"'.concat(e,'"'):e)}},6648:(e,t,a)=>{"use strict";a.d(t,{LK:()=>r,Z5:()=>v,gJ:()=>p,iT:()=>d,wU:()=>l});var n=a(8236),s=a(1351);const i=()=>new Promise(((e,t)=>{(0,n.o)((e=>t=>{const a=document.getElementById("modal-apiKey"),n=document.importNode(a.content,!0);return n.getElementById("apiKey").addEventListener("keydown",(a=>{"Enter"==a.key&&(t(),e(a.target.value))})),n.getElementById("login").addEventListener("click",(a=>{a.preventDefault();let n=document.getElementById("apiKey").value;t(),e(n)})),n})(e),{timeout:0,closeOutside:!1})})).then((e=>sessionStorage.setItem("apiKey",e))),l=(e="application/json")=>"ApiKey"==sessionStorage.getItem("authType")?{"X-Api-Key":sessionStorage.getItem("apiKey"),Accept:e}:{Accept:e},o=()=>new Promise(((e,t)=>(sessionStorage.setItem("auth","pending"),fetch("/api/v1/info",{headers:l()}).then((t=>{if(401==t.status){const a=t.headers.get("WWW-Authenticate").split(" ")[0];return sessionStorage.setItem("authType",a),sessionStorage.removeItem("apiKey"),"ApiKey"==a?i().then((()=>o().then((t=>e(t))))):o().then((t=>e(t)))}{const e=t.json();return 200!=t.status&&e.then((e=>(0,s.S)({data:e}))),e}})).then((t=>{sessionStorage.setItem("auth","true"),e(t)}))))),r=(e,t={})=>c(e,t,"application/json","json"),d=(e,t={})=>c(e,t,"text/plain","text");async function c(e,t={},a,n){if("true"!=sessionStorage.getItem("auth"))throw{code:401};{t.headers={...t.headers,...l(a)};const s=await fetch(e,t),i=s.status,o={code:i,eTag:s.headers.get("etag")};switch(i){case 401:throw sessionStorage.setItem("auth","false"),o;case 204:case 304:return o;default:const e=await s.text();if(!s.ok){if(e.length>0)try{o.data=JSON.parse(e)}catch{}throw o.data=o.data||{title:`Error ${i}`,message:s.statusText},o}return o.data="json"===n?0===e.length?{}:JSON.parse(e):e,o}}}const u=(e,t,a)=>new Promise(((n,s)=>{"true"==sessionStorage.getItem("auth")?(t.headers={...l(),...t.headers},fetch(a?`${e}?ct=${a}`:e,t).then((e=>{401==e.status&&(sessionStorage.setItem("auth","false"),s(e)),e.ok?e.blob().then((t=>n({url:URL.createObjectURL(t),headers:e.headers}))):s(e)})).catch((e=>s(e)))):s()})),p=(e,t,a={})=>u(e,{...a,headers:{...a.headers,Accept:"image/*"}},t),m=e=>{const t=document.getElementById("modal-welcome"),a=document.importNode(t.content,!0);return a.querySelector(".close-button").addEventListener("click",e),a},v=()=>null==localStorage.getItem("showWelcome")?new Promise(((e,t)=>{(0,n.o)(m,{closeCallback:()=>{localStorage.setItem("showWelcome",!0),e()}})})).then((()=>o())):o()},1972:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n=function(e,t){let a=document.createElement("a");a.href=e,a.download=t||"",a.click(),a.remove()}},646:(e,t,a)=>{"use strict";function n(e,t=!0){e&&(t&&!e.hasAttribute("hidden")&&e.setAttribute("hidden",!0),!t&&e.hasAttribute("hidden")&&e.removeAttribute("hidden"))}function s(e,t=!0){n(e,!t)}function i(e,t=!0){e&&(t&&!e.hasAttribute("disabled")&&e.setAttribute("disabled",!0),!t&&e.hasAttribute("disabled")&&e.removeAttribute("disabled"))}function l(e,t=!0){return i(e,!t)}function o(){s(document.querySelector("#job .loading-overlay"))}function r(){n(document.querySelector("#job .loading-overlay"))}function d(e,...t){const a=n=>{if(t)for(const e of t)if(e&&e.contains(n.target))return;e&&e(),window.removeEventListener("pointerup",a)};window.addEventListener("pointerup",a)}a.d(t,{H:()=>i,QH:()=>n,QP:()=>o,Ti:()=>d,Zk:()=>r,gL:()=>l,yx:()=>s})},5537:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n=function(e){return"string"==typeof e?document.getElementById(e):e||document.body}},9741:e=>{e.exports=function(e,t){let a=t.split("."),n=e;for(const e of a)if(n=n[e],!n)break;return n}},7780:(e,t,a)=>{"use strict";a.d(t,{G3:()=>v,Iu:()=>h,Vb:()=>g,m0:()=>m,ot:()=>f});var n=a(5537),s=a(9741),i=a.n(s);const l=a(4977),o=l.langs,r=l.texts,d=o.indexOf("en");let c,u;function p(){return navigator.language||navigator.userLanguage||""}function m(e){const t=o.indexOf(e);return-1!==t&&(u=t,c=e,localStorage.setItem("lang",c),!0)}function v(){return c}function g(){return[...o]}function h(e,t){let a=i()(r,`${e}.${u}`);if(!a)return a=i()(r,`${e}.${d}`),a||(a=e),b(a,t),a;let n=null;if(t&&(n=Object.assign({},t),delete n.query,delete n.ref),n&&Object.keys(n).length>0){let e,n=a,s=/{{(.*?)}}/g;for(;e=s.exec(a);){let s=a.substr(e.index+2,e[0].length-4);if("query"!==s&&"ref"!==s)if(s in t){let a=t[s];n=n.replace(e[0],a)}else 0}a=n}return b(a,t),a}function b(e,t){if(t)if(t.ref){t.ref.innerHTML=e}else if(t.query){let a=document.querySelector(t.query);a?a.innerHTML=e:console.warn(`cannot find element with "${t.query}" query`)}}function f(e){(0,n.Z)(e).querySelectorAll('[data-label]:not([data-label=""])').forEach((e=>{const t=h(e.getAttribute("data-label")),a=e.getAttribute("data-label-target");a?e.setAttribute(a,t):e.innerHTML=t}))}m(localStorage.getItem("lang"))||m(p().toLowerCase())||m(p().toLowerCase().split("-")[0])||m("en")},2451:(e,t,a)=>{"use strict";a.d(t,{Z:()=>L});var n=a(6648),s=a(646),i=a(7780),l=a(3707),o=a(8236),r=a(5412),d=a(1351);let c=!1,u=null,p=[];const m={TEN_SEC:"TEN_SEC",THIRTY_SEC:"THIRTY_SEC",SIXTY_SEC:"SIXTY_SEC",EACH_LAYER:"EACH_LAYER",FIFTH_LAYER:"FIFTH_LAYER",MANUAL:"MANUAL"},v=e=>{switch(e){case m.TEN_SEC:return(0,i.Iu)("cameras.trigger-scheme.ten-sec");case m.THIRTY_SEC:return(0,i.Iu)("cameras.trigger-scheme.thirty-sec");case m.SIXTY_SEC:return(0,i.Iu)("cameras.trigger-scheme.sixty-sec");case m.EACH_LAYER:return(0,i.Iu)("cameras.trigger-scheme.each-layer");case m.FIFTH_LAYER:return(0,i.Iu)("cameras.trigger-scheme.fifth-layer");case m.MANUAL:return(0,i.Iu)("cameras.trigger-scheme.manual");default:return`${e}`}},g=()=>(0,l.Vp)((0,i.Iu)("ntf.success"),(0,i.Iu)("ntf.camera-suc")),h=(e,t=E)=>{c=e.connection.states.connect.ok,(0,n.LK)("/api/v1/cameras").then((e=>{const a=(e?.data?.camera_list||[]).map((e=>{let t=p.find((t=>t.id===e.camera_id))||{};return e.camera_id===u&&(e.connected||(u=null)),{id:e.camera_id,config:e.config,connected:e.connected,detected:e.detected,stored:e.stored,registered:e.registered,nextSnapshotAt:t?.nextSnapshotAt,lastSnapshotAt:t?.lastSnapshotAt,lastSnapshotUrl:t?.lastSnapshotUrl}})),n=p.filter((e=>!a.find((t=>e.id===t.id))));t&&t(a,n),p=a})).catch(d.S),p.filter((e=>e.connected)).forEach((e=>y(e.id)))},b=e=>`camera_${e}`,f=e=>document.getElementById(b(e)),y=e=>{const t=p.find((t=>t.id===e));if(!t)return;const a=new Date;t.lastSnapshotAt&&t.nextSnapshotAt&&a{const i=p.find((t=>t.id===e)),l=b(e),o=document.querySelector(`#${l} .camera__no-snapshot`),r=document.querySelector(`#${l} .camera__snapshot`);if(o&&(0,s.yx)(o,!1),r&&((0,s.yx)(r,!0),r.src=t),i){const e=`${n.get("cache-control")}`.match(/max-age=(\d+)/);let s;e&&(s=parseInt(e[1],10)),s||(s=11);const l=n.get("expires"),o=n.get("last-modified"),r=e=>{const t=new Date;return new Date(t.getTime()+1e3*e)};i.nextSnapshotAt=l?new Date(l):r(s),i.nextSnapshotAt{e||(e=u);const t=e?p.find((t=>t.id===e)):null,a=document.getElementById("camera-snapshot-picture"),n=document.getElementById("camera-snapshot-time"),s=document.getElementById("camera-snapshot-name"),[i,l,o,r]=t?.lastSnapshotAt?[t.id,t.config.name,t.lastSnapshotAt.toLocaleString(),t.lastSnapshotUrl]:[null,"-","-",""];u=i,a&&(a.src=r),n&&(n.innerText=o),s&&(s.innerText=l)},w=(e,t,a=!1)=>{e.querySelector(".camera__name").innerText=t.config.name,e.querySelector(".camera__path").innerText=t.config.path,e.querySelector(".camera__driver").innerText=t.config.driver,e.querySelector(".camera__cloud").innerText=t.registered?(0,i.Iu)("camera.cloud.linked"):(0,i.Iu)("camera.cloud.not-linked");const n=e.querySelector(".camera__register"),l=e.querySelector(".camera__unregister"),o=e.querySelector(".camera__add"),r=e.querySelector(".camera__remove"),d=e.querySelector(".camera__settings");(0,s.yx)(n,c&&t.connected&&!t.registered),(0,s.yx)(l,c&&t.connected&&t.registered),(0,s.yx)(o,!1),(0,s.yx)(r,!t.connected),(0,s.yx)(d,t.connected),a&&(o.title=(0,i.Iu)("camera.btn.connect"),d.title=(0,i.Iu)("camera.btn.settings"),n.title=(0,i.Iu)("camera.btn.link"),l.title=(0,i.Iu)("camera.btn.unlink"),o.addEventListener("click",(e=>{e.stopPropagation(),S(t.id)}),!1),r.addEventListener("click",(e=>{e.stopPropagation(),z(t.id)}),!1),d.addEventListener("click",(e=>{e.stopPropagation(),P(t.id)}),!1),n.addEventListener("click",(e=>{e.stopPropagation(),k(t.id,"POST")}),!1),l.addEventListener("click",(e=>{e.stopPropagation(),k(t.id,"DELETE")}),!1))},k=(e,t)=>{(0,n.LK)(`/api/v1/cameras/${e}/connection`,{method:t}).then((()=>g())).catch(d.S)},S=e=>{const t=p.find((t=>t.id===e));t&&(0,n.LK)(`/api/v1/cameras/${t.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:t.config})}).then((()=>g())).catch(d.S)},z=e=>{const t=p.find((t=>t.id===e));t&&(0,n.LK)(`/api/v1/cameras/${t.id}`,{method:"DELETE"}).then((()=>g())).catch(d.S)},E=(e,t)=>{const a=document.getElementById("cameras-list");t.forEach((e=>{const t=f(e.id);t&&a.removeChild(t)})),e.sort(((e,t)=>t.connected-e.connected)).forEach((e=>{const t=f(e.id);if(t)w(t,e);else{const t=(e=>{const t=document.getElementById("camera-list-item")?.content;if(!t)return null;const a=document.importNode(t,!0),n=a.querySelector("li"),l=e.id;return n.addEventListener("click",(e=>{const t=p.find((e=>e.id===l));t&&t.connected&&x(t.id),e.preventDefault()}),!1),n.id=b(e.id),a.querySelector(".camera__path__label").innerText=(0,i.Iu)("camera.path"),a.querySelector(".camera__driver__label").innerText=(0,i.Iu)("camera.driver"),a.querySelector(".camera__cloud__label").innerText=(0,i.Iu)("camera.cloud.label"),(0,s.yx)(a.querySelector(".camera__snapshot"),!1),w(a,e,!0),a})(e);t&&a.appendChild(t)}}))},P=e=>new Promise(((t,a)=>{(0,o.o)(((e,t)=>t=>{const a=`/api/v1/cameras/${e}`,s=document.getElementById("modal-camera-settings"),o=document.importNode(s.content,!0),c=o.getElementById("camera-settings__name"),u=r.L.init(o.getElementById("camera-settings__resolution"),"camera-settings__resolution"),p=r.L.init(o.getElementById("camera-settings__trigger-scheme"),"camera-settings__trigger-scheme"),g=o.getElementById("yes");return(0,n.LK)(a).then((e=>{const s=e.data,o=s.available_resolutions.sort(((e,t)=>e.width===t.width?t.height-e.height:t.width-e.width)).map(((e,t)=>`${e.width}x${e.height}`)),r=Object.keys(m),h=r.map((e=>v(e)));c.value=s.name,u.setOptions(o),u.value=`${s.resolution.width}x${s.resolution.height}`,p.setOptions(h),p.value=v(s.trigger_scheme),g.addEventListener("click",(()=>{const[e,s]=u.value.split("x").map((e=>parseInt(e))),o=r[h.indexOf(p.value)];(0,n.LK)(`${a}/config`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:c.value,resolution:{width:e,height:s},trigger_scheme:o})}).then((()=>(0,l.Vp)((0,i.Iu)("ntf.success"),(0,i.Iu)("ntf.camera-config-success")))).catch(d.S).finally(t)}))})).catch(d.S),o.getElementById("no").addEventListener("click",(()=>t())),o})(e),{timeout:0,closeOutside:!1})})).then((()=>{lastUpdated=null,h()})),L={load:e=>{p=[],(0,i.Iu)("cameras.link",{query:"#title-status-label"}),h(e)},update:h,getCameraNode:f,getCameraNodeId:b,updateCurrentCamera:x}},732:(e,t,a)=>{"use strict";a.d(t,{Z:()=>m});var n=a(7780),s=a(646),i=a(5489),l=a(6648);var o=a(1351);let r=1,d=1;const c=e=>{(0,i.ZP)("control",{temperature:e.printer.temperature,telemetry:e.printer.telemetry,job:e.current}),function(e,t,a){const n=document.querySelectorAll("#control button"),i=["extrude","retract"],l=["flowrate","bed","nozzle","speed"],o=[...l,...i,"move-step","extrude-retract-step","heated-bed-xy-move"];if(e.flags.printing||e.flags.pausing||e.flags.paused){const t=e.flags.paused?o:l;n.forEach((e=>{const a=e.id||e.parentNode.id||e.parentNode.parentNode.id;(0,s.H)(e,!t.includes(a))}))}const r=t&&a&&t["temp-nozzle"]>=a.min_extrusion_temp;i.forEach((e=>(0,s.H)(document.getElementById(e),!r)))}(e.printer.state,e.printer.telemetry,e.version)};function u(e,t){if("move"===e){(e=>(0,l.LK)("/api/printer/printhead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"jog",...e})}))(function(e){const t=e.includes("-"),a=e.replace(RegExp("[+-]"),"");return a?{[a]:t?-r:r}:(console.error(`"${e}" is not valid direction`),{})}(t)).catch((e=>(0,o.S)(e)))}else if("home"===e){(e=>(0,l.LK)("/api/printer/printhead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"home",axes:e})}))(t.split(",")).catch((e=>(0,o.S)(e)))}}function p(e,t,a){function n(e){return Number.parseFloat(e.getAttribute("data-step"))}if(e){const i=e.querySelectorAll("button[data-step]"),l=e=>{i.forEach((t=>{n(t)===e?((0,s.H)(t),t.setAttribute("selected",!0)):((0,s.gL)(t),t.hasAttribute("selected")&&t.removeAttribute("selected"))}))};i.forEach((e=>{const t=n(e);isNaN(t)||(e.onclick=()=>{l(t),a(t)})})),l(t)}}const m={load:e=>{(0,n.Iu)("control.title",{query:"#title-status-label"}),function(e){function t(e,t){switch(e){case"bed":return n=t,(0,l.LK)("/api/printer/bed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"target",target:n})});case"flowrate":return a=t,(0,l.LK)("/api/printer/tool",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"flowrate",factor:a})});case"nozzle":return(e=>(0,l.LK)("/api/printer/tool",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"target",targets:{tool0:e}})}))(t);case"speed":return(e=>(0,l.LK)("/api/printer/printhead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"speed",factor:e})}))(t);default:throw Error("Unknown property!")}var a,n}e&&e.querySelectorAll(".input-wrapper").forEach((e=>{const a=e.querySelector("input"),n=e.querySelector("button");if(a){const e=()=>{const e=a.getAttribute("data-action"),n=Number.parseFloat(a.value);isNaN(n)||t(e,n).then((e=>{a.value=""})).catch((e=>(0,o.S)(e)))};a.onkeyup=t=>{"Enter"===t.key&&(e(),a.blur())},n&&(n.onclick=e)}}))}(document.querySelector("#control")),p(document.querySelector("#control #move-step"),r,(e=>r=e)),p(document.querySelector("#control #extrude-retract-step"),d,(e=>d=e)),function(){const e=document.querySelector("#control #disable-steppers");e&&(e.onclick=()=>{(0,l.LK)("/api/printer/printhead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"disable_steppers"})}).catch((e=>(0,o.S)(e)))})}(),function(){const e=document.querySelector("#control #extrude");e&&(e.onclick=()=>{var e;(e=d,(0,l.LK)("/api/printer/tool",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"extrude",amount:e})})).catch((e=>(0,o.S)(e)))})}(),function(){const e=document.querySelector("#control #retract");e&&(e.onclick=()=>{var e;(e=d,(0,l.LK)("/api/printer/tool",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"extrude",amount:-e})})).catch((e=>(0,o.S)(e)))})}(),function(){const e=document.querySelector("#control #heated-bed-xy-move");e&&e.querySelectorAll("button[data-action]").forEach((e=>{e.onclick=()=>{u(e.getAttribute("data-action"),e.getAttribute("data-value"))}}))}(),function(){const e=document.querySelector("#control #nozzle-z-move");e&&e.querySelectorAll("button[data-action]").forEach((e=>{e.onclick=()=>{u(e.getAttribute("data-action"),e.getAttribute("data-value"))}}))}(),c(e)},update:c}},5502:(e,t,a)=>{"use strict";a.d(t,{Z:()=>z});var n=a(7780);const s=(0,n.Iu)("prop.at"),i=(0,n.Iu)("unit.h"),l=(0,n.Iu)("prop.less-than"),o=(0,n.Iu)("unit.min"),r=((0,n.Iu)("unit.ml"),(0,n.Iu)("unit.rpm")),d=(0,n.Iu)("prop.today-at"),c=(0,n.Iu)("prop.tmw-at"),u=(0,n.Iu)("unit.b"),p=(0,n.Iu)("unit.kb"),m=(0,n.Iu)("unit.mb"),v=(0,n.Iu)("unit.gb"),g=(0,n.Iu)("prop.true"),h=(0,n.Iu)("prop.false");function b(e,t=!0,a=1){return e>0?t?e.toFixed(a):e:0}function f(e){const t=new Date(1e3*e);var a=localStorage.getItem("lang");return(t.toLocaleDateString(a,{year:"numeric",month:"numeric",day:"numeric"})+" "+t.toLocaleTimeString(a,{hour:"numeric",minute:"numeric"})).substring(0,25)}function y(e){let t="00:00";if(e){let a=new Date,n=new Date(a.getTime()+1e3*e),i=new Date(a);i.setDate(i.getDate()+1);let l="";if(n.getDate()==a.getDate()&&n.getMonth()==a.getMonth())l=`${d} `;else if(n.getDate()==i.getDate()&&n.getMonth()==i.getMonth())l=`${c} `;else{let e={month:"numeric",day:"numeric"};l=`${n.toLocaleString(window.navigator.language,e)} ${s} `}t=l+("0"+n.getHours()).substr(-2)+":"+("0"+n.getMinutes()).substr(-2)}return t}function x(e){if(e<60)return l;const t=Math.floor(e/60%60),a=Math.floor(e/3600);return(a>0?`${a} ${i}`:"")+(t>0?` ${t} ${o}`:"")}function w(e){let t=e;const a=[u,p,m,v];for(let e=0;e{if(void 0===t||null===t&&"progress"!==e)return(0,n.Iu)("prop.na");switch(e){case"number":return b(t);case"temp":return b(t)+" °C";case"temp_int":return b(t,0)+"°C";case"fan":return b(t)+` ${r}`;case"print":return b(t||0,!0,0)+"%";case"pos":return b(t)+" mm";case"date":return f(t);case"time":return x(t);case"timeEst":return y(t);case"progress":return b(100*(t||0),!0,0)+"%";case"percent":return`${b(t||0,!0,0)}%`;case"material":return t||(0,n.Iu)("prop.na");case"size":return w(t);case"boolean":return k(t);case"diameter":return b(t,!0,2)+" mm";default:return t}},z=(e,t)=>S(e,t)},5412:(e,t,a)=>{"use strict";a.d(t,{L:()=>s});var n=a(5537);class s{set value(e){this._value=e,this.updateLabel()}get value(){return this._value}constructor(e,t,a){const n=this;this._label=t,this._ul=a,this._value=t.innerHTML,this.is_open=!1,this._options=[],this._onKeyDown=e=>{if(n.is_open){switch(e.key.toLowerCase()){case"escape":return void n.close();case"arrowdown":let e=!1;for(const t of this._ul.childNodes){if(e){this._highlight(t);break}t.classList?.contains("select")&&(e=!0)}break;case"arrowup":let t=null;for(const e of this._ul.childNodes){if(e.classList?.contains("select")){t&&this._highlight(t);break}t=e}break;case"enter":for(const e of this._ul.childNodes)if(e.classList.contains("select")){const t=e.innerText;this.value=t,this.onselect&&this.onselect(t),this.close();break}}e.preventDefault()}},this._onClick=t=>{const a=t.target.parentNode;if(!n.is_open)return!0;a!==e&&n.close()},window.addEventListener("keydown",this._onKeyDown,!1),window.addEventListener("click",this._onClick,!1),this.onselect=void 0,e.onclick=e=>{e.preventDefault(),this.is_open?this.close():this.open()}}_highlight(e){this._ul.childNodes.forEach((t=>{t===e?t.classList.add("select"):t.classList.remove("select")}))}destructor(){window.removeEventListener("keypress",this._onKeyPress),window.removeEventListener("click",this._onClick)}static init(e,t){let a=(0,n.Z)(e);const i=document.getElementById("dropdown-template"),l="dropdown"===a.getAttribute("data-type")?a:a.querySelector('select[data-type="dropdown"]');if(!l)return;l.after(document.importNode(i.content,!0));const o=l.nextElementSibling;o.id=t,l.remove();const r=o.querySelector(".dropdown-btn"),d=r.querySelector(".dropdown-label"),c=o.querySelector(".dropdown-content ul");return r&&d&&c?new s(r,d,c):void 0}setOptions(e){this._options=e}updateLabel(){this._label.innerHTML=this._value}select(e){this._label.innerHTML=e}open(){this._ul.classList.contains("open")||(this._options.forEach((e=>{const t=document.createElement("li");e===this._value&&(t.className="select selected"),t.innerText=e,t.onclick=()=>{this.select(e),this.value=e,this.onselect&&this.onselect(e),this.close()},t.onmouseover=()=>this._highlight(t),this._ul.appendChild(t)})),this._ul.classList.add("open")),this.is_open=!0}close(){for(this._ul.classList.remove(["open"]);this._ul.firstChild;)this._ul.removeChild(this._ul.firstChild);this.is_open=!1}}},1351:(e,t,a)=>{"use strict";a.d(t,{S:()=>i});var n=a(3707);let s={};function i(e,t){let a=e?.data?.title||t?.fallbackMessage?.title||"Error",i=e?.data?.message||t?.fallbackMessage?.message||"Action can not be performed",l=!1;if(e?.data){const t=e.data;t.code&&(a+=`- ${t.code}`,"7"==`${t.code}`[3]&&(l=!0)),t.url&&(i+=`
      more info`)}const o=e?.data?.code||`${a}\n${i}`;if(s[o])return;s[o]=!0;const r=()=>s[o]=!1;l?(0,n.Kp)(a,i,r):(0,n.vU)(a,i,r)}},8236:(e,t,a)=>{"use strict";a.d(t,{o:()=>i});var n=a(7780);const s={count:0,current:0},i=(e,t={})=>{const a=Object.assign({timeout:5500,closeOutside:!0},t),i=s.count;s.count=s.count+1;const l=document.querySelector(".modal-box");t.className&&l.classList.add(t.className);const o=l.parentElement;for(;l.firstChild;)l.removeChild(l.firstChild);const r=()=>{i==s.current&&o.classList.contains("show-modal")&&(o.classList.remove("show-modal"),a.closeCallback&&a.closeCallback())},d=e=>{e.target===o&&r()};a.closeOutside&&window.addEventListener("click",d);const c=e(r);s.current=i,l.appendChild(c),(0,n.ot)(l),o.classList.add("show-modal"),a.timeout>0&&setTimeout(r,a.timeout)}},5951:(e,t,a)=>{"use strict";function n(e,t,a="right"){if(!e)return;const n=e.querySelector(".fill");if(n){const e=`${["top","right","bottom","left"].map((e=>(e=>e===a?100-100*t+"%":0)(e))).join(" ")}`;n.style.inset=e}}a.d(t,{g:()=>n})},2957:(e,t,a)=>{"use strict";a.d(t,{Z:()=>h});var n=a(7780),s=a(5489),i=a(6648),l=a(646),o=a(1351);var r=a(3707);let d=null;const c=a(5493).Z,u=()=>(0,r.Vp)((0,n.Iu)("ntf.success"),(0,n.Iu)("ntf.settings-suc"));function p(e){const t=document.getElementById("api_key");t&&(t.innerText=e)}function m(e,t){e.connection&&((0,s.ZP)("con-settings",e.connection),function(e,t){const a=document.getElementById("conn-prusa-connect-status"),n=document.getElementById("conn-prusa-connect-url"),s=document.getElementById("edit-connect-del"),i="FINISHED"===e.connect.registration,{hostname:o,tls:r}=e.connect,{ok:d,message:c}=e.states.connect,u=d&&i,p=document.getElementById("conn-prusa-connect-status-"+(u?"ok":"not-ok")),m=r?"https":"http",g=e.connect.port?`:${e.connect.port}`:"",h=`${m}://${o}${g}`,b=`(${h})`;t&&(n.value=h);(0,l.QH)(n.parentNode.parentNode,i),s&&(0,l.yx)(s,i||!d);v(a,p,u,c,b)}(e.connection,t),function(e){const t=document.getElementById("conn-printer-status"),{port:a,baudrate:n}=e.current,{ok:s,message:i}=e.states.printer,l=document.getElementById("conn-printer-status-"+(s?"ok":"not-ok"));v(t,l,s,i,`(${a||"/dev/ttyACM0"} @ ${n||0}bps)`)}(e.connection))}function v(e,t,a,s,i){e&&e.setAttribute("ok",Boolean(a)),t&&(t.innerHTML=(a?(0,n.Iu)("conn.suc"):s)+"
      "+i)}function g(e){switch(e.toLowerCase()){case"python":return(0,n.Iu)("sys-version.python");case"description":return(0,n.Iu)("sys-version.description");case"id":return(0,n.Iu)("sys-version.id");case"os":return(0,n.Iu)("sys-version.os");default:return e}}const h={load:e=>{(0,n.Iu)("settings.title",{query:"#title-status-label"}),(0,i.LK)("api/version?system=1").then((e=>{const t={version:e.data};(0,s.ZP)("settings",t),function(e){const t=document.querySelector("#sys-version .table");if(t)for(const[a,n]of Object.entries(e.version.system)){const e=document.createElement("div");e.className="row";const s=document.createElement("div");s.className="col txt-sm",s.innerHTML=`

      ${g(a)}

      `,e.appendChild(s);const i=document.createElement("div");i.className="col txt-md",i.innerHTML=`

      ${n}

      `,e.appendChild(i),t.appendChild(e)}}(t)})).catch((e=>(0,o.S)(e))),function(){const e=document.getElementById("updates-check"),t=document.getElementById("updates-check__spinner"),a=a=>{a&&document.querySelectorAll(".update-pkg").forEach((e=>{e.parentNode.removeChild(e)})),(0,l.yx)(t,a),(0,l.gL)(e,!a)};e&&t&&(e.onclick=()=>{a(!0),(0,i.LK)("/api/v1/update/prusalink").then((t=>{const s=t.data?.new_version,l=[{name:"PrusaLink",new_version:s}],d=e.parentNode.parentNode.parentNode;l.forEach((e=>{const t=document.createElement("div"),s=document.createElement("div"),l=document.createElement("p"),c=document.createElement("div"),u=document.createElement("p"),p=document.createElement("div"),m=document.createElement("span");if(t.className="row update-pkg",s.className="col",c.className="col",p.className="col",l.className="txt-bold txt-grey txt-sm",u.className="txt-md",m.className="txt-grey txt-sm",l.innerText="PrusaLink",e.new_version){m.innerText=e.new_version;const t=document.createElement("button"),s=document.createElement("p");s.innerText=(0,n.Iu)("btn.upgrade"),t.className="action",t.appendChild(s),p.appendChild(t),t.onclick=()=>{a(!0),(0,i.LK)("/api/v1/update/prusalink",{method:"POST"}).then((()=>{(0,r.Vp)((0,n.Iu)("upgrade.success.title"),(0,n.Iu)("upgrade.success.message")),setTimeout((()=>window.location.href="/"),5e3)})).catch((e=>(0,o.S)(e))).finally((()=>a(!1)))}}else m.innerText="The package is up to date";u.appendChild(m),s.appendChild(l),c.appendChild(u),t.appendChild(s),t.appendChild(c),t.appendChild(p),d.appendChild(t)}))})).catch((e=>(0,o.S)(e))).finally((()=>a(!1)))})}(),function(e){m(e,!0),document.getElementById("edit-connect-del").addEventListener("click",(e=>{(0,i.LK)("api/connection",{method:"DELETE"}).then(u).catch((e=>(0,o.S)(e)))})),document.getElementById("edit-connect-set").addEventListener("click",(e=>{const t=document.getElementById("conn-prusa-connect-url")?.value;if(!t)return;const a=new URL(t);(0,i.LK)("api/connection",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connect:{hostname:a.hostname,port:a.port?parseInt(a.port):0,tls:a.protocol.startsWith("https")?1:0}})}).then((e=>{const t=e?.data?.url;t&&window.open(t,"_blank")})).catch((e=>(0,o.S)(e)))}))}(e),(0,i.LK)("api/settings").then((e=>{const t=e.data;!function(e){const t=document.querySelector("#settings #printer-name"),a=document.querySelector("#settings #printer-location"),n=document.querySelector("#settings #edit-printer"),s=()=>{(0,l.gL)(n,t.value.length>0&&a.value.length>0)};t.oninput=s,a.oninput=s,t.value=e.printer?.name||"",a.value=e.printer?.location||"","api-key"in e&&p(e["api-key"]),n.onclick=()=>{var e,n;(e=t.value,n=a.value,(0,i.LK)("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({printer:{name:e,location:n}})})).then((()=>u())).catch((e=>(0,o.S)(e)))},s()}(t),function(e){const t=document.querySelector("#settings #username"),a=document.querySelector("#settings #password"),n=document.querySelector("#settings #new-password"),s=document.querySelector("#settings #re-password"),r=document.querySelector("#settings #edit-user"),d=()=>{(0,l.gL)(r,a.value.length>0&&(t.value.length>0||n.value.length>0&&s.value.length>0))};t.oninput=d,a.oninput=d,n.oninput=d,s.oninput=d,t.value=e.username||"",d(),r.onclick=()=>{((e,{username:t,newPassword:a,rePassword:n})=>(0,i.LK)("/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({user:{password:e,username:t,new_password:a,new_repassword:n}})}))(a.value,{username:t.value||void 0,newPassword:n.value||void 0,rePassword:s.value||void 0}).then((()=>u())).catch((e=>(0,o.S)(e)))}}(t)})).catch((e=>(0,o.S)(e))),function(){const e=document.querySelector("#settings #serial"),t=document.querySelector("#settings #edit-serial"),a=()=>{if(e&&t){d&&(e.value=`${d}`);const n=()=>{(0,l.gL)(t,!d&&e.value.length>0),(0,l.yx)(t,!d)};n(),e.oninput=n,(0,l.gL)(e,!d);const s=()=>{var t;(t=e.value,(0,i.LK)("/api/settings/sn",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serial:t})})).then((e=>{d=e.data.serial,u()})).catch((e=>(0,o.S)(e))).finally((()=>a()))};e.onkeyup=t=>{"Enter"===t.key&&(s(),e.blur())},t.onclick=s}};(0,i.LK)("/api/settings/sn",{headers:{"Content-Type":"application/json"}}).then((e=>{d=e.data.serial})).catch((e=>(0,o.S)(e))).finally((()=>a()))}(),function(){const e=document.getElementById("api_key-reset");e&&e.addEventListener("click",(()=>{(0,i.LK)("api/settings/apikey",{method:"POST"}).then((e=>{p(e.data["api-key"]),u()})).catch((e=>(0,o.S)(e)))}),!1)}(),c?.load()},update:e=>{c?.update(),m(e,!1)}}},5493:(e,t,a)=>{"use strict";a.d(t,{Z:()=>v});var n=a(7780),s=a(6648),i=a(1972),l=a(5412),o=a(1351),r=a(5502);let d=null,c=null;const u=67108864;function p(e){return`
    • ${e}
    • `}const m=()=>{(0,s.LK)("api/logs").then((e=>{const t=e.data.files;if(d){const e=t.find((e=>e.name===d));e&&(!c||e.date>c)&&(c=e.date,e.size>u?function(){const e=document.querySelector("ul.logs"),t=(0,n.Iu)("logs.file-too-large",{size:(0,r.Z)("size",u)});e&&(e.innerHTML=p(t))}():(a=d,(0,s.iT)(`api/logs/${a}`).then((e=>{const t=document.querySelector("ul.logs");t&&(e.data?t.innerHTML=e.data.split("\n").map((e=>p(e))).join(""):t.innerHTML=p((0,n.Iu)("logs.empty-file")))}))))}var a})).catch((e=>(0,o.S)(e)))},v={load:()=>{(0,s.LK)("api/logs").then((e=>{const t=e.data.files,a=l.L.init("settings","log-list"),s=t.map((e=>e.name)),o=(0,n.Iu)("logs.select-file-placeholder");a.setOptions(s),a.select(o),a.onselect=e=>{!function(e){d=e,c=null,document.getElementById("download-log").onclick=()=>{(0,i.Z)(`api/logs/${e}`,e)},m()}(e)}})).catch((e=>(0,o.S)(e)))},update:m}},3707:(e,t,a)=>{"use strict";a.d(t,{Kp:()=>l,Vp:()=>o,vU:()=>r});const n=document.getElementById("prusa-toast"),s={info:10500,success:10500,warning:10500,error:10500};function i({title:e,message:t,type:a,onClose:i}){const l=((e,t,a)=>{const n=document.getElementById("toast"),s=document.importNode(n.content,!0),i=s.querySelector("article");return i.className=a,s.querySelector("p").innerHTML=e,s.querySelector(".toast-body").innerHTML=t,i})(e,t,a),o=()=>{n.removeChild(l),i?.()};l.querySelector("span").addEventListener("click",(e=>{e.preventDefault(),o()}));const r=s[a];r&&setTimeout(o,r),n.appendChild(l)}function l(e,t,a){i({type:"warning",title:e,message:t,onClose:a})}function o(e,t,a){i({type:"success",title:e,message:t,onClose:a})}function r(e,t,a){i({type:"error",title:e,message:t,onClose:a})}},5489:(e,t,a)=>{"use strict";a.d(t,{NA:()=>s,ZP:()=>l,zR:()=>i});var n=a(5502);const s=(e,t)=>{try{const a=e.split(".");let n=t;for(;a.length;)n=n[a.shift()];return n}catch(e){return}},i=(e,t)=>{document.querySelectorAll(`[data-type="${e}"]`).forEach((e=>{const a=e.dataset.where,i=a?s(a,t):t;e.innerHTML=(0,n.Z)(e.dataset.format,i)}))},l=i},2038:(e,t,a)=>{"use strict";a.d(t,{i:()=>l});var n=a(8236),s=a(646),i=a(4800);const l=e=>{e.addEventListener("change",(t=>{e.checked&&e.getAttribute("data-link-state")!==i.PT.READY&&(0,n.o)((t=>((e,t)=>{const a=document.getElementById("modal-confirm"),n=document.importNode(a.content,!0),i=n.getElementById("yes"),l=n.getElementById("no");return i.addEventListener("click",(a=>{a.preventDefault(),(0,s.H)(i,!0),(0,s.H)(l,!0),t.checked=!0,e()})),l.addEventListener("click",(()=>{t.checked=!1,e()})),n})(t,e)),{timeout:0,closeOutside:!1})}))}},7049:(e,t,a)=>{"use strict";a.d(t,{Z:()=>y});var n=a(6648),s=a(1351),i=a(646),l=a(3707),o=a(7780),r=a(5951),d=a(2038),c=a(5489),u=a(4800);let p=!1,m=null;function v(e){const t=u.cG.includes(e),a=document.querySelector("#upld-remote-start-pt");a&&(a.setAttribute("data-link-state",e),t||(a.checked=!1),(0,i.H)(a,!t)),(0,n.LK)("api/download").then((e=>{m=e,g(e)})).catch((e=>{e.code&&(0,s.S)(e),b()}))}function g(e){const t=e.data;if(![200,201,204].includes(e.code))return(0,s.S)(e),void b();if(t){if("FROM_WEB"===t.type){f("uploading"),(0,c.ZP)("download",t);const e=document.querySelector("#upld-remote .progress-bar");(0,r.g)(e,t.progress||0)}}else{if(p)return function(){const e=(0,o.Iu)("ntf.success"),t=(0,o.Iu)("ntf.upld-suc",{file_name:""});(0,l.Vp)(e,t)}(),void b();f("choose")}}const h=(e,t,a,s)=>{if("local"===t)return e=e.split("?")[0].split("&")[0].split("#")[0],(0,n.LK)(`/api/download/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e,destination:a,...s})}).then((e=>function(e){f("uploading");const t=document.querySelector("#upld-remote .progress-bar");(0,r.g)(t,0);const a=(0,o.Iu)("ntf.success"),n=(0,o.Iu)("ntf.upld-start");(0,l.Vp)(a,n)}())).catch((e=>g(e)));(0,l.vU)("Can't upload to "+t,"You can upload only to local storage via remote upload!")};function b(){f("choose"),function(e){const t=document.querySelector("#upld-remote .progress-bar");t&&(0,r.g)(t,e||0)}(0),(0,c.ZP)("download",{}),m=null}function f(e){p="uploading"==e;const t=document.getElementById("upld-remote");t&&t.setAttribute("data-state",e)}const y={init:function(e,t){const a=document.getElementById("upld-remote");if(a){const n=a.querySelector("#remote-url"),s=a.querySelector("#remote-file-name"),l=a.querySelector("#upld-file"),o=a.querySelector("#upld-remote-start-pt");o&&(0,d.i)(o),l.onclick=()=>h(n.value,e,t,{to_print:o.checked,rename:s.value});const r=()=>{(0,i.H)(l,""===n.value)};r(),n.oninput=r}p&&(f("uploading"),m&&g(m)),v()},update:v,get isUploading(){return p}}},3283:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>pt});var n=a(7780);const s=500;let i=100,l=new Map;const o=(e,t)=>{l=e,i=t};function r(){const e=document.getElementById("graph");e&&(0==e.childElementCount&&function(){const e=document.getElementById("graph-template"),t=document.importNode(e.content,!0);document.getElementById("graph").appendChild(t),(0,n.ot)("graph")}(),l.forEach(((e,t)=>{!function(e,t){const a=(new Date).getTime();let n=[];if(e.length>1){let t=e[0],l=s-2.66*(a-t[0]-1e4)/1e3;for(let e=1;e1&&e[1][0]{var i=new XMLHttpRequest;const l=()=>{s(void 0)};!function(e,t){if(t){const a=e=>{if(!e.lengthComputable)return;let a=Math.round(e.loaded/e.total*100);t({loaded:e.loaded,total:e.total,percentage:a})};e.upload.addEventListener("progress",a,!1)}}(i,a.onProgress),i.addEventListener("load",(e=>{const t=function(e){function t(e){try{return JSON.parse(e)}catch{return}}return{status:e.status,statusText:e.statusText,ok:e.status>=200&&e.status<=299,data:t(e.response)}}(e.target);t.ok?n(t):s(t)}),!1),i.addEventListener("error",l,!1),i.addEventListener("abort",l,!1),i.open("PUT",e),a.print&&i.setRequestHeader("Print-After-Upload","?1"),i.setRequestHeader("Content-Type","text/x.gcode");for(const[e,t]of Object.entries((0,m.wU)()))i.setRequestHeader(e,t);i.send(t)}))};var g=a(2038),h=a(4800);let b=!1,f=0;function y(e,t,a,n,s){const i=document.querySelector(e);i&&(i.setAttribute("accept",n.join(", ")),i.onchange=()=>{if(i.files.length>0&&!b){let e=i.files[0];k(e,t,a,s?.checked||!1)}})}function x(e){b="uploading"===e;const t=document.getElementById("upld-direct");t&&t.setAttribute("data-state",e)}function w(e){f=e;const t=document.getElementById("upld-progress");t&&(t.innerHTML=`${e} %`)}const k=(e,t,a,s)=>{const i=["/api/v1/files",t,a,e.name].filter((e=>!!e)).join("/");e.arrayBuffer().then((t=>{x("uploading"),w(0),v(i,t,{onProgress:e=>{return t=e.percentage,x("uploading"),void w(t);var t},print:s}).then((()=>function(e){const t=(0,n.Iu)("ntf.success"),a=(0,n.Iu)("ntf.upld-suc",{file_name:e});(0,c.Vp)(t,a)}(e.display_name||e.name))).catch((t=>function(e,t){if(t)(0,u.S)(t);else{const t=(0,n.Iu)("ntf.error"),a=(0,n.Iu)("ntf.upld-unsuc",{file_name:e});(0,c.vU)(t,a)}}(e.display_name||e.name,t))).finally((()=>function(){const e=document.querySelector('#upld-direct input[type="file"]');e&&(e.value=""),w(0),x("choose")}()))}))};const S={init:function(e,t,a){(0,n.Iu)("upld.direct.choose",{query:"#upld-direct p",file:a.join(", ")}),function(e,t,a){const n=document.getElementById("upld-direct-start-pt");n&&(0,g.i)(n);const s=document.getElementById("drop-zone");s&&(document.ondragenter=e=>(0,p.yx)(s,!0),s.ondragleave=e=>(0,p.yx)(s,!1),document.ondrop=e=>(0,p.yx)(s,!1),y('#drop-zone input[type="file"]',e,t,a,n));y('#upld-direct input[type="file"]',e,t,a,n)}(e,t,a),b&&(x("uploading"),w(f))},update:function(e){const t=h.cG.includes(e),a=document.querySelector("#upld-direct-start-pt");a&&(a.setAttribute("data-link-state",e),t||(a.checked=!1),(0,p.H)(a,!t))},get isUploading(){return b},initInputByQuery:y};const z=class{get selected(){return this._selected}get isLocked(){return this._isLocked}lock(){this._isLocked=!0,this._root&&this._root.querySelectorAll("[data-tab-btn]").forEach((e=>{e.getAttribute("data-tab-btn")!==this.selected&&e.setAttribute("locked",!0)}))}unlock(){this._isLocked=!1,this._root&&this._root.querySelectorAll("[data-tab-btn]").forEach((e=>{e.hasAttribute("locked")&&e.removeAttribute("locked")}))}constructor(){this._root=null,this._selected=null,this._isLocked=!1}init(e){this._root=e,this._root&&(e.querySelectorAll("[data-tab-btn]").forEach((e=>{e.onclick=()=>{if(!this._isLocked){const t=e.getAttribute("data-tab-btn");t===this._selected||(this.closeTab(),this.openTab(t))}}})),this.openTab(this._selected,!0))}openTab(e){if(this._root&&e){const t=this._root.querySelector(`[data-tab="${e}"]`);t&&t.setAttribute("opened",!0);const a=this._root.querySelector(`[data-tab-btn="${e}"]`);a&&a.setAttribute("selected",!0),this._selected=e}}closeTab(){if(this._root&&this._selected){const e=this._root.querySelector(`[data-tab="${this._selected}"]`);e&&e.setAttribute("opened",!1);const t=this._root.querySelector(`[data-tab-btn="${this._selected}"]`);t&&t.setAttribute("selected",!1),this._selected=null}}},E=a(7049).Z,P=new z;function L(){S.isUploading?(P.openTab("direct"),P.lock()):E?.isUploading?(P.openTab("remote"),P.lock()):(P.unlock(),P.selected||P.openTab("direct"))}const I={init:function(e,t="",a){S.init(e,t,a),E?.init(e,t),P.init(document.getElementById("upld")),L()},update:function(e){S?.update(e),E?.update(e),L()},hide:function(e){(0,p.QH)(document.getElementById("upld"),e)}};var _=a(2451);const T=function(...e){let t=[];return e.forEach((e=>{Array.isArray(e)?t.push(...e):e&&t.push(e)})),t.map((e=>("/"===e[0]&&(e=e.substring(1)),"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),e))).filter((e=>""!==e)).join("/")};var N=a(5489),j=a(8236),A=a(8751);const C=e=>(0,m.LK)(e,{method:"POST",headers:{"Content-Type":"application/json"}}),B=()=>(0,m.LK)("/api/job",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"pause",action:"resume"})}).catch((e=>(0,u.S)(e))),D=e=>{(0,j.o)((t=>((e,t)=>{const a=document.getElementById("modal-question"),s=document.importNode(a.content,!0);s.getElementById("modal-question-label").innerText=(0,n.Iu)("msg.cancel");const i=s.getElementById("yes"),l=s.getElementById("no");return i.addEventListener("click",(a=>{a.preventDefault(),t&&t(),(0,p.H)(i,!0),(0,p.H)(l,!0),(0,m.LK)("/api/job",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"cancel"})}).catch((e=>(0,u.S)(e))),e()})),l.addEventListener("click",e),s})(t,e)),{timeout:0,closeOutside:!1})},q=(e,t)=>{e?(0,j.o)((e=>((e,t)=>{const a=document.getElementById("modal-confirm"),n=document.importNode(a.content,!0),s=n.getElementById("yes"),i=n.getElementById("no");return s.addEventListener("click",(a=>{a.preventDefault(),(0,p.H)(s,!0),(0,p.H)(i,!0),C(t).then((()=>(0,A.c4)("#dashboard"))).catch((e=>(0,u.S)(e))).finally((()=>e()))})),i.addEventListener("click",e),n})(e,t)),{timeout:0,closeOutside:!1}):C(t).then((()=>(0,A.c4)("#dashboard"))).catch((e=>(0,u.S)(e)))},O=()=>(0,m.LK)("/api/job",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"cancel"})}).catch((e=>(0,u.S)(e)));var M=a(1972);const H=(e,t,a)=>{(0,M.Z)(e,t),a()},R=(e,t,a)=>{(0,j.o)((s=>((e,t,a,s)=>{const i=document.getElementById("modal-question"),l=document.importNode(i.content,!0);l.getElementById("modal-question-label").innerText=(0,n.Iu)("msg.del-proj",{file_name:a});const o=l.getElementById("yes"),r=l.getElementById("no");return r.addEventListener("click",e),o.addEventListener("click",(a=>{a.preventDefault(),(0,p.H)(o,!0),(0,p.H)(r,!0),(0,m.LK)(t,{method:"DELETE"}).then((()=>s&&s())).catch((e=>(0,u.S)(e))).finally((t=>e()))})),l})(s,e,t,a)),{timeout:0,closeOutside:!1})};function V(e){return`inset(${100-100*e}% 0% 0% 0%)`}var Z=a(5951);const U={},K=()=>{U.title=null,U.questionChildren=null,U.yes=null,U.no=null,(0,A.g9)(U.next)},$={load:()=>{U.title||(0,A.c4)("#dashboard"),document.getElementById("title-status-label").innerHTML=U.title;const e=document.getElementById("question"),t=U.questionChildren;Array.isArray(t)?t.forEach((t=>e.appendChild(t))):e.innerHTML=t;for(let e of["yes","no"]){const t=document.getElementById(e),a=U[e];t.querySelector("p").innerHTML=U[e+"Text"],t.addEventListener("click",(e=>{e.stopPropagation(),a(K)}))}}};(0,n.Iu)("exp-times.exp-time"),(0,n.Iu)("exp-times.inc"),(0,n.Iu)("exp-times.layer-1st"),(0,n.Iu)("exp-times.profile");const F=e=>{const t=e.querySelector("img");(0,p.gL)(e,!1),t&&(t.setAttribute("data-src",t.src),t.src=document.querySelector(".loading-overlay img").src)},G=e=>{const t=e.querySelector("img");if((0,p.gL)(e,!0),t){const e=t.getAttribute("data-src");e&&(t.src=e,t.setAttribute("data-src",""))}};let Y=null,W={path:null,lastPrintingResult:null,file:{ready:!1,data:null},thumbnail:{ready:!1,url:null}},Q={file:null,path:null,thumbnail:{ready:!1,url:null}},J=null,X=null;function ee(e){return["Busy","Cancelling"].includes(e)}function te(){return Q.path}function ae(e,t){if(!e)return void(Q={file:null,path:null,thumbnail:{ready:!1,url:null}});Q={file:null,path:null,thumbnail:{ready:!1,url:null}},Q.file=e,Q.path=t;const a=e.refs?.thumbnail;a?((0,p.QP)(),oe(a,e.date).then((({url:t})=>{var a;a=e,Q.file===a?Q.thumbnail={ready:!0,url:t}:console.warn("Can't edit file preview metadata because path was changed")}))):(Q.thumbnail.ready=!0,Q.thumbnail.url=null)}function ne(e,t=!1){const a=se(e,t);Y&&Y.state!==e.printer.state.text&&(Y=null),a&&function(e,t){if(!t){if(!e?.current?.job?.file)return console.error("No job file was provided!"),void(0,p.Zk)();const t=e.current.job.file;let a=t.path;const n=t.origin?.replace("/","");if(n){const e=["/PrusaLink gcodes/","/SD Card/"].map((e=>a.startsWith(e)?a.replace(e,`/${n}/`):null)).find((e=>!!e));e&&(a=e)}let s=ee(e.current.state);a&&a!==W.path&&(W={path:null,lastPrintingResult:null,file:{ready:!1,data:null},thumbnail:{ready:!1,url:null}},W.path=a,s=!0,function(e){(0,m.LK)(`/api/v1/files${e}`).then((t=>{t?.data||console.error("No data from BE!");const a=t.data;ie(e)?W.file={ready:!0,data:a}:console.warn("Can't edit metadata because path was changed"),a.refs||console.warn("Missing refs for "+e);const n=a.refs?.thumbnail;n?oe(n,a.m_timestamp).then((({url:t})=>{ie(e)?W.thumbnail={ready:!0,url:t}:console.warn("Can't edit metadata because path was changed")})):(W.thumbnail.url=null,W.thumbnail.ready=!0)})).catch((e=>(0,u.S)(e)))}(a)),s&&(0,p.QP)(),W.lastPrintingResult="Printing"===e.current.state?e.current:W.lastPrintingResult}le(e,t)}(e,t)}function se(e,t){const a=document.getElementById("job");if(!a)return!1;const n=t?Boolean(Q.file):Boolean(e?.current?.job?.file?.name);return(0,p.yx)(a,n),n}function ie(e){return W.path===e}function le(e,t){const a=document.querySelector("#job .preview-img");if(J||(J=document.querySelector("#job #preview-img")?.src),t){const{file:n,thumbnail:s}=Q;ce(!0),(0,p.yx)(a),de(!1),(0,N.ZP)("job",null),(0,N.ZP)("file",n);const i=document.querySelector('#job [data-where="job.file.display"]');i&&(i.innerHTML=n.display_name||n.display||n.name),pe(e,null,n,t);ue(e.printer.state,t),s.ready&&(re(s.url),(0,p.Zk)())}else if(!t){const n=W.lastPrintingResult||e.current;if(!n)return void console.warn("No job result was provided!");const{file:s,thumbnail:i}=W,l=e.printer.state;0;const o=h.PT.fromApi(l);ce(h.cG.includes(o)),(0,N.ZP)("job",n);const r=l.flags.printing||l.flags.pausing||l.flags.paused;(0,p.QH)(a,r),de(r),s.ready&&(0,N.ZP)("file",s.data),pe(e,n,s,t),i.ready&&re(i.url),ue(l,t),i.ready&&!ee(l.text)&&(0,p.Zk)()}}async function oe(e,t){if(!e)return null;try{return await(0,m.gJ)(e,t)}catch(e){return console.error("Error while getting image!"),console.error(e),null}}function re(e){const t=e||J,a=document.getElementById("preview-img"),n=a.parentElement;if(a&&a.src!==t){const e=document.createElement("img");e.src=t,e.id="preview-img",n.removeChild(a),n.appendChild(e)}}function de(e){const{thumbnail:t}=W;let a=!1;const n=document.querySelector(".progress-with-img"),s=document.querySelector(".progress-without-img");if(!e)return(0,p.QH)(n),void(0,p.QH)(s);const i=document.querySelector(".progress-img-wrapper");i.getAttribute("data-file")!==t.url&&(a=!0,i.setAttribute("data-file",t.url));const l=Boolean(t.ready&&t.url);l&&t.url&&!a&&function(e,t,a=0){if(!e)return;for(;e.firstChild;)e.removeChild(e.firstChild);const n=document.createElement("div");n.className="progress-img";const s=document.createElement("img");s.src=t,s.className="background",n.appendChild(s);const i=document.createElement("img");i.src=t,i.className="foreground",i.style.clipPath=V(a),n.appendChild(i),e.appendChild(n)}(i,t.url),(0,p.yx)(n,l),(0,p.QH)(s,l);const o=W.lastPrintingResult?.progress?.completion||0;l?(!function(e,t){if(!e)return;const a=e.querySelector(".foreground");a&&(a.style.clipPath=V(t))}(i,o),(0,Z.g)(n,o,"top")):(0,Z.g)(s,o,"right")}function ce(e){(0,p.QH)(document.querySelector("#job #pnt-time"),e),(0,p.QH)(document.querySelector("#job #rem-time"),e);const t=document.querySelector("#job #est-end p[data-format]");t&&(t.setAttribute("data-where",e?"meta.estimatedPrintTime":"progress.printTimeLeft"),t.setAttribute("data-type",e?"file":"job"))}function ue(e,t){const a=(0,n.Iu)("prop.na");document.getElementById("job").querySelectorAll(".job-details .job-prop").forEach((e=>{const t=e.querySelector(".job-prop-grid").children;let n=!0;for(const e of t){var s=e.querySelector("[data-type]")?.innerHTML.trim()===a;(0,p.QH)(e,s),s||(n=!1)}(0,p.QH)(e,n)}))}function pe(e,t,a,n){const s=e.printer.state,i=e.current.state;if(n){if(me(s,n),a){const e=Q.path;ve(s,e,n),ge(i,a,e,n),he(i,a,n)}}else{if(me(s,n),a.ready){const e=T("api/v1/files",W.path);ve(s,e,n),ge(i,a,e,n),he(i,a.data,n)}!function(e,t){const a=document.querySelector(t);(0,p.yx)(a,e.flags.printing&&!e.flags.paused),(0,p.gL)(a,!Y&&e.flags.printing&&!e.flags.pausing),a&&(a.onclick=()=>{(0,p.gL)(a,!1),Y={code:"pause",state:e.text},(0,m.LK)("/api/job",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:"pause",action:"pause"})}).catch((e=>(0,u.S)(e)))})}(s,"#job #pause"),function(e){const t=document.querySelector("#job #resume");(0,p.yx)(t,e.flags.paused),(0,p.gL)(t,!Y&&e.flags.paused),t&&(t.onclick=()=>{(0,p.gL)(t,!1),Y={code:"resume",state:e.text},B()})}(s)}}function me(e,t){const a=document.querySelector("#job #stop"),n=document.querySelector("#job-close"),s=h.PT.fromApi(e),i=h.cG.includes(s);if((0,p.gL)(a,!Y&&(e.flags.printing||e.flags.paused)&&!e.flags.cancelling),a&&!t){const t=!i||!1;(0,p.yx)(a,t),a.onclick=()=>{D((()=>{Y={code:"stop",state:e.text},(0,p.gL)(a,!1)}))}}n&&((0,p.yx)(n,i||t),n.onclick=t?()=>ae(null):O)}function ve(e,t,a){const n=h.PT.fromApi(e),s=document.querySelector("#job #start"),i=h.cG.includes(n);if(s){const n=h.PT.fromApi(e);(0,p.yx)(s,a||i),(0,p.gL)(s,i),s.onclick=()=>q(n!==h.PT.READY,t)}}function ge(e,t,a,n){const s=document.querySelector("#job #delete"),i=t.display_name||t.display||t.name;s&&((0,p.gL)(s,!t.ro&&a),(0,p.yx)(s,n||"Operational"===e),s.onclick=()=>{R(a,i,(()=>{n&&(Q={file:null,path:null,thumbnail:{ready:!1,url:null}})}))})}function he(e,t,a){const n=document.querySelector("#job #download");if(n){const s=t.refs?.download&&(a||"Operational"===e)&&(!X||X===t.refs.download),i=t.display_name||t.display||t.name;(0,p.yx)(n,s),s&&(n.onclick=()=>{X=t.refs.download,F(n),H(t.refs.download,i,(()=>{X=null,G(n)}))})}}p.QP,p.Zk;const be=e=>[...e].filter((e=>!!e)).map((e=>e.trim())).join(" - "),fe=e=>{if(!e.printer)return;const t=h.PT.fromApi(e.printer.state);ne(e),I.update(t),_.Z.update(e,null)},ye={load:e=>{(0,n.Iu)("home.link",{query:"#title-status-label"}),r(),fe(e),_.Z.update(e,null),_.Z.updateCurrentCamera(),(0,m.LK)("/api/v1/storage").then((t=>{const a=t.data.storage_list.find((e=>e.available&&!e.read_only));if(a){const t=a.path.replace("/","");I.init(t,"",e.fileExtensions)}}))},update:fe};var xe=a(5502),we=a(8495);const ke=function(e,t="smooth"){if(!e)return;const a=e.getBoundingClientRect(),n=document.body.getBoundingClientRect(),s=a.top-(n.top+function(){const e=document.querySelector(".header");return e&&"sticky"===getComputedStyle(e).position?e.getBoundingClientRect().height:0}());(a.bottom>window.innerHeight||a.top<0)&&window.scroll({top:s,behavior:t})};var Se=a(5537);const ze=e=>{const t=(0,Se.Z)(e).querySelector(".kebab"),a=t.querySelector(".kebab-menu"),n=t.querySelector("ul");a.addEventListener("click",(e=>{e.stopPropagation(),function(e){return e&&e.classList.contains("open")}(n)?Ee(n):function(e,t){e.classList.add("open"),(0,p.Ti)((()=>Ee(e)),e,t)}(n,a)})),n.querySelectorAll("li").forEach((e=>{e.addEventListener("click",(()=>Ee(n)))}))};function Ee(e){e.classList.remove("open")}const Pe=e=>{const t=document.querySelectorAll(".storage-select-content li");t&&t.forEach((t=>t.setAttribute("selected",t.getAttribute("data-storage")===e)))},Le=e=>{const t=document.querySelector("#node-storage .storage-select-btn-inner");t&&(t.innerHTML=e)},Ie=(e,t)=>{e&&t&&(t.classList.toggle("open"),(0,p.Ti)((()=>{t?.classList.remove("open")}),e,t))},_e=e=>{const t=document.querySelector(".node-storage-space");if(!t)return;const a=e.available&&!!e.totalSpace;if((0,p.yx)(t,a),a){const a=e.freeSpace,s=e.totalSpace,i=1-(a&&s?a/s:0),l=(0,n.Iu)("prop.storage-space",{free:(0,xe.Z)("size",a),total:(0,xe.Z)("size",s)});(0,Z.g)(t,i),document.getElementById("storage-pct").innerHTML=(0,xe.Z)("progress",i),document.getElementById("storage-space").innerHTML=l}},Te=()=>{const e=document.querySelector("#node-storage .storage-select-btn");e&&(e.onclick=t=>{t.stopPropagation(),Ie(e,dropdownContent)})},Ne=(e,t,a,n=!1)=>{const s=document.querySelector(".storage-select-content");document.querySelectorAll(".storage-select-content li").forEach((n=>{const i=n.getAttribute("data-storage");let l=!1;if(i in e){const o=e[i];l=!0,n.querySelector("p").innerText=o.name,n.setAttribute("selected",i===t),n.onclick=e=>{e.stopPropagation(),Le(n.innerHTML),Pe(i),s.classList.remove("open"),_e(o),a(i)}}(0,p.yx)(n,l)})),n&&_e(e[t])},je="FOLDER",Ae="PRINT_FILE",Ce="FIRMWARE",Be=["name","date","size"];let De=null;const qe={origin:null,current_path:[],storages:{},files:[],eTag:null,sort:{field:"date",order:"desc"}};function Oe(){const e=qe.origin;return qe.storages[e]}function Me(){return qe.current_path.map((e=>e.path)).join("/")}function He(e){const t=Oe(),a=Me();return Re(t.path,a,e)}function Re(e,t,a){const n=["/api/v1/files",e,t,a].filter((e=>!!e)).join("/");return a?n:`${n}/`}const Ve=(e={})=>{(0,m.LK)("/api/v1/storage",{}).then((t=>{const a=t.data?.storage_list;let n=!!e.redraw,s=!!e.redraw;if(a&&a.forEach((e=>{const t=e.type,a={name:e.name||e.type,path:e.path.replaceAll("/",""),available:e.available,readOnly:e.read_only,freeSpace:e.free_space,totalSpace:e.total_space};if(t in qe.storages){const e=qe.storages[t];e.available!==a.available&&(n=!0),e.freeSpace!==a.freeSpace&&qe.origin===t&&(s=!0)}else n=!0,s=!0;qe.storages[t]=a})),!qe.origin){let e=Object.keys(qe.storages).find((e=>qe.storages[e].available));e||(e=Object.keys(qe.storages).find((()=>!0))),e&&Qe(e)}n&&Ne(qe.storages,qe.origin,Qe,s)}))},Ze=(e={})=>{if(!Oe())return;const t=He();let a=qe.eTag;e.force&&(qe.eTag=null,a=null,function(e){const t=Oe(),a=Me();I.init(t.path,a,e?.fileExtensions),I.hide(!!t?.readOnly)}(we.Z.getContext())),(0,m.LK)(t,{headers:{"If-None-Match":a}}).then((n=>{if(t!==He())return;const s=n.eTag;if(!s||s!==a){qe.eTag=s;const t=n.data.children||[];if(!s&&!e.force){const e=(e,t)=>e.display_name.localeCompare(t.display_name);if(JSON.stringify([...qe.files].sort(e))===JSON.stringify(t.sort(e)))return}qe.files=t,Ue(),Ke()}}))},Ue=()=>{const e=document.getElementById("files");if(e){for(;e?.firstChild;)e.removeChild(e.firstChild);e.appendChild(function(){const e=[Oe().name,...qe.current_path.map((e=>e.name))],t=$e("node-current",e.pop()||"Root");t.getElementById("path").innerHTML=`${e.join("/")}/`;const a=t.getElementById("create");a&&(a.onclick=e=>{e.stopPropagation(),console.log("createFolder")});t.querySelector("#sort-by-name p").innerText=(0,n.Iu)("sort.by-name"),t.querySelector("#sort-by-date p").innerText=(0,n.Iu)("sort.by-date"),t.querySelector("#sort-by-size p").innerText=(0,n.Iu)("sort.by-size");return t.querySelector(`#sort-by-${qe.sort.field}`).classList.add(qe.sort.order),Be.forEach((e=>{t.getElementById(`sort-by-${e}`).addEventListener("click",(t=>{const a=document.getElementById(`sort-by-${e}`);document.getElementById(`sort-by-${qe.sort.field}`).classList.remove(qe.sort.order);const n=qe.sort.field===e&&"asc"===qe.sort.order?"desc":"asc";a.classList.add(n),qe.sort.field=e,qe.sort.order=n,Ue(),Ke()}),!1)})),t}()),qe.current_path.length&&e.appendChild(function(){const e=$e("node-up","",(()=>{qe.current_path.pop(),Ue(),Ze({force:!0})}));return(0,n.ot)(e),e}())}},Ke=()=>{const e=document.getElementById("files");let t;if(e)for(let a of(e=>(e.sort(((e,t)=>{if(e.type===je&&t.type!==je)return-1;if(e.type!==je&&t.type===je)return 1;const a="desc"===qe.sort.order?-1:1;switch(qe.sort.field){case"date":return a*((e.m_timestamp||0)-(t.m_timestamp||0));case"size":return a*((e.size||0)-(t.size||0));default:return a*e.display_name.localeCompare(t.display_name)}})),e))(qe.files)){switch(a.type.toUpperCase()){case je:t=Fe(a.display_name||a.name,a.name,{files:void 0,folders:void 0});break;case Ae:t=Ye(a);break;case Ce:t=We(a,"firmware");break;default:t=We(a,"file")}e.appendChild(t)}};function $e(e,t,a){const n=document.getElementById(e).content,s=document.importNode(n,!0);return a&&s.querySelector(".node").addEventListener("click",(e=>{a(e),e.preventDefault()})),s.querySelector("#name")?.appendChild(document.createTextNode(t)),s}function Fe(e,t,a,n){const s=$e("node-folder",e,(()=>{qe.current_path.push({path:t.replace("/",""),name:e}),Ue(),Ze({force:!0})})),i=[a?.files?`${a.files} files`:null,a?.folders?`${a.folders} folders`:null].filter((e=>null!=e)).join(" | ");s.getElementById("details").innerHTML=i;const l=s.getElementById("delete");l&&(l.onclick=e=>{e.stopPropagation(),console.log("deleteFolder")});const o=s.getElementById("rename");return o&&(o.onclick=e=>{e.stopPropagation(),console.log("renameFolder")}),s}const Ge=e=>{!function(e){const t=te(),a=He(e.name);if(t===a)return;(0,m.LK)(a).then((e=>{ae(e.data,a),ne(we.Z.getContext(),!0)}));const n=document.getElementById("job");n&&ke(n)}(e)};function Ye(e){const t=$e("node-file",e.display_name||e.name,(t=>Ge(e))),a=t.querySelector(".node-details");a.querySelectorAll(".details").forEach((t=>{(0,n.ot)(t);const s=(0,N.NA)(t.dataset.where,e);if(s){const e=(0,xe.Z)(t.dataset.format,s);t.querySelector("p[data-value]").innerHTML=e}else a.removeChild(t)}));const s=e?.refs?.thumbnail;if(s){const a=t.querySelector("img.node-img");a.setAttribute("data-src",e.date?`${s}?ct=${e.date}`:s),De.observe(a)}return ze(t),function(e,t){const a=He(e.name),n=e.display_name||e.name,s=t.getElementById("details");s&&(s.onclick=t=>{Ge(e)});const i=t.getElementById("start");i&&(i.onclick=e=>{e.stopPropagation(),console.log("startPrint")});const l=t.getElementById("rename");l&&(l.onclick=e=>{e.stopPropagation(),console.log("renameFile")});const o=t.getElementById("delete");o&&((0,p.gL)(o,!e.ro),o.onclick=e=>{R(a,n),e.stopPropagation()});const r=t.getElementById("download");r&&((0,p.gL)(r,e.refs?.download),r.onclick=t=>{F(r),H(e.refs?.download,n,(()=>G(r))),t.stopPropagation()})}(e,t),(0,n.ot)(t),t}function We(e,t){const a=$e("node-file",e.display_name||e.name,(e=>{})),s=a.querySelector(".node-details");s.querySelectorAll(".details").forEach((t=>{(0,n.ot)(t);const a=(0,N.NA)(t.dataset.where,e);if(a){const e=(0,xe.Z)(t.dataset.format,a);t.querySelector("p[data-value]").innerHTML=e}else s.removeChild(t)}));const i=a.querySelector("img.node-img");if(t){const e=i.getAttribute(`data-${t}`);e&&(i.src=e),De.observe(i)}else(0,p.yx)(i,!1);return function(e){["details","start","rename","delete","download"].forEach((t=>{const a=e.getElementById(t);a&&(0,p.yx)(a,!1)}))}(a),a}function Qe(e){if(e in qe.storages){const t=qe.storages[e];qe.origin=e,qe.current_path=[],Ue(),t.available&&Ze({force:!0})}}const Je={load:function(e){if(qe.eTag=null,(0,n.Iu)("proj.link",{query:"#title-status-label"}),!De){De=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(0,m.gJ)(e.target.getAttribute("data-src")).then((({url:t})=>{e.target.src=t}))}))}),{rootMargin:"0px 0px 50px 0px",threshold:0})}e||(e=we.Z.getContext());const t=te();if(t){const e=function(e,t){if(!e||!t)return null;let a=qe.files.find((t=>t.origin===e));const n=t.split("/").filter((e=>e)).slice(1);for(const e of n){if(!a)break;a=a.children.find((t=>t.name===e))}return"machinecode"===a?.type?a:null}(t.origin,t.path);e?e.date>t.data&&ae(e):ae(null)}ne(e,!0),Te(),Ve({redraw:!0}),Ze({force:!0})},update:e=>{const t=h.PT.fromApi(e.printer.state);Ve(),Ze(),ne(e,!0),I.update(t)},getApiPath:Re};let Xe=0,et=null;const tt=()=>{const e=e=>{const t=document.getElementById("offline-screen"),a=document.importNode(t.content,!0);return["not-responsing","please-wait"].forEach((e=>{const t=a.getElementById(`offline-screen.${e}`);t&&(t.innerHTML=(e=>{switch(e){case"not-responsing":return(0,n.Iu)("msg.offline.not-responsing");case"please-wait":return(0,n.Iu)("msg.offline.please-wait");default:return""}})(e))})),et={node:a,close:()=>{e(),et=null}},a};(0,j.o)((t=>e(t)),{timeout:0,closeOutside:!1,className:"offline-screen"})},at=({connection:e,isConnected:t})=>{const a={printer:{ok:t,message:(0,n.Iu)("conn.printer.not-connected")}},s=t?{...a,...e?.states}:a,i=["connect"];for(const e in s){const{ok:t,message:a}=s[e],l=document.getElementById(`conn-status-${e}-msg`);l&&(l.innerHTML=t&&"connect"===e?"ok"===a.toLowerCase()?(0,n.Iu)("conn.connect.linked"):(0,n.Iu)("conn.connect.not-linked"):a);const o=document.getElementById(`conn-status-${e}`),r=o.querySelector(".icon-success"),d=o.querySelector(".icon-warning"),c=t&&!i.includes(e);(0,p.QH)(o,c),c||((0,p.QH)(r,!t),(0,p.QH)(d,t))}const l=e=>{Xe<3?Xe+=1:(e?tt():et.close(),Xe=0)};t?et&&l(!1):!et&&l(!0)},nt={version:void 0,printer:void 0,current:void 0,connection:void 0,fileExtensions:[]},st=e=>{const t=e.load;return e.load=()=>{(()=>{const e=document.getElementById("title-printer");e&&(e.innerHTML=it())})(),t(nt)},e},it=()=>(e=>be([e.version?.location,e.version?.name]))(nt);let lt=ye;const ot={routes:[{path:"dashboard",html:a(2373),module:st(ye),getTitle:()=>(0,n.Iu)("home.link")},{path:"question",html:a(5198),module:st($)},{path:"files",html:a(7189),module:st(Je),getTitle:()=>(0,n.Iu)("proj.storage")},{path:"settings",html:a(2936),module:st(a(2957).Z),getTitle:()=>(0,n.Iu)("settings.title")},{path:"control",html:a(3478),module:st(a(732).Z),getTitle:()=>(0,n.Iu)("control.link")},{path:"cameras",html:a(5464),module:st(a(2451).Z),getTitle:()=>(0,n.Iu)("cameras.link")}].filter((e=>null!=e)),init:e=>{rt(e),nt.fileExtensions=[".gcode"],dt()},update:e=>{const t=(0,A.nC)(),a=(e=>{const t=h.PT.fromApi(e.printer.state);let a=(0,h.ny)(t);switch(t){case"IDLE":return"";case"PRINTING":return`${a} ${Math.round(100*(e?.current?.progress?.completion||0))}%`;default:return a}})(nt);var n;document.title=(n=[a,ot.routes.find((e=>e.path===t)).getTitle()],be([...n,it(),"PrusaLink"])),rt(e),(0,N.zR)("telemetry",{...nt.printer,version:nt.version}),(e=>{const t=h.PT.fromApi(e),a=document.getElementById("printer-status");a&&(a.innerHTML=(0,h.ny)(t))})(nt.printer.state),ct(nt.printer),ut()},setConnected:e=>{at({connection:nt.connection,isConnected:e})},setModule:e=>{lt=e},getContext:()=>nt},rt=({connection:e,job:t,printer:a,version:n})=>{e?.ok&&e.payload&&(nt.connection=e.payload.data),t?.ok&&t.payload&&(nt.current=t.payload.data),a?.ok&&a.payload&&(nt.printer=a.payload.data),n?.ok&&n.payload&&(nt.version=n.payload)},dt=()=>{let e=new Map([["temp-line-blue",[]],["temp-line-orange",[]]]);o(e,300),r()},ct=e=>{const t=(new Date).getTime();d("temp-line-blue",[t,e.temperature.bed.actual]),d("temp-line-orange",[t,e.temperature.tool0.actual]),r()},ut=()=>{lt&<.update&<.update(nt)},pt=ot},8495:(e,t,a)=>{"use strict";a.d(t,{Z:()=>n});const n=a(3283).default},8751:(e,t,a)=>{"use strict";a.d(t,{c4:()=>r,g9:()=>d,nC:()=>l});var n=a(7780),s=a(8495);const i=e=>{const[t,a]=e.split("#");return a||"dashboard"},l=()=>i(window.location.hash);function o(e,t){const a=i(e),l=s.Z.routes.find((e=>e.path===a));if(!l)return!1;t&&function(e){window.location.hash!=e&&history.pushState(null,"",e)}("#"+a);const o=document.getElementById("root");var r;return function(e,t){t.innerHTML="",(new DOMParser).parseFromString(e,"text/html").body.childNodes.forEach((e=>t.appendChild(e)))}(l.html,o),(0,n.ot)(o),function(e){const t=document.querySelector(`a[href="#${e}"]`);t&&(document.getElementById("navbar").childNodes.forEach((e=>{"li"===e.nodeName.toLowerCase()&&e.classList.remove(["active"])})),t.parentNode.className="active")}(a),(r=l.getTitle)&&(document.title=r()),window.scrollTo({top:0}),l.module.load(),s.Z.setModule(l.module),!0}const r=e=>o(e,!0),d=e=>o(e,!1)},4800:(e,t,a)=>{"use strict";a.d(t,{PT:()=>s,cG:()=>i,ny:()=>r});var n=a(7780);const s={UNKNOWN:"UNKNOWN",IDLE:"IDLE",READY:"READY",BUSY:"BUSY",PRINTING:"PRINTING",PAUSED:"PAUSED",FINISHED:"FINISHED",STOPPED:"STOPPED",ERROR:"ERROR",ATTENTION:"ATTENTION",fromApi:e=>e.flags.link_state?l(e.flags.link_state):o(e)},i=[s.IDLE,s.READY,s.FINISHED],l=e=>{switch(e.toUpperCase()){case"IDLE":return s.IDLE;case"READY":return s.READY;case"BUSY":return s.BUSY;case"PRINTING":return s.PRINTING;case"PAUSED":return s.PAUSED;case"FINISHED":return s.FINISHED;case"STOPPED":return s.STOPPED;case"ERROR":return s.ERROR;case"ATTENTION":return s.ATTENTION;default:return console.error(`Unsupported state: ${e}`),s.UNKNOWN}},o=e=>e.flags.error?s.ERROR:e.text.toUpperCase()==s.BUSY?s.BUSY:e.flags.finished?s.FINISHED:e.flags.pausing||e.flags.paused?s.PAUSED:e.flags.printing?s.PRINTING:e.flags.ready&&e.flags.operational?s.READY:s.IDLE,r=e=>{switch(e){case s.IDLE:return(0,n.Iu)("prop.st-idle");case s.READY:return(0,n.Iu)("prop.st-ready");case s.BUSY:return(0,n.Iu)("prop.st-busy");case s.PRINTING:return(0,n.Iu)("prop.st-printing");case s.PAUSED:return(0,n.Iu)("prop.st-paused");case s.FINISHED:return(0,n.Iu)("prop.st-finished");case s.STOPPED:return(0,n.Iu)("prop.st-stopped");case s.ERROR:return(0,n.Iu)("prop.st-error");case s.ATTENTION:return(0,n.Iu)("prop.st-attention");default:return console.error(`Unsupported state: ${e}`),(0,n.Iu)("prop.st-unknown")}}},4977:e=>{"use strict";e.exports=JSON.parse('{"langs":["cs","de","en","es","fr","it","kr","nl","pl","sk"],"texts":{"home":{"link":["Přehled","Dashboard","Dashboard","Panel principal","Tableau de bord","Dashboard","대쉬보드","Dashboard","Panel kontrolny","Prehľad"],"title":["Stav tiskárny","Druckerstatus","Printer Status","Estado de la impresora","État de l\'imprimante","Stato della stampante","프린터 상태","Printerstatus","Stan drukarki","Stav tlačiarne"]},"proj":{"link":["Úložiště","Projekte","Storage","Proyectos","Projets","Progetti","저장장치","Opslag","Projekty","Úložisko"],"storage":["Úložiště","Speicher","Storage",null,null,null,"저장장치","Opslag",null,"Úložisko"],"add-from":{"title":["Nahrát soubor z","Datei hinzufügen von","Add file from",null,null,null,"에서 파일 추가하기","Bestanden toevoegen van",null,"Nahrať súbor z"],"local":["Lokálního úložiště","Lokaler Speicher","Local storage",null,null,null,"로컬 저장장치","Lokale opslag",null,"Lokálneho úložiska"],"remote":["Vzdálené url","Remote-URL","Remote url",null,null,null,"원격 URL","Externe URL",null,"Vzdialenej URL"]},"details":["Detaily souboru","Datei-Details","File details",null,null,null,"파일 상세정보","Bestandseigenschappen",null,"Detaily súboru"],"del":["Smazat","Datei löschen","Delete","Borrar archivo","Supprimer le Fichier","Elimina File","삭제","Verwijderen","Usuń plik","Zmazať"],"download":["Stáhnout","Herunterladen","Download",null,null,null,"다운로드","Downloaden",null,"Stiahnuť"],"up-folder":["nadřazená složka","übergeordneter Ordner","parent folder",null,null,null,"상위폴더","Bovenliggende map",null,"nadradený priečinok"]},"control":{"link":["Ovládání","Kontrolle","Control",null,"Contrôle",null,"제어","Bediening",null,"Ovládanie"],"coordinates":["Souřadnice tiskárny","Drucker-Koordinaten","Printer Coordinates",null,"Coordonnées de l\'imprimante",null,"프린터 좌표","Printercoördinaten",null,"Súradnice tlačiarne"],"axis":{"x":["Osa X","X-Achse","X axis",null,"axe X",null,"X축","X-as",null,"Os X"],"y":["Osa Y","Y-Achse","Y axis",null,"axe Y",null,"Y축","Y-as",null,"Os Y"],"z":["Osa Z","Z-Achse","Z axis",null,"axe Z",null,"Z축","Z-as",null,"Os Z"]},"stepper-motors":["Krokové motory","Schrittmotoren","Stepper Motors",null,"moteurs",null,"스텝 모터","Stappenmotors",null,"Krokové motory"],"heated-bed-move":["Pohyb podložky v ose X a Y","Heizbett X und Y bewegen","Heated Bed X and Y Move",null,"Mouvement en x/y",null,"히트베드 X 및 Y 이동","Beweeg verwarmd bed in X en Y",null,"Pohyb podložky v osi X a Y"],"move-step":["Krok pohybu [mm]","Schrittweite [mm]","Move Step [mm]",null,"déplacement [mm]",null,"[mm]mm 스텝 이동","Beweegafstand [mm]",null,"Krok pohybu [mm]"],"nozzle-z-move":["Pohyb extrudéru v ose Z","Düse Z Bewegung","Nozzle Z Move",null,"déplacement en z",null,"노즐 Z 이동","Beweeg omhoog/omlaag",null,"Pohyb extruderu v osi Z"],"extruder":["Extrudér","Extruder","Extruder",null,"extrudeur",null,"익스트루더","Extruder",null,"Extruder"],"extrude-retract-step":["Krok vytlačení/vtažení [mm]","Extrudieren/Zurückziehen Schritt [mm]","Extrude/Retract Step [mm]",null,"longueur d\'extrusion ou de rétractation [mm]",null,"[mm]mm 스텝 압출/철회","Extrude/retract-afstand [mm]",null,"Krok vysunutia/zasunutia [mm]"],"nozzle-temp":["Teplota trysky","Düsentemperatur","Nozzle Temperature",null,"température de la buse",null,"노즐 온도","Temperatuur nozzle",null,"Teplota trysky"],"speed":["Rychlost","Geschwindigkeit","Speed",null,"vitesse",null,"속도","Snelheid",null,"Rýchlosť"],"heated-bed-temp":["Teplota vyhřívané podložky","Temperatur des Heizbettes","Heated Bed Temperature",null,"Température du lit",null,"히트베드 온도","Temperatuur verwarmd bed",null,"Teplota vyhrievanej podložky"],"flow":["Průtok","Flow","Flow",null,"flux",null,"흐름","Extrusiefactor",null,"Prietok"],"title":["Ovládání tiskárny","Druckersteuerung","Printer Control",null,"Contrôle de l\'imprimante",null,"프린터 제어","Printerbediening",null,"Ovládanie tlačiarne"]},"cameras":{"link":["Kamery","","Cameras","","","","카메라","Camera\'s","",""],"trigger-scheme":{"ten-sec":["Každých 10 sekund","","Every 10 seconds","","","","매 10초","Elke 10 seconden","",""],"thirty-sec":["Každých 30 sekund","","Every 30 seconds","","","","매 30초","Elke 30 seconden","",""],"sixty-sec":["Každých 60 sekund","","Every 60 seconds","","","","매 60초","Elke minuut","",""],"each-layer":["Při změně vrstvy","","On layer change","","","","매 레이어","Bij laagwissel","",""],"fifth-layer":["Každou pátou vrstvu","","Every fifth layer","","","","매 5레이어","Elke 5 lagen","",""],"manual":["Ručně","","Manual","","","","수동","Handmatig","",""]}},"settings":{"title":["Nastavení","Einstellungen","Settings",null,"Réglages",null,"세팅","Instellingen",null,"Nastavenie"]},"conn":{"prusa-connect-status":["Stav připojení PrusaConnect","PrusaConnect Status","PrusaConnect Status",null,"Informations de connexion à PrusaConnect",null,"프루사커넥트 상태","Status van PrusaConnect",null,"Stav pripojenia PrusaConnect"],"printer-status":["Stav připojení 3D tiskárny","3D-Drucker Verbindungsstatus","3D Printer Connection Status",null,"Informations de connexion à l\'imprimante 3D",null,"3D 프린터 연결 상태","Verbindingsstatus van 3D-printer",null,"Stav pripojenia 3D tlačiarne"],"title":["připojení","Verbindung","Connection",null,"connexion",null,"연결","Verbinding",null,"pripojenie"],"prusa-connect-url":["Adresa PRUSA CONNECT","PRUSA CONNECT Adresse","PRUSA CONNECT Address",null,null,null,"프루사커넥트 주소","Adres van PRUSA CONNECT",null,"Adresa PrusaConnect"],"suc":["Úspěšně připojeno","Erfolgreich verbunden","Successfully connected",null,"Connecté avec succès",null,"연결 성공","Succesvol verbonden",null,"Úspešne pripojené"],"printer":{"not-connected":["","","Not Connected","","","","접속안됨","Niet verbonden","",""]},"connect":{"linked":["","","Linked","","","","연결됨","Verbonden","",""],"not-linked":["","","Not Linked","","","","연결안됨","Niet verbonden","",""]}},"prop":{"temp-nozzle":["Teplota trysky","Düsentemperatur","Nozzle Temperature","Temperatura del nozzle","Température de la buse","Temperatura ugello","노즐 온도","Nozzletemperatuur","Temperatura dyszy","Teplota trysky"],"temp-bed":["Vyhřívaná podložka","Heizbett","Heatbed","Base calefactable","Plateau chauffant","Piano riscaldato","히트베드","Verwarmd bed","Stół","Vyhrievaná podložka"],"speed":["Rychlost tisku","Druckgeschwindigkeit","Printing Speed","Velocidad de impresión","Vitesse d\'impression","Velocità di stampa","출력속도","Printsnelheid","Prędkość drukowania","Rýchlosť tlače"],"z-height":["Výška Z","Z-Höhe","Z-Height","Altura-Z","Hauteur en z","Altezza-Z","Z높이","Z-Hoogte","Wysokość Z","Výška Z"],"nozzle-diameter":["Velikost trysky","Düsendurchmesser","Nozzle Diameter",null,null,null,"노즐지름","Nozzlediameter",null,"Veľkosť trysky"],"rem-time":["Zbývající čas","Restzeit","Remaining time","Tiempo restante","Temps restant","Tempo residuo","남은시간","Resterende tijd","Pozostały czas","Zostávajúci čas"],"time-est":["Odhad doby tisku","Druckzeit Schätzen","Print Time Estimate","Tiempo Estimado de Impresión","Estimation du temps d\'impression","Stima del Tempo di Stampa","예상 출력 시간","Geschatte printtijd","Szacowany Czas Druku","Odhad času tlače"],"est-end":["Odhadovaný konec","Erwartetes Ende","Estimated end","Fin estimado","Fin d\'impression estimée","Fine prevista","예상완료","geschatte eindtijd","Szacowane zakończenie","Odhadovaný koniec"],"pnt-time":["Doba tisku","Druckzeit","Printing time","Tiempo de impresión","Temps d\'impression","Tempo di stampa","출력시간","Printtijd","Czas druku","Čas tlače"],"last-mod":["Naposledy upraveno","Zuletzt Geändert","Last Modified","Ultima Modificación","Dernière Modification","Ultima Modifica","최종 수정됨","Laatst gewijzigd","Ostatnio Zmodyfikowany","Posledná úprava"],"material":["Materiál","Material","Material","Material","Matériau","Materiale","재료","Materiaal","Materiał","Materiál"],"layer-ht":["Výška vrstvy","Schichthöhe","Layer Height","Altura de Capa","Hauteur de Couche","Altezza Layer","레이어 높이","Laagdikte","Wysokość Warstwy","Výška vrstvy"],"size":["Velikost souboru","Größe der Datei","File size",null,"Taille du fichier",null,"파일크기","Bestandsgrootte",null,"Veľkosť súboru"],"progress":["Postup","Fortschritt","Progress",null,"Progression",null,"진행","Voortgang",null,"Progres"],"st-idle":["Nečinná","Leerlauf","Idle","En espera","Repos","Inattivo","대기","Inactief","Oczekuje","Nečinná"],"st-ready":["Připravena","","Ready","","","","준비","Gereed voor gebruik","","Pripravené"],"st-busy":["Zaneprázdeněná","Beschäftigt","Busy",null,"Occupée",null,"작업중","Bezig",null,"Zaneprázdnená"],"st-printing":["Probíhá tisk","Druckt","Printing","Imprimiendo","Impression","Stampa","출력중","Printen","Drukowanie","Prebieha tlač"],"st-paused":["Pozastavena","Pausiert","Paused",null,"En pause",null,"일시정지","Gepauzeeerd",null,"Pozastavená"],"st-finished":["Dokončeno","","Finished","","","","완료됨","Klaar","","Dokončené"],"st-stopped":["Zastaveno","","Stopped","","","","정지됨","Gestopt","","Zastavené"],"st-error":["Chyba","","Error","","","","에러","Fout","","Chyba"],"st-attention":["Vyžaduje pozornost","","Attention","","","","주의","Attentie","","Pozor"],"st-unknown":["Neznámý","","Unknown","","","","알수없음","Onbekend","","Neznáme"],"at":["v","um","at","a las","à","alle","에서","op","o","v"],"less-than":["Méně než minuta","Weniger als eine Minute","Less than a minute","Menos de un minuto","Moins d\'une minute","Meno di un minuto","1분 미만","Minder dan een minuut","Mniej niż minuta","Menej ako minúta"],"today-at":["Dnes v","Heute um","Today at","Hoy a las","Aujourd\'hui à","Oggi alle","오늘","Vandaag om","Dzisiaj o","Dnes o"],"tmw-at":["Zítra v","Morgen um","Tomorrow at","Mañana a las","Demain à","Domani alle","내일","Morgen om","Jutro o","Zajtra o"],"true":["Ano","Ja","Yes",null,"Oui",null,"예","Ja",null,"Áno"],"false":["Ne","Nein","No",null,"Non",null,"아니오","Nee",null,"Nie"],"na":["N/A","NV","NA","NA","NA","ND","없음","N.v.t.","N/D","N/A"],"cover-closed":["Uzavřené","Geschlossen","Closed","Cerrada","Fermé","Chiuso","닫힘","Gesloten","Zamknięta","Zavreté"],"cover-opened":["Otevřené","Geöffnet","Opened","Abierta","Ouvert","Aperto","열림","Open","Otwarta","Otvorené"],"storage-space":["{{free}} volných z {{total}}","{{free}} von {{total}} frei","{{free}} of {{total}} free",null,null,null,"{{total}} 중 {{free}} 남음","{{free}} van {{total}} vrij",null,"{{free}} voľných z {{total}}"]},"msg":{"modal-p1":["Vítejte na webovém rozhraní vaší","Willkommen zur Weboberfläche Ihres","Welcome to the web interface of your","Bienvenido a la interfaz web de tu","Bienvenue dans l\'interface web de votre","Benvenuto nell\'interfaccia web del tuo","당신의 웹 인터페이스에 오신 것을 환영합니다.","Welkom bij de webinterface van uw","Witaj w interfejsie Twojej","Vitajte vo webovom rozhraní vašej"],"modal-p2":["Upozornění: některé hodnoty jsou zobrazeny pouze v průběhu tisku.","Bitte beachten Sie, dass die Werte nur angezeigt werden, wenn der Drucker gerade druckt.","Please note that values are shown only when the printer is printing.","Tenga en cuenta que los valores se muestran solo cuando la impresora está imprimiendo.","Veuillez noter que les valeurs sont affichées uniquement lorsque l\'imprimante imprime.","Si noti che i valori vengono visualizzati solo durante la stampa.","프린터가 출력중일 경우에만 값이 표시됩니다.","De waarden worden alleen getoond tijdens het printen.","Wartości będą wyświetlane tylko podczas drukowania.","Upozornenie: niektoré hodnoty sú zobrazené len počas tlače."],"api-key-1":["Vítejte ve webovém rozhraní PrusaLink Web!","Willkommen auf der Web-Oberfläche von PrusaLink Web.","Welcome to the PrusaLink Web web interface.","Bienvenido a la interfaz web de PrusaLink Web.","Bienvenue sur l\'interface web locale de PrusaLink Web.","Benvenuti nell\'interfaccia web di PrusaLink Web.","프루사 커넥트 웹 웹인터페이스에 오신 것을 환영합니다.","Welkom bij de PrusaLink Web webinterface.","Witaj w interfejsie sieciowym PrusaLink Web.","Vitajte vo webovom rozhraní PrusaLink Web!"],"api-key-2":["Vložte API klíč.","Bitte geben Sie den API-Schlüssel ein.","Please insert the API key.","Por favor introduce la clave API.","Veuillez insérer la clé API.","Si prega di inserire la chiave API.","API키를 입력하십시오.","Voer de API-sleutel in","Wpisz klucz API.","Vložte API kľúč."],"api-key-3":["Otevřete menu Nastavení -> Síť -> PrusaLink.","Sie finden ihn in Einstellungen -> Netzwerk -> PrusaLink.","You can find it in Settings -> Network -> PrusaLink.","Puedes encontrarla en Ajustes -> Red -> PrusaLink.","Vous pouvez la trouver dans Réglages -> Réseau -> Informations de connexion.","È possibile trovarla in Impostazioni -> Rete -> PrusaLink","설정 -> 네트워크 -> 프루사링크에서 찾을 수 있습니다.","Deze kan gevonden worden bij Settings -> -> Network -> PrusaLink.","Możesz znaleźć go w sekcji Ustawienia -> Sieć -> PrusaLink.","Nájdete ho v Nastavenia -> Sieť -> PrusaLink."],"offline":{"not-responsing":["Tiskárna nereaguje.","Der Drucker antwortet nicht.","Printer is not responding.",null,null,null,"프린터가 응답하지 않습니다.","Printer reageert niet.",null,"Tlačiareň nereaguje."],"please-wait":["Prosím, čekejte...","Bitte warten...","Please wait...",null,null,null,"기다려주십시오...","Even geduld...",null,"Prosím, čakajte..."]},"drop-zone":{"label":["Přetažením souboru zahájíte nahrávání","","Drop file here to start the uploading","","","","파일을 여기로 끌어놓으면 업로드가 시작됩니다.","Sleep het bestand hierheen om het te uploaden","",""]},"del-proj":["Opravdu chcete smazat {{file_name}}?","Wollen Sie wirklich {{file_name}} löschen?","Do you really want to delete {{file_name}}?","¿Realmente deseas borrar {{file_name}}?","Voulez-vous vraiment supprimer le fichier {{file_name}} ?","Vuoi davvero eliminare il file {{file_name}}?","{{file_name}}을 정말로 삭제하겠습니까?","Weet u zeker dat u {{file_name}} wilt verwijderen?","Czy na pewno chcesz usunąć plik {{file_name}}?","Naozaj chcete zmazať {{file_name}}?"],"sla-pour-resin":["Nalijte do vaničky dostatečné množství resinu pro vybraný soubor a zavřete víko. Minimální objem resinu je zobrazen na dotykovém displeji tiskárny.","Füllen Sie genügend Harz für die ausgewählte Datei in den Tank und schließen Sie den Deckel. Die minimale Menge des Harzes wird auf dem Touchscreen angezeigt.","Pour enough resin for selected file into the tank and close the lid. Minimal amount of the resin is displayed on the touchscreen.",null,"Versez suffisamment de résine dans le réservoir pour le projet sélectionné et fermez le capot.",null,"선택한 파일을 위한 레진을 탱크에 붓고 뚜껑을 닫습니다. 터치스크린에 최소량의 레진이 표시됩니다.","Doe genoeg resin voor het geselcteerde bestand in het vat en sluit de kap. De minimale hoeveelheid resin wordt aangegeven op het touchscreen.",null,"Do nádržky nalejte dostatočné množstvo resinu pre vybraný súbor a zatvorte veko. Minimálne množstvo resinu sa zobrazí na dotykovom displeji."],"cancel":["Chcete opravdu zrušit tisk?","Wollen Sie den Druck wirklich abbrechen?","Do you really want to cancel print?","¿Realmente quieres cancelar la impresión?","Voulez-vous vraiment annuler l\'impression ?","Vuoi davvero annullare la stampa?","출력을 취소하겠습니까?","Weet u zeker dat u de print wilt stoppen?","Czy na pewno chcesz anulować wydruk?","Chcete naozaj zrušiť tlač?"]},"btn":{"login":["Přihlášení","Login","Login","Iniciar sesión","Connexion","Accedi","로그인","Login","Zaloguj","Prihlásenie"],"confirm":["Potvrdit","Bestätigen","Confirm","Confirmar","Confirmer","Conferma","결정","Bevestigen","Potwierdzam","Potvrdiť"],"cancel":["Zrušit","Abbrechen","Cancel","Cancelar","Annuler","Annulla","취소","Annuleren","Anuluj","Zrušiť"],"del":["Smazat","löschen","Delete","borrar","supprimer","elimina","삭제","Verwijderen","usuń","Zmazať"],"download":["Stáhnout","Herunterladen","Download",null,"télécharger",null,"다운로드","Download",null,"Stiahnuť"],"pause-pt":["Pozastavit tisk","Druck pausieren","Pause Print",null,"Mettre l\'impression en pause",null,"출력 일시 정지","Pauzeer print",null,"Pozastaviť tlač"],"resume-pt":["Pokračovat v tisku","Druck fortsetzen","Resume Print",null,"Redémarrer l\'impression",null,"출력 복귀","Hervat print",null,"Pokračovať v tlači"],"start-pt":["Start tisku","Druck starten","Start Print","Empezar impresión","Lancer l\'impression","Inizia stampa","출력 시작","Start print","Start druku","Štart tlače"],"stop-print":["Zrušit tisk","Druck abbrechen","Stop Print","Cancelar impresión","Annuler l\'impression","Annulla stampa","출력 정지","Stop print","Anuluj wydruk","Zrušiť tlač"],"upld-file":["Nahrát soubor","Datei hochladen","Upload File",null,null,null,"파일 업로드","Upload bestand",null,"Nahrať súbor"],"check-updates":["Kontrola aktualizací","","Check Updates","","","","업데이트 체크","","",""],"connect":{"link":["Spárovat","","Link","","","","연결","Verbinden","",""],"unlink":["Odpojit","","Unlink","","","","연결끊기","Verbinding verbreken","",""]},"chg":["Změnit","Ändern","Change",null,"Mettre à jour",null,"변경","Wijzig",null,"Zmeniť"],"reset":["","","Reset","","","","리셋","Reset","",""],"disable-steppers":["Vypnout motory","Schrittmotoren deaktivieren","Disable Steppers",null,"Desactiver les moteurs",null,"모터 정지","Stappenmotors uitschakelen",null,"Vypnúť motory"],"extrude":["Vytlačit","Extrudieren","Extrude",null,"extruder",null,"압출","Extrudeer",null,"Vysunúť"],"retract":["Vtáhnout","Zurückziehen","Retract",null,"Retracter",null,"리트렉트","Retract",null,"Zasunúť"],"set":["Nastavit","Setzen","Set",null,"Régler",null,"설정","Instellen",null,"Nastaviť"],"yes":["Ano","Ja","Yes","Sí","Oui","Sì","예","Ja","Tak","Áno"],"no":["Ne","Nein","No","No","Non","No","아니오","Nee","Nie","Nie"],"upgrade":["","","Upgrade","","","","업그레이드","","",""],"chg-print-set":["Tisková nastavení","Druckeinstellungen","Print Settings","Ajustes de Impresión","Réglages d\'Impression","Impostazioni di stampa","프린트 설정","Printinstellingen","Ustawienia druku",""],"save-chgs":["Uložit změny","Änderungen speichern","Save changes","Guardar cambios","Enregistrer les modifications","Salva le modifiche","변경내용 저장","Wijzigingen opslaan","Zapisz zmiany","Uložiť zmeny"]},"camera":{"settings":["Nastavení kamery","","Camera Settings","","","","카메라 세팅","Camera-instellingen","",""],"name":["Název kamery","","Camera Name","","","","카메라 명칭","Cameranaam","",""],"resolution":["Rozlišení","","Resolution","","","","해상도","Resolutie","",""],"trigger-scheme":["","","Trigger Scheme","","","","트리거 계획","Triggerschema","",""],"title":["Kamery","","Cameras","","","","카메라","Camera\'s","",""],"time":["Čas snímku","","Snapshot Time","","","","스냅샷 시간","Snapshot-tijd","",""],"cloud":{"linked":["Připojeno","","Linked","","","","연결됨","Verbonden","",""],"not-linked":["Nepřipojeno","","Not Linked","","","","연결되지 않음","Niet verbonden","",""],"label":["","","CONNECT","","","","CONNECT","CONNECT","",""]},"btn":{"connect":["Zkusit povolit kameru","","Try to enable camera","","","","카메라 활성화 시도중","Probeer de camera in te schakelen","",""],"settings":["Otevřít nastavení kamery","","Open camera settings","","","","카메라 설정 열기","Open camera-instellingen","",""],"link":["Připojit kameru do Connectu","","Link camera to CONNECT","","","","카메라를 CONNECT에 연결하기","Verbind camera met CONNECT","",""],"unlink":["Odpojit kameru z Connectu","","Unlink camera from CONNECT","","","","카메라를 CONNECT에서 연결 해제하기","Verbreek verbinding van camera met CONNECT","",""]},"path":["Cesta","","Path","","","","경로","Pad","",""],"driver":["Ovladač","","Driver","","","","드라이버","Driver","",""]},"printer":{"title":["Tiskárna","Drucker","Printer",null,"imprimante",null,"프린터","Printer",null,"Tlačiareň"],"name":["Název tiskárny","Name des Druckers","Printer name",null,"nom de l\'imprimante",null,"프린터 이름","Naam van de printer",null,"Názov tlačiarne"],"location":["Umístění tiskárny","Standort des Druckers","Printer location",null,"localisation de l\'imprimante",null,"프린터 위치","Locatie van de printer",null,"Umiestnenie tlačiarne"]},"print":{"fdm":{"1":["Je tiskárna připravena?","Ist der Drucker bereit?","Is the printer ready?",null,"L\'imprimante est-elle prête ?",null,"프린터가 준비되었습니까?","Is de printer klaar voor gebruik?",null,"Je tlačiareň pripravená?"],"2":["Je tisková podložka prázdná a čistá?","Ist der Druckbogen leer und sauber?","Is printing sheet empty and clean?",null,"Le surface d\'impression est-elle vide et propre ?",null,"프린트 시트가 비어있고 깨끗합니까?","Is het printplatform leeg en schoon?",null,"Je tlačová podložka prázdna a čistá?"]}},"upld":{"title":["Nahrát soubor","Projekt hochladen","Upload file","envía proyecto","Téléversement de projet","carica progetto","파일업로드","Bestand uploaden","prześlij projekt","Nahrať súbor"],"start-pt":["po přenosu zahájit tisk","Druck nach der Übertragung starten","Start print after transfer",null,"Démarrer l\'impression après le transfert",null,"전송 후 출력 시작","Start print na het omzetten",null,"po prenose spustiť tlač"],"remote":{"source":["URL zdroje","Quell-URL","Source URL",null,"URL de la source",null,"원본 URL","Bron van URL",null,"URL zdroja"],"hint-fdm":["Zadejte URL souboru G-CODE","URL der G-CODE-Datei eingeben","Type URL of G-CODE file",null,"Entrez l\'URL du fichier G-CODE du projet",null,"G코드 파일의 주소를 입력하십시오","Type de URL van het gcode-bestand",null,"Zadajte URL súboru G-code"],"file":["Název souboru","Dateiname","File name",null,null,null,"파일명","Bestandsnaam",null,"Názov súboru"],"file-hint":["Zadejte název souboru","Dateiname eingeben","Type file name",null,null,null,"파일명을 입력하십시오","Type de bestandsnaam",null,"Zadajte názov súboru"]},"direct":{"choose":["Vyberte {{file}} nebo jej přetáhněte sem.","Klicke um eine {{file}} Datei auszuwählen oder ziehe sie hier hin","Click to choose a {{file}} file or drag it here",null,"Cliquer pour choisir un fichier {{file}} ou déposez le ici",null,"선택한 {{file}} 파일을 클릭하거나 여기로 드래그하십시오","Klik om een {{file}}-bestand te kiezen of sleep het hierheen",null,"Kliknutím vyberte súbor {{file}} alebo ho sem potiahnite."]}},"download":{"dl-started":["Začátek stahování","Herunterladen Gestartet","Download Started",null,"téléchargement démarré",null,"다운로드가 시작됨","Downloaden gestart",null,"Sťahovanie začalo"],"start-pt":["Spustit tisk","Autostart","Autostart",null,"Démarrage automatique",null,"자동시작","Autostart",null,"Spustiť tlač"]},"temps":{"title":["Teploty","Temperaturen","Temperatures","Temperaturas","Températures","Temperature","온도","Temperatuur","Temperatury","Teploty"]},"version":{"title":["Verze","Version","Version",null,"version",null,"버전","Versie",null,"Verzia"],"api":["API","API","API",null,"api",null,"API","API",null,"API"],"hostname":["Hostname","Hostname","Hostname",null,"nom d\'hôte",null,"호스트명","Hostnaam",null,"Hostname"],"firmware":["Firmware","Firmware","Firmware",null,"micrologiciel",null,"펌웨어","Firmware",null,"Firmware"],"server":["Server","Server","Server",null,"serveur",null,"서버","Server",null,"Server"],"text":["Text","Text","Text",null,"texte",null,"텍스트","Tekst",null,"Text"],"sdk":["SDK","SDK","SDK",null,"sdk",null,"SDK","SDK",null,"SDK"],"fe":["Frontend","Frontend","Frontend",null,"frontend",null,"프론트엔드","Frontend",null,"Frontend"]},"sys-version":{"title":["Verze systému","Systemversion","System Version",null,"version du système",null,"시스템버전","Systeenversie",null,"Verzia systému"],"python":["Python","Python","Python",null,"python",null,"파이썬","Python",null,"Python"],"description":["Popis","Beschreibung","Description",null,"description",null,"설명","Beschrijving",null,"Popis"],"id":["ID","ID","ID",null,"ID",null,"ID","ID",null,"ID"],"os":["OS","OS","OS",null,"Système d\'exploitation",null,"OS","OS",null,"OS"]},"updates":{"title":[null,null,"System Updates",null,null,null,null,null,null,null]},"user":{"title":["Uživatel","Benutzer","User",null,"utilisateur",null,"유저","Gebruiker",null,"Používateľ"],"username":["Uživatelské jméno","Benutzername","User Name",null,"nom d\'utilisateur",null,"유저명","Gebruikersnaam",null,"Používateľské meno"],"format":{"name":["Uživatelské jméno musí obsahovat alespoň 3 znaky.","Der Benutzername muss mindestens 3 Zeichen lang sein.","Username length must be at least 3 characters long.","","","","유저명은 최소 3자리 이상 입력하십시오.","De gebruikersnaam moet minimaal 3 karakters lang zijn.","","Používateľské meno musí obsahovať aspoň 3 znaky."],"password-1":["Heslo nesmí začínat či končit mezerami, a zároveň musí splňovat jednu z následujících podmínek:","Das Passwort darf weder am Anfang noch am Ende Leerzeichen enthalten und muss mindestens eine der folgenden Optionen erfüllen:","Password can\'t contain spaces on the beggining nor the end and must meet at least one of these options:","","","","암호는 시작부분에 공백을 둘 수 없으며 다음옵션 중 하나이상을 충족해야 합니다.","Het wachtwoord mag geen spaties aan het begin of het einde bevatten en moet aan minstens één van deze opties voldoen:","","Heslo nesmie začínať ani končiť medzerami a musí spĺňať aspoň jednu z týchto podmienok:"],"password-2":["- Heslo musí obsahovat minimálně 8 znaků, zahrnujících alespoň 1 malé písmeno, 1 velké písmeno a 1 číslo","- Minimale Länge 8 Zeichen, davon ein Kleinbuchstabe, ein Großbuchstabe und eine Zahl","- Minimal length 8 characters, including one lowercase letter, one uppercase letter and one number","","","","- 최소 길이 8자(소문자 1개, 대문자 1개, 숫자 1개 포함)","- Minimaal 8 karakters lang, met tenminste een kleine letter, een hoofdletter en een nummber","","- Heslo musí obsahovať minimálne 8 znakov, vrátane aspoň 1 malého písmena, 1 veľkého písmena a 1 číslice"],"password-3":["- Heslo musí obsahovat minimálně 8 znaků, zahrnujících alespoň 1 speciální symbol (např. @)","- Mindestlänge 8 Zeichen, einschließlich eines nicht alphanumerischen Zeichens (z. B. @)","- Minimal length 8 characters, including one non-alphanumeric character (e.g. @)","","","","- 영숫자가 아닌 문자(예: @) 1개를 포함한 최소 길이 8자","- Minimaal 8 karakters lang, met tenminste één niet-alfanumeriek karakter (bijv. @)","","- Heslo musí obsahovať minimálne 8 znakov, vrátane aspoň 1 špeciálneho symbolu (napr. @)"],"password-4":["- Heslo musí obsahovat minimálně 15 znaků","- Minimale Länge 15 Zeichen","- Minimal length 15 characters","","","","- 최소 길이 15자","- Minimaal 15 karakters lang","","- Heslo musí obsahovať minimálne 15 znakov"]},"new-password":["Nové heslo","Neues Passwort","New Password",null,"nouveau mot de passe",null,"신규 암호","Nieuw wachtwoord",null,"Nové heslo"],"re-password":["Zopakujte heslo","Passwort wiederholen","Repeat Password",null,"répéter le mot de passe",null,"암호 재입력","Herhaal wachtwoord",null,"Zopakujte heslo"],"password":["Heslo","Passwort","Password",null,"mot de passe",null,"암호","Wachtwoord",null,"Heslo"]},"serial":{"label":["Sériové číslo","Seriennummer","Serial Number",null,"numéro de série",null,"시리얼넘버","Serienummer",null,"Sériové číslo"]},"api_key":{"label":["","","API Key","","","","API KEY","API-sleutel","",""]},"logs":{"title":["Logy","Protokolle","Logs",null,"logs",null,"로그","Logbestanden",null,"Logy"],"select-file":["Vyberte soubor","Datei auswählen","Select File",null,"Sélectionnez une fichier",null,"파일 선택","Selecteer bestand",null,"Vyberte súbor"],"not-selected":["Není vybrán soubor logů!","Es ist keine Protokolldatei ausgewählt!","No log file is selected!",null,"Pas de fichier de log sélectionné!",null,"로그 파일이 선택되지 않았습니다!","Geen logbestand geselecteerd!",null,"Nie je vybraný žiadny logovací súbor!"],"select-file-placeholder":["Vyberte soubor logů","Protokolldatei auswählen","Select log file",null,"selectionnez un fichier de log",null,"로그 파일 선택","Selecteer logbestand",null,"Vyberte logovací súbor"],"empty-file":["Soubor je prázdný!","Die Protokolldatei ist leer!","Log file is empty!",null,"Le fichier de log est vide!",null,"로그파일이 비어있음!","Logbestand is leeg!",null,"Logovací súbor je prázdny!"],"file-too-large":["Soubory logů o velikosti větší než {{size}} jsou k dispozici pouze ke stažení!","Protokolldateien, die größer als {{size}} sind, stehen nur zum Herunterladen zur Verfügung.","Log files of size larger than {{size}} are available only for downloading.",null,"Les fichiers de log d\'une taille supérieure à {{size}} ne sont disponibles que pour le téléchargement.",null,"로그 파일을 다운로드 하기 위해서는 최소 {{size}} 이상의 용량이 필요합니다.","Logbestanden groter dan {{size}} kunnen alleen gedownload worden.",null,"Logovacie súbory s veľkosťou väčšou ako {{size}} sú k dispozícii len na stiahnutie.!"]},"ntf":{"success":["Požadavek byl úspěšný","Erfolg","The request was successful","Éxito","la demande a été traitée avec succès","Successo","요청이 성공했습니다.","De aanvraag was succesvol","Sukces","Žiadosť bola úspešná"],"camera-suc":["","","Camera control request has been sent","","","","카메라 조작 요청이 전송되었습니다.","Aanvraag voor camerabesturing is verzonden","",""],"camera-config-success":["Konfigurace kamery byla aktualizovaná","","Camera configuration has been updated","","","","카메라 구성이 업데이트되었습니다.","Cameraconfiguration is geüpdatet","",""],"settings-suc":["Nastavení bylo úspěšně změněno.","Die Einstellungen wurden erfolgreich geändert.","Settings was changed successfully.",null,"Paramètres modifiés avec succès.",null,"설정이 성공적으로 변경되었습니다.","Instelling succesvol gewijzigd.",null,"Nastavenia boli úspešne zmenené."],"upld-suc":["Soubor {{file_name}} byl úspěšně nahrán.","Das Hochladen des Projekts {{file_name}} war erfolgreich.","The file {{file_name}} was uploaded successfully.","El envío del proyecto {{file_name}} se completó.","Le projet {{file_name}} a été téléversé correctement.","Caricamento del progetto {{file_name}} riuscito.","{{file_name}}파일이 성공적으로 업로드되었습니다.","Het bestand {{file_name}} is succesvol geüpload.","Przesyłanie projektu {{file_name}} powiodło się.","Súbor {{file_name}} bol úspešne nahraný."],"error":["Chyba","Fehler","Error","Error","Erreur","Errore","에러","Fout","Błąd","Chyba"],"upld-unsuc":["Nahrání souboru {{file_name}} selhalo.","Das Hochladen des Projekts {{file_name}} war nicht erfolgreich.","The file {{file_name}} upload was unsuccessful.","El envío del proyecto {{file_name}} ha fallado.","Le téléversement du projet {{file_name}} a échoué.","Caricamento del progetto {{file_name}} non riuscito.","{{file_name}}파일의 업로드가 실패하였습니다.","Het bestand {{file_name}} is niet succesvol geüpload.","Przesyłanie projektu {{file_name}} nie powiodło się.","Nahrávanie súboru {{file_name}} zlyhalo."],"upld-start":["Požadavek na nahrání souboru byl přijat","Upload-Anfrage wurde angenommen","Upload request has been accepted",null,null,null,"업로드 요청이 수락되었습니다.","Uploadverzoek is geaccepteerd",null,"Žiadosť o odoslanie bola prijatá"]},"upgrade":{"success":{"title":["","","Upgrade Successful","","","","업그레이드 성공","","",""],"message":["","","Page will be reloaded in 5 seconds","","","","페이지가 5초 뒤 다시 시작됩니다.","","",""]}},"sort":{"by-name":["Název","","Name","","","","이름으로 정렬하기","Naam","",""],"by-date":["Datum","","Date","","","","날짜로 정렬하기","Datum","",""],"by-size":["Velikost","","Size","","","","크기로 정렬하기","Grootte","",""]},"unit":{"h":["h","h","h","h","h","h","h","u","g","h"],"min":["min","min","min","min","min","min","min","min","min","min"],"ml":["ml","ml","ml","ml","mL","ml","ml","ml","ml","ml"],"rpm":["RPM","UPM","RPM","RPM","TPM","RPM","RPM","RPM","Obr./min","RPM"],"b":["B","B","B",null,"B",null,"B","B",null,"B"],"kb":["KB","KB","KB",null,"KB",null,"KB","kB",null,"KB"],"mb":["MB","MB","MB",null,"MB",null,"MB","MB",null,"MB"],"gb":["GB","GB","GB",null,"GB",null,"GB","GB",null,"GB"]},"exp-times":{"exp-time":["Doba osvitu [s]","Belichtung [s]","Exposure [s]","Exposición [s]","Exposition [s]","Esposizione [s]","[s]초 노출","Belichting [s]","Czas naświetlania [s]","Osvit [s]"],"inc":["Navýšení expozice (s)","Belichtungszeit inkr. [s]","Exposure time incr. [s]","Incremento tiempo exp. [s]","Incr. du temps d\'exposition [s]","Incremento tempo di esposizione [s]","[s]초 노출 시간 증가","Belichtingstijd verhogen [s]","Przyrost czasu naświetl. [s]","Prírastok osvitu (s)"],"layer-1st":["Osvit první vrstvy [s]","Erste Schicht Bel. [s]","First Layer Expo. [s]","Primera Capa Expo. [s]","Première couche Expo. [s]","Esposizione Primo layer [s]","첫번째 레이어 노출시간 [s]초","Belichtingstijd eerste laag [s]","Naśw. 1. warstwy [s]","Osvit prvej vrstvy [s]"],"profile":["Tiskový profil","Druckprofil","Print profile","Perfil de Impresión","Profil d\'Impression","Profilo di stampa","출력 프로필","Printprofielen","Profil druku","Tlačový profil"],"faster":["Rychlejší","Schneller","Faster","Rápido","Plus rapide","Più veloce","빠르게","Sneller","Szybciej","Rýchlejšie"],"slower":["Pomalejší","Langsamer","Slower","Lento","Plus lent","Più lento","느리게","Langzamer","Wolniej","Pomalšie"],"high-viscosity":["Velmi Viskózní","Hohe Viskosität","High Viscosity",null,"Haute viscosité",null,"고점도","Hoge viscositeit",null,"Vysoká viskozita"]}}}')}},t={};function a(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,a),i.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.p="",(()=>{"use strict";var e=a(8751),t=a(8495),n=a(6648);const s=()=>{document.getElementById("menu").addEventListener("click",(()=>{document.getElementById("menu").classList.contains("burger-open")?i():(document.getElementById("menu").classList.add("burger-open"),document.getElementById("navbar").classList.remove("burger-menu"))})),document.getElementById("navbar").querySelectorAll("a[href]").forEach((e=>{e.addEventListener("click",i)}))};function i(){document.getElementById("menu").classList.remove("burger-open"),document.getElementById("navbar").classList.add("burger-menu")}var l=a(7780),o=a(1351),r=a(5412);const d=(e,t)=>{const a=r.L.init(e,t);a&&(a.setOptions((0,l.Vb)()),a.value=(0,l.G3)(),a.onselect=e=>{(0,l.m0)(e),window.location.reload()})};let c=!1;const u={printer:{get:()=>(0,n.LK)("/api/printer"),init:!0,update:!0},profiles:{get:()=>new Promise((e=>e({}))),init:!0,update:!1},job:{get:()=>(0,n.LK)("/api/job"),init:!1,update:!0},connection:{get:()=>(0,n.LK)("/api/connection"),init:!0,update:!0,updateInterval:5e3}};async function p(e){const t=(new Date).getTime(),a=Object.fromEntries(Object.entries(u).map((([a,n])=>[a,(()=>{if(!e)return n.init;if(n.update){if(!n.updateInterval)return!0;if(n.timestamp||(n.timestamp=t+n.updateInterval),t>=n.timestamp)return n.timestamp=t+n.updateInterval,!0}})()?n.get():void 0])).filter((([,e])=>void 0!==e))),n=Object.values(a),s=await Promise.all(n.map((e=>e.then((e=>({ok:!0,payload:e}))).catch((e=>({ok:!e.code&&null,error:e}))))));return Object.fromEntries(Object.entries(a).map((([e],t)=>[e,s[t]])))}function m(a){try{t.Z.init(a),window.onpopstate=t=>t&&(0,e.g9)(t.currentTarget.location.hash||"#dashboard"),(0,e.g9)(window.location.hash||"#dashboard")}catch(e){h(e)}}function v(e){try{t.Z.update(e)}catch(e){h(e)}}function g(e){(0,o.S)(e,{fallbackMessage:{title:"API error",message:"Cannot connect to printer"}})}function h(e){(0,o.S)(e,{fallbackMessage:{title:"Application error",message:"Something bad happened on application side"}}),console.error(e)}window.onload=()=>{console.log("PrusaLink v.3.12.0 #b'5fba41c'"),s(),d("lang-dropdown","lang-dropdown"),(0,l.ot)(),document.querySelectorAll("a[href]").forEach((t=>{t.addEventListener("click",(a=>{(0,e.c4)(t.href)&&a.preventDefault()}))})),(0,n.Z5)().then((e=>{e&&async function(e){let a=!1;for(;;){let n=!1;try{const t=await p(a);t.printer&&(c=null===t.printer.ok),Object.values(t).forEach((({ok:e,error:t})=>{e||(n=!0,null!==e&&g(t))})),a?v(t):n||(t.version={ok:!0,payload:e},m(t),a=!0)}catch(e){h(e)}t.Z.setConnected(!c),await new Promise((e=>setTimeout(e,1e3)))}}(e)}))}})()})();