phirepass-widgets 0.0.40 → 0.0.42
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-Rxdu9QG2.js → index-DTAHGGCM.js} +111 -44
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +225 -3
- package/dist/cjs/phirepass-terminal.cjs.entry.js +30 -815
- package/dist/cjs/phirepass-widgets.cjs.js +3 -3
- package/dist/cjs/protocol-C4R_gGQV.js +801 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/common/protocol.js +20 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +142 -1
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +509 -1
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.logo.svg +6 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.max.svg +8 -0
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +12 -21
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-DgZMmpg7.js +1 -0
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +5 -5
- package/dist/esm/{index-C8ZFkLEv.js → index-D6RLmr6w.js} +111 -44
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-sftp-client.entry.js +225 -3
- package/dist/esm/phirepass-terminal.entry.js +9 -793
- package/dist/esm/phirepass-widgets.js +4 -4
- package/dist/esm/protocol-DgZMmpg7.js +796 -0
- package/dist/phirepass-widgets/p-79a71767.entry.js +1 -0
- package/dist/phirepass-widgets/p-D6RLmr6w.js +2 -0
- package/dist/phirepass-widgets/p-DgZMmpg7.js +1 -0
- package/dist/phirepass-widgets/p-bb70a3bd.entry.js +49 -0
- package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/common/protocol.d.ts +17 -0
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +42 -0
- package/dist/types/components/phirepass-terminal/phirepass-terminal.d.ts +1 -6
- package/dist/types/components.d.ts +97 -1
- package/package.json +5 -5
- package/dist/phirepass-widgets/p-376ef3af.entry.js +0 -1
- package/dist/phirepass-widgets/p-C8ZFkLEv.js +0 -2
- package/dist/phirepass-widgets/p-fa55ec4a.entry.js +0 -49
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
stroke="rgb(46, 184, 138)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
3
|
+
class="lucide lucide-terminal w-3.5 h-3.5 text-primary">
|
|
4
|
+
<polyline points="4 17 10 11 4 5"></polyline>
|
|
5
|
+
<line x1="12" x2="20" y1="19" y2="19"></line>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
stroke="rgb(115, 123, 140)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
|
3
|
+
class="lucide lucide-maximize2 w-3 h-3">
|
|
4
|
+
<polyline points="15 3 21 3 21 9"></polyline>
|
|
5
|
+
<polyline points="9 21 3 21 3 15"></polyline>
|
|
6
|
+
<line x1="21" x2="14" y1="3" y2="10"></line>
|
|
7
|
+
<line x1="3" x2="10" y1="21" y2="14"></line>
|
|
8
|
+
</svg>
|
|
@@ -7,19 +7,7 @@ import { WebglAddon } from "@xterm/addon-webgl";
|
|
|
7
7
|
import { SerializeAddon } from "@xterm/addon-serialize";
|
|
8
8
|
import { ImageAddon } from "@xterm/addon-image";
|
|
9
9
|
import init, { Channel as PhirepassChannel } from "phirepass-channel";
|
|
10
|
-
import { ProtocolMessageError } from "../../common/protocol";
|
|
11
|
-
var InputMode;
|
|
12
|
-
(function (InputMode) {
|
|
13
|
-
InputMode[InputMode["Username"] = 0] = "Username";
|
|
14
|
-
InputMode[InputMode["Password"] = 1] = "Password";
|
|
15
|
-
InputMode[InputMode["Default"] = 2] = "Default";
|
|
16
|
-
})(InputMode || (InputMode = {}));
|
|
17
|
-
var ConnectionState;
|
|
18
|
-
(function (ConnectionState) {
|
|
19
|
-
ConnectionState["Disconnected"] = "disconnected";
|
|
20
|
-
ConnectionState["Connected"] = "connected";
|
|
21
|
-
ConnectionState["Error"] = "error";
|
|
22
|
-
})(ConnectionState || (ConnectionState = {}));
|
|
10
|
+
import { ConnectionState, InputMode, ProtocolMessageError, ProtocolMessageType } from "../../common/protocol";
|
|
23
11
|
export class PhirepassTerminal {
|
|
24
12
|
terminal;
|
|
25
13
|
fitAddon;
|
|
@@ -239,19 +227,19 @@ export class PhirepassTerminal {
|
|
|
239
227
|
this.channel.on_protocol_message((msg) => {
|
|
240
228
|
const { web } = msg.data;
|
|
241
229
|
switch (web.type) {
|
|
242
|
-
case
|
|
230
|
+
case ProtocolMessageType.Error:
|
|
243
231
|
this.handle_error(web);
|
|
244
232
|
break;
|
|
245
|
-
case
|
|
233
|
+
case ProtocolMessageType.AuthSuccess:
|
|
246
234
|
this.handle_auth_success(web);
|
|
247
235
|
break;
|
|
248
|
-
case
|
|
236
|
+
case ProtocolMessageType.TunnelOpened:
|
|
249
237
|
this.handle_tunnel_opened(web);
|
|
250
238
|
break;
|
|
251
|
-
case
|
|
239
|
+
case ProtocolMessageType.TunnelClosed:
|
|
252
240
|
this.handle_tunnel_closed(web);
|
|
253
241
|
break;
|
|
254
|
-
case
|
|
242
|
+
case ProtocolMessageType.TunnelData:
|
|
255
243
|
this.handle_tunnel_data(web);
|
|
256
244
|
break;
|
|
257
245
|
default:
|
|
@@ -313,6 +301,7 @@ export class PhirepassTerminal {
|
|
|
313
301
|
this.passwordBuffer = "";
|
|
314
302
|
break;
|
|
315
303
|
case ProtocolMessageError.RequiresUsername:
|
|
304
|
+
case ProtocolMessageError.RequiresUsernamePassword:
|
|
316
305
|
this.terminal.reset();
|
|
317
306
|
this.inputMode = InputMode.Username;
|
|
318
307
|
this.usernameBuffer = "";
|
|
@@ -493,7 +482,7 @@ export class PhirepassTerminal {
|
|
|
493
482
|
this.usernameBuffer = "";
|
|
494
483
|
}
|
|
495
484
|
render() {
|
|
496
|
-
return (h(Host, { key: '
|
|
485
|
+
return (h(Host, { key: '274fd3f8db8cb3f48bd956ba40d5aacb8ec15e1f' }, h("div", { key: '644c586e190c63651d9e521793611a83d372d0ad', id: "ccc", ref: el => (this.containerEl = el) })));
|
|
497
486
|
}
|
|
498
487
|
static get is() { return "phirepass-terminal"; }
|
|
499
488
|
static get encapsulation() { return "shadow"; }
|
|
@@ -682,8 +671,10 @@ export class PhirepassTerminal {
|
|
|
682
671
|
"resolved": "[ConnectionState, unknown?]",
|
|
683
672
|
"references": {
|
|
684
673
|
"ConnectionState": {
|
|
685
|
-
"location": "
|
|
686
|
-
"
|
|
674
|
+
"location": "import",
|
|
675
|
+
"path": "../../common/protocol",
|
|
676
|
+
"id": "src/common/protocol.ts::ConnectionState",
|
|
677
|
+
"referenceLocation": "ConnectionState"
|
|
687
678
|
}
|
|
688
679
|
}
|
|
689
680
|
}
|
|
Binary file
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>(0,console.error)(t,e),s=new Map,i="undefined"!=typeof window?window:{},r=i.HTMLElement||class{},c={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},u=(()=>{try{return!!i.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),f=!!u&&(()=>!!i.document&&Object.getOwnPropertyDescriptor(i.document.adoptedStyleSheets,"length").writable)(),a=!1,d=[],h=[],p=(t,e)=>n=>{t.push(n),a||(a=!0,e&&4&c.i?y(b):c.raf(b))},m=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){o(t)}t.length=0},b=()=>{m(d),m(h),(a=d.length>0)&&c.raf(b)},y=t=>Promise.resolve(void 0).then(t),$=p(h,!0),v=t=>{const e=new URL(t,c.u);return e.origin!==i.location.origin?e.href:e.pathname},w=t=>c.u=t;function g(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(f?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var j,O=new WeakMap,S=t=>"sc-"+t.h,M=t=>"object"==(t=typeof t)||"function"===t,k=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!M(l))&&(l+=""),s&&i?r[r.length-1].p+=l:r.push(s?E(null,l):l),i=s)};c(n),e&&e.key&&(o=e.key);const u=E(t,null);return u.m=e,r.length>0&&(u.$=r),u.v=o,u},E=(t,e)=>({i:0,j:t,p:null!=e?e:null,O:null,$:null,m:null,v:null}),A={},C=(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,L=(t,e)=>{const n=t;return{emit:t=>N(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},N=(t,e,n)=>{const l=c.ce(e,n);return t.dispatchEvent(l),l},_=(t,e,n,o,s,i)=>{if(n===o)return;let r=((t,e)=>e in t)(t,e);if(e.toLowerCase(),"key"===e);else if("ref"===e)o&&Y(o,t);else{if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let s;{const e=l(t);if(e&&e.l&&e.l.t){const t=e.l.t[n];t&&t[1]&&(s=t[1])}}return s||(s=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(s)||t.removeAttribute(s):t.setAttribute(s,!0===o?"":o))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=o}catch(t){}return}{const l=M(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!l&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}}},x=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of D(Object.keys(o)))t in s||_(l,t,o[t],void 0,n,e.i);for(const t of D(Object.keys(s)))_(l,t,o[t],s[t],n,e.i)};function D(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var H=!1,P=!1,U=[],R=[],W=(t,e,n)=>{const l=e.$[n];let o,s,r=0;if(!i.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=i.document.createElement(l.j),x(null,l,P),l.$){const e="template"===l.j?o.content:o;for(r=0;r<l.$.length;++r)s=W(t,l,r),s&&e.appendChild(s)}return o["s-hn"]=j,o},F=(t,e,n,l,o,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===j&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);o<=s;++o)l[o]&&(i=W(null,n,o),i&&(l[o].O=i,Z(r,i,e)))},q=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;V(e),t&&t.remove()}}},z=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),T=(t,e,n=!1)=>{const l=e.O=t.O,o=t.$,s=e.$;"slot"!==e.j||H||t.S!==e.S&&(e.O["s-sn"]=e.S||"",(t=>{c.i|=1;const e=t.closest(j.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),l=Array.from(t.__childNodes||t.childNodes);for(const t of n?l.reverse():l)null!=t["s-sh"]&&(Z(e,t,null!=n?n:null),t["s-sh"]=void 0)}c.i&=-2})(e.O.parentElement)),x(t,e,P),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=l.length-1,m=l[0],b=l[p];const y="template"===n.j?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==m)m=l[++c];else if(null==b)b=l[--p];else if(z(d,m,o))T(d,m,o),d=e[++r],m=l[++c];else if(z(h,b,o))T(h,b,o),h=e[--a],b=l[--p];else if(z(d,b,o))T(d,b,o),Z(y,d.O,h.O.nextSibling),d=e[++r],b=l[--p];else if(z(h,m,o))T(h,m,o),Z(y,h.O,d.O),h=e[--a],m=l[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].v&&e[f].v===m.v){u=f;break}u>=0?(i=e[u],i.j!==m.j?s=W(e&&e[c],n,u):(T(i,m,o),e[u]=void 0,s=i.O),m=l[++c]):(s=W(e&&e[c],n,c),m=l[++c]),s&&Z(d.O.parentNode,s,d.O)}r>a?F(t,null==l[p+1]?null:l[p+1].O,n,l,c,p):c>p&&q(e,r,a)})(l,o,e,s,n):null!==s?F(l,null,e,s,0,s.length-1):!n&&null!==o&&q(o,0,o.length-1)},V=t=>{t.m&&t.m.ref&&U.push((()=>t.m.ref(null))),t.$&&t.$.map(V)},Y=(t,e)=>{R.push((()=>t(e)))},Z=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),B=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.l,s=t.M||E(null,null),i=(t=>t&&t.j===A)(e)?e:k(null,null,e);if(j=l.tagName,n&&i.m)for(const t of Object.keys(i.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.m[t]=l[t]);i.j=null,i.i|=4,t.M=i,i.O=s.O=l.shadowRoot||l,H=!(!(1&o.i)||128&o.i),T(s,i,n),U.forEach((t=>t())),U.length=0,R.forEach((t=>t())),R.length=0},G=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.k=()=>{e["s-p"].splice(n-1,1),l()})))}},I=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);G(t,t.A);const n=()=>J(t,e);if(!e)return $(n);queueMicrotask((()=>{n()}))},J=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)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 o;return o=lt(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=K(o,(()=>lt(l,"componentWillRender",void 0,n))),K(o,(()=>X(t,l,e)))},K=(t,e)=>Q(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Q=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,X=async(t,e,n)=>{var l;const o=t.$hostElement$,r=o["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,o=((t,e)=>{var n,l,o;const r=S(e),a=s.get(r);if(!i.document)return r;if(t=11===t.nodeType?t:i.document,a)if("string"==typeof a){let o,s=O.get(t=t.head||t);if(s||O.set(t,s=new Set),!s.has(r)){o=i.document.createElement("style"),o.textContent=a;const d=null!=(n=c.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=i.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&o.setAttribute("nonce",d),!(1&e.i))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(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(u){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(a),f?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=a+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(r)}}else{let e=O.get(t);if(e||O.set(t,e=new Set),!e.has(r)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(a.constructor===n.CSSStyleSheet)l=a;else{l=new n.CSSStyleSheet;for(let t=0;t<a.cssRules.length;t++)l.insertRule(a.cssRules[t].cssText,t)}f?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(r)}}return r})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);tt(t,e,o,n),r&&(r.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>et(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},tt=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,B(t,e,l)}catch(e){o(e,t.$hostElement$)}return null},et=t=>{const e=t.$hostElement$,n=e,l=t.A;lt(n,"componentDidRender",void 0,e),64&t.i?lt(n,"componentDidUpdate",void 0,e):(t.i|=64,ot(e),lt(n,"componentDidLoad",void 0,e),t.L(e),l||nt()),t.k&&(t.k(),t.k=void 0),512&t.i&&y((()=>I(t,!1))),t.i&=-517},nt=()=>{y((()=>N(i,"appload",{detail:{namespace:"phirepass-widgets"}})))},lt=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){o(t,l)}},ot=t=>t.classList.add("hydrated"),st=(t,e,n,s)=>{const i=l(t);if(!i)return;const r=t,c=i.o.get(e),u=i.i,f=r;if(!((n=C(n,s.t[e][0]))===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.o.set(e,n),s.N){const t=s.N[e];t&&t.map((t=>{try{const[[l,o]]=Object.entries(t);(128&u||1&o)&&(f?f[l](n,c,e):i._.push((()=>{i.D[l](n,c,e)})))}catch(t){o(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||I(i,!1)}}},it=(e,n)=>{var o,s;const i=e.prototype;{e.watchers&&!n.N&&(n.N=e.watchers),e.deserializers&&!n.H&&(n.H=e.deserializers),e.serializers&&!n.P&&(n.P=e.serializers);const r=Object.entries(null!=(o=n.t)?o:{});r.map((([e,[o]])=>{if(31&o||32&o){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):((t,e)=>l(this).o.get(e))(0,e)},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=l(this);if(s){if(r)return void 0===(32&o?this[e]:s.$hostElement$[e])&&s.o.get(e)&&(t=s.o.get(e)),r.call(this,C(t,o)),void st(this,e,t=32&o?this[e]:s.$hostElement$[e],n);st(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,o,s){c.jmp((()=>{var c;const u=t.get(e),f=l(this);if(this.hasOwnProperty(u),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.i;if(f&&t&&!(8&t)&&s!==o){const l=this,i=null==(c=n.N)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=l[i]&&(128&t||1&r)&&l[i].call(l,s,o,e)}))}return}const a=r.find((([t])=>t===u));a&&4&a[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(i,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.N)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},rt=(t,e)=>{const i={i:e[0],h:e[1]};try{i.t=e[2],i.N=t.N,i.H=t.H,i.P=t.P;const r=t.prototype.connectedCallback,f=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const l={i:0,$hostElement$:t,l:e,o:new Map,U:new Map};l.R=new Promise((t=>l.L=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&e.i&&n(t,l)})(this,i)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&c.i)){const e=l(t);if(!e)return;const n=e.l,i=()=>{};if(1&e.i)(null==e?void 0:e.D)||(null==e?void 0:e.R)&&e.R.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){G(e,e.A=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 l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=S(n);if(!s.has(e)){const l=()=>{};((t,e,n)=>{let l=s.get(t);u&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,s.set(t,l)})(e,t,!!(1&n.i)),l()}}const o=e.A,i=()=>I(e,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()}catch(n){o(n,t),e.k&&(e.k(),e.k=void 0),e.L&&e.L(t)}})(t,e,n)}i()}})(this),r&&r.call(this)},disconnectedCallback(){(async t=>{O.has(t)&&O.delete(t),t.shadowRoot&&O.has(t.shadowRoot)&&O.delete(t.shadowRoot)})(this),f&&f.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${i.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else g.call(this,i)}}),Object.defineProperty(t,"is",{value:i.h,configurable:!0}),it(t,i)}catch(e){return o(e),t}},ct=t=>c.C=t,ut=t=>Object.assign(c,t);function ft(t,e){B({l:{i:0,h:e.tagName},$hostElement$:e},t)}function at(t){return t}export{r as H,A as a,L as c,v as getAssetPath,k as h,rt as p,ft as render,w as setAssetPath,ct as setNonce,ut as setPlatformOptions,at as t}
|
|
1
|
+
function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r="undefined"!=typeof window?window:{},c=r.HTMLElement||class{},f={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},u=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!u&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),p=!1,d=[],h=[],m=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.i?$(y):f.raf(y))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},y=()=>{b(d),b(h),(p=d.length>0)&&f.raf(y)},$=t=>Promise.resolve(void 0).then(t),v=m(h,!0),w=t=>{const e=new URL(t,f.u);return e.origin!==r.location.origin?e.href:e.pathname},g=t=>f.u=t;function j(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(a?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var O,S=new WeakMap,k=t=>"sc-"+t.p,M=t=>"object"==(t=typeof t)||"function"===t,E=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!M(l))&&(l+=""),s&&i?r[r.length-1].h+=l:r.push(s?C(null,l):l),i=s)};if(c(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=C(t,null);return f.m=e,r.length>0&&(f.$=r),f.v=o,f},C=(t,e)=>({i:0,j:t,h:null!=e?e:null,O:null,$:null,m:null,v:null}),x={},A=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const l of e){if(n)break;for(const e of t[l])if("string"==typeof e){n=!0;break}}if(!n)return t;const l={};for(const n of e)l[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return l},L=(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,N=(t,e)=>{const n=t;return{emit:t=>_(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},_=(t,e,n)=>{const l=f.ce(e,n);return t.dispatchEvent(l),l},D=(t,e,n,s,i,c)=>{if(n===s)return;let u=o(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,l=P(n);let o=P(s);e.remove(...l.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!l.includes(t))))}else if("key"===e);else if("ref"===e)s&&J(s,t);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let o;{const e=l(t);if(e&&e.l&&e.l.t){const t=e.l.t[n];t&&t[1]&&(o=t[1])}}return o||(o=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const l=M(s);if((u||l&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const l=null==s?"":s;"list"===e?u=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!u||4&c||i)&&!l&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}}else if(e="-"===e[2]?e.slice(3):o(r,a)?a.slice(2):a[2]+e.slice(3),n||s){const l=e.endsWith(R);e=e.replace(U,""),n&&f.rel(t,e,n,l),s&&f.ael(t,e,s,l)}},H=/\s/,P=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(H):[]),R="Capture",U=RegExp(R+"$"),W=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of F(Object.keys(o)))t in s||D(l,t,o[t],void 0,n,e.i);for(const t of F(Object.keys(s)))D(l,t,o[t],s[t],n,e.i)};function F(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var V=!1,q=[],z=[],T=(t,e,n)=>{const l=e.$[n];let o,s,i=0;if(null!=l.h)o=l.O=r.document.createTextNode(l.h);else{if(!r.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=r.document.createElement(l.j),W(null,l,V),l.$){const e="template"===l.j?o.content:o;for(i=0;i<l.$.length;++i)s=T(t,l,i),s&&e.appendChild(s)}}return o["s-hn"]=O,o},Y=(t,e,n,l,o,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===O&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);o<=s;++o)l[o]&&(i=T(null,n,o),i&&(l[o].O=i,K(r,i,e)))},Z=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;I(e),t&&t.remove()}}},B=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),G=(t,e,n=!1)=>{const l=e.O=t.O,o=t.$,s=e.$,i=e.h;null==i?(W(t,e,V),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=e.length-1,p=e[0],d=e[a],h=l.length-1,m=l[0],b=l[h];const y="template"===n.j?t.content:t;for(;r<=a&&c<=h;)if(null==p)p=e[++r];else if(null==d)d=e[--a];else if(null==m)m=l[++c];else if(null==b)b=l[--h];else if(B(p,m,o))G(p,m,o),p=e[++r],m=l[++c];else if(B(d,b,o))G(d,b,o),d=e[--a],b=l[--h];else if(B(p,b,o))G(p,b,o),K(y,p.O,d.O.nextSibling),p=e[++r],b=l[--h];else if(B(d,m,o))G(d,m,o),K(y,d.O,p.O),d=e[--a],m=l[++c];else{for(f=-1,u=r;u<=a;++u)if(e[u]&&null!==e[u].v&&e[u].v===m.v){f=u;break}f>=0?(i=e[f],i.j!==m.j?s=T(e&&e[c],n,f):(G(i,m,o),e[f]=void 0,s=i.O),m=l[++c]):(s=T(e&&e[c],n,c),m=l[++c]),s&&K(p.O.parentNode,s,p.O)}r>a?Y(t,null==l[h+1]?null:l[h+1].O,n,l,c,h):c>h&&Z(e,r,a)})(l,o,e,s,n):null!==s?(null!==t.h&&(l.textContent=""),Y(l,null,e,s,0,s.length-1)):!n&&null!==o&&Z(o,0,o.length-1)):t.h!==i&&(l.data=i)},I=t=>{t.m&&t.m.ref&&q.push((()=>t.m.ref(null))),t.$&&t.$.map(I)},J=(t,e)=>{z.push((()=>t(e)))},K=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),Q=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.S||C(null,null),s=(t=>t&&t.j===x)(e)?e:E(null,null,e);if(O=l.tagName,n&&s.m)for(const t of Object.keys(s.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.m[t]=l[t]);s.j=null,s.i|=4,t.S=s,s.O=o.O=l.shadowRoot||l,G(o,s,n),q.forEach((t=>t())),q.length=0,z.forEach((t=>t())),z.length=0},X=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.k=()=>{e["s-p"].splice(n-1,1),l()})))}},tt=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);X(t,t.M);const n=()=>et(t,e);if(!e)return v(n);queueMicrotask((()=>{n()}))},et=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)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 o;return o=ct(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=nt(o,(()=>ct(l,"componentWillRender",void 0,n))),nt(o,(()=>ot(t,l,e)))},nt=(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,ot=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,o=((t,e)=>{var n,l,o;const s=k(e),c=i.get(s);if(!r.document)return s;if(t=11===t.nodeType?t:r.document,c)if("string"==typeof c){let o,i=S.get(t=t.head||t);if(i||S.set(t,i=new Set),!i.has(s)){o=r.document.createElement("style"),o.textContent=c;const p=null!=(n=f.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=r.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=p&&o.setAttribute("nonce",p),!(1&e.i))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(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(u){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=c+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=S.get(t);if(e||S.set(t,e=new Set),!e.has(s)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(c.constructor===n.CSSStyleSheet)l=c;else{l=new n.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)l.insertRule(c.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);st(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>it(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},st=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,Q(t,e,l)}catch(e){s(e,t.$hostElement$)}return null},it=t=>{const e=t.$hostElement$,n=e,l=t.M;ct(n,"componentDidRender",void 0,e),64&t.i?ct(n,"componentDidUpdate",void 0,e):(t.i|=64,ft(e),ct(n,"componentDidLoad",void 0,e),t.A(e),l||rt()),t.k&&(t.k(),t.k=void 0),512&t.i&&$((()=>tt(t,!1))),t.i&=-517},rt=()=>{$((()=>_(r,"appload",{detail:{namespace:"phirepass-widgets"}})))},ct=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,l)}},ft=t=>t.classList.add("hydrated"),ut=(t,e,n,o)=>{const i=l(t);if(!i)return;const r=t,c=i.o.get(e),f=i.i,u=r;if(!((n=L(n,o.t[e][0]))===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.o.set(e,n),o.L){const t=o.L[e];t&&t.map((t=>{try{const[[l,o]]=Object.entries(t);(128&f||1&o)&&(u?u[l](n,c,e):i.N.push((()=>{i._[l](n,c,e)})))}catch(t){s(t,r)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,c,e)&&!(16&f))return;16&f||tt(i,!1)}}},at=(e,n)=>{var o,s;const i=e.prototype;{e.watchers&&!n.L&&(n.L=A(e.watchers)),e.deserializers&&!n.D&&(n.D=e.deserializers),e.serializers&&!n.H&&(n.H=e.serializers);const r=Object.entries(null!=(o=n.t)?o:{});r.map((([e,[o]])=>{if(31&o||32&o){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):((t,e)=>l(this).o.get(e))(0,e)},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=l(this);if(s){if(r)return void 0===(32&o?this[e]:s.$hostElement$[e])&&s.o.get(e)&&(t=s.o.get(e)),r.call(this,L(t,o)),void ut(this,e,t=32&o?this[e]:s.$hostElement$[e],n);ut(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var c;const f=t.get(e),u=l(this);if(this.hasOwnProperty(f),i.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==s)return;if(null==f){const t=null==u?void 0:u.i;if(u&&t&&!(8&t)&&s!==o){const l=this,i=null==(c=n.L)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=l[i]&&(128&t||1&r)&&l[i].call(l,s,o,e)}))}return}const a=r.find((([t])=>t===f)),p=a&&4&a[1][0],d=p&&null===s&&void 0===this[f];p&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(i,f);d||s==this[f]||h.get&&!h.set||(this[f]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.L)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},pt=(t,e)=>{const o={i:e[0],p:e[1]};try{o.t=e[2],o.L=A(t.L),o.D=t.D,o.H=t.H;const r=t.prototype.connectedCallback,c=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const l={i:0,$hostElement$:t,l:e,o:new Map,P:new Map};l.R=new Promise((t=>l.A=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&e.i&&n(t,l)})(this,o)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&f.i)){const e=l(t);if(!e)return;const n=e.l,o=()=>{};if(1&e.i)(null==e?void 0:e._)||(null==e?void 0:e.R)&&e.R.then((()=>{}));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(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 l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=k(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);u&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,i.set(t,l)})(e,t,!!(1&n.i)),l()}}const o=e.M,s=()=>tt(e,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()}catch(n){s(n,t),e.k&&(e.k(),e.k=void 0),e.A&&e.A(t)}})(t,e,n)}o()}})(this),r&&r.call(this)},disconnectedCallback(){(async t=>{S.has(t)&&S.delete(t),t.shadowRoot&&S.has(t.shadowRoot)&&S.delete(t.shadowRoot)})(this),c&&c.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(this,o)}}),Object.defineProperty(t,"is",{value:o.p,configurable:!0}),at(t,o)}catch(e){return s(e),t}},dt=t=>f.C=t,ht=t=>Object.assign(f,t),mt=new WeakMap;function bt(t,e){let n=mt.get(e);n||(n={i:0,l:{i:0,p:e.tagName},$hostElement$:e},mt.set(e,n)),Q(n,t)}function yt(t){return t}export{c as H,x as a,N as c,w as getAssetPath,E as h,pt as p,bt as render,g as setAssetPath,dt as setNonce,ht as setPlatformOptions,yt as t}
|
|
@@ -0,0 +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_28c8c91558eab232: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_7b0e6adca8922a5f: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 +1 @@
|
|
|
1
|
-
import{t as e,p as
|
|
1
|
+
import{t as e,p as i,H as s,c as t,h as a,a as c}from"./index.js";import{_ as o,C as d,a as r,P as n}from"./p-DgZMmpg7.js";const h=i(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.maximizeEvent=t(this,"maximize"),this.connectionStateChanged=t(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 o(),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 d(this.create_web_socket_endpoint()+"/api/web/ws",this.nodeId,this.serverId):new d(this.create_web_socket_endpoint()+"/api/web/ws",this.nodeId),this.channel.on_connection_open((()=>{this.connectionStateChanged.emit([r.Connected]),this.channel.authenticate(this.token,this.nodeId)})),this.channel.on_connection_close((()=>{this.connectionStateChanged.emit([r.Disconnected])})),this.channel.on_connection_error((e=>{this.connectionStateChanged.emit([r.Error,e])})),this.channel.on_connection_message((()=>{})),this.channel.on_protocol_message((e=>{const{web:i}=e.data;switch(i.type){case n.Error:this.handle_error(i);break;case n.AuthSuccess:this.handle_auth_success(i);break;case n.TunnelOpened:this.handle_tunnel_opened(i);break;case n.TunnelClosed:this.handle_tunnel_closed(i);break;case n.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(c,{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}]}}static get style(){return":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}"}},[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_login_screen_password:[32],maximize:[64],minimize:[64]},void 0,{nodeId:[{onNodeIdChange:0}],serverId:[{onServerIdChange:0}]}]);function l(){"undefined"!=typeof customElements&&["phirepass-sftp-client"].forEach((i=>{"phirepass-sftp-client"===i&&(customElements.get(e(i))||customElements.define(e(i),h))}))}l();const b=h,p=l;export{b as PhirepassSftpClient,p as defineCustomElement}
|