phirepass-widgets 0.0.46 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-DTAHGGCM.js → index-BiurVooY.js} +58 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +186 -20
- package/dist/cjs/phirepass-terminal.cjs.entry.js +3 -3
- package/dist/cjs/phirepass-widgets.cjs.js +2 -2
- package/dist/cjs/{protocol-C0YjPrve.js → protocol-BDROfN76.js} +2 -1
- package/dist/collection/common/protocol.js +1 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.chevron.svg +6 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +421 -119
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.file.svg +6 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.folder.svg +6 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.go_up.svg +6 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +190 -19
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.refresh.svg +8 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.upload.svg +7 -0
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{phirepass-widgets/p-rdgKcesn.js → components/p-BcIhGXR0.js} +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +2 -2
- package/dist/esm/{index-D6RLmr6w.js → index-zZMsduaU.js} +58 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-sftp-client.entry.js +186 -20
- package/dist/esm/phirepass-terminal.entry.js +3 -3
- package/dist/esm/phirepass-widgets.js +3 -3
- package/dist/esm/{protocol-rdgKcesn.js → protocol-BcIhGXR0.js} +1 -0
- package/dist/phirepass-widgets/p-32ca8ca5.entry.js +1 -0
- package/dist/phirepass-widgets/{p-f8e6ba02.entry.js → p-5b21bc31.entry.js} +5 -5
- package/dist/{components/p-rdgKcesn.js → phirepass-widgets/p-BcIhGXR0.js} +1 -1
- package/dist/phirepass-widgets/p-zZMsduaU.js +2 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/common/protocol.d.ts +37 -13
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +27 -1
- package/package.json +1 -1
- package/dist/phirepass-widgets/p-5e9ce2ac.entry.js +0 -1
- package/dist/phirepass-widgets/p-D6RLmr6w.js +0 -2
|
@@ -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();E.__wbg_channel_free(n,0)}authenticate(n,t,e){const r=S(n,E.__wbindgen_export,E.__wbindgen_export2),o=I,c=S(t,E.__wbindgen_export,E.__wbindgen_export2);E.channel_authenticate(this.__wbg_ptr,r,o,c,I,A(e)?4294967297:e>>>0)}connect(){E.channel_connect(this.__wbg_ptr)}disconnect(){E.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==E.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==E.channel_is_disconnected(this.__wbg_ptr)}constructor(n,t,e){const r=S(n,E.__wbindgen_export,E.__wbindgen_export2),o=I,c=S(t,E.__wbindgen_export,E.__wbindgen_export2),i=I;var s=A(e)?0:S(e,E.__wbindgen_export,E.__wbindgen_export2);const u=E.channel_new(r,o,c,i,s,I);return this.__wbg_ptr=u>>>0,_.register(this,this.__wbg_ptr,this),this}on_connection_close(n){E.channel_on_connection_close(this.__wbg_ptr,A(n)?0:u(n))}on_connection_error(n){E.channel_on_connection_error(this.__wbg_ptr,A(n)?0:u(n))}on_connection_message(n){E.channel_on_connection_message(this.__wbg_ptr,A(n)?0:u(n))}on_connection_open(n){E.channel_on_connection_open(this.__wbg_ptr,A(n)?0:u(n))}on_protocol_message(n){E.channel_on_protocol_message(this.__wbg_ptr,A(n)?0:u(n))}open_sftp_tunnel(n,t,e,r){const o=S(n,E.__wbindgen_export,E.__wbindgen_export2),c=I;var i=A(t)?0:S(t,E.__wbindgen_export,E.__wbindgen_export2),s=I,_=A(e)?0:S(e,E.__wbindgen_export,E.__wbindgen_export2);E.channel_open_sftp_tunnel(this.__wbg_ptr,o,c,i,s,_,I,A(r)?4294967297:r>>>0)}open_ssh_tunnel(n,t,e,r){const o=S(n,E.__wbindgen_export,E.__wbindgen_export2),c=I;var i=A(t)?0:S(t,E.__wbindgen_export,E.__wbindgen_export2),s=I,_=A(e)?0:S(e,E.__wbindgen_export,E.__wbindgen_export2);E.channel_open_ssh_tunnel(this.__wbg_ptr,o,c,i,s,_,I,A(r)?4294967297:r>>>0)}send_sftp_delete(n,t,e,r,o){const c=S(n,E.__wbindgen_export,E.__wbindgen_export2),i=I,s=S(e,E.__wbindgen_export,E.__wbindgen_export2),_=I,u=S(r,E.__wbindgen_export,E.__wbindgen_export2);E.channel_send_sftp_delete(this.__wbg_ptr,c,i,t,s,_,u,I,A(o)?4294967297:o>>>0)}send_sftp_download_chunk(n,t,e,r,o){const c=S(n,E.__wbindgen_export,E.__wbindgen_export2);E.channel_send_sftp_download_chunk(this.__wbg_ptr,c,I,t,e,r,A(o)?4294967297:o>>>0)}send_sftp_download_start(n,t,e,r,o){const c=S(n,E.__wbindgen_export,E.__wbindgen_export2),i=I,s=S(e,E.__wbindgen_export,E.__wbindgen_export2),_=I,u=S(r,E.__wbindgen_export,E.__wbindgen_export2);E.channel_send_sftp_download_start(this.__wbg_ptr,c,i,t,s,_,u,I,A(o)?4294967297:o>>>0)}send_sftp_list_data(n,t,e,r){const o=S(n,E.__wbindgen_export,E.__wbindgen_export2),c=I,i=S(e,E.__wbindgen_export,E.__wbindgen_export2);E.channel_send_sftp_list_data(this.__wbg_ptr,o,c,t,i,I,A(r)?4294967297:r>>>0)}send_sftp_upload_chunk(n,t,e,r,o,c,i){const s=S(n,E.__wbindgen_export,E.__wbindgen_export2),_=I,u=function(n){const t=(0,E.__wbindgen_export)(1*n.length,1)>>>0;return h().set(n,t/1),I=n.length,t}(c);E.channel_send_sftp_upload_chunk(this.__wbg_ptr,s,_,t,e,r,o,u,I,A(i)?4294967297:i>>>0)}send_sftp_upload_start(n,t,e,r,o,c,i){const s=S(n,E.__wbindgen_export,E.__wbindgen_export2),_=I,u=S(e,E.__wbindgen_export,E.__wbindgen_export2),a=I,f=S(r,E.__wbindgen_export,E.__wbindgen_export2);E.channel_send_sftp_upload_start(this.__wbg_ptr,s,_,t,u,a,f,I,o,c,A(i)?4294967297:i>>>0)}send_ssh_terminal_resize(n,t,e,r,o,c){const i=S(n,E.__wbindgen_export,E.__wbindgen_export2);E.channel_send_ssh_terminal_resize(this.__wbg_ptr,i,I,t,e,r,o,c)}send_ssh_tunnel_data(n,t,e){const r=S(n,E.__wbindgen_export,E.__wbindgen_export2),o=I,c=S(e,E.__wbindgen_export,E.__wbindgen_export2);E.channel_send_ssh_tunnel_data(this.__wbg_ptr,r,o,t,c,I)}start_heartbeat(n){E.channel_start_heartbeat(this.__wbg_ptr,n)}stop_heartbeat(){E.channel_stop_heartbeat(this.__wbg_ptr)}}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_960c155d3d49e4c2:function(n,t){return u(Error(w(n,t)))},__wbg_String_8564e559799eccda:function(n,t){const e=S(String(y(t)),E.__wbindgen_export,E.__wbindgen_export2),r=I;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_debug_string_ab4b34d23d6778bd:function(n,t){const e=S(f(y(t)),E.__wbindgen_export,E.__wbindgen_export2),r=I;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(n,t){const e=y(t),r="string"==typeof e?e:void 0;var o=A(r)?0:S(r,E.__wbindgen_export,E.__wbindgen_export2),c=I;d().setInt32(n+4,c,!0),d().setInt32(n+0,o,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_b46c9b5a9f08ec37:function(n){y(n)._wbg_cb_unref()},__wbg_call_14b169f759b26747:function(){return p((function(n,t){return u(y(n).call(y(t)))}),arguments)},__wbg_call_a24592a6f349a97e:function(){return p((function(n,t,e){return u(y(n).call(y(t),y(e)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(j(n)))},__wbg_close_88106990eea7f544:function(){return p((function(n){y(n).close()}),arguments)},__wbg_data_bb9dffdd1e99cf2d:function(n){return u(y(n).data)},__wbg_from_0dbf29f09e7fb200:function(n){return u(Array.from(y(n)))},__wbg_info_4f09735f023f7fae:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3:function(n){let t;try{t=y(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_9f1775224cf1d815:function(n){return y(n).length},__wbg_new_0c7403db6e782f19:function(n){return u(new Uint8Array(y(n)))},__wbg_new_682678e2f47e32bc:function(){return u(new Array)},__wbg_new_aa8d0fa9762c29bd:function(){return u(new Object)},__wbg_new_with_str_sequence_6453b755acdcc2e7:function(){return p((function(n,t,e){return u(new WebSocket(w(n,t),y(e)))}),arguments)},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),y(e))},__wbg_push_471a5b068a5295f6:function(n,t){return y(n).push(y(t))},__wbg_readyState_c78e609c7de3b381:function(n){return y(n).readyState},__wbg_send_186c85704c7f2d00:function(){return p((function(n,t,e){y(n).send(b(t,e))}),arguments)},__wbg_setInterval_cbf1c35c6a692d37:function(){return p((function(n,t){return u(setInterval(y(n),t))}),arguments)},__wbg_set_3bf1de9fab0cd644:function(n,t,e){y(n)[t>>>0]=j(e)},__wbg_set_6be42768c690e380:function(n,t,e){y(n)[j(t)]=j(e)},__wbg_set_binaryType_770e68648ca5e83d:function(n,t){y(n).binaryType=s[t]},__wbg_set_onclose_17fa3bbcc4ba3541:function(n,t){y(n).onclose=y(t)},__wbg_set_onerror_da99c4232662a084:function(n,t){y(n).onerror=y(t)},__wbg_set_onmessage_c1db358b9c38e3f1:function(n,t){y(n).onmessage=y(t)},__wbg_set_onopen_cd47b8fb1d92dee9:function(n,t){y(n).onopen=y(t)},__wbg_warn_938671953d9be936:function(n,t){console.warn(w(n,t))},__wbindgen_cast_0000000000000001:function(n,t){return u(R(n,t,o))},__wbindgen_cast_0000000000000002:function(n,t){return u(R(n,t,c))},__wbindgen_cast_0000000000000003:function(n,t){return u(R(n,t,i))},__wbindgen_cast_0000000000000004:function(n,t){return u(R(n,t,r))},__wbindgen_cast_0000000000000005:function(n){return u(n)},__wbindgen_cast_0000000000000006:function(n,t){return u(b(n,t))},__wbindgen_cast_0000000000000007:function(n,t){return u(w(n,t))},__wbindgen_cast_0000000000000008:function(n){return u(BigInt.asUintN(64,n))},__wbindgen_object_clone_ref:function(n){return u(y(n))},__wbindgen_object_drop_ref:function(n){j(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){E.__wasm_bindgen_func_elem_39(n,t)}function o(n,t,e){E.__wasm_bindgen_func_elem_41(n,t,u(e))}function c(n,t,e){E.__wasm_bindgen_func_elem_41_1(n,t,u(e))}function i(n,t,e){E.__wasm_bindgen_func_elem_41_2(n,t,u(e))}const s=["blob","arraybuffer"],_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>E.__wbg_channel_free(n>>>0,1)));function u(n){v===m.length&&m.push(m.length+1);const t=v;return v=m[t],m[t]=n,t}const a="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>E.__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!==E.memory.buffer)&&(l=new DataView(E.memory.buffer)),l}function w(n,t){return function(n,t){return q+=t,q>=U&&(O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),O.decode(),q=t),O.decode(h().subarray(n,n+t))}(n>>>=0,t)}let g=null;function h(){return null!==g&&0!==g.byteLength||(g=new Uint8Array(E.memory.buffer)),g}function y(n){return m[n]}function p(n,t){try{return n.apply(this,t)}catch(n){E.__wbindgen_export3(u(n))}}let m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);let v=m.length;function A(n){return null==n}function R(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&&(E.__wbindgen_export4(r.a,r.b),r.a=0,a.unregister(r))},a.register(o,r,r),o}function S(n,t,e){if(void 0===e){const e=W.encode(n),r=t(e.length,1)>>>0;return h().subarray(r,r+e.length).set(e),I=e.length,r}let r=n.length,o=t(r,1)>>>0;const c=h();let i=0;for(;i<r;i++){const t=n.charCodeAt(i);if(t>127)break;c[o+i]=t}if(i!==r){0!==i&&(n=n.slice(i)),o=e(o,r,r=i+3*n.length,1)>>>0;const t=h().subarray(o+i,o+r);i+=W.encodeInto(n,t).written,o=e(o,r,i,1)>>>0}return I=i,o}function j(n){const t=y(n);return function(n){n<1028||(m[n]=v,v=n)}(n),t}let O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});O.decode();const U=2146435072;let q=0;const W=new TextEncoder;"encodeInto"in W||(W.encodeInto=function(n,t){const e=W.encode(n);return t.set(e),{read:n.length,written:e.length}});let E,I=0;async function T(n){if(void 0!==E)return E;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("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,t)}catch(t){if(!n.ok||!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 E=n.exports,l=null,g=null,E}(r)}var F,$,z;!function(n){n.Error="Error",n.AuthSuccess="AuthSuccess",n.TunnelOpened="TunnelOpened",n.TunnelClosed="TunnelClosed",n.TunnelData="TunnelData"}(F||(F={})),function(n){n[n.Username=0]="Username",n[n.Password=1]="Password",n[n.Default=2]="Default"}($||($={})),function(n){n.Disconnected="disconnected",n.Connected="connected",n.Error="error"}(z||(z={}));export{n as C,t as E,$ as I,F as P,T as _,z 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();T.__wbg_channel_free(n,0)}authenticate(n,t,e){const r=S(n,T.__wbindgen_export,T.__wbindgen_export2),o=W,c=S(t,T.__wbindgen_export,T.__wbindgen_export2);T.channel_authenticate(this.__wbg_ptr,r,o,c,W,A(e)?4294967297:e>>>0)}connect(){T.channel_connect(this.__wbg_ptr)}disconnect(){T.channel_disconnect(this.__wbg_ptr)}is_connected(){return 0!==T.channel_is_connected(this.__wbg_ptr)}is_disconnected(){return 0!==T.channel_is_disconnected(this.__wbg_ptr)}constructor(n,t,e){const r=S(n,T.__wbindgen_export,T.__wbindgen_export2),o=W,c=S(t,T.__wbindgen_export,T.__wbindgen_export2),i=W;var s=A(e)?0:S(e,T.__wbindgen_export,T.__wbindgen_export2);const u=T.channel_new(r,o,c,i,s,W);return this.__wbg_ptr=u>>>0,_.register(this,this.__wbg_ptr,this),this}on_connection_close(n){T.channel_on_connection_close(this.__wbg_ptr,A(n)?0:u(n))}on_connection_error(n){T.channel_on_connection_error(this.__wbg_ptr,A(n)?0:u(n))}on_connection_message(n){T.channel_on_connection_message(this.__wbg_ptr,A(n)?0:u(n))}on_connection_open(n){T.channel_on_connection_open(this.__wbg_ptr,A(n)?0:u(n))}on_protocol_message(n){T.channel_on_protocol_message(this.__wbg_ptr,A(n)?0:u(n))}open_sftp_tunnel(n,t,e,r){const o=S(n,T.__wbindgen_export,T.__wbindgen_export2),c=W;var i=A(t)?0:S(t,T.__wbindgen_export,T.__wbindgen_export2),s=W,_=A(e)?0:S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_open_sftp_tunnel(this.__wbg_ptr,o,c,i,s,_,W,A(r)?4294967297:r>>>0)}open_ssh_tunnel(n,t,e,r){const o=S(n,T.__wbindgen_export,T.__wbindgen_export2),c=W;var i=A(t)?0:S(t,T.__wbindgen_export,T.__wbindgen_export2),s=W,_=A(e)?0:S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_open_ssh_tunnel(this.__wbg_ptr,o,c,i,s,_,W,A(r)?4294967297:r>>>0)}send_sftp_delete(n,t,e,r,o){const c=S(n,T.__wbindgen_export,T.__wbindgen_export2),i=W,s=S(e,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=S(r,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_delete(this.__wbg_ptr,c,i,t,s,_,u,W,A(o)?4294967297:o>>>0)}send_sftp_download_chunk(n,t,e,r,o){const c=S(n,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_download_chunk(this.__wbg_ptr,c,W,t,e,r,A(o)?4294967297:o>>>0)}send_sftp_download_start(n,t,e,r,o){const c=S(n,T.__wbindgen_export,T.__wbindgen_export2),i=W,s=S(e,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=S(r,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_download_start(this.__wbg_ptr,c,i,t,s,_,u,W,A(o)?4294967297:o>>>0)}send_sftp_list_data(n,t,e,r){const o=S(n,T.__wbindgen_export,T.__wbindgen_export2),c=W,i=S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_list_data(this.__wbg_ptr,o,c,t,i,W,A(r)?4294967297:r>>>0)}send_sftp_upload_chunk(n,t,e,r,o,c,i){const s=S(n,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=function(n){const t=(0,T.__wbindgen_export)(1*n.length,1)>>>0;return h().set(n,t/1),W=n.length,t}(c);T.channel_send_sftp_upload_chunk(this.__wbg_ptr,s,_,t,e,r,o,u,W,A(i)?4294967297:i>>>0)}send_sftp_upload_start(n,t,e,r,o,c,i){const s=S(n,T.__wbindgen_export,T.__wbindgen_export2),_=W,u=S(e,T.__wbindgen_export,T.__wbindgen_export2),a=W,f=S(r,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_sftp_upload_start(this.__wbg_ptr,s,_,t,u,a,f,W,o,c,A(i)?4294967297:i>>>0)}send_ssh_terminal_resize(n,t,e,r,o,c){const i=S(n,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_ssh_terminal_resize(this.__wbg_ptr,i,W,t,e,r,o,c)}send_ssh_tunnel_data(n,t,e){const r=S(n,T.__wbindgen_export,T.__wbindgen_export2),o=W,c=S(e,T.__wbindgen_export,T.__wbindgen_export2);T.channel_send_ssh_tunnel_data(this.__wbg_ptr,r,o,t,c,W)}start_heartbeat(n){T.channel_start_heartbeat(this.__wbg_ptr,n)}stop_heartbeat(){T.channel_stop_heartbeat(this.__wbg_ptr)}}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_960c155d3d49e4c2:function(n,t){return u(Error(w(n,t)))},__wbg_String_8564e559799eccda:function(n,t){const e=S(String(y(t)),T.__wbindgen_export,T.__wbindgen_export2),r=W;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_debug_string_ab4b34d23d6778bd:function(n,t){const e=S(f(y(t)),T.__wbindgen_export,T.__wbindgen_export2),r=W;d().setInt32(n+4,r,!0),d().setInt32(n+0,e,!0)},__wbg___wbindgen_string_get_7ed5322991caaec5:function(n,t){const e=y(t),r="string"==typeof e?e:void 0;var o=A(r)?0:S(r,T.__wbindgen_export,T.__wbindgen_export2),c=W;d().setInt32(n+4,c,!0),d().setInt32(n+0,o,!0)},__wbg___wbindgen_throw_6b64449b9b9ed33c:function(n,t){throw new Error(w(n,t))},__wbg__wbg_cb_unref_b46c9b5a9f08ec37:function(n){y(n)._wbg_cb_unref()},__wbg_call_14b169f759b26747:function(){return p((function(n,t){return u(y(n).call(y(t)))}),arguments)},__wbg_call_a24592a6f349a97e:function(){return p((function(n,t,e){return u(y(n).call(y(t),y(e)))}),arguments)},__wbg_clearInterval_26ba580547547579:function(n){return u(clearInterval(j(n)))},__wbg_close_88106990eea7f544:function(){return p((function(n){y(n).close()}),arguments)},__wbg_data_bb9dffdd1e99cf2d:function(n){return u(y(n).data)},__wbg_from_0dbf29f09e7fb200:function(n){return u(Array.from(y(n)))},__wbg_info_4f09735f023f7fae:function(n,t){console.info(w(n,t))},__wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3:function(n){let t;try{t=y(n)instanceof ArrayBuffer}catch(n){t=!1}return t},__wbg_length_9f1775224cf1d815:function(n){return y(n).length},__wbg_new_0c7403db6e782f19:function(n){return u(new Uint8Array(y(n)))},__wbg_new_682678e2f47e32bc:function(){return u(new Array)},__wbg_new_aa8d0fa9762c29bd:function(){return u(new Object)},__wbg_new_with_str_sequence_6453b755acdcc2e7:function(){return p((function(n,t,e){return u(new WebSocket(w(n,t),y(e)))}),arguments)},__wbg_prototypesetcall_a6b02eb00b0f4ce2:function(n,t,e){Uint8Array.prototype.set.call(b(n,t),y(e))},__wbg_push_471a5b068a5295f6:function(n,t){return y(n).push(y(t))},__wbg_readyState_c78e609c7de3b381:function(n){return y(n).readyState},__wbg_send_186c85704c7f2d00:function(){return p((function(n,t,e){y(n).send(b(t,e))}),arguments)},__wbg_setInterval_cbf1c35c6a692d37:function(){return p((function(n,t){return u(setInterval(y(n),t))}),arguments)},__wbg_set_3bf1de9fab0cd644:function(n,t,e){y(n)[t>>>0]=j(e)},__wbg_set_6be42768c690e380:function(n,t,e){y(n)[j(t)]=j(e)},__wbg_set_binaryType_770e68648ca5e83d:function(n,t){y(n).binaryType=s[t]},__wbg_set_onclose_17fa3bbcc4ba3541:function(n,t){y(n).onclose=y(t)},__wbg_set_onerror_da99c4232662a084:function(n,t){y(n).onerror=y(t)},__wbg_set_onmessage_c1db358b9c38e3f1:function(n,t){y(n).onmessage=y(t)},__wbg_set_onopen_cd47b8fb1d92dee9:function(n,t){y(n).onopen=y(t)},__wbg_warn_938671953d9be936:function(n,t){console.warn(w(n,t))},__wbindgen_cast_0000000000000001:function(n,t){return u(R(n,t,o))},__wbindgen_cast_0000000000000002:function(n,t){return u(R(n,t,c))},__wbindgen_cast_0000000000000003:function(n,t){return u(R(n,t,i))},__wbindgen_cast_0000000000000004:function(n,t){return u(R(n,t,r))},__wbindgen_cast_0000000000000005:function(n){return u(n)},__wbindgen_cast_0000000000000006:function(n,t){return u(b(n,t))},__wbindgen_cast_0000000000000007:function(n,t){return u(w(n,t))},__wbindgen_cast_0000000000000008:function(n){return u(BigInt.asUintN(64,n))},__wbindgen_object_clone_ref:function(n){return u(y(n))},__wbindgen_object_drop_ref:function(n){j(n)}};return{__proto__:null,"./phirepass-channel_bg.js":n}}function r(n,t){T.__wasm_bindgen_func_elem_39(n,t)}function o(n,t,e){T.__wasm_bindgen_func_elem_41(n,t,u(e))}function c(n,t,e){T.__wasm_bindgen_func_elem_41_1(n,t,u(e))}function i(n,t,e){T.__wasm_bindgen_func_elem_41_2(n,t,u(e))}const s=["blob","arraybuffer"],_="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>T.__wbg_channel_free(n>>>0,1)));function u(n){v===m.length&&m.push(m.length+1);const t=v;return v=m[t],m[t]=n,t}const a="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((n=>T.__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!==T.memory.buffer)&&(l=new DataView(T.memory.buffer)),l}function w(n,t){return function(n,t){return q+=t,q>=U&&(O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),O.decode(),q=t),O.decode(h().subarray(n,n+t))}(n>>>=0,t)}let g=null;function h(){return null!==g&&0!==g.byteLength||(g=new Uint8Array(T.memory.buffer)),g}function y(n){return m[n]}function p(n,t){try{return n.apply(this,t)}catch(n){T.__wbindgen_export3(u(n))}}let m=new Array(1024).fill(void 0);m.push(void 0,null,!0,!1);let v=m.length;function A(n){return null==n}function R(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&&(T.__wbindgen_export4(r.a,r.b),r.a=0,a.unregister(r))},a.register(o,r,r),o}function S(n,t,e){if(void 0===e){const e=I.encode(n),r=t(e.length,1)>>>0;return h().subarray(r,r+e.length).set(e),W=e.length,r}let r=n.length,o=t(r,1)>>>0;const c=h();let i=0;for(;i<r;i++){const t=n.charCodeAt(i);if(t>127)break;c[o+i]=t}if(i!==r){0!==i&&(n=n.slice(i)),o=e(o,r,r=i+3*n.length,1)>>>0;const t=h().subarray(o+i,o+r);i+=I.encodeInto(n,t).written,o=e(o,r,i,1)>>>0}return W=i,o}function j(n){const t=y(n);return function(n){n<1028||(m[n]=v,v=n)}(n),t}let O=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});O.decode();const U=2146435072;let q=0;const I=new TextEncoder;"encodeInto"in I||(I.encodeInto=function(n,t){const e=I.encode(n);return t.set(e),{read:n.length,written:e.length}});let T,W=0;async function E(n){if(void 0!==T)return T;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("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(n,t)}catch(t){if(!n.ok||!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 T=n.exports,l=null,g=null,T}(r)}var F,P,$;!function(n){n.Error="Error",n.AuthSuccess="AuthSuccess",n.TunnelOpened="TunnelOpened",n.TunnelClosed="TunnelClosed",n.TunnelData="TunnelData",n.SFTPListItems="SFTPListItems"}(F||(F={})),function(n){n[n.Username=0]="Username",n[n.Password=1]="Password",n[n.Default=2]="Default"}(P||(P={})),function(n){n.Disconnected="disconnected",n.Connected="connected",n.Error="error"}($||($={}));export{n as C,t as E,P as I,F as P,E as _,$ as a}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],i=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(e,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},i=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u="undefined"!=typeof window?window:{},f={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},a=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),p=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),h=!1,m=[],v=[],y=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&f.u?w($):f.raf($))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},$=()=>{b(m),b(v),(h=m.length>0)&&f.raf($)},w=t=>a().then(t),g=y(v,!0);function j(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(p?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function O(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var S,k=new WeakMap,E=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,C=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!M(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?x(null,o):o),s=i)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,N);const u=x(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},x=(t,e)=>({u:0,O:t,m:null!=e?e:null,S:null,$:null,v:null,j:null}),L={},N={forEach:(t,e)=>t.map(P).forEach(e),map:(t,e)=>t.map(P).map(e).map(R)},P=t=>({vattrs:t.v,vchildren:t.$,vkey:t.j,vname:t.k,vtag:t.O,vtext:t.m}),R=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),C(t.vtag,e,...t.vchildren||[])}const e=x(t.vtag,t.vtext);return e.v=t.vattrs,e.$=t.vchildren,e.j=t.vkey,e.k=t.vname,e},D=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},H=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,T=t=>{var e;return null==(e=o(t))?void 0:e.$hostElement$},A=(t,e)=>{const n=T(t);return{emit:t=>U(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},U=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},W=(t,e,n,l,s,r)=>{if(n===l)return;let c=i(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=F(n);let i=F(l);e.remove(...o.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if("key"===e);else if("ref"===e)l&&et(l,t);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let i;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(i=t[1])}}return i||(i=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(i)||t.removeAttribute(i):t.setAttribute(i,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=M(l);if((c||o&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?c=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!c||4&r||s)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}else if(e="-"===e[2]?e.slice(3):i(u,a)?a.slice(2):a[2]+e.slice(3),n||l){const o=e.endsWith(V);e=e.replace(q,""),n&&f.rel(t,e,n,o),l&&f.ael(t,e,l,o)}},z=/\s/,F=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(z):[]),V="Capture",q=RegExp(V+"$"),G=(t,e,n)=>{const o=11===e.S.nodeType&&e.S.host?e.S.host:e.S,l=t&&t.v||{},i=e.v||{};for(const t of Y(Object.keys(l)))t in i||W(o,t,l[t],void 0,n,e.u);for(const t of Y(Object.keys(i)))W(o,t,l[t],i[t],n,e.u)};function Y(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Z=!1,_=[],B=[],I=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.S=u.document.createTextNode(o.m);else{if(!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.S=u.document.createElement(o.O),G(null,o,Z),o.$){const e="template"===o.O?l.content:l;for(s=0;s<o.$.length;++s)i=I(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=S,l},J=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===S&&(r=r.shadowRoot),"template"===n.O&&(r=r.content);l<=i;++l)o[l]&&(s=I(null,n,l),s&&(o[l].S=s,nt(r,s,e)))},K=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.S;tt(e),t&&t.remove()}}},Q=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),X=(t,e,n=!1)=>{const o=e.S=t.S,l=t.$,i=e.$,s=e.m;null==s?(G(t,e,Z),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,m=o[0],v=o[h];const y="template"===n.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(Q(d,m,l))X(d,m,l),d=e[++r],m=o[++c];else if(Q(p,v,l))X(p,v,l),p=e[--a],v=o[--h];else if(Q(d,v,l))X(d,v,l),nt(y,d.S,p.S.nextSibling),d=e[++r],v=o[--h];else if(Q(p,m,l))X(p,m,l),nt(y,p.S,d.S),p=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===m.j){u=f;break}u>=0?(s=e[u],s.O!==m.O?i=I(e&&e[c],n,u):(X(s,m,l),e[u]=void 0,i=s.S),m=o[++c]):(i=I(e&&e[c],n,c),m=o[++c]),i&&nt(d.S.parentNode,i,d.S)}r>a?J(t,null==o[h+1]?null:o[h+1].S,n,o,c,h):c>h&&K(e,r,a)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),J(o,null,e,i,0,i.length-1)):!n&&null!==l&&K(l,0,l.length-1)):t.m!==s&&(o.data=s)},tt=t=>{t.v&&t.v.ref&&_.push((()=>t.v.ref(null))),t.$&&t.$.map(tt)},et=(t,e)=>{B.push((()=>t(e)))},nt=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),ot=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},lt=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);ot(t,t.C);const n=()=>it(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},it=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.L.length&&t.L.forEach((t=>t(n))),l=dt(o,"componentWillLoad",void 0,n)):l=dt(o,"componentWillUpdate",void 0,n),l=st(l,(()=>dt(o,"componentWillRender",void 0,n))),st(l,(()=>ct(t,o,e)))},st=(t,e)=>rt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),rt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ct=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=E(e),s=c.get(i);if(!u.document)return i;if(t=11===t.nodeType?t:u.document,s)if("string"==typeof s){let l,r=k.get(t=t.head||t);if(r||k.set(t,r=new Set),!r.has(i)){l=u.document.createElement("style"),l.textContent=s;const c=null!=(n=f.N)?n:O(u.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),p?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=k.get(t);if(e||k.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}p?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ut(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>ft(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},ut=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.P||x(null,null),i=(t=>t&&t.O===L)(e)?e:C(null,null,e);if(S=o.tagName,n&&i.v)for(const t of Object.keys(i.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.v[t]=o[t]);i.O=null,i.u|=4,t.P=i,i.S=l.S=o.shadowRoot||o,X(l,i,n),_.forEach((t=>t())),_.length=0,B.forEach((t=>t())),B.length=0})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},ft=t=>{const e=t.$hostElement$,n=t.i,o=t.C;dt(n,"componentDidRender",void 0,e),64&t.u?dt(n,"componentDidUpdate",void 0,e):(t.u|=64,pt(e),dt(n,"componentDidLoad",void 0,e),t.R(e),o||at()),t.D(e),t.M&&(t.M(),t.M=void 0),512&t.u&&w((()=>lt(t,!1))),t.u&=-517},at=()=>{w((()=>U(u,"appload",{detail:{namespace:"phirepass-widgets"}})))},dt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},pt=t=>t.classList.add("hydrated"),ht=(t,e,n,l)=>{const i=o(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.l.get(e),u=i.u,f=i.i;if(n=H(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.l.set(e,n),l.H){const t=l.H[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(f?f[o](n,c,e):i.L.push((()=>{i.i[o](n,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||lt(i,!1)}}},mt=(e,n,l)=>{var i,s;const r=e.prototype;{e.watchers&&!n.H&&(n.H=D(e.watchers)),e.deserializers&&!n.T&&(n.T=e.deserializers),e.serializers&&!n.A&&(n.A=e.serializers);const c=Object.entries(null!=(i=n.t)?i:{});if(c.map((([e,[i]])=>{if(31&i||2&l&&32&i){const{get:s,set:c}=t(r,e)||{};s&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!s)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>o(this).l.get(e))(0,e);const t=o(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=o(this);if(s){if(c)return void 0===(32&i?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),c.call(this,H(t,i)),void ht(this,e,t=32&i?this[e]:s.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return ht(this,e,t,n),void(1&l&&!s.i&&s.L.push((()=>{4096&n.t[e][0]&&s.i[e]!==s.l.get(e)&&(s.i[e]=t)})));const o=()=>{const o=s.i[e];!s.l.get(e)&&o&&s.l.set(e,o),s.i[e]=H(t,i),ht(this,e,s.i[e],n)};s.i?o():s.L.push((()=>{o()}))}}}})}else 1&l&&64&i&&Object.defineProperty(r,e,{value(...t){var n;const l=o(this);return null==(n=null==l?void 0:l.U)?void 0:n.then((()=>{var n;return null==(n=l.i)?void 0:n[e](...t)}))}})})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,i){f.jmp((()=>{var s;const u=t.get(e),f=o(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&i!==l){const o=f.i,r=null==(s=n.H)?void 0:s[e];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=o[s]&&(128&t||1&r)&&o[s].call(o,i,l,e)}))}return}const a=c.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===i&&void 0===this[u];d&&(i=null!==i&&"false"!==i);const h=Object.getOwnPropertyDescriptor(r,u);p||i==this[u]||h.get&&!h.set||(this[u]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.H)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},vt=(t,e)=>{dt(t,"connectedCallback",void 0,e)},yt=(t,e)=>{dt(t,"disconnectedCallback",void 0,e||t)},bt=(t,e={})=>{var n;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],i=e.exclude||[],a=u.customElements,p=u.document.head,h=p.querySelector("meta[charset]"),m=u.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(f,e),f.p=new URL(e.resourcesUrl||"./",u.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,u;const p={u:e[0],h:e[1],t:e[2],W:e[3]};p.t=e[2],p.H=D(e[4]),p.A=null!=(n=e[5])?n:{},p.T=null!=(u=e[6])?u:{};const h=p.h,m=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,F:new Map};n.U=new Promise((t=>n.D=t)),n.V=new Promise((t=>n.R=t)),t["s-p"]=[],t["s-rc"]=[],n.L=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,p),1&p.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${p.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(t,p)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):f.jmp((()=>(t=>{if(!(1&f.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?vt(e.i,t):(null==e?void 0:e.V)&&e.V.then((()=>vt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){ot(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;try{if(!(32&e.u)){if(e.u|=32,n.q){const l=((t,e)=>{const n=t.h.replace(/-/g,"_"),o=t.q;if(!o)return;const l=r.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(r.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.h}#${e.G}" was not found`);o.isProxied||(n.H=D(o.watchers),n.A=o.serializers,n.T=o.deserializers,mt(o,n,2),o.isProxied=!0);const i=()=>{};e.u|=8;try{new o(e)}catch(e){s(e,t)}e.u&=-9,e.u|=128,i(),vt(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=E(n);if(!c.has(e)){const o=()=>{};((t,e,n)=>{let o=c.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,c.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.C,i=()=>lt(e,!0);l&&l["s-rc"]?l["s-rc"].push(i):i()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),e.R&&e.R(t)}})(t,e,n)}l()}})(this))))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.u)){const e=o(t);(null==e?void 0:e.i)?yt(e.i,t):(null==e?void 0:e.V)&&e.V.then((()=>yt(e.i,t)))}k.has(t)&&k.delete(t),t.shadowRoot&&k.has(t.shadowRoot)&&k.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=o(this);if(!e)return;const n=v.findIndex((t=>t===this));n>-1&&v.splice(n,1),(null==(t=null==e?void 0:e.P)?void 0:t.S)instanceof Node&&!e.P.S.isConnected&&delete e.P.S}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.V}};p.q=t[0],i.includes(h)||a.get(h)||(l.push(h),a.define(h,mt(m,p,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(n=f.N)?n:O(u.document);null!=t&&m.setAttribute("nonce",t),p.insertBefore(m,h?h.nextSibling:p.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):f.jmp((()=>y=setTimeout(at,30)))},$t=t=>f.N=t;export{L as H,bt as b,A as c,T as g,C as h,a as p,l as r,$t as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as r}from"./p-
|
|
1
|
+
import{p as e,b as r}from"./p-zZMsduaU.js";export{s as setNonce}from"./p-zZMsduaU.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const r=import.meta.url,s={};return""!==r&&(s.resourcesUrl=new URL(".",r).href),e(s)})().then((async e=>(await o(),r([["p-32ca8ca5",[[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],maximize:[64],minimize:[64]},null,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]]],["p-5b21bc31",[[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}]}]]]],e))));
|
|
@@ -1,37 +1,60 @@
|
|
|
1
|
-
import { ErrorType } from
|
|
1
|
+
import { ErrorType } from 'phirepass-channel';
|
|
2
2
|
export type ProtocolMessageWebError = {
|
|
3
3
|
kind: ErrorType;
|
|
4
|
-
message:
|
|
4
|
+
message: string;
|
|
5
5
|
msg_id?: number;
|
|
6
|
-
type:
|
|
6
|
+
type: 'Error';
|
|
7
7
|
};
|
|
8
8
|
export type ProtocolMessageWebAuthSuccess = {
|
|
9
|
-
cid:
|
|
10
|
-
version:
|
|
9
|
+
cid: string;
|
|
10
|
+
version: string;
|
|
11
11
|
msg_id?: number;
|
|
12
|
-
type:
|
|
12
|
+
type: 'AuthSuccess';
|
|
13
13
|
};
|
|
14
14
|
export type ProtocolMessageWebTunnelOpened = {
|
|
15
15
|
sid: number;
|
|
16
16
|
msg_id?: number;
|
|
17
|
-
type:
|
|
17
|
+
type: 'TunnelOpened';
|
|
18
18
|
};
|
|
19
19
|
export type ProtocolMessageWebTunnelClosed = {
|
|
20
20
|
sid: number;
|
|
21
21
|
msg_id?: number;
|
|
22
|
-
type:
|
|
22
|
+
type: 'TunnelClosed';
|
|
23
23
|
};
|
|
24
24
|
export type ProtocolMessageWebTunnelData = {
|
|
25
|
-
node_id:
|
|
25
|
+
node_id: string;
|
|
26
26
|
sid: number;
|
|
27
27
|
data: Uint8Array;
|
|
28
|
-
type:
|
|
28
|
+
type: 'TunnelData';
|
|
29
|
+
};
|
|
30
|
+
export type SFTPListItem = {
|
|
31
|
+
name: string;
|
|
32
|
+
path: string;
|
|
33
|
+
kind: 'Folder' | 'File';
|
|
34
|
+
items: Array<SFTPListItem>;
|
|
35
|
+
attributes: {
|
|
36
|
+
size: number;
|
|
37
|
+
uid: number;
|
|
38
|
+
user: string;
|
|
39
|
+
gid: number;
|
|
40
|
+
group: string;
|
|
41
|
+
permissions: number;
|
|
42
|
+
atime: number;
|
|
43
|
+
mtime: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export type ProtocolMessageWebSFTPListItems = {
|
|
47
|
+
path: string;
|
|
48
|
+
sid: number;
|
|
49
|
+
dir: SFTPListItem;
|
|
50
|
+
msg_id?: number;
|
|
51
|
+
type: 'SFTPListItems';
|
|
29
52
|
};
|
|
30
53
|
export type ProtocolMessage = {
|
|
31
54
|
version: number;
|
|
32
|
-
encoding:
|
|
55
|
+
encoding: 'MessagePack' | 'JSON';
|
|
33
56
|
data: {
|
|
34
|
-
web: ProtocolMessageWebError | ProtocolMessageWebAuthSuccess | ProtocolMessageWebTunnelOpened | ProtocolMessageWebTunnelData | ProtocolMessageWebTunnelClosed;
|
|
57
|
+
web: ProtocolMessageWebError | ProtocolMessageWebAuthSuccess | ProtocolMessageWebTunnelOpened | ProtocolMessageWebTunnelData | ProtocolMessageWebTunnelClosed | ProtocolMessageWebSFTPListItems;
|
|
35
58
|
};
|
|
36
59
|
};
|
|
37
60
|
export declare enum ProtocolMessageType {
|
|
@@ -39,7 +62,8 @@ export declare enum ProtocolMessageType {
|
|
|
39
62
|
AuthSuccess = "AuthSuccess",
|
|
40
63
|
TunnelOpened = "TunnelOpened",
|
|
41
64
|
TunnelClosed = "TunnelClosed",
|
|
42
|
-
TunnelData = "TunnelData"
|
|
65
|
+
TunnelData = "TunnelData",
|
|
66
|
+
SFTPListItems = "SFTPListItems"
|
|
43
67
|
}
|
|
44
68
|
export declare enum InputMode {
|
|
45
69
|
Username = 0,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { ConnectionState } from '../../common/protocol';
|
|
2
|
+
import { ConnectionState, SFTPListItem } from '../../common/protocol';
|
|
3
3
|
export declare class PhirepassSftpClient {
|
|
4
4
|
private channel;
|
|
5
5
|
private domReady;
|
|
6
6
|
private runtimeReady;
|
|
7
7
|
private connected;
|
|
8
|
+
private uploadInputEl?;
|
|
9
|
+
private session_id?;
|
|
8
10
|
name: string;
|
|
9
11
|
description: string;
|
|
10
12
|
hideHeader: boolean;
|
|
@@ -24,7 +26,21 @@ export declare class PhirepassSftpClient {
|
|
|
24
26
|
max: boolean;
|
|
25
27
|
show_login_screen: boolean;
|
|
26
28
|
show_login_screen_username: boolean;
|
|
29
|
+
show_error: boolean;
|
|
30
|
+
error_message: string;
|
|
27
31
|
show_login_screen_password: boolean;
|
|
32
|
+
show_navigation: boolean;
|
|
33
|
+
breadcrumbs: Array<{
|
|
34
|
+
label: string;
|
|
35
|
+
path: string;
|
|
36
|
+
}>;
|
|
37
|
+
current_dir: string;
|
|
38
|
+
listing: Array<SFTPListItem>;
|
|
39
|
+
show_content: boolean;
|
|
40
|
+
show_loader: boolean;
|
|
41
|
+
version: string;
|
|
42
|
+
status: string;
|
|
43
|
+
selected_item: SFTPListItem | null;
|
|
28
44
|
private toggle_max;
|
|
29
45
|
connectedCallback(): Promise<void>;
|
|
30
46
|
componentDidLoad(): void;
|
|
@@ -35,11 +51,21 @@ export declare class PhirepassSftpClient {
|
|
|
35
51
|
private handle_error;
|
|
36
52
|
private handle_auth_success;
|
|
37
53
|
private handle_tunnel_opened;
|
|
54
|
+
private handle_sftp_list_items;
|
|
38
55
|
private handle_tunnel_data;
|
|
39
56
|
private handle_tunnel_closed;
|
|
40
57
|
private open_comms;
|
|
41
58
|
private close_comms;
|
|
42
59
|
private clear_creds_buffer;
|
|
43
60
|
private reset_session_state;
|
|
61
|
+
private list_breadcrumb;
|
|
62
|
+
private go_to_parent_directory;
|
|
63
|
+
private refresh_directory;
|
|
64
|
+
private disconnect_session;
|
|
65
|
+
private open_upload_picker;
|
|
66
|
+
private on_upload_selected;
|
|
67
|
+
private is_selected;
|
|
68
|
+
private list_directory;
|
|
69
|
+
private get_full_path;
|
|
44
70
|
render(): any;
|
|
45
71
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as i,h as a,H as s}from"./p-D6RLmr6w.js";import{_ as t,C as c,a as d,P as o}from"./p-rdgKcesn.js";const r=class{constructor(a){e(this,a),this.maximizeEvent=i(this,"maximize"),this.connectionStateChanged=i(this,"connectionStateChanged")}channel;domReady=!1;runtimeReady=!1;connected=!1;name="SFTP";description="Client";hideHeader=!1;serverHost="phirepass.com";serverPort=443;allowInsecure=!1;heartbeatInterval=3e4;nodeId;token;onNodeIdChange(e,i){this.reset_session_state(),this.channel&&this.channel.is_connected()&&this.close_comms(),e&&(this.open_comms(),this.channel.connect())}serverId;onServerIdChange(e,i){this.onNodeIdChange(this.nodeId,this.nodeId)}maximizeEvent;async maximize(){this.max=!this.max}async minimize(){this.max=!1}connectionStateChanged;max=!1;show_login_screen=!1;show_login_screen_username=!1;show_login_screen_password=!1;toggle_max(){this.maximizeEvent?.emit(!this.max)}async connectedCallback(){await t(),this.open_comms(),this.runtimeReady=!0,this.nodeId?this.try_connect():console.warn("Prop node_id is not set. Cannot connect to terminal.")}componentDidLoad(){this.domReady=!0,this.try_connect()}async disconnectedCallback(){this.connected=!1,this.domReady=!1,this.runtimeReady=!1,this.close_comms()}connect(){this.connected=!0,this.channel.connect()}try_connect(){!this.connected&&this.domReady&&this.runtimeReady&&this.channel&&this.connect()}create_web_socket_endpoint(){const e=this.allowInsecure?"ws":"wss";return this.allowInsecure||443!==this.serverPort?this.allowInsecure&&80===this.serverPort?`${e}://${this.serverHost}`:`${e}://${this.serverHost}:${this.serverPort}`:`${e}://${this.serverHost}`}handle_error(e){}handle_auth_success(e){this.clear_creds_buffer(),this.channel.start_heartbeat(this.heartbeatInterval<=15e3?3e4:this.heartbeatInterval),this.channel.open_sftp_tunnel(this.nodeId)}handle_tunnel_opened(e){}handle_tunnel_data(e){}handle_tunnel_closed(e){this.clear_creds_buffer(),this.close_comms()}open_comms(){this.channel=this.serverId?new c(`${this.create_web_socket_endpoint()}/api/web/ws`,this.nodeId,this.serverId):new c(`${this.create_web_socket_endpoint()}/api/web/ws`,this.nodeId),this.channel.on_connection_open((()=>{this.connectionStateChanged.emit([d.Connected]),this.channel.authenticate(this.token,this.nodeId)})),this.channel.on_connection_close((()=>{this.connectionStateChanged.emit([d.Disconnected])})),this.channel.on_connection_error((e=>{this.connectionStateChanged.emit([d.Error,e])})),this.channel.on_connection_message((()=>{})),this.channel.on_protocol_message((e=>{const{web:i}=e.data;switch(i.type){case o.Error:this.handle_error(i);break;case o.AuthSuccess:this.handle_auth_success(i);break;case o.TunnelOpened:this.handle_tunnel_opened(i);break;case o.TunnelClosed:this.handle_tunnel_closed(i);break;case o.TunnelData:this.handle_tunnel_data(i);break;default:console.warn("Unknown protocol message type:",i)}}))}close_comms(){this.channel.stop_heartbeat(),this.channel.disconnect()}clear_creds_buffer(){}reset_session_state(){this.clear_creds_buffer()}render(){return a(s,{key:"ac63e2c701cd09a605d0aaa7396eaec16ff9c3bc",class:{default:!this.max,max:this.max}},a("section",{key:"253dfc510c62ee57a96d574af993e8017475a0c2",class:"listing"},!this.hideHeader&&a("header",{key:"215ddf76ba55641892fc9a758077ba8d1f3a6671"},a("section",{key:"49541a8d31d8c61e2df84c60348f7426fddec67c",class:"title"},a("img",{key:"1a86ba6b3de92b35cbd5b1bacfdfee2da6fa6766",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10ZXJtaW5hbCB3LTMuNSBoLTMuNSB0ZXh0LXByaW1hcnkiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iNCAxNyAxMCAxMSA0IDUiPjwvcG9seWxpbmU+CiAgICA8bGluZSB4MT0iMTIiIHgyPSIyMCIgeTE9IjE5IiB5Mj0iMTkiPjwvbGluZT4KPC9zdmc+Cg==",alt:"SFTP Client"}),a("div",{key:"38d90384978acc8b323ca4c396db7bda54320059",class:"text"},a("div",{key:"a94b3fd21025000b620b2bb85aec87198e575bfa",class:"name"},this.name),a("div",{key:"072c41dc8d05faf77929f8c128bb97b64d8835bf",class:"description"},this.description))),a("section",{key:"46e575f4ce5f2da0913d2f3aebe025540f1f3688",class:"actions"},a("div",{key:"f92d66ab7ab5e9c25a29037c60709c54623194be",class:"action",onClick:()=>this.toggle_max()},a("img",{key:"e115204a83336fc4b49a30551208b727c3f33be9",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTE1LCAxMjMsIDE0MCkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtbWF4aW1pemUyIHctMyBoLTMiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iMTUgMyAyMSAzIDIxIDkiPjwvcG9seWxpbmU+CiAgICA8cG9seWxpbmUgcG9pbnRzPSI5IDIxIDMgMjEgMyAxNSI+PC9wb2x5bGluZT4KICAgIDxsaW5lIHgxPSIyMSIgeDI9IjE0IiB5MT0iMyIgeTI9IjEwIj48L2xpbmU+CiAgICA8bGluZSB4MT0iMyIgeDI9IjEwIiB5MT0iMjEiIHkyPSIxNCI+PC9saW5lPgo8L3N2Zz4K",alt:"Maximize"})))),a("main",{key:"c6bf5ab4e5aa46dcba8e50ec1a9c2feb1f55ea02"}),a("footer",{key:"ac67a3e0966e3f04bee019162f8174aae58cbf1a"})),a("section",{key:"07e83117470f7f226328703b18f836bd4358cfe9",class:{creds:!0,blurred:this.show_login_screen}},this.show_login_screen&&a("form",{key:"808209eaba50f10a8ef96163972ad36ea9e3d3e2",class:"form"},a("div",{key:"9e26efeac2f17d6b4168e1a77da6ef61d325f6e3"},"SFTP Connection"),a("div",{key:"f9badb92d4434a16916429a2bedb6e38d2ae647c"},a("div",{key:"9fb267ba7828cd950b327a17e0ee803dc399c80b"},"Username"),a("input",{key:"65b34c14292b0bde408861e791f3baa99c4c9a02",type:"text",placeholder:""})),a("div",{key:"f1f9def8290dfcde9beff0f61092f6020580b72c"},a("div",{key:"1c89b71c4126299b7e8e421b05761d2b0424d4ed"},"Password"),a("input",{key:"17364976158ddaacbb55ed17ee09ec242bcbdce7",type:"password",placeholder:""})),a("div",{key:"9362acdf153ceeba3c8e8cee0518cf2baeec27e0"},a("button",{key:"ebf6c205276a7c3ff34c13e148978be61044ff7a"},"Connect")))))}static get watchers(){return{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}}};r.style=":host{--radius:0.375rem;--card:220 18% 10%;--border:220 15% 18%;--primary:160 60% 45%;--muted-foreground:220 10% 50%;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;height:100%;width:100%;border:1px solid hsl(var(--border));background-color:hsl(var(--card));border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;position:relative;.listing{flex:1;display:flex;flex-direction:column;justify-content:space-between;header{height:30px;background:rgba(28, 31, 38, 0.6);border-bottom:1px solid hsl(var(--border));display:flex;align-items:center;justify-content:space-between;.actions{display:flex;align-items:center;.action{cursor:pointer;padding:4px;display:flex;align-items:center;z-index:1;img{height:14px;padding:4px;border-radius:4px}&:hover{background-color:hsl(var(--border) / 0.6)}}}.title{color:hsl(var(--primary));height:14px;padding:0 12px;display:flex;align-items:center;font-size:0.75rem;line-height:1rem;img{height:14px;margin-right:5px}.text{display:flex;flex-direction:row;justify-content:center;margin-top:2px;.name{margin-right:10px}.description{color:hsl(var(--muted-foreground))}}}}footer{height:25px;background:rgba(28, 31, 38, 0.6);border-top:1px solid hsl(var(--border))}}.creds{position:absolute;top:0;left:0;height:100%;width:100%;display:flex;justify-content:center;align-items:center;&.blurred{background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px)}.form{display:flex;flex-direction:column;background:hsl(var(--card));width:200px;position:relative;background-color:rgba(21, 24, 30, 0.95);border:1px solid hsl(var(--border));padding:20px;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.5) 0px 25px 50px -12px}}}:host(.max){height:100vh;width:100vw;position:fixed;top:0;left:0;z-index:9999}";export{r as phirepass_sftp_client}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],s=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);s&&Object.defineProperty(e,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},s=(t,e)=>e in t,i=(t,e)=>(0,console.error)(t,e),r=new Map,c=new Map,u="undefined"!=typeof window?window:{},f={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},a=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),p=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),h=!1,m=[],v=[],b=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&f.u?w($):f.raf($))},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){i(t)}t.length=0},$=()=>{y(m),y(v),(h=m.length>0)&&f.raf($)},w=t=>a().then(t),g=b(v,!0);function j(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(p?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}function O(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var S,k=new WeakMap,E=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,C=(t,e,...n)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!M(o))&&(o+=""),s&&i?r[r.length-1].m+=o:r.push(s?x(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=x(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},x=(t,e)=>({u:0,O:t,m:null!=e?e:null,S:null,$:null,v:null,j:null}),L={},N=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},P=(t,e)=>null==t||M(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,R=t=>{var e;return null==(e=o(t))?void 0:e.$hostElement$},D=(t,e)=>{const n=R(t);return{emit:t=>H(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},H=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},T=(t,e,n,l,i,r)=>{if(n===l)return;let c=s(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=U(n);let s=U(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("key"===e);else if("ref"===e)l&&Q(l,t);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let s;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==l||!1===l?!1===l&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===l?"":l))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=l}catch(t){}return}{const o=M(l);if((c||o&&null!==l)&&!i)try{if(t.tagName.includes("-"))t[e]!==l&&(t[e]=l);else{const o=null==l?"":l;"list"===e?c=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!c||4&r||i)&&!o&&1===t.nodeType&&t.setAttribute(e,l=!0===l?"":l)}}else if(e="-"===e[2]?e.slice(3):s(u,a)?a.slice(2):a[2]+e.slice(3),n||l){const o=e.endsWith(W);e=e.replace(z,""),n&&f.rel(t,e,n,o),l&&f.ael(t,e,l,o)}},A=/\s/,U=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(A):[]),W="Capture",z=RegExp(W+"$"),F=(t,e,n)=>{const o=11===e.S.nodeType&&e.S.host?e.S.host:e.S,l=t&&t.v||{},s=e.v||{};for(const t of V(Object.keys(l)))t in s||T(o,t,l[t],void 0,n,e.u);for(const t of V(Object.keys(s)))T(o,t,l[t],s[t],n,e.u)};function V(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var q=!1,G=[],Y=[],Z=(t,e,n)=>{const o=e.$[n];let l,s,i=0;if(null!=o.m)l=o.S=u.document.createTextNode(o.m);else{if(!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.S=u.document.createElement(o.O),F(null,o,q),o.$){const e="template"===o.O?l.content:l;for(i=0;i<o.$.length;++i)s=Z(t,o,i),s&&e.appendChild(s)}}return l["s-hn"]=S,l},_=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===S&&(r=r.shadowRoot),"template"===n.O&&(r=r.content);l<=s;++l)o[l]&&(i=Z(null,n,l),i&&(o[l].S=i,X(r,i,e)))},B=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.S;K(e),t&&t.remove()}}},I=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),J=(t,e,n=!1)=>{const o=e.S=t.S,l=t.$,s=e.$,i=e.m;null==i?(F(t,e,q),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,m=o[0],v=o[h];const b="template"===n.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(I(d,m,l))J(d,m,l),d=e[++r],m=o[++c];else if(I(p,v,l))J(p,v,l),p=e[--a],v=o[--h];else if(I(d,v,l))J(d,v,l),X(b,d.S,p.S.nextSibling),d=e[++r],v=o[--h];else if(I(p,m,l))J(p,m,l),X(b,p.S,d.S),p=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===m.j){u=f;break}u>=0?(i=e[u],i.O!==m.O?s=Z(e&&e[c],n,u):(J(i,m,l),e[u]=void 0,s=i.S),m=o[++c]):(s=Z(e&&e[c],n,c),m=o[++c]),s&&X(d.S.parentNode,s,d.S)}r>a?_(t,null==o[h+1]?null:o[h+1].S,n,o,c,h):c>h&&B(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.m&&(o.textContent=""),_(o,null,e,s,0,s.length-1)):!n&&null!==l&&B(l,0,l.length-1)):t.m!==i&&(o.data=i)},K=t=>{t.v&&t.v.ref&&G.push((()=>t.v.ref(null))),t.$&&t.$.map(K)},Q=(t,e)=>{Y.push((()=>t(e)))},X=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),tt=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.k=()=>{e["s-p"].splice(n-1,1),o()})))}},et=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);tt(t,t.M);const n=()=>nt(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},nt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.C.length&&t.C.forEach((t=>t(n))),l=ut(o,"componentWillLoad",void 0,n)):l=ut(o,"componentWillUpdate",void 0,n),l=ot(l,(()=>ut(o,"componentWillRender",void 0,n))),ot(l,(()=>st(t,o,e)))},ot=(t,e)=>lt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),lt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,st=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const s=E(e),i=c.get(s);if(!u.document)return s;if(t=11===t.nodeType?t:u.document,i)if("string"==typeof i){let l,r=k.get(t=t.head||t);if(r||k.set(t,r=new Set),!r.has(s)){l=u.document.createElement("style"),l.textContent=i;const c=null!=(n=f.L)?n:O(u.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(i),p?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=i+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let e=k.get(t);if(e||k.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===n.CSSStyleSheet)o=i;else{o=new n.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}p?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);it(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>rt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},it=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.N||x(null,null),s=(t=>t&&t.O===L)(e)?e:C(null,null,e);if(S=o.tagName,n&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.O=null,s.u|=4,t.N=s,s.S=l.S=o.shadowRoot||o,J(l,s,n),G.forEach((t=>t())),G.length=0,Y.forEach((t=>t())),Y.length=0})(t,e,o)}catch(e){i(e,t.$hostElement$)}return null},rt=t=>{const e=t.$hostElement$,n=t.i,o=t.M;ut(n,"componentDidRender",void 0,e),64&t.u?ut(n,"componentDidUpdate",void 0,e):(t.u|=64,ft(e),ut(n,"componentDidLoad",void 0,e),t.P(e),o||ct()),t.R(e),t.k&&(t.k(),t.k=void 0),512&t.u&&w((()=>et(t,!1))),t.u&=-517},ct=()=>{w((()=>H(u,"appload",{detail:{namespace:"phirepass-widgets"}})))},ut=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){i(t,o)}},ft=t=>t.classList.add("hydrated"),at=(t,e,n,l)=>{const s=o(t);if(!s)return;if(!s)throw Error(`Couldn't find host element for "${l.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=s.$hostElement$,c=s.l.get(e),u=s.u,f=s.i;if(n=P(n,l.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(s.l.set(e,n),l.D){const t=l.D[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(f?f[o](n,c,e):s.C.push((()=>{s.i[o](n,c,e)})))}catch(t){i(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||et(s,!1)}}},dt=(e,n,l)=>{var s,i;const r=e.prototype;{e.watchers&&!n.D&&(n.D=N(e.watchers)),e.deserializers&&!n.H&&(n.H=e.deserializers),e.serializers&&!n.T&&(n.T=e.serializers);const c=Object.entries(null!=(s=n.t)?s:{});if(c.map((([e,[s]])=>{if(31&s||2&l&&32&s){const{get:i,set:c}=t(r,e)||{};i&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&l||!i)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>o(this).l.get(e))(0,e);const t=o(this),l=t?t.i:r;if(!l)return;return l[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const i=o(this);if(i){if(c)return void 0===(32&s?this[e]:i.$hostElement$[e])&&i.l.get(e)&&(t=i.l.get(e)),c.call(this,P(t,s)),void at(this,e,t=32&s?this[e]:i.$hostElement$[e],n);{if(!(1&l&&4096&n.t[e][0]))return at(this,e,t,n),void(1&l&&!i.i&&i.C.push((()=>{4096&n.t[e][0]&&i.i[e]!==i.l.get(e)&&(i.i[e]=t)})));const o=()=>{const o=i.i[e];!i.l.get(e)&&o&&i.l.set(e,o),i.i[e]=P(t,s),at(this,e,i.i[e],n)};i.i?o():i.C.push((()=>{o()}))}}}})}else 1&l&&64&s&&Object.defineProperty(r,e,{value(...t){var n;const l=o(this);return null==(n=null==l?void 0:l.A)?void 0:n.then((()=>{var n;return null==(n=l.i)?void 0:n[e](...t)}))}})})),1&l){const t=new Map;r.attributeChangedCallback=function(e,l,s){f.jmp((()=>{var i;const u=t.get(e),f=o(this);if(this.hasOwnProperty(u)&&(s=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&s!==l){const o=f.i,r=null==(i=n.D)?void 0:i[e];null==r||r.forEach((n=>{const[[i,r]]=Object.entries(n);null!=o[i]&&(128&t||1&r)&&o[i].call(o,s,l,e)}))}return}const a=c.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===s&&void 0===this[u];d&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(r,u);p||s==this[u]||h.get&&!h.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=n.D)?i:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},pt=(t,e)=>{ut(t,"connectedCallback",void 0,e)},ht=(t,e)=>{ut(t,"disconnectedCallback",void 0,e||t)},mt=(t,e={})=>{var n;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],s=e.exclude||[],a=u.customElements,p=u.document.head,h=p.querySelector("meta[charset]"),m=u.document.createElement("style"),v=[];let b,y=!0;if(Object.assign(f,e),f.p=new URL(e.resourcesUrl||"./",u.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,u;const p={u:e[0],h:e[1],t:e[2],U:e[3]};p.t=e[2],p.D=N(e[4]),p.T=null!=(n=e[5])?n:{},p.H=null!=(u=e[6])?u:{};const h=p.h,m=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,W:new Map};n.A=new Promise((t=>n.R=t)),n.F=new Promise((t=>n.P=t)),t["s-p"]=[],t["s-rc"]=[],n.C=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,p),1&p.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${p.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(t,p)}connectedCallback(){o(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),y?v.push(this):f.jmp((()=>(t=>{if(!(1&f.u)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.u)(null==e?void 0:e.i)?pt(e.i,t):(null==e?void 0:e.F)&&e.F.then((()=>pt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){tt(e,e.M=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;try{if(!(32&e.u)){if(e.u|=32,n.V){const l=((t,e)=>{const n=t.h.replace(/-/g,"_"),o=t.V;if(!o)return;const l=r.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(r.set(o,t),t[n])),(t=>{i(t,e.$hostElement$)}))
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.h}#${e.q}" was not found`);o.isProxied||(n.D=N(o.watchers),n.T=o.serializers,n.H=o.deserializers,dt(o,n,2),o.isProxied=!0);const s=()=>{};e.u|=8;try{new o(e)}catch(e){i(e,t)}e.u&=-9,e.u|=128,s(),pt(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=E(n);if(!c.has(e)){const o=()=>{};((t,e,n)=>{let o=c.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,c.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.M,s=()=>et(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(n){i(n,t),e.k&&(e.k(),e.k=void 0),e.P&&e.P(t)}})(t,e,n)}l()}})(this))))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.u)){const e=o(t);(null==e?void 0:e.i)?ht(e.i,t):(null==e?void 0:e.F)&&e.F.then((()=>ht(e.i,t)))}k.has(t)&&k.delete(t),t.shadowRoot&&k.has(t.shadowRoot)&&k.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=o(this);if(!e)return;const n=v.findIndex((t=>t===this));n>-1&&v.splice(n,1),(null==(t=null==e?void 0:e.N)?void 0:t.S)instanceof Node&&!e.N.S.isConnected&&delete e.N.S}))}componentOnReady(){var t;return null==(t=o(this))?void 0:t.F}};p.V=t[0],s.includes(h)||a.get(h)||(l.push(h),a.define(h,dt(m,p,1)))}))})),l.length>0&&(m.textContent+=l.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(n=f.L)?n:O(u.document);null!=t&&m.setAttribute("nonce",t),p.insertBefore(m,h?h.nextSibling:p.firstChild)}y=!1,v.length?v.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(ct,30)))},vt=t=>f.L=t;export{L as H,mt as b,D as c,R as g,C as h,a as p,l as r,vt as s}
|