@fkn/lib 0.9.19 → 0.9.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { a as StorageQuota, i as StorageEntry, o as StorageReadResult, r as SealedGeneration, s as WriteData, t as KeyState } from "./storage-qxXFLgTM.js";
2
- import { A as InstallOptions, D as MountDescriptor, F as PackagesFail, I as PickOptions, L as Placement, M as PackageQuery, N as PackageResult, O as Caller, j as InstalledPackage, k as ConnectOptions } from "./packages-vX-1yfRK.js";
2
+ import { A as InstalledPackage, D as MountDescriptor, F as PickOptions, I as Placement, M as PackageResult, O as ConnectOptions, P as PackagesFail, j as PackageQuery, k as InstallOptions, z as Caller } from "./packages-Cn8S-Hkn.js";
3
3
  import { t as AddressLookupResult } from "./lookup-BtwWaCZJ.js";
4
4
  //#region src/api/connect-store.d.ts
5
5
  type ConnectAvailability = 'connected' | 'disconnected' | 'unknown';
@@ -401,6 +401,27 @@ type HiddenSurface = {
401
401
  level: DisplayLevel;
402
402
  };
403
403
  //#endregion
404
+ //#region src/api/frame-consent-store.d.ts
405
+ /**
406
+ * Session-lifetime consent for cloud `frame.fetch`, stored per (app, scope, host).
407
+ *
408
+ * sessionStorage on purpose, and no 'always' tier at all: a standing grant with no surface that
409
+ * shows and revokes it would recreate the extension path's invisible-deny defect over here. The
410
+ * persistent tier arrives WITH the identity bar, which is the surface built to carry it. Rows die
411
+ * with the tab, and 'once' answers are never written anywhere.
412
+ *
413
+ * Denies are not stored either: a refusal is answered by the card's cooldown (prompt-gate), not by
414
+ * silent state the user cannot see. The failure direction of a missing row is therefore 'ask
415
+ * again', never 'allow'.
416
+ */
417
+ type FrameFetchScope = 'frame.fetchRead' | 'frame.fetchWrite';
418
+ //#endregion
419
+ //#region src/api/frame-consent.d.ts
420
+ type FrameConsentRequest = {
421
+ scope: FrameFetchScope;
422
+ hosts: string[];
423
+ };
424
+ //#endregion
404
425
  //#region src/api/quota.d.ts
