Example using supabase and Svelte. You can see details in this blog post: https://geoexamples.com/svelte/2021/07/18/svelte-supabase-maps.html
Last active
July 18, 2021 21:09
-
-
Save rveciana/ca929e406e6bac979cd7a7f263303bad to your computer and use it in GitHub Desktop.
Svelte + Supabase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
licence: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svg.svelte-1x0lp3d{width:960px;height:500px}.border.svelte-1x0lp3d{stroke:#444444;fill:#cccccc} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(l, r) { if (!l || l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (self.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.getElementsByTagName('head')[0].appendChild(r) })(self.document); | |
var app = (function () { | |
'use strict'; | |
function noop$3() { } | |
function add_location(element, file, line, column, char) { | |
element.__svelte_meta = { | |
loc: { file, line, column, char } | |
}; | |
} | |
function run(fn) { | |
return fn(); | |
} | |
function blank_object() { | |
return Object.create(null); | |
} | |
function run_all(fns) { | |
fns.forEach(run); | |
} | |
function is_function(thing) { | |
return typeof thing === 'function'; | |
} | |
function safe_not_equal(a, b) { | |
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); | |
} | |
function is_empty(obj) { | |
return Object.keys(obj).length === 0; | |
} | |
function action_destroyer(action_result) { | |
return action_result && is_function(action_result.destroy) ? action_result.destroy : noop$3; | |
} | |
// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM | |
// at the end of hydration without touching the remaining nodes. | |
let is_hydrating = false; | |
function start_hydrating() { | |
is_hydrating = true; | |
} | |
function end_hydrating() { | |
is_hydrating = false; | |
} | |
function upper_bound(low, high, key, value) { | |
// Return first index of value larger than input value in the range [low, high) | |
while (low < high) { | |
const mid = low + ((high - low) >> 1); | |
if (key(mid) <= value) { | |
low = mid + 1; | |
} | |
else { | |
high = mid; | |
} | |
} | |
return low; | |
} | |
function init_hydrate(target) { | |
if (target.hydrate_init) | |
return; | |
target.hydrate_init = true; | |
// We know that all children have claim_order values since the unclaimed have been detached | |
const children = target.childNodes; | |
/* | |
* Reorder claimed children optimally. | |
* We can reorder claimed children optimally by finding the longest subsequence of | |
* nodes that are already claimed in order and only moving the rest. The longest | |
* subsequence subsequence of nodes that are claimed in order can be found by | |
* computing the longest increasing subsequence of .claim_order values. | |
* | |
* This algorithm is optimal in generating the least amount of reorder operations | |
* possible. | |
* | |
* Proof: | |
* We know that, given a set of reordering operations, the nodes that do not move | |
* always form an increasing subsequence, since they do not move among each other | |
* meaning that they must be already ordered among each other. Thus, the maximal | |
* set of nodes that do not move form a longest increasing subsequence. | |
*/ | |
// Compute longest increasing subsequence | |
// m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j | |
const m = new Int32Array(children.length + 1); | |
// Predecessor indices + 1 | |
const p = new Int32Array(children.length); | |
m[0] = -1; | |
let longest = 0; | |
for (let i = 0; i < children.length; i++) { | |
const current = children[i].claim_order; | |
// Find the largest subsequence length such that it ends in a value less than our current value | |
// upper_bound returns first greater value, so we subtract one | |
const seqLen = upper_bound(1, longest + 1, idx => children[m[idx]].claim_order, current) - 1; | |
p[i] = m[seqLen] + 1; | |
const newLen = seqLen + 1; | |
// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence. | |
m[newLen] = i; | |
longest = Math.max(newLen, longest); | |
} | |
// The longest increasing subsequence of nodes (initially reversed) | |
const lis = []; | |
// The rest of the nodes, nodes that will be moved | |
const toMove = []; | |
let last = children.length - 1; | |
for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) { | |
lis.push(children[cur - 1]); | |
for (; last >= cur; last--) { | |
toMove.push(children[last]); | |
} | |
last--; | |
} | |
for (; last >= 0; last--) { | |
toMove.push(children[last]); | |
} | |
lis.reverse(); | |
// We sort the nodes being moved to guarantee that their insertion order matches the claim order | |
toMove.sort((a, b) => a.claim_order - b.claim_order); | |
// Finally, we move the nodes | |
for (let i = 0, j = 0; i < toMove.length; i++) { | |
while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) { | |
j++; | |
} | |
const anchor = j < lis.length ? lis[j] : null; | |
target.insertBefore(toMove[i], anchor); | |
} | |
} | |
function append(target, node) { | |
if (is_hydrating) { | |
init_hydrate(target); | |
if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) { | |
target.actual_end_child = target.firstChild; | |
} | |
if (node !== target.actual_end_child) { | |
target.insertBefore(node, target.actual_end_child); | |
} | |
else { | |
target.actual_end_child = node.nextSibling; | |
} | |
} | |
else if (node.parentNode !== target) { | |
target.appendChild(node); | |
} | |
} | |
function insert(target, node, anchor) { | |
if (is_hydrating && !anchor) { | |
append(target, node); | |
} | |
else if (node.parentNode !== target || (anchor && node.nextSibling !== anchor)) { | |
target.insertBefore(node, anchor || null); | |
} | |
} | |
function detach(node) { | |
node.parentNode.removeChild(node); | |
} | |
function destroy_each(iterations, detaching) { | |
for (let i = 0; i < iterations.length; i += 1) { | |
if (iterations[i]) | |
iterations[i].d(detaching); | |
} | |
} | |
function element(name) { | |
return document.createElement(name); | |
} | |
function svg_element(name) { | |
return document.createElementNS('http://www.w3.org/2000/svg', name); | |
} | |
function text(data) { | |
return document.createTextNode(data); | |
} | |
function space() { | |
return text(' '); | |
} | |
function listen(node, event, handler, options) { | |
node.addEventListener(event, handler, options); | |
return () => node.removeEventListener(event, handler, options); | |
} | |
function prevent_default(fn) { | |
return function (event) { | |
event.preventDefault(); | |
// @ts-ignore | |
return fn.call(this, event); | |
}; | |
} | |
function attr(node, attribute, value) { | |
if (value == null) | |
node.removeAttribute(attribute); | |
else if (node.getAttribute(attribute) !== value) | |
node.setAttribute(attribute, value); | |
} | |
function to_number(value) { | |
return value === '' ? null : +value; | |
} | |
function children(element) { | |
return Array.from(element.childNodes); | |
} | |
function set_input_value(input, value) { | |
input.value = value == null ? '' : value; | |
} | |
function set_style(node, key, value, important) { | |
node.style.setProperty(key, value, important ? 'important' : ''); | |
} | |
function custom_event(type, detail) { | |
const e = document.createEvent('CustomEvent'); | |
e.initCustomEvent(type, false, false, detail); | |
return e; | |
} | |
let current_component; | |
function set_current_component(component) { | |
current_component = component; | |
} | |
function get_current_component() { | |
if (!current_component) | |
throw new Error('Function called outside component initialization'); | |
return current_component; | |
} | |
function onMount(fn) { | |
get_current_component().$$.on_mount.push(fn); | |
} | |
const dirty_components = []; | |
const binding_callbacks = []; | |
const render_callbacks = []; | |
const flush_callbacks = []; | |
const resolved_promise = Promise.resolve(); | |
let update_scheduled = false; | |
function schedule_update() { | |
if (!update_scheduled) { | |
update_scheduled = true; | |
resolved_promise.then(flush); | |
} | |
} | |
function add_render_callback(fn) { | |
render_callbacks.push(fn); | |
} | |
let flushing = false; | |
const seen_callbacks = new Set(); | |
function flush() { | |
if (flushing) | |
return; | |
flushing = true; | |
do { | |
// first, call beforeUpdate functions | |
// and update components | |
for (let i = 0; i < dirty_components.length; i += 1) { | |
const component = dirty_components[i]; | |
set_current_component(component); | |
update(component.$$); | |
} | |
set_current_component(null); | |
dirty_components.length = 0; | |
while (binding_callbacks.length) | |
binding_callbacks.pop()(); | |
// then, once components are updated, call | |
// afterUpdate functions. This may cause | |
// subsequent updates... | |
for (let i = 0; i < render_callbacks.length; i += 1) { | |
const callback = render_callbacks[i]; | |
if (!seen_callbacks.has(callback)) { | |
// ...so guard against infinite loops | |
seen_callbacks.add(callback); | |
callback(); | |
} | |
} | |
render_callbacks.length = 0; | |
} while (dirty_components.length); | |
while (flush_callbacks.length) { | |
flush_callbacks.pop()(); | |
} | |
update_scheduled = false; | |
flushing = false; | |
seen_callbacks.clear(); | |
} | |
function update($$) { | |
if ($$.fragment !== null) { | |
$$.update(); | |
run_all($$.before_update); | |
const dirty = $$.dirty; | |
$$.dirty = [-1]; | |
$$.fragment && $$.fragment.p($$.ctx, dirty); | |
$$.after_update.forEach(add_render_callback); | |
} | |
} | |
const outroing = new Set(); | |
let outros; | |
function transition_in(block, local) { | |
if (block && block.i) { | |
outroing.delete(block); | |
block.i(local); | |
} | |
} | |
function transition_out(block, local, detach, callback) { | |
if (block && block.o) { | |
if (outroing.has(block)) | |
return; | |
outroing.add(block); | |
outros.c.push(() => { | |
outroing.delete(block); | |
if (callback) { | |
if (detach) | |
block.d(1); | |
callback(); | |
} | |
}); | |
block.o(local); | |
} | |
} | |
const globals = (typeof window !== 'undefined' | |
? window | |
: typeof globalThis !== 'undefined' | |
? globalThis | |
: global); | |
function create_component(block) { | |
block && block.c(); | |
} | |
function mount_component(component, target, anchor, customElement) { | |
const { fragment, on_mount, on_destroy, after_update } = component.$$; | |
fragment && fragment.m(target, anchor); | |
if (!customElement) { | |
// onMount happens before the initial afterUpdate | |
add_render_callback(() => { | |
const new_on_destroy = on_mount.map(run).filter(is_function); | |
if (on_destroy) { | |
on_destroy.push(...new_on_destroy); | |
} | |
else { | |
// Edge case - component was destroyed immediately, | |
// most likely as a result of a binding initialising | |
run_all(new_on_destroy); | |
} | |
component.$$.on_mount = []; | |
}); | |
} | |
after_update.forEach(add_render_callback); | |
} | |
function destroy_component(component, detaching) { | |
const $$ = component.$$; | |
if ($$.fragment !== null) { | |
run_all($$.on_destroy); | |
$$.fragment && $$.fragment.d(detaching); | |
// TODO null out other refs, including component.$$ (but need to | |
// preserve final state?) | |
$$.on_destroy = $$.fragment = null; | |
$$.ctx = []; | |
} | |
} | |
function make_dirty(component, i) { | |
if (component.$$.dirty[0] === -1) { | |
dirty_components.push(component); | |
schedule_update(); | |
component.$$.dirty.fill(0); | |
} | |
component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31)); | |
} | |
function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) { | |
const parent_component = current_component; | |
set_current_component(component); | |
const $$ = component.$$ = { | |
fragment: null, | |
ctx: null, | |
// state | |
props, | |
update: noop$3, | |
not_equal, | |
bound: blank_object(), | |
// lifecycle | |
on_mount: [], | |
on_destroy: [], | |
on_disconnect: [], | |
before_update: [], | |
after_update: [], | |
context: new Map(parent_component ? parent_component.$$.context : options.context || []), | |
// everything else | |
callbacks: blank_object(), | |
dirty, | |
skip_bound: false | |
}; | |
let ready = false; | |
$$.ctx = instance | |
? instance(component, options.props || {}, (i, ret, ...rest) => { | |
const value = rest.length ? rest[0] : ret; | |
if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { | |
if (!$$.skip_bound && $$.bound[i]) | |
$$.bound[i](value); | |
if (ready) | |
make_dirty(component, i); | |
} | |
return ret; | |
}) | |
: []; | |
$$.update(); | |
ready = true; | |
run_all($$.before_update); | |
// `false` as a special case of no DOM component | |
$$.fragment = create_fragment ? create_fragment($$.ctx) : false; | |
if (options.target) { | |
if (options.hydrate) { | |
start_hydrating(); | |
const nodes = children(options.target); | |
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | |
$$.fragment && $$.fragment.l(nodes); | |
nodes.forEach(detach); | |
} | |
else { | |
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | |
$$.fragment && $$.fragment.c(); | |
} | |
if (options.intro) | |
transition_in(component.$$.fragment); | |
mount_component(component, options.target, options.anchor, options.customElement); | |
end_hydrating(); | |
flush(); | |
} | |
set_current_component(parent_component); | |
} | |
/** | |
* Base class for Svelte components. Used when dev=false. | |
*/ | |
class SvelteComponent { | |
$destroy() { | |
destroy_component(this, 1); | |
this.$destroy = noop$3; | |
} | |
$on(type, callback) { | |
const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = [])); | |
callbacks.push(callback); | |
return () => { | |
const index = callbacks.indexOf(callback); | |
if (index !== -1) | |
callbacks.splice(index, 1); | |
}; | |
} | |
$set($$props) { | |
if (this.$$set && !is_empty($$props)) { | |
this.$$.skip_bound = true; | |
this.$$set($$props); | |
this.$$.skip_bound = false; | |
} | |
} | |
} | |
function dispatch_dev(type, detail) { | |
document.dispatchEvent(custom_event(type, Object.assign({ version: '3.38.3' }, detail))); | |
} | |
function append_dev(target, node) { | |
dispatch_dev('SvelteDOMInsert', { target, node }); | |
append(target, node); | |
} | |
function insert_dev(target, node, anchor) { | |
dispatch_dev('SvelteDOMInsert', { target, node, anchor }); | |
insert(target, node, anchor); | |
} | |
function detach_dev(node) { | |
dispatch_dev('SvelteDOMRemove', { node }); | |
detach(node); | |
} | |
function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) { | |
const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : []; | |
if (has_prevent_default) | |
modifiers.push('preventDefault'); | |
if (has_stop_propagation) | |
modifiers.push('stopPropagation'); | |
dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers }); | |
const dispose = listen(node, event, handler, options); | |
return () => { | |
dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers }); | |
dispose(); | |
}; | |
} | |
function attr_dev(node, attribute, value) { | |
attr(node, attribute, value); | |
if (value == null) | |
dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute }); | |
else | |
dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value }); | |
} | |
function prop_dev(node, property, value) { | |
node[property] = value; | |
dispatch_dev('SvelteDOMSetProperty', { node, property, value }); | |
} | |
function set_data_dev(text, data) { | |
data = '' + data; | |
if (text.wholeText === data) | |
return; | |
dispatch_dev('SvelteDOMSetData', { node: text, data }); | |
text.data = data; | |
} | |
function validate_each_argument(arg) { | |
if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) { | |
let msg = '{#each} only iterates over array-like objects.'; | |
if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) { | |
msg += ' You can use a spread to convert this iterable into an array.'; | |
} | |
throw new Error(msg); | |
} | |
} | |
function validate_slots(name, slot, keys) { | |
for (const slot_key of Object.keys(slot)) { | |
if (!~keys.indexOf(slot_key)) { | |
console.warn(`<${name}> received an unexpected slot "${slot_key}".`); | |
} | |
} | |
} | |
/** | |
* Base class for Svelte components with some minor dev-enhancements. Used when dev=true. | |
*/ | |
class SvelteComponentDev extends SvelteComponent { | |
constructor(options) { | |
if (!options || (!options.target && !options.$$inline)) { | |
throw new Error("'target' is a required option"); | |
} | |
super(); | |
} | |
$destroy() { | |
super.$destroy(); | |
this.$destroy = () => { | |
console.warn('Component was already destroyed'); // eslint-disable-line no-console | |
}; | |
} | |
$capture_state() { } | |
$inject_state() { } | |
} | |
// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423 | |
class Adder { | |
constructor() { | |
this._partials = new Float64Array(32); | |
this._n = 0; | |
} | |
add(x) { | |
const p = this._partials; | |
let i = 0; | |
for (let j = 0; j < this._n && j < 32; j++) { | |
const y = p[j], | |
hi = x + y, | |
lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x); | |
if (lo) p[i++] = lo; | |
x = hi; | |
} | |
p[i] = x; | |
this._n = i + 1; | |
return this; | |
} | |
valueOf() { | |
const p = this._partials; | |
let n = this._n, x, y, lo, hi = 0; | |
if (n > 0) { | |
hi = p[--n]; | |
while (n > 0) { | |
x = hi; | |
y = p[--n]; | |
hi = x + y; | |
lo = y - (hi - x); | |
if (lo) break; | |
} | |
if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) { | |
y = lo * 2; | |
x = hi + y; | |
if (y == x - hi) hi = x; | |
} | |
} | |
return hi; | |
} | |
} | |
function* flatten(arrays) { | |
for (const array of arrays) { | |
yield* array; | |
} | |
} | |
function merge(arrays) { | |
return Array.from(flatten(arrays)); | |
} | |
var epsilon = 1e-6; | |
var epsilon2 = 1e-12; | |
var pi = Math.PI; | |
var halfPi = pi / 2; | |
var quarterPi = pi / 4; | |
var tau = pi * 2; | |
var degrees = 180 / pi; | |
var radians = pi / 180; | |
var abs = Math.abs; | |
var atan = Math.atan; | |
var atan2 = Math.atan2; | |
var cos = Math.cos; | |
var sin = Math.sin; | |
var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; }; | |
var sqrt = Math.sqrt; | |
function acos(x) { | |
return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); | |
} | |
function asin(x) { | |
return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x); | |
} | |
function noop$2() {} | |
function streamGeometry(geometry, stream) { | |
if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) { | |
streamGeometryType[geometry.type](geometry, stream); | |
} | |
} | |
var streamObjectType = { | |
Feature: function(object, stream) { | |
streamGeometry(object.geometry, stream); | |
}, | |
FeatureCollection: function(object, stream) { | |
var features = object.features, i = -1, n = features.length; | |
while (++i < n) streamGeometry(features[i].geometry, stream); | |
} | |
}; | |
var streamGeometryType = { | |
Sphere: function(object, stream) { | |
stream.sphere(); | |
}, | |
Point: function(object, stream) { | |
object = object.coordinates; | |
stream.point(object[0], object[1], object[2]); | |
}, | |
MultiPoint: function(object, stream) { | |
var coordinates = object.coordinates, i = -1, n = coordinates.length; | |
while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]); | |
}, | |
LineString: function(object, stream) { | |
streamLine(object.coordinates, stream, 0); | |
}, | |
MultiLineString: function(object, stream) { | |
var coordinates = object.coordinates, i = -1, n = coordinates.length; | |
while (++i < n) streamLine(coordinates[i], stream, 0); | |
}, | |
Polygon: function(object, stream) { | |
streamPolygon(object.coordinates, stream); | |
}, | |
MultiPolygon: function(object, stream) { | |
var coordinates = object.coordinates, i = -1, n = coordinates.length; | |
while (++i < n) streamPolygon(coordinates[i], stream); | |
}, | |
GeometryCollection: function(object, stream) { | |
var geometries = object.geometries, i = -1, n = geometries.length; | |
while (++i < n) streamGeometry(geometries[i], stream); | |
} | |
}; | |
function streamLine(coordinates, stream, closed) { | |
var i = -1, n = coordinates.length - closed, coordinate; | |
stream.lineStart(); | |
while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]); | |
stream.lineEnd(); | |
} | |
function streamPolygon(coordinates, stream) { | |
var i = -1, n = coordinates.length; | |
stream.polygonStart(); | |
while (++i < n) streamLine(coordinates[i], stream, 1); | |
stream.polygonEnd(); | |
} | |
function geoStream(object, stream) { | |
if (object && streamObjectType.hasOwnProperty(object.type)) { | |
streamObjectType[object.type](object, stream); | |
} else { | |
streamGeometry(object, stream); | |
} | |
} | |
function spherical(cartesian) { | |
return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])]; | |
} | |
function cartesian(spherical) { | |
var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi); | |
return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)]; | |
} | |
function cartesianDot(a, b) { | |
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; | |
} | |
function cartesianCross(a, b) { | |
return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]]; | |
} | |
// TODO return a | |
function cartesianAddInPlace(a, b) { | |
a[0] += b[0], a[1] += b[1], a[2] += b[2]; | |
} | |
function cartesianScale(vector, k) { | |
return [vector[0] * k, vector[1] * k, vector[2] * k]; | |
} | |
// TODO return d | |
function cartesianNormalizeInPlace(d) { | |
var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); | |
d[0] /= l, d[1] /= l, d[2] /= l; | |
} | |
function compose(a, b) { | |
function compose(x, y) { | |
return x = a(x, y), b(x[0], x[1]); | |
} | |
if (a.invert && b.invert) compose.invert = function(x, y) { | |
return x = b.invert(x, y), x && a.invert(x[0], x[1]); | |
}; | |
return compose; | |
} | |
function rotationIdentity(lambda, phi) { | |
return [abs(lambda) > pi ? lambda + Math.round(-lambda / tau) * tau : lambda, phi]; | |
} | |
rotationIdentity.invert = rotationIdentity; | |
function rotateRadians(deltaLambda, deltaPhi, deltaGamma) { | |
return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma)) | |
: rotationLambda(deltaLambda)) | |
: (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma) | |
: rotationIdentity); | |
} | |
function forwardRotationLambda(deltaLambda) { | |
return function(lambda, phi) { | |
return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi]; | |
}; | |
} | |
function rotationLambda(deltaLambda) { | |
var rotation = forwardRotationLambda(deltaLambda); | |
rotation.invert = forwardRotationLambda(-deltaLambda); | |
return rotation; | |
} | |
function rotationPhiGamma(deltaPhi, deltaGamma) { | |
var cosDeltaPhi = cos(deltaPhi), | |
sinDeltaPhi = sin(deltaPhi), | |
cosDeltaGamma = cos(deltaGamma), | |
sinDeltaGamma = sin(deltaGamma); | |
function rotation(lambda, phi) { | |
var cosPhi = cos(phi), | |
x = cos(lambda) * cosPhi, | |
y = sin(lambda) * cosPhi, | |
z = sin(phi), | |
k = z * cosDeltaPhi + x * sinDeltaPhi; | |
return [ | |
atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), | |
asin(k * cosDeltaGamma + y * sinDeltaGamma) | |
]; | |
} | |
rotation.invert = function(lambda, phi) { | |
var cosPhi = cos(phi), | |
x = cos(lambda) * cosPhi, | |
y = sin(lambda) * cosPhi, | |
z = sin(phi), | |
k = z * cosDeltaGamma - y * sinDeltaGamma; | |
return [ | |
atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), | |
asin(k * cosDeltaPhi - x * sinDeltaPhi) | |
]; | |
}; | |
return rotation; | |
} | |
// Generates a circle centered at [0°, 0°], with a given radius and precision. | |
function circleStream(stream, radius, delta, direction, t0, t1) { | |
if (!delta) return; | |
var cosRadius = cos(radius), | |
sinRadius = sin(radius), | |
step = direction * delta; | |
if (t0 == null) { | |
t0 = radius + direction * tau; | |
t1 = radius - step / 2; | |
} else { | |
t0 = circleRadius(cosRadius, t0); | |
t1 = circleRadius(cosRadius, t1); | |
if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau; | |
} | |
for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) { | |
point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]); | |
stream.point(point[0], point[1]); | |
} | |
} | |
// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0]. | |
function circleRadius(cosRadius, point) { | |
point = cartesian(point), point[0] -= cosRadius; | |
cartesianNormalizeInPlace(point); | |
var radius = acos(-point[1]); | |
return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau; | |
} | |
function clipBuffer() { | |
var lines = [], | |
line; | |
return { | |
point: function(x, y, m) { | |
line.push([x, y, m]); | |
}, | |
lineStart: function() { | |
lines.push(line = []); | |
}, | |
lineEnd: noop$2, | |
rejoin: function() { | |
if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); | |
}, | |
result: function() { | |
var result = lines; | |
lines = []; | |
line = null; | |
return result; | |
} | |
}; | |
} | |
function pointEqual(a, b) { | |
return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon; | |
} | |
function Intersection(point, points, other, entry) { | |
this.x = point; | |
this.z = points; | |
this.o = other; // another intersection | |
this.e = entry; // is an entry? | |
this.v = false; // visited | |
this.n = this.p = null; // next & previous | |
} | |
// A generalized polygon clipping algorithm: given a polygon that has been cut | |
// into its visible line segments, and rejoins the segments by interpolating | |
// along the clip edge. | |
function clipRejoin(segments, compareIntersection, startInside, interpolate, stream) { | |
var subject = [], | |
clip = [], | |
i, | |
n; | |
segments.forEach(function(segment) { | |
if ((n = segment.length - 1) <= 0) return; | |
var n, p0 = segment[0], p1 = segment[n], x; | |
if (pointEqual(p0, p1)) { | |
if (!p0[2] && !p1[2]) { | |
stream.lineStart(); | |
for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]); | |
stream.lineEnd(); | |
return; | |
} | |
// handle degenerate cases by moving the point | |
p1[0] += 2 * epsilon; | |
} | |
subject.push(x = new Intersection(p0, segment, null, true)); | |
clip.push(x.o = new Intersection(p0, null, x, false)); | |
subject.push(x = new Intersection(p1, segment, null, false)); | |
clip.push(x.o = new Intersection(p1, null, x, true)); | |
}); | |
if (!subject.length) return; | |
clip.sort(compareIntersection); | |
link(subject); | |
link(clip); | |
for (i = 0, n = clip.length; i < n; ++i) { | |
clip[i].e = startInside = !startInside; | |
} | |
var start = subject[0], | |
points, | |
point; | |
while (1) { | |
// Find first unvisited intersection. | |
var current = start, | |
isSubject = true; | |
while (current.v) if ((current = current.n) === start) return; | |
points = current.z; | |
stream.lineStart(); | |
do { | |
current.v = current.o.v = true; | |
if (current.e) { | |
if (isSubject) { | |
for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]); | |
} else { | |
interpolate(current.x, current.n.x, 1, stream); | |
} | |
current = current.n; | |
} else { | |
if (isSubject) { | |
points = current.p.z; | |
for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]); | |
} else { | |
interpolate(current.x, current.p.x, -1, stream); | |
} | |
current = current.p; | |
} | |
current = current.o; | |
points = current.z; | |
isSubject = !isSubject; | |
} while (!current.v); | |
stream.lineEnd(); | |
} | |
} | |
function link(array) { | |
if (!(n = array.length)) return; | |
var n, | |
i = 0, | |
a = array[0], | |
b; | |
while (++i < n) { | |
a.n = b = array[i]; | |
b.p = a; | |
a = b; | |
} | |
a.n = b = array[0]; | |
b.p = a; | |
} | |
function longitude(point) { | |
return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi); | |
} | |
function polygonContains(polygon, point) { | |
var lambda = longitude(point), | |
phi = point[1], | |
sinPhi = sin(phi), | |
normal = [sin(lambda), -cos(lambda), 0], | |
angle = 0, | |
winding = 0; | |
var sum = new Adder(); | |
if (sinPhi === 1) phi = halfPi + epsilon; | |
else if (sinPhi === -1) phi = -halfPi - epsilon; | |
for (var i = 0, n = polygon.length; i < n; ++i) { | |
if (!(m = (ring = polygon[i]).length)) continue; | |
var ring, | |
m, | |
point0 = ring[m - 1], | |
lambda0 = longitude(point0), | |
phi0 = point0[1] / 2 + quarterPi, | |
sinPhi0 = sin(phi0), | |
cosPhi0 = cos(phi0); | |
for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) { | |
var point1 = ring[j], | |
lambda1 = longitude(point1), | |
phi1 = point1[1] / 2 + quarterPi, | |
sinPhi1 = sin(phi1), | |
cosPhi1 = cos(phi1), | |
delta = lambda1 - lambda0, | |
sign = delta >= 0 ? 1 : -1, | |
absDelta = sign * delta, | |
antimeridian = absDelta > pi, | |
k = sinPhi0 * sinPhi1; | |
sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta))); | |
angle += antimeridian ? delta + sign * tau : delta; | |
// Are the longitudes either side of the point’s meridian (lambda), | |
// and are the latitudes smaller than the parallel (phi)? | |
if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) { | |
var arc = cartesianCross(cartesian(point0), cartesian(point1)); | |
cartesianNormalizeInPlace(arc); | |
var intersection = cartesianCross(normal, arc); | |
cartesianNormalizeInPlace(intersection); | |
var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]); | |
if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) { | |
winding += antimeridian ^ delta >= 0 ? 1 : -1; | |
} | |
} | |
} | |
} | |
// First, determine whether the South pole is inside or outside: | |
// | |
// It is inside if: | |
// * the polygon winds around it in a clockwise direction. | |
// * the polygon does not (cumulatively) wind around it, but has a negative | |
// (counter-clockwise) area. | |
// | |
// Second, count the (signed) number of times a segment crosses a lambda | |
// from the point to the South pole. If it is zero, then the point is the | |
// same side as the South pole. | |
return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1); | |
} | |
function clip(pointVisible, clipLine, interpolate, start) { | |
return function(sink) { | |
var line = clipLine(sink), | |
ringBuffer = clipBuffer(), | |
ringSink = clipLine(ringBuffer), | |
polygonStarted = false, | |
polygon, | |
segments, | |
ring; | |
var clip = { | |
point: point, | |
lineStart: lineStart, | |
lineEnd: lineEnd, | |
polygonStart: function() { | |
clip.point = pointRing; | |
clip.lineStart = ringStart; | |
clip.lineEnd = ringEnd; | |
segments = []; | |
polygon = []; | |
}, | |
polygonEnd: function() { | |
clip.point = point; | |
clip.lineStart = lineStart; | |
clip.lineEnd = lineEnd; | |
segments = merge(segments); | |
var startInside = polygonContains(polygon, start); | |
if (segments.length) { | |
if (!polygonStarted) sink.polygonStart(), polygonStarted = true; | |
clipRejoin(segments, compareIntersection, startInside, interpolate, sink); | |
} else if (startInside) { | |
if (!polygonStarted) sink.polygonStart(), polygonStarted = true; | |
sink.lineStart(); | |
interpolate(null, null, 1, sink); | |
sink.lineEnd(); | |
} | |
if (polygonStarted) sink.polygonEnd(), polygonStarted = false; | |
segments = polygon = null; | |
}, | |
sphere: function() { | |
sink.polygonStart(); | |
sink.lineStart(); | |
interpolate(null, null, 1, sink); | |
sink.lineEnd(); | |
sink.polygonEnd(); | |
} | |
}; | |
function point(lambda, phi) { | |
if (pointVisible(lambda, phi)) sink.point(lambda, phi); | |
} | |
function pointLine(lambda, phi) { | |
line.point(lambda, phi); | |
} | |
function lineStart() { | |
clip.point = pointLine; | |
line.lineStart(); | |
} | |
function lineEnd() { | |
clip.point = point; | |
line.lineEnd(); | |
} | |
function pointRing(lambda, phi) { | |
ring.push([lambda, phi]); | |
ringSink.point(lambda, phi); | |
} | |
function ringStart() { | |
ringSink.lineStart(); | |
ring = []; | |
} | |
function ringEnd() { | |
pointRing(ring[0][0], ring[0][1]); | |
ringSink.lineEnd(); | |
var clean = ringSink.clean(), | |
ringSegments = ringBuffer.result(), | |
i, n = ringSegments.length, m, | |
segment, | |
point; | |
ring.pop(); | |
polygon.push(ring); | |
ring = null; | |
if (!n) return; | |
// No intersections. | |
if (clean & 1) { | |
segment = ringSegments[0]; | |
if ((m = segment.length - 1) > 0) { | |
if (!polygonStarted) sink.polygonStart(), polygonStarted = true; | |
sink.lineStart(); | |
for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]); | |
sink.lineEnd(); | |
} | |
return; | |
} | |
// Rejoin connected segments. | |
// TODO reuse ringBuffer.rejoin()? | |
if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); | |
segments.push(ringSegments.filter(validSegment)); | |
} | |
return clip; | |
}; | |
} | |
function validSegment(segment) { | |
return segment.length > 1; | |
} | |
// Intersections are sorted along the clip edge. For both antimeridian cutting | |
// and circle clipping, the same comparison is used. | |
function compareIntersection(a, b) { | |
return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1]) | |
- ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]); | |
} | |
var clipAntimeridian = clip( | |
function() { return true; }, | |
clipAntimeridianLine, | |
clipAntimeridianInterpolate, | |
[-pi, -halfPi] | |
); | |
// Takes a line and cuts into visible segments. Return values: 0 - there were | |
// intersections or the line was empty; 1 - no intersections; 2 - there were | |
// intersections, and the first and last segments should be rejoined. | |
function clipAntimeridianLine(stream) { | |
var lambda0 = NaN, | |
phi0 = NaN, | |
sign0 = NaN, | |
clean; // no intersections | |
return { | |
lineStart: function() { | |
stream.lineStart(); | |
clean = 1; | |
}, | |
point: function(lambda1, phi1) { | |
var sign1 = lambda1 > 0 ? pi : -pi, | |
delta = abs(lambda1 - lambda0); | |
if (abs(delta - pi) < epsilon) { // line crosses a pole | |
stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi); | |
stream.point(sign0, phi0); | |
stream.lineEnd(); | |
stream.lineStart(); | |
stream.point(sign1, phi0); | |
stream.point(lambda1, phi0); | |
clean = 0; | |
} else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian | |
if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies | |
if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon; | |
phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1); | |
stream.point(sign0, phi0); | |
stream.lineEnd(); | |
stream.lineStart(); | |
stream.point(sign1, phi0); | |
clean = 0; | |
} | |
stream.point(lambda0 = lambda1, phi0 = phi1); | |
sign0 = sign1; | |
}, | |
lineEnd: function() { | |
stream.lineEnd(); | |
lambda0 = phi0 = NaN; | |
}, | |
clean: function() { | |
return 2 - clean; // if intersections, rejoin first and last segments | |
} | |
}; | |
} | |
function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) { | |
var cosPhi0, | |
cosPhi1, | |
sinLambda0Lambda1 = sin(lambda0 - lambda1); | |
return abs(sinLambda0Lambda1) > epsilon | |
? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1) | |
- sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0)) | |
/ (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) | |
: (phi0 + phi1) / 2; | |
} | |
function clipAntimeridianInterpolate(from, to, direction, stream) { | |
var phi; | |
if (from == null) { | |
phi = direction * halfPi; | |
stream.point(-pi, phi); | |
stream.point(0, phi); | |
stream.point(pi, phi); | |
stream.point(pi, 0); | |
stream.point(pi, -phi); | |
stream.point(0, -phi); | |
stream.point(-pi, -phi); | |
stream.point(-pi, 0); | |
stream.point(-pi, phi); | |
} else if (abs(from[0] - to[0]) > epsilon) { | |
var lambda = from[0] < to[0] ? pi : -pi; | |
phi = direction * lambda / 2; | |
stream.point(-lambda, phi); | |
stream.point(0, phi); | |
stream.point(lambda, phi); | |
} else { | |
stream.point(to[0], to[1]); | |
} | |
} | |
function clipCircle(radius) { | |
var cr = cos(radius), | |
delta = 6 * radians, | |
smallRadius = cr > 0, | |
notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case | |
function interpolate(from, to, direction, stream) { | |
circleStream(stream, radius, delta, direction, from, to); | |
} | |
function visible(lambda, phi) { | |
return cos(lambda) * cos(phi) > cr; | |
} | |
// Takes a line and cuts into visible segments. Return values used for polygon | |
// clipping: 0 - there were intersections or the line was empty; 1 - no | |
// intersections 2 - there were intersections, and the first and last segments | |
// should be rejoined. | |
function clipLine(stream) { | |
var point0, // previous point | |
c0, // code for previous point | |
v0, // visibility of previous point | |
v00, // visibility of first point | |
clean; // no intersections | |
return { | |
lineStart: function() { | |
v00 = v0 = false; | |
clean = 1; | |
}, | |
point: function(lambda, phi) { | |
var point1 = [lambda, phi], | |
point2, | |
v = visible(lambda, phi), | |
c = smallRadius | |
? v ? 0 : code(lambda, phi) | |
: v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0; | |
if (!point0 && (v00 = v0 = v)) stream.lineStart(); | |
if (v !== v0) { | |
point2 = intersect(point0, point1); | |
if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2)) | |
point1[2] = 1; | |
} | |
if (v !== v0) { | |
clean = 0; | |
if (v) { | |
// outside going in | |
stream.lineStart(); | |
point2 = intersect(point1, point0); | |
stream.point(point2[0], point2[1]); | |
} else { | |
// inside going out | |
point2 = intersect(point0, point1); | |
stream.point(point2[0], point2[1], 2); | |
stream.lineEnd(); | |
} | |
point0 = point2; | |
} else if (notHemisphere && point0 && smallRadius ^ v) { | |
var t; | |
// If the codes for two points are different, or are both zero, | |
// and there this segment intersects with the small circle. | |
if (!(c & c0) && (t = intersect(point1, point0, true))) { | |
clean = 0; | |
if (smallRadius) { | |
stream.lineStart(); | |
stream.point(t[0][0], t[0][1]); | |
stream.point(t[1][0], t[1][1]); | |
stream.lineEnd(); | |
} else { | |
stream.point(t[1][0], t[1][1]); | |
stream.lineEnd(); | |
stream.lineStart(); | |
stream.point(t[0][0], t[0][1], 3); | |
} | |
} | |
} | |
if (v && (!point0 || !pointEqual(point0, point1))) { | |
stream.point(point1[0], point1[1]); | |
} | |
point0 = point1, v0 = v, c0 = c; | |
}, | |
lineEnd: function() { | |
if (v0) stream.lineEnd(); | |
point0 = null; | |
}, | |
// Rejoin first and last segments if there were intersections and the first | |
// and last points were visible. | |
clean: function() { | |
return clean | ((v00 && v0) << 1); | |
} | |
}; | |
} | |
// Intersects the great circle between a and b with the clip circle. | |
function intersect(a, b, two) { | |
var pa = cartesian(a), | |
pb = cartesian(b); | |
// We have two planes, n1.p = d1 and n2.p = d2. | |
// Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2). | |
var n1 = [1, 0, 0], // normal | |
n2 = cartesianCross(pa, pb), | |
n2n2 = cartesianDot(n2, n2), | |
n1n2 = n2[0], // cartesianDot(n1, n2), | |
determinant = n2n2 - n1n2 * n1n2; | |
// Two polar points. | |
if (!determinant) return !two && a; | |
var c1 = cr * n2n2 / determinant, | |
c2 = -cr * n1n2 / determinant, | |
n1xn2 = cartesianCross(n1, n2), | |
A = cartesianScale(n1, c1), | |
B = cartesianScale(n2, c2); | |
cartesianAddInPlace(A, B); | |
// Solve |p(t)|^2 = 1. | |
var u = n1xn2, | |
w = cartesianDot(A, u), | |
uu = cartesianDot(u, u), | |
t2 = w * w - uu * (cartesianDot(A, A) - 1); | |
if (t2 < 0) return; | |
var t = sqrt(t2), | |
q = cartesianScale(u, (-w - t) / uu); | |
cartesianAddInPlace(q, A); | |
q = spherical(q); | |
if (!two) return q; | |
// Two intersection points. | |
var lambda0 = a[0], | |
lambda1 = b[0], | |
phi0 = a[1], | |
phi1 = b[1], | |
z; | |
if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z; | |
var delta = lambda1 - lambda0, | |
polar = abs(delta - pi) < epsilon, | |
meridian = polar || delta < epsilon; | |
if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z; | |
// Check that the first point is between a and b. | |
if (meridian | |
? polar | |
? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1) | |
: phi0 <= q[1] && q[1] <= phi1 | |
: delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) { | |
var q1 = cartesianScale(u, (-w + t) / uu); | |
cartesianAddInPlace(q1, A); | |
return [q, spherical(q1)]; | |
} | |
} | |
// Generates a 4-bit vector representing the location of a point relative to | |
// the small circle's bounding box. | |
function code(lambda, phi) { | |
var r = smallRadius ? radius : pi - radius, | |
code = 0; | |
if (lambda < -r) code |= 1; // left | |
else if (lambda > r) code |= 2; // right | |
if (phi < -r) code |= 4; // below | |
else if (phi > r) code |= 8; // above | |
return code; | |
} | |
return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]); | |
} | |
function clipLine(a, b, x0, y0, x1, y1) { | |
var ax = a[0], | |
ay = a[1], | |
bx = b[0], | |
by = b[1], | |
t0 = 0, | |
t1 = 1, | |
dx = bx - ax, | |
dy = by - ay, | |
r; | |
r = x0 - ax; | |
if (!dx && r > 0) return; | |
r /= dx; | |
if (dx < 0) { | |
if (r < t0) return; | |
if (r < t1) t1 = r; | |
} else if (dx > 0) { | |
if (r > t1) return; | |
if (r > t0) t0 = r; | |
} | |
r = x1 - ax; | |
if (!dx && r < 0) return; | |
r /= dx; | |
if (dx < 0) { | |
if (r > t1) return; | |
if (r > t0) t0 = r; | |
} else if (dx > 0) { | |
if (r < t0) return; | |
if (r < t1) t1 = r; | |
} | |
r = y0 - ay; | |
if (!dy && r > 0) return; | |
r /= dy; | |
if (dy < 0) { | |
if (r < t0) return; | |
if (r < t1) t1 = r; | |
} else if (dy > 0) { | |
if (r > t1) return; | |
if (r > t0) t0 = r; | |
} | |
r = y1 - ay; | |
if (!dy && r < 0) return; | |
r /= dy; | |
if (dy < 0) { | |
if (r > t1) return; | |
if (r > t0) t0 = r; | |
} else if (dy > 0) { | |
if (r < t0) return; | |
if (r < t1) t1 = r; | |
} | |
if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy; | |
if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy; | |
return true; | |
} | |
var clipMax = 1e9, clipMin = -clipMax; | |
// TODO Use d3-polygon’s polygonContains here for the ring check? | |
// TODO Eliminate duplicate buffering in clipBuffer and polygon.push? | |
function clipRectangle(x0, y0, x1, y1) { | |
function visible(x, y) { | |
return x0 <= x && x <= x1 && y0 <= y && y <= y1; | |
} | |
function interpolate(from, to, direction, stream) { | |
var a = 0, a1 = 0; | |
if (from == null | |
|| (a = corner(from, direction)) !== (a1 = corner(to, direction)) | |
|| comparePoint(from, to) < 0 ^ direction > 0) { | |
do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); | |
while ((a = (a + direction + 4) % 4) !== a1); | |
} else { | |
stream.point(to[0], to[1]); | |
} | |
} | |
function corner(p, direction) { | |
return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3 | |
: abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1 | |
: abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0 | |
: direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon | |
} | |
function compareIntersection(a, b) { | |
return comparePoint(a.x, b.x); | |
} | |
function comparePoint(a, b) { | |
var ca = corner(a, 1), | |
cb = corner(b, 1); | |
return ca !== cb ? ca - cb | |
: ca === 0 ? b[1] - a[1] | |
: ca === 1 ? a[0] - b[0] | |
: ca === 2 ? a[1] - b[1] | |
: b[0] - a[0]; | |
} | |
return function(stream) { | |
var activeStream = stream, | |
bufferStream = clipBuffer(), | |
segments, | |
polygon, | |
ring, | |
x__, y__, v__, // first point | |
x_, y_, v_, // previous point | |
first, | |
clean; | |
var clipStream = { | |
point: point, | |
lineStart: lineStart, | |
lineEnd: lineEnd, | |
polygonStart: polygonStart, | |
polygonEnd: polygonEnd | |
}; | |
function point(x, y) { | |
if (visible(x, y)) activeStream.point(x, y); | |
} | |
function polygonInside() { | |
var winding = 0; | |
for (var i = 0, n = polygon.length; i < n; ++i) { | |
for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) { | |
a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1]; | |
if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; } | |
else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; } | |
} | |
} | |
return winding; | |
} | |
// Buffer geometry within a polygon and then clip it en masse. | |
function polygonStart() { | |
activeStream = bufferStream, segments = [], polygon = [], clean = true; | |
} | |
function polygonEnd() { | |
var startInside = polygonInside(), | |
cleanInside = clean && startInside, | |
visible = (segments = merge(segments)).length; | |
if (cleanInside || visible) { | |
stream.polygonStart(); | |
if (cleanInside) { | |
stream.lineStart(); | |
interpolate(null, null, 1, stream); | |
stream.lineEnd(); | |
} | |
if (visible) { | |
clipRejoin(segments, compareIntersection, startInside, interpolate, stream); | |
} | |
stream.polygonEnd(); | |
} | |
activeStream = stream, segments = polygon = ring = null; | |
} | |
function lineStart() { | |
clipStream.point = linePoint; | |
if (polygon) polygon.push(ring = []); | |
first = true; | |
v_ = false; | |
x_ = y_ = NaN; | |
} | |
// TODO rather than special-case polygons, simply handle them separately. | |
// Ideally, coincident intersection points should be jittered to avoid | |
// clipping issues. | |
function lineEnd() { | |
if (segments) { | |
linePoint(x__, y__); | |
if (v__ && v_) bufferStream.rejoin(); | |
segments.push(bufferStream.result()); | |
} | |
clipStream.point = point; | |
if (v_) activeStream.lineEnd(); | |
} | |
function linePoint(x, y) { | |
var v = visible(x, y); | |
if (polygon) ring.push([x, y]); | |
if (first) { | |
x__ = x, y__ = y, v__ = v; | |
first = false; | |
if (v) { | |
activeStream.lineStart(); | |
activeStream.point(x, y); | |
} | |
} else { | |
if (v && v_) activeStream.point(x, y); | |
else { | |
var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))], | |
b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))]; | |
if (clipLine(a, b, x0, y0, x1, y1)) { | |
if (!v_) { | |
activeStream.lineStart(); | |
activeStream.point(a[0], a[1]); | |
} | |
activeStream.point(b[0], b[1]); | |
if (!v) activeStream.lineEnd(); | |
clean = false; | |
} else if (v) { | |
activeStream.lineStart(); | |
activeStream.point(x, y); | |
clean = false; | |
} | |
} | |
} | |
x_ = x, y_ = y, v_ = v; | |
} | |
return clipStream; | |
}; | |
} | |
var identity$1 = x => x; | |
var areaSum = new Adder(), | |
areaRingSum = new Adder(), | |
x00$2, | |
y00$2, | |
x0$3, | |
y0$3; | |
var areaStream = { | |
point: noop$2, | |
lineStart: noop$2, | |
lineEnd: noop$2, | |
polygonStart: function() { | |
areaStream.lineStart = areaRingStart; | |
areaStream.lineEnd = areaRingEnd; | |
}, | |
polygonEnd: function() { | |
areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop$2; | |
areaSum.add(abs(areaRingSum)); | |
areaRingSum = new Adder(); | |
}, | |
result: function() { | |
var area = areaSum / 2; | |
areaSum = new Adder(); | |
return area; | |
} | |
}; | |
function areaRingStart() { | |
areaStream.point = areaPointFirst; | |
} | |
function areaPointFirst(x, y) { | |
areaStream.point = areaPoint; | |
x00$2 = x0$3 = x, y00$2 = y0$3 = y; | |
} | |
function areaPoint(x, y) { | |
areaRingSum.add(y0$3 * x - x0$3 * y); | |
x0$3 = x, y0$3 = y; | |
} | |
function areaRingEnd() { | |
areaPoint(x00$2, y00$2); | |
} | |
var x0$2 = Infinity, | |
y0$2 = x0$2, | |
x1 = -x0$2, | |
y1 = x1; | |
var boundsStream = { | |
point: boundsPoint, | |
lineStart: noop$2, | |
lineEnd: noop$2, | |
polygonStart: noop$2, | |
polygonEnd: noop$2, | |
result: function() { | |
var bounds = [[x0$2, y0$2], [x1, y1]]; | |
x1 = y1 = -(y0$2 = x0$2 = Infinity); | |
return bounds; | |
} | |
}; | |
function boundsPoint(x, y) { | |
if (x < x0$2) x0$2 = x; | |
if (x > x1) x1 = x; | |
if (y < y0$2) y0$2 = y; | |
if (y > y1) y1 = y; | |
} | |
// TODO Enforce positive area for exterior, negative area for interior? | |
var X0 = 0, | |
Y0 = 0, | |
Z0 = 0, | |
X1 = 0, | |
Y1 = 0, | |
Z1 = 0, | |
X2 = 0, | |
Y2 = 0, | |
Z2 = 0, | |
x00$1, | |
y00$1, | |
x0$1, | |
y0$1; | |
var centroidStream = { | |
point: centroidPoint, | |
lineStart: centroidLineStart, | |
lineEnd: centroidLineEnd, | |
polygonStart: function() { | |
centroidStream.lineStart = centroidRingStart; | |
centroidStream.lineEnd = centroidRingEnd; | |
}, | |
polygonEnd: function() { | |
centroidStream.point = centroidPoint; | |
centroidStream.lineStart = centroidLineStart; | |
centroidStream.lineEnd = centroidLineEnd; | |
}, | |
result: function() { | |
var centroid = Z2 ? [X2 / Z2, Y2 / Z2] | |
: Z1 ? [X1 / Z1, Y1 / Z1] | |
: Z0 ? [X0 / Z0, Y0 / Z0] | |
: [NaN, NaN]; | |
X0 = Y0 = Z0 = | |
X1 = Y1 = Z1 = | |
X2 = Y2 = Z2 = 0; | |
return centroid; | |
} | |
}; | |
function centroidPoint(x, y) { | |
X0 += x; | |
Y0 += y; | |
++Z0; | |
} | |
function centroidLineStart() { | |
centroidStream.point = centroidPointFirstLine; | |
} | |
function centroidPointFirstLine(x, y) { | |
centroidStream.point = centroidPointLine; | |
centroidPoint(x0$1 = x, y0$1 = y); | |
} | |
function centroidPointLine(x, y) { | |
var dx = x - x0$1, dy = y - y0$1, z = sqrt(dx * dx + dy * dy); | |
X1 += z * (x0$1 + x) / 2; | |
Y1 += z * (y0$1 + y) / 2; | |
Z1 += z; | |
centroidPoint(x0$1 = x, y0$1 = y); | |
} | |
function centroidLineEnd() { | |
centroidStream.point = centroidPoint; | |
} | |
function centroidRingStart() { | |
centroidStream.point = centroidPointFirstRing; | |
} | |
function centroidRingEnd() { | |
centroidPointRing(x00$1, y00$1); | |
} | |
function centroidPointFirstRing(x, y) { | |
centroidStream.point = centroidPointRing; | |
centroidPoint(x00$1 = x0$1 = x, y00$1 = y0$1 = y); | |
} | |
function centroidPointRing(x, y) { | |
var dx = x - x0$1, | |
dy = y - y0$1, | |
z = sqrt(dx * dx + dy * dy); | |
X1 += z * (x0$1 + x) / 2; | |
Y1 += z * (y0$1 + y) / 2; | |
Z1 += z; | |
z = y0$1 * x - x0$1 * y; | |
X2 += z * (x0$1 + x); | |
Y2 += z * (y0$1 + y); | |
Z2 += z * 3; | |
centroidPoint(x0$1 = x, y0$1 = y); | |
} | |
function PathContext(context) { | |
this._context = context; | |
} | |
PathContext.prototype = { | |
_radius: 4.5, | |
pointRadius: function(_) { | |
return this._radius = _, this; | |
}, | |
polygonStart: function() { | |
this._line = 0; | |
}, | |
polygonEnd: function() { | |
this._line = NaN; | |
}, | |
lineStart: function() { | |
this._point = 0; | |
}, | |
lineEnd: function() { | |
if (this._line === 0) this._context.closePath(); | |
this._point = NaN; | |
}, | |
point: function(x, y) { | |
switch (this._point) { | |
case 0: { | |
this._context.moveTo(x, y); | |
this._point = 1; | |
break; | |
} | |
case 1: { | |
this._context.lineTo(x, y); | |
break; | |
} | |
default: { | |
this._context.moveTo(x + this._radius, y); | |
this._context.arc(x, y, this._radius, 0, tau); | |
break; | |
} | |
} | |
}, | |
result: noop$2 | |
}; | |
var lengthSum = new Adder(), | |
lengthRing, | |
x00, | |
y00, | |
x0, | |
y0; | |
var lengthStream = { | |
point: noop$2, | |
lineStart: function() { | |
lengthStream.point = lengthPointFirst; | |
}, | |
lineEnd: function() { | |
if (lengthRing) lengthPoint(x00, y00); | |
lengthStream.point = noop$2; | |
}, | |
polygonStart: function() { | |
lengthRing = true; | |
}, | |
polygonEnd: function() { | |
lengthRing = null; | |
}, | |
result: function() { | |
var length = +lengthSum; | |
lengthSum = new Adder(); | |
return length; | |
} | |
}; | |
function lengthPointFirst(x, y) { | |
lengthStream.point = lengthPoint; | |
x00 = x0 = x, y00 = y0 = y; | |
} | |
function lengthPoint(x, y) { | |
x0 -= x, y0 -= y; | |
lengthSum.add(sqrt(x0 * x0 + y0 * y0)); | |
x0 = x, y0 = y; | |
} | |
function PathString() { | |
this._string = []; | |
} | |
PathString.prototype = { | |
_radius: 4.5, | |
_circle: circle(4.5), | |
pointRadius: function(_) { | |
if ((_ = +_) !== this._radius) this._radius = _, this._circle = null; | |
return this; | |
}, | |
polygonStart: function() { | |
this._line = 0; | |
}, | |
polygonEnd: function() { | |
this._line = NaN; | |
}, | |
lineStart: function() { | |
this._point = 0; | |
}, | |
lineEnd: function() { | |
if (this._line === 0) this._string.push("Z"); | |
this._point = NaN; | |
}, | |
point: function(x, y) { | |
switch (this._point) { | |
case 0: { | |
this._string.push("M", x, ",", y); | |
this._point = 1; | |
break; | |
} | |
case 1: { | |
this._string.push("L", x, ",", y); | |
break; | |
} | |
default: { | |
if (this._circle == null) this._circle = circle(this._radius); | |
this._string.push("M", x, ",", y, this._circle); | |
break; | |
} | |
} | |
}, | |
result: function() { | |
if (this._string.length) { | |
var result = this._string.join(""); | |
this._string = []; | |
return result; | |
} else { | |
return null; | |
} | |
} | |
}; | |
function circle(radius) { | |
return "m0," + radius | |
+ "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius | |
+ "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius | |
+ "z"; | |
} | |
function geoPath(projection, context) { | |
var pointRadius = 4.5, | |
projectionStream, | |
contextStream; | |
function path(object) { | |
if (object) { | |
if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); | |
geoStream(object, projectionStream(contextStream)); | |
} | |
return contextStream.result(); | |
} | |
path.area = function(object) { | |
geoStream(object, projectionStream(areaStream)); | |
return areaStream.result(); | |
}; | |
path.measure = function(object) { | |
geoStream(object, projectionStream(lengthStream)); | |
return lengthStream.result(); | |
}; | |
path.bounds = function(object) { | |
geoStream(object, projectionStream(boundsStream)); | |
return boundsStream.result(); | |
}; | |
path.centroid = function(object) { | |
geoStream(object, projectionStream(centroidStream)); | |
return centroidStream.result(); | |
}; | |
path.projection = function(_) { | |
return arguments.length ? (projectionStream = _ == null ? (projection = null, identity$1) : (projection = _).stream, path) : projection; | |
}; | |
path.context = function(_) { | |
if (!arguments.length) return context; | |
contextStream = _ == null ? (context = null, new PathString) : new PathContext(context = _); | |
if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); | |
return path; | |
}; | |
path.pointRadius = function(_) { | |
if (!arguments.length) return pointRadius; | |
pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); | |
return path; | |
}; | |
return path.projection(projection).context(context); | |
} | |
function transformer(methods) { | |
return function(stream) { | |
var s = new TransformStream; | |
for (var key in methods) s[key] = methods[key]; | |
s.stream = stream; | |
return s; | |
}; | |
} | |
function TransformStream() {} | |
TransformStream.prototype = { | |
constructor: TransformStream, | |
point: function(x, y) { this.stream.point(x, y); }, | |
sphere: function() { this.stream.sphere(); }, | |
lineStart: function() { this.stream.lineStart(); }, | |
lineEnd: function() { this.stream.lineEnd(); }, | |
polygonStart: function() { this.stream.polygonStart(); }, | |
polygonEnd: function() { this.stream.polygonEnd(); } | |
}; | |
function fit(projection, fitBounds, object) { | |
var clip = projection.clipExtent && projection.clipExtent(); | |
projection.scale(150).translate([0, 0]); | |
if (clip != null) projection.clipExtent(null); | |
geoStream(object, projection.stream(boundsStream)); | |
fitBounds(boundsStream.result()); | |
if (clip != null) projection.clipExtent(clip); | |
return projection; | |
} | |
function fitExtent(projection, extent, object) { | |
return fit(projection, function(b) { | |
var w = extent[1][0] - extent[0][0], | |
h = extent[1][1] - extent[0][1], | |
k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])), | |
x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2, | |
y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2; | |
projection.scale(150 * k).translate([x, y]); | |
}, object); | |
} | |
function fitSize(projection, size, object) { | |
return fitExtent(projection, [[0, 0], size], object); | |
} | |
function fitWidth(projection, width, object) { | |
return fit(projection, function(b) { | |
var w = +width, | |
k = w / (b[1][0] - b[0][0]), | |
x = (w - k * (b[1][0] + b[0][0])) / 2, | |
y = -k * b[0][1]; | |
projection.scale(150 * k).translate([x, y]); | |
}, object); | |
} | |
function fitHeight(projection, height, object) { | |
return fit(projection, function(b) { | |
var h = +height, | |
k = h / (b[1][1] - b[0][1]), | |
x = -k * b[0][0], | |
y = (h - k * (b[1][1] + b[0][1])) / 2; | |
projection.scale(150 * k).translate([x, y]); | |
}, object); | |
} | |
var maxDepth = 16, // maximum depth of subdivision | |
cosMinDistance = cos(30 * radians); // cos(minimum angular distance) | |
function resample(project, delta2) { | |
return +delta2 ? resample$1(project, delta2) : resampleNone(project); | |
} | |
function resampleNone(project) { | |
return transformer({ | |
point: function(x, y) { | |
x = project(x, y); | |
this.stream.point(x[0], x[1]); | |
} | |
}); | |
} | |
function resample$1(project, delta2) { | |
function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) { | |
var dx = x1 - x0, | |
dy = y1 - y0, | |
d2 = dx * dx + dy * dy; | |
if (d2 > 4 * delta2 && depth--) { | |
var a = a0 + a1, | |
b = b0 + b1, | |
c = c0 + c1, | |
m = sqrt(a * a + b * b + c * c), | |
phi2 = asin(c /= m), | |
lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a), | |
p = project(lambda2, phi2), | |
x2 = p[0], | |
y2 = p[1], | |
dx2 = x2 - x0, | |
dy2 = y2 - y0, | |
dz = dy * dx2 - dx * dy2; | |
if (dz * dz / d2 > delta2 // perpendicular projected distance | |
|| abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end | |
|| a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance | |
resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream); | |
stream.point(x2, y2); | |
resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream); | |
} | |
} | |
} | |
return function(stream) { | |
var lambda00, x00, y00, a00, b00, c00, // first point | |
lambda0, x0, y0, a0, b0, c0; // previous point | |
var resampleStream = { | |
point: point, | |
lineStart: lineStart, | |
lineEnd: lineEnd, | |
polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; }, | |
polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; } | |
}; | |
function point(x, y) { | |
x = project(x, y); | |
stream.point(x[0], x[1]); | |
} | |
function lineStart() { | |
x0 = NaN; | |
resampleStream.point = linePoint; | |
stream.lineStart(); | |
} | |
function linePoint(lambda, phi) { | |
var c = cartesian([lambda, phi]), p = project(lambda, phi); | |
resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); | |
stream.point(x0, y0); | |
} | |
function lineEnd() { | |
resampleStream.point = point; | |
stream.lineEnd(); | |
} | |
function ringStart() { | |
lineStart(); | |
resampleStream.point = ringPoint; | |
resampleStream.lineEnd = ringEnd; | |
} | |
function ringPoint(lambda, phi) { | |
linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; | |
resampleStream.point = linePoint; | |
} | |
function ringEnd() { | |
resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream); | |
resampleStream.lineEnd = lineEnd; | |
lineEnd(); | |
} | |
return resampleStream; | |
}; | |
} | |
var transformRadians = transformer({ | |
point: function(x, y) { | |
this.stream.point(x * radians, y * radians); | |
} | |
}); | |
function transformRotate(rotate) { | |
return transformer({ | |
point: function(x, y) { | |
var r = rotate(x, y); | |
return this.stream.point(r[0], r[1]); | |
} | |
}); | |
} | |
function scaleTranslate(k, dx, dy, sx, sy) { | |
function transform(x, y) { | |
x *= sx; y *= sy; | |
return [dx + k * x, dy - k * y]; | |
} | |
transform.invert = function(x, y) { | |
return [(x - dx) / k * sx, (dy - y) / k * sy]; | |
}; | |
return transform; | |
} | |
function scaleTranslateRotate(k, dx, dy, sx, sy, alpha) { | |
if (!alpha) return scaleTranslate(k, dx, dy, sx, sy); | |
var cosAlpha = cos(alpha), | |
sinAlpha = sin(alpha), | |
a = cosAlpha * k, | |
b = sinAlpha * k, | |
ai = cosAlpha / k, | |
bi = sinAlpha / k, | |
ci = (sinAlpha * dy - cosAlpha * dx) / k, | |
fi = (sinAlpha * dx + cosAlpha * dy) / k; | |
function transform(x, y) { | |
x *= sx; y *= sy; | |
return [a * x - b * y + dx, dy - b * x - a * y]; | |
} | |
transform.invert = function(x, y) { | |
return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)]; | |
}; | |
return transform; | |
} | |
function projection(project) { | |
return projectionMutator(function() { return project; })(); | |
} | |
function projectionMutator(projectAt) { | |
var project, | |
k = 150, // scale | |
x = 480, y = 250, // translate | |
lambda = 0, phi = 0, // center | |
deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate | |
alpha = 0, // post-rotate angle | |
sx = 1, // reflectX | |
sy = 1, // reflectX | |
theta = null, preclip = clipAntimeridian, // pre-clip angle | |
x0 = null, y0, x1, y1, postclip = identity$1, // post-clip extent | |
delta2 = 0.5, // precision | |
projectResample, | |
projectTransform, | |
projectRotateTransform, | |
cache, | |
cacheStream; | |
function projection(point) { | |
return projectRotateTransform(point[0] * radians, point[1] * radians); | |
} | |
function invert(point) { | |
point = projectRotateTransform.invert(point[0], point[1]); | |
return point && [point[0] * degrees, point[1] * degrees]; | |
} | |
projection.stream = function(stream) { | |
return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream))))); | |
}; | |
projection.preclip = function(_) { | |
return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip; | |
}; | |
projection.postclip = function(_) { | |
return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; | |
}; | |
projection.clipAngle = function(_) { | |
return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees; | |
}; | |
projection.clipExtent = function(_) { | |
return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity$1) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; | |
}; | |
projection.scale = function(_) { | |
return arguments.length ? (k = +_, recenter()) : k; | |
}; | |
projection.translate = function(_) { | |
return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y]; | |
}; | |
projection.center = function(_) { | |
return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees]; | |
}; | |
projection.rotate = function(_) { | |
return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees]; | |
}; | |
projection.angle = function(_) { | |
return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees; | |
}; | |
projection.reflectX = function(_) { | |
return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0; | |
}; | |
projection.reflectY = function(_) { | |
return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0; | |
}; | |
projection.precision = function(_) { | |
return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2); | |
}; | |
projection.fitExtent = function(extent, object) { | |
return fitExtent(projection, extent, object); | |
}; | |
projection.fitSize = function(size, object) { | |
return fitSize(projection, size, object); | |
}; | |
projection.fitWidth = function(width, object) { | |
return fitWidth(projection, width, object); | |
}; | |
projection.fitHeight = function(height, object) { | |
return fitHeight(projection, height, object); | |
}; | |
function recenter() { | |
var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)), | |
transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha); | |
rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma); | |
projectTransform = compose(project, transform); | |
projectRotateTransform = compose(rotate, projectTransform); | |
projectResample = resample(projectTransform, delta2); | |
return reset(); | |
} | |
function reset() { | |
cache = cacheStream = null; | |
return projection; | |
} | |
return function() { | |
project = projectAt.apply(this, arguments); | |
projection.invert = project.invert && invert; | |
return recenter(); | |
}; | |
} | |
var A1 = 1.340264, | |
A2 = -0.081106, | |
A3 = 0.000893, | |
A4 = 0.003796, | |
M = sqrt(3) / 2, | |
iterations = 12; | |
function equalEarthRaw(lambda, phi) { | |
var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2; | |
return [ | |
lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))), | |
l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) | |
]; | |
} | |
equalEarthRaw.invert = function(x, y) { | |
var l = y, l2 = l * l, l6 = l2 * l2 * l2; | |
for (var i = 0, delta, fy, fpy; i < iterations; ++i) { | |
fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y; | |
fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2); | |
l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2; | |
if (abs(delta) < epsilon2) break; | |
} | |
return [ | |
M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l), | |
asin(sin(l) / M) | |
]; | |
}; | |
function geoEqualEarth() { | |
return projection(equalEarthRaw) | |
.scale(177.158); | |
} | |
function identity(x) { | |
return x; | |
} | |
function transform(transform) { | |
if (transform == null) return identity; | |
var x0, | |
y0, | |
kx = transform.scale[0], | |
ky = transform.scale[1], | |
dx = transform.translate[0], | |
dy = transform.translate[1]; | |
return function(input, i) { | |
if (!i) x0 = y0 = 0; | |
var j = 2, n = input.length, output = new Array(n); | |
output[0] = (x0 += input[0]) * kx + dx; | |
output[1] = (y0 += input[1]) * ky + dy; | |
while (j < n) output[j] = input[j], ++j; | |
return output; | |
}; | |
} | |
function reverse(array, n) { | |
var t, j = array.length, i = j - n; | |
while (i < --j) t = array[i], array[i++] = array[j], array[j] = t; | |
} | |
function feature(topology, o) { | |
return o.type === "GeometryCollection" | |
? {type: "FeatureCollection", features: o.geometries.map(function(o) { return feature$1(topology, o); })} | |
: feature$1(topology, o); | |
} | |
function feature$1(topology, o) { | |
var id = o.id, | |
bbox = o.bbox, | |
properties = o.properties == null ? {} : o.properties, | |
geometry = object(topology, o); | |
return id == null && bbox == null ? {type: "Feature", properties: properties, geometry: geometry} | |
: bbox == null ? {type: "Feature", id: id, properties: properties, geometry: geometry} | |
: {type: "Feature", id: id, bbox: bbox, properties: properties, geometry: geometry}; | |
} | |
function object(topology, o) { | |
var transformPoint = transform(topology.transform), | |
arcs = topology.arcs; | |
function arc(i, points) { | |
if (points.length) points.pop(); | |
for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length; k < n; ++k) { | |
points.push(transformPoint(a[k], k)); | |
} | |
if (i < 0) reverse(points, n); | |
} | |
function point(p) { | |
return transformPoint(p); | |
} | |
function line(arcs) { | |
var points = []; | |
for (var i = 0, n = arcs.length; i < n; ++i) arc(arcs[i], points); | |
if (points.length < 2) points.push(points[0]); // This should never happen per the specification. | |
return points; | |
} | |
function ring(arcs) { | |
var points = line(arcs); | |
while (points.length < 4) points.push(points[0]); // This may happen if an arc has only two points. | |
return points; | |
} | |
function polygon(arcs) { | |
return arcs.map(ring); | |
} | |
function geometry(o) { | |
var type = o.type, coordinates; | |
switch (type) { | |
case "GeometryCollection": return {type: type, geometries: o.geometries.map(geometry)}; | |
case "Point": coordinates = point(o.coordinates); break; | |
case "MultiPoint": coordinates = o.coordinates.map(point); break; | |
case "LineString": coordinates = line(o.arcs); break; | |
case "MultiLineString": coordinates = o.arcs.map(line); break; | |
case "Polygon": coordinates = polygon(o.arcs); break; | |
case "MultiPolygon": coordinates = o.arcs.map(polygon); break; | |
default: return null; | |
} | |
return {type: type, coordinates: coordinates}; | |
} | |
return geometry(o); | |
} | |
/* src\Map.svelte generated by Svelte v3.38.3 */ | |
const file$1 = "src\\Map.svelte"; | |
function get_each_context$1(ctx, list, i) { | |
const child_ctx = ctx.slice(); | |
child_ctx[4] = list[i]; | |
return child_ctx; | |
} | |
// (36:4) {#each points.filter(d=>d.geom) as point} | |
function create_each_block$1(ctx) { | |
let circle; | |
let circle_cx_value; | |
let circle_cy_value; | |
const block = { | |
c: function create() { | |
circle = svg_element("circle"); | |
attr_dev(circle, "r", "10"); | |
attr_dev(circle, "cx", circle_cx_value = /*projection*/ ctx[2](/*point*/ ctx[4].geom.coordinates)[0]); | |
attr_dev(circle, "cy", circle_cy_value = /*projection*/ ctx[2](/*point*/ ctx[4].geom.coordinates)[1]); | |
add_location(circle, file$1, 36, 8, 1070); | |
}, | |
m: function mount(target, anchor) { | |
insert_dev(target, circle, anchor); | |
}, | |
p: function update(ctx, dirty) { | |
if (dirty & /*points*/ 1 && circle_cx_value !== (circle_cx_value = /*projection*/ ctx[2](/*point*/ ctx[4].geom.coordinates)[0])) { | |
attr_dev(circle, "cx", circle_cx_value); | |
} | |
if (dirty & /*points*/ 1 && circle_cy_value !== (circle_cy_value = /*projection*/ ctx[2](/*point*/ ctx[4].geom.coordinates)[1])) { | |
attr_dev(circle, "cy", circle_cy_value); | |
} | |
}, | |
d: function destroy(detaching) { | |
if (detaching) detach_dev(circle); | |
} | |
}; | |
dispatch_dev("SvelteRegisterBlock", { | |
block, | |
id: create_each_block$1.name, | |
type: "each", | |
source: "(36:4) {#each points.filter(d=>d.geom) as point}", | |
ctx | |
}); | |
return block; | |
} | |
function create_fragment$1(ctx) { | |
let svg; | |
let path_1; | |
let each_value = /*points*/ ctx[0].filter(func); | |
validate_each_argument(each_value); | |
let each_blocks = []; | |
for (let i = 0; i < each_value.length; i += 1) { | |
each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i)); | |
} | |
const block = { | |
c: function create() { | |
svg = svg_element("svg"); | |
path_1 = svg_element("path"); | |
for (let i = 0; i < each_blocks.length; i += 1) { | |
each_blocks[i].c(); | |
} | |
attr_dev(path_1, "d", /*data*/ ctx[1]); | |
attr_dev(path_1, "class", "border svelte-1x0lp3d"); | |
add_location(path_1, file$1, 34, 4, 981); | |
attr_dev(svg, "width", "960"); | |
attr_dev(svg, "height", "500"); | |
attr_dev(svg, "class", "svelte-1x0lp3d"); | |
add_location(svg, file$1, 33, 2, 945); | |
}, | |
l: function claim(nodes) { | |
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); | |
}, | |
m: function mount(target, anchor) { | |
insert_dev(target, svg, anchor); | |
append_dev(svg, path_1); | |
for (let i = 0; i < each_blocks.length; i += 1) { | |
each_blocks[i].m(svg, null); | |
} | |
}, | |
p: function update(ctx, [dirty]) { | |
if (dirty & /*data*/ 2) { | |
attr_dev(path_1, "d", /*data*/ ctx[1]); | |
} | |
if (dirty & /*projection, points*/ 5) { | |
each_value = /*points*/ ctx[0].filter(func); | |
validate_each_argument(each_value); | |
let i; | |
for (i = 0; i < each_value.length; i += 1) { | |
const child_ctx = get_each_context$1(ctx, each_value, i); | |
if (each_blocks[i]) { | |
each_blocks[i].p(child_ctx, dirty); | |
} else { | |
each_blocks[i] = create_each_block$1(child_ctx); | |
each_blocks[i].c(); | |
each_blocks[i].m(svg, null); | |
} | |
} | |
for (; i < each_blocks.length; i += 1) { | |
each_blocks[i].d(1); | |
} | |
each_blocks.length = each_value.length; | |
} | |
}, | |
i: noop$3, | |
o: noop$3, | |
d: function destroy(detaching) { | |
if (detaching) detach_dev(svg); | |
destroy_each(each_blocks, detaching); | |
} | |
}; | |
dispatch_dev("SvelteRegisterBlock", { | |
block, | |
id: create_fragment$1.name, | |
type: "component", | |
source: "", | |
ctx | |
}); | |
return block; | |
} | |
const func = d => d.geom; | |
function instance$1($$self, $$props, $$invalidate) { | |
let { $$slots: slots = {}, $$scope } = $$props; | |
validate_slots("Map", slots, []); | |
let { points } = $$props; | |
let data; | |
const projection = geoEqualEarth(); | |
const path = geoPath().projection(projection); | |
onMount(async function () { | |
const response = await fetch("https://gist.githubusercontent.com/rveciana/502db152b70cddfd554e9d48ee23e279/raw/cc51c1b46199994b123271c629541d417f2f7d86/world-110m.json"); | |
const json = await response.json(); | |
const land = feature(json, json.objects.land); | |
$$invalidate(1, data = path(land)); | |
}); | |
const writable_props = ["points"]; | |
Object.keys($$props).forEach(key => { | |
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(`<Map> was created with unknown prop '${key}'`); | |
}); | |
$$self.$$set = $$props => { | |
if ("points" in $$props) $$invalidate(0, points = $$props.points); | |
}; | |
$$self.$capture_state = () => ({ | |
geoEqualEarth, | |
geoPath, | |
onMount, | |
feature, | |
points, | |
data, | |
projection, | |
path | |
}); | |
$$self.$inject_state = $$props => { | |
if ("points" in $$props) $$invalidate(0, points = $$props.points); | |
if ("data" in $$props) $$invalidate(1, data = $$props.data); | |
}; | |
if ($$props && "$$inject" in $$props) { | |
$$self.$inject_state($$props.$$inject); | |
} | |
return [points, data, projection]; | |
} | |
class Map$1 extends SvelteComponentDev { | |
constructor(options) { | |
super(options); | |
init(this, options, instance$1, create_fragment$1, safe_not_equal, { points: 0 }); | |
dispatch_dev("SvelteRegisterComponent", { | |
component: this, | |
tagName: "Map", | |
options, | |
id: create_fragment$1.name | |
}); | |
const { ctx } = this.$$; | |
const props = options.props || {}; | |
if (/*points*/ ctx[0] === undefined && !("points" in props)) { | |
console.warn("<Map> was created without expected prop 'points'"); | |
} | |
} | |
get points() { | |
throw new Error("<Map>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"); | |
} | |
set points(value) { | |
throw new Error("<Map>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'"); | |
} | |
} | |
// constants.ts | |
const DEFAULT_HEADERS$1 = {}; | |
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; | |
function getDefaultExportFromCjs (x) { | |
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; | |
} | |
function createCommonjsModule(fn) { | |
var module = { exports: {} }; | |
return fn(module, module.exports), module.exports; | |
} | |
var browserPonyfill = createCommonjsModule(function (module, exports) { | |
var global = typeof self !== 'undefined' ? self : commonjsGlobal; | |
var __self__ = (function () { | |
function F() { | |
this.fetch = false; | |
this.DOMException = global.DOMException; | |
} | |
F.prototype = global; | |
return new F(); | |
})(); | |
(function(self) { | |
((function (exports) { | |
var support = { | |
searchParams: 'URLSearchParams' in self, | |
iterable: 'Symbol' in self && 'iterator' in Symbol, | |
blob: | |
'FileReader' in self && | |
'Blob' in self && | |
(function() { | |
try { | |
new Blob(); | |
return true | |
} catch (e) { | |
return false | |
} | |
})(), | |
formData: 'FormData' in self, | |
arrayBuffer: 'ArrayBuffer' in self | |
}; | |
function isDataView(obj) { | |
return obj && DataView.prototype.isPrototypeOf(obj) | |
} | |
if (support.arrayBuffer) { | |
var viewClasses = [ | |
'[object Int8Array]', | |
'[object Uint8Array]', | |
'[object Uint8ClampedArray]', | |
'[object Int16Array]', | |
'[object Uint16Array]', | |
'[object Int32Array]', | |
'[object Uint32Array]', | |
'[object Float32Array]', | |
'[object Float64Array]' | |
]; | |
var isArrayBufferView = | |
ArrayBuffer.isView || | |
function(obj) { | |
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 | |
}; | |
} | |
function normalizeName(name) { | |
if (typeof name !== 'string') { | |
name = String(name); | |
} | |
if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) { | |
throw new TypeError('Invalid character in header field name') | |
} | |
return name.toLowerCase() | |
} | |
function normalizeValue(value) { | |
if (typeof value !== 'string') { | |
value = String(value); | |
} | |
return value | |
} | |
// Build a destructive iterator for the value list | |
function iteratorFor(items) { | |
var iterator = { | |
next: function() { | |
var value = items.shift(); | |
return {done: value === undefined, value: value} | |
} | |
}; | |
if (support.iterable) { | |
iterator[Symbol.iterator] = function() { | |
return iterator | |
}; | |
} | |
return iterator | |
} | |
function Headers(headers) { | |
this.map = {}; | |
if (headers instanceof Headers) { | |
headers.forEach(function(value, name) { | |
this.append(name, value); | |
}, this); | |
} else if (Array.isArray(headers)) { | |
headers.forEach(function(header) { | |
this.append(header[0], header[1]); | |
}, this); | |
} else if (headers) { | |
Object.getOwnPropertyNames(headers).forEach(function(name) { | |
this.append(name, headers[name]); | |
}, this); | |
} | |
} | |
Headers.prototype.append = function(name, value) { | |
name = normalizeName(name); | |
value = normalizeValue(value); | |
var oldValue = this.map[name]; | |
this.map[name] = oldValue ? oldValue + ', ' + value : value; | |
}; | |
Headers.prototype['delete'] = function(name) { | |
delete this.map[normalizeName(name)]; | |
}; | |
Headers.prototype.get = function(name) { | |
name = normalizeName(name); | |
return this.has(name) ? this.map[name] : null | |
}; | |
Headers.prototype.has = function(name) { | |
return this.map.hasOwnProperty(normalizeName(name)) | |
}; | |
Headers.prototype.set = function(name, value) { | |
this.map[normalizeName(name)] = normalizeValue(value); | |
}; | |
Headers.prototype.forEach = function(callback, thisArg) { | |
for (var name in this.map) { | |
if (this.map.hasOwnProperty(name)) { | |
callback.call(thisArg, this.map[name], name, this); | |
} | |
} | |
}; | |
Headers.prototype.keys = function() { | |
var items = []; | |
this.forEach(function(value, name) { | |
items.push(name); | |
}); | |
return iteratorFor(items) | |
}; | |
Headers.prototype.values = function() { | |
var items = []; | |
this.forEach(function(value) { | |
items.push(value); | |
}); | |
return iteratorFor(items) | |
}; | |
Headers.prototype.entries = function() { | |
var items = []; | |
this.forEach(function(value, name) { | |
items.push([name, value]); | |
}); | |
return iteratorFor(items) | |
}; | |
if (support.iterable) { | |
Headers.prototype[Symbol.iterator] = Headers.prototype.entries; | |
} | |
function consumed(body) { | |
if (body.bodyUsed) { | |
return Promise.reject(new TypeError('Already read')) | |
} | |
body.bodyUsed = true; | |
} | |
function fileReaderReady(reader) { | |
return new Promise(function(resolve, reject) { | |
reader.onload = function() { | |
resolve(reader.result); | |
}; | |
reader.onerror = function() { | |
reject(reader.error); | |
}; | |
}) | |
} | |
function readBlobAsArrayBuffer(blob) { | |
var reader = new FileReader(); | |
var promise = fileReaderReady(reader); | |
reader.readAsArrayBuffer(blob); | |
return promise | |
} | |
function readBlobAsText(blob) { | |
var reader = new FileReader(); | |
var promise = fileReaderReady(reader); | |
reader.readAsText(blob); | |
return promise | |
} | |
function readArrayBufferAsText(buf) { | |
var view = new Uint8Array(buf); | |
var chars = new Array(view.length); | |
for (var i = 0; i < view.length; i++) { | |
chars[i] = String.fromCharCode(view[i]); | |
} | |
return chars.join('') | |
} | |
function bufferClone(buf) { | |
if (buf.slice) { | |
return buf.slice(0) | |
} else { | |
var view = new Uint8Array(buf.byteLength); | |
view.set(new Uint8Array(buf)); | |
return view.buffer | |
} | |
} | |
function Body() { | |
this.bodyUsed = false; | |
this._initBody = function(body) { | |
this._bodyInit = body; | |
if (!body) { | |
this._bodyText = ''; | |
} else if (typeof body === 'string') { | |
this._bodyText = body; | |
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) { | |
this._bodyBlob = body; | |
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) { | |
this._bodyFormData = body; | |
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { | |
this._bodyText = body.toString(); | |
} else if (support.arrayBuffer && support.blob && isDataView(body)) { | |
this._bodyArrayBuffer = bufferClone(body.buffer); | |
// IE 10-11 can't handle a DataView body. | |
this._bodyInit = new Blob([this._bodyArrayBuffer]); | |
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { | |
this._bodyArrayBuffer = bufferClone(body); | |
} else { | |
this._bodyText = body = Object.prototype.toString.call(body); | |
} | |
if (!this.headers.get('content-type')) { | |
if (typeof body === 'string') { | |
this.headers.set('content-type', 'text/plain;charset=UTF-8'); | |
} else if (this._bodyBlob && this._bodyBlob.type) { | |
this.headers.set('content-type', this._bodyBlob.type); | |
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { | |
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8'); | |
} | |
} | |
}; | |
if (support.blob) { | |
this.blob = function() { | |
var rejected = consumed(this); | |
if (rejected) { | |
return rejected | |
} | |
if (this._bodyBlob) { | |
return Promise.resolve(this._bodyBlob) | |
} else if (this._bodyArrayBuffer) { | |
return Promise.resolve(new Blob([this._bodyArrayBuffer])) | |
} else if (this._bodyFormData) { | |
throw new Error('could not read FormData body as blob') | |
} else { | |
return Promise.resolve(new Blob([this._bodyText])) | |
} | |
}; | |
this.arrayBuffer = function() { | |
if (this._bodyArrayBuffer) { | |
return consumed(this) || Promise.resolve(this._bodyArrayBuffer) | |
} else { | |
return this.blob().then(readBlobAsArrayBuffer) | |
} | |
}; | |
} | |
this.text = function() { | |
var rejected = consumed(this); | |
if (rejected) { | |
return rejected | |
} | |
if (this._bodyBlob) { | |
return readBlobAsText(this._bodyBlob) | |
} else if (this._bodyArrayBuffer) { | |
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) | |
} else if (this._bodyFormData) { | |
throw new Error('could not read FormData body as text') | |
} else { | |
return Promise.resolve(this._bodyText) | |
} | |
}; | |
if (support.formData) { | |
this.formData = function() { | |
return this.text().then(decode) | |
}; | |
} | |
this.json = function() { | |
return this.text().then(JSON.parse) | |
}; | |
return this | |
} | |
// HTTP methods whose capitalization should be normalized | |
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']; | |
function normalizeMethod(method) { | |
var upcased = method.toUpperCase(); | |
return methods.indexOf(upcased) > -1 ? upcased : method | |
} | |
function Request(input, options) { | |
options = options || {}; | |
var body = options.body; | |
if (input instanceof Request) { | |
if (input.bodyUsed) { | |
throw new TypeError('Already read') | |
} | |
this.url = input.url; | |
this.credentials = input.credentials; | |
if (!options.headers) { | |
this.headers = new Headers(input.headers); | |
} | |
this.method = input.method; | |
this.mode = input.mode; | |
this.signal = input.signal; | |
if (!body && input._bodyInit != null) { | |
body = input._bodyInit; | |
input.bodyUsed = true; | |
} | |
} else { | |
this.url = String(input); | |
} | |
this.credentials = options.credentials || this.credentials || 'same-origin'; | |
if (options.headers || !this.headers) { | |
this.headers = new Headers(options.headers); | |
} | |
this.method = normalizeMethod(options.method || this.method || 'GET'); | |
this.mode = options.mode || this.mode || null; | |
this.signal = options.signal || this.signal; | |
this.referrer = null; | |
if ((this.method === 'GET' || this.method === 'HEAD') && body) { | |
throw new TypeError('Body not allowed for GET or HEAD requests') | |
} | |
this._initBody(body); | |
} | |
Request.prototype.clone = function() { | |
return new Request(this, {body: this._bodyInit}) | |
}; | |
function decode(body) { | |
var form = new FormData(); | |
body | |
.trim() | |
.split('&') | |
.forEach(function(bytes) { | |
if (bytes) { | |
var split = bytes.split('='); | |
var name = split.shift().replace(/\+/g, ' '); | |
var value = split.join('=').replace(/\+/g, ' '); | |
form.append(decodeURIComponent(name), decodeURIComponent(value)); | |
} | |
}); | |
return form | |
} | |
function parseHeaders(rawHeaders) { | |
var headers = new Headers(); | |
// Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space | |
// https://tools.ietf.org/html/rfc7230#section-3.2 | |
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' '); | |
preProcessedHeaders.split(/\r?\n/).forEach(function(line) { | |
var parts = line.split(':'); | |
var key = parts.shift().trim(); | |
if (key) { | |
var value = parts.join(':').trim(); | |
headers.append(key, value); | |
} | |
}); | |
return headers | |
} | |
Body.call(Request.prototype); | |
function Response(bodyInit, options) { | |
if (!options) { | |
options = {}; | |
} | |
this.type = 'default'; | |
this.status = options.status === undefined ? 200 : options.status; | |
this.ok = this.status >= 200 && this.status < 300; | |
this.statusText = 'statusText' in options ? options.statusText : 'OK'; | |
this.headers = new Headers(options.headers); | |
this.url = options.url || ''; | |
this._initBody(bodyInit); | |
} | |
Body.call(Response.prototype); | |
Response.prototype.clone = function() { | |
return new Response(this._bodyInit, { | |
status: this.status, | |
statusText: this.statusText, | |
headers: new Headers(this.headers), | |
url: this.url | |
}) | |
}; | |
Response.error = function() { | |
var response = new Response(null, {status: 0, statusText: ''}); | |
response.type = 'error'; | |
return response | |
}; | |
var redirectStatuses = [301, 302, 303, 307, 308]; | |
Response.redirect = function(url, status) { | |
if (redirectStatuses.indexOf(status) === -1) { | |
throw new RangeError('Invalid status code') | |
} | |
return new Response(null, {status: status, headers: {location: url}}) | |
}; | |
exports.DOMException = self.DOMException; | |
try { | |
new exports.DOMException(); | |
} catch (err) { | |
exports.DOMException = function(message, name) { | |
this.message = message; | |
this.name = name; | |
var error = Error(message); | |
this.stack = error.stack; | |
}; | |
exports.DOMException.prototype = Object.create(Error.prototype); | |
exports.DOMException.prototype.constructor = exports.DOMException; | |
} | |
function fetch(input, init) { | |
return new Promise(function(resolve, reject) { | |
var request = new Request(input, init); | |
if (request.signal && request.signal.aborted) { | |
return reject(new exports.DOMException('Aborted', 'AbortError')) | |
} | |
var xhr = new XMLHttpRequest(); | |
function abortXhr() { | |
xhr.abort(); | |
} | |
xhr.onload = function() { | |
var options = { | |
status: xhr.status, | |
statusText: xhr.statusText, | |
headers: parseHeaders(xhr.getAllResponseHeaders() || '') | |
}; | |
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL'); | |
var body = 'response' in xhr ? xhr.response : xhr.responseText; | |
resolve(new Response(body, options)); | |
}; | |
xhr.onerror = function() { | |
reject(new TypeError('Network request failed')); | |
}; | |
xhr.ontimeout = function() { | |
reject(new TypeError('Network request failed')); | |
}; | |
xhr.onabort = function() { | |
reject(new exports.DOMException('Aborted', 'AbortError')); | |
}; | |
xhr.open(request.method, request.url, true); | |
if (request.credentials === 'include') { | |
xhr.withCredentials = true; | |
} else if (request.credentials === 'omit') { | |
xhr.withCredentials = false; | |
} | |
if ('responseType' in xhr && support.blob) { | |
xhr.responseType = 'blob'; | |
} | |
request.headers.forEach(function(value, name) { | |
xhr.setRequestHeader(name, value); | |
}); | |
if (request.signal) { | |
request.signal.addEventListener('abort', abortXhr); | |
xhr.onreadystatechange = function() { | |
// DONE (success or failure) | |
if (xhr.readyState === 4) { | |
request.signal.removeEventListener('abort', abortXhr); | |
} | |
}; | |
} | |
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit); | |
}) | |
} | |
fetch.polyfill = true; | |
if (!self.fetch) { | |
self.fetch = fetch; | |
self.Headers = Headers; | |
self.Request = Request; | |
self.Response = Response; | |
} | |
exports.Headers = Headers; | |
exports.Request = Request; | |
exports.Response = Response; | |
exports.fetch = fetch; | |
Object.defineProperty(exports, '__esModule', { value: true }); | |
return exports; | |
})({})); | |
})(__self__); | |
__self__.fetch.ponyfill = true; | |
// Remove "polyfill" property added by whatwg-fetch | |
delete __self__.fetch.polyfill; | |
// Choose between native implementation (global) or custom implementation (__self__) | |
// var ctx = global.fetch ? global : __self__; | |
var ctx = __self__; // this line disable service worker support temporarily | |
exports = ctx.fetch; // To enable: import fetch from 'cross-fetch' | |
exports.default = ctx.fetch; // For TypeScript consumers without esModuleInterop. | |
exports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch' | |
exports.Headers = ctx.Headers; | |
exports.Request = ctx.Request; | |
exports.Response = ctx.Response; | |
module.exports = exports; | |
}); | |
var fetch$1 = /*@__PURE__*/getDefaultExportFromCjs(browserPonyfill); | |
var __awaiter$8 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { | |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
const _getErrorMessage$1 = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err); | |
const handleError$1 = (error, reject) => { | |
if (typeof error.json !== 'function') { | |
return reject(error); | |
} | |
error.json().then((err) => { | |
return reject({ | |
message: _getErrorMessage$1(err), | |
status: (error === null || error === void 0 ? void 0 : error.status) || 500, | |
}); | |
}); | |
}; | |
const _getRequestParams$1 = (method, options, body) => { | |
const params = { method, headers: (options === null || options === void 0 ? void 0 : options.headers) || {} }; | |
if (method === 'GET') { | |
return params; | |
} | |
params.headers = Object.assign({ 'Content-Type': 'text/plain;charset=UTF-8' }, options === null || options === void 0 ? void 0 : options.headers); | |
params.body = JSON.stringify(body); | |
return params; | |
}; | |
function _handleRequest$1(method, url, options, body) { | |
return __awaiter$8(this, void 0, void 0, function* () { | |
return new Promise((resolve, reject) => { | |
fetch$1(url, _getRequestParams$1(method, options, body)) | |
.then((result) => { | |
if (!result.ok) | |
throw result; | |
if (options === null || options === void 0 ? void 0 : options.noResolveJson) | |
return resolve; | |
return result.json(); | |
}) | |
.then((data) => resolve(data)) | |
.catch((error) => handleError$1(error, reject)); | |
}); | |
}); | |
} | |
function get$1(url, options) { | |
return __awaiter$8(this, void 0, void 0, function* () { | |
return _handleRequest$1('GET', url, options); | |
}); | |
} | |
function post$1(url, body, options) { | |
return __awaiter$8(this, void 0, void 0, function* () { | |
return _handleRequest$1('POST', url, options, body); | |
}); | |
} | |
function put$1(url, body, options) { | |
return __awaiter$8(this, void 0, void 0, function* () { | |
return _handleRequest$1('PUT', url, options, body); | |
}); | |
} | |
function remove$1(url, body, options) { | |
return __awaiter$8(this, void 0, void 0, function* () { | |
return _handleRequest$1('DELETE', url, options, body); | |
}); | |
} | |
const GOTRUE_URL = 'http://localhost:9999'; | |
const DEFAULT_HEADERS = {}; | |
const STORAGE_KEY = 'supabase.auth.token'; | |
const COOKIE_OPTIONS = { | |
name: 'sb:token', | |
lifetime: 60 * 60 * 8, | |
domain: '', | |
path: '/', | |
sameSite: 'lax', | |
}; | |
/** | |
* Serialize data into a cookie header. | |
*/ | |
function serialize(name, val, options) { | |
const opt = options || {}; | |
const enc = encodeURIComponent; | |
const fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/; | |
if (typeof enc !== 'function') { | |
throw new TypeError('option encode is invalid'); | |
} | |
if (!fieldContentRegExp.test(name)) { | |
throw new TypeError('argument name is invalid'); | |
} | |
const value = enc(val); | |
if (value && !fieldContentRegExp.test(value)) { | |
throw new TypeError('argument val is invalid'); | |
} | |
let str = name + '=' + value; | |
if (null != opt.maxAge) { | |
const maxAge = opt.maxAge - 0; | |
if (isNaN(maxAge) || !isFinite(maxAge)) { | |
throw new TypeError('option maxAge is invalid'); | |
} | |
str += '; Max-Age=' + Math.floor(maxAge); | |
} | |
if (opt.domain) { | |
if (!fieldContentRegExp.test(opt.domain)) { | |
throw new TypeError('option domain is invalid'); | |
} | |
str += '; Domain=' + opt.domain; | |
} | |
if (opt.path) { | |
if (!fieldContentRegExp.test(opt.path)) { | |
throw new TypeError('option path is invalid'); | |
} | |
str += '; Path=' + opt.path; | |
} | |
if (opt.expires) { | |
if (typeof opt.expires.toUTCString !== 'function') { | |
throw new TypeError('option expires is invalid'); | |
} | |
str += '; Expires=' + opt.expires.toUTCString(); | |
} | |
if (opt.httpOnly) { | |
str += '; HttpOnly'; | |
} | |
if (opt.secure) { | |
str += '; Secure'; | |
} | |
if (opt.sameSite) { | |
const sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite; | |
switch (sameSite) { | |
case 'lax': | |
str += '; SameSite=Lax'; | |
break; | |
case 'strict': | |
str += '; SameSite=Strict'; | |
break; | |
case 'none': | |
str += '; SameSite=None'; | |
break; | |
default: | |
throw new TypeError('option sameSite is invalid'); | |
} | |
} | |
return str; | |
} | |
/** | |
* Based on the environment and the request we know if a secure cookie can be set. | |
*/ | |
function isSecureEnvironment(req) { | |
if (!req || !req.headers || !req.headers.host) { | |
throw new Error('The "host" request header is not available'); | |
} | |
const host = (req.headers.host.indexOf(':') > -1 && req.headers.host.split(':')[0]) || req.headers.host; | |
if (['localhost', '127.0.0.1'].indexOf(host) > -1 || host.endsWith('.local')) { | |
return false; | |
} | |
return true; | |
} | |
/** | |
* Serialize a cookie to a string. | |
*/ | |
function serializeCookie(cookie, secure) { | |
var _a, _b, _c; | |
return serialize(cookie.name, cookie.value, { | |
maxAge: cookie.maxAge, | |
expires: new Date(Date.now() + cookie.maxAge * 1000), | |
httpOnly: true, | |
secure, | |
path: (_a = cookie.path) !== null && _a !== void 0 ? _a : '/', | |
domain: (_b = cookie.domain) !== null && _b !== void 0 ? _b : '', | |
sameSite: (_c = cookie.sameSite) !== null && _c !== void 0 ? _c : 'lax', | |
}); | |
} | |
/** | |
* Set one or more cookies. | |
*/ | |
function setCookies(req, res, cookies) { | |
const strCookies = cookies.map((c) => serializeCookie(c, isSecureEnvironment(req))); | |
const previousCookies = res.getHeader('Set-Cookie'); | |
if (previousCookies) { | |
if (previousCookies instanceof Array) { | |
Array.prototype.push.apply(strCookies, previousCookies); | |
} | |
else if (typeof previousCookies === 'string') { | |
strCookies.push(previousCookies); | |
} | |
} | |
res.setHeader('Set-Cookie', strCookies); | |
} | |
/** | |
* Set one or more cookies. | |
*/ | |
function setCookie(req, res, cookie) { | |
setCookies(req, res, [cookie]); | |
} | |
function deleteCookie(req, res, name) { | |
setCookie(req, res, { | |
name, | |
value: '', | |
maxAge: -1, | |
}); | |
} | |
function expiresAt(expiresIn) { | |
const timeNow = Math.round(Date.now() / 1000); | |
return timeNow + expiresIn; | |
} | |
function uuid() { | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { | |
var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8; | |
return v.toString(16); | |
}); | |
} | |
const isBrowser$1 = () => typeof window !== 'undefined'; | |
function getParameterByName(name, url) { | |
if (!url) | |
url = window.location.href; | |
name = name.replace(/[\[\]]/g, '\\$&'); | |
var regex = new RegExp('[?&#]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url); | |
if (!results) | |
return null; | |
if (!results[2]) | |
return ''; | |
return decodeURIComponent(results[2].replace(/\+/g, ' ')); | |
} | |
class LocalStorage { | |
constructor(localStorage) { | |
this.localStorage = localStorage || globalThis.localStorage; | |
} | |
clear() { | |
return this.localStorage.clear(); | |
} | |
key(index) { | |
return this.localStorage.key(index); | |
} | |
setItem(key, value) { | |
return this.localStorage.setItem(key, value); | |
} | |
getItem(key) { | |
return this.localStorage.getItem(key); | |
} | |
removeItem(key) { | |
return this.localStorage.removeItem(key); | |
} | |
} | |
var __awaiter$7 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { | |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
class GoTrueApi { | |
constructor({ url = '', headers = {}, cookieOptions, }) { | |
this.url = url; | |
this.headers = headers; | |
this.cookieOptions = Object.assign(Object.assign({}, COOKIE_OPTIONS), cookieOptions); | |
} | |
/** | |
* Creates a new user using their email address. | |
* @param email The email address of the user. | |
* @param password The password of the user. | |
* @param redirectTo A URL or mobile address to send the user to after they are confirmed. | |
* | |
* @returns A logged-in session if the server has "autoconfirm" ON | |
* @returns A user if the server has "autoconfirm" OFF | |
*/ | |
signUpWithEmail(email, password, options = {}) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
let headers = Object.assign({}, this.headers); | |
let queryString = ''; | |
if (options.redirectTo) { | |
queryString = '?redirect_to=' + encodeURIComponent(options.redirectTo); | |
} | |
const data = yield post$1(`${this.url}/signup${queryString}`, { email, password }, { headers }); | |
let session = Object.assign({}, data); | |
if (session.expires_in) | |
session.expires_at = expiresAt(data.expires_in); | |
return { data: session, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Logs in an existing user using their email address. | |
* @param email The email address of the user. | |
* @param password The password of the user. | |
* @param redirectTo A URL or mobile address to send the user to after they are confirmed. | |
*/ | |
signInWithEmail(email, password, options = {}) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
let headers = Object.assign({}, this.headers); | |
let queryString = '?grant_type=password'; | |
if (options.redirectTo) { | |
queryString += '&redirect_to=' + encodeURIComponent(options.redirectTo); | |
} | |
const data = yield post$1(`${this.url}/token${queryString}`, { email, password }, { headers }); | |
let session = Object.assign({}, data); | |
if (session.expires_in) | |
session.expires_at = expiresAt(data.expires_in); | |
return { data: session, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Sends a magic login link to an email address. | |
* @param email The email address of the user. | |
* @param redirectTo A URL or mobile address to send the user to after they are confirmed. | |
*/ | |
sendMagicLinkEmail(email, options = {}) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
let headers = Object.assign({}, this.headers); | |
let queryString = ''; | |
if (options.redirectTo) { | |
queryString += '?redirect_to=' + encodeURIComponent(options.redirectTo); | |
} | |
const data = yield post$1(`${this.url}/magiclink${queryString}`, { email }, { headers }); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Sends an invite link to an email address. | |
* @param email The email address of the user. | |
* @param redirectTo A URL or mobile address to send the user to after they are confirmed. | |
*/ | |
inviteUserByEmail(email, options = {}) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
let headers = Object.assign({}, this.headers); | |
let queryString = ''; | |
if (options.redirectTo) { | |
queryString += '?redirect_to=' + encodeURIComponent(options.redirectTo); | |
} | |
const data = yield post$1(`${this.url}/invite${queryString}`, { email }, { headers }); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Sends a reset request to an email address. | |
* @param email The email address of the user. | |
* @param redirectTo A URL or mobile address to send the user to after they are confirmed. | |
*/ | |
resetPasswordForEmail(email, options = {}) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
let headers = Object.assign({}, this.headers); | |
let queryString = ''; | |
if (options.redirectTo) { | |
queryString += '?redirect_to=' + encodeURIComponent(options.redirectTo); | |
} | |
const data = yield post$1(`${this.url}/recover${queryString}`, { email }, { headers }); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Create a temporary object with all configured headers and | |
* adds the Authorization token to be used on request methods | |
* @param jwt A valid, logged-in JWT. | |
*/ | |
_createRequestHeaders(jwt) { | |
const headers = Object.assign({}, this.headers); | |
headers['Authorization'] = `Bearer ${jwt}`; | |
return headers; | |
} | |
/** | |
* Removes a logged-in session. | |
* @param jwt A valid, logged-in JWT. | |
*/ | |
signOut(jwt) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
yield post$1(`${this.url}/logout`, {}, { headers: this._createRequestHeaders(jwt), noResolveJson: true }); | |
return { error: null }; | |
} | |
catch (error) { | |
return { error }; | |
} | |
}); | |
} | |
/** | |
* Generates the relevant login URL for a third-party provider. | |
* @param provider One of the providers supported by GoTrue. | |
* @param redirectTo A URL or mobile address to send the user to after they are confirmed. | |
* @param scopes A space-separated list of scopes granted to the OAuth application. | |
*/ | |
getUrlForProvider(provider, options) { | |
let urlParams = [`provider=${encodeURIComponent(provider)}`]; | |
if (options === null || options === void 0 ? void 0 : options.redirectTo) { | |
urlParams.push(`redirect_to=${encodeURIComponent(options.redirectTo)}`); | |
} | |
if (options === null || options === void 0 ? void 0 : options.scopes) { | |
urlParams.push(`scopes=${encodeURIComponent(options.scopes)}`); | |
} | |
return `${this.url}/authorize?${urlParams.join('&')}`; | |
} | |
/** | |
* Gets the user details. | |
* @param jwt A valid, logged-in JWT. | |
*/ | |
getUser(jwt) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
const data = yield get$1(`${this.url}/user`, { headers: this._createRequestHeaders(jwt) }); | |
return { user: data, data, error: null }; | |
} | |
catch (error) { | |
return { user: null, data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Updates the user data. | |
* @param jwt A valid, logged-in JWT. | |
* @param attributes The data you want to update. | |
*/ | |
updateUser(jwt, attributes) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
const data = yield put$1(`${this.url}/user`, attributes, { | |
headers: this._createRequestHeaders(jwt), | |
}); | |
return { user: data, data, error: null }; | |
} | |
catch (error) { | |
return { user: null, data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Delete an user. | |
* @param uid The user uid you want to remove. | |
* @param jwt A valid JWT. Must be a full-access API key (e.g. service_role key). | |
*/ | |
deleteUser(uid, jwt) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
const data = yield remove$1(`${this.url}/admin/users/${uid}`, {}, { | |
headers: this._createRequestHeaders(jwt), | |
}); | |
return { user: data, data, error: null }; | |
} | |
catch (error) { | |
return { user: null, data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Generates a new JWT. | |
* @param refreshToken A valid refresh token that was returned on login. | |
*/ | |
refreshAccessToken(refreshToken) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
const data = yield post$1(`${this.url}/token?grant_type=refresh_token`, { refresh_token: refreshToken }, { headers: this.headers }); | |
let session = Object.assign({}, data); | |
if (session.expires_in) | |
session.expires_at = expiresAt(data.expires_in); | |
return { data: session, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Set/delete the auth cookie based on the AuthChangeEvent. | |
* Works for Next.js & Express (requires cookie-parser middleware). | |
*/ | |
setAuthCookie(req, res) { | |
if (req.method !== 'POST') { | |
res.setHeader('Allow', 'POST'); | |
res.status(405).end('Method Not Allowed'); | |
} | |
const { event, session } = req.body; | |
if (!event) | |
throw new Error('Auth event missing!'); | |
if (event === 'SIGNED_IN') { | |
if (!session) | |
throw new Error('Auth session missing!'); | |
setCookie(req, res, { | |
name: this.cookieOptions.name, | |
value: session.access_token, | |
domain: this.cookieOptions.domain, | |
maxAge: this.cookieOptions.lifetime, | |
path: this.cookieOptions.path, | |
sameSite: this.cookieOptions.sameSite, | |
}); | |
} | |
if (event === 'SIGNED_OUT') | |
deleteCookie(req, res, this.cookieOptions.name); | |
res.status(200).json({}); | |
} | |
/** | |
* Get user by reading the cookie from the request. | |
* Works for Next.js & Express (requires cookie-parser middleware). | |
*/ | |
getUserByCookie(req) { | |
return __awaiter$7(this, void 0, void 0, function* () { | |
try { | |
if (!req.cookies) | |
throw new Error('Not able to parse cookies! When using Express make sure the cookie-parser middleware is in use!'); | |
if (!req.cookies[this.cookieOptions.name]) | |
throw new Error('No cookie found!'); | |
const token = req.cookies[this.cookieOptions.name]; | |
const { user, error } = yield this.getUser(token); | |
if (error) | |
throw error; | |
return { user, data: user, error: null }; | |
} | |
catch (error) { | |
return { user: null, data: null, error }; | |
} | |
}); | |
} | |
} | |
// @ts-nocheck | |
/** | |
* https://mathiasbynens.be/notes/globalthis | |
*/ | |
function polyfillGlobalThis() { | |
if (typeof globalThis === 'object') | |
return; | |
try { | |
Object.defineProperty(Object.prototype, '__magic__', { | |
get: function () { | |
return this; | |
}, | |
configurable: true, | |
}); | |
__magic__.globalThis = __magic__; | |
delete Object.prototype.__magic__; | |
} | |
catch (e) { | |
if (typeof self !== 'undefined') { | |
self.globalThis = self; | |
} | |
} | |
} | |
var __awaiter$6 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { | |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
polyfillGlobalThis(); // Make "globalThis" available | |
const DEFAULT_OPTIONS$1 = { | |
url: GOTRUE_URL, | |
autoRefreshToken: true, | |
persistSession: true, | |
localStorage: globalThis.localStorage, | |
detectSessionInUrl: true, | |
headers: DEFAULT_HEADERS, | |
}; | |
class GoTrueClient { | |
/** | |
* Create a new client for use in the browser. | |
* @param options.url The URL of the GoTrue server. | |
* @param options.headers Any additional headers to send to the GoTrue server. | |
* @param options.detectSessionInUrl Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user. | |
* @param options.autoRefreshToken Set to "true" if you want to automatically refresh the token before expiring. | |
* @param options.persistSession Set to "true" if you want to automatically save the user session into local storage. | |
* @param options.localStorage | |
*/ | |
constructor(options) { | |
this.stateChangeEmitters = new Map(); | |
const settings = Object.assign(Object.assign({}, DEFAULT_OPTIONS$1), options); | |
this.currentUser = null; | |
this.currentSession = null; | |
this.autoRefreshToken = settings.autoRefreshToken; | |
this.persistSession = settings.persistSession; | |
this.localStorage = new LocalStorage(settings.localStorage); | |
this.api = new GoTrueApi({ | |
url: settings.url, | |
headers: settings.headers, | |
cookieOptions: settings.cookieOptions, | |
}); | |
this._recoverSession(); | |
this._recoverAndRefresh(); | |
// Handle the OAuth redirect | |
try { | |
if (settings.detectSessionInUrl && isBrowser$1() && !!getParameterByName('access_token')) { | |
this.getSessionFromUrl({ storeSession: true }); | |
} | |
} | |
catch (error) { | |
console.log('Error getting session from URL.'); | |
} | |
} | |
/** | |
* Creates a new user. | |
* @type UserCredentials | |
* @param email The user's email address. | |
* @param password The user's password. | |
* @param redirectTo A URL or mobile address to send the user to after they are confirmed. | |
*/ | |
signUp({ email, password }, options = {}) { | |
return __awaiter$6(this, void 0, void 0, function* () { | |
try { | |
this._removeSession(); | |
const { data, error } = yield this.api.signUpWithEmail(email, password, { | |
redirectTo: options.redirectTo, | |
}); | |
if (error) { | |
throw error; | |
} | |
if (!data) { | |
throw 'An error occurred on sign up.'; | |
} | |
let session = null; | |
let user = null; | |
if (data.access_token) { | |
session = data; | |
user = session.user; | |
this._saveSession(session); | |
this._notifyAllSubscribers('SIGNED_IN'); | |
} | |
if (data.id) { | |
user = data; | |
} | |
return { data, user, session, error: null }; | |
} | |
catch (error) { | |
return { data: null, user: null, session: null, error }; | |
} | |
}); | |
} | |
/** | |
* Log in an existing user, or login via a third-party provider. | |
* @type UserCredentials | |
* @param email The user's email address. | |
* @param password The user's password. | |
* @param refreshToken A valid refresh token that was returned on login. | |
* @param provider One of the providers supported by GoTrue. | |
* @param redirectTo A URL or mobile address to send the user to after they are confirmed. | |
* @param scopes A space-separated list of scopes granted to the OAuth application. | |
*/ | |
signIn({ email, password, refreshToken, provider }, options = {}) { | |
return __awaiter$6(this, void 0, void 0, function* () { | |
try { | |
this._removeSession(); | |
if (email && !password) { | |
const { error } = yield this.api.sendMagicLinkEmail(email, { | |
redirectTo: options.redirectTo, | |
}); | |
return { data: null, user: null, session: null, error }; | |
} | |
if (email && password) { | |
return this._handleEmailSignIn(email, password, { | |
redirectTo: options.redirectTo, | |
}); | |
} | |
if (refreshToken) { | |
// currentSession and currentUser will be updated to latest on _callRefreshToken using the passed refreshToken | |
const { error } = yield this._callRefreshToken(refreshToken); | |
if (error) | |
throw error; | |
return { | |
data: this.currentSession, | |
user: this.currentUser, | |
session: this.currentSession, | |
error: null, | |
}; | |
} | |
if (provider) { | |
return this._handleProviderSignIn(provider, { | |
redirectTo: options.redirectTo, | |
scopes: options.scopes, | |
}); | |
} | |
throw new Error(`You must provide either an email or a third-party provider.`); | |
} | |
catch (error) { | |
return { data: null, user: null, session: null, error }; | |
} | |
}); | |
} | |
/** | |
* Inside a browser context, `user()` will return the user data, if there is a logged in user. | |
* | |
* For server-side management, you can get a user through `auth.api.getUserByCookie()` | |
*/ | |
user() { | |
return this.currentUser; | |
} | |
/** | |
* Returns the session data, if there is an active session. | |
*/ | |
session() { | |
return this.currentSession; | |
} | |
/** | |
* Force refreshes the session including the user data in case it was updated in a different session. | |
*/ | |
refreshSession() { | |
var _a; | |
return __awaiter$6(this, void 0, void 0, function* () { | |
try { | |
if (!((_a = this.currentSession) === null || _a === void 0 ? void 0 : _a.access_token)) | |
throw new Error('Not logged in.'); | |
// currentSession and currentUser will be updated to latest on _callRefreshToken | |
const { error } = yield this._callRefreshToken(); | |
if (error) | |
throw error; | |
return { data: this.currentSession, user: this.currentUser, error: null }; | |
} | |
catch (error) { | |
return { data: null, user: null, error }; | |
} | |
}); | |
} | |
/** | |
* Updates user data, if there is a logged in user. | |
*/ | |
update(attributes) { | |
var _a; | |
return __awaiter$6(this, void 0, void 0, function* () { | |
try { | |
if (!((_a = this.currentSession) === null || _a === void 0 ? void 0 : _a.access_token)) | |
throw new Error('Not logged in.'); | |
const { user, error } = yield this.api.updateUser(this.currentSession.access_token, attributes); | |
if (error) | |
throw error; | |
if (!user) | |
throw Error('Invalid user data.'); | |
const session = Object.assign(Object.assign({}, this.currentSession), { user }); | |
this._saveSession(session); | |
this._notifyAllSubscribers('USER_UPDATED'); | |
return { data: user, user, error: null }; | |
} | |
catch (error) { | |
return { data: null, user: null, error }; | |
} | |
}); | |
} | |
/** | |
* Sets the session data from refresh_token and returns current Session and Error | |
* @param refresh_token a JWT token | |
*/ | |
setSession(refresh_token) { | |
return __awaiter$6(this, void 0, void 0, function* () { | |
try { | |
if (!refresh_token) { | |
throw new Error('No current session.'); | |
} | |
const { data, error } = yield this.api.refreshAccessToken(refresh_token); | |
if (error) { | |
return { session: null, error: error }; | |
} | |
if (!data) { | |
return { | |
session: null, | |
error: { name: 'Invalid refresh_token', message: 'JWT token provided is Invalid' }, | |
}; | |
} | |
this._saveSession(data); | |
this._notifyAllSubscribers('SIGNED_IN'); | |
return { session: data, error: null }; | |
} | |
catch (error) { | |
return { error, session: null }; | |
} | |
}); | |
} | |
/** | |
* Overrides the JWT on the current client. The JWT will then be sent in all subsequent network requests. | |
* @param access_token a jwt access token | |
*/ | |
setAuth(access_token) { | |
this.currentSession = Object.assign(Object.assign({}, this.currentSession), { access_token, token_type: 'bearer', user: null }); | |
return this.currentSession; | |
} | |
/** | |
* Gets the session data from a URL string | |
* @param options.storeSession Optionally store the session in the browser | |
*/ | |
getSessionFromUrl(options) { | |
return __awaiter$6(this, void 0, void 0, function* () { | |
try { | |
if (!isBrowser$1()) | |
throw new Error('No browser detected.'); | |
const error_description = getParameterByName('error_description'); | |
if (error_description) | |
throw new Error(error_description); | |
const provider_token = getParameterByName('provider_token'); | |
const access_token = getParameterByName('access_token'); | |
if (!access_token) | |
throw new Error('No access_token detected.'); | |
const expires_in = getParameterByName('expires_in'); | |
if (!expires_in) | |
throw new Error('No expires_in detected.'); | |
const refresh_token = getParameterByName('refresh_token'); | |
if (!refresh_token) | |
throw new Error('No refresh_token detected.'); | |
const token_type = getParameterByName('token_type'); | |
if (!token_type) | |
throw new Error('No token_type detected.'); | |
const timeNow = Math.round(Date.now() / 1000); | |
const expires_at = timeNow + parseInt(expires_in); | |
const { user, error } = yield this.api.getUser(access_token); | |
if (error) | |
throw error; | |
const session = { | |
provider_token, | |
access_token, | |
expires_in: parseInt(expires_in), | |
expires_at, | |
refresh_token, | |
token_type, | |
user: user, | |
}; | |
if (options === null || options === void 0 ? void 0 : options.storeSession) { | |
this._saveSession(session); | |
this._notifyAllSubscribers('SIGNED_IN'); | |
if (getParameterByName('type') === 'recovery') { | |
this._notifyAllSubscribers('PASSWORD_RECOVERY'); | |
} | |
} | |
// Remove tokens from URL | |
window.location.hash = ''; | |
return { data: session, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Inside a browser context, `signOut()` will remove extract the logged in user from the browser session | |
* and log them out - removing all items from localstorage and then trigger a "SIGNED_OUT" event. | |
* | |
* For server-side management, you can disable sessions by passing a JWT through to `auth.api.signOut(JWT: string)` | |
*/ | |
signOut() { | |
var _a; | |
return __awaiter$6(this, void 0, void 0, function* () { | |
const accessToken = (_a = this.currentSession) === null || _a === void 0 ? void 0 : _a.access_token; | |
this._removeSession(); | |
this._notifyAllSubscribers('SIGNED_OUT'); | |
if (accessToken) { | |
const { error } = yield this.api.signOut(accessToken); | |
if (error) | |
return { error }; | |
} | |
return { error: null }; | |
}); | |
} | |
/** | |
* Receive a notification every time an auth event happens. | |
* @returns {Subscription} A subscription object which can be used to unsubscribe itself. | |
*/ | |
onAuthStateChange(callback) { | |
try { | |
const id = uuid(); | |
const self = this; | |
const subscription = { | |
id, | |
callback, | |
unsubscribe: () => { | |
self.stateChangeEmitters.delete(id); | |
}, | |
}; | |
this.stateChangeEmitters.set(id, subscription); | |
return { data: subscription, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
} | |
_handleEmailSignIn(email, password, options = {}) { | |
var _a; | |
return __awaiter$6(this, void 0, void 0, function* () { | |
try { | |
const { data, error } = yield this.api.signInWithEmail(email, password, { | |
redirectTo: options.redirectTo, | |
}); | |
if (error || !data) | |
return { data: null, user: null, session: null, error }; | |
if ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.confirmed_at) { | |
this._saveSession(data); | |
this._notifyAllSubscribers('SIGNED_IN'); | |
} | |
return { data, user: data.user, session: data, error: null }; | |
} | |
catch (error) { | |
return { data: null, user: null, session: null, error }; | |
} | |
}); | |
} | |
_handleProviderSignIn(provider, options = {}) { | |
const url = this.api.getUrlForProvider(provider, { | |
redirectTo: options.redirectTo, | |
scopes: options.scopes, | |
}); | |
try { | |
// try to open on the browser | |
if (isBrowser$1()) { | |
window.location.href = url; | |
} | |
return { provider, url, data: null, session: null, user: null, error: null }; | |
} | |
catch (error) { | |
// fallback to returning the URL | |
if (!!url) | |
return { provider, url, data: null, session: null, user: null, error: null }; | |
return { data: null, user: null, session: null, error }; | |
} | |
} | |
/** | |
* Attempts to get the session from LocalStorage | |
* Note: this should never be async (even for React Native), as we need it to return immediately in the constructor. | |
*/ | |
_recoverSession() { | |
var _a; | |
try { | |
const json = isBrowser$1() && ((_a = this.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(STORAGE_KEY)); | |
if (!json || typeof json !== 'string') { | |
return null; | |
} | |
const data = JSON.parse(json); | |
const { currentSession, expiresAt } = data; | |
const timeNow = Math.round(Date.now() / 1000); | |
if (expiresAt >= timeNow && (currentSession === null || currentSession === void 0 ? void 0 : currentSession.user)) { | |
this._saveSession(currentSession); | |
this._notifyAllSubscribers('SIGNED_IN'); | |
} | |
} | |
catch (error) { | |
console.log('error', error); | |
} | |
} | |
/** | |
* Recovers the session from LocalStorage and refreshes | |
* Note: this method is async to accommodate for AsyncStorage e.g. in React native. | |
*/ | |
_recoverAndRefresh() { | |
return __awaiter$6(this, void 0, void 0, function* () { | |
try { | |
const json = isBrowser$1() && (yield this.localStorage.getItem(STORAGE_KEY)); | |
if (!json) { | |
return null; | |
} | |
const data = JSON.parse(json); | |
const { currentSession, expiresAt } = data; | |
const timeNow = Math.round(Date.now() / 1000); | |
if (expiresAt < timeNow) { | |
if (this.autoRefreshToken && currentSession.refresh_token) { | |
const { error } = yield this._callRefreshToken(currentSession.refresh_token); | |
if (error) { | |
console.log(error.message); | |
yield this._removeSession(); | |
} | |
} | |
else { | |
this._removeSession(); | |
} | |
} | |
else if (!currentSession || !currentSession.user) { | |
console.log('Current session is missing data.'); | |
this._removeSession(); | |
} | |
else { | |
// should be handled on _recoverSession method already | |
// But we still need the code here to accommodate for AsyncStorage e.g. in React native | |
this._saveSession(currentSession); | |
this._notifyAllSubscribers('SIGNED_IN'); | |
} | |
} | |
catch (err) { | |
console.error(err); | |
return null; | |
} | |
}); | |
} | |
_callRefreshToken(refresh_token) { | |
var _a; | |
if (refresh_token === void 0) { refresh_token = (_a = this.currentSession) === null || _a === void 0 ? void 0 : _a.refresh_token; } | |
return __awaiter$6(this, void 0, void 0, function* () { | |
try { | |
if (!refresh_token) { | |
throw new Error('No current session.'); | |
} | |
const { data, error } = yield this.api.refreshAccessToken(refresh_token); | |
if (error) | |
throw error; | |
if (!data) | |
throw Error('Invalid session data.'); | |
this._saveSession(data); | |
this._notifyAllSubscribers('SIGNED_IN'); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
_notifyAllSubscribers(event) { | |
this.stateChangeEmitters.forEach((x) => x.callback(event, this.currentSession)); | |
} | |
/** | |
* set currentSession and currentUser | |
* process to _startAutoRefreshToken if possible | |
*/ | |
_saveSession(session) { | |
this.currentSession = session; | |
this.currentUser = session.user; | |
const expiresAt = session.expires_at; | |
if (expiresAt) { | |
const timeNow = Math.round(Date.now() / 1000); | |
const expiresIn = expiresAt - timeNow; | |
const refreshDurationBeforeExpires = expiresIn > 60 ? 60 : 0.5; | |
this._startAutoRefreshToken((expiresIn - refreshDurationBeforeExpires) * 1000); | |
} | |
// Do we need any extra check before persist session | |
// access_token or user ? | |
if (this.persistSession && session.expires_at) { | |
this._persistSession(this.currentSession); | |
} | |
} | |
_persistSession(currentSession) { | |
const data = { currentSession, expiresAt: currentSession.expires_at }; | |
isBrowser$1() && this.localStorage.setItem(STORAGE_KEY, JSON.stringify(data)); | |
} | |
_removeSession() { | |
return __awaiter$6(this, void 0, void 0, function* () { | |
this.currentSession = null; | |
this.currentUser = null; | |
if (this.refreshTokenTimer) | |
clearTimeout(this.refreshTokenTimer); | |
isBrowser$1() && (yield this.localStorage.removeItem(STORAGE_KEY)); | |
}); | |
} | |
/** | |
* Clear and re-create refresh token timer | |
* @param value time intervals in milliseconds | |
*/ | |
_startAutoRefreshToken(value) { | |
if (this.refreshTokenTimer) | |
clearTimeout(this.refreshTokenTimer); | |
if (value <= 0 || !this.autoRefreshToken) | |
return; | |
this.refreshTokenTimer = setTimeout(() => this._callRefreshToken(), value); | |
if (typeof this.refreshTokenTimer.unref === 'function') | |
this.refreshTokenTimer.unref(); | |
} | |
} | |
class SupabaseAuthClient extends GoTrueClient { | |
constructor(options) { | |
super(options); | |
} | |
} | |
var __awaiter$5 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { | |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
class PostgrestBuilder { | |
constructor(builder) { | |
Object.assign(this, builder); | |
} | |
/** | |
* If there's an error with the query, throwOnError will reject the promise by | |
* throwing the error instead of returning it as part of a successful response. | |
* | |
* {@link https://github.com/supabase/supabase-js/issues/92} | |
*/ | |
throwOnError() { | |
this.shouldThrowOnError = true; | |
return this; | |
} | |
then(onfulfilled, onrejected) { | |
// https://postgrest.org/en/stable/api.html#switching-schemas | |
if (typeof this.schema === 'undefined') ; | |
else if (['GET', 'HEAD'].includes(this.method)) { | |
this.headers['Accept-Profile'] = this.schema; | |
} | |
else { | |
this.headers['Content-Profile'] = this.schema; | |
} | |
if (this.method !== 'GET' && this.method !== 'HEAD') { | |
this.headers['Content-Type'] = 'application/json'; | |
} | |
return fetch$1(this.url.toString(), { | |
method: this.method, | |
headers: this.headers, | |
body: JSON.stringify(this.body), | |
}) | |
.then((res) => __awaiter$5(this, void 0, void 0, function* () { | |
var _a, _b, _c; | |
let error = null; | |
let data = null; | |
let count = null; | |
if (res.ok) { | |
const isReturnMinimal = (_a = this.headers['Prefer']) === null || _a === void 0 ? void 0 : _a.split(',').includes('return=minimal'); | |
if (this.method !== 'HEAD' && !isReturnMinimal) { | |
const text = yield res.text(); | |
if (!text) ; | |
else if (this.headers['Accept'] === 'text/csv') { | |
data = text; | |
} | |
else { | |
data = JSON.parse(text); | |
} | |
} | |
const countHeader = (_b = this.headers['Prefer']) === null || _b === void 0 ? void 0 : _b.match(/count=(exact|planned|estimated)/); | |
const contentRange = (_c = res.headers.get('content-range')) === null || _c === void 0 ? void 0 : _c.split('/'); | |
if (countHeader && contentRange && contentRange.length > 1) { | |
count = parseInt(contentRange[1]); | |
} | |
} | |
else { | |
error = yield res.json(); | |
if (error && this.shouldThrowOnError) { | |
throw error; | |
} | |
} | |
const postgrestResponse = { | |
error, | |
data, | |
count, | |
status: res.status, | |
statusText: res.statusText, | |
body: data, | |
}; | |
return postgrestResponse; | |
})) | |
.then(onfulfilled, onrejected); | |
} | |
} | |
/** | |
* Post-filters (transforms) | |
*/ | |
class PostgrestTransformBuilder extends PostgrestBuilder { | |
/** | |
* Performs vertical filtering with SELECT. | |
* | |
* @param columns The columns to retrieve, separated by commas. | |
*/ | |
select(columns = '*') { | |
// Remove whitespaces except when quoted | |
let quoted = false; | |
const cleanedColumns = columns | |
.split('') | |
.map((c) => { | |
if (/\s/.test(c) && !quoted) { | |
return ''; | |
} | |
if (c === '"') { | |
quoted = !quoted; | |
} | |
return c; | |
}) | |
.join(''); | |
this.url.searchParams.set('select', cleanedColumns); | |
return this; | |
} | |
/** | |
* Orders the result with the specified `column`. | |
* | |
* @param column The column to order on. | |
* @param ascending If `true`, the result will be in ascending order. | |
* @param nullsFirst If `true`, `null`s appear first. | |
* @param foreignTable The foreign table to use (if `column` is a foreign column). | |
*/ | |
order(column, { ascending = true, nullsFirst = false, foreignTable, } = {}) { | |
const key = typeof foreignTable === 'undefined' ? 'order' : `${foreignTable}.order`; | |
const existingOrder = this.url.searchParams.get(key); | |
this.url.searchParams.set(key, `${existingOrder ? `${existingOrder},` : ''}${column}.${ascending ? 'asc' : 'desc'}.${nullsFirst ? 'nullsfirst' : 'nullslast'}`); | |
return this; | |
} | |
/** | |
* Limits the result with the specified `count`. | |
* | |
* @param count The maximum no. of rows to limit to. | |
* @param foreignTable The foreign table to use (for foreign columns). | |
*/ | |
limit(count, { foreignTable } = {}) { | |
const key = typeof foreignTable === 'undefined' ? 'limit' : `${foreignTable}.limit`; | |
this.url.searchParams.set(key, `${count}`); | |
return this; | |
} | |
/** | |
* Limits the result to rows within the specified range, inclusive. | |
* | |
* @param from The starting index from which to limit the result, inclusive. | |
* @param to The last index to which to limit the result, inclusive. | |
* @param foreignTable The foreign table to use (for foreign columns). | |
*/ | |
range(from, to, { foreignTable } = {}) { | |
const keyOffset = typeof foreignTable === 'undefined' ? 'offset' : `${foreignTable}.offset`; | |
const keyLimit = typeof foreignTable === 'undefined' ? 'limit' : `${foreignTable}.limit`; | |
this.url.searchParams.set(keyOffset, `${from}`); | |
// Range is inclusive, so add 1 | |
this.url.searchParams.set(keyLimit, `${to - from + 1}`); | |
return this; | |
} | |
/** | |
* Retrieves only one row from the result. Result must be one row (e.g. using | |
* `limit`), otherwise this will result in an error. | |
*/ | |
single() { | |
this.headers['Accept'] = 'application/vnd.pgrst.object+json'; | |
return this; | |
} | |
/** | |
* Retrieves at most one row from the result. Result must be at most one row | |
* (e.g. using `eq` on a UNIQUE column), otherwise this will result in an | |
* error. | |
*/ | |
maybeSingle() { | |
this.headers['Accept'] = 'application/vnd.pgrst.object+json'; | |
const _this = new PostgrestTransformBuilder(this); | |
_this.then = ((onfulfilled, onrejected) => this.then((res) => { | |
var _a; | |
if ((_a = res.error) === null || _a === void 0 ? void 0 : _a.details.includes('Results contain 0 rows')) { | |
return onfulfilled({ | |
error: null, | |
data: null, | |
count: res.count, | |
status: 200, | |
statusText: 'OK', | |
body: null, | |
}); | |
} | |
return onfulfilled(res); | |
}, onrejected)); | |
return _this; | |
} | |
/** | |
* Set the response type to CSV. | |
*/ | |
csv() { | |
this.headers['Accept'] = 'text/csv'; | |
return this; | |
} | |
} | |
class PostgrestFilterBuilder extends PostgrestTransformBuilder { | |
constructor() { | |
super(...arguments); | |
/** @deprecated Use `contains()` instead. */ | |
this.cs = this.contains; | |
/** @deprecated Use `containedBy()` instead. */ | |
this.cd = this.containedBy; | |
/** @deprecated Use `rangeLt()` instead. */ | |
this.sl = this.rangeLt; | |
/** @deprecated Use `rangeGt()` instead. */ | |
this.sr = this.rangeGt; | |
/** @deprecated Use `rangeGte()` instead. */ | |
this.nxl = this.rangeGte; | |
/** @deprecated Use `rangeLte()` instead. */ | |
this.nxr = this.rangeLte; | |
/** @deprecated Use `rangeAdjacent()` instead. */ | |
this.adj = this.rangeAdjacent; | |
/** @deprecated Use `overlaps()` instead. */ | |
this.ov = this.overlaps; | |
} | |
/** | |
* Finds all rows which doesn't satisfy the filter. | |
* | |
* @param column The column to filter on. | |
* @param operator The operator to filter with. | |
* @param value The value to filter with. | |
*/ | |
not(column, operator, value) { | |
this.url.searchParams.append(`${column}`, `not.${operator}.${value}`); | |
return this; | |
} | |
/** | |
* Finds all rows satisfying at least one of the filters. | |
* | |
* @param filters The filters to use, separated by commas. | |
* @param foreignTable The foreign table to use (if `column` is a foreign column). | |
*/ | |
or(filters, { foreignTable } = {}) { | |
const key = typeof foreignTable === 'undefined' ? 'or' : `${foreignTable}.or`; | |
this.url.searchParams.append(key, `(${filters})`); | |
return this; | |
} | |
/** | |
* Finds all rows whose value on the stated `column` exactly matches the | |
* specified `value`. | |
* | |
* @param column The column to filter on. | |
* @param value The value to filter with. | |
*/ | |
eq(column, value) { | |
this.url.searchParams.append(`${column}`, `eq.${value}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose value on the stated `column` doesn't match the | |
* specified `value`. | |
* | |
* @param column The column to filter on. | |
* @param value The value to filter with. | |
*/ | |
neq(column, value) { | |
this.url.searchParams.append(`${column}`, `neq.${value}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose value on the stated `column` is greater than the | |
* specified `value`. | |
* | |
* @param column The column to filter on. | |
* @param value The value to filter with. | |
*/ | |
gt(column, value) { | |
this.url.searchParams.append(`${column}`, `gt.${value}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose value on the stated `column` is greater than or | |
* equal to the specified `value`. | |
* | |
* @param column The column to filter on. | |
* @param value The value to filter with. | |
*/ | |
gte(column, value) { | |
this.url.searchParams.append(`${column}`, `gte.${value}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose value on the stated `column` is less than the | |
* specified `value`. | |
* | |
* @param column The column to filter on. | |
* @param value The value to filter with. | |
*/ | |
lt(column, value) { | |
this.url.searchParams.append(`${column}`, `lt.${value}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose value on the stated `column` is less than or equal | |
* to the specified `value`. | |
* | |
* @param column The column to filter on. | |
* @param value The value to filter with. | |
*/ | |
lte(column, value) { | |
this.url.searchParams.append(`${column}`, `lte.${value}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose value in the stated `column` matches the supplied | |
* `pattern` (case sensitive). | |
* | |
* @param column The column to filter on. | |
* @param pattern The pattern to filter with. | |
*/ | |
like(column, pattern) { | |
this.url.searchParams.append(`${column}`, `like.${pattern}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose value in the stated `column` matches the supplied | |
* `pattern` (case insensitive). | |
* | |
* @param column The column to filter on. | |
* @param pattern The pattern to filter with. | |
*/ | |
ilike(column, pattern) { | |
this.url.searchParams.append(`${column}`, `ilike.${pattern}`); | |
return this; | |
} | |
/** | |
* A check for exact equality (null, true, false), finds all rows whose | |
* value on the stated `column` exactly match the specified `value`. | |
* | |
* @param column The column to filter on. | |
* @param value The value to filter with. | |
*/ | |
is(column, value) { | |
this.url.searchParams.append(`${column}`, `is.${value}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose value on the stated `column` is found on the | |
* specified `values`. | |
* | |
* @param column The column to filter on. | |
* @param values The values to filter with. | |
*/ | |
in(column, values) { | |
const cleanedValues = values | |
.map((s) => { | |
// handle postgrest reserved characters | |
// https://postgrest.org/en/v7.0.0/api.html#reserved-characters | |
if (typeof s === 'string' && new RegExp('[,()]').test(s)) | |
return `"${s}"`; | |
else | |
return `${s}`; | |
}) | |
.join(','); | |
this.url.searchParams.append(`${column}`, `in.(${cleanedValues})`); | |
return this; | |
} | |
/** | |
* Finds all rows whose json, array, or range value on the stated `column` | |
* contains the values specified in `value`. | |
* | |
* @param column The column to filter on. | |
* @param value The value to filter with. | |
*/ | |
contains(column, value) { | |
if (typeof value === 'string') { | |
// range types can be inclusive '[', ']' or exclusive '(', ')' so just | |
// keep it simple and accept a string | |
this.url.searchParams.append(`${column}`, `cs.${value}`); | |
} | |
else if (Array.isArray(value)) { | |
// array | |
this.url.searchParams.append(`${column}`, `cs.{${value.join(',')}}`); | |
} | |
else { | |
// json | |
this.url.searchParams.append(`${column}`, `cs.${JSON.stringify(value)}`); | |
} | |
return this; | |
} | |
/** | |
* Finds all rows whose json, array, or range value on the stated `column` is | |
* contained by the specified `value`. | |
* | |
* @param column The column to filter on. | |
* @param value The value to filter with. | |
*/ | |
containedBy(column, value) { | |
if (typeof value === 'string') { | |
// range | |
this.url.searchParams.append(`${column}`, `cd.${value}`); | |
} | |
else if (Array.isArray(value)) { | |
// array | |
this.url.searchParams.append(`${column}`, `cd.{${value.join(',')}}`); | |
} | |
else { | |
// json | |
this.url.searchParams.append(`${column}`, `cd.${JSON.stringify(value)}`); | |
} | |
return this; | |
} | |
/** | |
* Finds all rows whose range value on the stated `column` is strictly to the | |
* left of the specified `range`. | |
* | |
* @param column The column to filter on. | |
* @param range The range to filter with. | |
*/ | |
rangeLt(column, range) { | |
this.url.searchParams.append(`${column}`, `sl.${range}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose range value on the stated `column` is strictly to | |
* the right of the specified `range`. | |
* | |
* @param column The column to filter on. | |
* @param range The range to filter with. | |
*/ | |
rangeGt(column, range) { | |
this.url.searchParams.append(`${column}`, `sr.${range}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose range value on the stated `column` does not extend | |
* to the left of the specified `range`. | |
* | |
* @param column The column to filter on. | |
* @param range The range to filter with. | |
*/ | |
rangeGte(column, range) { | |
this.url.searchParams.append(`${column}`, `nxl.${range}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose range value on the stated `column` does not extend | |
* to the right of the specified `range`. | |
* | |
* @param column The column to filter on. | |
* @param range The range to filter with. | |
*/ | |
rangeLte(column, range) { | |
this.url.searchParams.append(`${column}`, `nxr.${range}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose range value on the stated `column` is adjacent to | |
* the specified `range`. | |
* | |
* @param column The column to filter on. | |
* @param range The range to filter with. | |
*/ | |
rangeAdjacent(column, range) { | |
this.url.searchParams.append(`${column}`, `adj.${range}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose array or range value on the stated `column` overlaps | |
* (has a value in common) with the specified `value`. | |
* | |
* @param column The column to filter on. | |
* @param value The value to filter with. | |
*/ | |
overlaps(column, value) { | |
if (typeof value === 'string') { | |
// range | |
this.url.searchParams.append(`${column}`, `ov.${value}`); | |
} | |
else { | |
// array | |
this.url.searchParams.append(`${column}`, `ov.{${value.join(',')}}`); | |
} | |
return this; | |
} | |
/** | |
* Finds all rows whose text or tsvector value on the stated `column` matches | |
* the tsquery in `query`. | |
* | |
* @param column The column to filter on. | |
* @param query The Postgres tsquery string to filter with. | |
* @param config The text search configuration to use. | |
* @param type The type of tsquery conversion to use on `query`. | |
*/ | |
textSearch(column, query, { config, type = null, } = {}) { | |
let typePart = ''; | |
if (type === 'plain') { | |
typePart = 'pl'; | |
} | |
else if (type === 'phrase') { | |
typePart = 'ph'; | |
} | |
else if (type === 'websearch') { | |
typePart = 'w'; | |
} | |
const configPart = config === undefined ? '' : `(${config})`; | |
this.url.searchParams.append(`${column}`, `${typePart}fts${configPart}.${query}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose tsvector value on the stated `column` matches | |
* to_tsquery(`query`). | |
* | |
* @param column The column to filter on. | |
* @param query The Postgres tsquery string to filter with. | |
* @param config The text search configuration to use. | |
* | |
* @deprecated Use `textSearch()` instead. | |
*/ | |
fts(column, query, { config } = {}) { | |
const configPart = typeof config === 'undefined' ? '' : `(${config})`; | |
this.url.searchParams.append(`${column}`, `fts${configPart}.${query}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose tsvector value on the stated `column` matches | |
* plainto_tsquery(`query`). | |
* | |
* @param column The column to filter on. | |
* @param query The Postgres tsquery string to filter with. | |
* @param config The text search configuration to use. | |
* | |
* @deprecated Use `textSearch()` with `type: 'plain'` instead. | |
*/ | |
plfts(column, query, { config } = {}) { | |
const configPart = typeof config === 'undefined' ? '' : `(${config})`; | |
this.url.searchParams.append(`${column}`, `plfts${configPart}.${query}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose tsvector value on the stated `column` matches | |
* phraseto_tsquery(`query`). | |
* | |
* @param column The column to filter on. | |
* @param query The Postgres tsquery string to filter with. | |
* @param config The text search configuration to use. | |
* | |
* @deprecated Use `textSearch()` with `type: 'phrase'` instead. | |
*/ | |
phfts(column, query, { config } = {}) { | |
const configPart = typeof config === 'undefined' ? '' : `(${config})`; | |
this.url.searchParams.append(`${column}`, `phfts${configPart}.${query}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose tsvector value on the stated `column` matches | |
* websearch_to_tsquery(`query`). | |
* | |
* @param column The column to filter on. | |
* @param query The Postgres tsquery string to filter with. | |
* @param config The text search configuration to use. | |
* | |
* @deprecated Use `textSearch()` with `type: 'websearch'` instead. | |
*/ | |
wfts(column, query, { config } = {}) { | |
const configPart = typeof config === 'undefined' ? '' : `(${config})`; | |
this.url.searchParams.append(`${column}`, `wfts${configPart}.${query}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose `column` satisfies the filter. | |
* | |
* @param column The column to filter on. | |
* @param operator The operator to filter with. | |
* @param value The value to filter with. | |
*/ | |
filter(column, operator, value) { | |
this.url.searchParams.append(`${column}`, `${operator}.${value}`); | |
return this; | |
} | |
/** | |
* Finds all rows whose columns match the specified `query` object. | |
* | |
* @param query The object to filter with, with column names as keys mapped | |
* to their filter values. | |
*/ | |
match(query) { | |
Object.keys(query).forEach((key) => { | |
this.url.searchParams.append(`${key}`, `eq.${query[key]}`); | |
}); | |
return this; | |
} | |
} | |
class PostgrestQueryBuilder extends PostgrestBuilder { | |
constructor(url, { headers = {}, schema } = {}) { | |
super({}); | |
this.url = new URL(url); | |
this.headers = Object.assign({}, headers); | |
this.schema = schema; | |
} | |
/** | |
* Performs vertical filtering with SELECT. | |
* | |
* @param columns The columns to retrieve, separated by commas. | |
* @param head When set to true, select will void data. | |
* @param count Count algorithm to use to count rows in a table. | |
*/ | |
select(columns = '*', { head = false, count = null, } = {}) { | |
this.method = 'GET'; | |
// Remove whitespaces except when quoted | |
let quoted = false; | |
const cleanedColumns = columns | |
.split('') | |
.map((c) => { | |
if (/\s/.test(c) && !quoted) { | |
return ''; | |
} | |
if (c === '"') { | |
quoted = !quoted; | |
} | |
return c; | |
}) | |
.join(''); | |
this.url.searchParams.set('select', cleanedColumns); | |
if (count) { | |
this.headers['Prefer'] = `count=${count}`; | |
} | |
if (head) { | |
this.method = 'HEAD'; | |
} | |
return new PostgrestFilterBuilder(this); | |
} | |
insert(values, { upsert = false, onConflict, returning = 'representation', count = null, } = {}) { | |
this.method = 'POST'; | |
const prefersHeaders = [`return=${returning}`]; | |
if (upsert) | |
prefersHeaders.push('resolution=merge-duplicates'); | |
if (upsert && onConflict !== undefined) | |
this.url.searchParams.set('on_conflict', onConflict); | |
this.body = values; | |
if (count) { | |
prefersHeaders.push(`count=${count}`); | |
} | |
this.headers['Prefer'] = prefersHeaders.join(','); | |
if (Array.isArray(values)) { | |
const columns = values.reduce((acc, x) => acc.concat(Object.keys(x)), []); | |
if (columns.length > 0) { | |
const uniqueColumns = [...new Set(columns)]; | |
this.url.searchParams.set('columns', uniqueColumns.join(',')); | |
} | |
} | |
return new PostgrestFilterBuilder(this); | |
} | |
/** | |
* Performs an UPSERT into the table. | |
* | |
* @param values The values to insert. | |
* @param onConflict By specifying the `on_conflict` query parameter, you can make UPSERT work on a column(s) that has a UNIQUE constraint. | |
* @param returning By default the new record is returned. Set this to 'minimal' if you don't need this value. | |
* @param count Count algorithm to use to count rows in a table. | |
* @param ignoreDuplicates Specifies if duplicate rows should be ignored and not inserted. | |
*/ | |
upsert(values, { onConflict, returning = 'representation', count = null, ignoreDuplicates = false, } = {}) { | |
this.method = 'POST'; | |
const prefersHeaders = [ | |
`resolution=${ignoreDuplicates ? 'ignore' : 'merge'}-duplicates`, | |
`return=${returning}`, | |
]; | |
if (onConflict !== undefined) | |
this.url.searchParams.set('on_conflict', onConflict); | |
this.body = values; | |
if (count) { | |
prefersHeaders.push(`count=${count}`); | |
} | |
this.headers['Prefer'] = prefersHeaders.join(','); | |
return new PostgrestFilterBuilder(this); | |
} | |
/** | |
* Performs an UPDATE on the table. | |
* | |
* @param values The values to update. | |
* @param returning By default the updated record is returned. Set this to 'minimal' if you don't need this value. | |
* @param count Count algorithm to use to count rows in a table. | |
*/ | |
update(values, { returning = 'representation', count = null, } = {}) { | |
this.method = 'PATCH'; | |
const prefersHeaders = [`return=${returning}`]; | |
this.body = values; | |
if (count) { | |
prefersHeaders.push(`count=${count}`); | |
} | |
this.headers['Prefer'] = prefersHeaders.join(','); | |
return new PostgrestFilterBuilder(this); | |
} | |
/** | |
* Performs a DELETE on the table. | |
* | |
* @param returning If `true`, return the deleted row(s) in the response. | |
* @param count Count algorithm to use to count rows in a table. | |
*/ | |
delete({ returning = 'representation', count = null, } = {}) { | |
this.method = 'DELETE'; | |
const prefersHeaders = [`return=${returning}`]; | |
if (count) { | |
prefersHeaders.push(`count=${count}`); | |
} | |
this.headers['Prefer'] = prefersHeaders.join(','); | |
return new PostgrestFilterBuilder(this); | |
} | |
} | |
class PostgrestRpcBuilder extends PostgrestBuilder { | |
constructor(url, { headers = {}, schema } = {}) { | |
super({}); | |
this.url = new URL(url); | |
this.headers = Object.assign({}, headers); | |
this.schema = schema; | |
} | |
/** | |
* Perform a stored procedure call. | |
*/ | |
rpc(params, { count = null, } = {}) { | |
this.method = 'POST'; | |
this.body = params; | |
if (count) { | |
if (this.headers['Prefer'] !== undefined) | |
this.headers['Prefer'] += `,count=${count}`; | |
else | |
this.headers['Prefer'] = `count=${count}`; | |
} | |
return new PostgrestFilterBuilder(this); | |
} | |
} | |
class PostgrestClient { | |
/** | |
* Creates a PostgREST client. | |
* | |
* @param url URL of the PostgREST endpoint. | |
* @param headers Custom headers. | |
* @param schema Postgres schema to switch to. | |
*/ | |
constructor(url, { headers = {}, schema } = {}) { | |
this.url = url; | |
this.headers = headers; | |
this.schema = schema; | |
} | |
/** | |
* Authenticates the request with JWT. | |
* | |
* @param token The JWT token to use. | |
*/ | |
auth(token) { | |
this.headers['Authorization'] = `Bearer ${token}`; | |
return this; | |
} | |
/** | |
* Perform a table operation. | |
* | |
* @param table The table name to operate on. | |
*/ | |
from(table) { | |
const url = `${this.url}/${table}`; | |
return new PostgrestQueryBuilder(url, { headers: this.headers, schema: this.schema }); | |
} | |
/** | |
* Perform a stored procedure call. | |
* | |
* @param fn The function name to call. | |
* @param params The parameters to pass to the function call. | |
* @param count Count algorithm to use to count rows in a table. | |
*/ | |
rpc(fn, params, { count = null, } = {}) { | |
const url = `${this.url}/rpc/${fn}`; | |
return new PostgrestRpcBuilder(url, { | |
headers: this.headers, | |
schema: this.schema, | |
}).rpc(params, { count }); | |
} | |
} | |
/** | |
* Helpers to convert the change Payload into native JS types. | |
*/ | |
// Adapted from epgsql (src/epgsql_binary.erl), this module licensed under | |
// 3-clause BSD found here: https://raw.githubusercontent.com/epgsql/epgsql/devel/LICENSE | |
var PostgresTypes; | |
(function (PostgresTypes) { | |
PostgresTypes["abstime"] = "abstime"; | |
PostgresTypes["bool"] = "bool"; | |
PostgresTypes["date"] = "date"; | |
PostgresTypes["daterange"] = "daterange"; | |
PostgresTypes["float4"] = "float4"; | |
PostgresTypes["float8"] = "float8"; | |
PostgresTypes["int2"] = "int2"; | |
PostgresTypes["int4"] = "int4"; | |
PostgresTypes["int4range"] = "int4range"; | |
PostgresTypes["int8"] = "int8"; | |
PostgresTypes["int8range"] = "int8range"; | |
PostgresTypes["json"] = "json"; | |
PostgresTypes["jsonb"] = "jsonb"; | |
PostgresTypes["money"] = "money"; | |
PostgresTypes["numeric"] = "numeric"; | |
PostgresTypes["oid"] = "oid"; | |
PostgresTypes["reltime"] = "reltime"; | |
PostgresTypes["time"] = "time"; | |
PostgresTypes["timestamp"] = "timestamp"; | |
PostgresTypes["timestamptz"] = "timestamptz"; | |
PostgresTypes["timetz"] = "timetz"; | |
PostgresTypes["tsrange"] = "tsrange"; | |
PostgresTypes["tstzrange"] = "tstzrange"; | |
})(PostgresTypes || (PostgresTypes = {})); | |
/** | |
* Takes an array of columns and an object of string values then converts each string value | |
* to its mapped type. | |
* | |
* @param {{name: String, type: String}[]} columns | |
* @param {Object} records | |
* @param {Object} options The map of various options that can be applied to the mapper | |
* @param {Array} options.skipTypes The array of types that should not be converted | |
* | |
* @example convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {}) | |
* //=>{ first_name: 'Paul', age: 33 } | |
*/ | |
const convertChangeData = (columns, records, options = {}) => { | |
let result = {}; | |
let skipTypes = typeof options.skipTypes !== 'undefined' ? options.skipTypes : []; | |
Object.entries(records).map(([key, value]) => { | |
result[key] = convertColumn(key, columns, records, skipTypes); | |
}); | |
return result; | |
}; | |
/** | |
* Converts the value of an individual column. | |
* | |
* @param {String} columnName The column that you want to convert | |
* @param {{name: String, type: String}[]} columns All of the columns | |
* @param {Object} records The map of string values | |
* @param {Array} skipTypes An array of types that should not be converted | |
* @return {object} Useless information | |
* | |
* @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], ['Paul', '33'], []) | |
* //=> 33 | |
* @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], ['Paul', '33'], ['int4']) | |
* //=> "33" | |
*/ | |
const convertColumn = (columnName, columns, records, skipTypes) => { | |
let column = columns.find((x) => x.name == columnName); | |
if (!column || skipTypes.includes(column.type)) { | |
return noop$1(records[columnName]); | |
} | |
else { | |
return convertCell(column.type, records[columnName]); | |
} | |
}; | |
/** | |
* If the value of the cell is `null`, returns null. | |
* Otherwise converts the string value to the correct type. | |
* @param {String} type A postgres column type | |
* @param {String} stringValue The cell value | |
* | |
* @example convertCell('bool', 'true') | |
* //=> true | |
* @example convertCell('int8', '10') | |
* //=> 10 | |
* @example convertCell('_int4', '{1,2,3,4}') | |
* //=> [1,2,3,4] | |
*/ | |
const convertCell = (type, stringValue) => { | |
try { | |
if (stringValue === null) | |
return null; | |
// if data type is an array | |
if (type.charAt(0) === '_') { | |
let arrayValue = type.slice(1, type.length); | |
return toArray(stringValue, arrayValue); | |
} | |
// If not null, convert to correct type. | |
switch (type) { | |
case PostgresTypes.abstime: | |
return noop$1(stringValue); // To allow users to cast it based on Timezone | |
case PostgresTypes.bool: | |
return toBoolean(stringValue); | |
case PostgresTypes.date: | |
return noop$1(stringValue); // To allow users to cast it based on Timezone | |
case PostgresTypes.daterange: | |
return toDateRange(stringValue); | |
case PostgresTypes.float4: | |
return toFloat(stringValue); | |
case PostgresTypes.float8: | |
return toFloat(stringValue); | |
case PostgresTypes.int2: | |
return toInt(stringValue); | |
case PostgresTypes.int4: | |
return toInt(stringValue); | |
case PostgresTypes.int4range: | |
return toIntRange(stringValue); | |
case PostgresTypes.int8: | |
return toInt(stringValue); | |
case PostgresTypes.int8range: | |
return toIntRange(stringValue); | |
case PostgresTypes.json: | |
return toJson(stringValue); | |
case PostgresTypes.jsonb: | |
return toJson(stringValue); | |
case PostgresTypes.money: | |
return toFloat(stringValue); | |
case PostgresTypes.numeric: | |
return toFloat(stringValue); | |
case PostgresTypes.oid: | |
return toInt(stringValue); | |
case PostgresTypes.reltime: | |
return noop$1(stringValue); // To allow users to cast it based on Timezone | |
case PostgresTypes.time: | |
return noop$1(stringValue); // To allow users to cast it based on Timezone | |
case PostgresTypes.timestamp: | |
return toTimestampString(stringValue); // Format to be consistent with PostgREST | |
case PostgresTypes.timestamptz: | |
return noop$1(stringValue); // To allow users to cast it based on Timezone | |
case PostgresTypes.timetz: | |
return noop$1(stringValue); // To allow users to cast it based on Timezone | |
case PostgresTypes.tsrange: | |
return toDateRange(stringValue); | |
case PostgresTypes.tstzrange: | |
return toDateRange(stringValue); | |
default: | |
// All the rest will be returned as strings | |
return noop$1(stringValue); | |
} | |
} | |
catch (error) { | |
console.log(`Could not convert cell of type ${type} and value ${stringValue}`); | |
console.log(`This is the error: ${error}`); | |
return stringValue; | |
} | |
}; | |
const noop$1 = (stringValue) => { | |
return stringValue; | |
}; | |
const toBoolean = (stringValue) => { | |
switch (stringValue) { | |
case 't': | |
return true; | |
case 'f': | |
return false; | |
default: | |
return null; | |
} | |
}; | |
const toDateRange = (stringValue) => { | |
let arr = JSON.parse(stringValue); | |
return [new Date(arr[0]), new Date(arr[1])]; | |
}; | |
const toFloat = (stringValue) => { | |
return parseFloat(stringValue); | |
}; | |
const toInt = (stringValue) => { | |
return parseInt(stringValue); | |
}; | |
const toIntRange = (stringValue) => { | |
let arr = JSON.parse(stringValue); | |
return [parseInt(arr[0]), parseInt(arr[1])]; | |
}; | |
const toJson = (stringValue) => { | |
return JSON.parse(stringValue); | |
}; | |
/** | |
* Converts a Postgres Array into a native JS array | |
* | |
* @example toArray('{1,2,3,4}', 'int4') | |
* //=> [1,2,3,4] | |
* @example toArray('{}', 'int4') | |
* //=> [] | |
*/ | |
const toArray = (stringValue, type) => { | |
// this takes off the '{' & '}' | |
let stringEnriched = stringValue.slice(1, stringValue.length - 1); | |
// converts the string into an array | |
// if string is empty (meaning the array was empty), an empty array will be immediately returned | |
let stringArray = stringEnriched.length > 0 ? stringEnriched.split(',') : []; | |
let array = stringArray.map((string) => { | |
return convertCell(type, string); | |
}); | |
return array; | |
}; | |
/** | |
* Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T' | |
* See https://github.com/supabase/supabase/issues/18 | |
* | |
* @example toTimestampString('2019-09-10 00:00:00') | |
* //=> '2019-09-10T00:00:00' | |
*/ | |
const toTimestampString = (stringValue) => { | |
return stringValue.replace(' ', 'T'); | |
}; | |
const VSN = '1.0.0'; | |
const DEFAULT_TIMEOUT = 10000; | |
const WS_CLOSE_NORMAL = 1000; | |
var SOCKET_STATES; | |
(function (SOCKET_STATES) { | |
SOCKET_STATES[SOCKET_STATES["connecting"] = 0] = "connecting"; | |
SOCKET_STATES[SOCKET_STATES["open"] = 1] = "open"; | |
SOCKET_STATES[SOCKET_STATES["closing"] = 2] = "closing"; | |
SOCKET_STATES[SOCKET_STATES["closed"] = 3] = "closed"; | |
})(SOCKET_STATES || (SOCKET_STATES = {})); | |
var CHANNEL_STATES; | |
(function (CHANNEL_STATES) { | |
CHANNEL_STATES["closed"] = "closed"; | |
CHANNEL_STATES["errored"] = "errored"; | |
CHANNEL_STATES["joined"] = "joined"; | |
CHANNEL_STATES["joining"] = "joining"; | |
CHANNEL_STATES["leaving"] = "leaving"; | |
})(CHANNEL_STATES || (CHANNEL_STATES = {})); | |
var CHANNEL_EVENTS; | |
(function (CHANNEL_EVENTS) { | |
CHANNEL_EVENTS["close"] = "phx_close"; | |
CHANNEL_EVENTS["error"] = "phx_error"; | |
CHANNEL_EVENTS["join"] = "phx_join"; | |
CHANNEL_EVENTS["reply"] = "phx_reply"; | |
CHANNEL_EVENTS["leave"] = "phx_leave"; | |
})(CHANNEL_EVENTS || (CHANNEL_EVENTS = {})); | |
var TRANSPORTS; | |
(function (TRANSPORTS) { | |
TRANSPORTS["websocket"] = "websocket"; | |
})(TRANSPORTS || (TRANSPORTS = {})); | |
/** | |
* Creates a timer that accepts a `timerCalc` function to perform calculated timeout retries, such as exponential backoff. | |
* | |
* @example | |
* let reconnectTimer = new Timer(() => this.connect(), function(tries){ | |
* return [1000, 5000, 10000][tries - 1] || 10000 | |
* }) | |
* reconnectTimer.scheduleTimeout() // fires after 1000 | |
* reconnectTimer.scheduleTimeout() // fires after 5000 | |
* reconnectTimer.reset() | |
* reconnectTimer.scheduleTimeout() // fires after 1000 | |
*/ | |
class Timer { | |
constructor(callback, timerCalc) { | |
this.callback = callback; | |
this.timerCalc = timerCalc; | |
this.timer = undefined; | |
this.tries = 0; | |
this.callback = callback; | |
this.timerCalc = timerCalc; | |
} | |
reset() { | |
this.tries = 0; | |
clearTimeout(this.timer); | |
} | |
// Cancels any previous scheduleTimeout and schedules callback | |
scheduleTimeout() { | |
clearTimeout(this.timer); | |
this.timer = setTimeout(() => { | |
this.tries = this.tries + 1; | |
this.callback(); | |
}, this.timerCalc(this.tries + 1)); | |
} | |
} | |
class Push { | |
/** | |
* Initializes the Push | |
* | |
* @param channel The Channel | |
* @param event The event, for example `"phx_join"` | |
* @param payload The payload, for example `{user_id: 123}` | |
* @param timeout The push timeout in milliseconds | |
*/ | |
constructor(channel, event, payload = {}, timeout = DEFAULT_TIMEOUT) { | |
this.channel = channel; | |
this.event = event; | |
this.payload = payload; | |
this.timeout = timeout; | |
this.sent = false; | |
this.timeoutTimer = undefined; | |
this.ref = ''; | |
this.receivedResp = null; | |
this.recHooks = []; | |
this.refEvent = null; | |
} | |
resend(timeout) { | |
this.timeout = timeout; | |
this._cancelRefEvent(); | |
this.ref = ''; | |
this.refEvent = null; | |
this.receivedResp = null; | |
this.sent = false; | |
this.send(); | |
} | |
send() { | |
if (this._hasReceived('timeout')) { | |
return; | |
} | |
this.startTimeout(); | |
this.sent = true; | |
this.channel.socket.push({ | |
topic: this.channel.topic, | |
event: this.event, | |
payload: this.payload, | |
ref: this.ref, | |
}); | |
} | |
receive(status, callback) { | |
var _a; | |
if (this._hasReceived(status)) { | |
callback((_a = this.receivedResp) === null || _a === void 0 ? void 0 : _a.response); | |
} | |
this.recHooks.push({ status, callback }); | |
return this; | |
} | |
startTimeout() { | |
if (this.timeoutTimer) { | |
return; | |
} | |
this.ref = this.channel.socket.makeRef(); | |
this.refEvent = this.channel.replyEventName(this.ref); | |
this.channel.on(this.refEvent, (payload) => { | |
this._cancelRefEvent(); | |
this._cancelTimeout(); | |
this.receivedResp = payload; | |
this._matchReceive(payload); | |
}); | |
this.timeoutTimer = setTimeout(() => { | |
this.trigger('timeout', {}); | |
}, this.timeout); | |
} | |
trigger(status, response) { | |
if (this.refEvent) | |
this.channel.trigger(this.refEvent, { status, response }); | |
} | |
_cancelRefEvent() { | |
if (!this.refEvent) { | |
return; | |
} | |
this.channel.off(this.refEvent); | |
} | |
_cancelTimeout() { | |
clearTimeout(this.timeoutTimer); | |
this.timeoutTimer = undefined; | |
} | |
_matchReceive({ status, response, }) { | |
this.recHooks | |
.filter((h) => h.status === status) | |
.forEach((h) => h.callback(response)); | |
} | |
_hasReceived(status) { | |
return this.receivedResp && this.receivedResp.status === status; | |
} | |
} | |
class RealtimeSubscription { | |
constructor(topic, params = {}, socket) { | |
this.topic = topic; | |
this.params = params; | |
this.socket = socket; | |
this.bindings = []; | |
this.state = CHANNEL_STATES.closed; | |
this.joinedOnce = false; | |
this.pushBuffer = []; | |
this.timeout = this.socket.timeout; | |
this.joinPush = new Push(this, CHANNEL_EVENTS.join, this.params, this.timeout); | |
this.rejoinTimer = new Timer(() => this.rejoinUntilConnected(), this.socket.reconnectAfterMs); | |
this.joinPush.receive('ok', () => { | |
this.state = CHANNEL_STATES.joined; | |
this.rejoinTimer.reset(); | |
this.pushBuffer.forEach((pushEvent) => pushEvent.send()); | |
this.pushBuffer = []; | |
}); | |
this.onClose(() => { | |
this.rejoinTimer.reset(); | |
this.socket.log('channel', `close ${this.topic} ${this.joinRef()}`); | |
this.state = CHANNEL_STATES.closed; | |
this.socket.remove(this); | |
}); | |
this.onError((reason) => { | |
if (this.isLeaving() || this.isClosed()) { | |
return; | |
} | |
this.socket.log('channel', `error ${this.topic}`, reason); | |
this.state = CHANNEL_STATES.errored; | |
this.rejoinTimer.scheduleTimeout(); | |
}); | |
this.joinPush.receive('timeout', () => { | |
if (!this.isJoining()) { | |
return; | |
} | |
this.socket.log('channel', `timeout ${this.topic}`, this.joinPush.timeout); | |
this.state = CHANNEL_STATES.errored; | |
this.rejoinTimer.scheduleTimeout(); | |
}); | |
this.on(CHANNEL_EVENTS.reply, (payload, ref) => { | |
this.trigger(this.replyEventName(ref), payload); | |
}); | |
} | |
rejoinUntilConnected() { | |
this.rejoinTimer.scheduleTimeout(); | |
if (this.socket.isConnected()) { | |
this.rejoin(); | |
} | |
} | |
subscribe(timeout = this.timeout) { | |
if (this.joinedOnce) { | |
throw `tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance`; | |
} | |
else { | |
this.joinedOnce = true; | |
this.rejoin(timeout); | |
return this.joinPush; | |
} | |
} | |
onClose(callback) { | |
this.on(CHANNEL_EVENTS.close, callback); | |
} | |
onError(callback) { | |
this.on(CHANNEL_EVENTS.error, (reason) => callback(reason)); | |
} | |
on(event, callback) { | |
this.bindings.push({ event, callback }); | |
} | |
off(event) { | |
this.bindings = this.bindings.filter((bind) => bind.event !== event); | |
} | |
canPush() { | |
return this.socket.isConnected() && this.isJoined(); | |
} | |
push(event, payload, timeout = this.timeout) { | |
if (!this.joinedOnce) { | |
throw `tried to push '${event}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`; | |
} | |
let pushEvent = new Push(this, event, payload, timeout); | |
if (this.canPush()) { | |
pushEvent.send(); | |
} | |
else { | |
pushEvent.startTimeout(); | |
this.pushBuffer.push(pushEvent); | |
} | |
return pushEvent; | |
} | |
/** | |
* Leaves the channel | |
* | |
* Unsubscribes from server events, and instructs channel to terminate on server. | |
* Triggers onClose() hooks. | |
* | |
* To receive leave acknowledgements, use the a `receive` hook to bind to the server ack, ie: | |
* channel.unsubscribe().receive("ok", () => alert("left!") ) | |
*/ | |
unsubscribe(timeout = this.timeout) { | |
this.state = CHANNEL_STATES.leaving; | |
let onClose = () => { | |
this.socket.log('channel', `leave ${this.topic}`); | |
this.trigger(CHANNEL_EVENTS.close, 'leave', this.joinRef()); | |
}; | |
let leavePush = new Push(this, CHANNEL_EVENTS.leave, {}, timeout); | |
leavePush.receive('ok', () => onClose()).receive('timeout', () => onClose()); | |
leavePush.send(); | |
if (!this.canPush()) { | |
leavePush.trigger('ok', {}); | |
} | |
return leavePush; | |
} | |
/** | |
* Overridable message hook | |
* | |
* Receives all events for specialized message handling before dispatching to the channel callbacks. | |
* Must return the payload, modified or unmodified. | |
*/ | |
onMessage(event, payload, ref) { | |
return payload; | |
} | |
isMember(topic) { | |
return this.topic === topic; | |
} | |
joinRef() { | |
return this.joinPush.ref; | |
} | |
sendJoin(timeout) { | |
this.state = CHANNEL_STATES.joining; | |
this.joinPush.resend(timeout); | |
} | |
rejoin(timeout = this.timeout) { | |
if (this.isLeaving()) { | |
return; | |
} | |
this.sendJoin(timeout); | |
} | |
trigger(event, payload, ref) { | |
let { close, error, leave, join } = CHANNEL_EVENTS; | |
let events = [close, error, leave, join]; | |
if (ref && events.indexOf(event) >= 0 && ref !== this.joinRef()) { | |
return; | |
} | |
let handledPayload = this.onMessage(event, payload, ref); | |
if (payload && !handledPayload) { | |
throw 'channel onMessage callbacks must return the payload, modified or unmodified'; | |
} | |
this.bindings | |
.filter((bind) => { | |
// Bind all events if the user specifies a wildcard. | |
if (bind.event === '*') { | |
return event === (payload === null || payload === void 0 ? void 0 : payload.type); | |
} | |
else { | |
return bind.event === event; | |
} | |
}) | |
.map((bind) => bind.callback(handledPayload, ref)); | |
} | |
replyEventName(ref) { | |
return `chan_reply_${ref}`; | |
} | |
isClosed() { | |
return this.state === CHANNEL_STATES.closed; | |
} | |
isErrored() { | |
return this.state === CHANNEL_STATES.errored; | |
} | |
isJoined() { | |
return this.state === CHANNEL_STATES.joined; | |
} | |
isJoining() { | |
return this.state === CHANNEL_STATES.joining; | |
} | |
isLeaving() { | |
return this.state === CHANNEL_STATES.leaving; | |
} | |
} | |
var naiveFallback = function () { | |
if (typeof self === "object" && self) return self; | |
if (typeof window === "object" && window) return window; | |
throw new Error("Unable to resolve global `this`"); | |
}; | |
var global$1 = (function () { | |
if (this) return this; | |
// Unexpected strict mode (may happen if e.g. bundled into ESM module) | |
// Fallback to standard globalThis if available | |
if (typeof globalThis === "object" && globalThis) return globalThis; | |
// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis | |
// In all ES5+ engines global object inherits from Object.prototype | |
// (if you approached one that doesn't please report) | |
try { | |
Object.defineProperty(Object.prototype, "__global__", { | |
get: function () { return this; }, | |
configurable: true | |
}); | |
} catch (error) { | |
// Unfortunate case of updates to Object.prototype being restricted | |
// via preventExtensions, seal or freeze | |
return naiveFallback(); | |
} | |
try { | |
// Safari case (window.__global__ works, but __global__ does not) | |
if (!__global__) return naiveFallback(); | |
return __global__; | |
} finally { | |
delete Object.prototype.__global__; | |
} | |
})(); | |
var _from = "websocket@^1.0.34"; | |
var _id = "websocket@1.0.34"; | |
var _inBundle = false; | |
var _integrity = "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ=="; | |
var _location = "/websocket"; | |
var _phantomChildren = { | |
}; | |
var _requested = { | |
type: "range", | |
registry: true, | |
raw: "websocket@^1.0.34", | |
name: "websocket", | |
escapedName: "websocket", | |
rawSpec: "^1.0.34", | |
saveSpec: null, | |
fetchSpec: "^1.0.34" | |
}; | |
var _requiredBy = [ | |
"/@supabase/realtime-js" | |
]; | |
var _resolved = "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz"; | |
var _shasum = "2bdc2602c08bf2c82253b730655c0ef7dcab3111"; | |
var _spec = "websocket@^1.0.34"; | |
var _where = "C:\\Users\\RogerVeciana\\Documents\\ss\\svelte\\supabase-svelte\\node_modules\\@supabase\\realtime-js"; | |
var author = { | |
name: "Brian McKelvey", | |
email: "theturtle32@gmail.com", | |
url: "https://github.com/theturtle32" | |
}; | |
var browser$1 = "lib/browser.js"; | |
var bugs = { | |
url: "https://github.com/theturtle32/WebSocket-Node/issues" | |
}; | |
var bundleDependencies = false; | |
var config = { | |
verbose: false | |
}; | |
var contributors = [ | |
{ | |
name: "Iñaki Baz Castillo", | |
email: "ibc@aliax.net", | |
url: "http://dev.sipdoc.net" | |
} | |
]; | |
var dependencies = { | |
bufferutil: "^4.0.1", | |
debug: "^2.2.0", | |
"es5-ext": "^0.10.50", | |
"typedarray-to-buffer": "^3.1.5", | |
"utf-8-validate": "^5.0.2", | |
yaeti: "^0.0.6" | |
}; | |
var deprecated = false; | |
var description = "Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455."; | |
var devDependencies = { | |
"buffer-equal": "^1.0.0", | |
gulp: "^4.0.2", | |
"gulp-jshint": "^2.0.4", | |
jshint: "^2.0.0", | |
"jshint-stylish": "^2.2.1", | |
tape: "^4.9.1" | |
}; | |
var directories = { | |
lib: "./lib" | |
}; | |
var engines = { | |
node: ">=4.0.0" | |
}; | |
var homepage = "https://github.com/theturtle32/WebSocket-Node"; | |
var keywords = [ | |
"websocket", | |
"websockets", | |
"socket", | |
"networking", | |
"comet", | |
"push", | |
"RFC-6455", | |
"realtime", | |
"server", | |
"client" | |
]; | |
var license = "Apache-2.0"; | |
var main = "index"; | |
var name = "websocket"; | |
var repository = { | |
type: "git", | |
url: "git+https://github.com/theturtle32/WebSocket-Node.git" | |
}; | |
var scripts = { | |
gulp: "gulp", | |
test: "tape test/unit/*.js" | |
}; | |
var version$1 = "1.0.34"; | |
var require$$0 = { | |
_from: _from, | |
_id: _id, | |
_inBundle: _inBundle, | |
_integrity: _integrity, | |
_location: _location, | |
_phantomChildren: _phantomChildren, | |
_requested: _requested, | |
_requiredBy: _requiredBy, | |
_resolved: _resolved, | |
_shasum: _shasum, | |
_spec: _spec, | |
_where: _where, | |
author: author, | |
browser: browser$1, | |
bugs: bugs, | |
bundleDependencies: bundleDependencies, | |
config: config, | |
contributors: contributors, | |
dependencies: dependencies, | |
deprecated: deprecated, | |
description: description, | |
devDependencies: devDependencies, | |
directories: directories, | |
engines: engines, | |
homepage: homepage, | |
keywords: keywords, | |
license: license, | |
main: main, | |
name: name, | |
repository: repository, | |
scripts: scripts, | |
version: version$1 | |
}; | |
var version = require$$0.version; | |
var _globalThis; | |
if (typeof globalThis === 'object') { | |
_globalThis = globalThis; | |
} else { | |
try { | |
_globalThis = global$1; | |
} catch (error) { | |
} finally { | |
if (!_globalThis && typeof window !== 'undefined') { _globalThis = window; } | |
if (!_globalThis) { throw new Error('Could not determine global this'); } | |
} | |
} | |
var NativeWebSocket = _globalThis.WebSocket || _globalThis.MozWebSocket; | |
/** | |
* Expose a W3C WebSocket class with just one or two arguments. | |
*/ | |
function W3CWebSocket(uri, protocols) { | |
var native_instance; | |
if (protocols) { | |
native_instance = new NativeWebSocket(uri, protocols); | |
} | |
else { | |
native_instance = new NativeWebSocket(uri); | |
} | |
/** | |
* 'native_instance' is an instance of nativeWebSocket (the browser's WebSocket | |
* class). Since it is an Object it will be returned as it is when creating an | |
* instance of W3CWebSocket via 'new W3CWebSocket()'. | |
* | |
* ECMAScript 5: http://bclary.com/2004/11/07/#a-13.2.2 | |
*/ | |
return native_instance; | |
} | |
if (NativeWebSocket) { | |
['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'].forEach(function(prop) { | |
Object.defineProperty(W3CWebSocket, prop, { | |
get: function() { return NativeWebSocket[prop]; } | |
}); | |
}); | |
} | |
/** | |
* Module exports. | |
*/ | |
var browser = { | |
'w3cwebsocket' : NativeWebSocket ? W3CWebSocket : null, | |
'version' : version | |
}; | |
// This file draws heavily from https://github.com/phoenixframework/phoenix/commit/cf098e9cf7a44ee6479d31d911a97d3c7430c6fe | |
// License: https://github.com/phoenixframework/phoenix/blob/master/LICENSE.md | |
class Serializer { | |
constructor() { | |
this.HEADER_LENGTH = 1; | |
} | |
decode(rawPayload, callback) { | |
if (rawPayload.constructor === ArrayBuffer) { | |
return callback(this._binaryDecode(rawPayload)); | |
} | |
if (typeof rawPayload === 'string') { | |
return callback(JSON.parse(rawPayload)); | |
} | |
return callback({}); | |
} | |
_binaryDecode(buffer) { | |
const view = new DataView(buffer); | |
const decoder = new TextDecoder(); | |
return this._decodeBroadcast(buffer, view, decoder); | |
} | |
_decodeBroadcast(buffer, view, decoder) { | |
const topicSize = view.getUint8(1); | |
const eventSize = view.getUint8(2); | |
let offset = this.HEADER_LENGTH + 2; | |
const topic = decoder.decode(buffer.slice(offset, offset + topicSize)); | |
offset = offset + topicSize; | |
const event = decoder.decode(buffer.slice(offset, offset + eventSize)); | |
offset = offset + eventSize; | |
const data = JSON.parse(decoder.decode(buffer.slice(offset, buffer.byteLength))); | |
return { ref: null, topic: topic, event: event, payload: data }; | |
} | |
} | |
var __awaiter$4 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { | |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
const noop = () => { }; | |
class RealtimeClient { | |
/** | |
* Initializes the Socket | |
* | |
* @param endPoint The string WebSocket endpoint, ie, "ws://example.com/socket", "wss://example.com", "/socket" (inherited host & protocol) | |
* @param options.transport The Websocket Transport, for example WebSocket. | |
* @param options.timeout The default timeout in milliseconds to trigger push timeouts. | |
* @param options.params The optional params to pass when connecting. | |
* @param options.headers The optional headers to pass when connecting. | |
* @param options.heartbeatIntervalMs The millisec interval to send a heartbeat message. | |
* @param options.logger The optional function for specialized logging, ie: logger: (kind, msg, data) => { console.log(`${kind}: ${msg}`, data) } | |
* @param options.encode The function to encode outgoing messages. Defaults to JSON: (payload, callback) => callback(JSON.stringify(payload)) | |
* @param options.decode The function to decode incoming messages. Defaults to Serializer's decode. | |
* @param options.longpollerTimeout The maximum timeout of a long poll AJAX request. Defaults to 20s (double the server long poll timer). | |
* @param options.reconnectAfterMs he optional function that returns the millsec reconnect interval. Defaults to stepped backoff off. | |
*/ | |
constructor(endPoint, options) { | |
this.channels = []; | |
this.endPoint = ''; | |
this.headers = {}; | |
this.params = {}; | |
this.timeout = DEFAULT_TIMEOUT; | |
this.transport = browser.w3cwebsocket; | |
this.heartbeatIntervalMs = 30000; | |
this.longpollerTimeout = 20000; | |
this.heartbeatTimer = undefined; | |
this.pendingHeartbeatRef = null; | |
this.ref = 0; | |
this.logger = noop; | |
this.conn = null; | |
this.sendBuffer = []; | |
this.serializer = new Serializer(); | |
this.stateChangeCallbacks = { | |
open: [], | |
close: [], | |
error: [], | |
message: [], | |
}; | |
this.endPoint = `${endPoint}/${TRANSPORTS.websocket}`; | |
if (options === null || options === void 0 ? void 0 : options.params) | |
this.params = options.params; | |
if (options === null || options === void 0 ? void 0 : options.headers) | |
this.headers = options.headers; | |
if (options === null || options === void 0 ? void 0 : options.timeout) | |
this.timeout = options.timeout; | |
if (options === null || options === void 0 ? void 0 : options.logger) | |
this.logger = options.logger; | |
if (options === null || options === void 0 ? void 0 : options.transport) | |
this.transport = options.transport; | |
if (options === null || options === void 0 ? void 0 : options.heartbeatIntervalMs) | |
this.heartbeatIntervalMs = options.heartbeatIntervalMs; | |
if (options === null || options === void 0 ? void 0 : options.longpollerTimeout) | |
this.longpollerTimeout = options.longpollerTimeout; | |
this.reconnectAfterMs = (options === null || options === void 0 ? void 0 : options.reconnectAfterMs) ? options.reconnectAfterMs | |
: (tries) => { | |
return [1000, 2000, 5000, 10000][tries - 1] || 10000; | |
}; | |
this.encode = (options === null || options === void 0 ? void 0 : options.encode) ? options.encode | |
: (payload, callback) => { | |
return callback(JSON.stringify(payload)); | |
}; | |
this.decode = (options === null || options === void 0 ? void 0 : options.decode) ? options.decode | |
: this.serializer.decode.bind(this.serializer); | |
this.reconnectTimer = new Timer(() => __awaiter$4(this, void 0, void 0, function* () { | |
yield this.disconnect(); | |
this.connect(); | |
}), this.reconnectAfterMs); | |
} | |
/** | |
* Connects the socket. | |
*/ | |
connect() { | |
if (this.conn) { | |
return; | |
} | |
this.conn = new this.transport(this.endPointURL(), [], null, this.headers); | |
if (this.conn) { | |
// this.conn.timeout = this.longpollerTimeout // TYPE ERROR | |
this.conn.binaryType = 'arraybuffer'; | |
this.conn.onopen = () => this._onConnOpen(); | |
this.conn.onerror = (error) => this._onConnError(error); | |
this.conn.onmessage = (event) => this.onConnMessage(event); | |
this.conn.onclose = (event) => this._onConnClose(event); | |
} | |
} | |
/** | |
* Disconnects the socket. | |
* | |
* @param code A numeric status code to send on disconnect. | |
* @param reason A custom reason for the disconnect. | |
*/ | |
disconnect(code, reason) { | |
return new Promise((resolve, _reject) => { | |
try { | |
if (this.conn) { | |
this.conn.onclose = function () { }; // noop | |
if (code) { | |
this.conn.close(code, reason || ''); | |
} | |
else { | |
this.conn.close(); | |
} | |
this.conn = null; | |
} | |
resolve({ error: null, data: true }); | |
} | |
catch (error) { | |
resolve({ error, data: false }); | |
} | |
}); | |
} | |
/** | |
* Logs the message. Override `this.logger` for specialized logging. | |
*/ | |
log(kind, msg, data) { | |
this.logger(kind, msg, data); | |
} | |
/** | |
* Registers a callback for connection state change event. | |
* @param callback A function to be called when the event occurs. | |
* | |
* @example | |
* socket.onOpen(() => console.log("Socket opened.")) | |
*/ | |
onOpen(callback) { | |
this.stateChangeCallbacks.open.push(callback); | |
} | |
/** | |
* Registers a callbacks for connection state change events. | |
* @param callback A function to be called when the event occurs. | |
* | |
* @example | |
* socket.onOpen(() => console.log("Socket closed.")) | |
*/ | |
onClose(callback) { | |
this.stateChangeCallbacks.close.push(callback); | |
} | |
/** | |
* Registers a callback for connection state change events. | |
* @param callback A function to be called when the event occurs. | |
* | |
* @example | |
* socket.onOpen((error) => console.log("An error occurred")) | |
*/ | |
onError(callback) { | |
this.stateChangeCallbacks.error.push(callback); | |
} | |
/** | |
* Calls a function any time a message is received. | |
* @param callback A function to be called when the event occurs. | |
* | |
* @example | |
* socket.onMessage((message) => console.log(message)) | |
*/ | |
onMessage(callback) { | |
this.stateChangeCallbacks.message.push(callback); | |
} | |
/** | |
* Returns the current state of the socket. | |
*/ | |
connectionState() { | |
switch (this.conn && this.conn.readyState) { | |
case SOCKET_STATES.connecting: | |
return 'connecting'; | |
case SOCKET_STATES.open: | |
return 'open'; | |
case SOCKET_STATES.closing: | |
return 'closing'; | |
default: | |
return 'closed'; | |
} | |
} | |
/** | |
* Retuns `true` is the connection is open. | |
*/ | |
isConnected() { | |
return this.connectionState() === 'open'; | |
} | |
/** | |
* Removes a subscription from the socket. | |
* | |
* @param channel An open subscription. | |
*/ | |
remove(channel) { | |
this.channels = this.channels.filter((c) => c.joinRef() !== channel.joinRef()); | |
} | |
channel(topic, chanParams = {}) { | |
let chan = new RealtimeSubscription(topic, chanParams, this); | |
this.channels.push(chan); | |
return chan; | |
} | |
push(data) { | |
let { topic, event, payload, ref } = data; | |
let callback = () => { | |
this.encode(data, (result) => { | |
var _a; | |
(_a = this.conn) === null || _a === void 0 ? void 0 : _a.send(result); | |
}); | |
}; | |
this.log('push', `${topic} ${event} (${ref})`, payload); | |
if (this.isConnected()) { | |
callback(); | |
} | |
else { | |
this.sendBuffer.push(callback); | |
} | |
} | |
onConnMessage(rawMessage) { | |
this.decode(rawMessage.data, (msg) => { | |
let { topic, event, payload, ref } = msg; | |
if (ref && ref === this.pendingHeartbeatRef) { | |
this.pendingHeartbeatRef = null; | |
} | |
else if (event === (payload === null || payload === void 0 ? void 0 : payload.type)) { | |
this._resetHeartbeat(); | |
} | |
this.log('receive', `${payload.status || ''} ${topic} ${event} ${(ref && '(' + ref + ')') || ''}`, payload); | |
this.channels | |
.filter((channel) => channel.isMember(topic)) | |
.forEach((channel) => channel.trigger(event, payload, ref)); | |
this.stateChangeCallbacks.message.forEach((callback) => callback(msg)); | |
}); | |
} | |
/** | |
* Returns the URL of the websocket. | |
*/ | |
endPointURL() { | |
return this._appendParams(this.endPoint, Object.assign({}, this.params, { vsn: VSN })); | |
} | |
/** | |
* Return the next message ref, accounting for overflows | |
*/ | |
makeRef() { | |
let newRef = this.ref + 1; | |
if (newRef === this.ref) { | |
this.ref = 0; | |
} | |
else { | |
this.ref = newRef; | |
} | |
return this.ref.toString(); | |
} | |
_onConnOpen() { | |
this.log('transport', `connected to ${this.endPointURL()}`); | |
this._flushSendBuffer(); | |
this.reconnectTimer.reset(); | |
this._resetHeartbeat(); | |
this.stateChangeCallbacks.open.forEach((callback) => callback()); | |
} | |
_onConnClose(event) { | |
this.log('transport', 'close', event); | |
this._triggerChanError(); | |
this.heartbeatTimer && clearInterval(this.heartbeatTimer); | |
this.reconnectTimer.scheduleTimeout(); | |
this.stateChangeCallbacks.close.forEach((callback) => callback(event)); | |
} | |
_onConnError(error) { | |
this.log('transport', error.message); | |
this._triggerChanError(); | |
this.stateChangeCallbacks.error.forEach((callback) => callback(error)); | |
} | |
_triggerChanError() { | |
this.channels.forEach((channel) => channel.trigger(CHANNEL_EVENTS.error)); | |
} | |
_appendParams(url, params) { | |
if (Object.keys(params).length === 0) { | |
return url; | |
} | |
const prefix = url.match(/\?/) ? '&' : '?'; | |
const query = new URLSearchParams(params); | |
return `${url}${prefix}${query}`; | |
} | |
_flushSendBuffer() { | |
if (this.isConnected() && this.sendBuffer.length > 0) { | |
this.sendBuffer.forEach((callback) => callback()); | |
this.sendBuffer = []; | |
} | |
} | |
_resetHeartbeat() { | |
this.pendingHeartbeatRef = null; | |
this.heartbeatTimer && clearInterval(this.heartbeatTimer); | |
this.heartbeatTimer = setInterval(() => this._sendHeartbeat(), this.heartbeatIntervalMs); | |
} | |
_sendHeartbeat() { | |
var _a; | |
if (!this.isConnected()) { | |
return; | |
} | |
if (this.pendingHeartbeatRef) { | |
this.pendingHeartbeatRef = null; | |
this.log('transport', 'heartbeat timeout. Attempting to re-establish connection'); | |
(_a = this.conn) === null || _a === void 0 ? void 0 : _a.close(WS_CLOSE_NORMAL, 'hearbeat timeout'); | |
return; | |
} | |
this.pendingHeartbeatRef = this.makeRef(); | |
this.push({ | |
topic: 'phoenix', | |
event: 'heartbeat', | |
payload: {}, | |
ref: this.pendingHeartbeatRef, | |
}); | |
} | |
} | |
class SupabaseRealtimeClient { | |
constructor(socket, schema, tableName) { | |
const topic = tableName === '*' ? `realtime:${schema}` : `realtime:${schema}:${tableName}`; | |
this.subscription = socket.channel(topic); | |
} | |
getPayloadRecords(payload) { | |
const records = { | |
new: {}, | |
old: {}, | |
}; | |
if (payload.type === 'INSERT' || payload.type === 'UPDATE') { | |
records.new = convertChangeData(payload.columns, payload.record); | |
} | |
if (payload.type === 'UPDATE' || payload.type === 'DELETE') { | |
records.old = convertChangeData(payload.columns, payload.old_record); | |
} | |
return records; | |
} | |
/** | |
* The event you want to listen to. | |
* | |
* @param event The event | |
* @param callback A callback function that is called whenever the event occurs. | |
*/ | |
on(event, callback) { | |
this.subscription.on(event, (payload) => { | |
let enrichedPayload = { | |
schema: payload.schema, | |
table: payload.table, | |
commit_timestamp: payload.commit_timestamp, | |
eventType: payload.type, | |
new: {}, | |
old: {}, | |
}; | |
enrichedPayload = Object.assign(Object.assign({}, enrichedPayload), this.getPayloadRecords(payload)); | |
callback(enrichedPayload); | |
}); | |
return this; | |
} | |
/** | |
* Enables the subscription. | |
*/ | |
subscribe(callback = () => { }) { | |
this.subscription.onError((e) => callback('SUBSCRIPTION_ERROR', e)); | |
this.subscription.onClose(() => callback('CLOSED')); | |
this.subscription | |
.subscribe() | |
.receive('ok', () => callback('SUBSCRIBED')) | |
.receive('error', (e) => callback('SUBSCRIPTION_ERROR', e)) | |
.receive('timeout', () => callback('RETRYING_AFTER_TIMEOUT')); | |
return this.subscription; | |
} | |
} | |
class SupabaseQueryBuilder extends PostgrestQueryBuilder { | |
constructor(url, { headers = {}, schema, realtime, table, }) { | |
super(url, { headers, schema }); | |
this._subscription = new SupabaseRealtimeClient(realtime, schema, table); | |
this._realtime = realtime; | |
} | |
/** | |
* Subscribe to realtime changes in your databse. | |
* @param event The database event which you would like to receive updates for, or you can use the special wildcard `*` to listen to all changes. | |
* @param callback A callback that will handle the payload that is sent whenever your database changes. | |
*/ | |
on(event, callback) { | |
if (!this._realtime.isConnected()) { | |
this._realtime.connect(); | |
} | |
return this._subscription.on(event, callback); | |
} | |
} | |
var __awaiter$3 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { | |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
const _getErrorMessage = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err); | |
const handleError = (error, reject) => { | |
if (typeof error.json !== 'function') { | |
return reject(error); | |
} | |
error.json().then((err) => { | |
return reject({ | |
message: _getErrorMessage(err), | |
status: (error === null || error === void 0 ? void 0 : error.status) || 500, | |
}); | |
}); | |
}; | |
const _getRequestParams = (method, options, parameters, body) => { | |
const params = { method, headers: (options === null || options === void 0 ? void 0 : options.headers) || {} }; | |
if (method === 'GET') { | |
return params; | |
} | |
params.headers = Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers); | |
params.body = JSON.stringify(body); | |
return Object.assign(Object.assign({}, params), parameters); | |
}; | |
function _handleRequest(method, url, options, parameters, body) { | |
return __awaiter$3(this, void 0, void 0, function* () { | |
return new Promise((resolve, reject) => { | |
fetch$1(url, _getRequestParams(method, options, parameters, body)) | |
.then((result) => { | |
if (!result.ok) | |
throw result; | |
if (options === null || options === void 0 ? void 0 : options.noResolveJson) | |
return resolve(result); | |
return result.json(); | |
}) | |
.then((data) => resolve(data)) | |
.catch((error) => handleError(error, reject)); | |
}); | |
}); | |
} | |
function get(url, options, parameters) { | |
return __awaiter$3(this, void 0, void 0, function* () { | |
return _handleRequest('GET', url, options, parameters); | |
}); | |
} | |
function post(url, body, options, parameters) { | |
return __awaiter$3(this, void 0, void 0, function* () { | |
return _handleRequest('POST', url, options, parameters, body); | |
}); | |
} | |
function put(url, body, options, parameters) { | |
return __awaiter$3(this, void 0, void 0, function* () { | |
return _handleRequest('PUT', url, options, parameters, body); | |
}); | |
} | |
function remove(url, body, options, parameters) { | |
return __awaiter$3(this, void 0, void 0, function* () { | |
return _handleRequest('DELETE', url, options, parameters, body); | |
}); | |
} | |
var __awaiter$2 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { | |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
class StorageBucketApi { | |
constructor(url, headers = {}) { | |
this.url = url; | |
this.headers = headers; | |
} | |
/** | |
* Retrieves the details of all Storage buckets within an existing product. | |
*/ | |
listBuckets() { | |
return __awaiter$2(this, void 0, void 0, function* () { | |
try { | |
const data = yield get(`${this.url}/bucket`, { headers: this.headers }); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Retrieves the details of an existing Storage bucket. | |
* | |
* @param id The unique identifier of the bucket you would like to retrieve. | |
*/ | |
getBucket(id) { | |
return __awaiter$2(this, void 0, void 0, function* () { | |
try { | |
const data = yield get(`${this.url}/bucket/${id}`, { headers: this.headers }); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Creates a new Storage bucket | |
* | |
* @param id A unique identifier for the bucket you are creating. | |
* @returns newly created bucket id | |
*/ | |
createBucket(id, options = { public: false }) { | |
return __awaiter$2(this, void 0, void 0, function* () { | |
try { | |
const data = yield post(`${this.url}/bucket`, { id, name: id, public: options.public }, { headers: this.headers }); | |
return { data: data.name, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Updates a new Storage bucket | |
* | |
* @param id A unique identifier for the bucket you are creating. | |
*/ | |
updateBucket(id, options) { | |
return __awaiter$2(this, void 0, void 0, function* () { | |
try { | |
const data = yield put(`${this.url}/bucket/${id}`, { id, name: id, public: options.public }, { headers: this.headers }); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Removes all objects inside a single bucket. | |
* | |
* @param id The unique identifier of the bucket you would like to empty. | |
*/ | |
emptyBucket(id) { | |
return __awaiter$2(this, void 0, void 0, function* () { | |
try { | |
const data = yield post(`${this.url}/bucket/${id}/empty`, {}, { headers: this.headers }); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Deletes an existing bucket. A bucket can't be deleted with existing objects inside it. | |
* You must first `empty()` the bucket. | |
* | |
* @param id The unique identifier of the bucket you would like to delete. | |
*/ | |
deleteBucket(id) { | |
return __awaiter$2(this, void 0, void 0, function* () { | |
try { | |
const data = yield remove(`${this.url}/bucket/${id}`, {}, { headers: this.headers }); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
} | |
const isBrowser = () => typeof window !== 'undefined'; | |
var __awaiter$1 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { | |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
const DEFAULT_SEARCH_OPTIONS = { | |
limit: 100, | |
offset: 0, | |
sortBy: { | |
column: 'name', | |
order: 'asc', | |
}, | |
}; | |
const DEFAULT_FILE_OPTIONS = { | |
cacheControl: '3600', | |
upsert: false, | |
}; | |
class StorageFileApi { | |
constructor(url, headers = {}, bucketId) { | |
this.url = url; | |
this.headers = headers; | |
this.bucketId = bucketId; | |
} | |
/** | |
* Uploads a file to an existing bucket. | |
* | |
* @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload. | |
* @param file The File object to be stored in the bucket. | |
* @param fileOptions HTTP headers. For example `cacheControl` | |
*/ | |
upload(path, file, fileOptions) { | |
return __awaiter$1(this, void 0, void 0, function* () { | |
try { | |
if (!isBrowser()) | |
throw new Error('No browser detected.'); | |
const formData = new FormData(); | |
const options = Object.assign(Object.assign({}, DEFAULT_FILE_OPTIONS), fileOptions); | |
formData.append('cacheControl', options.cacheControl); | |
formData.append('', file, file.name); | |
const _path = this._getFinalPath(path); | |
const res = yield fetch(`${this.url}/object/${_path}`, { | |
method: 'POST', | |
body: formData, | |
headers: Object.assign(Object.assign({}, this.headers), { 'x-upsert': String(fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.upsert) }), | |
}); | |
if (res.ok) { | |
// const data = await res.json() | |
// temporary fix till backend is updated to the latest storage-api version | |
return { data: { Key: _path }, error: null }; | |
} | |
else { | |
const error = yield res.json(); | |
return { data: null, error }; | |
} | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Replaces an existing file at the specified path with a new one. | |
* | |
* @param path The relative file path. Should be of the format `folder/subfolder`. The bucket already exist before attempting to upload. | |
* @param file The file object to be stored in the bucket. | |
* @param fileOptions HTTP headers. For example `cacheControl` | |
*/ | |
update(path, file, fileOptions) { | |
return __awaiter$1(this, void 0, void 0, function* () { | |
try { | |
if (!isBrowser()) | |
throw new Error('No browser detected.'); | |
const formData = new FormData(); | |
const options = Object.assign(Object.assign({}, DEFAULT_FILE_OPTIONS), fileOptions); | |
formData.append('cacheControl', options.cacheControl); | |
formData.append('', file, file.name); | |
const _path = this._getFinalPath(path); | |
const res = yield fetch(`${this.url}/object/${_path}`, { | |
method: 'PUT', | |
body: formData, | |
headers: Object.assign({}, this.headers), | |
}); | |
if (res.ok) { | |
// const data = await res.json() | |
// temporary fix till backend is updated to the latest storage-api version | |
return { data: { Key: _path }, error: null }; | |
} | |
else { | |
const error = yield res.json(); | |
return { data: null, error }; | |
} | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Moves an existing file, optionally renaming it at the same time. | |
* | |
* @param fromPath The original file path, including the current file name. For example `folder/image.png`. | |
* @param toPath The new file path, including the new file name. For example `folder/image-copy.png`. | |
*/ | |
move(fromPath, toPath) { | |
return __awaiter$1(this, void 0, void 0, function* () { | |
try { | |
const data = yield post(`${this.url}/object/move`, { bucketId: this.bucketId, sourceKey: fromPath, destinationKey: toPath }, { headers: this.headers }); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Create signed url to download file without requiring permissions. This URL can be valid for a set number of seconds. | |
* | |
* @param path The file path to be downloaded, including the current file name. For example `folder/image.png`. | |
* @param expiresIn The number of seconds until the signed URL expires. For example, `60` for a URL which is valid for one minute. | |
*/ | |
createSignedUrl(path, expiresIn) { | |
return __awaiter$1(this, void 0, void 0, function* () { | |
try { | |
const _path = this._getFinalPath(path); | |
let data = yield post(`${this.url}/object/sign/${_path}`, { expiresIn }, { headers: this.headers }); | |
const signedURL = `${this.url}${data.signedURL}`; | |
data = { signedURL }; | |
return { data, error: null, signedURL }; | |
} | |
catch (error) { | |
return { data: null, error, signedURL: null }; | |
} | |
}); | |
} | |
/** | |
* Downloads a file. | |
* | |
* @param path The file path to be downloaded, including the path and file name. For example `folder/image.png`. | |
*/ | |
download(path) { | |
return __awaiter$1(this, void 0, void 0, function* () { | |
try { | |
const _path = this._getFinalPath(path); | |
const res = yield get(`${this.url}/object/${_path}`, { | |
headers: this.headers, | |
noResolveJson: true, | |
}); | |
const data = yield res.blob(); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Retrieve URLs for assets in public buckets | |
* | |
* @param path The file path to be downloaded, including the path and file name. For example `folder/image.png`. | |
*/ | |
getPublicUrl(path) { | |
try { | |
const _path = this._getFinalPath(path); | |
const publicURL = `${this.url}/object/public/${_path}`; | |
const data = { publicURL }; | |
return { data, error: null, publicURL }; | |
} | |
catch (error) { | |
return { data: null, error, publicURL: null }; | |
} | |
} | |
/** | |
* Deletes files within the same bucket | |
* | |
* @param paths An array of files to be deletes, including the path and file name. For example [`folder/image.png`]. | |
*/ | |
remove(paths) { | |
return __awaiter$1(this, void 0, void 0, function* () { | |
try { | |
const data = yield remove(`${this.url}/object/${this.bucketId}`, { prefixes: paths }, { headers: this.headers }); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
/** | |
* Get file metadata | |
* @param id the file id to retrieve metadata | |
*/ | |
// async getMetadata(id: string): Promise<{ data: Metadata | null; error: Error | null }> { | |
// try { | |
// const data = await get(`${this.url}/metadata/${id}`, { headers: this.headers }) | |
// return { data, error: null } | |
// } catch (error) { | |
// return { data: null, error } | |
// } | |
// } | |
/** | |
* Update file metadata | |
* @param id the file id to update metadata | |
* @param meta the new file metadata | |
*/ | |
// async updateMetadata( | |
// id: string, | |
// meta: Metadata | |
// ): Promise<{ data: Metadata | null; error: Error | null }> { | |
// try { | |
// const data = await post(`${this.url}/metadata/${id}`, { ...meta }, { headers: this.headers }) | |
// return { data, error: null } | |
// } catch (error) { | |
// return { data: null, error } | |
// } | |
// } | |
/** | |
* Lists all the files within a bucket. | |
* @param path The folder path. | |
* @param options Search options, including `limit`, `offset`, and `sortBy`. | |
* @param parameters Fetch parameters, currently only supports `signal`, which is an AbortController's signal | |
*/ | |
list(path, options, parameters) { | |
return __awaiter$1(this, void 0, void 0, function* () { | |
try { | |
const body = Object.assign(Object.assign(Object.assign({}, DEFAULT_SEARCH_OPTIONS), options), { prefix: path || '' }); | |
const data = yield post(`${this.url}/object/list/${this.bucketId}`, body, { headers: this.headers }, parameters); | |
return { data, error: null }; | |
} | |
catch (error) { | |
return { data: null, error }; | |
} | |
}); | |
} | |
_getFinalPath(path) { | |
return `${this.bucketId}/${path}`; | |
} | |
} | |
class SupabaseStorageClient extends StorageBucketApi { | |
constructor(url, headers = {}) { | |
super(url, headers); | |
} | |
/** | |
* Perform file operation in a bucket. | |
* | |
* @param id The bucket id to operate on. | |
*/ | |
from(id) { | |
return new StorageFileApi(this.url, this.headers, id); | |
} | |
} | |
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { | |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; | |
const DEFAULT_OPTIONS = { | |
schema: 'public', | |
autoRefreshToken: true, | |
persistSession: true, | |
detectSessionInUrl: true, | |
localStorage: globalThis.localStorage, | |
headers: DEFAULT_HEADERS$1, | |
}; | |
/** | |
* Supabase Client. | |
* | |
* An isomorphic Javascript client for interacting with Postgres. | |
*/ | |
class SupabaseClient { | |
/** | |
* Create a new client for use in the browser. | |
* @param supabaseUrl The unique Supabase URL which is supplied when you create a new project in your project dashboard. | |
* @param supabaseKey The unique Supabase Key which is supplied when you create a new project in your project dashboard. | |
* @param options.schema You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase. | |
* @param options.autoRefreshToken Set to "true" if you want to automatically refresh the token before expiring. | |
* @param options.persistSession Set to "true" if you want to automatically save the user session into local storage. | |
* @param options.detectSessionInUrl Set to "true" if you want to automatically detects OAuth grants in the URL and signs in the user. | |
* @param options.headers Any additional headers to send with each network request. | |
*/ | |
constructor(supabaseUrl, supabaseKey, options) { | |
this.supabaseUrl = supabaseUrl; | |
this.supabaseKey = supabaseKey; | |
if (!supabaseUrl) | |
throw new Error('supabaseUrl is required.'); | |
if (!supabaseKey) | |
throw new Error('supabaseKey is required.'); | |
const settings = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options); | |
this.restUrl = `${supabaseUrl}/rest/v1`; | |
this.realtimeUrl = `${supabaseUrl}/realtime/v1`.replace('http', 'ws'); | |
this.authUrl = `${supabaseUrl}/auth/v1`; | |
this.storageUrl = `${supabaseUrl}/storage/v1`; | |
this.schema = settings.schema; | |
this.auth = this._initSupabaseAuthClient(settings); | |
this.realtime = this._initRealtimeClient(); | |
// In the future we might allow the user to pass in a logger to receive these events. | |
// this.realtime.onOpen(() => console.log('OPEN')) | |
// this.realtime.onClose(() => console.log('CLOSED')) | |
// this.realtime.onError((e: Error) => console.log('Socket error', e)) | |
} | |
/** | |
* Supabase Storage allows you to manage user-generated content, such as photos or videos. | |
*/ | |
get storage() { | |
return new SupabaseStorageClient(this.storageUrl, this._getAuthHeaders()); | |
} | |
/** | |
* Perform a table operation. | |
* | |
* @param table The table name to operate on. | |
*/ | |
from(table) { | |
const url = `${this.restUrl}/${table}`; | |
return new SupabaseQueryBuilder(url, { | |
headers: this._getAuthHeaders(), | |
schema: this.schema, | |
realtime: this.realtime, | |
table, | |
}); | |
} | |
/** | |
* Perform a stored procedure call. | |
* | |
* @param fn The function name to call. | |
* @param params The parameters to pass to the function call. | |
*/ | |
rpc(fn, params) { | |
const rest = this._initPostgRESTClient(); | |
return rest.rpc(fn, params); | |
} | |
/** | |
* Removes an active subscription and returns the number of open connections. | |
* | |
* @param subscription The subscription you want to remove. | |
*/ | |
removeSubscription(subscription) { | |
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { | |
try { | |
yield this._closeSubscription(subscription); | |
const openSubscriptions = this.getSubscriptions().length; | |
if (!openSubscriptions) { | |
const { error } = yield this.realtime.disconnect(); | |
if (error) | |
return resolve({ error }); | |
} | |
return resolve({ error: null, data: { openSubscriptions } }); | |
} | |
catch (error) { | |
return resolve({ error }); | |
} | |
})); | |
} | |
_closeSubscription(subscription) { | |
return __awaiter(this, void 0, void 0, function* () { | |
if (!subscription.isClosed()) { | |
yield this._closeChannel(subscription); | |
} | |
}); | |
} | |
/** | |
* Returns an array of all your subscriptions. | |
*/ | |
getSubscriptions() { | |
return this.realtime.channels; | |
} | |
_initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, localStorage, }) { | |
return new SupabaseAuthClient({ | |
url: this.authUrl, | |
headers: { | |
Authorization: `Bearer ${this.supabaseKey}`, | |
apikey: `${this.supabaseKey}`, | |
}, | |
autoRefreshToken, | |
persistSession, | |
detectSessionInUrl, | |
localStorage, | |
}); | |
} | |
_initRealtimeClient() { | |
return new RealtimeClient(this.realtimeUrl, { | |
params: { apikey: this.supabaseKey }, | |
}); | |
} | |
_initPostgRESTClient() { | |
return new PostgrestClient(this.restUrl, { | |
headers: this._getAuthHeaders(), | |
schema: this.schema, | |
}); | |
} | |
_getAuthHeaders() { | |
var _a, _b; | |
const headers = {}; | |
const authBearer = (_b = (_a = this.auth.session()) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : this.supabaseKey; | |
headers['apikey'] = this.supabaseKey; | |
headers['Authorization'] = `Bearer ${authBearer}`; | |
return headers; | |
} | |
_closeChannel(subscription) { | |
return new Promise((resolve, reject) => { | |
subscription | |
.unsubscribe() | |
.receive('ok', () => { | |
this.realtime.remove(subscription); | |
return resolve(true); | |
}) | |
.receive('error', (e) => reject(e)); | |
}); | |
} | |
} | |
/** | |
* Creates a new Supabase Client. | |
*/ | |
const createClient = (supabaseUrl, supabaseKey, options) => { | |
return new SupabaseClient(supabaseUrl, supabaseKey, options); | |
}; | |
const supabaseUrl = {"env":{"isProd":false,"SVELTE_APP_SUPABASE_URL":"https://itkjgxfemunkwtiuralq.supabase.co","SVELTE_APP_SUPABASE_ANON_KEY":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYyNjA3OTU4NCwiZXhwIjoxOTQxNjU1NTg0fQ.GMvgFm-xu-NwZQw8XbgPGksL55vbwKw0LeiSpnGYpvE"}}.env.SVELTE_APP_SUPABASE_URL; | |
const supabaseAnonKey = {"env":{"isProd":false,"SVELTE_APP_SUPABASE_URL":"https://itkjgxfemunkwtiuralq.supabase.co","SVELTE_APP_SUPABASE_ANON_KEY":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYyNjA3OTU4NCwiZXhwIjoxOTQxNjU1NTg0fQ.GMvgFm-xu-NwZQw8XbgPGksL55vbwKw0LeiSpnGYpvE"}}.env.SVELTE_APP_SUPABASE_ANON_KEY; | |
const supabase = createClient(supabaseUrl, supabaseAnonKey); | |
/* src\App.svelte generated by Svelte v3.38.3 */ | |
const { console: console_1 } = globals; | |
const file = "src\\App.svelte"; | |
function get_each_context(ctx, list, i) { | |
const child_ctx = ctx.slice(); | |
child_ctx[11] = list[i].id; | |
child_ctx[12] = list[i].location_name; | |
child_ctx[13] = list[i].geom; | |
child_ctx[15] = i; | |
return child_ctx; | |
} | |
// (50:1) {#each geometries as { id, location_name, geom } | |
function create_each_block(ctx) { | |
let div; | |
let t0_value = /*id*/ ctx[11] + ""; | |
let t0; | |
let t1; | |
let t2_value = /*location_name*/ ctx[12] + ""; | |
let t2; | |
let t3; | |
let t4_value = (/*geom*/ ctx[13] && /*geom*/ ctx[13].coordinates) + ""; | |
let t4; | |
const block = { | |
c: function create() { | |
div = element("div"); | |
t0 = text(t0_value); | |
t1 = text("-"); | |
t2 = text(t2_value); | |
t3 = text("-"); | |
t4 = text(t4_value); | |
add_location(div, file, 50, 2, 1003); | |
}, | |
m: function mount(target, anchor) { | |
insert_dev(target, div, anchor); | |
append_dev(div, t0); | |
append_dev(div, t1); | |
append_dev(div, t2); | |
append_dev(div, t3); | |
append_dev(div, t4); | |
}, | |
p: function update(ctx, dirty) { | |
if (dirty & /*geometries*/ 8 && t0_value !== (t0_value = /*id*/ ctx[11] + "")) set_data_dev(t0, t0_value); | |
if (dirty & /*geometries*/ 8 && t2_value !== (t2_value = /*location_name*/ ctx[12] + "")) set_data_dev(t2, t2_value); | |
if (dirty & /*geometries*/ 8 && t4_value !== (t4_value = (/*geom*/ ctx[13] && /*geom*/ ctx[13].coordinates) + "")) set_data_dev(t4, t4_value); | |
}, | |
d: function destroy(detaching) { | |
if (detaching) detach_dev(div); | |
} | |
}; | |
dispatch_dev("SvelteRegisterBlock", { | |
block, | |
id: create_each_block.name, | |
type: "each", | |
source: "(50:1) {#each geometries as { id, location_name, geom }", | |
ctx | |
}); | |
return block; | |
} | |
function create_fragment(ctx) { | |
let div3; | |
let t0; | |
let map; | |
let t1; | |
let form; | |
let div2; | |
let p; | |
let t3; | |
let div0; | |
let input0; | |
let t4; | |
let input1; | |
let t5; | |
let input2; | |
let t6; | |
let div1; | |
let input3; | |
let input3_value_value; | |
let input3_disabled_value; | |
let current; | |
let mounted; | |
let dispose; | |
let each_value = /*geometries*/ ctx[3]; | |
validate_each_argument(each_value); | |
let each_blocks = []; | |
for (let i = 0; i < each_value.length; i += 1) { | |
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); | |
} | |
map = new Map$1({ | |
props: { points: /*geometries*/ ctx[3] }, | |
$$inline: true | |
}); | |
const block = { | |
c: function create() { | |
div3 = element("div"); | |
for (let i = 0; i < each_blocks.length; i += 1) { | |
each_blocks[i].c(); | |
} | |
t0 = space(); | |
create_component(map.$$.fragment); | |
t1 = space(); | |
form = element("form"); | |
div2 = element("div"); | |
p = element("p"); | |
p.textContent = "Add a new point to the map"; | |
t3 = space(); | |
div0 = element("div"); | |
input0 = element("input"); | |
t4 = space(); | |
input1 = element("input"); | |
t5 = space(); | |
input2 = element("input"); | |
t6 = space(); | |
div1 = element("div"); | |
input3 = element("input"); | |
attr_dev(p, "class", "description"); | |
add_location(p, file, 57, 4, 1216); | |
attr_dev(input0, "class", "inputField"); | |
attr_dev(input0, "type", "name"); | |
attr_dev(input0, "placeholder", "Name"); | |
add_location(input0, file, 59, 3, 1283); | |
attr_dev(input1, "class", "inputField"); | |
attr_dev(input1, "type", "number"); | |
attr_dev(input1, "step", "0.01"); | |
attr_dev(input1, "placeholder", "Longitude"); | |
add_location(input1, file, 65, 3, 1395); | |
attr_dev(input2, "class", "inputField"); | |
attr_dev(input2, "type", "number"); | |
attr_dev(input2, "step", "0.01"); | |
attr_dev(input2, "placeholder", "Latitude"); | |
add_location(input2, file, 72, 3, 1530); | |
add_location(div0, file, 58, 4, 1274); | |
attr_dev(input3, "type", "submit"); | |
attr_dev(input3, "class", "button block"); | |
input3.value = input3_value_value = /*loading*/ ctx[4] | |
? "Loading" | |
: /*areValuesValid*/ ctx[5] | |
? "Upload point" | |
: "Enter valid values"; | |
input3.disabled = input3_disabled_value = /*loading*/ ctx[4] || !/*areValuesValid*/ ctx[5]; | |
add_location(input3, file, 82, 3, 1686); | |
add_location(div1, file, 81, 4, 1677); | |
attr_dev(div2, "class", "col-6 form-widget"); | |
add_location(div2, file, 56, 2, 1180); | |
attr_dev(form, "class", "row flex flex-center"); | |
add_location(form, file, 55, 1, 1102); | |
attr_dev(div3, "class", "container"); | |
set_style(div3, "padding", "50px 0 100px 0"); | |
add_location(div3, file, 47, 0, 877); | |
}, | |
l: function claim(nodes) { | |
throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); | |
}, | |
m: function mount(target, anchor) { | |
insert_dev(target, div3, anchor); | |
for (let i = 0; i < each_blocks.length; i += 1) { | |
each_blocks[i].m(div3, null); | |
} | |
append_dev(div3, t0); | |
mount_component(map, div3, null); | |
append_dev(div3, t1); | |
append_dev(div3, form); | |
append_dev(form, div2); | |
append_dev(div2, p); | |
append_dev(div2, t3); | |
append_dev(div2, div0); | |
append_dev(div0, input0); | |
set_input_value(input0, /*newPointName*/ ctx[0]); | |
append_dev(div0, t4); | |
append_dev(div0, input1); | |
set_input_value(input1, /*newPointLon*/ ctx[1]); | |
append_dev(div0, t5); | |
append_dev(div0, input2); | |
set_input_value(input2, /*newPointLat*/ ctx[2]); | |
append_dev(div2, t6); | |
append_dev(div2, div1); | |
append_dev(div1, input3); | |
current = true; | |
if (!mounted) { | |
dispose = [ | |
listen_dev(input0, "input", /*input0_input_handler*/ ctx[8]), | |
listen_dev(input1, "input", /*input1_input_handler*/ ctx[9]), | |
listen_dev(input2, "input", /*input2_input_handler*/ ctx[10]), | |
listen_dev(form, "submit", prevent_default(/*handleSubmit*/ ctx[7]), false, true, false), | |
action_destroyer(/*getData*/ ctx[6].call(null, div3)) | |
]; | |
mounted = true; | |
} | |
}, | |
p: function update(ctx, [dirty]) { | |
if (dirty & /*geometries*/ 8) { | |
each_value = /*geometries*/ ctx[3]; | |
validate_each_argument(each_value); | |
let i; | |
for (i = 0; i < each_value.length; i += 1) { | |
const child_ctx = get_each_context(ctx, each_value, i); | |
if (each_blocks[i]) { | |
each_blocks[i].p(child_ctx, dirty); | |
} else { | |
each_blocks[i] = create_each_block(child_ctx); | |
each_blocks[i].c(); | |
each_blocks[i].m(div3, t0); | |
} | |
} | |
for (; i < each_blocks.length; i += 1) { | |
each_blocks[i].d(1); | |
} | |
each_blocks.length = each_value.length; | |
} | |
const map_changes = {}; | |
if (dirty & /*geometries*/ 8) map_changes.points = /*geometries*/ ctx[3]; | |
map.$set(map_changes); | |
if (dirty & /*newPointName*/ 1) { | |
set_input_value(input0, /*newPointName*/ ctx[0]); | |
} | |
if (dirty & /*newPointLon*/ 2 && to_number(input1.value) !== /*newPointLon*/ ctx[1]) { | |
set_input_value(input1, /*newPointLon*/ ctx[1]); | |
} | |
if (dirty & /*newPointLat*/ 4 && to_number(input2.value) !== /*newPointLat*/ ctx[2]) { | |
set_input_value(input2, /*newPointLat*/ ctx[2]); | |
} | |
if (!current || dirty & /*loading, areValuesValid*/ 48 && input3_value_value !== (input3_value_value = /*loading*/ ctx[4] | |
? "Loading" | |
: /*areValuesValid*/ ctx[5] | |
? "Upload point" | |
: "Enter valid values")) { | |
prop_dev(input3, "value", input3_value_value); | |
} | |
if (!current || dirty & /*loading, areValuesValid*/ 48 && input3_disabled_value !== (input3_disabled_value = /*loading*/ ctx[4] || !/*areValuesValid*/ ctx[5])) { | |
prop_dev(input3, "disabled", input3_disabled_value); | |
} | |
}, | |
i: function intro(local) { | |
if (current) return; | |
transition_in(map.$$.fragment, local); | |
current = true; | |
}, | |
o: function outro(local) { | |
transition_out(map.$$.fragment, local); | |
current = false; | |
}, | |
d: function destroy(detaching) { | |
if (detaching) detach_dev(div3); | |
destroy_each(each_blocks, detaching); | |
destroy_component(map); | |
mounted = false; | |
run_all(dispose); | |
} | |
}; | |
dispatch_dev("SvelteRegisterBlock", { | |
block, | |
id: create_fragment.name, | |
type: "component", | |
source: "", | |
ctx | |
}); | |
return block; | |
} | |
function instance($$self, $$props, $$invalidate) { | |
let areValuesValid; | |
let { $$slots: slots = {}, $$scope } = $$props; | |
validate_slots("App", slots, []); | |
let geometries = []; | |
let newPointName; | |
let newPointLon; | |
let newPointLat; | |
let loading = false; | |
async function getData() { | |
const { data, error } = await supabase.from("geometries").select(); | |
if (data) { | |
$$invalidate(3, geometries = data); | |
} | |
} | |
const handleSubmit = async () => { | |
if (areValuesValid) { | |
try { | |
$$invalidate(4, loading = true); | |
const { data: dataInsert, error } = await supabase.rpc("addgeomerty", { | |
location_name: newPointName, | |
lon: newPointLon, | |
lat: newPointLat | |
}); | |
$$invalidate(3, geometries = [...geometries, ...dataInsert]); | |
if (error) throw error; | |
} catch(error) { | |
console.log(error, error.error_description || error.message); | |
} finally { | |
$$invalidate(4, loading = false); | |
} | |
} | |
}; | |
const writable_props = []; | |
Object.keys($$props).forEach(key => { | |
if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console_1.warn(`<App> was created with unknown prop '${key}'`); | |
}); | |
function input0_input_handler() { | |
newPointName = this.value; | |
$$invalidate(0, newPointName); | |
} | |
function input1_input_handler() { | |
newPointLon = to_number(this.value); | |
$$invalidate(1, newPointLon); | |
} | |
function input2_input_handler() { | |
newPointLat = to_number(this.value); | |
$$invalidate(2, newPointLat); | |
} | |
$$self.$capture_state = () => ({ | |
Map: Map$1, | |
supabase, | |
geometries, | |
newPointName, | |
newPointLon, | |
newPointLat, | |
loading, | |
getData, | |
handleSubmit, | |
areValuesValid | |
}); | |
$$self.$inject_state = $$props => { | |
if ("geometries" in $$props) $$invalidate(3, geometries = $$props.geometries); | |
if ("newPointName" in $$props) $$invalidate(0, newPointName = $$props.newPointName); | |
if ("newPointLon" in $$props) $$invalidate(1, newPointLon = $$props.newPointLon); | |
if ("newPointLat" in $$props) $$invalidate(2, newPointLat = $$props.newPointLat); | |
if ("loading" in $$props) $$invalidate(4, loading = $$props.loading); | |
if ("areValuesValid" in $$props) $$invalidate(5, areValuesValid = $$props.areValuesValid); | |
}; | |
if ($$props && "$$inject" in $$props) { | |
$$self.$inject_state($$props.$$inject); | |
} | |
$$self.$$.update = () => { | |
if ($$self.$$.dirty & /*newPointName, newPointLat, newPointLon*/ 7) { | |
$$invalidate(5, areValuesValid = !!newPointName && !isNaN(newPointLat) && !isNaN(newPointLon)); | |
} | |
}; | |
return [ | |
newPointName, | |
newPointLon, | |
newPointLat, | |
geometries, | |
loading, | |
areValuesValid, | |
getData, | |
handleSubmit, | |
input0_input_handler, | |
input1_input_handler, | |
input2_input_handler | |
]; | |
} | |
class App extends SvelteComponentDev { | |
constructor(options) { | |
super(options); | |
init(this, options, instance, create_fragment, safe_not_equal, {}); | |
dispatch_dev("SvelteRegisterComponent", { | |
component: this, | |
tagName: "App", | |
options, | |
id: create_fragment.name | |
}); | |
} | |
} | |
const app = new App({ | |
target: document.body, | |
props: { | |
name: 'world' | |
} | |
}); | |
return app; | |
}()); | |
//# sourceMappingURL=bundle.js.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"version":3,"file":"bundle.js","sources":["../../node_modules/svelte/internal/index.mjs","../../node_modules/d3-array/src/fsum.js","../../node_modules/d3-array/src/merge.js","../../node_modules/d3-geo/src/math.js","../../node_modules/d3-geo/src/noop.js","../../node_modules/d3-geo/src/stream.js","../../node_modules/d3-geo/src/cartesian.js","../../node_modules/d3-geo/src/compose.js","../../node_modules/d3-geo/src/rotation.js","../../node_modules/d3-geo/src/circle.js","../../node_modules/d3-geo/src/clip/buffer.js","../../node_modules/d3-geo/src/pointEqual.js","../../node_modules/d3-geo/src/clip/rejoin.js","../../node_modules/d3-geo/src/polygonContains.js","../../node_modules/d3-geo/src/clip/index.js","../../node_modules/d3-geo/src/clip/antimeridian.js","../../node_modules/d3-geo/src/clip/circle.js","../../node_modules/d3-geo/src/clip/line.js","../../node_modules/d3-geo/src/clip/rectangle.js","../../node_modules/d3-geo/src/identity.js","../../node_modules/d3-geo/src/path/area.js","../../node_modules/d3-geo/src/path/bounds.js","../../node_modules/d3-geo/src/path/centroid.js","../../node_modules/d3-geo/src/path/context.js","../../node_modules/d3-geo/src/path/measure.js","../../node_modules/d3-geo/src/path/string.js","../../node_modules/d3-geo/src/path/index.js","../../node_modules/d3-geo/src/transform.js","../../node_modules/d3-geo/src/projection/fit.js","../../node_modules/d3-geo/src/projection/resample.js","../../node_modules/d3-geo/src/projection/index.js","../../node_modules/d3-geo/src/projection/equalEarth.js","../../node_modules/topojson/node_modules/topojson-client/src/identity.js","../../node_modules/topojson/node_modules/topojson-client/src/transform.js","../../node_modules/topojson/node_modules/topojson-client/src/reverse.js","../../node_modules/topojson/node_modules/topojson-client/src/feature.js","../../src/Map.svelte","../../node_modules/@supabase/supabase-js/dist/module/lib/constants.js","../../node_modules/cross-fetch/dist/browser-ponyfill.js","../../node_modules/@supabase/gotrue-js/dist/module/lib/fetch.js","../../node_modules/@supabase/gotrue-js/dist/module/lib/constants.js","../../node_modules/@supabase/gotrue-js/dist/module/lib/cookies.js","../../node_modules/@supabase/gotrue-js/dist/module/lib/helpers.js","../../node_modules/@supabase/gotrue-js/dist/module/GoTrueApi.js","../../node_modules/@supabase/gotrue-js/dist/module/lib/polyfills.js","../../node_modules/@supabase/gotrue-js/dist/module/GoTrueClient.js","../../node_modules/@supabase/supabase-js/dist/module/lib/SupabaseAuthClient.js","../../node_modules/@supabase/postgrest-js/dist/module/lib/types.js","../../node_modules/@supabase/postgrest-js/dist/module/lib/PostgrestTransformBuilder.js","../../node_modules/@supabase/postgrest-js/dist/module/lib/PostgrestFilterBuilder.js","../../node_modules/@supabase/postgrest-js/dist/module/lib/PostgrestQueryBuilder.js","../../node_modules/@supabase/postgrest-js/dist/module/lib/PostgrestRpcBuilder.js","../../node_modules/@supabase/postgrest-js/dist/module/PostgrestClient.js","../../node_modules/@supabase/realtime-js/dist/module/lib/transformers.js","../../node_modules/@supabase/realtime-js/dist/module/lib/constants.js","../../node_modules/@supabase/realtime-js/dist/module/lib/timer.js","../../node_modules/@supabase/realtime-js/dist/module/lib/push.js","../../node_modules/@supabase/realtime-js/dist/module/RealtimeSubscription.js","../../node_modules/es5-ext/global.js","../../node_modules/websocket/lib/version.js","../../node_modules/websocket/lib/browser.js","../../node_modules/@supabase/realtime-js/dist/module/lib/serializer.js","../../node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js","../../node_modules/@supabase/supabase-js/dist/module/lib/SupabaseRealtimeClient.js","../../node_modules/@supabase/supabase-js/dist/module/lib/SupabaseQueryBuilder.js","../../node_modules/@supabase/storage-js/dist/module/lib/fetch.js","../../node_modules/@supabase/storage-js/dist/module/lib/StorageBucketApi.js","../../node_modules/@supabase/storage-js/dist/module/lib/helpers.js","../../node_modules/@supabase/storage-js/dist/module/lib/StorageFileApi.js","../../node_modules/@supabase/storage-js/dist/module/SupabaseStorageClient.js","../../node_modules/@supabase/supabase-js/dist/module/SupabaseClient.js","../../node_modules/@supabase/supabase-js/dist/module/index.js","../../src/supabaseClient.js","../../src/App.svelte","../../src/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot_spread(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_spread_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_spread_changes_fn(dirty) | get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached\n const children = target.childNodes;\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n const seqLen = upper_bound(1, longest + 1, idx => children[m[idx]].claim_order, current) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentElement !== target))) {\n target.actual_end_child = target.firstChild;\n }\n if (node !== target.actual_end_child) {\n target.insertBefore(node, target.actual_end_child);\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append(target, node);\n }\n else if (node.parentNode !== target || (anchor && node.nextSibling !== anchor)) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n processNode(node);\n nodes.splice(i, 1);\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n processNode(node);\n nodes.splice(i, 1);\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element(nodes, name, attributes, svg) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n }, () => svg ? svg_element(name) : element(name));\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n node.data = '' + data;\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTag();\n }\n const html_tag_nodes = nodes.splice(start_index, end_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n return new HtmlTag(html_tag_nodes.slice(1, html_tag_nodes.length - 1));\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.wholeText !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nclass HtmlTag {\n constructor(claimed_nodes) {\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n this.e = element(target.nodeName);\n this.t = target;\n if (this.l) {\n this.n = this.l;\n }\n else {\n this.h(html);\n }\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\n\nconst active_docs = new Set();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = node.ownerDocument;\n active_docs.add(doc);\n const stylesheet = doc.__svelte_stylesheet || (doc.__svelte_stylesheet = doc.head.appendChild(element('style')).sheet);\n const current_rules = doc.__svelte_rules || (doc.__svelte_rules = {});\n if (!current_rules[name]) {\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n active_docs.forEach(doc => {\n const stylesheet = doc.__svelte_stylesheet;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n doc.__svelte_rules = {};\n });\n active_docs.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nlet flushing = false;\nconst seen_callbacks = new Set();\nfunction flush() {\n if (flushing)\n return;\n flushing = true;\n do {\n // first, call beforeUpdate functions\n // and update components\n for (let i = 0; i < dirty_components.length; i += 1) {\n const component = dirty_components[i];\n set_current_component(component);\n update(component.$$);\n }\n set_current_component(null);\n dirty_components.length = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n flushing = false;\n seen_callbacks.clear();\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction escape_attribute_value(value) {\n return typeof value === 'string' ? escape(value) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : context || []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : options.context || []),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.38.3' }, detail)));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <script lang=\"ts\">\n * \timport { MyComponent } from \"component-library\";\n * </script>\n * <MyComponent foo={'bar'} />\n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to seperate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_html_tag, claim_space, claim_text, clear_loops, component_subscribe, compute_rest_props, compute_slots, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_custom_elements_slots, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, listen, listen_dev, loop, loop_guard, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, start_hydrating, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_await_block_branch, update_keyed_each, update_slot, update_slot_spread, validate_component, validate_each_argument, validate_each_keys, validate_slots, validate_store, xlink_attr };\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport function fsum(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n const adder = new Adder();\n let index = -1;\n return Float64Array.from(values, valueof === undefined\n ? v => adder.add(+v || 0)\n : v => adder.add(+valueof(v, ++index, values) || 0)\n );\n}\n","function* flatten(arrays) {\n for (const array of arrays) {\n yield* array;\n }\n}\n\nexport default function merge(arrays) {\n return Array.from(flatten(arrays));\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n","export default function noop() {}\n","function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n","import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}\n","export default function(a, b) {\n\n function compose(x, y) {\n return x = a(x, y), b(x[0], x[1]);\n }\n\n if (a.invert && b.invert) compose.invert = function(x, y) {\n return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n };\n\n return compose;\n}\n","import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n return [abs(lambda) > pi ? lambda + Math.round(-lambda / tau) * tau : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n : rotationLambda(deltaLambda))\n : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function(lambda, phi) {\n return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [\n atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n asin(k * cosDeltaGamma + y * sinDeltaGamma)\n ];\n }\n\n rotation.invert = function(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [\n atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n asin(k * cosDeltaPhi - x * sinDeltaPhi)\n ];\n };\n\n return rotation;\n}\n\nexport default function(rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}\n","import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n if (!delta) return;\n var cosRadius = cos(radius),\n sinRadius = sin(radius),\n step = direction * delta;\n if (t0 == null) {\n t0 = radius + direction * tau;\n t1 = radius - step / 2;\n } else {\n t0 = circleRadius(cosRadius, t0);\n t1 = circleRadius(cosRadius, t1);\n if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n }\n for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n stream.point(point[0], point[1]);\n }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n point = cartesian(point), point[0] -= cosRadius;\n cartesianNormalizeInPlace(point);\n var radius = acos(-point[1]);\n return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n var center = constant([0, 0]),\n radius = constant(90),\n precision = constant(6),\n ring,\n rotate,\n stream = {point: point};\n\n function point(x, y) {\n ring.push(x = rotate(x, y));\n x[0] *= degrees, x[1] *= degrees;\n }\n\n function circle() {\n var c = center.apply(this, arguments),\n r = radius.apply(this, arguments) * radians,\n p = precision.apply(this, arguments) * radians;\n ring = [];\n rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n circleStream(stream, r, p, 1);\n c = {type: \"Polygon\", coordinates: [ring]};\n ring = rotate = null;\n return c;\n }\n\n circle.center = function(_) {\n return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n };\n\n circle.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n };\n\n circle.precision = function(_) {\n return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n };\n\n return circle;\n}\n","import noop from \"../noop.js\";\n\nexport default function() {\n var lines = [],\n line;\n return {\n point: function(x, y, m) {\n line.push([x, y, m]);\n },\n lineStart: function() {\n lines.push(line = []);\n },\n lineEnd: noop,\n rejoin: function() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n },\n result: function() {\n var result = lines;\n lines = [];\n line = null;\n return result;\n }\n };\n}\n","import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n","import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other; // another intersection\n this.e = entry; // is an entry?\n this.v = false; // visited\n this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n], x;\n\n if (pointEqual(p0, p1)) {\n if (!p0[2] && !p1[2]) {\n stream.lineStart();\n for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n stream.lineEnd();\n return;\n }\n // handle degenerate cases by moving the point\n p1[0] += 2 * epsilon;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n\n if (!subject.length) return;\n\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n stream.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n stream.lineEnd();\n }\n}\n\nfunction link(array) {\n if (!(n = array.length)) return;\n var n,\n i = 0,\n a = array[0],\n b;\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n a.n = b = array[0];\n b.p = a;\n}\n","import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n return abs(point[0]) <= pi ? point[0] : sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n var lambda = longitude(point),\n phi = point[1],\n sinPhi = sin(phi),\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n\n var sum = new Adder();\n\n if (sinPhi === 1) phi = halfPi + epsilon;\n else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = longitude(point0),\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = longitude(point1),\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta;\n\n // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n }\n\n // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n","import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n return function(sink) {\n var line = clipLine(sink),\n ringBuffer = clipBuffer(),\n ringSink = clipLine(ringBuffer),\n polygonStarted = false,\n polygon,\n segments,\n ring;\n\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = merge(segments);\n var startInside = polygonContains(polygon, start);\n if (segments.length) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n } else if (startInside) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n }\n if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function() {\n sink.polygonStart();\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n sink.polygonEnd();\n }\n };\n\n function point(lambda, phi) {\n if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n }\n\n function pointLine(lambda, phi) {\n line.point(lambda, phi);\n }\n\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n\n function pointRing(lambda, phi) {\n ring.push([lambda, phi]);\n ringSink.point(lambda, phi);\n }\n\n function ringStart() {\n ringSink.lineStart();\n ring = [];\n }\n\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringSink.lineEnd();\n\n var clean = ringSink.clean(),\n ringSegments = ringBuffer.result(),\n i, n = ringSegments.length, m,\n segment,\n point;\n\n ring.pop();\n polygon.push(ring);\n ring = null;\n\n if (!n) return;\n\n // No intersections.\n if (clean & 1) {\n segment = ringSegments[0];\n if ((m = segment.length - 1) > 0) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n sink.lineEnd();\n }\n return;\n }\n\n // Rejoin connected segments.\n // TODO reuse ringBuffer.rejoin()?\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n segments.push(ringSegments.filter(validSegment));\n }\n\n return clip;\n };\n}\n\nfunction validSegment(segment) {\n return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n","import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n function() { return true; },\n clipAntimeridianLine,\n clipAntimeridianInterpolate,\n [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n var lambda0 = NaN,\n phi0 = NaN,\n sign0 = NaN,\n clean; // no intersections\n\n return {\n lineStart: function() {\n stream.lineStart();\n clean = 1;\n },\n point: function(lambda1, phi1) {\n var sign1 = lambda1 > 0 ? pi : -pi,\n delta = abs(lambda1 - lambda0);\n if (abs(delta - pi) < epsilon) { // line crosses a pole\n stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n stream.point(lambda1, phi0);\n clean = 0;\n } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n clean = 0;\n }\n stream.point(lambda0 = lambda1, phi0 = phi1);\n sign0 = sign1;\n },\n lineEnd: function() {\n stream.lineEnd();\n lambda0 = phi0 = NaN;\n },\n clean: function() {\n return 2 - clean; // if intersections, rejoin first and last segments\n }\n };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n var cosPhi0,\n cosPhi1,\n sinLambda0Lambda1 = sin(lambda0 - lambda1);\n return abs(sinLambda0Lambda1) > epsilon\n ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n var phi;\n if (from == null) {\n phi = direction * halfPi;\n stream.point(-pi, phi);\n stream.point(0, phi);\n stream.point(pi, phi);\n stream.point(pi, 0);\n stream.point(pi, -phi);\n stream.point(0, -phi);\n stream.point(-pi, -phi);\n stream.point(-pi, 0);\n stream.point(-pi, phi);\n } else if (abs(from[0] - to[0]) > epsilon) {\n var lambda = from[0] < to[0] ? pi : -pi;\n phi = direction * lambda / 2;\n stream.point(-lambda, phi);\n stream.point(0, phi);\n stream.point(lambda, phi);\n } else {\n stream.point(to[0], to[1]);\n }\n}\n","import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n var cr = cos(radius),\n delta = 6 * radians,\n smallRadius = cr > 0,\n notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }\n\n function visible(lambda, phi) {\n return cos(lambda) * cos(phi) > cr;\n }\n\n // Takes a line and cuts into visible segments. Return values used for polygon\n // clipping: 0 - there were intersections or the line was empty; 1 - no\n // intersections 2 - there were intersections, and the first and last segments\n // should be rejoined.\n function clipLine(stream) {\n var point0, // previous point\n c0, // code for previous point\n v0, // visibility of previous point\n v00, // visibility of first point\n clean; // no intersections\n return {\n lineStart: function() {\n v00 = v0 = false;\n clean = 1;\n },\n point: function(lambda, phi) {\n var point1 = [lambda, phi],\n point2,\n v = visible(lambda, phi),\n c = smallRadius\n ? v ? 0 : code(lambda, phi)\n : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n if (!point0 && (v00 = v0 = v)) stream.lineStart();\n if (v !== v0) {\n point2 = intersect(point0, point1);\n if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n point1[2] = 1;\n }\n if (v !== v0) {\n clean = 0;\n if (v) {\n // outside going in\n stream.lineStart();\n point2 = intersect(point1, point0);\n stream.point(point2[0], point2[1]);\n } else {\n // inside going out\n point2 = intersect(point0, point1);\n stream.point(point2[0], point2[1], 2);\n stream.lineEnd();\n }\n point0 = point2;\n } else if (notHemisphere && point0 && smallRadius ^ v) {\n var t;\n // If the codes for two points are different, or are both zero,\n // and there this segment intersects with the small circle.\n if (!(c & c0) && (t = intersect(point1, point0, true))) {\n clean = 0;\n if (smallRadius) {\n stream.lineStart();\n stream.point(t[0][0], t[0][1]);\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n } else {\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n stream.lineStart();\n stream.point(t[0][0], t[0][1], 3);\n }\n }\n }\n if (v && (!point0 || !pointEqual(point0, point1))) {\n stream.point(point1[0], point1[1]);\n }\n point0 = point1, v0 = v, c0 = c;\n },\n lineEnd: function() {\n if (v0) stream.lineEnd();\n point0 = null;\n },\n // Rejoin first and last segments if there were intersections and the first\n // and last points were visible.\n clean: function() {\n return clean | ((v00 && v0) << 1);\n }\n };\n }\n\n // Intersects the great circle between a and b with the clip circle.\n function intersect(a, b, two) {\n var pa = cartesian(a),\n pb = cartesian(b);\n\n // We have two planes, n1.p = d1 and n2.p = d2.\n // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n var n1 = [1, 0, 0], // normal\n n2 = cartesianCross(pa, pb),\n n2n2 = cartesianDot(n2, n2),\n n1n2 = n2[0], // cartesianDot(n1, n2),\n determinant = n2n2 - n1n2 * n1n2;\n\n // Two polar points.\n if (!determinant) return !two && a;\n\n var c1 = cr * n2n2 / determinant,\n c2 = -cr * n1n2 / determinant,\n n1xn2 = cartesianCross(n1, n2),\n A = cartesianScale(n1, c1),\n B = cartesianScale(n2, c2);\n cartesianAddInPlace(A, B);\n\n // Solve |p(t)|^2 = 1.\n var u = n1xn2,\n w = cartesianDot(A, u),\n uu = cartesianDot(u, u),\n t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n if (t2 < 0) return;\n\n var t = sqrt(t2),\n q = cartesianScale(u, (-w - t) / uu);\n cartesianAddInPlace(q, A);\n q = spherical(q);\n\n if (!two) return q;\n\n // Two intersection points.\n var lambda0 = a[0],\n lambda1 = b[0],\n phi0 = a[1],\n phi1 = b[1],\n z;\n\n if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n var delta = lambda1 - lambda0,\n polar = abs(delta - pi) < epsilon,\n meridian = polar || delta < epsilon;\n\n if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n // Check that the first point is between a and b.\n if (meridian\n ? polar\n ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n : phi0 <= q[1] && q[1] <= phi1\n : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n var q1 = cartesianScale(u, (-w + t) / uu);\n cartesianAddInPlace(q1, A);\n return [q, spherical(q1)];\n }\n }\n\n // Generates a 4-bit vector representing the location of a point relative to\n // the small circle's bounding box.\n function code(lambda, phi) {\n var r = smallRadius ? radius : pi - radius,\n code = 0;\n if (lambda < -r) code |= 1; // left\n else if (lambda > r) code |= 2; // right\n if (phi < -r) code |= 4; // below\n else if (phi > r) code |= 8; // above\n return code;\n }\n\n return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n","export default function(a, b, x0, y0, x1, y1) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1],\n t0 = 0,\n t1 = 1,\n dx = bx - ax,\n dy = by - ay,\n r;\n\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n return true;\n}\n","import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n function visible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n\n function interpolate(from, to, direction, stream) {\n var a = 0, a1 = 0;\n if (from == null\n || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n || comparePoint(from, to) < 0 ^ direction > 0) {\n do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n stream.point(to[0], to[1]);\n }\n }\n\n function corner(p, direction) {\n return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n }\n\n function compareIntersection(a, b) {\n return comparePoint(a.x, b.x);\n }\n\n function comparePoint(a, b) {\n var ca = corner(a, 1),\n cb = corner(b, 1);\n return ca !== cb ? ca - cb\n : ca === 0 ? b[1] - a[1]\n : ca === 1 ? a[0] - b[0]\n : ca === 2 ? a[1] - b[1]\n : b[0] - a[0];\n }\n\n return function(stream) {\n var activeStream = stream,\n bufferStream = clipBuffer(),\n segments,\n polygon,\n ring,\n x__, y__, v__, // first point\n x_, y_, v_, // previous point\n first,\n clean;\n\n var clipStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: polygonStart,\n polygonEnd: polygonEnd\n };\n\n function point(x, y) {\n if (visible(x, y)) activeStream.point(x, y);\n }\n\n function polygonInside() {\n var winding = 0;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n }\n }\n\n return winding;\n }\n\n // Buffer geometry within a polygon and then clip it en masse.\n function polygonStart() {\n activeStream = bufferStream, segments = [], polygon = [], clean = true;\n }\n\n function polygonEnd() {\n var startInside = polygonInside(),\n cleanInside = clean && startInside,\n visible = (segments = merge(segments)).length;\n if (cleanInside || visible) {\n stream.polygonStart();\n if (cleanInside) {\n stream.lineStart();\n interpolate(null, null, 1, stream);\n stream.lineEnd();\n }\n if (visible) {\n clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n }\n stream.polygonEnd();\n }\n activeStream = stream, segments = polygon = ring = null;\n }\n\n function lineStart() {\n clipStream.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n }\n\n // TODO rather than special-case polygons, simply handle them separately.\n // Ideally, coincident intersection points should be jittered to avoid\n // clipping issues.\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }\n\n function linePoint(x, y) {\n var v = visible(x, y);\n if (polygon) ring.push([x, y]);\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n }\n } else {\n if (v && v_) activeStream.point(x, y);\n else {\n var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n if (clipLine(a, b, x0, y0, x1, y1)) {\n if (!v_) {\n activeStream.lineStart();\n activeStream.point(a[0], a[1]);\n }\n activeStream.point(b[0], b[1]);\n if (!v) activeStream.lineEnd();\n clean = false;\n } else if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n clean = false;\n }\n }\n }\n x_ = x, y_ = y, v_ = v;\n }\n\n return clipStream;\n };\n}\n","export default x => x;\n","import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n areaRingSum = new Adder(),\n x00,\n y00,\n x0,\n y0;\n\nvar areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n areaSum.add(abs(areaRingSum));\n areaRingSum = new Adder();\n },\n result: function() {\n var area = areaSum / 2;\n areaSum = new Adder();\n return area;\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n areaStream.point = areaPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n areaRingSum.add(y0 * x - x0 * y);\n x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n areaPoint(x00, y00);\n}\n\nexport default areaStream;\n","import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n","import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n Y0 = 0,\n Z0 = 0,\n X1 = 0,\n Y1 = 0,\n Z1 = 0,\n X2 = 0,\n Y2 = 0,\n Z2 = 0,\n x00,\n y00,\n x0,\n y0;\n\nvar centroidStream = {\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.point = centroidPoint;\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n },\n result: function() {\n var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n : Z1 ? [X1 / Z1, Y1 / Z1]\n : Z0 ? [X0 / Z0, Y0 / Z0]\n : [NaN, NaN];\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 =\n X2 = Y2 = Z2 = 0;\n return centroid;\n }\n};\n\nfunction centroidPoint(x, y) {\n X0 += x;\n Y0 += y;\n ++Z0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n centroidStream.point = centroidPointLine;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n centroidStream.point = centroidPointRing;\n centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n var dx = x - x0,\n dy = y - y0,\n z = sqrt(dx * dx + dy * dy);\n\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n\n z = y0 * x - x0 * y;\n X2 += z * (x0 + x);\n Y2 += z * (y0 + y);\n Z2 += z * 3;\n centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n","import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n this._context = context;\n}\n\nPathContext.prototype = {\n _radius: 4.5,\n pointRadius: function(_) {\n return this._radius = _, this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._context.closePath();\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._context.moveTo(x, y);\n this._point = 1;\n break;\n }\n case 1: {\n this._context.lineTo(x, y);\n break;\n }\n default: {\n this._context.moveTo(x + this._radius, y);\n this._context.arc(x, y, this._radius, 0, tau);\n break;\n }\n }\n },\n result: noop\n};\n","import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n lengthRing,\n x00,\n y00,\n x0,\n y0;\n\nvar lengthStream = {\n point: noop,\n lineStart: function() {\n lengthStream.point = lengthPointFirst;\n },\n lineEnd: function() {\n if (lengthRing) lengthPoint(x00, y00);\n lengthStream.point = noop;\n },\n polygonStart: function() {\n lengthRing = true;\n },\n polygonEnd: function() {\n lengthRing = null;\n },\n result: function() {\n var length = +lengthSum;\n lengthSum = new Adder();\n return length;\n }\n};\n\nfunction lengthPointFirst(x, y) {\n lengthStream.point = lengthPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n x0 -= x, y0 -= y;\n lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n","export default function PathString() {\n this._string = [];\n}\n\nPathString.prototype = {\n _radius: 4.5,\n _circle: circle(4.5),\n pointRadius: function(_) {\n if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;\n return this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._string.push(\"Z\");\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._string.push(\"M\", x, \",\", y);\n this._point = 1;\n break;\n }\n case 1: {\n this._string.push(\"L\", x, \",\", y);\n break;\n }\n default: {\n if (this._circle == null) this._circle = circle(this._radius);\n this._string.push(\"M\", x, \",\", y, this._circle);\n break;\n }\n }\n },\n result: function() {\n if (this._string.length) {\n var result = this._string.join(\"\");\n this._string = [];\n return result;\n } else {\n return null;\n }\n }\n};\n\nfunction circle(radius) {\n return \"m0,\" + radius\n + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius\n + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius\n + \"z\";\n}\n","import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n var pointRadius = 4.5,\n projectionStream,\n contextStream;\n\n function path(object) {\n if (object) {\n if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n stream(object, projectionStream(contextStream));\n }\n return contextStream.result();\n }\n\n path.area = function(object) {\n stream(object, projectionStream(pathArea));\n return pathArea.result();\n };\n\n path.measure = function(object) {\n stream(object, projectionStream(pathMeasure));\n return pathMeasure.result();\n };\n\n path.bounds = function(object) {\n stream(object, projectionStream(pathBounds));\n return pathBounds.result();\n };\n\n path.centroid = function(object) {\n stream(object, projectionStream(pathCentroid));\n return pathCentroid.result();\n };\n\n path.projection = function(_) {\n return arguments.length ? (projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream, path) : projection;\n };\n\n path.context = function(_) {\n if (!arguments.length) return context;\n contextStream = _ == null ? (context = null, new PathString) : new PathContext(context = _);\n if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n return path;\n };\n\n path.pointRadius = function(_) {\n if (!arguments.length) return pointRadius;\n pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n return path;\n };\n\n return path.projection(projection).context(context);\n}\n","export default function(methods) {\n return {\n stream: transformer(methods)\n };\n}\n\nexport function transformer(methods) {\n return function(stream) {\n var s = new TransformStream;\n for (var key in methods) s[key] = methods[key];\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function(x, y) { this.stream.point(x, y); },\n sphere: function() { this.stream.sphere(); },\n lineStart: function() { this.stream.lineStart(); },\n lineEnd: function() { this.stream.lineEnd(); },\n polygonStart: function() { this.stream.polygonStart(); },\n polygonEnd: function() { this.stream.polygonEnd(); }\n};\n","import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n var clip = projection.clipExtent && projection.clipExtent();\n projection.scale(150).translate([0, 0]);\n if (clip != null) projection.clipExtent(null);\n geoStream(object, projection.stream(boundsStream));\n fitBounds(boundsStream.result());\n if (clip != null) projection.clipExtent(clip);\n return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n return fit(projection, function(b) {\n var w = extent[1][0] - extent[0][0],\n h = extent[1][1] - extent[0][1],\n k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitSize(projection, size, object) {\n return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n return fit(projection, function(b) {\n var w = +width,\n k = w / (b[1][0] - b[0][0]),\n x = (w - k * (b[1][0] + b[0][0])) / 2,\n y = -k * b[0][1];\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n return fit(projection, function(b) {\n var h = +height,\n k = h / (b[1][1] - b[0][1]),\n x = -k * b[0][0],\n y = (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n","import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n","import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n point: function(x, y) {\n this.stream.point(x * radians, y * radians);\n }\n});\n\nfunction transformRotate(rotate) {\n return transformer({\n point: function(x, y) {\n var r = rotate(x, y);\n return this.stream.point(r[0], r[1]);\n }\n });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n function transform(x, y) {\n x *= sx; y *= sy;\n return [dx + k * x, dy - k * y];\n }\n transform.invert = function(x, y) {\n return [(x - dx) / k * sx, (dy - y) / k * sy];\n };\n return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n var cosAlpha = cos(alpha),\n sinAlpha = sin(alpha),\n a = cosAlpha * k,\n b = sinAlpha * k,\n ai = cosAlpha / k,\n bi = sinAlpha / k,\n ci = (sinAlpha * dy - cosAlpha * dx) / k,\n fi = (sinAlpha * dx + cosAlpha * dy) / k;\n function transform(x, y) {\n x *= sx; y *= sy;\n return [a * x - b * y + dx, dy - b * x - a * y];\n }\n transform.invert = function(x, y) {\n return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n };\n return transform;\n}\n\nexport default function projection(project) {\n return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n var project,\n k = 150, // scale\n x = 480, y = 250, // translate\n lambda = 0, phi = 0, // center\n deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n alpha = 0, // post-rotate angle\n sx = 1, // reflectX\n sy = 1, // reflectX\n theta = null, preclip = clipAntimeridian, // pre-clip angle\n x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n delta2 = 0.5, // precision\n projectResample,\n projectTransform,\n projectRotateTransform,\n cache,\n cacheStream;\n\n function projection(point) {\n return projectRotateTransform(point[0] * radians, point[1] * radians);\n }\n\n function invert(point) {\n point = projectRotateTransform.invert(point[0], point[1]);\n return point && [point[0] * degrees, point[1] * degrees];\n }\n\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n };\n\n projection.preclip = function(_) {\n return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n };\n\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n\n projection.clipAngle = function(_) {\n return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n };\n\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function(_) {\n return arguments.length ? (k = +_, recenter()) : k;\n };\n\n projection.translate = function(_) {\n return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n };\n\n projection.center = function(_) {\n return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n };\n\n projection.rotate = function(_) {\n return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n };\n\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n };\n\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n };\n\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n };\n\n projection.precision = function(_) {\n return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n };\n\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n function recenter() {\n var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n projectTransform = compose(project, transform);\n projectRotateTransform = compose(rotate, projectTransform);\n projectResample = resample(projectTransform, delta2);\n return reset();\n }\n\n function reset() {\n cache = cacheStream = null;\n return projection;\n }\n\n return function() {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return recenter();\n };\n}\n","import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n A2 = -0.081106,\n A3 = 0.000893,\n A4 = 0.003796,\n M = sqrt(3) / 2,\n iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n return [\n lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n if (abs(delta) < epsilon2) break;\n }\n return [\n M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n asin(sin(l) / M)\n ];\n};\n\nexport default function() {\n return projection(equalEarthRaw)\n .scale(177.158);\n}\n","export default function(x) {\n return x;\n}\n","import identity from \"./identity\";\n\nexport default function(transform) {\n if (transform == null) return identity;\n var x0,\n y0,\n kx = transform.scale[0],\n ky = transform.scale[1],\n dx = transform.translate[0],\n dy = transform.translate[1];\n return function(input, i) {\n if (!i) x0 = y0 = 0;\n var j = 2, n = input.length, output = new Array(n);\n output[0] = (x0 += input[0]) * kx + dx;\n output[1] = (y0 += input[1]) * ky + dy;\n while (j < n) output[j] = input[j], ++j;\n return output;\n };\n}\n","export default function(array, n) {\n var t, j = array.length, i = j - n;\n while (i < --j) t = array[i], array[i++] = array[j], array[j] = t;\n}\n","import reverse from \"./reverse\";\nimport transform from \"./transform\";\n\nexport default function(topology, o) {\n return o.type === \"GeometryCollection\"\n ? {type: \"FeatureCollection\", features: o.geometries.map(function(o) { return feature(topology, o); })}\n : feature(topology, o);\n}\n\nexport function feature(topology, o) {\n var id = o.id,\n bbox = o.bbox,\n properties = o.properties == null ? {} : o.properties,\n geometry = object(topology, o);\n return id == null && bbox == null ? {type: \"Feature\", properties: properties, geometry: geometry}\n : bbox == null ? {type: \"Feature\", id: id, properties: properties, geometry: geometry}\n : {type: \"Feature\", id: id, bbox: bbox, properties: properties, geometry: geometry};\n}\n\nexport function object(topology, o) {\n var transformPoint = transform(topology.transform),\n arcs = topology.arcs;\n\n function arc(i, points) {\n if (points.length) points.pop();\n for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length; k < n; ++k) {\n points.push(transformPoint(a[k], k));\n }\n if (i < 0) reverse(points, n);\n }\n\n function point(p) {\n return transformPoint(p);\n }\n\n function line(arcs) {\n var points = [];\n for (var i = 0, n = arcs.length; i < n; ++i) arc(arcs[i], points);\n if (points.length < 2) points.push(points[0]); // This should never happen per the specification.\n return points;\n }\n\n function ring(arcs) {\n var points = line(arcs);\n while (points.length < 4) points.push(points[0]); // This may happen if an arc has only two points.\n return points;\n }\n\n function polygon(arcs) {\n return arcs.map(ring);\n }\n\n function geometry(o) {\n var type = o.type, coordinates;\n switch (type) {\n case \"GeometryCollection\": return {type: type, geometries: o.geometries.map(geometry)};\n case \"Point\": coordinates = point(o.coordinates); break;\n case \"MultiPoint\": coordinates = o.coordinates.map(point); break;\n case \"LineString\": coordinates = line(o.arcs); break;\n case \"MultiLineString\": coordinates = o.arcs.map(line); break;\n case \"Polygon\": coordinates = polygon(o.arcs); break;\n case \"MultiPolygon\": coordinates = o.arcs.map(polygon); break;\n default: return null;\n }\n return {type: type, coordinates: coordinates};\n }\n\n return geometry(o);\n}\n","<script>\r\n // https://medium.com/geekculture/using-stored-procedures-rpc-in-supabase-to-increment-a-like-counter-9c5b2293a65b\r\n import { geoEqualEarth, geoPath } from \"d3-geo\";\r\n import { onMount } from \"svelte\";\r\n import { feature } from \"topojson\";\r\n export let points;\r\n let data;\r\n const projection = geoEqualEarth();\r\n const path = geoPath().projection(projection);\r\n \r\n\r\n onMount(async function() {\r\n const response = await fetch(\r\n \"https://gist.githubusercontent.com/rveciana/502db152b70cddfd554e9d48ee23e279/raw/cc51c1b46199994b123271c629541d417f2f7d86/world-110m.json\"\r\n );\r\n const json = await response.json();\r\n const land = feature(json, json.objects.land);\r\n data = path(land);\r\n \r\n });\r\n </script>\r\n \r\n <style>\r\n svg {\r\n width: 960px;\r\n height: 500px;\r\n }\r\n .border {\r\n stroke: #444444;\r\n fill: #cccccc;\r\n }\r\n </style>\r\n \r\n <svg width=\"960\" height=\"500\">\r\n <path d={data} class=\"border\" />\r\n {#each points.filter(d=>d.geom) as point}\r\n <circle r=10 cx={projection(point.geom.coordinates)[0]} cy={projection(point.geom.coordinates)[1]}/>\r\n {/each}\r\n </svg>","// constants.ts\nexport const DEFAULT_HEADERS = {};\n//# sourceMappingURL=constants.js.map","var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n}({}));\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport fetch from 'cross-fetch';\nconst _getErrorMessage = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err);\nconst handleError = (error, reject) => {\n if (typeof error.json !== 'function') {\n return reject(error);\n }\n error.json().then((err) => {\n return reject({\n message: _getErrorMessage(err),\n status: (error === null || error === void 0 ? void 0 : error.status) || 500,\n });\n });\n};\nconst _getRequestParams = (method, options, body) => {\n const params = { method, headers: (options === null || options === void 0 ? void 0 : options.headers) || {} };\n if (method === 'GET') {\n return params;\n }\n params.headers = Object.assign({ 'Content-Type': 'text/plain;charset=UTF-8' }, options === null || options === void 0 ? void 0 : options.headers);\n params.body = JSON.stringify(body);\n return params;\n};\nfunction _handleRequest(method, url, options, body) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n fetch(url, _getRequestParams(method, options, body))\n .then((result) => {\n if (!result.ok)\n throw result;\n if (options === null || options === void 0 ? void 0 : options.noResolveJson)\n return resolve;\n return result.json();\n })\n .then((data) => resolve(data))\n .catch((error) => handleError(error, reject));\n });\n });\n}\nexport function get(url, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return _handleRequest('GET', url, options);\n });\n}\nexport function post(url, body, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return _handleRequest('POST', url, options, body);\n });\n}\nexport function put(url, body, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return _handleRequest('PUT', url, options, body);\n });\n}\nexport function remove(url, body, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return _handleRequest('DELETE', url, options, body);\n });\n}\n//# sourceMappingURL=fetch.js.map","export const GOTRUE_URL = 'http://localhost:9999';\nexport const AUDIENCE = '';\nexport const DEFAULT_HEADERS = {};\nexport const EXPIRY_MARGIN = 60 * 1000;\nexport const STORAGE_KEY = 'supabase.auth.token';\nexport const COOKIE_OPTIONS = {\n name: 'sb:token',\n lifetime: 60 * 60 * 8,\n domain: '',\n path: '/',\n sameSite: 'lax',\n};\n//# sourceMappingURL=constants.js.map","/**\n * Serialize data into a cookie header.\n */\nfunction serialize(name, val, options) {\n const opt = options || {};\n const enc = encodeURIComponent;\n const fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n if (typeof enc !== 'function') {\n throw new TypeError('option encode is invalid');\n }\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError('argument name is invalid');\n }\n const value = enc(val);\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError('argument val is invalid');\n }\n let str = name + '=' + value;\n if (null != opt.maxAge) {\n const maxAge = opt.maxAge - 0;\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError('option maxAge is invalid');\n }\n str += '; Max-Age=' + Math.floor(maxAge);\n }\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n str += '; Domain=' + opt.domain;\n }\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n str += '; Path=' + opt.path;\n }\n if (opt.expires) {\n if (typeof opt.expires.toUTCString !== 'function') {\n throw new TypeError('option expires is invalid');\n }\n str += '; Expires=' + opt.expires.toUTCString();\n }\n if (opt.httpOnly) {\n str += '; HttpOnly';\n }\n if (opt.secure) {\n str += '; Secure';\n }\n if (opt.sameSite) {\n const sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite;\n switch (sameSite) {\n case 'lax':\n str += '; SameSite=Lax';\n break;\n case 'strict':\n str += '; SameSite=Strict';\n break;\n case 'none':\n str += '; SameSite=None';\n break;\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n return str;\n}\n/**\n * Based on the environment and the request we know if a secure cookie can be set.\n */\nfunction isSecureEnvironment(req) {\n if (!req || !req.headers || !req.headers.host) {\n throw new Error('The \"host\" request header is not available');\n }\n const host = (req.headers.host.indexOf(':') > -1 && req.headers.host.split(':')[0]) || req.headers.host;\n if (['localhost', '127.0.0.1'].indexOf(host) > -1 || host.endsWith('.local')) {\n return false;\n }\n return true;\n}\n/**\n * Serialize a cookie to a string.\n */\nfunction serializeCookie(cookie, secure) {\n var _a, _b, _c;\n return serialize(cookie.name, cookie.value, {\n maxAge: cookie.maxAge,\n expires: new Date(Date.now() + cookie.maxAge * 1000),\n httpOnly: true,\n secure,\n path: (_a = cookie.path) !== null && _a !== void 0 ? _a : '/',\n domain: (_b = cookie.domain) !== null && _b !== void 0 ? _b : '',\n sameSite: (_c = cookie.sameSite) !== null && _c !== void 0 ? _c : 'lax',\n });\n}\n/**\n * Set one or more cookies.\n */\nexport function setCookies(req, res, cookies) {\n const strCookies = cookies.map((c) => serializeCookie(c, isSecureEnvironment(req)));\n const previousCookies = res.getHeader('Set-Cookie');\n if (previousCookies) {\n if (previousCookies instanceof Array) {\n Array.prototype.push.apply(strCookies, previousCookies);\n }\n else if (typeof previousCookies === 'string') {\n strCookies.push(previousCookies);\n }\n }\n res.setHeader('Set-Cookie', strCookies);\n}\n/**\n * Set one or more cookies.\n */\nexport function setCookie(req, res, cookie) {\n setCookies(req, res, [cookie]);\n}\nexport function deleteCookie(req, res, name) {\n setCookie(req, res, {\n name,\n value: '',\n maxAge: -1,\n });\n}\n//# sourceMappingURL=cookies.js.map","export function expiresAt(expiresIn) {\n const timeNow = Math.round(Date.now() / 1000);\n return timeNow + expiresIn;\n}\nexport function uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\nexport const isBrowser = () => typeof window !== 'undefined';\nexport function getParameterByName(name, url) {\n if (!url)\n url = window.location.href;\n name = name.replace(/[\\[\\]]/g, '\\\\$&');\n var regex = new RegExp('[?&#]' + name + '(=([^&#]*)|&|#|$)'), results = regex.exec(url);\n if (!results)\n return null;\n if (!results[2])\n return '';\n return decodeURIComponent(results[2].replace(/\\+/g, ' '));\n}\nexport class LocalStorage {\n constructor(localStorage) {\n this.localStorage = localStorage || globalThis.localStorage;\n }\n clear() {\n return this.localStorage.clear();\n }\n key(index) {\n return this.localStorage.key(index);\n }\n setItem(key, value) {\n return this.localStorage.setItem(key, value);\n }\n getItem(key) {\n return this.localStorage.getItem(key);\n }\n removeItem(key) {\n return this.localStorage.removeItem(key);\n }\n}\n//# sourceMappingURL=helpers.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { get, post, put, remove } from './lib/fetch';\nimport { COOKIE_OPTIONS } from './lib/constants';\nimport { setCookie, deleteCookie } from './lib/cookies';\nimport { expiresAt } from './lib/helpers';\nexport default class GoTrueApi {\n constructor({ url = '', headers = {}, cookieOptions, }) {\n this.url = url;\n this.headers = headers;\n this.cookieOptions = Object.assign(Object.assign({}, COOKIE_OPTIONS), cookieOptions);\n }\n /**\n * Creates a new user using their email address.\n * @param email The email address of the user.\n * @param password The password of the user.\n * @param redirectTo A URL or mobile address to send the user to after they are confirmed.\n *\n * @returns A logged-in session if the server has \"autoconfirm\" ON\n * @returns A user if the server has \"autoconfirm\" OFF\n */\n signUpWithEmail(email, password, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n let headers = Object.assign({}, this.headers);\n let queryString = '';\n if (options.redirectTo) {\n queryString = '?redirect_to=' + encodeURIComponent(options.redirectTo);\n }\n const data = yield post(`${this.url}/signup${queryString}`, { email, password }, { headers });\n let session = Object.assign({}, data);\n if (session.expires_in)\n session.expires_at = expiresAt(data.expires_in);\n return { data: session, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Logs in an existing user using their email address.\n * @param email The email address of the user.\n * @param password The password of the user.\n * @param redirectTo A URL or mobile address to send the user to after they are confirmed.\n */\n signInWithEmail(email, password, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n let headers = Object.assign({}, this.headers);\n let queryString = '?grant_type=password';\n if (options.redirectTo) {\n queryString += '&redirect_to=' + encodeURIComponent(options.redirectTo);\n }\n const data = yield post(`${this.url}/token${queryString}`, { email, password }, { headers });\n let session = Object.assign({}, data);\n if (session.expires_in)\n session.expires_at = expiresAt(data.expires_in);\n return { data: session, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Sends a magic login link to an email address.\n * @param email The email address of the user.\n * @param redirectTo A URL or mobile address to send the user to after they are confirmed.\n */\n sendMagicLinkEmail(email, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n let headers = Object.assign({}, this.headers);\n let queryString = '';\n if (options.redirectTo) {\n queryString += '?redirect_to=' + encodeURIComponent(options.redirectTo);\n }\n const data = yield post(`${this.url}/magiclink${queryString}`, { email }, { headers });\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Sends an invite link to an email address.\n * @param email The email address of the user.\n * @param redirectTo A URL or mobile address to send the user to after they are confirmed.\n */\n inviteUserByEmail(email, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n let headers = Object.assign({}, this.headers);\n let queryString = '';\n if (options.redirectTo) {\n queryString += '?redirect_to=' + encodeURIComponent(options.redirectTo);\n }\n const data = yield post(`${this.url}/invite${queryString}`, { email }, { headers });\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Sends a reset request to an email address.\n * @param email The email address of the user.\n * @param redirectTo A URL or mobile address to send the user to after they are confirmed.\n */\n resetPasswordForEmail(email, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n let headers = Object.assign({}, this.headers);\n let queryString = '';\n if (options.redirectTo) {\n queryString += '?redirect_to=' + encodeURIComponent(options.redirectTo);\n }\n const data = yield post(`${this.url}/recover${queryString}`, { email }, { headers });\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Create a temporary object with all configured headers and\n * adds the Authorization token to be used on request methods\n * @param jwt A valid, logged-in JWT.\n */\n _createRequestHeaders(jwt) {\n const headers = Object.assign({}, this.headers);\n headers['Authorization'] = `Bearer ${jwt}`;\n return headers;\n }\n /**\n * Removes a logged-in session.\n * @param jwt A valid, logged-in JWT.\n */\n signOut(jwt) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield post(`${this.url}/logout`, {}, { headers: this._createRequestHeaders(jwt), noResolveJson: true });\n return { error: null };\n }\n catch (error) {\n return { error };\n }\n });\n }\n /**\n * Generates the relevant login URL for a third-party provider.\n * @param provider One of the providers supported by GoTrue.\n * @param redirectTo A URL or mobile address to send the user to after they are confirmed.\n * @param scopes A space-separated list of scopes granted to the OAuth application.\n */\n getUrlForProvider(provider, options) {\n let urlParams = [`provider=${encodeURIComponent(provider)}`];\n if (options === null || options === void 0 ? void 0 : options.redirectTo) {\n urlParams.push(`redirect_to=${encodeURIComponent(options.redirectTo)}`);\n }\n if (options === null || options === void 0 ? void 0 : options.scopes) {\n urlParams.push(`scopes=${encodeURIComponent(options.scopes)}`);\n }\n return `${this.url}/authorize?${urlParams.join('&')}`;\n }\n /**\n * Gets the user details.\n * @param jwt A valid, logged-in JWT.\n */\n getUser(jwt) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield get(`${this.url}/user`, { headers: this._createRequestHeaders(jwt) });\n return { user: data, data, error: null };\n }\n catch (error) {\n return { user: null, data: null, error };\n }\n });\n }\n /**\n * Updates the user data.\n * @param jwt A valid, logged-in JWT.\n * @param attributes The data you want to update.\n */\n updateUser(jwt, attributes) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield put(`${this.url}/user`, attributes, {\n headers: this._createRequestHeaders(jwt),\n });\n return { user: data, data, error: null };\n }\n catch (error) {\n return { user: null, data: null, error };\n }\n });\n }\n /**\n * Delete an user.\n * @param uid The user uid you want to remove.\n * @param jwt A valid JWT. Must be a full-access API key (e.g. service_role key).\n */\n deleteUser(uid, jwt) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield remove(`${this.url}/admin/users/${uid}`, {}, {\n headers: this._createRequestHeaders(jwt),\n });\n return { user: data, data, error: null };\n }\n catch (error) {\n return { user: null, data: null, error };\n }\n });\n }\n /**\n * Generates a new JWT.\n * @param refreshToken A valid refresh token that was returned on login.\n */\n refreshAccessToken(refreshToken) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield post(`${this.url}/token?grant_type=refresh_token`, { refresh_token: refreshToken }, { headers: this.headers });\n let session = Object.assign({}, data);\n if (session.expires_in)\n session.expires_at = expiresAt(data.expires_in);\n return { data: session, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Set/delete the auth cookie based on the AuthChangeEvent.\n * Works for Next.js & Express (requires cookie-parser middleware).\n */\n setAuthCookie(req, res) {\n if (req.method !== 'POST') {\n res.setHeader('Allow', 'POST');\n res.status(405).end('Method Not Allowed');\n }\n const { event, session } = req.body;\n if (!event)\n throw new Error('Auth event missing!');\n if (event === 'SIGNED_IN') {\n if (!session)\n throw new Error('Auth session missing!');\n setCookie(req, res, {\n name: this.cookieOptions.name,\n value: session.access_token,\n domain: this.cookieOptions.domain,\n maxAge: this.cookieOptions.lifetime,\n path: this.cookieOptions.path,\n sameSite: this.cookieOptions.sameSite,\n });\n }\n if (event === 'SIGNED_OUT')\n deleteCookie(req, res, this.cookieOptions.name);\n res.status(200).json({});\n }\n /**\n * Get user by reading the cookie from the request.\n * Works for Next.js & Express (requires cookie-parser middleware).\n */\n getUserByCookie(req) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (!req.cookies)\n throw new Error('Not able to parse cookies! When using Express make sure the cookie-parser middleware is in use!');\n if (!req.cookies[this.cookieOptions.name])\n throw new Error('No cookie found!');\n const token = req.cookies[this.cookieOptions.name];\n const { user, error } = yield this.getUser(token);\n if (error)\n throw error;\n return { user, data: user, error: null };\n }\n catch (error) {\n return { user: null, data: null, error };\n }\n });\n }\n}\n//# sourceMappingURL=GoTrueApi.js.map","// @ts-nocheck\n/**\n * https://mathiasbynens.be/notes/globalthis\n */\nexport function polyfillGlobalThis() {\n if (typeof globalThis === 'object')\n return;\n try {\n Object.defineProperty(Object.prototype, '__magic__', {\n get: function () {\n return this;\n },\n configurable: true,\n });\n __magic__.globalThis = __magic__;\n delete Object.prototype.__magic__;\n }\n catch (e) {\n if (typeof self !== 'undefined') {\n self.globalThis = self;\n }\n }\n}\n//# sourceMappingURL=polyfills.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport GoTrueApi from './GoTrueApi';\nimport { isBrowser, getParameterByName, uuid, LocalStorage } from './lib/helpers';\nimport { GOTRUE_URL, DEFAULT_HEADERS, STORAGE_KEY } from './lib/constants';\nimport { polyfillGlobalThis } from './lib/polyfills';\npolyfillGlobalThis(); // Make \"globalThis\" available\nconst DEFAULT_OPTIONS = {\n url: GOTRUE_URL,\n autoRefreshToken: true,\n persistSession: true,\n localStorage: globalThis.localStorage,\n detectSessionInUrl: true,\n headers: DEFAULT_HEADERS,\n};\nexport default class GoTrueClient {\n /**\n * Create a new client for use in the browser.\n * @param options.url The URL of the GoTrue server.\n * @param options.headers Any additional headers to send to the GoTrue server.\n * @param options.detectSessionInUrl Set to \"true\" if you want to automatically detects OAuth grants in the URL and signs in the user.\n * @param options.autoRefreshToken Set to \"true\" if you want to automatically refresh the token before expiring.\n * @param options.persistSession Set to \"true\" if you want to automatically save the user session into local storage.\n * @param options.localStorage\n */\n constructor(options) {\n this.stateChangeEmitters = new Map();\n const settings = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options);\n this.currentUser = null;\n this.currentSession = null;\n this.autoRefreshToken = settings.autoRefreshToken;\n this.persistSession = settings.persistSession;\n this.localStorage = new LocalStorage(settings.localStorage);\n this.api = new GoTrueApi({\n url: settings.url,\n headers: settings.headers,\n cookieOptions: settings.cookieOptions,\n });\n this._recoverSession();\n this._recoverAndRefresh();\n // Handle the OAuth redirect\n try {\n if (settings.detectSessionInUrl && isBrowser() && !!getParameterByName('access_token')) {\n this.getSessionFromUrl({ storeSession: true });\n }\n }\n catch (error) {\n console.log('Error getting session from URL.');\n }\n }\n /**\n * Creates a new user.\n * @type UserCredentials\n * @param email The user's email address.\n * @param password The user's password.\n * @param redirectTo A URL or mobile address to send the user to after they are confirmed.\n */\n signUp({ email, password }, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n this._removeSession();\n const { data, error } = yield this.api.signUpWithEmail(email, password, {\n redirectTo: options.redirectTo,\n });\n if (error) {\n throw error;\n }\n if (!data) {\n throw 'An error occurred on sign up.';\n }\n let session = null;\n let user = null;\n if (data.access_token) {\n session = data;\n user = session.user;\n this._saveSession(session);\n this._notifyAllSubscribers('SIGNED_IN');\n }\n if (data.id) {\n user = data;\n }\n return { data, user, session, error: null };\n }\n catch (error) {\n return { data: null, user: null, session: null, error };\n }\n });\n }\n /**\n * Log in an existing user, or login via a third-party provider.\n * @type UserCredentials\n * @param email The user's email address.\n * @param password The user's password.\n * @param refreshToken A valid refresh token that was returned on login.\n * @param provider One of the providers supported by GoTrue.\n * @param redirectTo A URL or mobile address to send the user to after they are confirmed.\n * @param scopes A space-separated list of scopes granted to the OAuth application.\n */\n signIn({ email, password, refreshToken, provider }, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n this._removeSession();\n if (email && !password) {\n const { error } = yield this.api.sendMagicLinkEmail(email, {\n redirectTo: options.redirectTo,\n });\n return { data: null, user: null, session: null, error };\n }\n if (email && password) {\n return this._handleEmailSignIn(email, password, {\n redirectTo: options.redirectTo,\n });\n }\n if (refreshToken) {\n // currentSession and currentUser will be updated to latest on _callRefreshToken using the passed refreshToken\n const { error } = yield this._callRefreshToken(refreshToken);\n if (error)\n throw error;\n return {\n data: this.currentSession,\n user: this.currentUser,\n session: this.currentSession,\n error: null,\n };\n }\n if (provider) {\n return this._handleProviderSignIn(provider, {\n redirectTo: options.redirectTo,\n scopes: options.scopes,\n });\n }\n throw new Error(`You must provide either an email or a third-party provider.`);\n }\n catch (error) {\n return { data: null, user: null, session: null, error };\n }\n });\n }\n /**\n * Inside a browser context, `user()` will return the user data, if there is a logged in user.\n *\n * For server-side management, you can get a user through `auth.api.getUserByCookie()`\n */\n user() {\n return this.currentUser;\n }\n /**\n * Returns the session data, if there is an active session.\n */\n session() {\n return this.currentSession;\n }\n /**\n * Force refreshes the session including the user data in case it was updated in a different session.\n */\n refreshSession() {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (!((_a = this.currentSession) === null || _a === void 0 ? void 0 : _a.access_token))\n throw new Error('Not logged in.');\n // currentSession and currentUser will be updated to latest on _callRefreshToken\n const { error } = yield this._callRefreshToken();\n if (error)\n throw error;\n return { data: this.currentSession, user: this.currentUser, error: null };\n }\n catch (error) {\n return { data: null, user: null, error };\n }\n });\n }\n /**\n * Updates user data, if there is a logged in user.\n */\n update(attributes) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (!((_a = this.currentSession) === null || _a === void 0 ? void 0 : _a.access_token))\n throw new Error('Not logged in.');\n const { user, error } = yield this.api.updateUser(this.currentSession.access_token, attributes);\n if (error)\n throw error;\n if (!user)\n throw Error('Invalid user data.');\n const session = Object.assign(Object.assign({}, this.currentSession), { user });\n this._saveSession(session);\n this._notifyAllSubscribers('USER_UPDATED');\n return { data: user, user, error: null };\n }\n catch (error) {\n return { data: null, user: null, error };\n }\n });\n }\n /**\n * Sets the session data from refresh_token and returns current Session and Error\n * @param refresh_token a JWT token\n */\n setSession(refresh_token) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (!refresh_token) {\n throw new Error('No current session.');\n }\n const { data, error } = yield this.api.refreshAccessToken(refresh_token);\n if (error) {\n return { session: null, error: error };\n }\n if (!data) {\n return {\n session: null,\n error: { name: 'Invalid refresh_token', message: 'JWT token provided is Invalid' },\n };\n }\n this._saveSession(data);\n this._notifyAllSubscribers('SIGNED_IN');\n return { session: data, error: null };\n }\n catch (error) {\n return { error, session: null };\n }\n });\n }\n /**\n * Overrides the JWT on the current client. The JWT will then be sent in all subsequent network requests.\n * @param access_token a jwt access token\n */\n setAuth(access_token) {\n this.currentSession = Object.assign(Object.assign({}, this.currentSession), { access_token, token_type: 'bearer', user: null });\n return this.currentSession;\n }\n /**\n * Gets the session data from a URL string\n * @param options.storeSession Optionally store the session in the browser\n */\n getSessionFromUrl(options) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (!isBrowser())\n throw new Error('No browser detected.');\n const error_description = getParameterByName('error_description');\n if (error_description)\n throw new Error(error_description);\n const provider_token = getParameterByName('provider_token');\n const access_token = getParameterByName('access_token');\n if (!access_token)\n throw new Error('No access_token detected.');\n const expires_in = getParameterByName('expires_in');\n if (!expires_in)\n throw new Error('No expires_in detected.');\n const refresh_token = getParameterByName('refresh_token');\n if (!refresh_token)\n throw new Error('No refresh_token detected.');\n const token_type = getParameterByName('token_type');\n if (!token_type)\n throw new Error('No token_type detected.');\n const timeNow = Math.round(Date.now() / 1000);\n const expires_at = timeNow + parseInt(expires_in);\n const { user, error } = yield this.api.getUser(access_token);\n if (error)\n throw error;\n const session = {\n provider_token,\n access_token,\n expires_in: parseInt(expires_in),\n expires_at,\n refresh_token,\n token_type,\n user: user,\n };\n if (options === null || options === void 0 ? void 0 : options.storeSession) {\n this._saveSession(session);\n this._notifyAllSubscribers('SIGNED_IN');\n if (getParameterByName('type') === 'recovery') {\n this._notifyAllSubscribers('PASSWORD_RECOVERY');\n }\n }\n // Remove tokens from URL\n window.location.hash = '';\n return { data: session, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Inside a browser context, `signOut()` will remove extract the logged in user from the browser session\n * and log them out - removing all items from localstorage and then trigger a \"SIGNED_OUT\" event.\n *\n * For server-side management, you can disable sessions by passing a JWT through to `auth.api.signOut(JWT: string)`\n */\n signOut() {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const accessToken = (_a = this.currentSession) === null || _a === void 0 ? void 0 : _a.access_token;\n this._removeSession();\n this._notifyAllSubscribers('SIGNED_OUT');\n if (accessToken) {\n const { error } = yield this.api.signOut(accessToken);\n if (error)\n return { error };\n }\n return { error: null };\n });\n }\n /**\n * Receive a notification every time an auth event happens.\n * @returns {Subscription} A subscription object which can be used to unsubscribe itself.\n */\n onAuthStateChange(callback) {\n try {\n const id = uuid();\n const self = this;\n const subscription = {\n id,\n callback,\n unsubscribe: () => {\n self.stateChangeEmitters.delete(id);\n },\n };\n this.stateChangeEmitters.set(id, subscription);\n return { data: subscription, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n }\n _handleEmailSignIn(email, password, options = {}) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const { data, error } = yield this.api.signInWithEmail(email, password, {\n redirectTo: options.redirectTo,\n });\n if (error || !data)\n return { data: null, user: null, session: null, error };\n if ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.confirmed_at) {\n this._saveSession(data);\n this._notifyAllSubscribers('SIGNED_IN');\n }\n return { data, user: data.user, session: data, error: null };\n }\n catch (error) {\n return { data: null, user: null, session: null, error };\n }\n });\n }\n _handleProviderSignIn(provider, options = {}) {\n const url = this.api.getUrlForProvider(provider, {\n redirectTo: options.redirectTo,\n scopes: options.scopes,\n });\n try {\n // try to open on the browser\n if (isBrowser()) {\n window.location.href = url;\n }\n return { provider, url, data: null, session: null, user: null, error: null };\n }\n catch (error) {\n // fallback to returning the URL\n if (!!url)\n return { provider, url, data: null, session: null, user: null, error: null };\n return { data: null, user: null, session: null, error };\n }\n }\n /**\n * Attempts to get the session from LocalStorage\n * Note: this should never be async (even for React Native), as we need it to return immediately in the constructor.\n */\n _recoverSession() {\n var _a;\n try {\n const json = isBrowser() && ((_a = this.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(STORAGE_KEY));\n if (!json || typeof json !== 'string') {\n return null;\n }\n const data = JSON.parse(json);\n const { currentSession, expiresAt } = data;\n const timeNow = Math.round(Date.now() / 1000);\n if (expiresAt >= timeNow && (currentSession === null || currentSession === void 0 ? void 0 : currentSession.user)) {\n this._saveSession(currentSession);\n this._notifyAllSubscribers('SIGNED_IN');\n }\n }\n catch (error) {\n console.log('error', error);\n }\n }\n /**\n * Recovers the session from LocalStorage and refreshes\n * Note: this method is async to accommodate for AsyncStorage e.g. in React native.\n */\n _recoverAndRefresh() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const json = isBrowser() && (yield this.localStorage.getItem(STORAGE_KEY));\n if (!json) {\n return null;\n }\n const data = JSON.parse(json);\n const { currentSession, expiresAt } = data;\n const timeNow = Math.round(Date.now() / 1000);\n if (expiresAt < timeNow) {\n if (this.autoRefreshToken && currentSession.refresh_token) {\n const { error } = yield this._callRefreshToken(currentSession.refresh_token);\n if (error) {\n console.log(error.message);\n yield this._removeSession();\n }\n }\n else {\n this._removeSession();\n }\n }\n else if (!currentSession || !currentSession.user) {\n console.log('Current session is missing data.');\n this._removeSession();\n }\n else {\n // should be handled on _recoverSession method already\n // But we still need the code here to accommodate for AsyncStorage e.g. in React native\n this._saveSession(currentSession);\n this._notifyAllSubscribers('SIGNED_IN');\n }\n }\n catch (err) {\n console.error(err);\n return null;\n }\n });\n }\n _callRefreshToken(refresh_token) {\n var _a;\n if (refresh_token === void 0) { refresh_token = (_a = this.currentSession) === null || _a === void 0 ? void 0 : _a.refresh_token; }\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (!refresh_token) {\n throw new Error('No current session.');\n }\n const { data, error } = yield this.api.refreshAccessToken(refresh_token);\n if (error)\n throw error;\n if (!data)\n throw Error('Invalid session data.');\n this._saveSession(data);\n this._notifyAllSubscribers('SIGNED_IN');\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n _notifyAllSubscribers(event) {\n this.stateChangeEmitters.forEach((x) => x.callback(event, this.currentSession));\n }\n /**\n * set currentSession and currentUser\n * process to _startAutoRefreshToken if possible\n */\n _saveSession(session) {\n this.currentSession = session;\n this.currentUser = session.user;\n const expiresAt = session.expires_at;\n if (expiresAt) {\n const timeNow = Math.round(Date.now() / 1000);\n const expiresIn = expiresAt - timeNow;\n const refreshDurationBeforeExpires = expiresIn > 60 ? 60 : 0.5;\n this._startAutoRefreshToken((expiresIn - refreshDurationBeforeExpires) * 1000);\n }\n // Do we need any extra check before persist session\n // access_token or user ?\n if (this.persistSession && session.expires_at) {\n this._persistSession(this.currentSession);\n }\n }\n _persistSession(currentSession) {\n const data = { currentSession, expiresAt: currentSession.expires_at };\n isBrowser() && this.localStorage.setItem(STORAGE_KEY, JSON.stringify(data));\n }\n _removeSession() {\n return __awaiter(this, void 0, void 0, function* () {\n this.currentSession = null;\n this.currentUser = null;\n if (this.refreshTokenTimer)\n clearTimeout(this.refreshTokenTimer);\n isBrowser() && (yield this.localStorage.removeItem(STORAGE_KEY));\n });\n }\n /**\n * Clear and re-create refresh token timer\n * @param value time intervals in milliseconds\n */\n _startAutoRefreshToken(value) {\n if (this.refreshTokenTimer)\n clearTimeout(this.refreshTokenTimer);\n if (value <= 0 || !this.autoRefreshToken)\n return;\n this.refreshTokenTimer = setTimeout(() => this._callRefreshToken(), value);\n if (typeof this.refreshTokenTimer.unref === 'function')\n this.refreshTokenTimer.unref();\n }\n}\n//# sourceMappingURL=GoTrueClient.js.map","import { GoTrueClient } from '@supabase/gotrue-js';\nexport class SupabaseAuthClient extends GoTrueClient {\n constructor(options) {\n super(options);\n }\n}\n//# sourceMappingURL=SupabaseAuthClient.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport fetch from 'cross-fetch';\nexport class PostgrestBuilder {\n constructor(builder) {\n Object.assign(this, builder);\n }\n /**\n * If there's an error with the query, throwOnError will reject the promise by\n * throwing the error instead of returning it as part of a successful response.\n *\n * {@link https://github.com/supabase/supabase-js/issues/92}\n */\n throwOnError() {\n this.shouldThrowOnError = true;\n return this;\n }\n then(onfulfilled, onrejected) {\n // https://postgrest.org/en/stable/api.html#switching-schemas\n if (typeof this.schema === 'undefined') {\n // skip\n }\n else if (['GET', 'HEAD'].includes(this.method)) {\n this.headers['Accept-Profile'] = this.schema;\n }\n else {\n this.headers['Content-Profile'] = this.schema;\n }\n if (this.method !== 'GET' && this.method !== 'HEAD') {\n this.headers['Content-Type'] = 'application/json';\n }\n return fetch(this.url.toString(), {\n method: this.method,\n headers: this.headers,\n body: JSON.stringify(this.body),\n })\n .then((res) => __awaiter(this, void 0, void 0, function* () {\n var _a, _b, _c;\n let error = null;\n let data = null;\n let count = null;\n if (res.ok) {\n const isReturnMinimal = (_a = this.headers['Prefer']) === null || _a === void 0 ? void 0 : _a.split(',').includes('return=minimal');\n if (this.method !== 'HEAD' && !isReturnMinimal) {\n const text = yield res.text();\n if (!text) {\n // discard `text`\n }\n else if (this.headers['Accept'] === 'text/csv') {\n data = text;\n }\n else {\n data = JSON.parse(text);\n }\n }\n const countHeader = (_b = this.headers['Prefer']) === null || _b === void 0 ? void 0 : _b.match(/count=(exact|planned|estimated)/);\n const contentRange = (_c = res.headers.get('content-range')) === null || _c === void 0 ? void 0 : _c.split('/');\n if (countHeader && contentRange && contentRange.length > 1) {\n count = parseInt(contentRange[1]);\n }\n }\n else {\n error = yield res.json();\n if (error && this.shouldThrowOnError) {\n throw error;\n }\n }\n const postgrestResponse = {\n error,\n data,\n count,\n status: res.status,\n statusText: res.statusText,\n body: data,\n };\n return postgrestResponse;\n }))\n .then(onfulfilled, onrejected);\n }\n}\n//# sourceMappingURL=types.js.map","import { PostgrestBuilder } from './types';\n/**\n * Post-filters (transforms)\n */\nexport default class PostgrestTransformBuilder extends PostgrestBuilder {\n /**\n * Performs vertical filtering with SELECT.\n *\n * @param columns The columns to retrieve, separated by commas.\n */\n select(columns = '*') {\n // Remove whitespaces except when quoted\n let quoted = false;\n const cleanedColumns = columns\n .split('')\n .map((c) => {\n if (/\\s/.test(c) && !quoted) {\n return '';\n }\n if (c === '\"') {\n quoted = !quoted;\n }\n return c;\n })\n .join('');\n this.url.searchParams.set('select', cleanedColumns);\n return this;\n }\n /**\n * Orders the result with the specified `column`.\n *\n * @param column The column to order on.\n * @param ascending If `true`, the result will be in ascending order.\n * @param nullsFirst If `true`, `null`s appear first.\n * @param foreignTable The foreign table to use (if `column` is a foreign column).\n */\n order(column, { ascending = true, nullsFirst = false, foreignTable, } = {}) {\n const key = typeof foreignTable === 'undefined' ? 'order' : `${foreignTable}.order`;\n const existingOrder = this.url.searchParams.get(key);\n this.url.searchParams.set(key, `${existingOrder ? `${existingOrder},` : ''}${column}.${ascending ? 'asc' : 'desc'}.${nullsFirst ? 'nullsfirst' : 'nullslast'}`);\n return this;\n }\n /**\n * Limits the result with the specified `count`.\n *\n * @param count The maximum no. of rows to limit to.\n * @param foreignTable The foreign table to use (for foreign columns).\n */\n limit(count, { foreignTable } = {}) {\n const key = typeof foreignTable === 'undefined' ? 'limit' : `${foreignTable}.limit`;\n this.url.searchParams.set(key, `${count}`);\n return this;\n }\n /**\n * Limits the result to rows within the specified range, inclusive.\n *\n * @param from The starting index from which to limit the result, inclusive.\n * @param to The last index to which to limit the result, inclusive.\n * @param foreignTable The foreign table to use (for foreign columns).\n */\n range(from, to, { foreignTable } = {}) {\n const keyOffset = typeof foreignTable === 'undefined' ? 'offset' : `${foreignTable}.offset`;\n const keyLimit = typeof foreignTable === 'undefined' ? 'limit' : `${foreignTable}.limit`;\n this.url.searchParams.set(keyOffset, `${from}`);\n // Range is inclusive, so add 1\n this.url.searchParams.set(keyLimit, `${to - from + 1}`);\n return this;\n }\n /**\n * Retrieves only one row from the result. Result must be one row (e.g. using\n * `limit`), otherwise this will result in an error.\n */\n single() {\n this.headers['Accept'] = 'application/vnd.pgrst.object+json';\n return this;\n }\n /**\n * Retrieves at most one row from the result. Result must be at most one row\n * (e.g. using `eq` on a UNIQUE column), otherwise this will result in an\n * error.\n */\n maybeSingle() {\n this.headers['Accept'] = 'application/vnd.pgrst.object+json';\n const _this = new PostgrestTransformBuilder(this);\n _this.then = ((onfulfilled, onrejected) => this.then((res) => {\n var _a;\n if ((_a = res.error) === null || _a === void 0 ? void 0 : _a.details.includes('Results contain 0 rows')) {\n return onfulfilled({\n error: null,\n data: null,\n count: res.count,\n status: 200,\n statusText: 'OK',\n body: null,\n });\n }\n return onfulfilled(res);\n }, onrejected));\n return _this;\n }\n /**\n * Set the response type to CSV.\n */\n csv() {\n this.headers['Accept'] = 'text/csv';\n return this;\n }\n}\n//# sourceMappingURL=PostgrestTransformBuilder.js.map","import PostgrestTransformBuilder from './PostgrestTransformBuilder';\nexport default class PostgrestFilterBuilder extends PostgrestTransformBuilder {\n constructor() {\n super(...arguments);\n /** @deprecated Use `contains()` instead. */\n this.cs = this.contains;\n /** @deprecated Use `containedBy()` instead. */\n this.cd = this.containedBy;\n /** @deprecated Use `rangeLt()` instead. */\n this.sl = this.rangeLt;\n /** @deprecated Use `rangeGt()` instead. */\n this.sr = this.rangeGt;\n /** @deprecated Use `rangeGte()` instead. */\n this.nxl = this.rangeGte;\n /** @deprecated Use `rangeLte()` instead. */\n this.nxr = this.rangeLte;\n /** @deprecated Use `rangeAdjacent()` instead. */\n this.adj = this.rangeAdjacent;\n /** @deprecated Use `overlaps()` instead. */\n this.ov = this.overlaps;\n }\n /**\n * Finds all rows which doesn't satisfy the filter.\n *\n * @param column The column to filter on.\n * @param operator The operator to filter with.\n * @param value The value to filter with.\n */\n not(column, operator, value) {\n this.url.searchParams.append(`${column}`, `not.${operator}.${value}`);\n return this;\n }\n /**\n * Finds all rows satisfying at least one of the filters.\n *\n * @param filters The filters to use, separated by commas.\n * @param foreignTable The foreign table to use (if `column` is a foreign column).\n */\n or(filters, { foreignTable } = {}) {\n const key = typeof foreignTable === 'undefined' ? 'or' : `${foreignTable}.or`;\n this.url.searchParams.append(key, `(${filters})`);\n return this;\n }\n /**\n * Finds all rows whose value on the stated `column` exactly matches the\n * specified `value`.\n *\n * @param column The column to filter on.\n * @param value The value to filter with.\n */\n eq(column, value) {\n this.url.searchParams.append(`${column}`, `eq.${value}`);\n return this;\n }\n /**\n * Finds all rows whose value on the stated `column` doesn't match the\n * specified `value`.\n *\n * @param column The column to filter on.\n * @param value The value to filter with.\n */\n neq(column, value) {\n this.url.searchParams.append(`${column}`, `neq.${value}`);\n return this;\n }\n /**\n * Finds all rows whose value on the stated `column` is greater than the\n * specified `value`.\n *\n * @param column The column to filter on.\n * @param value The value to filter with.\n */\n gt(column, value) {\n this.url.searchParams.append(`${column}`, `gt.${value}`);\n return this;\n }\n /**\n * Finds all rows whose value on the stated `column` is greater than or\n * equal to the specified `value`.\n *\n * @param column The column to filter on.\n * @param value The value to filter with.\n */\n gte(column, value) {\n this.url.searchParams.append(`${column}`, `gte.${value}`);\n return this;\n }\n /**\n * Finds all rows whose value on the stated `column` is less than the\n * specified `value`.\n *\n * @param column The column to filter on.\n * @param value The value to filter with.\n */\n lt(column, value) {\n this.url.searchParams.append(`${column}`, `lt.${value}`);\n return this;\n }\n /**\n * Finds all rows whose value on the stated `column` is less than or equal\n * to the specified `value`.\n *\n * @param column The column to filter on.\n * @param value The value to filter with.\n */\n lte(column, value) {\n this.url.searchParams.append(`${column}`, `lte.${value}`);\n return this;\n }\n /**\n * Finds all rows whose value in the stated `column` matches the supplied\n * `pattern` (case sensitive).\n *\n * @param column The column to filter on.\n * @param pattern The pattern to filter with.\n */\n like(column, pattern) {\n this.url.searchParams.append(`${column}`, `like.${pattern}`);\n return this;\n }\n /**\n * Finds all rows whose value in the stated `column` matches the supplied\n * `pattern` (case insensitive).\n *\n * @param column The column to filter on.\n * @param pattern The pattern to filter with.\n */\n ilike(column, pattern) {\n this.url.searchParams.append(`${column}`, `ilike.${pattern}`);\n return this;\n }\n /**\n * A check for exact equality (null, true, false), finds all rows whose\n * value on the stated `column` exactly match the specified `value`.\n *\n * @param column The column to filter on.\n * @param value The value to filter with.\n */\n is(column, value) {\n this.url.searchParams.append(`${column}`, `is.${value}`);\n return this;\n }\n /**\n * Finds all rows whose value on the stated `column` is found on the\n * specified `values`.\n *\n * @param column The column to filter on.\n * @param values The values to filter with.\n */\n in(column, values) {\n const cleanedValues = values\n .map((s) => {\n // handle postgrest reserved characters\n // https://postgrest.org/en/v7.0.0/api.html#reserved-characters\n if (typeof s === 'string' && new RegExp('[,()]').test(s))\n return `\"${s}\"`;\n else\n return `${s}`;\n })\n .join(',');\n this.url.searchParams.append(`${column}`, `in.(${cleanedValues})`);\n return this;\n }\n /**\n * Finds all rows whose json, array, or range value on the stated `column`\n * contains the values specified in `value`.\n *\n * @param column The column to filter on.\n * @param value The value to filter with.\n */\n contains(column, value) {\n if (typeof value === 'string') {\n // range types can be inclusive '[', ']' or exclusive '(', ')' so just\n // keep it simple and accept a string\n this.url.searchParams.append(`${column}`, `cs.${value}`);\n }\n else if (Array.isArray(value)) {\n // array\n this.url.searchParams.append(`${column}`, `cs.{${value.join(',')}}`);\n }\n else {\n // json\n this.url.searchParams.append(`${column}`, `cs.${JSON.stringify(value)}`);\n }\n return this;\n }\n /**\n * Finds all rows whose json, array, or range value on the stated `column` is\n * contained by the specified `value`.\n *\n * @param column The column to filter on.\n * @param value The value to filter with.\n */\n containedBy(column, value) {\n if (typeof value === 'string') {\n // range\n this.url.searchParams.append(`${column}`, `cd.${value}`);\n }\n else if (Array.isArray(value)) {\n // array\n this.url.searchParams.append(`${column}`, `cd.{${value.join(',')}}`);\n }\n else {\n // json\n this.url.searchParams.append(`${column}`, `cd.${JSON.stringify(value)}`);\n }\n return this;\n }\n /**\n * Finds all rows whose range value on the stated `column` is strictly to the\n * left of the specified `range`.\n *\n * @param column The column to filter on.\n * @param range The range to filter with.\n */\n rangeLt(column, range) {\n this.url.searchParams.append(`${column}`, `sl.${range}`);\n return this;\n }\n /**\n * Finds all rows whose range value on the stated `column` is strictly to\n * the right of the specified `range`.\n *\n * @param column The column to filter on.\n * @param range The range to filter with.\n */\n rangeGt(column, range) {\n this.url.searchParams.append(`${column}`, `sr.${range}`);\n return this;\n }\n /**\n * Finds all rows whose range value on the stated `column` does not extend\n * to the left of the specified `range`.\n *\n * @param column The column to filter on.\n * @param range The range to filter with.\n */\n rangeGte(column, range) {\n this.url.searchParams.append(`${column}`, `nxl.${range}`);\n return this;\n }\n /**\n * Finds all rows whose range value on the stated `column` does not extend\n * to the right of the specified `range`.\n *\n * @param column The column to filter on.\n * @param range The range to filter with.\n */\n rangeLte(column, range) {\n this.url.searchParams.append(`${column}`, `nxr.${range}`);\n return this;\n }\n /**\n * Finds all rows whose range value on the stated `column` is adjacent to\n * the specified `range`.\n *\n * @param column The column to filter on.\n * @param range The range to filter with.\n */\n rangeAdjacent(column, range) {\n this.url.searchParams.append(`${column}`, `adj.${range}`);\n return this;\n }\n /**\n * Finds all rows whose array or range value on the stated `column` overlaps\n * (has a value in common) with the specified `value`.\n *\n * @param column The column to filter on.\n * @param value The value to filter with.\n */\n overlaps(column, value) {\n if (typeof value === 'string') {\n // range\n this.url.searchParams.append(`${column}`, `ov.${value}`);\n }\n else {\n // array\n this.url.searchParams.append(`${column}`, `ov.{${value.join(',')}}`);\n }\n return this;\n }\n /**\n * Finds all rows whose text or tsvector value on the stated `column` matches\n * the tsquery in `query`.\n *\n * @param column The column to filter on.\n * @param query The Postgres tsquery string to filter with.\n * @param config The text search configuration to use.\n * @param type The type of tsquery conversion to use on `query`.\n */\n textSearch(column, query, { config, type = null, } = {}) {\n let typePart = '';\n if (type === 'plain') {\n typePart = 'pl';\n }\n else if (type === 'phrase') {\n typePart = 'ph';\n }\n else if (type === 'websearch') {\n typePart = 'w';\n }\n const configPart = config === undefined ? '' : `(${config})`;\n this.url.searchParams.append(`${column}`, `${typePart}fts${configPart}.${query}`);\n return this;\n }\n /**\n * Finds all rows whose tsvector value on the stated `column` matches\n * to_tsquery(`query`).\n *\n * @param column The column to filter on.\n * @param query The Postgres tsquery string to filter with.\n * @param config The text search configuration to use.\n *\n * @deprecated Use `textSearch()` instead.\n */\n fts(column, query, { config } = {}) {\n const configPart = typeof config === 'undefined' ? '' : `(${config})`;\n this.url.searchParams.append(`${column}`, `fts${configPart}.${query}`);\n return this;\n }\n /**\n * Finds all rows whose tsvector value on the stated `column` matches\n * plainto_tsquery(`query`).\n *\n * @param column The column to filter on.\n * @param query The Postgres tsquery string to filter with.\n * @param config The text search configuration to use.\n *\n * @deprecated Use `textSearch()` with `type: 'plain'` instead.\n */\n plfts(column, query, { config } = {}) {\n const configPart = typeof config === 'undefined' ? '' : `(${config})`;\n this.url.searchParams.append(`${column}`, `plfts${configPart}.${query}`);\n return this;\n }\n /**\n * Finds all rows whose tsvector value on the stated `column` matches\n * phraseto_tsquery(`query`).\n *\n * @param column The column to filter on.\n * @param query The Postgres tsquery string to filter with.\n * @param config The text search configuration to use.\n *\n * @deprecated Use `textSearch()` with `type: 'phrase'` instead.\n */\n phfts(column, query, { config } = {}) {\n const configPart = typeof config === 'undefined' ? '' : `(${config})`;\n this.url.searchParams.append(`${column}`, `phfts${configPart}.${query}`);\n return this;\n }\n /**\n * Finds all rows whose tsvector value on the stated `column` matches\n * websearch_to_tsquery(`query`).\n *\n * @param column The column to filter on.\n * @param query The Postgres tsquery string to filter with.\n * @param config The text search configuration to use.\n *\n * @deprecated Use `textSearch()` with `type: 'websearch'` instead.\n */\n wfts(column, query, { config } = {}) {\n const configPart = typeof config === 'undefined' ? '' : `(${config})`;\n this.url.searchParams.append(`${column}`, `wfts${configPart}.${query}`);\n return this;\n }\n /**\n * Finds all rows whose `column` satisfies the filter.\n *\n * @param column The column to filter on.\n * @param operator The operator to filter with.\n * @param value The value to filter with.\n */\n filter(column, operator, value) {\n this.url.searchParams.append(`${column}`, `${operator}.${value}`);\n return this;\n }\n /**\n * Finds all rows whose columns match the specified `query` object.\n *\n * @param query The object to filter with, with column names as keys mapped\n * to their filter values.\n */\n match(query) {\n Object.keys(query).forEach((key) => {\n this.url.searchParams.append(`${key}`, `eq.${query[key]}`);\n });\n return this;\n }\n}\n//# sourceMappingURL=PostgrestFilterBuilder.js.map","import { PostgrestBuilder } from './types';\nimport PostgrestFilterBuilder from './PostgrestFilterBuilder';\nexport default class PostgrestQueryBuilder extends PostgrestBuilder {\n constructor(url, { headers = {}, schema } = {}) {\n super({});\n this.url = new URL(url);\n this.headers = Object.assign({}, headers);\n this.schema = schema;\n }\n /**\n * Performs vertical filtering with SELECT.\n *\n * @param columns The columns to retrieve, separated by commas.\n * @param head When set to true, select will void data.\n * @param count Count algorithm to use to count rows in a table.\n */\n select(columns = '*', { head = false, count = null, } = {}) {\n this.method = 'GET';\n // Remove whitespaces except when quoted\n let quoted = false;\n const cleanedColumns = columns\n .split('')\n .map((c) => {\n if (/\\s/.test(c) && !quoted) {\n return '';\n }\n if (c === '\"') {\n quoted = !quoted;\n }\n return c;\n })\n .join('');\n this.url.searchParams.set('select', cleanedColumns);\n if (count) {\n this.headers['Prefer'] = `count=${count}`;\n }\n if (head) {\n this.method = 'HEAD';\n }\n return new PostgrestFilterBuilder(this);\n }\n insert(values, { upsert = false, onConflict, returning = 'representation', count = null, } = {}) {\n this.method = 'POST';\n const prefersHeaders = [`return=${returning}`];\n if (upsert)\n prefersHeaders.push('resolution=merge-duplicates');\n if (upsert && onConflict !== undefined)\n this.url.searchParams.set('on_conflict', onConflict);\n this.body = values;\n if (count) {\n prefersHeaders.push(`count=${count}`);\n }\n this.headers['Prefer'] = prefersHeaders.join(',');\n if (Array.isArray(values)) {\n const columns = values.reduce((acc, x) => acc.concat(Object.keys(x)), []);\n if (columns.length > 0) {\n const uniqueColumns = [...new Set(columns)];\n this.url.searchParams.set('columns', uniqueColumns.join(','));\n }\n }\n return new PostgrestFilterBuilder(this);\n }\n /**\n * Performs an UPSERT into the table.\n *\n * @param values The values to insert.\n * @param onConflict By specifying the `on_conflict` query parameter, you can make UPSERT work on a column(s) that has a UNIQUE constraint.\n * @param returning By default the new record is returned. Set this to 'minimal' if you don't need this value.\n * @param count Count algorithm to use to count rows in a table.\n * @param ignoreDuplicates Specifies if duplicate rows should be ignored and not inserted.\n */\n upsert(values, { onConflict, returning = 'representation', count = null, ignoreDuplicates = false, } = {}) {\n this.method = 'POST';\n const prefersHeaders = [\n `resolution=${ignoreDuplicates ? 'ignore' : 'merge'}-duplicates`,\n `return=${returning}`,\n ];\n if (onConflict !== undefined)\n this.url.searchParams.set('on_conflict', onConflict);\n this.body = values;\n if (count) {\n prefersHeaders.push(`count=${count}`);\n }\n this.headers['Prefer'] = prefersHeaders.join(',');\n return new PostgrestFilterBuilder(this);\n }\n /**\n * Performs an UPDATE on the table.\n *\n * @param values The values to update.\n * @param returning By default the updated record is returned. Set this to 'minimal' if you don't need this value.\n * @param count Count algorithm to use to count rows in a table.\n */\n update(values, { returning = 'representation', count = null, } = {}) {\n this.method = 'PATCH';\n const prefersHeaders = [`return=${returning}`];\n this.body = values;\n if (count) {\n prefersHeaders.push(`count=${count}`);\n }\n this.headers['Prefer'] = prefersHeaders.join(',');\n return new PostgrestFilterBuilder(this);\n }\n /**\n * Performs a DELETE on the table.\n *\n * @param returning If `true`, return the deleted row(s) in the response.\n * @param count Count algorithm to use to count rows in a table.\n */\n delete({ returning = 'representation', count = null, } = {}) {\n this.method = 'DELETE';\n const prefersHeaders = [`return=${returning}`];\n if (count) {\n prefersHeaders.push(`count=${count}`);\n }\n this.headers['Prefer'] = prefersHeaders.join(',');\n return new PostgrestFilterBuilder(this);\n }\n}\n//# sourceMappingURL=PostgrestQueryBuilder.js.map","import { PostgrestBuilder } from './types';\nimport PostgrestFilterBuilder from './PostgrestFilterBuilder';\nexport default class PostgrestRpcBuilder extends PostgrestBuilder {\n constructor(url, { headers = {}, schema } = {}) {\n super({});\n this.url = new URL(url);\n this.headers = Object.assign({}, headers);\n this.schema = schema;\n }\n /**\n * Perform a stored procedure call.\n */\n rpc(params, { count = null, } = {}) {\n this.method = 'POST';\n this.body = params;\n if (count) {\n if (this.headers['Prefer'] !== undefined)\n this.headers['Prefer'] += `,count=${count}`;\n else\n this.headers['Prefer'] = `count=${count}`;\n }\n return new PostgrestFilterBuilder(this);\n }\n}\n//# sourceMappingURL=PostgrestRpcBuilder.js.map","import PostgrestQueryBuilder from './lib/PostgrestQueryBuilder';\nimport PostgrestRpcBuilder from './lib/PostgrestRpcBuilder';\nexport default class PostgrestClient {\n /**\n * Creates a PostgREST client.\n *\n * @param url URL of the PostgREST endpoint.\n * @param headers Custom headers.\n * @param schema Postgres schema to switch to.\n */\n constructor(url, { headers = {}, schema } = {}) {\n this.url = url;\n this.headers = headers;\n this.schema = schema;\n }\n /**\n * Authenticates the request with JWT.\n *\n * @param token The JWT token to use.\n */\n auth(token) {\n this.headers['Authorization'] = `Bearer ${token}`;\n return this;\n }\n /**\n * Perform a table operation.\n *\n * @param table The table name to operate on.\n */\n from(table) {\n const url = `${this.url}/${table}`;\n return new PostgrestQueryBuilder(url, { headers: this.headers, schema: this.schema });\n }\n /**\n * Perform a stored procedure call.\n *\n * @param fn The function name to call.\n * @param params The parameters to pass to the function call.\n * @param count Count algorithm to use to count rows in a table.\n */\n rpc(fn, params, { count = null, } = {}) {\n const url = `${this.url}/rpc/${fn}`;\n return new PostgrestRpcBuilder(url, {\n headers: this.headers,\n schema: this.schema,\n }).rpc(params, { count });\n }\n}\n//# sourceMappingURL=PostgrestClient.js.map","/**\n * Helpers to convert the change Payload into native JS types.\n */\n// Adapted from epgsql (src/epgsql_binary.erl), this module licensed under\n// 3-clause BSD found here: https://raw.githubusercontent.com/epgsql/epgsql/devel/LICENSE\nexport var PostgresTypes;\n(function (PostgresTypes) {\n PostgresTypes[\"abstime\"] = \"abstime\";\n PostgresTypes[\"bool\"] = \"bool\";\n PostgresTypes[\"date\"] = \"date\";\n PostgresTypes[\"daterange\"] = \"daterange\";\n PostgresTypes[\"float4\"] = \"float4\";\n PostgresTypes[\"float8\"] = \"float8\";\n PostgresTypes[\"int2\"] = \"int2\";\n PostgresTypes[\"int4\"] = \"int4\";\n PostgresTypes[\"int4range\"] = \"int4range\";\n PostgresTypes[\"int8\"] = \"int8\";\n PostgresTypes[\"int8range\"] = \"int8range\";\n PostgresTypes[\"json\"] = \"json\";\n PostgresTypes[\"jsonb\"] = \"jsonb\";\n PostgresTypes[\"money\"] = \"money\";\n PostgresTypes[\"numeric\"] = \"numeric\";\n PostgresTypes[\"oid\"] = \"oid\";\n PostgresTypes[\"reltime\"] = \"reltime\";\n PostgresTypes[\"time\"] = \"time\";\n PostgresTypes[\"timestamp\"] = \"timestamp\";\n PostgresTypes[\"timestamptz\"] = \"timestamptz\";\n PostgresTypes[\"timetz\"] = \"timetz\";\n PostgresTypes[\"tsrange\"] = \"tsrange\";\n PostgresTypes[\"tstzrange\"] = \"tstzrange\";\n})(PostgresTypes || (PostgresTypes = {}));\n/**\n * Takes an array of columns and an object of string values then converts each string value\n * to its mapped type.\n *\n * @param {{name: String, type: String}[]} columns\n * @param {Object} records\n * @param {Object} options The map of various options that can be applied to the mapper\n * @param {Array} options.skipTypes The array of types that should not be converted\n *\n * @example convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {first_name: 'Paul', age:'33'}, {})\n * //=>{ first_name: 'Paul', age: 33 }\n */\nexport const convertChangeData = (columns, records, options = {}) => {\n let result = {};\n let skipTypes = typeof options.skipTypes !== 'undefined' ? options.skipTypes : [];\n Object.entries(records).map(([key, value]) => {\n result[key] = convertColumn(key, columns, records, skipTypes);\n });\n return result;\n};\n/**\n * Converts the value of an individual column.\n *\n * @param {String} columnName The column that you want to convert\n * @param {{name: String, type: String}[]} columns All of the columns\n * @param {Object} records The map of string values\n * @param {Array} skipTypes An array of types that should not be converted\n * @return {object} Useless information\n *\n * @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], ['Paul', '33'], [])\n * //=> 33\n * @example convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], ['Paul', '33'], ['int4'])\n * //=> \"33\"\n */\nexport const convertColumn = (columnName, columns, records, skipTypes) => {\n let column = columns.find((x) => x.name == columnName);\n if (!column || skipTypes.includes(column.type)) {\n return noop(records[columnName]);\n }\n else {\n return convertCell(column.type, records[columnName]);\n }\n};\n/**\n * If the value of the cell is `null`, returns null.\n * Otherwise converts the string value to the correct type.\n * @param {String} type A postgres column type\n * @param {String} stringValue The cell value\n *\n * @example convertCell('bool', 'true')\n * //=> true\n * @example convertCell('int8', '10')\n * //=> 10\n * @example convertCell('_int4', '{1,2,3,4}')\n * //=> [1,2,3,4]\n */\nexport const convertCell = (type, stringValue) => {\n try {\n if (stringValue === null)\n return null;\n // if data type is an array\n if (type.charAt(0) === '_') {\n let arrayValue = type.slice(1, type.length);\n return toArray(stringValue, arrayValue);\n }\n // If not null, convert to correct type.\n switch (type) {\n case PostgresTypes.abstime:\n return noop(stringValue); // To allow users to cast it based on Timezone\n case PostgresTypes.bool:\n return toBoolean(stringValue);\n case PostgresTypes.date:\n return noop(stringValue); // To allow users to cast it based on Timezone\n case PostgresTypes.daterange:\n return toDateRange(stringValue);\n case PostgresTypes.float4:\n return toFloat(stringValue);\n case PostgresTypes.float8:\n return toFloat(stringValue);\n case PostgresTypes.int2:\n return toInt(stringValue);\n case PostgresTypes.int4:\n return toInt(stringValue);\n case PostgresTypes.int4range:\n return toIntRange(stringValue);\n case PostgresTypes.int8:\n return toInt(stringValue);\n case PostgresTypes.int8range:\n return toIntRange(stringValue);\n case PostgresTypes.json:\n return toJson(stringValue);\n case PostgresTypes.jsonb:\n return toJson(stringValue);\n case PostgresTypes.money:\n return toFloat(stringValue);\n case PostgresTypes.numeric:\n return toFloat(stringValue);\n case PostgresTypes.oid:\n return toInt(stringValue);\n case PostgresTypes.reltime:\n return noop(stringValue); // To allow users to cast it based on Timezone\n case PostgresTypes.time:\n return noop(stringValue); // To allow users to cast it based on Timezone\n case PostgresTypes.timestamp:\n return toTimestampString(stringValue); // Format to be consistent with PostgREST\n case PostgresTypes.timestamptz:\n return noop(stringValue); // To allow users to cast it based on Timezone\n case PostgresTypes.timetz:\n return noop(stringValue); // To allow users to cast it based on Timezone\n case PostgresTypes.tsrange:\n return toDateRange(stringValue);\n case PostgresTypes.tstzrange:\n return toDateRange(stringValue);\n default:\n // All the rest will be returned as strings\n return noop(stringValue);\n }\n }\n catch (error) {\n console.log(`Could not convert cell of type ${type} and value ${stringValue}`);\n console.log(`This is the error: ${error}`);\n return stringValue;\n }\n};\nconst noop = (stringValue) => {\n return stringValue;\n};\nexport const toBoolean = (stringValue) => {\n switch (stringValue) {\n case 't':\n return true;\n case 'f':\n return false;\n default:\n return null;\n }\n};\nexport const toDate = (stringValue) => {\n return new Date(stringValue);\n};\nexport const toDateRange = (stringValue) => {\n let arr = JSON.parse(stringValue);\n return [new Date(arr[0]), new Date(arr[1])];\n};\nexport const toFloat = (stringValue) => {\n return parseFloat(stringValue);\n};\nexport const toInt = (stringValue) => {\n return parseInt(stringValue);\n};\nexport const toIntRange = (stringValue) => {\n let arr = JSON.parse(stringValue);\n return [parseInt(arr[0]), parseInt(arr[1])];\n};\nexport const toJson = (stringValue) => {\n return JSON.parse(stringValue);\n};\n/**\n * Converts a Postgres Array into a native JS array\n *\n * @example toArray('{1,2,3,4}', 'int4')\n * //=> [1,2,3,4]\n * @example toArray('{}', 'int4')\n * //=> []\n */\nexport const toArray = (stringValue, type) => {\n // this takes off the '{' & '}'\n let stringEnriched = stringValue.slice(1, stringValue.length - 1);\n // converts the string into an array\n // if string is empty (meaning the array was empty), an empty array will be immediately returned\n let stringArray = stringEnriched.length > 0 ? stringEnriched.split(',') : [];\n let array = stringArray.map((string) => {\n return convertCell(type, string);\n });\n return array;\n};\n/**\n * Fixes timestamp to be ISO-8601. Swaps the space between the date and time for a 'T'\n * See https://github.com/supabase/supabase/issues/18\n *\n * @example toTimestampString('2019-09-10 00:00:00')\n * //=> '2019-09-10T00:00:00'\n */\nexport const toTimestampString = (stringValue) => {\n return stringValue.replace(' ', 'T');\n};\n//# sourceMappingURL=transformers.js.map","export const VSN = '1.0.0';\nexport const DEFAULT_TIMEOUT = 10000;\nexport const WS_CLOSE_NORMAL = 1000;\nexport var SOCKET_STATES;\n(function (SOCKET_STATES) {\n SOCKET_STATES[SOCKET_STATES[\"connecting\"] = 0] = \"connecting\";\n SOCKET_STATES[SOCKET_STATES[\"open\"] = 1] = \"open\";\n SOCKET_STATES[SOCKET_STATES[\"closing\"] = 2] = \"closing\";\n SOCKET_STATES[SOCKET_STATES[\"closed\"] = 3] = \"closed\";\n})(SOCKET_STATES || (SOCKET_STATES = {}));\nexport var CHANNEL_STATES;\n(function (CHANNEL_STATES) {\n CHANNEL_STATES[\"closed\"] = \"closed\";\n CHANNEL_STATES[\"errored\"] = \"errored\";\n CHANNEL_STATES[\"joined\"] = \"joined\";\n CHANNEL_STATES[\"joining\"] = \"joining\";\n CHANNEL_STATES[\"leaving\"] = \"leaving\";\n})(CHANNEL_STATES || (CHANNEL_STATES = {}));\nexport var CHANNEL_EVENTS;\n(function (CHANNEL_EVENTS) {\n CHANNEL_EVENTS[\"close\"] = \"phx_close\";\n CHANNEL_EVENTS[\"error\"] = \"phx_error\";\n CHANNEL_EVENTS[\"join\"] = \"phx_join\";\n CHANNEL_EVENTS[\"reply\"] = \"phx_reply\";\n CHANNEL_EVENTS[\"leave\"] = \"phx_leave\";\n})(CHANNEL_EVENTS || (CHANNEL_EVENTS = {}));\nexport var TRANSPORTS;\n(function (TRANSPORTS) {\n TRANSPORTS[\"websocket\"] = \"websocket\";\n})(TRANSPORTS || (TRANSPORTS = {}));\n//# sourceMappingURL=constants.js.map","/**\n * Creates a timer that accepts a `timerCalc` function to perform calculated timeout retries, such as exponential backoff.\n *\n * @example\n * let reconnectTimer = new Timer(() => this.connect(), function(tries){\n * return [1000, 5000, 10000][tries - 1] || 10000\n * })\n * reconnectTimer.scheduleTimeout() // fires after 1000\n * reconnectTimer.scheduleTimeout() // fires after 5000\n * reconnectTimer.reset()\n * reconnectTimer.scheduleTimeout() // fires after 1000\n */\nexport default class Timer {\n constructor(callback, timerCalc) {\n this.callback = callback;\n this.timerCalc = timerCalc;\n this.timer = undefined;\n this.tries = 0;\n this.callback = callback;\n this.timerCalc = timerCalc;\n }\n reset() {\n this.tries = 0;\n clearTimeout(this.timer);\n }\n // Cancels any previous scheduleTimeout and schedules callback\n scheduleTimeout() {\n clearTimeout(this.timer);\n this.timer = setTimeout(() => {\n this.tries = this.tries + 1;\n this.callback();\n }, this.timerCalc(this.tries + 1));\n }\n}\n//# sourceMappingURL=timer.js.map","import { DEFAULT_TIMEOUT } from '../lib/constants';\nexport default class Push {\n /**\n * Initializes the Push\n *\n * @param channel The Channel\n * @param event The event, for example `\"phx_join\"`\n * @param payload The payload, for example `{user_id: 123}`\n * @param timeout The push timeout in milliseconds\n */\n constructor(channel, event, payload = {}, timeout = DEFAULT_TIMEOUT) {\n this.channel = channel;\n this.event = event;\n this.payload = payload;\n this.timeout = timeout;\n this.sent = false;\n this.timeoutTimer = undefined;\n this.ref = '';\n this.receivedResp = null;\n this.recHooks = [];\n this.refEvent = null;\n }\n resend(timeout) {\n this.timeout = timeout;\n this._cancelRefEvent();\n this.ref = '';\n this.refEvent = null;\n this.receivedResp = null;\n this.sent = false;\n this.send();\n }\n send() {\n if (this._hasReceived('timeout')) {\n return;\n }\n this.startTimeout();\n this.sent = true;\n this.channel.socket.push({\n topic: this.channel.topic,\n event: this.event,\n payload: this.payload,\n ref: this.ref,\n });\n }\n receive(status, callback) {\n var _a;\n if (this._hasReceived(status)) {\n callback((_a = this.receivedResp) === null || _a === void 0 ? void 0 : _a.response);\n }\n this.recHooks.push({ status, callback });\n return this;\n }\n startTimeout() {\n if (this.timeoutTimer) {\n return;\n }\n this.ref = this.channel.socket.makeRef();\n this.refEvent = this.channel.replyEventName(this.ref);\n this.channel.on(this.refEvent, (payload) => {\n this._cancelRefEvent();\n this._cancelTimeout();\n this.receivedResp = payload;\n this._matchReceive(payload);\n });\n this.timeoutTimer = setTimeout(() => {\n this.trigger('timeout', {});\n }, this.timeout);\n }\n trigger(status, response) {\n if (this.refEvent)\n this.channel.trigger(this.refEvent, { status, response });\n }\n _cancelRefEvent() {\n if (!this.refEvent) {\n return;\n }\n this.channel.off(this.refEvent);\n }\n _cancelTimeout() {\n clearTimeout(this.timeoutTimer);\n this.timeoutTimer = undefined;\n }\n _matchReceive({ status, response, }) {\n this.recHooks\n .filter((h) => h.status === status)\n .forEach((h) => h.callback(response));\n }\n _hasReceived(status) {\n return this.receivedResp && this.receivedResp.status === status;\n }\n}\n//# sourceMappingURL=push.js.map","import { CHANNEL_EVENTS, CHANNEL_STATES } from './lib/constants';\nimport Push from './lib/push';\nimport Timer from './lib/timer';\nexport default class RealtimeSubscription {\n constructor(topic, params = {}, socket) {\n this.topic = topic;\n this.params = params;\n this.socket = socket;\n this.bindings = [];\n this.state = CHANNEL_STATES.closed;\n this.joinedOnce = false;\n this.pushBuffer = [];\n this.timeout = this.socket.timeout;\n this.joinPush = new Push(this, CHANNEL_EVENTS.join, this.params, this.timeout);\n this.rejoinTimer = new Timer(() => this.rejoinUntilConnected(), this.socket.reconnectAfterMs);\n this.joinPush.receive('ok', () => {\n this.state = CHANNEL_STATES.joined;\n this.rejoinTimer.reset();\n this.pushBuffer.forEach((pushEvent) => pushEvent.send());\n this.pushBuffer = [];\n });\n this.onClose(() => {\n this.rejoinTimer.reset();\n this.socket.log('channel', `close ${this.topic} ${this.joinRef()}`);\n this.state = CHANNEL_STATES.closed;\n this.socket.remove(this);\n });\n this.onError((reason) => {\n if (this.isLeaving() || this.isClosed()) {\n return;\n }\n this.socket.log('channel', `error ${this.topic}`, reason);\n this.state = CHANNEL_STATES.errored;\n this.rejoinTimer.scheduleTimeout();\n });\n this.joinPush.receive('timeout', () => {\n if (!this.isJoining()) {\n return;\n }\n this.socket.log('channel', `timeout ${this.topic}`, this.joinPush.timeout);\n this.state = CHANNEL_STATES.errored;\n this.rejoinTimer.scheduleTimeout();\n });\n this.on(CHANNEL_EVENTS.reply, (payload, ref) => {\n this.trigger(this.replyEventName(ref), payload);\n });\n }\n rejoinUntilConnected() {\n this.rejoinTimer.scheduleTimeout();\n if (this.socket.isConnected()) {\n this.rejoin();\n }\n }\n subscribe(timeout = this.timeout) {\n if (this.joinedOnce) {\n throw `tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance`;\n }\n else {\n this.joinedOnce = true;\n this.rejoin(timeout);\n return this.joinPush;\n }\n }\n onClose(callback) {\n this.on(CHANNEL_EVENTS.close, callback);\n }\n onError(callback) {\n this.on(CHANNEL_EVENTS.error, (reason) => callback(reason));\n }\n on(event, callback) {\n this.bindings.push({ event, callback });\n }\n off(event) {\n this.bindings = this.bindings.filter((bind) => bind.event !== event);\n }\n canPush() {\n return this.socket.isConnected() && this.isJoined();\n }\n push(event, payload, timeout = this.timeout) {\n if (!this.joinedOnce) {\n throw `tried to push '${event}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;\n }\n let pushEvent = new Push(this, event, payload, timeout);\n if (this.canPush()) {\n pushEvent.send();\n }\n else {\n pushEvent.startTimeout();\n this.pushBuffer.push(pushEvent);\n }\n return pushEvent;\n }\n /**\n * Leaves the channel\n *\n * Unsubscribes from server events, and instructs channel to terminate on server.\n * Triggers onClose() hooks.\n *\n * To receive leave acknowledgements, use the a `receive` hook to bind to the server ack, ie:\n * channel.unsubscribe().receive(\"ok\", () => alert(\"left!\") )\n */\n unsubscribe(timeout = this.timeout) {\n this.state = CHANNEL_STATES.leaving;\n let onClose = () => {\n this.socket.log('channel', `leave ${this.topic}`);\n this.trigger(CHANNEL_EVENTS.close, 'leave', this.joinRef());\n };\n let leavePush = new Push(this, CHANNEL_EVENTS.leave, {}, timeout);\n leavePush.receive('ok', () => onClose()).receive('timeout', () => onClose());\n leavePush.send();\n if (!this.canPush()) {\n leavePush.trigger('ok', {});\n }\n return leavePush;\n }\n /**\n * Overridable message hook\n *\n * Receives all events for specialized message handling before dispatching to the channel callbacks.\n * Must return the payload, modified or unmodified.\n */\n onMessage(event, payload, ref) {\n return payload;\n }\n isMember(topic) {\n return this.topic === topic;\n }\n joinRef() {\n return this.joinPush.ref;\n }\n sendJoin(timeout) {\n this.state = CHANNEL_STATES.joining;\n this.joinPush.resend(timeout);\n }\n rejoin(timeout = this.timeout) {\n if (this.isLeaving()) {\n return;\n }\n this.sendJoin(timeout);\n }\n trigger(event, payload, ref) {\n let { close, error, leave, join } = CHANNEL_EVENTS;\n let events = [close, error, leave, join];\n if (ref && events.indexOf(event) >= 0 && ref !== this.joinRef()) {\n return;\n }\n let handledPayload = this.onMessage(event, payload, ref);\n if (payload && !handledPayload) {\n throw 'channel onMessage callbacks must return the payload, modified or unmodified';\n }\n this.bindings\n .filter((bind) => {\n // Bind all events if the user specifies a wildcard.\n if (bind.event === '*') {\n return event === (payload === null || payload === void 0 ? void 0 : payload.type);\n }\n else {\n return bind.event === event;\n }\n })\n .map((bind) => bind.callback(handledPayload, ref));\n }\n replyEventName(ref) {\n return `chan_reply_${ref}`;\n }\n isClosed() {\n return this.state === CHANNEL_STATES.closed;\n }\n isErrored() {\n return this.state === CHANNEL_STATES.errored;\n }\n isJoined() {\n return this.state === CHANNEL_STATES.joined;\n }\n isJoining() {\n return this.state === CHANNEL_STATES.joining;\n }\n isLeaving() {\n return this.state === CHANNEL_STATES.leaving;\n }\n}\n//# sourceMappingURL=RealtimeSubscription.js.map","var naiveFallback = function () {\n\tif (typeof self === \"object\" && self) return self;\n\tif (typeof window === \"object\" && window) return window;\n\tthrow new Error(\"Unable to resolve global `this`\");\n};\n\nmodule.exports = (function () {\n\tif (this) return this;\n\n\t// Unexpected strict mode (may happen if e.g. bundled into ESM module)\n\n\t// Fallback to standard globalThis if available\n\tif (typeof globalThis === \"object\" && globalThis) return globalThis;\n\n\t// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis\n\t// In all ES5+ engines global object inherits from Object.prototype\n\t// (if you approached one that doesn't please report)\n\ttry {\n\t\tObject.defineProperty(Object.prototype, \"__global__\", {\n\t\t\tget: function () { return this; },\n\t\t\tconfigurable: true\n\t\t});\n\t} catch (error) {\n\t\t// Unfortunate case of updates to Object.prototype being restricted\n\t\t// via preventExtensions, seal or freeze\n\t\treturn naiveFallback();\n\t}\n\ttry {\n\t\t// Safari case (window.__global__ works, but __global__ does not)\n\t\tif (!__global__) return naiveFallback();\n\t\treturn __global__;\n\t} finally {\n\t\tdelete Object.prototype.__global__;\n\t}\n})();\n","module.exports = require('../package.json').version;\n","var _globalThis;\nif (typeof globalThis === 'object') {\n\t_globalThis = globalThis;\n} else {\n\ttry {\n\t\t_globalThis = require('es5-ext/global');\n\t} catch (error) {\n\t} finally {\n\t\tif (!_globalThis && typeof window !== 'undefined') { _globalThis = window; }\n\t\tif (!_globalThis) { throw new Error('Could not determine global this'); }\n\t}\n}\n\nvar NativeWebSocket = _globalThis.WebSocket || _globalThis.MozWebSocket;\nvar websocket_version = require('./version');\n\n\n/**\n * Expose a W3C WebSocket class with just one or two arguments.\n */\nfunction W3CWebSocket(uri, protocols) {\n\tvar native_instance;\n\n\tif (protocols) {\n\t\tnative_instance = new NativeWebSocket(uri, protocols);\n\t}\n\telse {\n\t\tnative_instance = new NativeWebSocket(uri);\n\t}\n\n\t/**\n\t * 'native_instance' is an instance of nativeWebSocket (the browser's WebSocket\n\t * class). Since it is an Object it will be returned as it is when creating an\n\t * instance of W3CWebSocket via 'new W3CWebSocket()'.\n\t *\n\t * ECMAScript 5: http://bclary.com/2004/11/07/#a-13.2.2\n\t */\n\treturn native_instance;\n}\nif (NativeWebSocket) {\n\t['CONNECTING', 'OPEN', 'CLOSING', 'CLOSED'].forEach(function(prop) {\n\t\tObject.defineProperty(W3CWebSocket, prop, {\n\t\t\tget: function() { return NativeWebSocket[prop]; }\n\t\t});\n\t});\n}\n\n/**\n * Module exports.\n */\nmodule.exports = {\n 'w3cwebsocket' : NativeWebSocket ? W3CWebSocket : null,\n 'version' : websocket_version\n};\n","// This file draws heavily from https://github.com/phoenixframework/phoenix/commit/cf098e9cf7a44ee6479d31d911a97d3c7430c6fe\n// License: https://github.com/phoenixframework/phoenix/blob/master/LICENSE.md\nexport default class Serializer {\n constructor() {\n this.HEADER_LENGTH = 1;\n }\n decode(rawPayload, callback) {\n if (rawPayload.constructor === ArrayBuffer) {\n return callback(this._binaryDecode(rawPayload));\n }\n if (typeof rawPayload === 'string') {\n return callback(JSON.parse(rawPayload));\n }\n return callback({});\n }\n _binaryDecode(buffer) {\n const view = new DataView(buffer);\n const decoder = new TextDecoder();\n return this._decodeBroadcast(buffer, view, decoder);\n }\n _decodeBroadcast(buffer, view, decoder) {\n const topicSize = view.getUint8(1);\n const eventSize = view.getUint8(2);\n let offset = this.HEADER_LENGTH + 2;\n const topic = decoder.decode(buffer.slice(offset, offset + topicSize));\n offset = offset + topicSize;\n const event = decoder.decode(buffer.slice(offset, offset + eventSize));\n offset = offset + eventSize;\n const data = JSON.parse(decoder.decode(buffer.slice(offset, buffer.byteLength)));\n return { ref: null, topic: topic, event: event, payload: data };\n }\n}\n//# sourceMappingURL=serializer.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { VSN, CHANNEL_EVENTS, TRANSPORTS, SOCKET_STATES, DEFAULT_TIMEOUT, WS_CLOSE_NORMAL, } from './lib/constants';\nimport Timer from './lib/timer';\nimport RealtimeSubscription from './RealtimeSubscription';\nimport { w3cwebsocket as WebSocket } from 'websocket';\nimport Serializer from './lib/serializer';\nconst noop = () => { };\nexport default class RealtimeClient {\n /**\n * Initializes the Socket\n *\n * @param endPoint The string WebSocket endpoint, ie, \"ws://example.com/socket\", \"wss://example.com\", \"/socket\" (inherited host & protocol)\n * @param options.transport The Websocket Transport, for example WebSocket.\n * @param options.timeout The default timeout in milliseconds to trigger push timeouts.\n * @param options.params The optional params to pass when connecting.\n * @param options.headers The optional headers to pass when connecting.\n * @param options.heartbeatIntervalMs The millisec interval to send a heartbeat message.\n * @param options.logger The optional function for specialized logging, ie: logger: (kind, msg, data) => { console.log(`${kind}: ${msg}`, data) }\n * @param options.encode The function to encode outgoing messages. Defaults to JSON: (payload, callback) => callback(JSON.stringify(payload))\n * @param options.decode The function to decode incoming messages. Defaults to Serializer's decode.\n * @param options.longpollerTimeout The maximum timeout of a long poll AJAX request. Defaults to 20s (double the server long poll timer).\n * @param options.reconnectAfterMs he optional function that returns the millsec reconnect interval. Defaults to stepped backoff off.\n */\n constructor(endPoint, options) {\n this.channels = [];\n this.endPoint = '';\n this.headers = {};\n this.params = {};\n this.timeout = DEFAULT_TIMEOUT;\n this.transport = WebSocket;\n this.heartbeatIntervalMs = 30000;\n this.longpollerTimeout = 20000;\n this.heartbeatTimer = undefined;\n this.pendingHeartbeatRef = null;\n this.ref = 0;\n this.logger = noop;\n this.conn = null;\n this.sendBuffer = [];\n this.serializer = new Serializer();\n this.stateChangeCallbacks = {\n open: [],\n close: [],\n error: [],\n message: [],\n };\n this.endPoint = `${endPoint}/${TRANSPORTS.websocket}`;\n if (options === null || options === void 0 ? void 0 : options.params)\n this.params = options.params;\n if (options === null || options === void 0 ? void 0 : options.headers)\n this.headers = options.headers;\n if (options === null || options === void 0 ? void 0 : options.timeout)\n this.timeout = options.timeout;\n if (options === null || options === void 0 ? void 0 : options.logger)\n this.logger = options.logger;\n if (options === null || options === void 0 ? void 0 : options.transport)\n this.transport = options.transport;\n if (options === null || options === void 0 ? void 0 : options.heartbeatIntervalMs)\n this.heartbeatIntervalMs = options.heartbeatIntervalMs;\n if (options === null || options === void 0 ? void 0 : options.longpollerTimeout)\n this.longpollerTimeout = options.longpollerTimeout;\n this.reconnectAfterMs = (options === null || options === void 0 ? void 0 : options.reconnectAfterMs) ? options.reconnectAfterMs\n : (tries) => {\n return [1000, 2000, 5000, 10000][tries - 1] || 10000;\n };\n this.encode = (options === null || options === void 0 ? void 0 : options.encode) ? options.encode\n : (payload, callback) => {\n return callback(JSON.stringify(payload));\n };\n this.decode = (options === null || options === void 0 ? void 0 : options.decode) ? options.decode\n : this.serializer.decode.bind(this.serializer);\n this.reconnectTimer = new Timer(() => __awaiter(this, void 0, void 0, function* () {\n yield this.disconnect();\n this.connect();\n }), this.reconnectAfterMs);\n }\n /**\n * Connects the socket.\n */\n connect() {\n if (this.conn) {\n return;\n }\n this.conn = new this.transport(this.endPointURL(), [], null, this.headers);\n if (this.conn) {\n // this.conn.timeout = this.longpollerTimeout // TYPE ERROR\n this.conn.binaryType = 'arraybuffer';\n this.conn.onopen = () => this._onConnOpen();\n this.conn.onerror = (error) => this._onConnError(error);\n this.conn.onmessage = (event) => this.onConnMessage(event);\n this.conn.onclose = (event) => this._onConnClose(event);\n }\n }\n /**\n * Disconnects the socket.\n *\n * @param code A numeric status code to send on disconnect.\n * @param reason A custom reason for the disconnect.\n */\n disconnect(code, reason) {\n return new Promise((resolve, _reject) => {\n try {\n if (this.conn) {\n this.conn.onclose = function () { }; // noop\n if (code) {\n this.conn.close(code, reason || '');\n }\n else {\n this.conn.close();\n }\n this.conn = null;\n }\n resolve({ error: null, data: true });\n }\n catch (error) {\n resolve({ error, data: false });\n }\n });\n }\n /**\n * Logs the message. Override `this.logger` for specialized logging.\n */\n log(kind, msg, data) {\n this.logger(kind, msg, data);\n }\n /**\n * Registers a callback for connection state change event.\n * @param callback A function to be called when the event occurs.\n *\n * @example\n * socket.onOpen(() => console.log(\"Socket opened.\"))\n */\n onOpen(callback) {\n this.stateChangeCallbacks.open.push(callback);\n }\n /**\n * Registers a callbacks for connection state change events.\n * @param callback A function to be called when the event occurs.\n *\n * @example\n * socket.onOpen(() => console.log(\"Socket closed.\"))\n */\n onClose(callback) {\n this.stateChangeCallbacks.close.push(callback);\n }\n /**\n * Registers a callback for connection state change events.\n * @param callback A function to be called when the event occurs.\n *\n * @example\n * socket.onOpen((error) => console.log(\"An error occurred\"))\n */\n onError(callback) {\n this.stateChangeCallbacks.error.push(callback);\n }\n /**\n * Calls a function any time a message is received.\n * @param callback A function to be called when the event occurs.\n *\n * @example\n * socket.onMessage((message) => console.log(message))\n */\n onMessage(callback) {\n this.stateChangeCallbacks.message.push(callback);\n }\n /**\n * Returns the current state of the socket.\n */\n connectionState() {\n switch (this.conn && this.conn.readyState) {\n case SOCKET_STATES.connecting:\n return 'connecting';\n case SOCKET_STATES.open:\n return 'open';\n case SOCKET_STATES.closing:\n return 'closing';\n default:\n return 'closed';\n }\n }\n /**\n * Retuns `true` is the connection is open.\n */\n isConnected() {\n return this.connectionState() === 'open';\n }\n /**\n * Removes a subscription from the socket.\n *\n * @param channel An open subscription.\n */\n remove(channel) {\n this.channels = this.channels.filter((c) => c.joinRef() !== channel.joinRef());\n }\n channel(topic, chanParams = {}) {\n let chan = new RealtimeSubscription(topic, chanParams, this);\n this.channels.push(chan);\n return chan;\n }\n push(data) {\n let { topic, event, payload, ref } = data;\n let callback = () => {\n this.encode(data, (result) => {\n var _a;\n (_a = this.conn) === null || _a === void 0 ? void 0 : _a.send(result);\n });\n };\n this.log('push', `${topic} ${event} (${ref})`, payload);\n if (this.isConnected()) {\n callback();\n }\n else {\n this.sendBuffer.push(callback);\n }\n }\n onConnMessage(rawMessage) {\n this.decode(rawMessage.data, (msg) => {\n let { topic, event, payload, ref } = msg;\n if (ref && ref === this.pendingHeartbeatRef) {\n this.pendingHeartbeatRef = null;\n }\n else if (event === (payload === null || payload === void 0 ? void 0 : payload.type)) {\n this._resetHeartbeat();\n }\n this.log('receive', `${payload.status || ''} ${topic} ${event} ${(ref && '(' + ref + ')') || ''}`, payload);\n this.channels\n .filter((channel) => channel.isMember(topic))\n .forEach((channel) => channel.trigger(event, payload, ref));\n this.stateChangeCallbacks.message.forEach((callback) => callback(msg));\n });\n }\n /**\n * Returns the URL of the websocket.\n */\n endPointURL() {\n return this._appendParams(this.endPoint, Object.assign({}, this.params, { vsn: VSN }));\n }\n /**\n * Return the next message ref, accounting for overflows\n */\n makeRef() {\n let newRef = this.ref + 1;\n if (newRef === this.ref) {\n this.ref = 0;\n }\n else {\n this.ref = newRef;\n }\n return this.ref.toString();\n }\n _onConnOpen() {\n this.log('transport', `connected to ${this.endPointURL()}`);\n this._flushSendBuffer();\n this.reconnectTimer.reset();\n this._resetHeartbeat();\n this.stateChangeCallbacks.open.forEach((callback) => callback());\n }\n _onConnClose(event) {\n this.log('transport', 'close', event);\n this._triggerChanError();\n this.heartbeatTimer && clearInterval(this.heartbeatTimer);\n this.reconnectTimer.scheduleTimeout();\n this.stateChangeCallbacks.close.forEach((callback) => callback(event));\n }\n _onConnError(error) {\n this.log('transport', error.message);\n this._triggerChanError();\n this.stateChangeCallbacks.error.forEach((callback) => callback(error));\n }\n _triggerChanError() {\n this.channels.forEach((channel) => channel.trigger(CHANNEL_EVENTS.error));\n }\n _appendParams(url, params) {\n if (Object.keys(params).length === 0) {\n return url;\n }\n const prefix = url.match(/\\?/) ? '&' : '?';\n const query = new URLSearchParams(params);\n return `${url}${prefix}${query}`;\n }\n _flushSendBuffer() {\n if (this.isConnected() && this.sendBuffer.length > 0) {\n this.sendBuffer.forEach((callback) => callback());\n this.sendBuffer = [];\n }\n }\n _resetHeartbeat() {\n this.pendingHeartbeatRef = null;\n this.heartbeatTimer && clearInterval(this.heartbeatTimer);\n this.heartbeatTimer = setInterval(() => this._sendHeartbeat(), this.heartbeatIntervalMs);\n }\n _sendHeartbeat() {\n var _a;\n if (!this.isConnected()) {\n return;\n }\n if (this.pendingHeartbeatRef) {\n this.pendingHeartbeatRef = null;\n this.log('transport', 'heartbeat timeout. Attempting to re-establish connection');\n (_a = this.conn) === null || _a === void 0 ? void 0 : _a.close(WS_CLOSE_NORMAL, 'hearbeat timeout');\n return;\n }\n this.pendingHeartbeatRef = this.makeRef();\n this.push({\n topic: 'phoenix',\n event: 'heartbeat',\n payload: {},\n ref: this.pendingHeartbeatRef,\n });\n }\n}\n//# sourceMappingURL=RealtimeClient.js.map","import { Transformers } from '@supabase/realtime-js';\nexport class SupabaseRealtimeClient {\n constructor(socket, schema, tableName) {\n const topic = tableName === '*' ? `realtime:${schema}` : `realtime:${schema}:${tableName}`;\n this.subscription = socket.channel(topic);\n }\n getPayloadRecords(payload) {\n const records = {\n new: {},\n old: {},\n };\n if (payload.type === 'INSERT' || payload.type === 'UPDATE') {\n records.new = Transformers.convertChangeData(payload.columns, payload.record);\n }\n if (payload.type === 'UPDATE' || payload.type === 'DELETE') {\n records.old = Transformers.convertChangeData(payload.columns, payload.old_record);\n }\n return records;\n }\n /**\n * The event you want to listen to.\n *\n * @param event The event\n * @param callback A callback function that is called whenever the event occurs.\n */\n on(event, callback) {\n this.subscription.on(event, (payload) => {\n let enrichedPayload = {\n schema: payload.schema,\n table: payload.table,\n commit_timestamp: payload.commit_timestamp,\n eventType: payload.type,\n new: {},\n old: {},\n };\n enrichedPayload = Object.assign(Object.assign({}, enrichedPayload), this.getPayloadRecords(payload));\n callback(enrichedPayload);\n });\n return this;\n }\n /**\n * Enables the subscription.\n */\n subscribe(callback = () => { }) {\n this.subscription.onError((e) => callback('SUBSCRIPTION_ERROR', e));\n this.subscription.onClose(() => callback('CLOSED'));\n this.subscription\n .subscribe()\n .receive('ok', () => callback('SUBSCRIBED'))\n .receive('error', (e) => callback('SUBSCRIPTION_ERROR', e))\n .receive('timeout', () => callback('RETRYING_AFTER_TIMEOUT'));\n return this.subscription;\n }\n}\n//# sourceMappingURL=SupabaseRealtimeClient.js.map","import { PostgrestQueryBuilder } from '@supabase/postgrest-js';\nimport { SupabaseRealtimeClient } from './SupabaseRealtimeClient';\nexport class SupabaseQueryBuilder extends PostgrestQueryBuilder {\n constructor(url, { headers = {}, schema, realtime, table, }) {\n super(url, { headers, schema });\n this._subscription = new SupabaseRealtimeClient(realtime, schema, table);\n this._realtime = realtime;\n }\n /**\n * Subscribe to realtime changes in your databse.\n * @param event The database event which you would like to receive updates for, or you can use the special wildcard `*` to listen to all changes.\n * @param callback A callback that will handle the payload that is sent whenever your database changes.\n */\n on(event, callback) {\n if (!this._realtime.isConnected()) {\n this._realtime.connect();\n }\n return this._subscription.on(event, callback);\n }\n}\n//# sourceMappingURL=SupabaseQueryBuilder.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport fetch from 'cross-fetch';\nconst _getErrorMessage = (err) => err.msg || err.message || err.error_description || err.error || JSON.stringify(err);\nconst handleError = (error, reject) => {\n if (typeof error.json !== 'function') {\n return reject(error);\n }\n error.json().then((err) => {\n return reject({\n message: _getErrorMessage(err),\n status: (error === null || error === void 0 ? void 0 : error.status) || 500,\n });\n });\n};\nconst _getRequestParams = (method, options, parameters, body) => {\n const params = { method, headers: (options === null || options === void 0 ? void 0 : options.headers) || {} };\n if (method === 'GET') {\n return params;\n }\n params.headers = Object.assign({ 'Content-Type': 'application/json' }, options === null || options === void 0 ? void 0 : options.headers);\n params.body = JSON.stringify(body);\n return Object.assign(Object.assign({}, params), parameters);\n};\nfunction _handleRequest(method, url, options, parameters, body) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n fetch(url, _getRequestParams(method, options, parameters, body))\n .then((result) => {\n if (!result.ok)\n throw result;\n if (options === null || options === void 0 ? void 0 : options.noResolveJson)\n return resolve(result);\n return result.json();\n })\n .then((data) => resolve(data))\n .catch((error) => handleError(error, reject));\n });\n });\n}\nexport function get(url, options, parameters) {\n return __awaiter(this, void 0, void 0, function* () {\n return _handleRequest('GET', url, options, parameters);\n });\n}\nexport function post(url, body, options, parameters) {\n return __awaiter(this, void 0, void 0, function* () {\n return _handleRequest('POST', url, options, parameters, body);\n });\n}\nexport function put(url, body, options, parameters) {\n return __awaiter(this, void 0, void 0, function* () {\n return _handleRequest('PUT', url, options, parameters, body);\n });\n}\nexport function remove(url, body, options, parameters) {\n return __awaiter(this, void 0, void 0, function* () {\n return _handleRequest('DELETE', url, options, parameters, body);\n });\n}\n//# sourceMappingURL=fetch.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { get, post, put, remove } from './fetch';\nexport class StorageBucketApi {\n constructor(url, headers = {}) {\n this.url = url;\n this.headers = headers;\n }\n /**\n * Retrieves the details of all Storage buckets within an existing product.\n */\n listBuckets() {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield get(`${this.url}/bucket`, { headers: this.headers });\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Retrieves the details of an existing Storage bucket.\n *\n * @param id The unique identifier of the bucket you would like to retrieve.\n */\n getBucket(id) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield get(`${this.url}/bucket/${id}`, { headers: this.headers });\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Creates a new Storage bucket\n *\n * @param id A unique identifier for the bucket you are creating.\n * @returns newly created bucket id\n */\n createBucket(id, options = { public: false }) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield post(`${this.url}/bucket`, { id, name: id, public: options.public }, { headers: this.headers });\n return { data: data.name, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Updates a new Storage bucket\n *\n * @param id A unique identifier for the bucket you are creating.\n */\n updateBucket(id, options) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield put(`${this.url}/bucket/${id}`, { id, name: id, public: options.public }, { headers: this.headers });\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Removes all objects inside a single bucket.\n *\n * @param id The unique identifier of the bucket you would like to empty.\n */\n emptyBucket(id) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield post(`${this.url}/bucket/${id}/empty`, {}, { headers: this.headers });\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Deletes an existing bucket. A bucket can't be deleted with existing objects inside it.\n * You must first `empty()` the bucket.\n *\n * @param id The unique identifier of the bucket you would like to delete.\n */\n deleteBucket(id) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield remove(`${this.url}/bucket/${id}`, {}, { headers: this.headers });\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n}\n//# sourceMappingURL=StorageBucketApi.js.map","export const isBrowser = () => typeof window !== 'undefined';\n//# sourceMappingURL=helpers.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { get, post, remove } from './fetch';\nimport { isBrowser } from './helpers';\nconst DEFAULT_SEARCH_OPTIONS = {\n limit: 100,\n offset: 0,\n sortBy: {\n column: 'name',\n order: 'asc',\n },\n};\nconst DEFAULT_FILE_OPTIONS = {\n cacheControl: '3600',\n upsert: false,\n};\nexport class StorageFileApi {\n constructor(url, headers = {}, bucketId) {\n this.url = url;\n this.headers = headers;\n this.bucketId = bucketId;\n }\n /**\n * Uploads a file to an existing bucket.\n *\n * @param path The relative file path. Should be of the format `folder/subfolder/filename.png`. The bucket must already exist before attempting to upload.\n * @param file The File object to be stored in the bucket.\n * @param fileOptions HTTP headers. For example `cacheControl`\n */\n upload(path, file, fileOptions) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (!isBrowser())\n throw new Error('No browser detected.');\n const formData = new FormData();\n const options = Object.assign(Object.assign({}, DEFAULT_FILE_OPTIONS), fileOptions);\n formData.append('cacheControl', options.cacheControl);\n formData.append('', file, file.name);\n const _path = this._getFinalPath(path);\n const res = yield fetch(`${this.url}/object/${_path}`, {\n method: 'POST',\n body: formData,\n headers: Object.assign(Object.assign({}, this.headers), { 'x-upsert': String(fileOptions === null || fileOptions === void 0 ? void 0 : fileOptions.upsert) }),\n });\n if (res.ok) {\n // const data = await res.json()\n // temporary fix till backend is updated to the latest storage-api version\n return { data: { Key: _path }, error: null };\n }\n else {\n const error = yield res.json();\n return { data: null, error };\n }\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Replaces an existing file at the specified path with a new one.\n *\n * @param path The relative file path. Should be of the format `folder/subfolder`. The bucket already exist before attempting to upload.\n * @param file The file object to be stored in the bucket.\n * @param fileOptions HTTP headers. For example `cacheControl`\n */\n update(path, file, fileOptions) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n if (!isBrowser())\n throw new Error('No browser detected.');\n const formData = new FormData();\n const options = Object.assign(Object.assign({}, DEFAULT_FILE_OPTIONS), fileOptions);\n formData.append('cacheControl', options.cacheControl);\n formData.append('', file, file.name);\n const _path = this._getFinalPath(path);\n const res = yield fetch(`${this.url}/object/${_path}`, {\n method: 'PUT',\n body: formData,\n headers: Object.assign({}, this.headers),\n });\n if (res.ok) {\n // const data = await res.json()\n // temporary fix till backend is updated to the latest storage-api version\n return { data: { Key: _path }, error: null };\n }\n else {\n const error = yield res.json();\n return { data: null, error };\n }\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Moves an existing file, optionally renaming it at the same time.\n *\n * @param fromPath The original file path, including the current file name. For example `folder/image.png`.\n * @param toPath The new file path, including the new file name. For example `folder/image-copy.png`.\n */\n move(fromPath, toPath) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield post(`${this.url}/object/move`, { bucketId: this.bucketId, sourceKey: fromPath, destinationKey: toPath }, { headers: this.headers });\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Create signed url to download file without requiring permissions. This URL can be valid for a set number of seconds.\n *\n * @param path The file path to be downloaded, including the current file name. For example `folder/image.png`.\n * @param expiresIn The number of seconds until the signed URL expires. For example, `60` for a URL which is valid for one minute.\n */\n createSignedUrl(path, expiresIn) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const _path = this._getFinalPath(path);\n let data = yield post(`${this.url}/object/sign/${_path}`, { expiresIn }, { headers: this.headers });\n const signedURL = `${this.url}${data.signedURL}`;\n data = { signedURL };\n return { data, error: null, signedURL };\n }\n catch (error) {\n return { data: null, error, signedURL: null };\n }\n });\n }\n /**\n * Downloads a file.\n *\n * @param path The file path to be downloaded, including the path and file name. For example `folder/image.png`.\n */\n download(path) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const _path = this._getFinalPath(path);\n const res = yield get(`${this.url}/object/${_path}`, {\n headers: this.headers,\n noResolveJson: true,\n });\n const data = yield res.blob();\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Retrieve URLs for assets in public buckets\n *\n * @param path The file path to be downloaded, including the path and file name. For example `folder/image.png`.\n */\n getPublicUrl(path) {\n try {\n const _path = this._getFinalPath(path);\n const publicURL = `${this.url}/object/public/${_path}`;\n const data = { publicURL };\n return { data, error: null, publicURL };\n }\n catch (error) {\n return { data: null, error, publicURL: null };\n }\n }\n /**\n * Deletes files within the same bucket\n *\n * @param paths An array of files to be deletes, including the path and file name. For example [`folder/image.png`].\n */\n remove(paths) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const data = yield remove(`${this.url}/object/${this.bucketId}`, { prefixes: paths }, { headers: this.headers });\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n /**\n * Get file metadata\n * @param id the file id to retrieve metadata\n */\n // async getMetadata(id: string): Promise<{ data: Metadata | null; error: Error | null }> {\n // try {\n // const data = await get(`${this.url}/metadata/${id}`, { headers: this.headers })\n // return { data, error: null }\n // } catch (error) {\n // return { data: null, error }\n // }\n // }\n /**\n * Update file metadata\n * @param id the file id to update metadata\n * @param meta the new file metadata\n */\n // async updateMetadata(\n // id: string,\n // meta: Metadata\n // ): Promise<{ data: Metadata | null; error: Error | null }> {\n // try {\n // const data = await post(`${this.url}/metadata/${id}`, { ...meta }, { headers: this.headers })\n // return { data, error: null }\n // } catch (error) {\n // return { data: null, error }\n // }\n // }\n /**\n * Lists all the files within a bucket.\n * @param path The folder path.\n * @param options Search options, including `limit`, `offset`, and `sortBy`.\n * @param parameters Fetch parameters, currently only supports `signal`, which is an AbortController's signal\n */\n list(path, options, parameters) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const body = Object.assign(Object.assign(Object.assign({}, DEFAULT_SEARCH_OPTIONS), options), { prefix: path || '' });\n const data = yield post(`${this.url}/object/list/${this.bucketId}`, body, { headers: this.headers }, parameters);\n return { data, error: null };\n }\n catch (error) {\n return { data: null, error };\n }\n });\n }\n _getFinalPath(path) {\n return `${this.bucketId}/${path}`;\n }\n}\n//# sourceMappingURL=StorageFileApi.js.map","import { StorageBucketApi, StorageFileApi } from './lib';\nexport class SupabaseStorageClient extends StorageBucketApi {\n constructor(url, headers = {}) {\n super(url, headers);\n }\n /**\n * Perform file operation in a bucket.\n *\n * @param id The bucket id to operate on.\n */\n from(id) {\n return new StorageFileApi(this.url, this.headers, id);\n }\n}\n//# sourceMappingURL=SupabaseStorageClient.js.map","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport { DEFAULT_HEADERS } from './lib/constants';\nimport { SupabaseAuthClient } from './lib/SupabaseAuthClient';\nimport { SupabaseQueryBuilder } from './lib/SupabaseQueryBuilder';\nimport { SupabaseStorageClient } from '@supabase/storage-js';\nimport { PostgrestClient } from '@supabase/postgrest-js';\nimport { RealtimeClient } from '@supabase/realtime-js';\nconst DEFAULT_OPTIONS = {\n schema: 'public',\n autoRefreshToken: true,\n persistSession: true,\n detectSessionInUrl: true,\n localStorage: globalThis.localStorage,\n headers: DEFAULT_HEADERS,\n};\n/**\n * Supabase Client.\n *\n * An isomorphic Javascript client for interacting with Postgres.\n */\nexport default class SupabaseClient {\n /**\n * Create a new client for use in the browser.\n * @param supabaseUrl The unique Supabase URL which is supplied when you create a new project in your project dashboard.\n * @param supabaseKey The unique Supabase Key which is supplied when you create a new project in your project dashboard.\n * @param options.schema You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase.\n * @param options.autoRefreshToken Set to \"true\" if you want to automatically refresh the token before expiring.\n * @param options.persistSession Set to \"true\" if you want to automatically save the user session into local storage.\n * @param options.detectSessionInUrl Set to \"true\" if you want to automatically detects OAuth grants in the URL and signs in the user.\n * @param options.headers Any additional headers to send with each network request.\n */\n constructor(supabaseUrl, supabaseKey, options) {\n this.supabaseUrl = supabaseUrl;\n this.supabaseKey = supabaseKey;\n if (!supabaseUrl)\n throw new Error('supabaseUrl is required.');\n if (!supabaseKey)\n throw new Error('supabaseKey is required.');\n const settings = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options);\n this.restUrl = `${supabaseUrl}/rest/v1`;\n this.realtimeUrl = `${supabaseUrl}/realtime/v1`.replace('http', 'ws');\n this.authUrl = `${supabaseUrl}/auth/v1`;\n this.storageUrl = `${supabaseUrl}/storage/v1`;\n this.schema = settings.schema;\n this.auth = this._initSupabaseAuthClient(settings);\n this.realtime = this._initRealtimeClient();\n // In the future we might allow the user to pass in a logger to receive these events.\n // this.realtime.onOpen(() => console.log('OPEN'))\n // this.realtime.onClose(() => console.log('CLOSED'))\n // this.realtime.onError((e: Error) => console.log('Socket error', e))\n }\n /**\n * Supabase Storage allows you to manage user-generated content, such as photos or videos.\n */\n get storage() {\n return new SupabaseStorageClient(this.storageUrl, this._getAuthHeaders());\n }\n /**\n * Perform a table operation.\n *\n * @param table The table name to operate on.\n */\n from(table) {\n const url = `${this.restUrl}/${table}`;\n return new SupabaseQueryBuilder(url, {\n headers: this._getAuthHeaders(),\n schema: this.schema,\n realtime: this.realtime,\n table,\n });\n }\n /**\n * Perform a stored procedure call.\n *\n * @param fn The function name to call.\n * @param params The parameters to pass to the function call.\n */\n rpc(fn, params) {\n const rest = this._initPostgRESTClient();\n return rest.rpc(fn, params);\n }\n /**\n * Removes an active subscription and returns the number of open connections.\n *\n * @param subscription The subscription you want to remove.\n */\n removeSubscription(subscription) {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n try {\n yield this._closeSubscription(subscription);\n const openSubscriptions = this.getSubscriptions().length;\n if (!openSubscriptions) {\n const { error } = yield this.realtime.disconnect();\n if (error)\n return resolve({ error });\n }\n return resolve({ error: null, data: { openSubscriptions } });\n }\n catch (error) {\n return resolve({ error });\n }\n }));\n }\n _closeSubscription(subscription) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!subscription.isClosed()) {\n yield this._closeChannel(subscription);\n }\n });\n }\n /**\n * Returns an array of all your subscriptions.\n */\n getSubscriptions() {\n return this.realtime.channels;\n }\n _initSupabaseAuthClient({ autoRefreshToken, persistSession, detectSessionInUrl, localStorage, }) {\n return new SupabaseAuthClient({\n url: this.authUrl,\n headers: {\n Authorization: `Bearer ${this.supabaseKey}`,\n apikey: `${this.supabaseKey}`,\n },\n autoRefreshToken,\n persistSession,\n detectSessionInUrl,\n localStorage,\n });\n }\n _initRealtimeClient() {\n return new RealtimeClient(this.realtimeUrl, {\n params: { apikey: this.supabaseKey },\n });\n }\n _initPostgRESTClient() {\n return new PostgrestClient(this.restUrl, {\n headers: this._getAuthHeaders(),\n schema: this.schema,\n });\n }\n _getAuthHeaders() {\n var _a, _b;\n const headers = {};\n const authBearer = (_b = (_a = this.auth.session()) === null || _a === void 0 ? void 0 : _a.access_token) !== null && _b !== void 0 ? _b : this.supabaseKey;\n headers['apikey'] = this.supabaseKey;\n headers['Authorization'] = `Bearer ${authBearer}`;\n return headers;\n }\n _closeChannel(subscription) {\n return new Promise((resolve, reject) => {\n subscription\n .unsubscribe()\n .receive('ok', () => {\n this.realtime.remove(subscription);\n return resolve(true);\n })\n .receive('error', (e) => reject(e));\n });\n }\n}\n//# sourceMappingURL=SupabaseClient.js.map","import SupabaseClient from './SupabaseClient';\nexport * from '@supabase/gotrue-js';\nexport * from '@supabase/realtime-js';\n/**\n * Creates a new Supabase Client.\n */\nconst createClient = (supabaseUrl, supabaseKey, options) => {\n return new SupabaseClient(supabaseUrl, supabaseKey, options);\n};\nexport { createClient, SupabaseClient, };\n//# sourceMappingURL=index.js.map","import { createClient } from '@supabase/supabase-js'\r\n\r\nconst supabaseUrl = __api.env.SVELTE_APP_SUPABASE_URL\r\nconst supabaseAnonKey = __api.env.SVELTE_APP_SUPABASE_ANON_KEY\r\n\r\nexport const supabase = createClient(supabaseUrl, supabaseAnonKey)","<script>\n import Map from \"./Map.svelte\";\n import { supabase } from \"./supabaseClient\";\n\n\tlet geometries=[];\n\tlet newPointName;\n\tlet newPointLon;\n\tlet newPointLat;\n\tlet loading = false;\n\n\t$: areValuesValid = !!newPointName && !isNaN(newPointLat) && !isNaN(newPointLon);\n\n\tasync function getData() {\n\tconst { data, error } = await supabase\n\t\t.from('geometries')\n\t\t.select();\n\tif(data){\n\t\tgeometries = data;\n\t}\n\t}\n\n \n\n\tconst handleSubmit = async () => {\n\n\t\tif(areValuesValid){\n\t\t\ttry {\n\t\t\tloading = true\n\t\t\t\n\t\t\tconst { data: dataInsert, error } = await supabase.rpc('addgeomerty', {location_name: newPointName, lon: newPointLon, lat:newPointLat})\n\t\t\tgeometries = [...geometries, ...dataInsert]\n\t\t\t\n\t\t\tif (error) throw error\n\n\n\t\t} catch (error) {\n\n\t\t\tconsole.log(error, error.error_description || error.message)\n\t\t} finally {\n\t\t\tloading = false\n\t\t}\n\t\t}\t\n\t\n\n\t}\n</script>\n\n<div class=\"container\" style=\"padding: 50px 0 100px 0;\" use:getData>\n\n\t{#each geometries as { id, location_name, geom }, i}\n\t\t<div>{id}-{location_name}-{geom && geom.coordinates}</div>\n\t{/each}\n\n\t<Map points={geometries}/>\n\n\t<form class=\"row flex flex-center\" on:submit|preventDefault={handleSubmit}>\n\t\t<div class=\"col-6 form-widget\">\n\t\t <p class=\"description\">Add a new point to the map</p>\n\t\t <div>\n\t\t\t<input\n\t\t\t class=\"inputField\"\n\t\t\t type=\"name\"\n\t\t\t placeholder=\"Name\"\n\t\t\t bind:value={newPointName}\n\t\t\t/>\n\t\t\t<input\n\t\t\t class=\"inputField\"\n\t\t\t type=\"number\"\n\t\t\t step=\"0.01\"\n\t\t\t placeholder=\"Longitude\"\n\t\t\t bind:value={newPointLon}\n\t\t\t/>\n\t\t\t<input\n\t\t\t class=\"inputField\"\n\t\t\t type=\"number\"\n\t\t\t step=\"0.01\"\n\t\t\t placeholder=\"Latitude\"\n\t\t\t bind:value={newPointLat}\n\t\t\t/>\n\n\t\t </div>\n\t\t <div>\n\t\t\t<input type=\"submit\" class='button block' value={loading ? \"Loading\" : areValuesValid ? \"Upload point\" : \"Enter valid values\"} disabled={loading || !areValuesValid} />\n\t\t </div>\n\t\t</div>\n\t </form>\n\n</div>","import App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\n\tprops: {\n\t\tname: 'world'\n\t}\n});\n\nexport default app;"],"names":["noop","x00","y00","x0","y0","stream","pathArea","pathMeasure","pathBounds","pathCentroid","identity","resample","feature","DEFAULT_HEADERS","this","__awaiter","_getErrorMessage","handleError","_getRequestParams","_handleRequest","fetch","get","post","put","remove","isBrowser","DEFAULT_OPTIONS","require$$0","websocket_version","WebSocket","Transformers.convertChangeData"],"mappings":";;;;;IAAA,SAASA,MAAI,GAAG,GAAG;IAWnB,SAAS,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACzD,IAAI,OAAO,CAAC,aAAa,GAAG;IAC5B,QAAQ,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACzC,KAAK,CAAC;IACN,CAAC;IACD,SAAS,GAAG,CAAC,EAAE,EAAE;IACjB,IAAI,OAAO,EAAE,EAAE,CAAC;IAChB,CAAC;IACD,SAAS,YAAY,GAAG;IACxB,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IACD,SAAS,OAAO,CAAC,GAAG,EAAE;IACtB,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IACD,SAAS,WAAW,CAAC,KAAK,EAAE;IAC5B,IAAI,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;IACvC,CAAC;IACD,SAAS,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE;IAC9B,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,KAAK,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC;IAClG,CAAC;IAID,SAAS,QAAQ,CAAC,GAAG,EAAE;IACvB,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACR3E,UAAC,GAAG,GAAG,IAAI,GAAG,CAAC;IACpB,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI;IACtB,CAAC,KAAK,EAAE;IACR,EAAE,IAAI,EAAE,OAAO;IACf,EAAE;IACF,CAAC;;;;;;;;"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body { | |
position: relative; | |
width: 100%; | |
height: 100%; | |
} | |
body { | |
color: #333; | |
margin: 0; | |
padding: 8px; | |
box-sizing: border-box; | |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | |
} | |
a { | |
color: rgb(0,100,200); | |
text-decoration: none; | |
} | |
a:hover { | |
text-decoration: underline; | |
} | |
a:visited { | |
color: rgb(0,80,160); | |
} | |
label { | |
display: block; | |
} | |
input, button, select, textarea { | |
font-family: inherit; | |
font-size: inherit; | |
-webkit-padding: 0.4em 0; | |
padding: 0.4em; | |
margin: 0 0 0.5em 0; | |
box-sizing: border-box; | |
border: 1px solid #ccc; | |
border-radius: 2px; | |
} | |
input:disabled { | |
color: #ccc; | |
} | |
button { | |
color: #333; | |
background-color: #f4f4f4; | |
outline: none; | |
} | |
button:disabled { | |
color: #999; | |
} | |
button:not(:disabled):active { | |
background-color: #ddd; | |
} | |
button:focus { | |
border-color: #666; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset='utf-8'> | |
<meta name='viewport' content='width=device-width,initial-scale=1'> | |
<title>Svelte app</title> | |
<link rel='icon' type='image/png' href='/favicon.png'> | |
<link rel='stylesheet' href='./global.css'> | |
<link rel='stylesheet' href='./bundle.css'> | |
<script defer src='./bundle.js'></script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment