{"version":3,"sources":["webpack:///./node_modules/topojson/node_modules/topojson-client/src/identity.js","webpack:///./node_modules/topojson/node_modules/topojson-client/src/transform.js","webpack:///./node_modules/topojson/node_modules/topojson-client/src/reverse.js","webpack:///./node_modules/topojson/node_modules/topojson-client/src/feature.js","webpack:///./node_modules/topojson/node_modules/topojson-client/src/stitch.js","webpack:///./node_modules/topojson/node_modules/topojson-client/src/mesh.js","webpack:///./node_modules/topojson/node_modules/topojson-client/src/bisect.js","webpack:///./node_modules/topojson/node_modules/topojson-server/src/hash/point-hash.js","webpack:///./node_modules/topojson/node_modules/topojson-simplify/src/spherical.js","webpack:///./node_modules/topojson/index.js"],"names":["identity","x","src_transform","transform","x0","y0","kx","scale","ky","dx","translate","dy","input","i","j","n","length","output","Array","reverse","array","t","feature","topology","o","type","features","geometries","map","feature_feature","id","bbox","properties","geometry","feature_object","transformPoint","arcs","arc","points","pop","a","k","push","point","p","line","ring","polygon","coordinates","stitch","stitchedArcs","fragmentByStart","fragmentByEnd","fragments","emptyIndex","ends","p1","p0","forEach","dp","flush","f","start","end","g","e","fg","concat","unshift","gf","mesh","meshArcs","apply","this","arguments","object","filter","extractArcs","geom","geomsByArc","extract0","extract1","extract2","extract3","geoms","buffer","ArrayBuffer","Float64Array","Uint32Array","Math","PI","abs","atan2","cos","sin","__webpack_require__","d","__webpack_exports__"],"mappings":"4GAAe,IAAAA,EAAA,SAAAC,GACf,OAAAA,GCCeC,EAAA,SAAAC,GACf,SAAAA,EAAA,OAAgCH,EAChC,IAAAI,EACAC,EACAC,EAAAH,EAAAI,MAAA,GACAC,EAAAL,EAAAI,MAAA,GACAE,EAAAN,EAAAO,UAAA,GACAC,EAAAR,EAAAO,UAAA,GACA,gBAAAE,EAAAC,GACAA,IAAAT,EAAAC,EAAA,GACA,IAAAS,EAAA,EAAAC,EAAAH,EAAAI,OAAAC,EAAA,IAAAC,MAAAH,GACAE,EAAA,IAAAb,GAAAQ,EAAA,IAAAN,EAAAG,EACAQ,EAAA,I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,IAAAC,YAAA,IACA,IAAAC,aAAAF,GACA,IAAAG,YAAAH,GCJAI,KAAAC,GAIAD,KAAAE,IACAF,KAAAG,MACAH,KAAAI,IACAJ,KAAAK,ICPAC,EAAAC,EAAAC,EAAA,sBAAA3E,IAAAyE,EAAAC,EAAAC,EAAA,sBAAA3B","file":"js/topojson.04684112.js","sourcesContent":["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","export default function(topology, arcs) {\n var stitchedArcs = {},\n fragmentByStart = {},\n fragmentByEnd = {},\n fragments = [],\n emptyIndex = -1;\n\n // Stitch empty arcs first, since they may be subsumed by other arcs.\n arcs.forEach(function(i, j) {\n var arc = topology.arcs[i < 0 ? ~i : i], t;\n if (arc.length < 3 && !arc[1][0] && !arc[1][1]) {\n t = arcs[++emptyIndex], arcs[emptyIndex] = i, arcs[j] = t;\n }\n });\n\n arcs.forEach(function(i) {\n var e = ends(i),\n start = e[0],\n end = e[1],\n f, g;\n\n if (f = fragmentByEnd[start]) {\n delete fragmentByEnd[f.end];\n f.push(i);\n f.end = end;\n if (g = fragmentByStart[end]) {\n delete fragmentByStart[g.start];\n var fg = g === f ? f : f.concat(g);\n fragmentByStart[fg.start = f.start] = fragmentByEnd[fg.end = g.end] = fg;\n } else {\n fragmentByStart[f.start] = fragmentByEnd[f.end] = f;\n }\n } else if (f = fragmentByStart[end]) {\n delete fragmentByStart[f.start];\n f.unshift(i);\n f.start = start;\n if (g = fragmentByEnd[start]) {\n delete fragmentByEnd[g.end];\n var gf = g === f ? f : g.concat(f);\n fragmentByStart[gf.start = g.start] = fragmentByEnd[gf.end = f.end] = gf;\n } else {\n fragmentByStart[f.start] = fragmentByEnd[f.end] = f;\n }\n } else {\n f = [i];\n fragmentByStart[f.start = start] = fragmentByEnd[f.end = end] = f;\n }\n });\n\n function ends(i) {\n var arc = topology.arcs[i < 0 ? ~i : i], p0 = arc[0], p1;\n if (topology.transform) p1 = [0, 0], arc.forEach(function(dp) { p1[0] += dp[0], p1[1] += dp[1]; });\n else p1 = arc[arc.length - 1];\n return i < 0 ? [p1, p0] : [p0, p1];\n }\n\n function flush(fragmentByEnd, fragmentByStart) {\n for (var k in fragmentByEnd) {\n var f = fragmentByEnd[k];\n delete fragmentByStart[f.start];\n delete f.start;\n delete f.end;\n f.forEach(function(i) { stitchedArcs[i < 0 ? ~i : i] = 1; });\n fragments.push(f);\n }\n }\n\n flush(fragmentByEnd, fragmentByStart);\n flush(fragmentByStart, fragmentByEnd);\n arcs.forEach(function(i) { if (!stitchedArcs[i < 0 ? ~i : i]) fragments.push([i]); });\n\n return fragments;\n}\n","import {object} from \"./feature\";\nimport stitch from \"./stitch\";\n\nexport default function(topology) {\n return object(topology, meshArcs.apply(this, arguments));\n}\n\nexport function meshArcs(topology, object, filter) {\n var arcs, i, n;\n if (arguments.length > 1) arcs = extractArcs(topology, object, filter);\n else for (i = 0, arcs = new Array(n = topology.arcs.length); i < n; ++i) arcs[i] = i;\n return {type: \"MultiLineString\", arcs: stitch(topology, arcs)};\n}\n\nfunction extractArcs(topology, object, filter) {\n var arcs = [],\n geomsByArc = [],\n geom;\n\n function extract0(i) {\n var j = i < 0 ? ~i : i;\n (geomsByArc[j] || (geomsByArc[j] = [])).push({i: i, g: geom});\n }\n\n function extract1(arcs) {\n arcs.forEach(extract0);\n }\n\n function extract2(arcs) {\n arcs.forEach(extract1);\n }\n\n function extract3(arcs) {\n arcs.forEach(extract2);\n }\n\n function geometry(o) {\n switch (geom = o, o.type) {\n case \"GeometryCollection\": o.geometries.forEach(geometry); break;\n case \"LineString\": extract1(o.arcs); break;\n case \"MultiLineString\": case \"Polygon\": extract2(o.arcs); break;\n case \"MultiPolygon\": extract3(o.arcs); break;\n }\n }\n\n geometry(object);\n\n geomsByArc.forEach(filter == null\n ? function(geoms) { arcs.push(geoms[0].i); }\n : function(geoms) { if (filter(geoms[0].g, geoms[geoms.length - 1].g)) arcs.push(geoms[0].i); });\n\n return arcs;\n}\n","export default function(a, x) {\n var lo = 0, hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (a[mid] < x) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n}\n","// TODO if quantized, use simpler Int32 hashing?\n\nvar buffer = new ArrayBuffer(16),\n floats = new Float64Array(buffer),\n uints = new Uint32Array(buffer);\n\nexport default function(point) {\n floats[0] = point[0];\n floats[1] = point[1];\n var hash = uints[0] ^ uints[1];\n hash = hash << 5 ^ hash >> 7 ^ uints[2] ^ uints[3];\n return hash & 0x7fffffff;\n}\n","var pi = Math.PI,\n tau = 2 * pi,\n quarterPi = pi / 4,\n radians = pi / 180,\n abs = Math.abs,\n atan2 = Math.atan2,\n cos = Math.cos,\n sin = Math.sin;\n\nfunction halfArea(ring, closed) {\n var i = 0,\n n = ring.length,\n sum = 0,\n point = ring[closed ? i++ : n - 1],\n lambda0, lambda1 = point[0] * radians,\n phi1 = (point[1] * radians) / 2 + quarterPi,\n cosPhi0, cosPhi1 = cos(phi1),\n sinPhi0, sinPhi1 = sin(phi1);\n\n for (; i < n; ++i) {\n point = ring[i];\n lambda0 = lambda1, lambda1 = point[0] * radians;\n phi1 = (point[1] * radians) / 2 + quarterPi;\n cosPhi0 = cosPhi1, cosPhi1 = cos(phi1);\n sinPhi0 = sinPhi1, sinPhi1 = sin(phi1);\n\n // Spherical excess E for a spherical triangle with vertices: south pole,\n // previous point, current point. Uses a formula derived from Cagnoli’s\n // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n // See https://github.com/d3/d3-geo/blob/master/README.md#geoArea\n var dLambda = lambda1 - lambda0,\n sdLambda = dLambda >= 0 ? 1 : -1,\n adLambda = sdLambda * dLambda,\n k = sinPhi0 * sinPhi1,\n u = cosPhi0 * cosPhi1 + k * cos(adLambda),\n v = k * sdLambda * sin(adLambda);\n sum += atan2(v, u);\n }\n\n return sum;\n}\n\nexport function sphericalRingArea(ring, interior) {\n var sum = halfArea(ring, true);\n if (interior) sum *= -1;\n return (sum < 0 ? tau + sum : sum) * 2;\n}\n\nexport function sphericalTriangleArea(t) {\n return abs(halfArea(t, false)) * 2;\n}\n","export * from \"topojson-client\";\nexport * from \"topojson-server\";\nexport * from \"topojson-simplify\";\n"],"sourceRoot":""}