405
426
  type Quota = {
406
427
  overQuota: boolean;
@@ -419,35 +440,8 @@ type Account = {
419
440
  premiumUntil: string | null;
420
441
  };
421
442
  //#endregion
422
- //#region src/api/usage-meter.d.ts
423
- type UsageMetric = 'webvpnUp' | 'webvpnDown' | 'proxyDown' | 'proxyRequests' | 'storageUp' | 'storageDown';
424
- type UsageAdd = {
425
- metric: UsageMetric;
426
- amount: number;
427
- };
428
- type UsageBucket = {
429
- key: string;
430
- metrics: Partial<Record<UsageMetric, number>>;
431
- };
432
- type UsageSnapshot = {
433
- epoch: string;
434
- minutes: UsageBucket[];
435
- hours: UsageBucket[];
436
- days: UsageBucket[];
437
- };
438
- //#endregion
439
443
  //#region src/api/data-plane.d.ts
440
444
  declare const dataPlane: {
441
- usage: {
442
- report: (scopeKey: string, adds: UsageAdd[]) => Promise<void>;
443
- read: (scopeKey: string) => Promise<UsageSnapshot>;
444
- scopes: () => Promise<string[]>;
445
- rates: () => Promise<{
446
- up: number;
447
- down: number;
448
- }>;
449
- suppress: (scopeKey: string) => Promise<void>;
450
- };
451
445
  cloud: {
452
446
  fetch: (input: string | Request | URL, init?: (RequestInit | undefined) & {
453
447
  render?: boolean;
@@ -471,25 +465,21 @@ declare const dataPlane: {
471
465
  webvpn: {
472
466
  tcpSocket: ({
473
467
  remoteAddress: _remoteAddress,
474
- remotePort,
475
- usageTag
468
+ remotePort
476
469
  }: {
477
470
  remoteAddress: string;
478
471
  remotePort: number;
479
- usageTag?: string;
480
472
  }) => Promise<LocalTcpSocket>;
481
473
  tcpSocketListener: ({
482
474
  localAddress: _localAddress,
483
475
  localPort,
484
476
  onConnection,
485
- onClose,
486
- usageTag
477
+ onClose
487
478
  }: {
488
479
  localAddress: string;
489
480
  localPort: number;
490
481
  onConnection: (connection: TcpSocketResult) => void | Promise<void>;
491
482
  onClose?: (error?: Error) => void | Promise<void>;
492
- usageTag?: string;
493
483
  }) => Promise<{
494
484
  localAddress: string;
495
485
  localFamily: "IPv4" | "IPv6";
@@ -500,14 +490,12 @@ declare const dataPlane: {
500
490
  type,
501
491
  port,
502
492
  address,
503
- dataPort,
504
- usageTag
493
+ dataPort
505
494
  }: {
506
495
  type: 'udp4' | 'udp6';
507
496
  port: number;
508
497
  address: string;
509
498
  dataPort?: boolean;
510
- usageTag?: string;
511
499
  }) => Promise<{
512
500
  socketId: number;
513
501
  dataPort: MessagePort | undefined;
@@ -660,6 +648,9 @@ declare const makeResolvers: (callerOf: () => Caller | undefined, ownsOverlay?:
660
648
  readonly show: (reason?: string) => Promise<void>;
661
649
  readonly hide: () => void;
662
650
  };
651
+ readonly frameConsent: {
652
+ readonly ensure: (request: FrameConsentRequest) => Promise<boolean>;
653
+ };
663
654
  readonly connect: {
664
655
  readonly prompt: (consumerOrigin: string) => Promise<boolean>;
665
656
  };
package/cloud/fetch.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as cloudFetch } from "../proxy-7ib45Uo-.js";
1
+ import { t as cloudFetch } from "../proxy-RU8sbq68.js";
2
2
  export { cloudFetch as fetch };
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-l7JVHsIR.js";
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-ByL9yG7X.js";
2
2
  export { Server, Socket, _default, _default as default, connect, createConnection, createServer, isIP, isIPv4, isIPv6 };
@@ -0,0 +1 @@
1
+ const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-DbiVHPXE.cjs"),n=require("./api-kHMHDGar.cjs"),r=require("./proxy-B0gNjT8-.cjs"),i=require("./dns.cjs"),a=require("./cloud/fs.cjs"),o=require("./net-COzDDBnS.cjs"),s=require("./dgram-D2Or5f2e.cjs"),c=require("./http.cjs");let l=require("osra");var u={scope:`frame.fetchRead`,category:`network`,severity:3,unsafe:!0,title:`Read your account data on this site`,description:`Lets the app read pages and data from this site as you, using the session in the frame.`},d={scope:`frame.fetchWrite`,category:`network`,severity:3,unsafe:!0,title:`Change your account data on this site`,description:`Lets the app send changes to this site as you, using the session in the frame.`},f=new Set([`GET`,`HEAD`,`OPTIONS`]),p=(e,t)=>f.has((t?.method??`GET`).toUpperCase())?u:d,m=e=>{let t=[];for(let n of e){let e=n.trim().toLowerCase();!e||e.length>253||/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/.test(e)&&(t.includes(e)||t.push(e))}return t},h=(e,t)=>{if(!e.session)return{kind:`refuse`,reason:`frame.fetch on the cloud backend needs its own session: attach with syncCookies: false`};if(typeof t!=`string`)return{kind:`refuse`,reason:`frame.fetch: url must be a string`};let n;try{n=new URL(t)}catch{return{kind:`refuse`,reason:`frame.fetch on the cloud backend needs an absolute url`}}if(n.protocol!==`https:`&&n.protocol!==`http:`)return{kind:`refuse`,reason:`frame.fetch: only http(s) urls are supported`};if(!(e.declaredHosts.includes(n.hostname)||e.approvedOrigins.has(n.origin)))return{kind:`refuse`,reason:`frame.fetch: the target is outside the origins this attachment declared`};let r=e.declaredHosts.length?e.declaredHosts:[n.hostname];return{kind:`consent`,targetHost:n.hostname,promptHosts:r}},g=e=>e,_=`autoplay; fullscreen; encrypted-media; picture-in-picture; clipboard-read; clipboard-write`,v=2e4,y=65e3,b=3e4,x=5e3,S=new Set([]),C=()=>`https://fkn.app`,w=e=>!e||e===`about:blank`,T=e=>e?``:`incognito-${crypto.randomUUID()}`,E=({target:e,session:t,domains:n})=>{let r=new URL(`/attach-frame`,C());return e&&r.searchParams.set(`url`,e),t&&r.searchParams.set(`session`,t),n.length&&r.searchParams.set(`domains`,n.join(`,`)),r.href},D=(e,t,n)=>{let r,i=new Promise((e,i)=>{r=setTimeout(()=>i(Error(n)),t)});return Promise.race([e,i]).finally(()=>clearTimeout(r))},O=(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())},k=()=>Object.assign(Error(`cloud.attachFrame: the attached iframe left the document or was reloaded; attach a fresh iframe`),{name:t.m}),A=(e,t)=>{let n=[...e.split(`;`),...t.split(`;`)].map(e=>e.trim()).filter(Boolean);return[...new Set(n)].join(`; `)},j=[300,1200,4e3],M=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 j)setTimeout(t,e)},N=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`)},P=async({iframe:e,domains:r=[],syncCookies:i=!0,lockdown:a=!1})=>{if(typeof window>`u`)throw Error(`cloud.attachFrame needs a window realm`);if(a)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`);N(e);let o=e.getAttribute(`src`)??``,s=(()=>{if(w(o))return null;try{return new URL(e.src||o,location.href)}catch{throw Error(`cloud.attachFrame: the iframe src is not a valid URL: ${o}`)}})();if(s){let e=new URL(`/attach-frame`,C());if(s.origin===e.origin&&s.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 c=s?.href??``;c&&t.s(c);let u=c,d=T(i),f=m(r),j=new Set;try{j.add(new URL(c).origin)}catch{}let P=new AbortController,F=e.referrerPolicy,I=e.allow;if(e.referrerPolicy=`origin`,e.allow=A(_,e.allow),e.src=E({target:c,session:d,domains:f}),!e.contentWindow)throw Error(`cloud.attachFrame: the iframe window is not available`);try{let r=await D((0,l.expose)({},{key:`fkn-attach-frame`,origin:C(),transport:{receive:window,emit:e.contentWindow},unregisterSignal:P.signal,revivableModules:g(t.R)}),v,`cloud.attachFrame: timed out connecting to the render proxy page`);await D(r.ready(),y,`cloud.attachFrame: the render proxy never became ready`),c&&M(e),O(e,()=>P.abort());let i=e.contentWindow,a=()=>{if(!(!P.signal.aborted&&e.isConnected&&e.contentWindow===i))throw P.abort(),k()};return t.a({executor:{execute:(e,n,i)=>S.has(n)?Promise.reject(t.f(n,`cloud`)):(a(),r.executeLocator(e,n,i)),highlight:async()=>{}},gate:async e=>{if(e.operation!==`fetch`)return;let r=h({session:d,declaredHosts:f,approvedOrigins:j},e.args[0]);if(r.kind===`refuse`)throw t._(r.reason,`fetch`);if(!await(await n.t).frameConsent.ensure({scope:p(e.args[0],e.args[1]).scope,hosts:r.promptHosts}))throw t._(`frame.fetch: the user did not grant this`,`fetch`)},goto:async(t,n={})=>{let i=new URL(t,location.href).href;a();let{timeoutMs:o}=n;await D(r.goto(i,n),(o??b)+x,`cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded`),u=i;try{j.add(new URL(i).origin)}catch{}M(e)},url:()=>u})}catch(t){throw P.abort(),e.referrerPolicy=F,e.allow=I,e.src=c||`about:blank`,t}},F=()=>typeof window<`u`&&!0,I=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}},L=e.t({attachFrame:()=>P,available:()=>R,dgram:()=>s.i,dns:()=>i.t,fetch:()=>r.t,fs:()=>a.t,http:()=>c.t,net:()=>o.s,quota:()=>I}),R=()=>n.r;Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return R}});
@@ -1,8 +1,8 @@
1
- import { t as cloudFetch } from "./proxy-7ib45Uo-.js";
2
- import { d as Frame, u as AttachFrameOptions } from "./index-DLaonjpx.js";
1
+ import { t as cloudFetch } from "./proxy-RU8sbq68.js";
2
+ import { d as Frame, u as AttachFrameOptions } from "./index-DY8WjklJ.js";
3
3
  import { t as dns_d_exports } from "./dns.js";
4
4
  import { n as fs_d_exports } from "./fs-CUmugp10.js";
5
- import { s as net_d_exports } from "./net-l7JVHsIR.js";
5
+ import { s as net_d_exports } from "./net-ByL9yG7X.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,209 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { R as t, _ as n, a as r, f as i, m as a, s as o } from "./lib-k3lstfa4.js";
3
+ import { r as s, t as c } from "./api-DQ-V4Lls.js";
4
+ import { t as l } from "./proxy-BpqvCJmA.js";
5
+ import { t as u } from "./dns.js";
6
+ import { t as d } from "./cloud/fs.js";
7
+ import { s as f } from "./net-BbmQeMpt.js";
8
+ import { i as p } from "./dgram-DlGl_ho1.js";
9
+ import { t as m } from "./http.js";
10
+ import { expose as h } from "osra";
11
+ //#region node_modules/@mfkn/web-extension/lib/lib/locator-permissions.js
12
+ var g = {
13
+ scope: "frame.fetchRead",
14
+ category: "network",
15
+ severity: 3,
16
+ unsafe: !0,
17
+ title: "Read your account data on this site",
18
+ description: "Lets the app read pages and data from this site as you, using the session in the frame."
19
+ }, _ = {
20
+ scope: "frame.fetchWrite",
21
+ category: "network",
22
+ severity: 3,
23
+ unsafe: !0,
24
+ title: "Change your account data on this site",
25
+ description: "Lets the app send changes to this site as you, using the session in the frame."
26
+ }, v = /* @__PURE__ */ new Set([
27
+ "GET",
28
+ "HEAD",
29
+ "OPTIONS"
30
+ ]), y = (e, t) => v.has((t?.method ?? "GET").toUpperCase()) ? g : _, b = (e) => {
31
+ let t = [];
32
+ for (let n of e) {
33
+ let e = n.trim().toLowerCase();
34
+ !e || e.length > 253 || /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/.test(e) && (t.includes(e) || t.push(e));
35
+ }
36
+ return t;
37
+ }, x = (e, t) => {
38
+ if (!e.session) return {
39
+ kind: "refuse",
40
+ reason: "frame.fetch on the cloud backend needs its own session: attach with syncCookies: false"
41
+ };
42
+ if (typeof t != "string") return {
43
+ kind: "refuse",
44
+ reason: "frame.fetch: url must be a string"
45
+ };
46
+ let n;
47
+ try {
48
+ n = new URL(t);
49
+ } catch {
50
+ return {
51
+ kind: "refuse",
52
+ reason: "frame.fetch on the cloud backend needs an absolute url"
53
+ };
54
+ }
55
+ if (n.protocol !== "https:" && n.protocol !== "http:") return {
56
+ kind: "refuse",
57
+ reason: "frame.fetch: only http(s) urls are supported"
58
+ };
59
+ if (!(e.declaredHosts.includes(n.hostname) || e.approvedOrigins.has(n.origin))) return {
60
+ kind: "refuse",
61
+ reason: "frame.fetch: the target is outside the origins this attachment declared"
62
+ };
63
+ let r = e.declaredHosts.length ? e.declaredHosts : [n.hostname];
64
+ return {
65
+ kind: "consent",
66
+ targetHost: n.hostname,
67
+ promptHosts: r
68
+ };
69
+ }, S = (e) => e, C = "autoplay; fullscreen; encrypted-media; picture-in-picture; clipboard-read; clipboard-write", w = 2e4, T = 65e3, E = 3e4, D = 5e3, O = /* @__PURE__ */ new Set([]), k = () => "https://fkn.app", A = (e) => !e || e === "about:blank", j = (e) => e ? "" : `incognito-${crypto.randomUUID()}`, M = ({ target: e, session: t, domains: n }) => {
70
+ let r = new URL("/attach-frame", k());
71
+ return e && r.searchParams.set("url", e), t && r.searchParams.set("session", t), n.length && r.searchParams.set("domains", n.join(",")), r.href;
72
+ }, N = (e, t, n) => {
73
+ let r, i = new Promise((e, i) => {
74
+ r = setTimeout(() => i(Error(n)), t);
75
+ });
76
+ return Promise.race([e, i]).finally(() => clearTimeout(r));
77
+ }, P = (e, t) => {
78
+ let n = () => {
79
+ a(), t();
80
+ }, r = e.parentNode, i = new MutationObserver(() => {
81
+ (!e.isConnected || e.parentNode !== r) && (a(), t());
82
+ }), a = () => {
83
+ window.removeEventListener("pagehide", n), i.disconnect();
84
+ };
85
+ window.addEventListener("pagehide", n, { once: !0 }), r && i.observe(r, { childList: !0 }), e.isConnected || (a(), t());
86
+ }, F = () => Object.assign(/* @__PURE__ */ Error("cloud.attachFrame: the attached iframe left the document or was reloaded; attach a fresh iframe"), { name: a }), I = (e, t) => {
87
+ let n = [...e.split(";"), ...t.split(";")].map((e) => e.trim()).filter(Boolean);
88
+ return [...new Set(n)].join("; ");
89
+ }, L = [
90
+ 300,
91
+ 1200,
92
+ 4e3
93
+ ], R = (e) => {
94
+ let t = () => {
95
+ if (!e.isConnected) return;
96
+ let t = e.style.height, n = e.getBoundingClientRect();
97
+ n.height && (e.style.height = `${n.height - 1}px`, setTimeout(() => {
98
+ e.style.height = t;
99
+ }, 50));
100
+ };
101
+ t();
102
+ for (let e of L) setTimeout(t, e);
103
+ }, z = (e) => {
104
+ let t = e.getAttribute("sandbox");
105
+ if (t === null) return;
106
+ let n = new Set(t.toLowerCase().split(/\s+/).filter(Boolean)), r = ["allow-scripts", "allow-same-origin"].filter((e) => !n.has(e));
107
+ if (r.length) throw Error(`cloud.attachFrame: the iframe's sandbox attribute must include ${r.join(" and ")} for the render proxy to load`);
108
+ }, B = async ({ iframe: e, domains: a = [], syncCookies: s = !0, lockdown: l = !1 }) => {
109
+ if (typeof window > "u") throw Error("cloud.attachFrame needs a window realm");
110
+ if (l) throw Error("cloud.attachFrame does not support lockdown; use the extension backend for a sealed frame");
111
+ if (!e.isConnected) throw Error("cloud.attachFrame: the iframe must be connected to the document before attaching");
112
+ z(e);
113
+ let u = e.getAttribute("src") ?? "", d = (() => {
114
+ if (A(u)) return null;
115
+ try {
116
+ return new URL(e.src || u, location.href);
117
+ } catch {
118
+ throw Error(`cloud.attachFrame: the iframe src is not a valid URL: ${u}`);
119
+ }
120
+ })();
121
+ if (d) {
122
+ let e = new URL("/attach-frame", k());
123
+ if (d.origin === e.origin && d.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");
124
+ }
125
+ let f = d?.href ?? "";
126
+ f && o(f);
127
+ let p = f, m = j(s), g = b(a), _ = /* @__PURE__ */ new Set();
128
+ try {
129
+ _.add(new URL(f).origin);
130
+ } catch {}
131
+ let v = new AbortController(), L = e.referrerPolicy, B = e.allow;
132
+ if (e.referrerPolicy = "origin", e.allow = I(C, e.allow), e.src = M({
133
+ target: f,
134
+ session: m,
135
+ domains: g
136
+ }), !e.contentWindow) throw Error("cloud.attachFrame: the iframe window is not available");
137
+ try {
138
+ let a = await N(h({}, {
139
+ key: "fkn-attach-frame",
140
+ origin: k(),
141
+ transport: {
142
+ receive: window,
143
+ emit: e.contentWindow
144
+ },
145
+ unregisterSignal: v.signal,
146
+ revivableModules: S(t)
147
+ }), w, "cloud.attachFrame: timed out connecting to the render proxy page");
148
+ await N(a.ready(), T, "cloud.attachFrame: the render proxy never became ready"), f && R(e), P(e, () => v.abort());
149
+ let o = e.contentWindow, s = () => {
150
+ if (!(!v.signal.aborted && e.isConnected && e.contentWindow === o)) throw v.abort(), F();
151
+ };
152
+ return r({
153
+ executor: {
154
+ execute: (e, t, n) => O.has(t) ? Promise.reject(i(t, "cloud")) : (s(), a.executeLocator(e, t, n)),
155
+ highlight: async () => {}
156
+ },
157
+ gate: async (e) => {
158
+ if (e.operation !== "fetch") return;
159
+ let t = x({
160
+ session: m,
161
+ declaredHosts: g,
162
+ approvedOrigins: _
163
+ }, e.args[0]);
164
+ if (t.kind === "refuse") throw n(t.reason, "fetch");
165
+ if (!await (await c).frameConsent.ensure({
166
+ scope: y(e.args[0], e.args[1]).scope,
167
+ hosts: t.promptHosts
168
+ })) throw n("frame.fetch: the user did not grant this", "fetch");
169
+ },
170
+ goto: async (t, n = {}) => {
171
+ let r = new URL(t, location.href).href;
172
+ s();
173
+ let { timeoutMs: i } = n;
174
+ await N(a.goto(r, n), (i ?? E) + D, "cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded"), p = r;
175
+ try {
176
+ _.add(new URL(r).origin);
177
+ } catch {}
178
+ R(e);
179
+ },
180
+ url: () => p
181
+ });
182
+ } catch (t) {
183
+ throw v.abort(), e.referrerPolicy = L, e.allow = B, e.src = f || "about:blank", t;
184
+ }
185
+ }, V = () => typeof window < "u" && !0, H = async () => {
186
+ let e = await c.then((e) => e.cloud.quota());
187
+ return {
188
+ premium: e.premium,
189
+ overQuota: e.overQuota,
190
+ throttled: e.overQuota && !e.premium,
191
+ usedBytes: e.usedBytes,
192
+ limitBytes: e.limitBytes,
193
+ remainingBytes: e.remaining,
194
+ bytesPerSecond: e.bytesPerSecond,
195
+ bitsPerSecond: e.bytesPerSecond * 8
196
+ };
197
+ }, U = /* @__PURE__ */ e({
198
+ attachFrame: () => B,
199
+ available: () => W,
200
+ dgram: () => p,
201
+ dns: () => u,
202
+ fetch: () => l,
203
+ fs: () => d,
204
+ http: () => m,
205
+ net: () => f,
206
+ quota: () => H
207
+ }), W = () => s;
208
+ //#endregion
209
+ export { V as a, B as i, U as n, H as r, W as t };
package/cloud.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./proxy-B0gNjT8-.cjs"),t=require("./cloud-BQoppUw4.cjs"),n=require("./dns.cjs"),r=require("./cloud/fs.cjs"),i=require("./net-COzDDBnS.cjs"),a=require("./dgram-D2Or5f2e.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;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./proxy-B0gNjT8-.cjs"),t=require("./cloud-C8jfO0iJ.cjs"),n=require("./dns.cjs"),r=require("./cloud/fs.cjs"),i=require("./net-COzDDBnS.cjs"),a=require("./dgram-D2Or5f2e.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
- import { t as cloudFetch } from "./proxy-7ib45Uo-.js";
2
- import { a as attachFrame, i as quota, r as QuotaStatus, t as available } from "./cloud-uE4g-WqI.js";
1
+ import { t as cloudFetch } from "./proxy-RU8sbq68.js";
2
+ import { a as attachFrame, i as quota, r as QuotaStatus, t as available } from "./cloud-CQVtRvcI.js";
3
3
  import { t as dns_d_exports } from "./dns.js";
4
4
  import { n as fs_d_exports } from "./fs-CUmugp10.js";
5
- import { s as net_d_exports } from "./net-l7JVHsIR.js";
5
+ import { s as net_d_exports } from "./net-ByL9yG7X.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,5 +1,5 @@
1
1
  import { t as e } from "./proxy-BpqvCJmA.js";
2
- import { i as t, r as n, t as r } from "./cloud-C8CeqUht.js";
2
+ import { i as t, r as n, t as r } from "./cloud-C_1Dt_tR.js";
3
3
  import { t as i } from "./dns.js";
4
4
  import { t as a } from "./cloud/fs.js";
5
5
  import { s as o } from "./net-BbmQeMpt.js";
package/dgram.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as UdpSocketOption, t as Resolvers } from "./api-DnO1DsJC.js";
1
+ import { n as UdpSocketOption, t as Resolvers } from "./api-CyWF0RUj.js";
2
2
  import { Buffer } from "buffer";
3
3
  import { AddressInfo } from "net";
4
4
  import { EventEmitter } from "events";
@@ -0,0 +1 @@
1
+ const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-DbiVHPXE.cjs"),n=require("./api-kHMHDGar.cjs"),r=require("./proxy-B0gNjT8-.cjs"),i=require("./desktop.cjs");var a=async e=>{if(typeof window>`u`)return!1;if(t.F())return!0;let r=await n.t,i=null,a=new Promise(e=>{i=()=>{t.F()&&e(!0)},t.P.addEventListener(`statuschange`,i)}),o=r.installPrompt.show(e).then(()=>!1),s=await Promise.race([a,o]);return i&&t.P.removeEventListener(`statuschange`,i),await r.installPrompt.hide().catch(()=>{}),s},o=null;t.I(()=>(o||=a().then(()=>void 0).finally(()=>{o=null}),o));var s=()=>typeof document<`u`&&t.F(),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.w(e,n)}return s()?t.w(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.A,LOCATOR_DENIED:()=>t.h,LOCATOR_ERROR:()=>t.g,LOCATOR_UNSUPPORTED:()=>t.m,assertAttachableFrameUrl:()=>t.s,assertFetchableUrl:()=>t.C,assertForgeableHeaders:()=>t.j,assertLockdownApplicable:()=>t.c,assertOneCookieIdentity:()=>t.M,attachFrame:()=>t.r,attachFramePermission:()=>t.i,available:()=>s,box:()=>t.z,cookies:()=>t.x,createFrame:()=>t.a,createVideoElementHandle:()=>t.B,events:()=>t.P,extension:()=>t.P,fetch:()=>t.w,fetchCredentialedPermission:()=>t.T,fetchLocalPermission:()=>t.E,fetchPermission:()=>t.D,gotoPermission:()=>t.o,handleRevivableModules:()=>t.R,hasForgedCookie:()=>t.N,isBlockedFetchUrl:()=>t.O,isBlockedFrameUrl:()=>t.l,isExtensionExposed:()=>t.F,isLocalNetworkUrl:()=>t.k,isLocatorDenied:()=>t.p,isLocatorUnsupported:()=>t.u,isTerminalError:()=>t.d,isType:()=>t.V,modifyRequestHeadersPermission:()=>t.v,permissions:()=>t.t,promptInstall:()=>a,readCookiePermission:()=>t.S,removeRequestHeaderRule:()=>t.y,revive:()=>t.H,setMissingExtensionHandler:()=>t.I,setRequestHeaderRule:()=>t.b,type:()=>t.U,waitForExtensionExposure:()=>t.L});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}});
@@ -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-DLaonjpx.js";
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-DY8WjklJ.js";
2
2
 
3
3
  //#region src/lib/extension-prompt.d.ts
4
4
  declare const promptInstall: (reason?: string) => Promise<boolean>;
@@ -1,78 +1,78 @@
1
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";
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, U as _, V 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-k3lstfa4.js";
3
3
  import { t as H } from "./api-DQ-V4Lls.js";
4
4
  import { n as U, t as W } from "./proxy-BpqvCJmA.js";
5
5
  import { available as G, fetch as K } from "./desktop.js";
6
6
  //#region src/lib/extension-prompt.ts
7
7
  var q = async (e) => {
8
8
  if (typeof window > "u") return !1;
9
- if (p()) return !0;
9
+ if (o()) return !0;
10
10
  let t = await H, n = null, r = new Promise((e) => {
11
11
  n = () => {
12
- p() && e(!0);
13
- }, d.addEventListener("statuschange", n);
12
+ o() && e(!0);
13
+ }, p.addEventListener("statuschange", n);
14
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;
15
+ return n && p.removeEventListener("statuschange", n), await t.installPrompt.hide().catch(() => {}), a;
16
16
  }, J = null;
17
- o(() => (J ||= q().then(() => void 0).finally(() => {
17
+ c(() => (J ||= q().then(() => void 0).finally(() => {
18
18
  J = null;
19
19
  }), J));
20
20
  //#endregion
21
21
  //#region src/lib/auto.ts
22
- var Y = () => typeof document < "u" && p(), X = async (e, t) => {
22
+ var Y = () => typeof document < "u" && o(), X = async (e, t) => {
23
23
  if (U(e), t?.credentials === "include") {
24
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);
25
+ return R(e, t);
26
26
  }
27
- return Y() ? r(e, {
27
+ return Y() ? R(e, {
28
28
  ...t,
29
29
  credentials: "omit"
30
30
  }) : G() ? K(e, t) : W(e, t);
31
31
  }, Z = /* @__PURE__ */ e({
32
32
  ATTACH_FRAME_EVENT_KEY: () => A,
33
- FORGEABLE_HEADERS: () => D,
34
- LOCATOR_DENIED: () => C,
35
- LOCATOR_ERROR: () => I,
36
- LOCATOR_UNSUPPORTED: () => w,
33
+ FORGEABLE_HEADERS: () => t,
34
+ LOCATOR_DENIED: () => w,
35
+ LOCATOR_ERROR: () => C,
36
+ LOCATOR_UNSUPPORTED: () => k,
37
37
  assertAttachableFrameUrl: () => P,
38
- assertFetchableUrl: () => h,
39
- assertForgeableHeaders: () => t,
38
+ assertFetchableUrl: () => r,
39
+ assertForgeableHeaders: () => E,
40
40
  assertLockdownApplicable: () => x,
41
- assertOneCookieIdentity: () => E,
41
+ assertOneCookieIdentity: () => u,
42
42
  attachFrame: () => N,
43
43
  attachFramePermission: () => T,
44
44
  available: () => Y,
45
- box: () => m,
46
- cookies: () => b,
45
+ box: () => V,
46
+ cookies: () => z,
47
47
  createFrame: () => y,
48
- createVideoElementHandle: () => V,
49
- events: () => d,
50
- extension: () => d,
51
- fetch: () => r,
52
- fetchCredentialedPermission: () => R,
53
- fetchLocalPermission: () => g,
54
- fetchPermission: () => a,
48
+ createVideoElementHandle: () => n,
49
+ events: () => p,
50
+ extension: () => p,
51
+ fetch: () => R,
52
+ fetchCredentialedPermission: () => g,
53
+ fetchLocalPermission: () => a,
54
+ fetchPermission: () => i,
55
55
  gotoPermission: () => j,
56
- handleRevivableModules: () => l,
57
- hasForgedCookie: () => u,
58
- isBlockedFetchUrl: () => i,
56
+ handleRevivableModules: () => m,
57
+ hasForgedCookie: () => d,
58
+ isBlockedFetchUrl: () => f,
59
59
  isBlockedFrameUrl: () => O,
60
- isExtensionExposed: () => p,
61
- isLocalNetworkUrl: () => f,
62
- isLocatorDenied: () => S,
63
- isLocatorUnsupported: () => k,
64
- isTerminalError: () => M,
65
- isType: () => n,
66
- modifyRequestHeadersPermission: () => v,
60
+ isExtensionExposed: () => o,
61
+ isLocalNetworkUrl: () => D,
62
+ isLocatorDenied: () => M,
63
+ isLocatorUnsupported: () => I,
64
+ isTerminalError: () => S,
65
+ isType: () => v,
66
+ modifyRequestHeadersPermission: () => L,
67
67
  permissions: () => F,
68
68
  promptInstall: () => q,
69
- readCookiePermission: () => z,
70
- removeRequestHeaderRule: () => L,
71
- revive: () => _,
72
- setMissingExtensionHandler: () => o,
73
- setRequestHeaderRule: () => B,
74
- type: () => s,
75
- waitForExtensionExposure: () => c
69
+ readCookiePermission: () => h,
70
+ removeRequestHeaderRule: () => B,
71
+ revive: () => s,
72
+ setMissingExtensionHandler: () => c,
73
+ setRequestHeaderRule: () => b,
74
+ type: () => _,
75
+ waitForExtensionExposure: () => l
76
76
  });
77
77
  //#endregion
78
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-ulyxIbTr.cjs"),t=require("./extension-4BM5hKrn.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;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-DbiVHPXE.cjs"),t=require("./extension-B3nD2u7c.cjs");exports.ATTACH_FRAME_EVENT_KEY=e.n,exports.FORGEABLE_HEADERS=e.A,exports.LOCATOR_DENIED=e.h,exports.LOCATOR_ERROR=e.g,exports.LOCATOR_UNSUPPORTED=e.m,exports.assertAttachableFrameUrl=e.s,exports.assertFetchableUrl=e.C,exports.assertForgeableHeaders=e.j,exports.assertLockdownApplicable=e.c,exports.assertOneCookieIdentity=e.M,exports.attachFrame=e.r,exports.attachFramePermission=e.i,exports.available=t.r,exports.box=e.z,exports.cookies=e.x,exports.createFrame=e.a,exports.createVideoElementHandle=e.B,exports.events=e.P,exports.extension=e.P,exports.fetch=e.w,exports.fetchCredentialedPermission=e.T,exports.fetchLocalPermission=e.E,exports.fetchPermission=e.D,exports.gotoPermission=e.o,exports.handleRevivableModules=e.R,exports.hasForgedCookie=e.N,exports.isBlockedFetchUrl=e.O,exports.isBlockedFrameUrl=e.l,exports.isExtensionExposed=e.F,exports.isLocalNetworkUrl=e.k,exports.isLocatorDenied=e.p,exports.isLocatorUnsupported=e.u,exports.isTerminalError=e.d,exports.isType=e.V,exports.modifyRequestHeadersPermission=e.v,exports.permissions=e.t,exports.promptInstall=t.i,exports.readCookiePermission=e.S,exports.removeRequestHeaderRule=e.y,exports.revive=e.H,exports.setMissingExtensionHandler=e.I,exports.setRequestHeaderRule=e.b,exports.type=e.U,exports.waitForExtensionExposure=e.L;
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-DLaonjpx.js";
2
- import { i as promptInstall, r as isExtensionAvailable } from "./extension-CN9oFZ0Q.js";
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-DY8WjklJ.js";
2
+ import { i as promptInstall, r as isExtensionAvailable } from "./extension-CMPZjuaV.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, 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-DVO10P3i.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 };
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, U as g, V as _, 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-k3lstfa4.js";
2
+ import { i as V, r as H } from "./extension-jRuNpBs3.js";
3
+ export { k as ATTACH_FRAME_EVENT_KEY, e as FORGEABLE_HEADERS, C as LOCATOR_DENIED, S as LOCATOR_ERROR, O as LOCATOR_UNSUPPORTED, N as assertAttachableFrameUrl, n as assertFetchableUrl, T as assertForgeableHeaders, b as assertLockdownApplicable, l as assertOneCookieIdentity, M as attachFrame, w as attachFramePermission, H as available, B as box, R as cookies, v as createFrame, t as createVideoElementHandle, f as events, f as extension, L as fetch, h as fetchCredentialedPermission, i as fetchLocalPermission, r as fetchPermission, A as gotoPermission, p as handleRevivableModules, u as hasForgedCookie, d as isBlockedFetchUrl, D as isBlockedFrameUrl, a as isExtensionExposed, E as isLocalNetworkUrl, j as isLocatorDenied, F as isLocatorUnsupported, x as isTerminalError, _ as isType, I as modifyRequestHeadersPermission, P as permissions, V as promptInstall, m as readCookiePermission, z as removeRequestHeaderRule, o as revive, s as setMissingExtensionHandler, y as setRequestHeaderRule, g as type, c as waitForExtensionExposure };
package/http.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as Socket, t as Server$1 } from "./net-l7JVHsIR.js";
1
+ import { n as Socket, t as Server$1 } from "./net-ByL9yG7X.js";
2
2
  import { Buffer } from "buffer";
3
3
  import { Stream } from "stream";
4
4
  import { IncomingHttpHeaders, OutgoingHttpHeaders, RequestOptions } from "http";