UNPKG

@readme/markdown

Version:

ReadMe's React-based Markdown parser

1,559 lines (1,209 loc) 1.2 MB
exports.id = 486; exports.ids = [486]; exports.modules = { /***/ 9119: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.BLANK_URL = exports.relativeFirstCharacters = exports.whitespaceEscapeCharsRegex = exports.urlSchemeRegex = exports.ctrlCharactersRegex = exports.htmlCtrlEntityRegex = exports.htmlEntitiesRegex = exports.invalidProtocolRegex = void 0; exports.invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im; exports.htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g; exports.htmlCtrlEntityRegex = /&(newline|tab);/gi; exports.ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim; exports.urlSchemeRegex = /^.+(:|&colon;)/gim; exports.whitespaceEscapeCharsRegex = /(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g; exports.relativeFirstCharacters = [".", "/"]; exports.BLANK_URL = "about:blank"; /***/ }), /***/ 6750: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); exports.J = void 0; var constants_1 = __webpack_require__(9119); function isRelativeUrlWithoutProtocol(url) { return constants_1.relativeFirstCharacters.indexOf(url[0]) > -1; } function decodeHtmlCharacters(str) { var removedNullByte = str.replace(constants_1.ctrlCharactersRegex, ""); return removedNullByte.replace(constants_1.htmlEntitiesRegex, function (match, dec) { return String.fromCharCode(dec); }); } function isValidUrl(url) { return URL.canParse(url); } function decodeURI(uri) { try { return decodeURIComponent(uri); } catch (e) { // Ignoring error // It is possible that the URI contains a `%` not associated // with URI/URL-encoding. return uri; } } function sanitizeUrl(url) { if (!url) { return constants_1.BLANK_URL; } var charsToDecode; var decodedUrl = decodeURI(url.trim()); do { decodedUrl = decodeHtmlCharacters(decodedUrl) .replace(constants_1.htmlCtrlEntityRegex, "") .replace(constants_1.ctrlCharactersRegex, "") .replace(constants_1.whitespaceEscapeCharsRegex, "") .trim(); decodedUrl = decodeURI(decodedUrl); charsToDecode = decodedUrl.match(constants_1.ctrlCharactersRegex) || decodedUrl.match(constants_1.htmlEntitiesRegex) || decodedUrl.match(constants_1.htmlCtrlEntityRegex) || decodedUrl.match(constants_1.whitespaceEscapeCharsRegex); } while (charsToDecode && charsToDecode.length > 0); var sanitizedUrl = decodedUrl; if (!sanitizedUrl) { return constants_1.BLANK_URL; } if (isRelativeUrlWithoutProtocol(sanitizedUrl)) { return sanitizedUrl; } // Remove any leading whitespace before checking the URL scheme var trimmedUrl = sanitizedUrl.trimStart(); var urlSchemeParseResults = trimmedUrl.match(constants_1.urlSchemeRegex); if (!urlSchemeParseResults) { return sanitizedUrl; } var urlScheme = urlSchemeParseResults[0].toLowerCase().trim(); if (constants_1.invalidProtocolRegex.test(urlScheme)) { return constants_1.BLANK_URL; } var backSanitized = trimmedUrl.replace(/\\/g, "/"); // Handle special cases for mailto: and custom deep-link protocols if (urlScheme === "mailto:" || urlScheme.includes("://")) { return backSanitized; } // For http and https URLs, perform additional validation if (urlScheme === "http:" || urlScheme === "https:") { if (!isValidUrl(backSanitized)) { return constants_1.BLANK_URL; } var url_1 = new URL(backSanitized); url_1.protocol = url_1.protocol.toLowerCase(); url_1.hostname = url_1.hostname.toLowerCase(); return url_1.toString(); } return backSanitized; } exports.J = sanitizeUrl; /***/ }), /***/ 796: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { JLW: () => (/* reexport */ arc), l78: () => (/* reexport */ axisBottom), tlR: () => (/* reexport */ axisTop), qrM: () => (/* reexport */ curve_basis), Yu4: () => (/* reexport */ curve_basisClosed), IA3: () => (/* reexport */ basisOpen), Wi0: () => (/* reexport */ bumpX), PGM: () => (/* reexport */ bumpY), OEq: () => (/* reexport */ bundle), y8u: () => (/* reexport */ cardinal), olC: () => (/* reexport */ cardinalClosed), IrU: () => (/* reexport */ cardinalOpen), oDi: () => (/* reexport */ catmullRom), Q7f: () => (/* reexport */ catmullRomClosed), cVp: () => (/* reexport */ catmullRomOpen), lUB: () => (/* reexport */ curve_linear), Lx9: () => (/* reexport */ linearClosed), nVG: () => (/* reexport */ monotoneX), uxU: () => (/* reexport */ monotoneY), Xf2: () => (/* reexport */ natural), GZz: () => (/* reexport */ step), UPb: () => (/* reexport */ stepAfter), dyv: () => (/* reexport */ stepBefore), GPZ: () => (/* reexport */ format), Sk5: () => (/* reexport */ hierarchy), bEH: () => (/* reexport */ src_hcl), n8j: () => (/* reexport */ line), T9B: () => (/* reexport */ max), jkA: () => (/* reexport */ min), rLf: () => (/* reexport */ pie), WH: () => (/* reexport */ band), m4Y: () => (/* reexport */ linear_linear), UMr: () => (/* reexport */ ordinal), w7C: () => (/* reexport */ time), zt: () => (/* reexport */ Tableau10), Ltv: () => (/* reexport */ src_select), UAC: () => (/* reexport */ timeDay), DCK: () => (/* reexport */ timeFormat), TUC: () => (/* reexport */ timeFriday), Agd: () => (/* reexport */ timeHour), t6C: () => (/* reexport */ millisecond), wXd: () => (/* reexport */ timeMinute), ABi: () => (/* reexport */ timeMonday), Ui6: () => (/* reexport */ timeMonth), rGn: () => (/* reexport */ timeSaturday), ucG: () => (/* reexport */ second), YPH: () => (/* reexport */ timeSunday), Mol: () => (/* reexport */ timeThursday), PGu: () => (/* reexport */ timeTuesday), GuW: () => (/* reexport */ timeWednesday), hkb: () => (/* reexport */ treemap) }); // UNUSED EXPORTS: Adder, Delaunay, FormatSpecifier, InternMap, InternSet, Node, Path, Voronoi, ZoomTransform, active, area, areaRadial, ascending, autoType, axisLeft, axisRight, bin, bisect, bisectCenter, bisectLeft, bisectRight, bisector, blob, blur, blur2, blurImage, brush, brushSelection, brushX, brushY, buffer, chord, chordDirected, chordTranspose, cluster, color, contourDensity, contours, count, create, creator, cross, csv, csvFormat, csvFormatBody, csvFormatRow, csvFormatRows, csvFormatValue, csvParse, csvParseRows, cubehelix, cumsum, descending, deviation, difference, disjoint, dispatch, drag, dragDisable, dragEnable, dsv, dsvFormat, easeBack, easeBackIn, easeBackInOut, easeBackOut, easeBounce, easeBounceIn, easeBounceInOut, easeBounceOut, easeCircle, easeCircleIn, easeCircleInOut, easeCircleOut, easeCubic, easeCubicIn, easeCubicInOut, easeCubicOut, easeElastic, easeElasticIn, easeElasticInOut, easeElasticOut, easeExp, easeExpIn, easeExpInOut, easeExpOut, easeLinear, easePoly, easePolyIn, easePolyInOut, easePolyOut, easeQuad, easeQuadIn, easeQuadInOut, easeQuadOut, easeSin, easeSinIn, easeSinInOut, easeSinOut, every, extent, fcumsum, filter, flatGroup, flatRollup, forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY, formatDefaultLocale, formatLocale, formatPrefix, formatSpecifier, fsum, geoAlbers, geoAlbersUsa, geoArea, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoContains, geoDistance, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoGraticule, geoGraticule10, geoIdentity, geoInterpolate, geoLength, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoPath, geoProjection, geoProjectionMutator, geoRotation, geoStereographic, geoStereographicRaw, geoStream, geoTransform, geoTransverseMercator, geoTransverseMercatorRaw, gray, greatest, greatestIndex, group, groupSort, groups, hcl, histogram, hsl, html, image, index, indexes, interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateBlues, interpolateBrBG, interpolateBuGn, interpolateBuPu, interpolateCividis, interpolateCool, interpolateCubehelix, interpolateCubehelixDefault, interpolateCubehelixLong, interpolateDate, interpolateDiscrete, interpolateGnBu, interpolateGreens, interpolateGreys, interpolateHclLong, interpolateHsl, interpolateHslLong, interpolateHue, interpolateInferno, interpolateLab, interpolateMagma, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateOrRd, interpolateOranges, interpolatePRGn, interpolatePiYG, interpolatePlasma, interpolatePuBu, interpolatePuBuGn, interpolatePuOr, interpolatePuRd, interpolatePurples, interpolateRainbow, interpolateRdBu, interpolateRdGy, interpolateRdPu, interpolateRdYlBu, interpolateRdYlGn, interpolateReds, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateRound, interpolateSinebow, interpolateSpectral, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateTurbo, interpolateViridis, interpolateWarm, interpolateYlGn, interpolateYlGnBu, interpolateYlOrBr, interpolateYlOrRd, interpolateZoom, interrupt, intersection, interval, isoFormat, isoParse, json, lab, lch, least, leastIndex, lineRadial, link, linkHorizontal, linkRadial, linkVertical, local, map, matcher, maxIndex, mean, median, medianIndex, merge, minIndex, mode, namespace, namespaces, nice, now, pack, packEnclose, packSiblings, pairs, partition, path, pathRound, permute, piecewise, pointRadial, pointer, pointers, polygonArea, polygonCentroid, polygonContains, polygonHull, polygonLength, precisionFixed, precisionPrefix, precisionRound, quadtree, quantile, quantileIndex, quantileSorted, quantize, quickselect, radialArea, radialLine, randomBates, randomBernoulli, randomBeta, randomBinomial, randomCauchy, randomExponential, randomGamma, randomGeometric, randomInt, randomIrwinHall, randomLcg, randomLogNormal, randomLogistic, randomNormal, randomPareto, randomPoisson, randomUniform, randomWeibull, range, rank, reduce, reverse, rgb, ribbon, ribbonArrow, rollup, rollups, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, scaleIdentity, scaleImplicit, scaleLog, scalePoint, scalePow, scaleQuantile, scaleQuantize, scaleRadial, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialQuantile, scaleSequentialSqrt, scaleSequentialSymlog, scaleSqrt, scaleSymlog, scaleThreshold, scaleUtc, scan, schemeAccent, schemeBlues, schemeBrBG, schemeBuGn, schemeBuPu, schemeCategory10, schemeDark2, schemeGnBu, schemeGreens, schemeGreys, schemeObservable10, schemeOrRd, schemeOranges, schemePRGn, schemePaired, schemePastel1, schemePastel2, schemePiYG, schemePuBu, schemePuBuGn, schemePuOr, schemePuRd, schemePurples, schemeRdBu, schemeRdGy, schemeRdPu, schemeRdYlBu, schemeRdYlGn, schemeReds, schemeSet1, schemeSet2, schemeSet3, schemeSpectral, schemeYlGn, schemeYlGnBu, schemeYlOrBr, schemeYlOrRd, selectAll, selection, selector, selectorAll, shuffle, shuffler, some, sort, stack, stackOffsetDiverging, stackOffsetExpand, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, stratify, style, subset, sum, superset, svg, symbol, symbolAsterisk, symbolCircle, symbolCross, symbolDiamond, symbolDiamond2, symbolPlus, symbolSquare, symbolSquare2, symbolStar, symbolTimes, symbolTriangle, symbolTriangle2, symbolWye, symbolX, symbols, symbolsFill, symbolsStroke, text, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, tickFormat, tickIncrement, tickStep, ticks, timeDays, timeFormatDefaultLocale, timeFormatLocale, timeFridays, timeHours, timeInterval, timeMilliseconds, timeMinutes, timeMondays, timeMonths, timeParse, timeSaturdays, timeSeconds, timeSundays, timeThursdays, timeTickInterval, timeTicks, timeTuesdays, timeWednesdays, timeWeek, timeWeeks, timeYear, timeYears, timeout, timer, timerFlush, transition, transpose, tree, treemapBinary, treemapDice, treemapResquarify, treemapSlice, treemapSliceDice, treemapSquarify, tsv, tsvFormat, tsvFormatBody, tsvFormatRow, tsvFormatRows, tsvFormatValue, tsvParse, tsvParseRows, union, unixDay, unixDays, utcDay, utcDays, utcFormat, utcFriday, utcFridays, utcHour, utcHours, utcMillisecond, utcMilliseconds, utcMinute, utcMinutes, utcMonday, utcMondays, utcMonth, utcMonths, utcParse, utcSaturday, utcSaturdays, utcSecond, utcSeconds, utcSunday, utcSundays, utcThursday, utcThursdays, utcTickInterval, utcTicks, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcWeek, utcWeeks, utcYear, utcYears, variance, window, xml, zip, zoom, zoomIdentity, zoomTransform ;// ./node_modules/d3-array/src/max.js function max(values, valueof) { let max; if (valueof === undefined) { for (const value of values) { if (value != null && (max < value || (max === undefined && value >= value))) { max = value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (max < value || (max === undefined && value >= value))) { max = value; } } } return max; } ;// ./node_modules/d3-array/src/min.js function min(values, valueof) { let min; if (valueof === undefined) { for (const value of values) { if (value != null && (min > value || (min === undefined && value >= value))) { min = value; } } } else { let index = -1; for (let value of values) { if ((value = valueof(value, ++index, values)) != null && (min > value || (min === undefined && value >= value))) { min = value; } } } return min; } ;// ./node_modules/d3-array/src/index.js // Deprecated; use bin. // Deprecated; use leastIndex. ;// ./node_modules/d3-axis/src/identity.js /* harmony default export */ function src_identity(x) { return x; } ;// ./node_modules/d3-axis/src/axis.js var axis_top = 1, right = 2, bottom = 3, left = 4, epsilon = 1e-6; function translateX(x) { return "translate(" + x + ",0)"; } function translateY(y) { return "translate(0," + y + ")"; } function number(scale) { return d => +scale(d); } function center(scale, offset) { offset = Math.max(0, scale.bandwidth() - offset * 2) / 2; if (scale.round()) offset = Math.round(offset); return d => +scale(d) + offset; } function entering() { return !this.__axis; } function axis(orient, scale) { var tickArguments = [], tickValues = null, tickFormat = null, tickSizeInner = 6, tickSizeOuter = 6, tickPadding = 3, offset = typeof window !== "undefined" && window.devicePixelRatio > 1 ? 0 : 0.5, k = orient === axis_top || orient === left ? -1 : 1, x = orient === left || orient === right ? "x" : "y", transform = orient === axis_top || orient === bottom ? translateX : translateY; function axis(context) { var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues, format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : src_identity) : tickFormat, spacing = Math.max(tickSizeInner, 0) + tickPadding, range = scale.range(), range0 = +range[0] + offset, range1 = +range[range.length - 1] + offset, position = (scale.bandwidth ? center : number)(scale.copy(), offset), selection = context.selection ? context.selection() : context, path = selection.selectAll(".domain").data([null]), tick = selection.selectAll(".tick").data(values, scale).order(), tickExit = tick.exit(), tickEnter = tick.enter().append("g").attr("class", "tick"), line = tick.select("line"), text = tick.select("text"); path = path.merge(path.enter().insert("path", ".tick") .attr("class", "domain") .attr("stroke", "currentColor")); tick = tick.merge(tickEnter); line = line.merge(tickEnter.append("line") .attr("stroke", "currentColor") .attr(x + "2", k * tickSizeInner)); text = text.merge(tickEnter.append("text") .attr("fill", "currentColor") .attr(x, k * spacing) .attr("dy", orient === axis_top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); if (context !== selection) { path = path.transition(context); tick = tick.transition(context); line = line.transition(context); text = text.transition(context); tickExit = tickExit.transition(context) .attr("opacity", epsilon) .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d + offset) : this.getAttribute("transform"); }); tickEnter .attr("opacity", epsilon) .attr("transform", function(d) { var p = this.parentNode.__axis; return transform((p && isFinite(p = p(d)) ? p : position(d)) + offset); }); } tickExit.remove(); path .attr("d", orient === left || orient === right ? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H" + offset + "V" + range1 + "H" + k * tickSizeOuter : "M" + offset + "," + range0 + "V" + range1) : (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V" + offset + "H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + "," + offset + "H" + range1)); tick .attr("opacity", 1) .attr("transform", function(d) { return transform(position(d) + offset); }); line .attr(x + "2", k * tickSizeInner); text .attr(x, k * spacing) .text(format); selection.filter(entering) .attr("fill", "none") .attr("font-size", 10) .attr("font-family", "sans-serif") .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); selection .each(function() { this.__axis = position; }); } axis.scale = function(_) { return arguments.length ? (scale = _, axis) : scale; }; axis.ticks = function() { return tickArguments = Array.from(arguments), axis; }; axis.tickArguments = function(_) { return arguments.length ? (tickArguments = _ == null ? [] : Array.from(_), axis) : tickArguments.slice(); }; axis.tickValues = function(_) { return arguments.length ? (tickValues = _ == null ? null : Array.from(_), axis) : tickValues && tickValues.slice(); }; axis.tickFormat = function(_) { return arguments.length ? (tickFormat = _, axis) : tickFormat; }; axis.tickSize = function(_) { return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner; }; axis.tickSizeInner = function(_) { return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner; }; axis.tickSizeOuter = function(_) { return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter; }; axis.tickPadding = function(_) { return arguments.length ? (tickPadding = +_, axis) : tickPadding; }; axis.offset = function(_) { return arguments.length ? (offset = +_, axis) : offset; }; return axis; } function axisTop(scale) { return axis(axis_top, scale); } function axisRight(scale) { return axis(right, scale); } function axisBottom(scale) { return axis(bottom, scale); } function axisLeft(scale) { return axis(left, scale); } ;// ./node_modules/d3-axis/src/index.js ;// ./node_modules/d3-selection/src/selector.js function none() {} /* harmony default export */ function selector(selector) { return selector == null ? none : function() { return this.querySelector(selector); }; } ;// ./node_modules/d3-selection/src/selection/select.js /* harmony default export */ function selection_select(select) { if (typeof select !== "function") select = selector(select); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { if ("__data__" in node) subnode.__data__ = node.__data__; subgroup[i] = subnode; } } } return new Selection(subgroups, this._parents); } ;// ./node_modules/d3-selection/src/array.js // Given something array like (or null), returns something that is strictly an // array. This is used to ensure that array-like objects passed to d3.selectAll // or selection.selectAll are converted into proper arrays when creating a // selection; we don’t ever want to create a selection backed by a live // HTMLCollection or NodeList. However, note that selection.selectAll will use a // static NodeList as a group, since it safely derived from querySelectorAll. function array(x) { return x == null ? [] : Array.isArray(x) ? x : Array.from(x); } ;// ./node_modules/d3-selection/src/selectorAll.js function empty() { return []; } /* harmony default export */ function selectorAll(selector) { return selector == null ? empty : function() { return this.querySelectorAll(selector); }; } ;// ./node_modules/d3-selection/src/selection/selectAll.js function arrayAll(select) { return function() { return array(select.apply(this, arguments)); }; } /* harmony default export */ function selectAll(select) { if (typeof select === "function") select = arrayAll(select); else select = selectorAll(select); for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { if (node = group[i]) { subgroups.push(select.call(node, node.__data__, i, group)); parents.push(node); } } } return new Selection(subgroups, parents); } ;// ./node_modules/d3-selection/src/matcher.js /* harmony default export */ function matcher(selector) { return function() { return this.matches(selector); }; } function childMatcher(selector) { return function(node) { return node.matches(selector); }; } ;// ./node_modules/d3-selection/src/selection/selectChild.js var find = Array.prototype.find; function childFind(match) { return function() { return find.call(this.children, match); }; } function childFirst() { return this.firstElementChild; } /* harmony default export */ function selectChild(match) { return this.select(match == null ? childFirst : childFind(typeof match === "function" ? match : childMatcher(match))); } ;// ./node_modules/d3-selection/src/selection/selectChildren.js var filter = Array.prototype.filter; function children() { return Array.from(this.children); } function childrenFilter(match) { return function() { return filter.call(this.children, match); }; } /* harmony default export */ function selectChildren(match) { return this.selectAll(match == null ? children : childrenFilter(typeof match === "function" ? match : childMatcher(match))); } ;// ./node_modules/d3-selection/src/selection/filter.js /* harmony default export */ function selection_filter(match) { if (typeof match !== "function") match = matcher(match); for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { if ((node = group[i]) && match.call(node, node.__data__, i, group)) { subgroup.push(node); } } } return new Selection(subgroups, this._parents); } ;// ./node_modules/d3-selection/src/selection/sparse.js /* harmony default export */ function sparse(update) { return new Array(update.length); } ;// ./node_modules/d3-selection/src/selection/enter.js /* harmony default export */ function enter() { return new Selection(this._enter || this._groups.map(sparse), this._parents); } function EnterNode(parent, datum) { this.ownerDocument = parent.ownerDocument; this.namespaceURI = parent.namespaceURI; this._next = null; this._parent = parent; this.__data__ = datum; } EnterNode.prototype = { constructor: EnterNode, appendChild: function(child) { return this._parent.insertBefore(child, this._next); }, insertBefore: function(child, next) { return this._parent.insertBefore(child, next); }, querySelector: function(selector) { return this._parent.querySelector(selector); }, querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); } }; ;// ./node_modules/d3-selection/src/constant.js /* harmony default export */ function src_constant(x) { return function() { return x; }; } ;// ./node_modules/d3-selection/src/selection/data.js function bindIndex(parent, group, enter, update, exit, data) { var i = 0, node, groupLength = group.length, dataLength = data.length; // Put any non-null nodes that fit into update. // Put any null nodes into enter. // Put any remaining data into enter. for (; i < dataLength; ++i) { if (node = group[i]) { node.__data__ = data[i]; update[i] = node; } else { enter[i] = new EnterNode(parent, data[i]); } } // Put any non-null nodes that don’t fit into exit. for (; i < groupLength; ++i) { if (node = group[i]) { exit[i] = node; } } } function bindKey(parent, group, enter, update, exit, data, key) { var i, node, nodeByKeyValue = new Map, groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue; // Compute the key for each node. // If multiple nodes have the same key, the duplicates are added to exit. for (i = 0; i < groupLength; ++i) { if (node = group[i]) { keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + ""; if (nodeByKeyValue.has(keyValue)) { exit[i] = node; } else { nodeByKeyValue.set(keyValue, node); } } } // Compute the key for each datum. // If there a node associated with this key, join and add it to update. // If there is not (or the key is a duplicate), add it to enter. for (i = 0; i < dataLength; ++i) { keyValue = key.call(parent, data[i], i, data) + ""; if (node = nodeByKeyValue.get(keyValue)) { update[i] = node; node.__data__ = data[i]; nodeByKeyValue.delete(keyValue); } else { enter[i] = new EnterNode(parent, data[i]); } } // Add any remaining nodes that were not bound to data to exit. for (i = 0; i < groupLength; ++i) { if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) { exit[i] = node; } } } function datum(node) { return node.__data__; } /* harmony default export */ function data(value, key) { if (!arguments.length) return Array.from(this, datum); var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups; if (typeof value !== "function") value = src_constant(value); for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength); bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); // Now connect the enter nodes to their following update node, such that // appendChild can insert the materialized enter node before this node, // rather than at the end of the parent node. for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { if (previous = enterGroup[i0]) { if (i0 >= i1) i1 = i0 + 1; while (!(next = updateGroup[i1]) && ++i1 < dataLength); previous._next = next || null; } } } update = new Selection(update, parents); update._enter = enter; update._exit = exit; return update; } // Given some data, this returns an array-like view of it: an object that // exposes a length property and allows numeric indexing. Note that unlike // selectAll, this isn’t worried about “live” collections because the resulting // array will only be used briefly while data is being bound. (It is possible to // cause the data to change while iterating by using a key function, but please // don’t; we’d rather avoid a gratuitous copy.) function arraylike(data) { return typeof data === "object" && "length" in data ? data // Array, TypedArray, NodeList, array-like : Array.from(data); // Map, Set, iterable, string, or anything else } ;// ./node_modules/d3-selection/src/selection/exit.js /* harmony default export */ function exit() { return new Selection(this._exit || this._groups.map(sparse), this._parents); } ;// ./node_modules/d3-selection/src/selection/join.js /* harmony default export */ function join(onenter, onupdate, onexit) { var enter = this.enter(), update = this, exit = this.exit(); if (typeof onenter === "function") { enter = onenter(enter); if (enter) enter = enter.selection(); } else { enter = enter.append(onenter + ""); } if (onupdate != null) { update = onupdate(update); if (update) update = update.selection(); } if (onexit == null) exit.remove(); else onexit(exit); return enter && update ? enter.merge(update).order() : update; } ;// ./node_modules/d3-selection/src/selection/merge.js /* harmony default export */ function merge(context) { var selection = context.selection ? context.selection() : context; for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { if (node = group0[i] || group1[i]) { merge[i] = node; } } } for (; j < m0; ++j) { merges[j] = groups0[j]; } return new Selection(merges, this._parents); } ;// ./node_modules/d3-selection/src/selection/order.js /* harmony default export */ function order() { for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) { if (node = group[i]) { if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next); next = node; } } } return this; } ;// ./node_modules/d3-selection/src/selection/sort.js /* harmony default export */ function sort(compare) { if (!compare) compare = ascending; function compareNode(a, b) { return a && b ? compare(a.__data__, b.__data__) : !a - !b; } for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { if (node = group[i]) { sortgroup[i] = node; } } sortgroup.sort(compareNode); } return new Selection(sortgroups, this._parents).order(); } function ascending(a, b) { return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; } ;// ./node_modules/d3-selection/src/selection/call.js /* harmony default export */ function call() { var callback = arguments[0]; arguments[0] = this; callback.apply(null, arguments); return this; } ;// ./node_modules/d3-selection/src/selection/nodes.js /* harmony default export */ function nodes() { return Array.from(this); } ;// ./node_modules/d3-selection/src/selection/node.js /* harmony default export */ function node() { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { var node = group[i]; if (node) return node; } } return null; } ;// ./node_modules/d3-selection/src/selection/size.js /* harmony default export */ function size() { let size = 0; for (const node of this) ++size; // eslint-disable-line no-unused-vars return size; } ;// ./node_modules/d3-selection/src/selection/empty.js /* harmony default export */ function selection_empty() { return !this.node(); } ;// ./node_modules/d3-selection/src/selection/each.js /* harmony default export */ function each(callback) { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { if (node = group[i]) callback.call(node, node.__data__, i, group); } } return this; } ;// ./node_modules/d3-selection/src/namespaces.js var xhtml = "http://www.w3.org/1999/xhtml"; /* harmony default export */ const namespaces = ({ svg: "http://www.w3.org/2000/svg", xhtml: xhtml, xlink: "http://www.w3.org/1999/xlink", xml: "http://www.w3.org/XML/1998/namespace", xmlns: "http://www.w3.org/2000/xmlns/" }); ;// ./node_modules/d3-selection/src/namespace.js /* harmony default export */ function namespace(name) { var prefix = name += "", i = prefix.indexOf(":"); if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins } ;// ./node_modules/d3-selection/src/selection/attr.js function attrRemove(name) { return function() { this.removeAttribute(name); }; } function attrRemoveNS(fullname) { return function() { this.removeAttributeNS(fullname.space, fullname.local); }; } function attrConstant(name, value) { return function() { this.setAttribute(name, value); }; } function attrConstantNS(fullname, value) { return function() { this.setAttributeNS(fullname.space, fullname.local, value); }; } function attrFunction(name, value) { return function() { var v = value.apply(this, arguments); if (v == null) this.removeAttribute(name); else this.setAttribute(name, v); }; } function attrFunctionNS(fullname, value) { return function() { var v = value.apply(this, arguments); if (v == null) this.removeAttributeNS(fullname.space, fullname.local); else this.setAttributeNS(fullname.space, fullname.local, v); }; } /* harmony default export */ function attr(name, value) { var fullname = namespace(name); if (arguments.length < 2) { var node = this.node(); return fullname.local ? node.getAttributeNS(fullname.space, fullname.local) : node.getAttribute(fullname); } return this.each((value == null ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function" ? (fullname.local ? attrFunctionNS : attrFunction) : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value)); } ;// ./node_modules/d3-selection/src/window.js /* harmony default export */ function src_window(node) { return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node || (node.document && node) // node is a Window || node.defaultView; // node is a Document } ;// ./node_modules/d3-selection/src/selection/style.js function styleRemove(name) { return function() { this.style.removeProperty(name); }; } function styleConstant(name, value, priority) { return function() { this.style.setProperty(name, value, priority); }; } function styleFunction(name, value, priority) { return function() { var v = value.apply(this, arguments); if (v == null) this.style.removeProperty(name); else this.style.setProperty(name, v, priority); }; } /* harmony default export */ function style(name, value, priority) { return arguments.length > 1 ? this.each((value == null ? styleRemove : typeof value === "function" ? styleFunction : styleConstant)(name, value, priority == null ? "" : priority)) : styleValue(this.node(), name); } function styleValue(node, name) { return node.style.getPropertyValue(name) || src_window(node).getComputedStyle(node, null).getPropertyValue(name); } ;// ./node_modules/d3-selection/src/selection/property.js function propertyRemove(name) { return function() { delete this[name]; }; } function propertyConstant(name, value) { return function() { this[name] = value; }; } function propertyFunction(name, value) { return function() { var v = value.apply(this, arguments); if (v == null) delete this[name]; else this[name] = v; }; } /* harmony default export */ function property(name, value) { return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name]; } ;// ./node_modules/d3-selection/src/selection/classed.js function classArray(string) { return string.trim().split(/^|\s+/); } function classList(node) { return node.classList || new ClassList(node); } function ClassList(node) { this._node = node; this._names = classArray(node.getAttribute("class") || ""); } ClassList.prototype = { add: function(name) { var i = this._names.indexOf(name); if (i < 0) { this._names.push(name); this._node.setAttribute("class", this._names.join(" ")); } }, remove: function(name) { var i = this._names.indexOf(name); if (i >= 0) { this._names.splice(i, 1); this._node.setAttribute("class", this._names.join(" ")); } }, contains: function(name) { return this._names.indexOf(name) >= 0; } }; function classedAdd(node, names) { var list = classList(node), i = -1, n = names.length; while (++i < n) list.add(names[i]); } function classedRemove(node, names) { var list = classList(node), i = -1, n = names.length; while (++i < n) list.remove(names[i]); } function classedTrue(names) { return function() { classedAdd(this, names); }; } function classedFalse(names) { return function() { classedRemove(this, names); }; } function classedFunction(names, value) { return function() { (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); }; } /* harmony default export */ function classed(name, value) { var names = classArray(name + ""); if (arguments.length < 2) { var list = classList(this.node()), i = -1, n = names.length; while (++i < n) if (!list.contains(names[i])) return false; return true; } return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value)); } ;// ./node_modules/d3-selection/src/selection/text.js function textRemove() { this.textContent = ""; } function textConstant(value) { return function() { this.textContent = value; }; } function textFunction(value) { return function() { var v = value.apply(this, arguments); this.textContent = v == null ? "" : v; }; } /* harmony default export */ function selection_text(value) { return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction : textConstant)(value)) : this.node().textContent; } ;// ./node_modules/d3-selection/src/selection/html.js function htmlRemove() { this.innerHTML = ""; } function htmlConstant(value) { return function() { this.innerHTML = value; }; } function htmlFunction(value) { return function() { var v = value.apply(this, arguments); this.innerHTML = v == null ? "" : v; }; } /* harmony default export */ function html(value) { return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML; } ;// ./node_modules/d3-selection/src/selection/raise.js function raise() { if (this.nextSibling) this.parentNode.appendChild(this); } /* harmony default export */ function selection_raise() { return this.each(raise); } ;// ./node_modules/d3-selection/src/selection/lower.js function lower() { if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); } /* harmony default export */ function selection_lower() { return this.each(lower); } ;// ./node_modules/d3-selection/src/creator.js function creatorInherit(name) { return function() { var document = this.ownerDocument, uri = this.namespaceURI; return uri === xhtml && document.documentElement.namespaceURI === xhtml ? document.createElement(name) : document.createElementNS(uri, name); }; } function creatorFixed(fullname) { return function() { return this.ownerDocument.createElementNS(fullname.space, fullname.local); }; } /* harmony default export */ function creator(name) { var fullname = namespace(name); return (fullname.local ? creatorFixed : creatorInherit)(fullname); } ;// ./node_modules/d3-selection/src/selection/append.js /* harmony default export */ function append(name) { var create = typeof name === "function" ? name : creator(name); return this.select(function() { return this.appendChild(create.apply(this, arguments)); }); } ;// ./node_modules/d3-selection/src/selection/insert.js function constantNull() { return null; } /* harmony default export */ function insert(name, before) { var create = typeof name === "function" ? name : creator(name), select = before == null ? constantNull : typeof before === "function" ? before : selector(before); return this.select(function() { return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); }); } ;// ./node_modules/d3-selection/src/selection/remove.js function remove() { var parent = this.parentNode; if (parent) parent.removeChild(this); } /* harmony default export */ function selection_remove() { return this.each(remove); } ;// ./node_modules/d3-selection/src/selection/clone.js function selection_cloneShallow() { var clone = this.cloneNode(false), parent = this.parentNode; return parent ? parent.insertBefore(clone, this.nextSibling) : clone; } function selection_cloneDeep() { var clone = this.cloneNode(true), parent = this.parentNode; return parent ? parent.insertBefore(clone, this.nextSibling) : clone; } /* harmony default export */ function clone(deep) { return this.select(deep ? selection_cloneDeep : selection_cloneShallow); } ;// ./node_modules/d3-selection/src/selection/datum.js /* harmony default export */ function selection_datum(value) { return arguments.length ? this.property("__data__", value) : this.node().__data__; } ;// ./node_modules/d3-selection/src/selection/on.js function contextListener(listener) { return function(event) { listener.call(this, event, this.__data__); }; } function parseTypenames(typenames) { return typenames.trim().split(/^|\s+/).map(function(t) { var name = "", i = t.indexOf("."); if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); return {type: t, name: name}; }); } function onRemove(typename) { return function() { var on = this.__on; if (!on) return; for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { this.removeEventListener(o.type, o.listener, o.options); } else { on[++i] = o; } } if (++i) on.length = i; else delete this.__on; }; } function onAdd(typename, value, options) { return function() { var on = this.__on, o, listener = contextListener(value); if (on) for (var j = 0, m = on.length; j < m; ++j) { if ((o = on[j]).type === typename.type && o.name === typename.name) { this.removeEventListener(o.type, o.listener, o.options); this.addEventListener(o.type, o.listener = listener, o.options = options); o.value = value; return; } } this.addEventListener(typename.type, listener, options); o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options}; if (!on) this.__on = [o]; else on.push(o); }; } /* harmony default export */ function on(typename, value, options) { var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; if (arguments.length < 2) { var on = this.node().__on; if (on) for (var j = 0, m = on.length, o; j < m; ++j) { for (i = 0, o = on[j]; i < n; ++i) { if ((t = typenames[i]).type === o.type && t.name === o.name) { return o.value; } } } return; } on = value ? onAdd : onRemove; for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options)); return this; } ;// ./node_modules/d3-selection/src/selection/dispatch.js function dispatchEvent(node, type, params) { var window = src_window(node), event = window.CustomEvent; if (typeof event === "function") { event = new event(type, params); } else { event = window.document.createEvent("Event"); if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; else event.initEvent(type, false, false); } node.dispatchEvent(event); } function dispatchConstant(type, params) { return function() { return dispatchEvent(this, type, params); }; } function dispatchFunction(type, params) { return function() { return dispatchEvent(this, type, params.apply(this, arguments)); }; } /* harmony default export */ function selection_dispatch(type, params) { return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params)); } ;// ./node_modules/d3-selection/src/selection/iterator.js /* harmony default export */ function* iterator() { for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { if (node = group[i]) yield node; } } } ;// ./node_modules/d3-selection/src/selection/index.js var root = [null]; function Selection(groups, parents) { this._groups = groups; this._parents = parents; } function selection() { return new Selection([[document.documentElement]], root); } function selection_selection() { return this; } Selection.prototype = selection.prototype = { constructor: Selection, select: selection_select, selectAll: selectAll, selectChild: selectChild, selectChildren: selectChildren, filter: selection_filter, data: data, enter: enter, exit: exit, join: join, merge: merge, selection: selection_selection, order: order, sort: sort, call: call, nodes: nodes, node: node, size: size, empty: selection_empty, each: each, attr: attr, style: style, property: property, classed: classed, text: selection_text, html: html, raise: selection_raise, lower: selection_lower, append: append, insert: insert, remove: selection_remove, clone: clone, datum: selection_datum, on: on, dispatch: selection_dispatch, [Symbol.iterator]: iterator }; /* harmony default export */ const src_selection = (selection); ;// ./node_modules/d3-dispatch/src/dispatch.js var noop = {value: () => {}}; function dispatch_dispatch() { for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t); _[t] = []; } return new Dispatch(_); } function Dispatch(_) { this._ = _; } function dispatch_parseTypenames(typenames, types) { return typenames.trim().split(/^|\s+/).map(function(t) { var name = "", i = t.indexOf("."); if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); return {type: t, name: name}; }); } Dispatch.prototype = dispatch_dispatch.prototype = { constructor: Dispatch, on: function(typename, callback) { var _ = this._, T = dispatch_parseTypenames(typename + "", _), t, i = -1, n = T.length; // If no callback was specified, return the callback of the given type and name. if (arguments.length < 2) { while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; return; } // If a type was specified, set the callback for the given type and name. // Otherwise, if a null callback was specified, remove callbacks of the given name. if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); while (++i < n) { if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); } return this; }, copy: function() { var copy = {}, _ = this._; for (var t in _) c