wherever-dev 0.2.0 → 0.4.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.
Files changed (70) hide show
  1. package/dist/index.js +217 -17
  2. package/dist/index.js.map +1 -1
  3. package/dist/protocol.d.ts +21 -1
  4. package/dist/protocol.d.ts.map +1 -1
  5. package/dist/protocol.js +5 -1
  6. package/dist/protocol.js.map +1 -1
  7. package/dist/session-pool.d.ts +92 -2
  8. package/dist/session-pool.d.ts.map +1 -1
  9. package/dist/session-pool.js +466 -14
  10. package/dist/session-pool.js.map +1 -1
  11. package/dist/session-types.d.ts +17 -0
  12. package/dist/session-types.d.ts.map +1 -1
  13. package/package.json +1 -1
  14. package/public/_app/immutable/assets/0.CgLKPJWX.css +1 -0
  15. package/public/_app/immutable/chunks/CEg8tgYI.js +2 -0
  16. package/public/_app/immutable/chunks/CEg8tgYI.js.map +1 -0
  17. package/public/_app/immutable/chunks/CTVuBuYH.js +2 -0
  18. package/public/_app/immutable/chunks/{B5WJGjcR.js.map → CTVuBuYH.js.map} +1 -1
  19. package/public/_app/immutable/chunks/DBDAFnY6.js +2 -0
  20. package/public/_app/immutable/chunks/{BqMutrfe.js.map → DBDAFnY6.js.map} +1 -1
  21. package/public/_app/immutable/chunks/MtE7VtNZ.js +2 -0
  22. package/public/_app/immutable/chunks/{DiYtJzYU.js.map → MtE7VtNZ.js.map} +1 -1
  23. package/public/_app/immutable/chunks/S778j9fy.js +2 -0
  24. package/public/_app/immutable/chunks/{_lppinj8.js.map → S778j9fy.js.map} +1 -1
  25. package/public/_app/immutable/chunks/vMsF8lo6.js +3 -0
  26. package/public/_app/immutable/chunks/{DFxBx2vA.js.map → vMsF8lo6.js.map} +1 -1
  27. package/public/_app/immutable/chunks/ylfInSZr.js +2 -0
  28. package/public/_app/immutable/chunks/{BEWoN05F.js.map → ylfInSZr.js.map} +1 -1
  29. package/public/_app/immutable/entry/app.CklFlIiC.js +3 -0
  30. package/public/_app/immutable/entry/app.CklFlIiC.js.map +1 -0
  31. package/public/_app/immutable/entry/start.sF1k4jCY.js +2 -0
  32. package/public/_app/immutable/entry/start.sF1k4jCY.js.map +1 -0
  33. package/public/_app/immutable/nodes/0.BEHRw2jv.js +4 -0
  34. package/public/_app/immutable/nodes/{0.BzvDOlXz.js.map → 0.BEHRw2jv.js.map} +1 -1
  35. package/public/_app/immutable/nodes/1.2gk2c-6t.js +2 -0
  36. package/public/_app/immutable/nodes/{1.DMtW3tA5.js.map → 1.2gk2c-6t.js.map} +1 -1
  37. package/public/_app/immutable/nodes/2.Dto-NrSs.js +82 -0
  38. package/public/_app/immutable/nodes/2.Dto-NrSs.js.map +1 -0
  39. package/public/_app/version.json +1 -1
  40. package/public/index.html +16 -16
  41. package/public/pwa/apple-touch-icon.png +0 -0
  42. package/public/pwa/favicon-192.png +0 -0
  43. package/public/pwa/favicon-512.png +0 -0
  44. package/public/pwa/favicon.ico +0 -0
  45. package/public/pwa/favicon.svg +1 -0
  46. package/public/pwa/manifest.webmanifest +31 -7
  47. package/public/pwa/maskable-192.png +0 -0
  48. package/public/pwa/maskable-512.png +0 -0
  49. package/public/pwa/screenshot-desktop.png +0 -0
  50. package/public/pwa/screenshot-mobile.png +0 -0
  51. package/public/robots.txt +5 -0
  52. package/public/service-worker.js +1 -305
  53. package/public/_app/immutable/assets/0.DvZxoQjW.css +0 -2754
  54. package/public/_app/immutable/chunks/B5WJGjcR.js +0 -23
  55. package/public/_app/immutable/chunks/BEWoN05F.js +0 -110
  56. package/public/_app/immutable/chunks/BqMutrfe.js +0 -2129
  57. package/public/_app/immutable/chunks/DFxBx2vA.js +0 -897
  58. package/public/_app/immutable/chunks/DiYtJzYU.js +0 -396
  59. package/public/_app/immutable/chunks/_lppinj8.js +0 -879
  60. package/public/_app/immutable/chunks/rMw82gDs.js +0 -3048
  61. package/public/_app/immutable/chunks/rMw82gDs.js.map +0 -1
  62. package/public/_app/immutable/entry/app.BFki2czn.js +0 -309
  63. package/public/_app/immutable/entry/app.BFki2czn.js.map +0 -1
  64. package/public/_app/immutable/entry/start.BceUuq27.js +0 -6
  65. package/public/_app/immutable/entry/start.BceUuq27.js.map +0 -1
  66. package/public/_app/immutable/nodes/0.BzvDOlXz.js +0 -546
  67. package/public/_app/immutable/nodes/1.DMtW3tA5.js +0 -24
  68. package/public/_app/immutable/nodes/2.CnZp8abw.js +0 -5152
  69. package/public/_app/immutable/nodes/2.CnZp8abw.js.map +0 -1
  70. package/public/icon.png +0 -0
