phirepass-widgets 0.0.105 → 0.0.107

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.
@@ -1 +1 @@
1
- class n{__destroy_into_raw(){const n=this.__wbg_ptr;return this.__wbg_ptr=0,_.unregister(this),n}free(){const n=this.__destroy_into_raw();j.__wbg_channel_free(n,0)}authenticate(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(t,j.__wbindgen_export,j.__wbindgen_export2);j.channel_authenticate(this.__wbg_ptr,r,o,i,k,R(e)?Number.MAX_SAFE_INTEGER:e>>>0)}connect(){j.channel_connect(this.__wbg_ptr)}create_service(n,t,e,r,o,i,c,s,_){const u=N(n,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=N(t,j.__wbindgen_export,j.__wbindgen_export2),b=k;var l=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),d=k;const w=N(r,j.__wbindgen_export,j.__wbindgen_export2),g=k;var h=R(i)?0:N(i,j.__wbindgen_export,j.__wbindgen_export2),p=k,m=R(c)?0:N(c,j.__wbindgen_export,j.__wbindgen_export2),y=k,v=R(s)?0:N(s,j.__wbindgen_export,j.__wbindgen_export2);j.channel_create_service(this.__wbg_ptr,u,a,f,b,l,d,w,g,o,h,p,m,y,v,k,R(_)?Number.MAX_SAFE_INTEGER:_>>>0)}delete_service(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(t,j.__wbindgen_export,j.__wbindgen_export2);j.channel_delete_service(this.__wbg_ptr,r,o,i,k,R(e)?Number.MAX_SAFE_INTEGER:e>>>0)}disconnect(){j.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==j.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==j.channel_is_disconnected(this.__wbg_ptr)}constructor(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(t,j.__wbindgen_export,j.__wbindgen_export2),c=k;var s=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2);const u=j.channel_new(r,o,i,c,s,k);return this.__wbg_ptr=u,_.register(this,this.__wbg_ptr,this),this}on_connection_close(n){j.channel_on_connection_close(this.__wbg_ptr,R(n)?0:u(n))}on_connection_error(n){j.channel_on_connection_error(this.__wbg_ptr,R(n)?0:u(n))}on_connection_message(n){j.channel_on_connection_message(this.__wbg_ptr,R(n)?0:u(n))}on_connection_open(n){j.channel_on_connection_open(this.__wbg_ptr,R(n)?0:u(n))}on_protocol_message(n){j.channel_on_protocol_message(this.__wbg_ptr,R(n)?0:u(n))}on_protocol_message_type(n,t){const e=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_on_protocol_message_type(this.__wbg_ptr,e,k,R(t)?0:u(t))}open_rdp_tunnel(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(t,j.__wbindgen_export,j.__wbindgen_export2),_=k;var u=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_open_rdp_tunnel(this.__wbg_ptr,i,c,s,_,u,a,f,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}open_sftp_tunnel(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(t,j.__wbindgen_export,j.__wbindgen_export2),_=k;var u=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_open_sftp_tunnel(this.__wbg_ptr,i,c,s,_,u,a,f,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}open_ssh_tunnel(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(t,j.__wbindgen_export,j.__wbindgen_export2),_=k;var u=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_open_ssh_tunnel(this.__wbg_ptr,i,c,s,_,u,a,f,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_chmod(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_chmod(this.__wbg_ptr,i,c,t,s,k,r,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_delete(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_delete(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_ack(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_download_ack(this.__wbg_ptr,o,k,t,e,r)}send_sftp_download_chunk(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_download_chunk(this.__wbg_ptr,i,k,t,e,r,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_start(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_download_start(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_list_data(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2),i=k,c=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_list_data(this.__wbg_ptr,o,i,t,c,k,R(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_mkdir(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2),i=k,c=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_mkdir(this.__wbg_ptr,o,i,t,c,k,R(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_read_file(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2),i=k,c=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_read_file(this.__wbg_ptr,o,i,t,c,k,R(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_remove(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_remove(this.__wbg_ptr,i,c,t,s,k,r,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_rename(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_rename(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_upload_chunk(n,t,e,r,o,i,c){const s=N(n,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=S(i,j.__wbindgen_export);j.channel_send_sftp_upload_chunk(this.__wbg_ptr,s,_,t,e,r,o,u,k,R(c)?Number.MAX_SAFE_INTEGER:c>>>0)}send_sftp_upload_start(n,t,e,r,o,i,c){const s=N(n,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_upload_start(this.__wbg_ptr,s,_,t,u,a,f,k,o,i,R(c)?Number.MAX_SAFE_INTEGER:c>>>0)}send_sftp_write_file(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=S(r,j.__wbindgen_export);j.channel_send_sftp_write_file(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_ssh_terminal_resize(n,t,e,r,o,i){const c=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_ssh_terminal_resize(this.__wbg_ptr,c,k,t,e,r,o,i)}send_ssh_tunnel_data(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_ssh_tunnel_data(this.__wbg_ptr,r,o,t,i,k)}start_heartbeat(n){j.channel_start_heartbeat(this.__wbg_ptr,n)}stop_heartbeat(){j.channel_stop_heartbeat(this.__wbg_ptr)}update_service(n,t,e,r,o,i,c,s,_,u){const a=N(n,j.__wbindgen_export,j.__wbindgen_export2),f=k,b=N(t,j.__wbindgen_export,j.__wbindgen_export2),l=k,d=N(e,j.__wbindgen_export,j.__wbindgen_export2),w=k;var g=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2),h=k;const p=N(o,j.__wbindgen_export,j.__wbindgen_export2),m=k;var y=R(c)?0:N(c,j.__wbindgen_export,j.__wbindgen_export2),v=k,A=R(s)?0:N(s,j.__wbindgen_export,j.__wbindgen_export2),S=k,T=R(_)?0:N(_,j.__wbindgen_export,j.__wbindgen_export2);j.channel_update_service(this.__wbg_ptr,a,f,b,l,d,w,g,h,p,m,i,y,v,A,S,T,k,R(u)?Number.MAX_SAFE_INTEGER:u>>>0)}}Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);const t=Object.freeze({Generic:0,0:"Generic",Authentication:10,10:"Authentication",RequiresUsername:100,100:"RequiresUsername",RequiresPassword:110,110:"RequiresPassword",RequiresUsernamePassword:120,120:"RequiresUsernamePassword"});function e(){const n={__proto__:null,__wbg_Error_67e7344beaa85059:function(n,t){return u(Error(w(n,t)))},__wbg_String_8564e559799eccda:function(n,t){const e=N(String(p(t)),j.__wbindgen_export,j.__wbindgen_export2),r=k;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_debug_string_0e68cf47c9cbd9b0:function(n,t){const e=N(f(p(t)),j.__wbindgen_export,j.__wbindgen_export2),r=k;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_string_get_92ab86bb19cbc12f:function(n,t){const e=p(t),r="string"==typeof e?e:void 0;var o=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2),i=k;d().setInt32(n+4,i,!0),d().setInt32(n+0,o,!0)},__wbg___wbindgen_throw_5d9e815e6fdf150f:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_997e73d32238e655:function(n){p(n)._wbg_cb_unref()},__wbg_call_269c5566fbede3eb:function(){return m((function(n,t){return u(p(n).call(p(t)))}),arguments)},__wbg_call_6bcf8d3e20937e46:function(){return m((function(n,t,e){return u(p(n).call(p(t),p(e)))}),arguments)},__wbg_call_7bbd9cceba9949ad:function(){return m((function(n,t,e,r){return u(p(n).call(p(t),p(e),p(r)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(T(n)))},__wbg_close_a009f540ff811039:function(){return m((function(n){p(n).close()}),arguments)},__wbg_data_aa7ba49b34c0d883:function(n){return u(p(n).data)},__wbg_from_a39669ce566077da:function(n){return u(Array.from(p(n)))},__wbg_getRandomValues_a608c4436c19407a:function(){return m((function(n,t){globalThis.crypto.getRandomValues(b(n,t))}),arguments)},__wbg_get_989d0a1309644f2b:function(){return m((function(n,t){return u(Reflect.get(p(n),p(t)))}),arguments)},__wbg_info_c923009936ad8385:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_d4ff01f8247925ae:function(n){let t;try{t=p(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_31bdaf014f5fbde2:function(n){return p(n).length},__wbg_new_1da3429bc3c4541c:function(n){return u(new Uint8Array(p(n)))},__wbg_new_bebc3f4757acf305:function(){return u(new Object)},__wbg_new_ffa92086ea89f79c:function(){return u(new Array)},__wbg_new_with_str_sequence_9ab4875494df9d99:function(){return m((function(n,t,e){return u(new WebSocket(w(n,t),p(e)))}),arguments)},__wbg_prototypesetcall_ae9f5e7459250748:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),p(e))},__wbg_push_bfdf956ba476f65b:function(n,t){return p(n).push(p(t))},__wbg_readyState_83df235b27cf257f:function(n){return p(n).readyState},__wbg_send_af811d92e7aea5c4:function(){return m((function(n,t,e){p(n).send(b(t,e))}),arguments)},__wbg_setInterval_cbf1c35c6a692d37:function(){return m((function(n,t){return u(setInterval(p(n),t))}),arguments)},__wbg_set_13d25b81ab403f5e:function(n,t,e){p(n)[t>>>0]=T(e)},__wbg_set_6be42768c690e380:function(n,t,e){p(n)[T(t)]=T(e)},__wbg_set_binaryType_f88804219cea0f9e:function(n,t){p(n).binaryType=s[t]},__wbg_set_onclose_97aab74a1c2662f7:function(n,t){p(n).onclose=p(t)},__wbg_set_onerror_88cb2134dca3aba2:function(n,t){p(n).onerror=p(t)},__wbg_set_onmessage_0f0d391465909a45:function(n,t){p(n).onmessage=p(t)},__wbg_set_onopen_e91e64af99b7966d:function(n,t){p(n).onopen=p(t)},__wbg_warn_5936938922985853:function(n,t){console.warn(w(n,t))},__wbindgen_generic_0000000000000001:function(n,t){return u(A(n,t,o))},__wbindgen_generic_0000000000000002:function(n,t){return u(A(n,t,i))},__wbindgen_generic_0000000000000003:function(n,t){return u(A(n,t,c))},__wbindgen_generic_0000000000000004:function(n,t){return u(A(n,t,r))},__wbindgen_generic_0000000000000005:function(n){return u(n)},__wbindgen_generic_0000000000000006:function(n,t){return u(b(n,t))},__wbindgen_generic_0000000000000007:function(n,t){return u(w(n,t))},__wbindgen_generic_0000000000000008:function(n){return u(BigInt.asUintN(64,n))},__wbindgen_object_clone_ref:function(n){return u(p(n))},__wbindgen_object_drop_ref:function(n){T(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){j.__wasm_bindgen_func_elem_64(n,t)}function o(n,t,e){j.__wasm_bindgen_func_elem_60(n,t,u(e))}function i(n,t,e){j.__wasm_bindgen_func_elem_60_37(n,t,u(e))}function c(n,t,e){j.__wasm_bindgen_func_elem_60_38(n,t,u(e))}const s=["blob","arraybuffer"],_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>j.__wbg_channel_free(n,1)));function u(n){v===y.length&&y.push(y.length+1);const t=v;return v=y[t],y[t]=n,t}const a="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>j.__wbindgen_export4(n.a,n.b)));function f(n){const t=typeof n;if("number"==t||"boolean"==t||null==n)return`${n}`;if("string"==t)return`"${n}"`;if("symbol"==t){const t=n.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=n.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(n)){const t=n.length;let e="[";t>0&&(e+=f(n[0]));for(let r=1;r<t;r++)e+=", "+f(n[r]);return e+="]",e}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(!(e&&e.length>1))return toString.call(n);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(n)+")"}catch(n){return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:r}function b(n,t){return n>>>=0,h().subarray(n/1,n/1+t)}let l=null;function d(){return(null===l||!0===l.buffer.detached||void 0===l.buffer.detached&&l.buffer!==j.memory.buffer)&&(l=new DataView(j.memory.buffer)),l}function w(n,t){return function(n,t){return P+=t,P>=O&&(F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),F.decode(),P=t),F.decode(h().subarray(n,n+t))}(n>>>0,t)}let g=null;function h(){return null!==g&&0!==g.byteLength||(g=new Uint8Array(j.memory.buffer)),g}function p(n){return y[n]}function m(n,t){try{return n.apply(this,t)}catch(n){j.__wbindgen_export3(u(n))}}let y=new Array(1024).fill(void 0);y.push(void 0,null,!0,!1);let v=y.length;function R(n){return null==n}function A(n,t,e){const r={a:n,b:t,cnt:1},o=(...n)=>{r.cnt++;const t=r.a;r.a=0;try{return e(t,r.b,...n)}finally{r.a=t,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{0==--r.cnt&&(j.__wbindgen_export4(r.a,r.b),r.a=0,a.unregister(r))},a.register(o,r,r),o}function S(n,t){const e=t(1*n.length,1)>>>0;return h().set(n,e/1),k=n.length,e}function N(n,t,e){if(void 0===e){const e=U.encode(n),r=t(e.length,1)>>>0;return h().subarray(r,r+e.length).set(e),k=e.length,r}let r=n.length,o=t(r,1)>>>0;const i=h();let c=0;for(;c<r;c++){const t=n.charCodeAt(c);if(t>127)break;i[o+c]=t}if(c!==r){0!==c&&(n=n.slice(c)),o=e(o,r,r=c+3*n.length,1)>>>0;const t=h().subarray(o+c,o+r);c+=U.encodeInto(n,t).written,o=e(o,r,c,1)>>>0}return k=c,o}function T(n){const t=p(n);return function(n){n<1028||(y[n]=v,v=n)}(n),t}let F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});F.decode();const O=2146435072;let P=0;const U=new TextEncoder;"encodeInto"in U||(U.encodeInto=function(n,t){const e=U.encode(n);return t.set(e),{read:n.length,written:e.length}});let j,k=0;async function W(n){if(void 0!==j)return j;void 0!==n&&(Object.getPrototypeOf(n)===Object.prototype?({module_or_path:n}=n):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===n&&(n=new URL("phirepass-channel_bg.wasm",import.meta.url));const t=e();("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:r}=await async function(n,t){if("function"==typeof Response&&n instanceof Response){if(!n.ok)throw new Error(`failed to fetch Wasm: ${n.status} ${n.statusText} fetching '${n.url}'`);if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,t)}catch(t){if(!function(n){switch(n){case"basic":case"cors":case"default":return!0}return!1}(n.type)||"application/wasm"===n.headers.get("Content-Type"))throw t;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",t)}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}(await n,t);return function(n){return j=n.exports,l=null,g=null,j}(r)}var $,q,E;!function(n){n.Error="Error",n.AuthSuccess="AuthSuccess",n.TunnelOpened="TunnelOpened",n.TunnelClosed="TunnelClosed",n.TunnelData="TunnelData",n.RDPAuthorized="RDPAuthorized",n.SFTPListItems="SFTPListItems",n.SFTPDownloadStartResponse="SFTPDownloadStartResponse",n.SFTPDownloadChunk="SFTPDownloadChunk",n.SFTPUploadStartResponse="SFTPUploadStartResponse",n.SFTPUploadChunkAck="SFTPUploadChunkAck",n.SFTPOpResult="SFTPOpResult"}($||($={})),function(n){n[n.Username=0]="Username",n[n.Password=1]="Password",n[n.Default=2]="Default"}(q||(q={})),function(n){n.Disconnected="disconnected",n.Connected="connected",n.Error="error"}(E||(E={}));export{n as C,t as E,q as I,$ as P,W as _,E as a}
1
+ class n{__destroy_into_raw(){const n=this.__wbg_ptr;return this.__wbg_ptr=0,_.unregister(this),n}free(){const n=this.__destroy_into_raw();j.__wbg_channel_free(n,0)}authenticate(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(t,j.__wbindgen_export,j.__wbindgen_export2);j.channel_authenticate(this.__wbg_ptr,r,o,i,k,R(e)?Number.MAX_SAFE_INTEGER:e>>>0)}connect(){j.channel_connect(this.__wbg_ptr)}create_service(n,t,e,r,o,i,c,s,_){const u=N(n,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=N(t,j.__wbindgen_export,j.__wbindgen_export2),b=k;var l=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),d=k;const w=N(r,j.__wbindgen_export,j.__wbindgen_export2),g=k;var h=R(i)?0:N(i,j.__wbindgen_export,j.__wbindgen_export2),p=k,m=R(c)?0:N(c,j.__wbindgen_export,j.__wbindgen_export2),y=k,v=R(s)?0:N(s,j.__wbindgen_export,j.__wbindgen_export2);j.channel_create_service(this.__wbg_ptr,u,a,f,b,l,d,w,g,o,h,p,m,y,v,k,R(_)?Number.MAX_SAFE_INTEGER:_>>>0)}delete_service(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(t,j.__wbindgen_export,j.__wbindgen_export2);j.channel_delete_service(this.__wbg_ptr,r,o,i,k,R(e)?Number.MAX_SAFE_INTEGER:e>>>0)}disconnect(){j.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==j.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==j.channel_is_disconnected(this.__wbg_ptr)}constructor(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(t,j.__wbindgen_export,j.__wbindgen_export2),c=k;var s=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2);const u=j.channel_new(r,o,i,c,s,k);return this.__wbg_ptr=u,_.register(this,this.__wbg_ptr,this),this}on_connection_close(n){j.channel_on_connection_close(this.__wbg_ptr,R(n)?0:u(n))}on_connection_error(n){j.channel_on_connection_error(this.__wbg_ptr,R(n)?0:u(n))}on_connection_message(n){j.channel_on_connection_message(this.__wbg_ptr,R(n)?0:u(n))}on_connection_open(n){j.channel_on_connection_open(this.__wbg_ptr,R(n)?0:u(n))}on_protocol_message(n){j.channel_on_protocol_message(this.__wbg_ptr,R(n)?0:u(n))}on_protocol_message_type(n,t){const e=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_on_protocol_message_type(this.__wbg_ptr,e,k,R(t)?0:u(t))}open_rdp_tunnel(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(t,j.__wbindgen_export,j.__wbindgen_export2),_=k;var u=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_open_rdp_tunnel(this.__wbg_ptr,i,c,s,_,u,a,f,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}open_sftp_tunnel(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(t,j.__wbindgen_export,j.__wbindgen_export2),_=k;var u=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_open_sftp_tunnel(this.__wbg_ptr,i,c,s,_,u,a,f,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}open_ssh_tunnel(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(t,j.__wbindgen_export,j.__wbindgen_export2),_=k;var u=R(e)?0:N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_open_ssh_tunnel(this.__wbg_ptr,i,c,s,_,u,a,f,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_chmod(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_chmod(this.__wbg_ptr,i,c,t,s,k,r,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_delete(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_delete(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_ack(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_download_ack(this.__wbg_ptr,o,k,t,e,r)}send_sftp_download_chunk(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_download_chunk(this.__wbg_ptr,i,k,t,e,r,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_download_start(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_download_start(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_list_data(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2),i=k,c=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_list_data(this.__wbg_ptr,o,i,t,c,k,R(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_mkdir(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2),i=k,c=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_mkdir(this.__wbg_ptr,o,i,t,c,k,R(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_read_file(n,t,e,r){const o=N(n,j.__wbindgen_export,j.__wbindgen_export2),i=k,c=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_read_file(this.__wbg_ptr,o,i,t,c,k,R(r)?Number.MAX_SAFE_INTEGER:r>>>0)}send_sftp_remove(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_remove(this.__wbg_ptr,i,c,t,s,k,r,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_rename(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_rename(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_sftp_upload_chunk(n,t,e,r,o,i,c){const s=N(n,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=S(i,j.__wbindgen_export);j.channel_send_sftp_upload_chunk(this.__wbg_ptr,s,_,t,e,r,o,u,k,R(c)?Number.MAX_SAFE_INTEGER:c>>>0)}send_sftp_upload_start(n,t,e,r,o,i,c){const s=N(n,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=N(e,j.__wbindgen_export,j.__wbindgen_export2),a=k,f=N(r,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_sftp_upload_start(this.__wbg_ptr,s,_,t,u,a,f,k,o,i,R(c)?Number.MAX_SAFE_INTEGER:c>>>0)}send_sftp_write_file(n,t,e,r,o){const i=N(n,j.__wbindgen_export,j.__wbindgen_export2),c=k,s=N(e,j.__wbindgen_export,j.__wbindgen_export2),_=k,u=S(r,j.__wbindgen_export);j.channel_send_sftp_write_file(this.__wbg_ptr,i,c,t,s,_,u,k,R(o)?Number.MAX_SAFE_INTEGER:o>>>0)}send_ssh_terminal_resize(n,t,e,r,o,i){const c=N(n,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_ssh_terminal_resize(this.__wbg_ptr,c,k,t,e,r,o,i)}send_ssh_tunnel_data(n,t,e){const r=N(n,j.__wbindgen_export,j.__wbindgen_export2),o=k,i=N(e,j.__wbindgen_export,j.__wbindgen_export2);j.channel_send_ssh_tunnel_data(this.__wbg_ptr,r,o,t,i,k)}start_heartbeat(n){j.channel_start_heartbeat(this.__wbg_ptr,n)}stop_heartbeat(){j.channel_stop_heartbeat(this.__wbg_ptr)}update_service(n,t,e,r,o,i,c,s,_,u){const a=N(n,j.__wbindgen_export,j.__wbindgen_export2),f=k,b=N(t,j.__wbindgen_export,j.__wbindgen_export2),l=k,d=N(e,j.__wbindgen_export,j.__wbindgen_export2),w=k;var g=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2),h=k;const p=N(o,j.__wbindgen_export,j.__wbindgen_export2),m=k;var y=R(c)?0:N(c,j.__wbindgen_export,j.__wbindgen_export2),v=k,A=R(s)?0:N(s,j.__wbindgen_export,j.__wbindgen_export2),S=k,T=R(_)?0:N(_,j.__wbindgen_export,j.__wbindgen_export2);j.channel_update_service(this.__wbg_ptr,a,f,b,l,d,w,g,h,p,m,i,y,v,A,S,T,k,R(u)?Number.MAX_SAFE_INTEGER:u>>>0)}}Symbol.dispose&&(n.prototype[Symbol.dispose]=n.prototype.free);const t=Object.freeze({Generic:0,0:"Generic",Authentication:10,10:"Authentication",RequiresUsername:100,100:"RequiresUsername",RequiresPassword:110,110:"RequiresPassword",RequiresUsernamePassword:120,120:"RequiresUsernamePassword"});function e(){const n={__proto__:null,__wbg_Error_67e7344beaa85059:function(n,t){return u(Error(w(n,t)))},__wbg_String_8564e559799eccda:function(n,t){const e=N(String(p(t)),j.__wbindgen_export,j.__wbindgen_export2),r=k;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_debug_string_0e68cf47c9cbd9b0:function(n,t){const e=N(f(p(t)),j.__wbindgen_export,j.__wbindgen_export2),r=k;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_string_get_92ab86bb19cbc12f:function(n,t){const e=p(t),r="string"==typeof e?e:void 0;var o=R(r)?0:N(r,j.__wbindgen_export,j.__wbindgen_export2),i=k;d().setInt32(n+4,i,!0),d().setInt32(n+0,o,!0)},__wbg___wbindgen_throw_5d9e815e6fdf150f:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_997e73d32238e655:function(n){p(n)._wbg_cb_unref()},__wbg_call_269c5566fbede3eb:function(){return m((function(n,t){return u(p(n).call(p(t)))}),arguments)},__wbg_call_6bcf8d3e20937e46:function(){return m((function(n,t,e){return u(p(n).call(p(t),p(e)))}),arguments)},__wbg_call_7bbd9cceba9949ad:function(){return m((function(n,t,e,r){return u(p(n).call(p(t),p(e),p(r)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(T(n)))},__wbg_close_a009f540ff811039:function(){return m((function(n){p(n).close()}),arguments)},__wbg_data_aa7ba49b34c0d883:function(n){return u(p(n).data)},__wbg_from_a39669ce566077da:function(n){return u(Array.from(p(n)))},__wbg_getRandomValues_a608c4436c19407a:function(){return m((function(n,t){globalThis.crypto.getRandomValues(b(n,t))}),arguments)},__wbg_get_989d0a1309644f2b:function(){return m((function(n,t){return u(Reflect.get(p(n),p(t)))}),arguments)},__wbg_info_379bfbf416294b93:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_d4ff01f8247925ae:function(n){let t;try{t=p(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_31bdaf014f5fbde2:function(n){return p(n).length},__wbg_new_1da3429bc3c4541c:function(n){return u(new Uint8Array(p(n)))},__wbg_new_bebc3f4757acf305:function(){return u(new Object)},__wbg_new_ffa92086ea89f79c:function(){return u(new Array)},__wbg_new_with_str_sequence_9ab4875494df9d99:function(){return m((function(n,t,e){return u(new WebSocket(w(n,t),p(e)))}),arguments)},__wbg_prototypesetcall_ae9f5e7459250748:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),p(e))},__wbg_push_bfdf956ba476f65b:function(n,t){return p(n).push(p(t))},__wbg_readyState_83df235b27cf257f:function(n){return p(n).readyState},__wbg_send_af811d92e7aea5c4:function(){return m((function(n,t,e){p(n).send(b(t,e))}),arguments)},__wbg_setInterval_cbf1c35c6a692d37:function(){return m((function(n,t){return u(setInterval(p(n),t))}),arguments)},__wbg_set_13d25b81ab403f5e:function(n,t,e){p(n)[t>>>0]=T(e)},__wbg_set_6be42768c690e380:function(n,t,e){p(n)[T(t)]=T(e)},__wbg_set_binaryType_f88804219cea0f9e:function(n,t){p(n).binaryType=s[t]},__wbg_set_onclose_97aab74a1c2662f7:function(n,t){p(n).onclose=p(t)},__wbg_set_onerror_88cb2134dca3aba2:function(n,t){p(n).onerror=p(t)},__wbg_set_onmessage_0f0d391465909a45:function(n,t){p(n).onmessage=p(t)},__wbg_set_onopen_e91e64af99b7966d:function(n,t){p(n).onopen=p(t)},__wbg_warn_0f116401e19c8ad8:function(n,t){console.warn(w(n,t))},__wbindgen_generic_0000000000000001:function(n,t){return u(A(n,t,o))},__wbindgen_generic_0000000000000002:function(n,t){return u(A(n,t,i))},__wbindgen_generic_0000000000000003:function(n,t){return u(A(n,t,c))},__wbindgen_generic_0000000000000004:function(n,t){return u(A(n,t,r))},__wbindgen_generic_0000000000000005:function(n){return u(n)},__wbindgen_generic_0000000000000006:function(n,t){return u(b(n,t))},__wbindgen_generic_0000000000000007:function(n,t){return u(w(n,t))},__wbindgen_generic_0000000000000008:function(n){return u(BigInt.asUintN(64,n))},__wbindgen_object_clone_ref:function(n){return u(p(n))},__wbindgen_object_drop_ref:function(n){T(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){j.__wasm_bindgen_func_elem_64(n,t)}function o(n,t,e){j.__wasm_bindgen_func_elem_60(n,t,u(e))}function i(n,t,e){j.__wasm_bindgen_func_elem_60_37(n,t,u(e))}function c(n,t,e){j.__wasm_bindgen_func_elem_60_38(n,t,u(e))}const s=["blob","arraybuffer"],_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>j.__wbg_channel_free(n,1)));function u(n){v===y.length&&y.push(y.length+1);const t=v;return v=y[t],y[t]=n,t}const a="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>j.__wbindgen_export4(n.a,n.b)));function f(n){const t=typeof n;if("number"==t||"boolean"==t||null==n)return`${n}`;if("string"==t)return`"${n}"`;if("symbol"==t){const t=n.description;return null==t?"Symbol":`Symbol(${t})`}if("function"==t){const t=n.name;return"string"==typeof t&&t.length>0?`Function(${t})`:"Function"}if(Array.isArray(n)){const t=n.length;let e="[";t>0&&(e+=f(n[0]));for(let r=1;r<t;r++)e+=", "+f(n[r]);return e+="]",e}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(!(e&&e.length>1))return toString.call(n);if(r=e[1],"Object"==r)try{return"Object("+JSON.stringify(n)+")"}catch(n){return"Object"}return n instanceof Error?`${n.name}: ${n.message}\n${n.stack}`:r}function b(n,t){return n>>>=0,h().subarray(n/1,n/1+t)}let l=null;function d(){return(null===l||!0===l.buffer.detached||void 0===l.buffer.detached&&l.buffer!==j.memory.buffer)&&(l=new DataView(j.memory.buffer)),l}function w(n,t){return function(n,t){return P+=t,P>=O&&(F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),F.decode(),P=t),F.decode(h().subarray(n,n+t))}(n>>>0,t)}let g=null;function h(){return null!==g&&0!==g.byteLength||(g=new Uint8Array(j.memory.buffer)),g}function p(n){return y[n]}function m(n,t){try{return n.apply(this,t)}catch(n){j.__wbindgen_export3(u(n))}}let y=new Array(1024).fill(void 0);y.push(void 0,null,!0,!1);let v=y.length;function R(n){return null==n}function A(n,t,e){const r={a:n,b:t,cnt:1},o=(...n)=>{r.cnt++;const t=r.a;r.a=0;try{return e(t,r.b,...n)}finally{r.a=t,o._wbg_cb_unref()}};return o._wbg_cb_unref=()=>{0==--r.cnt&&(j.__wbindgen_export4(r.a,r.b),r.a=0,a.unregister(r))},a.register(o,r,r),o}function S(n,t){const e=t(1*n.length,1)>>>0;return h().set(n,e/1),k=n.length,e}function N(n,t,e){if(void 0===e){const e=U.encode(n),r=t(e.length,1)>>>0;return h().subarray(r,r+e.length).set(e),k=e.length,r}let r=n.length,o=t(r,1)>>>0;const i=h();let c=0;for(;c<r;c++){const t=n.charCodeAt(c);if(t>127)break;i[o+c]=t}if(c!==r){0!==c&&(n=n.slice(c)),o=e(o,r,r=c+3*n.length,1)>>>0;const t=h().subarray(o+c,o+r);c+=U.encodeInto(n,t).written,o=e(o,r,c,1)>>>0}return k=c,o}function T(n){const t=p(n);return function(n){n<1028||(y[n]=v,v=n)}(n),t}let F=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});F.decode();const O=2146435072;let P=0;const U=new TextEncoder;"encodeInto"in U||(U.encodeInto=function(n,t){const e=U.encode(n);return t.set(e),{read:n.length,written:e.length}});let j,k=0;async function W(n){if(void 0!==j)return j;void 0!==n&&(Object.getPrototypeOf(n)===Object.prototype?({module_or_path:n}=n):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===n&&(n=new URL("phirepass-channel_bg.wasm",import.meta.url));const t=e();("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:r}=await async function(n,t){if("function"==typeof Response&&n instanceof Response){if(!n.ok)throw new Error(`failed to fetch Wasm: ${n.status} ${n.statusText} fetching '${n.url}'`);if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,t)}catch(t){if(!function(n){switch(n){case"basic":case"cors":case"default":return!0}return!1}(n.type)||"application/wasm"===n.headers.get("Content-Type"))throw t;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",t)}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}(await n,t);return function(n){return j=n.exports,l=null,g=null,j}(r)}var $,q,E;!function(n){n.Error="Error",n.AuthSuccess="AuthSuccess",n.TunnelOpened="TunnelOpened",n.TunnelClosed="TunnelClosed",n.TunnelData="TunnelData",n.RDPAuthorized="RDPAuthorized",n.SFTPListItems="SFTPListItems",n.SFTPDownloadStartResponse="SFTPDownloadStartResponse",n.SFTPDownloadChunk="SFTPDownloadChunk",n.SFTPUploadStartResponse="SFTPUploadStartResponse",n.SFTPUploadChunkAck="SFTPUploadChunkAck",n.SFTPOpResult="SFTPOpResult"}($||($={})),function(n){n[n.Username=0]="Username",n[n.Password=1]="Password",n[n.Default=2]="Default"}(q||(q={})),function(n){n.Disconnected="disconnected",n.Connected="connected",n.Error="error"}(E||(E={}));export{n as C,t as E,q as I,$ as P,W as _,E as a}
@@ -1 +1 @@
1
- import{p as e,b as r}from"./p-AP5XjS35.js";export{s as setNonce}from"./p-AP5XjS35.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-0f7d5b4b",[[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-c976ff11",[[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],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-4c11e075",[[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"],ctrlArmed:[32],altArmed:[32]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]]],e))));
1
+ import{p as e,b as r}from"./p-AP5XjS35.js";export{s as setNonce}from"./p-AP5XjS35.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-3807ca14",[[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-33502606",[[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],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-99a20894",[[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"],ctrlArmed:[32],altArmed:[32]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]]],e))));
@@ -16,6 +16,7 @@ export declare class PhirepassTerminal {
16
16
  private inputMode;
17
17
  private resizeObserver;
18
18
  private resizeDebounceHandle?;
19
+ private fitRetryHandle?;
19
20
  private session_id?;
20
21
  private usernameBuffer;
21
22
  private passwordBuffer;
@@ -85,6 +86,34 @@ export declare class PhirepassTerminal {
85
86
  componentDidLoad(): void;
86
87
  disconnectedCallback(): Promise<void>;
87
88
  private is_terminal_open;
89
+ /**
90
+ * Size the session to its container, and **keep trying until it works**.
91
+ *
92
+ * The bug this replaces: a fit could be skipped — the renderer not ready
93
+ * yet, `connected` not yet set, `fit()` throwing on dimensions that do not
94
+ * exist for another frame — and nothing ever retried it. The only other
95
+ * thing that fits is the `ResizeObserver`, so a terminal opened into a
96
+ * container that never changes size again stayed at whatever number of rows
97
+ * it happened to have. On a panel the user does not resize, that is
98
+ * permanent: the session renders at a fraction of the height it was given
99
+ * and the dead space below it is not part of the terminal at all.
100
+ *
101
+ * Retrying on `requestAnimationFrame` rather than a timer because what is
102
+ * being waited for *is* a frame: xterm computes its cell metrics from a
103
+ * measured element, and that measurement is only meaningful once the
104
+ * browser has laid the container out and the font it will actually use has
105
+ * loaded. The attempt cap keeps a container that is genuinely zero-sized —
106
+ * a hidden tab, a collapsed panel — from spinning a frame loop forever;
107
+ * the observer will call this again when it gains a size.
108
+ */
109
+ private schedule_fit;
110
+ /**
111
+ * One attempt. `true` when the session is now sized to its container.
112
+ *
113
+ * A container with no height yet counts as a failure rather than a success,
114
+ * which is what makes the retry above worth having: `fit()` on a zero-height
115
+ * parent does not throw, it computes one row and returns happily.
116
+ */
88
117
  private fit_terminal_safely;
89
118
  private try_connect;
90
119
  private setup_terminal;
@@ -102,6 +131,19 @@ export declare class PhirepassTerminal {
102
131
  private handle_tunnel_data;
103
132
  private handle_tunnel_closed;
104
133
  private connect;
134
+ /**
135
+ * Fit again once the web fonts have actually loaded.
136
+ *
137
+ * xterm measures one character to derive its cell size, and if that
138
+ * measurement happens while the browser is still falling back — "Berkeley
139
+ * Mono" and "Fira Code" are both remote — every row is sized from the wrong
140
+ * font. The container does not change size when the real font arrives, so
141
+ * the `ResizeObserver` never fires and nothing else would ever correct it.
142
+ *
143
+ * Guarded because `document.fonts` is absent in some embedding contexts, and
144
+ * a missing font API is not a reason to fail to open a shell.
145
+ */
146
+ private refit_when_fonts_settle;
105
147
  private setup_resize_observer;
106
148
  private handle_terminal_data;
107
149
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phirepass-widgets",
3
- "version": "0.0.105",
3
+ "version": "0.0.107",
4
4
  "description": "Phirepass widgets for the web application",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "devDependencies": {
44
44
  "@stencil/core": "^4.44.2",
45
- "@stencil/vitest": "^1.15.0",
45
+ "@stencil/vitest": "^1.15.1",
46
46
  "@types/node": "^26",
47
47
  "vitest": "^4.1.11"
48
48
  },
@@ -57,6 +57,6 @@
57
57
  "@xterm/addon-web-links": "^0.12.0",
58
58
  "@xterm/addon-webgl": "^0.19.0",
59
59
  "@xterm/xterm": "^6.0.0",
60
- "phirepass-channel": "^0.1.346"
60
+ "phirepass-channel": "^0.1.348"
61
61
  }
62
62
  }