phirepass-widgets 0.0.117 → 0.0.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -12
- package/dist/cjs/{index-DehquNXP.js → index-C3v5xmUo.js} +2 -74
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-rdp.cjs.entry.js +5 -16
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +1470 -0
- package/dist/cjs/phirepass-terminal.cjs.entry.js +4 -4
- package/dist/cjs/phirepass-widgets.cjs.js +2 -2
- package/dist/cjs/{protocol-BjOgJZ9-.js → protocol-DCBMfc2u.js} +21 -277
- package/dist/collection/collection-manifest.json +0 -2
- package/dist/collection/common/channel.js +1 -21
- package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +13 -36
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +0 -122
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +31 -181
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +2 -2
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-CsYQJXY2.js +1 -0
- package/dist/components/phirepass-rdp.js +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +5 -5
- package/dist/esm/{index-BinptKL7.js → index-BVOulYtW.js} +2 -74
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-rdp.entry.js +5 -16
- package/dist/esm/phirepass-sftp-client.entry.js +1468 -0
- package/dist/esm/phirepass-terminal.entry.js +4 -4
- package/dist/esm/phirepass-widgets.js +3 -3
- package/dist/esm/{protocol-BekUePpu.js → protocol-CsYQJXY2.js} +20 -276
- package/dist/phirepass-widgets/{p-9e6f9220.entry.js → p-7ea2fdbc.entry.js} +5 -5
- package/dist/phirepass-widgets/p-BVOulYtW.js +3 -0
- package/dist/phirepass-widgets/p-CsYQJXY2.js +1 -0
- package/dist/phirepass-widgets/p-c1c616ca.entry.js +1 -0
- package/dist/phirepass-widgets/p-f1bc04a8.entry.js +1 -0
- package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/common/channel.d.ts +0 -30
- package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +0 -10
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +0 -30
- package/dist/types/components.d.ts +34 -434
- package/package.json +4 -18
- package/dist/cjs/phirepass-downloader_3.cjs.entry.js +0 -3823
- package/dist/collection/common/fetch.js +0 -44
- package/dist/collection/components/phirepass-downloader/form.js +0 -69
- package/dist/collection/components/phirepass-downloader/format.js +0 -105
- package/dist/collection/components/phirepass-downloader/jobs.js +0 -393
- package/dist/collection/components/phirepass-downloader/phirepass-downloader.css +0 -1109
- package/dist/collection/components/phirepass-downloader/phirepass-downloader.js +0 -1466
- package/dist/collection/components/phirepass-downloader/source.js +0 -120
- package/dist/collection/components/phirepass-downloader/views/dialogs.js +0 -34
- package/dist/collection/components/phirepass-downloader/views/fetch-form.js +0 -65
- package/dist/collection/components/phirepass-downloader/views/icons.js +0 -34
- package/dist/collection/components/phirepass-downloader/views/job-row.js +0 -91
- package/dist/collection/components/phirepass-downloader/views/notices.js +0 -15
- package/dist/collection/components/phirepass-downloader/views/states.js +0 -19
- package/dist/collection/components/phirepass-media-player/phirepass-media-player.css +0 -225
- package/dist/collection/components/phirepass-media-player/phirepass-media-player.js +0 -549
- package/dist/collection/components/phirepass-media-player/player.js +0 -118
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.fetch.js +0 -35
- package/dist/collection/testing/fixtures.js +0 -219
- package/dist/collection/testing/mock-channel.js +0 -410
- package/dist/components/p-B4kFfbHE.js +0 -1
- package/dist/components/p-BekUePpu.js +0 -1
- package/dist/components/p-DIf-Ru26.js +0 -1
- package/dist/components/phirepass-downloader.d.ts +0 -11
- package/dist/components/phirepass-downloader.js +0 -1
- package/dist/components/phirepass-media-player.d.ts +0 -11
- package/dist/components/phirepass-media-player.js +0 -1
- package/dist/esm/phirepass-downloader_3.entry.js +0 -3819
- package/dist/phirepass-widgets/p-6a192c8d.entry.js +0 -1
- package/dist/phirepass-widgets/p-BekUePpu.js +0 -1
- package/dist/phirepass-widgets/p-BinptKL7.js +0 -3
- package/dist/phirepass-widgets/p-fe1ce8da.entry.js +0 -1
- package/dist/types/common/fetch.d.ts +0 -167
- package/dist/types/components/phirepass-downloader/form.d.ts +0 -54
- package/dist/types/components/phirepass-downloader/format.d.ts +0 -17
- package/dist/types/components/phirepass-downloader/jobs.d.ts +0 -123
- package/dist/types/components/phirepass-downloader/phirepass-downloader.d.ts +0 -238
- package/dist/types/components/phirepass-downloader/source.d.ts +0 -61
- package/dist/types/components/phirepass-downloader/views/dialogs.d.ts +0 -52
- package/dist/types/components/phirepass-downloader/views/fetch-form.d.ts +0 -31
- package/dist/types/components/phirepass-downloader/views/icons.d.ts +0 -5
- package/dist/types/components/phirepass-downloader/views/job-row.d.ts +0 -21
- package/dist/types/components/phirepass-downloader/views/notices.d.ts +0 -18
- package/dist/types/components/phirepass-downloader/views/states.d.ts +0 -38
- package/dist/types/components/phirepass-media-player/phirepass-media-player.d.ts +0 -82
- package/dist/types/components/phirepass-media-player/player.d.ts +0 -53
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.fetch.d.ts +0 -40
- package/dist/types/testing/fixtures.d.ts +0 -25
- package/dist/types/testing/mock-channel.d.ts +0 -132
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],i=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(e,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},i=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u=new Map,f="undefined"!=typeof window?window:{},a={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},d=t=>Promise.resolve(t),p=(()=>{try{return!!f.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),h=!!p&&(()=>!!f.document&&Object.getOwnPropertyDescriptor(f.document.adoptedStyleSheets,"length").writable)(),v=!1,m=[],b=[],y=()=>{var t;return(null==(t=f.document)?void 0:t.hidden)?setTimeout(g,16):a.raf(g)},w=(t,e)=>n=>{t.push(n),v||(v=!0,e&&4&a.u?j(g):y())},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},g=()=>{$(m),$(b),(v=m.length>0)&&y()},j=t=>d().then(t),O=w(b,!0);function S(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(h?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function k(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var M,E=new WeakMap,C=t=>"sc-"+t.h,x=t=>"object"==(t=typeof t)||"function"===t,T=(t,e,...n)=>{let o=null,l=null,i=!1,r=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)if(o=e[n],Array.isArray(o))u(o);else if(null!=o&&"boolean"!=typeof o){if(i="function"!=typeof t&&!x(o))o+="";else if("function"!=typeof t&&void 0===o.u){s("Invalid vNode child");continue}i&&r?c[c.length-1].v+=o:c.push(i?A(null,o):o),r=i}};if(u(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=A(t,null);return f.m=e,c.length>0&&(f.$=c),f.j=l,f},A=(t,e)=>({u:0,O:t,v:null!=e?e:null,S:null,$:null,m:null,j:null}),L={},N=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},P=(t,e)=>null==t||x(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,R=t=>{var e;return null==(e=o(t))?void 0:e.$hostElement$},D=(t,e)=>{const n=R(t);return{emit:t=>H(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},H=(t,e,n)=>{const o=a.ce(e,n);return t.dispatchEvent(o),o},U=(t,e,n,l,s,r)=>{if(n===l)return;let c=i(t,e),u=e.toLowerCase();if("class"===e){const e=t.classList,o=V(n);let i=V(l);{let t=o.filter((t=>t&&!i.includes(t)));e.remove(...t),e.add(...i.filter((t=>t&&!o.includes(t))))}}else if("style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if("key"===e);else if("ref"===e)l&&ot(l,t);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let i;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(i=t[1])}}return i||(i=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(i)||t.removeAttribute(i):t.setAttribute(i,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=x(l);if((c||o&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?c=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?(!1!==l||""===t.getAttribute(e)||4&r&&!z(e))&&t.removeAttribute(e):(!c||4&r||s)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}else if(e="-"===e[2]?e.slice(3):i(f,u)?u.slice(2):u[2]+e.slice(3),n||l){const o=e.endsWith(q);e=e.replace(B,""),n&&a.rel(t,e,n,o),l&&a.ael(t,e,l,o)}},W=new Set(["draggable","contenteditable","spellcheck"]),z=t=>W.has(t)||t.startsWith("aria-"),F=/\s/,V=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(F):[]),q="Capture",B=RegExp(q+"$"),G=(t,e,n)=>{const o=11===e.S.nodeType&&e.S.host?e.S.host:e.S,l=t&&t.m||{},i=e.m||{};for(const t of I(Object.keys(l)))t in i||U(o,t,l[t],void 0,n,e.u);for(const t of I(Object.keys(i)))U(o,t,l[t],i[t],n,e.u)};function I(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Y=!1,Z=!1,_=[],J=[],K=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.v)l=o.S=f.document.createTextNode(o.v);else{if(Z||(Z="svg"===o.O),!f.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.S=f.document.createElementNS(Z?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.O),Z&&"foreignObject"===o.O&&(Z=!1),G(null,o,Z),o.$){const e="template"===o.O?l.content:l;for(s=0;s<o.$.length;++s)i=K(t,o,s),i&&e.appendChild(i)}"svg"===o.O?Z=!1:"foreignObject"===l.tagName&&(Z=!0)}return l["s-hn"]=M,l},Q=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===M&&(r=r.shadowRoot),"template"===n.O&&(r=r.content);l<=i;++l)o[l]&&(s=K(null,n,l),s&&(o[l].S=s,lt(r,s,e)))},X=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.S;nt(e),t&&t.remove()}}},tt=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),et=(t,e,n=!1)=>{const o=e.S=t.S,l=t.$,i=e.$,s=e.O,r=e.v;null==r?(Z="svg"===s||"foreignObject"!==s&&Z,"slot"!==s||Y||t.k!==e.k&&(e.S["s-sn"]=e.k||"",(t=>{a.u|=1;const e=t.closest(M.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(lt(e,t,null!=n?n:null),t["s-sh"]=void 0)}a.u&=-2})(e.S.parentElement)),G(t,e,Z),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,v=o[0],m=o[h];const b="template"===n.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==v)v=o[++c];else if(null==m)m=o[--h];else if(tt(d,v,l))et(d,v,l),d=e[++r],v=o[++c];else if(tt(p,m,l))et(p,m,l),p=e[--a],m=o[--h];else if(tt(d,m,l))et(d,m,l),lt(b,d.S,p.S.nextSibling),d=e[++r],m=o[--h];else if(tt(p,v,l))et(p,v,l),lt(b,p.S,d.S),p=e[--a],v=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===v.j){u=f;break}u>=0?(s=e[u],s.O!==v.O?i=K(e&&e[c],n,c):(et(s,v,l),e[u]=void 0,i=s.S),v=o[++c]):(i=K(e&&e[c],n,c),v=o[++c]),i&<(d.S.parentNode,i,d.S)}r>a?Q(t,null==o[h+1]?null:o[h+1].S,n,o,c,h):c>h&&X(e,r,a)})(o,l,e,i,n):null!==i?(null!==t.v&&(o.textContent=""),Q(o,null,e,i,0,i.length-1)):!n&&null!==l&&X(l,0,l.length-1),Z&&"svg"===s&&(Z=!1)):t.v!==r&&(o.data=r)},nt=t=>{t.m&&t.m.ref&&_.push((()=>t.m.ref(null))),t.$&&t.$.map(nt)},ot=(t,e)=>{J.push((()=>t(e)))},lt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),it=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},st=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);it(t,t.C);const n=()=>rt(t,e);if(!e)return O(n);queueMicrotask((()=>{n()}))},rt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.T.length&&t.T.forEach((t=>t(n))),l=ht(o,"componentWillLoad",void 0,n)):l=ht(o,"componentWillUpdate",void 0,n),l=ct(l,(()=>ht(o,"componentWillRender",void 0,n))),ct(l,(()=>ft(t,o,e)))},ct=(t,e)=>ut(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),ut=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ft=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=C(e),s=u.get(i);if(!f.document)return i;if(t=11===t.nodeType?t:f.document,s)if("string"==typeof s){let l,r=E.get(t=t.head||t);if(r||E.set(t,r=new Set),!r.has(i)){l=f.document.createElement("style"),l.textContent=s;const c=null!=(n=a.A)?n:k(f.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(p){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),h?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=E.get(t);if(e||E.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}h?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);at(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>dt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},at=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,i=t.L||A(null,null),s=(t=>t&&t.O===L)(e)?e:T(null,null,e);if(M=o.tagName,n&&s.m)for(const t of Object.keys(s.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.m[t]=o[t]);s.O=null,s.u|=4,t.L=s,s.S=i.S=o.shadowRoot||o,Y=!(!(1&l.u)||128&l.u),et(i,s,n),_.forEach((t=>t())),_.length=0,J.forEach((t=>t())),J.length=0})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},dt=t=>{const e=t.$hostElement$,n=t.i,o=t.C;ht(n,"componentDidRender",void 0,e),64&t.u?ht(n,"componentDidUpdate",void 0,e):(t.u|=64,vt(e),ht(n,"componentDidLoad",void 0,e),t.N(e),o||pt()),t.P(e),t.M&&(t.M(),t.M=void 0),512&t.u&&j((()=>st(t,!1))),t.u&=-517},pt=()=>{j((()=>H(f,"appload",{detail:{namespace:"phirepass-widgets"}})))},ht=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},vt=t=>t.classList.add("hydrated"),mt=(t,e)=>o(t).l.get(e),bt=(t,e,n,l)=>{const i=o(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.l.get(e),u=i.u,f=i.i;if(n=P(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.l.set(e,n),l.R){const t=l.R[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(f?f[o](n,c,e):i.T.push((()=>{i.i[o](n,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||st(i,!1)}}},yt=(e,n,l)=>{var i,s;const r=e.prototype;{e.watchers&&!n.R&&(n.R=N(e.watchers)),e.deserializers&&!n.D&&(n.D=e.deserializers),e.serializers&&!n.H&&(n.H=e.serializers);const c=Object.entries(null!=(i=n.t)?i:{});if(c.map((([e,[i]])=>{if(31&i||2&l&&32&i){const{get:s,set:c}=t(r,e)||{};s&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!s)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return mt(this,e);const t=o(this);return t?t.i?t.i[e]:mt(this,e):r[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=o(this);if(s){if(c)return void 0===(32&i?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),c.call(this,P(t,i)),void bt(this,e,t=32&i?this[e]:s.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return void bt(this,e,t,n);const o=P(t,i);if(s.i){const t=s.i[e];!s.l.get(e)&&t&&s.l.set(e,t),s.i[e]=o,bt(this,e,s.i[e],n)}else s.l.set(e,o)}}}})}else 1&l&&64&i&&Object.defineProperty(r,e,{value(...t){var n;const l=o(this);return null==(n=null==l?void 0:l.U)?void 0:n.then((()=>{var n;return null==(n=l.i)?void 0:n[e](...t)}))}})})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,i){a.jmp((()=>{var s;const u=t.get(e),f=o(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&i!==l){const o=f.i,r=null==(s=n.R)?void 0:s[e];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=(null==o?void 0:o[s])&&(128&t||1&r)&&o[s].call(o,i,l,e)}))}return}const a=c.find((([t])=>t===u)),d=4&(a?a[1][0]:0),p=d&&null===i&&void 0===this[u];d&&(i=null!==i&&"false"!==i);const h=Object.getOwnPropertyDescriptor(r,u);p||i===this[u]||null==i&&null==this[u]||h.get&&!h.set||(this[u]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.R)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},wt=async(t,e,n)=>{var o;let l;try{if(!(32&e.u)){if(e.u|=32,e.u&=-1025,n.W){const i=((t,e)=>{var n;const o=t.h.replace(/-/g,"_"),l=t.W;if(!l)return;const i=r.get(l);if(i)return i[o];const u=null!=(n=c.get(l))?n:0,f=[u>0?"s-retry="+u:"",""].filter(Boolean).join("&");
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
3
|
+
return import(`./${l}.entry.js${f?"?"+f:""}`).then((t=>(c.delete(l),r.set(l,t),t[o])),(t=>{c.set(l,u+1),s(t,e.$hostElement$)}))})(n,e);if(i&&"then"in i){const t=()=>{};l=await i,t()}else l=i;if(!l)throw e.u&=-33,e.F=(null!=(o=e.F)?o:0)+1,e.F<3&&(e.u|=1024),Error(`Constructor for "${n.h}#${e.V}" was not found`);l.isProxied||(n.R=N(l.watchers),n.H=l.serializers,n.D=l.deserializers,yt(l,n,2),l.isProxied=!0);const u=()=>{};e.u|=8;try{new l(e)}catch(e){s(e,t)}e.u&=-9,((t,e)=>{var n;const o=t.i;if(o)for(const[l,[i]]of Object.entries(null!=(n=e.t)?n:{}))if(4096&i&&t.l.has(l)){const e=t.l.get(l);o[l]!==e&&(o[l]=e)}})(e,n),e.u|=128,u(),$t(e.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=C(n);if(!u.has(e)){const o=()=>{};((t,e,n)=>{let o=u.get(t);p&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,u.set(t,o)})(e,t,!!(1&n.u)),o()}}}const i=e.C,f=()=>st(e,!0);i&&i["s-rc"]?i["s-rc"].push(f):f()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),!e.N||1024&e.u||e.N(t)}},$t=(t,e)=>{ht(t,"connectedCallback",void 0,e)},gt=(t,e)=>{ht(t,"disconnectedCallback",void 0,e||t)},jt=(t,e={})=>{var n;if(!f.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],i=e.exclude||[],s=f.customElements,r=f.document.head,c=r.querySelector("meta[charset]"),u=f.document.createElement("style"),d=[];let p,h=!0;if(Object.assign(a,e),a.p=new URL(e.resourcesUrl||"./",f.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,r;const c={u:e[0],h:e[1],t:e[2],q:e[3]};c.t=e[2],c.R=N(e[4]),c.H=null!=(n=e[5])?n:{},c.D=null!=(r=e[6])?r:{};const u=c.h,f=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,B:new Map};n.U=new Promise((t=>n.P=t)),n.G=new Promise((t=>n.N=t)),t["s-p"]=[],t["s-rc"]=[],n.T=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,c),1&c.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else S.call(t,c)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),p&&(clearTimeout(p),p=null),h?d.push(this):a.jmp((()=>(t=>{if(!(1&a.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?$t(e.i,t):1024&e.u?setTimeout((()=>wt(t,e,n)),1e3):(null==e?void 0:e.G)&&e.G.then((()=>$t(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){it(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),wt(t,e,n)}l()}})(this))))}disconnectedCallback(){a.jmp((()=>(async t=>{if(!(1&a.u)){const e=o(t);(null==e?void 0:e.i)?gt(e.i,t):(null==e?void 0:e.G)&&e.G.then((()=>gt(e.i,t)))}E.has(t)&&E.delete(t),t.shadowRoot&&E.has(t.shadowRoot)&&E.delete(t.shadowRoot)})(this))),j((()=>{var t,e;const n=o(this);if(!n)return;const l=d.findIndex((t=>t===this));l>-1&&d.splice(l,1),!1===(null==(e=null==(t=n.L)?void 0:t.S)?void 0:e.isConnected)&&delete n.L.S}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.G}};c.W=t[0],i.includes(u)||s.get(u)||(l.push(u),s.define(u,yt(f,c,1)))}))})),l.length>0&&(u.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(n=a.A)?n:k(f.document);null!=t&&u.setAttribute("nonce",t),r.insertBefore(u,c?c.nextSibling:r.firstChild)}h=!1,d.length?d.map((t=>t.connectedCallback())):a.jmp((()=>p=setTimeout(pt,30)))},Ot=t=>a.A=t;export{L as H,jt as b,D as c,R as g,T as h,d as p,l as r,Ot as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class t{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,s.unregister(this),t}free(){const t=this.__destroy_into_raw();T.__wbg_channel_free(t,0)}authenticate(t,n,e){const r=+(y(e)?Number.MAX_SAFE_INTEGER:e>>>0);let c,o,i,s;try{c=v(t,T.__wbindgen_export,T.__wbindgen_export2),o=F,i=v(n,T.__wbindgen_export,T.__wbindgen_export2),s=F}catch(t){throw i&&T.__wbindgen_export3(i,1*s,1),c&&T.__wbindgen_export3(c,1*o,1),t}T.channel_authenticate(this.__wbg_ptr,c,o,i,s,r)}connect(){T.channel_connect(this.__wbg_ptr)}create_service(t,n,e,r,c,o,i,s,_){const u=+c,a=+(y(_)?Number.MAX_SAFE_INTEGER:_>>>0);let f,b,l,d,h,w,g,p,m,R,A,N,S,O;try{f=v(t,T.__wbindgen_export,T.__wbindgen_export2),b=F,l=v(n,T.__wbindgen_export,T.__wbindgen_export2),d=F,h=y(e)?0:v(e,T.__wbindgen_export,T.__wbindgen_export2),w=F,g=v(r,T.__wbindgen_export,T.__wbindgen_export2),p=F,m=y(o)?0:v(o,T.__wbindgen_export,T.__wbindgen_export2),R=F,A=y(i)?0:v(i,T.__wbindgen_export,T.__wbindgen_export2),N=F,S=y(s)?0:v(s,T.__wbindgen_export,T.__wbindgen_export2),O=F}catch(t){throw S&&T.__wbindgen_export3(S,1*O,1),A&&T.__wbindgen_export3(A,1*N,1),m&&T.__wbindgen_export3(m,1*R,1),g&&T.__wbindgen_export3(g,1*p,1),h&&T.__wbindgen_export3(h,1*w,1),l&&T.__wbindgen_export3(l,1*d,1),f&&T.__wbindgen_export3(f,1*b,1),t}T.channel_create_service(this.__wbg_ptr,f,b,l,d,h,w,g,p,u,m,R,A,N,S,O,a)}delete_service(t,n,e){const r=+(y(e)?Number.MAX_SAFE_INTEGER:e>>>0);let c,o,i,s;try{c=v(t,T.__wbindgen_export,T.__wbindgen_export2),o=F,i=v(n,T.__wbindgen_export,T.__wbindgen_export2),s=F}catch(t){throw i&&T.__wbindgen_export3(i,1*s,1),c&&T.__wbindgen_export3(c,1*o,1),t}T.channel_delete_service(this.__wbg_ptr,c,o,i,s,r)}disconnect(){T.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==T.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==T.channel_is_disconnected(this.__wbg_ptr)}constructor(t,n,e){let r,c,o,i,_,u;try{r=v(t,T.__wbindgen_export,T.__wbindgen_export2),c=F,o=v(n,T.__wbindgen_export,T.__wbindgen_export2),i=F,_=y(e)?0:v(e,T.__wbindgen_export,T.__wbindgen_export2),u=F}catch(t){throw _&&T.__wbindgen_export3(_,1*u,1),o&&T.__wbindgen_export3(o,1*i,1),r&&T.__wbindgen_export3(r,1*c,1),t}const a=T.channel_new(r,c,o,i,_,u);return this.__wbg_ptr=a,s.register(this,this.__wbg_ptr,this),this}on_connection_close(t){T.channel_on_connection_close(this.__wbg_ptr,y(t)?0:_(t))}on_connection_error(t){T.channel_on_connection_error(this.__wbg_ptr,y(t)?0:_(t))}on_connection_message(t){T.channel_on_connection_message(this.__wbg_ptr,y(t)?0:_(t))}on_connection_open(t){T.channel_on_connection_open(this.__wbg_ptr,y(t)?0:_(t))}on_protocol_message(t){T.channel_on_protocol_message(this.__wbg_ptr,y(t)?0:_(t))}on_protocol_message_type(t,n){const e=v(t,T.__wbindgen_export,T.__wbindgen_export2);T.channel_on_protocol_message_type(this.__wbg_ptr,e,F,y(n)?0:_(n))}open_rdp_tunnel(t,n,e,r,c){const o=+(y(c)?Number.MAX_SAFE_INTEGER:c>>>0);let i,s,_,u,a,f,b,l;try{i=v(t,T.__wbindgen_export,T.__wbindgen_export2),s=F,_=v(n,T.__wbindgen_export,T.__wbindgen_export2),u=F,a=y(e)?0:v(e,T.__wbindgen_export,T.__wbindgen_export2),f=F,b=y(r)?0:v(r,T.__wbindgen_export,T.__wbindgen_export2),l=F}catch(t){throw b&&T.__wbindgen_export3(b,1*l,1),a&&T.__wbindgen_export3(a,1*f,1),_&&T.__wbindgen_export3(_,1*u,1),i&&T.__wbindgen_export3(i,1*s,1),t}T.channel_open_rdp_tunnel(this.__wbg_ptr,i,s,_,u,a,f,b,l,o)}open_sftp_tunnel(t,n,e,r,c){const o=+(y(c)?Number.MAX_SAFE_INTEGER:c>>>0);let i,s,_,u,a,f,b,l;try{i=v(t,T.__wbindgen_export,T.__wbindgen_export2),s=F,_=v(n,T.__wbindgen_export,T.__wbindgen_export2),u=F,a=y(e)?0:v(e,T.__wbindgen_export,T.__wbindgen_export2),f=F,b=y(r)?0:v(r,T.__wbindgen_export,T.__wbindgen_export2),l=F}catch(t){throw b&&T.__wbindgen_export3(b,1*l,1),a&&T.__wbindgen_export3(a,1*f,1),_&&T.__wbindgen_export3(_,1*u,1),i&&T.__wbindgen_export3(i,1*s,1),t}T.channel_open_sftp_tunnel(this.__wbg_ptr,i,s,_,u,a,f,b,l,o)}open_ssh_tunnel(t,n,e,r,c){const o=+(y(c)?Number.MAX_SAFE_INTEGER:c>>>0);let i,s,_,u,a,f,b,l;try{i=v(t,T.__wbindgen_export,T.__wbindgen_export2),s=F,_=v(n,T.__wbindgen_export,T.__wbindgen_export2),u=F,a=y(e)?0:v(e,T.__wbindgen_export,T.__wbindgen_export2),f=F,b=y(r)?0:v(r,T.__wbindgen_export,T.__wbindgen_export2),l=F}catch(t){throw b&&T.__wbindgen_export3(b,1*l,1),a&&T.__wbindgen_export3(a,1*f,1),_&&T.__wbindgen_export3(_,1*u,1),i&&T.__wbindgen_export3(i,1*s,1),t}T.channel_open_ssh_tunnel(this.__wbg_ptr,i,s,_,u,a,f,b,l,o)}send_sftp_chmod(t,n,e,r,c){const o=+n,i=+r,s=+(y(c)?Number.MAX_SAFE_INTEGER:c>>>0);let _,u,a,f;try{_=v(t,T.__wbindgen_export,T.__wbindgen_export2),u=F,a=v(e,T.__wbindgen_export,T.__wbindgen_export2),f=F}catch(t){throw a&&T.__wbindgen_export3(a,1*f,1),_&&T.__wbindgen_export3(_,1*u,1),t}T.channel_send_sftp_chmod(this.__wbg_ptr,_,u,o,a,f,i,s)}send_sftp_delete(t,n,e,r,c){const o=+n,i=+(y(c)?Number.MAX_SAFE_INTEGER:c>>>0);let s,_,u,a,f,b;try{s=v(t,T.__wbindgen_export,T.__wbindgen_export2),_=F,u=v(e,T.__wbindgen_export,T.__wbindgen_export2),a=F,f=v(r,T.__wbindgen_export,T.__wbindgen_export2),b=F}catch(t){throw f&&T.__wbindgen_export3(f,1*b,1),u&&T.__wbindgen_export3(u,1*a,1),s&&T.__wbindgen_export3(s,1*_,1),t}T.channel_send_sftp_delete(this.__wbg_ptr,s,_,o,u,a,f,b,i)}send_sftp_download_ack(t,n,e,r){const c=+n,o=+e,i=+r,s=v(t,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_download_ack(this.__wbg_ptr,s,F,c,o,i)}send_sftp_download_chunk(t,n,e,r,c){const o=+n,i=+e,s=+r,_=+(y(c)?Number.MAX_SAFE_INTEGER:c>>>0),u=v(t,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_download_chunk(this.__wbg_ptr,u,F,o,i,s,_)}send_sftp_download_start(t,n,e,r,c){const o=+n,i=+(y(c)?Number.MAX_SAFE_INTEGER:c>>>0);let s,_,u,a,f,b;try{s=v(t,T.__wbindgen_export,T.__wbindgen_export2),_=F,u=v(e,T.__wbindgen_export,T.__wbindgen_export2),a=F,f=v(r,T.__wbindgen_export,T.__wbindgen_export2),b=F}catch(t){throw f&&T.__wbindgen_export3(f,1*b,1),u&&T.__wbindgen_export3(u,1*a,1),s&&T.__wbindgen_export3(s,1*_,1),t}T.channel_send_sftp_download_start(this.__wbg_ptr,s,_,o,u,a,f,b,i)}send_sftp_list_data(t,n,e,r){const c=+n,o=+(y(r)?Number.MAX_SAFE_INTEGER:r>>>0);let i,s,_,u;try{i=v(t,T.__wbindgen_export,T.__wbindgen_export2),s=F,_=v(e,T.__wbindgen_export,T.__wbindgen_export2),u=F}catch(t){throw _&&T.__wbindgen_export3(_,1*u,1),i&&T.__wbindgen_export3(i,1*s,1),t}T.channel_send_sftp_list_data(this.__wbg_ptr,i,s,c,_,u,o)}send_sftp_mkdir(t,n,e,r){const c=+n,o=+(y(r)?Number.MAX_SAFE_INTEGER:r>>>0);let i,s,_,u;try{i=v(t,T.__wbindgen_export,T.__wbindgen_export2),s=F,_=v(e,T.__wbindgen_export,T.__wbindgen_export2),u=F}catch(t){throw _&&T.__wbindgen_export3(_,1*u,1),i&&T.__wbindgen_export3(i,1*s,1),t}T.channel_send_sftp_mkdir(this.__wbg_ptr,i,s,c,_,u,o)}send_sftp_read_file(t,n,e,r){const c=+n,o=+(y(r)?Number.MAX_SAFE_INTEGER:r>>>0);let i,s,_,u;try{i=v(t,T.__wbindgen_export,T.__wbindgen_export2),s=F,_=v(e,T.__wbindgen_export,T.__wbindgen_export2),u=F}catch(t){throw _&&T.__wbindgen_export3(_,1*u,1),i&&T.__wbindgen_export3(i,1*s,1),t}T.channel_send_sftp_read_file(this.__wbg_ptr,i,s,c,_,u,o)}send_sftp_remove(t,n,e,r,c){const o=+n,i=+r,s=+(y(c)?Number.MAX_SAFE_INTEGER:c>>>0);let _,u,a,f;try{_=v(t,T.__wbindgen_export,T.__wbindgen_export2),u=F,a=v(e,T.__wbindgen_export,T.__wbindgen_export2),f=F}catch(t){throw a&&T.__wbindgen_export3(a,1*f,1),_&&T.__wbindgen_export3(_,1*u,1),t}T.channel_send_sftp_remove(this.__wbg_ptr,_,u,o,a,f,i,s)}send_sftp_rename(t,n,e,r,c){const o=+n,i=+(y(c)?Number.MAX_SAFE_INTEGER:c>>>0);let s,_,u,a,f,b;try{s=v(t,T.__wbindgen_export,T.__wbindgen_export2),_=F,u=v(e,T.__wbindgen_export,T.__wbindgen_export2),a=F,f=v(r,T.__wbindgen_export,T.__wbindgen_export2),b=F}catch(t){throw f&&T.__wbindgen_export3(f,1*b,1),u&&T.__wbindgen_export3(u,1*a,1),s&&T.__wbindgen_export3(s,1*_,1),t}T.channel_send_sftp_rename(this.__wbg_ptr,s,_,o,u,a,f,b,i)}send_sftp_upload_chunk(t,n,e,r,c,o,i){const s=+n,_=+e,u=+r,a=+c,f=+(y(i)?Number.MAX_SAFE_INTEGER:i>>>0);let b,l,d,h;try{b=v(t,T.__wbindgen_export,T.__wbindgen_export2),l=F,d=m(o,T.__wbindgen_export),h=F}catch(t){throw d&&T.__wbindgen_export3(d,1*h,1),b&&T.__wbindgen_export3(b,1*l,1),t}T.channel_send_sftp_upload_chunk(this.__wbg_ptr,b,l,s,_,u,a,d,h,f)}send_sftp_upload_start(t,n,e,r,c,o,i){const s=+n,_=+c,u=BigInt.asIntN(64,o),a=+(y(i)?Number.MAX_SAFE_INTEGER:i>>>0);let f,b,l,d,h,w;try{f=v(t,T.__wbindgen_export,T.__wbindgen_export2),b=F,l=v(e,T.__wbindgen_export,T.__wbindgen_export2),d=F,h=v(r,T.__wbindgen_export,T.__wbindgen_export2),w=F}catch(t){throw h&&T.__wbindgen_export3(h,1*w,1),l&&T.__wbindgen_export3(l,1*d,1),f&&T.__wbindgen_export3(f,1*b,1),t}T.channel_send_sftp_upload_start(this.__wbg_ptr,f,b,s,l,d,h,w,_,u,a)}send_sftp_write_file(t,n,e,r,c){const o=+n,i=+(y(c)?Number.MAX_SAFE_INTEGER:c>>>0);let s,_,u,a,f,b;try{s=v(t,T.__wbindgen_export,T.__wbindgen_export2),_=F,u=v(e,T.__wbindgen_export,T.__wbindgen_export2),a=F,f=m(r,T.__wbindgen_export),b=F}catch(t){throw f&&T.__wbindgen_export3(f,1*b,1),u&&T.__wbindgen_export3(u,1*a,1),s&&T.__wbindgen_export3(s,1*_,1),t}T.channel_send_sftp_write_file(this.__wbg_ptr,s,_,o,u,a,f,b,i)}send_ssh_terminal_resize(t,n,e,r,c,o){const i=+n,s=+e,_=+r,u=+c,a=+o,f=v(t,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_ssh_terminal_resize(this.__wbg_ptr,f,F,i,s,_,u,a)}send_ssh_tunnel_data(t,n,e){const r=+n;let c,o,i,s;try{c=v(t,T.__wbindgen_export,T.__wbindgen_export2),o=F,i=v(e,T.__wbindgen_export,T.__wbindgen_export2),s=F}catch(t){throw i&&T.__wbindgen_export3(i,1*s,1),c&&T.__wbindgen_export3(c,1*o,1),t}T.channel_send_ssh_tunnel_data(this.__wbg_ptr,c,o,r,i,s)}start_heartbeat(t){T.channel_start_heartbeat(this.__wbg_ptr,t)}stop_heartbeat(){T.channel_stop_heartbeat(this.__wbg_ptr)}update_service(t,n,e,r,c,o,i,s,_,u){const a=+o,f=+(y(u)?Number.MAX_SAFE_INTEGER:u>>>0);let b,l,d,h,w,g,p,m,R,A,N,S,O,P,U,j;try{b=v(t,T.__wbindgen_export,T.__wbindgen_export2),l=F,d=v(n,T.__wbindgen_export,T.__wbindgen_export2),h=F,w=v(e,T.__wbindgen_export,T.__wbindgen_export2),g=F,p=y(r)?0:v(r,T.__wbindgen_export,T.__wbindgen_export2),m=F,R=v(c,T.__wbindgen_export,T.__wbindgen_export2),A=F,N=y(i)?0:v(i,T.__wbindgen_export,T.__wbindgen_export2),S=F,O=y(s)?0:v(s,T.__wbindgen_export,T.__wbindgen_export2),P=F,U=y(_)?0:v(_,T.__wbindgen_export,T.__wbindgen_export2),j=F}catch(t){throw U&&T.__wbindgen_export3(U,1*j,1),O&&T.__wbindgen_export3(O,1*P,1),N&&T.__wbindgen_export3(N,1*S,1),R&&T.__wbindgen_export3(R,1*A,1),p&&T.__wbindgen_export3(p,1*m,1),w&&T.__wbindgen_export3(w,1*g,1),d&&T.__wbindgen_export3(d,1*h,1),b&&T.__wbindgen_export3(b,1*l,1),t}T.channel_update_service(this.__wbg_ptr,b,l,d,h,w,g,p,m,R,A,a,N,S,O,P,U,j,f)}}Symbol.dispose&&(t.prototype[Symbol.dispose]=t.prototype.free);const n=Object.freeze({Generic:0,0:"Generic",Authentication:10,10:"Authentication",RequiresUsername:100,100:"RequiresUsername",RequiresPassword:110,110:"RequiresPassword",RequiresUsernamePassword:120,120:"RequiresUsernamePassword"});function e(t,n){T.__wasm_bindgen_func_elem_67(t,n)}function r(t,n,e){T.__wasm_bindgen_func_elem_63(t,n,e)}function c(t,n,e){T.__wasm_bindgen_func_elem_63_37(t,n,e)}function o(t,n,e){T.__wasm_bindgen_func_elem_63_38(t,n,e)}const i=["blob","arraybuffer"],s="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>T.__wbg_channel_free(t,1)));function _(t){const n=T.__wbindgen_export5();return T.__wbindgen_externrefs.set(n,t),n}const u="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((t=>T.__wbindgen_export6(t.a,t.b)));function a(t){switch(typeof t){case"number":case"boolean":case"undefined":return`${t}`;case"string":return JSON.stringify(t);case"bigint":return`${t}n`;case"symbol":return void 0!==t.description?`Symbol(${t.description})`:"Symbol";case"function":return"string"==typeof t.name&&""!==t.name?`Function(${t.name})`:"Function";case"object":{if(null===t)return"null";if(Array.isArray(t))return"["+Array.from(t,a).join(", ")+"]";if(t instanceof Error)return`${t.name}: ${t.message}\n${t.stack}`;const n=toString.call(t),e=/\[object ([^\]]+)\]/.exec(n)?.[1];if(void 0===e)return n;if("Object"===e)try{return"Object("+JSON.stringify(t)+")"}catch(t){return"Object"}return e}}}function f(t,n){return t>>>=0,w().subarray(t/1,t/1+n)}let b=null;function l(){return(null===b||!0===b.buffer.detached||void 0===b.buffer.detached&&b.buffer!==T.memory.buffer)&&(b=new DataView(T.memory.buffer)),b}function d(t,n){return t>>>=0,e=w().subarray(t,t+n),N+=e.length,N>=A&&(R=new TextDecoder("utf-8",{ignoreBOM:!0}),R.decode(),N=e.length),R.decode(e);var e}let h=null;function w(){return null!==h&&0!==h.byteLength||(h=new Uint8Array(T.memory.buffer)),h}function g(t,n){try{return t.apply(this,n)}catch(t){const n=_(t);T.__wbindgen_export4(n)}}function y(t){return null==t}function p(t,n,e){const r={a:t,b:n,cnt:1},c=(...t)=>{r.cnt++;const n=r.a;r.a=0;try{return e(n,r.b,...t)}finally{r.a=n,c._wbg_cb_unref()}};return c._wbg_cb_unref=()=>{0==--r.cnt&&(T.__wbindgen_export6(r.a,r.b),r.a=0,u.unregister(r))},u.register(c,r,r),c}function m(t,n){const e=n(1*t.length,1)>>>0;return w().set(t,e/1),F=t.length,e}function v(t,n,e){if(void 0===e){const e=S.encode(t),r=n(e.length,1)>>>0;return w().subarray(r,r+e.length).set(e),F=e.length,r}let r=t.length,c=n(r,1)>>>0;const o=w();let i=0;for(;i<r;i++){const n=t.charCodeAt(i);if(n>127)break;o[c+i]=n}if(i!==r){0!==i&&(t=t.slice(i)),c=e(c,r,r=i+3*t.length,1)>>>0;const n=w().subarray(c+i,c+r);i+=S.encodeInto(t,n).written,c=e(c,r,i,1)>>>0}return F=i,c}let R=new TextDecoder("utf-8",{ignoreBOM:!0});R.decode();const A=2146435072;let N=0;const S=new TextEncoder;"encodeInto"in S||(S.encodeInto=function(t,n){const e=S.encode(t);return n.set(e),{read:t.length,written:e.length}});let T,O,F=0;async function P(t){return void 0!==T?T:(void 0===O&&(O=async function(t){void 0!==t&&(Object.getPrototypeOf(t)===Object.prototype?({module_or_path:t}=t):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===t&&(t=new URL("phirepass-channel_bg.wasm",import.meta.url));const n=function(){const t={__proto__:null,__wbg_Error_208446807d0d1e30:function(t,n){return Error(d(t,n))},__wbg_String_8564e559799eccda:function(t,n){const e=v(String(n),T.__wbindgen_export,T.__wbindgen_export2),r=F;l().setInt32(4+(t>>>0),r,!0),l().setInt32(0+(t>>>0),e,!0)},__wbg___wbindgen_debug_string_f249a2a76caa9a55:function(t,n){const e=v(a(n),T.__wbindgen_export,T.__wbindgen_export2),r=F;l().setInt32(4+(t>>>0),r,!0),l().setInt32(0+(t>>>0),e,!0)},__wbg___wbindgen_string_get_7ce8eee7fd327545:function(t,n){const e="string"==typeof n?n:void 0;var r=y(e)?0:v(e,T.__wbindgen_export,T.__wbindgen_export2),c=F;l().setInt32(4+(t>>>0),c,!0),l().setInt32(0+(t>>>0),r,!0)},__wbg___wbindgen_throw_4c88d8bf264fd984:function(t,n){throw new Error(d(t,n))},__wbg__wbg_cb_unref_09736879a3f67559:function(t){t._wbg_cb_unref()},__wbg_call_40b008ba32f73991:function(){return g((function(t,n){return t.call(n)}),arguments)},__wbg_call_a410eb4b59ed5965:function(){return g((function(t,n,e){return t.call(n,e)}),arguments)},__wbg_call_fc92fee6137d452d:function(){return g((function(t,n,e,r){return t.call(n,e,r)}),arguments)},__wbg_clearInterval_26ba580547547579:function(t){return clearInterval(t)},__wbg_close_5ee9c5fe4e8754a4:function(){return g((function(t){t.close()}),arguments)},__wbg_data_c7e5e8500f1bca2f:function(t){return t.data},__wbg_from_eac91875c8a5ffa4:function(t){return Array.from(t)},__wbg_getRandomValues_5d8c030b527203a6:function(){return g((function(t,n){globalThis.crypto.getRandomValues(f(t,n))}),arguments)},__wbg_get_2080c49015e35254:function(){return g((function(t,n){return Reflect.get(t,n)}),arguments)},__wbg_info_2b8ee6588e4c6072:function(t,n){console.info(d(t,n))},__wbg_instanceof_ArrayBuffer_12cdaa4161423e6b:function(t){let n;try{n=t instanceof ArrayBuffer}catch(t){n=!1}return n},__wbg_length_186163212ffe79c3:function(t){return t.length},__wbg_new_13de428334042d26:function(t){return new Uint8Array(t)},__wbg_new_37eb45aaf5eeb820:function(){return new Array},__wbg_new_cd4348290afae586:function(){return new Object},__wbg_new_with_str_sequence_75b26d88172889d0:function(){return g((function(t,n,e){return new WebSocket(d(t,n),e)}),arguments)},__wbg_prototypesetcall_13162965d1fe7aa3:function(t,n,e){Uint8Array.prototype.set.call(f(t,n),e)},__wbg_push_c9f4893fc209f768:function(t,n){return t.push(n)},__wbg_readyState_039bc047141a5f6d:function(t){return t.readyState},__wbg_send_d83d0891cf698779:function(){return g((function(t,n,e){t.send(f(n,e))}),arguments)},__wbg_setInterval_d933acbf2578adfa:function(){return g((function(t,n){return setInterval(t,n)}),arguments)},__wbg_set_binaryType_d5b4dafd0f127fb2:function(t,n){t.binaryType=i[n]},__wbg_set_d2d33b52458e984a:function(t,n,e){t[n>>>0]=e},__wbg_set_e4b9a833d288759a:function(t,n,e){t[n]=e},__wbg_set_onclose_078935cf8d0fb024:function(t,n){t.onclose=n},__wbg_set_onerror_f7f089f7f059501c:function(t,n){t.onerror=n},__wbg_set_onmessage_26abc49cfa5f9ffc:function(t,n){t.onmessage=n},__wbg_set_onopen_757be120cc7b1ea6:function(t,n){t.onopen=n},__wbg_warn_b0df9a9e7105e74b:function(t,n){console.warn(d(t,n))},__wbindgen_generic_0000000000000001:function(t,n){return p(t,n,r)},__wbindgen_generic_0000000000000002:function(t,n){return p(t,n,c)},__wbindgen_generic_0000000000000003:function(t,n){return p(t,n,o)},__wbindgen_generic_0000000000000004:function(t,n){return p(t,n,e)},__wbindgen_generic_0000000000000005:function(t){return t},__wbindgen_generic_0000000000000006:function(t,n){return f(t,n)},__wbindgen_generic_0000000000000007:function(t,n){return d(t,n)},__wbindgen_generic_0000000000000008:function(t){return BigInt.asUintN(64,t)},__wbindgen_init_externref_table:function(){const t=T.__wbindgen_externrefs;t.set(0,void 0),t.set(1024,void 0),t.set(1025,null),t.set(1026,!0),t.set(1027,!1)}};return{__proto__:null,"./phirepass-channel_bg.js":t}}();("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t));const{instance:s}=await async function(t,n){if("function"==typeof Response&&t instanceof Response){if(!t.ok)throw new Error(`failed to fetch Wasm: ${t.status} ${t.statusText} fetching '${t.url}'`);if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(t,n)}catch(n){if(!function(t){switch(t){case"basic":case"cors":case"default":return!0}return!1}(t.type)||"application/wasm"===t.headers.get("Content-Type"))throw n;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n)}const e=await t.arrayBuffer();return await WebAssembly.instantiate(e,n)}{const e=await WebAssembly.instantiate(t,n);return e instanceof WebAssembly.Instance?{instance:e,module:t}:e}}(await t,n);return function(t){return T=t.exports,b=null,h=null,T.__wbindgen_start(),T}(s)}(t),O.catch((()=>{O=void 0}))),O)}var U,j,k;!function(t){t.Error="Error",t.AuthSuccess="AuthSuccess",t.TunnelOpened="TunnelOpened",t.TunnelClosed="TunnelClosed",t.TunnelData="TunnelData",t.RDPAuthorized="RDPAuthorized",t.SFTPListItems="SFTPListItems",t.SFTPDownloadStartResponse="SFTPDownloadStartResponse",t.SFTPDownloadChunk="SFTPDownloadChunk",t.SFTPUploadStartResponse="SFTPUploadStartResponse",t.SFTPUploadChunkAck="SFTPUploadChunkAck",t.SFTPOpResult="SFTPOpResult"}(U||(U={})),function(t){t[t.Username=0]="Username",t[t.Password=1]="Password",t[t.Default=2]="Default"}(j||(j={})),function(t){t.Disconnected="disconnected",t.Connected="connected",t.Error="error"}(k||(k={}));export{t as C,n as E,j as I,U as P,P as _,k as a}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as a}from"./p-BVOulYtW.js";import{_ as s,E as o,C as r,a as n,P as d}from"./p-CsYQJXY2.js";const c=class{constructor(i){new.target===c&&t(this,i),this.maximizeEvent=e(this,"maximize"),this.connectionStateChanged=e(this,"connectionStateChanged")}channel;domReady=!1;runtimeReady=!1;connected=!1;uploadInputEl;msgId=1;activeUploadToken=0;pendingUploadStarts=new Map;pendingUploadAcks=new Map;pendingDownloadStarts=new Map;activeDownloads=new Map;activeDownloadMsgId;pendingOps=new Map;promptInputEl;editorPath="";editorTextEl;session_id;name="SFTP";description="Client";hideHeader=!1;serverHost="phirepass.com";serverPort=443;allowInsecure=!1;heartbeatInterval=3e4;nodeId;serviceId;token;onNodeIdChange(t,e){this.reset_session_state(),this.channel&&this.channel.is_connected()&&this.close_comms(),t&&(this.open_comms(),this.channel.connect(),this.status="Connecting...")}serverId;channelFactory;onServerIdChange(t,e){this.onNodeIdChange(this.nodeId,this.nodeId)}maximizeEvent;async maximize(){this.max=!this.max}async minimize(){this.max=!1}connectionStateChanged;max=!1;show_login_screen=!1;show_login_screen_username=!1;show_error=!1;error_message="";show_login_screen_password=!1;show_navigation=!1;breadcrumbs=[];current_dir=".";listing=[];show_content=!1;show_loader=!1;version="";status="Disconnected";selected_item=null;show_upload_modal=!1;upload_progress=0;upload_file_name="";upload_speed="--";upload_finished=!1;show_download_modal=!1;download_progress=0;download_file_name="";download_speed="--";download_finished=!1;show_delete_modal=!1;delete_file_name="";delete_loading=!1;delete_is_dir=!1;delete_recursive=!1;delete_error="";prompt_kind=null;prompt_value="";prompt_error="";prompt_busy=!1;chmod_target=null;chmod_mode=0;chmod_error="";chmod_busy=!1;show_editor=!1;editor_name="";editor_text="";editor_saved_text="";editor_busy="";editor_error="";editor_confirm_discard=!1;editor_loaded=!1;filter="";sort_key="name";sort_asc=!0;toggle_max(){this.maximizeEvent?.emit(!this.max)}async connectedCallback(){this.channelFactory||await s(),this.open_comms(),this.runtimeReady=!0,this.nodeId?this.try_connect():console.warn("Prop node_id is not set. Cannot connect to terminal.")}componentDidLoad(){this.domReady=!0,this.try_connect()}async disconnectedCallback(){this.connected=!1,this.domReady=!1,this.runtimeReady=!1,this.cancel_active_upload(),this.cancel_active_download(),this.clear_pending_operations(),this.close_comms()}next_msg_id(){const t=this.msgId;return this.msgId+=1,t}clear_pending_operations(){this.pendingUploadStarts.forEach((t=>{window.clearTimeout(t.timeout),t.reject(new Error("Upload start aborted"))})),this.pendingUploadStarts.clear(),this.pendingUploadAcks.forEach((t=>{window.clearTimeout(t.timeout),t.reject(new Error("Upload chunk aborted"))})),this.pendingUploadAcks.clear(),this.pendingDownloadStarts.forEach((t=>{window.clearTimeout(t.timeout),t.reject(new Error("Download start aborted"))})),this.pendingDownloadStarts.clear(),this.pendingOps.forEach((t=>{window.clearTimeout(t.timeout),t.reject(new Error(`Could not ${t.verb}: the session ended.`))})),this.pendingOps.clear(),this.activeDownloads.clear()}cancel_active_upload(){this.activeUploadToken+=1,this.upload_progress=0,this.upload_finished=!1,this.upload_speed="--"}cancel_active_download(){void 0!==this.activeDownloadMsgId&&this.activeDownloads.delete(this.activeDownloadMsgId),this.activeDownloadMsgId=void 0,this.download_progress=0,this.download_finished=!1,this.download_speed="--"}format_duration(t){if(!Number.isFinite(t)||t<0)return"--";if(t<60)return`${t.toFixed(0)}s`;const e=Math.floor(t/60),i=Math.floor(t%60);return e<60?`${e}m ${i}s`:`${Math.floor(e/60)}h ${e%60}m`}format_percent(t){return`${(Number.isFinite(t)?t:0).toFixed(2)}%`}format_transfer_rate(t){return!Number.isFinite(t)||t<=0?"--":`${this.format_size(t)}/s`}update_upload_progress(t,e,i){if(this.upload_progress=Math.max(0,Math.min(100,e>0?t/e*100:0)),t>=e)return this.upload_finished=!0,void(this.upload_speed="--");const a=(performance.now()-i)/1e3,s=a>0?t/a:0;this.upload_speed=this.format_transfer_rate(s);const o=s>0?(e-t)/s:NaN;this.status=`Uploading ${this.format_size(t)} / ${this.format_size(e)} (ETA ${this.format_duration(o)})`}update_download_progress(t,e,i){if(this.download_progress=Math.max(0,Math.min(100,e>0?t/e*100:0)),t>=e)return this.download_finished=!0,void(this.download_speed="--");const a=(Date.now()-i)/1e3,s=a>0?t/a:0;this.download_speed=this.format_transfer_rate(s);const o=s>0?(e-t)/s:NaN;this.status=`Downloading ${this.format_size(t)} / ${this.format_size(e)} (ETA ${this.format_duration(o)})`}connect(){this.connected=!0,this.channel.connect(),this.status="Connecting..."}try_connect(){!this.connected&&this.domReady&&this.runtimeReady&&this.channel&&this.connect()}create_web_socket_endpoint(){const t=this.allowInsecure?"ws":"wss";return this.allowInsecure||443!==this.serverPort?this.allowInsecure&&80===this.serverPort?`${t}://${this.serverHost}`:`${t}://${this.serverHost}:${this.serverPort}`:`${t}://${this.serverHost}`}handle_error(t){if(void 0!==t.msg_id){const e=this.pendingUploadStarts.get(t.msg_id);e&&(window.clearTimeout(e.timeout),e.reject(new Error(t.message||"Upload start failed")),this.pendingUploadStarts.delete(t.msg_id));const i=this.pendingDownloadStarts.get(t.msg_id);i&&(window.clearTimeout(i.timeout),i.reject(new Error(t.message||"Download start failed")),this.pendingDownloadStarts.delete(t.msg_id)),this.activeDownloads.has(t.msg_id)&&(this.activeDownloads.delete(t.msg_id),this.activeDownloadMsgId===t.msg_id&&(this.activeDownloadMsgId=void 0),this.download_finished=!1);const a=this.pendingOps.get(t.msg_id);if(a)return window.clearTimeout(a.timeout),this.pendingOps.delete(t.msg_id),a.reject(new Error(t.message||`Could not ${a.verb}.`)),void(this.show_loader=!1)}switch(t.kind){case o.Generic:case o.Authentication:this.error_message=t.message||"An unknown error occurred.",this.show_error=!0;break;case o.RequiresUsername:this.show_login_screen_username=!0,this.show_login_screen_password=!1,this.show_login_screen=!0;break;case o.RequiresPassword:this.show_login_screen_username=!1,this.show_login_screen_password=!0,this.show_login_screen=!0;break;case o.RequiresUsernamePassword:this.show_login_screen_username=!0,this.show_login_screen_password=!0,this.show_login_screen=!0}setTimeout((()=>{this.show_loader=!1}),1e3)}handle_auth_success(t){this.clear_creds_buffer(),this.version=t.version,this.channel.start_heartbeat(this.heartbeatInterval<=15e3?3e4:this.heartbeatInterval),this.channel.open_sftp_tunnel(this.nodeId,this.serviceId),this.status="Connected"}handle_tunnel_opened(t){this.session_id=t.sid,this.channel.send_sftp_list_data(this.nodeId,this.session_id,this.current_dir)}handle_sftp_list_items(t){setTimeout((()=>{this.show_loader=!1}),500),t.path!==this.current_dir&&(this.filter=""),this.listing=t.dir.items,this.current_dir=t.path,this.breadcrumbs=t.path.split("/").map(((t,e,i)=>""===t&&0===e?{label:"/",path:"/"}:{label:t,path:i.slice(0,e+1).join("/")})),this.show_content=!0,this.show_navigation=!0,console.log("Received SFTP list items:",t)}handle_upload_start_response(t){if(void 0===t.msg_id)return;const e=this.pendingUploadStarts.get(t.msg_id);e&&(window.clearTimeout(e.timeout),e.resolve(t.response.upload_id),this.pendingUploadStarts.delete(t.msg_id))}handle_upload_chunk_ack(t){const e=`${t.upload_id}_${t.chunk_index}`,i=this.pendingUploadAcks.get(e);i&&(window.clearTimeout(i.timeout),i.resolve(),this.pendingUploadAcks.delete(e))}handle_download_start_response(t){if(void 0===t.msg_id)return;const e=this.pendingDownloadStarts.get(t.msg_id);e&&(window.clearTimeout(e.timeout),e.resolve({download_id:t.response.download_id,total_size:t.response.total_size,total_chunks:t.response.total_chunks}),this.pendingDownloadStarts.delete(t.msg_id))}finalize_download(t){const e=this.activeDownloads.get(t);if(!e)return;const i=Array.from(e.chunks.entries()).sort(((t,e)=>t[0]-e[0])).map((([,t])=>t)).map((t=>new Uint8Array(t))),a=new Blob(i,{type:"application/octet-stream"}),s=URL.createObjectURL(a),o=document.createElement("a");o.href=s,o.download=e.filename,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(s),this.activeDownloads.delete(t),this.activeDownloadMsgId===t&&(this.activeDownloadMsgId=void 0),this.download_finished=!0,this.status="Connected"}handle_download_chunk(t){if(void 0===t.msg_id)return;const e=this.activeDownloads.get(t.msg_id);if(!e||!this.session_id)return;const i=new Uint8Array(t.chunk.data);e.chunks.set(t.chunk.chunk_index,i);const a=Array.from(e.chunks.values()).reduce(((t,e)=>t+e.length),0);this.update_download_progress(a,e.total_size,e.startTime),this.channel.send_sftp_download_ack(this.nodeId,this.session_id,e.download_id,t.chunk.chunk_index),e.chunks.size>=e.total_chunks&&this.finalize_download(t.msg_id)}async start_download(t){if(!this.session_id)return;this.selected_item=t,this.download_file_name=t.name,this.download_progress=0,this.download_finished=!1,this.download_speed="--",this.show_download_modal=!0,this.show_error=!1;const e=this.next_msg_id();this.activeDownloadMsgId=e,this.activeDownloads.set(e,{filename:t.name,chunks:new Map,total_chunks:0,total_size:0,download_id:0,startTime:Date.now()});const i=new Promise(((t,i)=>{const a=window.setTimeout((()=>{this.pendingDownloadStarts.delete(e),i(new Error("Download start timeout"))}),1e4);this.pendingDownloadStarts.set(e,{timeout:a,resolve:t,reject:i})}));try{this.channel.send_sftp_download_start(this.nodeId,this.session_id,t.path,t.name,e);const{download_id:a,total_chunks:s,total_size:o}=await i,r=this.activeDownloads.get(e);if(!r)return;r.download_id=a,r.total_chunks=s,r.total_size=o}catch(t){this.activeDownloads.delete(e),this.activeDownloadMsgId===e&&(this.activeDownloadMsgId=void 0),this.show_error=!0,this.error_message=t instanceof Error?t.message:"Failed to start download",this.cancel_download()}}async upload_file(t){if(!this.session_id)return;const e=this.activeUploadToken+1;this.activeUploadToken=e,this.upload_file_name=t.name,this.upload_progress=0,this.upload_finished=!1,this.upload_speed="--",this.show_upload_modal=!0,this.show_error=!1,this.status="Uploading...";const i=65536,a=Math.max(1,Math.ceil(t.size/i)),s=this.next_msg_id(),o=new Promise(((t,e)=>{const i=window.setTimeout((()=>{this.pendingUploadStarts.delete(s),e(new Error("Upload start timeout"))}),1e4);this.pendingUploadStarts.set(s,{timeout:i,resolve:t,reject:e})}));try{this.channel.send_sftp_upload_start(this.nodeId,this.session_id,t.name,this.current_dir,a,BigInt(t.size),s);const r=await o;let n=0;const d=performance.now();for(let s=0;s<a;s+=1){if(e!==this.activeUploadToken)throw new Error("Upload cancelled");const a=s*i,o=Math.min(a+i,t.size),c=new Uint8Array(await t.slice(a,o).arrayBuffer());await new Promise(((t,e)=>{const i=`${r}_${s}`,a=window.setTimeout((()=>{this.pendingUploadAcks.delete(i),e(new Error(`Upload chunk ${s+1} timed out`))}),3e4);this.pendingUploadAcks.set(i,{timeout:a,resolve:t,reject:e}),this.channel.send_sftp_upload_chunk(this.nodeId,this.session_id,r,s,c.length,c,null)})),n+=c.length,this.update_upload_progress(n,t.size,d)}this.upload_progress=100,this.upload_finished=!0,this.status="Connected",this.refresh_directory()}catch(t){"Upload cancelled"!==t.message&&(this.show_error=!0,this.error_message=t instanceof Error?t.message:"Upload failed"),this.upload_finished=!1,this.status="Connected"}}handle_op_result(t){if(void 0===t.msg_id)return;const e=this.pendingOps.get(t.msg_id);e&&(window.clearTimeout(e.timeout),this.pendingOps.delete(t.msg_id),e.resolve(t.result))}run_op(t,e,i=3e4){if(!this.session_id)return Promise.reject(new Error("No active SFTP session."));const a=this.next_msg_id();return new Promise(((s,o)=>{const r=window.setTimeout((()=>{this.pendingOps.delete(a),o(new Error(`Timed out trying to ${t}. This node's agent may be too old to support it.`))}),i);this.pendingOps.set(a,{verb:t,timeout:r,resolve:s,reject:o});try{e(a)}catch(t){window.clearTimeout(r),this.pendingOps.delete(a),o(t instanceof Error?t:new Error(String(t)))}}))}error_text(t){return t instanceof Error?t.message:String(t)}item_path(t){return this.join_path(t.path,t.name)}join_path(t,e){return t&&"/"!==t?t.endsWith("/")?`${t}${e}`:`${t}/${e}`:`/${e}`}invalid_name(t){return t?"."===t||".."===t?"That name is reserved.":t.includes("/")?'A name cannot contain "/".':t.includes("\0")?"A name cannot contain a null byte.":"":"Enter a name."}handle_tunnel_data(t){console.log("received tunnel data:",t)}handle_tunnel_closed(t){this.clear_creds_buffer(),this.close_comms()}open_comms(){const t=`${this.create_web_socket_endpoint()}/api/web/ws`;this.channel=this.channelFactory?this.channelFactory(t,this.nodeId,this.serverId||void 0):this.serverId?new r(t,this.nodeId,this.serverId):new r(t,this.nodeId),this.channel.on_connection_open((()=>{this.connectionStateChanged.emit([n.Connected]),this.channel.authenticate(this.token,this.nodeId),this.status="Authenticating..."})),this.channel.on_connection_close((()=>{this.connectionStateChanged.emit([n.Disconnected]),this.status="Disconnected"})),this.channel.on_connection_error((t=>{this.connectionStateChanged.emit([n.Error,t]),this.status="Error "+t.message})),this.channel.on_connection_message((()=>{})),this.channel.on_protocol_message((t=>{const{web:e}=t.data;switch(e.type){case d.Error:this.handle_error(e);break;case d.AuthSuccess:this.handle_auth_success(e);break;case d.TunnelOpened:this.handle_tunnel_opened(e);break;case d.TunnelClosed:this.handle_tunnel_closed(e);break;case d.TunnelData:this.handle_tunnel_data(e);break;case d.SFTPListItems:this.handle_sftp_list_items(e);break;case d.SFTPUploadStartResponse:this.handle_upload_start_response(e);break;case d.SFTPUploadChunkAck:this.handle_upload_chunk_ack(e);break;case d.SFTPDownloadStartResponse:this.handle_download_start_response(e);break;case d.SFTPDownloadChunk:this.handle_download_chunk(e);break;case d.SFTPOpResult:this.handle_op_result(e);break;default:console.warn("Unhandled protocol message type:",e)}}))}close_comms(){this.cancel_active_upload(),this.cancel_active_download(),this.clear_pending_operations(),this.channel&&(this.channel.stop_heartbeat(),this.channel.disconnect())}clear_creds_buffer(){}reset_session_state(){this.clear_creds_buffer()}list_breadcrumb(t){this.show_loader=!0,this.selected_item=null,this.channel.send_sftp_list_data(this.nodeId,this.session_id,t)}go_to_parent_directory(){this.session_id&&"/"!==this.current_dir&&this.list_breadcrumb(this.breadcrumbs[this.breadcrumbs.length-2]?.path||"/")}refresh_directory(){this.session_id&&this.list_breadcrumb(this.current_dir)}disconnect_session(){this.close_comms(),this.session_id=void 0,this.show_loader=!1,this.show_content=!1,this.breadcrumbs=[],this.current_dir=".",this.listing=[],this.show_navigation=!1,this.show_login_screen_username=!1,this.show_login_screen_password=!1,this.show_login_screen=!1,this.show_upload_modal=!1,this.show_download_modal=!1,this.show_delete_modal=!1,this.upload_progress=0,this.download_progress=0,this.upload_finished=!1,this.download_finished=!1,this.delete_loading=!1,this.delete_file_name="",this.delete_error="",this.delete_is_dir=!1,this.delete_recursive=!1,this.prompt_kind=null,this.prompt_value="",this.prompt_error="",this.prompt_busy=!1,this.chmod_target=null,this.chmod_error="",this.chmod_busy=!1,this.show_editor=!1,this.editor_busy="",this.editor_error="",this.editor_confirm_discard=!1,this.editor_loaded=!1,this.filter="",this.version="",this.status="Disconnected"}on_file_row_action(t,e){e.preventDefault(),e.stopPropagation(),"File"===t.kind&&this.start_download(t)}on_file_delete_action(t,e){e.preventDefault(),e.stopPropagation(),this.selected_item=t,this.delete_file_name=t.name,this.delete_is_dir="Folder"===t.kind,this.delete_recursive=!1,this.delete_error="",this.delete_loading=!1,this.show_delete_modal=!0}cancel_delete(){this.delete_loading||(this.show_delete_modal=!1,this.delete_file_name="",this.delete_error="",this.delete_is_dir=!1,this.delete_recursive=!1)}async confirm_delete(){if(this.delete_loading)return;const t=this.selected_item;if(!this.session_id||!t)return void(this.show_delete_modal=!1);const e=this.item_path(t),i=this.delete_is_dir&&this.delete_recursive;this.delete_loading=!0,this.delete_error="",this.show_error=!1,this.status=`Deleting ${t.name}...`;try{await this.run_op("delete",(t=>this.channel.send_sftp_remove(this.nodeId,this.session_id,e,i,t)),i?3e5:3e4),this.delete_loading=!1,this.show_delete_modal=!1,this.delete_file_name="",this.delete_is_dir=!1,this.delete_recursive=!1,this.status="Connected",this.refresh_directory()}catch(t){this.delete_loading=!1,this.delete_error=this.error_text(t),this.status="Connected"}}open_mkdir(){this.session_id&&(this.prompt_kind="mkdir",this.prompt_value="",this.prompt_error="",this.prompt_busy=!1)}on_rename_action(t,e){e.preventDefault(),e.stopPropagation(),this.session_id&&(this.selected_item=t,this.prompt_kind="rename",this.prompt_value=t.name,this.prompt_error="",this.prompt_busy=!1)}close_prompt(){this.prompt_busy||(this.prompt_kind=null,this.prompt_value="",this.prompt_error="",this.promptInputEl=void 0)}async submit_prompt(){if(this.prompt_busy||!this.session_id)return;const t=this.prompt_kind,e=this.prompt_value.trim(),i=this.invalid_name(e);if(i)return void(this.prompt_error=i);const a=this.selected_item;if("rename"===t&&a&&e===a.name)this.close_prompt();else{this.prompt_busy=!0,this.prompt_error="",this.show_error=!1;try{if("mkdir"===t){const t=this.join_path(this.current_dir,e);this.status=`Creating ${e}...`,await this.run_op("create the folder",(e=>this.channel.send_sftp_mkdir(this.nodeId,this.session_id,t,e)))}else{if("rename"!==t||!a)return this.prompt_busy=!1,void this.close_prompt();{const t=this.item_path(a),i=this.join_path(a.path,e);this.status=`Renaming ${a.name}...`,await this.run_op("rename",(e=>this.channel.send_sftp_rename(this.nodeId,this.session_id,t,i,e)))}}this.prompt_busy=!1,this.prompt_kind=null,this.prompt_value="",this.promptInputEl=void 0,this.status="Connected",this.refresh_directory()}catch(t){this.prompt_busy=!1,this.prompt_error=this.error_text(t),this.status="Connected"}}}on_chmod_action(t,e){e.preventDefault(),e.stopPropagation(),this.session_id&&(this.selected_item=t,this.chmod_target=t,this.chmod_mode=4095&(t.attributes.permissions??0),this.chmod_error="",this.chmod_busy=!1)}close_chmod(){this.chmod_busy||(this.chmod_target=null,this.chmod_error="")}toggle_chmod_bit(t){this.chmod_busy||(this.chmod_mode=4095&(this.chmod_mode^t))}on_chmod_octal_input(t){const e=t.trim();/^[0-7]{1,4}$/.test(e)?(this.chmod_error="",this.chmod_mode=4095&parseInt(e,8)):this.chmod_error="Enter up to four octal digits, 0-7."}async submit_chmod(){const t=this.chmod_target;if(this.chmod_busy||!this.session_id||!t)return;const e=this.item_path(t),i=4095&this.chmod_mode;this.chmod_busy=!0,this.chmod_error="",this.show_error=!1,this.status=`Setting permissions on ${t.name}...`;try{await this.run_op("change permissions",(t=>this.channel.send_sftp_chmod(this.nodeId,this.session_id,e,i,t))),this.chmod_busy=!1,this.chmod_target=null,this.status="Connected",this.refresh_directory()}catch(t){this.chmod_busy=!1,this.chmod_error=this.error_text(t),this.status="Connected"}}async on_edit_action(t,e){if(e.preventDefault(),e.stopPropagation(),!this.session_id||"File"!==t.kind)return;const i=this.item_path(t);this.selected_item=t,this.show_editor=!0,this.editorPath=i,this.editor_name=t.name,this.editor_text="",this.editor_saved_text="",this.editor_error="",this.editor_confirm_discard=!1,this.editor_loaded=!1,this.editor_busy="loading",this.status=`Opening ${t.name}...`;try{const t=await this.run_op("open the file",(t=>this.channel.send_sftp_read_file(this.nodeId,this.session_id,i,t)),6e4);if("FileContents"!==t.result)throw new Error("The agent answered without any file contents.");const e=this.decode_text(t.contents instanceof Uint8Array?t.contents:new Uint8Array(t.contents));this.editor_text=e,this.editor_saved_text=e,this.editor_loaded=!0,this.editor_busy="",this.status="Connected"}catch(t){this.editor_busy="",this.editor_error=this.error_text(t),this.status="Connected"}}decode_text(t){if(t.includes(0))throw new Error("This looks like a binary file. Download it instead of editing it here.");try{return new TextDecoder("utf-8",{fatal:!0}).decode(t)}catch{throw new Error("This file is not valid UTF-8. Download it instead of editing it here.")}}editor_is_dirty(){return this.editor_loaded&&this.editor_text!==this.editor_saved_text}close_editor(t=!1){"saving"!==this.editor_busy&&(t||!this.editor_is_dirty()?(this.show_editor=!1,this.editor_confirm_discard=!1,this.editor_loaded=!1,this.editorPath="",this.editor_name="",this.editor_text="",this.editor_saved_text="",this.editor_error="",this.editor_busy="",this.editorTextEl=void 0):this.editor_confirm_discard=!0)}async save_editor(){if(this.editor_busy||!this.session_id||!this.editorPath)return;const t=this.editorPath,e=this.editor_text;this.editor_busy="saving",this.editor_error="",this.show_error=!1,this.status=`Saving ${this.editor_name}...`;try{await this.run_op("save the file",(i=>this.channel.send_sftp_write_file(this.nodeId,this.session_id,t,(new TextEncoder).encode(e),i)),6e4),this.editor_saved_text=e,this.editor_busy="",this.status="Connected",this.refresh_directory()}catch(t){this.editor_busy="",this.editor_error=this.error_text(t),this.status="Connected"}}toggle_sort(t){this.sort_key!==t?(this.sort_key=t,this.sort_asc=!0):this.sort_asc=!this.sort_asc}visible_listing(){const t=this.filter.trim().toLowerCase(),e=t?this.listing.filter((e=>e.name.toLowerCase().includes(t))):[...this.listing],i=this.sort_asc?1:-1;return e.sort(((t,e)=>{if(t.kind!==e.kind)return"Folder"===t.kind?-1:1;switch(this.sort_key){case"size":return i*((t.attributes.size??0)-(e.attributes.size??0));case"modified":return i*((t.attributes.modified??0)-(e.attributes.modified??0));default:return i*t.name.localeCompare(e.name,void 0,{numeric:!0,sensitivity:"base"})}}))}sort_indicator(t){return this.sort_key!==t?"":this.sort_asc?" ▲":" ▼"}on_listing_keydown(t){if(this.prompt_kind||this.chmod_target||this.show_editor||this.show_delete_modal)return;const e=this.selected_item;switch(t.key){case"Backspace":t.preventDefault(),this.go_to_parent_directory();break;case"F5":t.preventDefault(),this.refresh_directory();break;case"F2":e&&(t.preventDefault(),this.on_rename_action(e,t));break;case"Delete":e&&(t.preventDefault(),this.on_file_delete_action(e,t));break;case"Enter":e&&(t.preventDefault(),this.list_directory(e))}}on_modal_keydown(t,e){"Escape"===t.key&&(t.preventDefault(),t.stopPropagation(),e())}focus_once(t,e,i){t&&t!==e&&(i(t),requestAnimationFrame((()=>t.focus())))}open_upload_picker(){this.uploadInputEl?.click()}on_upload_selected(t){const e=t.target,i=e.files?.[0];i&&(this.upload_file(i),e.value="")}cancel_upload(){this.cancel_active_upload(),this.show_upload_modal=!1,this.upload_file_name="",this.upload_speed="--",this.status="Connected",this.refresh_directory()}cancel_download(){this.cancel_active_download(),this.show_download_modal=!1,this.download_file_name="",this.download_speed="--",this.status="Connected",this.refresh_directory()}is_selected(t){return!!this.selected_item&&this.selected_item.path===t.path&&this.selected_item.name===t.name}list_directory(t){if(!this.session_id)return void console.warn("No active session. Cannot list directory.");if("File"===t.kind)return console.warn("Cannot list directory of a file. Ignoring click."),void(this.selected_item=t);const e=this.item_path(t);e!==this.current_dir?(this.show_loader=!0,this.selected_item=null,this.channel.send_sftp_list_data(this.nodeId,this.session_id,e)):console.warn("Already in this directory. Ignoring click.")}format_size(t){if(void 0===t||Number.isNaN(t))return"-";if(t<1024)return`${t} B`;const e=["KB","MB","GB","TB","PB"];let i=t,a=-1;for(;i>=1024&&a<e.length-1;)i/=1024,a+=1;return`${i.toFixed(i>=10?1:2)} ${e[a]}`}mode_type_to_char(t,e){switch(61440&t){case 49152:return"s";case 40960:return"l";case 32768:return"-";case 24576:return"b";case 16384:return"d";case 8192:return"c";case 4096:return"p";default:return"Folder"===e?"d":"-"}}format_permissions(t,e){if(null==t)return"-";if("string"==typeof t){const i=t.trim();if(/^[bcdlps-][rwxStTs-]{9}$/.test(i))return i;if(/^[0-7]{3,4}$/.test(i)){const t=parseInt(i,8);return this.format_permissions(t,e)}if(/^\d+$/.test(i)){const t=parseInt(i,10);return this.format_permissions(t,e)}return i||"-"}const i=t,a=this.mode_type_to_char(i,e),s=[256&i?"r":"-",128&i?"w":"-",64&i?"x":"-",32&i?"r":"-",16&i?"w":"-",8&i?"x":"-",4&i?"r":"-",2&i?"w":"-",1&i?"x":"-"];return 2048&i&&(s[2]="x"===s[2]?"s":"S"),1024&i&&(s[5]="x"===s[5]?"s":"S"),512&i&&(s[8]="x"===s[8]?"t":"T"),`${a}${s.join("")}`}render(){return i(a,{key:"9e2edc1a72c3a74b26feea2faa08b9f0a2e37a0c",class:{default:!this.max,max:this.max}},i("section",{key:"72fae8227792615a5452f9b01ec8230c2c10e2a9",class:"listing"},!this.hideHeader&&i("header",{key:"14632fcb4575678418132892308cfea1903fadab"},i("section",{key:"3ea3fb2cab9d4cdf36af3876235579562a7acbef",class:"title"},i("img",{key:"fd0badaae9b0d7b426ddece5faf7ea3515e9bbf0",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10ZXJtaW5hbCB3LTMuNSBoLTMuNSB0ZXh0LXByaW1hcnkiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iNCAxNyAxMCAxMSA0IDUiPjwvcG9seWxpbmU+CiAgICA8bGluZSB4MT0iMTIiIHgyPSIyMCIgeTE9IjE5IiB5Mj0iMTkiPjwvbGluZT4KPC9zdmc+Cg==",alt:"SFTP Client"}),i("div",{key:"4eece24a618c119861f5435eb3f1ae8a5bae4966",class:"text"},i("div",{key:"84b45196e1a1609451413cf8ea369b60cd7f5ec6",class:"name"},this.name),i("div",{key:"45da97e659ecbaa69e74d1789a1b7961b760a753",class:"description"},this.description))),i("section",{key:"9177dcc02b911e95870c5f55fc48f741895a0b75",class:"actions"},i("div",{key:"468f341eebf7569c2a1c4aeea09d56644e5b6161",class:"action",onClick:()=>this.toggle_max()},i("img",{key:"203b54e42cddc50bf068a49fa7f88c846ecaa2c9",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTE1LCAxMjMsIDE0MCkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtbWF4aW1pemUyIHctMyBoLTMiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iMTUgMyAyMSAzIDIxIDkiPjwvcG9seWxpbmU+CiAgICA8cG9seWxpbmUgcG9pbnRzPSI5IDIxIDMgMjEgMyAxNSI+PC9wb2x5bGluZT4KICAgIDxsaW5lIHgxPSIyMSIgeDI9IjE0IiB5MT0iMyIgeTI9IjEwIj48L2xpbmU+CiAgICA8bGluZSB4MT0iMyIgeDI9IjEwIiB5MT0iMjEiIHkyPSIxNCI+PC9saW5lPgo8L3N2Zz4K",alt:"Maximize"})))),i("main",{key:"c0f757aaa07734199228e3dc520c98694bc6548d"},this.show_navigation&&i("nav",{key:"295440219080af5fa33566300fb1036998da399c",class:"navigation"},i("div",{key:"c9b63f04de675559d2e2bbb876115c63e00bfbd2",class:"breadcrumbs"},this.breadcrumbs.map(((t,e,a)=>i("span",{key:e,class:"breadcrumb-container"},i("span",{key:e,onClick:()=>this.list_breadcrumb(t.path),class:"breadcrumb"},t.label),e<a.length-1&&i("img",{class:"arrow",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTg5LCAyMTksIDIwOSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogICAgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIKICAgIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tcmlnaHQgdy0zIGgtMyB0ZXh0LW11dGVkLWZvcmVncm91bmQvNTAgc2hyaW5rLTAiPgogICAgPHBhdGggZD0ibTkgMTggNi02LTYtNiI+PC9wYXRoPgo8L3N2Zz4K"}))))),i("section",{key:"325ccd4be07d61df1e16956b5818683feb70c52f",class:"actions","aria-label":"SFTP actions"},i("input",{key:"f75b4191b0718bd2234497b7168af9dc13a070d6",class:"filter",type:"search",autocorrect:"off",autocapitalize:"none",autoComplete:"off",placeholder:"Filter","aria-label":"Filter this directory",value:this.filter,onInput:t=>this.filter=t.target.value}),i("button",{key:"da64c4a88332d3efab6a6e03e8c16a8a1db96b43",type:"button",class:"action",onClick:()=>this.go_to_parent_directory(),title:"Go to parent directory","aria-label":"Go to parent directory"},i("img",{key:"309e0fdb89aa4d119a5193f1803ebdc117e55105",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTg5LCAyMTksIDIwOSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtYXJyb3ctdXAgdy0zLjUgaC0zLjUiPgogICAgPHBhdGggZD0ibTUgMTIgNy03IDcgNyI+PC9wYXRoPgogICAgPHBhdGggZD0iTTEyIDE5VjUiPjwvcGF0aD4KPC9zdmc+Cg==",alt:"Go up"})),i("button",{key:"5f451e50801f10b88a3436515d792b1015bf48bb",type:"button",class:"action",onClick:()=>this.refresh_directory(),title:"Refresh","aria-label":"Refresh"},i("img",{key:"aa673b81504e65e78043c328f94d3a9dd02f696a",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTg5LCAyMTksIDIwOSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtcmVmcmVzaC1jdyB3LTMuNSBoLTMuNSI+CiAgICA8cGF0aCBkPSJNMyAxMmE5IDkgMCAwIDEgOS05IDkuNzUgOS43NSAwIDAgMSA2Ljc0IDIuNzRMMjEgOCI+PC9wYXRoPgogICAgPHBhdGggZD0iTTIxIDN2NWgtNSI+PC9wYXRoPgogICAgPHBhdGggZD0iTTIxIDEyYTkgOSAwIDAgMS05IDkgOS43NSA5Ljc1IDAgMCAxLTYuNzQtMi43NEwzIDE2Ij48L3BhdGg+CiAgICA8cGF0aCBkPSJNOCAxNkgzdjUiPjwvcGF0aD4KPC9zdmc+Cg==",alt:"Refresh"})),i("button",{key:"963f5abf044c207f9e42babe9e029ac052521f36",type:"button",class:"action",onClick:()=>this.open_mkdir(),title:"New folder","aria-label":"New folder"},i("svg",{key:"d441f67a8b5d2944f95e934d60d680dc22ec7c6c",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("path",{key:"9eec6695289a71b135dee4751217cd4b4810a276",d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z"}),i("line",{key:"9a759bd7ac97c4e8ebf75c4d54e8f207999634c2",x1:"12",x2:"12",y1:"10",y2:"16"}),i("line",{key:"4591434cdbb6a7d3a1a0212409fe38e21e02a52e",x1:"9",x2:"15",y1:"13",y2:"13"}))),i("button",{key:"301d406858c2d9a4656a342b49e663e76a7f1970",type:"button",class:"action",onClick:()=>this.open_upload_picker(),title:"Upload","aria-label":"Upload"},i("img",{key:"36ff8480d3acf65282d6ef648349327eb3432237",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTg5LCAyMTksIDIwOSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtdXBsb2FkIHctMy41IGgtMy41Ij4KICAgIDxwYXRoIGQ9Ik0yMSAxNXY0YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0ydi00Ij48L3BhdGg+CiAgICA8cG9seWxpbmUgcG9pbnRzPSIxNyA4IDEyIDMgNyA4Ij48L3BvbHlsaW5lPgogICAgPGxpbmUgeDE9IjEyIiB4Mj0iMTIiIHkxPSIzIiB5Mj0iMTUiPjwvbGluZT4KPC9zdmc+Cg==",alt:"Upload"})),i("button",{key:"3fa19d5e17ef2e2a8fc926c8ba6994a4a30a1825",type:"button",class:"action disconnect",onClick:()=>this.disconnect_session(),title:"Disconnect","aria-label":"Disconnect"},"DISCONNECT"))),i("input",{key:"f5cf6cc13d4b760b538d630467972c8add2df490",type:"file",ref:t=>this.uploadInputEl=t,onChange:t=>this.on_upload_selected(t),style:{display:"none"}}),this.show_content&&i("div",{key:"d69a7009192adc292cf3ccf4de6a4f059b46fa0e",class:"content",tabindex:0,onKeyDown:t=>this.on_listing_keydown(t)},i("table",{key:"2f00d85024b3e4642925f488a34d228dd056a2ce"},i("thead",{key:"611091a29f97e218f5282e11c7c1accdc1be5732"},i("tr",{key:"5f0d04ff8a5009852af02472f4261b9a95733a3c"},i("th",{key:"6df9558b86b3d3161920d5f94e8df0cf47ee9c80",class:"sortable",onClick:()=>this.toggle_sort("name"),title:"Sort by name"},"Name",this.sort_indicator("name")),i("th",{key:"83384582ac59c07f65526cfc5fd1359b5a0cd912",class:"sortable",onClick:()=>this.toggle_sort("size"),title:"Sort by size"},"Size",this.sort_indicator("size")),i("th",{key:"cbc16eafd7fb17c9d79b5612502140bc9a16a3cb"},"Permissions"),i("th",{key:"25d802dd84a6cc3eda222d5a732e05010c405f31"},"Owner"),i("th",{key:"cf5f9df11baae69f664724c6a79df0a95a5189a8",class:"sortable",onClick:()=>this.toggle_sort("modified"),title:"Sort by modified date"},"Modified",this.sort_indicator("modified")),i("th",{key:"9c8b9515c81245656d89ea65ee091a70606c1a93",class:"action-col","aria-label":"Actions"}))),i("tbody",{key:"40f8ec5d38a0601af3520891c4a9d35b2da2c32f"},this.visible_listing().map(((t,e)=>i("tr",{key:e,class:{selected:this.is_selected(t)},onClick:()=>this.list_directory(t)},i("td",null,i("img","Folder"===t.kind?{class:"kind",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1mb2xkZXIgdy0zLjUgaC0zLjUgdGV4dC1wcmltYXJ5IHNocmluay0wIj4KICAgIDxwYXRoCiAgICAgICAgZD0iTTIwIDIwYTIgMiAwIDAgMCAyLTJWOGEyIDIgMCAwIDAtMi0yaC03LjlhMiAyIDAgMCAxLTEuNjktLjlMOS42IDMuOUEyIDIgMCAwIDAgNy45MyAzSDRhMiAyIDAgMCAwLTIgMnYxM2EyIDIgMCAwIDAgMiAyWiI+PC9wYXRoPgo8L3N2Zz4K",alt:"Folder"}:{class:"kind",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTE1LCAxMjMsIDE0MCkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtZmlsZSB3LTMuNSBoLTMuNSB0ZXh0LW11dGVkLWZvcmVncm91bmQgc2hyaW5rLTAiPgogICAgPHBhdGggZD0iTTE1IDJINmEyIDIgMCAwIDAtMiAydjE2YTIgMiAwIDAgMCAyIDJoMTJhMiAyIDAgMCAwIDItMlY3WiI+PC9wYXRoPgogICAgPHBhdGggZD0iTTE0IDJ2NGEyIDIgMCAwIDAgMiAyaDQiPjwvcGF0aD4KPC9zdmc+Cg==",alt:"File"}),i("span",{class:`name ${t.kind.toLowerCase()}`},t.name)),i("td",null,"Folder"===t.kind?"-":this.format_size(t.attributes.size)),i("td",null,this.format_permissions(t.attributes.permissions,t.kind)),i("td",null,t.attributes.user??"-"),i("td",null,new Date(1e3*t.attributes.modified).toLocaleString()),i("td",{class:"action-col"},i("div",{class:"file-actions"},"File"===t.kind&&i("button",{type:"button",class:"file-action",onClick:e=>this.on_edit_action(t,e),title:"Edit","aria-label":`Edit ${t.name}`},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),i("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z"}))),"File"===t.kind&&i("button",{type:"button",class:"file-action",onClick:e=>this.on_file_row_action(t,e),title:"Download","aria-label":`Download ${t.name}`},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),i("polyline",{points:"7 10 12 15 17 10"}),i("line",{x1:"12",x2:"12",y1:"15",y2:"3"}))),i("button",{type:"button",class:"file-action",onClick:e=>this.on_rename_action(t,e),title:"Rename","aria-label":`Rename ${t.name}`},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("path",{d:"M12 20h9"}),i("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"}))),i("button",{type:"button",class:"file-action",onClick:e=>this.on_chmod_action(t,e),title:"Permissions","aria-label":`Change permissions on ${t.name}`},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),i("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"}))),i("button",{type:"button",class:"file-action delete",onClick:e=>this.on_file_delete_action(t,e),title:"Delete","aria-label":`Delete ${t.name}`},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},i("polyline",{points:"3 6 5 6 21 6"}),i("path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),i("path",{d:"M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"}),i("line",{x1:"10",x2:"10",y1:"11",y2:"17"}),i("line",{x1:"14",x2:"14",y1:"11",y2:"17"})))))))),0===this.visible_listing().length&&i("tr",{key:"46a173ad6542c9ab315da2792ea9830f0086b683",class:"empty"},i("td",{key:"986924de123f9be62f89f869fca02cd195134080",colSpan:6},this.filter?`Nothing here matches "${this.filter}".`:"This directory is empty."))))),this.show_loader&&i("div",{key:"588f4ff57df18c993f8566711a2627bd69b03881",class:"loader"},"Loading..."),this.show_error&&i("div",{key:"816c8ca05f68291d784d4c86509c9478204f3449",class:"error"},this.error_message)),i("footer",{key:"6add74a0d5beb8de15a600d287d96dd69f87a646"},i("section",{key:"39b31ae22b9f6298b8991be47d5641c1de618ab7",class:"status"},this.status,this.selected_item&&i("span",{key:"6e3942b5471e240719dfaf66cb01763f162ff3f0",class:"selected-item"},this.selected_item.name)),i("section",{key:"cc7ab5a9a632da8fae266f9ae73f967083e3589f",class:"version"},this.version?`Version: ${this.version}`:""))),this.show_login_screen&&i("section",{key:"3e13e8c942f690d2e26c231c2403032af620f735",class:{creds:!0,blurred:this.show_login_screen}},i("form",{key:"7ddb982159a3470bfad44aea75973a2eb37bebcd",class:"auth",onSubmit:t=>{const e=new FormData(t.target);let i,a;this.show_login_screen_username&&(i=e.get("username")),this.show_login_screen_password&&(a=e.get("password")),this.channel.open_sftp_tunnel(this.nodeId,this.serviceId,i,a),this.show_login_screen_username=!1,this.show_login_screen_password=!1,this.show_login_screen=!1,this.show_loader=!0,t.stopPropagation(),t.preventDefault()}},i("div",{key:"036877a02034000a79836c0a0979def9163f8a1a",class:"title"},"SFTP Connection"),this.show_login_screen_username&&i("div",{key:"37830ddb769fe0491831700a90f3fc8bf71cf050"},i("label",{key:"0f6e3d70e34baae3342a57fceed657e59c8c05a4",htmlFor:"username"},"Username"),i("input",{key:"3ecb202b3ee015e8719c330edb06889f4f48a433",autocorrect:"off",autocapitalize:"none",autoComplete:"off",id:"username",name:"username",type:"text",placeholder:""})),this.show_login_screen_password&&i("div",{key:"092a40a9da1205ec6342069844135aea92b85c5a"},i("label",{key:"19e465136660c9d2c1ecd0bb02bd7f8a559e3e0b",htmlFor:"password"},"Password"),i("input",{key:"ab9a74273abc594fa9fd51a780c2586fb275b4b4",autocorrect:"off",autocapitalize:"none",autoComplete:"off",id:"password",name:"password",type:"password",placeholder:""})),i("div",{key:"c1596787c7fea135d203f831cb7432a6e803d488"},i("button",{key:"89314be80add42ba55f96ec01bf22848742ec179",type:"submit"},"Connect")))),this.show_upload_modal&&i("section",{key:"c8b08cf050947d1936c97caf46eacca93175db9f",class:{"upload-modal":!0,visible:this.show_upload_modal}},i("div",{key:"ccc745354525565cda06b6b6eb8253c557c59009",class:"upload-dialog",role:"dialog","aria-modal":"true","aria-label":"Upload progress"},i("div",{key:"d478b113fa655386998d93862fc53bf516eaf90b",class:"title"},"Uploading File"),i("div",{key:"35c85475b00efcf05097e1feae1313afde0d04af",class:"file-name",title:this.upload_file_name},this.upload_file_name),i("div",{key:"d5cb7df154d77dacdca48673b2f01e03729846b0",class:"progress-track",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":this.upload_progress},i("div",{key:"4a7c10979b37d06acdda30c0b8d04a2af3cf0e5a",class:"progress-fill",style:{width:`${this.upload_progress}%`}})),i("div",{key:"c69da13c3bc15a9a36867cbb1a8d041780ffecca",class:"progress-meta"},i("div",{key:"000b027205a828e1257263e29b5a595ead0fe54a",class:"progress-speed"},this.upload_speed),i("div",{key:"8eda5c230e39343ffb10aa1bc64f70999d428c57",class:"progress-value"},this.format_percent(this.upload_progress))),i("button",{key:"b047fe324179b9f77f97f7bcf541c32e0903bad9",type:"button",class:{cancel:!0,finished:this.upload_finished},onClick:()=>this.cancel_upload()},this.upload_finished?"Close":"Cancel"))),this.show_download_modal&&i("section",{key:"fff5c3228be15048397b86a1457f63d4562c98f8",class:{"download-modal":!0,visible:this.show_download_modal}},i("div",{key:"8bbf7465cdb2b514b16c4982b3480b04aa5e1a6c",class:"download-dialog",role:"dialog","aria-modal":"true","aria-label":"Download progress"},i("div",{key:"dea4371acce3010cefdb14bbc3873d6cca1e308c",class:"title"},"Downloading File"),i("div",{key:"cffc4ad6e269108252db2bbb3b3f9678e88aed4b",class:"file-name",title:this.download_file_name},this.download_file_name),i("div",{key:"ec0fd7bbd72c2c1dcb55dffb39a8e550af9c54a6",class:"progress-track",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":this.download_progress},i("div",{key:"c899bcf67b523e9de0db76bc9163d192120fd61b",class:"progress-fill",style:{width:`${this.download_progress}%`}})),i("div",{key:"14c343bb055ca7300f3b500bb9da06450f9338c8",class:"progress-meta"},i("div",{key:"6b030a95eb9b11d88a070dd8a8dc9f4a2d10302a",class:"progress-speed"},this.download_speed),i("div",{key:"0d8eb9884506e9bb7a31ea1ceedc0f3e3e74f9b8",class:"progress-value"},this.format_percent(this.download_progress))),i("button",{key:"4416377601c6655ba0e9385e6149dd461702439a",type:"button",class:{cancel:!0,finished:this.download_finished},onClick:()=>this.cancel_download()},this.download_finished?"Close":"Cancel"))),this.show_delete_modal&&i("section",{key:"803d5f9fc2096c44335380132eee7d6ee1c70c1f",class:{"delete-modal":!0,visible:this.show_delete_modal}},i("div",{key:"0f23cb5f9ed35b97accc994277c86eff46de74bd",class:"delete-dialog",role:"dialog","aria-modal":"true","aria-label":"Delete confirmation",tabindex:-1,onKeyDown:t=>this.on_modal_keydown(t,(()=>this.cancel_delete()))},i("div",{key:"6b64cac5732de2d5c091fea7ef1cd1b903b86c61",class:"title"},this.delete_is_dir?"Delete Folder":"Delete File"),i("div",{key:"f1b6592449d9697208c704dcaaeec83d4d40d852",class:"message"},this.delete_loading?this.delete_recursive?"Deleting the folder and everything in it...":"Deleting...":`Are you sure you want to delete this ${this.delete_is_dir?"folder":"file"}?`),i("div",{key:"a67f8bd35875e0477fcf3bbf9f075b10f9066f07",class:"file-name",title:this.delete_file_name},this.delete_file_name),this.delete_is_dir&&i("label",{key:"5e660c03c1df789bcdc4dba7a2adfe4887dd71ca",class:"checkline"},i("input",{key:"c28122496182d007ae2f99d9de79451c23dadef5",type:"checkbox",checked:this.delete_recursive,disabled:this.delete_loading,onChange:t=>this.delete_recursive=t.target.checked}),i("span",{key:"53539d4803c5358d26e181dc53fcc7f36ad62d6a"},"Delete everything inside it too")),!this.delete_is_dir||this.delete_recursive?null:i("div",{class:"hint"},"Without this, the remote refuses a folder that is not empty."),this.delete_error&&i("div",{key:"0773a1e6a26fa8dde7dba0d0ed00107d01782e2f",class:"dialog-error"},this.delete_error),this.delete_loading&&i("div",{key:"b1580f0825ec4f4b37f894fbd714f143a9515fd6",class:"delete-loader","aria-hidden":"true"},i("span",{key:"db549d437007182afdaddab37d8caec7b1c4a2c7",class:"spinner"})),i("div",{key:"040a4c6730ce5149737211fae9d67a3a290bdc5c",class:"modal-actions"},i("button",{key:"b742ccd04a3e119c446a2186081835fd6f67022d",type:"button",class:"btn secondary",onClick:()=>this.cancel_delete(),disabled:this.delete_loading},"Cancel"),i("button",{key:"4ce414e250ace86f93d24e399ca56014e56c7757",type:"button",class:"btn destructive",onClick:()=>this.confirm_delete(),disabled:this.delete_loading},this.delete_loading?"Deleting...":"Delete")))),this.prompt_kind&&i("section",{key:"d533b9ecb021dbb69766ba92e87d0b4279b047d4",class:"prompt-modal visible"},i("div",{key:"f7fbe0ee2323439da2c991046d90b1b6397ebee8",class:"prompt-dialog",role:"dialog","aria-modal":"true","aria-label":"mkdir"===this.prompt_kind?"New folder":"Rename",tabindex:-1,onKeyDown:t=>this.on_modal_keydown(t,(()=>this.close_prompt()))},i("div",{key:"36b154bda604336f8bbb7c46d7bb35b6afd6cec2",class:"title"},"mkdir"===this.prompt_kind?"New Folder":"Rename"),i("div",{key:"76b8027be289fcdba2867e1b06f05cab8481564d",class:"message"},"mkdir"===this.prompt_kind?`Create a folder in ${this.current_dir}`:"Give it a new name. Existing names are not overwritten."),i("form",{key:"8ec6e410dc6572de35ff6b2c81734fa48d74a4a8",onSubmit:t=>{t.preventDefault(),t.stopPropagation(),this.submit_prompt()}},i("input",{key:"0511fa8205057fe088be93781c23e283bc07739e",class:"dialog-input",type:"text",autocorrect:"off",autocapitalize:"none",autoComplete:"off",spellcheck:!1,"aria-label":"Name",disabled:this.prompt_busy,value:this.prompt_value,onInput:t=>this.prompt_value=t.target.value,ref:t=>this.focus_once(t,this.promptInputEl,(t=>this.promptInputEl=t))}),this.prompt_error&&i("div",{key:"2644600b1e015e02209309e1163e991acabad2e9",class:"dialog-error"},this.prompt_error),i("div",{key:"520937e554f3ff7839aad18fd0ed3c56f8a21680",class:"modal-actions"},i("button",{key:"e5a037f006c3f97e6227e672cff6cf3dc7282abb",type:"button",class:"btn secondary",onClick:()=>this.close_prompt(),disabled:this.prompt_busy},"Cancel"),i("button",{key:"b7883cc44b152c2c648f133eb5ffd7f5942d0aa4",type:"submit",class:"btn primary",disabled:this.prompt_busy},this.prompt_busy?"Working...":"mkdir"===this.prompt_kind?"Create":"Rename"))))),this.chmod_target&&i("section",{key:"e99ef709477024789821b76e1bbaa6497dcbc474",class:"prompt-modal visible"},i("div",{key:"1cec5818b817d089a9b4cda3b4ee514e7e9201a7",class:"prompt-dialog",role:"dialog","aria-modal":"true","aria-label":"Change permissions",tabindex:-1,onKeyDown:t=>this.on_modal_keydown(t,(()=>this.close_chmod()))},i("div",{key:"49c35a7228bbc6e9898c499904feb5fb525b2b5c",class:"title"},"Permissions"),i("div",{key:"814edc9c438d956bef13b14bc22733502168c340",class:"file-name",title:this.chmod_target.name},this.chmod_target.name),i("table",{key:"a4c1b45c1ee830599e7c08a9a44c69df1ac2b201",class:"perm-grid"},i("thead",{key:"99b953b4cf5f3a6aeff766d39b15222e74235a3c"},i("tr",{key:"49d3ae286989915aaca71ba43cb19db357064158"},i("th",{key:"3f3b7fcbeb1b713d29a874a111552f6ff95a811e","aria-label":"Class"}),i("th",{key:"6d18882102b71cb61be8ae93a946f62da7b555bc"},"Read"),i("th",{key:"44aed1177108307db4618680b5e7d28e248cdab6"},"Write"),i("th",{key:"d6056bed3aab4164768a010c369365c70e67bbbc"},"Execute"))),i("tbody",{key:"d54ecfe06cade301263977cf1f0a0ba9e3721b5c"},[{label:"Owner",read:256,write:128,exec:64},{label:"Group",read:32,write:16,exec:8},{label:"Other",read:4,write:2,exec:1}].map((t=>i("tr",{key:t.label},i("th",{scope:"row"},t.label),[t.read,t.write,t.exec].map((e=>i("td",{key:e},i("input",{type:"checkbox","aria-label":`${t.label} ${e}`,disabled:this.chmod_busy,checked:!!(this.chmod_mode&e),onChange:()=>this.toggle_chmod_bit(e)}))))))))),i("div",{key:"a124e9599de6b406d84ba9ffa3a56b3b993179ef",class:"perm-special"},[{label:"setuid",bit:2048},{label:"setgid",bit:1024},{label:"sticky",bit:512}].map((t=>i("label",{key:t.label,class:"checkline"},i("input",{type:"checkbox",disabled:this.chmod_busy,checked:!!(this.chmod_mode&t.bit),onChange:()=>this.toggle_chmod_bit(t.bit)}),i("span",null,t.label))))),i("div",{key:"05ab3c8451084b6acdf7ea0e45f71da0f913b08d",class:"perm-octal"},i("label",{key:"5cb748e079c869720361e56c4973eaea82a85bc0",htmlFor:"chmod-octal"},"Octal"),i("input",{key:"652571af51a36c975d8b7432923ef2ab80743480",id:"chmod-octal",class:"dialog-input",type:"text",autocorrect:"off",autocapitalize:"none",autoComplete:"off",spellcheck:!1,maxlength:4,disabled:this.chmod_busy,value:this.chmod_mode.toString(8).padStart(4,"0"),onInput:t=>this.on_chmod_octal_input(t.target.value)}),i("span",{key:"4a789c75be9a941d2adf8de68cfda043c19864cc",class:"perm-preview"},this.format_permissions(this.chmod_mode,this.chmod_target.kind))),this.chmod_error&&i("div",{key:"acb09c9d16146cc0466df1ea6394ff492604c397",class:"dialog-error"},this.chmod_error),i("div",{key:"46c5c4fc154529060b24e335dcd192ed6dc6f75d",class:"modal-actions"},i("button",{key:"2ad9fad876497e4d629c1911fbe29616853a2e59",type:"button",class:"btn secondary",onClick:()=>this.close_chmod(),disabled:this.chmod_busy},"Cancel"),i("button",{key:"c14f7edb08da6d2db078722438e8e06455a076c7",type:"button",class:"btn primary",onClick:()=>{this.submit_chmod()},disabled:this.chmod_busy},this.chmod_busy?"Applying...":"Apply")))),this.show_editor&&i("section",{key:"f040aeca04a6b02af3247c024271fbdc2564a0c4",class:"editor-modal visible"},i("div",{key:"6874ae8a526168be8c2c09ca3f8a1faa52b78027",class:"editor-dialog",role:"dialog","aria-modal":"true","aria-label":`Editing ${this.editor_name}`,tabindex:-1,onKeyDown:t=>{if((t.ctrlKey||t.metaKey)&&"s"===t.key)return t.preventDefault(),void this.save_editor();this.on_modal_keydown(t,(()=>this.close_editor()))}},i("div",{key:"421cbd1bfbde035049ed028c4d05083cc7d8f66f",class:"editor-head"},i("div",{key:"889adcf6e0187963964920b9750531c3fa06cd37",class:"title"},this.editor_name,this.editor_is_dirty()?" *":""),i("button",{key:"b14d28ca6a80c9a08277ff20bc0b38fc30ea3869",type:"button",class:"editor-close",onClick:()=>this.close_editor(),"aria-label":"Close editor",disabled:"saving"===this.editor_busy},"x")),"loading"===this.editor_busy?i("div",{class:"editor-loading"},"Loading..."):i("textarea",{class:"editor-text",spellcheck:!1,autocorrect:"off",autocapitalize:"none",autoComplete:"off","aria-label":"File contents",disabled:"saving"===this.editor_busy||!this.editor_loaded,value:this.editor_text,onInput:t=>this.editor_text=t.target.value,ref:t=>this.focus_once(t,this.editorTextEl,(t=>this.editorTextEl=t))}),this.editor_error&&i("div",{key:"e7c1db037e749fec8970ac2b2be2cb85cfcd85be",class:"dialog-error"},this.editor_error),this.editor_confirm_discard&&i("div",{key:"84ca6080e18c4334e87374126b82b816f318cb0d",class:"dialog-error"},"Unsaved changes. Close anyway?"),i("div",{key:"4515e164a418815eccfd9d54d8f96a076616f326",class:"modal-actions"},this.editor_confirm_discard?i("button",{type:"button",class:"btn destructive",onClick:()=>this.close_editor(!0)},"Discard"):i("button",{type:"button",class:"btn secondary",onClick:()=>this.close_editor(),disabled:"saving"===this.editor_busy},"Close"),i("button",{key:"b1e758ae6fd5de192135d617126c8c6939c62bde",type:"button",class:"btn primary",onClick:()=>{this.save_editor()},disabled:!!this.editor_busy||!this.editor_is_dirty()},"saving"===this.editor_busy?"Saving...":"Save")))))}static get watchers(){return{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}}};c.style=":host{--radius:0.375rem;--card:220 18% 10%;--border:220 15% 18%;--primary:160 60% 45%;--radius:0.375rem;--destructive:0 70% 50%;--muted:220 15% 13%;--muted-foreground:220 10% 50%;--primary-foreground:220 20% 7%;--scroll-track:220 16% 12%;--scroll-thumb:220 12% 34%;--scroll-thumb-hover:160 45% 44%;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;height:100%;width:100%;border:1px solid hsl(var(--border));background-color:hsl(var(--card));border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;position:relative;container-type:inline-size;.listing{height:100%;display:flex;flex-direction:column;justify-content:space-between;min-height:0;header{height:30px;background:rgba(28, 31, 38, 0.6);border-bottom:1px solid hsl(var(--border));display:flex;align-items:center;justify-content:space-between;.actions{display:flex;align-items:center;.action{cursor:pointer;padding:4px;display:flex;align-items:center;z-index:1;img{height:14px;padding:4px;border-radius:4px}&:hover{background-color:hsl(var(--border) / 0.6)}}}.title{color:hsl(var(--primary));height:14px;padding:0 12px;display:flex;align-items:center;font-size:0.75rem;line-height:1rem;img{height:14px;margin-right:5px}.text{display:flex;flex-direction:row;justify-content:center;margin-top:2px;.name{margin-right:10px}.description{color:hsl(var(--muted-foreground))}}}}main{flex:1;display:flex;flex-direction:column;position:relative;min-height:0;overflow:hidden;.loader{color:hsl(var(--muted-foreground));font-size:13px;animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;text-align:center;display:flex;align-items:center;justify-content:center;position:absolute;height:100%;width:100%;background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px)}.error{font-size:13px;text-align:center;color:hsl(var(--destructive));height:100%;display:flex;align-items:center;justify-content:center}.navigation{height:25px;padding:10px;font-size:0.75rem;line-height:1rem;background-color:hsl(var(--card));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid hsl(var(--border));position:sticky;top:0;z-index:3;.breadcrumbs{display:flex;align-items:center;margin-right:10px;.breadcrumb-container{white-space:nowrap;.breadcrumb{color:hsl(var(--primary));margin-right:4px;cursor:pointer;&:after{margin-left:4px}&:hover{color:rgb(189, 219, 209)}&:last-child{margin-right:0;color:rgb(189, 219, 209);cursor:default}}}.arrow{height:12px;width:12px;opacity:0.6;top:2px;margin-right:4px;position:relative}}.actions{display:flex;align-items:center;gap:8px}.filter{height:1.5rem;width:110px;padding:0 6px;font:inherit;font-size:0.68rem;color:rgb(189, 219, 209);background-color:hsl(var(--muted));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);outline:none;&::placeholder{color:hsl(var(--muted-foreground))}&:focus{border-color:hsl(var(--primary))}}.action{border:none;background:transparent;color:rgb(189, 219, 209);font-size:1.1rem;line-height:1;padding:2px 4px;border-radius:4px;cursor:pointer;&:hover{background-color:hsl(var(--border) / 0.6)}img{height:14px;width:14px;display:block}}.action.disconnect{color:#ff4d5f;font-size:0.65rem;letter-spacing:0.08em;padding:4px 8px;&:hover{color:#ff6b7a;background-color:hsl(var(--destructive) / 0.12)}}}.content{flex:1;min-height:0;outline:none;overflow:auto;font-size:0.75rem;line-height:1rem;scrollbar-width:thin;scrollbar-color:hsl(var(--scroll-thumb)) hsl(var(--scroll-track));&:focus-visible{box-shadow:inset 0 0 0 1px hsl(var(--primary) / 0.5)}&::-webkit-scrollbar{width:10px;height:10px}&::-webkit-scrollbar-track{background:hsl(var(--scroll-track))}&::-webkit-scrollbar-thumb{background:hsl(var(--scroll-thumb));border-radius:999px;border:2px solid hsl(var(--scroll-track))}&::-webkit-scrollbar-thumb:hover{background:hsl(var(--scroll-thumb-hover))}table{width:100%;border-collapse:separate;border-spacing:0;table-layout:auto;thead{background-color:hsl(var(--muted));border-bottom:1px solid hsl(var(--border));th.sortable{cursor:pointer;user-select:none;&:hover{color:hsl(var(--primary))}}th{padding:8px 10px;text-align:left;color:hsl(var(--muted-foreground));position:sticky;top:0;z-index:2;background-color:hsl(var(--muted));border-bottom:1px solid hsl(var(--border));line-height:0.95rem;&.action-col{width:58px;min-width:58px;padding:0 10px}&:first-child{width:30%;min-width:180px;max-width:195px}&:nth-child(2),&:nth-child(3),&:nth-child(4),&:nth-child(5){white-space:nowrap;width:1%}}}tbody{padding:10px 10px;tr.empty{cursor:default;td{color:hsl(var(--muted-foreground));text-align:center;padding:18px 8px}&:hover{background:transparent}}tr{border-bottom:1px solid hsl(var(--border) / 0.4);td{padding:10px 10px 9px;color:hsl(var(--muted-foreground));&:first-child{min-width:180px;max-width:195px;white-space:nowrap;.name{display:inline-block;max-width:calc(100% - 26px);overflow:hidden;text-overflow:ellipsis;vertical-align:middle}}&:nth-child(2),&:nth-child(3),&:nth-child(4),&:nth-child(5){white-space:nowrap}&.action-col{width:58px;min-width:58px;text-align:center;padding-left:1px;padding-right:1px;.file-actions{display:flex;align-items:center;justify-content:center;gap:8px}.file-action{border:none;background:transparent;color:hsl(var(--muted-foreground));width:16px;height:16px;border-radius:3px;cursor:pointer;opacity:0;visibility:hidden;pointer-events:none;transition:opacity 120ms ease;padding:0;svg{width:12px;height:12px;display:block;margin:0 auto}&:hover{color:hsl(var(--primary))}&.delete:hover{color:hsl(var(--destructive))}}}.name{&.file{color:rgb(189, 219, 209)}&.folder{color:hsl(var(--primary))}}.kind{height:14px;width:14px;margin-right:5px;top:3px;position:relative}}&:hover{cursor:pointer;background-color:hsl(var(--muted) / 0.4);td.action-col .file-action{opacity:1;visibility:visible;pointer-events:auto;color:hsl(var(--primary))}}&.selected{background-color:hsl(var(--primary) / 0.3);td.action-col .file-action{opacity:1;visibility:visible;pointer-events:auto}&:hover{background-color:hsl(var(--primary) / 0.4)}}}}}}}footer{height:25px;background:rgba(28, 31, 38, 0.6);border-top:1px solid hsl(var(--border));font-size:0.75rem;line-height:1rem;display:flex;align-items:center;justify-content:space-between;padding:0 10px;.status{font-size:0.65rem;color:hsl(var(--muted-foreground));.selected-item{margin-left:10px;color:hsl(var(--primary))}}.version{font-size:0.65rem;color:hsl(var(--muted-foreground))}}}.creds{position:absolute;top:0;left:0;height:100%;width:100%;display:flex;justify-content:center;align-items:center;;&.blurred{background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px)}.auth{display:flex;flex-direction:column;background:hsl(var(--card));position:relative;background-color:rgba(21, 24, 30, 0.95);border:1px solid hsl(var(--border));padding:30px;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.5) 0px 25px 50px -12px;border-radius:var(--radius);.title{margin-bottom:12px;color:hsl(var(--primary))}label{font-size:0.75rem;line-height:1rem;margin-bottom:1rem;color:hsl(var(--muted-foreground))}input{font-size:0.875rem;line-height:1.25rem;padding-top:0.5rem;padding-bottom:0.5rem;padding-left:0.75rem;padding-right:0.75rem;background-color:rgb(28, 31, 38);border-color:rgb(39, 44, 53);border-width:1px;border-radius:calc(var(--radius) - 2px);width:100%;margin-bottom:12px;color:rgb(189, 219, 209);box-sizing:border-box;&:focus{outline:none;border-color:hsl(var(--primary));box-shadow:0 0 0 1px hsl(var(--primary))}}button[type='submit']{margin-top:12px;width:100%;background-color:hsl(var(--primary));color:hsl(var(--primary-foreground));letter-spacing:0.05em;font-size:13px;font-weight:500;padding:0.5rem 1rem;border-radius:calc(var(--radius) - 2px);height:2rem;cursor:pointer;border:none;&:hover{background-color:hsl(var(--primary) / 0.9)}}}}.upload-modal,.download-modal,.delete-modal,.prompt-modal{position:absolute;inset:0;display:none;align-items:center;justify-content:center;background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px);z-index:6;&.visible{display:flex}.upload-dialog,.download-dialog,.delete-dialog,.prompt-dialog{width:min(360px, calc(100% - 24px));background-color:rgba(21, 24, 30, 0.96);border:1px solid hsl(var(--border));border-radius:var(--radius);padding:16px;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.5) 0px 25px 50px -12px;.title{color:hsl(var(--primary));font-size:0.8rem;margin-bottom:8px}.file-name{color:rgb(189, 219, 209);font-size:0.72rem;line-height:1rem;margin-bottom:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.progress-track{width:100%;height:10px;border-radius:999px;background-color:hsl(var(--muted));overflow:hidden;border:1px solid hsl(var(--border));.progress-fill{height:100%;width:0;background:linear-gradient(90deg, hsl(var(--primary) / 0.7), hsl(var(--primary)));transition:width 140ms ease}}.progress-meta{margin-top:8px;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:10px}.progress-speed{color:hsl(var(--muted-foreground));font-size:0.75rem;font-variant-numeric:tabular-nums;line-height:1.4;text-align:left}.progress-value{color:hsl(var(--muted-foreground));font-size:0.75rem;font-variant-numeric:tabular-nums;line-height:1.4;text-align:right}.cancel{margin-top:14px;width:100%;height:2rem;border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);background:hsl(var(--muted));color:rgb(189, 219, 209);font-size:0.75rem;letter-spacing:0.03em;cursor:pointer;&:hover{border-color:hsl(var(--primary));color:hsl(var(--primary))}&.finished{background-color:hsl(var(--primary));border-color:hsl(var(--primary));color:hsl(var(--primary-foreground));&:hover{background-color:hsl(var(--primary) / 0.9);border-color:hsl(var(--primary) / 0.9);color:hsl(var(--primary-foreground))}}}.message{color:rgb(189, 219, 209);font-size:0.74rem;line-height:1rem;margin-bottom:8px}.modal-actions{margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:8px;.btn{height:2rem;border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);font-size:0.75rem;letter-spacing:0.03em;cursor:pointer;&:disabled{opacity:0.65;cursor:not-allowed}}.btn.secondary{background:hsl(var(--muted));color:rgb(189, 219, 209);&:hover{border-color:hsl(var(--primary));color:hsl(var(--primary))}}.btn.destructive{background:hsl(var(--destructive));border-color:hsl(var(--destructive));color:white;&:hover{background:hsl(var(--destructive) / 0.9);border-color:hsl(var(--destructive) / 0.9)}}}.dialog-input{width:100%;box-sizing:border-box;height:2rem;padding:0 8px;font:inherit;font-size:0.75rem;color:rgb(189, 219, 209);background-color:hsl(var(--muted));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);outline:none;&:focus{border-color:hsl(var(--primary))}&:disabled{opacity:0.65}}.dialog-error{margin-top:8px;font-size:0.7rem;line-height:0.95rem;color:#ff6b7a}.hint{margin-top:4px;font-size:0.66rem;line-height:0.9rem;color:hsl(var(--muted-foreground))}.checkline{margin-top:8px;display:flex;align-items:center;gap:6px;font-size:0.72rem;color:rgb(189, 219, 209);cursor:pointer;input{accent-color:hsl(var(--primary));margin:0}}.perm-grid{margin-top:10px;width:100%;border-collapse:collapse;font-size:0.68rem;th{color:hsl(var(--muted-foreground));font-weight:normal;text-align:center;padding:2px 0}th[scope='row']{text-align:left;color:rgb(189, 219, 209)}td{text-align:center;padding:2px 0}input{accent-color:hsl(var(--primary));margin:0}}.perm-special{margin-top:4px;display:flex;gap:12px;.checkline{margin-top:4px;font-size:0.66rem}}.perm-octal{margin-top:10px;display:flex;align-items:center;gap:8px;label{font-size:0.68rem;color:hsl(var(--muted-foreground))}.dialog-input{width:4.5rem;text-align:center;letter-spacing:0.1em}.perm-preview{font-size:0.7rem;color:hsl(var(--primary))}}.modal-actions .btn.primary{background:hsl(var(--primary));border-color:hsl(var(--primary));color:hsl(var(--primary-foreground));&:hover:not(:disabled){background:hsl(var(--primary) / 0.9);border-color:hsl(var(--primary) / 0.9)}}.delete-loader{margin-top:4px;display:flex;justify-content:center;.spinner{width:16px;height:16px;border:2px solid hsl(var(--muted-foreground) / 0.35);border-top-color:hsl(var(--primary));border-radius:50%;animation:spin 0.7s linear infinite}}}}.editor-modal{position:absolute;inset:0;display:none;align-items:center;justify-content:center;background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px);z-index:7;&.visible{display:flex}.editor-dialog{width:min(860px, calc(100% - 24px));height:min(620px, calc(100% - 24px));display:flex;flex-direction:column;background-color:rgba(21, 24, 30, 0.98);border:1px solid hsl(var(--border));border-radius:var(--radius);padding:16px;box-shadow:rgba(0, 0, 0, 0.5) 0px 25px 50px -12px;outline:none;.editor-head{display:flex;align-items:center;justify-content:space-between;gap:8px;.title{color:hsl(var(--primary));font-size:0.8rem;margin-bottom:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-close{border:none;background:transparent;color:hsl(var(--muted-foreground));font-size:0.85rem;line-height:1;padding:2px 6px;border-radius:4px;cursor:pointer;&:hover:not(:disabled){color:hsl(var(--primary));background-color:hsl(var(--border) / 0.6)}&:disabled{opacity:0.5;cursor:not-allowed}}}.editor-loading{flex:1;display:flex;align-items:center;justify-content:center;font-size:0.75rem;color:hsl(var(--muted-foreground))}.editor-text{flex:1;min-height:0;width:100%;box-sizing:border-box;resize:none;padding:10px;font:inherit;font-size:0.75rem;line-height:1.15rem;tab-size:4;white-space:pre;overflow:auto;color:rgb(189, 219, 209);background-color:hsl(var(--muted));border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);outline:none;&:focus{border-color:hsl(var(--primary) / 0.6)}&:disabled{opacity:0.65}}.dialog-error{margin-top:8px;font-size:0.7rem;line-height:0.95rem;color:#ff6b7a}.modal-actions{margin-top:14px;display:flex;justify-content:flex-end;gap:8px;.btn{height:2rem;min-width:6rem;border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);font-size:0.75rem;letter-spacing:0.03em;cursor:pointer;&:disabled{opacity:0.65;cursor:not-allowed}}.btn.secondary{background:hsl(var(--muted));color:rgb(189, 219, 209);&:hover:not(:disabled){border-color:hsl(var(--primary));color:hsl(var(--primary))}}.btn.destructive{background:hsl(var(--destructive));border-color:hsl(var(--destructive));color:white}.btn.primary{background:hsl(var(--primary));border-color:hsl(var(--primary));color:hsl(var(--primary-foreground));&:hover:not(:disabled){background:hsl(var(--primary) / 0.9);border-color:hsl(var(--primary) / 0.9)}}}}}}@keyframes spin{to{transform:rotate(360deg)}}:host(.max){height:100vh;width:100vw;position:fixed;top:0;left:0;z-index:9999}@container (max-width: 699px){:host .listing main .content table thead th:nth-child(4),:host .listing main .content table tbody td:nth-child(4){display:none}}@container (max-width: 635px){:host .listing main .content table thead th:nth-child(3),:host .listing main .content table tbody td:nth-child(3){display:none}}@container (max-width: 530px){:host .listing main .content table thead th:nth-child(5),:host .listing main .content table tbody td:nth-child(5){display:none}:host .listing footer .status{display:none}}@container (max-width: 370px){:host .listing main .content table thead th:nth-child(2),:host .listing main .content table tbody td:nth-child(2){display:none}:host .listing main .content table thead th:first-child,:host .listing main .content table tbody td:first-child{width:100%;min-width:0;max-width:none}:host .listing main .content table tbody td:first-child .name{max-width:100%}}@container (max-width: 295px){:host .listing main .content table tbody td:first-child .name{max-width:120px}}@container (max-width: 635px){:host .listing main .content table tbody tr td.action-col .file-action{opacity:1;visibility:visible;pointer-events:auto;width:36px;height:36px;border-radius:8px}:host .listing main .content table tbody tr td.action-col .file-action svg{width:17px;height:17px}:host .listing main .content table thead th.action-col,:host .listing main .content table tbody td.action-col{width:92px;min-width:92px}:host .listing main .content table tbody td.action-col .file-actions{gap:4px}:host .listing main .content table tbody tr:hover{background-color:transparent}:host .listing main .content table tbody tr.selected:hover{background-color:hsl(var(--primary) / 0.3)}:host .listing main .content table tbody td{padding:13px 10px 12px}:host .listing main .content table thead th{padding:12px 10px}:host .listing main .navigation{height:auto;min-height:44px;padding:6px 8px}:host .listing main .navigation .action{padding:10px;border-radius:8px}:host .listing main .navigation .action img{height:17px;width:17px}:host .listing main .navigation .action.disconnect{padding:10px 12px}:host .listing main .navigation .filter{height:2.25rem;font-size:16px;width:8rem}:host .listing header .actions .action{padding:8px}:host .listing header .actions .action img{height:17px}:host .modal .upload-dialog .cancel,:host .modal .download-dialog .cancel,:host .modal .delete-dialog .cancel,:host .modal .prompt-dialog .cancel,:host .modal .upload-dialog .modal-actions .btn,:host .modal .download-dialog .modal-actions .btn,:host .modal .delete-dialog .modal-actions .btn,:host .modal .prompt-dialog .modal-actions .btn{height:2.75rem}:host .modal .prompt-dialog .dialog-input,:host .auth input{height:2.5rem;font-size:16px}:host .modal .prompt-dialog .perm-grid input,:host .modal .prompt-dialog .perm-special input{width:20px;height:20px}:host .modal .prompt-dialog .perm-grid td,:host .modal .prompt-dialog .perm-grid th{padding:7px 0}}";export{c as phirepass_sftp_client}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,g as s,h as i,H as o}from"./p-BVOulYtW.js";import{_ as n,C as h,a as r,P as a}from"./p-CsYQJXY2.js";const c=200;function d(t){return!Number.isFinite(t)||t<=0?c:Math.min(8192,Math.max(c,Math.floor(t)))}function l(t){return t-t%2}function u(t){const e=t.getBoundingClientRect();return s=e.height,{width:l(d(e.width)),height:l(d(s))};var s}class p{onResize;debounceMs;observer;handle;reported;constructor(t,e=250){this.onResize=t,this.debounceMs=e}observe(t,e){this.disconnect(),this.reported=e,this.report(u(t)),"undefined"!=typeof ResizeObserver&&(this.observer=new ResizeObserver((()=>{clearTimeout(this.handle),this.handle=setTimeout((()=>this.report(u(t))),this.debounceMs)})),this.observer.observe(t))}disconnect(){clearTimeout(this.handle),this.handle=void 0,this.observer?.disconnect(),this.observer=void 0,this.reported=void 0}report(t){var e,s;s=this.reported,(e=t)&&s&&e.width===s.width&&e.height===s.height||(this.reported=t,this.onResize(t))}}function m(){return navigator.keyboard}function f(){return"function"==typeof m()?.lock}function b(t){return document.fullscreenElement===t}function w(t){return document.fullscreenElement?.contains(t)??!1}function y(){if(f())try{m().unlock()}catch(t){console.warn("Failed to release the keyboard lock:",t)}}const g=class{constructor(s){new.target===g&&t(this,s),this.connectionStateChanged=e(this,"connectionStateChanged")}channel;containerEl;ironEl;userInteraction;viewport;domReady=!1;runtimeReady=!1;connected=!1;disposed=!1;session_id;onFullscreenChange=()=>this.sync_keyboard_lock();credentials;credentialsPrompt=!1;statusMessage;usernameBuffer="";passwordBuffer="";get el(){return s(this)}serverHost="phirepass.com";serverPort=443;allowInsecure=!1;heartbeatInterval=3e4;nodeId;serviceId;token;username;password;destination;scale="fit";dynamicResize=!0;captureKeyboard=!0;clipboard=!0;onNodeIdChange(t,e){this.reset_session_state(),this.channel&&this.channel.is_connected()&&this.close_comms(),t&&(this.open_comms(),this.channel.connect())}serverId;onServerIdChange(t,e){this.onNodeIdChange(this.nodeId,this.nodeId)}connectionStateChanged;create_web_socket_endpoint(){const t=this.allowInsecure?"ws":"wss";return this.allowInsecure||443!==this.serverPort?this.allowInsecure&&80===this.serverPort?`${t}://${this.serverHost}`:`${t}://${this.serverHost}:${this.serverPort}`:`${t}://${this.serverHost}`}async connectedCallback(){document.addEventListener("fullscreenchange",this.onFullscreenChange),this.disposed=!1,await n(),this.open_comms(),this.runtimeReady=!0,this.nodeId?this.try_connect():console.warn("Prop node_id is not set. Cannot connect to RDP.")}componentDidLoad(){this.domReady=!0,this.try_connect()}async disconnectedCallback(){document.removeEventListener("fullscreenchange",this.onFullscreenChange),this.disposed=!0,this.session_id=void 0,this.connected=!1,this.domReady=!1,this.runtimeReady=!1,this.close_comms()}async toggleFullscreen(){const t=await async function(t){try{return b(t)?(await document.exitFullscreen(),!1):(await t.requestFullscreen({navigationUI:"hide"}),!0)}catch(e){return console.warn("Failed to change the fullscreen state of the RDP session:",e),b(t)}}(this.el);return this.focus_desktop(),t}async keyboardLockSupported(){return f()}async focusDesktop(){this.focus_desktop()}async sendCtrlAltDel(){return!!this.userInteraction&&(this.userInteraction.ctrlAltDel(),this.focus_desktop(),!0)}async sendMetaKey(){return!!this.userInteraction&&(this.userInteraction.metaKey(),this.focus_desktop(),!0)}try_connect(){!this.connected&&this.domReady&&this.runtimeReady&&this.containerEl&&this.channel&&this.connect()}connect(){this.connected=!0,this.channel.connect()}open_comms(){this.channel=this.serverId?new h(`${this.create_web_socket_endpoint()}/api/web/ws`,this.nodeId,this.serverId):new h(`${this.create_web_socket_endpoint()}/api/web/ws`,this.nodeId),this.channel.on_connection_open((()=>{this.connectionStateChanged.emit([r.Connected]),this.channel.authenticate(this.token,this.nodeId)})),this.channel.on_connection_close((()=>{this.connectionStateChanged.emit([r.Disconnected]),this.teardown_client()})),this.channel.on_connection_error((t=>{this.connectionStateChanged.emit([r.Error,t])})),this.channel.on_connection_message((()=>{})),this.channel.on_protocol_message((t=>{const{web:e}=t.data;switch(e.type){case a.Error:this.handle_error(e);break;case a.AuthSuccess:this.handle_auth_success(e);break;case a.RDPAuthorized:this.handle_rdp_authorized(e);break;case a.TunnelClosed:this.handle_tunnel_closed(e);break;default:console.warn("Unknown protocol message type:",e)}}))}close_comms(){this.teardown_client(),this.channel&&(this.channel.stop_heartbeat(),this.channel.disconnect())}reset_session_state(){this.session_id=void 0,this.credentials=void 0,this.credentialsPrompt=!1,this.usernameBuffer="",this.passwordBuffer="",this.statusMessage=void 0}handle_auth_success(t){if(this.channel.start_heartbeat(this.heartbeatInterval<=15e3?3e4:this.heartbeatInterval),this.username&&this.password)return this.credentials={username:this.username,password:this.password},void this.request_tunnel();this.credentialsPrompt=!0}request_tunnel(){this.credentials&&(this.statusMessage=void 0,this.channel.open_rdp_tunnel(this.nodeId,this.serviceId,this.credentials.username,this.credentials.password))}async handle_rdp_authorized(t){this.session_id=t.sid,this.statusMessage="Connecting…";const[e]=await Promise.all([import("@devolutions/iron-remote-desktop-rdp"),import("@devolutions/iron-remote-desktop")]);if(this.disposed||!this.containerEl||this.session_id!==t.sid)return;if(await e.init("info"),this.disposed||!this.containerEl||this.session_id!==t.sid)return;const s=document.createElement("iron-remote-desktop");s.module=e.Backend,s.scale=this.scale,s.flexcenter=!0,s.verbose=!1;const i=[e.enableCredssp(!0)];this.dynamicResize&&i.push(e.displayControl(!0)),s.addEventListener("ready",(e=>{this.start_session(e.detail.irgUserInteraction,t.ticket,i)})),this.ironEl=s,this.mount_client(s)}mount_client(t){this.el.appendChild(t)}async start_session(t,e,s){this.userInteraction=t,this.clipboard||t.setEnableClipboard(!1),t.onWarningCallback((t=>{console.warn("The remote desktop client reported a problem:",t)}));const i=t.configBuilder().withUsername(this.credentials?.username??"").withPassword(this.credentials?.password??"").withDestination(this.destination??this.nodeId).withProxyAddress(`${this.create_web_socket_endpoint()}/api/web/rdp/${this.nodeId}`).withAuthToken(e);for(const t of s)i.withExtension(t);let o;this.dynamicResize&&(o=function(t){const e=t.getBoundingClientRect();if(Number.isFinite(e.width)&&Number.isFinite(e.height)&&!(e.width<c||e.height<c))return{width:l(Math.min(Math.floor(e.width),4096)),height:l(Math.min(Math.floor(e.height),4096))}}(this.el),o&&i.withDesktopSize(o));try{const e=await t.connect(i.build());if(this.disposed)return this.shutdown_session(t),void await e.run();t.setVisibility(!0),this.statusMessage=void 0,this.focus_desktop(),this.sync_keyboard_lock();const s=e.run();this.start_viewport_sync(o);const n=await s;this.statusMessage=n.reason()}catch(t){const e=this.describe_error(t);this.statusMessage=e,this.connectionStateChanged.emit([r.Error,t])}}start_viewport_sync(t){this.dynamicResize&&(this.viewport=new p((t=>this.resize_desktop(t))),this.viewport.observe(this.el,t))}stop_viewport_sync(){this.viewport?.disconnect(),this.viewport=void 0}resize_desktop(t){try{this.userInteraction?.resize(t.width,t.height)}catch(t){console.warn("The remote host would not resize its desktop:",t)}}focus_desktop(){var t;t=this.ironEl,t?.focus({preventScroll:!0})}async sync_keyboard_lock(){this.captureKeyboard&&w(this.el)?(await async function(t){if(f()&&w(t))try{await m().lock()}catch(t){console.warn("Failed to lock the keyboard for the RDP session:",t)}}(this.el),this.focus_desktop()):y()}describe_error(t){return t&&"function"==typeof t.backtrace?t.backtrace():t instanceof Error?t.message:"Connection failed."}handle_tunnel_closed(t){this.session_id=void 0,this.statusMessage=this.statusMessage??"Connection closed.",this.teardown_client(),this.close_comms()}handle_error(t){this.statusMessage=t.message,this.connectionStateChanged.emit([r.Error,t])}shutdown_session(t){try{t.shutdown()}catch(t){console.warn("Failed to shut the RDP session down cleanly:",t)}}teardown_client(){this.stop_viewport_sync(),y(),this.userInteraction&&(this.shutdown_session(this.userInteraction),this.userInteraction=void 0),this.ironEl?.remove(),this.ironEl=void 0,this.credentialsPrompt=!1,this.usernameBuffer="",this.passwordBuffer=""}submit_credentials(t){t.preventDefault(),this.credentialsPrompt=!1,this.credentials={username:this.usernameBuffer,password:this.passwordBuffer},this.usernameBuffer="",this.passwordBuffer="",this.request_tunnel()}render(){return i(o,{key:"56354df7bd0d3f01fcd5ff65ca5618ceb6af1b91"},i("div",{key:"446dc83e41a29c3bc2c341a26092ed3581565967",class:"screen",ref:t=>this.containerEl=t},i("slot",{key:"2beafc92d81662dfac5c7b41356f6c6c802643b9"})),this.credentialsPrompt&&i("form",{key:"dcc29b21fba03bb97526ec3d1cf5a1fb51b483e9",class:"prompt",onSubmit:t=>this.submit_credentials(t)},i("label",{key:"b5a3e302089b2282aedbdbefd4fb5eaca7c34455",htmlFor:"rdp-username"},"Username"),i("input",{key:"3bd1c902a6bc41bc7e69c16258cac78035a949bd",id:"rdp-username",type:"text",autocomplete:"off",autofocus:!0,onInput:t=>this.usernameBuffer=t.target.value}),i("label",{key:"2defe12d73b609cbad27c06447c3c3221ff3e5aa",htmlFor:"rdp-password"},"Password"),i("input",{key:"55935891f24f0c1db71a14c42b2fc7a96c0c0ba6",id:"rdp-password",type:"password",autocomplete:"off",onInput:t=>this.passwordBuffer=t.target.value}),i("button",{key:"83439c0e8756001c7042fc3b6754889d62a8eada",type:"submit"},"Connect")),this.statusMessage&&!this.credentialsPrompt&&i("div",{key:"294262625f44a3f45d54bcd492875a9b6fd03219",class:"status"},this.statusMessage))}static get watchers(){return{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}}};g.style=':host{display:block;width:100%;height:100%;min-width:0;min-height:0;overflow:hidden;position:relative;background:#0b1021;container-type:inline-size}.screen{width:100%;height:100%;display:flex}::slotted(iron-remote-desktop){display:block;flex:1 1 auto;min-width:0;min-height:0;width:100%;height:100%}:host(:fullscreen){width:100vw;height:100vh;background:#000}.prompt{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;background:rgba(11, 16, 33, 0.92);color:#e2e8f0;font-family:"Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace;font-size:0.875rem}.prompt input{padding:0.5rem 0.75rem;border:1px solid #334155;border-radius:0.375rem;background:#0f172a;color:inherit;font:inherit;min-width:16rem}.prompt input:focus{outline:2px solid #67e8f9;outline-offset:1px}.prompt button{margin-top:0.5rem;padding:0.5rem 1.25rem;border:0;border-radius:0.375rem;background:#67e8f9;color:#0b1021;font:inherit;font-weight:600;cursor:pointer}.status{position:absolute;inset-inline:0;bottom:0;padding:0.5rem 0.75rem;background:rgba(11, 16, 33, 0.92);color:#e2e8f0;font-family:"Berkeley Mono", "Fira Code", "SFMono-Regular", Menlo, monospace;font-size:0.8125rem;text-align:center}@container (max-width: 640px){.prompt{padding:1rem;gap:0.4rem}.prompt input{min-width:0;width:100%;max-width:22rem;font-size:16px;padding:0.625rem 0.75rem}.prompt button{width:100%;max-width:22rem;padding:0.75rem 1.25rem}.status{font-size:0.75rem;padding:0.5rem;padding-bottom:calc(0.5rem + env(safe-area-inset-bottom))}}';export{g as phirepass_rdp}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as r}from"./p-
|
|
1
|
+
import{p as e,b as r}from"./p-BVOulYtW.js";export{s as setNonce}from"./p-BVOulYtW.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const r=import.meta.url,o={};return""!==r&&(o.resourcesUrl=new URL(".",r).href),e(o)})().then((async e=>(await o(),r([["p-f1bc04a8",[[769,"phirepass-rdp",{serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"],serviceId:[1,"service-id"],token:[1],username:[1],password:[1],destination:[1],scale:[1],dynamicResize:[4,"dynamic-resize"],captureKeyboard:[4,"capture-keyboard"],clipboard:[4],serverId:[1,"server-id"],credentialsPrompt:[32],statusMessage:[32],toggleFullscreen:[64],keyboardLockSupported:[64],focusDesktop:[64],sendCtrlAltDel:[64],sendMetaKey:[64]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]],["p-c1c616ca",[[513,"phirepass-sftp-client",{name:[1],description:[1],hideHeader:[4,"hide-header"],serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"],serviceId:[1,"service-id"],token:[1],serverId:[1,"server-id"],channelFactory:[16],max:[32],show_login_screen:[32],show_login_screen_username:[32],show_error:[32],error_message:[32],show_login_screen_password:[32],show_navigation:[32],breadcrumbs:[32],current_dir:[32],listing:[32],show_content:[32],show_loader:[32],version:[32],status:[32],selected_item:[32],show_upload_modal:[32],upload_progress:[32],upload_file_name:[32],upload_speed:[32],upload_finished:[32],show_download_modal:[32],download_progress:[32],download_file_name:[32],download_speed:[32],download_finished:[32],show_delete_modal:[32],delete_file_name:[32],delete_loading:[32],delete_is_dir:[32],delete_recursive:[32],delete_error:[32],prompt_kind:[32],prompt_value:[32],prompt_error:[32],prompt_busy:[32],chmod_target:[32],chmod_mode:[32],chmod_error:[32],chmod_busy:[32],show_editor:[32],editor_name:[32],editor_text:[32],editor_saved_text:[32],editor_busy:[32],editor_error:[32],editor_confirm_discard:[32],editor_loaded:[32],filter:[32],sort_key:[32],sort_asc:[32],maximize:[64],minimize:[64]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]],["p-7ea2fdbc",[[513,"phirepass-terminal",{terminalOptions:[16],serverHost:[1,"server-host"],serverPort:[2,"server-port"],allowInsecure:[4,"allow-insecure"],heartbeatInterval:[2,"heartbeat-interval"],nodeId:[1,"node-id"],serviceId:[1,"service-id"],token:[1],keyBar:[1,"key-bar"],serverId:[1,"server-id"],channelFactory:[16],ctrlArmed:[32],altArmed:[32]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]]],e))));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Channel } from 'phirepass-channel';
|
|
2
|
-
import type { Browsing, FetchOptions, FetchSource, SubscribeScope } from './fetch';
|
|
3
2
|
/**
|
|
4
3
|
* The part of `phirepass-channel`'s `Channel` the widgets actually call.
|
|
5
4
|
*
|
|
@@ -18,32 +17,3 @@ export type ChannelLike = Pick<Channel, 'connect' | 'disconnect' | 'is_connected
|
|
|
18
17
|
* the WASM module is never initialised, since nothing would use it.
|
|
19
18
|
*/
|
|
20
19
|
export type ChannelFactory = (endpoint: string, nodeId: string, serverId?: string) => ChannelLike;
|
|
21
|
-
/**
|
|
22
|
-
* The Remote Fetch methods (plan task T1.10). They are not in the published
|
|
23
|
-
* `phirepass-channel` yet, so they are written out here rather than picked:
|
|
24
|
-
* once the WASM build carries them, replace this with a `Pick` like the one
|
|
25
|
-
* above so the two can never drift.
|
|
26
|
-
*
|
|
27
|
-
* Every id is the server-minted `download_id` (a uuid string). Each method that
|
|
28
|
-
* expects an answer takes the `msg_id` the answer (or an `Error`) echoes.
|
|
29
|
-
*/
|
|
30
|
-
export interface DownloadChannelMethods {
|
|
31
|
-
send_download_start(node_id: string, source: FetchSource, sub_dir: string | null, browsing: Browsing | null, in_order: boolean, options: FetchOptions, msg_id?: number | null): void;
|
|
32
|
-
send_download_stop(download_id: string, discard: boolean, msg_id?: number | null): void;
|
|
33
|
-
send_download_resume(download_id: string, ignore_window: boolean, msg_id?: number | null): void;
|
|
34
|
-
send_download_set_order(download_id: string, in_order: boolean, msg_id?: number | null): void;
|
|
35
|
-
send_download_delete(download_id: string, delete_file: boolean, msg_id?: number | null): void;
|
|
36
|
-
send_download_subscribe(scope: SubscribeScope): void;
|
|
37
|
-
send_download_where(node_id: string, browsing: Browsing, msg_id?: number | null): void;
|
|
38
|
-
send_download_folders(node_id: string, sub_dir: string | null, msg_id?: number | null): void;
|
|
39
|
-
}
|
|
40
|
-
/** What `<phirepass-downloader>` needs from a channel: the connection plumbing plus the download events. */
|
|
41
|
-
export type DownloadChannelLike = Pick<ChannelLike, 'connect' | 'disconnect' | 'is_connected' | 'authenticate' | 'start_heartbeat' | 'stop_heartbeat' | 'on_connection_open' | 'on_connection_close' | 'on_connection_error' | 'on_connection_message' | 'on_protocol_message'> & Partial<DownloadChannelMethods>;
|
|
42
|
-
export type DownloadChannelFactory = (endpoint: string, nodeId: string, serverId?: string) => DownloadChannelLike;
|
|
43
|
-
/**
|
|
44
|
-
* Whether this channel can speak Remote Fetch. A channel built from a
|
|
45
|
-
* `phirepass-channel` release older than T1.10 cannot, and the widgets then
|
|
46
|
-
* keep the feature out of sight instead of offering buttons that do nothing.
|
|
47
|
-
* The folder picker's method is optional (phase 4) and checked where used.
|
|
48
|
-
*/
|
|
49
|
-
export declare function supportsDownloads(channel: unknown): channel is DownloadChannelLike & DownloadChannelMethods;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { Channel as PhirepassChannel } from 'phirepass-channel';
|
|
3
2
|
import { ConnectionState } from '../../common/protocol';
|
|
4
3
|
/**
|
|
5
4
|
* Remote desktop over RDP.
|
|
@@ -11,8 +10,6 @@ import { ConnectionState } from '../../common/protocol';
|
|
|
11
10
|
* headers nor a subprotocol on the socket it opens. See `RDP.md` in
|
|
12
11
|
* `phirepass-rs` for why the session is split across two sockets.
|
|
13
12
|
*/
|
|
14
|
-
/** What the RDP widget calls on its channel. */
|
|
15
|
-
type RdpChannelLike = Pick<PhirepassChannel, 'connect' | 'disconnect' | 'is_connected' | 'authenticate' | 'start_heartbeat' | 'stop_heartbeat' | 'on_connection_open' | 'on_connection_close' | 'on_connection_error' | 'on_connection_message' | 'on_protocol_message' | 'open_rdp_tunnel'>;
|
|
16
13
|
export declare class PhirepassRdp {
|
|
17
14
|
private channel;
|
|
18
15
|
private containerEl?;
|
|
@@ -93,12 +90,6 @@ export declare class PhirepassRdp {
|
|
|
93
90
|
clipboard: boolean;
|
|
94
91
|
onNodeIdChange(newValue?: string, _oldValue?: string): void;
|
|
95
92
|
serverId?: string;
|
|
96
|
-
/**
|
|
97
|
-
* Supplies the channel instead of a WebSocket to the server — for demos,
|
|
98
|
-
* screenshots and tests, as on the terminal and SFTP client. A property
|
|
99
|
-
* only; read once, when the widget connects.
|
|
100
|
-
*/
|
|
101
|
-
channelFactory?: (endpoint: string, nodeId: string, serverId?: string) => RdpChannelLike;
|
|
102
93
|
onServerIdChange(_newValue?: string, _oldValue?: string): void;
|
|
103
94
|
connectionStateChanged: EventEmitter<[ConnectionState, unknown?]>;
|
|
104
95
|
private create_web_socket_endpoint;
|
|
@@ -208,4 +199,3 @@ export declare class PhirepassRdp {
|
|
|
208
199
|
private submit_credentials;
|
|
209
200
|
render(): any;
|
|
210
201
|
}
|
|
211
|
-
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import type { ChannelFactory } from '../../common/channel';
|
|
3
|
-
import { TorrentMenu } from './phirepass-sftp-client.fetch';
|
|
4
3
|
import { ConnectionState, SFTPListItem } from '../../common/protocol';
|
|
5
4
|
/** Which single-text-field dialog is open, if any. */
|
|
6
5
|
type PromptKind = 'mkdir' | 'rename';
|
|
7
6
|
type SortKey = 'name' | 'size' | 'modified';
|
|
8
7
|
export declare class PhirepassSftpClient {
|
|
9
|
-
el_host: HTMLElement;
|
|
10
8
|
private channel;
|
|
11
9
|
private domReady;
|
|
12
10
|
private runtimeReady;
|
|
@@ -104,33 +102,6 @@ export declare class PhirepassSftpClient {
|
|
|
104
102
|
filter: string;
|
|
105
103
|
sort_key: SortKey;
|
|
106
104
|
sort_asc: boolean;
|
|
107
|
-
/** True once the channel is authenticated: the downloader shares it from then on. */
|
|
108
|
-
channel_ready: boolean;
|
|
109
|
-
/** Running downloads, for the Fetch button's badge. */
|
|
110
|
-
fetch_count: number;
|
|
111
|
-
/** Files a download just finished into the open folder, highlighted as new. */
|
|
112
|
-
fresh_names: Array<string>;
|
|
113
|
-
/** K3: a part file whose download a delete would end. */
|
|
114
|
-
part_delete: {
|
|
115
|
-
download_id: string;
|
|
116
|
-
name: string;
|
|
117
|
-
busy: boolean;
|
|
118
|
-
} | null;
|
|
119
|
-
torrent_menu: TorrentMenu | null;
|
|
120
|
-
/** A listing file open in the player (not a download). */
|
|
121
|
-
listing_player: {
|
|
122
|
-
src: string;
|
|
123
|
-
name: string;
|
|
124
|
-
key: string;
|
|
125
|
-
} | null;
|
|
126
|
-
private downloaderEl?;
|
|
127
|
-
private fetch_enabled;
|
|
128
|
-
private stream_base;
|
|
129
|
-
private on_fetch_completed;
|
|
130
|
-
private on_show_in_folder;
|
|
131
|
-
private on_row_context_menu;
|
|
132
|
-
private play_listing_file;
|
|
133
|
-
private listing_can_play;
|
|
134
105
|
private toggle_max;
|
|
135
106
|
connectedCallback(): Promise<void>;
|
|
136
107
|
componentDidLoad(): void;
|
|
@@ -190,7 +161,6 @@ export declare class PhirepassSftpClient {
|
|
|
190
161
|
private disconnect_session;
|
|
191
162
|
private on_file_row_action;
|
|
192
163
|
private on_file_delete_action;
|
|
193
|
-
private open_delete_prompt;
|
|
194
164
|
private cancel_delete;
|
|
195
165
|
private confirm_delete;
|
|
196
166
|
private open_mkdir;
|