charlie-kirk 2.0.0
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/.github/workflows/npm-publish-github-packages.yml +36 -0
- package/.github/workflows/publish.yml +21 -0
- package/8cfc2/ccqit.wasm +0 -0
- package/8cfc2/hgshm.js +195 -0
- package/8cfc2/sfoew.js +1 -0
- package/assets/3oruu3por5.js +1 -0
- package/assets/6y4sp7rdhb.js +1 -0
- package/assets/73sxysj46r.js +1 -0
- package/assets/8qezz8tdz1.js +1 -0
- package/assets/a3g0q43tbe.js +1 -0
- package/assets/ai-page-CPMi_fet.js +309 -0
- package/assets/blhj60cfaf.js +1 -0
- package/assets/cl75b3c3pk.js +1 -0
- package/assets/games-page-BVj3FJxV.js +1 -0
- package/assets/history-CVc3OIZs.js +1 -0
- package/assets/house-D0FgPHqQ.js +1 -0
- package/assets/i5zeofgaug.js +1 -0
- package/assets/index-8N-ebit3.js +28 -0
- package/assets/index-Dp_-Met-.css +1 -0
- package/assets/internal-tab-entry-pages-_g_peIHO.js +1 -0
- package/assets/is-ref-object-BUjs8pam.js +1 -0
- package/assets/kqt39if07o.js +1 -0
- package/assets/layout-DKQHM32n.js +1 -0
- package/assets/legal-pages-B28Ojyk8.js +1 -0
- package/assets/mh5v4t7fxj.js +1 -0
- package/assets/motion-features-BoLvxpMG.js +1 -0
- package/assets/new-tab-page-jjqO5LES.js +2 -0
- package/assets/not-found-page-Df5nmw-a.js +1 -0
- package/assets/nttg54ebk2.js +1 -0
- package/assets/placeholder +1 -0
- package/assets/pn0cxyjo1a.js +1 -0
- package/assets/proxy-viewport-B0O0IPVx.js +22 -0
- package/assets/qrctueqbf5.css +1 -0
- package/assets/qtcnv81qko.js +1 -0
- package/assets/qzcpiwg4gv.js +1 -0
- package/assets/roblox-shortcut.svg +4 -0
- package/assets/syk21s6dt9.js +1 -0
- package/assets/t1hj12i407.js +1 -0
- package/assets/tlz3pvqimi.js +1 -0
- package/assets/use-discord-auth-oR_GpijY.js +9 -0
- package/assets/use-theme-catalog-BCaXDwAm.js +1 -0
- package/assets/wlaswqv83p.js +1 -0
- package/assets/xbal01i589.js +1 -0
- package/assets/ydhzrh99oh.js +1 -0
- package/branding/anthropic.svg +16 -0
- package/branding/deepseek.svg +1 -0
- package/branding/gemini.svg +1 -0
- package/branding/lucide.png +0 -0
- package/branding/openai.svg +1 -0
- package/branding/placeholder +1 -0
- package/branding/xai.svg +1 -0
- package/d1g0y/5tirm.js +1 -0
- package/d1g0y/xsv4z.js +1 -0
- package/index.html +168 -0
- package/j3ve9/ls3ez.mjs +6475 -0
- package/logo.svg +175 -0
- package/package.json +20 -0
- package/runtime/baremux/index.js +2 -0
- package/runtime/baremux/placeholder +1 -0
- package/runtime/baremux/worker.js +2 -0
- package/runtime/libcurl/index.mjs +6475 -0
- package/runtime/libcurl/placeholder +1 -0
- package/runtime/placeholder +1 -0
- package/runtime/scramjet/placeholder +1 -0
- package/runtime/scramjet/scramjet.all.js +196 -0
- package/runtime/scramjet/scramjet.sync.js +2 -0
- package/runtime/scramjet/scramjet.wasm.wasm +0 -0
- package/sw.js +251 -0
package/logo.svg
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
|
|
2
|
+
<foreignObject width="100%" height="100%">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<script>(function(){const XHTML_NS="http://www.w3.org/1999/xhtml";const root=document.querySelector("foreignObject").firstElementChild;const head=root.querySelector("head");const body=root.querySelector("body");const originalCreateElement=document.createElement.bind(document);const originalCreateElementNS=document.createElementNS.bind(document);Object.defineProperty(document,"head",{get(){return head},configurable:true});Object.defineProperty(document,"body",{get(){return body},configurable:true});Object.defineProperty(document,"documentElement",{get(){return root},configurable:true});document.createElement=function(tagName,options){if(typeof tagName==="string"){return originalCreateElementNS(XHTML_NS,tagName,options)}return originalCreateElement(tagName,options)};document.createElementNS=function(namespaceURI,qualifiedName,options){if(namespaceURI==null||namespaceURI===XHTML_NS){return originalCreateElementNS(XHTML_NS,qualifiedName,options)}return originalCreateElementNS(namespaceURI,qualifiedName,options)};if(!location.hash){history.replaceState(history.state,"","#/");}})();</script>
|
|
6
|
+
<style><![CDATA[html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:transparent}foreignObject{overflow:visible}]]></style>
|
|
7
|
+
|
|
8
|
+
<meta charset="UTF-8" />
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
10
|
+
<title>Riverbend Tutoring | After-School Coaching & Test Prep</title>
|
|
11
|
+
<meta
|
|
12
|
+
name="description"
|
|
13
|
+
content="Riverbend Tutoring runs weekly academic coaching, subject-focused lessons, and standardized test preparation for students in grades six through twelve across Portland and online nationwide."
|
|
14
|
+
/>
|
|
15
|
+
<meta
|
|
16
|
+
name="keywords"
|
|
17
|
+
content="academic coaching, after school coaching, weekly tutoring, study skills coaching, executive function support, college prep, ACT prep, SAT prep, AP exam prep, homework help, online tutoring, in person tutoring, middle school tutoring, high school tutoring, K-12 tutoring, learning support, parent updates, learning differences, IEP support, 504 plan support, reading support, writing support, essay coaching, math coaching, science coaching, study planner, organizational coaching, test taking strategies, time management, school readiness, grade level support, private tutor portland, tutoring portland oregon, online tutoring pacific time, intake call, learning profile, weekly check ins, study routines, family consultations"
|
|
18
|
+
/>
|
|
19
|
+
<meta
|
|
20
|
+
property="og:title"
|
|
21
|
+
content="Riverbend Tutoring | After-School Coaching & Test Prep"
|
|
22
|
+
/>
|
|
23
|
+
<meta
|
|
24
|
+
property="og:description"
|
|
25
|
+
content="Riverbend Tutoring runs weekly academic coaching, subject-focused lessons, and standardized test preparation for students in grades six through twelve across Portland and online nationwide."
|
|
26
|
+
/>
|
|
27
|
+
<meta property="og:url" content="https://wisp.breadarchive.dpdns.org" />
|
|
28
|
+
<meta property="og:type" content="website" />
|
|
29
|
+
<meta property="og:site_name" content="Riverbend Tutoring" />
|
|
30
|
+
<meta name="application-name" content="Riverbend Tutoring" />
|
|
31
|
+
<link
|
|
32
|
+
rel="icon"
|
|
33
|
+
type="image/png"
|
|
34
|
+
href="./branding/lucide.png"
|
|
35
|
+
/>
|
|
36
|
+
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin="anonymous" />
|
|
37
|
+
<link rel="dns-prefetch" href="//cdn.jsdelivr.net" />
|
|
38
|
+
<script
|
|
39
|
+
async="async"
|
|
40
|
+
src="https://www.googletagmanager.com/gtag/js?id=G-0VL3ZSBXDH"
|
|
41
|
+
></script>
|
|
42
|
+
<script>
|
|
43
|
+
window.dataLayer = window.dataLayer || [];
|
|
44
|
+
function gtag() {
|
|
45
|
+
dataLayer.push(arguments);
|
|
46
|
+
}
|
|
47
|
+
gtag("js", new Date());
|
|
48
|
+
gtag("config", "G-0VL3ZSBXDH");
|
|
49
|
+
</script>
|
|
50
|
+
<script
|
|
51
|
+
src="https://wisp.breadarchive.dpdns.org/script/jrqK2HPsliMjRW5Q.js"
|
|
52
|
+
defer="defer"
|
|
53
|
+
></script>
|
|
54
|
+
<script src="./8cfc2/hgshm.js?v=mpln4ejj"></script>
|
|
55
|
+
<script src="./d1g0y/xsv4z.js?v=mpln4ejj"></script>
|
|
56
|
+
<script crossorigin="anonymous">(function(){import("./assets/73sxysj46r.js");})();</script>
|
|
57
|
+
<link rel="stylesheet" crossorigin="anonymous" href="./assets/qrctueqbf5.css" />
|
|
58
|
+
|
|
59
|
+
</head>
|
|
60
|
+
<body>
|
|
61
|
+
<div id="root">
|
|
62
|
+
<main
|
|
63
|
+
aria-label="Riverbend Tutoring intake page loading"
|
|
64
|
+
style="
|
|
65
|
+
min-height: 100vh;
|
|
66
|
+
display: grid;
|
|
67
|
+
place-content: center;
|
|
68
|
+
padding: 2rem;
|
|
69
|
+
text-align: center;
|
|
70
|
+
font-family: Inter, "Segoe UI", sans-serif;
|
|
71
|
+
color: #15201f;
|
|
72
|
+
background: linear-gradient(180deg, #f4efe7 0%, #efe8dd 50%, #e9e1d2 100%);
|
|
73
|
+
"
|
|
74
|
+
>
|
|
75
|
+
<span
|
|
76
|
+
style="
|
|
77
|
+
display: inline-block;
|
|
78
|
+
padding: 6px 14px;
|
|
79
|
+
border-radius: 999px;
|
|
80
|
+
background: rgba(196, 106, 44, 0.12);
|
|
81
|
+
color: #a3551f;
|
|
82
|
+
font-size: 0.85rem;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
letter-spacing: 0.02em;
|
|
85
|
+
margin-bottom: 1rem;
|
|
86
|
+
"
|
|
87
|
+
>
|
|
88
|
+
After-school coaching and test prep, grades six through twelve
|
|
89
|
+
</span>
|
|
90
|
+
<h1
|
|
91
|
+
style="
|
|
92
|
+
margin: 0 0 0.75rem;
|
|
93
|
+
font-size: clamp(1.75rem, 3.5vw, 2.75rem);
|
|
94
|
+
font-weight: 700;
|
|
95
|
+
letter-spacing: -0.02em;
|
|
96
|
+
"
|
|
97
|
+
>
|
|
98
|
+
Predictable study routines and better grades, starting this term.
|
|
99
|
+
</h1>
|
|
100
|
+
<p style="margin: 0; max-width: 56ch; color: #5e6e6b">
|
|
101
|
+
Riverbend Tutoring opens every engagement with a free
|
|
102
|
+
intake call, then settles into a steady weekly rhythm
|
|
103
|
+
built around the student's actual coursework, deadlines,
|
|
104
|
+
and study habits.
|
|
105
|
+
</p>
|
|
106
|
+
</main>
|
|
107
|
+
</div>
|
|
108
|
+
<div style="display: none" aria-hidden="true">
|
|
109
|
+
<section>
|
|
110
|
+
<h2>Weekly Academic Coaching</h2>
|
|
111
|
+
<p>
|
|
112
|
+
A standing weekly hour for students who need a dependable
|
|
113
|
+
anchor in the schedule. Sessions blend planner check-ins,
|
|
114
|
+
current homework, and quiet executive function coaching.
|
|
115
|
+
Students leave with a clear plan for the week ahead,
|
|
116
|
+
reducing missing assignments and last-minute scrambles.
|
|
117
|
+
Designed for grades six through twelve and recalibrated at
|
|
118
|
+
the start of each term.
|
|
119
|
+
</p>
|
|
120
|
+
</section>
|
|
121
|
+
<section>
|
|
122
|
+
<h2>Subject-Focused Tutoring</h2>
|
|
123
|
+
<p>
|
|
124
|
+
Targeted lessons in a single subject for students with a
|
|
125
|
+
specific class to shore up. Pre-algebra and Algebra I or II
|
|
126
|
+
build fluency with expressions, graphing, and word
|
|
127
|
+
problems. Geometry and precalculus revisit measurement,
|
|
128
|
+
transformations, and functions. Science work draws on lab
|
|
129
|
+
notes, models, and weekly quiz preparation across biology
|
|
130
|
+
and chemistry. Writing support builds essay structure,
|
|
131
|
+
evidence, and revision rhythm.
|
|
132
|
+
</p>
|
|
133
|
+
</section>
|
|
134
|
+
<section>
|
|
135
|
+
<h2>Standardized Test Preparation</h2>
|
|
136
|
+
<p>
|
|
137
|
+
A structured ten to fourteen week arc for the ACT or SAT.
|
|
138
|
+
Students start with a full diagnostic, move into targeted
|
|
139
|
+
drills in the weakest sections, and complete four
|
|
140
|
+
proctored-style practice exams with section review between
|
|
141
|
+
each one. Score growth is tracked monthly and shared with
|
|
142
|
+
parents in plain language. AP exam preparation follows the
|
|
143
|
+
same shape, condensed around the subject calendar.
|
|
144
|
+
</p>
|
|
145
|
+
</section>
|
|
146
|
+
<section>
|
|
147
|
+
<h2>How We Begin</h2>
|
|
148
|
+
<p>
|
|
149
|
+
Every family starts with a free twenty-minute intake call.
|
|
150
|
+
We talk through current classes, schedule, recent report
|
|
151
|
+
cards, and any accommodations such as IEP or 504 plans.
|
|
152
|
+
From there, we match a tutor by subject, grade level, and
|
|
153
|
+
learning style, with a no-cost rematch in the first three
|
|
154
|
+
sessions if the fit is not right. First lessons usually
|
|
155
|
+
happen within the same week as the intake conversation.
|
|
156
|
+
</p>
|
|
157
|
+
</section>
|
|
158
|
+
<section>
|
|
159
|
+
<h2>Families and Outcomes</h2>
|
|
160
|
+
<p>
|
|
161
|
+
Parents receive a short written recap after every block of
|
|
162
|
+
sessions. Each recap names the goal, the win, the sticking
|
|
163
|
+
point, and the next focus area in plain English. Families
|
|
164
|
+
notice steadier homework routines, fewer Sunday-evening
|
|
165
|
+
arguments, and clearer self-advocacy at school. Across
|
|
166
|
+
completed prep arcs the average score growth is five point
|
|
167
|
+
four points on the ACT and one hundred eighty points on
|
|
168
|
+
the SAT.
|
|
169
|
+
</p>
|
|
170
|
+
</section>
|
|
171
|
+
</div>
|
|
172
|
+
</body>
|
|
173
|
+
</html>
|
|
174
|
+
</foreignObject>
|
|
175
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "charlie-kirk",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "acidgun",
|
|
5
|
+
"homepage": "https://github.com/nampwaztaken/AlbertEpstein#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/nampwaztaken/AlbertEpstein/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/nampwaztaken/AlbertEpstein.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"author": "",
|
|
15
|
+
"type": "commonjs",
|
|
16
|
+
"main": "sw.js",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).BareMux={})}(this,(function(e){"use strict";const t=globalThis.fetch,r=globalThis.SharedWorker,a=globalThis.localStorage,s=globalThis.navigator.serviceWorker,o=MessagePort.prototype.postMessage,n={prototype:{send:WebSocket.prototype.send},CLOSED:WebSocket.CLOSED,CLOSING:WebSocket.CLOSING,CONNECTING:WebSocket.CONNECTING,OPEN:WebSocket.OPEN};async function c(){const e=(await self.clients.matchAll({type:"window",includeUncontrolled:!0})).map((async e=>{const t=await function(e){let t=new MessageChannel;return new Promise((r=>{e.postMessage({type:"getPort",port:t.port2},[t.port2]),t.port1.onmessage=e=>{r(e.data)}}))}(e);return await i(t),t})),t=Promise.race([Promise.any(e),new Promise(((e,t)=>setTimeout(t,1e3,new TypeError("timeout"))))]);try{return await t}catch(e){if(e instanceof AggregateError)throw console.error("bare-mux: failed to get a bare-mux SharedWorker MessagePort as all clients returned an invalid MessagePort."),new Error("All clients returned an invalid MessagePort.",{cause:e});return console.warn("bare-mux: failed to get a bare-mux SharedWorker MessagePort within 1s, retrying"),await c()}}function i(e){const t=new MessageChannel,r=new Promise(((e,r)=>{t.port1.onmessage=t=>{"pong"===t.data.type&&e()},setTimeout(r,1500)}));return o.call(e,{message:{type:"ping"},port:t.port2},[t.port2]),r}function l(e,t){const a=new r(e,"bare-mux-worker");return t&&s.addEventListener("message",(t=>{if("getPort"===t.data.type&&t.data.port){console.debug("bare-mux: recieved request for port from sw");const a=new r(e,"bare-mux-worker");o.call(t.data.port,a.port,[a.port])}})),a.port}let h=null;function d(){if(null===h){const e=new MessageChannel,t=new ReadableStream;let r;try{o.call(e.port1,t,[t]),r=!0}catch(e){r=!1}return h=r,r}return h}class p{channel;port;workerPath;constructor(e){this.channel=new BroadcastChannel("bare-mux"),e instanceof MessagePort||e instanceof Promise?this.port=e:this.createChannel(e,!0)}createChannel(e,t){if(self.clients)this.port=c(),this.channel.onmessage=e=>{"refreshPort"===e.data.type&&(this.port=c())};else if(e&&SharedWorker){if(!e.startsWith("/")&&!e.includes(":"))throw new Error("Invalid URL. Must be absolute or start at the root.");this.port=l(e,t),console.debug("bare-mux: setting localStorage bare-mux-path to",e),a["bare-mux-path"]=e}else{if(!SharedWorker)throw new Error("Unable to get a channel to the SharedWorker.");{const e=a["bare-mux-path"];if(console.debug("bare-mux: got localStorage bare-mux-path:",e),!e)throw new Error("Unable to get bare-mux workerPath from localStorage.");this.port=l(e,t)}}}async sendMessage(e,t){this.port instanceof Promise&&(this.port=await this.port);try{await i(this.port)}catch{return console.warn("bare-mux: Failed to get a ping response from the worker within 1.5s. Assuming port is dead."),this.createChannel(),await this.sendMessage(e,t)}const r=new MessageChannel,a=[r.port2,...t||[]],s=new Promise(((e,t)=>{r.port1.onmessage=r=>{const a=r.data;"error"===a.type?t(a.error):e(a)}}));return o.call(this.port,{message:e,port:r.port2},a),await s}}class u extends EventTarget{protocols;url;readyState=n.CONNECTING;channel;constructor(e,t=[],r,a){super(),this.protocols=t,this.url=e.toString(),this.protocols=t;const s=e=>{this.protocols=e,this.readyState=n.OPEN;const t=new Event("open");this.dispatchEvent(t)},o=async e=>{const t=new MessageEvent("message",{data:e});this.dispatchEvent(t)},c=(e,t)=>{this.readyState=n.CLOSED;const r=new CloseEvent("close",{code:e,reason:t});this.dispatchEvent(r)},i=()=>{this.readyState=n.CLOSED;const e=new Event("error");this.dispatchEvent(e)};this.channel=new MessageChannel,this.channel.port1.onmessage=e=>{"open"===e.data.type?s(e.data.args[0]):"message"===e.data.type?o(e.data.args[0]):"close"===e.data.type?c(e.data.args[0],e.data.args[1]):"error"===e.data.type&&i()},r.sendMessage({type:"websocket",websocket:{url:e.toString(),protocols:t,requestHeaders:a,channel:this.channel.port2}},[this.channel.port2])}send(...e){if(this.readyState===n.CONNECTING)throw new DOMException("Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.");let t=e[0];t.buffer&&(t=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)),o.call(this.channel.port1,{type:"data",data:t},t instanceof ArrayBuffer?[t]:[])}close(e,t){o.call(this.channel.port1,{type:"close",closeCode:e,closeReason:t})}}function w(e,t,r){console.error(`error while processing '${r}': `,t),e.postMessage({type:"error",error:t})}function f(e){for(let t=0;t<e.length;t++){const r=e[t];if(!"!#$%&'*+-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz|~".includes(r))return!1}return!0}const g=["ws:","wss:"],b=[101,204,205,304],y=[301,302,303,307,308];class m{worker;constructor(e){this.worker=new p(e)}createWebSocket(e,t=[],r,a){try{e=new URL(e)}catch(t){throw new DOMException(`Faiiled to construct 'WebSocket': The URL '${e}' is invalid.`)}if(!g.includes(e.protocol))throw new DOMException(`Failed to construct 'WebSocket': The URL's scheme must be either 'ws' or 'wss'. '${e.protocol}' is not allowed.`);Array.isArray(t)||(t=[t]),t=t.map(String);for(const e of t)if(!f(e))throw new DOMException(`Failed to construct 'WebSocket': The subprotocol '${e}' is invalid.`);a=a||{};return new u(e,t,this.worker,a)}async fetch(e,r){const a=new Request(e,r),s=r?.headers||a.headers,o=s instanceof Headers?Object.fromEntries(s):s,n=a.body;let c=new URL(a.url);if(c.protocol.startsWith("blob:")){const e=await t(c),r=new Response(e.body,e);return r.rawHeaders=Object.fromEntries(e.headers),r.rawResponse={body:e.body,headers:Object.fromEntries(e.headers),status:e.status,statusText:e.statusText},r.finalURL=c.toString(),r}for(let e=0;;e++){let t=(await this.worker.sendMessage({type:"fetch",fetch:{remote:c.toString(),method:a.method,headers:o,body:n||void 0}},n?[n]:[])).fetch,s=new Response(b.includes(t.status)?void 0:t.body,{headers:new Headers(t.headers),status:t.status,statusText:t.statusText});s.rawHeaders=t.headers,s.rawResponse=t,s.finalURL=c.toString();const i=r?.redirect||a.redirect;if(!y.includes(s.status))return s;switch(i){case"follow":{const t=s.headers.get("location");if(20>e&&null!==t){c=new URL(t,c);continue}throw new TypeError("Failed to fetch")}case"error":throw new TypeError("Failed to fetch");case"manual":return s}}}}console.debug("bare-mux: running v2.1.9 (build dc9dc6e)"),e.BareClient=m,e.BareMuxConnection=class{worker;constructor(e){this.worker=new p(e)}async getTransport(){return(await this.worker.sendMessage({type:"get"})).name}async setTransport(e,t,r){await this.setManualTransport(`\n\t\t\tconst { default: BareTransport } = await import("${e}");\n\t\t\treturn [BareTransport, "${e}"];\n\t\t`,t,r)}async setManualTransport(e,t,r){if("bare-mux-remote"===e)throw new Error("Use setRemoteTransport.");await this.worker.sendMessage({type:"set",client:{function:e,args:t}},r)}async setRemoteTransport(e,t){const r=new MessageChannel;r.port1.onmessage=async t=>{const r=t.data.port,a=t.data.message;if("fetch"===a.type)try{e.ready||await e.init(),await async function(e,t,r){const a=await r.request(new URL(e.fetch.remote),e.fetch.method,e.fetch.body,e.fetch.headers,null);if(!d()&&a.body instanceof ReadableStream){const e=new Response(a.body);a.body=await e.arrayBuffer()}a.body instanceof ReadableStream||a.body instanceof ArrayBuffer?o.call(t,{type:"fetch",fetch:a},[a.body]):o.call(t,{type:"fetch",fetch:a})}(a,r,e)}catch(e){w(r,e,"fetch")}else if("websocket"===a.type)try{e.ready||await e.init(),await async function(e,t,r){const[a,s]=r.connect(new URL(e.websocket.url),e.websocket.protocols,e.websocket.requestHeaders,(t=>{o.call(e.websocket.channel,{type:"open",args:[t]})}),(t=>{t instanceof ArrayBuffer?o.call(e.websocket.channel,{type:"message",args:[t]},[t]):o.call(e.websocket.channel,{type:"message",args:[t]})}),((t,r)=>{o.call(e.websocket.channel,{type:"close",args:[t,r]})}),(t=>{o.call(e.websocket.channel,{type:"error",args:[t]})}));e.websocket.channel.onmessage=e=>{"data"===e.data.type?a(e.data.data):"close"===e.data.type&&s(e.data.closeCode,e.data.closeReason)},o.call(t,{type:"websocket"})}(a,r,e)}catch(e){w(r,e,"websocket")}},await this.worker.sendMessage({type:"set",client:{function:"bare-mux-remote",args:[r.port2,t]}},[r.port2])}getInnerPort(){return this.worker.port}},e.BareWebSocket=u,e.WebSocketFields=n,e.WorkerConnection=p,e.browserSupportsTransferringStreams=d,e.default=m,e.maxRedirects=20,e.validProtocol=f,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(){"use strict";const e=MessagePort.prototype.postMessage;let t=null;function a(e,t,a){console.error(`error while processing '${a}': `,t),e.postMessage({type:"error",error:t})}async function n(a,n,s){const o=await s.request(new URL(a.fetch.remote),a.fetch.method,a.fetch.body,a.fetch.headers,null);if(!function(){if(null===t){const a=new MessageChannel,n=new ReadableStream;let s;try{e.call(a.port1,n,[n]),s=!0}catch(e){s=!1}return t=s,s}return t}()&&o.body instanceof ReadableStream){const e=new Response(o.body);o.body=await e.arrayBuffer()}o.body instanceof ReadableStream||o.body instanceof ArrayBuffer?e.call(n,{type:"fetch",fetch:o},[o.body]):e.call(n,{type:"fetch",fetch:o})}let s=null,o="";function c(){return new Error("there are no bare clients",{cause:"No BareTransport was set. Try creating a BareMuxConnection and calling `setTransport()` or `setManualTransport()` on it before using BareClient."})}function r(t,a){const n=s;let o=[a];t.fetch?.body&&o.push(t.fetch.body),t.websocket?.channel&&o.push(t.websocket.channel),e.call(n,{message:t,port:a},o)}function l(t){t.onmessage=async t=>{const l=t.data.port,i=t.data.message;if("ping"===i.type)e.call(l,{type:"pong"});else if("set"===i.type)try{const t=async function(){}.constructor;if("bare-mux-remote"===i.client.function)s=i.client.args[0],o=`bare-mux-remote (${i.client.args[1]})`;else try{const e=new t(i.client.function),[a,n]=await e();s=new a(...i.client.args),o=n}catch(e){throw e.cause="The BareTransport provided was invalid. Common causes of this are a default export that is not a class that implements BareTransport if you are using `setTransport()`",e}console.log("set transport to ",s,o),e.call(l,{type:"set"})}catch(e){a(l,e,"set")}else if("get"===i.type)l.postMessage({type:"get",name:o});else if("fetch"===i.type)try{if(!s)throw c();if(s instanceof MessagePort)return void r(i,l);s.ready||await s.init(),await n(i,l,s)}catch(e){a(l,e,"fetch")}else if("websocket"===i.type)try{if(!s)throw c();if(s instanceof MessagePort)return void r(i,l);s.ready||await s.init(),await async function(t,a,n){const[s,o]=n.connect(new URL(t.websocket.url),t.websocket.protocols,t.websocket.requestHeaders,(a=>{e.call(t.websocket.channel,{type:"open",args:[a]})}),(a=>{a instanceof ArrayBuffer?e.call(t.websocket.channel,{type:"message",args:[a]},[a]):e.call(t.websocket.channel,{type:"message",args:[a]})}),((a,n)=>{e.call(t.websocket.channel,{type:"close",args:[a,n]})}),(a=>{e.call(t.websocket.channel,{type:"error",args:[a]})}));t.websocket.channel.onmessage=e=>{"data"===e.data.type?s(e.data.data):"close"===e.data.type&&o(e.data.closeCode,e.data.closeReason)},e.call(a,{type:"websocket"})}(i,l,s)}catch(e){a(l,e,"websocket")}}}new BroadcastChannel("bare-mux").postMessage({type:"refreshPort"}),self.onconnect=e=>{l(e.ports[0])},console.debug("bare-mux: running v2.1.9 (build dc9dc6e)")}();
|
|
2
|
+
//# sourceMappingURL=worker.js.map
|