phirepass-widgets 0.0.72 → 0.0.74

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.
Files changed (28) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/phirepass-sftp-client.cjs.entry.js +20 -19
  3. package/dist/cjs/phirepass-terminal.cjs.entry.js +6 -5
  4. package/dist/cjs/phirepass-widgets.cjs.js +1 -1
  5. package/dist/cjs/{protocol-IOKYxtd-.js → protocol-Cldo-J8L.js} +23 -17
  6. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +38 -18
  7. package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +24 -4
  8. package/dist/collection/phirepass-channel_bg.wasm +0 -0
  9. package/dist/components/p-DuwTRFG1.js +1 -0
  10. package/dist/components/phirepass-sftp-client.js +1 -1
  11. package/dist/components/phirepass-terminal.js +2 -2
  12. package/dist/esm/loader.js +1 -1
  13. package/dist/esm/phirepass-sftp-client.entry.js +20 -19
  14. package/dist/esm/phirepass-terminal.entry.js +6 -5
  15. package/dist/esm/phirepass-widgets.js +1 -1
  16. package/dist/esm/{protocol-CB680LkG.js → protocol-DuwTRFG1.js} +22 -16
  17. package/dist/phirepass-widgets/{p-82d89f76.entry.js → p-6da808f9.entry.js} +2 -2
  18. package/dist/phirepass-widgets/p-7c0f5848.entry.js +1 -0
  19. package/dist/phirepass-widgets/p-DuwTRFG1.js +1 -0
  20. package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
  21. package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
  22. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +1 -0
  23. package/dist/types/components/phirepass-terminal/phirepass-terminal.d.ts +1 -0
  24. package/dist/types/components.d.ts +8 -2
  25. package/package.json +2 -2
  26. package/dist/components/p-CB680LkG.js +0 -1
  27. package/dist/phirepass-widgets/p-845f353c.entry.js +0 -1
  28. package/dist/phirepass-widgets/p-CB680LkG.js +0 -1
