@fkn/lib 0.9.14 → 0.9.15
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/cloud/net.cjs +1 -1
- package/cloud/net.d.ts +1 -1
- package/cloud/net.js +1 -1
- package/{cloud-xlvU7_rs.d.ts → cloud--8SYg1so.d.ts} +2 -2
- package/cloud-9cCFUQiG.cjs +1 -0
- package/cloud-DWnpupeb.js +130 -0
- package/cloud.cjs +1 -1
- package/cloud.d.ts +2 -2
- package/cloud.js +2 -2
- package/{extension-B0qU5XuR.d.ts → extension-CN9oFZ0Q.d.ts} +1 -1
- package/extension-DPlyfEPO.cjs +1 -0
- package/extension-xVdvgkZL.js +78 -0
- package/extension.cjs +1 -1
- package/extension.d.ts +2 -2
- package/extension.js +3 -3
- package/http.cjs +1 -1
- package/http.d.ts +1 -1
- package/http.js +1 -1
- package/{index-DQfP-Uhy.d.ts → index-DLaonjpx.d.ts} +18 -18
- package/index.cjs +1 -1
- package/index.d.ts +4 -4
- package/index.js +10 -10
- package/{lib-BcEnB4iV.js → lib-CegQxwDI.js} +559 -298
- package/lib-ulyxIbTr.cjs +53 -0
- package/{net-CR3V3Q5W.js → net-BDAN5Mvc.js} +12 -4
- package/{net-1AjTrb23.d.ts → net-BnGcJpUb.d.ts} +14 -1
- package/net-kma1sFhK.cjs +1 -0
- package/net.cjs +1 -1
- package/net.d.ts +1 -1
- package/net.js +1 -1
- package/package.json +1 -1
- package/cloud-C28lGQEP.cjs +0 -1
- package/cloud-y88zoTpE.js +0 -283
- package/extension-B8fd9lvk.cjs +0 -1
- package/extension-Cts968cO.js +0 -78
- package/lib-CQqdCndr.cjs +0 -31
- package/net-D3A-Z8RL.cjs +0 -1
package/cloud/net.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../utils-QfNXtEhb.cjs"),t=require("../net-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../utils-QfNXtEhb.cjs"),t=require("../net-kma1sFhK.cjs");exports.Server=t.t,exports.Socket=t.n,exports._default=t.r,exports.default=t.r,exports.connect=t.i,exports.createConnection=t.a,exports.createServer=t.o,exports.isIP=e.r,exports.isIPv4=e.i,exports.isIPv6=e.a;
|
package/cloud/net.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createConnection, c as isIP, i as connect, l as isIPv4, n as Socket, o as createServer, r as _default, t as Server, u as isIPv6 } from "../net-
|
|
1
|
+
import { a as createConnection, c as isIP, i as connect, l as isIPv4, n as Socket, o as createServer, r as _default, t as Server, u as isIPv6 } from "../net-BnGcJpUb.js";
|
|
2
2
|
export { Server, Socket, _default, _default as default, connect, createConnection, createServer, isIP, isIPv4, isIPv6 };
|
package/cloud/net.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as e, i as t, r as n } from "../utils-DVlbuXmW.js";
|
|
2
|
-
import { a as r, i, n as a, o, r as s, t as c } from "../net-
|
|
2
|
+
import { a as r, i, n as a, o, r as s, t as c } from "../net-BDAN5Mvc.js";
|
|
3
3
|
export { c as Server, a as Socket, s as _default, s as default, i as connect, r as createConnection, o as createServer, n as isIP, t as isIPv4, e as isIPv6 };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cloudFetch } from "./proxy-BihVUSnB.js";
|
|
2
|
-
import { d as Frame, u as AttachFrameOptions } from "./index-
|
|
2
|
+
import { d as Frame, u as AttachFrameOptions } from "./index-DLaonjpx.js";
|
|
3
3
|
import { t as dns_d_exports } from "./dns.js";
|
|
4
4
|
import { n as fs_d_exports } from "./fs-DTmSCXwa.js";
|
|
5
|
-
import { s as net_d_exports } from "./net-
|
|
5
|
+
import { s as net_d_exports } from "./net-BnGcJpUb.js";
|
|
6
6
|
import { t as dgram_d_exports } from "./dgram.js";
|
|
7
7
|
import { t as http_d_exports } from "./http.js";
|
|
8
8
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-ulyxIbTr.cjs"),n=require("./api-D5ioM3pa.cjs"),r=require("./proxy-BsimoT14.cjs"),i=require("./dns.cjs"),a=require("./cloud/fs.cjs"),o=require("./net-kma1sFhK.cjs"),s=require("./dgram-C1E6TUWN.cjs"),c=require("./http.cjs");let l=require("osra");var u=e=>e,d=`autoplay; fullscreen; encrypted-media; picture-in-picture; clipboard-read; clipboard-write`,f=2e4,p=65e3,m=3e4,h=5e3,g=new Set,_=()=>`https://fkn.app`,v=e=>!e||e===`about:blank`,y=e=>e?``:`incognito-${crypto.randomUUID()}`,b=({target:e,session:t})=>{let n=new URL(`/attach-frame`,_());return e&&n.searchParams.set(`url`,e),t&&n.searchParams.set(`session`,t),n.href},x=(e,t,n)=>{let r,i=new Promise((e,i)=>{r=setTimeout(()=>i(Error(n)),t)});return Promise.race([e,i]).finally(()=>clearTimeout(r))},S=(e,t)=>{let n=()=>{a(),t()},r=e.parentNode,i=new MutationObserver(()=>{(!e.isConnected||e.parentNode!==r)&&(a(),t())}),a=()=>{window.removeEventListener(`pagehide`,n),i.disconnect()};window.addEventListener(`pagehide`,n,{once:!0}),r&&i.observe(r,{childList:!0}),e.isConnected||(a(),t())},C=()=>Object.assign(Error(`cloud.attachFrame: the attached iframe left the document or was reloaded; attach a fresh iframe`),{name:t.h}),w=(e,t)=>{let n=[...e.split(`;`),...t.split(`;`)].map(e=>e.trim()).filter(Boolean);return[...new Set(n)].join(`; `)},T=[300,1200,4e3],E=e=>{let t=()=>{if(!e.isConnected)return;let t=e.style.height,n=e.getBoundingClientRect();n.height&&(e.style.height=`${n.height-1}px`,setTimeout(()=>{e.style.height=t},50))};t();for(let e of T)setTimeout(t,e)},D=e=>{let t=e.getAttribute(`sandbox`);if(t===null)return;let n=new Set(t.toLowerCase().split(/\s+/).filter(Boolean)),r=[`allow-scripts`,`allow-same-origin`].filter(e=>!n.has(e));if(r.length)throw Error(`cloud.attachFrame: the iframe's sandbox attribute must include ${r.join(` and `)} for the render proxy to load`)},O=async({iframe:e,domains:n=[],syncCookies:r=!0,lockdown:i=!1})=>{if(typeof window>`u`)throw Error(`cloud.attachFrame needs a window realm`);if(i)throw Error(`cloud.attachFrame does not support lockdown; use the extension backend for a sealed frame`);if(!e.isConnected)throw Error(`cloud.attachFrame: the iframe must be connected to the document before attaching`);D(e);let a=e.getAttribute(`src`)??``,o=(()=>{if(v(a))return null;try{return new URL(e.src||a,location.href)}catch{throw Error(`cloud.attachFrame: the iframe src is not a valid URL: ${a}`)}})();if(o){let e=new URL(`/attach-frame`,_());if(o.origin===e.origin&&o.pathname===e.pathname)throw Error(`cloud.attachFrame: this iframe is already attached; navigate with the Frame returned by that attach or use a fresh iframe`)}let s=o?.href??``;s&&t.s(s);let c=s,T=y(r),O=new AbortController,k=e.referrerPolicy,A=e.allow;if(e.referrerPolicy=`origin`,e.allow=w(d,e.allow),e.src=b({target:s,session:T}),!e.contentWindow)throw Error(`cloud.attachFrame: the iframe window is not available`);try{let n=await x((0,l.expose)({},{key:`fkn-attach-frame`,origin:_(),transport:{receive:window,emit:e.contentWindow},unregisterSignal:O.signal,revivableModules:u(t.L)}),f,`cloud.attachFrame: timed out connecting to the render proxy page`);await x(n.ready(),p,`cloud.attachFrame: the render proxy never became ready`),s&&E(e),S(e,()=>O.abort());let r=e.contentWindow,i=()=>{if(!(!O.signal.aborted&&e.isConnected&&e.contentWindow===r))throw O.abort(),C()};return t.a({executor:{execute:(e,r,a)=>g.has(r)?Promise.reject(t.f(r,`cloud`)):(i(),n.executeLocator(e,r,a)),highlight:async()=>{}},goto:async(t,r={})=>{let a=new URL(t,location.href).href;i();let{timeoutMs:o}=r;await x(n.goto(a,r),(o??m)+h,`cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded`),c=a,E(e)},url:()=>c})}catch(t){throw O.abort(),e.referrerPolicy=k,e.allow=A,e.src=s||`about:blank`,t}},k=()=>typeof window<`u`&&!0,A=async()=>{let e=await n.t.then(e=>e.cloud.quota());return{premium:e.premium,overQuota:e.overQuota,throttled:e.overQuota&&!e.premium,usedBytes:e.usedBytes,limitBytes:e.limitBytes,remainingBytes:e.remaining,bytesPerSecond:e.bytesPerSecond,bitsPerSecond:e.bytesPerSecond*8}},j=e.t({attachFrame:()=>O,available:()=>M,dgram:()=>s.i,dns:()=>i.t,fetch:()=>r.t,fs:()=>a.t,http:()=>c.t,net:()=>o.s,quota:()=>A}),M=()=>n.r;Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return M}});
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { L as t, a as n, f as r, h as i, s as a } from "./lib-CegQxwDI.js";
|
|
3
|
+
import { r as o, t as s } from "./api-DAQQBty8.js";
|
|
4
|
+
import { t as c } from "./proxy-BthoIRuv.js";
|
|
5
|
+
import { t as l } from "./dns.js";
|
|
6
|
+
import { t as u } from "./cloud/fs.js";
|
|
7
|
+
import { s as d } from "./net-BDAN5Mvc.js";
|
|
8
|
+
import { i as f } from "./dgram-BDXvc69t.js";
|
|
9
|
+
import { t as p } from "./http.js";
|
|
10
|
+
import { expose as m } from "osra";
|
|
11
|
+
//#region src/lib/cloud/frame.ts
|
|
12
|
+
var h = (e) => e, g = "autoplay; fullscreen; encrypted-media; picture-in-picture; clipboard-read; clipboard-write", _ = 2e4, v = 65e3, y = 3e4, b = 5e3, x = /* @__PURE__ */ new Set(), S = () => "https://fkn.app", C = (e) => !e || e === "about:blank", w = (e) => e ? "" : `incognito-${crypto.randomUUID()}`, T = ({ target: e, session: t }) => {
|
|
13
|
+
let n = new URL("/attach-frame", S());
|
|
14
|
+
return e && n.searchParams.set("url", e), t && n.searchParams.set("session", t), n.href;
|
|
15
|
+
}, E = (e, t, n) => {
|
|
16
|
+
let r, i = new Promise((e, i) => {
|
|
17
|
+
r = setTimeout(() => i(Error(n)), t);
|
|
18
|
+
});
|
|
19
|
+
return Promise.race([e, i]).finally(() => clearTimeout(r));
|
|
20
|
+
}, D = (e, t) => {
|
|
21
|
+
let n = () => {
|
|
22
|
+
a(), t();
|
|
23
|
+
}, r = e.parentNode, i = new MutationObserver(() => {
|
|
24
|
+
(!e.isConnected || e.parentNode !== r) && (a(), t());
|
|
25
|
+
}), a = () => {
|
|
26
|
+
window.removeEventListener("pagehide", n), i.disconnect();
|
|
27
|
+
};
|
|
28
|
+
window.addEventListener("pagehide", n, { once: !0 }), r && i.observe(r, { childList: !0 }), e.isConnected || (a(), t());
|
|
29
|
+
}, O = () => Object.assign(/* @__PURE__ */ Error("cloud.attachFrame: the attached iframe left the document or was reloaded; attach a fresh iframe"), { name: i }), k = (e, t) => {
|
|
30
|
+
let n = [...e.split(";"), ...t.split(";")].map((e) => e.trim()).filter(Boolean);
|
|
31
|
+
return [...new Set(n)].join("; ");
|
|
32
|
+
}, A = [
|
|
33
|
+
300,
|
|
34
|
+
1200,
|
|
35
|
+
4e3
|
|
36
|
+
], j = (e) => {
|
|
37
|
+
let t = () => {
|
|
38
|
+
if (!e.isConnected) return;
|
|
39
|
+
let t = e.style.height, n = e.getBoundingClientRect();
|
|
40
|
+
n.height && (e.style.height = `${n.height - 1}px`, setTimeout(() => {
|
|
41
|
+
e.style.height = t;
|
|
42
|
+
}, 50));
|
|
43
|
+
};
|
|
44
|
+
t();
|
|
45
|
+
for (let e of A) setTimeout(t, e);
|
|
46
|
+
}, M = (e) => {
|
|
47
|
+
let t = e.getAttribute("sandbox");
|
|
48
|
+
if (t === null) return;
|
|
49
|
+
let n = new Set(t.toLowerCase().split(/\s+/).filter(Boolean)), r = ["allow-scripts", "allow-same-origin"].filter((e) => !n.has(e));
|
|
50
|
+
if (r.length) throw Error(`cloud.attachFrame: the iframe's sandbox attribute must include ${r.join(" and ")} for the render proxy to load`);
|
|
51
|
+
}, N = async ({ iframe: e, domains: i = [], syncCookies: o = !0, lockdown: s = !1 }) => {
|
|
52
|
+
if (typeof window > "u") throw Error("cloud.attachFrame needs a window realm");
|
|
53
|
+
if (s) throw Error("cloud.attachFrame does not support lockdown; use the extension backend for a sealed frame");
|
|
54
|
+
if (!e.isConnected) throw Error("cloud.attachFrame: the iframe must be connected to the document before attaching");
|
|
55
|
+
M(e);
|
|
56
|
+
let c = e.getAttribute("src") ?? "", l = (() => {
|
|
57
|
+
if (C(c)) return null;
|
|
58
|
+
try {
|
|
59
|
+
return new URL(e.src || c, location.href);
|
|
60
|
+
} catch {
|
|
61
|
+
throw Error(`cloud.attachFrame: the iframe src is not a valid URL: ${c}`);
|
|
62
|
+
}
|
|
63
|
+
})();
|
|
64
|
+
if (l) {
|
|
65
|
+
let e = new URL("/attach-frame", S());
|
|
66
|
+
if (l.origin === e.origin && l.pathname === e.pathname) throw Error("cloud.attachFrame: this iframe is already attached; navigate with the Frame returned by that attach or use a fresh iframe");
|
|
67
|
+
}
|
|
68
|
+
let u = l?.href ?? "";
|
|
69
|
+
u && a(u);
|
|
70
|
+
let d = u, f = w(o), p = new AbortController(), A = e.referrerPolicy, N = e.allow;
|
|
71
|
+
if (e.referrerPolicy = "origin", e.allow = k(g, e.allow), e.src = T({
|
|
72
|
+
target: u,
|
|
73
|
+
session: f
|
|
74
|
+
}), !e.contentWindow) throw Error("cloud.attachFrame: the iframe window is not available");
|
|
75
|
+
try {
|
|
76
|
+
let i = await E(m({}, {
|
|
77
|
+
key: "fkn-attach-frame",
|
|
78
|
+
origin: S(),
|
|
79
|
+
transport: {
|
|
80
|
+
receive: window,
|
|
81
|
+
emit: e.contentWindow
|
|
82
|
+
},
|
|
83
|
+
unregisterSignal: p.signal,
|
|
84
|
+
revivableModules: h(t)
|
|
85
|
+
}), _, "cloud.attachFrame: timed out connecting to the render proxy page");
|
|
86
|
+
await E(i.ready(), v, "cloud.attachFrame: the render proxy never became ready"), u && j(e), D(e, () => p.abort());
|
|
87
|
+
let a = e.contentWindow, o = () => {
|
|
88
|
+
if (!(!p.signal.aborted && e.isConnected && e.contentWindow === a)) throw p.abort(), O();
|
|
89
|
+
};
|
|
90
|
+
return n({
|
|
91
|
+
executor: {
|
|
92
|
+
execute: (e, t, n) => x.has(t) ? Promise.reject(r(t, "cloud")) : (o(), i.executeLocator(e, t, n)),
|
|
93
|
+
highlight: async () => {}
|
|
94
|
+
},
|
|
95
|
+
goto: async (t, n = {}) => {
|
|
96
|
+
let r = new URL(t, location.href).href;
|
|
97
|
+
o();
|
|
98
|
+
let { timeoutMs: a } = n;
|
|
99
|
+
await E(i.goto(r, n), (a ?? y) + b, "cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded"), d = r, j(e);
|
|
100
|
+
},
|
|
101
|
+
url: () => d
|
|
102
|
+
});
|
|
103
|
+
} catch (t) {
|
|
104
|
+
throw p.abort(), e.referrerPolicy = A, e.allow = N, e.src = u || "about:blank", t;
|
|
105
|
+
}
|
|
106
|
+
}, P = () => typeof window < "u" && !0, F = async () => {
|
|
107
|
+
let e = await s.then((e) => e.cloud.quota());
|
|
108
|
+
return {
|
|
109
|
+
premium: e.premium,
|
|
110
|
+
overQuota: e.overQuota,
|
|
111
|
+
throttled: e.overQuota && !e.premium,
|
|
112
|
+
usedBytes: e.usedBytes,
|
|
113
|
+
limitBytes: e.limitBytes,
|
|
114
|
+
remainingBytes: e.remaining,
|
|
115
|
+
bytesPerSecond: e.bytesPerSecond,
|
|
116
|
+
bitsPerSecond: e.bytesPerSecond * 8
|
|
117
|
+
};
|
|
118
|
+
}, I = /* @__PURE__ */ e({
|
|
119
|
+
attachFrame: () => N,
|
|
120
|
+
available: () => L,
|
|
121
|
+
dgram: () => f,
|
|
122
|
+
dns: () => l,
|
|
123
|
+
fetch: () => c,
|
|
124
|
+
fs: () => u,
|
|
125
|
+
http: () => p,
|
|
126
|
+
net: () => d,
|
|
127
|
+
quota: () => F
|
|
128
|
+
}), L = () => o;
|
|
129
|
+
//#endregion
|
|
130
|
+
export { P as a, N as i, I as n, F as r, L as t };
|
package/cloud.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./proxy-BsimoT14.cjs"),t=require("./cloud-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./proxy-BsimoT14.cjs"),t=require("./cloud-9cCFUQiG.cjs"),n=require("./dns.cjs"),r=require("./cloud/fs.cjs"),i=require("./net-kma1sFhK.cjs"),a=require("./dgram-C1E6TUWN.cjs"),o=require("./http.cjs");exports.attachFrame=t.i,exports.available=t.t,Object.defineProperty(exports,"dgram",{enumerable:!0,get:function(){return a.i}}),Object.defineProperty(exports,"dns",{enumerable:!0,get:function(){return n.t}}),exports.fetch=e.t,Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return r.t}}),Object.defineProperty(exports,"http",{enumerable:!0,get:function(){return o.t}}),Object.defineProperty(exports,"net",{enumerable:!0,get:function(){return i.s}}),exports.quota=t.r;
|
package/cloud.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as cloudFetch } from "./proxy-BihVUSnB.js";
|
|
2
|
-
import { a as attachFrame, i as quota, r as QuotaStatus, t as available } from "./cloud
|
|
2
|
+
import { a as attachFrame, i as quota, r as QuotaStatus, t as available } from "./cloud--8SYg1so.js";
|
|
3
3
|
import { t as dns_d_exports } from "./dns.js";
|
|
4
4
|
import { n as fs_d_exports } from "./fs-DTmSCXwa.js";
|
|
5
|
-
import { s as net_d_exports } from "./net-
|
|
5
|
+
import { s as net_d_exports } from "./net-BnGcJpUb.js";
|
|
6
6
|
import { t as dgram_d_exports } from "./dgram.js";
|
|
7
7
|
import { t as http_d_exports } from "./http.js";
|
|
8
8
|
export { type QuotaStatus, attachFrame, available, dgram_d_exports as dgram, dns_d_exports as dns, cloudFetch as fetch, fs_d_exports as fs, http_d_exports as http, net_d_exports as net, quota };
|
package/cloud.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as e } from "./proxy-BthoIRuv.js";
|
|
2
|
-
import { i as t, r as n, t as r } from "./cloud-
|
|
2
|
+
import { i as t, r as n, t as r } from "./cloud-DWnpupeb.js";
|
|
3
3
|
import { t as i } from "./dns.js";
|
|
4
4
|
import { t as a } from "./cloud/fs.js";
|
|
5
|
-
import { s as o } from "./net-
|
|
5
|
+
import { s as o } from "./net-BDAN5Mvc.js";
|
|
6
6
|
import { i as s } from "./dgram-BDXvc69t.js";
|
|
7
7
|
import { t as c } from "./http.js";
|
|
8
8
|
export { t as attachFrame, r as available, s as dgram, i as dns, e as fetch, a as fs, c as http, o as net, n as quota };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as fetch$1, A as LOCATOR_DENIED, B as SelectorPart, C as RemoteVideoElement, D as isType, E as createVideoElementHandle, F as isTerminalError, G as setRequestHeaderRule, H as RequestHeaderRule, I as Executor, J as cookies, K as CookieDetails, L as Gate, M as LOCATOR_UNSUPPORTED, N as isLocatorDenied, O as revive, P as isLocatorUnsupported, Q as assertFetchableUrl, R as GateTools, S as BoxedVideoElement, T as box, U as modifyRequestHeadersPermission, V as HeaderOperation, W as removeRequestHeaderRule, X as FetchInit, Y as readCookiePermission, Z as ProxyFetchRequest, _ as gotoPermission, a as PermissionGrant, at as FORGEABLE_HEADERS, b as isBlockedFrameUrl, c as ATTACH_FRAME_EVENT_KEY, ct as hasForgedCookie, d as Frame, et as fetchCredentialedPermission, f as FrameBackend, g as createFrame, h as attachFramePermission, i as waitForExtensionExposure, it as isLocalNetworkUrl, j as LOCATOR_ERROR, k as type, l as attachFrame, m as Locator, n as isExtensionExposed, nt as fetchPermission, o as PermissionRequest, ot as assertForgeableHeaders, p as GotoOptions, q as SiteCookie, r as setMissingExtensionHandler, rt as isBlockedFetchUrl, s as permissions, st as assertOneCookieIdentity, t as extension, tt as fetchLocalPermission, u as AttachFrameOptions, v as assertAttachableFrameUrl, w as VideoElementState, x as handleRevivableModules, y as assertLockdownApplicable, z as OperationRequest } from "./index-
|
|
1
|
+
import { $ as fetch$1, A as LOCATOR_DENIED, B as SelectorPart, C as RemoteVideoElement, D as isType, E as createVideoElementHandle, F as isTerminalError, G as setRequestHeaderRule, H as RequestHeaderRule, I as Executor, J as cookies, K as CookieDetails, L as Gate, M as LOCATOR_UNSUPPORTED, N as isLocatorDenied, O as revive, P as isLocatorUnsupported, Q as assertFetchableUrl, R as GateTools, S as BoxedVideoElement, T as box, U as modifyRequestHeadersPermission, V as HeaderOperation, W as removeRequestHeaderRule, X as FetchInit, Y as readCookiePermission, Z as ProxyFetchRequest, _ as gotoPermission, a as PermissionGrant, at as FORGEABLE_HEADERS, b as isBlockedFrameUrl, c as ATTACH_FRAME_EVENT_KEY, ct as hasForgedCookie, d as Frame, et as fetchCredentialedPermission, f as FrameBackend, g as createFrame, h as attachFramePermission, i as waitForExtensionExposure, it as isLocalNetworkUrl, j as LOCATOR_ERROR, k as type, l as attachFrame, m as Locator, n as isExtensionExposed, nt as fetchPermission, o as PermissionRequest, ot as assertForgeableHeaders, p as GotoOptions, q as SiteCookie, r as setMissingExtensionHandler, rt as isBlockedFetchUrl, s as permissions, st as assertOneCookieIdentity, t as extension, tt as fetchLocalPermission, u as AttachFrameOptions, v as assertAttachableFrameUrl, w as VideoElementState, x as handleRevivableModules, y as assertLockdownApplicable, z as OperationRequest } from "./index-DLaonjpx.js";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/extension-prompt.d.ts
|
|
4
4
|
declare const promptInstall: (reason?: string) => Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-ulyxIbTr.cjs"),n=require("./api-D5ioM3pa.cjs"),r=require("./proxy-BsimoT14.cjs"),i=require("./desktop.cjs");var a=async e=>{if(typeof window>`u`)return!1;if(t.P())return!0;let r=await n.t,i=null,a=new Promise(e=>{i=()=>{t.P()&&e(!0)},t.N.addEventListener(`statuschange`,i)}),o=r.installPrompt.show(e).then(()=>!1),s=await Promise.race([a,o]);return i&&t.N.removeEventListener(`statuschange`,i),await r.installPrompt.hide().catch(()=>{}),s},o=null;t.F(()=>(o||=a().then(()=>void 0).finally(()=>{o=null}),o));var s=()=>typeof document<`u`&&t.P(),c=async(e,n)=>{if(r.n(e),n?.credentials===`include`){if(typeof document>`u`)throw Error(`fetch with credentials needs the FKN extension, which only exists in window realms`);return t.C(e,n)}return s()?t.C(e,{...n,credentials:`omit`}):i.available()?i.fetch(e,n):r.t(e,n)},l=e.t({ATTACH_FRAME_EVENT_KEY:()=>t.n,FORGEABLE_HEADERS:()=>t.k,LOCATOR_DENIED:()=>t.g,LOCATOR_ERROR:()=>t.u,LOCATOR_UNSUPPORTED:()=>t.h,assertAttachableFrameUrl:()=>t.s,assertFetchableUrl:()=>t.S,assertForgeableHeaders:()=>t.A,assertLockdownApplicable:()=>t.c,assertOneCookieIdentity:()=>t.j,attachFrame:()=>t.r,attachFramePermission:()=>t.i,available:()=>s,box:()=>t.R,cookies:()=>t.b,createFrame:()=>t.a,createVideoElementHandle:()=>t.z,events:()=>t.N,extension:()=>t.N,fetch:()=>t.C,fetchCredentialedPermission:()=>t.w,fetchLocalPermission:()=>t.T,fetchPermission:()=>t.E,gotoPermission:()=>t.o,handleRevivableModules:()=>t.L,hasForgedCookie:()=>t.M,isBlockedFetchUrl:()=>t.D,isBlockedFrameUrl:()=>t.l,isExtensionExposed:()=>t.P,isLocalNetworkUrl:()=>t.O,isLocatorDenied:()=>t.d,isLocatorUnsupported:()=>t.m,isTerminalError:()=>t.p,isType:()=>t.B,modifyRequestHeadersPermission:()=>t._,permissions:()=>t.t,promptInstall:()=>a,readCookiePermission:()=>t.x,removeRequestHeaderRule:()=>t.v,revive:()=>t.V,setMissingExtensionHandler:()=>t.F,setRequestHeaderRule:()=>t.y,type:()=>t.H,waitForExtensionExposure:()=>t.I});Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { A as t, B as n, C as r, D as i, E as a, F as o, H as s, I as c, L as l, M as u, N as d, O as f, P as p, R as m, S as h, T as g, V as _, _ as v, a as y, b, c as x, d as S, g as C, h as w, i as T, j as E, k as D, l as O, m as k, n as A, o as j, p as M, r as N, s as P, t as F, u as I, v as L, w as R, x as z, y as B, z as V } from "./lib-CegQxwDI.js";
|
|
3
|
+
import { t as H } from "./api-DAQQBty8.js";
|
|
4
|
+
import { n as U, t as W } from "./proxy-BthoIRuv.js";
|
|
5
|
+
import { available as G, fetch as K } from "./desktop.js";
|
|
6
|
+
//#region src/lib/extension-prompt.ts
|
|
7
|
+
var q = async (e) => {
|
|
8
|
+
if (typeof window > "u") return !1;
|
|
9
|
+
if (p()) return !0;
|
|
10
|
+
let t = await H, n = null, r = new Promise((e) => {
|
|
11
|
+
n = () => {
|
|
12
|
+
p() && e(!0);
|
|
13
|
+
}, d.addEventListener("statuschange", n);
|
|
14
|
+
}), i = t.installPrompt.show(e).then(() => !1), a = await Promise.race([r, i]);
|
|
15
|
+
return n && d.removeEventListener("statuschange", n), await t.installPrompt.hide().catch(() => {}), a;
|
|
16
|
+
}, J = null;
|
|
17
|
+
o(() => (J ||= q().then(() => void 0).finally(() => {
|
|
18
|
+
J = null;
|
|
19
|
+
}), J));
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/lib/auto.ts
|
|
22
|
+
var Y = () => typeof document < "u" && p(), X = async (e, t) => {
|
|
23
|
+
if (U(e), t?.credentials === "include") {
|
|
24
|
+
if (typeof document > "u") throw Error("fetch with credentials needs the FKN extension, which only exists in window realms");
|
|
25
|
+
return r(e, t);
|
|
26
|
+
}
|
|
27
|
+
return Y() ? r(e, {
|
|
28
|
+
...t,
|
|
29
|
+
credentials: "omit"
|
|
30
|
+
}) : G() ? K(e, t) : W(e, t);
|
|
31
|
+
}, Z = /* @__PURE__ */ e({
|
|
32
|
+
ATTACH_FRAME_EVENT_KEY: () => A,
|
|
33
|
+
FORGEABLE_HEADERS: () => D,
|
|
34
|
+
LOCATOR_DENIED: () => C,
|
|
35
|
+
LOCATOR_ERROR: () => I,
|
|
36
|
+
LOCATOR_UNSUPPORTED: () => w,
|
|
37
|
+
assertAttachableFrameUrl: () => P,
|
|
38
|
+
assertFetchableUrl: () => h,
|
|
39
|
+
assertForgeableHeaders: () => t,
|
|
40
|
+
assertLockdownApplicable: () => x,
|
|
41
|
+
assertOneCookieIdentity: () => E,
|
|
42
|
+
attachFrame: () => N,
|
|
43
|
+
attachFramePermission: () => T,
|
|
44
|
+
available: () => Y,
|
|
45
|
+
box: () => m,
|
|
46
|
+
cookies: () => b,
|
|
47
|
+
createFrame: () => y,
|
|
48
|
+
createVideoElementHandle: () => V,
|
|
49
|
+
events: () => d,
|
|
50
|
+
extension: () => d,
|
|
51
|
+
fetch: () => r,
|
|
52
|
+
fetchCredentialedPermission: () => R,
|
|
53
|
+
fetchLocalPermission: () => g,
|
|
54
|
+
fetchPermission: () => a,
|
|
55
|
+
gotoPermission: () => j,
|
|
56
|
+
handleRevivableModules: () => l,
|
|
57
|
+
hasForgedCookie: () => u,
|
|
58
|
+
isBlockedFetchUrl: () => i,
|
|
59
|
+
isBlockedFrameUrl: () => O,
|
|
60
|
+
isExtensionExposed: () => p,
|
|
61
|
+
isLocalNetworkUrl: () => f,
|
|
62
|
+
isLocatorDenied: () => S,
|
|
63
|
+
isLocatorUnsupported: () => k,
|
|
64
|
+
isTerminalError: () => M,
|
|
65
|
+
isType: () => n,
|
|
66
|
+
modifyRequestHeadersPermission: () => v,
|
|
67
|
+
permissions: () => F,
|
|
68
|
+
promptInstall: () => q,
|
|
69
|
+
readCookiePermission: () => z,
|
|
70
|
+
removeRequestHeaderRule: () => L,
|
|
71
|
+
revive: () => _,
|
|
72
|
+
setMissingExtensionHandler: () => o,
|
|
73
|
+
setRequestHeaderRule: () => B,
|
|
74
|
+
type: () => s,
|
|
75
|
+
waitForExtensionExposure: () => c
|
|
76
|
+
});
|
|
77
|
+
//#endregion
|
|
78
|
+
export { q as i, X as n, Y as r, Z as t };
|
package/extension.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-ulyxIbTr.cjs"),t=require("./extension-DPlyfEPO.cjs");exports.ATTACH_FRAME_EVENT_KEY=e.n,exports.FORGEABLE_HEADERS=e.k,exports.LOCATOR_DENIED=e.g,exports.LOCATOR_ERROR=e.u,exports.LOCATOR_UNSUPPORTED=e.h,exports.assertAttachableFrameUrl=e.s,exports.assertFetchableUrl=e.S,exports.assertForgeableHeaders=e.A,exports.assertLockdownApplicable=e.c,exports.assertOneCookieIdentity=e.j,exports.attachFrame=e.r,exports.attachFramePermission=e.i,exports.available=t.r,exports.box=e.R,exports.cookies=e.b,exports.createFrame=e.a,exports.createVideoElementHandle=e.z,exports.events=e.N,exports.extension=e.N,exports.fetch=e.C,exports.fetchCredentialedPermission=e.w,exports.fetchLocalPermission=e.T,exports.fetchPermission=e.E,exports.gotoPermission=e.o,exports.handleRevivableModules=e.L,exports.hasForgedCookie=e.M,exports.isBlockedFetchUrl=e.D,exports.isBlockedFrameUrl=e.l,exports.isExtensionExposed=e.P,exports.isLocalNetworkUrl=e.O,exports.isLocatorDenied=e.d,exports.isLocatorUnsupported=e.m,exports.isTerminalError=e.p,exports.isType=e.B,exports.modifyRequestHeadersPermission=e._,exports.permissions=e.t,exports.promptInstall=t.i,exports.readCookiePermission=e.x,exports.removeRequestHeaderRule=e.v,exports.revive=e.V,exports.setMissingExtensionHandler=e.F,exports.setRequestHeaderRule=e.y,exports.type=e.H,exports.waitForExtensionExposure=e.I;
|
package/extension.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as fetch, A as LOCATOR_DENIED, B as SelectorPart, C as RemoteVideoElement, D as isType, E as createVideoElementHandle, F as isTerminalError, G as setRequestHeaderRule, H as RequestHeaderRule, I as Executor, J as cookies, K as CookieDetails, L as Gate, M as LOCATOR_UNSUPPORTED, N as isLocatorDenied, O as revive, P as isLocatorUnsupported, Q as assertFetchableUrl, R as GateTools, S as BoxedVideoElement, T as box, U as modifyRequestHeadersPermission, V as HeaderOperation, W as removeRequestHeaderRule, X as FetchInit, Y as readCookiePermission, Z as ProxyFetchRequest, _ as gotoPermission, a as PermissionGrant, at as FORGEABLE_HEADERS, b as isBlockedFrameUrl, c as ATTACH_FRAME_EVENT_KEY, ct as hasForgedCookie, d as Frame, et as fetchCredentialedPermission, f as FrameBackend, g as createFrame, h as attachFramePermission, i as waitForExtensionExposure, it as isLocalNetworkUrl, j as LOCATOR_ERROR, k as type, l as attachFrame, m as Locator, n as isExtensionExposed, nt as fetchPermission, o as PermissionRequest, ot as assertForgeableHeaders, p as GotoOptions, q as SiteCookie, r as setMissingExtensionHandler, rt as isBlockedFetchUrl, s as permissions, st as assertOneCookieIdentity, t as extension, tt as fetchLocalPermission, u as AttachFrameOptions, v as assertAttachableFrameUrl, w as VideoElementState, x as handleRevivableModules, y as assertLockdownApplicable, z as OperationRequest } from "./index-
|
|
2
|
-
import { i as promptInstall, r as isExtensionAvailable } from "./extension-
|
|
1
|
+
import { $ as fetch, A as LOCATOR_DENIED, B as SelectorPart, C as RemoteVideoElement, D as isType, E as createVideoElementHandle, F as isTerminalError, G as setRequestHeaderRule, H as RequestHeaderRule, I as Executor, J as cookies, K as CookieDetails, L as Gate, M as LOCATOR_UNSUPPORTED, N as isLocatorDenied, O as revive, P as isLocatorUnsupported, Q as assertFetchableUrl, R as GateTools, S as BoxedVideoElement, T as box, U as modifyRequestHeadersPermission, V as HeaderOperation, W as removeRequestHeaderRule, X as FetchInit, Y as readCookiePermission, Z as ProxyFetchRequest, _ as gotoPermission, a as PermissionGrant, at as FORGEABLE_HEADERS, b as isBlockedFrameUrl, c as ATTACH_FRAME_EVENT_KEY, ct as hasForgedCookie, d as Frame, et as fetchCredentialedPermission, f as FrameBackend, g as createFrame, h as attachFramePermission, i as waitForExtensionExposure, it as isLocalNetworkUrl, j as LOCATOR_ERROR, k as type, l as attachFrame, m as Locator, n as isExtensionExposed, nt as fetchPermission, o as PermissionRequest, ot as assertForgeableHeaders, p as GotoOptions, q as SiteCookie, r as setMissingExtensionHandler, rt as isBlockedFetchUrl, s as permissions, st as assertOneCookieIdentity, t as extension, tt as fetchLocalPermission, u as AttachFrameOptions, v as assertAttachableFrameUrl, w as VideoElementState, x as handleRevivableModules, y as assertLockdownApplicable, z as OperationRequest } from "./index-DLaonjpx.js";
|
|
2
|
+
import { i as promptInstall, r as isExtensionAvailable } from "./extension-CN9oFZ0Q.js";
|
|
3
3
|
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, BoxedVideoElement, CookieDetails, type Executor, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_UNSUPPORTED, Locator, type OperationRequest, PermissionGrant, PermissionRequest, ProxyFetchRequest, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, VideoElementState, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFrame, attachFramePermission, isExtensionAvailable as available, box, cookies, createFrame, createVideoElementHandle, extension as events, extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, gotoPermission, handleRevivableModules, hasForgedCookie, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorUnsupported, isTerminalError, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, type, waitForExtensionExposure };
|
package/extension.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a,
|
|
2
|
-
import { i as V, r as H } from "./extension-
|
|
3
|
-
export { k as ATTACH_FRAME_EVENT_KEY,
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, V as g, _, a as v, b as y, c as b, d as x, g as S, h as C, i as w, j as T, k as E, l as D, m as O, n as k, o as A, p as j, r as M, s as N, t as P, u as F, v as I, w as L, x as R, y as z, z as B } from "./lib-CegQxwDI.js";
|
|
2
|
+
import { i as V, r as H } from "./extension-xVdvgkZL.js";
|
|
3
|
+
export { k as ATTACH_FRAME_EVENT_KEY, E as FORGEABLE_HEADERS, S as LOCATOR_DENIED, F as LOCATOR_ERROR, C as LOCATOR_UNSUPPORTED, N as assertAttachableFrameUrl, m as assertFetchableUrl, e as assertForgeableHeaders, b as assertLockdownApplicable, T as assertOneCookieIdentity, M as attachFrame, w as attachFramePermission, H as available, p as box, y as cookies, v as createFrame, B as createVideoElementHandle, u as events, u as extension, n as fetch, L as fetchCredentialedPermission, h as fetchLocalPermission, i as fetchPermission, A as gotoPermission, c as handleRevivableModules, l as hasForgedCookie, r as isBlockedFetchUrl, D as isBlockedFrameUrl, f as isExtensionExposed, d as isLocalNetworkUrl, x as isLocatorDenied, O as isLocatorUnsupported, j as isTerminalError, t as isType, _ as modifyRequestHeadersPermission, P as permissions, V as promptInstall, R as readCookiePermission, I as removeRequestHeaderRule, g as revive, a as setMissingExtensionHandler, z as setRequestHeaderRule, o as type, s as waitForExtensionExposure };
|
package/http.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./net-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./net-kma1sFhK.cjs");let n=require("buffer"),r=require("stream");var i=e.t({Agent:()=>T,ClientRequest:()=>S,HTTPParser:()=>g,IncomingMessage:()=>v,METHODS:()=>o,STATUS_CODES:()=>s,Server:()=>w,ServerResponse:()=>b,_default:()=>A,createServer:()=>k,default:()=>A,get:()=>O,globalAgent:()=>E,request:()=>D}),a=new TextDecoder(`latin1`),o=`ACL.BIND.CHECKOUT.CONNECT.COPY.DELETE.GET.HEAD.LINK.LOCK.M-SEARCH.MERGE.MKACTIVITY.MKCALENDAR.MKCOL.MOVE.NOTIFY.OPTIONS.PATCH.POST.PROPFIND.PROPPATCH.PURGE.PUT.REBIND.REPORT.SEARCH.SOURCE.SUBSCRIBE.TRACE.UNBIND.UNLINK.UNLOCK.UNSUBSCRIBE`.split(`.`),s={100:`Continue`,101:`Switching Protocols`,102:`Processing`,103:`Early Hints`,200:`OK`,201:`Created`,202:`Accepted`,203:`Non-Authoritative Information`,204:`No Content`,205:`Reset Content`,206:`Partial Content`,207:`Multi-Status`,208:`Already Reported`,226:`IM Used`,300:`Multiple Choices`,301:`Moved Permanently`,302:`Found`,303:`See Other`,304:`Not Modified`,305:`Use Proxy`,307:`Temporary Redirect`,308:`Permanent Redirect`,400:`Bad Request`,401:`Unauthorized`,402:`Payment Required`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,406:`Not Acceptable`,407:`Proxy Authentication Required`,408:`Request Timeout`,409:`Conflict`,410:`Gone`,411:`Length Required`,412:`Precondition Failed`,413:`Payload Too Large`,414:`URI Too Long`,415:`Unsupported Media Type`,416:`Range Not Satisfiable`,417:`Expectation Failed`,418:`I'm a Teapot`,421:`Misdirected Request`,422:`Unprocessable Entity`,423:`Locked`,424:`Failed Dependency`,425:`Too Early`,426:`Upgrade Required`,428:`Precondition Required`,429:`Too Many Requests`,431:`Request Header Fields Too Large`,451:`Unavailable For Legal Reasons`,500:`Internal Server Error`,501:`Not Implemented`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`,505:`HTTP Version Not Supported`,506:`Variant Also Negotiates`,507:`Insufficient Storage`,508:`Loop Detected`,509:`Bandwidth Limit Exceeded`,510:`Not Extended`,511:`Network Authentication Required`},c=new Set([`content-type`,`content-length`,`user-agent`,`referer`,`host`,`authorization`,`proxy-authorization`,`if-modified-since`,`if-unmodified-since`,`from`,`location`,`max-forwards`,`retry-after`,`etag`,`last-modified`,`server`,`age`,`expires`]),l=13,u=10,d=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,f=(e,t)=>(e.code=t,e),p=(e,t)=>{if(e.length===0)return t;if(t.length===0)return e;let n=new Uint8Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n},m=(e,t)=>{for(let n=t;n+1<e.length;n++)if(e[n]===l&&e[n+1]===u)return n;return-1},h=e=>{for(let t=0;t+3<e.length;t++)if(e[t]===l&&e[t+1]===u&&e[t+2]===l&&e[t+3]===u)return t;return-1},g=class{mode;handlers;buf=new Uint8Array;state=`HEAD`;framing=`none`;bodyRemaining=0;chunkState=`size`;skipBody=!1;constructor(e,t){this.mode=e,this.handlers=t}execute(e){this.buf=p(this.buf,e);let t=!0;for(;t;)if(t=!1,this.state===`HEAD`){let e=h(this.buf);if(e===-1)return;let n=this.buf.subarray(0,e);this.buf=this.buf.subarray(e+4);let r=this.parseHead(n);this.handlers.onHeaders(r),this.setupBody(r),this.framing===`none`?(this.handlers.onComplete(),this.reset(),t=this.buf.length>0):(this.state=`BODY`,t=!0)}else this.consumeBody()&&(this.handlers.onComplete(),this.reset(),t=this.buf.length>0)}finish(){this.state===`BODY`&&this.framing===`eof`&&(this.handlers.onComplete(),this.reset())}reset(){this.state=`HEAD`,this.framing=`none`,this.bodyRemaining=0,this.chunkState=`size`,this.skipBody=!1}parseHead(e){let t=a.decode(e).split(`\r
|
|
2
2
|
`),n=t.shift()??``,r=[];for(let e of t)(e.startsWith(` `)||e.startsWith(` `))&&r.length>0?r[r.length-1]+=` `+e.trim():r.push(e);let i=[],o={};for(let e of r){if(!e)continue;let t=e.indexOf(`:`);if(t===-1)continue;let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();i.push(n,r),this.addHeader(o,n,r)}let s={httpVersionMajor:1,httpVersionMinor:1,httpVersion:`1.1`,headers:o,rawHeaders:i};if(this.mode===`request`){let[e,t,r]=n.split(` `);s.method=(e??`GET`).toUpperCase(),s.url=t??`/`,this.applyVersion(s,r)}else{let e=n.indexOf(` `),t=n.slice(0,e),r=n.slice(e+1),i=r.indexOf(` `),a=i===-1?r:r.slice(0,i);s.statusCode=parseInt(a,10)||0,s.statusMessage=i===-1?``:r.slice(i+1),this.applyVersion(s,t)}return s}applyVersion(e,t){let n=/HTTP\/(\d)\.(\d)/i.exec(t??``);n&&(e.httpVersionMajor=parseInt(n[1],10),e.httpVersionMinor=parseInt(n[2],10),e.httpVersion=`${e.httpVersionMajor}.${e.httpVersionMinor}`)}addHeader(e,t,n){let r=t.toLowerCase();if(r===`set-cookie`){let t=e[`set-cookie`];Array.isArray(t)?t.push(n):e[`set-cookie`]=[n];return}let i=e[r];i===void 0?e[r]=n:c.has(r)||(e[r]=`${i}, ${n}`)}setupBody(e){if(this.skipBody){this.framing=`none`;return}let t=e.headers[`transfer-encoding`];if(typeof t==`string`&&t.toLowerCase().includes(`chunked`)){this.framing=`chunked`,this.chunkState=`size`;return}let n=e.headers[`content-length`];if(typeof n==`string`&&n!==``){let e=parseInt(n,10);e>0?(this.framing=`length`,this.bodyRemaining=e):this.framing=`none`;return}if(this.mode===`response`){let t=e.statusCode??0;t>=100&&t<200||t===204||t===304?this.framing=`none`:this.framing=`eof`}else this.framing=`none`}consumeBody(){if(this.framing===`length`){if(this.buf.length===0)return!1;let e=Math.min(this.bodyRemaining,this.buf.length);return this.handlers.onBody(this.buf.subarray(0,e)),this.buf=this.buf.subarray(e),this.bodyRemaining-=e,this.bodyRemaining===0}return this.framing===`eof`?(this.buf.length>0&&(this.handlers.onBody(this.buf),this.buf=new Uint8Array),!1):this.framing===`chunked`?this.consumeChunked():!0}consumeChunked(){for(;;)if(this.chunkState===`size`){let e=m(this.buf,0);if(e===-1)return!1;let t=a.decode(this.buf.subarray(0,e)),n=parseInt(t.split(`;`)[0].trim(),16);if(this.buf=this.buf.subarray(e+2),Number.isNaN(n))return!0;n===0?this.chunkState=`trailer`:(this.bodyRemaining=n,this.chunkState=`data`)}else if(this.chunkState===`data`){if(this.buf.length===0)return!1;let e=Math.min(this.bodyRemaining,this.buf.length);this.handlers.onBody(this.buf.subarray(0,e)),this.buf=this.buf.subarray(e),this.bodyRemaining-=e,this.bodyRemaining===0&&(this.chunkState=`dataCRLF`)}else if(this.chunkState===`dataCRLF`){if(this.buf.length<2)return!1;this.buf=this.buf.subarray(2),this.chunkState=`size`}else{let e=m(this.buf,0);if(e===-1)return!1;let t=e===0;if(this.buf=this.buf.subarray(e+2),t)return!0}}},_=(e,t)=>n.Buffer.isBuffer(e)?e:typeof e==`string`?n.Buffer.from(e,t??`utf8`):e instanceof Uint8Array?n.Buffer.from(e):e instanceof ArrayBuffer?n.Buffer.from(new Uint8Array(e)):n.Buffer.from(String(e)),v=class extends r.Stream.Readable{httpVersion=`1.1`;httpVersionMajor=1;httpVersionMinor=1;headers={};rawHeaders=[];trailers={};rawTrailers=[];method;url;statusCode;statusMessage;complete=!1;socket;constructor(e){super(),this.socket=e}get connection(){return this.socket}_applyHead(e){this.httpVersion=e.httpVersion,this.httpVersionMajor=e.httpVersionMajor,this.httpVersionMinor=e.httpVersionMinor,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.method=e.method,this.url=e.url,this.statusCode=e.statusCode,this.statusMessage=e.statusMessage}_read(){}setTimeout(e,t){return this.socket.setTimeout(e,t),this}},y=class extends r.Stream.Writable{_headerStore=new Map;headersSent=!1;chunkedEncoding=!1;finished=!1;_bodyWritten=!1;setHeader(e,t){if(this.headersSent)throw f(Error(`Cannot set headers after they are sent to the client`),`ERR_HTTP_HEADERS_SENT`);if(typeof e!=`string`||!d.test(e))throw f(TypeError(`Header name must be a valid HTTP token [${JSON.stringify(String(e))}]`),`ERR_INVALID_HTTP_TOKEN`);if(t===void 0)throw f(TypeError(`Invalid value "undefined" for header "${e}"`),`ERR_HTTP_INVALID_HEADER_VALUE`);return this._headerStore.set(e.toLowerCase(),[e,Array.isArray(t)?[...t]:t]),this}getHeader(e){return this._headerStore.get(e.toLowerCase())?.[1]}getHeaderNames(){return[...this._headerStore.values()].map(([e])=>e)}getHeaders(){let e={};for(let[t,n]of this._headerStore.values())e[t]=n;return e}hasHeader(e){return this._headerStore.has(e.toLowerCase())}removeHeader(e){if(this.headersSent)throw Error(`Cannot remove headers after they are sent to the client`);this._headerStore.delete(e.toLowerCase())}_storeHeader(e){let t=this.hasHeader(`content-length`),n=this.getHeader(`transfer-encoding`);typeof n==`string`&&n.toLowerCase().includes(`chunked`)?this.chunkedEncoding=!0:!t&&this._shouldSendBody()&&(this.chunkedEncoding=!0,this.setHeader(`Transfer-Encoding`,`chunked`));let r=e+`\r
|
|
3
3
|
`;for(let[e,t]of this._headerStore.values())if(Array.isArray(t))for(let n of t)r+=`${e}: ${n}\r\n`;else r+=`${e}: ${t}\r\n`;return r+=`\r
|
|
4
4
|
`,r}_writeToSocket(e,t){if(!this.socket){t(Error(`Socket is not available`));return}this.socket.write(e,t)}write(e,t,n){return this._bodyWritten=!0,super.write(e,t,n)}_write(e,t,r){let i=_(e),a=[];if(this.headersSent||=(this._implicitHeader(),a.push(n.Buffer.from(this._headBlock,`latin1`)),!0),this.chunkedEncoding?i.length>0&&(a.push(n.Buffer.from(`${i.length.toString(16)}\r\n`,`latin1`)),a.push(i),a.push(n.Buffer.from(`\r
|
package/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Socket, t as Server$1 } from "./net-
|
|
1
|
+
import { n as Socket, t as Server$1 } from "./net-BnGcJpUb.js";
|
|
2
2
|
import { Buffer } from "buffer";
|
|
3
3
|
import { Stream } from "stream";
|
|
4
4
|
import { IncomingHttpHeaders, OutgoingHttpHeaders, RequestOptions } from "http";
|
package/http.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { n as t, t as n } from "./net-
|
|
2
|
+
import { n as t, t as n } from "./net-BDAN5Mvc.js";
|
|
3
3
|
import { Buffer as r } from "buffer";
|
|
4
4
|
import { Stream as i } from "stream";
|
|
5
5
|
//#region src/lib/webvpn/http.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BoxBase, Capable, DefaultRevivableModules, RevivableContext, UnderlyingType } from "osra";
|
|
2
2
|
|
|
3
|
-
//#region
|
|
3
|
+
//#region node_modules/@mfkn/web-extension/lib/lib/forgeable-headers.d.ts
|
|
4
4
|
declare const FORGEABLE_HEADERS: string[];
|
|
5
5
|
declare const hasForgedCookie: (unsafeHeaders: [string, string][] | undefined) => boolean;
|
|
6
6
|
declare const assertOneCookieIdentity: (unsafeHeaders: [string, string][] | undefined, credentials: 'include' | 'omit') => void;
|
|
7
7
|
declare const assertForgeableHeaders: (unsafeHeaders: [string, string][] | undefined) => void;
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region
|
|
9
|
+
//#region node_modules/@mfkn/web-extension/lib/lib/fetch.d.ts
|
|
10
10
|
declare const fetchPermission: {
|
|
11
11
|
readonly scope: 'network.fetch';
|
|
12
12
|
readonly category: 'network';
|
|
@@ -49,7 +49,7 @@ declare const isBlockedFetchUrl: (raw: string) => boolean;
|
|
|
49
49
|
declare const assertFetchableUrl: (raw: string) => void;
|
|
50
50
|
declare const fetch: (input: RequestInfo | URL, init?: FetchInit) => Promise<Response>;
|
|
51
51
|
//#endregion
|
|
52
|
-
//#region
|
|
52
|
+
//#region node_modules/@mfkn/web-extension/lib/lib/cookies.d.ts
|
|
53
53
|
declare const readCookiePermission: {
|
|
54
54
|
readonly scope: 'network.readCookie';
|
|
55
55
|
readonly category: 'network';
|
|
@@ -70,7 +70,7 @@ declare const cookies: {
|
|
|
70
70
|
get: (details: CookieDetails) => Promise<SiteCookie | null>;
|
|
71
71
|
};
|
|
72
72
|
//#endregion
|
|
73
|
-
//#region
|
|
73
|
+
//#region node_modules/@mfkn/web-extension/lib/lib/request-rules.d.ts
|
|
74
74
|
declare const modifyRequestHeadersPermission: {
|
|
75
75
|
readonly scope: 'network.modifyRequestHeaders';
|
|
76
76
|
readonly category: 'network';
|
|
@@ -94,7 +94,7 @@ declare const setRequestHeaderRule: (rule: RequestHeaderRule) => Promise<{
|
|
|
94
94
|
}>;
|
|
95
95
|
declare const removeRequestHeaderRule: (ruleId: number) => Promise<void>;
|
|
96
96
|
//#endregion
|
|
97
|
-
//#region
|
|
97
|
+
//#region node_modules/@mfkn/frame-locator/lib/types.d.ts
|
|
98
98
|
type ChainKind = 'element' | 'frame';
|
|
99
99
|
type SelectorPart = {
|
|
100
100
|
kind: ChainKind;
|
|
@@ -146,7 +146,7 @@ type Executor = {
|
|
|
146
146
|
stale?: Promise<void>;
|
|
147
147
|
};
|
|
148
148
|
//#endregion
|
|
149
|
-
//#region
|
|
149
|
+
//#region node_modules/@mfkn/frame-locator/lib/errors.d.ts
|
|
150
150
|
declare const LOCATOR_ERROR = "LocatorError";
|
|
151
151
|
declare const LOCATOR_UNSUPPORTED = "LocatorUnsupportedError";
|
|
152
152
|
declare const LOCATOR_DENIED = "LocatorDeniedError";
|
|
@@ -154,13 +154,13 @@ declare const isLocatorUnsupported: (error: unknown) => boolean;
|
|
|
154
154
|
declare const isLocatorDenied: (error: unknown) => boolean;
|
|
155
155
|
declare const isTerminalError: (error: unknown) => boolean;
|
|
156
156
|
//#endregion
|
|
157
|
-
//#region
|
|
157
|
+
//#region node_modules/@mfkn/frame-locator/lib/add-style-tag.d.ts
|
|
158
158
|
type AddStyleTagOptions$1 = OperationOptions & {
|
|
159
159
|
content: string;
|
|
160
160
|
noSanitize?: boolean;
|
|
161
161
|
};
|
|
162
162
|
//#endregion
|
|
163
|
-
//#region
|
|
163
|
+
//#region node_modules/@mfkn/frame-locator/lib/operations.d.ts
|
|
164
164
|
type PositionOptions$1 = OperationOptions & {
|
|
165
165
|
position?: {
|
|
166
166
|
x?: number;
|
|
@@ -168,7 +168,7 @@ type PositionOptions$1 = OperationOptions & {
|
|
|
168
168
|
};
|
|
169
169
|
};
|
|
170
170
|
//#endregion
|
|
171
|
-
//#region
|
|
171
|
+
//#region node_modules/@mfkn/frame-locator/lib/modules.d.ts
|
|
172
172
|
declare const defaultModules: {
|
|
173
173
|
readonly element: {
|
|
174
174
|
readonly selectors: {
|
|
@@ -315,7 +315,7 @@ type Extended<B extends Modules, S extends ModulesSpec> = {
|
|
|
315
315
|
frame: MergeKind<B['frame'], S['frame']>;
|
|
316
316
|
};
|
|
317
317
|
//#endregion
|
|
318
|
-
//#region
|
|
318
|
+
//#region node_modules/@mfkn/frame-locator/lib/chain.d.ts
|
|
319
319
|
type ArgsOf<M> = M extends {
|
|
320
320
|
resolve: (context: never, ...args: infer A) => unknown;
|
|
321
321
|
} ? A : never;
|
|
@@ -400,7 +400,7 @@ declare const isType: (value: unknown) => value is RemoteVideoElement;
|
|
|
400
400
|
declare const box: <T extends RemoteVideoElement, T2 extends RevivableContext>(value: T, context: T2) => BoxedVideoElement;
|
|
401
401
|
declare const revive: <T extends BoxedVideoElement, T2 extends RevivableContext>(value: T, context: T2) => T[UnderlyingType];
|
|
402
402
|
//#endregion
|
|
403
|
-
//#region
|
|
403
|
+
//#region node_modules/@mfkn/web-extension/lib/lib/revivables/index.d.ts
|
|
404
404
|
declare const handleRevivableModules: (defaults: DefaultRevivableModules) => readonly [typeof video_d_exports, typeof import("osra/build/revivables/transfer"), typeof import("osra/build/revivables/identity"), typeof import("osra/build/revivables/array-buffer"), typeof import("osra/build/revivables/date"), typeof import("osra/build/revivables/headers"), typeof import("osra/build/revivables/error"), typeof import("osra/build/revivables/typed-array"), typeof import("osra/build/revivables/promise"), typeof import("osra/build/revivables/function"), typeof import("osra/build/revivables/message-port"), typeof import("osra/build/revivables/readable-stream"), typeof import("osra/build/revivables/writable-stream"), typeof import("osra/build/revivables/abort-signal"), typeof import("osra/build/revivables/response"), typeof import("osra/build/revivables/request"), typeof import("osra/build/revivables/map"), typeof import("osra/build/revivables/set"), typeof import("osra/build/revivables/bigint"), typeof import("osra/build/revivables/symbol"), typeof import("osra/build/revivables/event"), typeof import("osra/build/revivables/async-iterator"), {
|
|
405
405
|
readonly type: 'nonFiniteNumber';
|
|
406
406
|
readonly isType: (value: unknown) => value is number;
|
|
@@ -436,7 +436,7 @@ declare const handleRevivableModules: (defaults: DefaultRevivableModules) => rea
|
|
|
436
436
|
readonly revive: (_value: import("osra/build/revivables/fallbacks").BoxedUnclonable, _context: import("osra").RevivableContext<any>) => Record<string, never>;
|
|
437
437
|
}];
|
|
438
438
|
//#endregion
|
|
439
|
-
//#region
|
|
439
|
+
//#region node_modules/@mfkn/web-extension/lib/lib/locator-modules.d.ts
|
|
440
440
|
type LocatorOptions = OperationOptions & {
|
|
441
441
|
reason?: string;
|
|
442
442
|
};
|
|
@@ -614,7 +614,7 @@ declare const locatorModules: Extended<{
|
|
|
614
614
|
}>;
|
|
615
615
|
type LocatorModules = typeof locatorModules;
|
|
616
616
|
//#endregion
|
|
617
|
-
//#region
|
|
617
|
+
//#region node_modules/@mfkn/web-extension/lib/lib/frame-url.d.ts
|
|
618
618
|
declare const isBlockedFrameUrl: (raw: string) => boolean;
|
|
619
619
|
declare const assertAttachableFrameUrl: (raw: string) => void;
|
|
620
620
|
declare const assertLockdownApplicable: ({
|
|
@@ -627,7 +627,7 @@ declare const assertLockdownApplicable: ({
|
|
|
627
627
|
lockdown: boolean;
|
|
628
628
|
}) => void;
|
|
629
629
|
//#endregion
|
|
630
|
-
//#region
|
|
630
|
+
//#region node_modules/@mfkn/web-extension/lib/lib/frame-core.d.ts
|
|
631
631
|
type Locator = Locator$1<LocatorModules>;
|
|
632
632
|
declare const attachFramePermission: {
|
|
633
633
|
readonly scope: 'embed.iframe';
|
|
@@ -665,7 +665,7 @@ type FrameBackend = {
|
|
|
665
665
|
};
|
|
666
666
|
declare const createFrame: (backend: FrameBackend) => Frame;
|
|
667
667
|
//#endregion
|
|
668
|
-
//#region
|
|
668
|
+
//#region node_modules/@mfkn/web-extension/lib/lib/frame.d.ts
|
|
669
669
|
declare const ATTACH_FRAME_EVENT_KEY = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY";
|
|
670
670
|
declare const attachFrame: ({
|
|
671
671
|
iframe,
|
|
@@ -674,7 +674,7 @@ declare const attachFrame: ({
|
|
|
674
674
|
lockdown
|
|
675
675
|
}: AttachFrameOptions) => Promise<Frame>;
|
|
676
676
|
//#endregion
|
|
677
|
-
//#region
|
|
677
|
+
//#region node_modules/@mfkn/web-extension/lib/permission/shared/registry.d.ts
|
|
678
678
|
declare const PERMISSIONS: readonly [{
|
|
679
679
|
readonly scope: 'read.text';
|
|
680
680
|
readonly category: 'read';
|
|
@@ -791,7 +791,7 @@ declare const PERMISSIONS: readonly [{
|
|
|
791
791
|
}];
|
|
792
792
|
type PermissionScope = (typeof PERMISSIONS)[number]['scope'];
|
|
793
793
|
//#endregion
|
|
794
|
-
//#region
|
|
794
|
+
//#region node_modules/@mfkn/web-extension/lib/lib/permissions.d.ts
|
|
795
795
|
type PermissionRequest = {
|
|
796
796
|
key: PermissionScope;
|
|
797
797
|
scope?: string;
|
|
@@ -806,7 +806,7 @@ declare const permissions: {
|
|
|
806
806
|
request: (requests: PermissionRequest[]) => Promise<PermissionGrant[]>;
|
|
807
807
|
};
|
|
808
808
|
//#endregion
|
|
809
|
-
//#region
|
|
809
|
+
//#region node_modules/@mfkn/web-extension/lib/utils/extension.d.ts
|
|
810
810
|
type ExtensionEventMap = {
|
|
811
811
|
statuschange: CustomEvent<{
|
|
812
812
|
enabled: boolean;
|
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-ulyxIbTr.cjs"),t=require("./api-D5ioM3pa.cjs"),n=require("./cloud-9cCFUQiG.cjs"),r=require("./dns.cjs"),i=require("./net-kma1sFhK.cjs"),a=require("./dgram-C1E6TUWN.cjs"),o=require("./http.cjs"),s=require("./extension-DPlyfEPO.cjs"),c=require("./desktop.cjs"),l=require("./fs-DKseuFE2.cjs"),u=require("./opfs.cjs"),d=require("./packages.cjs"),f=require("./account.cjs"),p=require("./connect-button-BBEjXzB3.cjs");let m=require("osra");var h=1e4,g=150,_=()=>new Promise(t=>{if(e.P())return t(!0);let n,r=setTimeout(()=>i(e.P()),h),i=e=>{clearTimeout(n),clearTimeout(r),o.disconnect(),document.removeEventListener(`readystatechange`,s),t(e)},a=()=>{clearTimeout(n),n=setTimeout(()=>i(e.P()),g)},o=new MutationObserver(()=>{e.P()&&i(!0)}),s=()=>{document.readyState===`complete`&&!e.P()&&a()};o.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-fkn-extension`]}),document.addEventListener(`readystatechange`,s),document.readyState===`complete`&&a()}),v=async t=>s.r()||t.lockdown||!n.a()||await _()?e.r(t):n.i(t),y=`https://fkn.app`,b=async(e,n)=>{if(typeof window>`u`)throw Error(`FKN @fkn/lib: relayWorker must be called from the main thread`);let r=await t.i;if(!r)throw Error(`FKN @fkn/lib: relayWorker found no FKN transport in this realm`);(0,m.relay)(r,e,{key:`fkn-api`,...r.emit instanceof MessagePort?{}:{originA:n?.originA??y,originB:n?.originB??`*`},unregisterSignal:n?.unregisterSignal})},x=async()=>typeof window>`u`?!1:(await t.t).connect.prompt(location.origin).catch(()=>!1),S=async()=>typeof window>`u`?null:(await t.t).relay.prompt().catch(()=>null);exports.ATTACH_FRAME_EVENT_KEY=e.n,exports.FORGEABLE_HEADERS=e.k,exports.LOCATOR_DENIED=e.g,exports.LOCATOR_ERROR=e.u,exports.LOCATOR_UNSUPPORTED=e.h,Object.defineProperty(exports,"account",{enumerable:!0,get:function(){return f.t}}),exports.assertAttachableFrameUrl=e.s,exports.assertFetchableUrl=e.S,exports.assertForgeableHeaders=e.A,exports.assertLockdownApplicable=e.c,exports.assertOneCookieIdentity=e.j,exports.attachFrame=v,exports.attachFramePermission=e.i,exports.box=e.R,Object.defineProperty(exports,"cloud",{enumerable:!0,get:function(){return n.n}}),exports.connect=x,exports.connectButtonUrl=p.t,exports.cookies=e.b,exports.createFrame=e.a,exports.createVideoElementHandle=e.z,Object.defineProperty(exports,"desktop",{enumerable:!0,get:function(){return c.t}}),Object.defineProperty(exports,"dgram",{enumerable:!0,get:function(){return a.i}}),Object.defineProperty(exports,"dns",{enumerable:!0,get:function(){return r.t}}),Object.defineProperty(exports,"extension",{enumerable:!0,get:function(){return s.t}}),exports.fetch=s.n,exports.fetchCredentialedPermission=e.w,exports.fetchLocalPermission=e.T,exports.fetchPermission=e.E,Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return l.u}}),exports.gotoPermission=e.o,exports.handleRevivableModules=e.L,exports.hasForgedCookie=e.M,Object.defineProperty(exports,"http",{enumerable:!0,get:function(){return o.t}}),exports.isBlockedFetchUrl=e.D,exports.isBlockedFrameUrl=e.l,exports.isExtensionExposed=e.P,exports.isLocalNetworkUrl=e.O,exports.isLocatorDenied=e.d,exports.isLocatorUnsupported=e.m,exports.isTerminalError=e.p,exports.isType=e.B,exports.modifyRequestHeadersPermission=e._,Object.defineProperty(exports,"net",{enumerable:!0,get:function(){return i.s}}),Object.defineProperty(exports,"opfs",{enumerable:!0,get:function(){return u.t}}),Object.defineProperty(exports,"packages",{enumerable:!0,get:function(){return d.t}}),exports.permissions=e.t,exports.promptInstall=s.i,exports.promptRelay=S,exports.readCookiePermission=e.x,exports.relayWorker=b,exports.removeRequestHeaderRule=e.v,exports.revive=e.V,exports.setMissingExtensionHandler=e.F,exports.setRequestHeaderRule=e.y,exports.type=e.H,exports.waitForExtensionExposure=e.I;
|
package/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as account_d_exports } from "./account.js";
|
|
2
2
|
import { S as packages_d_exports } from "./packages-vX-1yfRK.js";
|
|
3
|
-
import { A as LOCATOR_DENIED, B as SelectorPart, C as RemoteVideoElement, D as isType, E as createVideoElementHandle, F as isTerminalError, G as setRequestHeaderRule, H as RequestHeaderRule, I as Executor, J as cookies, K as CookieDetails, L as Gate, M as LOCATOR_UNSUPPORTED, N as isLocatorDenied, O as revive, P as isLocatorUnsupported, Q as assertFetchableUrl, R as GateTools, S as BoxedVideoElement, T as box, U as modifyRequestHeadersPermission, V as HeaderOperation, W as removeRequestHeaderRule, X as FetchInit, Y as readCookiePermission, Z as ProxyFetchRequest, _ as gotoPermission, a as PermissionGrant, at as FORGEABLE_HEADERS, b as isBlockedFrameUrl, c as ATTACH_FRAME_EVENT_KEY, ct as hasForgedCookie, d as Frame, et as fetchCredentialedPermission, f as FrameBackend, g as createFrame, h as attachFramePermission, i as waitForExtensionExposure, it as isLocalNetworkUrl, j as LOCATOR_ERROR, k as type, m as Locator, n as isExtensionExposed, nt as fetchPermission, o as PermissionRequest, ot as assertForgeableHeaders, p as GotoOptions, q as SiteCookie, r as setMissingExtensionHandler, rt as isBlockedFetchUrl, s as permissions, st as assertOneCookieIdentity, tt as fetchLocalPermission, u as AttachFrameOptions, v as assertAttachableFrameUrl, w as VideoElementState, x as handleRevivableModules, y as assertLockdownApplicable, z as OperationRequest } from "./index-
|
|
4
|
-
import { n as cloud_d_exports } from "./cloud
|
|
3
|
+
import { A as LOCATOR_DENIED, B as SelectorPart, C as RemoteVideoElement, D as isType, E as createVideoElementHandle, F as isTerminalError, G as setRequestHeaderRule, H as RequestHeaderRule, I as Executor, J as cookies, K as CookieDetails, L as Gate, M as LOCATOR_UNSUPPORTED, N as isLocatorDenied, O as revive, P as isLocatorUnsupported, Q as assertFetchableUrl, R as GateTools, S as BoxedVideoElement, T as box, U as modifyRequestHeadersPermission, V as HeaderOperation, W as removeRequestHeaderRule, X as FetchInit, Y as readCookiePermission, Z as ProxyFetchRequest, _ as gotoPermission, a as PermissionGrant, at as FORGEABLE_HEADERS, b as isBlockedFrameUrl, c as ATTACH_FRAME_EVENT_KEY, ct as hasForgedCookie, d as Frame, et as fetchCredentialedPermission, f as FrameBackend, g as createFrame, h as attachFramePermission, i as waitForExtensionExposure, it as isLocalNetworkUrl, j as LOCATOR_ERROR, k as type, m as Locator, n as isExtensionExposed, nt as fetchPermission, o as PermissionRequest, ot as assertForgeableHeaders, p as GotoOptions, q as SiteCookie, r as setMissingExtensionHandler, rt as isBlockedFetchUrl, s as permissions, st as assertOneCookieIdentity, tt as fetchLocalPermission, u as AttachFrameOptions, v as assertAttachableFrameUrl, w as VideoElementState, x as handleRevivableModules, y as assertLockdownApplicable, z as OperationRequest } from "./index-DLaonjpx.js";
|
|
4
|
+
import { n as cloud_d_exports } from "./cloud--8SYg1so.js";
|
|
5
5
|
import { t as dns_d_exports } from "./dns.js";
|
|
6
|
-
import { s as net_d_exports } from "./net-
|
|
6
|
+
import { s as net_d_exports } from "./net-BnGcJpUb.js";
|
|
7
7
|
import { t as dgram_d_exports } from "./dgram.js";
|
|
8
8
|
import { t as http_d_exports } from "./http.js";
|
|
9
9
|
import { t as desktop_d_exports } from "./desktop.js";
|
|
10
|
-
import { i as promptInstall, n as fetch, t as extension_d_exports } from "./extension-
|
|
10
|
+
import { i as promptInstall, n as fetch, t as extension_d_exports } from "./extension-CN9oFZ0Q.js";
|
|
11
11
|
import { u as index_d_exports } from "./index-BIZeEsNu.js";
|
|
12
12
|
import { t as index_d_exports$1 } from "./opfs.js";
|
|
13
13
|
import { t as connectButtonUrl } from "./connect-button-D8KXSL6s.js";
|