@@ -1,396 +0,0 @@
1
- import { ba as teardown, a4 as define_property, aH as noop, aF as mutable_source, b7 as subscribe_to_store, aX as set, af as get, ag as get$1, aT as resume_effect, a8 as destroy_effect, aJ as pause_effect, _ as create_text, U as branch, a0 as current_batch, ap as hydrating, ao as hydrate_node, aE as move_effect, b2 as should_defer_append, Q as block, an as hydrate_next, l as EFFECT_TRANSPARENT, aP as read_hydration_instruction, b4 as skip_nodes, a$ as set_hydrate_node, b0 as set_hydrating, ah as get_descriptor, w as PROPS_IS_UPDATED, aM as proxy, ay as is_destroying_effect, J as active_effect, D as DESTROYED, aB as legacy_mode_flag, v as PROPS_IS_RUNES, P as PROPS_IS_BINDABLE, a7 as derived_safe_equal, S as STATE_SYMBOL, L as LEGACY_PROPS, a5 as derived, bd as untrack, aL as props_invalid_value, t as PROPS_IS_IMMUTABLE, u as PROPS_IS_LAZY_INITIAL } from "./rMw82gDs.js";
2
- let is_store_binding = false;
3
- let IS_UNMOUNTED = /* @__PURE__ */ Symbol("unmounted");
4
- function store_get(store, store_name, stores) {
5
- const entry = stores[store_name] ??= {
6
- store: null,
7
- source: mutable_source(void 0),
8
- unsubscribe: noop
9
- };
10
- if (entry.store !== store && !(IS_UNMOUNTED in stores)) {
11
- entry.unsubscribe();
12
- entry.store = store ?? null;
13
- if (store == null) {
14
- entry.source.v = void 0;
15
- entry.unsubscribe = noop;
16
- } else {
17
- var is_synchronous_callback = true;
18
- entry.unsubscribe = subscribe_to_store(store, (v) => {
19
- if (is_synchronous_callback) {
20
- entry.source.v = v;
21
- } else {
22
- set(entry.source, v);
23
- }
24
- });
25
- is_synchronous_callback = false;
26
- }
27
- }
28
- if (store && IS_UNMOUNTED in stores) {
29
- return get(store);
30
- }
31
- return get$1(entry.source);
32
- }
33
- function setup_stores() {
34
- const stores = {};
35
- function cleanup() {
36
- teardown(() => {
37
- for (var store_name in stores) {
38
- const ref = stores[store_name];
39
- ref.unsubscribe();
40
- }
41
- define_property(stores, IS_UNMOUNTED, {
42
- enumerable: false,
43
- value: true
44
- });
45
- });
46
- }
47
- return [stores, cleanup];
48
- }
49
- function capture_store_binding(fn) {
50
- var previous_is_store_binding = is_store_binding;
51
- try {
52
- is_store_binding = false;
53
- return [fn(), is_store_binding];
54
- } finally {
55
- is_store_binding = previous_is_store_binding;
56
- }
57
- }
58
- class BranchManager {
59
- /** @type {TemplateNode} */
60
- anchor;
61
- /** @type {Map<Batch, Key>} */
62
- #batches = /* @__PURE__ */ new Map();
63
- /**
64
- * Map of keys to effects that are currently rendered in the DOM.
65
- * These effects are visible and actively part of the document tree.
66
- * Example:
67
- * ```
68
- * {#if condition}
69
- * foo
70
- * {:else}
71
- * bar
72
- * {/if}
73
- * ```
74
- * Can result in the entries `true->Effect` and `false->Effect`
75
- * @type {Map<Key, Effect>}
76
- */
77
- #onscreen = /* @__PURE__ */ new Map();
78
- /**
79
- * Similar to #onscreen with respect to the keys, but contains branches that are not yet
80
- * in the DOM, because their insertion is deferred.
81
- * @type {Map<Key, Branch>}
82
- */
83
- #offscreen = /* @__PURE__ */ new Map();
84
- /**
85
- * Keys of effects that are currently outroing
86
- * @type {Set<Key>}
87
- */
88
- #outroing = /* @__PURE__ */ new Set();
89
- /**
90
- * Whether to pause (i.e. outro) on change, or destroy immediately.
91
- * This is necessary for `<svelte:element>`
92
- */
93
- #transition = true;
94
- /**
95
- * @param {TemplateNode} anchor
96
- * @param {boolean} transition
97
- */
98
- constructor(anchor, transition = true) {
99
- this.anchor = anchor;
100
- this.#transition = transition;
101
- }
102
- /**
103
- * @param {Batch} batch
104
- */
105
- #commit = (batch) => {
106
- if (!this.#batches.has(batch)) return;
107
- var key = (
108
- /** @type {Key} */
109
- this.#batches.get(batch)
110
- );
111
- var onscreen = this.#onscreen.get(key);
112
- if (onscreen) {
113
- resume_effect(onscreen);
114
- this.#outroing.delete(key);
115
- } else {
116
- var offscreen = this.#offscreen.get(key);
117
- if (offscreen) {
118
- this.#onscreen.set(key, offscreen.effect);
119
- this.#offscreen.delete(key);
120
- offscreen.fragment.lastChild.remove();
121
- this.anchor.before(offscreen.fragment);
122
- onscreen = offscreen.effect;
123
- }
124
- }
125
- for (const [b, k] of this.#batches) {
126
- this.#batches.delete(b);
127
- if (b === batch) {
128
- break;
129
- }
130
- const offscreen2 = this.#offscreen.get(k);
131
- if (offscreen2) {
132
- destroy_effect(offscreen2.effect);
133
- this.#offscreen.delete(k);
134
- }
135
- }
136
- for (const [k, effect] of this.#onscreen) {
137
- if (k === key || this.#outroing.has(k)) continue;
138
- const on_destroy = () => {
139
- const keys = Array.from(this.#batches.values());
140
- if (keys.includes(k)) {
141
- var fragment = document.createDocumentFragment();
142
- move_effect(effect, fragment);
143
- fragment.append(create_text());
144
- this.#offscreen.set(k, { effect, fragment });
145
- } else {
146
- destroy_effect(effect);
147
- }
148
- this.#outroing.delete(k);
149
- this.#onscreen.delete(k);
150
- };
151
- if (this.#transition || !onscreen) {
152
- this.#outroing.add(k);
153
- pause_effect(effect, on_destroy, false);
154
- } else {
155
- on_destroy();
156
- }
157
- }
158
- };
159
- /**
160
- * @param {Batch} batch
161
- */
162
- #discard = (batch) => {
163
- this.#batches.delete(batch);
164
- const keys = Array.from(this.#batches.values());
165
- for (const [k, branch2] of this.#offscreen) {
166
- if (!keys.includes(k)) {
167
- destroy_effect(branch2.effect);
168
- this.#offscreen.delete(k);
169
- }
170
- }
171
- };
172
- /**
173
- *
174
- * @param {any} key
175
- * @param {null | ((target: TemplateNode) => void)} fn
176
- */
177
- ensure(key, fn) {
178
- var batch = (
179
- /** @type {Batch} */
180
- current_batch
181
- );
182
- var defer = should_defer_append();
183
- if (fn && !this.#onscreen.has(key) && !this.#offscreen.has(key)) {
184
- if (defer) {
185
- var fragment = document.createDocumentFragment();
186
- var target = create_text();
187
- fragment.append(target);
188
- this.#offscreen.set(key, {
189
- effect: branch(() => fn(target)),
190
- fragment
191
- });
192
- } else {
193
- this.#onscreen.set(
194
- key,
195
- branch(() => fn(this.anchor))
196
- );
197
- }
198
- }
199
- this.#batches.set(batch, key);
200
- if (defer) {
201
- for (const [k, effect] of this.#onscreen) {
202
- if (k === key) {
203
- batch.unskip_effect(effect);
204
- } else {
205
- batch.skip_effect(effect);
206
- }
207
- }
208
- for (const [k, branch2] of this.#offscreen) {
209
- if (k === key) {
210
- batch.unskip_effect(branch2.effect);
211
- } else {
212
- batch.skip_effect(branch2.effect);
213
- }
214
- }
215
- batch.oncommit(this.#commit);
216
- batch.ondiscard(this.#discard);
217
- } else {
218
- if (hydrating) {
219
- this.anchor = hydrate_node;
220
- }
221
- this.#commit(batch);
222
- }
223
- }
224
- }
225
- function if_block(node, fn, elseif = false) {
226
- var marker;
227
- if (hydrating) {
228
- marker = hydrate_node;
229
- hydrate_next();
230
- }
231
- var branches = new BranchManager(node);
232
- var flags = elseif ? EFFECT_TRANSPARENT : 0;
233
- function update_branch(key, fn2) {
234
- if (hydrating) {
235
- var data = read_hydration_instruction(
236
- /** @type {TemplateNode} */
237
- marker
238
- );
239
- if (key !== parseInt(data.substring(1))) {
240
- var anchor = skip_nodes();
241
- set_hydrate_node(anchor);
242
- branches.anchor = anchor;
243
- set_hydrating(false);
244
- branches.ensure(key, fn2);
245
- set_hydrating(true);
246
- return;
247
- }
248
- }
249
- branches.ensure(key, fn2);
250
- }
251
- block(() => {
252
- var has_branch = false;
253
- fn((fn2, key = 0) => {
254
- has_branch = true;
255
- update_branch(key, fn2);
256
- });
257
- if (!has_branch) {
258
- update_branch(-1, null);
259
- }
260
- }, flags);
261
- }
262
- function prop(props, key, flags, fallback) {
263
- var runes = !legacy_mode_flag || (flags & PROPS_IS_RUNES) !== 0;
264
- var bindable = (flags & PROPS_IS_BINDABLE) !== 0;
265
- var lazy = (flags & PROPS_IS_LAZY_INITIAL) !== 0;
266
- var fallback_value = (
267
- /** @type {V} */
268
- fallback
269
- );
270
- var fallback_dirty = true;
271
- var fallback_signal = (
272
- /** @type {Derived<V> | undefined} */
273
- void 0
274
- );
275
- var get_fallback = () => {
276
- if (lazy && runes) {
277
- fallback_signal ??= derived(
278
- /** @type {() => V} */
279
- fallback
280
- );
281
- return get$1(fallback_signal);
282
- }
283
- if (fallback_dirty) {
284
- fallback_dirty = false;
285
- fallback_value = lazy ? untrack(
286
- /** @type {() => V} */
287
- fallback
288
- ) : (
289
- /** @type {V} */
290
- fallback
291
- );
292
- }
293
- return fallback_value;
294
- };
295
- let setter;
296
- if (bindable) {
297
- var is_entry_props = STATE_SYMBOL in props || LEGACY_PROPS in props;
298
- setter = get_descriptor(props, key)?.set ?? (is_entry_props && key in props ? (v) => props[key] = v : void 0);
299
- }
300
- var initial_value;
301
- var is_store_sub = false;
302
- if (bindable) {
303
- [initial_value, is_store_sub] = capture_store_binding(() => (
304
- /** @type {V} */
305
- props[key]
306
- ));
307
- } else {
308
- initial_value = /** @type {V} */
309
- props[key];
310
- }
311
- if (initial_value === void 0 && fallback !== void 0) {
312
- initial_value = get_fallback();
313
- if (setter) {
314
- if (runes) props_invalid_value();
315
- setter(initial_value);
316
- }
317
- }
318
- var getter;
319
- if (runes) {
320
- getter = () => {
321
- var value = (
322
- /** @type {V} */
323
- props[key]
324
- );
325
- if (value === void 0) return get_fallback();
326
- fallback_dirty = true;
327
- return value;
328
- };
329
- } else {
330
- getter = () => {
331
- var value = (
332
- /** @type {V} */
333
- props[key]
334
- );
335
- if (value !== void 0) {
336
- fallback_value = /** @type {V} */
337
- void 0;
338
- }
339
- return value === void 0 ? fallback_value : value;
340
- };
341
- }
342
- if (runes && (flags & PROPS_IS_UPDATED) === 0) {
343
- return getter;
344
- }
345
- if (setter) {
346
- var legacy_parent = props.$$legacy;
347
- return (
348
- /** @type {() => V} */
349
- (function(value, mutation) {
350
- if (arguments.length > 0) {
351
- if (!runes || !mutation || legacy_parent || is_store_sub) {
352
- setter(mutation ? getter() : value);
353
- }
354
- return value;
355
- }
356
- return getter();
357
- })
358
- );
359
- }
360
- var overridden = false;
361
- var d = ((flags & PROPS_IS_IMMUTABLE) !== 0 ? derived : derived_safe_equal)(() => {
362
- overridden = false;
363
- return getter();
364
- });
365
- if (bindable) get$1(d);
366
- var parent_effect = (
367
- /** @type {Effect} */
368
- active_effect
369
- );
370
- return (
371
- /** @type {() => V} */
372
- (function(value, mutation) {
373
- if (arguments.length > 0) {
374
- const new_value = mutation ? get$1(d) : runes && bindable ? proxy(value) : value;
375
- set(d, new_value);
376
- overridden = true;
377
- if (fallback_value !== void 0) {
378
- fallback_value = new_value;
379
- }
380
- return value;
381
- }
382
- if (is_destroying_effect && overridden || (parent_effect.f & DESTROYED) !== 0) {
383
- return d.v;
384
- }
385
- return get$1(d);
386
- })
387
- );
388
- }
389
- export {
390
- BranchManager as B,
391
- store_get as a,
392
- if_block as i,
393
- prop as p,
394
- setup_stores as s
395
- };
396
- //# sourceMappingURL=DiYtJzYU.js.map