@@ -6,7 +6,7 @@ var appGlobals = require('./app-globals-V2Kpy_OQ.js');
6
6
  const defineCustomElements = async (win, options) => {
7
7
  if (typeof window === 'undefined') return undefined;
8
8
  await appGlobals.globalScripts();
9
- return index.bootstrapLazy([["phirepass-sftp-client.cjs",[[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"],"token":[1],"serverId":[1,"server-id"],"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],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal.cjs",[[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"],"token":[1],"serverId":[1,"server-id"]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
9
+ return index.bootstrapLazy([["phirepass-sftp-client.cjs",[[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"],"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],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal.cjs",[[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],"serverId":[1,"server-id"]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
10
10
  };
11
11
 
12
12
  exports.setNonce = index.setNonce;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D-l8xaCI.js');
4
- var protocol = require('./protocol-IOKYxtd-.js');
4
+ var protocol = require('./protocol-Cldo-J8L.js');
5
5
 
6
6
  const phirepassSftpClientLogoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10ZXJtaW5hbCB3LTMuNSBoLTMuNSB0ZXh0LXByaW1hcnkiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iNCAxNyAxMCAxMSA0IDUiPjwvcG9seWxpbmU+CiAgICA8bGluZSB4MT0iMTIiIHgyPSIyMCIgeTE9IjE5IiB5Mj0iMTkiPjwvbGluZT4KPC9zdmc+Cg==';
7
7
 
@@ -53,6 +53,7 @@ const PhirepassSftpClient = class {
53
53
  allowInsecure = false;
54
54
  heartbeatInterval = 30_000;
55
55
  nodeId;
56
+ serviceId;
56
57
  token;
57
58
  onNodeIdChange(newValue, _oldValue) {
58
59
  // Handle the change in node_id here
@@ -350,7 +351,7 @@ const PhirepassSftpClient = class {
350
351
  this.clear_creds_buffer();
351
352
  this.version = auth.version;
352
353
  this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
353
- this.channel.open_sftp_tunnel(this.nodeId);
354
+ this.channel.open_sftp_tunnel(this.nodeId, this.serviceId);
354
355
  this.status = 'Connected';
355
356
  }
356
357
  handle_tunnel_opened(web) {
@@ -925,18 +926,18 @@ const PhirepassSftpClient = class {
925
926
  return `${typeChar}${chars.join('')}`;
926
927
  }
927
928
  render() {
928
- return (index.h(index.Host, { key: '733fe85191c976aa3f1a1888aaf6b8ac66b78bce', class: {
929
+ return (index.h(index.Host, { key: '693cdfaab69be7ba55dd7333ac5f8ed5ccb0dbce', class: {
929
930
  'default': !this.max,
930
931
  'max': this.max,
931
- } }, index.h("section", { key: 'd2282996dfa3970f6e60713417872958b0273257', class: "listing" }, !this.hideHeader &&
932
- index.h("header", { key: 'c270d12cf1da32374f0bdcb650f3ad4f6e6701c1' }, index.h("section", { key: '670335955f4f453d687c5315fe4e9b4b64c69ff7', class: "title" }, index.h("img", { key: '9c4be4e7366ff1e3cd11d633b31beb625671be2b', src: phirepassSftpClientLogoSvg, alt: "SFTP Client" }), index.h("div", { key: 'bcb3764dc20d9d6b01fca4b3d9a7d4371a621403', class: "text" }, index.h("div", { key: 'bf036e8de51caf4fb468051edd0625e30ade4f62', class: "name" }, this.name), index.h("div", { key: '9f042ed7412611dde5cacf7e66a7373049175da3', class: "description" }, this.description))), index.h("section", { key: '46028c58138f41f8cfb0f355fd403cfbeada8559', class: "actions" }, index.h("div", { key: '2613d4578a05d5b4ba5a27a6d7f0bb199692305c', class: "action", onClick: () => this.toggle_max() }, index.h("img", { key: 'afbd51291e77e0a34bc429eacc3f92aafa72e65e', src: phirepassSftpClientMaxSvg, alt: "Maximize" })))), index.h("main", { key: '200d355da53b9a777d870d472c279dc93cfae8ee' }, this.show_navigation && index.h("nav", { key: 'a2a6d1f87818c9abfb8be2fbe7198ef3986efab5', class: "navigation" }, index.h("div", { key: 'b6d8104e7063e4011efd6510fc6f3fa33ad0c28d', class: "breadcrumbs" }, this.breadcrumbs.map((crumb, index$1, breadcrumbs) => (index.h("span", { key: index$1, class: "breadcrumb-container" }, index.h("span", { key: index$1, onClick: () => this.list_breadcrumb(crumb.path), class: "breadcrumb" }, crumb.label), index$1 < breadcrumbs.length - 1 && index.h("img", { class: "arrow", src: phirepassSftpClientChevronSvg }))))), index.h("section", { key: '86b69b8d759e1fc8a52c7f3f1cd90c318d1d413d', class: "actions", "aria-label": "SFTP actions" }, index.h("button", { key: 'c69af8d208771d2788d055fa92fb396f567972e1', type: "button", class: "action", onClick: () => this.go_to_parent_directory(), title: "Go to parent directory", "aria-label": "Go to parent directory" }, index.h("img", { key: 'e7c0eaf4d8983369a68506084e77f20cc29184c8', src: phirepassSftpClientGoUpSvg, alt: "Go up" })), index.h("button", { key: '0e8b47e93b2825bc0e60b0c75d961609c2b98158', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, index.h("img", { key: '1a8d0178825ac27fb85584a36bd2d660fe09c135', src: phirepassSftpClientRefreshSvg, alt: "Refresh" })), index.h("button", { key: 'fddbb65e05c0a9d800dc901bea49c9352099085d', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, index.h("img", { key: 'cbb5517d854064846a05ee56ef959ed79308b9ad', src: phirepassSftpClientUploadSvg, alt: "Upload" })), index.h("button", { key: '15f521ad9359057a75fc13ab0336fd9803b9c432', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), index.h("input", { key: '48f7a635ea1e93a60e5b64042e730b3af5816ce9', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && index.h("div", { key: '7a977051ab3ccd46524a53c590e52c33904375e4', class: "content" }, index.h("table", { key: '0ac3ae940c7ae094ca99a1c07b37980a9d5a06c4' }, index.h("thead", { key: 'f8141383e987cd435a4f89b9d85b5d373559ec1c' }, index.h("tr", { key: '88479b89f19e1364afaf284b7947c754457c2aa5' }, index.h("th", { key: '1ad5c30387a14041ff7f45e1caaffe39c4972b3f' }, "Name"), index.h("th", { key: 'b80c51a07e6e144b8d21698b1a4e6116eb36cb3a' }, "Size"), index.h("th", { key: '9265bd2250aeb15ff19224f3247b0ec4c8678d7c' }, "Permissions"), index.h("th", { key: '6c9488fced66224aee51e9193b7beb4d0ea05a04' }, "Owner"), index.h("th", { key: 'b741ca68c2ec44243160d5e9f64271c488381713' }, "Modified"), index.h("th", { key: 'a6717e7f50003dc7cb14c2c46b5141afaca3eef1', class: "action-col", "aria-label": "Actions" }))), index.h("tbody", { key: '2406bf5112dff02abcb4952a19718398b43e6635' }, this.listing.map((item, index$1) => (index.h("tr", { key: index$1, class: {
932
+ } }, index.h("section", { key: '504d57b244dd055f23b81807ef6a397032dcf088', class: "listing" }, !this.hideHeader &&
933
+ index.h("header", { key: 'cef1e0a272851379e6d9ca07092b8078c94e2509' }, index.h("section", { key: '49fe94d69837676a46e3c92f54496c2ffa1e3ecd', class: "title" }, index.h("img", { key: 'cec6b64508c31904b34496cc34b26f81ae3e290e', src: phirepassSftpClientLogoSvg, alt: "SFTP Client" }), index.h("div", { key: '3331b32275581f9bcf79b4b346e9820018868cbf', class: "text" }, index.h("div", { key: '289f2fef2e14c0a1954a99f6bbd920edbf66bf42', class: "name" }, this.name), index.h("div", { key: '8c88da9841dc39373f94cb313c7897cbc5a828a3', class: "description" }, this.description))), index.h("section", { key: 'f6f7ae566a225586c4a79ba31eecf998a1df010b', class: "actions" }, index.h("div", { key: 'd1a5e9c21e61320035eafe255213e883140815c4', class: "action", onClick: () => this.toggle_max() }, index.h("img", { key: '10f834c7a7846964bc84c2fd6eef39b09fa33e8f', src: phirepassSftpClientMaxSvg, alt: "Maximize" })))), index.h("main", { key: 'e17ee5827dc56cea9139697ce9024011a638e5ff' }, this.show_navigation && index.h("nav", { key: '277080aa09d738f21605d95d1bf70adc9156dfbb', class: "navigation" }, index.h("div", { key: '526b99f6b6c1161e41ee6dfcd13b48f8e52f85eb', class: "breadcrumbs" }, this.breadcrumbs.map((crumb, index$1, breadcrumbs) => (index.h("span", { key: index$1, class: "breadcrumb-container" }, index.h("span", { key: index$1, onClick: () => this.list_breadcrumb(crumb.path), class: "breadcrumb" }, crumb.label), index$1 < breadcrumbs.length - 1 && index.h("img", { class: "arrow", src: phirepassSftpClientChevronSvg }))))), index.h("section", { key: '61a48831425637dc03662f6a8748619745a13b7b', class: "actions", "aria-label": "SFTP actions" }, index.h("button", { key: '53f150ed1579a653a6f843106ba14534156d46d2', type: "button", class: "action", onClick: () => this.go_to_parent_directory(), title: "Go to parent directory", "aria-label": "Go to parent directory" }, index.h("img", { key: 'dd9853885e3a18882ded99fb28e0e270a9e8bb2b', src: phirepassSftpClientGoUpSvg, alt: "Go up" })), index.h("button", { key: '5a2a2f865b5169d2187cf5c8d5aa876163d708d3', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, index.h("img", { key: '62752fa2e46faf222fedd7f5f8a6e7d81242a089', src: phirepassSftpClientRefreshSvg, alt: "Refresh" })), index.h("button", { key: '09fe21b04d27e7e1abd87b14789e6bd8faa68a98', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, index.h("img", { key: '0b4ab6f686c7261844221835836e2dbee86866bf', src: phirepassSftpClientUploadSvg, alt: "Upload" })), index.h("button", { key: 'eab9cf7df64384db2cfb383ba2bc87ff84e9ef63', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), index.h("input", { key: '05609273cfc54c019f801768e560365845c38671', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && index.h("div", { key: 'ed910c6b7c2d5ac17e13fef9fd4597b1406b7d85', class: "content" }, index.h("table", { key: 'c28ed3308bf01665e313e1f8b8fb482f2dc0303a' }, index.h("thead", { key: '187c2e34ed9cbe57ea13083645472f0dc6f2e957' }, index.h("tr", { key: 'd43d3d698ba06cc24bc9fba9946a0bcf382327a1' }, index.h("th", { key: '8128742b1975b1c655e5665256cceb8f63441450' }, "Name"), index.h("th", { key: '35f91f13e38b62dfa97c742f4f23d14495f71462' }, "Size"), index.h("th", { key: '89f10d37b9558aadfc1e10e6729ef0bc63f30216' }, "Permissions"), index.h("th", { key: '51905e8a7d3391119290b59fb0f36420b23b5331' }, "Owner"), index.h("th", { key: 'a2133c42789fb79ec0bfd91c1ffe4f869a8b0acf' }, "Modified"), index.h("th", { key: 'a3b72803212e5ba60249777cdad37341c101a4b5', class: "action-col", "aria-label": "Actions" }))), index.h("tbody", { key: 'e5ee4a1cd8943a4966d33a43ee04df5f355f21e0' }, this.listing.map((item, index$1) => (index.h("tr", { key: index$1, class: {
933
934
  'selected': this.is_selected(item),
934
935
  }, onClick: () => this.list_directory(item) }, index.h("td", null, item.kind === 'Folder' ? index.h("img", { class: "kind", src: phirepassSftpClientFolderSvg, alt: "Folder" }) : index.h("img", { class: "kind", src: phirepassSftpClientFileSvg, alt: "File" }), index.h("span", { class: `name ${item.kind.toLowerCase()}` }, item.name)), index.h("td", null, this.format_size(item.attributes.size)), index.h("td", null, this.format_permissions(item.attributes.permissions, item.kind)), index.h("td", null, item.attributes.user ?? '-'), index.h("td", null, new Date(item.attributes.modified * 1000).toLocaleString()), index.h("td", { class: "action-col" }, item.kind === 'File' &&
935
- index.h("div", { class: "file-actions" }, index.h("button", { type: "button", class: "file-action", onClick: (event) => this.on_file_row_action(item, event), title: "Download", "aria-label": "Download" }, index.h("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" }, index.h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), index.h("polyline", { points: "7 10 12 15 17 10" }), index.h("line", { x1: "12", x2: "12", y1: "15", y2: "3" }))), index.h("button", { type: "button", class: "file-action delete", onClick: (event) => this.on_file_delete_action(item, event), title: "Delete", "aria-label": "Delete" }, index.h("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" }, index.h("polyline", { points: "3 6 5 6 21 6" }), index.h("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), index.h("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), index.h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), index.h("line", { x1: "14", x2: "14", y1: "11", y2: "17" }))))))))))), this.show_loader && index.h("div", { key: 'aa63f480151a0143183f8769413bbf1d8bad517a', class: "loader" }, "Loading..."), this.show_error && index.h("div", { key: '3ca7fe377368a520de804391d8939627e956e3d0', class: "error" }, this.error_message)), index.h("footer", { key: '71a1233b255561b5e0cf4408c268ab399982cb7f' }, index.h("section", { key: '5533f9b423be66da41ff7128b903e09bcd447c4c', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
936
- index.h("section", { key: '6dc948c828b479b6d706dbcca3b3075e58757cef', class: {
936
+ index.h("div", { class: "file-actions" }, index.h("button", { type: "button", class: "file-action", onClick: (event) => this.on_file_row_action(item, event), title: "Download", "aria-label": "Download" }, index.h("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" }, index.h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), index.h("polyline", { points: "7 10 12 15 17 10" }), index.h("line", { x1: "12", x2: "12", y1: "15", y2: "3" }))), index.h("button", { type: "button", class: "file-action delete", onClick: (event) => this.on_file_delete_action(item, event), title: "Delete", "aria-label": "Delete" }, index.h("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" }, index.h("polyline", { points: "3 6 5 6 21 6" }), index.h("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), index.h("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), index.h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), index.h("line", { x1: "14", x2: "14", y1: "11", y2: "17" }))))))))))), this.show_loader && index.h("div", { key: '30777c73738f9c6a5199033428d9033d0cd05b99', class: "loader" }, "Loading..."), this.show_error && index.h("div", { key: '0a5bc583f268e00c1bf17661ea1f49bccaba6ab9', class: "error" }, this.error_message)), index.h("footer", { key: '94aff725f14e25d8c34719cbf2decdd5e17b8e22' }, index.h("section", { key: '6342e9ce4b7fe08e12d62406f203127a0c872055', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
937
+ index.h("section", { key: '039eeae64731e54a5bf0982777815c8ad0df6b49', class: {
937
938
  'creds': true,
938
939
  'blurred': this.show_login_screen,
939
- } }, index.h("form", { key: 'a7f60c3dcc672cc18f1ec67a45495eb756ae9c92', class: "auth", onSubmit: (event) => {
940
+ } }, index.h("form", { key: '6670d05c61c412bbc1f8d26f317b4aea4614f428', class: "auth", onSubmit: (event) => {
940
941
  const formData = new FormData(event.target);
941
942
  let username = undefined;
942
943
  if (this.show_login_screen_username) {
@@ -946,35 +947,35 @@ const PhirepassSftpClient = class {
946
947
  if (this.show_login_screen_password) {
947
948
  password = formData.get('password');
948
949
  }
949
- this.channel.open_sftp_tunnel(this.nodeId, username, password);
950
+ this.channel.open_sftp_tunnel(this.nodeId, this.serviceId, username, password);
950
951
  this.show_login_screen_username = false;
951
952
  this.show_login_screen_password = false;
952
953
  this.show_login_screen = false;
953
954
  this.show_loader = true;
954
955
  event.stopPropagation();
955
956
  event.preventDefault();
956
- } }, index.h("div", { key: 'b0f3c4b74c59590624d4944b8d6ccd5a45b6065c', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
957
- index.h("div", { key: '2d6d9424cd170e087cc6f17d55c8cf1461a06988' }, index.h("label", { key: 'e420f513abc053a99c0e61c27716ff39f0527827', htmlFor: "username" }, "Username"), index.h("input", { key: 'c50aff8ff53e8ed3b3dbb5d0cc85055b247864cf', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
958
- index.h("div", { key: '8f49b0425783375996484b536c58f07414215b44' }, index.h("label", { key: 'ed739b253b2bfa7dc6bab37dbf184b0c9eacf657', htmlFor: "password" }, "Password"), index.h("input", { key: 'd1be51c537fb0461678ede0e940fd312d96c1517', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), index.h("div", { key: '66da4c8d32459483a1b0329473287e89a82c5e4c' }, index.h("button", { key: 'cf5a2534f2a6abc344e999520bb4328c4dadd090', type: "submit" }, "Connect")))), this.show_upload_modal &&
959
- index.h("section", { key: 'b678714eff09b18b7932e936ae4dee366aa98b4e', class: {
957
+ } }, index.h("div", { key: 'c899712c9ee14f4490617a316d3bbc631d794fde', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
958
+ index.h("div", { key: '8088ac918f3455ff6bf2e2d50eb4fa8c18b58a97' }, index.h("label", { key: '850f947b1639782b1d6f4011a809466f8a43e7de', htmlFor: "username" }, "Username"), index.h("input", { key: '7fb4f67d37d84d6329840525de602a5b74675580', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
959
+ index.h("div", { key: '79633deeb5499a0fd120aba6a0875e7d78dc429a' }, index.h("label", { key: 'b911b56f1676d70e703c7fb318c6f48c52f08031', htmlFor: "password" }, "Password"), index.h("input", { key: '80ebcebc0a118f24c85f43a6bd89d5de0dbfec1c', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), index.h("div", { key: 'a1c8a2677ae4614e9cc11884aa226757bcccbcf3' }, index.h("button", { key: 'cfcd552766c53d63f8cc1cb46b328639fdad189f', type: "submit" }, "Connect")))), this.show_upload_modal &&
960
+ index.h("section", { key: '98243073570a448b37137c4b9910e809defa80ca', class: {
960
961
  'upload-modal': true,
961
962
  'visible': this.show_upload_modal,
962
- } }, index.h("div", { key: 'c4fa4e401c192e705207df634d2f93943ce77af5', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, index.h("div", { key: '18ff3a246aa39f28474ced7cce76ace778922a2f', class: "title" }, "Uploading File"), index.h("div", { key: 'b08fa6b79f6080e9d60f361021b8bac6a5ed7424', class: "file-name", title: this.upload_file_name }, this.upload_file_name), index.h("div", { key: '9efc45e387d8156a18afb90d5531df4ebfa64328', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, index.h("div", { key: 'c988402fedde675d04bc7b2054da4e319c2af082', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), index.h("div", { key: '1d0d8f845d3bfa817aec865598cffa59f55505f4', class: "progress-meta" }, index.h("div", { key: '5b983ed819d48105c3fb0a71b2d2d62f7f46003c', class: "progress-speed" }, this.upload_speed), index.h("div", { key: '859bb76ff953d69ddaa710574bb1c72b92968f5a', class: "progress-value" }, this.format_percent(this.upload_progress))), index.h("button", { key: '41d970d2112e63f931c5a5513bb580559f9e619b', type: "button", class: {
963
+ } }, index.h("div", { key: '382070ac49b529b3bd395bd7bd74f4d3ef636a53', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, index.h("div", { key: 'ab42477909654bd992d4261ff041cef1d5a139be', class: "title" }, "Uploading File"), index.h("div", { key: 'c17d2db8e7bf9ddb2e80e32d609ca5a9bf55ceba', class: "file-name", title: this.upload_file_name }, this.upload_file_name), index.h("div", { key: 'e5d6c359b82093ded872c98e965902c7f628c052', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, index.h("div", { key: '737c05d515f8163b24f0c5c7d44d978f0d80ebb8', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), index.h("div", { key: '5ec3c4970d811aaf977d71e3f2ba84cc5410a490', class: "progress-meta" }, index.h("div", { key: '18d83a68b795db0028b0ef7a5cbd51b46b29c280', class: "progress-speed" }, this.upload_speed), index.h("div", { key: '65d7b3a0b1dd5e34e00501c838ac674e2f9bc5e1', class: "progress-value" }, this.format_percent(this.upload_progress))), index.h("button", { key: 'bf6c636c3851f6fed2b1592e0bdb443108215737', type: "button", class: {
963
964
  'cancel': true,
964
965
  'finished': this.upload_finished,
965
966
  }, onClick: () => this.cancel_upload() }, this.upload_finished ? 'Close' : 'Cancel'))), this.show_download_modal &&
966
- index.h("section", { key: 'd9bfadbc2d3a164bc05811a7f2e9024a914ecbc8', class: {
967
+ index.h("section", { key: '0e3228077c259748f738be9d0a8eb11a9d64c36d', class: {
967
968
  'download-modal': true,
968
969
  'visible': this.show_download_modal,
969
- } }, index.h("div", { key: '1f874ba0e526b99d2b41beaf8023cbada567ecc8', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, index.h("div", { key: 'ac2b5f65423e7e2b20ffecf864477e849b737259', class: "title" }, "Downloading File"), index.h("div", { key: '639d6fe5a64db1aa53b077eb318fa21d72a551ed', class: "file-name", title: this.download_file_name }, this.download_file_name), index.h("div", { key: 'e90546d4dceab157f4599b2ffd31f1eb4eb9d18c', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, index.h("div", { key: 'eeb597904e31a6aa9717cc4e6fc534ae68924dee', class: "progress-fill", style: { width: `${this.download_progress}%` } })), index.h("div", { key: '1bbf952144d17c374de6948ad94bc4deed7ae8a0', class: "progress-meta" }, index.h("div", { key: '049f748019b11cea95f236202cd48c758e99411a', class: "progress-speed" }, this.download_speed), index.h("div", { key: '01b8d063a3fdfe8cc9df21e75833df3a6c2eda49', class: "progress-value" }, this.format_percent(this.download_progress))), index.h("button", { key: 'a87560c1555bf8a6dea73a424792b3af25e06a68', type: "button", class: {
970
+ } }, index.h("div", { key: '2ddabbc1c6c7490b9f99e267545f891d36b1a080', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, index.h("div", { key: '64c1050634a226f7b04288b83a7b782ae0403c1f', class: "title" }, "Downloading File"), index.h("div", { key: '0e93810dfaaccec1f00ee89bba31fba8812f0640', class: "file-name", title: this.download_file_name }, this.download_file_name), index.h("div", { key: '6a2959f17fe2f0fe1ce5f4f272886491f7fc8830', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, index.h("div", { key: '71ca2cd68130d227c23817f97aa906df489ce350', class: "progress-fill", style: { width: `${this.download_progress}%` } })), index.h("div", { key: '834133dc9640a086b1d2a38ac24bfa02567a333d', class: "progress-meta" }, index.h("div", { key: '186e4d8167c207152e3b4c449c261d3e456b6ec7', class: "progress-speed" }, this.download_speed), index.h("div", { key: '69266fdc80cebced89c140016252e8e88fb012f2', class: "progress-value" }, this.format_percent(this.download_progress))), index.h("button", { key: '28238539b683c475bb8f13920485b3a7d209ddde', type: "button", class: {
970
971
  'cancel': true,
971
972
  'finished': this.download_finished,
972
973
  }, onClick: () => this.cancel_download() }, this.download_finished ? 'Close' : 'Cancel'))), this.show_delete_modal &&
973
- index.h("section", { key: '7e547c5f320acc9920020a4bcafc21ca57d6ad66', class: {
974
+ index.h("section", { key: '6ab3a87e386f08aa6cb5ee52de1a53d634411991', class: {
974
975
  'delete-modal': true,
975
976
  'visible': this.show_delete_modal,
976
- } }, index.h("div", { key: 'b79c2be285b8e2af00189cd69143950f133f5722', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, index.h("div", { key: 'b25d1669edded42eae34ac15887428d85a3e8577', class: "title" }, "Delete File"), index.h("div", { key: 'da2a16b8f85ae7dc7d09aa2ffe4562124642233f', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), index.h("div", { key: '702dfa13f1e9b828c2d956cab0c1fcc557c80bb1', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading &&
977
- index.h("div", { key: '1e2b57c73dad6f463c3377c16ae407cc553232e3', class: "delete-loader", "aria-hidden": "true" }, index.h("span", { key: '40338e85202b89cb8b2fea8adddf10323fa91a25', class: "spinner" })), index.h("div", { key: 'e0b264439056ab3e7f49f5dd221b5f58ea720d2e', class: "modal-actions" }, index.h("button", { key: 'ee6932fa56c02bca43c6ce914cec55ca9dbfd48a', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), index.h("button", { key: '2c26e30cc0942f532996a3b485ad77fb11c2d214', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
977
+ } }, index.h("div", { key: 'ccaed2c02103afda40b507d374836ff994f0540d', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, index.h("div", { key: '19edbb28e08b513aec244baf59c1ab6798b11a45', class: "title" }, "Delete File"), index.h("div", { key: 'b98b4a138129f18a395dd7700ce50621049e2cf3', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), index.h("div", { key: '3af3fffa9a5e2b3bc8bf8a2d3d302fcce119a246', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading &&
978
+ index.h("div", { key: '09a78a79af88cb055cbc6e160c59b44c2be43fab', class: "delete-loader", "aria-hidden": "true" }, index.h("span", { key: '40d4285d22b51c62b4bac87ae5201ccb45721406', class: "spinner" })), index.h("div", { key: 'c3a475f37d3912755b3a6845ce49569429fc9a13', class: "modal-actions" }, index.h("button", { key: '3da31bcd06554c7463dc82e3f895fbcfe2551486', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), index.h("button", { key: '1eafd821e308588c87f334d1fdbb05b9a6ae70ef', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
978
979
  }
979
980
  static get watchers() { return {
980
981
  "nodeId": [{
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-D-l8xaCI.js');
4
- var protocol = require('./protocol-IOKYxtd-.js');
4
+ var protocol = require('./protocol-Cldo-J8L.js');
5
5
 
6
6
  /**
7
7
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
@@ -298,6 +298,7 @@ const PhirepassTerminal = class {
298
298
  allowInsecure = false;
299
299
  heartbeatInterval = 30_000;
300
300
  nodeId;
301
+ serviceId;
301
302
  token;
302
303
  onNodeIdChange(newValue, _oldValue) {
303
304
  // Handle the change in node_id here
@@ -554,7 +555,7 @@ const PhirepassTerminal = class {
554
555
  handle_auth_success(_auth_) {
555
556
  this.clear_creds_buffer();
556
557
  this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
557
- this.channel.open_ssh_tunnel(this.nodeId);
558
+ this.channel.open_ssh_tunnel(this.nodeId, this.serviceId);
558
559
  }
559
560
  handle_tunnel_opened(web) {
560
561
  this.session_id = web.sid;
@@ -649,7 +650,7 @@ const PhirepassTerminal = class {
649
650
  return;
650
651
  }
651
652
  this.inputMode = protocol.InputMode.Default;
652
- this.channel.open_ssh_tunnel(this.nodeId, username);
653
+ this.channel.open_ssh_tunnel(this.nodeId, this.serviceId, username);
653
654
  }
654
655
  handle_password_input(data) {
655
656
  if (data === "\r" || data === "\n") {
@@ -688,13 +689,13 @@ const PhirepassTerminal = class {
688
689
  this.inputMode = protocol.InputMode.Default;
689
690
  // Assuming there's a method to submit password to the channel
690
691
  // You may need to adjust this based on your actual API
691
- this.channel.open_ssh_tunnel(this.nodeId, this.usernameBuffer.trim(), password);
692
+ this.channel.open_ssh_tunnel(this.nodeId, this.serviceId, this.usernameBuffer.trim(), password);
692
693
  // Clear sensitive data
693
694
  this.passwordBuffer = "";
694
695
  this.usernameBuffer = "";
695
696
  }
696
697
  render() {
697
- return (index.h(index.Host, { key: '641344887f33ba9c4c8aa98186b84a92ebb020e7' }, index.h("div", { key: '558aebfd21575d5dbdaacf03335485941373679a', id: "ccc", ref: el => (this.containerEl = el) })));
698
+ return (index.h(index.Host, { key: '8bc2181d5ca26f6e6552591b7d399f81bece3efa' }, index.h("div", { key: '4c7085ba44cebb23f7712fbfe4ea52a9e8bde6d7', id: "ccc", ref: el => (this.containerEl = el) })));
698
699
  }
699
700
  static get watchers() { return {
700
701
  "nodeId": [{
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["phirepass-sftp-client.cjs",[[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"],"token":[1],"serverId":[1,"server-id"],"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],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal.cjs",[[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"],"token":[1],"serverId":[1,"server-id"]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
22
+ return index.bootstrapLazy([["phirepass-sftp-client.cjs",[[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"],"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],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal.cjs",[[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],"serverId":[1,"server-id"]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -147,33 +147,39 @@ class Channel {
147
147
  }
148
148
  /**
149
149
  * @param {string} node_id
150
+ * @param {string} service_id
150
151
  * @param {string | null} [username]
151
152
  * @param {string | null} [password]
152
153
  * @param {number | null} [msg_id]
153
154
  */
154
- open_sftp_tunnel(node_id, username, password, msg_id) {
155
+ open_sftp_tunnel(node_id, service_id, username, password, msg_id) {
155
156
  const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
156
157
  const len0 = WASM_VECTOR_LEN;
157
- var ptr1 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
158
- var len1 = WASM_VECTOR_LEN;
159
- var ptr2 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
158
+ const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
159
+ const len1 = WASM_VECTOR_LEN;
160
+ var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
160
161
  var len2 = WASM_VECTOR_LEN;
161
- wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
162
+ var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
163
+ var len3 = WASM_VECTOR_LEN;
164
+ wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
162
165
  }
163
166
  /**
164
167
  * @param {string} node_id
168
+ * @param {string} service_id
165
169
  * @param {string | null} [username]
166
170
  * @param {string | null} [password]
167
171
  * @param {number | null} [msg_id]
168
172
  */
169
- open_ssh_tunnel(node_id, username, password, msg_id) {
173
+ open_ssh_tunnel(node_id, service_id, username, password, msg_id) {
170
174
  const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
171
175
  const len0 = WASM_VECTOR_LEN;
172
- var ptr1 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
173
- var len1 = WASM_VECTOR_LEN;
174
- var ptr2 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
176
+ const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
177
+ const len1 = WASM_VECTOR_LEN;
178
+ var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
175
179
  var len2 = WASM_VECTOR_LEN;
176
- wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
180
+ var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
181
+ var len3 = WASM_VECTOR_LEN;
182
+ wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
177
183
  }
178
184
  /**
179
185
  * @param {string} node_id
@@ -427,7 +433,7 @@ function __wbg_get_imports() {
427
433
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
428
434
  return addHeapObject(ret);
429
435
  }, arguments); },
430
- __wbg_info_2f2b0f083e705d41: function(arg0, arg1) {
436
+ __wbg_info_a035e9398ce057dc: function(arg0, arg1) {
431
437
  console.info(getStringFromWasm0(arg0, arg1));
432
438
  },
433
439
  __wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
@@ -499,7 +505,7 @@ function __wbg_get_imports() {
499
505
  __wbg_set_onopen_ca8d311fe5282041: function(arg0, arg1) {
500
506
  getObject(arg0).onopen = getObject(arg1);
501
507
  },
502
- __wbg_warn_7b140f9c52075c0d: function(arg0, arg1) {
508
+ __wbg_warn_1087e5a6742be100: function(arg0, arg1) {
503
509
  console.warn(getStringFromWasm0(arg0, arg1));
504
510
  },
505
511
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
@@ -518,8 +524,8 @@ function __wbg_get_imports() {
518
524
  return addHeapObject(ret);
519
525
  },
520
526
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
521
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
522
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_46);
527
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
528
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_44);
523
529
  return addHeapObject(ret);
524
530
  },
525
531
  __wbindgen_cast_0000000000000005: function(arg0) {
@@ -556,8 +562,8 @@ function __wbg_get_imports() {
556
562
  };
557
563
  }
558
564
 
559
- function __wasm_bindgen_func_elem_46(arg0, arg1) {
560
- wasm.__wasm_bindgen_func_elem_46(arg0, arg1);
565
+ function __wasm_bindgen_func_elem_44(arg0, arg1) {
566
+ wasm.__wasm_bindgen_func_elem_44(arg0, arg1);
561
567
  }
562
568
 
563
569
  function __wasm_bindgen_func_elem_42(arg0, arg1, arg2) {
@@ -869,7 +875,7 @@ async function __wbg_init(module_or_path) {
869
875
  }
870
876
 
871
877
  if (module_or_path === undefined) {
872
- module_or_path = new URL('phirepass-channel_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('protocol-IOKYxtd-.js', document.baseURI).href)));
878
+ module_or_path = new URL('phirepass-channel_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('protocol-Cldo-J8L.js', document.baseURI).href)));
873
879
  }
874
880
  const imports = __wbg_get_imports();
875
881
 
@@ -37,6 +37,7 @@ export class PhirepassSftpClient {
37
37
  allowInsecure = false;
38
38
  heartbeatInterval = 30_000;
39
39
  nodeId;
40
+ serviceId;
40
41
  token;
41
42
  onNodeIdChange(newValue, _oldValue) {
42
43
  // Handle the change in node_id here
@@ -334,7 +335,7 @@ export class PhirepassSftpClient {
334
335
  this.clear_creds_buffer();
335
336
  this.version = auth.version;
336
337
  this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
337
- this.channel.open_sftp_tunnel(this.nodeId);
338
+ this.channel.open_sftp_tunnel(this.nodeId, this.serviceId);
338
339
  this.status = 'Connected';
339
340
  }
340
341
  handle_tunnel_opened(web) {
@@ -909,18 +910,18 @@ export class PhirepassSftpClient {
909
910
  return `${typeChar}${chars.join('')}`;
910
911
  }
911
912
  render() {
912
- return (h(Host, { key: '733fe85191c976aa3f1a1888aaf6b8ac66b78bce', class: {
913
+ return (h(Host, { key: '693cdfaab69be7ba55dd7333ac5f8ed5ccb0dbce', class: {
913
914
  'default': !this.max,
914
915
  'max': this.max,
915
- } }, h("section", { key: 'd2282996dfa3970f6e60713417872958b0273257', class: "listing" }, !this.hideHeader &&
916
- h("header", { key: 'c270d12cf1da32374f0bdcb650f3ad4f6e6701c1' }, h("section", { key: '670335955f4f453d687c5315fe4e9b4b64c69ff7', class: "title" }, h("img", { key: '9c4be4e7366ff1e3cd11d633b31beb625671be2b', src: svg, alt: "SFTP Client" }), h("div", { key: 'bcb3764dc20d9d6b01fca4b3d9a7d4371a621403', class: "text" }, h("div", { key: 'bf036e8de51caf4fb468051edd0625e30ade4f62', class: "name" }, this.name), h("div", { key: '9f042ed7412611dde5cacf7e66a7373049175da3', class: "description" }, this.description))), h("section", { key: '46028c58138f41f8cfb0f355fd403cfbeada8559', class: "actions" }, h("div", { key: '2613d4578a05d5b4ba5a27a6d7f0bb199692305c', class: "action", onClick: () => this.toggle_max() }, h("img", { key: 'afbd51291e77e0a34bc429eacc3f92aafa72e65e', src: max, alt: "Maximize" })))), h("main", { key: '200d355da53b9a777d870d472c279dc93cfae8ee' }, this.show_navigation && h("nav", { key: 'a2a6d1f87818c9abfb8be2fbe7198ef3986efab5', class: "navigation" }, h("div", { key: 'b6d8104e7063e4011efd6510fc6f3fa33ad0c28d', class: "breadcrumbs" }, this.breadcrumbs.map((crumb, index, breadcrumbs) => (h("span", { key: index, class: "breadcrumb-container" }, h("span", { key: index, onClick: () => this.list_breadcrumb(crumb.path), class: "breadcrumb" }, crumb.label), index < breadcrumbs.length - 1 && h("img", { class: "arrow", src: chevron }))))), h("section", { key: '86b69b8d759e1fc8a52c7f3f1cd90c318d1d413d', class: "actions", "aria-label": "SFTP actions" }, h("button", { key: 'c69af8d208771d2788d055fa92fb396f567972e1', type: "button", class: "action", onClick: () => this.go_to_parent_directory(), title: "Go to parent directory", "aria-label": "Go to parent directory" }, h("img", { key: 'e7c0eaf4d8983369a68506084e77f20cc29184c8', src: go_up, alt: "Go up" })), h("button", { key: '0e8b47e93b2825bc0e60b0c75d961609c2b98158', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, h("img", { key: '1a8d0178825ac27fb85584a36bd2d660fe09c135', src: refresh, alt: "Refresh" })), h("button", { key: 'fddbb65e05c0a9d800dc901bea49c9352099085d', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, h("img", { key: 'cbb5517d854064846a05ee56ef959ed79308b9ad', src: upload, alt: "Upload" })), h("button", { key: '15f521ad9359057a75fc13ab0336fd9803b9c432', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), h("input", { key: '48f7a635ea1e93a60e5b64042e730b3af5816ce9', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && h("div", { key: '7a977051ab3ccd46524a53c590e52c33904375e4', class: "content" }, h("table", { key: '0ac3ae940c7ae094ca99a1c07b37980a9d5a06c4' }, h("thead", { key: 'f8141383e987cd435a4f89b9d85b5d373559ec1c' }, h("tr", { key: '88479b89f19e1364afaf284b7947c754457c2aa5' }, h("th", { key: '1ad5c30387a14041ff7f45e1caaffe39c4972b3f' }, "Name"), h("th", { key: 'b80c51a07e6e144b8d21698b1a4e6116eb36cb3a' }, "Size"), h("th", { key: '9265bd2250aeb15ff19224f3247b0ec4c8678d7c' }, "Permissions"), h("th", { key: '6c9488fced66224aee51e9193b7beb4d0ea05a04' }, "Owner"), h("th", { key: 'b741ca68c2ec44243160d5e9f64271c488381713' }, "Modified"), h("th", { key: 'a6717e7f50003dc7cb14c2c46b5141afaca3eef1', class: "action-col", "aria-label": "Actions" }))), h("tbody", { key: '2406bf5112dff02abcb4952a19718398b43e6635' }, this.listing.map((item, index) => (h("tr", { key: index, class: {
916
+ } }, h("section", { key: '504d57b244dd055f23b81807ef6a397032dcf088', class: "listing" }, !this.hideHeader &&
917
+ h("header", { key: 'cef1e0a272851379e6d9ca07092b8078c94e2509' }, h("section", { key: '49fe94d69837676a46e3c92f54496c2ffa1e3ecd', class: "title" }, h("img", { key: 'cec6b64508c31904b34496cc34b26f81ae3e290e', src: svg, alt: "SFTP Client" }), h("div", { key: '3331b32275581f9bcf79b4b346e9820018868cbf', class: "text" }, h("div", { key: '289f2fef2e14c0a1954a99f6bbd920edbf66bf42', class: "name" }, this.name), h("div", { key: '8c88da9841dc39373f94cb313c7897cbc5a828a3', class: "description" }, this.description))), h("section", { key: 'f6f7ae566a225586c4a79ba31eecf998a1df010b', class: "actions" }, h("div", { key: 'd1a5e9c21e61320035eafe255213e883140815c4', class: "action", onClick: () => this.toggle_max() }, h("img", { key: '10f834c7a7846964bc84c2fd6eef39b09fa33e8f', src: max, alt: "Maximize" })))), h("main", { key: 'e17ee5827dc56cea9139697ce9024011a638e5ff' }, this.show_navigation && h("nav", { key: '277080aa09d738f21605d95d1bf70adc9156dfbb', class: "navigation" }, h("div", { key: '526b99f6b6c1161e41ee6dfcd13b48f8e52f85eb', class: "breadcrumbs" }, this.breadcrumbs.map((crumb, index, breadcrumbs) => (h("span", { key: index, class: "breadcrumb-container" }, h("span", { key: index, onClick: () => this.list_breadcrumb(crumb.path), class: "breadcrumb" }, crumb.label), index < breadcrumbs.length - 1 && h("img", { class: "arrow", src: chevron }))))), h("section", { key: '61a48831425637dc03662f6a8748619745a13b7b', class: "actions", "aria-label": "SFTP actions" }, h("button", { key: '53f150ed1579a653a6f843106ba14534156d46d2', type: "button", class: "action", onClick: () => this.go_to_parent_directory(), title: "Go to parent directory", "aria-label": "Go to parent directory" }, h("img", { key: 'dd9853885e3a18882ded99fb28e0e270a9e8bb2b', src: go_up, alt: "Go up" })), h("button", { key: '5a2a2f865b5169d2187cf5c8d5aa876163d708d3', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, h("img", { key: '62752fa2e46faf222fedd7f5f8a6e7d81242a089', src: refresh, alt: "Refresh" })), h("button", { key: '09fe21b04d27e7e1abd87b14789e6bd8faa68a98', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, h("img", { key: '0b4ab6f686c7261844221835836e2dbee86866bf', src: upload, alt: "Upload" })), h("button", { key: 'eab9cf7df64384db2cfb383ba2bc87ff84e9ef63', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), h("input", { key: '05609273cfc54c019f801768e560365845c38671', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && h("div", { key: 'ed910c6b7c2d5ac17e13fef9fd4597b1406b7d85', class: "content" }, h("table", { key: 'c28ed3308bf01665e313e1f8b8fb482f2dc0303a' }, h("thead", { key: '187c2e34ed9cbe57ea13083645472f0dc6f2e957' }, h("tr", { key: 'd43d3d698ba06cc24bc9fba9946a0bcf382327a1' }, h("th", { key: '8128742b1975b1c655e5665256cceb8f63441450' }, "Name"), h("th", { key: '35f91f13e38b62dfa97c742f4f23d14495f71462' }, "Size"), h("th", { key: '89f10d37b9558aadfc1e10e6729ef0bc63f30216' }, "Permissions"), h("th", { key: '51905e8a7d3391119290b59fb0f36420b23b5331' }, "Owner"), h("th", { key: 'a2133c42789fb79ec0bfd91c1ffe4f869a8b0acf' }, "Modified"), h("th", { key: 'a3b72803212e5ba60249777cdad37341c101a4b5', class: "action-col", "aria-label": "Actions" }))), h("tbody", { key: 'e5ee4a1cd8943a4966d33a43ee04df5f355f21e0' }, this.listing.map((item, index) => (h("tr", { key: index, class: {
917
918
  'selected': this.is_selected(item),
918
919
  }, onClick: () => this.list_directory(item) }, h("td", null, item.kind === 'Folder' ? h("img", { class: "kind", src: folder, alt: "Folder" }) : h("img", { class: "kind", src: file, alt: "File" }), h("span", { class: `name ${item.kind.toLowerCase()}` }, item.name)), h("td", null, this.format_size(item.attributes.size)), h("td", null, this.format_permissions(item.attributes.permissions, item.kind)), h("td", null, item.attributes.user ?? '-'), h("td", null, new Date(item.attributes.modified * 1000).toLocaleString()), h("td", { class: "action-col" }, item.kind === 'File' &&
919
- h("div", { class: "file-actions" }, h("button", { type: "button", class: "file-action", onClick: (event) => this.on_file_row_action(item, event), title: "Download", "aria-label": "Download" }, h("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" }, h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), h("polyline", { points: "7 10 12 15 17 10" }), h("line", { x1: "12", x2: "12", y1: "15", y2: "3" }))), h("button", { type: "button", class: "file-action delete", onClick: (event) => this.on_file_delete_action(item, event), title: "Delete", "aria-label": "Delete" }, h("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" }, h("polyline", { points: "3 6 5 6 21 6" }), h("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), h("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), h("line", { x1: "14", x2: "14", y1: "11", y2: "17" }))))))))))), this.show_loader && h("div", { key: 'aa63f480151a0143183f8769413bbf1d8bad517a', class: "loader" }, "Loading..."), this.show_error && h("div", { key: '3ca7fe377368a520de804391d8939627e956e3d0', class: "error" }, this.error_message)), h("footer", { key: '71a1233b255561b5e0cf4408c268ab399982cb7f' }, h("section", { key: '5533f9b423be66da41ff7128b903e09bcd447c4c', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
920
- h("section", { key: '6dc948c828b479b6d706dbcca3b3075e58757cef', class: {
920
+ h("div", { class: "file-actions" }, h("button", { type: "button", class: "file-action", onClick: (event) => this.on_file_row_action(item, event), title: "Download", "aria-label": "Download" }, h("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" }, h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), h("polyline", { points: "7 10 12 15 17 10" }), h("line", { x1: "12", x2: "12", y1: "15", y2: "3" }))), h("button", { type: "button", class: "file-action delete", onClick: (event) => this.on_file_delete_action(item, event), title: "Delete", "aria-label": "Delete" }, h("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" }, h("polyline", { points: "3 6 5 6 21 6" }), h("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), h("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), h("line", { x1: "14", x2: "14", y1: "11", y2: "17" }))))))))))), this.show_loader && h("div", { key: '30777c73738f9c6a5199033428d9033d0cd05b99', class: "loader" }, "Loading..."), this.show_error && h("div", { key: '0a5bc583f268e00c1bf17661ea1f49bccaba6ab9', class: "error" }, this.error_message)), h("footer", { key: '94aff725f14e25d8c34719cbf2decdd5e17b8e22' }, h("section", { key: '6342e9ce4b7fe08e12d62406f203127a0c872055', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
921
+ h("section", { key: '039eeae64731e54a5bf0982777815c8ad0df6b49', class: {
921
922
  'creds': true,
922
923
  'blurred': this.show_login_screen,
923
- } }, h("form", { key: 'a7f60c3dcc672cc18f1ec67a45495eb756ae9c92', class: "auth", onSubmit: (event) => {
924
+ } }, h("form", { key: '6670d05c61c412bbc1f8d26f317b4aea4614f428', class: "auth", onSubmit: (event) => {
924
925
  const formData = new FormData(event.target);
925
926
  let username = undefined;
926
927
  if (this.show_login_screen_username) {
@@ -930,35 +931,35 @@ export class PhirepassSftpClient {
930
931
  if (this.show_login_screen_password) {
931
932
  password = formData.get('password');
932
933
  }
933
- this.channel.open_sftp_tunnel(this.nodeId, username, password);
934
+ this.channel.open_sftp_tunnel(this.nodeId, this.serviceId, username, password);
934
935
  this.show_login_screen_username = false;
935
936
  this.show_login_screen_password = false;
936
937
  this.show_login_screen = false;
937
938
  this.show_loader = true;
938
939
  event.stopPropagation();
939
940
  event.preventDefault();
940
- } }, h("div", { key: 'b0f3c4b74c59590624d4944b8d6ccd5a45b6065c', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
941
- h("div", { key: '2d6d9424cd170e087cc6f17d55c8cf1461a06988' }, h("label", { key: 'e420f513abc053a99c0e61c27716ff39f0527827', htmlFor: "username" }, "Username"), h("input", { key: 'c50aff8ff53e8ed3b3dbb5d0cc85055b247864cf', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
942
- h("div", { key: '8f49b0425783375996484b536c58f07414215b44' }, h("label", { key: 'ed739b253b2bfa7dc6bab37dbf184b0c9eacf657', htmlFor: "password" }, "Password"), h("input", { key: 'd1be51c537fb0461678ede0e940fd312d96c1517', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), h("div", { key: '66da4c8d32459483a1b0329473287e89a82c5e4c' }, h("button", { key: 'cf5a2534f2a6abc344e999520bb4328c4dadd090', type: "submit" }, "Connect")))), this.show_upload_modal &&
943
- h("section", { key: 'b678714eff09b18b7932e936ae4dee366aa98b4e', class: {
941
+ } }, h("div", { key: 'c899712c9ee14f4490617a316d3bbc631d794fde', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
942
+ h("div", { key: '8088ac918f3455ff6bf2e2d50eb4fa8c18b58a97' }, h("label", { key: '850f947b1639782b1d6f4011a809466f8a43e7de', htmlFor: "username" }, "Username"), h("input", { key: '7fb4f67d37d84d6329840525de602a5b74675580', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
943
+ h("div", { key: '79633deeb5499a0fd120aba6a0875e7d78dc429a' }, h("label", { key: 'b911b56f1676d70e703c7fb318c6f48c52f08031', htmlFor: "password" }, "Password"), h("input", { key: '80ebcebc0a118f24c85f43a6bd89d5de0dbfec1c', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), h("div", { key: 'a1c8a2677ae4614e9cc11884aa226757bcccbcf3' }, h("button", { key: 'cfcd552766c53d63f8cc1cb46b328639fdad189f', type: "submit" }, "Connect")))), this.show_upload_modal &&
944
+ h("section", { key: '98243073570a448b37137c4b9910e809defa80ca', class: {
944
945
  'upload-modal': true,
945
946
  'visible': this.show_upload_modal,
946
- } }, h("div", { key: 'c4fa4e401c192e705207df634d2f93943ce77af5', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, h("div", { key: '18ff3a246aa39f28474ced7cce76ace778922a2f', class: "title" }, "Uploading File"), h("div", { key: 'b08fa6b79f6080e9d60f361021b8bac6a5ed7424', class: "file-name", title: this.upload_file_name }, this.upload_file_name), h("div", { key: '9efc45e387d8156a18afb90d5531df4ebfa64328', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, h("div", { key: 'c988402fedde675d04bc7b2054da4e319c2af082', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), h("div", { key: '1d0d8f845d3bfa817aec865598cffa59f55505f4', class: "progress-meta" }, h("div", { key: '5b983ed819d48105c3fb0a71b2d2d62f7f46003c', class: "progress-speed" }, this.upload_speed), h("div", { key: '859bb76ff953d69ddaa710574bb1c72b92968f5a', class: "progress-value" }, this.format_percent(this.upload_progress))), h("button", { key: '41d970d2112e63f931c5a5513bb580559f9e619b', type: "button", class: {
947
+ } }, h("div", { key: '382070ac49b529b3bd395bd7bd74f4d3ef636a53', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, h("div", { key: 'ab42477909654bd992d4261ff041cef1d5a139be', class: "title" }, "Uploading File"), h("div", { key: 'c17d2db8e7bf9ddb2e80e32d609ca5a9bf55ceba', class: "file-name", title: this.upload_file_name }, this.upload_file_name), h("div", { key: 'e5d6c359b82093ded872c98e965902c7f628c052', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, h("div", { key: '737c05d515f8163b24f0c5c7d44d978f0d80ebb8', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), h("div", { key: '5ec3c4970d811aaf977d71e3f2ba84cc5410a490', class: "progress-meta" }, h("div", { key: '18d83a68b795db0028b0ef7a5cbd51b46b29c280', class: "progress-speed" }, this.upload_speed), h("div", { key: '65d7b3a0b1dd5e34e00501c838ac674e2f9bc5e1', class: "progress-value" }, this.format_percent(this.upload_progress))), h("button", { key: 'bf6c636c3851f6fed2b1592e0bdb443108215737', type: "button", class: {
947
948
  'cancel': true,
948
949
  'finished': this.upload_finished,
949
950
  }, onClick: () => this.cancel_upload() }, this.upload_finished ? 'Close' : 'Cancel'))), this.show_download_modal &&
950
- h("section", { key: 'd9bfadbc2d3a164bc05811a7f2e9024a914ecbc8', class: {
951
+ h("section", { key: '0e3228077c259748f738be9d0a8eb11a9d64c36d', class: {
951
952
  'download-modal': true,
952
953
  'visible': this.show_download_modal,
953
- } }, h("div", { key: '1f874ba0e526b99d2b41beaf8023cbada567ecc8', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, h("div", { key: 'ac2b5f65423e7e2b20ffecf864477e849b737259', class: "title" }, "Downloading File"), h("div", { key: '639d6fe5a64db1aa53b077eb318fa21d72a551ed', class: "file-name", title: this.download_file_name }, this.download_file_name), h("div", { key: 'e90546d4dceab157f4599b2ffd31f1eb4eb9d18c', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, h("div", { key: 'eeb597904e31a6aa9717cc4e6fc534ae68924dee', class: "progress-fill", style: { width: `${this.download_progress}%` } })), h("div", { key: '1bbf952144d17c374de6948ad94bc4deed7ae8a0', class: "progress-meta" }, h("div", { key: '049f748019b11cea95f236202cd48c758e99411a', class: "progress-speed" }, this.download_speed), h("div", { key: '01b8d063a3fdfe8cc9df21e75833df3a6c2eda49', class: "progress-value" }, this.format_percent(this.download_progress))), h("button", { key: 'a87560c1555bf8a6dea73a424792b3af25e06a68', type: "button", class: {
954
+ } }, h("div", { key: '2ddabbc1c6c7490b9f99e267545f891d36b1a080', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, h("div", { key: '64c1050634a226f7b04288b83a7b782ae0403c1f', class: "title" }, "Downloading File"), h("div", { key: '0e93810dfaaccec1f00ee89bba31fba8812f0640', class: "file-name", title: this.download_file_name }, this.download_file_name), h("div", { key: '6a2959f17fe2f0fe1ce5f4f272886491f7fc8830', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, h("div", { key: '71ca2cd68130d227c23817f97aa906df489ce350', class: "progress-fill", style: { width: `${this.download_progress}%` } })), h("div", { key: '834133dc9640a086b1d2a38ac24bfa02567a333d', class: "progress-meta" }, h("div", { key: '186e4d8167c207152e3b4c449c261d3e456b6ec7', class: "progress-speed" }, this.download_speed), h("div", { key: '69266fdc80cebced89c140016252e8e88fb012f2', class: "progress-value" }, this.format_percent(this.download_progress))), h("button", { key: '28238539b683c475bb8f13920485b3a7d209ddde', type: "button", class: {
954
955
  'cancel': true,
955
956
  'finished': this.download_finished,
956
957
  }, onClick: () => this.cancel_download() }, this.download_finished ? 'Close' : 'Cancel'))), this.show_delete_modal &&
957
- h("section", { key: '7e547c5f320acc9920020a4bcafc21ca57d6ad66', class: {
958
+ h("section", { key: '6ab3a87e386f08aa6cb5ee52de1a53d634411991', class: {
958
959
  'delete-modal': true,
959
960
  'visible': this.show_delete_modal,
960
- } }, h("div", { key: 'b79c2be285b8e2af00189cd69143950f133f5722', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, h("div", { key: 'b25d1669edded42eae34ac15887428d85a3e8577', class: "title" }, "Delete File"), h("div", { key: 'da2a16b8f85ae7dc7d09aa2ffe4562124642233f', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), h("div", { key: '702dfa13f1e9b828c2d956cab0c1fcc557c80bb1', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading &&
961
- h("div", { key: '1e2b57c73dad6f463c3377c16ae407cc553232e3', class: "delete-loader", "aria-hidden": "true" }, h("span", { key: '40338e85202b89cb8b2fea8adddf10323fa91a25', class: "spinner" })), h("div", { key: 'e0b264439056ab3e7f49f5dd221b5f58ea720d2e', class: "modal-actions" }, h("button", { key: 'ee6932fa56c02bca43c6ce914cec55ca9dbfd48a', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), h("button", { key: '2c26e30cc0942f532996a3b485ad77fb11c2d214', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
961
+ } }, h("div", { key: 'ccaed2c02103afda40b507d374836ff994f0540d', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, h("div", { key: '19edbb28e08b513aec244baf59c1ab6798b11a45', class: "title" }, "Delete File"), h("div", { key: 'b98b4a138129f18a395dd7700ce50621049e2cf3', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), h("div", { key: '3af3fffa9a5e2b3bc8bf8a2d3d302fcce119a246', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading &&
962
+ h("div", { key: '09a78a79af88cb055cbc6e160c59b44c2be43fab', class: "delete-loader", "aria-hidden": "true" }, h("span", { key: '40d4285d22b51c62b4bac87ae5201ccb45721406', class: "spinner" })), h("div", { key: 'c3a475f37d3912755b3a6845ce49569429fc9a13', class: "modal-actions" }, h("button", { key: '3da31bcd06554c7463dc82e3f895fbcfe2551486', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), h("button", { key: '1eafd821e308588c87f334d1fdbb05b9a6ae70ef', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
962
963
  }
963
964
  static get is() { return "phirepass-sftp-client"; }
964
965
  static get encapsulation() { return "shadow"; }
@@ -1133,6 +1134,25 @@ export class PhirepassSftpClient {
1133
1134
  "reflect": false,
1134
1135
  "attribute": "node-id"
1135
1136
  },
1137
+ "serviceId": {
1138
+ "type": "string",
1139
+ "mutable": false,
1140
+ "complexType": {
1141
+ "original": "string",
1142
+ "resolved": "string",
1143
+ "references": {}
1144
+ },
1145
+ "required": true,
1146
+ "optional": false,
1147
+ "docs": {
1148
+ "tags": [],
1149
+ "text": ""
1150
+ },
1151
+ "getter": false,
1152
+ "setter": false,
1153
+ "reflect": false,
1154
+ "attribute": "service-id"
1155
+ },
1136
1156
  "token": {
1137
1157
  "type": "string",
1138
1158
  "mutable": false,
@@ -86,6 +86,7 @@ export class PhirepassTerminal {
86
86
  allowInsecure = false;
87
87
  heartbeatInterval = 30_000;
88
88
  nodeId;
89
+ serviceId;
89
90
  token;
90
91
  onNodeIdChange(newValue, _oldValue) {
91
92
  // Handle the change in node_id here
@@ -342,7 +343,7 @@ export class PhirepassTerminal {
342
343
  handle_auth_success(_auth_) {
343
344
  this.clear_creds_buffer();
344
345
  this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
345
- this.channel.open_ssh_tunnel(this.nodeId);
346
+ this.channel.open_ssh_tunnel(this.nodeId, this.serviceId);
346
347
  }
347
348
  handle_tunnel_opened(web) {
348
349
  this.session_id = web.sid;
@@ -437,7 +438,7 @@ export class PhirepassTerminal {
437
438
  return;
438
439
  }
439
440
  this.inputMode = InputMode.Default;
440
- this.channel.open_ssh_tunnel(this.nodeId, username);
441
+ this.channel.open_ssh_tunnel(this.nodeId, this.serviceId, username);
441
442
  }
442
443
  handle_password_input(data) {
443
444
  if (data === "\r" || data === "\n") {
@@ -476,13 +477,13 @@ export class PhirepassTerminal {
476
477
  this.inputMode = InputMode.Default;
477
478
  // Assuming there's a method to submit password to the channel
478
479
  // You may need to adjust this based on your actual API
479
- this.channel.open_ssh_tunnel(this.nodeId, this.usernameBuffer.trim(), password);
480
+ this.channel.open_ssh_tunnel(this.nodeId, this.serviceId, this.usernameBuffer.trim(), password);
480
481
  // Clear sensitive data
481
482
  this.passwordBuffer = "";
482
483
  this.usernameBuffer = "";
483
484
  }
484
485
  render() {
485
- return (h(Host, { key: '641344887f33ba9c4c8aa98186b84a92ebb020e7' }, h("div", { key: '558aebfd21575d5dbdaacf03335485941373679a', id: "ccc", ref: el => (this.containerEl = el) })));
486
+ return (h(Host, { key: '8bc2181d5ca26f6e6552591b7d399f81bece3efa' }, h("div", { key: '4c7085ba44cebb23f7712fbfe4ea52a9e8bde6d7', id: "ccc", ref: el => (this.containerEl = el) })));
486
487
  }
487
488
  static get is() { return "phirepass-terminal"; }
488
489
  static get encapsulation() { return "shadow"; }
@@ -615,6 +616,25 @@ export class PhirepassTerminal {
615
616
  "reflect": false,
616
617
  "attribute": "node-id"
617
618
  },
619
+ "serviceId": {
620
+ "type": "string",
621
+ "mutable": false,
622
+ "complexType": {
623
+ "original": "string",
624
+ "resolved": "string",
625
+ "references": {}
626
+ },
627
+ "required": true,
628
+ "optional": false,
629
+ "docs": {
630
+ "tags": [],
631
+ "text": ""
632
+ },
633
+ "getter": false,
634
+ "setter": false,
635
+ "reflect": false,
636
+ "attribute": "service-id"
637
+ },
618
638
  "token": {
619
639
  "type": "string",
620
640
  "mutable": false,