diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1776efd0a0aeea43824b8b827811cf91c0cf87ec Binary files /dev/null and b/.DS_Store differ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..28dd4ff5ced679005e251eb21060f6993e70dcf5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,39 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.wav filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..fb31d8f2dd75ceccd2d2e9b3406b2805636915b8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +*.log +*.env +*.cache +python/**/__pycache__ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0b3bc4654d6e743e564acee71880552bd7fdcffb --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +--- +title: The Distill Template +emoji: 🌌 +colorFrom: yellow +colorTo: purple +sdk: static +pinned: true +license: apache-2.0 +header: mini +app_file: dist/index.html +thumbnail: https://huggingface.co/spaces/nanotron/distill-blog-template/resolve/main/thumbnail.png +short_description: Craft Beautiful Blogs +--- + +Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference + + +Instruction to install and run locally + +```bash +npm install +npm run build +npm run dev + +// If you want to change something change it in src/.... + +// Once you are finished +npm run build +// And commit the dist folder +``` + +## Loading HTML fragments: +There are two way to load HTML fragments: +1. Compile them into html during build time +2. Fetch them and insert them during run-time + +## When to use what +- Use compile time fragments only on parts which you want to ensure are seen by every user right after page load (e.g logo) +- Use run-time fragments for everything else so that the final HTML is of reasonable size (<1MB idealy) + +## How to add a new fragment +- Add it to the `src/fragments` folder (e.g. `src/fragments/banner.html`) +- For run-time fragments, add {{{fragment-name}}} to appropriate place in `src/index.html` (e.g. {{{fragment-banner}}}) +- For compile-time fragments, add
to `src/index.html` where you want to insert the fragment (e.g.
) + + +## How to know which fragments are available +- Run `npm run dev` and look at the console for available fragments \ No newline at end of file diff --git a/assets/.DS_Store b/assets/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5ea2056614ca173e6b2798814431e5271d99ce2b Binary files /dev/null and b/assets/.DS_Store differ diff --git a/assets/images/.gitattributes b/assets/images/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..5f9b1ec38255e5ef87afb871ed3e5e46aa957946 --- /dev/null +++ b/assets/images/.gitattributes @@ -0,0 +1,2 @@ +*.gif filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text diff --git a/assets/images/GPU_Huggy_small.png b/assets/images/GPU_Huggy_small.png new file mode 100644 index 0000000000000000000000000000000000000000..5bb29dac8a296970ea4aad17049aa380dd33e724 Binary files /dev/null and b/assets/images/GPU_Huggy_small.png differ diff --git a/dist/assets/.DS_Store b/dist/assets/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5ea2056614ca173e6b2798814431e5271d99ce2b Binary files /dev/null and b/dist/assets/.DS_Store differ diff --git a/dist/assets/images/GPU_Huggy_small.png b/dist/assets/images/GPU_Huggy_small.png new file mode 100644 index 0000000000000000000000000000000000000000..39433bb3204567a5a5c257a23eb2c5b27632cdfe Binary files /dev/null and b/dist/assets/images/GPU_Huggy_small.png differ diff --git a/dist/bibliography.bib b/dist/bibliography.bib new file mode 100644 index 0000000000000000000000000000000000000000..77ee469af740a64115bc02b08eb6edb89c06236c --- /dev/null +++ b/dist/bibliography.bib @@ -0,0 +1,24 @@ +@article{example2023, + title={Example Paper Title}, + author={Example, Author and Another, Author}, + journal={Journal of Examples}, + volume={1}, + number={1}, + pages={1--10}, + year={2023}, + publisher={Example Publisher} +} + +@online{distill, + title={Distill}, + url={https://distill.pub}, + year={2016}, + publisher={Distill Working Group} +} + +@book{textbook2022, + title={An Example Textbook}, + author={Author, Example}, + year={2022}, + publisher={Example Academic Press} +} \ No newline at end of file diff --git a/dist/distill.bundle.js b/dist/distill.bundle.js new file mode 100644 index 0000000000000000000000000000000000000000..8a6ad416fb08c2c146beecf0b547ffb89a5791a4 --- /dev/null +++ b/dist/distill.bundle.js @@ -0,0 +1,8221 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 792: +/***/ ((module, exports, __webpack_require__) => { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;function _wrapNativeSuper(t) { var r = "function" == typeof Map ? new Map() : void 0; return _wrapNativeSuper = function _wrapNativeSuper(t) { if (null === t || !_isNativeFunction(t)) return t; if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); if (void 0 !== r) { if (r.has(t)) return r.get(t); r.set(t, Wrapper); } function Wrapper() { return _construct(t, arguments, _getPrototypeOf(this).constructor); } return Wrapper.prototype = Object.create(t.prototype, { constructor: { value: Wrapper, enumerable: !1, writable: !0, configurable: !0 } }), _setPrototypeOf(Wrapper, t); }, _wrapNativeSuper(t); } +function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; } +function _isNativeFunction(t) { try { return -1 !== Function.toString.call(t).indexOf("[native code]"); } catch (n) { return "function" == typeof t; } } +function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); } +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); } +function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); } +function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; } +function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } +function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } +function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } +function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } +function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); } +function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; } +function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } +function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } +function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } +function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } +function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } +function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } +function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } +(function (factory) { + true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : 0; +})(function () { + 'use strict'; + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + var days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + var months = ['Jan.', 'Feb.', 'March', 'April', 'May', 'June', 'July', 'Aug.', 'Sept.', 'Oct.', 'Nov.', 'Dec.']; + var zeroPad = function zeroPad(n) { + return n < 10 ? '0' + n : n; + }; + var RFC = function RFC(date) { + var day = days[date.getDay()].substring(0, 3); + var paddedDate = zeroPad(date.getDate()); + var month = months[date.getMonth()].substring(0, 3); + var year = date.getFullYear().toString(); + var hours = date.getUTCHours().toString(); + var minutes = date.getUTCMinutes().toString(); + var seconds = date.getUTCSeconds().toString(); + return "".concat(day, ", ").concat(paddedDate, " ").concat(month, " ").concat(year, " ").concat(hours, ":").concat(minutes, ":").concat(seconds, " Z"); + }; + var objectFromMap = function objectFromMap(map) { + var object = Array.from(map).reduce(function (object, _ref) { + var _ref2 = _slicedToArray(_ref, 2), + key = _ref2[0], + value = _ref2[1]; + return Object.assign(object, _defineProperty({}, key, value)) // Be careful! Maps can have non-String keys; object literals can't. + ; + }, {}); + return object; + }; + var mapFromObject = function mapFromObject(object) { + var map = new Map(); + for (var property in object) { + if (object.hasOwnProperty(property)) { + map.set(property, object[property]); + } + } + return map; + }; + var Author = /*#__PURE__*/function () { + // constructor(name='', personalURL='', affiliation='', affiliationURL='') { + // this.name = name; // 'Chris Olah' + // this.personalURL = personalURL; // 'https://colah.github.io' + // this.affiliation = affiliation; // 'Google Brain' + // this.affiliationURL = affiliationURL; // 'https://g.co/brain' + // } + + function Author(object) { + _classCallCheck(this, Author); + this.name = object.author; // 'Chris Olah' + this.personalURL = object.authorURL; // 'https://colah.github.io' + this.affiliation = object.affiliation; // 'Google Brain' + this.affiliationURL = object.affiliationURL; // 'https://g.co/brain' + this.affiliations = object.affiliations || []; // new-style affiliations + } + + // 'Chris' + return _createClass(Author, [{ + key: "firstName", + get: function get() { + var names = this.name.split(' '); + return names.slice(0, names.length - 1).join(' '); + } + + // 'Olah' + }, { + key: "lastName", + get: function get() { + var names = this.name.split(' '); + return names[names.length - 1]; + } + }]); + }(); + function mergeFromYMLFrontmatter(target, source) { + target.title = source.title; + if (source.published) { + if (source.published instanceof Date) { + target.publishedDate = source.published; + } else if (source.published.constructor === String) { + target.publishedDate = new Date(source.published); + } + } + if (source.publishedDate) { + if (source.publishedDate instanceof Date) { + target.publishedDate = source.publishedDate; + } else if (source.publishedDate.constructor === String) { + target.publishedDate = new Date(source.publishedDate); + } else { + console.error('Don\'t know what to do with published date: ' + source.publishedDate); + } + } + target.description = source.description; + target.authors = source.authors.map(function (authorObject) { + return new Author(authorObject); + }); + target.katex = source.katex; + target.password = source.password; + if (source.doi) { + target.doi = source.doi; + } + } + var FrontMatter = /*#__PURE__*/function () { + function FrontMatter() { + _classCallCheck(this, FrontMatter); + this.title = 'unnamed article'; // 'Attention and Augmented Recurrent Neural Networks' + this.description = ''; // 'A visual overview of neural attention...' + this.authors = []; // Array of Author(s) + + this.bibliography = new Map(); + this.bibliographyParsed = false; + // { + // 'gregor2015draw': { + // 'title': 'DRAW: A recurrent neural network for image generation', + // 'author': 'Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan', + // 'journal': 'arXiv preprint arXiv:1502.04623', + // 'year': '2015', + // 'url': 'https://arxiv.org/pdf/1502.04623.pdf', + // 'type': 'article' + // }, + // } + + // Citation keys should be listed in the order that they are appear in the document. + // Each key refers to a key in the bibliography dictionary. + this.citations = []; // [ 'gregor2015draw', 'mercier2011humans' ] + this.citationsCollected = false; + + // + // Assigned from posts.csv + // + + // publishedDate: 2016-09-08T07:00:00.000Z, + // tags: [ 'rnn' ], + // distillPath: '2016/augmented-rnns', + // githubPath: 'distillpub/post--augmented-rnns', + // doiSuffix: 1, + + // + // Assigned from journal + // + this.journal = {}; + // journal: { + // 'title': 'Distill', + // 'full_title': 'Distill', + // 'abbrev_title': 'Distill', + // 'url': 'http://distill.pub', + // 'doi': '10.23915/distill', + // 'publisherName': 'Distill Working Group', + // 'publisherEmail': 'admin@distill.pub', + // 'issn': '2476-0757', + // 'editors': [...], + // 'committee': [...] + // } + // volume: 1, + // issue: 9, + + this.katex = {}; + + // + // Assigned from publishing process + // + + // githubCompareUpdatesUrl: 'https://github.com/distillpub/post--augmented-rnns/compare/1596e094d8943d2dc0ea445d92071129c6419c59...3bd9209e0c24d020f87cf6152dcecc6017cbc193', + // updatedDate: 2017-03-21T07:13:16.000Z, + // doi: '10.23915/distill.00001', + this.doi = undefined; + this.publishedDate = undefined; + } + + // Example: + // title: Demo Title Attention and Augmented Recurrent Neural Networks + // published: Jan 10, 2017 + // authors: + // - Chris Olah: + // - Shan Carter: http://shancarter.com + // affiliations: + // - Google Brain: + // - Google Brain: http://g.co/brain + + // + // Computed Properties + // + + // 'http://distill.pub/2016/augmented-rnns', + return _createClass(FrontMatter, [{ + key: "url", + get: function get() { + if (this._url) { + return this._url; + } else if (this.distillPath && this.journal.url) { + return this.journal.url + '/' + this.distillPath; + } else if (this.journal.url) { + return this.journal.url; + } + } + + // 'https://github.com/distillpub/post--augmented-rnns', + , + set: function set(value) { + this._url = value; + } + }, { + key: "githubUrl", + get: function get() { + if (this.githubPath) { + return 'https://github.com/' + this.githubPath; + } else { + return undefined; + } + } + + // TODO resolve differences in naming of URL/Url/url. + // 'http://distill.pub/2016/augmented-rnns/thumbnail.jpg', + }, { + key: "previewURL", + get: function get() { + return this._previewURL ? this._previewURL : this.url + '/thumbnail.jpg'; + } + + // 'Thu, 08 Sep 2016 00:00:00 -0700', + , + set: function set(value) { + this._previewURL = value; + } + }, { + key: "publishedDateRFC", + get: function get() { + return RFC(this.publishedDate); + } + + // 'Thu, 08 Sep 2016 00:00:00 -0700', + }, { + key: "updatedDateRFC", + get: function get() { + return RFC(this.updatedDate); + } + + // 2016, + }, { + key: "publishedYear", + get: function get() { + return this.publishedDate.getFullYear(); + } + + // 'Sept', + }, { + key: "publishedMonth", + get: function get() { + return months[this.publishedDate.getMonth()]; + } + + // 8, + }, { + key: "publishedDay", + get: function get() { + return this.publishedDate.getDate(); + } + + // '09', + }, { + key: "publishedMonthPadded", + get: function get() { + return zeroPad(this.publishedDate.getMonth() + 1); + } + + // '08', + }, { + key: "publishedDayPadded", + get: function get() { + return zeroPad(this.publishedDate.getDate()); + } + }, { + key: "publishedISODateOnly", + get: function get() { + return this.publishedDate.toISOString().split('T')[0]; + } + }, { + key: "volume", + get: function get() { + var volume = this.publishedYear - 2015; + if (volume < 1) { + throw new Error('Invalid publish date detected during computing volume'); + } + return volume; + } + }, { + key: "issue", + get: function get() { + return this.publishedDate.getMonth() + 1; + } + + // 'Olah & Carter', + }, { + key: "concatenatedAuthors", + get: function get() { + if (this.authors.length > 2) { + return this.authors[0].lastName + ', et al.'; + } else if (this.authors.length === 2) { + return this.authors[0].lastName + ' & ' + this.authors[1].lastName; + } else if (this.authors.length === 1) { + return this.authors[0].lastName; + } + } + + // 'Olah, Chris and Carter, Shan', + }, { + key: "bibtexAuthors", + get: function get() { + return this.authors.map(function (author) { + return author.lastName + ', ' + author.firstName; + }).join(' and '); + } + + // 'olah2016attention' + }, { + key: "slug", + get: function get() { + var slug = ''; + if (this.authors.length) { + slug += this.authors[0].lastName.toLowerCase(); + slug += this.publishedYear; + slug += this.title.split(' ')[0].toLowerCase(); + } + return slug || 'Untitled'; + } + }, { + key: "bibliographyEntries", + get: function get() { + var _this = this; + return new Map(this.citations.map(function (citationKey) { + var entry = _this.bibliography.get(citationKey); + return [citationKey, entry]; + })); + } + }, { + key: "bibliography", + get: function get() { + return this._bibliography; + }, + set: function set(bibliography) { + if (bibliography instanceof Map) { + this._bibliography = bibliography; + } else if (_typeof(bibliography) === 'object') { + this._bibliography = mapFromObject(bibliography); + } + } + }, { + key: "assignToObject", + value: function assignToObject(target) { + Object.assign(target, this); + target.bibliography = objectFromMap(this.bibliographyEntries); + target.url = this.url; + target.doi = this.doi; + target.githubUrl = this.githubUrl; + target.previewURL = this.previewURL; + if (this.publishedDate) { + target.volume = this.volume; + target.issue = this.issue; + target.publishedDateRFC = this.publishedDateRFC; + target.publishedYear = this.publishedYear; + target.publishedMonth = this.publishedMonth; + target.publishedDay = this.publishedDay; + target.publishedMonthPadded = this.publishedMonthPadded; + target.publishedDayPadded = this.publishedDayPadded; + } + if (this.updatedDate) { + target.updatedDateRFC = this.updatedDateRFC; + } + target.concatenatedAuthors = this.concatenatedAuthors; + target.bibtexAuthors = this.bibtexAuthors; + target.slug = this.slug; + } + }], [{ + key: "fromObject", + value: function fromObject(source) { + var frontMatter = new FrontMatter(); + Object.assign(frontMatter, source); + return frontMatter; + } + }]); + }(); // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + var Mutating = function Mutating(superclass) { + return /*#__PURE__*/function (_superclass) { + function _class() { + var _this2; + _classCallCheck(this, _class); + _this2 = _callSuper(this, _class); + + // set up mutation observer + var options = { + childList: true, + characterData: true, + subtree: true + }; + var observer = new MutationObserver(function () { + observer.disconnect(); + _this2.renderIfPossible(); + observer.observe(_this2, options); + }); + + // ...and listen for changes + observer.observe(_this2, options); + return _this2; + } + _inherits(_class, _superclass); + return _createClass(_class, [{ + key: "connectedCallback", + value: function connectedCallback() { + _superPropGet(_class, "connectedCallback", this, 3)([]); + this.renderIfPossible(); + } + + // potential TODO: check if this is enough for all our usecases + // maybe provide a custom function to tell if we have enough information to render + }, { + key: "renderIfPossible", + value: function renderIfPossible() { + if (this.textContent && this.root) { + this.renderContent(); + } + } + }, { + key: "renderContent", + value: function renderContent() { + console.error("Your class ".concat(this.constructor.name, " must provide a custom renderContent() method!")); + } + }]); + }(superclass); // end class + }; // end mixin function + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + /*global ShadyCSS*/ + + var Template = function Template(name, templateString) { + var useShadow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + return function (superclass) { + var template = document.createElement('template'); + template.innerHTML = templateString; + if (useShadow && 'ShadyCSS' in window) { + ShadyCSS.prepareTemplate(template, name); + } + return /*#__PURE__*/function (_superclass2) { + function _class2() { + var _this3; + _classCallCheck(this, _class2); + _this3 = _callSuper(this, _class2); + _this3.clone = document.importNode(template.content, true); + if (useShadow) { + _this3.attachShadow({ + mode: 'open' + }); + _this3.shadowRoot.appendChild(_this3.clone); + } + return _this3; + } + _inherits(_class2, _superclass2); + return _createClass(_class2, [{ + key: "connectedCallback", + value: function connectedCallback() { + if (this.hasAttribute('distill-prerendered')) { + return; + } + if (useShadow) { + if ('ShadyCSS' in window) { + ShadyCSS.styleElement(this); + } + } else { + this.insertBefore(this.clone, this.firstChild); + } + } + }, { + key: "root", + get: function get() { + if (useShadow) { + return this.shadowRoot; + } else { + return this; + } + } + + /* TODO: Are we using these? Should we even? */ + }, { + key: "$", + value: function $(query) { + return this.root.querySelector(query); + } + }, { + key: "$$", + value: function $$(query) { + return this.root.querySelectorAll(query); + } + }], [{ + key: "is", + get: function get() { + return name; + } + }]); + }(superclass); + }; + }; + var math = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nspan.katex-display {\n text-align: left;\n padding: 8px 0 8px 0;\n margin: 0.5em 0 0.5em 1em;\n}\n\nspan.katex {\n -webkit-font-smoothing: antialiased;\n color: rgba(0, 0, 0, 0.8);\n font-size: 1.18em;\n}\n"; + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + // This is a straight concatenation of code from KaTeX's contrib folder, + // but we aren't using some of their helpers that don't work well outside a browser environment. + + /*global katex */ + + var findEndOfMath = function findEndOfMath(delimiter, text, startIndex) { + // Adapted from + // https://github.com/Khan/perseus/blob/master/src/perseus-markdown.jsx + var index = startIndex; + var braceLevel = 0; + var delimLength = delimiter.length; + while (index < text.length) { + var character = text[index]; + if (braceLevel <= 0 && text.slice(index, index + delimLength) === delimiter) { + return index; + } else if (character === "\\") { + index++; + } else if (character === "{") { + braceLevel++; + } else if (character === "}") { + braceLevel--; + } + index++; + } + return -1; + }; + var splitAtDelimiters = function splitAtDelimiters(startData, leftDelim, rightDelim, display) { + var finalData = []; + for (var i = 0; i < startData.length; i++) { + if (startData[i].type === "text") { + var text = startData[i].data; + var lookingForLeft = true; + var currIndex = 0; + var nextIndex = void 0; + nextIndex = text.indexOf(leftDelim); + if (nextIndex !== -1) { + currIndex = nextIndex; + finalData.push({ + type: "text", + data: text.slice(0, currIndex) + }); + lookingForLeft = false; + } + while (true) { + // eslint-disable-line no-constant-condition + if (lookingForLeft) { + nextIndex = text.indexOf(leftDelim, currIndex); + if (nextIndex === -1) { + break; + } + finalData.push({ + type: "text", + data: text.slice(currIndex, nextIndex) + }); + currIndex = nextIndex; + } else { + nextIndex = findEndOfMath(rightDelim, text, currIndex + leftDelim.length); + if (nextIndex === -1) { + break; + } + finalData.push({ + type: "math", + data: text.slice(currIndex + leftDelim.length, nextIndex), + rawData: text.slice(currIndex, nextIndex + rightDelim.length), + display: display + }); + currIndex = nextIndex + rightDelim.length; + } + lookingForLeft = !lookingForLeft; + } + finalData.push({ + type: "text", + data: text.slice(currIndex) + }); + } else { + finalData.push(startData[i]); + } + } + return finalData; + }; + var splitWithDelimiters = function splitWithDelimiters(text, delimiters) { + var data = [{ + type: "text", + data: text + }]; + for (var i = 0; i < delimiters.length; i++) { + var delimiter = delimiters[i]; + data = splitAtDelimiters(data, delimiter.left, delimiter.right, delimiter.display || false); + } + return data; + }; + + /* Note: optionsCopy is mutated by this method. If it is ever exposed in the + * API, we should copy it before mutating. + */ + var renderMathInText = function renderMathInText(text, optionsCopy) { + var data = splitWithDelimiters(text, optionsCopy.delimiters); + var fragment = document.createDocumentFragment(); + for (var i = 0; i < data.length; i++) { + if (data[i].type === "text") { + fragment.appendChild(document.createTextNode(data[i].data)); + } else { + var tag = document.createElement("d-math"); + var _math = data[i].data; + // Override any display mode defined in the settings with that + // defined by the text itself + optionsCopy.displayMode = data[i].display; + try { + tag.textContent = _math; + if (optionsCopy.displayMode) { + tag.setAttribute("block", ""); + } + } catch (e) { + if (!(e instanceof katex.ParseError)) { + throw e; + } + optionsCopy.errorCallback("KaTeX auto-render: Failed to parse `" + data[i].data + "` with ", e); + fragment.appendChild(document.createTextNode(data[i].rawData)); + continue; + } + fragment.appendChild(tag); + } + } + return fragment; + }; + var _renderElem = function renderElem(elem, optionsCopy) { + for (var i = 0; i < elem.childNodes.length; i++) { + var childNode = elem.childNodes[i]; + if (childNode.nodeType === 3) { + // Text node + var text = childNode.textContent; + if (optionsCopy.mightHaveMath(text)) { + var frag = renderMathInText(text, optionsCopy); + i += frag.childNodes.length - 1; + elem.replaceChild(frag, childNode); + } + } else if (childNode.nodeType === 1) { + // Element node + var shouldRender = optionsCopy.ignoredTags.indexOf(childNode.nodeName.toLowerCase()) === -1; + if (shouldRender) { + _renderElem(childNode, optionsCopy); + } + } + // Otherwise, it's something else, and ignore it. + } + }; + var defaultAutoRenderOptions = { + delimiters: [{ + left: "$$", + right: "$$", + display: true + }, { + left: "\\[", + right: "\\]", + display: true + }, { + left: "\\(", + right: "\\)", + display: false + } + // LaTeX uses this, but it ruins the display of normal `$` in text: + // {left: '$', right: '$', display: false}, + ], + ignoredTags: ["script", "noscript", "style", "textarea", "pre", "code", "svg"], + errorCallback: function errorCallback(msg, err) { + console.error(msg, err); + } + }; + var renderMathInElement = function renderMathInElement(elem, options) { + if (!elem) { + throw new Error("No element provided to render"); + } + var optionsCopy = Object.assign({}, defaultAutoRenderOptions, options); + var delimiterStrings = optionsCopy.delimiters.flatMap(function (d) { + return [d.left, d.right]; + }); + var mightHaveMath = function mightHaveMath(text) { + return delimiterStrings.some(function (d) { + return text.indexOf(d) !== -1; + }); + }; + optionsCopy.mightHaveMath = mightHaveMath; + _renderElem(elem, optionsCopy); + }; + + // Copyright 2018 The Distill Template Authors + + var katexJSURL = 'https://distill.pub/third-party/katex/katex.min.js'; + var katexCSSTag = ''; + var T = Template('d-math', "\n".concat(katexCSSTag, "\n\n\n")); + + // DMath, not Math, because that would conflict with the JS built-in + var DMath = /*#__PURE__*/function (_Mutating) { + function DMath() { + _classCallCheck(this, DMath); + return _callSuper(this, DMath, arguments); + } + _inherits(DMath, _Mutating); + return _createClass(DMath, [{ + key: "options", + get: function get() { + var localOptions = { + displayMode: this.hasAttribute('block') + }; + return Object.assign(localOptions, DMath.katexOptions); + } + }, { + key: "connectedCallback", + value: function connectedCallback() { + _superPropGet(DMath, "connectedCallback", this, 3)([]); + if (!DMath.katexAdded) { + DMath.addKatex(); + } + } + }, { + key: "renderContent", + value: function renderContent() { + if (typeof katex !== 'undefined') { + var container = this.root.querySelector('#katex-container'); + katex.render(this.textContent, container, this.options); + } + } + }], [{ + key: "katexOptions", + get: function get() { + if (!DMath._katexOptions) { + DMath._katexOptions = { + delimiters: [{ + 'left': '$$', + 'right': '$$', + 'display': false + }] + }; + } + return DMath._katexOptions; + }, + set: function set(options) { + DMath._katexOptions = options; + if (DMath.katexOptions.delimiters) { + if (!DMath.katexAdded) { + DMath.addKatex(); + } else { + DMath.katexLoadedCallback(); + } + } + } + }, { + key: "katexLoadedCallback", + value: function katexLoadedCallback() { + // render all d-math tags + var mathTags = document.querySelectorAll('d-math'); + var _iterator = _createForOfIteratorHelper(mathTags), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var mathTag = _step.value; + mathTag.renderContent(); + } + // transform inline delimited math to d-math tags + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + if (DMath.katexOptions.delimiters) { + renderMathInElement(document.body, DMath.katexOptions); + } + } + }, { + key: "addKatex", + value: function addKatex() { + // css tag can use this convenience function + document.head.insertAdjacentHTML('beforeend', katexCSSTag); + // script tag has to be created to work properly + var scriptTag = document.createElement('script'); + scriptTag.src = katexJSURL; + scriptTag.async = true; + scriptTag.onload = DMath.katexLoadedCallback; + scriptTag.crossorigin = 'anonymous'; + document.head.appendChild(scriptTag); + DMath.katexAdded = true; + } + }]); + }(Mutating(T(HTMLElement))); + DMath.katexAdded = false; + DMath.inlineMathRendered = false; + window.DMath = DMath; // TODO: check if this can be removed, or if we should expose a distill global + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + function collect_citations() { + var dom = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document; + var citations = new Set(); + var citeTags = dom.querySelectorAll("d-cite"); + var _iterator2 = _createForOfIteratorHelper(citeTags), + _step2; + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var tag = _step2.value; + var keyString = tag.getAttribute("key") || tag.getAttribute("bibtex-key"); + var keys = keyString.split(",").map(function (k) { + return k.trim(); + }); + var _iterator3 = _createForOfIteratorHelper(keys), + _step3; + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var key = _step3.value; + citations.add(key); + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + return _toConsumableArray(citations); + } + function author_string(ent, template, sep, finalSep) { + if (ent.author == null) { + return ""; + } + var names = ent.author.split(" and "); + var name_strings = names.map(function (name) { + name = name.trim(); + if (name.indexOf(",") != -1) { + var last = name.split(",")[0].trim(); + var firsts = name.split(",")[1]; + } else if (name.indexOf(" ") != -1) { + var last = name.split(" ").slice(-1)[0].trim(); + var firsts = name.split(" ").slice(0, -1).join(" "); + } else { + var last = name.trim(); + } + var initials = ""; + if (firsts != undefined) { + initials = firsts.trim().split(" ").map(function (s) { + return s.trim()[0]; + }); + initials = initials.join(".") + "."; + } + return template.replace("${F}", firsts).replace("${L}", last).replace("${I}", initials).trim(); // in case one of first or last was empty + }); + if (names.length > 1) { + var str = name_strings.slice(0, names.length - 1).join(sep); + str += (finalSep || sep) + name_strings[names.length - 1]; + return str; + } else { + return name_strings[0]; + } + } + function venue_string(ent) { + var cite = ent.journal || ent.booktitle || ""; + if ("volume" in ent) { + var issue = ent.issue || ent.number; + issue = issue != undefined ? "(" + issue + ")" : ""; + cite += ", Vol " + ent.volume + issue; + } + if ("pages" in ent) { + cite += ", pp. " + ent.pages; + } + if (cite != "") cite += ". "; + if ("publisher" in ent) { + cite += ent.publisher; + if (cite[cite.length - 1] != ".") cite += "."; + } + return cite; + } + function link_string(ent) { + if ("url" in ent) { + var url = ent.url; + var arxiv_match = /arxiv\.org\/abs\/([0-9\.]*)/.exec(url); + if (arxiv_match != null) { + url = "http://arxiv.org/pdf/".concat(arxiv_match[1], ".pdf"); + } + if (url.slice(-4) == ".pdf") { + var label = "PDF"; + } else if (url.slice(-5) == ".html") { + var label = "HTML"; + } + return "  [").concat(label || "link", "]"); + } /* else if ("doi" in ent){ + return `  [DOI]`; + }*/else { + return ""; + } + } + function doi_string(ent, new_line) { + if ("doi" in ent) { + return "".concat(new_line ? "
" : "", " DOI: ").concat(ent.doi, ""); + } else { + return ""; + } + } + function title_string(ent) { + return '' + ent.title + " "; + } + function bibliography_cite(ent, fancy) { + if (ent) { + var cite = title_string(ent); + cite += link_string(ent) + "
"; + if (ent.author) { + cite += author_string(ent, "${L}, ${I}", ", ", " and "); + if (ent.year || ent.date) { + cite += ", "; + } + } + if (ent.year || ent.date) { + cite += (ent.year || ent.date) + ". "; + } else { + cite += ". "; + } + cite += venue_string(ent); + cite += doi_string(ent); + return cite; + /*var cite = author_string(ent, "${L}, ${I}", ", ", " and "); + if (ent.year || ent.date){ + cite += ", " + (ent.year || ent.date) + ". " + } else { + cite += ". " + } + cite += "" + ent.title + ". "; + cite += venue_string(ent); + cite += doi_string(ent); + cite += link_string(ent); + return cite*/ + } else { + return "?"; + } + } + function hover_cite(ent) { + if (ent) { + var cite = ""; + cite += "" + ent.title + ""; + cite += link_string(ent); + cite += "
"; + var a_str = author_string(ent, "${I} ${L}", ", ") + "."; + var v_str = venue_string(ent).trim() + " " + ent.year + ". " + doi_string(ent, true); + if ((a_str + v_str).length < Math.min(40, ent.title.length)) { + cite += a_str + " " + v_str; + } else { + cite += a_str + "
" + v_str; + } + return cite; + } else { + return "?"; + } + } + function domContentLoaded() { + return ['interactive', 'complete'].indexOf(document.readyState) !== -1; + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + function _moveLegacyAffiliationFormatIntoArray(frontMatter) { + // authors used to have propoerties "affiliation" and "affiliationURL". + // We now encourage using an array for affiliations containing objects with + // properties "name" and "url". + var _iterator4 = _createForOfIteratorHelper(frontMatter.authors), + _step4; + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var author = _step4.value; + var hasOldStyle = Boolean(author.affiliation); + var hasNewStyle = Boolean(author.affiliations); + if (!hasOldStyle) continue; + if (hasNewStyle) { + console.warn("Author ".concat(author.author, " has both old-style (\"affiliation\" & \"affiliationURL\") and new style (\"affiliations\") affiliation information!")); + } else { + var newAffiliation = { + "name": author.affiliation + }; + if (author.affiliationURL) newAffiliation.url = author.affiliationURL; + author.affiliations = [newAffiliation]; + } + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + return frontMatter; + } + function parseFrontmatter(element) { + var scriptTag = element.firstElementChild; + if (scriptTag) { + var type = scriptTag.getAttribute('type'); + if (type.split('/')[1] == 'json') { + var content = scriptTag.textContent; + var parsed = JSON.parse(content); + return _moveLegacyAffiliationFormatIntoArray(parsed); + } else { + console.error('Distill only supports JSON frontmatter tags anymore; no more YAML.'); + } + } else { + console.error('You added a frontmatter tag but did not provide a script tag with front matter data in it. Please take a look at our templates.'); + } + return {}; + } + var FrontMatter$1 = /*#__PURE__*/function (_HTMLElement) { + function FrontMatter$1() { + var _this4; + _classCallCheck(this, FrontMatter$1); + _this4 = _callSuper(this, FrontMatter$1); + var options = { + childList: true, + characterData: true, + subtree: true + }; + var observer = new MutationObserver(function (entries) { + var _iterator5 = _createForOfIteratorHelper(entries), + _step5; + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + var entry = _step5.value; + if (entry.target.nodeName === 'SCRIPT' || entry.type === 'characterData') { + var data = parseFrontmatter(_this4); + _this4.notify(data); + } + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + }); + observer.observe(_this4, options); + return _this4; + } + _inherits(FrontMatter$1, _HTMLElement); + return _createClass(FrontMatter$1, [{ + key: "notify", + value: function notify(data) { + var options = { + detail: data, + bubbles: true + }; + var event = new CustomEvent('onFrontMatterChanged', options); + document.dispatchEvent(event); + } + }], [{ + key: "is", + get: function get() { + return 'd-front-matter'; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + // no appendix -> add appendix + // title in front, no h1 -> add it + // no title in front, h1 -> read and put into frontMatter + // footnote -> footnote list + // break up bib + // if citation, no bib-list -> add citation-list + // if authors, no byline -> add byline + function optionalComponents(dom, data) { + var body = dom.body; + var article = body.querySelector('d-article'); + + // If we don't have an article tag, something weird is going on—giving up. + if (!article) { + console.warn('No d-article tag found; skipping adding optional components!'); + return; + } + var byline = dom.querySelector('d-byline'); + if (!byline) { + if (data.authors) { + byline = dom.createElement('d-byline'); + body.insertBefore(byline, article); + } else { + console.warn('No authors found in front matter; please add them before submission!'); + } + } + var title = dom.querySelector('d-title'); + if (!title) { + title = dom.createElement('d-title'); + body.insertBefore(title, byline); + } + var h1 = title.querySelector('h1'); + if (!h1) { + h1 = dom.createElement('h1'); + h1.textContent = data.title; + title.insertBefore(h1, title.firstChild); + } + var hasPassword = typeof data.password !== 'undefined'; + var interstitial = body.querySelector('d-interstitial'); + if (hasPassword && !interstitial) { + var inBrowser = typeof window !== 'undefined'; + var onLocalhost = inBrowser && window.location.hostname.includes('localhost'); + if (!inBrowser || !onLocalhost) { + interstitial = dom.createElement('d-interstitial'); + interstitial.password = data.password; + body.insertBefore(interstitial, body.firstChild); + } + } else if (!hasPassword && interstitial) { + interstitial.parentElement.removeChild(this); + } + var appendix = dom.querySelector('d-appendix'); + if (!appendix) { + appendix = dom.createElement('d-appendix'); + dom.body.appendChild(appendix); + } + var footnoteList = dom.querySelector('d-footnote-list'); + if (!footnoteList) { + footnoteList = dom.createElement('d-footnote-list'); + appendix.appendChild(footnoteList); + } + var citationList = dom.querySelector('d-citation-list'); + if (!citationList) { + citationList = dom.createElement('d-citation-list'); + appendix.appendChild(citationList); + } + } + + // Copyright 2018 The Distill Template Authors + + var frontMatter = new FrontMatter(); + var Controller = { + frontMatter: frontMatter, + waitingOn: { + bibliography: [], + citations: [] + }, + listeners: { + onCiteKeyCreated: function onCiteKeyCreated(event) { + var _event$detail = _slicedToArray(event.detail, 2), + citeTag = _event$detail[0], + keys = _event$detail[1]; + + // ensure we have citations + if (!frontMatter.citationsCollected) { + // console.debug('onCiteKeyCreated, but unresolved dependency ("citations"). Enqueing.'); + Controller.waitingOn.citations.push(function () { + return Controller.listeners.onCiteKeyCreated(event); + }); + return; + } + + // ensure we have a loaded bibliography + if (!frontMatter.bibliographyParsed) { + // console.debug('onCiteKeyCreated, but unresolved dependency ("bibliography"). Enqueing.'); + Controller.waitingOn.bibliography.push(function () { + return Controller.listeners.onCiteKeyCreated(event); + }); + return; + } + var numbers = keys.map(function (key) { + return frontMatter.citations.indexOf(key); + }); + citeTag.numbers = numbers; + var entries = keys.map(function (key) { + return frontMatter.bibliography.get(key); + }); + citeTag.entries = entries; + }, + onCiteKeyChanged: function onCiteKeyChanged() { + // const [citeTag, keys] = event.detail; + + // update citations + frontMatter.citations = collect_citations(); + frontMatter.citationsCollected = true; + var _iterator6 = _createForOfIteratorHelper(Controller.waitingOn.citations.slice()), + _step6; + try { + for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { + var waitingCallback = _step6.value; + waitingCallback(); + } + + // update bibliography + } catch (err) { + _iterator6.e(err); + } finally { + _iterator6.f(); + } + var citationListTag = document.querySelector("d-citation-list"); + var bibliographyEntries = new Map(frontMatter.citations.map(function (citationKey) { + return [citationKey, frontMatter.bibliography.get(citationKey)]; + })); + citationListTag.citations = bibliographyEntries; + var citeTags = document.querySelectorAll("d-cite"); + var _iterator7 = _createForOfIteratorHelper(citeTags), + _step7; + try { + for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { + var citeTag = _step7.value; + console.log(citeTag); + var keys = citeTag.keys; + var numbers = keys.map(function (key) { + return frontMatter.citations.indexOf(key); + }); + citeTag.numbers = numbers; + var entries = keys.map(function (key) { + return frontMatter.bibliography.get(key); + }); + citeTag.entries = entries; + } + } catch (err) { + _iterator7.e(err); + } finally { + _iterator7.f(); + } + }, + onCiteKeyRemoved: function onCiteKeyRemoved(event) { + Controller.listeners.onCiteKeyChanged(event); + }, + onBibliographyChanged: function onBibliographyChanged(event) { + var citationListTag = document.querySelector("d-citation-list"); + var bibliography = event.detail; + frontMatter.bibliography = bibliography; + frontMatter.bibliographyParsed = true; + var _iterator8 = _createForOfIteratorHelper(Controller.waitingOn.bibliography.slice()), + _step8; + try { + for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { + var waitingCallback = _step8.value; + waitingCallback(); + } + + // ensure we have citations + } catch (err) { + _iterator8.e(err); + } finally { + _iterator8.f(); + } + if (!frontMatter.citationsCollected) { + Controller.waitingOn.citations.push(function () { + Controller.listeners.onBibliographyChanged({ + target: event.target, + detail: event.detail + }); + }); + return; + } + if (citationListTag.hasAttribute("distill-prerendered")) { + console.debug("Citation list was prerendered; not updating it."); + } else { + var entries = new Map(frontMatter.citations.map(function (citationKey) { + return [citationKey, frontMatter.bibliography.get(citationKey)]; + })); + citationListTag.citations = entries; + } + }, + onFootnoteChanged: function onFootnoteChanged() { + // const footnote = event.detail; + //TODO: optimize to only update current footnote + var footnotesList = document.querySelector("d-footnote-list"); + if (footnotesList) { + var footnotes = document.querySelectorAll("d-footnote"); + footnotesList.footnotes = footnotes; + } + }, + onFrontMatterChanged: function onFrontMatterChanged(event) { + var data = event.detail; + mergeFromYMLFrontmatter(frontMatter, data); + var interstitial = document.querySelector("d-interstitial"); + if (interstitial) { + if (typeof frontMatter.password !== "undefined") { + interstitial.password = frontMatter.password; + } else { + interstitial.parentElement.removeChild(interstitial); + } + } + var prerendered = document.body.hasAttribute("distill-prerendered"); + if (!prerendered && domContentLoaded()) { + optionalComponents(document, frontMatter); + var appendix = document.querySelector("distill-appendix"); + if (appendix) { + appendix.frontMatter = frontMatter; + } + var _byline = document.querySelector("d-byline"); + if (_byline) { + _byline.frontMatter = frontMatter; + } + if (data.katex) { + DMath.katexOptions = data.katex; + } + } + }, + DOMContentLoaded: function DOMContentLoaded() { + if (Controller.loaded) { + console.warn("Controller received DOMContentLoaded but was already loaded!"); + return; + } else if (!domContentLoaded()) { + console.warn("Controller received DOMContentLoaded at document.readyState: " + document.readyState + "!"); + return; + } else { + Controller.loaded = true; + console.debug("Runlevel 4: Controller running DOMContentLoaded"); + } + var frontMatterTag = document.querySelector("d-front-matter"); + if (frontMatterTag) { + var data = parseFrontmatter(frontMatterTag); + Controller.listeners.onFrontMatterChanged({ + detail: data + }); + } + + // Resolving "citations" dependency due to initial DOM load + frontMatter.citations = collect_citations(); + frontMatter.citationsCollected = true; + var _iterator9 = _createForOfIteratorHelper(Controller.waitingOn.citations.slice()), + _step9; + try { + for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { + var _waitingCallback = _step9.value; + _waitingCallback(); + } + } catch (err) { + _iterator9.e(err); + } finally { + _iterator9.f(); + } + if (frontMatter.bibliographyParsed) { + var _iterator10 = _createForOfIteratorHelper(Controller.waitingOn.bibliography.slice()), + _step10; + try { + for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) { + var waitingCallback = _step10.value; + waitingCallback(); + } + } catch (err) { + _iterator10.e(err); + } finally { + _iterator10.f(); + } + } + var footnotesList = document.querySelector("d-footnote-list"); + if (footnotesList) { + var footnotes = document.querySelectorAll("d-footnote"); + footnotesList.footnotes = footnotes; + } + } + } // listeners + }; // Controller + + var base = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nhtml {\n font-size: 14px;\n\tline-height: 1.6em;\n /* font-family: \"Libre Franklin\", \"Helvetica Neue\", sans-serif; */\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", Arial, sans-serif;\n /*, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";*/\n text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\n\n@media(min-width: 768px) {\n html {\n font-size: 16px;\n }\n}\n\nbody {\n margin: 0;\n}\n\na {\n color: #004276;\n}\n\nfigure {\n margin: 0;\n}\n\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\ntable th {\n\ttext-align: left;\n}\n\ntable thead {\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n}\n\ntable thead th {\n padding-bottom: 0.5em;\n}\n\ntable tbody :first-child td {\n padding-top: 0.5em;\n}\n\npre {\n overflow: auto;\n max-width: 100%;\n}\n\np {\n margin-top: 0;\n margin-bottom: 1em;\n}\n\nsup, sub {\n vertical-align: baseline;\n position: relative;\n top: -0.4em;\n line-height: 1em;\n}\n\nsub {\n top: 0.4em;\n}\n\n.kicker,\n.marker {\n font-size: 15px;\n font-weight: 600;\n color: rgba(0, 0, 0, 0.5);\n}\n\n\n/* Headline */\n\n@media(min-width: 1024px) {\n d-title h1 span {\n display: block;\n }\n}\n\n/* Figure */\n\nfigure {\n position: relative;\n margin-bottom: 2.5em;\n margin-top: 1.5em;\n}\n\nfigcaption+figure {\n\n}\n\nfigure img {\n width: 100%;\n}\n\nfigure svg text,\nfigure svg tspan {\n}\n\nfigcaption,\n.figcaption {\n color: rgba(0, 0, 0, 0.6);\n font-size: 12px;\n line-height: 1.5em;\n}\n\n@media(min-width: 1024px) {\nfigcaption,\n.figcaption {\n font-size: 13px;\n }\n}\n\nfigure.external img {\n background: white;\n border: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);\n padding: 18px;\n box-sizing: border-box;\n}\n\nfigcaption a {\n color: rgba(0, 0, 0, 0.6);\n}\n\nfigcaption b,\nfigcaption strong, {\n font-weight: 600;\n color: rgba(0, 0, 0, 1.0);\n}\n"; + var layout = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@supports not (display: grid) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n display: block;\n padding: 8px;\n }\n}\n\n.base-grid,\ndistill-header,\nd-title,\nd-abstract,\nd-article,\nd-appendix,\ndistill-appendix,\nd-byline,\nd-footnote-list,\nd-citation-list,\ndistill-footer {\n display: grid;\n justify-items: stretch;\n grid-template-columns: [screen-start] 8px [page-start kicker-start text-start gutter-start middle-start] 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr [text-end page-end gutter-end kicker-end middle-end] 8px [screen-end];\n grid-column-gap: 8px;\n}\n\n.grid {\n display: grid;\n grid-column-gap: 8px;\n}\n\n@media(min-width: 768px) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n grid-template-columns: [screen-start] 1fr [page-start kicker-start middle-start text-start] 45px 45px 45px 45px 45px 45px 45px 45px [ kicker-end text-end gutter-start] 45px [middle-end] 45px [page-end gutter-end] 1fr [screen-end];\n grid-column-gap: 16px;\n }\n\n .grid {\n grid-column-gap: 16px;\n }\n}\n\n@media(min-width: 1000px) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n grid-template-columns: [screen-start] 1fr [page-start kicker-start] 50px [middle-start] 50px [text-start kicker-end] 50px 50px 50px 50px 50px 50px 50px 50px [text-end gutter-start] 50px [middle-end] 50px [page-end gutter-end] 1fr [screen-end];\n grid-column-gap: 16px;\n }\n\n .grid {\n grid-column-gap: 16px;\n }\n}\n\n@media(min-width: 1180px) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n grid-template-columns: [screen-start] 1fr [page-start kicker-start] 60px [middle-start] 60px [text-start kicker-end] 60px 60px 60px 60px 60px 60px 60px 60px [text-end gutter-start] 60px [middle-end] 60px [page-end gutter-end] 1fr [screen-end];\n grid-column-gap: 32px;\n }\n\n .grid {\n grid-column-gap: 32px;\n }\n}\n\n\n\n\n.base-grid {\n grid-column: screen;\n}\n\n/* .l-body,\nd-article > * {\n grid-column: text;\n}\n\n.l-page,\nd-title > *,\nd-figure {\n grid-column: page;\n} */\n\n.l-gutter {\n grid-column: gutter;\n}\n\n.l-text,\n.l-body {\n grid-column: text;\n}\n\n.l-page {\n grid-column: page;\n}\n\n.l-body-outset {\n grid-column: middle;\n}\n\n.l-page-outset {\n grid-column: page;\n}\n\n.l-screen {\n grid-column: screen;\n}\n\n.l-screen-inset {\n grid-column: screen;\n padding-left: 16px;\n padding-left: 16px;\n}\n\n\n/* Aside */\n\nd-article aside {\n grid-column: gutter;\n font-size: 12px;\n line-height: 1.6em;\n color: rgba(0, 0, 0, 0.6)\n}\n\n@media(min-width: 768px) {\n aside {\n grid-column: gutter;\n }\n\n .side {\n grid-column: gutter;\n }\n}\n"; + var print = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@media print {\n\n @page {\n size: 8in 11in;\n @bottom-right {\n content: counter(page) \" of \" counter(pages);\n }\n }\n\n html {\n /* no general margins -- CSS Grid takes care of those */\n }\n\n p, code {\n page-break-inside: avoid;\n }\n\n h2, h3 {\n page-break-after: avoid;\n }\n\n d-header {\n visibility: hidden;\n }\n\n d-footer {\n display: none!important;\n }\n\n}\n"; + var byline = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nd-byline {\n contain: style;\n overflow: hidden;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n font-size: 0.8rem;\n line-height: 1.8em;\n padding: 1.5rem 0;\n min-height: 1.8em;\n}\n\n\nd-byline .byline {\n grid-template-columns: 1fr 1fr;\n grid-column: text;\n}\n\n@media(min-width: 768px) {\n d-byline .byline {\n grid-template-columns: 1fr 1fr 1fr 1fr;\n }\n}\n\nd-byline .authors-affiliations {\n grid-column-end: span 2;\n grid-template-columns: 1fr 1fr;\n margin-bottom: 1em;\n}\n\n@media(min-width: 768px) {\n d-byline .authors-affiliations {\n margin-bottom: 0;\n }\n}\n\nd-byline h3 {\n font-size: 0.6rem;\n font-weight: 400;\n color: rgba(0, 0, 0, 0.5);\n margin: 0;\n text-transform: uppercase;\n}\n\nd-byline p {\n margin: 0;\n}\n\nd-byline a,\nd-article d-byline a {\n color: rgba(0, 0, 0, 0.8);\n text-decoration: none;\n border-bottom: none;\n}\n\nd-article d-byline a:hover {\n text-decoration: underline;\n border-bottom: none;\n}\n\nd-byline p.author {\n font-weight: 500;\n}\n\nd-byline .affiliations {\n\n}\n"; + var article = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nd-article {\n contain: layout style;\n overflow-x: hidden;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n padding-top: 2rem;\n color: rgba(0, 0, 0, 0.8);\n}\n\nd-article > * {\n grid-column: text;\n}\n\n@media(min-width: 768px) {\n d-article {\n font-size: 16px;\n }\n}\n\n@media(min-width: 1024px) {\n d-article {\n font-size: 1.06rem;\n line-height: 1.7em;\n }\n}\n\n\n/* H2 */\n\n\nd-article .marker {\n text-decoration: none;\n border: none;\n counter-reset: section;\n grid-column: kicker;\n line-height: 1.7em;\n}\n\nd-article .marker:hover {\n border: none;\n}\n\nd-article .marker span {\n padding: 0 3px 4px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n position: relative;\n top: 4px;\n}\n\nd-article .marker:hover span {\n color: rgba(0, 0, 0, 0.7);\n border-bottom: 1px solid rgba(0, 0, 0, 0.7);\n}\n\nd-article h2 {\n font-weight: 600;\n font-size: 24px;\n line-height: 1.25em;\n margin: 2rem 0 1.5rem 0;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n padding-bottom: 1rem;\n}\n\n@media(min-width: 1024px) {\n d-article h2 {\n font-size: 36px;\n }\n}\n\n/* H3 */\n\nd-article h3 {\n font-weight: 700;\n font-size: 18px;\n line-height: 1.4em;\n margin-bottom: 1em;\n margin-top: 2em;\n}\n\n@media(min-width: 1024px) {\n d-article h3 {\n font-size: 20px;\n }\n}\n\n/* H4 */\n\nd-article h4 {\n font-weight: 600;\n text-transform: uppercase;\n font-size: 14px;\n line-height: 1.4em;\n}\n\nd-article a {\n color: inherit;\n}\n\nd-article p,\nd-article ul,\nd-article ol,\nd-article blockquote {\n margin-top: 0;\n margin-bottom: 1em;\n margin-left: 0;\n margin-right: 0;\n}\n\nd-article blockquote {\n border-left: 2px solid rgba(0, 0, 0, 0.2);\n padding-left: 2em;\n font-style: italic;\n color: rgba(0, 0, 0, 0.6);\n}\n\nd-article a {\n border-bottom: 1px solid rgba(0, 0, 0, 0.4);\n text-decoration: none;\n}\n\nd-article a:hover {\n border-bottom: 1px solid rgba(0, 0, 0, 0.8);\n}\n\nd-article .link {\n text-decoration: underline;\n cursor: pointer;\n}\n\nd-article ul,\nd-article ol {\n padding-left: 24px;\n}\n\nd-article li {\n margin-bottom: 0.2em;\n margin-left: 0;\n padding-left: 0;\n}\n\nd-article li:last-child {\n margin-bottom: 0;\n}\n\nd-article pre {\n font-size: 14px;\n margin-bottom: 20px;\n}\n\nd-article hr {\n grid-column: screen;\n width: 100%;\n border: none;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 60px;\n margin-bottom: 60px;\n}\n\nd-article section {\n margin-top: 60px;\n margin-bottom: 60px;\n}\n\nd-article span.equation-mimic {\n font-family: georgia;\n font-size: 115%;\n font-style: italic;\n}\n\nd-article > d-code,\nd-article section > d-code {\n display: block;\n}\n\nd-article > d-math[block],\nd-article section > d-math[block] {\n display: block;\n}\n\n@media (max-width: 768px) {\n d-article > d-code,\n d-article section > d-code,\n d-article > d-math[block],\n d-article section > d-math[block] {\n overflow-x: scroll;\n -ms-overflow-style: none; // IE 10+\n overflow: -moz-scrollbars-none; // Firefox\n }\n\n d-article > d-code::-webkit-scrollbar,\n d-article section > d-code::-webkit-scrollbar,\n d-article > d-math[block]::-webkit-scrollbar,\n d-article section > d-math[block]::-webkit-scrollbar {\n display: none; // Safari and Chrome\n }\n}\n\nd-article .citation {\n color: #668;\n cursor: pointer;\n}\n\nd-include {\n width: auto;\n display: block;\n}\n\nd-figure {\n contain: layout style;\n}\n\n/* KaTeX */\n\n.katex, .katex-prerendered {\n contain: style;\n display: inline-block;\n}\n\n/* Tables */\n\nd-article table {\n border-collapse: collapse;\n margin-bottom: 1.5rem;\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n}\n\nd-article table th {\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n}\n\nd-article table td {\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n}\n\nd-article table tr:last-of-type td {\n border-bottom: none;\n}\n\nd-article table th,\nd-article table td {\n font-size: 15px;\n padding: 2px 8px;\n}\n\nd-article table tbody :first-child td {\n padding-top: 2px;\n}\n"; + var title = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nd-title {\n padding: 2rem 0 1.5rem;\n contain: layout style;\n overflow-x: hidden;\n}\n\n@media(min-width: 768px) {\n d-title {\n padding: 4rem 0 1.5rem;\n }\n}\n\nd-title h1 {\n grid-column: text;\n font-size: 40px;\n font-weight: 700;\n line-height: 1.1em;\n margin: 0 0 0.5rem;\n}\n\n@media(min-width: 768px) {\n d-title h1 {\n font-size: 50px;\n }\n}\n\nd-title p {\n font-weight: 300;\n font-size: 1.2rem;\n line-height: 1.55em;\n grid-column: text;\n}\n\nd-title .status {\n margin-top: 0px;\n font-size: 12px;\n color: #009688;\n opacity: 0.8;\n grid-column: kicker;\n}\n\nd-title .status span {\n line-height: 1;\n display: inline-block;\n padding: 6px 0;\n border-bottom: 1px solid #80cbc4;\n font-size: 11px;\n text-transform: uppercase;\n}\n"; + + // Copyright 2018 The Distill Template Authors + + var styles = base + layout + title + byline + article + math + print; + function makeStyleTag(dom) { + var styleTagId = 'distill-prerendered-styles'; + var prerenderedTag = dom.getElementById(styleTagId); + if (!prerenderedTag) { + var styleTag = dom.createElement('style'); + styleTag.id = styleTagId; + styleTag.type = 'text/css'; + var cssTextTag = dom.createTextNode(styles); + styleTag.appendChild(cssTextTag); + var firstScriptTag = dom.head.querySelector('script'); + dom.head.insertBefore(styleTag, firstScriptTag); + } + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + function addPolyfill(polyfill, polyfillLoadedCallback) { + console.debug('Runlevel 0: Polyfill required: ' + polyfill.name); + var script = document.createElement('script'); + script.src = polyfill.url; + script.async = false; + if (polyfillLoadedCallback) { + script.onload = function () { + polyfillLoadedCallback(polyfill); + }; + } + script.onerror = function () { + new Error('Runlevel 0: Polyfills failed to load script ' + polyfill.name); + }; + document.head.appendChild(script); + } + var polyfills = [{ + name: 'WebComponents', + support: function support() { + return 'customElements' in window && 'attachShadow' in Element.prototype && 'getRootNode' in Element.prototype && 'content' in document.createElement('template') && 'Promise' in window && 'from' in Array; + }, + url: 'https://distill.pub/third-party/polyfills/webcomponents-lite.js' + }, { + name: 'IntersectionObserver', + support: function support() { + return 'IntersectionObserver' in window && 'IntersectionObserverEntry' in window; + }, + url: 'https://distill.pub/third-party/polyfills/intersection-observer.js' + }]; + var Polyfills = /*#__PURE__*/function () { + function Polyfills() { + _classCallCheck(this, Polyfills); + } + return _createClass(Polyfills, null, [{ + key: "browserSupportsAllFeatures", + value: function browserSupportsAllFeatures() { + return polyfills.every(function (poly) { + return poly.support(); + }); + } + }, { + key: "load", + value: function load(callback) { + // Define an intermediate callback that checks if all is loaded. + var polyfillLoaded = function polyfillLoaded(polyfill) { + polyfill.loaded = true; + console.debug('Runlevel 0: Polyfill has finished loading: ' + polyfill.name); + // console.debug(window[polyfill.name]); + if (Polyfills.neededPolyfills.every(function (poly) { + return poly.loaded; + })) { + console.debug('Runlevel 0: All required polyfills have finished loading.'); + console.debug('Runlevel 0->1.'); + window.distillRunlevel = 1; + callback(); + } + }; + // Add polyfill script tags + var _iterator11 = _createForOfIteratorHelper(Polyfills.neededPolyfills), + _step11; + try { + for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) { + var polyfill = _step11.value; + addPolyfill(polyfill, polyfillLoaded); + } + } catch (err) { + _iterator11.e(err); + } finally { + _iterator11.f(); + } + } + }, { + key: "neededPolyfills", + get: function get() { + if (!Polyfills._neededPolyfills) { + Polyfills._neededPolyfills = polyfills.filter(function (poly) { + return !poly.support(); + }); + } + return Polyfills._neededPolyfills; + } + }]); + }(); // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + // const marginSmall = 16; + // const marginLarge = 3 * marginSmall; + // const margin = marginSmall + marginLarge; + // const gutter = marginSmall; + // const outsetAmount = margin / 2; + // const numCols = 4; + // const numGutters = numCols - 1; + // const columnWidth = (768 - 2 * marginLarge - numGutters * gutter) / numCols; + // + // const screenwidth = 768; + // const pageWidth = screenwidth - 2 * marginLarge; + // const bodyWidth = pageWidth - columnWidth - gutter; + function body(selector) { + return "".concat(selector, " {\n grid-column: left / text;\n }\n "); + } + + // Copyright 2018 The Distill Template Authors + + var T$1 = Template('d-abstract', "\n\n\n\n")); + var Abstract = /*#__PURE__*/function (_T$) { + function Abstract() { + _classCallCheck(this, Abstract); + return _callSuper(this, Abstract, arguments); + } + _inherits(Abstract, _T$); + return _createClass(Abstract); + }(T$1(HTMLElement)); // Copyright 2018 The Distill Template Authors + var T$2 = Template('d-appendix', "\n\n\n", false); + var Appendix = /*#__PURE__*/function (_T$2) { + function Appendix() { + _classCallCheck(this, Appendix); + return _callSuper(this, Appendix, arguments); + } + _inherits(Appendix, _T$2); + return _createClass(Appendix); + }(T$2(HTMLElement)); // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + // import { Template } from '../mixins/template'; + // import { Controller } from '../controller'; + var isOnlyWhitespace = /^\s*$/; + var Article = /*#__PURE__*/function (_HTMLElement2) { + function Article() { + var _this5; + _classCallCheck(this, Article); + _this5 = _callSuper(this, Article); + new MutationObserver(function (mutations) { + var _iterator12 = _createForOfIteratorHelper(mutations), + _step12; + try { + for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) { + var mutation = _step12.value; + var _iterator13 = _createForOfIteratorHelper(mutation.addedNodes), + _step13; + try { + for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) { + var addedNode = _step13.value; + switch (addedNode.nodeName) { + case '#text': + { + // usually text nodes are only linebreaks. + var text = addedNode.nodeValue; + if (!isOnlyWhitespace.test(text)) { + console.warn('Use of unwrapped text in distill articles is discouraged as it breaks layout! Please wrap any text in a or

tag. We found the following text: ' + text); + var wrapper = document.createElement('span'); + wrapper.innerHTML = addedNode.nodeValue; + addedNode.parentNode.insertBefore(wrapper, addedNode); + addedNode.parentNode.removeChild(addedNode); + } + } + break; + } + } + } catch (err) { + _iterator13.e(err); + } finally { + _iterator13.f(); + } + } + } catch (err) { + _iterator12.e(err); + } finally { + _iterator12.f(); + } + }).observe(_this5, { + childList: true + }); + return _this5; + } + _inherits(Article, _HTMLElement2); + return _createClass(Article, null, [{ + key: "is", + get: function get() { + return 'd-article'; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g : typeof self !== 'undefined' ? self : {}; + function createCommonjsModule(fn, module) { + return module = { + exports: {} + }, fn(module, module.exports), module.exports; + } + var bibtexParse = createCommonjsModule(function (module, exports) { + /* start bibtexParse 0.0.22 */ + + //Original work by Henrik Muehe (c) 2010 + // + //CommonJS port by Mikola Lysenko 2013 + // + //Port to Browser lib by ORCID / RCPETERS + // + //Issues: + //no comment handling within strings + //no string concatenation + //no variable values yet + //Grammar implemented here: + //bibtex -> (string | preamble | comment | entry)*; + //string -> '@STRING' '{' key_equals_value '}'; + //preamble -> '@PREAMBLE' '{' value '}'; + //comment -> '@COMMENT' '{' value '}'; + //entry -> '@' key '{' key ',' key_value_list '}'; + //key_value_list -> key_equals_value (',' key_equals_value)*; + //key_equals_value -> key '=' value; + //value -> value_quotes | value_braces | key; + //value_quotes -> '"' .*? '"'; // not quite + //value_braces -> '{' .*? '"'; // not quite + (function (exports) { + function BibtexParser() { + this.months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"]; + this.notKey = [',', '{', '}', ' ', '=']; + this.pos = 0; + this.input = ""; + this.entries = new Array(); + this.currentEntry = ""; + this.setInput = function (t) { + this.input = t; + }; + this.getEntries = function () { + return this.entries; + }; + this.isWhitespace = function (s) { + return s == ' ' || s == '\r' || s == '\t' || s == '\n'; + }; + this.match = function (s, canCommentOut) { + if (canCommentOut == undefined || canCommentOut == null) canCommentOut = true; + this.skipWhitespace(canCommentOut); + if (this.input.substring(this.pos, this.pos + s.length) == s) { + this.pos += s.length; + } else { + throw "Token mismatch, expected " + s + ", found " + this.input.substring(this.pos); + } + this.skipWhitespace(canCommentOut); + }; + this.tryMatch = function (s, canCommentOut) { + if (canCommentOut == undefined || canCommentOut == null) canCommentOut = true; + this.skipWhitespace(canCommentOut); + if (this.input.substring(this.pos, this.pos + s.length) == s) { + return true; + } else { + return false; + } + }; + + /* when search for a match all text can be ignored, not just white space */ + this.matchAt = function () { + while (this.input.length > this.pos && this.input[this.pos] != '@') { + this.pos++; + } + if (this.input[this.pos] == '@') { + return true; + } + return false; + }; + this.skipWhitespace = function (canCommentOut) { + while (this.isWhitespace(this.input[this.pos])) { + this.pos++; + } + if (this.input[this.pos] == "%" && canCommentOut == true) { + while (this.input[this.pos] != "\n") { + this.pos++; + } + this.skipWhitespace(canCommentOut); + } + }; + this.value_braces = function () { + var bracecount = 0; + this.match("{", false); + var start = this.pos; + var escaped = false; + while (true) { + if (!escaped) { + if (this.input[this.pos] == '}') { + if (bracecount > 0) { + bracecount--; + } else { + var end = this.pos; + this.match("}", false); + return this.input.substring(start, end); + } + } else if (this.input[this.pos] == '{') { + bracecount++; + } else if (this.pos >= this.input.length - 1) { + throw "Unterminated value"; + } + } + if (this.input[this.pos] == '\\' && escaped == false) escaped = true;else escaped = false; + this.pos++; + } + }; + this.value_comment = function () { + var str = ''; + var brcktCnt = 0; + while (!(this.tryMatch("}", false) && brcktCnt == 0)) { + str = str + this.input[this.pos]; + if (this.input[this.pos] == '{') brcktCnt++; + if (this.input[this.pos] == '}') brcktCnt--; + if (this.pos >= this.input.length - 1) { + throw "Unterminated value:" + this.input.substring(start); + } + this.pos++; + } + return str; + }; + this.value_quotes = function () { + this.match('"', false); + var start = this.pos; + var escaped = false; + while (true) { + if (!escaped) { + if (this.input[this.pos] == '"') { + var end = this.pos; + this.match('"', false); + return this.input.substring(start, end); + } else if (this.pos >= this.input.length - 1) { + throw "Unterminated value:" + this.input.substring(start); + } + } + if (this.input[this.pos] == '\\' && escaped == false) escaped = true;else escaped = false; + this.pos++; + } + }; + this.single_value = function () { + var start = this.pos; + if (this.tryMatch("{")) { + return this.value_braces(); + } else if (this.tryMatch('"')) { + return this.value_quotes(); + } else { + var k = this.key(); + if (k.match("^[0-9]+$")) return k;else if (this.months.indexOf(k.toLowerCase()) >= 0) return k.toLowerCase();else throw "Value expected:" + this.input.substring(start) + ' for key: ' + k; + } + }; + this.value = function () { + var values = []; + values.push(this.single_value()); + while (this.tryMatch("#")) { + this.match("#"); + values.push(this.single_value()); + } + return values.join(""); + }; + this.key = function () { + var start = this.pos; + while (true) { + if (this.pos >= this.input.length) { + throw "Runaway key"; + } // а-яА-Я is Cyrillic + //console.log(this.input[this.pos]); + if (this.notKey.indexOf(this.input[this.pos]) >= 0) { + return this.input.substring(start, this.pos); + } else { + this.pos++; + } + } + }; + this.key_equals_value = function () { + var key = this.key(); + if (this.tryMatch("=")) { + this.match("="); + var val = this.value(); + return [key, val]; + } else { + throw "... = value expected, equals sign missing:" + this.input.substring(this.pos); + } + }; + this.key_value_list = function () { + var kv = this.key_equals_value(); + this.currentEntry['entryTags'] = {}; + this.currentEntry['entryTags'][kv[0]] = kv[1]; + while (this.tryMatch(",")) { + this.match(","); + // fixes problems with commas at the end of a list + if (this.tryMatch("}")) { + break; + } + kv = this.key_equals_value(); + this.currentEntry['entryTags'][kv[0]] = kv[1]; + } + }; + this.entry_body = function (d) { + this.currentEntry = {}; + this.currentEntry['citationKey'] = this.key(); + this.currentEntry['entryType'] = d.substring(1); + this.match(","); + this.key_value_list(); + this.entries.push(this.currentEntry); + }; + this.directive = function () { + this.match("@"); + return "@" + this.key(); + }; + this.preamble = function () { + this.currentEntry = {}; + this.currentEntry['entryType'] = 'PREAMBLE'; + this.currentEntry['entry'] = this.value_comment(); + this.entries.push(this.currentEntry); + }; + this.comment = function () { + this.currentEntry = {}; + this.currentEntry['entryType'] = 'COMMENT'; + this.currentEntry['entry'] = this.value_comment(); + this.entries.push(this.currentEntry); + }; + this.entry = function (d) { + this.entry_body(d); + }; + this.bibtex = function () { + while (this.matchAt()) { + var d = this.directive(); + this.match("{"); + if (d == "@STRING") { + this.string(); + } else if (d == "@PREAMBLE") { + this.preamble(); + } else if (d == "@COMMENT") { + this.comment(); + } else { + this.entry(d); + } + this.match("}"); + } + }; + } + exports.toJSON = function (bibtex) { + var b = new BibtexParser(); + b.setInput(bibtex); + b.bibtex(); + return b.entries; + }; + + /* added during hackathon don't hate on me */ + exports.toBibtex = function (json) { + var out = ''; + for (var i in json) { + out += "@" + json[i].entryType; + out += '{'; + if (json[i].citationKey) out += json[i].citationKey + ', '; + if (json[i].entry) out += json[i].entry; + if (json[i].entryTags) { + var tags = ''; + for (var jdx in json[i].entryTags) { + if (tags.length != 0) tags += ', '; + tags += jdx + '= {' + json[i].entryTags[jdx] + '}'; + } + out += tags; + } + out += '}\n\n'; + } + return out; + }; + })(exports); + + /* end bibtexParse */ + }); + + // Copyright 2018 The Distill Template Authors + + function normalizeTag(string) { + return string.replace(/[\t\n ]+/g, ' ').replace(/{\\["^`.'acu~Hvs]( )?([a-zA-Z])}/g, function (full, x, _char) { + return _char; + }).replace(/{\\([a-zA-Z])}/g, function (full, _char2) { + return _char2; + }); + } + function parseBibtex(bibtex) { + var bibliography = new Map(); + var parsedEntries = bibtexParse.toJSON(bibtex); + var _iterator14 = _createForOfIteratorHelper(parsedEntries), + _step14; + try { + for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) { + var entry = _step14.value; + // normalize tags; note entryTags is an object, not Map + for (var _i = 0, _Object$entries = Object.entries(entry.entryTags); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), + key = _Object$entries$_i[0], + value = _Object$entries$_i[1]; + entry.entryTags[key.toLowerCase()] = normalizeTag(value); + } + entry.entryTags.type = entry.entryType; + // add to bibliography + bibliography.set(entry.citationKey, entry.entryTags); + } + } catch (err) { + _iterator14.e(err); + } finally { + _iterator14.f(); + } + return bibliography; + } + function serializeFrontmatterToBibtex(frontMatter) { + return "@article{".concat(frontMatter.slug, ",\n author = {").concat(frontMatter.bibtexAuthors, "},\n title = {").concat(frontMatter.title, "},\n journal = {").concat(frontMatter.journal.title, "},\n year = {").concat(frontMatter.publishedYear, "},\n note = {").concat(frontMatter.url, "},\n doi = {").concat(frontMatter.doi, "}\n}"); + } + + // Copyright 2018 The Distill Template Authors + var Bibliography = /*#__PURE__*/function (_HTMLElement3) { + function Bibliography() { + var _this6; + _classCallCheck(this, Bibliography); + _this6 = _callSuper(this, Bibliography); + + // set up mutation observer + var options = { + childList: true, + characterData: true, + subtree: true + }; + var observer = new MutationObserver(function (entries) { + var _iterator15 = _createForOfIteratorHelper(entries), + _step15; + try { + for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) { + var entry = _step15.value; + if (entry.target.nodeName === 'SCRIPT' || entry.type === 'characterData') { + _this6.parseIfPossible(); + } + } + } catch (err) { + _iterator15.e(err); + } finally { + _iterator15.f(); + } + }); + observer.observe(_this6, options); + return _this6; + } + _inherits(Bibliography, _HTMLElement3); + return _createClass(Bibliography, [{ + key: "connectedCallback", + value: function connectedCallback() { + var _this7 = this; + requestAnimationFrame(function () { + _this7.parseIfPossible(); + }); + } + }, { + key: "parseIfPossible", + value: function parseIfPossible() { + var scriptTag = this.querySelector('script'); + if (!scriptTag) return; + if (scriptTag.type == 'text/bibtex') { + var newBibtex = scriptTag.textContent; + if (this.bibtex !== newBibtex) { + this.bibtex = newBibtex; + var bibliography = parseBibtex(this.bibtex); + this.notify(bibliography); + } + } else if (scriptTag.type == 'text/json') { + var _bibliography = new Map(JSON.parse(scriptTag.textContent)); + this.notify(_bibliography); + } else { + console.warn('Unsupported bibliography script tag type: ' + scriptTag.type); + } + } + }, { + key: "notify", + value: function notify(bibliography) { + var options = { + detail: bibliography, + bubbles: true + }; + var event = new CustomEvent('onBibliographyChanged', options); + this.dispatchEvent(event); + } + + /* observe 'src' attribute */ + }, { + key: "receivedBibtex", + value: function receivedBibtex(event) { + var bibliography = parseBibtex(event.target.response); + this.notify(bibliography); + } + }, { + key: "attributeChangedCallback", + value: function attributeChangedCallback(name, oldValue, newValue) { + var _this8 = this; + var oReq = new XMLHttpRequest(); + oReq.onload = function (e) { + return _this8.receivedBibtex(e); + }; + oReq.onerror = function () { + return console.warn("Could not load Bibtex! (tried ".concat(newValue, ")")); + }; + oReq.responseType = 'text'; + oReq.open('GET', newValue, true); + oReq.send(); + } + }], [{ + key: "is", + get: function get() { + return 'd-bibliography'; + } + }, { + key: "observedAttributes", + get: function get() { + return ['src']; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + // import style from '../styles/d-byline.css'; + function bylineTemplate(frontMatter) { + return "\n

\n
\n

Authors

\n
\n ".concat(frontMatter.authors.map(function (author, i) { + return "\n \n ".concat(author.personalURL ? "\n ").concat(author.name) + (i + 1 < frontMatter.authors.length ? "," : "") + "" : "\n ".concat(author.name) + (i + 1 < frontMatter.authors.length ? "," : "") + "", "\n \n "); + }).join(''), "\n
\n
\n
\n

Organization

\n
Hugging Face\n
\n
\n
\n

Published

\n
Apr 8, 2025
\n
\n
\n
\n

Download

\n \n \"Coming\n
\n"); + } + var Byline = /*#__PURE__*/function (_HTMLElement4) { + function Byline() { + _classCallCheck(this, Byline); + return _callSuper(this, Byline, arguments); + } + _inherits(Byline, _HTMLElement4); + return _createClass(Byline, [{ + key: "frontMatter", + set: function set(frontMatter) { + this.innerHTML = bylineTemplate(frontMatter); + } + }], [{ + key: "is", + get: function get() { + return 'd-byline'; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); // Copyright 2018 The Distill Template Authors + var T$3 = Template("d-cite", "\n\n\n\n\n
\n \n
\n"); + var Cite = /*#__PURE__*/function (_T$3) { + /* Lifecycle */ + function Cite() { + var _this9; + _classCallCheck(this, Cite); + _this9 = _callSuper(this, Cite); + _this9._numbers = []; + _this9._entries = []; + return _this9; + } + _inherits(Cite, _T$3); + return _createClass(Cite, [{ + key: "connectedCallback", + value: function connectedCallback() { + var _this10 = this; + this.outerSpan = this.root.querySelector("#citation-"); + this.innerSpan = this.root.querySelector(".citation-number"); + this.hoverBox = this.root.querySelector("d-hover-box"); + window.customElements.whenDefined("d-hover-box").then(function () { + _this10.hoverBox.listen(_this10); + }); + // in case this component got connected after values were set + if (this.numbers) { + this.displayNumbers(this.numbers); + } + if (this.entries) { + this.displayEntries(this.entries); + } + } + + //TODO This causes an infinite loop on firefox with polyfills. + // This is only needed for interactive editing so no priority. + // disconnectedCallback() { + // const options = { detail: [this, this.keys], bubbles: true }; + // const event = new CustomEvent('onCiteKeyRemoved', options); + // document.dispatchEvent(event); + // } + + /* observe 'key' attribute */ + }, { + key: "attributeChangedCallback", + value: function attributeChangedCallback(name, oldValue, newValue) { + var eventName = oldValue ? "onCiteKeyChanged" : "onCiteKeyCreated"; + var keys = newValue.split(",").map(function (k) { + return k.trim(); + }); + var options = { + detail: [this, keys], + bubbles: true + }; + var event = new CustomEvent(eventName, options); + document.dispatchEvent(event); + } + }, { + key: "key", + get: function get() { + return this.getAttribute("key") || this.getAttribute("bibtex-key"); + }, + set: function set(value) { + this.setAttribute("key", value); + } + }, { + key: "keys", + get: function get() { + var result = this.key.split(","); + console.log(result); + return result; + } + + /* Setters & Rendering */ + }, { + key: "numbers", + get: function get() { + return this._numbers; + }, + set: function set(numbers) { + this._numbers = numbers; + this.displayNumbers(numbers); + } + }, { + key: "displayNumbers", + value: function displayNumbers(numbers) { + if (!this.innerSpan) return; + var numberStrings = numbers.map(function (index) { + return index == -1 ? "?" : index + 1 + ""; + }); + var textContent = "[" + numberStrings.join(", ") + "]"; + this.innerSpan.textContent = textContent; + } + }, { + key: "entries", + get: function get() { + return this._entries; + }, + set: function set(entries) { + this._entries = entries; + this.displayEntries(entries); + } + }, { + key: "displayEntries", + value: function displayEntries(entries) { + if (!this.hoverBox) return; + this.hoverBox.innerHTML = ""); + } + }], [{ + key: "observedAttributes", + get: function get() { + return ["key", "bibtex-key"]; + } + }]); + }(T$3(HTMLElement)); // Copyright 2018 The Distill Template Authors + var styles$1 = "\nd-citation-list {\n contain: style;\n}\n\nd-citation-list .references {\n grid-column: text;\n}\n\nd-citation-list .references .title {\n font-weight: 500;\n}\n"; + function renderCitationList(element, entries) { + var dom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document; + if (entries.size > 0) { + element.style.display = ''; + var list = element.querySelector('.references'); + if (list) { + list.innerHTML = ''; + } else { + var stylesTag = dom.createElement('style'); + stylesTag.innerHTML = styles$1; + element.appendChild(stylesTag); + var heading = dom.createElement('h3'); + heading.id = 'references'; + heading.textContent = 'References'; + element.appendChild(heading); + list = dom.createElement('ol'); + list.id = 'references-list'; + list.className = 'references'; + element.appendChild(list); + } + var _iterator16 = _createForOfIteratorHelper(entries), + _step16; + try { + for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) { + var _step16$value = _slicedToArray(_step16.value, 2), + key = _step16$value[0], + entry = _step16$value[1]; + var listItem = dom.createElement('li'); + listItem.id = key; + listItem.innerHTML = bibliography_cite(entry); + list.appendChild(listItem); + } + } catch (err) { + _iterator16.e(err); + } finally { + _iterator16.f(); + } + } else { + element.style.display = 'none'; + } + } + var CitationList = /*#__PURE__*/function (_HTMLElement5) { + function CitationList() { + _classCallCheck(this, CitationList); + return _callSuper(this, CitationList, arguments); + } + _inherits(CitationList, _HTMLElement5); + return _createClass(CitationList, [{ + key: "connectedCallback", + value: function connectedCallback() { + if (!this.hasAttribute('distill-prerendered')) { + this.style.display = 'none'; + } + } + }, { + key: "citations", + set: function set(citations) { + renderCitationList(this, citations); + } + }], [{ + key: "is", + get: function get() { + return 'd-citation-list'; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); + var prism = createCommonjsModule(function (module) { + /* ********************************************** + Begin prism-core.js + ********************************************** */ + + var _self = typeof window !== 'undefined' ? window // if in browser + : typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope ? self // if in worker + : {} // if in node js + ; + + /** + * Prism: Lightweight, robust, elegant syntax highlighting + * MIT license http://www.opensource.org/licenses/mit-license.php/ + * @author Lea Verou http://lea.verou.me + */ + + var Prism = function (_self) { + // Private helper vars + var lang = /\blang(?:uage)?-([\w-]+)\b/i; + var uniqueId = 0; + var _ = { + manual: _self.Prism && _self.Prism.manual, + disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, + util: { + encode: function encode(tokens) { + if (tokens instanceof Token) { + return new Token(tokens.type, encode(tokens.content), tokens.alias); + } else if (Array.isArray(tokens)) { + return tokens.map(encode); + } else { + return tokens.replace(/&/g, '&').replace(/' + env.content + ''; + }; + + /** + * @param {string} text + * @param {LinkedList} tokenList + * @param {any} grammar + * @param {LinkedListNode} startNode + * @param {number} startPos + * @param {boolean} [oneshot=false] + * @param {string} [target] + */ + function matchGrammar(text, tokenList, grammar, startNode, startPos, oneshot, target) { + for (var token in grammar) { + if (!grammar.hasOwnProperty(token) || !grammar[token]) { + continue; + } + var patterns = grammar[token]; + patterns = Array.isArray(patterns) ? patterns : [patterns]; + for (var j = 0; j < patterns.length; ++j) { + if (target && target == token + ',' + j) { + return; + } + var pattern = patterns[j], + inside = pattern.inside, + lookbehind = !!pattern.lookbehind, + greedy = !!pattern.greedy, + lookbehindLength = 0, + alias = pattern.alias; + if (greedy && !pattern.pattern.global) { + // Without the global flag, lastIndex won't work + var flags = pattern.pattern.toString().match(/[imsuy]*$/)[0]; + pattern.pattern = RegExp(pattern.pattern.source, flags + 'g'); + } + pattern = pattern.pattern || pattern; + for ( + // iterate the token list and keep track of the current token/string position + var currentNode = startNode.next, pos = startPos; currentNode !== tokenList.tail; pos += currentNode.value.length, currentNode = currentNode.next) { + var str = currentNode.value; + if (tokenList.length > text.length) { + // Something went terribly wrong, ABORT, ABORT! + return; + } + if (str instanceof Token) { + continue; + } + var removeCount = 1; // this is the to parameter of removeBetween + + if (greedy && currentNode != tokenList.tail.prev) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (!match) { + break; + } + var from = match.index + (lookbehind && match[1] ? match[1].length : 0); + var to = match.index + match[0].length; + var p = pos; + + // find the node that contains the match + p += currentNode.value.length; + while (from >= p) { + currentNode = currentNode.next; + p += currentNode.value.length; + } + // adjust pos (and p) + p -= currentNode.value.length; + pos = p; + + // the current node is a Token, then the match starts inside another Token, which is invalid + if (currentNode.value instanceof Token) { + continue; + } + + // find the last node which is affected by this match + for (var k = currentNode; k !== tokenList.tail && (p < to || typeof k.value === 'string' && !k.prev.value.greedy); k = k.next) { + removeCount++; + p += k.value.length; + } + removeCount--; + + // replace with the new match + str = text.slice(pos, p); + match.index -= pos; + } else { + pattern.lastIndex = 0; + var match = pattern.exec(str); + } + if (!match) { + if (oneshot) { + break; + } + continue; + } + if (lookbehind) { + lookbehindLength = match[1] ? match[1].length : 0; + } + var from = match.index + lookbehindLength, + match = match[0].slice(lookbehindLength), + to = from + match.length, + before = str.slice(0, from), + after = str.slice(to); + var removeFrom = currentNode.prev; + if (before) { + removeFrom = addAfter(tokenList, removeFrom, before); + pos += before.length; + } + removeRange(tokenList, removeFrom, removeCount); + var wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias, match, greedy); + currentNode = addAfter(tokenList, removeFrom, wrapped); + if (after) { + addAfter(tokenList, currentNode, after); + } + if (removeCount > 1) matchGrammar(text, tokenList, grammar, currentNode.prev, pos, true, token + ',' + j); + if (oneshot) break; + } + } + } + } + + /** + * @typedef LinkedListNode + * @property {T} value + * @property {LinkedListNode | null} prev The previous node. + * @property {LinkedListNode | null} next The next node. + * @template T + */ + + /** + * @template T + */ + function LinkedList() { + /** @type {LinkedListNode} */ + var head = { + value: null, + prev: null, + next: null + }; + /** @type {LinkedListNode} */ + var tail = { + value: null, + prev: head, + next: null + }; + head.next = tail; + + /** @type {LinkedListNode} */ + this.head = head; + /** @type {LinkedListNode} */ + this.tail = tail; + this.length = 0; + } + + /** + * Adds a new node with the given value to the list. + * @param {LinkedList} list + * @param {LinkedListNode} node + * @param {T} value + * @returns {LinkedListNode} The added node. + * @template T + */ + function addAfter(list, node, value) { + // assumes that node != list.tail && values.length >= 0 + var next = node.next; + var newNode = { + value: value, + prev: node, + next: next + }; + node.next = newNode; + next.prev = newNode; + list.length++; + return newNode; + } + /** + * Removes `count` nodes after the given node. The given node will not be removed. + * @param {LinkedList} list + * @param {LinkedListNode} node + * @param {number} count + * @template T + */ + function removeRange(list, node, count) { + var next = node.next; + for (var i = 0; i < count && next !== list.tail; i++) { + next = next.next; + } + node.next = next; + next.prev = node; + list.length -= i; + } + /** + * @param {LinkedList} list + * @returns {T[]} + * @template T + */ + function toArray(list) { + var array = []; + var node = list.head.next; + while (node !== list.tail) { + array.push(node.value); + node = node.next; + } + return array; + } + if (!_self.document) { + if (!_self.addEventListener) { + // in Node.js + return _; + } + if (!_.disableWorkerMessageHandler) { + // In worker + _self.addEventListener('message', function (evt) { + var message = JSON.parse(evt.data), + lang = message.language, + code = message.code, + immediateClose = message.immediateClose; + _self.postMessage(_.highlight(code, _.languages[lang], lang)); + if (immediateClose) { + _self.close(); + } + }, false); + } + return _; + } + + //Get current script and highlight + var script = _.util.currentScript(); + if (script) { + _.filename = script.src; + if (script.hasAttribute('data-manual')) { + _.manual = true; + } + } + function highlightAutomaticallyCallback() { + if (!_.manual) { + _.highlightAll(); + } + } + if (!_.manual) { + // If the document state is "loading", then we'll use DOMContentLoaded. + // If the document state is "interactive" and the prism.js script is deferred, then we'll also use the + // DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they + // might take longer one animation frame to execute which can create a race condition where only some plugins have + // been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded. + // See https://github.com/PrismJS/prism/issues/2102 + var readyState = document.readyState; + if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) { + document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback); + } else { + if (window.requestAnimationFrame) { + window.requestAnimationFrame(highlightAutomaticallyCallback); + } else { + window.setTimeout(highlightAutomaticallyCallback, 16); + } + } + } + return _; + }(_self); + if (module.exports) { + module.exports = Prism; + } + + // hack for components to work correctly in node.js + if (typeof commonjsGlobal !== 'undefined') { + commonjsGlobal.Prism = Prism; + } + + /* ********************************************** + Begin prism-markup.js + ********************************************** */ + + Prism.languages.markup = { + 'comment': //, + 'prolog': /<\?[\s\S]+?\?>/, + 'doctype': { + pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i, + greedy: true + }, + 'cdata': //i, + 'tag': { + pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i, + greedy: true, + inside: { + 'tag': { + pattern: /^<\/?[^\s>\/]+/i, + inside: { + 'punctuation': /^<\/?/, + 'namespace': /^[^\s>\/:]+:/ + } + }, + 'attr-value': { + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, + inside: { + 'punctuation': [/^=/, { + pattern: /^(\s*)["']|["']$/, + lookbehind: true + }] + } + }, + 'punctuation': /\/?>/, + 'attr-name': { + pattern: /[^\s>\/]+/, + inside: { + 'namespace': /^[^\s>\/:]+:/ + } + } + } + }, + 'entity': /&#?[\da-z]{1,8};/i + }; + Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = Prism.languages.markup['entity']; + + // Plugin to make entity title show the real entity, idea by Roman Komarov + Prism.hooks.add('wrap', function (env) { + if (env.type === 'entity') { + env.attributes['title'] = env.content.replace(/&/, '&'); + } + }); + Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { + /** + * Adds an inlined language to markup. + * + * An example of an inlined language is CSS with `\n\n\n\n")); + var Code = /*#__PURE__*/function (_Mutating2) { + function Code() { + _classCallCheck(this, Code); + return _callSuper(this, Code, arguments); + } + _inherits(Code, _Mutating2); + return _createClass(Code, [{ + key: "renderContent", + value: function renderContent() { + // check if language can be highlighted + this.languageName = this.getAttribute('language'); + if (!this.languageName) { + console.warn('You need to provide a language attribute to your block to let us know how to highlight your code; e.g.:\n zeros = np.zeros(shape).'); + return; + } + var language = prism.languages[this.languageName]; + if (language == undefined) { + console.warn("Distill does not yet support highlighting your code block in \"".concat(this.languageName, "'.")); + return; + } + var content = this.textContent; + var codeTag = this.shadowRoot.querySelector('#code-container'); + if (this.hasAttribute('block')) { + // normalize the tab indents + content = content.replace(/\n/, ''); + var tabs = content.match(/\s*/); + content = content.replace(new RegExp('\n' + tabs, 'g'), '\n'); + content = content.trim(); + // wrap code block in pre tag if needed + if (codeTag.parentNode instanceof ShadowRoot) { + var preTag = document.createElement('pre'); + this.shadowRoot.removeChild(codeTag); + preTag.appendChild(codeTag); + this.shadowRoot.appendChild(preTag); + } + } + codeTag.className = "language-".concat(this.languageName); + codeTag.innerHTML = prism.highlight(content, language); + } + }]); + }(Mutating(T$4(HTMLElement))); // Copyright 2018 The Distill Template Authors + var T$5 = Template('d-footnote', "\n\n\n\n
\n \n
\n
\n\n\n \n\n\n"); + var Footnote = /*#__PURE__*/function (_T$4) { + function Footnote() { + var _this11; + _classCallCheck(this, Footnote); + _this11 = _callSuper(this, Footnote); + var options = { + childList: true, + characterData: true, + subtree: true + }; + var observer = new MutationObserver(_this11.notify); + observer.observe(_this11, options); + return _this11; + } + _inherits(Footnote, _T$4); + return _createClass(Footnote, [{ + key: "notify", + value: function notify() { + var options = { + detail: this, + bubbles: true + }; + var event = new CustomEvent('onFootnoteChanged', options); + document.dispatchEvent(event); + } + }, { + key: "connectedCallback", + value: function connectedCallback() { + var _this12 = this; + // listen and notify about changes to slotted content + // const slot = this.shadowRoot.querySelector('#slot'); + // console.warn(slot.textContent); + // slot.addEventListener('slotchange', this.notify); + this.hoverBox = this.root.querySelector('d-hover-box'); + window.customElements.whenDefined('d-hover-box').then(function () { + _this12.hoverBox.listen(_this12); + }); + // create numeric ID + Footnote.currentFootnoteId += 1; + var IdString = Footnote.currentFootnoteId.toString(); + this.root.host.id = 'd-footnote-' + IdString; + + // set up hidden hover box + var id = 'dt-fn-hover-box-' + IdString; + this.hoverBox.id = id; + + // set up visible footnote marker + var span = this.root.querySelector('#fn-'); + span.setAttribute('id', 'fn-' + IdString); + span.setAttribute('data-hover-ref', id); + span.textContent = IdString; + } + }]); + }(T$5(HTMLElement)); + Footnote.currentFootnoteId = 0; + + // Copyright 2018 The Distill Template Authors + + var T$6 = Template('d-footnote-list', "\n\n\n

Footnotes

\n
    \n", false); + var FootnoteList = /*#__PURE__*/function (_T$5) { + function FootnoteList() { + _classCallCheck(this, FootnoteList); + return _callSuper(this, FootnoteList, arguments); + } + _inherits(FootnoteList, _T$5); + return _createClass(FootnoteList, [{ + key: "connectedCallback", + value: function connectedCallback() { + _superPropGet(FootnoteList, "connectedCallback", this, 3)([]); + this.list = this.root.querySelector('ol'); + // footnotes list is initially hidden + this.root.style.display = 'none'; + // look through document and register existing footnotes + // Store.subscribeTo('footnotes', (footnote) => { + // this.renderFootnote(footnote); + // }); + } + + // TODO: could optimize this to accept individual footnotes? + }, { + key: "footnotes", + set: function set(footnotes) { + this.list.innerHTML = ''; + if (footnotes.length) { + // ensure footnote list is visible + this.root.style.display = ''; + var _iterator17 = _createForOfIteratorHelper(footnotes), + _step17; + try { + for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) { + var footnote = _step17.value; + // construct and append list item to show footnote + var listItem = document.createElement('li'); + listItem.id = footnote.id + '-listing'; + listItem.innerHTML = footnote.innerHTML; + var backlink = document.createElement('a'); + backlink.setAttribute('class', 'footnote-backlink'); + backlink.setAttribute('target', '_self'); + backlink.textContent = '[↩]'; + backlink.href = '#' + footnote.id; + listItem.appendChild(backlink); + this.list.appendChild(listItem); + } + } catch (err) { + _iterator17.e(err); + } finally { + _iterator17.f(); + } + } else { + // ensure footnote list is invisible + this.root.style.display = 'none'; + } + } + }]); + }(T$6(HTMLElement)); // Copyright 2018 The Distill Template Authors + var T$7 = Template('d-hover-box', "\n\n\n
    \n
    \n \n
    \n
    \n"); + var HoverBox = /*#__PURE__*/function (_T$6) { + function HoverBox() { + _classCallCheck(this, HoverBox); + return _callSuper(this, HoverBox); + } + _inherits(HoverBox, _T$6); + return _createClass(HoverBox, [{ + key: "connectedCallback", + value: function connectedCallback() {} + }, { + key: "listen", + value: function listen(element) { + // console.log(element) + this.bindDivEvents(this); + this.bindTriggerEvents(element); + // this.style.display = "block"; + } + }, { + key: "bindDivEvents", + value: function bindDivEvents(element) { + var _this13 = this; + // For mice, same behavior as hovering on links + element.addEventListener('mouseover', function () { + if (!_this13.visible) _this13.showAtNode(element); + _this13.stopTimeout(); + }); + element.addEventListener('mouseout', function () { + _this13.extendTimeout(500); + }); + // Don't trigger body touchstart event when touching within box + element.addEventListener('touchstart', function (event) { + event.stopPropagation(); + }, { + passive: true + }); + // Close box when touching outside box + document.body.addEventListener('touchstart', function () { + _this13.hide(); + }, { + passive: true + }); + } + }, { + key: "bindTriggerEvents", + value: function bindTriggerEvents(node) { + var _this14 = this; + node.addEventListener('mouseover', function () { + if (!_this14.visible) { + _this14.showAtNode(node); + } + _this14.stopTimeout(); + }); + node.addEventListener('mouseout', function () { + _this14.extendTimeout(300); + }); + node.addEventListener('touchstart', function (event) { + if (_this14.visible) { + _this14.hide(); + } else { + _this14.showAtNode(node); + } + // Don't trigger body touchstart event when touching link + event.stopPropagation(); + }, { + passive: true + }); + } + }, { + key: "show", + value: function show(position) { + this.visible = true; + this.style.display = 'block'; + // 10px extra offset from element + this.style.top = Math.round(position[1] + 10) + 'px'; + } + }, { + key: "showAtNode", + value: function showAtNode(node) { + // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop + var bbox = node.getBoundingClientRect(); + this.show([node.offsetLeft + bbox.width, node.offsetTop + bbox.height]); + } + }, { + key: "hide", + value: function hide() { + this.visible = false; + this.style.display = 'none'; + this.stopTimeout(); + } + }, { + key: "stopTimeout", + value: function stopTimeout() { + if (this.timeout) { + clearTimeout(this.timeout); + } + } + }, { + key: "extendTimeout", + value: function extendTimeout(time) { + var _this15 = this; + this.stopTimeout(); + this.timeout = setTimeout(function () { + _this15.hide(); + }, time); + } + }]); + }(T$7(HTMLElement)); // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + var Title = /*#__PURE__*/function (_HTMLElement6) { + function Title() { + _classCallCheck(this, Title); + return _callSuper(this, Title, arguments); + } + _inherits(Title, _HTMLElement6); + return _createClass(Title, null, [{ + key: "is", + get: function get() { + return 'd-title'; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); // Copyright 2018 The Distill Template Authors + var T$8 = Template('d-references', "\n\n", false); + var References = /*#__PURE__*/function (_T$7) { + function References() { + _classCallCheck(this, References); + return _callSuper(this, References, arguments); + } + _inherits(References, _T$7); + return _createClass(References); + }(T$8(HTMLElement)); // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + var TOC = /*#__PURE__*/function (_HTMLElement7) { + function TOC() { + _classCallCheck(this, TOC); + return _callSuper(this, TOC, arguments); + } + _inherits(TOC, _HTMLElement7); + return _createClass(TOC, [{ + key: "connectedCallback", + value: function connectedCallback() { + var _this16 = this; + if (!this.getAttribute('prerendered')) { + window.onload = function () { + var article = document.querySelector('d-article'); + var headings = article.querySelectorAll('h2, h3'); + renderTOC(_this16, headings); + }; + } + } + }], [{ + key: "is", + get: function get() { + return 'd-toc'; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); + function renderTOC(element, headings) { + var ToC = "\n \n \n

    Table of contents

    \n
      "; + var _iterator18 = _createForOfIteratorHelper(headings), + _step18; + try { + for (_iterator18.s(); !(_step18 = _iterator18.n()).done;) { + var el = _step18.value; + // should element be included in TOC? + var isInTitle = el.parentElement.tagName == 'D-TITLE'; + var isException = el.getAttribute('no-toc'); + if (isInTitle || isException) continue; + // create TOC entry + var _title = el.textContent; + var link = '#' + el.getAttribute('id'); + var newLine = '
    • ' + '' + _title + '' + '
    • '; + if (el.tagName == 'H3') { + newLine = '
        ' + newLine + '
      '; + } else { + newLine += '
      '; + } + ToC += newLine; + } + } catch (err) { + _iterator18.e(err); + } finally { + _iterator18.f(); + } + ToC += '
    '; + element.innerHTML = ToC; + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + // Figure + // + // d-figure provides a state-machine of visibility events: + // + // scroll out of view + // +----------------+ + // *do work here* | | + // +----------------+ +-+---------+ +-v---------+ + // | ready +----> onscreen | | offscreen | + // +----------------+ +---------^-+ +---------+-+ + // | | + // +----------------+ + // scroll into view + // + var Figure = /*#__PURE__*/function (_HTMLElement8) { + function Figure() { + var _this17; + _classCallCheck(this, Figure); + _this17 = _callSuper(this, Figure); + // debugger + _this17._ready = false; + _this17._onscreen = false; + _this17._offscreen = true; + return _this17; + } + _inherits(Figure, _HTMLElement8); + return _createClass(Figure, [{ + key: "connectedCallback", + value: function connectedCallback() { + this.loadsWhileScrolling = this.hasAttribute('loadsWhileScrolling'); + Figure.marginObserver.observe(this); + Figure.directObserver.observe(this); + } + }, { + key: "disconnectedCallback", + value: function disconnectedCallback() { + Figure.marginObserver.unobserve(this); + Figure.directObserver.unobserve(this); + } + + // We use two separate observers: + // One with an extra 1000px margin to warn if the viewpoint gets close, + // And one for the actual on/off screen events + }, { + key: "addEventListener", + value: + // Notify listeners that registered late, too: + + function addEventListener(eventName, callback) { + _superPropGet(Figure, "addEventListener", this, 3)([eventName, callback]); + // if we had already dispatched something while presumingly no one was listening, we do so again + // debugger + if (eventName === 'ready') { + if (Figure.readyQueue.indexOf(this) !== -1) { + this._ready = false; + Figure.runReadyQueue(); + } + } + if (eventName === 'onscreen') { + this.onscreen(); + } + } + + // Custom Events + }, { + key: "ready", + value: function ready() { + // debugger + this._ready = true; + Figure.marginObserver.unobserve(this); + var event = new CustomEvent('ready'); + this.dispatchEvent(event); + } + }, { + key: "onscreen", + value: function onscreen() { + this._onscreen = true; + this._offscreen = false; + var event = new CustomEvent('onscreen'); + this.dispatchEvent(event); + } + }, { + key: "offscreen", + value: function offscreen() { + this._onscreen = false; + this._offscreen = true; + var event = new CustomEvent('offscreen'); + this.dispatchEvent(event); + } + }], [{ + key: "is", + get: function get() { + return 'd-figure'; + } + }, { + key: "readyQueue", + get: function get() { + if (!Figure._readyQueue) { + Figure._readyQueue = []; + } + return Figure._readyQueue; + } + }, { + key: "addToReadyQueue", + value: function addToReadyQueue(figure) { + if (Figure.readyQueue.indexOf(figure) === -1) { + Figure.readyQueue.push(figure); + Figure.runReadyQueue(); + } + } + }, { + key: "runReadyQueue", + value: function runReadyQueue() { + // console.log("Checking to run readyQueue, length: " + Figure.readyQueue.length + ", scrolling: " + Figure.isScrolling); + // if (Figure.isScrolling) return; + // console.log("Running ready Queue"); + var figure = Figure.readyQueue.sort(function (a, b) { + return a._seenOnScreen - b._seenOnScreen; + }).filter(function (figure) { + return !figure._ready; + }).pop(); + if (figure) { + figure.ready(); + requestAnimationFrame(Figure.runReadyQueue); + } + } + }, { + key: "marginObserver", + get: function get() { + if (!Figure._marginObserver) { + // if (!('IntersectionObserver' in window)) { + // throw new Error('no interscetionobbserver!'); + // } + var viewportHeight = window.innerHeight; + var margin = Math.floor(2 * viewportHeight); + var options = { + rootMargin: margin + 'px 0px ' + margin + 'px 0px', + threshold: 0.01 + }; + var callback = Figure.didObserveMarginIntersection; + var observer = new IntersectionObserver(callback, options); + Figure._marginObserver = observer; + } + return Figure._marginObserver; + } + }, { + key: "didObserveMarginIntersection", + value: function didObserveMarginIntersection(entries) { + var _iterator19 = _createForOfIteratorHelper(entries), + _step19; + try { + for (_iterator19.s(); !(_step19 = _iterator19.n()).done;) { + var entry = _step19.value; + var figure = entry.target; + if (entry.isIntersecting && !figure._ready) { + Figure.addToReadyQueue(figure); + } + } + } catch (err) { + _iterator19.e(err); + } finally { + _iterator19.f(); + } + } + }, { + key: "directObserver", + get: function get() { + if (!Figure._directObserver) { + Figure._directObserver = new IntersectionObserver(Figure.didObserveDirectIntersection, { + rootMargin: '0px', + threshold: [0, 1.0] + }); + } + return Figure._directObserver; + } + }, { + key: "didObserveDirectIntersection", + value: function didObserveDirectIntersection(entries) { + var _iterator20 = _createForOfIteratorHelper(entries), + _step20; + try { + for (_iterator20.s(); !(_step20 = _iterator20.n()).done;) { + var entry = _step20.value; + var figure = entry.target; + if (entry.isIntersecting) { + figure._seenOnScreen = new Date(); + // if (!figure._ready) { figure.ready(); } + if (figure._offscreen) { + figure.onscreen(); + } + } else { + if (figure._onscreen) { + figure.offscreen(); + } + } + } + } catch (err) { + _iterator20.e(err); + } finally { + _iterator20.f(); + } + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); + if (typeof window !== 'undefined') { + Figure.isScrolling = false; + var timeout; + var resetTimer = function resetTimer() { + Figure.isScrolling = true; + clearTimeout(timeout); + timeout = setTimeout(function () { + Figure.isScrolling = false; + Figure.runReadyQueue(); + }, 500); + }; + window.addEventListener('scroll', resetTimer, true); + } + + // Copyright 2018 The Distill Template Authors + + // This overlay is not secure. + // It is only meant as a social deterrent. + + var productionHostname = 'distill.pub'; + var T$9 = Template('d-interstitial', "\n\n\n
    \n
    \n

    This article is in review.

    \n

    Do not share this URL or the contents of this article. Thank you!

    \n \n

    Enter the password we shared with you as part of the review process to view the article.

    \n
    \n
    \n"); + var Interstitial = /*#__PURE__*/function (_T$8) { + function Interstitial() { + _classCallCheck(this, Interstitial); + return _callSuper(this, Interstitial, arguments); + } + _inherits(Interstitial, _T$8); + return _createClass(Interstitial, [{ + key: "connectedCallback", + value: function connectedCallback() { + var _this18 = this; + if (this.shouldRemoveSelf()) { + this.parentElement.removeChild(this); + } else { + var passwordInput = this.root.querySelector('#interstitial-password-input'); + passwordInput.oninput = function (event) { + return _this18.passwordChanged(event); + }; + } + } + }, { + key: "passwordChanged", + value: function passwordChanged(event) { + var entered = event.target.value; + if (entered === this.password) { + console.log('Correct password entered.'); + this.parentElement.removeChild(this); + if (typeof Storage !== 'undefined') { + console.log('Saved that correct password was entered.'); + localStorage.setItem(this.localStorageIdentifier(), 'true'); + } + } + } + }, { + key: "shouldRemoveSelf", + value: function shouldRemoveSelf() { + // should never be visible in production + if (window && window.location.hostname === productionHostname) { + console.warn('Interstitial found on production, hiding it.'); + return true; + } + // should only have to enter password once + if (typeof Storage !== 'undefined') { + if (localStorage.getItem(this.localStorageIdentifier()) === 'true') { + console.log('Loaded that correct password was entered before; skipping interstitial.'); + return true; + } + } + // otherwise, leave visible + return false; + } + }, { + key: "localStorageIdentifier", + value: function localStorageIdentifier() { + var prefix = 'distill-drafts'; + var suffix = 'interstitial-password-correct'; + return prefix + (window ? window.location.pathname : '-') + suffix; + } + }]); + }(T$9(HTMLElement)); + function ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + } + function bisector(compare) { + if (compare.length === 1) compare = ascendingComparator(compare); + return { + left: function left(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) < 0) lo = mid + 1;else hi = mid; + } + return lo; + }, + right: function right(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) > 0) hi = mid;else lo = mid + 1; + } + return lo; + } + }; + } + function ascendingComparator(f) { + return function (d, x) { + return ascending(f(d), x); + }; + } + var ascendingBisect = bisector(ascending); + var bisectRight = ascendingBisect.right; + function range(start, stop, step) { + start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; + var i = -1, + n = Math.max(0, Math.ceil((stop - start) / step)) | 0, + range = new Array(n); + while (++i < n) { + range[i] = start + i * step; + } + return range; + } + var e10 = Math.sqrt(50), + e5 = Math.sqrt(10), + e2 = Math.sqrt(2); + function ticks(start, stop, count) { + var reverse, + i = -1, + n, + ticks, + step; + stop = +stop, start = +start, count = +count; + if (start === stop && count > 0) return [start]; + if (reverse = stop < start) n = start, start = stop, stop = n; + if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; + if (step > 0) { + start = Math.ceil(start / step); + stop = Math.floor(stop / step); + ticks = new Array(n = Math.ceil(stop - start + 1)); + while (++i < n) ticks[i] = (start + i) * step; + } else { + start = Math.floor(start * step); + stop = Math.ceil(stop * step); + ticks = new Array(n = Math.ceil(start - stop + 1)); + while (++i < n) ticks[i] = (start - i) / step; + } + if (reverse) ticks.reverse(); + return ticks; + } + function tickIncrement(start, stop, count) { + var step = (stop - start) / Math.max(0, count), + power = Math.floor(Math.log(step) / Math.LN10), + error = step / Math.pow(10, power); + return power >= 0 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); + } + function tickStep(start, stop, count) { + var step0 = Math.abs(stop - start) / Math.max(0, count), + step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), + error = step0 / step1; + if (error >= e10) step1 *= 10;else if (error >= e5) step1 *= 5;else if (error >= e2) step1 *= 2; + return stop < start ? -step1 : step1; + } + function initRange(domain, range) { + switch (arguments.length) { + case 0: + break; + case 1: + this.range(domain); + break; + default: + this.range(range).domain(domain); + break; + } + return this; + } + function define(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; + } + function extend(parent, definition) { + var prototype = Object.create(parent.prototype); + for (var key in definition) prototype[key] = definition[key]; + return prototype; + } + function Color() {} + var _darker = 0.7; + var _brighter = 1 / _darker; + var reI = "\\s*([+-]?\\d+)\\s*", + reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", + reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", + reHex = /^#([0-9a-f]{3,8})$/, + reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), + reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), + reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), + reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), + reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), + reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); + var named = { + aliceblue: 0xf0f8ff, + antiquewhite: 0xfaebd7, + aqua: 0x00ffff, + aquamarine: 0x7fffd4, + azure: 0xf0ffff, + beige: 0xf5f5dc, + bisque: 0xffe4c4, + black: 0x000000, + blanchedalmond: 0xffebcd, + blue: 0x0000ff, + blueviolet: 0x8a2be2, + brown: 0xa52a2a, + burlywood: 0xdeb887, + cadetblue: 0x5f9ea0, + chartreuse: 0x7fff00, + chocolate: 0xd2691e, + coral: 0xff7f50, + cornflowerblue: 0x6495ed, + cornsilk: 0xfff8dc, + crimson: 0xdc143c, + cyan: 0x00ffff, + darkblue: 0x00008b, + darkcyan: 0x008b8b, + darkgoldenrod: 0xb8860b, + darkgray: 0xa9a9a9, + darkgreen: 0x006400, + darkgrey: 0xa9a9a9, + darkkhaki: 0xbdb76b, + darkmagenta: 0x8b008b, + darkolivegreen: 0x556b2f, + darkorange: 0xff8c00, + darkorchid: 0x9932cc, + darkred: 0x8b0000, + darksalmon: 0xe9967a, + darkseagreen: 0x8fbc8f, + darkslateblue: 0x483d8b, + darkslategray: 0x2f4f4f, + darkslategrey: 0x2f4f4f, + darkturquoise: 0x00ced1, + darkviolet: 0x9400d3, + deeppink: 0xff1493, + deepskyblue: 0x00bfff, + dimgray: 0x696969, + dimgrey: 0x696969, + dodgerblue: 0x1e90ff, + firebrick: 0xb22222, + floralwhite: 0xfffaf0, + forestgreen: 0x228b22, + fuchsia: 0xff00ff, + gainsboro: 0xdcdcdc, + ghostwhite: 0xf8f8ff, + gold: 0xffd700, + goldenrod: 0xdaa520, + gray: 0x808080, + green: 0x008000, + greenyellow: 0xadff2f, + grey: 0x808080, + honeydew: 0xf0fff0, + hotpink: 0xff69b4, + indianred: 0xcd5c5c, + indigo: 0x4b0082, + ivory: 0xfffff0, + khaki: 0xf0e68c, + lavender: 0xe6e6fa, + lavenderblush: 0xfff0f5, + lawngreen: 0x7cfc00, + lemonchiffon: 0xfffacd, + lightblue: 0xadd8e6, + lightcoral: 0xf08080, + lightcyan: 0xe0ffff, + lightgoldenrodyellow: 0xfafad2, + lightgray: 0xd3d3d3, + lightgreen: 0x90ee90, + lightgrey: 0xd3d3d3, + lightpink: 0xffb6c1, + lightsalmon: 0xffa07a, + lightseagreen: 0x20b2aa, + lightskyblue: 0x87cefa, + lightslategray: 0x778899, + lightslategrey: 0x778899, + lightsteelblue: 0xb0c4de, + lightyellow: 0xffffe0, + lime: 0x00ff00, + limegreen: 0x32cd32, + linen: 0xfaf0e6, + magenta: 0xff00ff, + maroon: 0x800000, + mediumaquamarine: 0x66cdaa, + mediumblue: 0x0000cd, + mediumorchid: 0xba55d3, + mediumpurple: 0x9370db, + mediumseagreen: 0x3cb371, + mediumslateblue: 0x7b68ee, + mediumspringgreen: 0x00fa9a, + mediumturquoise: 0x48d1cc, + mediumvioletred: 0xc71585, + midnightblue: 0x191970, + mintcream: 0xf5fffa, + mistyrose: 0xffe4e1, + moccasin: 0xffe4b5, + navajowhite: 0xffdead, + navy: 0x000080, + oldlace: 0xfdf5e6, + olive: 0x808000, + olivedrab: 0x6b8e23, + orange: 0xffa500, + orangered: 0xff4500, + orchid: 0xda70d6, + palegoldenrod: 0xeee8aa, + palegreen: 0x98fb98, + paleturquoise: 0xafeeee, + palevioletred: 0xdb7093, + papayawhip: 0xffefd5, + peachpuff: 0xffdab9, + peru: 0xcd853f, + pink: 0xffc0cb, + plum: 0xdda0dd, + powderblue: 0xb0e0e6, + purple: 0x800080, + rebeccapurple: 0x663399, + red: 0xff0000, + rosybrown: 0xbc8f8f, + royalblue: 0x4169e1, + saddlebrown: 0x8b4513, + salmon: 0xfa8072, + sandybrown: 0xf4a460, + seagreen: 0x2e8b57, + seashell: 0xfff5ee, + sienna: 0xa0522d, + silver: 0xc0c0c0, + skyblue: 0x87ceeb, + slateblue: 0x6a5acd, + slategray: 0x708090, + slategrey: 0x708090, + snow: 0xfffafa, + springgreen: 0x00ff7f, + steelblue: 0x4682b4, + tan: 0xd2b48c, + teal: 0x008080, + thistle: 0xd8bfd8, + tomato: 0xff6347, + turquoise: 0x40e0d0, + violet: 0xee82ee, + wheat: 0xf5deb3, + white: 0xffffff, + whitesmoke: 0xf5f5f5, + yellow: 0xffff00, + yellowgreen: 0x9acd32 + }; + define(Color, color, { + copy: function copy(channels) { + return Object.assign(new this.constructor(), this, channels); + }, + displayable: function displayable() { + return this.rgb().displayable(); + }, + hex: color_formatHex, + // Deprecated! Use color.formatHex. + formatHex: color_formatHex, + formatHsl: color_formatHsl, + formatRgb: color_formatRgb, + toString: color_formatRgb + }); + function color_formatHex() { + return this.rgb().formatHex(); + } + function color_formatHsl() { + return hslConvert(this).formatHsl(); + } + function color_formatRgb() { + return this.rgb().formatRgb(); + } + function color(format) { + var m, l; + format = (format + "").trim().toLowerCase(); + return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 + : l === 3 ? new Rgb(m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, (m & 0xf) << 4 | m & 0xf, 1) // #f00 + : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 + : l === 4 ? rgba(m >> 12 & 0xf | m >> 8 & 0xf0, m >> 8 & 0xf | m >> 4 & 0xf0, m >> 4 & 0xf | m & 0xf0, ((m & 0xf) << 4 | m & 0xf) / 0xff) // #f000 + : null // invalid hex + ) : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) + : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) + : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) + : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) + : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) + : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) + : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins + : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null; + } + function rgbn(n) { + return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); + } + function rgba(r, g, b, a) { + if (a <= 0) r = g = b = NaN; + return new Rgb(r, g, b, a); + } + function rgbConvert(o) { + if (!(o instanceof Color)) o = color(o); + if (!o) return new Rgb(); + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); + } + function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); + } + function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; + } + define(Rgb, rgb, extend(Color, { + brighter: function brighter(k) { + k = k == null ? _brighter : Math.pow(_brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker: function darker(k) { + k = k == null ? _darker : Math.pow(_darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb: function rgb() { + return this; + }, + displayable: function displayable() { + return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1; + }, + hex: rgb_formatHex, + // Deprecated! Use color.formatHex. + formatHex: rgb_formatHex, + formatRgb: rgb_formatRgb, + toString: rgb_formatRgb + })); + function rgb_formatHex() { + return "#" + hex(this.r) + hex(this.g) + hex(this.b); + } + function rgb_formatRgb() { + var a = this.opacity; + a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "rgb(" : "rgba(") + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + (a === 1 ? ")" : ", " + a + ")"); + } + function hex(value) { + value = Math.max(0, Math.min(255, Math.round(value) || 0)); + return (value < 16 ? "0" : "") + value.toString(16); + } + function hsla(h, s, l, a) { + if (a <= 0) h = s = l = NaN;else if (l <= 0 || l >= 1) h = s = NaN;else if (s <= 0) h = NaN; + return new Hsl(h, s, l, a); + } + function hslConvert(o) { + if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color)) o = color(o); + if (!o) return new Hsl(); + if (o instanceof Hsl) return o; + o = o.rgb(); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + h = NaN, + s = max - min, + l = (max + min) / 2; + if (s) { + if (r === max) h = (g - b) / s + (g < b) * 6;else if (g === max) h = (b - r) / s + 2;else h = (r - g) / s + 4; + s /= l < 0.5 ? max + min : 2 - max - min; + h *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h; + } + return new Hsl(h, s, l, o.opacity); + } + function hsl(h, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); + } + function Hsl(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; + } + define(Hsl, hsl, extend(Color, { + brighter: function brighter(k) { + k = k == null ? _brighter : Math.pow(_brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker: function darker(k) { + k = k == null ? _darker : Math.pow(_darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function rgb() { + var h = this.h % 360 + (this.h < 0) * 360, + s = isNaN(h) || isNaN(this.s) ? 0 : this.s, + l = this.l, + m2 = l + (l < 0.5 ? l : 1 - l) * s, + m1 = 2 * l - m2; + return new Rgb(hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), hsl2rgb(h, m1, m2), hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), this.opacity); + }, + displayable: function displayable() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1; + }, + formatHsl: function formatHsl() { + var a = this.opacity; + a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "hsl(" : "hsla(") + (this.h || 0) + ", " + (this.s || 0) * 100 + "%, " + (this.l || 0) * 100 + "%" + (a === 1 ? ")" : ", " + a + ")"); + } + })); + + /* From FvD 13.37, CSS Color Module Level 3 */ + function hsl2rgb(h, m1, m2) { + return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255; + } + var deg2rad = Math.PI / 180; + var rad2deg = 180 / Math.PI; + + // https://observablehq.com/@mbostock/lab-and-rgb + var K = 18, + Xn = 0.96422, + Yn = 1, + Zn = 0.82521, + t0 = 4 / 29, + t1 = 6 / 29, + t2 = 3 * t1 * t1, + t3 = t1 * t1 * t1; + function labConvert(o) { + if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) return hcl2lab(o); + if (!(o instanceof Rgb)) o = rgbConvert(o); + var r = rgb2lrgb(o.r), + g = rgb2lrgb(o.g), + b = rgb2lrgb(o.b), + y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), + x, + z; + if (r === g && g === b) x = z = y;else { + x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); + z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); + } + return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); + } + function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); + } + function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; + } + define(Lab, lab, extend(Color, { + brighter: function brighter(k) { + return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker: function darker(k) { + return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb: function rgb() { + var y = (this.l + 16) / 116, + x = isNaN(this.a) ? y : y + this.a / 500, + z = isNaN(this.b) ? y : y - this.b / 200; + x = Xn * lab2xyz(x); + y = Yn * lab2xyz(y); + z = Zn * lab2xyz(z); + return new Rgb(lrgb2rgb(3.1338561 * x - 1.6168667 * y - 0.4906146 * z), lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), lrgb2rgb(0.0719453 * x - 0.2289914 * y + 1.4052427 * z), this.opacity); + } + })); + function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; + } + function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); + } + function lrgb2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); + } + function rgb2lrgb(x) { + return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); + } + function hclConvert(o) { + if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) o = labConvert(o); + if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); + var h = Math.atan2(o.b, o.a) * rad2deg; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); + } + function hcl(h, c, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); + } + function Hcl(h, c, l, opacity) { + this.h = +h; + this.c = +c; + this.l = +l; + this.opacity = +opacity; + } + function hcl2lab(o) { + if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); + var h = o.h * deg2rad; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); + } + define(Hcl, hcl, extend(Color, { + brighter: function brighter(k) { + return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); + }, + darker: function darker(k) { + return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); + }, + rgb: function rgb() { + return hcl2lab(this).rgb(); + } + })); + var A = -0.14861, + B = +1.78277, + C = -0.29227, + D = -0.90649, + E = +1.97294, + ED = E * D, + EB = E * B, + BC_DA = B * C - D * A; + function cubehelixConvert(o) { + if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Rgb)) o = rgbConvert(o); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), + bl = b - l, + k = (E * (g - l) - C * bl) / D, + s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), + // NaN if l=0 or l=1 + h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN; + return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); + } + function cubehelix(h, s, l, opacity) { + return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); + } + function Cubehelix(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; + } + define(Cubehelix, cubehelix, extend(Color, { + brighter: function brighter(k) { + k = k == null ? _brighter : Math.pow(_brighter, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + darker: function darker(k) { + k = k == null ? _darker : Math.pow(_darker, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function rgb() { + var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad, + l = +this.l, + a = isNaN(this.s) ? 0 : this.s * l * (1 - l), + cosh = Math.cos(h), + sinh = Math.sin(h); + return new Rgb(255 * (l + a * (A * cosh + B * sinh)), 255 * (l + a * (C * cosh + D * sinh)), 255 * (l + a * (E * cosh)), this.opacity); + } + })); + function constant(x) { + return function () { + return x; + }; + } + function linear(a, d) { + return function (t) { + return a + t * d; + }; + } + function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) { + return Math.pow(a + t * b, y); + }; + } + function gamma(y) { + return (y = +y) === 1 ? nogamma : function (a, b) { + return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); + }; + } + function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : constant(isNaN(a) ? b : a); + } + var rgb$1 = function rgbGamma(y) { + var color = gamma(y); + function rgb$1(start, end) { + var r = color((start = rgb(start)).r, (end = rgb(end)).r), + g = color(start.g, end.g), + b = color(start.b, end.b), + opacity = nogamma(start.opacity, end.opacity); + return function (t) { + start.r = r(t); + start.g = g(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; + } + rgb$1.gamma = rgbGamma; + return rgb$1; + }(1); + function numberArray(a, b) { + if (!b) b = []; + var n = a ? Math.min(b.length, a.length) : 0, + c = b.slice(), + i; + return function (t) { + for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; + return c; + }; + } + function isNumberArray(x) { + return ArrayBuffer.isView(x) && !(x instanceof DataView); + } + function genericArray(a, b) { + var nb = b ? b.length : 0, + na = a ? Math.min(nb, a.length) : 0, + x = new Array(na), + c = new Array(nb), + i; + for (i = 0; i < na; ++i) x[i] = interpolate(a[i], b[i]); + for (; i < nb; ++i) c[i] = b[i]; + return function (t) { + for (i = 0; i < na; ++i) c[i] = x[i](t); + return c; + }; + } + function date(a, b) { + var d = new Date(); + return a = +a, b = +b, function (t) { + return d.setTime(a * (1 - t) + b * t), d; + }; + } + function interpolateNumber(a, b) { + return a = +a, b = +b, function (t) { + return a * (1 - t) + b * t; + }; + } + function object(a, b) { + var i = {}, + c = {}, + k; + if (a === null || _typeof(a) !== "object") a = {}; + if (b === null || _typeof(b) !== "object") b = {}; + for (k in b) { + if (k in a) { + i[k] = interpolate(a[k], b[k]); + } else { + c[k] = b[k]; + } + } + return function (t) { + for (k in i) c[k] = i[k](t); + return c; + }; + } + var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, + reB = new RegExp(reA.source, "g"); + function zero(b) { + return function () { + return b; + }; + } + function one(b) { + return function (t) { + return b(t) + ""; + }; + } + function string(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, + // scan index for next number in b + am, + // current match in a + bm, + // current match in b + bs, + // string preceding current number in b, if any + i = -1, + // index in s + s = [], + // string constants and placeholders + q = []; // number interpolators + + // Coerce inputs to strings. + a = a + "", b = b + ""; + + // Interpolate pairs of numbers in a & b. + while ((am = reA.exec(a)) && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { + // a string precedes the next number in b + bs = b.slice(bi, bs); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { + // numbers in a & b match + if (s[i]) s[i] += bm; // coalesce with previous string + else s[++i] = bm; + } else { + // interpolate non-matching numbers + s[++i] = null; + q.push({ + i: i, + x: interpolateNumber(am, bm) + }); + } + bi = reB.lastIndex; + } + + // Add remains of b. + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + + // Special optimization for only a single match. + // Otherwise, interpolate each of the numbers and rejoin the string. + return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) { + for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }); + } + function interpolate(a, b) { + var t = _typeof(b), + c; + return b == null || t === "boolean" ? constant(b) : (t === "number" ? interpolateNumber : t === "string" ? (c = color(b)) ? (b = c, rgb$1) : string : b instanceof color ? rgb$1 : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : interpolateNumber)(a, b); + } + function interpolateRound(a, b) { + return a = +a, b = +b, function (t) { + return Math.round(a * (1 - t) + b * t); + }; + } + function constant$1(x) { + return function () { + return x; + }; + } + function number(x) { + return +x; + } + var unit = [0, 1]; + function identity(x) { + return x; + } + function normalize(a, b) { + return (b -= a = +a) ? function (x) { + return (x - a) / b; + } : constant$1(isNaN(b) ? NaN : 0.5); + } + function clamper(a, b) { + var t; + if (a > b) t = a, a = b, b = t; + return function (x) { + return Math.max(a, Math.min(b, x)); + }; + } + + // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. + // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. + function bimap(domain, range, interpolate) { + var d0 = domain[0], + d1 = domain[1], + r0 = range[0], + r1 = range[1]; + if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); + return function (x) { + return r0(d0(x)); + }; + } + function polymap(domain, range, interpolate) { + var j = Math.min(domain.length, range.length) - 1, + d = new Array(j), + r = new Array(j), + i = -1; + + // Reverse descending domains. + if (domain[j] < domain[0]) { + domain = domain.slice().reverse(); + range = range.slice().reverse(); + } + while (++i < j) { + d[i] = normalize(domain[i], domain[i + 1]); + r[i] = interpolate(range[i], range[i + 1]); + } + return function (x) { + var i = bisectRight(domain, x, 1, j) - 1; + return r[i](d[i](x)); + }; + } + function copy(source, target) { + return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown()); + } + function transformer() { + var domain = unit, + range = unit, + interpolate$1 = interpolate, + transform, + untransform, + unknown, + clamp = identity, + piecewise, + output, + input; + function rescale() { + var n = Math.min(domain.length, range.length); + if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]); + piecewise = n > 2 ? polymap : bimap; + output = input = null; + return scale; + } + function scale(x) { + return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x))); + } + scale.invert = function (y) { + return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y))); + }; + scale.domain = function (_) { + return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice(); + }; + scale.range = function (_) { + return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); + }; + scale.rangeRound = function (_) { + return range = Array.from(_), interpolate$1 = interpolateRound, rescale(); + }; + scale.clamp = function (_) { + return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity; + }; + scale.interpolate = function (_) { + return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1; + }; + scale.unknown = function (_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + return function (t, u) { + transform = t, untransform = u; + return rescale(); + }; + } + function continuous() { + return transformer()(identity, identity); + } + + // Computes the decimal coefficient and exponent of the specified number x with + // significant digits p, where x is positive and p is in [1, 21] or undefined. + // For example, formatDecimal(1.23) returns ["123", 0]. + function formatDecimal(x, p) { + if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity + var i, + coefficient = x.slice(0, i); + + // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ + // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). + return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)]; + } + function exponent(x) { + return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN; + } + function formatGroup(grouping, thousands) { + return function (value, width) { + var i = value.length, + t = [], + j = 0, + g = grouping[0], + length = 0; + while (i > 0 && g > 0) { + if (length + g + 1 > width) g = Math.max(1, width - length); + t.push(value.substring(i -= g, i + g)); + if ((length += g + 1) > width) break; + g = grouping[j = (j + 1) % grouping.length]; + } + return t.reverse().join(thousands); + }; + } + function formatNumerals(numerals) { + return function (value) { + return value.replace(/[0-9]/g, function (i) { + return numerals[+i]; + }); + }; + } + + // [[fill]align][sign][symbol][0][width][,][.precision][~][type] + var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; + function formatSpecifier(specifier) { + if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); + var match; + return new FormatSpecifier({ + fill: match[1], + align: match[2], + sign: match[3], + symbol: match[4], + zero: match[5], + width: match[6], + comma: match[7], + precision: match[8] && match[8].slice(1), + trim: match[9], + type: match[10] + }); + } + formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof + + function FormatSpecifier(specifier) { + this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; + this.align = specifier.align === undefined ? ">" : specifier.align + ""; + this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; + this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; + this.zero = !!specifier.zero; + this.width = specifier.width === undefined ? undefined : +specifier.width; + this.comma = !!specifier.comma; + this.precision = specifier.precision === undefined ? undefined : +specifier.precision; + this.trim = !!specifier.trim; + this.type = specifier.type === undefined ? "" : specifier.type + ""; + } + FormatSpecifier.prototype.toString = function () { + return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === undefined ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type; + }; + + // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. + function formatTrim(s) { + out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { + switch (s[i]) { + case ".": + i0 = i1 = i; + break; + case "0": + if (i0 === 0) i0 = i; + i1 = i; + break; + default: + if (!+s[i]) break out; + if (i0 > 0) i0 = 0; + break; + } + } + return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; + } + var prefixExponent; + function formatPrefixAuto(x, p) { + var d = formatDecimal(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1], + i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, + n = coefficient.length; + return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y! + } + function formatRounded(x, p) { + var d = formatDecimal(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1]; + return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0"); + } + var formatTypes = { + "%": function _(x, p) { + return (x * 100).toFixed(p); + }, + "b": function b(x) { + return Math.round(x).toString(2); + }, + "c": function c(x) { + return x + ""; + }, + "d": function d(x) { + return Math.round(x).toString(10); + }, + "e": function e(x, p) { + return x.toExponential(p); + }, + "f": function f(x, p) { + return x.toFixed(p); + }, + "g": function g(x, p) { + return x.toPrecision(p); + }, + "o": function o(x) { + return Math.round(x).toString(8); + }, + "p": function p(x, _p) { + return formatRounded(x * 100, _p); + }, + "r": formatRounded, + "s": formatPrefixAuto, + "X": function X(x) { + return Math.round(x).toString(16).toUpperCase(); + }, + "x": function x(_x) { + return Math.round(_x).toString(16); + } + }; + function identity$1(x) { + return x; + } + var map = Array.prototype.map, + prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"]; + function formatLocale(locale) { + var group = locale.grouping === undefined || locale.thousands === undefined ? identity$1 : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""), + currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", + currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", + decimal = locale.decimal === undefined ? "." : locale.decimal + "", + numerals = locale.numerals === undefined ? identity$1 : formatNumerals(map.call(locale.numerals, String)), + percent = locale.percent === undefined ? "%" : locale.percent + "", + minus = locale.minus === undefined ? "-" : locale.minus + "", + nan = locale.nan === undefined ? "NaN" : locale.nan + ""; + function newFormat(specifier) { + specifier = formatSpecifier(specifier); + var fill = specifier.fill, + align = specifier.align, + sign = specifier.sign, + symbol = specifier.symbol, + zero = specifier.zero, + width = specifier.width, + comma = specifier.comma, + precision = specifier.precision, + trim = specifier.trim, + type = specifier.type; + + // The "n" type is an alias for ",g". + if (type === "n") comma = true, type = "g"; + + // The "" type, and any invalid type, is an alias for ".12~g". + else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g"; + + // If zero fill is specified, padding goes after sign and before digits. + if (zero || fill === "0" && align === "=") zero = true, fill = "0", align = "="; + + // Compute the prefix and suffix. + // For SI-prefix, the suffix is lazily computed. + var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", + suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; + + // What format function should we use? + // Is this an integer type? + // Can this type generate exponential notation? + var formatType = formatTypes[type], + maybeSuffix = /[defgprs%]/.test(type); + + // Set the default precision if not specified, + // or clamp the specified precision to the supported range. + // For significant precision, it must be in [1, 21]. + // For fixed precision, it must be in [0, 20]. + precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision)); + function format(value) { + var valuePrefix = prefix, + valueSuffix = suffix, + i, + n, + c; + if (type === "c") { + valueSuffix = formatType(value) + valueSuffix; + value = ""; + } else { + value = +value; + + // Determine the sign. -0 is not less than 0, but 1 / -0 is! + var valueNegative = value < 0 || 1 / value < 0; + + // Perform the initial formatting. + value = isNaN(value) ? nan : formatType(Math.abs(value), precision); + + // Trim insignificant zeros. + if (trim) value = formatTrim(value); + + // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign. + if (valueNegative && +value === 0 && sign !== "+") valueNegative = false; + + // Compute the prefix and suffix. + valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; + valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); + + // Break the formatted value into the integer “value” part that can be + // grouped, and fractional or exponential “suffix” part that is not. + if (maybeSuffix) { + i = -1, n = value.length; + while (++i < n) { + if (c = value.charCodeAt(i), 48 > c || c > 57) { + valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; + value = value.slice(0, i); + break; + } + } + } + } + + // If the fill character is not "0", grouping is applied before padding. + if (comma && !zero) value = group(value, Infinity); + + // Compute the padding. + var length = valuePrefix.length + value.length + valueSuffix.length, + padding = length < width ? new Array(width - length + 1).join(fill) : ""; + + // If the fill character is "0", grouping is applied after padding. + if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; + + // Reconstruct the final output based on the desired alignment. + switch (align) { + case "<": + value = valuePrefix + value + valueSuffix + padding; + break; + case "=": + value = valuePrefix + padding + value + valueSuffix; + break; + case "^": + value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); + break; + default: + value = padding + valuePrefix + value + valueSuffix; + break; + } + return numerals(value); + } + format.toString = function () { + return specifier + ""; + }; + return format; + } + function formatPrefix(specifier, value) { + var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), + e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3, + k = Math.pow(10, -e), + prefix = prefixes[8 + e / 3]; + return function (value) { + return f(k * value) + prefix; + }; + } + return { + format: newFormat, + formatPrefix: formatPrefix + }; + } + var locale; + var format; + var formatPrefix; + defaultLocale({ + decimal: ".", + thousands: ",", + grouping: [3], + currency: ["$", ""], + minus: "-" + }); + function defaultLocale(definition) { + locale = formatLocale(definition); + format = locale.format; + formatPrefix = locale.formatPrefix; + return locale; + } + function precisionFixed(step) { + return Math.max(0, -exponent(Math.abs(step))); + } + function precisionPrefix(step, value) { + return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step))); + } + function precisionRound(step, max) { + step = Math.abs(step), max = Math.abs(max) - step; + return Math.max(0, exponent(max) - exponent(step)) + 1; + } + function tickFormat(start, stop, count, specifier) { + var step = tickStep(start, stop, count), + precision; + specifier = formatSpecifier(specifier == null ? ",f" : specifier); + switch (specifier.type) { + case "s": + { + var value = Math.max(Math.abs(start), Math.abs(stop)); + if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision; + return formatPrefix(specifier, value); + } + case "": + case "e": + case "g": + case "p": + case "r": + { + if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); + break; + } + case "f": + case "%": + { + if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2; + break; + } + } + return format(specifier); + } + function linearish(scale) { + var domain = scale.domain; + scale.ticks = function (count) { + var d = domain(); + return ticks(d[0], d[d.length - 1], count == null ? 10 : count); + }; + scale.tickFormat = function (count, specifier) { + var d = domain(); + return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier); + }; + scale.nice = function (count) { + if (count == null) count = 10; + var d = domain(), + i0 = 0, + i1 = d.length - 1, + start = d[i0], + stop = d[i1], + step; + if (stop < start) { + step = start, start = stop, stop = step; + step = i0, i0 = i1, i1 = step; + } + step = tickIncrement(start, stop, count); + if (step > 0) { + start = Math.floor(start / step) * step; + stop = Math.ceil(stop / step) * step; + step = tickIncrement(start, stop, count); + } else if (step < 0) { + start = Math.ceil(start * step) / step; + stop = Math.floor(stop * step) / step; + step = tickIncrement(start, stop, count); + } + if (step > 0) { + d[i0] = Math.floor(start / step) * step; + d[i1] = Math.ceil(stop / step) * step; + domain(d); + } else if (step < 0) { + d[i0] = Math.ceil(start * step) / step; + d[i1] = Math.floor(stop * step) / step; + domain(d); + } + return scale; + }; + return scale; + } + function linear$1() { + var scale = continuous(); + scale.copy = function () { + return copy(scale, linear$1()); + }; + initRange.apply(scale, arguments); + return linearish(scale); + } + var t0$1 = new Date(), + t1$1 = new Date(); + function newInterval(floori, offseti, count, field) { + function interval(date) { + return floori(date = arguments.length === 0 ? new Date() : new Date(+date)), date; + } + interval.floor = function (date) { + return floori(date = new Date(+date)), date; + }; + interval.ceil = function (date) { + return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; + }; + interval.round = function (date) { + var d0 = interval(date), + d1 = interval.ceil(date); + return date - d0 < d1 - date ? d0 : d1; + }; + interval.offset = function (date, step) { + return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; + }; + interval.range = function (start, stop, step) { + var range = [], + previous; + start = interval.ceil(start); + step = step == null ? 1 : Math.floor(step); + if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date + do range.push(previous = new Date(+start)), offseti(start, step), floori(start); while (previous < start && start < stop); + return range; + }; + interval.filter = function (test) { + return newInterval(function (date) { + if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); + }, function (date, step) { + if (date >= date) { + if (step < 0) while (++step <= 0) { + while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty + } else while (--step >= 0) { + while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty + } + } + }); + }; + if (count) { + interval.count = function (start, end) { + t0$1.setTime(+start), t1$1.setTime(+end); + floori(t0$1), floori(t1$1); + return Math.floor(count(t0$1, t1$1)); + }; + interval.every = function (step) { + step = Math.floor(step); + return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function (d) { + return field(d) % step === 0; + } : function (d) { + return interval.count(0, d) % step === 0; + }); + }; + } + return interval; + } + var millisecond = newInterval(function () { + // noop + }, function (date, step) { + date.setTime(+date + step); + }, function (start, end) { + return end - start; + }); + + // An optimized implementation for this simple case. + millisecond.every = function (k) { + k = Math.floor(k); + if (!isFinite(k) || !(k > 0)) return null; + if (!(k > 1)) return millisecond; + return newInterval(function (date) { + date.setTime(Math.floor(date / k) * k); + }, function (date, step) { + date.setTime(+date + step * k); + }, function (start, end) { + return (end - start) / k; + }); + }; + var durationSecond = 1e3; + var durationMinute = 6e4; + var durationHour = 36e5; + var durationDay = 864e5; + var durationWeek = 6048e5; + var second = newInterval(function (date) { + date.setTime(date - date.getMilliseconds()); + }, function (date, step) { + date.setTime(+date + step * durationSecond); + }, function (start, end) { + return (end - start) / durationSecond; + }, function (date) { + return date.getUTCSeconds(); + }); + var minute = newInterval(function (date) { + date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond); + }, function (date, step) { + date.setTime(+date + step * durationMinute); + }, function (start, end) { + return (end - start) / durationMinute; + }, function (date) { + return date.getMinutes(); + }); + var hour = newInterval(function (date) { + date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute); + }, function (date, step) { + date.setTime(+date + step * durationHour); + }, function (start, end) { + return (end - start) / durationHour; + }, function (date) { + return date.getHours(); + }); + var day = newInterval(function (date) { + date.setHours(0, 0, 0, 0); + }, function (date, step) { + date.setDate(date.getDate() + step); + }, function (start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay; + }, function (date) { + return date.getDate() - 1; + }); + function weekday(i) { + return newInterval(function (date) { + date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); + date.setHours(0, 0, 0, 0); + }, function (date, step) { + date.setDate(date.getDate() + step * 7); + }, function (start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek; + }); + } + var sunday = weekday(0); + var monday = weekday(1); + var tuesday = weekday(2); + var wednesday = weekday(3); + var thursday = weekday(4); + var friday = weekday(5); + var saturday = weekday(6); + var month = newInterval(function (date) { + date.setDate(1); + date.setHours(0, 0, 0, 0); + }, function (date, step) { + date.setMonth(date.getMonth() + step); + }, function (start, end) { + return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; + }, function (date) { + return date.getMonth(); + }); + var year = newInterval(function (date) { + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); + }, function (date, step) { + date.setFullYear(date.getFullYear() + step); + }, function (start, end) { + return end.getFullYear() - start.getFullYear(); + }, function (date) { + return date.getFullYear(); + }); + + // An optimized implementation for this simple case. + year.every = function (k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function (date) { + date.setFullYear(Math.floor(date.getFullYear() / k) * k); + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); + }, function (date, step) { + date.setFullYear(date.getFullYear() + step * k); + }); + }; + var utcMinute = newInterval(function (date) { + date.setUTCSeconds(0, 0); + }, function (date, step) { + date.setTime(+date + step * durationMinute); + }, function (start, end) { + return (end - start) / durationMinute; + }, function (date) { + return date.getUTCMinutes(); + }); + var utcHour = newInterval(function (date) { + date.setUTCMinutes(0, 0, 0); + }, function (date, step) { + date.setTime(+date + step * durationHour); + }, function (start, end) { + return (end - start) / durationHour; + }, function (date) { + return date.getUTCHours(); + }); + var utcDay = newInterval(function (date) { + date.setUTCHours(0, 0, 0, 0); + }, function (date, step) { + date.setUTCDate(date.getUTCDate() + step); + }, function (start, end) { + return (end - start) / durationDay; + }, function (date) { + return date.getUTCDate() - 1; + }); + function utcWeekday(i) { + return newInterval(function (date) { + date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); + date.setUTCHours(0, 0, 0, 0); + }, function (date, step) { + date.setUTCDate(date.getUTCDate() + step * 7); + }, function (start, end) { + return (end - start) / durationWeek; + }); + } + var utcSunday = utcWeekday(0); + var utcMonday = utcWeekday(1); + var utcTuesday = utcWeekday(2); + var utcWednesday = utcWeekday(3); + var utcThursday = utcWeekday(4); + var utcFriday = utcWeekday(5); + var utcSaturday = utcWeekday(6); + var utcMonth = newInterval(function (date) { + date.setUTCDate(1); + date.setUTCHours(0, 0, 0, 0); + }, function (date, step) { + date.setUTCMonth(date.getUTCMonth() + step); + }, function (start, end) { + return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; + }, function (date) { + return date.getUTCMonth(); + }); + var utcYear = newInterval(function (date) { + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); + }, function (date, step) { + date.setUTCFullYear(date.getUTCFullYear() + step); + }, function (start, end) { + return end.getUTCFullYear() - start.getUTCFullYear(); + }, function (date) { + return date.getUTCFullYear(); + }); + + // An optimized implementation for this simple case. + utcYear.every = function (k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function (date) { + date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); + }, function (date, step) { + date.setUTCFullYear(date.getUTCFullYear() + step * k); + }); + }; + function localDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); + date.setFullYear(d.y); + return date; + } + return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); + } + function utcDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); + date.setUTCFullYear(d.y); + return date; + } + return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); + } + function newDate(y, m, d) { + return { + y: y, + m: m, + d: d, + H: 0, + M: 0, + S: 0, + L: 0 + }; + } + function formatLocale$1(locale) { + var locale_dateTime = locale.dateTime, + locale_date = locale.date, + locale_time = locale.time, + locale_periods = locale.periods, + locale_weekdays = locale.days, + locale_shortWeekdays = locale.shortDays, + locale_months = locale.months, + locale_shortMonths = locale.shortMonths; + var periodRe = formatRe(locale_periods), + periodLookup = formatLookup(locale_periods), + weekdayRe = formatRe(locale_weekdays), + weekdayLookup = formatLookup(locale_weekdays), + shortWeekdayRe = formatRe(locale_shortWeekdays), + shortWeekdayLookup = formatLookup(locale_shortWeekdays), + monthRe = formatRe(locale_months), + monthLookup = formatLookup(locale_months), + shortMonthRe = formatRe(locale_shortMonths), + shortMonthLookup = formatLookup(locale_shortMonths); + var formats = { + "a": formatShortWeekday, + "A": formatWeekday, + "b": formatShortMonth, + "B": formatMonth, + "c": null, + "d": formatDayOfMonth, + "e": formatDayOfMonth, + "f": formatMicroseconds, + "H": formatHour24, + "I": formatHour12, + "j": formatDayOfYear, + "L": formatMilliseconds, + "m": formatMonthNumber, + "M": formatMinutes, + "p": formatPeriod, + "q": formatQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatSeconds, + "u": formatWeekdayNumberMonday, + "U": formatWeekNumberSunday, + "V": formatWeekNumberISO, + "w": formatWeekdayNumberSunday, + "W": formatWeekNumberMonday, + "x": null, + "X": null, + "y": formatYear, + "Y": formatFullYear, + "Z": formatZone, + "%": formatLiteralPercent + }; + var utcFormats = { + "a": formatUTCShortWeekday, + "A": formatUTCWeekday, + "b": formatUTCShortMonth, + "B": formatUTCMonth, + "c": null, + "d": formatUTCDayOfMonth, + "e": formatUTCDayOfMonth, + "f": formatUTCMicroseconds, + "H": formatUTCHour24, + "I": formatUTCHour12, + "j": formatUTCDayOfYear, + "L": formatUTCMilliseconds, + "m": formatUTCMonthNumber, + "M": formatUTCMinutes, + "p": formatUTCPeriod, + "q": formatUTCQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatUTCSeconds, + "u": formatUTCWeekdayNumberMonday, + "U": formatUTCWeekNumberSunday, + "V": formatUTCWeekNumberISO, + "w": formatUTCWeekdayNumberSunday, + "W": formatUTCWeekNumberMonday, + "x": null, + "X": null, + "y": formatUTCYear, + "Y": formatUTCFullYear, + "Z": formatUTCZone, + "%": formatLiteralPercent + }; + var parses = { + "a": parseShortWeekday, + "A": parseWeekday, + "b": parseShortMonth, + "B": parseMonth, + "c": parseLocaleDateTime, + "d": parseDayOfMonth, + "e": parseDayOfMonth, + "f": parseMicroseconds, + "H": parseHour24, + "I": parseHour24, + "j": parseDayOfYear, + "L": parseMilliseconds, + "m": parseMonthNumber, + "M": parseMinutes, + "p": parsePeriod, + "q": parseQuarter, + "Q": parseUnixTimestamp, + "s": parseUnixTimestampSeconds, + "S": parseSeconds, + "u": parseWeekdayNumberMonday, + "U": parseWeekNumberSunday, + "V": parseWeekNumberISO, + "w": parseWeekdayNumberSunday, + "W": parseWeekNumberMonday, + "x": parseLocaleDate, + "X": parseLocaleTime, + "y": parseYear, + "Y": parseFullYear, + "Z": parseZone, + "%": parseLiteralPercent + }; + + // These recursive directive definitions must be deferred. + formats.x = newFormat(locale_date, formats); + formats.X = newFormat(locale_time, formats); + formats.c = newFormat(locale_dateTime, formats); + utcFormats.x = newFormat(locale_date, utcFormats); + utcFormats.X = newFormat(locale_time, utcFormats); + utcFormats.c = newFormat(locale_dateTime, utcFormats); + function newFormat(specifier, formats) { + return function (date) { + var string = [], + i = -1, + j = 0, + n = specifier.length, + c, + pad, + format; + if (!(date instanceof Date)) date = new Date(+date); + while (++i < n) { + if (specifier.charCodeAt(i) === 37) { + string.push(specifier.slice(j, i)); + if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);else pad = c === "e" ? " " : "0"; + if (format = formats[c]) c = format(date, pad); + string.push(c); + j = i + 1; + } + } + string.push(specifier.slice(j, i)); + return string.join(""); + }; + } + function newParse(specifier, Z) { + return function (string) { + var d = newDate(1900, undefined, 1), + i = parseSpecifier(d, specifier, string += "", 0), + week, + day$1; + if (i != string.length) return null; + + // If a UNIX timestamp is specified, return it. + if ("Q" in d) return new Date(d.Q); + if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); + + // If this is utcParse, never use the local timezone. + if (Z && !("Z" in d)) d.Z = 0; + + // The am-pm flag is 0 for AM, and 1 for PM. + if ("p" in d) d.H = d.H % 12 + d.p * 12; + + // If the month was not specified, inherit from the quarter. + if (d.m === undefined) d.m = "q" in d ? d.q : 0; + + // Convert day-of-week and week-of-year to day-of-year. + if ("V" in d) { + if (d.V < 1 || d.V > 53) return null; + if (!("w" in d)) d.w = 1; + if ("Z" in d) { + week = utcDate(newDate(d.y, 0, 1)), day$1 = week.getUTCDay(); + week = day$1 > 4 || day$1 === 0 ? utcMonday.ceil(week) : utcMonday(week); + week = utcDay.offset(week, (d.V - 1) * 7); + d.y = week.getUTCFullYear(); + d.m = week.getUTCMonth(); + d.d = week.getUTCDate() + (d.w + 6) % 7; + } else { + week = localDate(newDate(d.y, 0, 1)), day$1 = week.getDay(); + week = day$1 > 4 || day$1 === 0 ? monday.ceil(week) : monday(week); + week = day.offset(week, (d.V - 1) * 7); + d.y = week.getFullYear(); + d.m = week.getMonth(); + d.d = week.getDate() + (d.w + 6) % 7; + } + } else if ("W" in d || "U" in d) { + if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; + day$1 = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); + d.m = 0; + d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day$1 + 5) % 7 : d.w + d.U * 7 - (day$1 + 6) % 7; + } + + // If a time zone is specified, all fields are interpreted as UTC and then + // offset according to the specified time zone. + if ("Z" in d) { + d.H += d.Z / 100 | 0; + d.M += d.Z % 100; + return utcDate(d); + } + + // Otherwise, all fields are in local time. + return localDate(d); + }; + } + function parseSpecifier(d, specifier, string, j) { + var i = 0, + n = specifier.length, + m = string.length, + c, + parse; + while (i < n) { + if (j >= m) return -1; + c = specifier.charCodeAt(i++); + if (c === 37) { + c = specifier.charAt(i++); + parse = parses[c in pads ? specifier.charAt(i++) : c]; + if (!parse || (j = parse(d, string, j)) < 0) return -1; + } else if (c != string.charCodeAt(j++)) { + return -1; + } + } + return j; + } + function parsePeriod(d, string, i) { + var n = periodRe.exec(string.slice(i)); + return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + function parseShortWeekday(d, string, i) { + var n = shortWeekdayRe.exec(string.slice(i)); + return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + function parseWeekday(d, string, i) { + var n = weekdayRe.exec(string.slice(i)); + return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + function parseShortMonth(d, string, i) { + var n = shortMonthRe.exec(string.slice(i)); + return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + function parseMonth(d, string, i) { + var n = monthRe.exec(string.slice(i)); + return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + function parseLocaleDateTime(d, string, i) { + return parseSpecifier(d, locale_dateTime, string, i); + } + function parseLocaleDate(d, string, i) { + return parseSpecifier(d, locale_date, string, i); + } + function parseLocaleTime(d, string, i) { + return parseSpecifier(d, locale_time, string, i); + } + function formatShortWeekday(d) { + return locale_shortWeekdays[d.getDay()]; + } + function formatWeekday(d) { + return locale_weekdays[d.getDay()]; + } + function formatShortMonth(d) { + return locale_shortMonths[d.getMonth()]; + } + function formatMonth(d) { + return locale_months[d.getMonth()]; + } + function formatPeriod(d) { + return locale_periods[+(d.getHours() >= 12)]; + } + function formatQuarter(d) { + return 1 + ~~(d.getMonth() / 3); + } + function formatUTCShortWeekday(d) { + return locale_shortWeekdays[d.getUTCDay()]; + } + function formatUTCWeekday(d) { + return locale_weekdays[d.getUTCDay()]; + } + function formatUTCShortMonth(d) { + return locale_shortMonths[d.getUTCMonth()]; + } + function formatUTCMonth(d) { + return locale_months[d.getUTCMonth()]; + } + function formatUTCPeriod(d) { + return locale_periods[+(d.getUTCHours() >= 12)]; + } + function formatUTCQuarter(d) { + return 1 + ~~(d.getUTCMonth() / 3); + } + return { + format: function format(specifier) { + var f = newFormat(specifier += "", formats); + f.toString = function () { + return specifier; + }; + return f; + }, + parse: function parse(specifier) { + var p = newParse(specifier += "", false); + p.toString = function () { + return specifier; + }; + return p; + }, + utcFormat: function utcFormat(specifier) { + var f = newFormat(specifier += "", utcFormats); + f.toString = function () { + return specifier; + }; + return f; + }, + utcParse: function utcParse(specifier) { + var p = newParse(specifier += "", true); + p.toString = function () { + return specifier; + }; + return p; + } + }; + } + var pads = { + "-": "", + "_": " ", + "0": "0" + }, + numberRe = /^\s*\d+/, + // note: ignores next directive + percentRe = /^%/, + requoteRe = /[\\^$*+?|[\]().{}]/g; + function pad(value, fill, width) { + var sign = value < 0 ? "-" : "", + string = (sign ? -value : value) + "", + length = string.length; + return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); + } + function requote(s) { + return s.replace(requoteRe, "\\$&"); + } + function formatRe(names) { + return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); + } + function formatLookup(names) { + var map = {}, + i = -1, + n = names.length; + while (++i < n) map[names[i].toLowerCase()] = i; + return map; + } + function parseWeekdayNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.w = +n[0], i + n[0].length) : -1; + } + function parseWeekdayNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.u = +n[0], i + n[0].length) : -1; + } + function parseWeekNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.U = +n[0], i + n[0].length) : -1; + } + function parseWeekNumberISO(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.V = +n[0], i + n[0].length) : -1; + } + function parseWeekNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.W = +n[0], i + n[0].length) : -1; + } + function parseFullYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 4)); + return n ? (d.y = +n[0], i + n[0].length) : -1; + } + function parseYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; + } + function parseZone(d, string, i) { + var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); + return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; + } + function parseQuarter(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; + } + function parseMonthNumber(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.m = n[0] - 1, i + n[0].length) : -1; + } + function parseDayOfMonth(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.d = +n[0], i + n[0].length) : -1; + } + function parseDayOfYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; + } + function parseHour24(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.H = +n[0], i + n[0].length) : -1; + } + function parseMinutes(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.M = +n[0], i + n[0].length) : -1; + } + function parseSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.S = +n[0], i + n[0].length) : -1; + } + function parseMilliseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.L = +n[0], i + n[0].length) : -1; + } + function parseMicroseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 6)); + return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; + } + function parseLiteralPercent(d, string, i) { + var n = percentRe.exec(string.slice(i, i + 1)); + return n ? i + n[0].length : -1; + } + function parseUnixTimestamp(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.Q = +n[0], i + n[0].length) : -1; + } + function parseUnixTimestampSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.s = +n[0], i + n[0].length) : -1; + } + function formatDayOfMonth(d, p) { + return pad(d.getDate(), p, 2); + } + function formatHour24(d, p) { + return pad(d.getHours(), p, 2); + } + function formatHour12(d, p) { + return pad(d.getHours() % 12 || 12, p, 2); + } + function formatDayOfYear(d, p) { + return pad(1 + day.count(year(d), d), p, 3); + } + function formatMilliseconds(d, p) { + return pad(d.getMilliseconds(), p, 3); + } + function formatMicroseconds(d, p) { + return formatMilliseconds(d, p) + "000"; + } + function formatMonthNumber(d, p) { + return pad(d.getMonth() + 1, p, 2); + } + function formatMinutes(d, p) { + return pad(d.getMinutes(), p, 2); + } + function formatSeconds(d, p) { + return pad(d.getSeconds(), p, 2); + } + function formatWeekdayNumberMonday(d) { + var day = d.getDay(); + return day === 0 ? 7 : day; + } + function formatWeekNumberSunday(d, p) { + return pad(sunday.count(year(d) - 1, d), p, 2); + } + function formatWeekNumberISO(d, p) { + var day = d.getDay(); + d = day >= 4 || day === 0 ? thursday(d) : thursday.ceil(d); + return pad(thursday.count(year(d), d) + (year(d).getDay() === 4), p, 2); + } + function formatWeekdayNumberSunday(d) { + return d.getDay(); + } + function formatWeekNumberMonday(d, p) { + return pad(monday.count(year(d) - 1, d), p, 2); + } + function formatYear(d, p) { + return pad(d.getFullYear() % 100, p, 2); + } + function formatFullYear(d, p) { + return pad(d.getFullYear() % 10000, p, 4); + } + function formatZone(d) { + var z = d.getTimezoneOffset(); + return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2); + } + function formatUTCDayOfMonth(d, p) { + return pad(d.getUTCDate(), p, 2); + } + function formatUTCHour24(d, p) { + return pad(d.getUTCHours(), p, 2); + } + function formatUTCHour12(d, p) { + return pad(d.getUTCHours() % 12 || 12, p, 2); + } + function formatUTCDayOfYear(d, p) { + return pad(1 + utcDay.count(utcYear(d), d), p, 3); + } + function formatUTCMilliseconds(d, p) { + return pad(d.getUTCMilliseconds(), p, 3); + } + function formatUTCMicroseconds(d, p) { + return formatUTCMilliseconds(d, p) + "000"; + } + function formatUTCMonthNumber(d, p) { + return pad(d.getUTCMonth() + 1, p, 2); + } + function formatUTCMinutes(d, p) { + return pad(d.getUTCMinutes(), p, 2); + } + function formatUTCSeconds(d, p) { + return pad(d.getUTCSeconds(), p, 2); + } + function formatUTCWeekdayNumberMonday(d) { + var dow = d.getUTCDay(); + return dow === 0 ? 7 : dow; + } + function formatUTCWeekNumberSunday(d, p) { + return pad(utcSunday.count(utcYear(d) - 1, d), p, 2); + } + function formatUTCWeekNumberISO(d, p) { + var day = d.getUTCDay(); + d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d); + return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2); + } + function formatUTCWeekdayNumberSunday(d) { + return d.getUTCDay(); + } + function formatUTCWeekNumberMonday(d, p) { + return pad(utcMonday.count(utcYear(d) - 1, d), p, 2); + } + function formatUTCYear(d, p) { + return pad(d.getUTCFullYear() % 100, p, 2); + } + function formatUTCFullYear(d, p) { + return pad(d.getUTCFullYear() % 10000, p, 4); + } + function formatUTCZone() { + return "+0000"; + } + function formatLiteralPercent() { + return "%"; + } + function formatUnixTimestamp(d) { + return +d; + } + function formatUnixTimestampSeconds(d) { + return Math.floor(+d / 1000); + } + var locale$1; + var timeFormat; + var timeParse; + var utcFormat; + var utcParse; + defaultLocale$1({ + dateTime: "%x, %X", + date: "%-m/%-d/%Y", + time: "%-I:%M:%S %p", + periods: ["AM", "PM"], + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] + }); + function defaultLocale$1(definition) { + locale$1 = formatLocale$1(definition); + timeFormat = locale$1.format; + timeParse = locale$1.parse; + utcFormat = locale$1.utcFormat; + utcParse = locale$1.utcParse; + return locale$1; + } + var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; + function formatIsoNative(date) { + return date.toISOString(); + } + var formatIso = Date.prototype.toISOString ? formatIsoNative : utcFormat(isoSpecifier); + function parseIsoNative(string) { + var date = new Date(string); + return isNaN(date) ? null : date; + } + var parseIso = +new Date("2000-01-01T00:00:00.000Z") ? parseIsoNative : utcParse(isoSpecifier); + var noop = { + value: function value() {} + }; + function 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 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.prototype = { + constructor: Dispatch, + on: function on(typename, callback) { + var _ = this._, + T = 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 copy() { + var copy = {}, + _ = this._; + for (var t in _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function call(type, that) { + if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function apply(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + } + }; + function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } + } + function set(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) type.push({ + name: name, + value: callback + }); + return type; + } + var xhtml = "http://www.w3.org/1999/xhtml"; + var 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/" + }; + 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; + } + 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); + }; + } + function creator(name) { + var fullname = namespace(name); + return (fullname.local ? creatorFixed : creatorInherit)(fullname); + } + function none() {} + function selector(selector) { + return selector == null ? none : function () { + return this.querySelector(selector); + }; + } + 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); + } + function empty() { + return []; + } + function selectorAll(selector) { + return selector == null ? empty : function () { + return this.querySelectorAll(selector); + }; + } + function selection_selectAll(select) { + if (typeof select !== "function") 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); + } + function matcher(selector) { + return function () { + return this.matches(selector); + }; + } + 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); + } + function sparse(update) { + return new Array(update.length); + } + function selection_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 appendChild(child) { + return this._parent.insertBefore(child, this._next); + }, + insertBefore: function insertBefore(child, next) { + return this._parent.insertBefore(child, next); + }, + querySelector: function querySelector(selector) { + return this._parent.querySelector(selector); + }, + querySelectorAll: function querySelectorAll(selector) { + return this._parent.querySelectorAll(selector); + } + }; + function constant$2(x) { + return function () { + return x; + }; + } + var keyPrefix = "$"; // Protect against keys like “__proto__”. + + 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 = {}, + 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 = keyPrefix + key.call(node, node.__data__, i, group); + if (keyValue in nodeByKeyValue) { + exit[i] = node; + } else { + nodeByKeyValue[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 = keyPrefix + key.call(parent, data[i], i, data); + if (node = nodeByKeyValue[keyValue]) { + update[i] = node; + node.__data__ = data[i]; + nodeByKeyValue[keyValue] = null; + } 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[keyValues[i]] === node) { + exit[i] = node; + } + } + } + function selection_data(value, key) { + if (!value) { + data = new Array(this.size()), j = -1; + this.each(function (d) { + data[++j] = d; + }); + return data; + } + var bind = key ? bindKey : bindIndex, + parents = this._parents, + groups = this._groups; + if (typeof value !== "function") value = constant$2(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 = 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; + } + function selection_exit() { + return new Selection(this._exit || this._groups.map(sparse), this._parents); + } + function selection_join(onenter, onupdate, onexit) { + var enter = this.enter(), + update = this, + exit = this.exit(); + enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); + if (onupdate != null) update = onupdate(update); + if (onexit == null) exit.remove();else onexit(exit); + return enter && update ? enter.merge(update).order() : update; + } + function selection_merge(selection) { + 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); + } + function selection_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; + } + function selection_sort(compare) { + if (!compare) compare = ascending$1; + 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$1(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + } + function selection_call() { + var callback = arguments[0]; + arguments[0] = this; + callback.apply(null, arguments); + return this; + } + function selection_nodes() { + var nodes = new Array(this.size()), + i = -1; + this.each(function () { + nodes[++i] = this; + }); + return nodes; + } + function selection_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; + } + function selection_size() { + var size = 0; + this.each(function () { + ++size; + }); + return size; + } + function selection_empty() { + return !this.node(); + } + function selection_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; + } + 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); + }; + } + function selection_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)); + } + function defaultView(node) { + return node.ownerDocument && node.ownerDocument.defaultView // node is a Node + || node.document && node // node is a Window + || node.defaultView; // node is a Document + } + 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); + }; + } + function selection_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) || defaultView(node).getComputedStyle(node, null).getPropertyValue(name); + } + 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; + }; + } + function selection_property(name, value) { + return arguments.length > 1 ? this.each((value == null ? propertyRemove : typeof value === "function" ? propertyFunction : propertyConstant)(name, value)) : this.node()[name]; + } + 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 add(name) { + var i = this._names.indexOf(name); + if (i < 0) { + this._names.push(name); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + remove: function remove(name) { + var i = this._names.indexOf(name); + if (i >= 0) { + this._names.splice(i, 1); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + contains: function contains(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); + }; + } + function selection_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)); + } + 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; + }; + } + function selection_text(value) { + return arguments.length ? this.each(value == null ? textRemove : (typeof value === "function" ? textFunction : textConstant)(value)) : this.node().textContent; + } + 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; + }; + } + function selection_html(value) { + return arguments.length ? this.each(value == null ? htmlRemove : (typeof value === "function" ? htmlFunction : htmlConstant)(value)) : this.node().innerHTML; + } + function raise() { + if (this.nextSibling) this.parentNode.appendChild(this); + } + function selection_raise() { + return this.each(raise); + } + function lower() { + if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); + } + function selection_lower() { + return this.each(lower); + } + function selection_append(name) { + var create = typeof name === "function" ? name : creator(name); + return this.select(function () { + return this.appendChild(create.apply(this, arguments)); + }); + } + function constantNull() { + return null; + } + function selection_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); + }); + } + function remove() { + var parent = this.parentNode; + if (parent) parent.removeChild(this); + } + function selection_remove() { + return this.each(remove); + } + 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; + } + function selection_clone(deep) { + return this.select(deep ? selection_cloneDeep : selection_cloneShallow); + } + function selection_datum(value) { + return arguments.length ? this.property("__data__", value) : this.node().__data__; + } + var filterEvents = {}; + var event = null; + if (typeof document !== "undefined") { + var element = document.documentElement; + if (!("onmouseenter" in element)) { + filterEvents = { + mouseenter: "mouseover", + mouseleave: "mouseout" + }; + } + } + function filterContextListener(listener, index, group) { + listener = contextListener(listener, index, group); + return function (event) { + var related = event.relatedTarget; + if (!related || related !== this && !(related.compareDocumentPosition(this) & 8)) { + listener.call(this, event); + } + }; + } + function contextListener(listener, index, group) { + return function (event1) { + var event0 = event; // Events can be reentrant (e.g., focus). + event = event1; + try { + listener.call(this, this.__data__, index, group); + } finally { + event = event0; + } + }; + } + function parseTypenames$1(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.capture); + } else { + on[++i] = o; + } + } + if (++i) on.length = i;else delete this.__on; + }; + } + function onAdd(typename, value, capture) { + var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener; + return function (d, i, group) { + var on = this.__on, + o, + listener = wrap(value, i, group); + 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.capture); + this.addEventListener(o.type, o.listener = listener, o.capture = capture); + o.value = value; + return; + } + } + this.addEventListener(typename.type, listener, capture); + o = { + type: typename.type, + name: typename.name, + value: value, + listener: listener, + capture: capture + }; + if (!on) this.__on = [o];else on.push(o); + }; + } + function selection_on(typename, value, capture) { + var typenames = parseTypenames$1(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; + if (capture == null) capture = false; + for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture)); + return this; + } + function customEvent(event1, listener, that, args) { + var event0 = event; + event1.sourceEvent = event; + event = event1; + try { + return listener.apply(that, args); + } finally { + event = event0; + } + } + function dispatchEvent(node, type, params) { + var window = defaultView(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)); + }; + } + function selection_dispatch(type, params) { + return this.each((typeof params === "function" ? dispatchFunction : dispatchConstant)(type, params)); + } + var root = [null]; + function Selection(groups, parents) { + this._groups = groups; + this._parents = parents; + } + function selection() { + return new Selection([[document.documentElement]], root); + } + Selection.prototype = selection.prototype = { + constructor: Selection, + select: selection_select, + selectAll: selection_selectAll, + filter: selection_filter, + data: selection_data, + enter: selection_enter, + exit: selection_exit, + join: selection_join, + merge: selection_merge, + order: selection_order, + sort: selection_sort, + call: selection_call, + nodes: selection_nodes, + node: selection_node, + size: selection_size, + empty: selection_empty, + each: selection_each, + attr: selection_attr, + style: selection_style, + property: selection_property, + classed: selection_classed, + text: selection_text, + html: selection_html, + raise: selection_raise, + lower: selection_lower, + append: selection_append, + insert: selection_insert, + remove: selection_remove, + clone: selection_clone, + datum: selection_datum, + on: selection_on, + dispatch: selection_dispatch + }; + function select(selector) { + return typeof selector === "string" ? new Selection([[document.querySelector(selector)]], [document.documentElement]) : new Selection([[selector]], root); + } + function sourceEvent() { + var current = event, + source; + while (source = current.sourceEvent) current = source; + return current; + } + function point(node, event) { + var svg = node.ownerSVGElement || node; + if (svg.createSVGPoint) { + var point = svg.createSVGPoint(); + point.x = event.clientX, point.y = event.clientY; + point = point.matrixTransform(node.getScreenCTM().inverse()); + return [point.x, point.y]; + } + var rect = node.getBoundingClientRect(); + return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; + } + function mouse(node) { + var event = sourceEvent(); + if (event.changedTouches) event = event.changedTouches[0]; + return point(node, event); + } + function touch(node, touches, identifier) { + if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches; + for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) { + if ((touch = touches[i]).identifier === identifier) { + return point(node, touch); + } + } + return null; + } + function nopropagation() { + event.stopImmediatePropagation(); + } + function noevent() { + event.preventDefault(); + event.stopImmediatePropagation(); + } + function nodrag(view) { + var root = view.document.documentElement, + selection = select(view).on("dragstart.drag", noevent, true); + if ("onselectstart" in root) { + selection.on("selectstart.drag", noevent, true); + } else { + root.__noselect = root.style.MozUserSelect; + root.style.MozUserSelect = "none"; + } + } + function yesdrag(view, noclick) { + var root = view.document.documentElement, + selection = select(view).on("dragstart.drag", null); + if (noclick) { + selection.on("click.drag", noevent, true); + setTimeout(function () { + selection.on("click.drag", null); + }, 0); + } + if ("onselectstart" in root) { + selection.on("selectstart.drag", null); + } else { + root.style.MozUserSelect = root.__noselect; + delete root.__noselect; + } + } + function constant$3(x) { + return function () { + return x; + }; + } + function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) { + this.target = target; + this.type = type; + this.subject = subject; + this.identifier = id; + this.active = active; + this.x = x; + this.y = y; + this.dx = dx; + this.dy = dy; + this._ = dispatch; + } + DragEvent.prototype.on = function () { + var value = this._.on.apply(this._, arguments); + return value === this._ ? this : value; + }; + + // Ignore right-click, since that should open the context menu. + function defaultFilter() { + return !event.ctrlKey && !event.button; + } + function defaultContainer() { + return this.parentNode; + } + function defaultSubject(d) { + return d == null ? { + x: event.x, + y: event.y + } : d; + } + function defaultTouchable() { + return navigator.maxTouchPoints || "ontouchstart" in this; + } + function drag() { + var filter = defaultFilter, + container = defaultContainer, + subject = defaultSubject, + touchable = defaultTouchable, + gestures = {}, + listeners = dispatch("start", "drag", "end"), + active = 0, + mousedownx, + mousedowny, + mousemoving, + touchending, + clickDistance2 = 0; + function drag(selection) { + selection.on("mousedown.drag", mousedowned).filter(touchable).on("touchstart.drag", touchstarted).on("touchmove.drag", touchmoved).on("touchend.drag touchcancel.drag", touchended).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } + function mousedowned() { + if (touchending || !filter.apply(this, arguments)) return; + var gesture = beforestart("mouse", container.apply(this, arguments), mouse, this, arguments); + if (!gesture) return; + select(event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); + nodrag(event.view); + nopropagation(); + mousemoving = false; + mousedownx = event.clientX; + mousedowny = event.clientY; + gesture("start"); + } + function mousemoved() { + noevent(); + if (!mousemoving) { + var dx = event.clientX - mousedownx, + dy = event.clientY - mousedowny; + mousemoving = dx * dx + dy * dy > clickDistance2; + } + gestures.mouse("drag"); + } + function mouseupped() { + select(event.view).on("mousemove.drag mouseup.drag", null); + yesdrag(event.view, mousemoving); + noevent(); + gestures.mouse("end"); + } + function touchstarted() { + if (!filter.apply(this, arguments)) return; + var touches = event.changedTouches, + c = container.apply(this, arguments), + n = touches.length, + i, + gesture; + for (i = 0; i < n; ++i) { + if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) { + nopropagation(); + gesture("start"); + } + } + } + function touchmoved() { + var touches = event.changedTouches, + n = touches.length, + i, + gesture; + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + noevent(); + gesture("drag"); + } + } + } + function touchended() { + var touches = event.changedTouches, + n = touches.length, + i, + gesture; + if (touchending) clearTimeout(touchending); + touchending = setTimeout(function () { + touchending = null; + }, 500); // Ghost clicks are delayed! + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + nopropagation(); + gesture("end"); + } + } + } + function beforestart(id, container, point, that, args) { + var p = point(container, id), + s, + dx, + dy, + sublisteners = listeners.copy(); + if (!customEvent(new DragEvent(drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function () { + if ((event.subject = s = subject.apply(that, args)) == null) return false; + dx = s.x - p[0] || 0; + dy = s.y - p[1] || 0; + return true; + })) return; + return function gesture(type) { + var p0 = p, + n; + switch (type) { + case "start": + gestures[id] = gesture, n = active++; + break; + case "end": + delete gestures[id], --active; + // nobreak + case "drag": + p = point(container, id), n = active; + break; + } + customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]); + }; + } + drag.filter = function (_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : constant$3(!!_), drag) : filter; + }; + drag.container = function (_) { + return arguments.length ? (container = typeof _ === "function" ? _ : constant$3(_), drag) : container; + }; + drag.subject = function (_) { + return arguments.length ? (subject = typeof _ === "function" ? _ : constant$3(_), drag) : subject; + }; + drag.touchable = function (_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$3(!!_), drag) : touchable; + }; + drag.on = function () { + var value = listeners.on.apply(listeners, arguments); + return value === listeners ? drag : value; + }; + drag.clickDistance = function (_) { + return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2); + }; + return drag; + } + + // Copyright 2018 The Distill Template Authors + + var T$a = Template('d-slider', "\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n"); + + // ARIA + // If the slider has a visible label, it is referenced by aria-labelledby on the slider element. Otherwise, the slider element has a label provided by aria-label. + // If the slider is vertically oriented, it has aria-orientation set to vertical. The default value of aria-orientation for a slider is horizontal. + + var keyCodes = { + left: 37, + up: 38, + right: 39, + down: 40, + pageUp: 33, + pageDown: 34, + end: 35, + home: 36 + }; + var Slider = /*#__PURE__*/function (_T$a) { + function Slider() { + _classCallCheck(this, Slider); + return _callSuper(this, Slider, arguments); + } + _inherits(Slider, _T$a); + return _createClass(Slider, [{ + key: "connectedCallback", + value: function connectedCallback() { + var _this19 = this; + this.connected = true; + this.setAttribute('role', 'slider'); + // Makes the element tab-able. + if (!this.hasAttribute('tabindex')) { + this.setAttribute('tabindex', 0); + } + + // Keeps track of keyboard vs. mouse interactions for focus rings + this.mouseEvent = false; + + // Handles to shadow DOM elements + this.knob = this.root.querySelector('.knob-container'); + this.background = this.root.querySelector('.background'); + this.trackFill = this.root.querySelector('.track-fill'); + this.track = this.root.querySelector('.track'); + + // Default values for attributes + this.min = this.min ? this.min : 0; + this.max = this.max ? this.max : 100; + this.scale = linear$1().domain([this.min, this.max]).range([0, 1]).clamp(true); + this.origin = this.origin !== undefined ? this.origin : this.min; + this.step = this.step ? this.step : 1; + this.update(this.value ? this.value : 0); + this.ticks = this.ticks ? this.ticks : false; + this.renderTicks(); + this.drag = drag().container(this.background).on('start', function () { + _this19.mouseEvent = true; + _this19.background.classList.add('mousedown'); + _this19.changeValue = _this19.value; + _this19.dragUpdate(); + }).on('drag', function () { + _this19.dragUpdate(); + }).on('end', function () { + _this19.mouseEvent = false; + _this19.background.classList.remove('mousedown'); + _this19.dragUpdate(); + if (_this19.changeValue !== _this19.value) _this19.dispatchChange(); + _this19.changeValue = _this19.value; + }); + this.drag(select(this.background)); + this.addEventListener('focusin', function () { + if (!_this19.mouseEvent) { + _this19.background.classList.add('focus'); + } + }); + this.addEventListener('focusout', function () { + _this19.background.classList.remove('focus'); + }); + this.addEventListener('keydown', this.onKeyDown); + } + }, { + key: "attributeChangedCallback", + value: function attributeChangedCallback(attr, oldValue, newValue) { + if (isNaN(newValue) || newValue === undefined || newValue === null) return; + if (attr == 'min') { + this.min = +newValue; + this.setAttribute('aria-valuemin', this.min); + } + if (attr == 'max') { + this.max = +newValue; + this.setAttribute('aria-valuemax', this.max); + } + if (attr == 'value') { + this.update(+newValue); + } + if (attr == 'origin') { + this.origin = +newValue; + // this.update(this.value); + } + if (attr == 'step') { + if (newValue > 0) { + this.step = +newValue; + } + } + if (attr == 'ticks') { + this.ticks = newValue === '' ? true : newValue; + } + } + }, { + key: "onKeyDown", + value: function onKeyDown(event) { + this.changeValue = this.value; + var stopPropagation = false; + switch (event.keyCode) { + case keyCodes.left: + case keyCodes.down: + this.update(this.value - this.step); + stopPropagation = true; + break; + case keyCodes.right: + case keyCodes.up: + this.update(this.value + this.step); + stopPropagation = true; + break; + case keyCodes.pageUp: + this.update(this.value + this.step * 10); + stopPropagation = true; + break; + case keyCodes.pageDown: + this.update(this.value + this.step * 10); + stopPropagation = true; + break; + case keyCodes.home: + this.update(this.min); + stopPropagation = true; + break; + case keyCodes.end: + this.update(this.max); + stopPropagation = true; + break; + } + if (stopPropagation) { + this.background.classList.add('focus'); + event.preventDefault(); + event.stopPropagation(); + if (this.changeValue !== this.value) this.dispatchChange(); + } + } + }, { + key: "validateValueRange", + value: function validateValueRange(min, max, value) { + return Math.max(Math.min(max, value), min); + } + }, { + key: "quantizeValue", + value: function quantizeValue(value, step) { + return Math.round(value / step) * step; + } + }, { + key: "dragUpdate", + value: function dragUpdate() { + var bbox = this.background.getBoundingClientRect(); + var x = event.x; + var width = bbox.width; + this.update(this.scale.invert(x / width)); + } + }, { + key: "update", + value: function update(value) { + var v = value; + if (this.step !== 'any') { + v = this.quantizeValue(value, this.step); + } + v = this.validateValueRange(this.min, this.max, v); + if (this.connected) { + this.knob.style.left = this.scale(v) * 100 + '%'; + this.trackFill.style.width = this.scale(this.min + Math.abs(v - this.origin)) * 100 + '%'; + this.trackFill.style.left = this.scale(Math.min(v, this.origin)) * 100 + '%'; + } + if (this.value !== v) { + this.value = v; + this.setAttribute('aria-valuenow', this.value); + this.dispatchInput(); + } + } + + // Dispatches only on a committed change (basically only on mouseup). + }, { + key: "dispatchChange", + value: function dispatchChange() { + var e = new Event('change'); + this.dispatchEvent(e, {}); + } + + // Dispatches on each value change. + }, { + key: "dispatchInput", + value: function dispatchInput() { + var e = new Event('input'); + this.dispatchEvent(e, {}); + } + }, { + key: "renderTicks", + value: function renderTicks() { + var _this20 = this; + var ticksContainer = this.root.querySelector('.ticks'); + if (this.ticks !== false) { + var tickData = []; + if (this.ticks > 0) { + tickData = this.scale.ticks(this.ticks); + } else if (this.step === 'any') { + tickData = this.scale.ticks(); + } else { + tickData = range(this.min, this.max + 1e-6, this.step); + } + tickData.forEach(function (d) { + var tick = document.createElement('div'); + tick.classList.add('tick'); + tick.style.left = _this20.scale(d) * 100 + '%'; + ticksContainer.appendChild(tick); + }); + } else { + ticksContainer.style.display = 'none'; + } + } + }], [{ + key: "observedAttributes", + get: function get() { + return ['min', 'max', 'value', 'step', 'ticks', 'origin', 'tickValues', 'tickLabels']; + } + }]); + }(T$a(HTMLElement)); + var logo = "\n \n\n"; + var headerTemplate = "\n\n\n"); + + // Copyright 2018 The Distill Template Authors + + var T$b = Template('distill-header', headerTemplate, false); + var DistillHeader = /*#__PURE__*/function (_T$b) { + function DistillHeader() { + _classCallCheck(this, DistillHeader); + return _callSuper(this, DistillHeader, arguments); + } + _inherits(DistillHeader, _T$b); + return _createClass(DistillHeader); + }(T$b(HTMLElement)); // Copyright 2018 The Distill Template Authors + var styles$2 = "\n\n"; + function appendixTemplate(frontMatter) { + var html = styles$2; + if (typeof frontMatter.githubUrl !== 'undefined') { + html += "\n

    Updates and Corrections

    \n

    "; + if (frontMatter.githubCompareUpdatesUrl) { + html += "View all changes to this article since it was first published."); + } + html += "\n If you see mistakes or want to suggest changes, please create an issue on GitHub.

    \n "); + } + var journal = frontMatter.journal; + if (typeof journal !== 'undefined' && journal.title === 'Distill') { + html += "\n

    Reuse

    \n

    Diagrams and text are licensed under Creative Commons Attribution CC-BY 4.0 with the source available on GitHub, unless noted otherwise. The figures that have been reused from other sources don\u2019t fall under this license and can be recognized by a note in their caption: \u201CFigure from \u2026\u201D.

    \n "); + } + if (typeof frontMatter.publishedDate !== 'undefined') { + html += "\n

    Citation

    \n

    For attribution in academic contexts, please cite this work as

    \n
    ".concat(frontMatter.concatenatedAuthors, ", \"").concat(frontMatter.title, "\", Distill, ").concat(frontMatter.publishedYear, ".
    \n

    BibTeX citation

    \n
    ").concat(serializeFrontmatterToBibtex(frontMatter), "
    \n "); + } + return html; + } + var DistillAppendix = /*#__PURE__*/function (_HTMLElement9) { + function DistillAppendix() { + _classCallCheck(this, DistillAppendix); + return _callSuper(this, DistillAppendix, arguments); + } + _inherits(DistillAppendix, _HTMLElement9); + return _createClass(DistillAppendix, [{ + key: "frontMatter", + set: function set(frontMatter) { + this.innerHTML = appendixTemplate(frontMatter); + } + }], [{ + key: "is", + get: function get() { + return 'distill-appendix'; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(HTMLElement)); + var footerTemplate = "\n\n\n\n\n"); + + // Copyright 2018 The Distill Template Authors + + var T$c = Template('distill-footer', footerTemplate); + var DistillFooter = /*#__PURE__*/function (_T$c) { + function DistillFooter() { + _classCallCheck(this, DistillFooter); + return _callSuper(this, DistillFooter, arguments); + } + _inherits(DistillFooter, _T$c); + return _createClass(DistillFooter); + }(T$c(HTMLElement)); // Copyright 2018 The Distill Template Authors + var templateIsLoading = false; + var runlevel = 0; + var initialize = function initialize() { + if (window.distill.runlevel < 1) { + throw new Error("Insufficient Runlevel for Distill Template!"); + } + + /* 1. Flag that we're being loaded */ + if ("distill" in window && window.distill.templateIsLoading) { + throw new Error("Runlevel 1: Distill Template is getting loaded more than once, aborting!"); + } else { + window.distill.templateIsLoading = true; + console.debug("Runlevel 1: Distill Template has started loading."); + } + + /* 2. Add styles if they weren't added during prerendering */ + makeStyleTag(document); + console.debug("Runlevel 1: Static Distill styles have been added."); + console.debug("Runlevel 1->2."); + window.distill.runlevel += 1; + + /* 3. Register Controller listener functions */ + /* Needs to happen before components to their connected callbacks have a controller to talk to. */ + for (var _i2 = 0, _Object$entries2 = Object.entries(Controller.listeners); _i2 < _Object$entries2.length; _i2++) { + var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i2], 2), + functionName = _Object$entries2$_i[0], + callback = _Object$entries2$_i[1]; + if (typeof callback === "function") { + document.addEventListener(functionName, callback); + } else { + console.error("Runlevel 2: Controller listeners need to be functions!"); + } + } + console.debug("Runlevel 2: We can now listen to controller events."); + console.debug("Runlevel 2->3."); + window.distill.runlevel += 1; + + /* 4. Register components */ + var components = [Abstract, Appendix, Article, Bibliography, Byline, Cite, CitationList, Code, Footnote, FootnoteList, FrontMatter$1, HoverBox, Title, DMath, References, TOC, Figure, Slider, Interstitial]; + var distillComponents = [DistillHeader, DistillAppendix, DistillFooter]; + if (window.distill.runlevel < 2) { + throw new Error("Insufficient Runlevel for adding custom elements!"); + } + var allComponents = components.concat(distillComponents); + var _iterator21 = _createForOfIteratorHelper(allComponents), + _step21; + try { + for (_iterator21.s(); !(_step21 = _iterator21.n()).done;) { + var component = _step21.value; + console.debug("Runlevel 2: Registering custom element: " + component.is); + customElements.define(component.is, component); + } + } catch (err) { + _iterator21.e(err); + } finally { + _iterator21.f(); + } + console.debug("Runlevel 3: Distill Template finished registering custom elements."); + console.debug("Runlevel 3->4."); + window.distill.runlevel += 1; + + // If template was added after DOMContentLoaded we may have missed that event. + // Controller will check for that case, so trigger the event explicitly: + if (domContentLoaded()) { + Controller.listeners.DOMContentLoaded(); + } + console.debug("Runlevel 4: Distill Template initialisation complete."); + window.distill.templateIsLoading = false; + window.distill.templateHasLoaded = true; + }; + window.distill = { + runlevel: runlevel, + initialize: initialize, + templateIsLoading: templateIsLoading + }; + + /* 0. Check browser feature support; synchronously polyfill if needed */ + if (Polyfills.browserSupportsAllFeatures()) { + console.debug("Runlevel 0: No need for polyfills."); + console.debug("Runlevel 0->1."); + window.distill.runlevel += 1; + window.distill.initialize(); + } else { + console.debug("Runlevel 0: Distill Template is loading polyfills."); + Polyfills.load(window.distill.initialize); + } +}); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module used 'module' so it can't be inlined +/******/ var __webpack_exports__ = __webpack_require__(792); +/******/ +/******/ })() +; +//# sourceMappingURL=distill.bundle.js.map \ No newline at end of file diff --git a/dist/distill.bundle.js.map b/dist/distill.bundle.js.map new file mode 100644 index 0000000000000000000000000000000000000000..04df3f2cc3bdd96012f842bd8e3feecc6682adb2 --- /dev/null +++ b/dist/distill.bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"distill.bundle.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAC,WAAUA,OAAO,EAAE;EAClB,KAA0C,GAAGC,oCAAOD,OAAO;AAAA;AAAA;AAAA;AAAA,kGAAC,GAC5DA,CAAS;AACX,CAAC,EAAE,YAAY;EAAE,YAAY;;EAE3B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;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,QAAQ,EAARA,QAAQ;IAAEC,UAAU,EAAVA,UAAU;IAAEF,iBAAiB,EAAjBA;EAAkB,CAAC;;EAE5D;EACA,IAAIvzC,SAAS,CAACC,0BAA0B,CAAC,CAAC,EAAE;IAC1C7U,OAAO,CAAC0S,KAAK,CAAC,oCAAoC,CAAC;IACnD1S,OAAO,CAAC0S,KAAK,CAAC,gBAAgB,CAAC;IAC/B5N,MAAM,CAACwjD,OAAO,CAACF,QAAQ,IAAI,CAAC;IAC5BtjD,MAAM,CAACwjD,OAAO,CAACD,UAAU,CAAC,CAAC;EAC7B,CAAC,MAAM;IACLroD,OAAO,CAAC0S,KAAK,CAAC,oDAAoD,CAAC;IACnEkC,SAAS,CAACI,IAAI,CAAClQ,MAAM,CAACwjD,OAAO,CAACD,UAAU,CAAC;EAC3C;AAEF,CAAE,CAAC;;;;;;UCliSH;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;UEPD;UACA;UACA;UACA","sources":["webpack://blogpost/./src/distill.js","webpack://blogpost/webpack/bootstrap","webpack://blogpost/webpack/runtime/global","webpack://blogpost/webpack/before-startup","webpack://blogpost/webpack/startup","webpack://blogpost/webpack/after-startup"],"sourcesContent":["(function (factory) {\n typeof define === 'function' && define.amd ? define(factory) :\n factory();\n}((function () { 'use strict';\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n const months = ['Jan.', 'Feb.', 'March', 'April', 'May', 'June', 'July', 'Aug.', 'Sept.', 'Oct.', 'Nov.', 'Dec.'];\n const zeroPad = n => n < 10 ? '0' + n : n;\n\n const RFC = function(date) {\n const day = days[date.getDay()].substring(0, 3);\n const paddedDate = zeroPad(date.getDate());\n const month = months[date.getMonth()].substring(0,3);\n const year = date.getFullYear().toString();\n const hours = date.getUTCHours().toString();\n const minutes = date.getUTCMinutes().toString();\n const seconds = date.getUTCSeconds().toString();\n return `${day}, ${paddedDate} ${month} ${year} ${hours}:${minutes}:${seconds} Z`;\n };\n\n const objectFromMap = function(map) {\n const object = Array.from(map).reduce((object, [key, value]) => (\n Object.assign(object, { [key]: value }) // Be careful! Maps can have non-String keys; object literals can't.\n ), {});\n return object;\n };\n\n const mapFromObject = function(object) {\n const map = new Map();\n for (var property in object) {\n if (object.hasOwnProperty(property)) {\n map.set(property, object[property]);\n }\n }\n return map;\n };\n\n class Author {\n\n // constructor(name='', personalURL='', affiliation='', affiliationURL='') {\n // this.name = name; // 'Chris Olah'\n // this.personalURL = personalURL; // 'https://colah.github.io'\n // this.affiliation = affiliation; // 'Google Brain'\n // this.affiliationURL = affiliationURL; // 'https://g.co/brain'\n // }\n\n constructor(object) {\n this.name = object.author; // 'Chris Olah'\n this.personalURL = object.authorURL; // 'https://colah.github.io'\n this.affiliation = object.affiliation; // 'Google Brain'\n this.affiliationURL = object.affiliationURL; // 'https://g.co/brain'\n this.affiliations = object.affiliations || []; // new-style affiliations\n }\n\n // 'Chris'\n get firstName() {\n const names = this.name.split(' ');\n return names.slice(0, names.length - 1).join(' ');\n }\n\n // 'Olah'\n get lastName() {\n const names = this.name.split(' ');\n return names[names.length -1];\n }\n }\n\n function mergeFromYMLFrontmatter(target, source) {\n target.title = source.title;\n if (source.published) {\n if (source.published instanceof Date) {\n target.publishedDate = source.published;\n } else if (source.published.constructor === String) {\n target.publishedDate = new Date(source.published);\n }\n }\n if (source.publishedDate) {\n if (source.publishedDate instanceof Date) {\n target.publishedDate = source.publishedDate;\n } else if (source.publishedDate.constructor === String) {\n target.publishedDate = new Date(source.publishedDate);\n } else {\n console.error('Don\\'t know what to do with published date: ' + source.publishedDate);\n }\n }\n target.description = source.description;\n target.authors = source.authors.map( (authorObject) => new Author(authorObject));\n target.katex = source.katex;\n target.password = source.password;\n if (source.doi) {\n target.doi = source.doi;\n }\n }\n\n class FrontMatter {\n constructor() {\n this.title = 'unnamed article'; // 'Attention and Augmented Recurrent Neural Networks'\n this.description = ''; // 'A visual overview of neural attention...'\n this.authors = []; // Array of Author(s)\n\n this.bibliography = new Map();\n this.bibliographyParsed = false;\n // {\n // 'gregor2015draw': {\n // 'title': 'DRAW: A recurrent neural network for image generation',\n // 'author': 'Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan',\n // 'journal': 'arXiv preprint arXiv:1502.04623',\n // 'year': '2015',\n // 'url': 'https://arxiv.org/pdf/1502.04623.pdf',\n // 'type': 'article'\n // },\n // }\n\n // Citation keys should be listed in the order that they are appear in the document.\n // Each key refers to a key in the bibliography dictionary.\n this.citations = []; // [ 'gregor2015draw', 'mercier2011humans' ]\n this.citationsCollected = false;\n\n //\n // Assigned from posts.csv\n //\n\n // publishedDate: 2016-09-08T07:00:00.000Z,\n // tags: [ 'rnn' ],\n // distillPath: '2016/augmented-rnns',\n // githubPath: 'distillpub/post--augmented-rnns',\n // doiSuffix: 1,\n\n //\n // Assigned from journal\n //\n this.journal = {};\n // journal: {\n // 'title': 'Distill',\n // 'full_title': 'Distill',\n // 'abbrev_title': 'Distill',\n // 'url': 'http://distill.pub',\n // 'doi': '10.23915/distill',\n // 'publisherName': 'Distill Working Group',\n // 'publisherEmail': 'admin@distill.pub',\n // 'issn': '2476-0757',\n // 'editors': [...],\n // 'committee': [...]\n // }\n // volume: 1,\n // issue: 9,\n\n this.katex = {};\n\n //\n // Assigned from publishing process\n //\n\n // githubCompareUpdatesUrl: 'https://github.com/distillpub/post--augmented-rnns/compare/1596e094d8943d2dc0ea445d92071129c6419c59...3bd9209e0c24d020f87cf6152dcecc6017cbc193',\n // updatedDate: 2017-03-21T07:13:16.000Z,\n // doi: '10.23915/distill.00001',\n this.doi = undefined;\n this.publishedDate = undefined;\n }\n\n // Example:\n // title: Demo Title Attention and Augmented Recurrent Neural Networks\n // published: Jan 10, 2017\n // authors:\n // - Chris Olah:\n // - Shan Carter: http://shancarter.com\n // affiliations:\n // - Google Brain:\n // - Google Brain: http://g.co/brain\n\n //\n // Computed Properties\n //\n\n // 'http://distill.pub/2016/augmented-rnns',\n set url(value) {\n this._url = value;\n }\n get url() {\n if (this._url) {\n return this._url;\n } else if (this.distillPath && this.journal.url) {\n return this.journal.url + '/' + this.distillPath;\n } else if (this.journal.url) {\n return this.journal.url;\n }\n }\n\n // 'https://github.com/distillpub/post--augmented-rnns',\n get githubUrl() {\n if (this.githubPath) {\n return 'https://github.com/' + this.githubPath;\n } else {\n return undefined;\n }\n }\n\n // TODO resolve differences in naming of URL/Url/url.\n // 'http://distill.pub/2016/augmented-rnns/thumbnail.jpg',\n set previewURL(value) {\n this._previewURL = value;\n }\n get previewURL() {\n return this._previewURL ? this._previewURL : this.url + '/thumbnail.jpg';\n }\n\n // 'Thu, 08 Sep 2016 00:00:00 -0700',\n get publishedDateRFC() {\n return RFC(this.publishedDate);\n }\n\n // 'Thu, 08 Sep 2016 00:00:00 -0700',\n get updatedDateRFC() {\n return RFC(this.updatedDate);\n }\n\n // 2016,\n get publishedYear() {\n return this.publishedDate.getFullYear();\n }\n\n // 'Sept',\n get publishedMonth() {\n return months[this.publishedDate.getMonth()];\n }\n\n // 8,\n get publishedDay() {\n return this.publishedDate.getDate();\n }\n\n // '09',\n get publishedMonthPadded() {\n return zeroPad(this.publishedDate.getMonth() + 1);\n }\n\n // '08',\n get publishedDayPadded() {\n return zeroPad(this.publishedDate.getDate());\n }\n\n get publishedISODateOnly() {\n return this.publishedDate.toISOString().split('T')[0];\n }\n\n get volume() {\n const volume = this.publishedYear - 2015;\n if (volume < 1) {\n throw new Error('Invalid publish date detected during computing volume');\n }\n return volume;\n }\n\n get issue() {\n return this.publishedDate.getMonth() + 1;\n }\n\n // 'Olah & Carter',\n get concatenatedAuthors() {\n if (this.authors.length > 2) {\n return this.authors[0].lastName + ', et al.';\n } else if (this.authors.length === 2) {\n return this.authors[0].lastName + ' & ' + this.authors[1].lastName;\n } else if (this.authors.length === 1) {\n return this.authors[0].lastName;\n }\n }\n\n // 'Olah, Chris and Carter, Shan',\n get bibtexAuthors() {\n return this.authors.map(author => {\n return author.lastName + ', ' + author.firstName;\n }).join(' and ');\n }\n\n // 'olah2016attention'\n get slug() {\n let slug = '';\n if (this.authors.length) {\n slug += this.authors[0].lastName.toLowerCase();\n slug += this.publishedYear;\n slug += this.title.split(' ')[0].toLowerCase();\n }\n return slug || 'Untitled';\n }\n\n get bibliographyEntries() {\n return new Map(this.citations.map( citationKey => {\n const entry = this.bibliography.get(citationKey);\n return [citationKey, entry];\n }));\n }\n\n set bibliography(bibliography) {\n if (bibliography instanceof Map) {\n this._bibliography = bibliography;\n } else if (typeof bibliography === 'object') {\n this._bibliography = mapFromObject(bibliography);\n }\n }\n\n get bibliography() {\n return this._bibliography;\n }\n\n static fromObject(source) {\n const frontMatter = new FrontMatter();\n Object.assign(frontMatter, source);\n return frontMatter;\n }\n\n assignToObject(target) {\n Object.assign(target, this);\n target.bibliography = objectFromMap(this.bibliographyEntries);\n target.url = this.url;\n target.doi = this.doi;\n target.githubUrl = this.githubUrl;\n target.previewURL = this.previewURL;\n if (this.publishedDate) {\n target.volume = this.volume;\n target.issue = this.issue;\n target.publishedDateRFC = this.publishedDateRFC;\n target.publishedYear = this.publishedYear;\n target.publishedMonth = this.publishedMonth;\n target.publishedDay = this.publishedDay;\n target.publishedMonthPadded = this.publishedMonthPadded;\n target.publishedDayPadded = this.publishedDayPadded;\n }\n if (this.updatedDate) {\n target.updatedDateRFC = this.updatedDateRFC;\n }\n target.concatenatedAuthors = this.concatenatedAuthors;\n target.bibtexAuthors = this.bibtexAuthors;\n target.slug = this.slug;\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n const Mutating = (superclass) => {\n return class extends superclass {\n\n constructor() {\n super();\n\n // set up mutation observer\n const options = {childList: true, characterData: true, subtree: true};\n const observer = new MutationObserver( () => {\n observer.disconnect();\n this.renderIfPossible();\n observer.observe(this, options);\n });\n\n // ...and listen for changes\n observer.observe(this, options);\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n this.renderIfPossible();\n }\n\n // potential TODO: check if this is enough for all our usecases\n // maybe provide a custom function to tell if we have enough information to render\n renderIfPossible() {\n if (this.textContent && this.root) {\n this.renderContent();\n }\n }\n\n renderContent() {\n console.error(`Your class ${this.constructor.name} must provide a custom renderContent() method!` );\n }\n\n }; // end class\n }; // end mixin function\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n /*global ShadyCSS*/\n\n const Template = (name, templateString, useShadow = true) => {\n\n return (superclass) => {\n\n const template = document.createElement('template');\n template.innerHTML = templateString;\n\n if (useShadow && 'ShadyCSS' in window) {\n ShadyCSS.prepareTemplate(template, name);\n }\n\n return class extends superclass {\n\n static get is() { return name; }\n\n constructor() {\n super();\n\n this.clone = document.importNode(template.content, true);\n if (useShadow) {\n this.attachShadow({mode: 'open'});\n this.shadowRoot.appendChild(this.clone);\n }\n }\n\n connectedCallback() {\n if (this.hasAttribute('distill-prerendered')) {\n return;\n }\n if (useShadow) {\n if ('ShadyCSS' in window) {\n ShadyCSS.styleElement(this);\n }\n } else {\n this.insertBefore(this.clone, this.firstChild);\n }\n }\n\n get root() {\n if (useShadow) {\n return this.shadowRoot;\n } else {\n return this;\n }\n }\n\n /* TODO: Are we using these? Should we even? */\n $(query) {\n return this.root.querySelector(query);\n }\n\n $$(query) {\n return this.root.querySelectorAll(query);\n }\n };\n };\n };\n\n var math = \"/*\\n * Copyright 2018 The Distill Template Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\nspan.katex-display {\\n text-align: left;\\n padding: 8px 0 8px 0;\\n margin: 0.5em 0 0.5em 1em;\\n}\\n\\nspan.katex {\\n -webkit-font-smoothing: antialiased;\\n color: rgba(0, 0, 0, 0.8);\\n font-size: 1.18em;\\n}\\n\";\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n // This is a straight concatenation of code from KaTeX's contrib folder,\n // but we aren't using some of their helpers that don't work well outside a browser environment.\n\n /*global katex */\n\n const findEndOfMath = function(delimiter, text, startIndex) {\n // Adapted from\n // https://github.com/Khan/perseus/blob/master/src/perseus-markdown.jsx\n let index = startIndex;\n let braceLevel = 0;\n\n const delimLength = delimiter.length;\n\n while (index < text.length) {\n const character = text[index];\n\n if (\n braceLevel <= 0 &&\n text.slice(index, index + delimLength) === delimiter\n ) {\n return index;\n } else if (character === \"\\\\\") {\n index++;\n } else if (character === \"{\") {\n braceLevel++;\n } else if (character === \"}\") {\n braceLevel--;\n }\n\n index++;\n }\n\n return -1;\n };\n\n const splitAtDelimiters = function(startData, leftDelim, rightDelim, display) {\n const finalData = [];\n\n for (let i = 0; i < startData.length; i++) {\n if (startData[i].type === \"text\") {\n const text = startData[i].data;\n\n let lookingForLeft = true;\n let currIndex = 0;\n let nextIndex;\n\n nextIndex = text.indexOf(leftDelim);\n if (nextIndex !== -1) {\n currIndex = nextIndex;\n finalData.push({\n type: \"text\",\n data: text.slice(0, currIndex)\n });\n lookingForLeft = false;\n }\n\n while (true) {\n // eslint-disable-line no-constant-condition\n if (lookingForLeft) {\n nextIndex = text.indexOf(leftDelim, currIndex);\n if (nextIndex === -1) {\n break;\n }\n\n finalData.push({\n type: \"text\",\n data: text.slice(currIndex, nextIndex)\n });\n\n currIndex = nextIndex;\n } else {\n nextIndex = findEndOfMath(\n rightDelim,\n text,\n currIndex + leftDelim.length\n );\n if (nextIndex === -1) {\n break;\n }\n\n finalData.push({\n type: \"math\",\n data: text.slice(currIndex + leftDelim.length, nextIndex),\n rawData: text.slice(currIndex, nextIndex + rightDelim.length),\n display: display\n });\n\n currIndex = nextIndex + rightDelim.length;\n }\n\n lookingForLeft = !lookingForLeft;\n }\n\n finalData.push({\n type: \"text\",\n data: text.slice(currIndex)\n });\n } else {\n finalData.push(startData[i]);\n }\n }\n\n return finalData;\n };\n\n const splitWithDelimiters = function(text, delimiters) {\n let data = [{ type: \"text\", data: text }];\n for (let i = 0; i < delimiters.length; i++) {\n const delimiter = delimiters[i];\n data = splitAtDelimiters(\n data,\n delimiter.left,\n delimiter.right,\n delimiter.display || false\n );\n }\n return data;\n };\n\n /* Note: optionsCopy is mutated by this method. If it is ever exposed in the\n * API, we should copy it before mutating.\n */\n const renderMathInText = function(text, optionsCopy) {\n const data = splitWithDelimiters(text, optionsCopy.delimiters);\n const fragment = document.createDocumentFragment();\n\n for (let i = 0; i < data.length; i++) {\n if (data[i].type === \"text\") {\n fragment.appendChild(document.createTextNode(data[i].data));\n } else {\n const tag = document.createElement(\"d-math\");\n const math = data[i].data;\n // Override any display mode defined in the settings with that\n // defined by the text itself\n optionsCopy.displayMode = data[i].display;\n try {\n tag.textContent = math;\n if (optionsCopy.displayMode) {\n tag.setAttribute(\"block\", \"\");\n }\n } catch (e) {\n if (!(e instanceof katex.ParseError)) {\n throw e;\n }\n optionsCopy.errorCallback(\n \"KaTeX auto-render: Failed to parse `\" + data[i].data + \"` with \",\n e\n );\n fragment.appendChild(document.createTextNode(data[i].rawData));\n continue;\n }\n fragment.appendChild(tag);\n }\n }\n\n return fragment;\n };\n\n const renderElem = function(elem, optionsCopy) {\n for (let i = 0; i < elem.childNodes.length; i++) {\n const childNode = elem.childNodes[i];\n if (childNode.nodeType === 3) {\n // Text node\n const text = childNode.textContent;\n if (optionsCopy.mightHaveMath(text)) {\n const frag = renderMathInText(text, optionsCopy);\n i += frag.childNodes.length - 1;\n elem.replaceChild(frag, childNode);\n }\n } else if (childNode.nodeType === 1) {\n // Element node\n const shouldRender =\n optionsCopy.ignoredTags.indexOf(childNode.nodeName.toLowerCase()) ===\n -1;\n\n if (shouldRender) {\n renderElem(childNode, optionsCopy);\n }\n }\n // Otherwise, it's something else, and ignore it.\n }\n };\n\n const defaultAutoRenderOptions = {\n delimiters: [\n { left: \"$$\", right: \"$$\", display: true },\n { left: \"\\\\[\", right: \"\\\\]\", display: true },\n { left: \"\\\\(\", right: \"\\\\)\", display: false }\n // LaTeX uses this, but it ruins the display of normal `$` in text:\n // {left: '$', right: '$', display: false},\n ],\n\n ignoredTags: [\n \"script\",\n \"noscript\",\n \"style\",\n \"textarea\",\n \"pre\",\n \"code\",\n \"svg\"\n ],\n\n errorCallback: function(msg, err) {\n console.error(msg, err);\n }\n };\n\n const renderMathInElement = function(elem, options) {\n if (!elem) {\n throw new Error(\"No element provided to render\");\n }\n\n const optionsCopy = Object.assign({}, defaultAutoRenderOptions, options);\n const delimiterStrings = optionsCopy.delimiters.flatMap(d => [\n d.left,\n d.right\n ]);\n const mightHaveMath = text =>\n delimiterStrings.some(d => text.indexOf(d) !== -1);\n optionsCopy.mightHaveMath = mightHaveMath;\n renderElem(elem, optionsCopy);\n };\n\n // Copyright 2018 The Distill Template Authors\n\n const katexJSURL = 'https://distill.pub/third-party/katex/katex.min.js';\n const katexCSSTag = '';\n\n const T = Template('d-math', `\n${katexCSSTag}\n\n\n`);\n\n // DMath, not Math, because that would conflict with the JS built-in\n class DMath extends Mutating(T(HTMLElement)) {\n\n static set katexOptions(options) {\n DMath._katexOptions = options;\n if (DMath.katexOptions.delimiters) {\n if (!DMath.katexAdded) {\n DMath.addKatex();\n } else {\n DMath.katexLoadedCallback();\n }\n }\n }\n\n static get katexOptions() {\n if (!DMath._katexOptions) {\n DMath._katexOptions = {\n delimiters: [ { 'left':'$$', 'right':'$$', 'display': false } ]\n };\n }\n return DMath._katexOptions;\n }\n\n static katexLoadedCallback() {\n // render all d-math tags\n const mathTags = document.querySelectorAll('d-math');\n for (const mathTag of mathTags) {\n mathTag.renderContent();\n }\n // transform inline delimited math to d-math tags\n if (DMath.katexOptions.delimiters) {\n renderMathInElement(document.body, DMath.katexOptions);\n }\n }\n\n static addKatex() {\n // css tag can use this convenience function\n document.head.insertAdjacentHTML('beforeend', katexCSSTag);\n // script tag has to be created to work properly\n const scriptTag = document.createElement('script');\n scriptTag.src = katexJSURL;\n scriptTag.async = true;\n scriptTag.onload = DMath.katexLoadedCallback;\n scriptTag.crossorigin = 'anonymous';\n document.head.appendChild(scriptTag);\n\n DMath.katexAdded = true;\n }\n\n get options() {\n const localOptions = { displayMode: this.hasAttribute('block') };\n return Object.assign(localOptions, DMath.katexOptions);\n }\n\n connectedCallback() {\n super.connectedCallback();\n if (!DMath.katexAdded) {\n DMath.addKatex();\n }\n }\n\n renderContent() {\n if (typeof katex !== 'undefined') {\n const container = this.root.querySelector('#katex-container');\n katex.render(this.textContent, container, this.options);\n }\n }\n\n }\n\n DMath.katexAdded = false;\n DMath.inlineMathRendered = false;\n window.DMath = DMath; // TODO: check if this can be removed, or if we should expose a distill global\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n function collect_citations(dom = document) {\n const citations = new Set();\n const citeTags = dom.querySelectorAll(\"d-cite\");\n for (const tag of citeTags) {\n const keyString = tag.getAttribute(\"key\") || tag.getAttribute(\"bibtex-key\");\n const keys = keyString.split(\",\").map(k => k.trim());\n for (const key of keys) {\n citations.add(key);\n }\n }\n return [...citations];\n }\n\n function author_string(ent, template, sep, finalSep) {\n if (ent.author == null) {\n return \"\";\n }\n var names = ent.author.split(\" and \");\n let name_strings = names.map(name => {\n name = name.trim();\n if (name.indexOf(\",\") != -1) {\n var last = name.split(\",\")[0].trim();\n var firsts = name.split(\",\")[1];\n } else if (name.indexOf(\" \") != -1) {\n var last = name\n .split(\" \")\n .slice(-1)[0]\n .trim();\n var firsts = name\n .split(\" \")\n .slice(0, -1)\n .join(\" \");\n } else {\n var last = name.trim();\n }\n var initials = \"\";\n if (firsts != undefined) {\n initials = firsts\n .trim()\n .split(\" \")\n .map(s => s.trim()[0]);\n initials = initials.join(\".\") + \".\";\n }\n return template\n .replace(\"${F}\", firsts)\n .replace(\"${L}\", last)\n .replace(\"${I}\", initials)\n .trim(); // in case one of first or last was empty\n });\n if (names.length > 1) {\n var str = name_strings.slice(0, names.length - 1).join(sep);\n str += (finalSep || sep) + name_strings[names.length - 1];\n return str;\n } else {\n return name_strings[0];\n }\n }\n\n function venue_string(ent) {\n var cite = ent.journal || ent.booktitle || \"\";\n if (\"volume\" in ent) {\n var issue = ent.issue || ent.number;\n issue = issue != undefined ? \"(\" + issue + \")\" : \"\";\n cite += \", Vol \" + ent.volume + issue;\n }\n if (\"pages\" in ent) {\n cite += \", pp. \" + ent.pages;\n }\n if (cite != \"\") cite += \". \";\n if (\"publisher\" in ent) {\n cite += ent.publisher;\n if (cite[cite.length - 1] != \".\") cite += \".\";\n }\n return cite;\n }\n\n function link_string(ent) {\n if (\"url\" in ent) {\n var url = ent.url;\n var arxiv_match = /arxiv\\.org\\/abs\\/([0-9\\.]*)/.exec(url);\n if (arxiv_match != null) {\n url = `http://arxiv.org/pdf/${arxiv_match[1]}.pdf`;\n }\n\n if (url.slice(-4) == \".pdf\") {\n var label = \"PDF\";\n } else if (url.slice(-5) == \".html\") {\n var label = \"HTML\";\n }\n return `  [${label || \"link\"}]`;\n } /* else if (\"doi\" in ent){\n return `  [DOI]`;\n }*/ else {\n return \"\";\n }\n }\n function doi_string(ent, new_line) {\n if (\"doi\" in ent) {\n return `${new_line ? \"
    \" : \"\"} DOI: ${ent.doi}`;\n } else {\n return \"\";\n }\n }\n\n function title_string(ent) {\n return '' + ent.title + \" \";\n }\n\n function bibliography_cite(ent, fancy) {\n if (ent) {\n var cite = title_string(ent);\n cite += link_string(ent) + \"
    \";\n if (ent.author) {\n cite += author_string(ent, \"${L}, ${I}\", \", \", \" and \");\n if (ent.year || ent.date) {\n cite += \", \";\n }\n }\n if (ent.year || ent.date) {\n cite += (ent.year || ent.date) + \". \";\n } else {\n cite += \". \";\n }\n cite += venue_string(ent);\n cite += doi_string(ent);\n return cite;\n /*var cite = author_string(ent, \"${L}, ${I}\", \", \", \" and \");\n if (ent.year || ent.date){\n cite += \", \" + (ent.year || ent.date) + \". \"\n } else {\n cite += \". \"\n }\n cite += \"\" + ent.title + \". \";\n cite += venue_string(ent);\n cite += doi_string(ent);\n cite += link_string(ent);\n return cite*/\n } else {\n return \"?\";\n }\n }\n\n function hover_cite(ent) {\n if (ent) {\n var cite = \"\";\n cite += \"\" + ent.title + \"\";\n cite += link_string(ent);\n cite += \"
    \";\n\n var a_str = author_string(ent, \"${I} ${L}\", \", \") + \".\";\n var v_str =\n venue_string(ent).trim() + \" \" + ent.year + \". \" + doi_string(ent, true);\n\n if ((a_str + v_str).length < Math.min(40, ent.title.length)) {\n cite += a_str + \" \" + v_str;\n } else {\n cite += a_str + \"
    \" + v_str;\n }\n return cite;\n } else {\n return \"?\";\n }\n }\n\n function domContentLoaded() {\n return ['interactive', 'complete'].indexOf(document.readyState) !== -1;\n }\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n function _moveLegacyAffiliationFormatIntoArray(frontMatter) {\n // authors used to have propoerties \"affiliation\" and \"affiliationURL\".\n // We now encourage using an array for affiliations containing objects with\n // properties \"name\" and \"url\".\n for (let author of frontMatter.authors) {\n const hasOldStyle = Boolean(author.affiliation);\n const hasNewStyle = Boolean(author.affiliations);\n if (!hasOldStyle) continue;\n if (hasNewStyle) {\n console.warn(`Author ${author.author} has both old-style (\"affiliation\" & \"affiliationURL\") and new style (\"affiliations\") affiliation information!`);\n } else {\n let newAffiliation = {\n \"name\": author.affiliation\n };\n if (author.affiliationURL) newAffiliation.url = author.affiliationURL;\n author.affiliations = [newAffiliation];\n }\n }\n return frontMatter\n }\n\n function parseFrontmatter(element) {\n const scriptTag = element.firstElementChild;\n if (scriptTag) {\n const type = scriptTag.getAttribute('type');\n if (type.split('/')[1] == 'json') {\n const content = scriptTag.textContent;\n const parsed = JSON.parse(content);\n return _moveLegacyAffiliationFormatIntoArray(parsed);\n } else {\n console.error('Distill only supports JSON frontmatter tags anymore; no more YAML.');\n }\n } else {\n console.error('You added a frontmatter tag but did not provide a script tag with front matter data in it. Please take a look at our templates.');\n }\n return {};\n }\n\n class FrontMatter$1 extends HTMLElement {\n\n static get is() { return 'd-front-matter'; }\n\n constructor() {\n super();\n\n const options = {childList: true, characterData: true, subtree: true};\n const observer = new MutationObserver( (entries) => {\n for (const entry of entries) {\n if (entry.target.nodeName === 'SCRIPT' || entry.type === 'characterData') {\n const data = parseFrontmatter(this);\n this.notify(data);\n }\n }\n });\n observer.observe(this, options);\n }\n\n notify(data) {\n const options = { detail: data, bubbles: true };\n const event = new CustomEvent('onFrontMatterChanged', options);\n document.dispatchEvent(event);\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n // no appendix -> add appendix\n // title in front, no h1 -> add it\n // no title in front, h1 -> read and put into frontMatter\n // footnote -> footnote list\n // break up bib\n // if citation, no bib-list -> add citation-list\n\n // if authors, no byline -> add byline\n\n function optionalComponents(dom, data) {\n const body = dom.body;\n const article = body.querySelector('d-article');\n\n // If we don't have an article tag, something weird is going on—giving up.\n if (!article) {\n console.warn('No d-article tag found; skipping adding optional components!');\n return;\n }\n\n let byline = dom.querySelector('d-byline');\n if (!byline) {\n if (data.authors) {\n byline = dom.createElement('d-byline');\n body.insertBefore(byline, article);\n } else {\n console.warn('No authors found in front matter; please add them before submission!');\n }\n }\n\n let title = dom.querySelector('d-title');\n if (!title) {\n title = dom.createElement('d-title');\n body.insertBefore(title, byline);\n }\n\n let h1 = title.querySelector('h1');\n if (!h1) {\n h1 = dom.createElement('h1');\n h1.textContent = data.title;\n title.insertBefore(h1, title.firstChild);\n }\n\n const hasPassword = typeof data.password !== 'undefined';\n let interstitial = body.querySelector('d-interstitial');\n if (hasPassword && !interstitial) {\n const inBrowser = typeof window !== 'undefined';\n const onLocalhost = inBrowser && window.location.hostname.includes('localhost');\n if (!inBrowser || !onLocalhost) {\n interstitial = dom.createElement('d-interstitial');\n interstitial.password = data.password;\n body.insertBefore(interstitial, body.firstChild);\n }\n } else if (!hasPassword && interstitial) {\n interstitial.parentElement.removeChild(this);\n }\n\n let appendix = dom.querySelector('d-appendix');\n if (!appendix) {\n appendix = dom.createElement('d-appendix');\n dom.body.appendChild(appendix);\n }\n\n let footnoteList = dom.querySelector('d-footnote-list');\n if (!footnoteList) {\n footnoteList = dom.createElement('d-footnote-list');\n appendix.appendChild(footnoteList);\n }\n\n let citationList = dom.querySelector('d-citation-list');\n if (!citationList) {\n citationList = dom.createElement('d-citation-list');\n appendix.appendChild(citationList);\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const frontMatter = new FrontMatter();\n\n const Controller = {\n frontMatter: frontMatter,\n waitingOn: {\n bibliography: [],\n citations: []\n },\n listeners: {\n onCiteKeyCreated(event) {\n const [citeTag, keys] = event.detail;\n\n // ensure we have citations\n if (!frontMatter.citationsCollected) {\n // console.debug('onCiteKeyCreated, but unresolved dependency (\"citations\"). Enqueing.');\n Controller.waitingOn.citations.push(() =>\n Controller.listeners.onCiteKeyCreated(event)\n );\n return;\n }\n\n // ensure we have a loaded bibliography\n if (!frontMatter.bibliographyParsed) {\n // console.debug('onCiteKeyCreated, but unresolved dependency (\"bibliography\"). Enqueing.');\n Controller.waitingOn.bibliography.push(() =>\n Controller.listeners.onCiteKeyCreated(event)\n );\n return;\n }\n\n const numbers = keys.map(key => frontMatter.citations.indexOf(key));\n citeTag.numbers = numbers;\n const entries = keys.map(key => frontMatter.bibliography.get(key));\n citeTag.entries = entries;\n },\n\n onCiteKeyChanged() {\n // const [citeTag, keys] = event.detail;\n\n // update citations\n frontMatter.citations = collect_citations();\n frontMatter.citationsCollected = true;\n for (const waitingCallback of Controller.waitingOn.citations.slice()) {\n waitingCallback();\n }\n\n // update bibliography\n const citationListTag = document.querySelector(\"d-citation-list\");\n const bibliographyEntries = new Map(\n frontMatter.citations.map(citationKey => {\n return [citationKey, frontMatter.bibliography.get(citationKey)];\n })\n );\n citationListTag.citations = bibliographyEntries;\n\n const citeTags = document.querySelectorAll(\"d-cite\");\n for (const citeTag of citeTags) {\n console.log(citeTag);\n const keys = citeTag.keys;\n const numbers = keys.map(key => frontMatter.citations.indexOf(key));\n citeTag.numbers = numbers;\n const entries = keys.map(key => frontMatter.bibliography.get(key));\n citeTag.entries = entries;\n }\n },\n\n onCiteKeyRemoved(event) {\n Controller.listeners.onCiteKeyChanged(event);\n },\n\n onBibliographyChanged(event) {\n const citationListTag = document.querySelector(\"d-citation-list\");\n\n const bibliography = event.detail;\n\n frontMatter.bibliography = bibliography;\n frontMatter.bibliographyParsed = true;\n for (const waitingCallback of Controller.waitingOn.bibliography.slice()) {\n waitingCallback();\n }\n\n // ensure we have citations\n if (!frontMatter.citationsCollected) {\n Controller.waitingOn.citations.push(function() {\n Controller.listeners.onBibliographyChanged({\n target: event.target,\n detail: event.detail\n });\n });\n return;\n }\n\n if (citationListTag.hasAttribute(\"distill-prerendered\")) {\n console.debug(\"Citation list was prerendered; not updating it.\");\n } else {\n const entries = new Map(\n frontMatter.citations.map(citationKey => {\n return [citationKey, frontMatter.bibliography.get(citationKey)];\n })\n );\n citationListTag.citations = entries;\n }\n },\n\n onFootnoteChanged() {\n // const footnote = event.detail;\n //TODO: optimize to only update current footnote\n const footnotesList = document.querySelector(\"d-footnote-list\");\n if (footnotesList) {\n const footnotes = document.querySelectorAll(\"d-footnote\");\n footnotesList.footnotes = footnotes;\n }\n },\n\n onFrontMatterChanged(event) {\n const data = event.detail;\n mergeFromYMLFrontmatter(frontMatter, data);\n\n const interstitial = document.querySelector(\"d-interstitial\");\n if (interstitial) {\n if (typeof frontMatter.password !== \"undefined\") {\n interstitial.password = frontMatter.password;\n } else {\n interstitial.parentElement.removeChild(interstitial);\n }\n }\n\n const prerendered = document.body.hasAttribute(\"distill-prerendered\");\n if (!prerendered && domContentLoaded()) {\n optionalComponents(document, frontMatter);\n\n const appendix = document.querySelector(\"distill-appendix\");\n if (appendix) {\n appendix.frontMatter = frontMatter;\n }\n\n const byline = document.querySelector(\"d-byline\");\n if (byline) {\n byline.frontMatter = frontMatter;\n }\n\n if (data.katex) {\n DMath.katexOptions = data.katex;\n }\n }\n },\n\n DOMContentLoaded() {\n if (Controller.loaded) {\n console.warn(\n \"Controller received DOMContentLoaded but was already loaded!\"\n );\n return;\n } else if (!domContentLoaded()) {\n console.warn(\n \"Controller received DOMContentLoaded at document.readyState: \" +\n document.readyState +\n \"!\"\n );\n return;\n } else {\n Controller.loaded = true;\n console.debug(\"Runlevel 4: Controller running DOMContentLoaded\");\n }\n\n const frontMatterTag = document.querySelector(\"d-front-matter\");\n if (frontMatterTag) {\n const data = parseFrontmatter(frontMatterTag);\n Controller.listeners.onFrontMatterChanged({ detail: data });\n }\n\n // Resolving \"citations\" dependency due to initial DOM load\n frontMatter.citations = collect_citations();\n frontMatter.citationsCollected = true;\n for (const waitingCallback of Controller.waitingOn.citations.slice()) {\n waitingCallback();\n }\n\n if (frontMatter.bibliographyParsed) {\n for (const waitingCallback of Controller.waitingOn.bibliography.slice()) {\n waitingCallback();\n }\n }\n\n const footnotesList = document.querySelector(\"d-footnote-list\");\n if (footnotesList) {\n const footnotes = document.querySelectorAll(\"d-footnote\");\n footnotesList.footnotes = footnotes;\n }\n }\n } // listeners\n }; // Controller\n\n var base = \"/*\\n * Copyright 2018 The Distill Template Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\nhtml {\\n font-size: 14px;\\n\\tline-height: 1.6em;\\n /* font-family: \\\"Libre Franklin\\\", \\\"Helvetica Neue\\\", sans-serif; */\\n font-family: -apple-system, BlinkMacSystemFont, \\\"Segoe UI\\\", Roboto, Oxygen, Ubuntu, Cantarell, \\\"Fira Sans\\\", \\\"Droid Sans\\\", \\\"Helvetica Neue\\\", Arial, sans-serif;\\n /*, \\\"Apple Color Emoji\\\", \\\"Segoe UI Emoji\\\", \\\"Segoe UI Symbol\\\";*/\\n text-size-adjust: 100%;\\n -ms-text-size-adjust: 100%;\\n -webkit-text-size-adjust: 100%;\\n}\\n\\n@media(min-width: 768px) {\\n html {\\n font-size: 16px;\\n }\\n}\\n\\nbody {\\n margin: 0;\\n}\\n\\na {\\n color: #004276;\\n}\\n\\nfigure {\\n margin: 0;\\n}\\n\\ntable {\\n\\tborder-collapse: collapse;\\n\\tborder-spacing: 0;\\n}\\n\\ntable th {\\n\\ttext-align: left;\\n}\\n\\ntable thead {\\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\\n}\\n\\ntable thead th {\\n padding-bottom: 0.5em;\\n}\\n\\ntable tbody :first-child td {\\n padding-top: 0.5em;\\n}\\n\\npre {\\n overflow: auto;\\n max-width: 100%;\\n}\\n\\np {\\n margin-top: 0;\\n margin-bottom: 1em;\\n}\\n\\nsup, sub {\\n vertical-align: baseline;\\n position: relative;\\n top: -0.4em;\\n line-height: 1em;\\n}\\n\\nsub {\\n top: 0.4em;\\n}\\n\\n.kicker,\\n.marker {\\n font-size: 15px;\\n font-weight: 600;\\n color: rgba(0, 0, 0, 0.5);\\n}\\n\\n\\n/* Headline */\\n\\n@media(min-width: 1024px) {\\n d-title h1 span {\\n display: block;\\n }\\n}\\n\\n/* Figure */\\n\\nfigure {\\n position: relative;\\n margin-bottom: 2.5em;\\n margin-top: 1.5em;\\n}\\n\\nfigcaption+figure {\\n\\n}\\n\\nfigure img {\\n width: 100%;\\n}\\n\\nfigure svg text,\\nfigure svg tspan {\\n}\\n\\nfigcaption,\\n.figcaption {\\n color: rgba(0, 0, 0, 0.6);\\n font-size: 12px;\\n line-height: 1.5em;\\n}\\n\\n@media(min-width: 1024px) {\\nfigcaption,\\n.figcaption {\\n font-size: 13px;\\n }\\n}\\n\\nfigure.external img {\\n background: white;\\n border: 1px solid rgba(0, 0, 0, 0.1);\\n box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);\\n padding: 18px;\\n box-sizing: border-box;\\n}\\n\\nfigcaption a {\\n color: rgba(0, 0, 0, 0.6);\\n}\\n\\nfigcaption b,\\nfigcaption strong, {\\n font-weight: 600;\\n color: rgba(0, 0, 0, 1.0);\\n}\\n\";\n\n var layout = \"/*\\n * Copyright 2018 The Distill Template Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n@supports not (display: grid) {\\n .base-grid,\\n distill-header,\\n d-title,\\n d-abstract,\\n d-article,\\n d-appendix,\\n distill-appendix,\\n d-byline,\\n d-footnote-list,\\n d-citation-list,\\n distill-footer {\\n display: block;\\n padding: 8px;\\n }\\n}\\n\\n.base-grid,\\ndistill-header,\\nd-title,\\nd-abstract,\\nd-article,\\nd-appendix,\\ndistill-appendix,\\nd-byline,\\nd-footnote-list,\\nd-citation-list,\\ndistill-footer {\\n display: grid;\\n justify-items: stretch;\\n grid-template-columns: [screen-start] 8px [page-start kicker-start text-start gutter-start middle-start] 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr [text-end page-end gutter-end kicker-end middle-end] 8px [screen-end];\\n grid-column-gap: 8px;\\n}\\n\\n.grid {\\n display: grid;\\n grid-column-gap: 8px;\\n}\\n\\n@media(min-width: 768px) {\\n .base-grid,\\n distill-header,\\n d-title,\\n d-abstract,\\n d-article,\\n d-appendix,\\n distill-appendix,\\n d-byline,\\n d-footnote-list,\\n d-citation-list,\\n distill-footer {\\n grid-template-columns: [screen-start] 1fr [page-start kicker-start middle-start text-start] 45px 45px 45px 45px 45px 45px 45px 45px [ kicker-end text-end gutter-start] 45px [middle-end] 45px [page-end gutter-end] 1fr [screen-end];\\n grid-column-gap: 16px;\\n }\\n\\n .grid {\\n grid-column-gap: 16px;\\n }\\n}\\n\\n@media(min-width: 1000px) {\\n .base-grid,\\n distill-header,\\n d-title,\\n d-abstract,\\n d-article,\\n d-appendix,\\n distill-appendix,\\n d-byline,\\n d-footnote-list,\\n d-citation-list,\\n distill-footer {\\n grid-template-columns: [screen-start] 1fr [page-start kicker-start] 50px [middle-start] 50px [text-start kicker-end] 50px 50px 50px 50px 50px 50px 50px 50px [text-end gutter-start] 50px [middle-end] 50px [page-end gutter-end] 1fr [screen-end];\\n grid-column-gap: 16px;\\n }\\n\\n .grid {\\n grid-column-gap: 16px;\\n }\\n}\\n\\n@media(min-width: 1180px) {\\n .base-grid,\\n distill-header,\\n d-title,\\n d-abstract,\\n d-article,\\n d-appendix,\\n distill-appendix,\\n d-byline,\\n d-footnote-list,\\n d-citation-list,\\n distill-footer {\\n grid-template-columns: [screen-start] 1fr [page-start kicker-start] 60px [middle-start] 60px [text-start kicker-end] 60px 60px 60px 60px 60px 60px 60px 60px [text-end gutter-start] 60px [middle-end] 60px [page-end gutter-end] 1fr [screen-end];\\n grid-column-gap: 32px;\\n }\\n\\n .grid {\\n grid-column-gap: 32px;\\n }\\n}\\n\\n\\n\\n\\n.base-grid {\\n grid-column: screen;\\n}\\n\\n/* .l-body,\\nd-article > * {\\n grid-column: text;\\n}\\n\\n.l-page,\\nd-title > *,\\nd-figure {\\n grid-column: page;\\n} */\\n\\n.l-gutter {\\n grid-column: gutter;\\n}\\n\\n.l-text,\\n.l-body {\\n grid-column: text;\\n}\\n\\n.l-page {\\n grid-column: page;\\n}\\n\\n.l-body-outset {\\n grid-column: middle;\\n}\\n\\n.l-page-outset {\\n grid-column: page;\\n}\\n\\n.l-screen {\\n grid-column: screen;\\n}\\n\\n.l-screen-inset {\\n grid-column: screen;\\n padding-left: 16px;\\n padding-left: 16px;\\n}\\n\\n\\n/* Aside */\\n\\nd-article aside {\\n grid-column: gutter;\\n font-size: 12px;\\n line-height: 1.6em;\\n color: rgba(0, 0, 0, 0.6)\\n}\\n\\n@media(min-width: 768px) {\\n aside {\\n grid-column: gutter;\\n }\\n\\n .side {\\n grid-column: gutter;\\n }\\n}\\n\";\n\n var print = \"/*\\n * Copyright 2018 The Distill Template Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\n@media print {\\n\\n @page {\\n size: 8in 11in;\\n @bottom-right {\\n content: counter(page) \\\" of \\\" counter(pages);\\n }\\n }\\n\\n html {\\n /* no general margins -- CSS Grid takes care of those */\\n }\\n\\n p, code {\\n page-break-inside: avoid;\\n }\\n\\n h2, h3 {\\n page-break-after: avoid;\\n }\\n\\n d-header {\\n visibility: hidden;\\n }\\n\\n d-footer {\\n display: none!important;\\n }\\n\\n}\\n\";\n\n var byline = \"/*\\n * Copyright 2018 The Distill Template Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\nd-byline {\\n contain: style;\\n overflow: hidden;\\n border-top: 1px solid rgba(0, 0, 0, 0.1);\\n font-size: 0.8rem;\\n line-height: 1.8em;\\n padding: 1.5rem 0;\\n min-height: 1.8em;\\n}\\n\\n\\nd-byline .byline {\\n grid-template-columns: 1fr 1fr;\\n grid-column: text;\\n}\\n\\n@media(min-width: 768px) {\\n d-byline .byline {\\n grid-template-columns: 1fr 1fr 1fr 1fr;\\n }\\n}\\n\\nd-byline .authors-affiliations {\\n grid-column-end: span 2;\\n grid-template-columns: 1fr 1fr;\\n margin-bottom: 1em;\\n}\\n\\n@media(min-width: 768px) {\\n d-byline .authors-affiliations {\\n margin-bottom: 0;\\n }\\n}\\n\\nd-byline h3 {\\n font-size: 0.6rem;\\n font-weight: 400;\\n color: rgba(0, 0, 0, 0.5);\\n margin: 0;\\n text-transform: uppercase;\\n}\\n\\nd-byline p {\\n margin: 0;\\n}\\n\\nd-byline a,\\nd-article d-byline a {\\n color: rgba(0, 0, 0, 0.8);\\n text-decoration: none;\\n border-bottom: none;\\n}\\n\\nd-article d-byline a:hover {\\n text-decoration: underline;\\n border-bottom: none;\\n}\\n\\nd-byline p.author {\\n font-weight: 500;\\n}\\n\\nd-byline .affiliations {\\n\\n}\\n\";\n\n var article = \"/*\\n * Copyright 2018 The Distill Template Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\nd-article {\\n contain: layout style;\\n overflow-x: hidden;\\n border-top: 1px solid rgba(0, 0, 0, 0.1);\\n padding-top: 2rem;\\n color: rgba(0, 0, 0, 0.8);\\n}\\n\\nd-article > * {\\n grid-column: text;\\n}\\n\\n@media(min-width: 768px) {\\n d-article {\\n font-size: 16px;\\n }\\n}\\n\\n@media(min-width: 1024px) {\\n d-article {\\n font-size: 1.06rem;\\n line-height: 1.7em;\\n }\\n}\\n\\n\\n/* H2 */\\n\\n\\nd-article .marker {\\n text-decoration: none;\\n border: none;\\n counter-reset: section;\\n grid-column: kicker;\\n line-height: 1.7em;\\n}\\n\\nd-article .marker:hover {\\n border: none;\\n}\\n\\nd-article .marker span {\\n padding: 0 3px 4px;\\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\\n position: relative;\\n top: 4px;\\n}\\n\\nd-article .marker:hover span {\\n color: rgba(0, 0, 0, 0.7);\\n border-bottom: 1px solid rgba(0, 0, 0, 0.7);\\n}\\n\\nd-article h2 {\\n font-weight: 600;\\n font-size: 24px;\\n line-height: 1.25em;\\n margin: 2rem 0 1.5rem 0;\\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\\n padding-bottom: 1rem;\\n}\\n\\n@media(min-width: 1024px) {\\n d-article h2 {\\n font-size: 36px;\\n }\\n}\\n\\n/* H3 */\\n\\nd-article h3 {\\n font-weight: 700;\\n font-size: 18px;\\n line-height: 1.4em;\\n margin-bottom: 1em;\\n margin-top: 2em;\\n}\\n\\n@media(min-width: 1024px) {\\n d-article h3 {\\n font-size: 20px;\\n }\\n}\\n\\n/* H4 */\\n\\nd-article h4 {\\n font-weight: 600;\\n text-transform: uppercase;\\n font-size: 14px;\\n line-height: 1.4em;\\n}\\n\\nd-article a {\\n color: inherit;\\n}\\n\\nd-article p,\\nd-article ul,\\nd-article ol,\\nd-article blockquote {\\n margin-top: 0;\\n margin-bottom: 1em;\\n margin-left: 0;\\n margin-right: 0;\\n}\\n\\nd-article blockquote {\\n border-left: 2px solid rgba(0, 0, 0, 0.2);\\n padding-left: 2em;\\n font-style: italic;\\n color: rgba(0, 0, 0, 0.6);\\n}\\n\\nd-article a {\\n border-bottom: 1px solid rgba(0, 0, 0, 0.4);\\n text-decoration: none;\\n}\\n\\nd-article a:hover {\\n border-bottom: 1px solid rgba(0, 0, 0, 0.8);\\n}\\n\\nd-article .link {\\n text-decoration: underline;\\n cursor: pointer;\\n}\\n\\nd-article ul,\\nd-article ol {\\n padding-left: 24px;\\n}\\n\\nd-article li {\\n margin-bottom: 0.2em;\\n margin-left: 0;\\n padding-left: 0;\\n}\\n\\nd-article li:last-child {\\n margin-bottom: 0;\\n}\\n\\nd-article pre {\\n font-size: 14px;\\n margin-bottom: 20px;\\n}\\n\\nd-article hr {\\n grid-column: screen;\\n width: 100%;\\n border: none;\\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\\n margin-top: 60px;\\n margin-bottom: 60px;\\n}\\n\\nd-article section {\\n margin-top: 60px;\\n margin-bottom: 60px;\\n}\\n\\nd-article span.equation-mimic {\\n font-family: georgia;\\n font-size: 115%;\\n font-style: italic;\\n}\\n\\nd-article > d-code,\\nd-article section > d-code {\\n display: block;\\n}\\n\\nd-article > d-math[block],\\nd-article section > d-math[block] {\\n display: block;\\n}\\n\\n@media (max-width: 768px) {\\n d-article > d-code,\\n d-article section > d-code,\\n d-article > d-math[block],\\n d-article section > d-math[block] {\\n overflow-x: scroll;\\n -ms-overflow-style: none; // IE 10+\\n overflow: -moz-scrollbars-none; // Firefox\\n }\\n\\n d-article > d-code::-webkit-scrollbar,\\n d-article section > d-code::-webkit-scrollbar,\\n d-article > d-math[block]::-webkit-scrollbar,\\n d-article section > d-math[block]::-webkit-scrollbar {\\n display: none; // Safari and Chrome\\n }\\n}\\n\\nd-article .citation {\\n color: #668;\\n cursor: pointer;\\n}\\n\\nd-include {\\n width: auto;\\n display: block;\\n}\\n\\nd-figure {\\n contain: layout style;\\n}\\n\\n/* KaTeX */\\n\\n.katex, .katex-prerendered {\\n contain: style;\\n display: inline-block;\\n}\\n\\n/* Tables */\\n\\nd-article table {\\n border-collapse: collapse;\\n margin-bottom: 1.5rem;\\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\\n}\\n\\nd-article table th {\\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\\n}\\n\\nd-article table td {\\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\\n}\\n\\nd-article table tr:last-of-type td {\\n border-bottom: none;\\n}\\n\\nd-article table th,\\nd-article table td {\\n font-size: 15px;\\n padding: 2px 8px;\\n}\\n\\nd-article table tbody :first-child td {\\n padding-top: 2px;\\n}\\n\";\n\n var title = \"/*\\n * Copyright 2018 The Distill Template Authors\\n *\\n * Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n * you may not use this file except in compliance with the License.\\n * You may obtain a copy of the License at\\n *\\n * http://www.apache.org/licenses/LICENSE-2.0\\n *\\n * Unless required by applicable law or agreed to in writing, software\\n * distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n * See the License for the specific language governing permissions and\\n * limitations under the License.\\n */\\n\\nd-title {\\n padding: 2rem 0 1.5rem;\\n contain: layout style;\\n overflow-x: hidden;\\n}\\n\\n@media(min-width: 768px) {\\n d-title {\\n padding: 4rem 0 1.5rem;\\n }\\n}\\n\\nd-title h1 {\\n grid-column: text;\\n font-size: 40px;\\n font-weight: 700;\\n line-height: 1.1em;\\n margin: 0 0 0.5rem;\\n}\\n\\n@media(min-width: 768px) {\\n d-title h1 {\\n font-size: 50px;\\n }\\n}\\n\\nd-title p {\\n font-weight: 300;\\n font-size: 1.2rem;\\n line-height: 1.55em;\\n grid-column: text;\\n}\\n\\nd-title .status {\\n margin-top: 0px;\\n font-size: 12px;\\n color: #009688;\\n opacity: 0.8;\\n grid-column: kicker;\\n}\\n\\nd-title .status span {\\n line-height: 1;\\n display: inline-block;\\n padding: 6px 0;\\n border-bottom: 1px solid #80cbc4;\\n font-size: 11px;\\n text-transform: uppercase;\\n}\\n\";\n\n // Copyright 2018 The Distill Template Authors\n\n const styles = base + layout + title + byline + article + math + print;\n\n function makeStyleTag(dom) {\n\n const styleTagId = 'distill-prerendered-styles';\n const prerenderedTag = dom.getElementById(styleTagId);\n if (!prerenderedTag) {\n const styleTag = dom.createElement('style');\n styleTag.id = styleTagId;\n styleTag.type = 'text/css';\n const cssTextTag = dom.createTextNode(styles);\n styleTag.appendChild(cssTextTag);\n const firstScriptTag = dom.head.querySelector('script');\n dom.head.insertBefore(styleTag, firstScriptTag);\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n function addPolyfill(polyfill, polyfillLoadedCallback) {\n console.debug('Runlevel 0: Polyfill required: ' + polyfill.name);\n const script = document.createElement('script');\n script.src = polyfill.url;\n script.async = false;\n if (polyfillLoadedCallback) {\n script.onload = function() { polyfillLoadedCallback(polyfill); };\n }\n script.onerror = function() {\n new Error('Runlevel 0: Polyfills failed to load script ' + polyfill.name);\n };\n document.head.appendChild(script);\n }\n\n const polyfills = [\n {\n name: 'WebComponents',\n support: function() {\n return 'customElements' in window &&\n 'attachShadow' in Element.prototype &&\n 'getRootNode' in Element.prototype &&\n 'content' in document.createElement('template') &&\n 'Promise' in window &&\n 'from' in Array;\n },\n url: 'https://distill.pub/third-party/polyfills/webcomponents-lite.js'\n }, {\n name: 'IntersectionObserver',\n support: function() {\n return 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window;\n },\n url: 'https://distill.pub/third-party/polyfills/intersection-observer.js'\n },\n ];\n\n class Polyfills {\n\n static browserSupportsAllFeatures() {\n return polyfills.every((poly) => poly.support());\n }\n\n static load(callback) {\n // Define an intermediate callback that checks if all is loaded.\n const polyfillLoaded = function(polyfill) {\n polyfill.loaded = true;\n console.debug('Runlevel 0: Polyfill has finished loading: ' + polyfill.name);\n // console.debug(window[polyfill.name]);\n if (Polyfills.neededPolyfills.every((poly) => poly.loaded)) {\n console.debug('Runlevel 0: All required polyfills have finished loading.');\n console.debug('Runlevel 0->1.');\n window.distillRunlevel = 1;\n callback();\n }\n };\n // Add polyfill script tags\n for (const polyfill of Polyfills.neededPolyfills) {\n addPolyfill(polyfill, polyfillLoaded);\n }\n }\n\n static get neededPolyfills() {\n if (!Polyfills._neededPolyfills) {\n Polyfills._neededPolyfills = polyfills.filter((poly) => !poly.support());\n }\n return Polyfills._neededPolyfills;\n }\n }\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n // const marginSmall = 16;\n // const marginLarge = 3 * marginSmall;\n // const margin = marginSmall + marginLarge;\n // const gutter = marginSmall;\n // const outsetAmount = margin / 2;\n // const numCols = 4;\n // const numGutters = numCols - 1;\n // const columnWidth = (768 - 2 * marginLarge - numGutters * gutter) / numCols;\n //\n // const screenwidth = 768;\n // const pageWidth = screenwidth - 2 * marginLarge;\n // const bodyWidth = pageWidth - columnWidth - gutter;\n\n function body(selector) {\n return `${selector} {\n grid-column: left / text;\n }\n `;\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$1 = Template('d-abstract', `\n\n\n\n`);\n\n class Abstract extends T$1(HTMLElement) {\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$2 = Template('d-appendix', `\n\n\n`, false);\n\n class Appendix extends T$2(HTMLElement) {\n\n }\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n // import { Template } from '../mixins/template';\n // import { Controller } from '../controller';\n\n const isOnlyWhitespace = /^\\s*$/;\n\n class Article extends HTMLElement {\n static get is() { return 'd-article'; }\n\n constructor() {\n super();\n\n new MutationObserver( (mutations) => {\n for (const mutation of mutations) {\n for (const addedNode of mutation.addedNodes) {\n switch (addedNode.nodeName) {\n case '#text': { // usually text nodes are only linebreaks.\n const text = addedNode.nodeValue;\n if (!isOnlyWhitespace.test(text)) {\n console.warn('Use of unwrapped text in distill articles is discouraged as it breaks layout! Please wrap any text in a or

    tag. We found the following text: ' + text);\n const wrapper = document.createElement('span');\n wrapper.innerHTML = addedNode.nodeValue;\n addedNode.parentNode.insertBefore(wrapper, addedNode);\n addedNode.parentNode.removeChild(addedNode);\n }\n } break;\n }\n }\n }\n }).observe(this, {childList: true});\n }\n\n }\n\n var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n function createCommonjsModule(fn, module) {\n \treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n }\n\n var bibtexParse = createCommonjsModule(function (module, exports) {\n /* start bibtexParse 0.0.22 */\n\n //Original work by Henrik Muehe (c) 2010\n //\n //CommonJS port by Mikola Lysenko 2013\n //\n //Port to Browser lib by ORCID / RCPETERS\n //\n //Issues:\n //no comment handling within strings\n //no string concatenation\n //no variable values yet\n //Grammar implemented here:\n //bibtex -> (string | preamble | comment | entry)*;\n //string -> '@STRING' '{' key_equals_value '}';\n //preamble -> '@PREAMBLE' '{' value '}';\n //comment -> '@COMMENT' '{' value '}';\n //entry -> '@' key '{' key ',' key_value_list '}';\n //key_value_list -> key_equals_value (',' key_equals_value)*;\n //key_equals_value -> key '=' value;\n //value -> value_quotes | value_braces | key;\n //value_quotes -> '\"' .*? '\"'; // not quite\n //value_braces -> '{' .*? '\"'; // not quite\n (function(exports) {\n\n function BibtexParser() {\n\n this.months = [\"jan\", \"feb\", \"mar\", \"apr\", \"may\", \"jun\", \"jul\", \"aug\", \"sep\", \"oct\", \"nov\", \"dec\"];\n this.notKey = [',','{','}',' ','='];\n this.pos = 0;\n this.input = \"\";\n this.entries = new Array();\n\n this.currentEntry = \"\";\n\n this.setInput = function(t) {\n this.input = t;\n };\n\n this.getEntries = function() {\n return this.entries;\n };\n\n this.isWhitespace = function(s) {\n return (s == ' ' || s == '\\r' || s == '\\t' || s == '\\n');\n };\n\n this.match = function(s, canCommentOut) {\n if (canCommentOut == undefined || canCommentOut == null)\n canCommentOut = true;\n this.skipWhitespace(canCommentOut);\n if (this.input.substring(this.pos, this.pos + s.length) == s) {\n this.pos += s.length;\n } else {\n throw \"Token mismatch, expected \" + s + \", found \"\n + this.input.substring(this.pos);\n } this.skipWhitespace(canCommentOut);\n };\n\n this.tryMatch = function(s, canCommentOut) {\n if (canCommentOut == undefined || canCommentOut == null)\n canCommentOut = true;\n this.skipWhitespace(canCommentOut);\n if (this.input.substring(this.pos, this.pos + s.length) == s) {\n return true;\n } else {\n return false;\n } };\n\n /* when search for a match all text can be ignored, not just white space */\n this.matchAt = function() {\n while (this.input.length > this.pos && this.input[this.pos] != '@') {\n this.pos++;\n }\n if (this.input[this.pos] == '@') {\n return true;\n } return false;\n };\n\n this.skipWhitespace = function(canCommentOut) {\n while (this.isWhitespace(this.input[this.pos])) {\n this.pos++;\n } if (this.input[this.pos] == \"%\" && canCommentOut == true) {\n while (this.input[this.pos] != \"\\n\") {\n this.pos++;\n } this.skipWhitespace(canCommentOut);\n } };\n\n this.value_braces = function() {\n var bracecount = 0;\n this.match(\"{\", false);\n var start = this.pos;\n var escaped = false;\n while (true) {\n if (!escaped) {\n if (this.input[this.pos] == '}') {\n if (bracecount > 0) {\n bracecount--;\n } else {\n var end = this.pos;\n this.match(\"}\", false);\n return this.input.substring(start, end);\n } } else if (this.input[this.pos] == '{') {\n bracecount++;\n } else if (this.pos >= this.input.length - 1) {\n throw \"Unterminated value\";\n } } if (this.input[this.pos] == '\\\\' && escaped == false)\n escaped = true;\n else\n escaped = false;\n this.pos++;\n } };\n\n this.value_comment = function() {\n var str = '';\n var brcktCnt = 0;\n while (!(this.tryMatch(\"}\", false) && brcktCnt == 0)) {\n str = str + this.input[this.pos];\n if (this.input[this.pos] == '{')\n brcktCnt++;\n if (this.input[this.pos] == '}')\n brcktCnt--;\n if (this.pos >= this.input.length - 1) {\n throw \"Unterminated value:\" + this.input.substring(start);\n } this.pos++;\n } return str;\n };\n\n this.value_quotes = function() {\n this.match('\"', false);\n var start = this.pos;\n var escaped = false;\n while (true) {\n if (!escaped) {\n if (this.input[this.pos] == '\"') {\n var end = this.pos;\n this.match('\"', false);\n return this.input.substring(start, end);\n } else if (this.pos >= this.input.length - 1) {\n throw \"Unterminated value:\" + this.input.substring(start);\n } }\n if (this.input[this.pos] == '\\\\' && escaped == false)\n escaped = true;\n else\n escaped = false;\n this.pos++;\n } };\n\n this.single_value = function() {\n var start = this.pos;\n if (this.tryMatch(\"{\")) {\n return this.value_braces();\n } else if (this.tryMatch('\"')) {\n return this.value_quotes();\n } else {\n var k = this.key();\n if (k.match(\"^[0-9]+$\"))\n return k;\n else if (this.months.indexOf(k.toLowerCase()) >= 0)\n return k.toLowerCase();\n else\n throw \"Value expected:\" + this.input.substring(start) + ' for key: ' + k;\n\n } };\n\n this.value = function() {\n var values = [];\n values.push(this.single_value());\n while (this.tryMatch(\"#\")) {\n this.match(\"#\");\n values.push(this.single_value());\n } return values.join(\"\");\n };\n\n this.key = function() {\n var start = this.pos;\n while (true) {\n if (this.pos >= this.input.length) {\n throw \"Runaway key\";\n } // а-яА-Я is Cyrillic\n //console.log(this.input[this.pos]);\n if (this.notKey.indexOf(this.input[this.pos]) >= 0) {\n return this.input.substring(start, this.pos);\n } else {\n this.pos++;\n\n } } };\n\n this.key_equals_value = function() {\n var key = this.key();\n if (this.tryMatch(\"=\")) {\n this.match(\"=\");\n var val = this.value();\n return [ key, val ];\n } else {\n throw \"... = value expected, equals sign missing:\"\n + this.input.substring(this.pos);\n } };\n\n this.key_value_list = function() {\n var kv = this.key_equals_value();\n this.currentEntry['entryTags'] = {};\n this.currentEntry['entryTags'][kv[0]] = kv[1];\n while (this.tryMatch(\",\")) {\n this.match(\",\");\n // fixes problems with commas at the end of a list\n if (this.tryMatch(\"}\")) {\n break;\n }\n kv = this.key_equals_value();\n this.currentEntry['entryTags'][kv[0]] = kv[1];\n } };\n\n this.entry_body = function(d) {\n this.currentEntry = {};\n this.currentEntry['citationKey'] = this.key();\n this.currentEntry['entryType'] = d.substring(1);\n this.match(\",\");\n this.key_value_list();\n this.entries.push(this.currentEntry);\n };\n\n this.directive = function() {\n this.match(\"@\");\n return \"@\" + this.key();\n };\n\n this.preamble = function() {\n this.currentEntry = {};\n this.currentEntry['entryType'] = 'PREAMBLE';\n this.currentEntry['entry'] = this.value_comment();\n this.entries.push(this.currentEntry);\n };\n\n this.comment = function() {\n this.currentEntry = {};\n this.currentEntry['entryType'] = 'COMMENT';\n this.currentEntry['entry'] = this.value_comment();\n this.entries.push(this.currentEntry);\n };\n\n this.entry = function(d) {\n this.entry_body(d);\n };\n\n this.bibtex = function() {\n while (this.matchAt()) {\n var d = this.directive();\n this.match(\"{\");\n if (d == \"@STRING\") {\n this.string();\n } else if (d == \"@PREAMBLE\") {\n this.preamble();\n } else if (d == \"@COMMENT\") {\n this.comment();\n } else {\n this.entry(d);\n }\n this.match(\"}\");\n } };\n }\n exports.toJSON = function(bibtex) {\n var b = new BibtexParser();\n b.setInput(bibtex);\n b.bibtex();\n return b.entries;\n };\n\n /* added during hackathon don't hate on me */\n exports.toBibtex = function(json) {\n var out = '';\n for ( var i in json) {\n out += \"@\" + json[i].entryType;\n out += '{';\n if (json[i].citationKey)\n out += json[i].citationKey + ', ';\n if (json[i].entry)\n out += json[i].entry ;\n if (json[i].entryTags) {\n var tags = '';\n for (var jdx in json[i].entryTags) {\n if (tags.length != 0)\n tags += ', ';\n tags += jdx + '= {' + json[i].entryTags[jdx] + '}';\n }\n out += tags;\n }\n out += '}\\n\\n';\n }\n return out;\n\n };\n\n })( exports);\n\n /* end bibtexParse */\n });\n\n // Copyright 2018 The Distill Template Authors\n\n function normalizeTag(string) {\n return string\n .replace(/[\\t\\n ]+/g, ' ')\n .replace(/{\\\\[\"^`.'acu~Hvs]( )?([a-zA-Z])}/g, (full, x, char) => char)\n .replace(/{\\\\([a-zA-Z])}/g, (full, char) => char);\n }\n\n function parseBibtex(bibtex) {\n const bibliography = new Map();\n const parsedEntries = bibtexParse.toJSON(bibtex);\n for (const entry of parsedEntries) {\n // normalize tags; note entryTags is an object, not Map\n for (const [key, value] of Object.entries(entry.entryTags)) {\n entry.entryTags[key.toLowerCase()] = normalizeTag(value);\n }\n entry.entryTags.type = entry.entryType;\n // add to bibliography\n bibliography.set(entry.citationKey, entry.entryTags);\n }\n return bibliography;\n }\n\n function serializeFrontmatterToBibtex(frontMatter) {\n return `@article{${frontMatter.slug},\n author = {${frontMatter.bibtexAuthors}},\n title = {${frontMatter.title}},\n journal = {${frontMatter.journal.title}},\n year = {${frontMatter.publishedYear}},\n note = {${frontMatter.url}},\n doi = {${frontMatter.doi}}\n}`;\n }\n\n // Copyright 2018 The Distill Template Authors\n\n class Bibliography extends HTMLElement {\n\n static get is() { return 'd-bibliography'; }\n\n constructor() {\n super();\n\n // set up mutation observer\n const options = {childList: true, characterData: true, subtree: true};\n const observer = new MutationObserver( (entries) => {\n for (const entry of entries) {\n if (entry.target.nodeName === 'SCRIPT' || entry.type === 'characterData') {\n this.parseIfPossible();\n }\n }\n });\n observer.observe(this, options);\n }\n\n connectedCallback() {\n requestAnimationFrame(() => {\n this.parseIfPossible();\n });\n }\n\n parseIfPossible() {\n const scriptTag = this.querySelector('script');\n if (!scriptTag) return;\n if (scriptTag.type == 'text/bibtex') {\n const newBibtex = scriptTag.textContent;\n if (this.bibtex !== newBibtex) {\n this.bibtex = newBibtex;\n const bibliography = parseBibtex(this.bibtex);\n this.notify(bibliography);\n }\n } else if (scriptTag.type == 'text/json') {\n const bibliography = new Map(JSON.parse(scriptTag.textContent));\n this.notify(bibliography);\n } else {\n console.warn('Unsupported bibliography script tag type: ' + scriptTag.type);\n }\n }\n\n notify(bibliography) {\n const options = { detail: bibliography, bubbles: true };\n const event = new CustomEvent('onBibliographyChanged', options);\n this.dispatchEvent(event);\n }\n\n /* observe 'src' attribute */\n\n static get observedAttributes() {\n return ['src'];\n }\n\n receivedBibtex(event) {\n const bibliography = parseBibtex(event.target.response);\n this.notify(bibliography);\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n var oReq = new XMLHttpRequest();\n oReq.onload = (e) => this.receivedBibtex(e);\n oReq.onerror = () => console.warn(`Could not load Bibtex! (tried ${newValue})`);\n oReq.responseType = 'text';\n oReq.open('GET', newValue, true);\n oReq.send();\n }\n\n\n }\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n // import style from '../styles/d-byline.css';\n\n function bylineTemplate(frontMatter) {\n return `\n

    \n
    \n

    Authors

    \n
    \n ${frontMatter.authors.map((author, i) => `\n \n ${author.personalURL ? `\n ${author.name}` + (i + 1 < frontMatter.authors.length ? `,` : ``) + `` : `\n ${author.name}` + (i + 1 < frontMatter.authors.length ? `,` : ``) + ``}\n \n `).join('')}\n
    \n
    \n
    \n

    Organization

    \n \n
    \n
    \n

    Published

    \n
    Apr 8, 2025
    \n
    \n
    \n
    \n

    Download

    \n \n \"Coming\n
    \n`;\n }\n\n class Byline extends HTMLElement {\n\n static get is() { return 'd-byline'; }\n\n set frontMatter(frontMatter) {\n this.innerHTML = bylineTemplate(frontMatter);\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$3 = Template(\n \"d-cite\",\n `\n\n\n\n\n
    \n \n
    \n`\n );\n\n class Cite extends T$3(HTMLElement) {\n /* Lifecycle */\n constructor() {\n super();\n this._numbers = [];\n this._entries = [];\n }\n\n connectedCallback() {\n this.outerSpan = this.root.querySelector(\"#citation-\");\n this.innerSpan = this.root.querySelector(\".citation-number\");\n this.hoverBox = this.root.querySelector(\"d-hover-box\");\n window.customElements.whenDefined(\"d-hover-box\").then(() => {\n this.hoverBox.listen(this);\n });\n // in case this component got connected after values were set\n if (this.numbers) {\n this.displayNumbers(this.numbers);\n }\n if (this.entries) {\n this.displayEntries(this.entries);\n }\n }\n\n //TODO This causes an infinite loop on firefox with polyfills.\n // This is only needed for interactive editing so no priority.\n // disconnectedCallback() {\n // const options = { detail: [this, this.keys], bubbles: true };\n // const event = new CustomEvent('onCiteKeyRemoved', options);\n // document.dispatchEvent(event);\n // }\n\n /* observe 'key' attribute */\n\n static get observedAttributes() {\n return [\"key\", \"bibtex-key\"];\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n const eventName = oldValue ? \"onCiteKeyChanged\" : \"onCiteKeyCreated\";\n const keys = newValue.split(\",\").map(k => k.trim());\n const options = { detail: [this, keys], bubbles: true };\n const event = new CustomEvent(eventName, options);\n document.dispatchEvent(event);\n }\n\n set key(value) {\n this.setAttribute(\"key\", value);\n }\n\n get key() {\n return this.getAttribute(\"key\") || this.getAttribute(\"bibtex-key\");\n }\n\n get keys() {\n const result = this.key.split(\",\");\n console.log(result);\n return result;\n }\n\n /* Setters & Rendering */\n\n set numbers(numbers) {\n this._numbers = numbers;\n this.displayNumbers(numbers);\n }\n\n get numbers() {\n return this._numbers;\n }\n\n displayNumbers(numbers) {\n if (!this.innerSpan) return;\n const numberStrings = numbers.map(index => {\n return index == -1 ? \"?\" : index + 1 + \"\";\n });\n const textContent = \"[\" + numberStrings.join(\", \") + \"]\";\n this.innerSpan.textContent = textContent;\n }\n\n set entries(entries) {\n this._entries = entries;\n this.displayEntries(entries);\n }\n\n get entries() {\n return this._entries;\n }\n\n displayEntries(entries) {\n if (!this.hoverBox) return;\n this.hoverBox.innerHTML = `
      \n ${entries\n .map(hover_cite)\n .map(html => `
    • ${html}
    • `)\n .join(\"\\n\")}\n
    `;\n }\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const styles$1 = `\nd-citation-list {\n contain: style;\n}\n\nd-citation-list .references {\n grid-column: text;\n}\n\nd-citation-list .references .title {\n font-weight: 500;\n}\n`;\n\n function renderCitationList(element, entries, dom=document) {\n if (entries.size > 0) {\n element.style.display = '';\n let list = element.querySelector('.references');\n if (list) {\n list.innerHTML = '';\n } else {\n const stylesTag = dom.createElement('style');\n stylesTag.innerHTML = styles$1;\n element.appendChild(stylesTag);\n\n const heading = dom.createElement('h3');\n heading.id = 'references';\n heading.textContent = 'References';\n element.appendChild(heading);\n\n list = dom.createElement('ol');\n list.id = 'references-list';\n list.className = 'references';\n element.appendChild(list);\n }\n\n for (const [key, entry] of entries) {\n const listItem = dom.createElement('li');\n listItem.id = key;\n listItem.innerHTML = bibliography_cite(entry);\n list.appendChild(listItem);\n }\n } else {\n element.style.display = 'none';\n }\n }\n\n class CitationList extends HTMLElement {\n\n static get is() { return 'd-citation-list'; }\n\n connectedCallback() {\n if (!this.hasAttribute('distill-prerendered')) {\n this.style.display = 'none';\n }\n }\n\n set citations(citations) {\n renderCitationList(this, citations);\n }\n\n }\n\n var prism = createCommonjsModule(function (module) {\n /* **********************************************\n Begin prism-core.js\n ********************************************** */\n\n var _self = (typeof window !== 'undefined')\n \t? window // if in browser\n \t: (\n \t\t(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)\n \t\t? self // if in worker\n \t\t: {} // if in node js\n \t);\n\n /**\n * Prism: Lightweight, robust, elegant syntax highlighting\n * MIT license http://www.opensource.org/licenses/mit-license.php/\n * @author Lea Verou http://lea.verou.me\n */\n\n var Prism = (function (_self){\n\n // Private helper vars\n var lang = /\\blang(?:uage)?-([\\w-]+)\\b/i;\n var uniqueId = 0;\n\n\n var _ = {\n \tmanual: _self.Prism && _self.Prism.manual,\n \tdisableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler,\n \tutil: {\n \t\tencode: function encode(tokens) {\n \t\t\tif (tokens instanceof Token) {\n \t\t\t\treturn new Token(tokens.type, encode(tokens.content), tokens.alias);\n \t\t\t} else if (Array.isArray(tokens)) {\n \t\t\t\treturn tokens.map(encode);\n \t\t\t} else {\n \t\t\t\treturn tokens.replace(/&/g, '&').replace(/' + env.content + '';\n };\n\n /**\n * @param {string} text\n * @param {LinkedList} tokenList\n * @param {any} grammar\n * @param {LinkedListNode} startNode\n * @param {number} startPos\n * @param {boolean} [oneshot=false]\n * @param {string} [target]\n */\n function matchGrammar(text, tokenList, grammar, startNode, startPos, oneshot, target) {\n \tfor (var token in grammar) {\n \t\tif (!grammar.hasOwnProperty(token) || !grammar[token]) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tvar patterns = grammar[token];\n \t\tpatterns = Array.isArray(patterns) ? patterns : [patterns];\n\n \t\tfor (var j = 0; j < patterns.length; ++j) {\n \t\t\tif (target && target == token + ',' + j) {\n \t\t\t\treturn;\n \t\t\t}\n\n \t\t\tvar pattern = patterns[j],\n \t\t\t\tinside = pattern.inside,\n \t\t\t\tlookbehind = !!pattern.lookbehind,\n \t\t\t\tgreedy = !!pattern.greedy,\n \t\t\t\tlookbehindLength = 0,\n \t\t\t\talias = pattern.alias;\n\n \t\t\tif (greedy && !pattern.pattern.global) {\n \t\t\t\t// Without the global flag, lastIndex won't work\n \t\t\t\tvar flags = pattern.pattern.toString().match(/[imsuy]*$/)[0];\n \t\t\t\tpattern.pattern = RegExp(pattern.pattern.source, flags + 'g');\n \t\t\t}\n\n \t\t\tpattern = pattern.pattern || pattern;\n\n \t\t\tfor ( // iterate the token list and keep track of the current token/string position\n \t\t\t\tvar currentNode = startNode.next, pos = startPos;\n \t\t\t\tcurrentNode !== tokenList.tail;\n \t\t\t\tpos += currentNode.value.length, currentNode = currentNode.next\n \t\t\t) {\n\n \t\t\t\tvar str = currentNode.value;\n\n \t\t\t\tif (tokenList.length > text.length) {\n \t\t\t\t\t// Something went terribly wrong, ABORT, ABORT!\n \t\t\t\t\treturn;\n \t\t\t\t}\n\n \t\t\t\tif (str instanceof Token) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n\n \t\t\t\tvar removeCount = 1; // this is the to parameter of removeBetween\n\n \t\t\t\tif (greedy && currentNode != tokenList.tail.prev) {\n \t\t\t\t\tpattern.lastIndex = pos;\n \t\t\t\t\tvar match = pattern.exec(text);\n \t\t\t\t\tif (!match) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n\n \t\t\t\t\tvar from = match.index + (lookbehind && match[1] ? match[1].length : 0);\n \t\t\t\t\tvar to = match.index + match[0].length;\n \t\t\t\t\tvar p = pos;\n\n \t\t\t\t\t// find the node that contains the match\n \t\t\t\t\tp += currentNode.value.length;\n \t\t\t\t\twhile (from >= p) {\n \t\t\t\t\t\tcurrentNode = currentNode.next;\n \t\t\t\t\t\tp += currentNode.value.length;\n \t\t\t\t\t}\n \t\t\t\t\t// adjust pos (and p)\n \t\t\t\t\tp -= currentNode.value.length;\n \t\t\t\t\tpos = p;\n\n \t\t\t\t\t// the current node is a Token, then the match starts inside another Token, which is invalid\n \t\t\t\t\tif (currentNode.value instanceof Token) {\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}\n\n \t\t\t\t\t// find the last node which is affected by this match\n \t\t\t\t\tfor (\n \t\t\t\t\t\tvar k = currentNode;\n \t\t\t\t\t\tk !== tokenList.tail && (p < to || (typeof k.value === 'string' && !k.prev.value.greedy));\n \t\t\t\t\t\tk = k.next\n \t\t\t\t\t) {\n \t\t\t\t\t\tremoveCount++;\n \t\t\t\t\t\tp += k.value.length;\n \t\t\t\t\t}\n \t\t\t\t\tremoveCount--;\n\n \t\t\t\t\t// replace with the new match\n \t\t\t\t\tstr = text.slice(pos, p);\n \t\t\t\t\tmatch.index -= pos;\n \t\t\t\t} else {\n \t\t\t\t\tpattern.lastIndex = 0;\n\n \t\t\t\t\tvar match = pattern.exec(str);\n \t\t\t\t}\n\n \t\t\t\tif (!match) {\n \t\t\t\t\tif (oneshot) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n\n \t\t\t\tif (lookbehind) {\n \t\t\t\t\tlookbehindLength = match[1] ? match[1].length : 0;\n \t\t\t\t}\n\n \t\t\t\tvar from = match.index + lookbehindLength,\n \t\t\t\t\tmatch = match[0].slice(lookbehindLength),\n \t\t\t\t\tto = from + match.length,\n \t\t\t\t\tbefore = str.slice(0, from),\n \t\t\t\t\tafter = str.slice(to);\n\n \t\t\t\tvar removeFrom = currentNode.prev;\n\n \t\t\t\tif (before) {\n \t\t\t\t\tremoveFrom = addAfter(tokenList, removeFrom, before);\n \t\t\t\t\tpos += before.length;\n \t\t\t\t}\n\n \t\t\t\tremoveRange(tokenList, removeFrom, removeCount);\n\n \t\t\t\tvar wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias, match, greedy);\n \t\t\t\tcurrentNode = addAfter(tokenList, removeFrom, wrapped);\n\n \t\t\t\tif (after) {\n \t\t\t\t\taddAfter(tokenList, currentNode, after);\n \t\t\t\t}\n\n\n \t\t\t\tif (removeCount > 1)\n \t\t\t\t\tmatchGrammar(text, tokenList, grammar, currentNode.prev, pos, true, token + ',' + j);\n\n \t\t\t\tif (oneshot)\n \t\t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n }\n\n /**\n * @typedef LinkedListNode\n * @property {T} value\n * @property {LinkedListNode | null} prev The previous node.\n * @property {LinkedListNode | null} next The next node.\n * @template T\n */\n\n /**\n * @template T\n */\n function LinkedList() {\n \t/** @type {LinkedListNode} */\n \tvar head = { value: null, prev: null, next: null };\n \t/** @type {LinkedListNode} */\n \tvar tail = { value: null, prev: head, next: null };\n \thead.next = tail;\n\n \t/** @type {LinkedListNode} */\n \tthis.head = head;\n \t/** @type {LinkedListNode} */\n \tthis.tail = tail;\n \tthis.length = 0;\n }\n\n /**\n * Adds a new node with the given value to the list.\n * @param {LinkedList} list\n * @param {LinkedListNode} node\n * @param {T} value\n * @returns {LinkedListNode} The added node.\n * @template T\n */\n function addAfter(list, node, value) {\n \t// assumes that node != list.tail && values.length >= 0\n \tvar next = node.next;\n\n \tvar newNode = { value: value, prev: node, next: next };\n \tnode.next = newNode;\n \tnext.prev = newNode;\n \tlist.length++;\n\n \treturn newNode;\n }\n /**\n * Removes `count` nodes after the given node. The given node will not be removed.\n * @param {LinkedList} list\n * @param {LinkedListNode} node\n * @param {number} count\n * @template T\n */\n function removeRange(list, node, count) {\n \tvar next = node.next;\n \tfor (var i = 0; i < count && next !== list.tail; i++) {\n \t\tnext = next.next;\n \t}\n \tnode.next = next;\n \tnext.prev = node;\n \tlist.length -= i;\n }\n /**\n * @param {LinkedList} list\n * @returns {T[]}\n * @template T\n */\n function toArray(list) {\n \tvar array = [];\n \tvar node = list.head.next;\n \twhile (node !== list.tail) {\n \t\tarray.push(node.value);\n \t\tnode = node.next;\n \t}\n \treturn array;\n }\n\n\n if (!_self.document) {\n \tif (!_self.addEventListener) {\n \t\t// in Node.js\n \t\treturn _;\n \t}\n\n \tif (!_.disableWorkerMessageHandler) {\n \t\t// In worker\n \t\t_self.addEventListener('message', function (evt) {\n \t\t\tvar message = JSON.parse(evt.data),\n \t\t\t\tlang = message.language,\n \t\t\t\tcode = message.code,\n \t\t\t\timmediateClose = message.immediateClose;\n\n \t\t\t_self.postMessage(_.highlight(code, _.languages[lang], lang));\n \t\t\tif (immediateClose) {\n \t\t\t\t_self.close();\n \t\t\t}\n \t\t}, false);\n \t}\n\n \treturn _;\n }\n\n //Get current script and highlight\n var script = _.util.currentScript();\n\n if (script) {\n \t_.filename = script.src;\n\n \tif (script.hasAttribute('data-manual')) {\n \t\t_.manual = true;\n \t}\n }\n\n function highlightAutomaticallyCallback() {\n \tif (!_.manual) {\n \t\t_.highlightAll();\n \t}\n }\n\n if (!_.manual) {\n \t// If the document state is \"loading\", then we'll use DOMContentLoaded.\n \t// If the document state is \"interactive\" and the prism.js script is deferred, then we'll also use the\n \t// DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they\n \t// might take longer one animation frame to execute which can create a race condition where only some plugins have\n \t// been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded.\n \t// See https://github.com/PrismJS/prism/issues/2102\n \tvar readyState = document.readyState;\n \tif (readyState === 'loading' || readyState === 'interactive' && script && script.defer) {\n \t\tdocument.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback);\n \t} else {\n \t\tif (window.requestAnimationFrame) {\n \t\t\twindow.requestAnimationFrame(highlightAutomaticallyCallback);\n \t\t} else {\n \t\t\twindow.setTimeout(highlightAutomaticallyCallback, 16);\n \t\t}\n \t}\n }\n\n return _;\n\n })(_self);\n\n if ( module.exports) {\n \tmodule.exports = Prism;\n }\n\n // hack for components to work correctly in node.js\n if (typeof commonjsGlobal !== 'undefined') {\n \tcommonjsGlobal.Prism = Prism;\n }\n\n\n /* **********************************************\n Begin prism-markup.js\n ********************************************** */\n\n Prism.languages.markup = {\n \t'comment': //,\n \t'prolog': /<\\?[\\s\\S]+?\\?>/,\n \t'doctype': {\n \t\tpattern: /\"'[\\]]|\"[^\"]*\"|'[^']*')+(?:\\[(?:(?!)*\\]\\s*)?>/i,\n \t\tgreedy: true\n \t},\n \t'cdata': //i,\n \t'tag': {\n \t\tpattern: /<\\/?(?!\\d)[^\\s>\\/=$<%]+(?:\\s(?:\\s*[^\\s>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*\\/?>/i,\n \t\tgreedy: true,\n \t\tinside: {\n \t\t\t'tag': {\n \t\t\t\tpattern: /^<\\/?[^\\s>\\/]+/i,\n \t\t\t\tinside: {\n \t\t\t\t\t'punctuation': /^<\\/?/,\n \t\t\t\t\t'namespace': /^[^\\s>\\/:]+:/\n \t\t\t\t}\n \t\t\t},\n \t\t\t'attr-value': {\n \t\t\t\tpattern: /=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/i,\n \t\t\t\tinside: {\n \t\t\t\t\t'punctuation': [\n \t\t\t\t\t\t/^=/,\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tpattern: /^(\\s*)[\"']|[\"']$/,\n \t\t\t\t\t\t\tlookbehind: true\n \t\t\t\t\t\t}\n \t\t\t\t\t]\n \t\t\t\t}\n \t\t\t},\n \t\t\t'punctuation': /\\/?>/,\n \t\t\t'attr-name': {\n \t\t\t\tpattern: /[^\\s>\\/]+/,\n \t\t\t\tinside: {\n \t\t\t\t\t'namespace': /^[^\\s>\\/:]+:/\n \t\t\t\t}\n \t\t\t}\n\n \t\t}\n \t},\n \t'entity': /&#?[\\da-z]{1,8};/i\n };\n\n Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] =\n \tPrism.languages.markup['entity'];\n\n // Plugin to make entity title show the real entity, idea by Roman Komarov\n Prism.hooks.add('wrap', function(env) {\n\n \tif (env.type === 'entity') {\n \t\tenv.attributes['title'] = env.content.replace(/&/, '&');\n \t}\n });\n\n Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {\n \t/**\n \t * Adds an inlined language to markup.\n \t *\n \t * An example of an inlined language is CSS with `\n\n\n\n`);\n\n class Code extends Mutating(T$4(HTMLElement)) {\n\n renderContent() {\n\n // check if language can be highlighted\n this.languageName = this.getAttribute('language');\n if (!this.languageName) {\n console.warn('You need to provide a language attribute to your block to let us know how to highlight your code; e.g.:\\n zeros = np.zeros(shape).');\n return;\n }\n const language = prism.languages[this.languageName];\n if (language == undefined) {\n console.warn(`Distill does not yet support highlighting your code block in \"${this.languageName}'.`);\n return;\n }\n\n let content = this.textContent;\n const codeTag = this.shadowRoot.querySelector('#code-container');\n\n if (this.hasAttribute('block')) {\n // normalize the tab indents\n content = content.replace(/\\n/, '');\n const tabs = content.match(/\\s*/);\n content = content.replace(new RegExp('\\n' + tabs, 'g'), '\\n');\n content = content.trim();\n // wrap code block in pre tag if needed\n if (codeTag.parentNode instanceof ShadowRoot) {\n const preTag = document.createElement('pre');\n this.shadowRoot.removeChild(codeTag);\n preTag.appendChild(codeTag);\n this.shadowRoot.appendChild(preTag);\n }\n\n }\n\n codeTag.className = `language-${this.languageName}`;\n codeTag.innerHTML = prism.highlight(content, language);\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$5 = Template('d-footnote', `\n\n\n\n
    \n \n
    \n
    \n\n\n \n\n\n`);\n\n class Footnote extends T$5(HTMLElement) {\n\n constructor() {\n super();\n\n const options = {childList: true, characterData: true, subtree: true};\n const observer = new MutationObserver(this.notify);\n observer.observe(this, options);\n }\n\n notify() {\n const options = { detail: this, bubbles: true };\n const event = new CustomEvent('onFootnoteChanged', options);\n document.dispatchEvent(event);\n }\n\n connectedCallback() {\n // listen and notify about changes to slotted content\n // const slot = this.shadowRoot.querySelector('#slot');\n // console.warn(slot.textContent);\n // slot.addEventListener('slotchange', this.notify);\n this.hoverBox = this.root.querySelector('d-hover-box');\n window.customElements.whenDefined('d-hover-box').then(() => {\n this.hoverBox.listen(this);\n });\n // create numeric ID\n Footnote.currentFootnoteId += 1;\n const IdString = Footnote.currentFootnoteId.toString();\n this.root.host.id = 'd-footnote-' + IdString;\n\n // set up hidden hover box\n const id = 'dt-fn-hover-box-' + IdString;\n this.hoverBox.id = id;\n\n // set up visible footnote marker\n const span = this.root.querySelector('#fn-');\n span.setAttribute('id', 'fn-' + IdString);\n span.setAttribute('data-hover-ref', id);\n span.textContent = IdString;\n }\n\n }\n\n Footnote.currentFootnoteId = 0;\n\n // Copyright 2018 The Distill Template Authors\n\n const T$6 = Template('d-footnote-list', `\n\n\n

    Footnotes

    \n
      \n`, false);\n\n class FootnoteList extends T$6(HTMLElement) {\n\n connectedCallback() {\n super.connectedCallback();\n\n this.list = this.root.querySelector('ol');\n // footnotes list is initially hidden\n this.root.style.display = 'none';\n // look through document and register existing footnotes\n // Store.subscribeTo('footnotes', (footnote) => {\n // this.renderFootnote(footnote);\n // });\n }\n\n // TODO: could optimize this to accept individual footnotes?\n set footnotes(footnotes) {\n this.list.innerHTML = '';\n if (footnotes.length) {\n // ensure footnote list is visible\n this.root.style.display = '';\n\n for (const footnote of footnotes) {\n // construct and append list item to show footnote\n const listItem = document.createElement('li');\n listItem.id = footnote.id + '-listing';\n listItem.innerHTML = footnote.innerHTML;\n\n const backlink = document.createElement('a');\n backlink.setAttribute('class', 'footnote-backlink');\n backlink.setAttribute('target', '_self');\n backlink.textContent = '[↩]';\n backlink.href = '#' + footnote.id;\n\n listItem.appendChild(backlink);\n this.list.appendChild(listItem);\n }\n } else {\n // ensure footnote list is invisible\n this.root.style.display = 'none';\n }\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$7 = Template('d-hover-box', `\n\n\n
      \n
      \n \n
      \n
      \n`);\n\n class HoverBox extends T$7(HTMLElement) {\n\n constructor() {\n super();\n }\n\n connectedCallback() {\n\n }\n\n listen(element) {\n // console.log(element)\n this.bindDivEvents(this);\n this.bindTriggerEvents(element);\n // this.style.display = \"block\";\n }\n\n bindDivEvents(element) {\n // For mice, same behavior as hovering on links\n element.addEventListener('mouseover', () => {\n if (!this.visible) this.showAtNode(element);\n this.stopTimeout();\n });\n element.addEventListener('mouseout', () => {\n this.extendTimeout(500);\n });\n // Don't trigger body touchstart event when touching within box\n element.addEventListener('touchstart', (event) => {\n event.stopPropagation();\n }, {passive: true});\n // Close box when touching outside box\n document.body.addEventListener('touchstart', () => {\n this.hide();\n }, {passive: true});\n }\n\n bindTriggerEvents(node) {\n node.addEventListener('mouseover', () => {\n if (!this.visible) {\n this.showAtNode(node);\n }\n this.stopTimeout();\n });\n\n node.addEventListener('mouseout', () => {\n this.extendTimeout(300);\n });\n\n node.addEventListener('touchstart', (event) => {\n if (this.visible) {\n this.hide();\n } else {\n this.showAtNode(node);\n }\n // Don't trigger body touchstart event when touching link\n event.stopPropagation();\n }, {passive: true});\n }\n\n show(position) {\n this.visible = true;\n this.style.display = 'block';\n // 10px extra offset from element\n this.style.top = Math.round(position[1] + 10) + 'px';\n }\n\n showAtNode(node) {\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop\n const bbox = node.getBoundingClientRect();\n this.show([node.offsetLeft + bbox.width, node.offsetTop + bbox.height]);\n }\n\n hide() {\n this.visible = false;\n this.style.display = 'none';\n this.stopTimeout();\n }\n\n stopTimeout() {\n if (this.timeout) {\n clearTimeout(this.timeout);\n }\n }\n\n extendTimeout(time) {\n this.stopTimeout();\n this.timeout = setTimeout(() => {\n this.hide();\n }, time);\n }\n\n }\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n class Title extends HTMLElement {\n static get is() { return 'd-title'; }\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$8 = Template('d-references', `\n\n`, false);\n\n class References extends T$8(HTMLElement) {\n\n }\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n class TOC extends HTMLElement {\n\n static get is() { return 'd-toc'; }\n\n connectedCallback() {\n if (!this.getAttribute('prerendered')) {\n window.onload = () => {\n const article = document.querySelector('d-article');\n const headings = article.querySelectorAll('h2, h3');\n renderTOC(this, headings);\n };\n }\n }\n\n }\n\n function renderTOC(element, headings) {\n\n let ToC =`\n \n \n

      Table of contents

      \n
        `;\n\n for (const el of headings) {\n // should element be included in TOC?\n const isInTitle = el.parentElement.tagName == 'D-TITLE';\n const isException = el.getAttribute('no-toc');\n if (isInTitle || isException) continue;\n // create TOC entry\n const title = el.textContent;\n const link = '#' + el.getAttribute('id');\n\n let newLine = '
      • ' + '' + title + '' + '
      • ';\n if (el.tagName == 'H3') {\n newLine = '
          ' + newLine + '
        ';\n } else {\n newLine += '
        ';\n }\n ToC += newLine;\n\n }\n\n ToC += '
      ';\n element.innerHTML = ToC;\n }\n\n // Copyright 2018 The Distill Template Authors\n //\n // Licensed under the Apache License, Version 2.0 (the \"License\");\n // you may not use this file except in compliance with the License.\n // You may obtain a copy of the License at\n //\n // http://www.apache.org/licenses/LICENSE-2.0\n //\n // Unless required by applicable law or agreed to in writing, software\n // distributed under the License is distributed on an \"AS IS\" BASIS,\n // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n // See the License for the specific language governing permissions and\n // limitations under the License.\n\n // Figure\n //\n // d-figure provides a state-machine of visibility events:\n //\n // scroll out of view\n // +----------------+\n // *do work here* | |\n // +----------------+ +-+---------+ +-v---------+\n // | ready +----> onscreen | | offscreen |\n // +----------------+ +---------^-+ +---------+-+\n // | |\n // +----------------+\n // scroll into view\n //\n\n class Figure extends HTMLElement {\n\n static get is() { return 'd-figure'; }\n\n static get readyQueue() {\n if (!Figure._readyQueue) {\n Figure._readyQueue = [];\n }\n return Figure._readyQueue;\n }\n\n static addToReadyQueue(figure) {\n if (Figure.readyQueue.indexOf(figure) === -1) {\n Figure.readyQueue.push(figure);\n Figure.runReadyQueue();\n }\n }\n\n static runReadyQueue() {\n // console.log(\"Checking to run readyQueue, length: \" + Figure.readyQueue.length + \", scrolling: \" + Figure.isScrolling);\n // if (Figure.isScrolling) return;\n // console.log(\"Running ready Queue\");\n const figure = Figure.readyQueue\n .sort((a,b) => a._seenOnScreen - b._seenOnScreen )\n .filter((figure) => !figure._ready)\n .pop();\n if (figure) {\n figure.ready();\n requestAnimationFrame(Figure.runReadyQueue);\n }\n\n }\n\n constructor() {\n super();\n // debugger\n this._ready = false;\n this._onscreen = false;\n this._offscreen = true;\n }\n\n connectedCallback() {\n this.loadsWhileScrolling = this.hasAttribute('loadsWhileScrolling');\n Figure.marginObserver.observe(this);\n Figure.directObserver.observe(this);\n }\n\n disconnectedCallback() {\n Figure.marginObserver.unobserve(this);\n Figure.directObserver.unobserve(this);\n }\n\n // We use two separate observers:\n // One with an extra 1000px margin to warn if the viewpoint gets close,\n // And one for the actual on/off screen events\n\n static get marginObserver() {\n if (!Figure._marginObserver) {\n // if (!('IntersectionObserver' in window)) {\n // throw new Error('no interscetionobbserver!');\n // }\n const viewportHeight = window.innerHeight;\n const margin = Math.floor(2 * viewportHeight);\n const options = {rootMargin: margin + 'px 0px ' + margin + 'px 0px', threshold: 0.01};\n const callback = Figure.didObserveMarginIntersection;\n const observer = new IntersectionObserver(callback, options);\n Figure._marginObserver = observer;\n }\n return Figure._marginObserver;\n }\n\n static didObserveMarginIntersection(entries) {\n for (const entry of entries) {\n const figure = entry.target;\n if (entry.isIntersecting && !figure._ready) {\n Figure.addToReadyQueue(figure);\n }\n }\n }\n\n static get directObserver() {\n if (!Figure._directObserver) {\n Figure._directObserver = new IntersectionObserver(\n Figure.didObserveDirectIntersection, {\n rootMargin: '0px', threshold: [0, 1.0],\n }\n );\n }\n return Figure._directObserver;\n }\n\n static didObserveDirectIntersection(entries) {\n for (const entry of entries) {\n const figure = entry.target;\n if (entry.isIntersecting) {\n figure._seenOnScreen = new Date();\n // if (!figure._ready) { figure.ready(); }\n if (figure._offscreen) { figure.onscreen(); }\n } else {\n if (figure._onscreen) { figure.offscreen(); }\n }\n }\n }\n\n // Notify listeners that registered late, too:\n\n addEventListener(eventName, callback) {\n super.addEventListener(eventName, callback);\n // if we had already dispatched something while presumingly no one was listening, we do so again\n // debugger\n if (eventName === 'ready') {\n if (Figure.readyQueue.indexOf(this) !== -1) {\n this._ready = false;\n Figure.runReadyQueue();\n }\n }\n if (eventName === 'onscreen') {\n this.onscreen();\n }\n }\n\n // Custom Events\n\n ready() {\n // debugger\n this._ready = true;\n Figure.marginObserver.unobserve(this);\n const event = new CustomEvent('ready');\n this.dispatchEvent(event);\n }\n\n onscreen() {\n this._onscreen = true;\n this._offscreen = false;\n const event = new CustomEvent('onscreen');\n this.dispatchEvent(event);\n }\n\n offscreen() {\n this._onscreen = false;\n this._offscreen = true;\n const event = new CustomEvent('offscreen');\n this.dispatchEvent(event);\n }\n\n }\n\n if (typeof window !== 'undefined') {\n\n Figure.isScrolling = false;\n let timeout;\n const resetTimer = () => {\n Figure.isScrolling = true;\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n Figure.isScrolling = false;\n Figure.runReadyQueue();\n }, 500);\n };\n window.addEventListener('scroll', resetTimer, true);\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n // This overlay is not secure.\n // It is only meant as a social deterrent.\n\n const productionHostname = 'distill.pub';\n const T$9 = Template('d-interstitial', `\n\n\n
      \n
      \n

      This article is in review.

      \n

      Do not share this URL or the contents of this article. Thank you!

      \n \n

      Enter the password we shared with you as part of the review process to view the article.

      \n
      \n
      \n`);\n\n class Interstitial extends T$9(HTMLElement) {\n\n connectedCallback() {\n if (this.shouldRemoveSelf()) {\n this.parentElement.removeChild(this);\n } else {\n const passwordInput = this.root.querySelector('#interstitial-password-input');\n passwordInput.oninput = (event) => this.passwordChanged(event);\n }\n }\n\n passwordChanged(event) {\n const entered = event.target.value;\n if (entered === this.password) {\n console.log('Correct password entered.');\n this.parentElement.removeChild(this);\n if (typeof(Storage) !== 'undefined') {\n console.log('Saved that correct password was entered.');\n localStorage.setItem(this.localStorageIdentifier(), 'true');\n }\n }\n }\n\n shouldRemoveSelf() {\n // should never be visible in production\n if (window && window.location.hostname === productionHostname) {\n console.warn('Interstitial found on production, hiding it.');\n return true\n }\n // should only have to enter password once\n if (typeof(Storage) !== 'undefined') {\n if (localStorage.getItem(this.localStorageIdentifier()) === 'true') {\n console.log('Loaded that correct password was entered before; skipping interstitial.');\n return true;\n }\n }\n // otherwise, leave visible\n return false;\n }\n\n localStorageIdentifier() {\n const prefix = 'distill-drafts';\n const suffix = 'interstitial-password-correct';\n return prefix + (window ? window.location.pathname : '-') + suffix\n }\n\n }\n\n function ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n }\n\n function bisector(compare) {\n if (compare.length === 1) compare = ascendingComparator(compare);\n return {\n left: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n },\n right: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n };\n }\n\n function ascendingComparator(f) {\n return function(d, x) {\n return ascending(f(d), x);\n };\n }\n\n var ascendingBisect = bisector(ascending);\n var bisectRight = ascendingBisect.right;\n\n function range(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n }\n\n var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\n function ticks(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n start = Math.ceil(start / step);\n stop = Math.floor(stop / step);\n ticks = new Array(n = Math.ceil(stop - start + 1));\n while (++i < n) ticks[i] = (start + i) * step;\n } else {\n start = Math.floor(start * step);\n stop = Math.ceil(stop * step);\n ticks = new Array(n = Math.ceil(start - stop + 1));\n while (++i < n) ticks[i] = (start - i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n }\n\n function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n }\n\n function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n }\n\n function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n }\n\n function define(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n }\n\n function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n }\n\n function Color() {}\n\n var darker = 0.7;\n var brighter = 1 / darker;\n\n var reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\n var named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n };\n\n define(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n });\n\n function color_formatHex() {\n return this.rgb().formatHex();\n }\n\n function color_formatHsl() {\n return hslConvert(this).formatHsl();\n }\n\n function color_formatRgb() {\n return this.rgb().formatRgb();\n }\n\n function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n }\n\n function rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n }\n\n function rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n }\n\n function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n }\n\n function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n }\n\n function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n }\n\n define(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n }));\n\n function rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n }\n\n function rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n\n function hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n }\n\n function hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n }\n\n function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n }\n\n function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n }\n\n function Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n }\n\n define(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n }));\n\n /* From FvD 13.37, CSS Color Module Level 3 */\n function hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n }\n\n var deg2rad = Math.PI / 180;\n var rad2deg = 180 / Math.PI;\n\n // https://observablehq.com/@mbostock/lab-and-rgb\n var K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\n function labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n }\n\n function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n }\n\n function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n }\n\n define(Lab, lab, extend(Color, {\n brighter: function(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker: function(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb: function() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n }));\n\n function xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n }\n\n function lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n }\n\n function lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n }\n\n function rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n }\n\n function hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * rad2deg;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n }\n\n function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n }\n\n function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n }\n\n function hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * deg2rad;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n }\n\n define(Hcl, hcl, extend(Color, {\n brighter: function(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker: function(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb: function() {\n return hcl2lab(this).rgb();\n }\n }));\n\n var A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\n function cubehelixConvert(o) {\n if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n bl = b - l,\n k = (E * (g - l) - C * bl) / D,\n s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n }\n\n function cubehelix(h, s, l, opacity) {\n return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n }\n\n function Cubehelix(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n }\n\n define(Cubehelix, cubehelix, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n l = +this.l,\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh)),\n this.opacity\n );\n }\n }));\n\n function constant(x) {\n return function() {\n return x;\n };\n }\n\n function linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n }\n\n function exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n }\n\n function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n }\n\n function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n }\n\n var rgb$1 = (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb$1(start, end) {\n var r = color((start = rgb(start)).r, (end = rgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb$1.gamma = rgbGamma;\n\n return rgb$1;\n })(1);\n\n function numberArray(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n }\n\n function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n }\n\n function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = interpolate(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n }\n\n function date(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n }\n\n function interpolateNumber(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n }\n\n function object(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = interpolate(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n }\n\n var reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\n function zero(b) {\n return function() {\n return b;\n };\n }\n\n function one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n }\n\n function string(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: interpolateNumber(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n }\n\n function interpolate(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? interpolateNumber\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb$1) : string)\n : b instanceof color ? rgb$1\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : interpolateNumber)(a, b);\n }\n\n function interpolateRound(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n }\n\n function constant$1(x) {\n return function() {\n return x;\n };\n }\n\n function number(x) {\n return +x;\n }\n\n var unit = [0, 1];\n\n function identity(x) {\n return x;\n }\n\n function normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant$1(isNaN(b) ? NaN : 0.5);\n }\n\n function clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n }\n\n // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\n function bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n }\n\n function polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisectRight(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n }\n\n function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n }\n\n function transformer() {\n var domain = unit,\n range = unit,\n interpolate$1 = interpolate,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate$1 = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n }\n\n function continuous() {\n return transformer()(identity, identity);\n }\n\n // Computes the decimal coefficient and exponent of the specified number x with\n // significant digits p, where x is positive and p is in [1, 21] or undefined.\n // For example, formatDecimal(1.23) returns [\"123\", 0].\n function formatDecimal(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n }\n\n function exponent(x) {\n return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;\n }\n\n function formatGroup(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n }\n\n function formatNumerals(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n }\n\n // [[fill]align][sign][symbol][0][width][,][.precision][~][type]\n var re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\n function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n }\n\n formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\n function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n }\n\n FormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n };\n\n // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\n function formatTrim(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n }\n\n var prefixExponent;\n\n function formatPrefixAuto(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n }\n\n function formatRounded(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n }\n\n var formatTypes = {\n \"%\": function(x, p) { return (x * 100).toFixed(p); },\n \"b\": function(x) { return Math.round(x).toString(2); },\n \"c\": function(x) { return x + \"\"; },\n \"d\": function(x) { return Math.round(x).toString(10); },\n \"e\": function(x, p) { return x.toExponential(p); },\n \"f\": function(x, p) { return x.toFixed(p); },\n \"g\": function(x, p) { return x.toPrecision(p); },\n \"o\": function(x) { return Math.round(x).toString(8); },\n \"p\": function(x, p) { return formatRounded(x * 100, p); },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n \"x\": function(x) { return Math.round(x).toString(16); }\n };\n\n function identity$1(x) {\n return x;\n }\n\n var map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\n function formatLocale(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity$1 : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity$1 : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n }\n\n var locale;\n var format;\n var formatPrefix;\n\n defaultLocale({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"],\n minus: \"-\"\n });\n\n function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n }\n\n function precisionFixed(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n }\n\n function precisionPrefix(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n }\n\n function precisionRound(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n }\n\n function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n }\n\n function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain(),\n i0 = 0,\n i1 = d.length - 1,\n start = d[i0],\n stop = d[i1],\n step;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n\n step = tickIncrement(start, stop, count);\n\n if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n step = tickIncrement(start, stop, count);\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n step = tickIncrement(start, stop, count);\n }\n\n if (step > 0) {\n d[i0] = Math.floor(start / step) * step;\n d[i1] = Math.ceil(stop / step) * step;\n domain(d);\n } else if (step < 0) {\n d[i0] = Math.ceil(start * step) / step;\n d[i1] = Math.floor(stop * step) / step;\n domain(d);\n }\n\n return scale;\n };\n\n return scale;\n }\n\n function linear$1() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear$1());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n }\n\n var t0$1 = new Date,\n t1$1 = new Date;\n\n function newInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = function(date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function(date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [], previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = function(start, end) {\n t0$1.setTime(+start), t1$1.setTime(+end);\n floori(t0$1), floori(t1$1);\n return Math.floor(count(t0$1, t1$1));\n };\n\n interval.every = function(step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? function(d) { return field(d) % step === 0; }\n : function(d) { return interval.count(0, d) % step === 0; });\n };\n }\n\n return interval;\n }\n\n var millisecond = newInterval(function() {\n // noop\n }, function(date, step) {\n date.setTime(+date + step);\n }, function(start, end) {\n return end - start;\n });\n\n // An optimized implementation for this simple case.\n millisecond.every = function(k) {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return newInterval(function(date) {\n date.setTime(Math.floor(date / k) * k);\n }, function(date, step) {\n date.setTime(+date + step * k);\n }, function(start, end) {\n return (end - start) / k;\n });\n };\n\n var durationSecond = 1e3;\n var durationMinute = 6e4;\n var durationHour = 36e5;\n var durationDay = 864e5;\n var durationWeek = 6048e5;\n\n var second = newInterval(function(date) {\n date.setTime(date - date.getMilliseconds());\n }, function(date, step) {\n date.setTime(+date + step * durationSecond);\n }, function(start, end) {\n return (end - start) / durationSecond;\n }, function(date) {\n return date.getUTCSeconds();\n });\n\n var minute = newInterval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n }, function(date, step) {\n date.setTime(+date + step * durationMinute);\n }, function(start, end) {\n return (end - start) / durationMinute;\n }, function(date) {\n return date.getMinutes();\n });\n\n var hour = newInterval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n }, function(date, step) {\n date.setTime(+date + step * durationHour);\n }, function(start, end) {\n return (end - start) / durationHour;\n }, function(date) {\n return date.getHours();\n });\n\n var day = newInterval(function(date) {\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n }, function(date) {\n return date.getDate() - 1;\n });\n\n function weekday(i) {\n return newInterval(function(date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n }\n\n var sunday = weekday(0);\n var monday = weekday(1);\n var tuesday = weekday(2);\n var wednesday = weekday(3);\n var thursday = weekday(4);\n var friday = weekday(5);\n var saturday = weekday(6);\n\n var month = newInterval(function(date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setMonth(date.getMonth() + step);\n }, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n }, function(date) {\n return date.getMonth();\n });\n\n var year = newInterval(function(date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n }, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n }, function(date) {\n return date.getFullYear();\n });\n\n // An optimized implementation for this simple case.\n year.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n };\n\n var utcMinute = newInterval(function(date) {\n date.setUTCSeconds(0, 0);\n }, function(date, step) {\n date.setTime(+date + step * durationMinute);\n }, function(start, end) {\n return (end - start) / durationMinute;\n }, function(date) {\n return date.getUTCMinutes();\n });\n\n var utcHour = newInterval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n }, function(date, step) {\n date.setTime(+date + step * durationHour);\n }, function(start, end) {\n return (end - start) / durationHour;\n }, function(date) {\n return date.getUTCHours();\n });\n\n var utcDay = newInterval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n }, function(start, end) {\n return (end - start) / durationDay;\n }, function(date) {\n return date.getUTCDate() - 1;\n });\n\n function utcWeekday(i) {\n return newInterval(function(date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / durationWeek;\n });\n }\n\n var utcSunday = utcWeekday(0);\n var utcMonday = utcWeekday(1);\n var utcTuesday = utcWeekday(2);\n var utcWednesday = utcWeekday(3);\n var utcThursday = utcWeekday(4);\n var utcFriday = utcWeekday(5);\n var utcSaturday = utcWeekday(6);\n\n var utcMonth = newInterval(function(date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n }, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n }, function(date) {\n return date.getUTCMonth();\n });\n\n var utcYear = newInterval(function(date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n }, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n }, function(date) {\n return date.getUTCFullYear();\n });\n\n // An optimized implementation for this simple case.\n utcYear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n };\n\n function localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n }\n\n function utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n }\n\n function newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n }\n\n function formatLocale$1(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day$1;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day$1 = week.getUTCDay();\n week = day$1 > 4 || day$1 === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day$1 = week.getDay();\n week = day$1 > 4 || day$1 === 0 ? monday.ceil(week) : monday(week);\n week = day.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day$1 = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day$1 + 5) % 7 : d.w + d.U * 7 - (day$1 + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n }\n\n var pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\n function pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n }\n\n function requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n }\n\n function formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n }\n\n function formatLookup(names) {\n var map = {}, i = -1, n = names.length;\n while (++i < n) map[names[i].toLowerCase()] = i;\n return map;\n }\n\n function parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n }\n\n function parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n }\n\n function parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n }\n\n function parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n }\n\n function parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n }\n\n function parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n }\n\n function parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n }\n\n function parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n }\n\n function parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n }\n\n function parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n }\n\n function parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n }\n\n function parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n }\n\n function parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n }\n\n function parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n }\n\n function parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n }\n\n function parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n }\n\n function formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n }\n\n function formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n }\n\n function formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n }\n\n function formatDayOfYear(d, p) {\n return pad(1 + day.count(year(d), d), p, 3);\n }\n\n function formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n }\n\n function formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n }\n\n function formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n }\n\n function formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n }\n\n function formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n }\n\n function formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n }\n\n function formatWeekNumberSunday(d, p) {\n return pad(sunday.count(year(d) - 1, d), p, 2);\n }\n\n function formatWeekNumberISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d);\n return pad(thursday.count(year(d), d) + (year(d).getDay() === 4), p, 2);\n }\n\n function formatWeekdayNumberSunday(d) {\n return d.getDay();\n }\n\n function formatWeekNumberMonday(d, p) {\n return pad(monday.count(year(d) - 1, d), p, 2);\n }\n\n function formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n }\n\n function formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n }\n\n function formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n }\n\n function formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n }\n\n function formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n }\n\n function formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n }\n\n function formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n }\n\n function formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n }\n\n function formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n }\n\n function formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n }\n\n function formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n }\n\n function formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n }\n\n function formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n }\n\n function formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n }\n\n function formatUTCWeekNumberISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n }\n\n function formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n }\n\n function formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n }\n\n function formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n }\n\n function formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n }\n\n function formatUTCZone() {\n return \"+0000\";\n }\n\n function formatLiteralPercent() {\n return \"%\";\n }\n\n function formatUnixTimestamp(d) {\n return +d;\n }\n\n function formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n }\n\n var locale$1;\n var timeFormat;\n var timeParse;\n var utcFormat;\n var utcParse;\n\n defaultLocale$1({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n });\n\n function defaultLocale$1(definition) {\n locale$1 = formatLocale$1(definition);\n timeFormat = locale$1.format;\n timeParse = locale$1.parse;\n utcFormat = locale$1.utcFormat;\n utcParse = locale$1.utcParse;\n return locale$1;\n }\n\n var isoSpecifier = \"%Y-%m-%dT%H:%M:%S.%LZ\";\n\n function formatIsoNative(date) {\n return date.toISOString();\n }\n\n var formatIso = Date.prototype.toISOString\n ? formatIsoNative\n : utcFormat(isoSpecifier);\n\n function parseIsoNative(string) {\n var date = new Date(string);\n return isNaN(date) ? null : date;\n }\n\n var parseIso = +new Date(\"2000-01-01T00:00:00.000Z\")\n ? parseIsoNative\n : utcParse(isoSpecifier);\n\n var noop = {value: function() {}};\n\n function dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n }\n\n function Dispatch(_) {\n this._ = _;\n }\n\n function parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n }\n\n Dispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n };\n\n function get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n }\n\n function set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n }\n\n var xhtml = \"http://www.w3.org/1999/xhtml\";\n\n var namespaces = {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n };\n\n function namespace(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name;\n }\n\n function creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n }\n\n function creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n }\n\n function creator(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n }\n\n function none() {}\n\n function selector(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n }\n\n function selection_select(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n }\n\n function empty() {\n return [];\n }\n\n function selectorAll(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n }\n\n function selection_selectAll(select) {\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n }\n\n function matcher(selector) {\n return function() {\n return this.matches(selector);\n };\n }\n\n function selection_filter(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n }\n\n function sparse(update) {\n return new Array(update.length);\n }\n\n function selection_enter() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n }\n\n function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n }\n\n EnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n };\n\n function constant$2(x) {\n return function() {\n return x;\n };\n }\n\n var keyPrefix = \"$\"; // Protect against keys like “__proto__”.\n\n function bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n }\n\n function bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = {},\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n if (keyValue in nodeByKeyValue) {\n exit[i] = node;\n } else {\n nodeByKeyValue[keyValue] = node;\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = keyPrefix + key.call(parent, data[i], i, data);\n if (node = nodeByKeyValue[keyValue]) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue[keyValue] = null;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n exit[i] = node;\n }\n }\n }\n\n function selection_data(value, key) {\n if (!value) {\n data = new Array(this.size()), j = -1;\n this.each(function(d) { data[++j] = d; });\n return data;\n }\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant$2(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = value.call(parent, parent && parent.__data__, j, parents),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n }\n\n function selection_exit() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n }\n\n function selection_join(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n if (onupdate != null) update = onupdate(update);\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n }\n\n function selection_merge(selection) {\n\n 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) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n }\n\n function selection_order() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n }\n\n function selection_sort(compare) {\n if (!compare) compare = ascending$1;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n }\n\n function ascending$1(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n }\n\n function selection_call() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n }\n\n function selection_nodes() {\n var nodes = new Array(this.size()), i = -1;\n this.each(function() { nodes[++i] = this; });\n return nodes;\n }\n\n function selection_node() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n }\n\n function selection_size() {\n var size = 0;\n this.each(function() { ++size; });\n return size;\n }\n\n function selection_empty() {\n return !this.node();\n }\n\n function selection_each(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n }\n\n function attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n }\n\n function attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n }\n\n function attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n }\n\n function attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n }\n\n function attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n }\n\n function attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n }\n\n function selection_attr(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n }\n\n function defaultView(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n }\n\n function styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n }\n\n function styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n }\n\n function styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n }\n\n function selection_style(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n }\n\n function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n }\n\n function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n }\n\n function propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n }\n\n function propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n }\n\n function selection_property(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n }\n\n function classArray(string) {\n return string.trim().split(/^|\\s+/);\n }\n\n function classList(node) {\n return node.classList || new ClassList(node);\n }\n\n function ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n }\n\n ClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n };\n\n function classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n }\n\n function classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n }\n\n function classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n }\n\n function classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n }\n\n function classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n }\n\n function selection_classed(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n }\n\n function textRemove() {\n this.textContent = \"\";\n }\n\n function textConstant(value) {\n return function() {\n this.textContent = value;\n };\n }\n\n function textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n }\n\n function selection_text(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n }\n\n function htmlRemove() {\n this.innerHTML = \"\";\n }\n\n function htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n }\n\n function htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n }\n\n function selection_html(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n }\n\n function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n }\n\n function selection_raise() {\n return this.each(raise);\n }\n\n function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n }\n\n function selection_lower() {\n return this.each(lower);\n }\n\n function selection_append(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n }\n\n function constantNull() {\n return null;\n }\n\n function selection_insert(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n }\n\n function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n }\n\n function selection_remove() {\n return this.each(remove);\n }\n\n function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n }\n\n function selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n }\n\n function selection_clone(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n }\n\n function selection_datum(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n }\n\n var filterEvents = {};\n\n var event = null;\n\n if (typeof document !== \"undefined\") {\n var element = document.documentElement;\n if (!(\"onmouseenter\" in element)) {\n filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n }\n }\n\n function filterContextListener(listener, index, group) {\n listener = contextListener(listener, index, group);\n return function(event) {\n var related = event.relatedTarget;\n if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n listener.call(this, event);\n }\n };\n }\n\n function contextListener(listener, index, group) {\n return function(event1) {\n var event0 = event; // Events can be reentrant (e.g., focus).\n event = event1;\n try {\n listener.call(this, this.__data__, index, group);\n } finally {\n event = event0;\n }\n };\n }\n\n function parseTypenames$1(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n }\n\n function onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.capture);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n }\n\n function onAdd(typename, value, capture) {\n var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n return function(d, i, group) {\n var on = this.__on, o, listener = wrap(value, i, group);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.capture);\n this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, capture);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n }\n\n function selection_on(typename, value, capture) {\n var typenames = parseTypenames$1(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n if (capture == null) capture = false;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n return this;\n }\n\n function customEvent(event1, listener, that, args) {\n var event0 = event;\n event1.sourceEvent = event;\n event = event1;\n try {\n return listener.apply(that, args);\n } finally {\n event = event0;\n }\n }\n\n function dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n }\n\n function dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n }\n\n function dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n }\n\n function selection_dispatch(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n }\n\n var root = [null];\n\n function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n }\n\n function selection() {\n return new Selection([[document.documentElement]], root);\n }\n\n Selection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch\n };\n\n function select(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n }\n\n function sourceEvent() {\n var current = event, source;\n while (source = current.sourceEvent) current = source;\n return current;\n }\n\n function point(node, event) {\n var svg = node.ownerSVGElement || node;\n\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n\n function mouse(node) {\n var event = sourceEvent();\n if (event.changedTouches) event = event.changedTouches[0];\n return point(node, event);\n }\n\n function touch(node, touches, identifier) {\n if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches;\n\n for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {\n if ((touch = touches[i]).identifier === identifier) {\n return point(node, touch);\n }\n }\n\n return null;\n }\n\n function nopropagation() {\n event.stopImmediatePropagation();\n }\n\n function noevent() {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n\n function nodrag(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, true);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, true);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n }\n\n function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, true);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n }\n\n function constant$3(x) {\n return function() {\n return x;\n };\n }\n\n function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {\n this.target = target;\n this.type = type;\n this.subject = subject;\n this.identifier = id;\n this.active = active;\n this.x = x;\n this.y = y;\n this.dx = dx;\n this.dy = dy;\n this._ = dispatch;\n }\n\n DragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n };\n\n // Ignore right-click, since that should open the context menu.\n function defaultFilter() {\n return !event.ctrlKey && !event.button;\n }\n\n function defaultContainer() {\n return this.parentNode;\n }\n\n function defaultSubject(d) {\n return d == null ? {x: event.x, y: event.y} : d;\n }\n\n function defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n }\n\n function drag() {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection\n .on(\"mousedown.drag\", mousedowned)\n .filter(touchable)\n .on(\"touchstart.drag\", touchstarted)\n .on(\"touchmove.drag\", touchmoved)\n .on(\"touchend.drag touchcancel.drag\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned() {\n if (touchending || !filter.apply(this, arguments)) return;\n var gesture = beforestart(\"mouse\", container.apply(this, arguments), mouse, this, arguments);\n if (!gesture) return;\n select(event.view).on(\"mousemove.drag\", mousemoved, true).on(\"mouseup.drag\", mouseupped, true);\n nodrag(event.view);\n nopropagation();\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\");\n }\n\n function mousemoved() {\n noevent();\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\");\n }\n\n function mouseupped() {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent();\n gestures.mouse(\"end\");\n }\n\n function touchstarted() {\n if (!filter.apply(this, arguments)) return;\n var touches = event.changedTouches,\n c = container.apply(this, arguments),\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) {\n nopropagation();\n gesture(\"start\");\n }\n }\n }\n\n function touchmoved() {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent();\n gesture(\"drag\");\n }\n }\n }\n\n function touchended() {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation();\n gesture(\"end\");\n }\n }\n }\n\n function beforestart(id, container, point, that, args) {\n var p = point(container, id), s, dx, dy,\n sublisteners = listeners.copy();\n\n if (!customEvent(new DragEvent(drag, \"beforestart\", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {\n if ((event.subject = s = subject.apply(that, args)) == null) return false;\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n return true;\n })) return;\n\n return function gesture(type) {\n var p0 = p, n;\n switch (type) {\n case \"start\": gestures[id] = gesture, n = active++; break;\n case \"end\": delete gestures[id], --active; // nobreak\n case \"drag\": p = point(container, id), n = active; break;\n }\n customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);\n };\n }\n\n drag.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant$3(!!_), drag) : filter;\n };\n\n drag.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant$3(_), drag) : container;\n };\n\n drag.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant$3(_), drag) : subject;\n };\n\n drag.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant$3(!!_), drag) : touchable;\n };\n\n drag.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const T$a = Template('d-slider', `\n\n\n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n
      \n`);\n\n // ARIA\n // If the slider has a visible label, it is referenced by aria-labelledby on the slider element. Otherwise, the slider element has a label provided by aria-label.\n // If the slider is vertically oriented, it has aria-orientation set to vertical. The default value of aria-orientation for a slider is horizontal.\n\n const keyCodes = {\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n pageUp: 33,\n pageDown: 34,\n end: 35,\n home: 36\n };\n\n class Slider extends T$a(HTMLElement) {\n\n\n connectedCallback() {\n this.connected = true;\n this.setAttribute('role', 'slider');\n // Makes the element tab-able.\n if (!this.hasAttribute('tabindex')) { this.setAttribute('tabindex', 0); }\n\n // Keeps track of keyboard vs. mouse interactions for focus rings\n this.mouseEvent = false;\n\n // Handles to shadow DOM elements\n this.knob = this.root.querySelector('.knob-container');\n this.background = this.root.querySelector('.background');\n this.trackFill = this.root.querySelector('.track-fill');\n this.track = this.root.querySelector('.track');\n\n // Default values for attributes\n this.min = this.min ? this.min : 0;\n this.max = this.max ? this.max : 100;\n this.scale = linear$1().domain([this.min, this.max]).range([0, 1]).clamp(true);\n\n this.origin = this.origin !== undefined ? this.origin : this.min;\n this.step = this.step ? this.step : 1;\n this.update(this.value ? this.value : 0);\n\n this.ticks = this.ticks ? this.ticks : false;\n this.renderTicks();\n\n this.drag = drag()\n .container(this.background)\n .on('start', () => {\n this.mouseEvent = true;\n this.background.classList.add('mousedown');\n this.changeValue = this.value;\n this.dragUpdate();\n })\n .on('drag', () => {\n this.dragUpdate();\n })\n .on('end', () => {\n this.mouseEvent = false;\n this.background.classList.remove('mousedown');\n this.dragUpdate();\n if (this.changeValue !== this.value) this.dispatchChange();\n this.changeValue = this.value;\n });\n this.drag(select(this.background));\n\n this.addEventListener('focusin', () => {\n if(!this.mouseEvent) {\n this.background.classList.add('focus');\n }\n });\n this.addEventListener('focusout', () => {\n this.background.classList.remove('focus');\n });\n this.addEventListener('keydown', this.onKeyDown);\n\n }\n\n static get observedAttributes() {return ['min', 'max', 'value', 'step', 'ticks', 'origin', 'tickValues', 'tickLabels']; }\n\n attributeChangedCallback(attr, oldValue, newValue) {\n if (isNaN(newValue) || newValue === undefined || newValue === null) return;\n if (attr == 'min') {\n this.min = +newValue;\n this.setAttribute('aria-valuemin', this.min);\n }\n if (attr == 'max') {\n this.max = +newValue;\n this.setAttribute('aria-valuemax', this.max);\n }\n if (attr == 'value') {\n this.update(+newValue);\n }\n if (attr == 'origin') {\n this.origin = +newValue;\n // this.update(this.value);\n }\n if (attr == 'step') {\n if (newValue > 0) {\n this.step = +newValue;\n }\n }\n if (attr == 'ticks') {\n this.ticks = (newValue === '' ? true : newValue);\n }\n }\n\n onKeyDown(event) {\n this.changeValue = this.value;\n let stopPropagation = false;\n switch (event.keyCode) {\n case keyCodes.left:\n case keyCodes.down:\n this.update(this.value - this.step);\n stopPropagation = true;\n break;\n case keyCodes.right:\n case keyCodes.up:\n this.update(this.value + this.step);\n stopPropagation = true;\n break;\n case keyCodes.pageUp:\n this.update(this.value + this.step * 10);\n stopPropagation = true;\n break;\n\n case keyCodes.pageDown:\n this.update(this.value + this.step * 10);\n stopPropagation = true;\n break;\n case keyCodes.home:\n this.update(this.min);\n stopPropagation = true;\n break;\n case keyCodes.end:\n this.update(this.max);\n stopPropagation = true;\n break;\n }\n if (stopPropagation) {\n this.background.classList.add('focus');\n event.preventDefault();\n event.stopPropagation();\n if (this.changeValue !== this.value) this.dispatchChange();\n }\n }\n\n validateValueRange(min, max, value) {\n return Math.max(Math.min(max, value), min);\n }\n\n quantizeValue(value, step) {\n return Math.round(value / step) * step;\n }\n\n dragUpdate() {\n const bbox = this.background.getBoundingClientRect();\n const x = event.x;\n const width = bbox.width;\n this.update(this.scale.invert(x / width));\n }\n\n update(value) {\n let v = value;\n if (this.step !== 'any') {\n v = this.quantizeValue(value, this.step);\n }\n v = this.validateValueRange(this.min, this.max, v);\n if (this.connected) {\n this.knob.style.left = this.scale(v) * 100 + '%';\n this.trackFill.style.width = this.scale(this.min + Math.abs(v - this.origin)) * 100 + '%';\n this.trackFill.style.left = this.scale(Math.min(v, this.origin)) * 100 + '%';\n }\n if (this.value !== v) {\n this.value = v;\n this.setAttribute('aria-valuenow', this.value);\n this.dispatchInput();\n }\n }\n\n // Dispatches only on a committed change (basically only on mouseup).\n dispatchChange() {\n const e = new Event('change');\n this.dispatchEvent(e, {});\n }\n\n // Dispatches on each value change.\n dispatchInput() {\n const e = new Event('input');\n this.dispatchEvent(e, {});\n }\n\n renderTicks() {\n const ticksContainer = this.root.querySelector('.ticks');\n if (this.ticks !== false) {\n let tickData = [];\n if (this.ticks > 0) {\n tickData = this.scale.ticks(this.ticks);\n } else if (this.step === 'any') {\n tickData = this.scale.ticks();\n } else {\n tickData = range(this.min, this.max + 1e-6, this.step);\n }\n tickData.forEach(d => {\n const tick = document.createElement('div');\n tick.classList.add('tick');\n tick.style.left = this.scale(d) * 100 + '%';\n ticksContainer.appendChild(tick);\n });\n } else {\n ticksContainer.style.display = 'none';\n }\n }\n }\n\n var logo = \"\\n \\n\\n\";\n\n const headerTemplate = `\n\n\n`;\n\n // Copyright 2018 The Distill Template Authors\n\n const T$b = Template('distill-header', headerTemplate, false);\n\n class DistillHeader extends T$b(HTMLElement) {\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n const styles$2 = `\n\n`;\n\n function appendixTemplate(frontMatter) {\n let html = styles$2;\n\n if (typeof frontMatter.githubUrl !== 'undefined') {\n html += `\n

      Updates and Corrections

      \n

      `;\n if (frontMatter.githubCompareUpdatesUrl) {\n html += `View all changes to this article since it was first published.`;\n }\n html += `\n If you see mistakes or want to suggest changes, please create an issue on GitHub.

      \n `;\n }\n\n const journal = frontMatter.journal;\n if (typeof journal !== 'undefined' && journal.title === 'Distill') {\n html += `\n

      Reuse

      \n

      Diagrams and text are licensed under Creative Commons Attribution CC-BY 4.0 with the source available on GitHub, unless noted otherwise. The figures that have been reused from other sources don’t fall under this license and can be recognized by a note in their caption: “Figure from …”.

      \n `;\n }\n\n if (typeof frontMatter.publishedDate !== 'undefined') {\n html += `\n

      Citation

      \n

      For attribution in academic contexts, please cite this work as

      \n
      ${frontMatter.concatenatedAuthors}, \"${frontMatter.title}\", Distill, ${frontMatter.publishedYear}.
      \n

      BibTeX citation

      \n
      ${serializeFrontmatterToBibtex(frontMatter)}
      \n `;\n }\n\n return html;\n }\n\n class DistillAppendix extends HTMLElement {\n\n static get is() { return 'distill-appendix'; }\n\n set frontMatter(frontMatter) {\n this.innerHTML = appendixTemplate(frontMatter);\n }\n\n }\n\n const footerTemplate = `\n\n\n\n\n`;\n\n // Copyright 2018 The Distill Template Authors\n\n const T$c = Template('distill-footer', footerTemplate);\n\n class DistillFooter extends T$c(HTMLElement) {\n\n }\n\n // Copyright 2018 The Distill Template Authors\n\n let templateIsLoading = false;\n let runlevel = 0;\n const initialize = function() {\n if (window.distill.runlevel < 1) {\n throw new Error(\"Insufficient Runlevel for Distill Template!\");\n }\n\n /* 1. Flag that we're being loaded */\n if (\"distill\" in window && window.distill.templateIsLoading) {\n throw new Error(\n \"Runlevel 1: Distill Template is getting loaded more than once, aborting!\"\n );\n } else {\n window.distill.templateIsLoading = true;\n console.debug(\"Runlevel 1: Distill Template has started loading.\");\n }\n\n /* 2. Add styles if they weren't added during prerendering */\n makeStyleTag(document);\n console.debug(\"Runlevel 1: Static Distill styles have been added.\");\n console.debug(\"Runlevel 1->2.\");\n window.distill.runlevel += 1;\n\n /* 3. Register Controller listener functions */\n /* Needs to happen before components to their connected callbacks have a controller to talk to. */\n for (const [functionName, callback] of Object.entries(Controller.listeners)) {\n if (typeof callback === \"function\") {\n document.addEventListener(functionName, callback);\n } else {\n console.error(\"Runlevel 2: Controller listeners need to be functions!\");\n }\n }\n console.debug(\"Runlevel 2: We can now listen to controller events.\");\n console.debug(\"Runlevel 2->3.\");\n window.distill.runlevel += 1;\n\n /* 4. Register components */\n const components = [\n Abstract, Appendix, Article, Bibliography, Byline, Cite, CitationList, Code,\n Footnote, FootnoteList, FrontMatter$1, HoverBox, Title, DMath, References, TOC, Figure,\n Slider, Interstitial\n ];\n\n const distillComponents = [DistillHeader, DistillAppendix, DistillFooter];\n\n if (window.distill.runlevel < 2) {\n throw new Error(\"Insufficient Runlevel for adding custom elements!\");\n }\n const allComponents = components.concat(distillComponents);\n for (const component of allComponents) {\n console.debug(\"Runlevel 2: Registering custom element: \" + component.is);\n customElements.define(component.is, component);\n }\n\n console.debug(\n \"Runlevel 3: Distill Template finished registering custom elements.\"\n );\n console.debug(\"Runlevel 3->4.\");\n window.distill.runlevel += 1;\n\n // If template was added after DOMContentLoaded we may have missed that event.\n // Controller will check for that case, so trigger the event explicitly:\n if (domContentLoaded()) {\n Controller.listeners.DOMContentLoaded();\n }\n\n console.debug(\"Runlevel 4: Distill Template initialisation complete.\");\n window.distill.templateIsLoading = false;\n window.distill.templateHasLoaded = true;\n };\n\n window.distill = { runlevel, initialize, templateIsLoading };\n\n /* 0. Check browser feature support; synchronously polyfill if needed */\n if (Polyfills.browserSupportsAllFeatures()) {\n console.debug(\"Runlevel 0: No need for polyfills.\");\n console.debug(\"Runlevel 0->1.\");\n window.distill.runlevel += 1;\n window.distill.initialize();\n } else {\n console.debug(\"Runlevel 0: Distill Template is loading polyfills.\");\n Polyfills.load(window.distill.initialize);\n }\n\n})));\n//# sourceMappingURL=template.v2.js.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","","// startup\n// Load entry module and return exports\n// This entry module used 'module' so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(792);\n",""],"names":["factory","define","amd","days","months","zeroPad","n","RFC","date","day","getDay","substring","paddedDate","getDate","month","getMonth","year","getFullYear","toString","hours","getUTCHours","minutes","getUTCMinutes","seconds","getUTCSeconds","concat","objectFromMap","map","object","Array","from","reduce","_ref","_ref2","_slicedToArray","key","value","Object","assign","_defineProperty","mapFromObject","Map","property","hasOwnProperty","set","Author","_classCallCheck","name","author","personalURL","authorURL","affiliation","affiliationURL","affiliations","_createClass","get","names","split","slice","length","join","mergeFromYMLFrontmatter","target","source","title","published","Date","publishedDate","constructor","String","console","error","description","authors","authorObject","katex","password","doi","FrontMatter","bibliography","bibliographyParsed","citations","citationsCollected","journal","undefined","_url","distillPath","url","githubPath","_previewURL","updatedDate","toISOString","volume","publishedYear","Error","lastName","firstName","slug","toLowerCase","_this","citationKey","entry","_bibliography","_typeof","assignToObject","bibliographyEntries","githubUrl","previewURL","issue","publishedDateRFC","publishedMonth","publishedDay","publishedMonthPadded","publishedDayPadded","updatedDateRFC","concatenatedAuthors","bibtexAuthors","fromObject","frontMatter","Mutating","superclass","_superclass","_class","_this2","_callSuper","options","childList","characterData","subtree","observer","MutationObserver","disconnect","renderIfPossible","observe","_inherits","connectedCallback","_superPropGet","textContent","root","renderContent","Template","templateString","useShadow","arguments","template","document","createElement","innerHTML","window","ShadyCSS","prepareTemplate","_superclass2","_class2","_this3","clone","importNode","content","attachShadow","mode","shadowRoot","appendChild","hasAttribute","styleElement","insertBefore","firstChild","$","query","querySelector","$$","querySelectorAll","math","findEndOfMath","delimiter","text","startIndex","index","braceLevel","delimLength","character","splitAtDelimiters","startData","leftDelim","rightDelim","display","finalData","i","type","data","lookingForLeft","currIndex","nextIndex","indexOf","push","rawData","splitWithDelimiters","delimiters","left","right","renderMathInText","optionsCopy","fragment","createDocumentFragment","createTextNode","tag","displayMode","setAttribute","e","ParseError","errorCallback","renderElem","elem","childNodes","childNode","nodeType","mightHaveMath","frag","replaceChild","shouldRender","ignoredTags","nodeName","defaultAutoRenderOptions","msg","err","renderMathInElement","delimiterStrings","flatMap","d","some","katexJSURL","katexCSSTag","T","DMath","_Mutating","localOptions","katexOptions","katexAdded","addKatex","container","render","_katexOptions","katexLoadedCallback","mathTags","_iterator","_createForOfIteratorHelper","_step","s","done","mathTag","f","body","head","insertAdjacentHTML","scriptTag","src","async","onload","crossorigin","HTMLElement","inlineMathRendered","collect_citations","dom","Set","citeTags","_iterator2","_step2","keyString","getAttribute","keys","k","trim","_iterator3","_step3","add","_toConsumableArray","author_string","ent","sep","finalSep","name_strings","last","firsts","initials","replace","str","venue_string","cite","booktitle","number","pages","publisher","link_string","arxiv_match","exec","label","doi_string","new_line","title_string","bibliography_cite","fancy","hover_cite","a_str","v_str","Math","min","domContentLoaded","readyState","_moveLegacyAffiliationFormatIntoArray","_iterator4","_step4","hasOldStyle","Boolean","hasNewStyle","warn","newAffiliation","parseFrontmatter","element","firstElementChild","parsed","JSON","parse","FrontMatter$1","_HTMLElement","_this4","entries","_iterator5","_step5","notify","detail","bubbles","event","CustomEvent","dispatchEvent","_wrapNativeSuper","optionalComponents","article","byline","h1","hasPassword","interstitial","inBrowser","onLocalhost","location","hostname","includes","parentElement","removeChild","appendix","footnoteList","citationList","Controller","waitingOn","listeners","onCiteKeyCreated","_event$detail","citeTag","numbers","onCiteKeyChanged","_iterator6","_step6","waitingCallback","citationListTag","_iterator7","_step7","log","onCiteKeyRemoved","onBibliographyChanged","_iterator8","_step8","debug","onFootnoteChanged","footnotesList","footnotes","onFrontMatterChanged","prerendered","DOMContentLoaded","loaded","frontMatterTag","_iterator9","_step9","_iterator10","_step10","base","layout","print","styles","makeStyleTag","styleTagId","prerenderedTag","getElementById","styleTag","id","cssTextTag","firstScriptTag","addPolyfill","polyfill","polyfillLoadedCallback","script","onerror","polyfills","support","Element","prototype","Polyfills","browserSupportsAllFeatures","every","poly","load","callback","polyfillLoaded","neededPolyfills","distillRunlevel","_iterator11","_step11","_neededPolyfills","filter","selector","T$1","Abstract","_T$","T$2","Appendix","_T$2","isOnlyWhitespace","Article","_HTMLElement2","_this5","mutations","_iterator12","_step12","mutation","_iterator13","addedNodes","_step13","addedNode","nodeValue","test","wrapper","parentNode","commonjsGlobal","globalThis","global","self","createCommonjsModule","fn","module","exports","bibtexParse","BibtexParser","notKey","pos","input","currentEntry","setInput","t","getEntries","isWhitespace","match","canCommentOut","skipWhitespace","tryMatch","matchAt","value_braces","bracecount","start","escaped","end","value_comment","brcktCnt","value_quotes","single_value","values","key_equals_value","val","key_value_list","kv","entry_body","directive","preamble","comment","bibtex","string","toJSON","b","toBibtex","json","out","entryType","entryTags","tags","jdx","normalizeTag","full","x","char","parseBibtex","parsedEntries","_iterator14","_step14","_i","_Object$entries","_Object$entries$_i","serializeFrontmatterToBibtex","Bibliography","_HTMLElement3","_this6","_iterator15","_step15","parseIfPossible","_this7","requestAnimationFrame","newBibtex","receivedBibtex","response","attributeChangedCallback","oldValue","newValue","_this8","oReq","XMLHttpRequest","responseType","open","send","bylineTemplate","Byline","_HTMLElement4","T$3","Cite","_T$3","_this9","_numbers","_entries","_this10","outerSpan","innerSpan","hoverBox","customElements","whenDefined","then","listen","displayNumbers","displayEntries","eventName","result","numberStrings","html","styles$1","renderCitationList","size","style","list","stylesTag","heading","className","_iterator16","_step16","_step16$value","listItem","CitationList","_HTMLElement5","prism","_self","WorkerGlobalScope","Prism","lang","uniqueId","_","manual","disableWorkerMessageHandler","util","encode","tokens","Token","alias","isArray","o","call","objId","obj","defineProperty","deepClone","visited","forEach","v","getLanguage","currentScript","stack","scripts","getElementsByTagName","languages","extend","redef","inside","before","insert","grammar","ret","token","newToken","old","DFS","propertyType","plugins","highlightAll","highlightAllUnder","env","hooks","run","elements","apply","highlightElement","language","parent","code","insertHighlightedCode","highlightedCode","Worker","worker","filename","onmessage","evt","postMessage","stringify","immediateClose","highlight","tokenize","rest","tokenList","LinkedList","addAfter","matchGrammar","toArray","all","callbacks","matchedStr","greedy","classes","attributes","aliases","startNode","startPos","oneshot","patterns","j","pattern","lookbehind","lookbehindLength","flags","RegExp","currentNode","next","tail","removeCount","prev","lastIndex","to","p","after","removeFrom","removeRange","wrapped","node","newNode","count","array","addEventListener","message","close","highlightAutomaticallyCallback","defer","setTimeout","markup","addInlined","tagName","includedCdataInside","def","xml","mathml","svg","css","clike","javascript","js","fileHighlight","Extensions","pre","extension","xhr","onreadystatechange","status","responseText","statusText","python","py","lua","envVars","insideString","bash","variable","toBeCopied","shell","go","inner","createInline","starAlternative","tableCell","tableRow","tableLine","markdown","punctuation","walkTokens","l","codeLang","codeBlock","cls","autoloader","valueOf","floor","random","loadLanguages","ele","md","julia","T$4","Code","_Mutating2","languageName","codeTag","tabs","ShadowRoot","preTag","T$5","Footnote","_T$4","_this11","_this12","currentFootnoteId","IdString","host","span","T$6","FootnoteList","_T$5","_iterator17","_step17","footnote","backlink","href","T$7","HoverBox","_T$6","bindDivEvents","bindTriggerEvents","_this13","visible","showAtNode","stopTimeout","extendTimeout","stopPropagation","passive","hide","_this14","show","position","top","round","bbox","getBoundingClientRect","offsetLeft","width","offsetTop","height","timeout","clearTimeout","time","_this15","Title","_HTMLElement6","T$8","References","_T$7","TOC","_HTMLElement7","_this16","headings","renderTOC","ToC","_iterator18","_step18","el","isInTitle","isException","link","newLine","Figure","_HTMLElement8","_this17","_ready","_onscreen","_offscreen","loadsWhileScrolling","marginObserver","directObserver","disconnectedCallback","unobserve","readyQueue","runReadyQueue","onscreen","ready","offscreen","_readyQueue","addToReadyQueue","figure","sort","a","_seenOnScreen","pop","_marginObserver","viewportHeight","innerHeight","margin","rootMargin","threshold","didObserveMarginIntersection","IntersectionObserver","_iterator19","_step19","isIntersecting","_directObserver","didObserveDirectIntersection","_iterator20","_step20","isScrolling","resetTimer","productionHostname","T$9","Interstitial","_T$8","_this18","shouldRemoveSelf","passwordInput","oninput","passwordChanged","entered","Storage","localStorage","setItem","localStorageIdentifier","getItem","prefix","suffix","pathname","ascending","NaN","bisector","compare","ascendingComparator","lo","hi","mid","ascendingBisect","bisectRight","range","stop","step","max","ceil","e10","sqrt","e5","e2","ticks","reverse","tickIncrement","isFinite","power","LN10","pow","tickStep","step0","abs","step1","initRange","domain","definition","create","Color","darker","brighter","reI","reN","reP","reHex","reRgbInteger","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","named","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","color","copy","channels","displayable","rgb","hex","color_formatHex","formatHex","formatHsl","color_formatHsl","formatRgb","color_formatRgb","hslConvert","format","m","parseInt","rgbn","Rgb","rgba","hsla","r","g","rgbConvert","opacity","rgb_formatHex","rgb_formatRgb","isNaN","h","Hsl","hsl","m2","m1","hsl2rgb","deg2rad","PI","rad2deg","K","Xn","Yn","Zn","t0","t1","t2","t3","labConvert","Lab","Hcl","hcl2lab","rgb2lrgb","y","xyz2lab","z","lab","lab2xyz","lrgb2rgb","hclConvert","c","atan2","hcl","cos","sin","A","B","C","D","E","ED","EB","BC_DA","cubehelixConvert","Cubehelix","bl","cubehelix","cosh","sinh","constant","linear","exponential","gamma","nogamma","rgb$1","rgbGamma","numberArray","isNumberArray","ArrayBuffer","isView","DataView","genericArray","nb","na","interpolate","setTime","interpolateNumber","reA","reB","zero","one","bi","am","bm","bs","q","interpolateRound","constant$1","unit","identity","normalize","clamper","bimap","d0","d1","r0","r1","polymap","clamp","unknown","transformer","interpolate$1","transform","untransform","piecewise","output","rescale","scale","invert","rangeRound","u","continuous","formatDecimal","toExponential","coefficient","exponent","formatGroup","grouping","thousands","formatNumerals","numerals","re","formatSpecifier","specifier","FormatSpecifier","fill","align","sign","symbol","comma","precision","formatTrim","i0","i1","prefixExponent","formatPrefixAuto","formatRounded","formatTypes","toFixed","toPrecision","X","toUpperCase","identity$1","prefixes","formatLocale","locale","group","Number","currencyPrefix","currency","currencySuffix","decimal","percent","minus","nan","newFormat","formatType","maybeSuffix","valuePrefix","valueSuffix","valueNegative","charCodeAt","Infinity","padding","formatPrefix","defaultLocale","precisionFixed","precisionPrefix","precisionRound","tickFormat","linearish","nice","linear$1","t0$1","t1$1","newInterval","floori","offseti","field","interval","offset","previous","millisecond","durationSecond","durationMinute","durationHour","durationDay","durationWeek","second","getMilliseconds","minute","getSeconds","getMinutes","hour","getHours","setHours","setDate","getTimezoneOffset","weekday","sunday","monday","tuesday","wednesday","thursday","friday","saturday","setMonth","setFullYear","utcMinute","setUTCSeconds","utcHour","setUTCMinutes","utcDay","setUTCHours","setUTCDate","getUTCDate","utcWeekday","getUTCDay","utcSunday","utcMonday","utcTuesday","utcWednesday","utcThursday","utcFriday","utcSaturday","utcMonth","setUTCMonth","getUTCMonth","getUTCFullYear","utcYear","setUTCFullYear","localDate","H","M","S","L","utcDate","UTC","newDate","formatLocale$1","locale_dateTime","dateTime","locale_date","locale_time","locale_periods","periods","locale_weekdays","locale_shortWeekdays","shortDays","locale_months","locale_shortMonths","shortMonths","periodRe","formatRe","periodLookup","formatLookup","weekdayRe","weekdayLookup","shortWeekdayRe","shortWeekdayLookup","monthRe","monthLookup","shortMonthRe","shortMonthLookup","formats","formatShortWeekday","formatWeekday","formatShortMonth","formatMonth","formatDayOfMonth","formatMicroseconds","formatHour24","formatHour12","formatDayOfYear","formatMilliseconds","formatMonthNumber","formatMinutes","formatPeriod","formatQuarter","formatUnixTimestamp","formatUnixTimestampSeconds","formatSeconds","formatWeekdayNumberMonday","formatWeekNumberSunday","formatWeekNumberISO","formatWeekdayNumberSunday","formatWeekNumberMonday","formatYear","formatFullYear","formatZone","formatLiteralPercent","utcFormats","formatUTCShortWeekday","formatUTCWeekday","formatUTCShortMonth","formatUTCMonth","formatUTCDayOfMonth","formatUTCMicroseconds","formatUTCHour24","formatUTCHour12","formatUTCDayOfYear","formatUTCMilliseconds","formatUTCMonthNumber","formatUTCMinutes","formatUTCPeriod","formatUTCQuarter","formatUTCSeconds","formatUTCWeekdayNumberMonday","formatUTCWeekNumberSunday","formatUTCWeekNumberISO","formatUTCWeekdayNumberSunday","formatUTCWeekNumberMonday","formatUTCYear","formatUTCFullYear","formatUTCZone","parses","parseShortWeekday","parseWeekday","parseShortMonth","parseMonth","parseLocaleDateTime","parseDayOfMonth","parseMicroseconds","parseHour24","parseDayOfYear","parseMilliseconds","parseMonthNumber","parseMinutes","parsePeriod","parseQuarter","parseUnixTimestamp","parseUnixTimestampSeconds","parseSeconds","parseWeekdayNumberMonday","parseWeekNumberSunday","parseWeekNumberISO","parseWeekdayNumberSunday","parseWeekNumberMonday","parseLocaleDate","parseLocaleTime","parseYear","parseFullYear","parseZone","parseLiteralPercent","pad","pads","charAt","newParse","Z","parseSpecifier","week","day$1","Q","V","w","W","U","utcFormat","utcParse","numberRe","percentRe","requoteRe","requote","getUTCMilliseconds","dow","locale$1","timeFormat","timeParse","defaultLocale$1","isoSpecifier","formatIsoNative","formatIso","parseIsoNative","parseIso","noop","dispatch","Dispatch","parseTypenames","typenames","types","on","typename","that","args","xhtml","namespaces","xlink","xmlns","namespace","space","local","creatorInherit","ownerDocument","uri","namespaceURI","documentElement","createElementNS","creatorFixed","fullname","creator","none","selection_select","select","groups","_groups","subgroups","subgroup","subnode","__data__","Selection","_parents","empty","selectorAll","selection_selectAll","parents","matcher","matches","selection_filter","sparse","update","selection_enter","_enter","EnterNode","datum","_next","_parent","child","constant$2","keyPrefix","bindIndex","enter","exit","groupLength","dataLength","bindKey","nodeByKeyValue","keyValues","keyValue","selection_data","each","bind","enterGroup","updateGroup","exitGroup","_exit","selection_exit","selection_join","onenter","onupdate","onexit","append","remove","merge","order","selection_merge","selection","groups0","groups1","m0","merges","group0","group1","selection_order","compareDocumentPosition","selection_sort","ascending$1","compareNode","sortgroups","sortgroup","selection_call","selection_nodes","nodes","selection_node","selection_size","selection_empty","selection_each","attrRemove","removeAttribute","attrRemoveNS","removeAttributeNS","attrConstant","attrConstantNS","setAttributeNS","attrFunction","attrFunctionNS","selection_attr","getAttributeNS","defaultView","styleRemove","removeProperty","styleConstant","priority","setProperty","styleFunction","selection_style","styleValue","getPropertyValue","getComputedStyle","propertyRemove","propertyConstant","propertyFunction","selection_property","classArray","classList","ClassList","_node","_names","splice","contains","classedAdd","classedRemove","classedTrue","classedFalse","classedFunction","selection_classed","textRemove","textConstant","textFunction","selection_text","htmlRemove","htmlConstant","htmlFunction","selection_html","raise","nextSibling","selection_raise","lower","previousSibling","selection_lower","selection_append","constantNull","selection_insert","selection_remove","selection_cloneShallow","cloneNode","selection_cloneDeep","selection_clone","deep","selection_datum","filterEvents","mouseenter","mouseleave","filterContextListener","listener","contextListener","related","relatedTarget","event1","event0","parseTypenames$1","onRemove","__on","removeEventListener","capture","onAdd","wrap","selection_on","customEvent","sourceEvent","params","createEvent","initEvent","cancelable","dispatchConstant","dispatchFunction","selection_dispatch","selectAll","attr","classed","current","point","ownerSVGElement","createSVGPoint","clientX","clientY","matrixTransform","getScreenCTM","inverse","rect","clientLeft","clientTop","mouse","changedTouches","touch","touches","identifier","nopropagation","stopImmediatePropagation","noevent","preventDefault","nodrag","view","__noselect","MozUserSelect","yesdrag","noclick","constant$3","DragEvent","subject","active","dx","dy","defaultFilter","ctrlKey","button","defaultContainer","defaultSubject","defaultTouchable","navigator","maxTouchPoints","drag","touchable","gestures","mousedownx","mousedowny","mousemoving","touchending","clickDistance2","mousedowned","touchstarted","touchmoved","touchended","gesture","beforestart","mousemoved","mouseupped","sublisteners","p0","clickDistance","T$a","keyCodes","up","down","pageUp","pageDown","home","Slider","_T$a","_this19","connected","mouseEvent","knob","background","trackFill","track","origin","renderTicks","changeValue","dragUpdate","dispatchChange","onKeyDown","keyCode","validateValueRange","quantizeValue","dispatchInput","Event","_this20","ticksContainer","tickData","tick","logo","headerTemplate","T$b","DistillHeader","_T$b","styles$2","appendixTemplate","githubCompareUpdatesUrl","DistillAppendix","_HTMLElement9","footerTemplate","T$c","DistillFooter","_T$c","templateIsLoading","runlevel","initialize","distill","_i2","_Object$entries2","_Object$entries2$_i","functionName","components","distillComponents","allComponents","_iterator21","_step21","component","is","templateHasLoaded"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/fragments/banner.html b/dist/fragments/banner.html new file mode 100644 index 0000000000000000000000000000000000000000..c3b443e40f5296ee23732b4cb1711d4da3c6225b --- /dev/null +++ b/dist/fragments/banner.html @@ -0,0 +1 @@ +
      \ No newline at end of file diff --git a/dist/fragments/enterprisebanner.html b/dist/fragments/enterprisebanner.html new file mode 100644 index 0000000000000000000000000000000000000000..c7daa4138448fdf42f87b8b539ab03617991d635 --- /dev/null +++ b/dist/fragments/enterprisebanner.html @@ -0,0 +1,5 @@ +
      + +
      + + \ No newline at end of file diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000000000000000000000000000000000000..ab311257d8008d49255217fb22555da33af6b4e5 --- /dev/null +++ b/dist/index.html @@ -0,0 +1,371 @@ + + + + + + + + + + + Enterprise Hub - Why you need it, how to get it + + + + + + + + +

      Enterprise Hub:
      Why you need it, how to get it

      +
      +
      +
      + +
      + + +
      + + +
      +
      + + + + + +

      Welcome!
      In this article, you will learn all about the Enterprise features of Hugging Face, and how to get them.

      + + + +

      Executive Summary

      + +

      Hugging Face is the leading open platform for AI Builders - researchers, data scientists, machine learning engineers and software developers. 8 million AI Builders use Hugging Face, and created over 200,000 organizations to collaborate privately on models, datasets and applications.

      + +

      Free organizations are designed for small teams who need to collaborate and share transparently, but do not scale to medium sized companies: in free organizations, members join with their personal accounts, and everyone has access to everything.

      + +

      For companies whose teams need privacy, security, compliance and governance when building AI, Hugging Face offers Enterprise Hub and Enterprise Plus.

      + +

      Enterprise Hub provides advanced collaboration, compute, security and compliance features for organizations.
      + Enterprise Plus adds exclusive security and governance features, and direct expert support from the Hugging Face team.

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Free OrganizationsEnterprise HubEnterprise Plus
      CollaborationDIY AdminResource Groups
      + Private Datasets Viewer
      + Download Analytics
      + Extended Private Storage
      Resource Groups
      + Private Datasets Viewer
      + Download Analytics
      + Extended Private Storage
      ComputeInference Providers
      + Inference Endpoints GPU Quotas
      + Spaces ZeroGPU, Dev Mode
      Inference Providers
      + Inference Endpoints GPU Quotas
      + Spaces ZeroGPU, Dev Mode
      SecurityStandard SSO
      + 2 Factor Authentification
      + Access Token Management
      Advanced SSO
      + 2 Factor Authentification
      + Access Token Management
      GovernanceAudit LogsAudit Logs
      + HF Model Gateway (preview)
      ComplianceStorage RegionsStorage Regions
      + Network Security
      SupportCommunity Support (Forum)Email SupportDirect Expert Support (Slack)
      + +

      Enterprise Hub can be purchased with a credit card at hf.co/enterprise, or via a standard 1-year contract subject to a $50k / 50 seats minimum.

      +

      Enterprise Plus can be purchased via a custom 1-year contract subject to a $120k / 50 seats minimum.

      + +

      How do all these features benefit your organization? Let's dive in.

      + +

      Why upgrade to an Enterprise organization

      + +

      Advanced Collaboration

      + +

      Enterprise Hub and Enterprise Plus organizations allow their members to privately host and share unlimited models, datasets and Spaces repositories. Members of Enterprise organizations benefit from higher rate limits accessing all Hugging Face services from the Hub and the Hugging Face open source libraries.

      + +

      In addition, Enterprise organizations offer high storage limits for private repositories, including 1TB of private storage per member ; for instance an Enterprise organization with 1,000 members can store up to 1 Petabyte of private files at no additional cost!

      + + +

      In free organizations, everyone has access to everything. To organize resources across teams and projects, Enterprise organizations have access to Resource Groups. Enterprise organization admins can create new Resource Groups to assign specific repositories, add members and assign them specific permissions. This is great for teams who want to work on a specific project privately from the rest of the organization, or for different business units to segregate the models, datasets and Spaces they are working on.

      + + +

      A favourite feature of Hugging Face for data scientists is the Datasets Viewer and the Data Studio. With Datasets Viewer makes it easy to preview the content of public datasets, and with Data Studio you can apply SQL queries to the dataset, or even ask AI to create and run them for you! Enterprise organizations make Dataset Viewer and Data Studio available to private datasets hosted on the organization.

      + + +

      Hugging Face is the home of over 2 million public models, datasets contributed by the community. A great way for organizations to have impact and gain followers is by publicly sharing useful models and datasets. Enterprise organizations have access to power features for model and dataset contributors. Enterprise Analytics provides detailed download analytics for public repositories, easily exported via CSV. Enterprise organizations can also set up advanced model gating processes for Hugging Face users to provide information while requesting access to their public models.

      + + +

      Advanced Compute

      + +

      When upgrading their organization to Enterprise, companies provide their employees with powerful compute options to build and host AI applications.

      + +

      Enterprise organization members can use Inference Providers to use and integrate some of the most popular open models into their AI applications, with serverless inference powered by Hugging Face and Inference Providers, including Together AI, fal, Novita AI, Cerebras. Enterprise organizations get $2 free credit each month toward Inference Providers, for instance a 1,000 member organization can use for up to $2,000 of Inference Providers for free. Enterprise organization admins can set a monthly spend limit to control their costs.

      + + +

      To show what an AI model can do, AI Builders use Hugging Face Spaces. Spaces are hosted, interactive AI applications - over 1M public and private Spaces were created on Hugging Face. For companies, private Spaces is an ideal way to demo a model or application to colleagues. Enterprise organizations have access to advanced compute options for their Spaces:
      +

      + +
        +
      • ZeroGPU - Spaces can be powered by powerful A100 NVIDIA GPUs that spin up when the Space is used and down right after.
      • +
      • GPU Upgrades - Spaces can be upgraded to exclusive large GPU options for the most demanding applications, including 4xA10G and A100 Large instances.
      • +
      • Dev Mode - Dev Mode makes developing and debugging Spaces faster, connecting to the underlying container via SSH or VS Code.
      • +
      +

      + +

      Advanced Security

      + +

      Free organizations are designed for minimum friction adding collaborators, students, professionals to foster transparent collaboration. For companies that require security processes, Enterprise organizations offer many features to enforce security rules and make sure appropriate access controls and rules are in place.

      + +

      To secure accounts with access to the organization's private resources, Enterprise organization admins can require 2-Factor Authentication for all members of the organization, and require admin approval for new members.

      + + +

      To reduce the risk of members inadvertently publishing confidential information as public repositories, Enterprise organization admins can make new repositories private by default, or disable public repositories altogether.

      + + +

      User Access Tokens are keys users can create to give applications the permission to access private models, datasets and applications on Hugging Face. It’s very important to create and manage User Access Tokens with best security practices in mind - only give the minimum required scope of access, regularly rotate tokens and invalidate unnecessary tokens. For organization admins, User Access Tokens can be a source of concern as each token is a potential attack vector. Enterprise organizations can reduce risk and enforce best practices with Access Token Management.
      + With Access Token Management, organization admins have a centralized view of every User Access Token created by members of the organization. Each token can be inspected, and revoked. Admins can set up organization policies, for instance to disallow the creation of broad access tokens and require fine-grained tokens, and/or to require admin approval for any new token created by users of the organization.

      + + +

      To make sure that members with access to the organization’s private resources are actually employees of the company, Enterprise organizations can set up Single Sign-On (SSO). With SSO, user authentication to access Enterprise organization resources is managed by the company Identity Provider, such as Okta or Azure Active Directory. Roles and Teams mapping is available to automatically give specific access control permissions to employee groups, and/or assign them to Resource Groups.

      + + +

      Enterprise Plus organizations have access to Advanced SSO features. With Advanced SSO, the Hugging Face user accounts who are members of the organization are fully provisioned by the company Identity Provider.

      + +

      With Enterprise Plus, the user accounts belonging to the organization are Enterprise Managed Users, fully controlled by the company. With Enterprise Managed Users, SSO authentication manages not only the access to organization resources, but also the access to all Hugging Face Hub public resources. Enterprise Managed Users only need to login once to access all public and private resources on the Hugging Face Hub.

      + +

      With Enterprise Managed Users, Enterprise Plus customers can drastically reduce the risk of confidential information being published:
      +

        +
      • Enterprise Managed Users cannot create repositories under their personal profile
      • +
      • Enterprise Managed Users cannot join other organizations beside their Enterprise Plus organization
      • +
      • Enterprise Managed Users cannot subscribe to a PRO subscription for their personal account
      • +
      • Enterprise Managed Users cannot change their account email address, or set a password for their account
      • +
      +

      + +

      Advanced Governance and Compliance

      + +

      Enterprises need traceability and auditability of their confidential information. Enterprise organization admins on Hugging Face have access to Audit Logs to inspect and retrieve all changes made to their organization, such as new users, access tokens or repositories, changes to resource groups, access controls and more. Each log entry includes information about the user, their location, the action, change and time. Lots can be easily downloaded as JSON files for analysis.

      + + +

      Enterprise organizations can choose where their data is hosted with Storage Regions. Models, Datasets, Spaces can be stored in either US-based servers or Europe-based servers, allowing European companies to use Hugging Face in a GDPR compliant way.

      + + +

      Enterprise Plus offers organizations advanced governance and compliance features, with Network Security and Model Gateway.

      + +

      With Network Security, Enterprise Plus organizations can define their corporate network and precisely define which public models, datasets, organizations and applications should be accessible to their employees. Admins can require authentication to access Hugging Face, so that only authorized employees can access it. In addition, admins can define exactly which resources should be allowed or blocked, which is useful to enforce company model governance rules, for instance to restrict access to certain models or organizations disallowed per company policy. Also with Network Security, admins can enable higher rate limits for their organization, and unlock power users of Hugging Face.

      + + +

      Model Gateway is an on-premise proxy of the Hugging Face Hub for companies with strict security, compliance and governance requirements. The Model Gateway is deployed by the company within their environment, and acts as a caching, governance and security layer between the employees network and the public Hugging Face Hub. With Model Gateway, companies can:

      +
        +
      • Allow and restrict specific model, datasets and Spaces applications
      • +
      • Define the allowed licenses for models to prevent downloads of non-compliant models (for instance, to prevent employees from downloading GPL licensed or Non-Commercial licensed models)
      • +
      • Define the allowed file formats for models to reduce security risks (for instance, to prevent employees from downloading models stored as Pickle files)
      • +
      • Define model security scanning requirements, and implement custom model security scanners into the Model Gateway registry
      • +
      • Guarantee model supply chain robustness with models and versioning cached in local company storage (for instance, to prevent models from becoming unavailable if their provider on Hugging Face decided to delete them)
      • +
      • Simplify team model access for Gated models like Meta Llama, Google Gemma or Mistral models - permission is asked once and the model is then available to everyone at the company via the Model Gateway local registry.
      • +
      • Increase productivity for machine learning engineers with fast downloads from the local storage system
      • +
      • Provide auditability with logs documenting and attributing model downloads by employees
      • +
      +

      Model Gateway is a new feature currently in preview for select Enterprise Plus organizations.

      + +

      Advanced Support

      + +

      Enterprise Hub organization members enjoy priority support covering their usage of Hugging Face via email requests.

      +

      Enterprise Plus organization members enjoy direct expert support from the Hugging Face team via a dedicated, private Slack channel hosted by Hugging Face.

      + +

      How to upgrade to Enterprise

      + +

      Pricing

      + +

      Enterprise Hub can be purchased directly at hf.co/enterprise with a credit card as a $20/seat monthly subscription, or $216/seat yearly subscription.
      + Companies requiring a contract can request a standard 1-year contract subject to a $50k / 50 seats minimum.

      + +

      Enterprise Plus can only be purchased via a custom 1-year contract subject to a $120k / 50 seats minimum.

      + +

      When purchased through a contract, Enterprise Hub and Enterprise Plus licenses include a number of seats corresponding to the number of members expected to be onboarded in the organization during the first year of the contract. Additional members joining the organization during the yearly term are not charged, and the contract value is updated upon yearly renewal to the number of members of the organization at renewal.

      + +

      Enterprise organizations can purchase Compute Credits toward usage of premium features by their members, such as Inference Providers, Inference Endpoints and Spaces premium hardware. Compute Credits can be purchased upon request via an Order Form, are applied to the organization upon payment, and are valid for one year. Compute Credits purchases of $200k or higher qualify for volume discounts.

      + + +

      To contact the Hugging Face sales team, please email enterprise-contracts@huggingface.co

      + +

      Contracting

      + +

      To keep the process fast and smooth, Enterprise Hub and Enterprise Plus are governed by our standard online Terms of Service, complemented by brief Supplemental Terms. These terms follow industry standards and are regularly updated to ensure they remain clear and fair.

      + +

      Frequently Asked Questions

      + +

      Can I get on a call with a sales representative?
      + Hugging Face sells and onboards customers via a streamlined process relying on written async communication (email and Slack). We are happy to answer any question you may have via email, but do not offer sales calls.

      + +

      Can I get a free trial of Enterprise Hub?
      + Enterprise Hub features can be tested for as little as $20 with a credit card, and we do not offer free trials.

      + +

      How do I follow my internal new vendor onboarding processes?
      + Any vendor, security or legal review process requires to purchase Enterprise Hub or Enterprise Plus via a contract. Our team will be happy to follow your new vendor onboarding process requirements at enterprise-contracts@huggingface.co

      + +

      How do I set up a security review of Hugging Face prior to purchase?
      + Security reviews are only possible when purchasing Enterprise Hub or Enterprise Plus via a contract. Please contact our team at enterprise-contracts@huggingface.co, upon signing a unilateral NDA, Hugging Face will share our SOC2 Type2 report detailing all the information required in security reviews. Our security team can accommodate custom security questionnaires for contract values above $120k.

      + +

      Can the standard contract terms be modified after my legal team reviews them?
      + We only allow legal review for contract values above $120k, the Hugging Face legal team can review change requests to be added to the Order Form, which includes all contract legal terms.

      + +
      + + +

      Get Started

      +

      Upgrade your organization to Enterprise at hf.co/enterprise

      +
      + + + + + + + diff --git a/dist/main.bundle.js b/dist/main.bundle.js new file mode 100644 index 0000000000000000000000000000000000000000..4ab6df0d60741bf474fc1142dfe54a775da9d7e1 --- /dev/null +++ b/dist/main.bundle.js @@ -0,0 +1,399 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; + +;// ./src/fragmentLoader.js +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } +function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } +function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } +function loadFragments() { + return _loadFragments.apply(this, arguments); +} +function _loadFragments() { + _loadFragments = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7() { + var fragmentElements, FetchQueue, fetchQueue, currentIndex, elements; + return _regeneratorRuntime().wrap(function _callee7$(_context7) { + while (1) switch (_context7.prev = _context7.next) { + case 0: + // Find all elements with ids starting with 'fragment-' + fragmentElements = Array.from(document.querySelectorAll('[id^="fragment-"]')); + FetchQueue = /*#__PURE__*/function () { + function FetchQueue() { + var maxConcurrent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 3; + _classCallCheck(this, FetchQueue); + this.queue = []; + this.maxConcurrent = maxConcurrent; + this.activeFetches = 0; + this.maxRetries = 3; // Maximum number of retry attempts + this.baseDelay = 1000; // Base delay in milliseconds (1 second) + } + return _createClass(FetchQueue, [{ + key: "sleep", + value: function () { + var _sleep = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(ms) { + return _regeneratorRuntime().wrap(function _callee$(_context) { + while (1) switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", new Promise(function (resolve) { + return setTimeout(resolve, ms); + })); + case 1: + case "end": + return _context.stop(); + } + }, _callee); + })); + function sleep(_x) { + return _sleep.apply(this, arguments); + } + return sleep; + }() + }, { + key: "fetchWithRetry", + value: function () { + var _fetchWithRetry = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(fragmentPath) { + var retryCount, + response, + delay, + _args2 = arguments; + return _regeneratorRuntime().wrap(function _callee2$(_context2) { + while (1) switch (_context2.prev = _context2.next) { + case 0: + retryCount = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 0; + _context2.prev = 1; + _context2.next = 4; + return fetch(fragmentPath); + case 4: + response = _context2.sent; + if (response.ok) { + _context2.next = 7; + break; + } + throw new Error("HTTP error! status: ".concat(response.status)); + case 7: + _context2.next = 9; + return response.text(); + case 9: + return _context2.abrupt("return", _context2.sent); + case 12: + _context2.prev = 12; + _context2.t0 = _context2["catch"](1); + if (!(retryCount < this.maxRetries)) { + _context2.next = 20; + break; + } + // Exponential backoff: 1s, 2s, 4s + delay = this.baseDelay * Math.pow(2, retryCount); + console.warn("Retry ".concat(retryCount + 1, "/").concat(this.maxRetries, " for ").concat(fragmentPath, " after ").concat(delay, "ms")); + _context2.next = 19; + return this.sleep(delay); + case 19: + return _context2.abrupt("return", this.fetchWithRetry(fragmentPath, retryCount + 1)); + case 20: + throw _context2.t0; + case 21: + case "end": + return _context2.stop(); + } + }, _callee2, this, [[1, 12]]); + })); + function fetchWithRetry(_x2) { + return _fetchWithRetry.apply(this, arguments); + } + return fetchWithRetry; + }() + }, { + key: "addFetch", + value: function () { + var _addFetch = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(element) { + var _this = this; + var fragmentName, fragmentPath; + return _regeneratorRuntime().wrap(function _callee5$(_context5) { + while (1) switch (_context5.prev = _context5.next) { + case 0: + fragmentName = element.id.replace('fragment-', ''); + fragmentPath = "fragments/".concat(fragmentName, ".html"); + return _context5.abrupt("return", new Promise(/*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(resolve, reject) { + var fetchPromise; + return _regeneratorRuntime().wrap(function _callee4$(_context4) { + while (1) switch (_context4.prev = _context4.next) { + case 0: + try { + fetchPromise = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() { + var html, temp, scripts; + return _regeneratorRuntime().wrap(function _callee3$(_context3) { + while (1) switch (_context3.prev = _context3.next) { + case 0: + _context3.prev = 0; + _context3.next = 3; + return _this.fetchWithRetry(fragmentPath); + case 3: + html = _context3.sent; + // Process the fragment + temp = document.createElement('div'); + temp.innerHTML = html; + element.innerHTML = temp.innerHTML; + + // Handle scripts + scripts = temp.getElementsByTagName('script'); + Array.from(scripts).forEach(function (oldScript) { + var newScript = document.createElement('script'); + Array.from(oldScript.attributes).forEach(function (attr) { + newScript.setAttribute(attr.name, attr.value); + }); + newScript.textContent = oldScript.textContent; + oldScript.parentNode.removeChild(oldScript); + document.body.appendChild(newScript); + }); + _this.activeFetches--; + resolve(); + _context3.next = 18; + break; + case 13: + _context3.prev = 13; + _context3.t0 = _context3["catch"](0); + console.error("Failed to load fragment ".concat(fragmentPath, " after ").concat(_this.maxRetries, " retries:"), _context3.t0); + _this.activeFetches--; + reject(_context3.t0); + case 18: + case "end": + return _context3.stop(); + } + }, _callee3, null, [[0, 13]]); + }))(); + _this.queue.push(fetchPromise); + _this.activeFetches++; + } catch (error) { + reject(error); + } + case 1: + case "end": + return _context4.stop(); + } + }, _callee4); + })); + return function (_x4, _x5) { + return _ref.apply(this, arguments); + }; + }())); + case 3: + case "end": + return _context5.stop(); + } + }, _callee5); + })); + function addFetch(_x3) { + return _addFetch.apply(this, arguments); + } + return addFetch; + }() + }, { + key: "processNext", + value: function () { + var _processNext = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(element) { + return _regeneratorRuntime().wrap(function _callee6$(_context6) { + while (1) switch (_context6.prev = _context6.next) { + case 0: + if (!(this.activeFetches < this.maxConcurrent && element)) { + _context6.next = 3; + break; + } + _context6.next = 3; + return this.addFetch(element); + case 3: + case "end": + return _context6.stop(); + } + }, _callee6, this); + })); + function processNext(_x6) { + return _processNext.apply(this, arguments); + } + return processNext; + }() + }]); + }(); // Initialize queue + fetchQueue = new FetchQueue(3); + currentIndex = 0; + elements = fragmentElements; // Assuming this is defined elsewhere + // Initial loading of first 3 elements + case 5: + if (!(currentIndex < elements.length && currentIndex < 3)) { + _context7.next = 11; + break; + } + _context7.next = 8; + return fetchQueue.processNext(elements[currentIndex]); + case 8: + currentIndex++; + _context7.next = 5; + break; + case 11: + if (!(currentIndex < elements.length)) { + _context7.next = 20; + break; + } + _context7.next = 14; + return Promise.race(fetchQueue.queue); + case 14: + // Remove completed fetch from queue + fetchQueue.queue = fetchQueue.queue.filter(function (p) { + return p.status === 'pending'; + }); + // Add next element to queue + _context7.next = 17; + return fetchQueue.processNext(elements[currentIndex]); + case 17: + currentIndex++; + _context7.next = 11; + break; + case 20: + _context7.next = 22; + return Promise.all(fetchQueue.queue); + case 22: + case "end": + return _context7.stop(); + } + }, _callee7); + })); + return _loadFragments.apply(this, arguments); +} + +;// ./src/syncHFSpacesURLHash.js +var queryArg = "section"; +function syncHFSpacesURLHash() { + // Handle explicit section requests (don't update hash automatically on load) + var hasExplicitRequest = handleExplicitSectionRequest(); + + // Set up hash change monitoring + updateHashBasedOnHashChange(); + + // Always set up scroll monitoring to update hash during scrolling + setupScrollMonitoring(); + + // If no explicit request, we don't update the hash on initial load + // The hash will only start updating when the user scrolls +} +function handleExplicitSectionRequest() { + // Check for section parameter in URL + var urlParams = new URLSearchParams(window.location.search); + var sectionId = urlParams.get(queryArg); + + // If we have an explicit section request + if (sectionId) { + var targetElement = document.getElementById(sectionId); + if (targetElement) { + // Slight delay to ensure the browser doesn't try to do its own scrolling first + setTimeout(function () { + targetElement.scrollIntoView(); + history.replaceState(null, null, "#".concat(sectionId)); + }, 100); + } + return true; + } + + // No explicit section parameter found + return false; +} +function setupScrollMonitoring() { + // Variables to manage throttling + var isScrolling = false; + var lastKnownScrollPosition = 0; + var initialScroll = true; + + // Add the scroll event listener + window.addEventListener('scroll', function () { + lastKnownScrollPosition = window.scrollY; + if (!isScrolling) { + window.requestAnimationFrame(function () { + // Skip the first scroll event which might be browser's automatic scroll + // to a hash on page load + if (initialScroll) { + initialScroll = false; + } else { + updateHashBasedOnScroll(lastKnownScrollPosition); + } + isScrolling = false; + }); + } + isScrolling = true; + }); +} + +// Function to update the URL hash based on scroll position +function updateHashBasedOnScroll(scrollPosition) { + var closestHeading = findClosestHeading(scrollPosition); + + // Update the URL hash if we found a closest element + if (closestHeading && closestHeading.id) { + // Only update if the hash is different to avoid unnecessary operations + if (window.location.hash !== "#".concat(closestHeading.id)) { + silentlyUpdateHash(closestHeading.id); + postMessageToHFSpaces(closestHeading.id); + } + } +} + +// Find the closest heading to the current scroll position +function findClosestHeading(scrollPosition) { + // Get only heading elements with IDs that we want to track + var headingsWithIds = Array.from(document.querySelectorAll('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]')); + + // Skip if there are no headings with IDs + if (headingsWithIds.length === 0) return null; + + // Find the element closest to the middle of the viewport + var closestHeading = null; + var closestDistance = Infinity; + var viewportMiddle = scrollPosition + window.innerHeight / 2; + + // Iterate through all headings to find the closest one + headingsWithIds.forEach(function (heading) { + var headingTop = heading.getBoundingClientRect().top + scrollPosition; + var distance = Math.abs(headingTop - viewportMiddle); + if (distance < closestDistance) { + closestDistance = distance; + closestHeading = heading; + } + }); + return closestHeading; +} + +// Update hash without triggering scroll or other side effects +function silentlyUpdateHash(id) { + history.replaceState(null, null, "#".concat(id)); +} +function updateHashBasedOnHashChange() { + window.addEventListener('hashchange', function () { + var elementId = window.location.hash.slice(1); + postMessageToHFSpaces(elementId); + }); +} +function postMessageToHFSpaces(elementId) { + var parentOrigin = "https://huggingface.co"; + window.parent.postMessage({ + queryString: "".concat(queryArg, "=").concat(elementId) + }, parentOrigin); +} + +;// ./src/index.js +// import { plotClusters } from './clusters' + + +document.addEventListener("DOMContentLoaded", function () { + console.log("DOMContentLoaded"); + loadFragments(); + init_memory_plot(); + syncHFSpacesURLHash(); +}, { + once: true +}); +/******/ })() +; +//# sourceMappingURL=main.bundle.js.map \ No newline at end of file diff --git a/dist/main.bundle.js.map b/dist/main.bundle.js.map new file mode 100644 index 0000000000000000000000000000000000000000..391869a70016175d63727cf35f25a87305d433a3 --- /dev/null +++ b/dist/main.bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.bundle.js","mappings":";;;;;+CACA,qJAAAA,mBAAA,YAAAA,oBAAA,WAAAC,CAAA,SAAAC,CAAA,EAAAD,CAAA,OAAAE,CAAA,GAAAC,MAAA,CAAAC,SAAA,EAAAC,CAAA,GAAAH,CAAA,CAAAI,cAAA,EAAAC,CAAA,GAAAJ,MAAA,CAAAK,cAAA,cAAAP,CAAA,EAAAD,CAAA,EAAAE,CAAA,IAAAD,CAAA,CAAAD,CAAA,IAAAE,CAAA,CAAAO,KAAA,KAAAC,CAAA,wBAAAC,MAAA,GAAAA,MAAA,OAAAC,CAAA,GAAAF,CAAA,CAAAG,QAAA,kBAAAC,CAAA,GAAAJ,CAAA,CAAAK,aAAA,uBAAAC,CAAA,GAAAN,CAAA,CAAAO,WAAA,8BAAAC,OAAAjB,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAC,MAAA,CAAAK,cAAA,CAAAP,CAAA,EAAAD,CAAA,IAAAS,KAAA,EAAAP,CAAA,EAAAiB,UAAA,MAAAC,YAAA,MAAAC,QAAA,SAAApB,CAAA,CAAAD,CAAA,WAAAkB,MAAA,mBAAAjB,CAAA,IAAAiB,MAAA,YAAAA,OAAAjB,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAD,CAAA,CAAAD,CAAA,IAAAE,CAAA,gBAAAoB,KAAArB,CAAA,EAAAD,CAAA,EAAAE,CAAA,EAAAG,CAAA,QAAAK,CAAA,GAAAV,CAAA,IAAAA,CAAA,CAAAI,SAAA,YAAAmB,SAAA,GAAAvB,CAAA,GAAAuB,SAAA,EAAAX,CAAA,GAAAT,MAAA,CAAAqB,MAAA,CAAAd,CAAA,CAAAN,SAAA,GAAAU,CAAA,OAAAW,OAAA,CAAApB,CAAA,g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,qBAAqB,CAACY,SAAS,CAAC;EAClC,CAAC,CAAC;AACJ;AAEA,SAASZ,qBAAqBA,CAACY,SAAS,EAAE;EACxC,IAAMC,YAAY,GAAG,wBAAwB;EAC7CnC,MAAM,CAACoC,MAAM,CAACC,WAAW,CAAC;IAAEC,WAAW,KAAAxG,MAAA,CAAK0D,QAAQ,OAAA1D,MAAA,CAAIoG,SAAS;EAAG,CAAC,EAAEC,YAAY,CAAC;AACtF;;;ACzHA;AACgD;AACW;AAE3DhI,QAAQ,CAAC0G,gBAAgB,CAAC,kBAAkB,EAAE,YAAM;EAChDzE,OAAO,CAACmG,GAAG,CAAC,kBAAkB,CAAC;EAC/BhJ,aAAa,CAAC,CAAC;EACfiJ,gBAAgB,CAAC,CAAC;EAClB/C,mBAAmB,CAAC,CAAC;AACzB,CAAC,EAAE;EAAEgD,IAAI,EAAE;AAAK,CAAC,CAAC,C","sources":["webpack://blogpost/./src/fragmentLoader.js","webpack://blogpost/./src/syncHFSpacesURLHash.js","webpack://blogpost/./src/index.js"],"sourcesContent":["async function loadFragments() {\n // Find all elements with ids starting with 'fragment-'\n const fragmentElements = Array.from(document.querySelectorAll('[id^=\"fragment-\"]'));\n \n class FetchQueue {\n constructor(maxConcurrent = 3) {\n this.queue = [];\n this.maxConcurrent = maxConcurrent;\n this.activeFetches = 0;\n this.maxRetries = 3; // Maximum number of retry attempts\n this.baseDelay = 1000; // Base delay in milliseconds (1 second)\n }\n\n async sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n }\n\n async fetchWithRetry(fragmentPath, retryCount = 0) {\n try {\n const response = await fetch(fragmentPath);\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n return await response.text();\n } catch (error) {\n if (retryCount < this.maxRetries) {\n // Exponential backoff: 1s, 2s, 4s\n const delay = this.baseDelay * Math.pow(2, retryCount);\n console.warn(`Retry ${retryCount + 1}/${this.maxRetries} for ${fragmentPath} after ${delay}ms`);\n await this.sleep(delay);\n return this.fetchWithRetry(fragmentPath, retryCount + 1);\n }\n throw error;\n }\n }\n\n async addFetch(element) {\n const fragmentName = element.id.replace('fragment-', '');\n const fragmentPath = `fragments/${fragmentName}.html`;\n \n return new Promise(async (resolve, reject) => {\n try {\n const fetchPromise = (async () => {\n try {\n const html = await this.fetchWithRetry(fragmentPath);\n \n // Process the fragment\n const temp = document.createElement('div');\n temp.innerHTML = html;\n element.innerHTML = temp.innerHTML;\n \n // Handle scripts\n const scripts = temp.getElementsByTagName('script');\n Array.from(scripts).forEach(oldScript => {\n const newScript = document.createElement('script');\n Array.from(oldScript.attributes).forEach(attr => {\n newScript.setAttribute(attr.name, attr.value);\n });\n newScript.textContent = oldScript.textContent;\n oldScript.parentNode.removeChild(oldScript);\n document.body.appendChild(newScript);\n });\n \n this.activeFetches--;\n resolve();\n } catch (error) {\n console.error(`Failed to load fragment ${fragmentPath} after ${this.maxRetries} retries:`, error);\n this.activeFetches--;\n reject(error);\n }\n })();\n\n this.queue.push(fetchPromise);\n this.activeFetches++;\n } catch (error) {\n reject(error);\n }\n });\n }\n\n async processNext(element) {\n if (this.activeFetches < this.maxConcurrent && element) {\n await this.addFetch(element);\n }\n }\n }\n\n // Initialize queue\n const fetchQueue = new FetchQueue(3);\n let currentIndex = 0;\n const elements = fragmentElements; // Assuming this is defined elsewhere\n\n // Initial loading of first 3 elements\n while (currentIndex < elements.length && currentIndex < 3) {\n await fetchQueue.processNext(elements[currentIndex]);\n currentIndex++;\n }\n\n // Process remaining elements as fetches complete\n while (currentIndex < elements.length) {\n // Wait for any fetch to complete\n await Promise.race(fetchQueue.queue);\n // Remove completed fetch from queue\n fetchQueue.queue = fetchQueue.queue.filter(p => p.status === 'pending');\n // Add next element to queue\n await fetchQueue.processNext(elements[currentIndex]);\n currentIndex++;\n }\n\n // Wait for remaining fetches to complete\n await Promise.all(fetchQueue.queue);\n}\n\nexport { loadFragments }","const queryArg = \"section\";\n\nfunction syncHFSpacesURLHash() {\n // Handle explicit section requests (don't update hash automatically on load)\n const hasExplicitRequest = handleExplicitSectionRequest();\n \n // Set up hash change monitoring\n updateHashBasedOnHashChange();\n \n // Always set up scroll monitoring to update hash during scrolling\n setupScrollMonitoring();\n \n // If no explicit request, we don't update the hash on initial load\n // The hash will only start updating when the user scrolls\n}\n\nfunction handleExplicitSectionRequest() {\n // Check for section parameter in URL\n const urlParams = new URLSearchParams(window.location.search);\n const sectionId = urlParams.get(queryArg);\n \n // If we have an explicit section request\n if (sectionId) {\n const targetElement = document.getElementById(sectionId);\n if (targetElement) {\n // Slight delay to ensure the browser doesn't try to do its own scrolling first\n setTimeout(() => {\n targetElement.scrollIntoView();\n history.replaceState(null, null, `#${sectionId}`);\n }, 100);\n }\n return true;\n }\n \n // No explicit section parameter found\n return false;\n}\n\nfunction setupScrollMonitoring() {\n // Variables to manage throttling\n let isScrolling = false;\n let lastKnownScrollPosition = 0;\n let initialScroll = true;\n \n // Add the scroll event listener\n window.addEventListener('scroll', function() {\n lastKnownScrollPosition = window.scrollY;\n \n if (!isScrolling) {\n window.requestAnimationFrame(function() {\n // Skip the first scroll event which might be browser's automatic scroll\n // to a hash on page load\n if (initialScroll) {\n initialScroll = false;\n } else {\n updateHashBasedOnScroll(lastKnownScrollPosition);\n }\n isScrolling = false;\n });\n }\n \n isScrolling = true;\n });\n}\n\n// Function to update the URL hash based on scroll position\nfunction updateHashBasedOnScroll(scrollPosition) {\n const closestHeading = findClosestHeading(scrollPosition);\n \n // Update the URL hash if we found a closest element\n if (closestHeading && closestHeading.id) {\n // Only update if the hash is different to avoid unnecessary operations\n if (window.location.hash !== `#${closestHeading.id}`) {\n silentlyUpdateHash(closestHeading.id);\n postMessageToHFSpaces(closestHeading.id);\n }\n }\n}\n\n// Find the closest heading to the current scroll position\nfunction findClosestHeading(scrollPosition) {\n // Get only heading elements with IDs that we want to track\n const headingsWithIds = Array.from(document.querySelectorAll('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]'));\n\n // Skip if there are no headings with IDs\n if (headingsWithIds.length === 0) return null;\n\n // Find the element closest to the middle of the viewport\n let closestHeading = null;\n let closestDistance = Infinity;\n const viewportMiddle = scrollPosition + window.innerHeight / 2;\n \n // Iterate through all headings to find the closest one\n headingsWithIds.forEach(heading => {\n const headingTop = heading.getBoundingClientRect().top + scrollPosition;\n const distance = Math.abs(headingTop - viewportMiddle);\n \n if (distance < closestDistance) {\n closestDistance = distance;\n closestHeading = heading;\n }\n });\n \n return closestHeading;\n}\n\n// Update hash without triggering scroll or other side effects\nfunction silentlyUpdateHash(id) {\n history.replaceState(null, null, `#${id}`);\n}\n\nfunction updateHashBasedOnHashChange() {\n window.addEventListener('hashchange', () => {\n const elementId = window.location.hash.slice(1);\n postMessageToHFSpaces(elementId);\n });\n}\n\nfunction postMessageToHFSpaces(elementId) {\n const parentOrigin = \"https://huggingface.co\";\n window.parent.postMessage({ queryString: `${queryArg}=${elementId}` }, parentOrigin);\n}\n\nexport { syncHFSpacesURLHash };\n","// import { plotClusters } from './clusters'\nimport { loadFragments } from './fragmentLoader'\nimport { syncHFSpacesURLHash } from './syncHFSpacesURLHash'\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n console.log(\"DOMContentLoaded\");\n loadFragments();\n init_memory_plot();\n syncHFSpacesURLHash();\n}, { once: true });\n"],"names":["_regeneratorRuntime","e","t","r","Object","prototype","n","hasOwnProperty","o","defineProperty","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","call","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","_catch","delegateYield","_classCallCheck","_defineProperties","_toPropertyKey","key","_createClass","_toPrimitive","toPrimitive","String","Number","asyncGeneratorStep","_asyncToGenerator","arguments","apply","_next","_throw","loadFragments","_loadFragments","_callee7","fragmentElements","FetchQueue","fetchQueue","currentIndex","elements","_callee7$","_context7","Array","from","document","querySelectorAll","maxConcurrent","undefined","queue","activeFetches","maxRetries","baseDelay","_sleep","_callee","ms","_callee$","_context","setTimeout","sleep","_x","_fetchWithRetry","_callee2","fragmentPath","retryCount","response","delay","_args2","_callee2$","_context2","fetch","ok","concat","status","text","t0","Math","pow","console","warn","fetchWithRetry","_x2","_addFetch","_callee5","element","_this","fragmentName","_callee5$","_context5","id","replace","_ref","_callee4","reject","fetchPromise","_callee4$","_context4","_callee3","html","temp","scripts","_callee3$","_context3","createElement","innerHTML","getElementsByTagName","oldScript","newScript","attributes","attr","setAttribute","textContent","parentNode","removeChild","body","appendChild","error","_x4","_x5","addFetch","_x3","_processNext","_callee6","_callee6$","_context6","processNext","_x6","race","filter","all","queryArg","syncHFSpacesURLHash","hasExplicitRequest","handleExplicitSectionRequest","updateHashBasedOnHashChange","setupScrollMonitoring","urlParams","URLSearchParams","window","location","search","sectionId","get","targetElement","getElementById","scrollIntoView","history","replaceState","isScrolling","lastKnownScrollPosition","initialScroll","addEventListener","scrollY","requestAnimationFrame","updateHashBasedOnScroll","scrollPosition","closestHeading","findClosestHeading","hash","silentlyUpdateHash","postMessageToHFSpaces","headingsWithIds","closestDistance","Infinity","viewportMiddle","innerHeight","heading","headingTop","getBoundingClientRect","top","distance","abs","elementId","parentOrigin","parent","postMessage","queryString","log","init_memory_plot","once"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/style.css b/dist/style.css new file mode 100644 index 0000000000000000000000000000000000000000..b578d8cb36dba9c05b860014ecb47abaf952e97b --- /dev/null +++ b/dist/style.css @@ -0,0 +1,599 @@ +/* style.css */ +/* Define colors */ +:root { + --distill-gray: rgb(107, 114, 128); + --distill-gray-light: rgb(185, 185, 185); + --distill-gray-lighter: rgb(228, 228, 228); + --distill-gray-lightest: rgb(245, 245, 245); + --distill-blue: #007BFF; +} + +/* Container for the controls */ +[id^="plot-"] { + display: flex; + flex-direction: column; + align-items: center; + gap: 15px; /* Adjust the gap between controls as needed */ +} +[id^="plot-"] figure { + margin-bottom: 0px; + margin-top: 0px; + padding: 0px; +} +.plotly_caption { + font-style: italic; + margin-top: 10px; +} + +.plotly_controls { + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: center; + align-items: flex-start; + gap: 30px; +} + + +.plotly_input_container { + display: flex; + align-items: center; + flex-direction: column; + gap: 10px; +} + +/* Style for the select dropdown */ +.plotly_input_container > select { + padding: 2px 4px; + /* border: 1px solid #ccc; */ + line-height: 1.5em; + text-align: center; + border-radius: 4px; + font-size: 12px; + background-color: var(--distill-gray-lightest); + outline: none; +} + +/* Style for the range input */ + +.plotly_slider { + display: flex; + align-items: center; + gap: 10px; +} + +.plotly_slider > input[type="range"] { + -webkit-appearance: none; + height: 2px; + background: var(--distill-gray-light); + border-radius: 5px; + outline: none; +} + +.plotly_slider > span { + font-size: 14px; + line-height: 1.6em; + min-width: 16px; +} + +.plotly_slider > input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 18px; + height: 18px; + border-radius: 50%; + background: var(--distill-blue); + cursor: pointer; +} + +.plotly_slider > input[type="range"]::-moz-range-thumb { + width: 18px; + height: 18px; + border-radius: 50%; + background: var(--distill-blue); + cursor: pointer; +} + +/* Style for the labels */ +.plotly_input_container > label { + font-size: 14px; + font-weight: bold; +} + +.main-plot-container { + margin-top: 21px; + margin-bottom: 35px; +} + +.main-plot-container > figure { + display: block !important; + /* Let this be handled by graph-container */ + margin-bottom: 0px; + margin-top: 0px; +} +.main-plot-container > div { + display: none !important; +} + + +@media (min-width: 768px) { + .main-plot-container > figure { + display: none !important; + } + .main-plot-container > div { + display: flex !important; + } +} + +d-byline .byline { + grid-template-columns: 1fr; + grid-column: text; + font-size: 0.9rem; + line-height: 1.8em; +} + +@media (min-width: 768px) { + d-byline .byline { + grid-template-columns: 5fr 1fr 1fr; + } +} + +#title-plot { + margin-top: 0px; + margin-bottom: 0px; +} + +d-contents > nav a.active { + text-decoration: underline; +} + +@media (max-width: 1199px) { + d-contents { + display: none; + background: white; + justify-self: start; + align-self: start; + padding-bottom: 0.5em; + margin-bottom: 1em; + padding-left: 0.25em; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: rgba(0, 0, 0, 0.1); + overflow-y: scroll; + height: calc(100vh - 40px); + scrollbar-width: none; + z-index: -100; + } +} + +d-contents a:hover { + border-bottom: none; +} + +toc-title { + font-weight: bold; + font-size: 1.2em; + color: #333; +} + +toggle-icon { + transition: transform 0.3s; +} + +toggle-icon.collapsed { + transform: rotate(90deg); +} + +.toc-content { + margin-top: 15px; + overflow: hidden; + /* max-height: 1000px; */ + transition: max-height 0.3s ease-out; +} + +.toc-content.collapsed { + max-height: 0; + margin-top: 0; +} + +@media (min-width: 1200px) { + d-article { + /* Ensure d-article does not prevent sticky positioning */ + overflow: visible; + } + + d-contents { + align-self: start; + background: white; + grid-column-start: 1 !important; + grid-column-end: 4 !important; + grid-row: auto / span 6; + justify-self: end; + margin-top: 0em; + padding-right: 3em; + padding-left: 2em; + /* border-right: 1px solid rgba(0, 0, 0, 0.1); + border-right-width: 1px; + border-right-style: solid; + border-right-color: rgba(0, 0, 0, 0.1); */ + position: -webkit-sticky; /* For Safari */ + position: sticky; + top: 10px; /* Adjust this value if needed */ + overflow-y: auto; + height: calc(100vh - 40px); + scrollbar-width: none; + transition: max-height 0.3s ease-out; + z-index: -100; + } +} + +d-contents nav h3 { + margin-top: 0; + margin-bottom: 1em; +} + +d-contents nav div div { + color: rgba(0, 0, 0, 0.8); + font-weight: bold; +} + +d-contents nav a { + color: rgba(0, 0, 0, 0.8); + border-bottom: none; + text-decoration: none; +} + +d-contents li { + list-style-type: none; +} + +d-contents ul, d-article d-contents ul { + padding-left: 1em; +} + +d-contents nav ul li { + margin-bottom: .25em; +} + +d-contents nav a:hover { + text-decoration: underline solid rgba(0, 0, 0, 0.6); +} + +d-contents nav ul { + margin-top: 0; + margin-bottom: 6px; +} + + +d-contents nav > div { + display: block; + outline: none; + margin-bottom: 0.5em; +} + +d-contents nav > div > a { + font-size: 13px; + font-weight: 600; +} + +d-article aside { + margin-bottom: 1em; +} + +d-article img { + max-width: 100%; +} + +@media (min-width: 768px) { + d-article aside { + margin-bottom: 0; + } +} + +d-contents nav > div > a:hover, +d-contents nav > ul > li > a:hover { + text-decoration: none; +} + +.note-box { + background-color: #f6f8fa; + border-left: 4px solid #444444; + padding: 1rem; + margin: 1rem 0; /* Keep this modest margin */ + border-radius: 6px; + /* Add this to ensure the box only takes up needed space */ + display: inline-block; + width: 100%; +} + +.note-box-title { + margin: 0; + color: #444444; + font-weight: 600; + font-size: 1em; +} + +.note-box-content { + margin-top: 0.5rem; + margin-bottom: 0; /* Ensure no bottom margin */ + color: #24292f; + font-size: 0.9em; + line-height: 1.5em; +} + +/* For dark mode support */ +@media (prefers-color-scheme: dark) { + .note-box { + background-color: #1c1c1c; + border-left-color: #888888; + } + .note-box-title { + color: #888888; + } + .note-box-content { + color: #d4d4d4; + } +} + +d-article { + font-size: 1.0em; +} + +.figure-legend { + font-size: 0.9em; + font-style: italic; + color: var(--distill-gray); + line-height: 1.5em; +} + +d-code { + font-size: 12px; +} + +.large-image-background { + width: 100vw; + padding-top: 10px; + padding-bottom: 10px; + margin-left: calc(-50vw + 50%); + margin-right: calc(-50vw + 50%); + background: white; + height: fit-content; /* This will make it match the image height */ + display: flex; + justify-content: center; /* This will center your image */ +} + +.large-image-background-transparent { + /* width: 100vw; */ + padding-top: 10px; + padding-bottom: 10px; + /* margin-left: calc(-50vw + 50%); */ + margin-left:-100px; + margin-right: -100px; + /* margin-right: calc(-50vw + 50%); */ + /* background: white; */ + height: fit-content; /* This will make it match the image height */ + display: flex; + justify-content: center; /* This will center your image */ +} + +.boxed-image { + padding: 0.5rem; + background: white; + border-radius: 12px; + border: 1px solid #e5e7eb; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +d-article li { + margin-bottom: 0.0em; +} + +d-article ul ul { + margin-bottom: 0.0em; +} + +d-article ol ol { + margin-bottom: 0.0em; +} + +d-article hr { + grid-column: text; +} + +/* Memory visualization */ +#graph-all { + min-width: 500px; + margin-right: 10px; + margin-bottom: 2rem; + padding: 0.5rem; + background: #f9fafb; + border-radius: 12px; + border: 1px solid #e5e7eb; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + + +/* Main container styles */ +#controls { + max-width: 1200px; + /* margin: 2rem auto; */ + margin-bottom: 2rem; + margin-left: 10px; + padding: 0.6rem; + background: #f9fafb; + border-radius: 12px; + border: 1px solid #e5e7eb; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +/* Grid layout */ +#controls { + display: grid; + grid-template-columns: 1fr 1fr; + /* gap: 2rem; */ +} + +/* Cell styles */ +.cell { + margin-bottom: 0.2rem; +} + +/* Label styles */ +label { + display: block; + /* margin-bottom: 0.5rem; */ + font-size: 0.8rem; + font-weight: 500; + color: #374151; +} + +/* Input container for range + number combination */ +.input-container { + display: flex; + gap: 1rem; + align-items: center; +} + +/* Range input styling */ +input[type="range"] { + flex: 1; + height: 6px; + background: #e5e7eb; + border-radius: 3px; + appearance: none; + outline: none; +} + +input[type="range"]::-webkit-slider-thumb { + appearance: none; + width: 16px; + height: 16px; + background: #3b82f6; + border-radius: 50%; + cursor: pointer; + transition: background 0.15s ease; +} + +input[type="range"]::-webkit-slider-thumb:hover { + background: #2563eb; +} + +/* Number input styling */ +input[type="number"] { + width: 80px; + padding: 0.5rem; + border: 1px solid #e5e7eb; + border-radius: 6px; + font-size: 0.9rem; + color: #374151; +} + +/* Select styling */ +select { + width: 100%; + padding: 0.5rem; + border: 1px solid #e5e7eb; + border-radius: 6px; + background: white; + font-size: 0.9rem; + color: #374151; + cursor: pointer; +} + +/* Checkbox styling */ +input[type="checkbox"] { + width: 1.2rem; + height: 1.2rem; + margin-right: 0.5rem; + border: 2px solid #e5e7eb; + border-radius: 4px; + cursor: pointer; +} + +/* Column specific styles */ +.column-1 { + padding-right: 0.5rem; +} + +.column-2 { + padding-left: 0.5rem; +} + +/* Checkbox container */ +.checkbox-container { + display: flex; + align-items: center; + margin-bottom: 1rem; +} + +/* Memory visualization styles */ +.memory-block { + background: #fff; + border-radius: 8px; + padding: 1rem; + margin-bottom: 1rem; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); +} + +.memory-title { + font-size: 1.1rem; + font-weight: 500; + color: #374151; + margin-bottom: 0.5rem; +} + +.memory-value { + font-size: 1.5rem; + font-weight: 600; + color: #3b82f6; +} + +/* Responsive adjustments */ +@media (max-width: 768px) { + #controls { + grid-template-columns: 1fr; + padding: 1rem; + } + + .column-1, .column-2 { + padding: 0; + } +} + +/* Hover states and transitions */ +input:hover, select:hover { + border-color: #3b82f6; +} + +input:focus, select:focus { + border-color: #2563eb; + outline: none; + box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); +} + +/* Add smooth transitions */ +input, select, button { + transition: all 0.15s ease; +} + +/* Preset dropdown special styling */ +select[name="presets"] { + background-color: #f3f4f6; + font-weight: 500; +} + +/* Memory graph enhancements */ +.activation-memory { + background: #dbeafe; + padding: 1rem; + border-radius: 8px; + margin-bottom: 1rem; +} + +.gradient-memory { + background: #ede9fe; + padding: 1rem; + border-radius: 8px; +} + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..74c4011824d21bd296dcc38eb26e048ff8cf519f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,9046 @@ +{ + "name": "blogpost", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "blogpost", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "d3": "^7.9.0", + "katex": "^0.16.11", + "lodash": "^4.17.21", + "papaparse": "^5.4.1", + "plotly.js-basic-dist-min": "^2.33.0" + }, + "devDependencies": { + "@babel/preset-env": "^7.24.6", + "@swc/html": "^1.10.17", + "babel-loader": "^9.1.3", + "clean-webpack-plugin": "^4.0.0", + "compression-webpack-plugin": "^11.1.0", + "copy-webpack-plugin": "^12.0.2", + "css-loader": "^7.1.2", + "fs": "^0.0.1-security", + "handlebars": "^4.7.8", + "html-minimizer-webpack-plugin": "^5.0.0", + "html-webpack-change-assets-extension-plugin": "^1.3.1", + "html-webpack-plugin": "^5.6.0", + "image-minimizer-webpack-plugin": "^4.1.3", + "sharp": "^0.33.5", + "style-loader": "^4.0.0", + "svgo": "^3.3.2", + "webpack": "^5.91.0", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^5.0.4" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", + "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.8.tgz", + "integrity": "sha512-l+lkXCHS6tQEc5oUpK28xBOZ6+HwaH7YwoYQbLFiYb4nS2/l1tKnZEtEWkD0GuiYdvArf9qBS0XlQGXzPMsNqQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.8", + "@babel/helper-compilation-targets": "^7.26.5", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.7", + "@babel/parser": "^7.26.8", + "@babel/template": "^7.26.8", + "@babel/traverse": "^7.26.8", + "@babel/types": "^7.26.8", + "@types/gensync": "^1.0.0", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.8.tgz", + "integrity": "sha512-ef383X5++iZHWAXX0SXQR6ZyQhw/0KtTkrTz61WXRhFM6dhpHulO/RJz79L8S6ugZHJkOOkUrUdxgdF2YiPFnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.26.8", + "@babel/types": "^7.26.8", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", + "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", + "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.26.5", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.9.tgz", + "integrity": "sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/traverse": "^7.25.9", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.26.3.tgz", + "integrity": "sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "regexpu-core": "^6.2.0", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.3.tgz", + "integrity": "sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz", + "integrity": "sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.9.tgz", + "integrity": "sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", + "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz", + "integrity": "sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-wrap-function": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.26.5.tgz", + "integrity": "sha512-bJ6iIVdYX1YooY2X7w1q6VITt+LnUILtNk7zT78ykuwStx8BauCzxvFqFaHjOpW1bVnSUM1PN1f0p5P21wHxvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/traverse": "^7.26.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", + "integrity": "sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.9.tgz", + "integrity": "sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.7.tgz", + "integrity": "sha512-8NHiL98vsi0mbPQmYAGWwfcFaOy4j2HY49fXJCfuDcdE7fMIsH9a7GdaeXpIBsbT7307WU8KCMp5pUVDNL4f9A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.8.tgz", + "integrity": "sha512-TZIQ25pkSoaKEYYaHbbxkfL36GNsQ6iFiBbeuzAkLnXayKR1yP1zFe+NxuZWWsUyvt8icPU9CCq0sgWGXR1GEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz", + "integrity": "sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.9.tgz", + "integrity": "sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.9.tgz", + "integrity": "sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.9.tgz", + "integrity": "sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/plugin-transform-optional-chaining": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.9.tgz", + "integrity": "sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz", + "integrity": "sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.9.tgz", + "integrity": "sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.26.8.tgz", + "integrity": "sha512-He9Ej2X7tNf2zdKMAGOsmg2MrFc+hfoAhd3po4cWfo/NWjzEAKa0oQruj1ROVUdl0e6fb6/kE/G3SSxE0lRJOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.26.5", + "@babel/helper-remap-async-to-generator": "^7.25.9", + "@babel/traverse": "^7.26.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz", + "integrity": "sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-remap-async-to-generator": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.26.5.tgz", + "integrity": "sha512-chuTSY+hq09+/f5lMj8ZSYgCFpppV2CbYrhNFJ1BFoXpiWPnnAb7R0MqrafCpN8E1+YRrtM1MXZHJdIx8B6rMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.26.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.9.tgz", + "integrity": "sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz", + "integrity": "sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.26.0.tgz", + "integrity": "sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.9.tgz", + "integrity": "sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9", + "@babel/traverse": "^7.25.9", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.9.tgz", + "integrity": "sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/template": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz", + "integrity": "sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.9.tgz", + "integrity": "sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.9.tgz", + "integrity": "sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.9.tgz", + "integrity": "sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.9.tgz", + "integrity": "sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz", + "integrity": "sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.9.tgz", + "integrity": "sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.9.tgz", + "integrity": "sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.9.tgz", + "integrity": "sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.9.tgz", + "integrity": "sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.9.tgz", + "integrity": "sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.9.tgz", + "integrity": "sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.9.tgz", + "integrity": "sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.9.tgz", + "integrity": "sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz", + "integrity": "sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.9.tgz", + "integrity": "sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.9.tgz", + "integrity": "sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.9.tgz", + "integrity": "sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.9.tgz", + "integrity": "sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.26.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.26.6.tgz", + "integrity": "sha512-CKW8Vu+uUZneQCPtXmSBUC6NCAUdya26hWCElAWh5mVSlSRsmiCPUUDKb3Z0szng1hiAJa098Hkhg9o4SE35Qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.26.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.9.tgz", + "integrity": "sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.9.tgz", + "integrity": "sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-transform-parameters": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.9.tgz", + "integrity": "sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.9.tgz", + "integrity": "sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.9.tgz", + "integrity": "sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz", + "integrity": "sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz", + "integrity": "sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.9.tgz", + "integrity": "sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.9.tgz", + "integrity": "sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.9.tgz", + "integrity": "sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "regenerator-transform": "^0.15.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regexp-modifiers": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.26.0.tgz", + "integrity": "sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.9.tgz", + "integrity": "sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz", + "integrity": "sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.9.tgz", + "integrity": "sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.9.tgz", + "integrity": "sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.26.8.tgz", + "integrity": "sha512-OmGDL5/J0CJPJZTHZbi2XpO0tyT2Ia7fzpW5GURwdtp2X3fMmN8au/ej6peC/T33/+CRiIpA8Krse8hFGVmT5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.26.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.26.7.tgz", + "integrity": "sha512-jfoTXXZTgGg36BmhqT3cAYK5qkmqvJpvNrPhaK/52Vgjhw4Rq29s9UqpWWV0D6yuRmgiFH/BUVlkl96zJWqnaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.26.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz", + "integrity": "sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.9.tgz", + "integrity": "sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.9.tgz", + "integrity": "sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.9.tgz", + "integrity": "sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.26.8.tgz", + "integrity": "sha512-um7Sy+2THd697S4zJEfv/U5MHGJzkN2xhtsR3T/SWRbVSic62nbISh51VVfU9JiO/L/Z97QczHTaFVkOU8IzNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.26.8", + "@babel/helper-compilation-targets": "^7.26.5", + "@babel/helper-plugin-utils": "^7.26.5", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.9", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.9", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.9", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.9", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.9", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", + "@babel/plugin-syntax-import-assertions": "^7.26.0", + "@babel/plugin-syntax-import-attributes": "^7.26.0", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.25.9", + "@babel/plugin-transform-async-generator-functions": "^7.26.8", + "@babel/plugin-transform-async-to-generator": "^7.25.9", + "@babel/plugin-transform-block-scoped-functions": "^7.26.5", + "@babel/plugin-transform-block-scoping": "^7.25.9", + "@babel/plugin-transform-class-properties": "^7.25.9", + "@babel/plugin-transform-class-static-block": "^7.26.0", + "@babel/plugin-transform-classes": "^7.25.9", + "@babel/plugin-transform-computed-properties": "^7.25.9", + "@babel/plugin-transform-destructuring": "^7.25.9", + "@babel/plugin-transform-dotall-regex": "^7.25.9", + "@babel/plugin-transform-duplicate-keys": "^7.25.9", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.9", + "@babel/plugin-transform-dynamic-import": "^7.25.9", + "@babel/plugin-transform-exponentiation-operator": "^7.26.3", + "@babel/plugin-transform-export-namespace-from": "^7.25.9", + "@babel/plugin-transform-for-of": "^7.25.9", + "@babel/plugin-transform-function-name": "^7.25.9", + "@babel/plugin-transform-json-strings": "^7.25.9", + "@babel/plugin-transform-literals": "^7.25.9", + "@babel/plugin-transform-logical-assignment-operators": "^7.25.9", + "@babel/plugin-transform-member-expression-literals": "^7.25.9", + "@babel/plugin-transform-modules-amd": "^7.25.9", + "@babel/plugin-transform-modules-commonjs": "^7.26.3", + "@babel/plugin-transform-modules-systemjs": "^7.25.9", + "@babel/plugin-transform-modules-umd": "^7.25.9", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.9", + "@babel/plugin-transform-new-target": "^7.25.9", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.26.6", + "@babel/plugin-transform-numeric-separator": "^7.25.9", + "@babel/plugin-transform-object-rest-spread": "^7.25.9", + "@babel/plugin-transform-object-super": "^7.25.9", + "@babel/plugin-transform-optional-catch-binding": "^7.25.9", + "@babel/plugin-transform-optional-chaining": "^7.25.9", + "@babel/plugin-transform-parameters": "^7.25.9", + "@babel/plugin-transform-private-methods": "^7.25.9", + "@babel/plugin-transform-private-property-in-object": "^7.25.9", + "@babel/plugin-transform-property-literals": "^7.25.9", + "@babel/plugin-transform-regenerator": "^7.25.9", + "@babel/plugin-transform-regexp-modifiers": "^7.26.0", + "@babel/plugin-transform-reserved-words": "^7.25.9", + "@babel/plugin-transform-shorthand-properties": "^7.25.9", + "@babel/plugin-transform-spread": "^7.25.9", + "@babel/plugin-transform-sticky-regex": "^7.25.9", + "@babel/plugin-transform-template-literals": "^7.26.8", + "@babel/plugin-transform-typeof-symbol": "^7.26.7", + "@babel/plugin-transform-unicode-escapes": "^7.25.9", + "@babel/plugin-transform-unicode-property-regex": "^7.25.9", + "@babel/plugin-transform-unicode-regex": "^7.25.9", + "@babel/plugin-transform-unicode-sets-regex": "^7.25.9", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.11.0", + "babel-plugin-polyfill-regenerator": "^0.6.1", + "core-js-compat": "^3.40.0", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.26.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.7.tgz", + "integrity": "sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.8.tgz", + "integrity": "sha512-iNKaX3ZebKIsCvJ+0jd6embf+Aulaa3vNBqZ41kM7iTWjx5qzWKXGHiJUW3+nTpQ18SG11hdF8OAzKrpXkb96Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.8", + "@babel/types": "^7.26.8" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.8.tgz", + "integrity": "sha512-nic9tRkjYH0oB2dzr/JoGIm+4Q6SuYeLEiIiZDwBscRMYFJ+tMAz98fuel9ZnbXViA2I0HVSSRRK8DW5fjXStA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.8", + "@babel/parser": "^7.26.8", + "@babel/template": "^7.26.8", + "@babel/types": "^7.26.8", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.8.tgz", + "integrity": "sha512-eUuWapzEGWFEpHFxgEaBG8e3n6S8L3MSu0oda755rOfabWPnh0Our1AozNFVUxGFIhbKgd1ksprsoDGMinTOTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz", + "integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", + "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", + "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", + "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", + "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", + "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", + "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz", + "integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", + "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", + "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", + "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", + "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.5" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", + "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz", + "integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", + "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", + "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", + "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz", + "integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.2.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz", + "integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", + "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jsonjoy.com/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-q6XAnWQDIMA3+FTiOYajoYqySkO+JSat0ytXGSuRdq9uXE7o92gzuQwQM14xaCRlBLGq3v5miDGC4vkVTn54xA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pack": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.1.1.tgz", + "integrity": "sha512-osjeBqMJ2lb/j/M8NCPjs1ylqWIcTRTycIhVB5pt6LgzgeRSb0YRZ7j9RfA8wIUrsr/medIuhVyonXRZWLyfdw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/base64": "^1.1.1", + "@jsonjoy.com/util": "^1.1.2", + "hyperdyperid": "^1.2.0", + "thingies": "^1.20.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/util": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.5.0.tgz", + "integrity": "sha512-ojoNsrIuPI9g6o8UxhraZQSyF2ByJanAY4cTFbc8Mf2AXEF4aQRGY1dJxyJpuyav8r9FGflEt/Ff3u5Nt6YMPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@leichtgewicht/ip-codec": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", + "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@polka/url": { + "version": "1.0.0-next.28", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", + "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@swc/counter": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", + "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@swc/html": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html/-/html-1.10.17.tgz", + "integrity": "sha512-09FlMxnNsrwijpwYAJnDCUaQs+VV0BTiC84PAZv21uZjdCuKBMFDj4WuZJEmb05gxFd8YHGdkQ6XJX04AU+FWQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/counter": "^0.1.3" + }, + "engines": { + "node": ">=14" + }, + "optionalDependencies": { + "@swc/html-darwin-arm64": "1.10.17", + "@swc/html-darwin-x64": "1.10.17", + "@swc/html-linux-arm-gnueabihf": "1.10.17", + "@swc/html-linux-arm64-gnu": "1.10.17", + "@swc/html-linux-arm64-musl": "1.10.17", + "@swc/html-linux-x64-gnu": "1.10.17", + "@swc/html-linux-x64-musl": "1.10.17", + "@swc/html-win32-arm64-msvc": "1.10.17", + "@swc/html-win32-ia32-msvc": "1.10.17", + "@swc/html-win32-x64-msvc": "1.10.17" + } + }, + "node_modules/@swc/html-darwin-arm64": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html-darwin-arm64/-/html-darwin-arm64-1.10.17.tgz", + "integrity": "sha512-WcmB5IREZTS8QNwTjwHM2o3H7wARB0xt9D8GFK2UqisvvQmIJ1kMIOvq1afpuwuk6zvC2+yGEhUdyj4upRql7g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/html-darwin-x64": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html-darwin-x64/-/html-darwin-x64-1.10.17.tgz", + "integrity": "sha512-sZXO7t8EE3F0BdHBiGgVdBXbpQ6dOb6UW1ZiGV1wOmMfTnV/ePp9nCkPQO1he4/X7m8BuYfHSey8LpyL61s/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/html-linux-arm-gnueabihf": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html-linux-arm-gnueabihf/-/html-linux-arm-gnueabihf-1.10.17.tgz", + "integrity": "sha512-yM8OxQqo2V4sLEt9YTPe36zKXdKwFrymkCA0GDsNvEG+iWErwWQVo4tZ7kAHjIn9PMwKMi2fAU4JcallRWmGPg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/html-linux-arm64-gnu": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html-linux-arm64-gnu/-/html-linux-arm64-gnu-1.10.17.tgz", + "integrity": "sha512-4R0xSrEGp8WUN78L6UXWCu/2ZhxTjVeGYC6BzaNyxp9YHxht3kmOQs9kaEnXjCVEBm1eKh4ggjfgnXJqe2s1pw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/html-linux-arm64-musl": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html-linux-arm64-musl/-/html-linux-arm64-musl-1.10.17.tgz", + "integrity": "sha512-LPMPOnKpsDYF8zMR0hthh03EtXGs/h/LM+DcSoLYyvgBaExZpfmgTTHCPHJDiN88xYqB7OqgOZ0wWRi361i5xw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/html-linux-x64-gnu": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html-linux-x64-gnu/-/html-linux-x64-gnu-1.10.17.tgz", + "integrity": "sha512-/uksnJOw/nRQLewgj1Y7cJIp2B6fLD72btQqQfs6qL9BossQ9k0tJNkvzkwEQkvmBlY57bS2ib1UncfbuItjjQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/html-linux-x64-musl": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html-linux-x64-musl/-/html-linux-x64-musl-1.10.17.tgz", + "integrity": "sha512-T8khycSbXnAAU6I2Wzt+oDN7zrkdC6OzMwkjNHw5n7vcCxNf0rRwROImk478iqcn9445TraB1bt7WRufpoWaZw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/html-win32-arm64-msvc": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html-win32-arm64-msvc/-/html-win32-arm64-msvc-1.10.17.tgz", + "integrity": "sha512-e1BISe/iHPj6yCvgo7B54T+yXB9NDGZkFVNwO5Yc4wbo8IpiTdJjrDXflcXyOxIqprQ/LN+k8CXo9G1JjU7qiQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/html-win32-ia32-msvc": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html-win32-ia32-msvc/-/html-win32-ia32-msvc-1.10.17.tgz", + "integrity": "sha512-WT+Xw/N/nZ02ZvDtF2rVNI/OEp8oBG6A71LmT4BYh5M7IlVcJseztQfMKlQG0h2yxZVFSgGt10RsKNLza2IKzA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@swc/html-win32-x64-msvc": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@swc/html-win32-x64-msvc/-/html-win32-x64-msvc-1.10.17.tgz", + "integrity": "sha512-YUb5cHwRIPPGoayh9yozD05OiMxAqMXNIMTPLW+wLXNfmO0nNP1ea98fdUR9TUyV9NPbwcdA22wZ/JMd1uEfIA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=10" + } + }, + "node_modules/@trysound/sax": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", + "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@types/body-parser": { + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/bonjour": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.13.tgz", + "integrity": "sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect-history-api-fallback": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.4.tgz", + "integrity": "sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express-serve-static-core": "*", + "@types/node": "*" + } + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", + "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/express": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.0.6.tgz", + "integrity": "sha512-3xhRnjJPkULekpSzgtoNYYcTWgEZkp4myc+Saevii5JPnHNvHMRlBSHDbs7Bh1iPPoVTERHEZXyhyLbMEsExsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/express/node_modules/@types/express-serve-static-core": { + "version": "4.19.6", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", + "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/gensync": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/gensync/-/gensync-1.0.4.tgz", + "integrity": "sha512-C3YYeRQWp2fmq9OryX+FoDy8nXS6scQ7dPptD8LnFDAUNcKWJjXQKDNJD3HVm+kOUsXhTOkpi69vI4EuAr95bA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/html-minifier-terser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", + "integrity": "sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/http-errors": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/http-proxy": { + "version": "1.17.16", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.16.tgz", + "integrity": "sha512-sdWoUajOB1cd0A8cRRQ1cfyWNbmFKLAqBB89Y8x5iYyG/mkJHc0YUH8pdWBy2omi9qtCpiIgGjuwO0dQST2l5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mime": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.13.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.1.tgz", + "integrity": "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/node-forge": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", + "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/qs": { + "version": "6.9.18", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.18.tgz", + "integrity": "sha512-kK7dgTYDyGqS+e2Q4aK9X3D7q234CIZ1Bv0q/7Z5IwRDoADNU81xXJK/YVyLbLTZCoIwUoDoffFeF+p/eIklAA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/retry": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz", + "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-index": { + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.4.tgz", + "integrity": "sha512-qLpGZ/c2fhSs5gnYsQxtDEq3Oy8SXPClIXkW5ghvAvsNuVSA8k+gCONcUCS/UjLEYvYps+e8uBtfgXgvhwfNug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*", + "@types/send": "*" + } + }, + "node_modules/@types/sockjs": { + "version": "0.3.36", + "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.36.tgz", + "integrity": "sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ws": { + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.14.tgz", + "integrity": "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@webassemblyjs/ast": "1.14.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts/node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/ansi-html-community": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", + "dev": true, + "engines": [ + "node >= 0.8.0" + ], + "license": "Apache-2.0", + "bin": { + "ansi-html": "bin/ansi-html" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-loader": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.2.1.tgz", + "integrity": "sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-cache-dir": "^4.0.0", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0", + "webpack": ">=5" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.12.tgz", + "integrity": "sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.6.3", + "semver": "^6.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.11.1.tgz", + "integrity": "sha512-yGCqvBT4rwMczo28xkH/noxJ6MZ4nJfkVYdoDaC/utLtWrXxv27HVrzAeSbqR8SxDsp46n0YF47EbHoixy6rXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.3", + "core-js-compat": "^3.40.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.3.tgz", + "integrity": "sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.3" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true, + "license": "MIT" + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/body-parser": { + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.13.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/bonjour-service": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", + "integrity": "sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "multicast-dns": "^7.2.5" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true, + "license": "ISC" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bundle-name": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", + "integrity": "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camel-case": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", + "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "pascal-case": "^3.1.2", + "tslib": "^2.0.3" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001699", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001699.tgz", + "integrity": "sha512-b+uH5BakXZ9Do9iK+CkDmctUSEqZl+SP056vc5usa0PL+ev5OHw003rZXcnjNDv3L8P5j6rwT6C0BPKSikW08w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/clean-css": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", + "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "source-map": "~0.6.0" + }, + "engines": { + "node": ">= 10.0" + } + }, + "node_modules/clean-webpack-plugin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-4.0.0.tgz", + "integrity": "sha512-WuWE1nyTNAyW5T7oNyys2EN0cfP2fdRxhxnIQWiAp0bMabPdHhoGxM8A6YL2GhqwgrPnnaemVE7nv5XJ2Fhh2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "del": "^4.1.1" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "webpack": ">=4.0.0 <6.0.0" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/common-path-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", + "dev": true, + "license": "ISC" + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.0.tgz", + "integrity": "sha512-k6WLKfunuqCYD3t6AsuPGvQWaKwuLLh2/xHNcX4qE+vIfDNXpSqnrhwA7O53R7WVQUnt8dVAIW+YHr7xTgOgGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "compressible": "~2.0.18", + "debug": "2.6.9", + "negotiator": "~0.6.4", + "on-headers": "~1.0.2", + "safe-buffer": "5.2.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression-webpack-plugin": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/compression-webpack-plugin/-/compression-webpack-plugin-11.1.0.tgz", + "integrity": "sha512-zDOQYp10+upzLxW+VRSjEpRRwBXJdsb5lBMlRxx1g8hckIFBpe3DTI0en2w7h+beuq89576RVzfiXrkdPGrHhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/connect-history-api-fallback": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", + "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cookie": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/copy-webpack-plugin": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz", + "integrity": "sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.1", + "globby": "^14.0.0", + "normalize-path": "^3.0.0", + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/core-js-compat": { + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.40.0.tgz", + "integrity": "sha512-0XEDpr5y5mijvw8Lbc6E5AkjrHfp7eEoPlu36SWeAbcL8fn1G1ANe8DBlo2XoNN89oVpxWwOjYIPVzR4ZvsKCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "browserslist": "^4.24.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-loader": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz", + "integrity": "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==", + "dev": true, + "license": "MIT", + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.27.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/css-loader/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "license": "MIT", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/csso": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", + "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "css-tree": "~2.2.0" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/csso/node_modules/css-tree": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", + "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", + "dev": true, + "license": "MIT", + "dependencies": { + "mdn-data": "2.0.28", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/csso/node_modules/mdn-data": { + "version": "2.0.28", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", + "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/d3": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", + "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==", + "license": "ISC", + "dependencies": { + "d3-array": "3", + "d3-axis": "3", + "d3-brush": "3", + "d3-chord": "3", + "d3-color": "3", + "d3-contour": "4", + "d3-delaunay": "6", + "d3-dispatch": "3", + "d3-drag": "3", + "d3-dsv": "3", + "d3-ease": "3", + "d3-fetch": "3", + "d3-force": "3", + "d3-format": "3", + "d3-geo": "3", + "d3-hierarchy": "3", + "d3-interpolate": "3", + "d3-path": "3", + "d3-polygon": "3", + "d3-quadtree": "3", + "d3-random": "3", + "d3-scale": "4", + "d3-scale-chromatic": "3", + "d3-selection": "3", + "d3-shape": "3", + "d3-time": "3", + "d3-time-format": "4", + "d3-timer": "3", + "d3-transition": "3", + "d3-zoom": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-axis": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", + "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-brush": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", + "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "3", + "d3-transition": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-chord": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", + "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", + "license": "ISC", + "dependencies": { + "d3-path": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-contour": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", + "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", + "license": "ISC", + "dependencies": { + "d3-array": "^3.2.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-delaunay": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", + "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", + "license": "ISC", + "dependencies": { + "delaunator": "5" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dispatch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", + "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-drag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", + "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-selection": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dsv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", + "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", + "license": "ISC", + "dependencies": { + "commander": "7", + "iconv-lite": "0.6", + "rw": "1" + }, + "bin": { + "csv2json": "bin/dsv2json.js", + "csv2tsv": "bin/dsv2dsv.js", + "dsv2dsv": "bin/dsv2dsv.js", + "dsv2json": "bin/dsv2json.js", + "json2csv": "bin/json2dsv.js", + "json2dsv": "bin/json2dsv.js", + "json2tsv": "bin/json2dsv.js", + "tsv2csv": "bin/dsv2dsv.js", + "tsv2json": "bin/dsv2json.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-fetch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", + "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", + "license": "ISC", + "dependencies": { + "d3-dsv": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-force": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", + "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-quadtree": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", + "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-geo": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz", + "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2.5.0 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-hierarchy": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", + "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-polygon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", + "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-quadtree": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", + "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-random": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", + "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale-chromatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-interpolate": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-selection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", + "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-transition": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", + "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-dispatch": "1 - 3", + "d3-ease": "1 - 3", + "d3-interpolate": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "d3-selection": "2 - 3" + } + }, + "node_modules/d3-zoom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", + "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "2 - 3", + "d3-transition": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/debounce": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", + "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/default-browser": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", + "integrity": "sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.0.tgz", + "integrity": "sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/del": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/glob": "^7.1.1", + "globby": "^6.1.0", + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/del/node_modules/globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha512-KVbFv2TQtbzCoxAnfD6JcHZTYCzyliEaaeM/gH8qQdkKr5s0OP9scEgvdcngyk7AVdY6YVW/TJHd+lQ/Df3Daw==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/del/node_modules/globby/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delaunator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.1.tgz", + "integrity": "sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==", + "license": "ISC", + "dependencies": { + "robust-predicates": "^3.0.2" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "dev": true, + "license": "MIT" + }, + "node_modules/dns-packet": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", + "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@leichtgewicht/ip-codec": "^2.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dom-converter": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", + "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", + "dev": true, + "license": "MIT", + "dependencies": { + "utila": "~0.4" + } + }, + "node_modules/dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dot-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", + "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true, + "license": "MIT" + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.97", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.97.tgz", + "integrity": "sha512-HKLtaH02augM7ZOdYRuO19rWDeY+QSJ1VxnXFa/XDFLf07HvM90pALIJFgrO+UVaajI3+aJMMpojoUTLZyQ7JQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.18.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", + "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/envinfo": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", + "dev": true, + "license": "MIT", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-module-lexer": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.6.0.tgz", + "integrity": "sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true, + "license": "MIT" + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/express": { + "version": "4.21.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", + "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.3", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.7.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.3.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.12", + "proxy-addr": "~2.0.7", + "qs": "6.13.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.19.0", + "serve-static": "1.16.2", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fastq": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", + "integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/find-cache-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", + "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "common-path-prefix": "^3.0.0", + "pkg-dir": "^7.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==", + "dev": true, + "license": "ISC" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", + "integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "function-bind": "^1.1.2", + "get-proto": "^1.0.0", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", + "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.3", + "ignore": "^7.0.3", + "path-type": "^6.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "duplexer": "^0.1.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "dev": true, + "license": "MIT" + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "node_modules/hpack.js/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/hpack.js/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/hpack.js/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/html-minifier-terser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz", + "integrity": "sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "camel-case": "^4.1.2", + "clean-css": "^5.2.2", + "commander": "^8.3.0", + "he": "^1.2.0", + "param-case": "^3.0.4", + "relateurl": "^0.2.7", + "terser": "^5.10.0" + }, + "bin": { + "html-minifier-terser": "cli.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/html-minifier-terser/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/html-minimizer-webpack-plugin": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/html-minimizer-webpack-plugin/-/html-minimizer-webpack-plugin-5.0.0.tgz", + "integrity": "sha512-m4XV1pX+X3uEWOqK5MHhZOHRC1NnEjVc+6KYzSVs9LdMfgpGka0FFogBt7E6srWy894/mQrysUDrUk+EublATw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/html-minifier-terser": "^7.0.2", + "html-minifier-terser": "^7.2.0", + "jest-worker": "^29.7.0", + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/html": { + "optional": true + } + } + }, + "node_modules/html-minimizer-webpack-plugin/node_modules/@types/html-minifier-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-7.0.2.tgz", + "integrity": "sha512-mm2HqV22l8lFQh4r2oSsOEVea+m0qqxEmwpc9kC1p/XzmjLWrReR9D/GRs8Pex2NX/imyEH9c5IU/7tMBQCHOA==", + "dev": true, + "license": "MIT" + }, + "node_modules/html-minimizer-webpack-plugin/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/html-minimizer-webpack-plugin/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/html-minimizer-webpack-plugin/node_modules/html-minifier-terser": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz", + "integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camel-case": "^4.1.2", + "clean-css": "~5.3.2", + "commander": "^10.0.0", + "entities": "^4.4.0", + "param-case": "^3.0.4", + "relateurl": "^0.2.7", + "terser": "^5.15.1" + }, + "bin": { + "html-minifier-terser": "cli.js" + }, + "engines": { + "node": "^14.13.1 || >=16.0.0" + } + }, + "node_modules/html-minimizer-webpack-plugin/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/html-webpack-change-assets-extension-plugin": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/html-webpack-change-assets-extension-plugin/-/html-webpack-change-assets-extension-plugin-1.3.1.tgz", + "integrity": "sha512-jzbUO3fhNyRaIBeUkG1VQ18QZ0Wgn8JnSvkcSVDGTnAIHJvigGJz7wR1WupoV0Sj0c8SAEzsGO9LZbXi2zwvmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "html-webpack-plugin": "^3.2.0 || ^4.0.0 || ^5.0.0", + "webpack": "^4.21.0 || ^5.0.0" + } + }, + "node_modules/html-webpack-plugin": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.3.tgz", + "integrity": "sha512-QSf1yjtSAsmf7rYBV7XX86uua4W/vkhIt0xNXKbsi2foEeW7vjJQz4bhnpL3xH+l1ryl1680uNv968Z+X6jSYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/html-minifier-terser": "^6.0.0", + "html-minifier-terser": "^6.0.2", + "lodash": "^4.17.21", + "pretty-error": "^4.0.0", + "tapable": "^2.0.0" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/html-webpack-plugin" + }, + "peerDependencies": { + "@rspack/core": "0.x || 1.x", + "webpack": "^5.20.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, + "node_modules/http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.9.tgz", + "integrity": "sha512-n1XsPy3rXVxlqxVioEWdC+0+M+SQw0DpJynwtOPo1X+ZlvdzTLtDBIJJlDQTnwZIFJrZSzSGmIOUdP8tu+SgLw==", + "dev": true, + "license": "MIT" + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-proxy-middleware": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", + "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-proxy": "^1.17.8", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "@types/express": "^4.17.13" + }, + "peerDependenciesMeta": { + "@types/express": { + "optional": true + } + } + }, + "node_modules/hyperdyperid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", + "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.18" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/ignore": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz", + "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/image-minimizer-webpack-plugin": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/image-minimizer-webpack-plugin/-/image-minimizer-webpack-plugin-4.1.3.tgz", + "integrity": "sha512-yJvYlLAZosu2iqlGF81BEUHfUiWRPD05krtoax9Ffst3Yzbn3X7p04VXambwlx3uhbSwH/BeyM5+bJHQksnuyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@squoosh/lib": { + "optional": true + }, + "imagemin": { + "optional": true + }, + "sharp": { + "optional": true + }, + "svgo": { + "optional": true + } + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ipaddr.js": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.2.0.tgz", + "integrity": "sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-network-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.1.0.tgz", + "integrity": "sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-path-in-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-path-inside": "^2.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-path-inside": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-is-inside": "^1.0.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-plain-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "license": "MIT", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.0.tgz", + "integrity": "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/katex": { + "version": "0.16.21", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.21.tgz", + "integrity": "sha512-XvqR7FgOHtWupfMiigNzmh+MgUVmDGU2kXZm899ZkPfcuoPuFxyHmXsgATDpFZDAXCI8tvinaVcDo8PIIJSo4A==", + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/katex/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/launch-editor": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.9.1.tgz", + "integrity": "sha512-Gcnl4Bd+hRO9P9icCP/RVVT2o8SFlPXofuCxvA2SaZuH45whSvf5p8x5oih5ftLiVhEI4sp5xDY+R+b3zJBh5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "picocolors": "^1.0.0", + "shell-quote": "^1.8.1" + } + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true, + "license": "MIT" + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.17.0.tgz", + "integrity": "sha512-4eirfZ7thblFmqFjywlTmuWVSvccHAJbn1r8qQLzmTO11qcqpohOjmY2mFce6x7x7WtskzRqApPD0hv+Oa74jg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jsonjoy.com/json-pack": "^1.0.3", + "@jsonjoy.com/util": "^1.3.0", + "tree-dump": "^1.0.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">= 4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/multicast-dns": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", + "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", + "dev": true, + "license": "MIT", + "dependencies": { + "dns-packet": "^5.2.2", + "thunky": "^1.0.2" + }, + "bin": { + "multicast-dns": "cli.js" + } + }, + "node_modules/nanoid": { + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/negotiator": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "dev": true, + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true, + "license": "MIT" + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/open": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", + "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.2.1", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true, + "license": "(WTFPL OR MIT)", + "bin": { + "opener": "bin/opener-bin.js" + } + }, + "node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/p-retry": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.1.tgz", + "integrity": "sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/retry": "0.12.2", + "is-network-error": "^1.0.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/papaparse": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.5.2.tgz", + "integrity": "sha512-PZXg8UuAc4PcVwLosEEDYjPyfWnTEhOrUfdv+3Bx+NuAb+5NhDmXzg5fHWmdCh1mP5p7JAZfFr3IMQfcntNAdA==", + "license": "MIT" + }, + "node_modules/param-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", + "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", + "dev": true, + "license": "MIT", + "dependencies": { + "dot-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "dev": true, + "license": "(WTFPL OR MIT)" + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-type": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", + "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pkg-dir": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", + "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^6.3.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/plotly.js-basic-dist-min": { + "version": "2.35.3", + "resolved": "https://registry.npmjs.org/plotly.js-basic-dist-min/-/plotly.js-basic-dist-min-2.35.3.tgz", + "integrity": "sha512-ZipAmyME0S5qWec6GDy2dxP+E6Qhi0X6eNwH6gy7m5YMKYSgrDYrc+/3PTPWpJsxcIMF0kqoOruX+SgH2VwOWg==", + "license": "MIT" + }, + "node_modules/postcss": { + "version": "8.5.2", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.2.tgz", + "integrity": "sha512-MjOadfU3Ys9KYoX0AdkBlFEF1Vx37uCCeN4ZHnmwm9FfpbsGWMZeBLMmmpY+6Ocqod7mkdZ0DT31OlbsFrLlkA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz", + "integrity": "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^7.0.0", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", + "dev": true, + "license": "ISC", + "dependencies": { + "postcss-selector-parser": "^7.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", + "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/pretty-error": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz", + "integrity": "sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.20", + "renderkid": "^3.0.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-addr/node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", + "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true, + "license": "MIT" + }, + "node_modules/regenerator-transform": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", + "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regexpu-core": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz", + "integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==", + "dev": true, + "license": "MIT", + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.2.0", + "regjsgen": "^0.8.0", + "regjsparser": "^0.12.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/regjsparser": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", + "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "jsesc": "~3.0.2" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/renderkid": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-3.0.0.tgz", + "integrity": "sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "css-select": "^4.1.3", + "dom-converter": "^0.2.0", + "htmlparser2": "^6.1.0", + "lodash": "^4.17.21", + "strip-ansi": "^6.0.1" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/robust-predicates": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.2.tgz", + "integrity": "sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==", + "license": "Unlicense" + }, + "node_modules/run-applescript": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", + "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", + "license": "BSD-3-Clause" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/schema-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.0.tgz", + "integrity": "sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", + "dev": true, + "license": "MIT" + }, + "node_modules/selfsigned": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", + "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node-forge": "^1.3.0", + "node-forge": "^1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/send": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/serve-index/node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-static": { + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.19.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "license": "MIT", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/sharp": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz", + "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "color": "^4.2.3", + "detect-libc": "^2.0.3", + "semver": "^7.6.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.33.5", + "@img/sharp-darwin-x64": "0.33.5", + "@img/sharp-libvips-darwin-arm64": "1.0.4", + "@img/sharp-libvips-darwin-x64": "1.0.4", + "@img/sharp-libvips-linux-arm": "1.0.5", + "@img/sharp-libvips-linux-arm64": "1.0.4", + "@img/sharp-libvips-linux-s390x": "1.0.4", + "@img/sharp-libvips-linux-x64": "1.0.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4", + "@img/sharp-libvips-linuxmusl-x64": "1.0.4", + "@img/sharp-linux-arm": "0.33.5", + "@img/sharp-linux-arm64": "0.33.5", + "@img/sharp-linux-s390x": "0.33.5", + "@img/sharp-linux-x64": "0.33.5", + "@img/sharp-linuxmusl-arm64": "0.33.5", + "@img/sharp-linuxmusl-x64": "0.33.5", + "@img/sharp-wasm32": "0.33.5", + "@img/sharp-win32-ia32": "0.33.5", + "@img/sharp-win32-x64": "0.33.5" + } + }, + "node_modules/sharp/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/shell-quote": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.2.tgz", + "integrity": "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/sirv": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", + "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", + "totalist": "^3.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sockjs": { + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", + "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "faye-websocket": "^0.11.3", + "uuid": "^8.3.2", + "websocket-driver": "^0.7.4" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/style-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-4.0.0.tgz", + "integrity": "sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.27.0" + } + }, + "node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/svgo": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.3.2.tgz", + "integrity": "sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@trysound/sax": "0.2.0", + "commander": "^7.2.0", + "css-select": "^5.1.0", + "css-tree": "^2.3.1", + "css-what": "^6.1.0", + "csso": "^5.0.5", + "picocolors": "^1.0.0" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/svgo" + } + }, + "node_modules/svgo/node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/svgo/node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/svgo/node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/svgo/node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/svgo/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/terser": { + "version": "5.38.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.38.1.tgz", + "integrity": "sha512-GWANVlPM/ZfYzuPHjq0nxT+EbOEDDN3Jwhwdg1D8TU8oSkktp8w64Uq4auuGLxFSoNTRDncTq2hQHX1Ld9KHkA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.11", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.11.tgz", + "integrity": "sha512-RVCsMfuD0+cTt3EwX8hSl2Ks56EbFHWmhluwcqoPKtBnfjiT6olaq7PRIRfhyU8nnC2MrnDrBLfrD/RGE+cVXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.25", + "jest-worker": "^27.4.5", + "schema-utils": "^4.3.0", + "serialize-javascript": "^6.0.2", + "terser": "^5.31.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/thingies": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.21.0.tgz", + "integrity": "sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==", + "dev": true, + "license": "Unlicense", + "engines": { + "node": ">=10.18" + }, + "peerDependencies": { + "tslib": "^2" + } + }, + "node_modules/thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/totalist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", + "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tree-dump": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.0.2.tgz", + "integrity": "sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true, + "license": "MIT" + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", + "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", + "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/utila": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", + "integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==", + "dev": true, + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/watchpack": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/webpack": { + "version": "5.97.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz", + "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint-scope": "^3.7.7", + "@types/estree": "^1.0.6", + "@webassemblyjs/ast": "^1.14.1", + "@webassemblyjs/wasm-edit": "^1.14.1", + "@webassemblyjs/wasm-parser": "^1.14.1", + "acorn": "^8.14.0", + "browserslist": "^4.24.0", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.11", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-bundle-analyzer": { + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz", + "integrity": "sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "0.5.7", + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "commander": "^7.2.0", + "debounce": "^1.2.1", + "escape-string-regexp": "^4.0.0", + "gzip-size": "^6.0.0", + "html-escaper": "^2.0.2", + "opener": "^1.5.2", + "picocolors": "^1.0.0", + "sirv": "^2.0.3", + "ws": "^7.3.1" + }, + "bin": { + "webpack-bundle-analyzer": "lib/bin/analyzer.js" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/webpack-cli": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", + "colorette": "^2.0.14", + "commander": "^10.0.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/webpack-dev-middleware": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.4.2.tgz", + "integrity": "sha512-xOO8n6eggxnwYpy1NlzUKpvrjfJTvae5/D6WOK0S2LSo7vjmo5gCM1DbLUmFqrMTJP+W/0YZNctm7jasWvLuBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "colorette": "^2.0.10", + "memfs": "^4.6.0", + "mime-types": "^2.1.31", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-5.2.0.tgz", + "integrity": "sha512-90SqqYXA2SK36KcT6o1bvwvZfJFcmoamqeJY7+boioffX9g9C0wjjJRGUrQIuh43pb0ttX7+ssavmj/WN2RHtA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/bonjour": "^3.5.13", + "@types/connect-history-api-fallback": "^1.5.4", + "@types/express": "^4.17.21", + "@types/serve-index": "^1.9.4", + "@types/serve-static": "^1.15.5", + "@types/sockjs": "^0.3.36", + "@types/ws": "^8.5.10", + "ansi-html-community": "^0.0.8", + "bonjour-service": "^1.2.1", + "chokidar": "^3.6.0", + "colorette": "^2.0.10", + "compression": "^1.7.4", + "connect-history-api-fallback": "^2.0.0", + "express": "^4.21.2", + "graceful-fs": "^4.2.6", + "http-proxy-middleware": "^2.0.7", + "ipaddr.js": "^2.1.0", + "launch-editor": "^2.6.1", + "open": "^10.0.3", + "p-retry": "^6.2.0", + "schema-utils": "^4.2.0", + "selfsigned": "^2.4.1", + "serve-index": "^1.9.1", + "sockjs": "^0.3.24", + "spdy": "^4.0.2", + "webpack-dev-middleware": "^7.4.2", + "ws": "^8.18.0" + }, + "bin": { + "webpack-dev-server": "bin/webpack-dev-server.js" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server/node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/webpack-merge": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "clone-deep": "^4.0.1", + "flat": "^5.0.2", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/webpack/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/webpack/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yocto-queue": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000000000000000000000000000000000000..ecd63bcc2c81d7f6417b31c2000c2c34843170d8 --- /dev/null +++ b/package.json @@ -0,0 +1,41 @@ +{ + "dependencies": { + "d3": "^7.9.0", + "katex": "^0.16.11", + "lodash": "^4.17.21", + "papaparse": "^5.4.1", + "plotly.js-basic-dist-min": "^2.33.0" + }, + "name": "blogpost", + "version": "1.0.0", + "description": "--- title: \"The Nanotron Gigablogpost\" emoji: 🍷 colorFrom: pink colorTo: red sdk: static pinned: false header: mini ---", + "main": "index.js", + "scripts": { + "dev": "webpack serve --open", + "build": "NODE_ENV=production webpack" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@babel/preset-env": "^7.24.6", + "@swc/html": "^1.10.17", + "babel-loader": "^9.1.3", + "clean-webpack-plugin": "^4.0.0", + "compression-webpack-plugin": "^11.1.0", + "copy-webpack-plugin": "^12.0.2", + "css-loader": "^7.1.2", + "fs": "^0.0.1-security", + "handlebars": "^4.7.8", + "html-minimizer-webpack-plugin": "^5.0.0", + "html-webpack-change-assets-extension-plugin": "^1.3.1", + "html-webpack-plugin": "^5.6.0", + "image-minimizer-webpack-plugin": "^4.1.3", + "sharp": "^0.33.5", + "style-loader": "^4.0.0", + "svgo": "^3.3.2", + "webpack": "^5.91.0", + "webpack-bundle-analyzer": "^4.10.2", + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^5.0.4" + } +} diff --git a/python/memory/formulas/__init__.py b/python/memory/formulas/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/python/memory/formulas/explorations.ipynb b/python/memory/formulas/explorations.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..3cc874acee99234af8e5682256f2ec7bb9c32f1d --- /dev/null +++ b/python/memory/formulas/explorations.ipynb @@ -0,0 +1,191 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "from utils import activation_memory, param_grads_opt" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": {}, + "outputs": [], + "source": [ + "def activation_memory(\n", + " a, # attention heads\n", + " b, # micro batch size\n", + " h, # hidden dimension size\n", + " h_ff, # feedforward dimension size (often h_ff = 4h)\n", + " L, # number of layers\n", + " s, # sequence length\n", + " mixed=True,\n", + " recomputation=\"none\",\n", + " ff_activation=\"relu\"\n", + " ):\n", + " \n", + " # https://arxiv.org/pdf/2205.05198\n", + " if mixed:\n", + " bytes_per_value = 2 \n", + " else:\n", + " bytes_per_value = 4\n", + "\n", + " one_layer_attention = s * b * h * (bytes_per_value * 5 + 1) + ((2 * bytes_per_value + 1) * a * s * s * b) # eq (2)\n", + "\n", + " if ff_activation == \"relu\":\n", + " one_layer_feedforward = (s * b * h * bytes_per_value + (s * b * h_ff * bytes_per_value) # inputs of 1st/2nd linear layers\n", + " + s * b * h) # dropout\n", + " elif ff_activation == \"gelu\":\n", + " one_layer_feedforward = (s * b * h * bytes_per_value + (s * b * h_ff * bytes_per_value) # inputs of 1st/2nd linear layers\n", + " + s * b * h_ff * bytes_per_value # inputs of activation function (not really necessary for Relu)\n", + " + s * b * h) # dropout\n", + " elif ff_activation == \"swiglu\":\n", + " one_layer_feedforward = (s * b * h * bytes_per_value + (s * b * h_ff * bytes_per_value) # inputs of input/output linear layers\n", + " + s * b * h_ff * bytes_per_value * 3 # inputs of activation function\n", + " + s * b * h) # dropout (note that dropout is lower-precision - boolean)\n", + "\n", + "\n", + " layer_norm = s * b * h * bytes_per_value\n", + "\n", + " if recomputation == \"none\":\n", + " one_layer = one_layer_attention + one_layer_feedforward + 2 * layer_norm # eq (2)\n", + " elif recomputation ==\"selective\":\n", + " one_layer = s * b * h * 34 # eq (6)\n", + " elif recomputation ==\"full\":\n", + " one_layer = s * b * h * 2\n", + " else:\n", + " raise ValueError()\n", + " \n", + " input_dropout = s * b * h # section 4.3\n", + "\n", + " total = L * one_layer + input_dropout\n", + " \n", + " return total\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [], + "source": [ + "a = 16\n", + "b = 3\n", + "h = 1024\n", + "h_ff = 4 * h\n", + "L = 1\n", + "s = 7 # 128000\n", + "recomputation = \"none\"\n", + "mixed = True\n", + "ff_activation = \"swiglu\"\n" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1086960" + ] + }, + "execution_count": 52, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "activation_memory(a=a, b=b, h=h, h_ff=h_ff, L=L, s=s, recomputation=recomputation, mixed=mixed, ff_activation=ff_activation)" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [], + "source": [ + "from math import log\n", + "\n", + "def format_bytes(bytes):\n", + " sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']\n", + " if bytes == 0:\n", + " return '0 Bytes'\n", + " i = int(log(bytes, 1024))\n", + " print(i)\n", + " p = 1024 ** i\n", + " s = round(bytes / p, 2)\n", + " return f\"{s} {sizes[i]}\"\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4\n" + ] + }, + { + "data": { + "text/plain": [ + "'22.13 TB'" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "format_bytes(activation_memory(a, b, h, L, s, recomputation))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "jupyter", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.14" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/python/memory/formulas/utils.py b/python/memory/formulas/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..2fae682e00593d3b760b3100498f3b397233b120 --- /dev/null +++ b/python/memory/formulas/utils.py @@ -0,0 +1,69 @@ +def activation_memory( + a, # attention heads + b, # micro batch size + h, # hidden dimension size + h_ff, # feedforward dimension size (often h_ff = 4h) + L, # number of layers + s, # sequence length + mixed=True, + recomputation="none" + ): + + # https://arxiv.org/pdf/2205.05198 + if mixed: + bytes_per_value = 2 + else: + bytes_per_value = 4 + + one_layer_attention = s * b * h * (bytes_per_value * 5 + 1) + ((2 * bytes_per_value + 1) * a * s * s * b) # eq (2) + one_layer_feedforward_mlp = (s * b * h * bytes_per_value + (s * b * h_ff * bytes_per_value) # inputs of 1st/2nd linear layers + + s * b * h_ff * bytes_per_value # inputs of activation function (not really necessary for Relu though) + + s * b * h) # dropout + one_layer_feedforward_swiglu = (s * b * h * bytes_per_value + (s * b * h_ff * bytes_per_value) # inputs of input/output linear layers + + s * b * h_ff * bytes_per_value * 3 # inputs of activation function + + s * b * h) # dropout (note that dropout is lower-precision - boolean) + + + if recomputation == "none": + one_layer = one_layer_attention # eq (2) + elif recomputation =="selective": + one_layer = s * b * h * 34 # eq (6) + elif recomputation =="full": + one_layer = s * b * h * 2 + else: + raise ValueError() + + input_dropout = 0 # s * b * h # section 4.3 + + total = L * one_layer + input_dropout + + return total + + +def param_grads_opt( + h, # hidden dimension size + L, # number of layers + s, # sequence length + v, # vocab size + k=8, # parameters for optimizer (Adam: 8 = 4 bytes moments + 4 bytes variance) + mixed=True # mixed precision training + ): + + # https://michaelwornow.net/2024/01/18/counting-params-in-transformer + # note: this is without GQA or MQA + + emb = h*(v+s) + one_layer = 12 * h**2 + 13*h + other = 2*h + + n = emb + L * one_layer + other + + # 3.1 https://arxiv.org/pdf/1910.02054 + + if mixed: + k += 4 # additional full precision weights + bytes_per_paramter = 2 + else: + bytes_per_paramter = 4 + + return bytes_per_paramter*n, bytes_per_paramter*n, k*n diff --git a/python/memory/measurments/act-mem-2/README.md b/python/memory/measurments/act-mem-2/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9531f4c9d684c71671fb640cdadc82d14debafa6 --- /dev/null +++ b/python/memory/measurments/act-mem-2/README.md @@ -0,0 +1,16 @@ +# Activation Memory: Part 2 + +Code accompanying the deep-dive [blog post on activation memory](https://determined.ai/blog/act-mem-2). + +- The main utility code is in `act_mem.py`. +- Basic transformer layers are implemented in `layers.py`. +- The scripts `{block,mlp}_script.py` demonstrate how replacing `GELU` with `ReLU` affects activation +memory. +- `attn_script.py` shows the cost of activation memory in the attention layer. +- Tests of the code are in `test.py`. +- See `requirements.txt` for versions the code was built against. + + +## Contributors + +- [Garrett Goon](https://github.com/garrett361) \ No newline at end of file diff --git a/python/memory/measurments/act-mem-2/act_mem.py b/python/memory/measurments/act-mem-2/act_mem.py new file mode 100644 index 0000000000000000000000000000000000000000..aa3fc9e79f4a19e5407e0d066ba97d825aeaf6ea --- /dev/null +++ b/python/memory/measurments/act-mem-2/act_mem.py @@ -0,0 +1,132 @@ +from typing import Any, Iterable, Optional, Union + +import torch + + +def B_to_GiB(bytes: Union[int, float]) -> float: + return bytes / 2**30 + + +def get_tensor_bytes(tensor: torch.Tensor) -> int: + """ + Returns the bytes of storage a given tensor takes up. If `tensor` is a view of a larger tensor, + this function only returns the bytes associated with the view. + """ + tensor_bytes = tensor.numel() * tensor.element_size() + return tensor_bytes + + +class AllocatedMemContext: + """ + Context manager which captures the allocated GPU memory at context exit and the change between + enter and exit. + + Only includes `allocated_bytes.all.`-prefixed keys in `memory_stats` with all readings converted + to GiB. + + Example: + + ```python + + ``` + """ + + def __init__(self) -> None: + # Ensure CUDA libraries are loaded: + torch.cuda.current_blas_handle() + + self.before: dict[str, int] = {} + self.after: dict[str, int] = {} + self.delta: dict[str, int] = {} + + self._mem_key_prefix = "allocated_bytes.all." + + def _get_mem_dict(self) -> dict[str, int]: + return { + k.replace(self._mem_key_prefix, ""): v + for k, v in torch.cuda.memory_stats().items() + if self._mem_key_prefix in k + } + + def __enter__(self) -> "AllocatedMemContext": + self.before = self._get_mem_dict() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + self.after = self._get_mem_dict() + self.delta = {k: v - self.before[k] for k, v in self.after.items()} + + +class SavedTensorContext: + """ + Context manager which captures all tensors which are registered as being saved for backwards + within the context window. Does not work with `meta`-device tensors. + + All saved tensors are stored in the `saved_tensor_dict` attr, which is an instance of torch's + WeakTensorKeyDictionary with tensor/data_ptr key/value pairs. Some of these tensors may be + views of the same underlying storage. The total memory of all saved tensors in bytes, accounting + for redundant views, can be accessed through `saved_tensor_mem`. + + Use: + ``` + model = ... + with SavedTensorContext(ignored_tensors=model.parameters()) as saved: + # Do some computation with `model` and capture saved tensors which are not model weights + + ``` + saved.saved_tensor_dict # WeakTensorKeyDictionary of all saved tensors. + saved.saved_tensor_mem # bytes from all saved tensors (activation memory). + """ + + def __init__( + self, + ignored_tensors: Optional[Iterable[torch.Tensor]] = None, + ) -> None: + # Track ignored tensors by their storage's data_ptr. Important to use storage's data_ptr, + # not just the data_ptr of the tensor itself. + self._ignored_data_ptrs = ( + set() + if ignored_tensors is None + else {t.untyped_storage().data_ptr() for t in ignored_tensors} + ) + + # Use WeakTensorKeyDictionary instances to save non-trivial tensor references, since these + # won't keep the tensor alive if the only references to the tensor are within this object. + self.saved_tensor_dict = torch.utils.weak.WeakTensorKeyDictionary() + + def pack_hook(saved_tensor: torch.Tensor) -> torch.Tensor: + data_ptr = saved_tensor.untyped_storage().data_ptr() + if data_ptr not in self._ignored_data_ptrs: + self.saved_tensor_dict[saved_tensor] = data_ptr + return saved_tensor + + def unpack_hook(saved_tensor: torch.Tensor) -> torch.Tensor: + return saved_tensor + + self._saved_tensors_hook = torch.autograd.graph.saved_tensors_hooks(pack_hook, unpack_hook) + + def __enter__(self) -> "SavedTensorContext": + self._saved_tensors_hook.__enter__() + return self + + def __exit__(self, *args: Any, **kwargs: Any) -> None: + self._saved_tensors_hook.__exit__(*args, **kwargs) + + @property + def saved_tensor_mem(self) -> int: + """ + The memory in bytes of all saved tensors, accounting for views into the same storage. + """ + accounted_for = self._ignored_data_ptrs.copy() + total_bytes = 0 + for t in self.saved_tensor_dict: + data_ptr = t.untyped_storage().data_ptr() + if data_ptr not in accounted_for: + print(f"Tensor ptr: {t.untyped_storage().data_ptr()}, " + f"shape: {t.shape}, " + f"dtype: {t.dtype}, " + f"device: {t.device}" + ) + total_bytes += t.untyped_storage().nbytes() + accounted_for.add(data_ptr) + return total_bytes diff --git a/python/memory/measurments/act-mem-2/attn_script.py b/python/memory/measurments/act-mem-2/attn_script.py new file mode 100644 index 0000000000000000000000000000000000000000..d4257ef1f3bf6b340e03f5e3191e6ba3e1ead19c --- /dev/null +++ b/python/memory/measurments/act-mem-2/attn_script.py @@ -0,0 +1,32 @@ +import torch + +import act_mem +import layers + +if __name__ == "__main__": + batch_size, seq_len, d_model, n_heads = 1, 128, 1024, 32 + print(f"Batch size: {batch_size}, sequence length: {seq_len}, d_model: {d_model}, n_heads: {n_heads}") + dtype = torch.bfloat16 + inputs = torch.randn( + batch_size, + seq_len, + d_model, + device="cuda", + requires_grad=True, + dtype=dtype, + ) + + attn = layers.Attention( + d_model=d_model, + n_heads=n_heads, + device="cuda", + dtype=dtype, + ) + with act_mem.AllocatedMemContext() as mem, act_mem.SavedTensorContext( + ignored_tensors=attn.parameters() + ) as saved: + out = attn(inputs) + stm = saved.saved_tensor_mem + print(f'{mem.delta["current"]=}') + print(f"{stm=}") + print(f"{stm/out.numel()=}") diff --git a/python/memory/measurments/act-mem-2/block_script.py b/python/memory/measurments/act-mem-2/block_script.py new file mode 100644 index 0000000000000000000000000000000000000000..1145ffb2997cec2d3b5b1c6f9c92512361d40154 --- /dev/null +++ b/python/memory/measurments/act-mem-2/block_script.py @@ -0,0 +1,44 @@ +""" +Prints out the ratio of activation memory for the a transformer Block when using ReLU vs GELU. +""" + +import torch +import torch.nn as nn + +import act_mem +import layers + +if __name__ == "__main__": + batch_size, seq_len, d_model, n_heads = 2, 4096, 1024, 2 + dtype = torch.bfloat16 + inputs = torch.randn( + batch_size, + seq_len, + d_model, + device="cuda", + requires_grad=True, + dtype=dtype, + ) + + act_fn_dict = {"ReLU": nn.ReLU(), "GELU": nn.GELU()} + # Append outputs to a list to keep tensors alive + outputs = [] + mem_bytes = [] + + for name, act_fn in act_fn_dict.items(): + block = layers.Block( + d_model=d_model, + act_fn=act_fn, + n_heads=n_heads, + device="cuda", + dtype=dtype, + ) + with act_mem.AllocatedMemContext() as mem, act_mem.SavedTensorContext( + ignored_tensors=block.parameters() + ) as saved: + out = block(inputs) + outputs.append(out) + print(f"{name} block bytes: {saved.saved_tensor_mem}") + mem_bytes.append(saved.saved_tensor_mem) + + print(f"ReLU/GeLU block act mem ratio: {mem_bytes[0]/mem_bytes[1]}") diff --git a/python/memory/measurments/act-mem-2/layers.py b/python/memory/measurments/act-mem-2/layers.py new file mode 100644 index 0000000000000000000000000000000000000000..55088597df82c99d1e810d2aafcd6528f300afe3 --- /dev/null +++ b/python/memory/measurments/act-mem-2/layers.py @@ -0,0 +1,190 @@ +from typing import Optional, Union + +import einops +import torch +import torch.nn as nn +import torch.nn.functional as F + + +class Attention(nn.Module): + """ + Minimal multi-head attention layer. + """ + + def __init__( + self, + d_model: int, + n_heads: int, + device: Optional[Union[str, torch.device]] = None, + dtype: Optional[torch.dtype] = None, + ): + super().__init__() + self.d_model = d_model + self.n_heads = n_heads + factory_kwargs = {"device": device, "dtype": dtype} + + self.d_head, remainder = divmod(self.d_model, self.n_heads) + assert not remainder, f"{n_heads=} must divide {d_model=} evenly" + + self.lin_qkv = nn.Linear( + self.d_model, + 3 * self.d_model, + **factory_kwargs, + ) + + self.lin_out = nn.Linear(self.d_model, self.d_model, **factory_kwargs) + + def forward( + self, + inputs: torch.Tensor, + ) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + bsz, seq_len, _ = inputs.size() + + # Create the queries, keys, values + qkv = einops.rearrange( + self.lin_qkv(inputs), + "b s (three n_h d_h) -> three b s n_h d_h", + b=bsz, + s=seq_len, + three=3, + n_h=self.n_heads, + d_h=self.d_head, + ) + q, k, v = qkv + + bsz, seq_len, n_heads, d_head = q.shape + + shape_kwargs = dict(b=bsz, n_h=n_heads, s=seq_len, d_h=d_head) + q = einops.rearrange(q, "b s n_h d_h -> b n_h s d_h", **shape_kwargs) + k = einops.rearrange(k, "b s n_h d_h -> b n_h s d_h", **shape_kwargs) + v = einops.rearrange(v, "b s n_h d_h -> b n_h s d_h", **shape_kwargs) + + # Multi-head self-attention + attn_output = F.scaled_dot_product_attention(q, k, v, is_causal=True) + attn_output = einops.rearrange( + attn_output, + "b n_h s d_h -> b s (n_h d_h)", + b=bsz, + n_h=n_heads, + s=seq_len, + d_h=d_head, + ) + + # Final projection + out = self.lin_out(attn_output) + + return out + + +class MLP(nn.Module): + """ + Basic MLP layer with optional Dropout. + """ + + def __init__( + self, + d_model: int, + act_fn: nn.Module, + dropout_prob: Optional[float] = None, + device: Optional[Union[str, torch.device]] = None, + dtype: Optional[torch.dtype] = None, + ) -> None: + super().__init__() + print(f"Shapes: d_model: {d_model}, act_fn: {act_fn}, dropout_prob: {dropout_prob}, device: {device}, dtype: {dtype}") + self.d_model = d_model + self.act_fn = act_fn + self.dropout_prob = dropout_prob + factory_kwargs = {"device": device, "dtype": dtype} + + self.lin_0 = nn.Linear(self.d_model, 4 * self.d_model, **factory_kwargs) + self.lin_1 = nn.Linear(4 * self.d_model, self.d_model, **factory_kwargs) + self.dropout = nn.Dropout(self.dropout_prob) if self.dropout_prob else None + + def forward(self, inputs: torch.Tensor) -> torch.Tensor: + x = self.lin_0(inputs) + x = self.act_fn(x) + x = self.lin_1(x) + if self.dropout is not None: + x = self.dropout(x) + return x + + +class SwiGLUMLP(nn.Module): + """ + Llama 3 SwiGLU MLP layer with optional Dropout. + """ + + def __init__( + self, + d_model: int, + intermediate_size: int, + act_fn: nn.Module, + dropout_prob: Optional[float] = None, + device: Optional[Union[str, torch.device]] = None, + dtype: Optional[torch.dtype] = None, + ) -> None: + super().__init__() + print(f"Shapes: d_model: {d_model}, intermediate_size: {intermediate_size}, act_fn: {act_fn}, dropout_prob: {dropout_prob}, device: {device}, dtype: {dtype}") + self.d_model = d_model + self.intermediate_size = intermediate_size + self.act_fn = act_fn + self.dropout_prob = dropout_prob + factory_kwargs = {"device": device, "dtype": dtype} + + self.gate_proj = nn.Linear(self.d_model, self.intermediate_size, **factory_kwargs) + self.up_proj = nn.Linear(self.d_model, self.intermediate_size, **factory_kwargs) + self.down_proj = nn.Linear(self.intermediate_size, self.d_model, **factory_kwargs) + self.dropout = nn.Dropout(self.dropout_prob) if self.dropout_prob else None + + def forward(self, inputs: torch.Tensor) -> torch.Tensor: + x = self.down_proj(self.act_fn(self.gate_proj(inputs)) * self.up_proj(inputs)) + if self.dropout is not None: + x = self.dropout(x) + return x + + +class Block(nn.Module): + """ + Basic transformer block. + + Schematic: + ┌──────┐ + │inputs│ + └┬─┬───┘ + │┌▽───────────┐ + ││norm_0, attn│ + │└┬───────────┘ + ┌▽─▽──┐ + │ add │ + └┬─┬──┘ + │┌▽──────────┐ + ││norm_1, mlp│ + │└┬──────────┘ + ┌▽─▽──┐ + │ add │ + └┬────┘ + ┌▽──────┐ + │outputs│ + └───────┘ + """ + + def __init__( + self, + d_model: int, + n_heads: int, + act_fn: nn.Module, + dropout_prob: Optional[float] = None, + dtype: Optional[torch.dtype] = None, + device: Optional[Union[str, torch.device]] = None, + ): + super().__init__() + factory_kwargs = {"device": device, "dtype": dtype} + self.attn = Attention(d_model=d_model, n_heads=n_heads, **factory_kwargs) + self.mlp = MLP(d_model=d_model, act_fn=act_fn, dropout_prob=dropout_prob, **factory_kwargs) + self.norm_0 = nn.LayerNorm(d_model, **factory_kwargs) + self.norm_1 = nn.LayerNorm(d_model, **factory_kwargs) + + def forward(self, inputs: torch.Tensor) -> torch.Tensor: + outputs = self.attn(self.norm_0(inputs)) + inputs + outputs = self.mlp(self.norm_1(outputs)) + outputs + return outputs diff --git a/python/memory/measurments/act-mem-2/mlp_script.py b/python/memory/measurments/act-mem-2/mlp_script.py new file mode 100644 index 0000000000000000000000000000000000000000..4df1672f92789b6999fe7d6a2c1322e604d4e768 --- /dev/null +++ b/python/memory/measurments/act-mem-2/mlp_script.py @@ -0,0 +1,57 @@ +""" +Prints out the ratio of activation memory for the MLP layer when using ReLU vs GELU. +""" + +import torch +import torch.nn as nn + +import act_mem +import layers + +if __name__ == "__main__": + batch_size, seq_len, d_model, dropout_prob = 1, 128, 1024, 0.1 + print(f"Batch size: {batch_size}, sequence length: {seq_len}, d_model: {d_model}, dropout_prob: {dropout_prob} ") + dtype = torch.bfloat16 + inputs = torch.randn( + batch_size, + seq_len, + d_model, + device="cuda", + requires_grad=True, + dtype=dtype, + ) + + act_fn_dict = {"ReLU": nn.ReLU() , "GELU": nn.GELU(), "silu": nn.SiLU()} + # Append outputs to a list to keep tensors alive + outputs = [] + mem_bytes = [] + + for name, act_fn in act_fn_dict.items(): + if name == "silu": + mlp = layers.SwiGLUMLP( + d_model=d_model, + intermediate_size=4 * d_model, + act_fn=act_fn, + dropout_prob=dropout_prob, + device="cuda", + dtype=dtype, + ) + else: + mlp = layers.MLP( + d_model=d_model, + act_fn=act_fn, + dropout_prob=dropout_prob, + device="cuda", + dtype=dtype, + ) + with act_mem.AllocatedMemContext() as mem, act_mem.SavedTensorContext( + ignored_tensors=mlp.parameters() + ) as saved: + out = mlp(inputs) + outputs.append(out) + stm = saved.saved_tensor_mem + assert mem.delta["current"] == stm + print(f"{name} bytes: {act_mem.B_to_GiB(stm)}") + mem_bytes.append(stm) + + print(f"ReLU/GELU act mem ratio: {mem_bytes[0]/mem_bytes[1]}") diff --git a/python/memory/measurments/act-mem-2/requirements.txt b/python/memory/measurments/act-mem-2/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ec837a87bf0458e3a8a6766b8eb2b02b8a1d608c --- /dev/null +++ b/python/memory/measurments/act-mem-2/requirements.txt @@ -0,0 +1,14 @@ +einops==0.8.0 +filelock==3.14.0 +fsspec==2024.5.0 +iniconfig==2.0.0 +Jinja2==3.1.4 +MarkupSafe==2.1.5 +mpmath==1.3.0 +networkx==3.3 +packaging==24.0 +pluggy==1.5.0 +pytest==8.2.1 +sympy==1.12.1 +torch==2.3.0 +typing_extensions==4.12.0 diff --git a/python/memory/measurments/act-mem-2/test.py b/python/memory/measurments/act-mem-2/test.py new file mode 100644 index 0000000000000000000000000000000000000000..cde709743d1692fbccce7f4575bd9f2c964ed29d --- /dev/null +++ b/python/memory/measurments/act-mem-2/test.py @@ -0,0 +1,203 @@ +from typing import Optional + +import pytest +import torch +import torch.nn as nn + +import act_mem +import layers + +BATCH_SIZES = (1, 2) +D_MODELS = (128, 256) +SEQ_LENS = (64, 128) +N_HEADS = (2, 4) + + +DEVICES = ["cpu"] +if torch.cuda.is_available(): + DEVICES.append("cuda") + + +ZERO_MEM_ACT_FNS = [ + nn.ReLU(), + nn.Sigmoid(), + nn.Tanh(), + nn.LeakyReLU(inplace=True), + nn.Sigmoid(), +] +ALL_ACT_FNS = ZERO_MEM_ACT_FNS + [ + nn.ELU(), + nn.GELU(), + nn.Hardshrink(), + nn.Hardsigmoid(), + nn.Hardswish(), + nn.Hardtanh(), + nn.LeakyReLU(), + nn.SELU(), + nn.SiLU(), +] + + +class TestSavedTensorContext: + @pytest.mark.parametrize("device", DEVICES) + @pytest.mark.parametrize("d_model", D_MODELS) + @pytest.mark.parametrize("batch_size", BATCH_SIZES) + def test_linear(self, device: str, d_model: int, batch_size: int) -> None: + """ + Test a simple linear layer. The inputs should be saved for backwards + """ + inputs = torch.randn(batch_size, d_model, requires_grad=True, device=device) + lin = nn.Linear(d_model, d_model, device=device) + with act_mem.SavedTensorContext(ignored_tensors=lin.parameters()) as saved: + _ = lin(inputs) + assert saved.saved_tensor_mem == inputs.numel() * inputs.element_size() + + @pytest.mark.parametrize("device", DEVICES) + @pytest.mark.parametrize("d_model", D_MODELS) + @pytest.mark.parametrize("batch_size", BATCH_SIZES) + def test_linear_amp(self, device: str, d_model: int, batch_size: int) -> None: + """ + Test a linear layer with AMP. The saved tensors should now be a low-precision version of the + inputs and the low-precision version of the weights version of the weights + """ + inputs = torch.randn(batch_size, d_model, requires_grad=True, device=device) + lin = nn.Linear(d_model, d_model, device=device) + dtype = torch.bfloat16 + with torch.autocast(device_type=device, dtype=dtype): + with act_mem.SavedTensorContext(ignored_tensors=lin.parameters()) as saved: + out = lin(inputs) + assert ( + saved.saved_tensor_mem + == out.numel() * out.element_size() + lin.weight.numel() * dtype.itemsize + ) + + @pytest.mark.parametrize("act_fn", ALL_ACT_FNS) + @pytest.mark.parametrize("dropout_prob", (None, 0.5)) + @pytest.mark.parametrize("device", DEVICES) + @pytest.mark.parametrize("d_model", D_MODELS) + @pytest.mark.parametrize("batch_size", BATCH_SIZES) + @pytest.mark.parametrize("seq_len", SEQ_LENS) + def test_mlp( + self, + act_fn: nn.Module, + dropout_prob: Optional[float], + device: str, + d_model: int, + batch_size: int, + seq_len: int, + ) -> None: + """ + For the transformer MLP layer with a ReLU non-linearity, the initial inputs and the inputs + to the final linear layer (which are four times as large) must always be saved. If the + derivative of the activation function cannot be expressed in terms of the activation + function's *outputs*, then the activation inputs must also be saved (which are again four + times as large as the MLP's inputs). The MLP activation memory can be nearly halved by a + choice of activation function. + """ + inputs = torch.randn( + batch_size, seq_len, d_model, requires_grad=True, device=device + ) + expansion_factor = 4 + mlp = layers.MLP( + d_model=d_model, act_fn=act_fn, dropout_prob=dropout_prob, device=device + ) + with act_mem.SavedTensorContext(ignored_tensors=mlp.parameters()) as saved: + _ = mlp(inputs) + + # Compare measured memory against expected + first_lin_input_mem = act_mem.get_tensor_bytes(inputs) + second_lin_input_mem = expansion_factor * first_lin_input_mem + # Only some activations require additional activation memory + activation_input_mem = 0 if act_fn in ZERO_MEM_ACT_FNS else second_lin_input_mem + dropout_act_mem = ( + 0 if not dropout_prob else inputs.numel() * (4 if device == "cpu" else 1) + ) + + expected_mem = ( + first_lin_input_mem + + second_lin_input_mem + + activation_input_mem + + dropout_act_mem + ) + assert saved.saved_tensor_mem == expected_mem + + @pytest.mark.parametrize("act_fn", ALL_ACT_FNS) + @pytest.mark.parametrize("dropout_prob", (None, 0.5)) + @pytest.mark.parametrize("device", DEVICES) + @pytest.mark.parametrize("d_model", D_MODELS) + @pytest.mark.parametrize("batch_size", BATCH_SIZES) + @pytest.mark.parametrize("seq_len", SEQ_LENS) + def test_mlp_amp( + self, + act_fn: nn.Module, + dropout_prob: Optional[float], + device: str, + d_model: int, + batch_size: int, + seq_len: int, + ) -> None: + """ + Similar story with AMP. The only changes come from the modified dtypes and needing to also + save references to the low-precision weights in the Linear layers. + """ + inputs = torch.randn( + batch_size, seq_len, d_model, requires_grad=True, device=device + ) + expansion_factor = 4 + mlp = layers.MLP( + d_model=d_model, act_fn=act_fn, dropout_prob=dropout_prob, device=device + ) + dtype = torch.bfloat16 + with torch.autocast(device_type=device, dtype=dtype): + with act_mem.SavedTensorContext(ignored_tensors=mlp.parameters()) as saved: + _ = mlp(inputs) + + # Compare measured memory against expected + amp_weight_mem = 2 * expansion_factor * d_model**2 * dtype.itemsize + first_lin_input_mem = inputs.numel() * dtype.itemsize + second_lin_input_mem = expansion_factor * inputs.numel() * dtype.itemsize + # Only some activations require additional activation memory + activation_input_mem = 0 if act_fn in ZERO_MEM_ACT_FNS else second_lin_input_mem + dropout_act_mem = ( + 0 + if not dropout_prob + else inputs.numel() * (dtype.itemsize if device == "cpu" else 1) + ) + + expected_mem = ( + amp_weight_mem + + first_lin_input_mem + + second_lin_input_mem + + activation_input_mem + + dropout_act_mem + ) + assert ( + saved.saved_tensor_mem == expected_mem + ), f"Failed on {act_fn=}, {dropout_prob=}" + + +@pytest.mark.skipif(not torch.cuda.is_available(), reason="cuda not available") +class TestCUDAMemReadings: + @pytest.mark.parametrize("d_model", D_MODELS) + @pytest.mark.parametrize("batch_size", BATCH_SIZES) + @pytest.mark.parametrize("seq_len", SEQ_LENS) + @pytest.mark.parametrize("act_fn", ALL_ACT_FNS) + def test_mlp( + self, d_model: int, batch_size: int, seq_len: int, act_fn: nn.Module + ) -> None: + """ + Track saved tensors and allocated memory and verify they agree. + """ + + inputs = torch.randn(batch_size, seq_len, d_model, device="cuda") + mlp = layers.MLP(d_model=d_model, act_fn=act_fn, device="cuda") + + with act_mem.AllocatedMemContext() as mem, act_mem.SavedTensorContext( + ignored_tensors=mlp.parameters() + ) as saved: + outputs = mlp(inputs) + + # AllocatedMemContext captures the outputs, but not inputs, while SavedTensorContext + # captures inputs and not outputs. Nevertheless, the readings agree because inputs and + # outputs are tensors of the same size and `dtype`. + assert mem.delta["current"] == saved.saved_tensor_mem diff --git a/src/bibliography.bib b/src/bibliography.bib new file mode 100644 index 0000000000000000000000000000000000000000..77ee469af740a64115bc02b08eb6edb89c06236c --- /dev/null +++ b/src/bibliography.bib @@ -0,0 +1,24 @@ +@article{example2023, + title={Example Paper Title}, + author={Example, Author and Another, Author}, + journal={Journal of Examples}, + volume={1}, + number={1}, + pages={1--10}, + year={2023}, + publisher={Example Publisher} +} + +@online{distill, + title={Distill}, + url={https://distill.pub}, + year={2016}, + publisher={Distill Working Group} +} + +@book{textbook2022, + title={An Example Textbook}, + author={Author, Example}, + year={2022}, + publisher={Example Academic Press} +} \ No newline at end of file diff --git a/src/distill.js b/src/distill.js new file mode 100644 index 0000000000000000000000000000000000000000..a7086a229782bb60fb19f1b7e4c1f5d54f3f62e3 --- /dev/null +++ b/src/distill.js @@ -0,0 +1,9252 @@ +(function (factory) { + typeof define === 'function' && define.amd ? define(factory) : + factory(); +}((function () { 'use strict'; + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + const months = ['Jan.', 'Feb.', 'March', 'April', 'May', 'June', 'July', 'Aug.', 'Sept.', 'Oct.', 'Nov.', 'Dec.']; + const zeroPad = n => n < 10 ? '0' + n : n; + + const RFC = function(date) { + const day = days[date.getDay()].substring(0, 3); + const paddedDate = zeroPad(date.getDate()); + const month = months[date.getMonth()].substring(0,3); + const year = date.getFullYear().toString(); + const hours = date.getUTCHours().toString(); + const minutes = date.getUTCMinutes().toString(); + const seconds = date.getUTCSeconds().toString(); + return `${day}, ${paddedDate} ${month} ${year} ${hours}:${minutes}:${seconds} Z`; + }; + + const objectFromMap = function(map) { + const object = Array.from(map).reduce((object, [key, value]) => ( + Object.assign(object, { [key]: value }) // Be careful! Maps can have non-String keys; object literals can't. + ), {}); + return object; + }; + + const mapFromObject = function(object) { + const map = new Map(); + for (var property in object) { + if (object.hasOwnProperty(property)) { + map.set(property, object[property]); + } + } + return map; + }; + + class Author { + + // constructor(name='', personalURL='', affiliation='', affiliationURL='') { + // this.name = name; // 'Chris Olah' + // this.personalURL = personalURL; // 'https://colah.github.io' + // this.affiliation = affiliation; // 'Google Brain' + // this.affiliationURL = affiliationURL; // 'https://g.co/brain' + // } + + constructor(object) { + this.name = object.author; // 'Chris Olah' + this.personalURL = object.authorURL; // 'https://colah.github.io' + this.affiliation = object.affiliation; // 'Google Brain' + this.affiliationURL = object.affiliationURL; // 'https://g.co/brain' + this.affiliations = object.affiliations || []; // new-style affiliations + } + + // 'Chris' + get firstName() { + const names = this.name.split(' '); + return names.slice(0, names.length - 1).join(' '); + } + + // 'Olah' + get lastName() { + const names = this.name.split(' '); + return names[names.length -1]; + } + } + + function mergeFromYMLFrontmatter(target, source) { + target.title = source.title; + if (source.published) { + if (source.published instanceof Date) { + target.publishedDate = source.published; + } else if (source.published.constructor === String) { + target.publishedDate = new Date(source.published); + } + } + if (source.publishedDate) { + if (source.publishedDate instanceof Date) { + target.publishedDate = source.publishedDate; + } else if (source.publishedDate.constructor === String) { + target.publishedDate = new Date(source.publishedDate); + } else { + console.error('Don\'t know what to do with published date: ' + source.publishedDate); + } + } + target.description = source.description; + target.authors = source.authors.map( (authorObject) => new Author(authorObject)); + target.katex = source.katex; + target.password = source.password; + if (source.doi) { + target.doi = source.doi; + } + } + + class FrontMatter { + constructor() { + this.title = 'unnamed article'; // 'Attention and Augmented Recurrent Neural Networks' + this.description = ''; // 'A visual overview of neural attention...' + this.authors = []; // Array of Author(s) + + this.bibliography = new Map(); + this.bibliographyParsed = false; + // { + // 'gregor2015draw': { + // 'title': 'DRAW: A recurrent neural network for image generation', + // 'author': 'Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan', + // 'journal': 'arXiv preprint arXiv:1502.04623', + // 'year': '2015', + // 'url': 'https://arxiv.org/pdf/1502.04623.pdf', + // 'type': 'article' + // }, + // } + + // Citation keys should be listed in the order that they are appear in the document. + // Each key refers to a key in the bibliography dictionary. + this.citations = []; // [ 'gregor2015draw', 'mercier2011humans' ] + this.citationsCollected = false; + + // + // Assigned from posts.csv + // + + // publishedDate: 2016-09-08T07:00:00.000Z, + // tags: [ 'rnn' ], + // distillPath: '2016/augmented-rnns', + // githubPath: 'distillpub/post--augmented-rnns', + // doiSuffix: 1, + + // + // Assigned from journal + // + this.journal = {}; + // journal: { + // 'title': 'Distill', + // 'full_title': 'Distill', + // 'abbrev_title': 'Distill', + // 'url': 'http://distill.pub', + // 'doi': '10.23915/distill', + // 'publisherName': 'Distill Working Group', + // 'publisherEmail': 'admin@distill.pub', + // 'issn': '2476-0757', + // 'editors': [...], + // 'committee': [...] + // } + // volume: 1, + // issue: 9, + + this.katex = {}; + + // + // Assigned from publishing process + // + + // githubCompareUpdatesUrl: 'https://github.com/distillpub/post--augmented-rnns/compare/1596e094d8943d2dc0ea445d92071129c6419c59...3bd9209e0c24d020f87cf6152dcecc6017cbc193', + // updatedDate: 2017-03-21T07:13:16.000Z, + // doi: '10.23915/distill.00001', + this.doi = undefined; + this.publishedDate = undefined; + } + + // Example: + // title: Demo Title Attention and Augmented Recurrent Neural Networks + // published: Jan 10, 2017 + // authors: + // - Chris Olah: + // - Shan Carter: http://shancarter.com + // affiliations: + // - Google Brain: + // - Google Brain: http://g.co/brain + + // + // Computed Properties + // + + // 'http://distill.pub/2016/augmented-rnns', + set url(value) { + this._url = value; + } + get url() { + if (this._url) { + return this._url; + } else if (this.distillPath && this.journal.url) { + return this.journal.url + '/' + this.distillPath; + } else if (this.journal.url) { + return this.journal.url; + } + } + + // 'https://github.com/distillpub/post--augmented-rnns', + get githubUrl() { + if (this.githubPath) { + return 'https://github.com/' + this.githubPath; + } else { + return undefined; + } + } + + // TODO resolve differences in naming of URL/Url/url. + // 'http://distill.pub/2016/augmented-rnns/thumbnail.jpg', + set previewURL(value) { + this._previewURL = value; + } + get previewURL() { + return this._previewURL ? this._previewURL : this.url + '/thumbnail.jpg'; + } + + // 'Thu, 08 Sep 2016 00:00:00 -0700', + get publishedDateRFC() { + return RFC(this.publishedDate); + } + + // 'Thu, 08 Sep 2016 00:00:00 -0700', + get updatedDateRFC() { + return RFC(this.updatedDate); + } + + // 2016, + get publishedYear() { + return this.publishedDate.getFullYear(); + } + + // 'Sept', + get publishedMonth() { + return months[this.publishedDate.getMonth()]; + } + + // 8, + get publishedDay() { + return this.publishedDate.getDate(); + } + + // '09', + get publishedMonthPadded() { + return zeroPad(this.publishedDate.getMonth() + 1); + } + + // '08', + get publishedDayPadded() { + return zeroPad(this.publishedDate.getDate()); + } + + get publishedISODateOnly() { + return this.publishedDate.toISOString().split('T')[0]; + } + + get volume() { + const volume = this.publishedYear - 2015; + if (volume < 1) { + throw new Error('Invalid publish date detected during computing volume'); + } + return volume; + } + + get issue() { + return this.publishedDate.getMonth() + 1; + } + + // 'Olah & Carter', + get concatenatedAuthors() { + if (this.authors.length > 2) { + return this.authors[0].lastName + ', et al.'; + } else if (this.authors.length === 2) { + return this.authors[0].lastName + ' & ' + this.authors[1].lastName; + } else if (this.authors.length === 1) { + return this.authors[0].lastName; + } + } + + // 'Olah, Chris and Carter, Shan', + get bibtexAuthors() { + return this.authors.map(author => { + return author.lastName + ', ' + author.firstName; + }).join(' and '); + } + + // 'olah2016attention' + get slug() { + let slug = ''; + if (this.authors.length) { + slug += this.authors[0].lastName.toLowerCase(); + slug += this.publishedYear; + slug += this.title.split(' ')[0].toLowerCase(); + } + return slug || 'Untitled'; + } + + get bibliographyEntries() { + return new Map(this.citations.map( citationKey => { + const entry = this.bibliography.get(citationKey); + return [citationKey, entry]; + })); + } + + set bibliography(bibliography) { + if (bibliography instanceof Map) { + this._bibliography = bibliography; + } else if (typeof bibliography === 'object') { + this._bibliography = mapFromObject(bibliography); + } + } + + get bibliography() { + return this._bibliography; + } + + static fromObject(source) { + const frontMatter = new FrontMatter(); + Object.assign(frontMatter, source); + return frontMatter; + } + + assignToObject(target) { + Object.assign(target, this); + target.bibliography = objectFromMap(this.bibliographyEntries); + target.url = this.url; + target.doi = this.doi; + target.githubUrl = this.githubUrl; + target.previewURL = this.previewURL; + if (this.publishedDate) { + target.volume = this.volume; + target.issue = this.issue; + target.publishedDateRFC = this.publishedDateRFC; + target.publishedYear = this.publishedYear; + target.publishedMonth = this.publishedMonth; + target.publishedDay = this.publishedDay; + target.publishedMonthPadded = this.publishedMonthPadded; + target.publishedDayPadded = this.publishedDayPadded; + } + if (this.updatedDate) { + target.updatedDateRFC = this.updatedDateRFC; + } + target.concatenatedAuthors = this.concatenatedAuthors; + target.bibtexAuthors = this.bibtexAuthors; + target.slug = this.slug; + } + + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + const Mutating = (superclass) => { + return class extends superclass { + + constructor() { + super(); + + // set up mutation observer + const options = {childList: true, characterData: true, subtree: true}; + const observer = new MutationObserver( () => { + observer.disconnect(); + this.renderIfPossible(); + observer.observe(this, options); + }); + + // ...and listen for changes + observer.observe(this, options); + } + + connectedCallback() { + super.connectedCallback(); + + this.renderIfPossible(); + } + + // potential TODO: check if this is enough for all our usecases + // maybe provide a custom function to tell if we have enough information to render + renderIfPossible() { + if (this.textContent && this.root) { + this.renderContent(); + } + } + + renderContent() { + console.error(`Your class ${this.constructor.name} must provide a custom renderContent() method!` ); + } + + }; // end class + }; // end mixin function + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + /*global ShadyCSS*/ + + const Template = (name, templateString, useShadow = true) => { + + return (superclass) => { + + const template = document.createElement('template'); + template.innerHTML = templateString; + + if (useShadow && 'ShadyCSS' in window) { + ShadyCSS.prepareTemplate(template, name); + } + + return class extends superclass { + + static get is() { return name; } + + constructor() { + super(); + + this.clone = document.importNode(template.content, true); + if (useShadow) { + this.attachShadow({mode: 'open'}); + this.shadowRoot.appendChild(this.clone); + } + } + + connectedCallback() { + if (this.hasAttribute('distill-prerendered')) { + return; + } + if (useShadow) { + if ('ShadyCSS' in window) { + ShadyCSS.styleElement(this); + } + } else { + this.insertBefore(this.clone, this.firstChild); + } + } + + get root() { + if (useShadow) { + return this.shadowRoot; + } else { + return this; + } + } + + /* TODO: Are we using these? Should we even? */ + $(query) { + return this.root.querySelector(query); + } + + $$(query) { + return this.root.querySelectorAll(query); + } + }; + }; + }; + + var math = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nspan.katex-display {\n text-align: left;\n padding: 8px 0 8px 0;\n margin: 0.5em 0 0.5em 1em;\n}\n\nspan.katex {\n -webkit-font-smoothing: antialiased;\n color: rgba(0, 0, 0, 0.8);\n font-size: 1.18em;\n}\n"; + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + // This is a straight concatenation of code from KaTeX's contrib folder, + // but we aren't using some of their helpers that don't work well outside a browser environment. + + /*global katex */ + + const findEndOfMath = function(delimiter, text, startIndex) { + // Adapted from + // https://github.com/Khan/perseus/blob/master/src/perseus-markdown.jsx + let index = startIndex; + let braceLevel = 0; + + const delimLength = delimiter.length; + + while (index < text.length) { + const character = text[index]; + + if ( + braceLevel <= 0 && + text.slice(index, index + delimLength) === delimiter + ) { + return index; + } else if (character === "\\") { + index++; + } else if (character === "{") { + braceLevel++; + } else if (character === "}") { + braceLevel--; + } + + index++; + } + + return -1; + }; + + const splitAtDelimiters = function(startData, leftDelim, rightDelim, display) { + const finalData = []; + + for (let i = 0; i < startData.length; i++) { + if (startData[i].type === "text") { + const text = startData[i].data; + + let lookingForLeft = true; + let currIndex = 0; + let nextIndex; + + nextIndex = text.indexOf(leftDelim); + if (nextIndex !== -1) { + currIndex = nextIndex; + finalData.push({ + type: "text", + data: text.slice(0, currIndex) + }); + lookingForLeft = false; + } + + while (true) { + // eslint-disable-line no-constant-condition + if (lookingForLeft) { + nextIndex = text.indexOf(leftDelim, currIndex); + if (nextIndex === -1) { + break; + } + + finalData.push({ + type: "text", + data: text.slice(currIndex, nextIndex) + }); + + currIndex = nextIndex; + } else { + nextIndex = findEndOfMath( + rightDelim, + text, + currIndex + leftDelim.length + ); + if (nextIndex === -1) { + break; + } + + finalData.push({ + type: "math", + data: text.slice(currIndex + leftDelim.length, nextIndex), + rawData: text.slice(currIndex, nextIndex + rightDelim.length), + display: display + }); + + currIndex = nextIndex + rightDelim.length; + } + + lookingForLeft = !lookingForLeft; + } + + finalData.push({ + type: "text", + data: text.slice(currIndex) + }); + } else { + finalData.push(startData[i]); + } + } + + return finalData; + }; + + const splitWithDelimiters = function(text, delimiters) { + let data = [{ type: "text", data: text }]; + for (let i = 0; i < delimiters.length; i++) { + const delimiter = delimiters[i]; + data = splitAtDelimiters( + data, + delimiter.left, + delimiter.right, + delimiter.display || false + ); + } + return data; + }; + + /* Note: optionsCopy is mutated by this method. If it is ever exposed in the + * API, we should copy it before mutating. + */ + const renderMathInText = function(text, optionsCopy) { + const data = splitWithDelimiters(text, optionsCopy.delimiters); + const fragment = document.createDocumentFragment(); + + for (let i = 0; i < data.length; i++) { + if (data[i].type === "text") { + fragment.appendChild(document.createTextNode(data[i].data)); + } else { + const tag = document.createElement("d-math"); + const math = data[i].data; + // Override any display mode defined in the settings with that + // defined by the text itself + optionsCopy.displayMode = data[i].display; + try { + tag.textContent = math; + if (optionsCopy.displayMode) { + tag.setAttribute("block", ""); + } + } catch (e) { + if (!(e instanceof katex.ParseError)) { + throw e; + } + optionsCopy.errorCallback( + "KaTeX auto-render: Failed to parse `" + data[i].data + "` with ", + e + ); + fragment.appendChild(document.createTextNode(data[i].rawData)); + continue; + } + fragment.appendChild(tag); + } + } + + return fragment; + }; + + const renderElem = function(elem, optionsCopy) { + for (let i = 0; i < elem.childNodes.length; i++) { + const childNode = elem.childNodes[i]; + if (childNode.nodeType === 3) { + // Text node + const text = childNode.textContent; + if (optionsCopy.mightHaveMath(text)) { + const frag = renderMathInText(text, optionsCopy); + i += frag.childNodes.length - 1; + elem.replaceChild(frag, childNode); + } + } else if (childNode.nodeType === 1) { + // Element node + const shouldRender = + optionsCopy.ignoredTags.indexOf(childNode.nodeName.toLowerCase()) === + -1; + + if (shouldRender) { + renderElem(childNode, optionsCopy); + } + } + // Otherwise, it's something else, and ignore it. + } + }; + + const defaultAutoRenderOptions = { + delimiters: [ + { left: "$$", right: "$$", display: true }, + { left: "\\[", right: "\\]", display: true }, + { left: "\\(", right: "\\)", display: false } + // LaTeX uses this, but it ruins the display of normal `$` in text: + // {left: '$', right: '$', display: false}, + ], + + ignoredTags: [ + "script", + "noscript", + "style", + "textarea", + "pre", + "code", + "svg" + ], + + errorCallback: function(msg, err) { + console.error(msg, err); + } + }; + + const renderMathInElement = function(elem, options) { + if (!elem) { + throw new Error("No element provided to render"); + } + + const optionsCopy = Object.assign({}, defaultAutoRenderOptions, options); + const delimiterStrings = optionsCopy.delimiters.flatMap(d => [ + d.left, + d.right + ]); + const mightHaveMath = text => + delimiterStrings.some(d => text.indexOf(d) !== -1); + optionsCopy.mightHaveMath = mightHaveMath; + renderElem(elem, optionsCopy); + }; + + // Copyright 2018 The Distill Template Authors + + const katexJSURL = 'https://distill.pub/third-party/katex/katex.min.js'; + const katexCSSTag = ''; + + const T = Template('d-math', ` +${katexCSSTag} + + +`); + + // DMath, not Math, because that would conflict with the JS built-in + class DMath extends Mutating(T(HTMLElement)) { + + static set katexOptions(options) { + DMath._katexOptions = options; + if (DMath.katexOptions.delimiters) { + if (!DMath.katexAdded) { + DMath.addKatex(); + } else { + DMath.katexLoadedCallback(); + } + } + } + + static get katexOptions() { + if (!DMath._katexOptions) { + DMath._katexOptions = { + delimiters: [ { 'left':'$$', 'right':'$$', 'display': false } ] + }; + } + return DMath._katexOptions; + } + + static katexLoadedCallback() { + // render all d-math tags + const mathTags = document.querySelectorAll('d-math'); + for (const mathTag of mathTags) { + mathTag.renderContent(); + } + // transform inline delimited math to d-math tags + if (DMath.katexOptions.delimiters) { + renderMathInElement(document.body, DMath.katexOptions); + } + } + + static addKatex() { + // css tag can use this convenience function + document.head.insertAdjacentHTML('beforeend', katexCSSTag); + // script tag has to be created to work properly + const scriptTag = document.createElement('script'); + scriptTag.src = katexJSURL; + scriptTag.async = true; + scriptTag.onload = DMath.katexLoadedCallback; + scriptTag.crossorigin = 'anonymous'; + document.head.appendChild(scriptTag); + + DMath.katexAdded = true; + } + + get options() { + const localOptions = { displayMode: this.hasAttribute('block') }; + return Object.assign(localOptions, DMath.katexOptions); + } + + connectedCallback() { + super.connectedCallback(); + if (!DMath.katexAdded) { + DMath.addKatex(); + } + } + + renderContent() { + if (typeof katex !== 'undefined') { + const container = this.root.querySelector('#katex-container'); + katex.render(this.textContent, container, this.options); + } + } + + } + + DMath.katexAdded = false; + DMath.inlineMathRendered = false; + window.DMath = DMath; // TODO: check if this can be removed, or if we should expose a distill global + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + function collect_citations(dom = document) { + const citations = new Set(); + const citeTags = dom.querySelectorAll("d-cite"); + for (const tag of citeTags) { + const keyString = tag.getAttribute("key") || tag.getAttribute("bibtex-key"); + const keys = keyString.split(",").map(k => k.trim()); + for (const key of keys) { + citations.add(key); + } + } + return [...citations]; + } + + function author_string(ent, template, sep, finalSep) { + if (ent.author == null) { + return ""; + } + var names = ent.author.split(" and "); + let name_strings = names.map(name => { + name = name.trim(); + if (name.indexOf(",") != -1) { + var last = name.split(",")[0].trim(); + var firsts = name.split(",")[1]; + } else if (name.indexOf(" ") != -1) { + var last = name + .split(" ") + .slice(-1)[0] + .trim(); + var firsts = name + .split(" ") + .slice(0, -1) + .join(" "); + } else { + var last = name.trim(); + } + var initials = ""; + if (firsts != undefined) { + initials = firsts + .trim() + .split(" ") + .map(s => s.trim()[0]); + initials = initials.join(".") + "."; + } + return template + .replace("${F}", firsts) + .replace("${L}", last) + .replace("${I}", initials) + .trim(); // in case one of first or last was empty + }); + if (names.length > 1) { + var str = name_strings.slice(0, names.length - 1).join(sep); + str += (finalSep || sep) + name_strings[names.length - 1]; + return str; + } else { + return name_strings[0]; + } + } + + function venue_string(ent) { + var cite = ent.journal || ent.booktitle || ""; + if ("volume" in ent) { + var issue = ent.issue || ent.number; + issue = issue != undefined ? "(" + issue + ")" : ""; + cite += ", Vol " + ent.volume + issue; + } + if ("pages" in ent) { + cite += ", pp. " + ent.pages; + } + if (cite != "") cite += ". "; + if ("publisher" in ent) { + cite += ent.publisher; + if (cite[cite.length - 1] != ".") cite += "."; + } + return cite; + } + + function link_string(ent) { + if ("url" in ent) { + var url = ent.url; + var arxiv_match = /arxiv\.org\/abs\/([0-9\.]*)/.exec(url); + if (arxiv_match != null) { + url = `http://arxiv.org/pdf/${arxiv_match[1]}.pdf`; + } + + if (url.slice(-4) == ".pdf") { + var label = "PDF"; + } else if (url.slice(-5) == ".html") { + var label = "HTML"; + } + return `  [${label || "link"}]`; + } /* else if ("doi" in ent){ + return `  [DOI]`; + }*/ else { + return ""; + } + } + function doi_string(ent, new_line) { + if ("doi" in ent) { + return `${new_line ? "
      " : ""} DOI: ${ent.doi}`; + } else { + return ""; + } + } + + function title_string(ent) { + return '' + ent.title + " "; + } + + function bibliography_cite(ent, fancy) { + if (ent) { + var cite = title_string(ent); + cite += link_string(ent) + "
      "; + if (ent.author) { + cite += author_string(ent, "${L}, ${I}", ", ", " and "); + if (ent.year || ent.date) { + cite += ", "; + } + } + if (ent.year || ent.date) { + cite += (ent.year || ent.date) + ". "; + } else { + cite += ". "; + } + cite += venue_string(ent); + cite += doi_string(ent); + return cite; + /*var cite = author_string(ent, "${L}, ${I}", ", ", " and "); + if (ent.year || ent.date){ + cite += ", " + (ent.year || ent.date) + ". " + } else { + cite += ". " + } + cite += "" + ent.title + ". "; + cite += venue_string(ent); + cite += doi_string(ent); + cite += link_string(ent); + return cite*/ + } else { + return "?"; + } + } + + function hover_cite(ent) { + if (ent) { + var cite = ""; + cite += "" + ent.title + ""; + cite += link_string(ent); + cite += "
      "; + + var a_str = author_string(ent, "${I} ${L}", ", ") + "."; + var v_str = + venue_string(ent).trim() + " " + ent.year + ". " + doi_string(ent, true); + + if ((a_str + v_str).length < Math.min(40, ent.title.length)) { + cite += a_str + " " + v_str; + } else { + cite += a_str + "
      " + v_str; + } + return cite; + } else { + return "?"; + } + } + + function domContentLoaded() { + return ['interactive', 'complete'].indexOf(document.readyState) !== -1; + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + function _moveLegacyAffiliationFormatIntoArray(frontMatter) { + // authors used to have propoerties "affiliation" and "affiliationURL". + // We now encourage using an array for affiliations containing objects with + // properties "name" and "url". + for (let author of frontMatter.authors) { + const hasOldStyle = Boolean(author.affiliation); + const hasNewStyle = Boolean(author.affiliations); + if (!hasOldStyle) continue; + if (hasNewStyle) { + console.warn(`Author ${author.author} has both old-style ("affiliation" & "affiliationURL") and new style ("affiliations") affiliation information!`); + } else { + let newAffiliation = { + "name": author.affiliation + }; + if (author.affiliationURL) newAffiliation.url = author.affiliationURL; + author.affiliations = [newAffiliation]; + } + } + return frontMatter + } + + function parseFrontmatter(element) { + const scriptTag = element.firstElementChild; + if (scriptTag) { + const type = scriptTag.getAttribute('type'); + if (type.split('/')[1] == 'json') { + const content = scriptTag.textContent; + const parsed = JSON.parse(content); + return _moveLegacyAffiliationFormatIntoArray(parsed); + } else { + console.error('Distill only supports JSON frontmatter tags anymore; no more YAML.'); + } + } else { + console.error('You added a frontmatter tag but did not provide a script tag with front matter data in it. Please take a look at our templates.'); + } + return {}; + } + + class FrontMatter$1 extends HTMLElement { + + static get is() { return 'd-front-matter'; } + + constructor() { + super(); + + const options = {childList: true, characterData: true, subtree: true}; + const observer = new MutationObserver( (entries) => { + for (const entry of entries) { + if (entry.target.nodeName === 'SCRIPT' || entry.type === 'characterData') { + const data = parseFrontmatter(this); + this.notify(data); + } + } + }); + observer.observe(this, options); + } + + notify(data) { + const options = { detail: data, bubbles: true }; + const event = new CustomEvent('onFrontMatterChanged', options); + document.dispatchEvent(event); + } + + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + // no appendix -> add appendix + // title in front, no h1 -> add it + // no title in front, h1 -> read and put into frontMatter + // footnote -> footnote list + // break up bib + // if citation, no bib-list -> add citation-list + + // if authors, no byline -> add byline + + function optionalComponents(dom, data) { + const body = dom.body; + const article = body.querySelector('d-article'); + + // If we don't have an article tag, something weird is going on—giving up. + if (!article) { + console.warn('No d-article tag found; skipping adding optional components!'); + return; + } + + let byline = dom.querySelector('d-byline'); + if (!byline) { + if (data.authors) { + byline = dom.createElement('d-byline'); + body.insertBefore(byline, article); + } else { + console.warn('No authors found in front matter; please add them before submission!'); + } + } + + let title = dom.querySelector('d-title'); + if (!title) { + title = dom.createElement('d-title'); + body.insertBefore(title, byline); + } + + let h1 = title.querySelector('h1'); + if (!h1) { + h1 = dom.createElement('h1'); + h1.textContent = data.title; + title.insertBefore(h1, title.firstChild); + } + + const hasPassword = typeof data.password !== 'undefined'; + let interstitial = body.querySelector('d-interstitial'); + if (hasPassword && !interstitial) { + const inBrowser = typeof window !== 'undefined'; + const onLocalhost = inBrowser && window.location.hostname.includes('localhost'); + if (!inBrowser || !onLocalhost) { + interstitial = dom.createElement('d-interstitial'); + interstitial.password = data.password; + body.insertBefore(interstitial, body.firstChild); + } + } else if (!hasPassword && interstitial) { + interstitial.parentElement.removeChild(this); + } + + let appendix = dom.querySelector('d-appendix'); + if (!appendix) { + appendix = dom.createElement('d-appendix'); + dom.body.appendChild(appendix); + } + + let footnoteList = dom.querySelector('d-footnote-list'); + if (!footnoteList) { + footnoteList = dom.createElement('d-footnote-list'); + appendix.appendChild(footnoteList); + } + + let citationList = dom.querySelector('d-citation-list'); + if (!citationList) { + citationList = dom.createElement('d-citation-list'); + appendix.appendChild(citationList); + } + + } + + // Copyright 2018 The Distill Template Authors + + const frontMatter = new FrontMatter(); + + const Controller = { + frontMatter: frontMatter, + waitingOn: { + bibliography: [], + citations: [] + }, + listeners: { + onCiteKeyCreated(event) { + const [citeTag, keys] = event.detail; + + // ensure we have citations + if (!frontMatter.citationsCollected) { + // console.debug('onCiteKeyCreated, but unresolved dependency ("citations"). Enqueing.'); + Controller.waitingOn.citations.push(() => + Controller.listeners.onCiteKeyCreated(event) + ); + return; + } + + // ensure we have a loaded bibliography + if (!frontMatter.bibliographyParsed) { + // console.debug('onCiteKeyCreated, but unresolved dependency ("bibliography"). Enqueing.'); + Controller.waitingOn.bibliography.push(() => + Controller.listeners.onCiteKeyCreated(event) + ); + return; + } + + const numbers = keys.map(key => frontMatter.citations.indexOf(key)); + citeTag.numbers = numbers; + const entries = keys.map(key => frontMatter.bibliography.get(key)); + citeTag.entries = entries; + }, + + onCiteKeyChanged() { + // const [citeTag, keys] = event.detail; + + // update citations + frontMatter.citations = collect_citations(); + frontMatter.citationsCollected = true; + for (const waitingCallback of Controller.waitingOn.citations.slice()) { + waitingCallback(); + } + + // update bibliography + const citationListTag = document.querySelector("d-citation-list"); + const bibliographyEntries = new Map( + frontMatter.citations.map(citationKey => { + return [citationKey, frontMatter.bibliography.get(citationKey)]; + }) + ); + citationListTag.citations = bibliographyEntries; + + const citeTags = document.querySelectorAll("d-cite"); + for (const citeTag of citeTags) { + console.log(citeTag); + const keys = citeTag.keys; + const numbers = keys.map(key => frontMatter.citations.indexOf(key)); + citeTag.numbers = numbers; + const entries = keys.map(key => frontMatter.bibliography.get(key)); + citeTag.entries = entries; + } + }, + + onCiteKeyRemoved(event) { + Controller.listeners.onCiteKeyChanged(event); + }, + + onBibliographyChanged(event) { + const citationListTag = document.querySelector("d-citation-list"); + + const bibliography = event.detail; + + frontMatter.bibliography = bibliography; + frontMatter.bibliographyParsed = true; + for (const waitingCallback of Controller.waitingOn.bibliography.slice()) { + waitingCallback(); + } + + // ensure we have citations + if (!frontMatter.citationsCollected) { + Controller.waitingOn.citations.push(function() { + Controller.listeners.onBibliographyChanged({ + target: event.target, + detail: event.detail + }); + }); + return; + } + + if (citationListTag.hasAttribute("distill-prerendered")) { + console.debug("Citation list was prerendered; not updating it."); + } else { + const entries = new Map( + frontMatter.citations.map(citationKey => { + return [citationKey, frontMatter.bibliography.get(citationKey)]; + }) + ); + citationListTag.citations = entries; + } + }, + + onFootnoteChanged() { + // const footnote = event.detail; + //TODO: optimize to only update current footnote + const footnotesList = document.querySelector("d-footnote-list"); + if (footnotesList) { + const footnotes = document.querySelectorAll("d-footnote"); + footnotesList.footnotes = footnotes; + } + }, + + onFrontMatterChanged(event) { + const data = event.detail; + mergeFromYMLFrontmatter(frontMatter, data); + + const interstitial = document.querySelector("d-interstitial"); + if (interstitial) { + if (typeof frontMatter.password !== "undefined") { + interstitial.password = frontMatter.password; + } else { + interstitial.parentElement.removeChild(interstitial); + } + } + + const prerendered = document.body.hasAttribute("distill-prerendered"); + if (!prerendered && domContentLoaded()) { + optionalComponents(document, frontMatter); + + const appendix = document.querySelector("distill-appendix"); + if (appendix) { + appendix.frontMatter = frontMatter; + } + + const byline = document.querySelector("d-byline"); + if (byline) { + byline.frontMatter = frontMatter; + } + + if (data.katex) { + DMath.katexOptions = data.katex; + } + } + }, + + DOMContentLoaded() { + if (Controller.loaded) { + console.warn( + "Controller received DOMContentLoaded but was already loaded!" + ); + return; + } else if (!domContentLoaded()) { + console.warn( + "Controller received DOMContentLoaded at document.readyState: " + + document.readyState + + "!" + ); + return; + } else { + Controller.loaded = true; + console.debug("Runlevel 4: Controller running DOMContentLoaded"); + } + + const frontMatterTag = document.querySelector("d-front-matter"); + if (frontMatterTag) { + const data = parseFrontmatter(frontMatterTag); + Controller.listeners.onFrontMatterChanged({ detail: data }); + } + + // Resolving "citations" dependency due to initial DOM load + frontMatter.citations = collect_citations(); + frontMatter.citationsCollected = true; + for (const waitingCallback of Controller.waitingOn.citations.slice()) { + waitingCallback(); + } + + if (frontMatter.bibliographyParsed) { + for (const waitingCallback of Controller.waitingOn.bibliography.slice()) { + waitingCallback(); + } + } + + const footnotesList = document.querySelector("d-footnote-list"); + if (footnotesList) { + const footnotes = document.querySelectorAll("d-footnote"); + footnotesList.footnotes = footnotes; + } + } + } // listeners + }; // Controller + + var base = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nhtml {\n font-size: 14px;\n\tline-height: 1.6em;\n /* font-family: \"Libre Franklin\", \"Helvetica Neue\", sans-serif; */\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", Arial, sans-serif;\n /*, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";*/\n text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\n\n@media(min-width: 768px) {\n html {\n font-size: 16px;\n }\n}\n\nbody {\n margin: 0;\n}\n\na {\n color: #004276;\n}\n\nfigure {\n margin: 0;\n}\n\ntable {\n\tborder-collapse: collapse;\n\tborder-spacing: 0;\n}\n\ntable th {\n\ttext-align: left;\n}\n\ntable thead {\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n}\n\ntable thead th {\n padding-bottom: 0.5em;\n}\n\ntable tbody :first-child td {\n padding-top: 0.5em;\n}\n\npre {\n overflow: auto;\n max-width: 100%;\n}\n\np {\n margin-top: 0;\n margin-bottom: 1em;\n}\n\nsup, sub {\n vertical-align: baseline;\n position: relative;\n top: -0.4em;\n line-height: 1em;\n}\n\nsub {\n top: 0.4em;\n}\n\n.kicker,\n.marker {\n font-size: 15px;\n font-weight: 600;\n color: rgba(0, 0, 0, 0.5);\n}\n\n\n/* Headline */\n\n@media(min-width: 1024px) {\n d-title h1 span {\n display: block;\n }\n}\n\n/* Figure */\n\nfigure {\n position: relative;\n margin-bottom: 2.5em;\n margin-top: 1.5em;\n}\n\nfigcaption+figure {\n\n}\n\nfigure img {\n width: 100%;\n}\n\nfigure svg text,\nfigure svg tspan {\n}\n\nfigcaption,\n.figcaption {\n color: rgba(0, 0, 0, 0.6);\n font-size: 12px;\n line-height: 1.5em;\n}\n\n@media(min-width: 1024px) {\nfigcaption,\n.figcaption {\n font-size: 13px;\n }\n}\n\nfigure.external img {\n background: white;\n border: 1px solid rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);\n padding: 18px;\n box-sizing: border-box;\n}\n\nfigcaption a {\n color: rgba(0, 0, 0, 0.6);\n}\n\nfigcaption b,\nfigcaption strong, {\n font-weight: 600;\n color: rgba(0, 0, 0, 1.0);\n}\n"; + + var layout = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@supports not (display: grid) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n display: block;\n padding: 8px;\n }\n}\n\n.base-grid,\ndistill-header,\nd-title,\nd-abstract,\nd-article,\nd-appendix,\ndistill-appendix,\nd-byline,\nd-footnote-list,\nd-citation-list,\ndistill-footer {\n display: grid;\n justify-items: stretch;\n grid-template-columns: [screen-start] 8px [page-start kicker-start text-start gutter-start middle-start] 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr [text-end page-end gutter-end kicker-end middle-end] 8px [screen-end];\n grid-column-gap: 8px;\n}\n\n.grid {\n display: grid;\n grid-column-gap: 8px;\n}\n\n@media(min-width: 768px) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n grid-template-columns: [screen-start] 1fr [page-start kicker-start middle-start text-start] 45px 45px 45px 45px 45px 45px 45px 45px [ kicker-end text-end gutter-start] 45px [middle-end] 45px [page-end gutter-end] 1fr [screen-end];\n grid-column-gap: 16px;\n }\n\n .grid {\n grid-column-gap: 16px;\n }\n}\n\n@media(min-width: 1000px) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n grid-template-columns: [screen-start] 1fr [page-start kicker-start] 50px [middle-start] 50px [text-start kicker-end] 50px 50px 50px 50px 50px 50px 50px 50px [text-end gutter-start] 50px [middle-end] 50px [page-end gutter-end] 1fr [screen-end];\n grid-column-gap: 16px;\n }\n\n .grid {\n grid-column-gap: 16px;\n }\n}\n\n@media(min-width: 1180px) {\n .base-grid,\n distill-header,\n d-title,\n d-abstract,\n d-article,\n d-appendix,\n distill-appendix,\n d-byline,\n d-footnote-list,\n d-citation-list,\n distill-footer {\n grid-template-columns: [screen-start] 1fr [page-start kicker-start] 60px [middle-start] 60px [text-start kicker-end] 60px 60px 60px 60px 60px 60px 60px 60px [text-end gutter-start] 60px [middle-end] 60px [page-end gutter-end] 1fr [screen-end];\n grid-column-gap: 32px;\n }\n\n .grid {\n grid-column-gap: 32px;\n }\n}\n\n\n\n\n.base-grid {\n grid-column: screen;\n}\n\n/* .l-body,\nd-article > * {\n grid-column: text;\n}\n\n.l-page,\nd-title > *,\nd-figure {\n grid-column: page;\n} */\n\n.l-gutter {\n grid-column: gutter;\n}\n\n.l-text,\n.l-body {\n grid-column: text;\n}\n\n.l-page {\n grid-column: page;\n}\n\n.l-body-outset {\n grid-column: middle;\n}\n\n.l-page-outset {\n grid-column: page;\n}\n\n.l-screen {\n grid-column: screen;\n}\n\n.l-screen-inset {\n grid-column: screen;\n padding-left: 16px;\n padding-left: 16px;\n}\n\n\n/* Aside */\n\nd-article aside {\n grid-column: gutter;\n font-size: 12px;\n line-height: 1.6em;\n color: rgba(0, 0, 0, 0.6)\n}\n\n@media(min-width: 768px) {\n aside {\n grid-column: gutter;\n }\n\n .side {\n grid-column: gutter;\n }\n}\n"; + + var print = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@media print {\n\n @page {\n size: 8in 11in;\n @bottom-right {\n content: counter(page) \" of \" counter(pages);\n }\n }\n\n html {\n /* no general margins -- CSS Grid takes care of those */\n }\n\n p, code {\n page-break-inside: avoid;\n }\n\n h2, h3 {\n page-break-after: avoid;\n }\n\n d-header {\n visibility: hidden;\n }\n\n d-footer {\n display: none!important;\n }\n\n}\n"; + + var byline = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nd-byline {\n contain: style;\n overflow: hidden;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n font-size: 0.8rem;\n line-height: 1.8em;\n padding: 1.5rem 0;\n min-height: 1.8em;\n}\n\n\nd-byline .byline {\n grid-template-columns: 1fr 1fr;\n grid-column: text;\n}\n\n@media(min-width: 768px) {\n d-byline .byline {\n grid-template-columns: 1fr 1fr 1fr 1fr;\n }\n}\n\nd-byline .authors-affiliations {\n grid-column-end: span 2;\n grid-template-columns: 1fr 1fr;\n margin-bottom: 1em;\n}\n\n@media(min-width: 768px) {\n d-byline .authors-affiliations {\n margin-bottom: 0;\n }\n}\n\nd-byline h3 {\n font-size: 0.6rem;\n font-weight: 400;\n color: rgba(0, 0, 0, 0.5);\n margin: 0;\n text-transform: uppercase;\n}\n\nd-byline p {\n margin: 0;\n}\n\nd-byline a,\nd-article d-byline a {\n color: rgba(0, 0, 0, 0.8);\n text-decoration: none;\n border-bottom: none;\n}\n\nd-article d-byline a:hover {\n text-decoration: underline;\n border-bottom: none;\n}\n\nd-byline p.author {\n font-weight: 500;\n}\n\nd-byline .affiliations {\n\n}\n"; + + var article = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nd-article {\n contain: layout style;\n overflow-x: hidden;\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n padding-top: 2rem;\n color: rgba(0, 0, 0, 0.8);\n}\n\nd-article > * {\n grid-column: text;\n}\n\n@media(min-width: 768px) {\n d-article {\n font-size: 16px;\n }\n}\n\n@media(min-width: 1024px) {\n d-article {\n font-size: 1.06rem;\n line-height: 1.7em;\n }\n}\n\n\n/* H2 */\n\n\nd-article .marker {\n text-decoration: none;\n border: none;\n counter-reset: section;\n grid-column: kicker;\n line-height: 1.7em;\n}\n\nd-article .marker:hover {\n border: none;\n}\n\nd-article .marker span {\n padding: 0 3px 4px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n position: relative;\n top: 4px;\n}\n\nd-article .marker:hover span {\n color: rgba(0, 0, 0, 0.7);\n border-bottom: 1px solid rgba(0, 0, 0, 0.7);\n}\n\nd-article h2 {\n font-weight: 600;\n font-size: 24px;\n line-height: 1.25em;\n margin: 2rem 0 1.5rem 0;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n padding-bottom: 1rem;\n}\n\n@media(min-width: 1024px) {\n d-article h2 {\n font-size: 36px;\n }\n}\n\n/* H3 */\n\nd-article h3 {\n font-weight: 700;\n font-size: 18px;\n line-height: 1.4em;\n margin-bottom: 1em;\n margin-top: 2em;\n}\n\n@media(min-width: 1024px) {\n d-article h3 {\n font-size: 20px;\n }\n}\n\n/* H4 */\n\nd-article h4 {\n font-weight: 600;\n text-transform: uppercase;\n font-size: 14px;\n line-height: 1.4em;\n}\n\nd-article a {\n color: inherit;\n}\n\nd-article p,\nd-article ul,\nd-article ol,\nd-article blockquote {\n margin-top: 0;\n margin-bottom: 1em;\n margin-left: 0;\n margin-right: 0;\n}\n\nd-article blockquote {\n border-left: 2px solid rgba(0, 0, 0, 0.2);\n padding-left: 2em;\n font-style: italic;\n color: rgba(0, 0, 0, 0.6);\n}\n\nd-article a {\n border-bottom: 1px solid rgba(0, 0, 0, 0.4);\n text-decoration: none;\n}\n\nd-article a:hover {\n border-bottom: 1px solid rgba(0, 0, 0, 0.8);\n}\n\nd-article .link {\n text-decoration: underline;\n cursor: pointer;\n}\n\nd-article ul,\nd-article ol {\n padding-left: 24px;\n}\n\nd-article li {\n margin-bottom: 0.2em;\n margin-left: 0;\n padding-left: 0;\n}\n\nd-article li:last-child {\n margin-bottom: 0;\n}\n\nd-article pre {\n font-size: 14px;\n margin-bottom: 20px;\n}\n\nd-article hr {\n grid-column: screen;\n width: 100%;\n border: none;\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 60px;\n margin-bottom: 60px;\n}\n\nd-article section {\n margin-top: 60px;\n margin-bottom: 60px;\n}\n\nd-article span.equation-mimic {\n font-family: georgia;\n font-size: 115%;\n font-style: italic;\n}\n\nd-article > d-code,\nd-article section > d-code {\n display: block;\n}\n\nd-article > d-math[block],\nd-article section > d-math[block] {\n display: block;\n}\n\n@media (max-width: 768px) {\n d-article > d-code,\n d-article section > d-code,\n d-article > d-math[block],\n d-article section > d-math[block] {\n overflow-x: scroll;\n -ms-overflow-style: none; // IE 10+\n overflow: -moz-scrollbars-none; // Firefox\n }\n\n d-article > d-code::-webkit-scrollbar,\n d-article section > d-code::-webkit-scrollbar,\n d-article > d-math[block]::-webkit-scrollbar,\n d-article section > d-math[block]::-webkit-scrollbar {\n display: none; // Safari and Chrome\n }\n}\n\nd-article .citation {\n color: #668;\n cursor: pointer;\n}\n\nd-include {\n width: auto;\n display: block;\n}\n\nd-figure {\n contain: layout style;\n}\n\n/* KaTeX */\n\n.katex, .katex-prerendered {\n contain: style;\n display: inline-block;\n}\n\n/* Tables */\n\nd-article table {\n border-collapse: collapse;\n margin-bottom: 1.5rem;\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n}\n\nd-article table th {\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n}\n\nd-article table td {\n border-bottom: 1px solid rgba(0, 0, 0, 0.05);\n}\n\nd-article table tr:last-of-type td {\n border-bottom: none;\n}\n\nd-article table th,\nd-article table td {\n font-size: 15px;\n padding: 2px 8px;\n}\n\nd-article table tbody :first-child td {\n padding-top: 2px;\n}\n"; + + var title = "/*\n * Copyright 2018 The Distill Template Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nd-title {\n padding: 2rem 0 1.5rem;\n contain: layout style;\n overflow-x: hidden;\n}\n\n@media(min-width: 768px) {\n d-title {\n padding: 4rem 0 1.5rem;\n }\n}\n\nd-title h1 {\n grid-column: text;\n font-size: 40px;\n font-weight: 700;\n line-height: 1.1em;\n margin: 0 0 0.5rem;\n}\n\n@media(min-width: 768px) {\n d-title h1 {\n font-size: 50px;\n }\n}\n\nd-title p {\n font-weight: 300;\n font-size: 1.2rem;\n line-height: 1.55em;\n grid-column: text;\n}\n\nd-title .status {\n margin-top: 0px;\n font-size: 12px;\n color: #009688;\n opacity: 0.8;\n grid-column: kicker;\n}\n\nd-title .status span {\n line-height: 1;\n display: inline-block;\n padding: 6px 0;\n border-bottom: 1px solid #80cbc4;\n font-size: 11px;\n text-transform: uppercase;\n}\n"; + + // Copyright 2018 The Distill Template Authors + + const styles = base + layout + title + byline + article + math + print; + + function makeStyleTag(dom) { + + const styleTagId = 'distill-prerendered-styles'; + const prerenderedTag = dom.getElementById(styleTagId); + if (!prerenderedTag) { + const styleTag = dom.createElement('style'); + styleTag.id = styleTagId; + styleTag.type = 'text/css'; + const cssTextTag = dom.createTextNode(styles); + styleTag.appendChild(cssTextTag); + const firstScriptTag = dom.head.querySelector('script'); + dom.head.insertBefore(styleTag, firstScriptTag); + } + + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + function addPolyfill(polyfill, polyfillLoadedCallback) { + console.debug('Runlevel 0: Polyfill required: ' + polyfill.name); + const script = document.createElement('script'); + script.src = polyfill.url; + script.async = false; + if (polyfillLoadedCallback) { + script.onload = function() { polyfillLoadedCallback(polyfill); }; + } + script.onerror = function() { + new Error('Runlevel 0: Polyfills failed to load script ' + polyfill.name); + }; + document.head.appendChild(script); + } + + const polyfills = [ + { + name: 'WebComponents', + support: function() { + return 'customElements' in window && + 'attachShadow' in Element.prototype && + 'getRootNode' in Element.prototype && + 'content' in document.createElement('template') && + 'Promise' in window && + 'from' in Array; + }, + url: 'https://distill.pub/third-party/polyfills/webcomponents-lite.js' + }, { + name: 'IntersectionObserver', + support: function() { + return 'IntersectionObserver' in window && + 'IntersectionObserverEntry' in window; + }, + url: 'https://distill.pub/third-party/polyfills/intersection-observer.js' + }, + ]; + + class Polyfills { + + static browserSupportsAllFeatures() { + return polyfills.every((poly) => poly.support()); + } + + static load(callback) { + // Define an intermediate callback that checks if all is loaded. + const polyfillLoaded = function(polyfill) { + polyfill.loaded = true; + console.debug('Runlevel 0: Polyfill has finished loading: ' + polyfill.name); + // console.debug(window[polyfill.name]); + if (Polyfills.neededPolyfills.every((poly) => poly.loaded)) { + console.debug('Runlevel 0: All required polyfills have finished loading.'); + console.debug('Runlevel 0->1.'); + window.distillRunlevel = 1; + callback(); + } + }; + // Add polyfill script tags + for (const polyfill of Polyfills.neededPolyfills) { + addPolyfill(polyfill, polyfillLoaded); + } + } + + static get neededPolyfills() { + if (!Polyfills._neededPolyfills) { + Polyfills._neededPolyfills = polyfills.filter((poly) => !poly.support()); + } + return Polyfills._neededPolyfills; + } + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + // const marginSmall = 16; + // const marginLarge = 3 * marginSmall; + // const margin = marginSmall + marginLarge; + // const gutter = marginSmall; + // const outsetAmount = margin / 2; + // const numCols = 4; + // const numGutters = numCols - 1; + // const columnWidth = (768 - 2 * marginLarge - numGutters * gutter) / numCols; + // + // const screenwidth = 768; + // const pageWidth = screenwidth - 2 * marginLarge; + // const bodyWidth = pageWidth - columnWidth - gutter; + + function body(selector) { + return `${selector} { + grid-column: left / text; + } + `; + } + + // Copyright 2018 The Distill Template Authors + + const T$1 = Template('d-abstract', ` + + + +`); + + class Abstract extends T$1(HTMLElement) { + + } + + // Copyright 2018 The Distill Template Authors + + const T$2 = Template('d-appendix', ` + + +`, false); + + class Appendix extends T$2(HTMLElement) { + + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + // import { Template } from '../mixins/template'; + // import { Controller } from '../controller'; + + const isOnlyWhitespace = /^\s*$/; + + class Article extends HTMLElement { + static get is() { return 'd-article'; } + + constructor() { + super(); + + new MutationObserver( (mutations) => { + for (const mutation of mutations) { + for (const addedNode of mutation.addedNodes) { + switch (addedNode.nodeName) { + case '#text': { // usually text nodes are only linebreaks. + const text = addedNode.nodeValue; + if (!isOnlyWhitespace.test(text)) { + console.warn('Use of unwrapped text in distill articles is discouraged as it breaks layout! Please wrap any text in a or

      tag. We found the following text: ' + text); + const wrapper = document.createElement('span'); + wrapper.innerHTML = addedNode.nodeValue; + addedNode.parentNode.insertBefore(wrapper, addedNode); + addedNode.parentNode.removeChild(addedNode); + } + } break; + } + } + } + }).observe(this, {childList: true}); + } + + } + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + var bibtexParse = createCommonjsModule(function (module, exports) { + /* start bibtexParse 0.0.22 */ + + //Original work by Henrik Muehe (c) 2010 + // + //CommonJS port by Mikola Lysenko 2013 + // + //Port to Browser lib by ORCID / RCPETERS + // + //Issues: + //no comment handling within strings + //no string concatenation + //no variable values yet + //Grammar implemented here: + //bibtex -> (string | preamble | comment | entry)*; + //string -> '@STRING' '{' key_equals_value '}'; + //preamble -> '@PREAMBLE' '{' value '}'; + //comment -> '@COMMENT' '{' value '}'; + //entry -> '@' key '{' key ',' key_value_list '}'; + //key_value_list -> key_equals_value (',' key_equals_value)*; + //key_equals_value -> key '=' value; + //value -> value_quotes | value_braces | key; + //value_quotes -> '"' .*? '"'; // not quite + //value_braces -> '{' .*? '"'; // not quite + (function(exports) { + + function BibtexParser() { + + this.months = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"]; + this.notKey = [',','{','}',' ','=']; + this.pos = 0; + this.input = ""; + this.entries = new Array(); + + this.currentEntry = ""; + + this.setInput = function(t) { + this.input = t; + }; + + this.getEntries = function() { + return this.entries; + }; + + this.isWhitespace = function(s) { + return (s == ' ' || s == '\r' || s == '\t' || s == '\n'); + }; + + this.match = function(s, canCommentOut) { + if (canCommentOut == undefined || canCommentOut == null) + canCommentOut = true; + this.skipWhitespace(canCommentOut); + if (this.input.substring(this.pos, this.pos + s.length) == s) { + this.pos += s.length; + } else { + throw "Token mismatch, expected " + s + ", found " + + this.input.substring(this.pos); + } this.skipWhitespace(canCommentOut); + }; + + this.tryMatch = function(s, canCommentOut) { + if (canCommentOut == undefined || canCommentOut == null) + canCommentOut = true; + this.skipWhitespace(canCommentOut); + if (this.input.substring(this.pos, this.pos + s.length) == s) { + return true; + } else { + return false; + } }; + + /* when search for a match all text can be ignored, not just white space */ + this.matchAt = function() { + while (this.input.length > this.pos && this.input[this.pos] != '@') { + this.pos++; + } + if (this.input[this.pos] == '@') { + return true; + } return false; + }; + + this.skipWhitespace = function(canCommentOut) { + while (this.isWhitespace(this.input[this.pos])) { + this.pos++; + } if (this.input[this.pos] == "%" && canCommentOut == true) { + while (this.input[this.pos] != "\n") { + this.pos++; + } this.skipWhitespace(canCommentOut); + } }; + + this.value_braces = function() { + var bracecount = 0; + this.match("{", false); + var start = this.pos; + var escaped = false; + while (true) { + if (!escaped) { + if (this.input[this.pos] == '}') { + if (bracecount > 0) { + bracecount--; + } else { + var end = this.pos; + this.match("}", false); + return this.input.substring(start, end); + } } else if (this.input[this.pos] == '{') { + bracecount++; + } else if (this.pos >= this.input.length - 1) { + throw "Unterminated value"; + } } if (this.input[this.pos] == '\\' && escaped == false) + escaped = true; + else + escaped = false; + this.pos++; + } }; + + this.value_comment = function() { + var str = ''; + var brcktCnt = 0; + while (!(this.tryMatch("}", false) && brcktCnt == 0)) { + str = str + this.input[this.pos]; + if (this.input[this.pos] == '{') + brcktCnt++; + if (this.input[this.pos] == '}') + brcktCnt--; + if (this.pos >= this.input.length - 1) { + throw "Unterminated value:" + this.input.substring(start); + } this.pos++; + } return str; + }; + + this.value_quotes = function() { + this.match('"', false); + var start = this.pos; + var escaped = false; + while (true) { + if (!escaped) { + if (this.input[this.pos] == '"') { + var end = this.pos; + this.match('"', false); + return this.input.substring(start, end); + } else if (this.pos >= this.input.length - 1) { + throw "Unterminated value:" + this.input.substring(start); + } } + if (this.input[this.pos] == '\\' && escaped == false) + escaped = true; + else + escaped = false; + this.pos++; + } }; + + this.single_value = function() { + var start = this.pos; + if (this.tryMatch("{")) { + return this.value_braces(); + } else if (this.tryMatch('"')) { + return this.value_quotes(); + } else { + var k = this.key(); + if (k.match("^[0-9]+$")) + return k; + else if (this.months.indexOf(k.toLowerCase()) >= 0) + return k.toLowerCase(); + else + throw "Value expected:" + this.input.substring(start) + ' for key: ' + k; + + } }; + + this.value = function() { + var values = []; + values.push(this.single_value()); + while (this.tryMatch("#")) { + this.match("#"); + values.push(this.single_value()); + } return values.join(""); + }; + + this.key = function() { + var start = this.pos; + while (true) { + if (this.pos >= this.input.length) { + throw "Runaway key"; + } // а-яА-Я is Cyrillic + //console.log(this.input[this.pos]); + if (this.notKey.indexOf(this.input[this.pos]) >= 0) { + return this.input.substring(start, this.pos); + } else { + this.pos++; + + } } }; + + this.key_equals_value = function() { + var key = this.key(); + if (this.tryMatch("=")) { + this.match("="); + var val = this.value(); + return [ key, val ]; + } else { + throw "... = value expected, equals sign missing:" + + this.input.substring(this.pos); + } }; + + this.key_value_list = function() { + var kv = this.key_equals_value(); + this.currentEntry['entryTags'] = {}; + this.currentEntry['entryTags'][kv[0]] = kv[1]; + while (this.tryMatch(",")) { + this.match(","); + // fixes problems with commas at the end of a list + if (this.tryMatch("}")) { + break; + } + kv = this.key_equals_value(); + this.currentEntry['entryTags'][kv[0]] = kv[1]; + } }; + + this.entry_body = function(d) { + this.currentEntry = {}; + this.currentEntry['citationKey'] = this.key(); + this.currentEntry['entryType'] = d.substring(1); + this.match(","); + this.key_value_list(); + this.entries.push(this.currentEntry); + }; + + this.directive = function() { + this.match("@"); + return "@" + this.key(); + }; + + this.preamble = function() { + this.currentEntry = {}; + this.currentEntry['entryType'] = 'PREAMBLE'; + this.currentEntry['entry'] = this.value_comment(); + this.entries.push(this.currentEntry); + }; + + this.comment = function() { + this.currentEntry = {}; + this.currentEntry['entryType'] = 'COMMENT'; + this.currentEntry['entry'] = this.value_comment(); + this.entries.push(this.currentEntry); + }; + + this.entry = function(d) { + this.entry_body(d); + }; + + this.bibtex = function() { + while (this.matchAt()) { + var d = this.directive(); + this.match("{"); + if (d == "@STRING") { + this.string(); + } else if (d == "@PREAMBLE") { + this.preamble(); + } else if (d == "@COMMENT") { + this.comment(); + } else { + this.entry(d); + } + this.match("}"); + } }; + } + exports.toJSON = function(bibtex) { + var b = new BibtexParser(); + b.setInput(bibtex); + b.bibtex(); + return b.entries; + }; + + /* added during hackathon don't hate on me */ + exports.toBibtex = function(json) { + var out = ''; + for ( var i in json) { + out += "@" + json[i].entryType; + out += '{'; + if (json[i].citationKey) + out += json[i].citationKey + ', '; + if (json[i].entry) + out += json[i].entry ; + if (json[i].entryTags) { + var tags = ''; + for (var jdx in json[i].entryTags) { + if (tags.length != 0) + tags += ', '; + tags += jdx + '= {' + json[i].entryTags[jdx] + '}'; + } + out += tags; + } + out += '}\n\n'; + } + return out; + + }; + + })( exports); + + /* end bibtexParse */ + }); + + // Copyright 2018 The Distill Template Authors + + function normalizeTag(string) { + return string + .replace(/[\t\n ]+/g, ' ') + .replace(/{\\["^`.'acu~Hvs]( )?([a-zA-Z])}/g, (full, x, char) => char) + .replace(/{\\([a-zA-Z])}/g, (full, char) => char); + } + + function parseBibtex(bibtex) { + const bibliography = new Map(); + const parsedEntries = bibtexParse.toJSON(bibtex); + for (const entry of parsedEntries) { + // normalize tags; note entryTags is an object, not Map + for (const [key, value] of Object.entries(entry.entryTags)) { + entry.entryTags[key.toLowerCase()] = normalizeTag(value); + } + entry.entryTags.type = entry.entryType; + // add to bibliography + bibliography.set(entry.citationKey, entry.entryTags); + } + return bibliography; + } + + function serializeFrontmatterToBibtex(frontMatter) { + return `@article{${frontMatter.slug}, + author = {${frontMatter.bibtexAuthors}}, + title = {${frontMatter.title}}, + journal = {${frontMatter.journal.title}}, + year = {${frontMatter.publishedYear}}, + note = {${frontMatter.url}}, + doi = {${frontMatter.doi}} +}`; + } + + // Copyright 2018 The Distill Template Authors + + class Bibliography extends HTMLElement { + + static get is() { return 'd-bibliography'; } + + constructor() { + super(); + + // set up mutation observer + const options = {childList: true, characterData: true, subtree: true}; + const observer = new MutationObserver( (entries) => { + for (const entry of entries) { + if (entry.target.nodeName === 'SCRIPT' || entry.type === 'characterData') { + this.parseIfPossible(); + } + } + }); + observer.observe(this, options); + } + + connectedCallback() { + requestAnimationFrame(() => { + this.parseIfPossible(); + }); + } + + parseIfPossible() { + const scriptTag = this.querySelector('script'); + if (!scriptTag) return; + if (scriptTag.type == 'text/bibtex') { + const newBibtex = scriptTag.textContent; + if (this.bibtex !== newBibtex) { + this.bibtex = newBibtex; + const bibliography = parseBibtex(this.bibtex); + this.notify(bibliography); + } + } else if (scriptTag.type == 'text/json') { + const bibliography = new Map(JSON.parse(scriptTag.textContent)); + this.notify(bibliography); + } else { + console.warn('Unsupported bibliography script tag type: ' + scriptTag.type); + } + } + + notify(bibliography) { + const options = { detail: bibliography, bubbles: true }; + const event = new CustomEvent('onBibliographyChanged', options); + this.dispatchEvent(event); + } + + /* observe 'src' attribute */ + + static get observedAttributes() { + return ['src']; + } + + receivedBibtex(event) { + const bibliography = parseBibtex(event.target.response); + this.notify(bibliography); + } + + attributeChangedCallback(name, oldValue, newValue) { + var oReq = new XMLHttpRequest(); + oReq.onload = (e) => this.receivedBibtex(e); + oReq.onerror = () => console.warn(`Could not load Bibtex! (tried ${newValue})`); + oReq.responseType = 'text'; + oReq.open('GET', newValue, true); + oReq.send(); + } + + + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + // import style from '../styles/d-byline.css'; + + function bylineTemplate(frontMatter) { + return ` +

      +
      +

      Download

      + + Coming soon +
      +`; + } + + class Byline extends HTMLElement { + + static get is() { return 'd-byline'; } + + set frontMatter(frontMatter) { + this.innerHTML = bylineTemplate(frontMatter); + } + + } + + // Copyright 2018 The Distill Template Authors + + const T$3 = Template( + "d-cite", + ` + + + + +
      + +
      +` + ); + + class Cite extends T$3(HTMLElement) { + /* Lifecycle */ + constructor() { + super(); + this._numbers = []; + this._entries = []; + } + + connectedCallback() { + this.outerSpan = this.root.querySelector("#citation-"); + this.innerSpan = this.root.querySelector(".citation-number"); + this.hoverBox = this.root.querySelector("d-hover-box"); + window.customElements.whenDefined("d-hover-box").then(() => { + this.hoverBox.listen(this); + }); + // in case this component got connected after values were set + if (this.numbers) { + this.displayNumbers(this.numbers); + } + if (this.entries) { + this.displayEntries(this.entries); + } + } + + //TODO This causes an infinite loop on firefox with polyfills. + // This is only needed for interactive editing so no priority. + // disconnectedCallback() { + // const options = { detail: [this, this.keys], bubbles: true }; + // const event = new CustomEvent('onCiteKeyRemoved', options); + // document.dispatchEvent(event); + // } + + /* observe 'key' attribute */ + + static get observedAttributes() { + return ["key", "bibtex-key"]; + } + + attributeChangedCallback(name, oldValue, newValue) { + const eventName = oldValue ? "onCiteKeyChanged" : "onCiteKeyCreated"; + const keys = newValue.split(",").map(k => k.trim()); + const options = { detail: [this, keys], bubbles: true }; + const event = new CustomEvent(eventName, options); + document.dispatchEvent(event); + } + + set key(value) { + this.setAttribute("key", value); + } + + get key() { + return this.getAttribute("key") || this.getAttribute("bibtex-key"); + } + + get keys() { + const result = this.key.split(","); + console.log(result); + return result; + } + + /* Setters & Rendering */ + + set numbers(numbers) { + this._numbers = numbers; + this.displayNumbers(numbers); + } + + get numbers() { + return this._numbers; + } + + displayNumbers(numbers) { + if (!this.innerSpan) return; + const numberStrings = numbers.map(index => { + return index == -1 ? "?" : index + 1 + ""; + }); + const textContent = "[" + numberStrings.join(", ") + "]"; + this.innerSpan.textContent = textContent; + } + + set entries(entries) { + this._entries = entries; + this.displayEntries(entries); + } + + get entries() { + return this._entries; + } + + displayEntries(entries) { + if (!this.hoverBox) return; + this.hoverBox.innerHTML = `
        + ${entries + .map(hover_cite) + .map(html => `
      • ${html}
      • `) + .join("\n")} +
      `; + } + } + + // Copyright 2018 The Distill Template Authors + + const styles$1 = ` +d-citation-list { + contain: style; +} + +d-citation-list .references { + grid-column: text; +} + +d-citation-list .references .title { + font-weight: 500; +} +`; + + function renderCitationList(element, entries, dom=document) { + if (entries.size > 0) { + element.style.display = ''; + let list = element.querySelector('.references'); + if (list) { + list.innerHTML = ''; + } else { + const stylesTag = dom.createElement('style'); + stylesTag.innerHTML = styles$1; + element.appendChild(stylesTag); + + const heading = dom.createElement('h3'); + heading.id = 'references'; + heading.textContent = 'References'; + element.appendChild(heading); + + list = dom.createElement('ol'); + list.id = 'references-list'; + list.className = 'references'; + element.appendChild(list); + } + + for (const [key, entry] of entries) { + const listItem = dom.createElement('li'); + listItem.id = key; + listItem.innerHTML = bibliography_cite(entry); + list.appendChild(listItem); + } + } else { + element.style.display = 'none'; + } + } + + class CitationList extends HTMLElement { + + static get is() { return 'd-citation-list'; } + + connectedCallback() { + if (!this.hasAttribute('distill-prerendered')) { + this.style.display = 'none'; + } + } + + set citations(citations) { + renderCitationList(this, citations); + } + + } + + var prism = createCommonjsModule(function (module) { + /* ********************************************** + Begin prism-core.js + ********************************************** */ + + var _self = (typeof window !== 'undefined') + ? window // if in browser + : ( + (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) + ? self // if in worker + : {} // if in node js + ); + + /** + * Prism: Lightweight, robust, elegant syntax highlighting + * MIT license http://www.opensource.org/licenses/mit-license.php/ + * @author Lea Verou http://lea.verou.me + */ + + var Prism = (function (_self){ + + // Private helper vars + var lang = /\blang(?:uage)?-([\w-]+)\b/i; + var uniqueId = 0; + + + var _ = { + manual: _self.Prism && _self.Prism.manual, + disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, + util: { + encode: function encode(tokens) { + if (tokens instanceof Token) { + return new Token(tokens.type, encode(tokens.content), tokens.alias); + } else if (Array.isArray(tokens)) { + return tokens.map(encode); + } else { + return tokens.replace(/&/g, '&').replace(/' + env.content + ''; + }; + + /** + * @param {string} text + * @param {LinkedList} tokenList + * @param {any} grammar + * @param {LinkedListNode} startNode + * @param {number} startPos + * @param {boolean} [oneshot=false] + * @param {string} [target] + */ + function matchGrammar(text, tokenList, grammar, startNode, startPos, oneshot, target) { + for (var token in grammar) { + if (!grammar.hasOwnProperty(token) || !grammar[token]) { + continue; + } + + var patterns = grammar[token]; + patterns = Array.isArray(patterns) ? patterns : [patterns]; + + for (var j = 0; j < patterns.length; ++j) { + if (target && target == token + ',' + j) { + return; + } + + var pattern = patterns[j], + inside = pattern.inside, + lookbehind = !!pattern.lookbehind, + greedy = !!pattern.greedy, + lookbehindLength = 0, + alias = pattern.alias; + + if (greedy && !pattern.pattern.global) { + // Without the global flag, lastIndex won't work + var flags = pattern.pattern.toString().match(/[imsuy]*$/)[0]; + pattern.pattern = RegExp(pattern.pattern.source, flags + 'g'); + } + + pattern = pattern.pattern || pattern; + + for ( // iterate the token list and keep track of the current token/string position + var currentNode = startNode.next, pos = startPos; + currentNode !== tokenList.tail; + pos += currentNode.value.length, currentNode = currentNode.next + ) { + + var str = currentNode.value; + + if (tokenList.length > text.length) { + // Something went terribly wrong, ABORT, ABORT! + return; + } + + if (str instanceof Token) { + continue; + } + + var removeCount = 1; // this is the to parameter of removeBetween + + if (greedy && currentNode != tokenList.tail.prev) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (!match) { + break; + } + + var from = match.index + (lookbehind && match[1] ? match[1].length : 0); + var to = match.index + match[0].length; + var p = pos; + + // find the node that contains the match + p += currentNode.value.length; + while (from >= p) { + currentNode = currentNode.next; + p += currentNode.value.length; + } + // adjust pos (and p) + p -= currentNode.value.length; + pos = p; + + // the current node is a Token, then the match starts inside another Token, which is invalid + if (currentNode.value instanceof Token) { + continue; + } + + // find the last node which is affected by this match + for ( + var k = currentNode; + k !== tokenList.tail && (p < to || (typeof k.value === 'string' && !k.prev.value.greedy)); + k = k.next + ) { + removeCount++; + p += k.value.length; + } + removeCount--; + + // replace with the new match + str = text.slice(pos, p); + match.index -= pos; + } else { + pattern.lastIndex = 0; + + var match = pattern.exec(str); + } + + if (!match) { + if (oneshot) { + break; + } + + continue; + } + + if (lookbehind) { + lookbehindLength = match[1] ? match[1].length : 0; + } + + var from = match.index + lookbehindLength, + match = match[0].slice(lookbehindLength), + to = from + match.length, + before = str.slice(0, from), + after = str.slice(to); + + var removeFrom = currentNode.prev; + + if (before) { + removeFrom = addAfter(tokenList, removeFrom, before); + pos += before.length; + } + + removeRange(tokenList, removeFrom, removeCount); + + var wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias, match, greedy); + currentNode = addAfter(tokenList, removeFrom, wrapped); + + if (after) { + addAfter(tokenList, currentNode, after); + } + + + if (removeCount > 1) + matchGrammar(text, tokenList, grammar, currentNode.prev, pos, true, token + ',' + j); + + if (oneshot) + break; + } + } + } + } + + /** + * @typedef LinkedListNode + * @property {T} value + * @property {LinkedListNode | null} prev The previous node. + * @property {LinkedListNode | null} next The next node. + * @template T + */ + + /** + * @template T + */ + function LinkedList() { + /** @type {LinkedListNode} */ + var head = { value: null, prev: null, next: null }; + /** @type {LinkedListNode} */ + var tail = { value: null, prev: head, next: null }; + head.next = tail; + + /** @type {LinkedListNode} */ + this.head = head; + /** @type {LinkedListNode} */ + this.tail = tail; + this.length = 0; + } + + /** + * Adds a new node with the given value to the list. + * @param {LinkedList} list + * @param {LinkedListNode} node + * @param {T} value + * @returns {LinkedListNode} The added node. + * @template T + */ + function addAfter(list, node, value) { + // assumes that node != list.tail && values.length >= 0 + var next = node.next; + + var newNode = { value: value, prev: node, next: next }; + node.next = newNode; + next.prev = newNode; + list.length++; + + return newNode; + } + /** + * Removes `count` nodes after the given node. The given node will not be removed. + * @param {LinkedList} list + * @param {LinkedListNode} node + * @param {number} count + * @template T + */ + function removeRange(list, node, count) { + var next = node.next; + for (var i = 0; i < count && next !== list.tail; i++) { + next = next.next; + } + node.next = next; + next.prev = node; + list.length -= i; + } + /** + * @param {LinkedList} list + * @returns {T[]} + * @template T + */ + function toArray(list) { + var array = []; + var node = list.head.next; + while (node !== list.tail) { + array.push(node.value); + node = node.next; + } + return array; + } + + + if (!_self.document) { + if (!_self.addEventListener) { + // in Node.js + return _; + } + + if (!_.disableWorkerMessageHandler) { + // In worker + _self.addEventListener('message', function (evt) { + var message = JSON.parse(evt.data), + lang = message.language, + code = message.code, + immediateClose = message.immediateClose; + + _self.postMessage(_.highlight(code, _.languages[lang], lang)); + if (immediateClose) { + _self.close(); + } + }, false); + } + + return _; + } + + //Get current script and highlight + var script = _.util.currentScript(); + + if (script) { + _.filename = script.src; + + if (script.hasAttribute('data-manual')) { + _.manual = true; + } + } + + function highlightAutomaticallyCallback() { + if (!_.manual) { + _.highlightAll(); + } + } + + if (!_.manual) { + // If the document state is "loading", then we'll use DOMContentLoaded. + // If the document state is "interactive" and the prism.js script is deferred, then we'll also use the + // DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they + // might take longer one animation frame to execute which can create a race condition where only some plugins have + // been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded. + // See https://github.com/PrismJS/prism/issues/2102 + var readyState = document.readyState; + if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) { + document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback); + } else { + if (window.requestAnimationFrame) { + window.requestAnimationFrame(highlightAutomaticallyCallback); + } else { + window.setTimeout(highlightAutomaticallyCallback, 16); + } + } + } + + return _; + + })(_self); + + if ( module.exports) { + module.exports = Prism; + } + + // hack for components to work correctly in node.js + if (typeof commonjsGlobal !== 'undefined') { + commonjsGlobal.Prism = Prism; + } + + + /* ********************************************** + Begin prism-markup.js + ********************************************** */ + + Prism.languages.markup = { + 'comment': //, + 'prolog': /<\?[\s\S]+?\?>/, + 'doctype': { + pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i, + greedy: true + }, + 'cdata': //i, + 'tag': { + pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i, + greedy: true, + inside: { + 'tag': { + pattern: /^<\/?[^\s>\/]+/i, + inside: { + 'punctuation': /^<\/?/, + 'namespace': /^[^\s>\/:]+:/ + } + }, + 'attr-value': { + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, + inside: { + 'punctuation': [ + /^=/, + { + pattern: /^(\s*)["']|["']$/, + lookbehind: true + } + ] + } + }, + 'punctuation': /\/?>/, + 'attr-name': { + pattern: /[^\s>\/]+/, + inside: { + 'namespace': /^[^\s>\/:]+:/ + } + } + + } + }, + 'entity': /&#?[\da-z]{1,8};/i + }; + + Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = + Prism.languages.markup['entity']; + + // Plugin to make entity title show the real entity, idea by Roman Komarov + Prism.hooks.add('wrap', function(env) { + + if (env.type === 'entity') { + env.attributes['title'] = env.content.replace(/&/, '&'); + } + }); + + Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { + /** + * Adds an inlined language to markup. + * + * An example of an inlined language is CSS with ` + + + +`); + + class Code extends Mutating(T$4(HTMLElement)) { + + renderContent() { + + // check if language can be highlighted + this.languageName = this.getAttribute('language'); + if (!this.languageName) { + console.warn('You need to provide a language attribute to your block to let us know how to highlight your code; e.g.:\n zeros = np.zeros(shape).'); + return; + } + const language = prism.languages[this.languageName]; + if (language == undefined) { + console.warn(`Distill does not yet support highlighting your code block in "${this.languageName}'.`); + return; + } + + let content = this.textContent; + const codeTag = this.shadowRoot.querySelector('#code-container'); + + if (this.hasAttribute('block')) { + // normalize the tab indents + content = content.replace(/\n/, ''); + const tabs = content.match(/\s*/); + content = content.replace(new RegExp('\n' + tabs, 'g'), '\n'); + content = content.trim(); + // wrap code block in pre tag if needed + if (codeTag.parentNode instanceof ShadowRoot) { + const preTag = document.createElement('pre'); + this.shadowRoot.removeChild(codeTag); + preTag.appendChild(codeTag); + this.shadowRoot.appendChild(preTag); + } + + } + + codeTag.className = `language-${this.languageName}`; + codeTag.innerHTML = prism.highlight(content, language); + } + + } + + // Copyright 2018 The Distill Template Authors + + const T$5 = Template('d-footnote', ` + + + +
      + +
      +
      + + + + + +`); + + class Footnote extends T$5(HTMLElement) { + + constructor() { + super(); + + const options = {childList: true, characterData: true, subtree: true}; + const observer = new MutationObserver(this.notify); + observer.observe(this, options); + } + + notify() { + const options = { detail: this, bubbles: true }; + const event = new CustomEvent('onFootnoteChanged', options); + document.dispatchEvent(event); + } + + connectedCallback() { + // listen and notify about changes to slotted content + // const slot = this.shadowRoot.querySelector('#slot'); + // console.warn(slot.textContent); + // slot.addEventListener('slotchange', this.notify); + this.hoverBox = this.root.querySelector('d-hover-box'); + window.customElements.whenDefined('d-hover-box').then(() => { + this.hoverBox.listen(this); + }); + // create numeric ID + Footnote.currentFootnoteId += 1; + const IdString = Footnote.currentFootnoteId.toString(); + this.root.host.id = 'd-footnote-' + IdString; + + // set up hidden hover box + const id = 'dt-fn-hover-box-' + IdString; + this.hoverBox.id = id; + + // set up visible footnote marker + const span = this.root.querySelector('#fn-'); + span.setAttribute('id', 'fn-' + IdString); + span.setAttribute('data-hover-ref', id); + span.textContent = IdString; + } + + } + + Footnote.currentFootnoteId = 0; + + // Copyright 2018 The Distill Template Authors + + const T$6 = Template('d-footnote-list', ` + + +

      Footnotes

      +
        +`, false); + + class FootnoteList extends T$6(HTMLElement) { + + connectedCallback() { + super.connectedCallback(); + + this.list = this.root.querySelector('ol'); + // footnotes list is initially hidden + this.root.style.display = 'none'; + // look through document and register existing footnotes + // Store.subscribeTo('footnotes', (footnote) => { + // this.renderFootnote(footnote); + // }); + } + + // TODO: could optimize this to accept individual footnotes? + set footnotes(footnotes) { + this.list.innerHTML = ''; + if (footnotes.length) { + // ensure footnote list is visible + this.root.style.display = ''; + + for (const footnote of footnotes) { + // construct and append list item to show footnote + const listItem = document.createElement('li'); + listItem.id = footnote.id + '-listing'; + listItem.innerHTML = footnote.innerHTML; + + const backlink = document.createElement('a'); + backlink.setAttribute('class', 'footnote-backlink'); + backlink.setAttribute('target', '_self'); + backlink.textContent = '[↩]'; + backlink.href = '#' + footnote.id; + + listItem.appendChild(backlink); + this.list.appendChild(listItem); + } + } else { + // ensure footnote list is invisible + this.root.style.display = 'none'; + } + } + + } + + // Copyright 2018 The Distill Template Authors + + const T$7 = Template('d-hover-box', ` + + +
        +
        + +
        +
        +`); + + class HoverBox extends T$7(HTMLElement) { + + constructor() { + super(); + } + + connectedCallback() { + + } + + listen(element) { + // console.log(element) + this.bindDivEvents(this); + this.bindTriggerEvents(element); + // this.style.display = "block"; + } + + bindDivEvents(element) { + // For mice, same behavior as hovering on links + element.addEventListener('mouseover', () => { + if (!this.visible) this.showAtNode(element); + this.stopTimeout(); + }); + element.addEventListener('mouseout', () => { + this.extendTimeout(500); + }); + // Don't trigger body touchstart event when touching within box + element.addEventListener('touchstart', (event) => { + event.stopPropagation(); + }, {passive: true}); + // Close box when touching outside box + document.body.addEventListener('touchstart', () => { + this.hide(); + }, {passive: true}); + } + + bindTriggerEvents(node) { + node.addEventListener('mouseover', () => { + if (!this.visible) { + this.showAtNode(node); + } + this.stopTimeout(); + }); + + node.addEventListener('mouseout', () => { + this.extendTimeout(300); + }); + + node.addEventListener('touchstart', (event) => { + if (this.visible) { + this.hide(); + } else { + this.showAtNode(node); + } + // Don't trigger body touchstart event when touching link + event.stopPropagation(); + }, {passive: true}); + } + + show(position) { + this.visible = true; + this.style.display = 'block'; + // 10px extra offset from element + this.style.top = Math.round(position[1] + 10) + 'px'; + } + + showAtNode(node) { + // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop + const bbox = node.getBoundingClientRect(); + this.show([node.offsetLeft + bbox.width, node.offsetTop + bbox.height]); + } + + hide() { + this.visible = false; + this.style.display = 'none'; + this.stopTimeout(); + } + + stopTimeout() { + if (this.timeout) { + clearTimeout(this.timeout); + } + } + + extendTimeout(time) { + this.stopTimeout(); + this.timeout = setTimeout(() => { + this.hide(); + }, time); + } + + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + class Title extends HTMLElement { + static get is() { return 'd-title'; } + } + + // Copyright 2018 The Distill Template Authors + + const T$8 = Template('d-references', ` + +`, false); + + class References extends T$8(HTMLElement) { + + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + class TOC extends HTMLElement { + + static get is() { return 'd-toc'; } + + connectedCallback() { + if (!this.getAttribute('prerendered')) { + window.onload = () => { + const article = document.querySelector('d-article'); + const headings = article.querySelectorAll('h2, h3'); + renderTOC(this, headings); + }; + } + } + + } + + function renderTOC(element, headings) { + + let ToC =` + + +

        Table of contents

        +
          `; + + for (const el of headings) { + // should element be included in TOC? + const isInTitle = el.parentElement.tagName == 'D-TITLE'; + const isException = el.getAttribute('no-toc'); + if (isInTitle || isException) continue; + // create TOC entry + const title = el.textContent; + const link = '#' + el.getAttribute('id'); + + let newLine = '
        • ' + '' + title + '' + '
        • '; + if (el.tagName == 'H3') { + newLine = '
            ' + newLine + '
          '; + } else { + newLine += '
          '; + } + ToC += newLine; + + } + + ToC += '
        '; + element.innerHTML = ToC; + } + + // Copyright 2018 The Distill Template Authors + // + // Licensed under the Apache License, Version 2.0 (the "License"); + // you may not use this file except in compliance with the License. + // You may obtain a copy of the License at + // + // http://www.apache.org/licenses/LICENSE-2.0 + // + // Unless required by applicable law or agreed to in writing, software + // distributed under the License is distributed on an "AS IS" BASIS, + // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + // See the License for the specific language governing permissions and + // limitations under the License. + + // Figure + // + // d-figure provides a state-machine of visibility events: + // + // scroll out of view + // +----------------+ + // *do work here* | | + // +----------------+ +-+---------+ +-v---------+ + // | ready +----> onscreen | | offscreen | + // +----------------+ +---------^-+ +---------+-+ + // | | + // +----------------+ + // scroll into view + // + + class Figure extends HTMLElement { + + static get is() { return 'd-figure'; } + + static get readyQueue() { + if (!Figure._readyQueue) { + Figure._readyQueue = []; + } + return Figure._readyQueue; + } + + static addToReadyQueue(figure) { + if (Figure.readyQueue.indexOf(figure) === -1) { + Figure.readyQueue.push(figure); + Figure.runReadyQueue(); + } + } + + static runReadyQueue() { + // console.log("Checking to run readyQueue, length: " + Figure.readyQueue.length + ", scrolling: " + Figure.isScrolling); + // if (Figure.isScrolling) return; + // console.log("Running ready Queue"); + const figure = Figure.readyQueue + .sort((a,b) => a._seenOnScreen - b._seenOnScreen ) + .filter((figure) => !figure._ready) + .pop(); + if (figure) { + figure.ready(); + requestAnimationFrame(Figure.runReadyQueue); + } + + } + + constructor() { + super(); + // debugger + this._ready = false; + this._onscreen = false; + this._offscreen = true; + } + + connectedCallback() { + this.loadsWhileScrolling = this.hasAttribute('loadsWhileScrolling'); + Figure.marginObserver.observe(this); + Figure.directObserver.observe(this); + } + + disconnectedCallback() { + Figure.marginObserver.unobserve(this); + Figure.directObserver.unobserve(this); + } + + // We use two separate observers: + // One with an extra 1000px margin to warn if the viewpoint gets close, + // And one for the actual on/off screen events + + static get marginObserver() { + if (!Figure._marginObserver) { + // if (!('IntersectionObserver' in window)) { + // throw new Error('no interscetionobbserver!'); + // } + const viewportHeight = window.innerHeight; + const margin = Math.floor(2 * viewportHeight); + const options = {rootMargin: margin + 'px 0px ' + margin + 'px 0px', threshold: 0.01}; + const callback = Figure.didObserveMarginIntersection; + const observer = new IntersectionObserver(callback, options); + Figure._marginObserver = observer; + } + return Figure._marginObserver; + } + + static didObserveMarginIntersection(entries) { + for (const entry of entries) { + const figure = entry.target; + if (entry.isIntersecting && !figure._ready) { + Figure.addToReadyQueue(figure); + } + } + } + + static get directObserver() { + if (!Figure._directObserver) { + Figure._directObserver = new IntersectionObserver( + Figure.didObserveDirectIntersection, { + rootMargin: '0px', threshold: [0, 1.0], + } + ); + } + return Figure._directObserver; + } + + static didObserveDirectIntersection(entries) { + for (const entry of entries) { + const figure = entry.target; + if (entry.isIntersecting) { + figure._seenOnScreen = new Date(); + // if (!figure._ready) { figure.ready(); } + if (figure._offscreen) { figure.onscreen(); } + } else { + if (figure._onscreen) { figure.offscreen(); } + } + } + } + + // Notify listeners that registered late, too: + + addEventListener(eventName, callback) { + super.addEventListener(eventName, callback); + // if we had already dispatched something while presumingly no one was listening, we do so again + // debugger + if (eventName === 'ready') { + if (Figure.readyQueue.indexOf(this) !== -1) { + this._ready = false; + Figure.runReadyQueue(); + } + } + if (eventName === 'onscreen') { + this.onscreen(); + } + } + + // Custom Events + + ready() { + // debugger + this._ready = true; + Figure.marginObserver.unobserve(this); + const event = new CustomEvent('ready'); + this.dispatchEvent(event); + } + + onscreen() { + this._onscreen = true; + this._offscreen = false; + const event = new CustomEvent('onscreen'); + this.dispatchEvent(event); + } + + offscreen() { + this._onscreen = false; + this._offscreen = true; + const event = new CustomEvent('offscreen'); + this.dispatchEvent(event); + } + + } + + if (typeof window !== 'undefined') { + + Figure.isScrolling = false; + let timeout; + const resetTimer = () => { + Figure.isScrolling = true; + clearTimeout(timeout); + timeout = setTimeout(() => { + Figure.isScrolling = false; + Figure.runReadyQueue(); + }, 500); + }; + window.addEventListener('scroll', resetTimer, true); + + } + + // Copyright 2018 The Distill Template Authors + + // This overlay is not secure. + // It is only meant as a social deterrent. + + const productionHostname = 'distill.pub'; + const T$9 = Template('d-interstitial', ` + + +
        +
        +

        This article is in review.

        +

        Do not share this URL or the contents of this article. Thank you!

        + +

        Enter the password we shared with you as part of the review process to view the article.

        +
        +
        +`); + + class Interstitial extends T$9(HTMLElement) { + + connectedCallback() { + if (this.shouldRemoveSelf()) { + this.parentElement.removeChild(this); + } else { + const passwordInput = this.root.querySelector('#interstitial-password-input'); + passwordInput.oninput = (event) => this.passwordChanged(event); + } + } + + passwordChanged(event) { + const entered = event.target.value; + if (entered === this.password) { + console.log('Correct password entered.'); + this.parentElement.removeChild(this); + if (typeof(Storage) !== 'undefined') { + console.log('Saved that correct password was entered.'); + localStorage.setItem(this.localStorageIdentifier(), 'true'); + } + } + } + + shouldRemoveSelf() { + // should never be visible in production + if (window && window.location.hostname === productionHostname) { + console.warn('Interstitial found on production, hiding it.'); + return true + } + // should only have to enter password once + if (typeof(Storage) !== 'undefined') { + if (localStorage.getItem(this.localStorageIdentifier()) === 'true') { + console.log('Loaded that correct password was entered before; skipping interstitial.'); + return true; + } + } + // otherwise, leave visible + return false; + } + + localStorageIdentifier() { + const prefix = 'distill-drafts'; + const suffix = 'interstitial-password-correct'; + return prefix + (window ? window.location.pathname : '-') + suffix + } + + } + + function ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + } + + function bisector(compare) { + if (compare.length === 1) compare = ascendingComparator(compare); + return { + left: function(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) < 0) lo = mid + 1; + else hi = mid; + } + return lo; + }, + right: function(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) > 0) hi = mid; + else lo = mid + 1; + } + return lo; + } + }; + } + + function ascendingComparator(f) { + return function(d, x) { + return ascending(f(d), x); + }; + } + + var ascendingBisect = bisector(ascending); + var bisectRight = ascendingBisect.right; + + function range(start, stop, step) { + start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; + + var i = -1, + n = Math.max(0, Math.ceil((stop - start) / step)) | 0, + range = new Array(n); + + while (++i < n) { + range[i] = start + i * step; + } + + return range; + } + + var e10 = Math.sqrt(50), + e5 = Math.sqrt(10), + e2 = Math.sqrt(2); + + function ticks(start, stop, count) { + var reverse, + i = -1, + n, + ticks, + step; + + stop = +stop, start = +start, count = +count; + if (start === stop && count > 0) return [start]; + if (reverse = stop < start) n = start, start = stop, stop = n; + if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; + + if (step > 0) { + start = Math.ceil(start / step); + stop = Math.floor(stop / step); + ticks = new Array(n = Math.ceil(stop - start + 1)); + while (++i < n) ticks[i] = (start + i) * step; + } else { + start = Math.floor(start * step); + stop = Math.ceil(stop * step); + ticks = new Array(n = Math.ceil(start - stop + 1)); + while (++i < n) ticks[i] = (start - i) / step; + } + + if (reverse) ticks.reverse(); + + return ticks; + } + + function tickIncrement(start, stop, count) { + var step = (stop - start) / Math.max(0, count), + power = Math.floor(Math.log(step) / Math.LN10), + error = step / Math.pow(10, power); + return power >= 0 + ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) + : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); + } + + function tickStep(start, stop, count) { + var step0 = Math.abs(stop - start) / Math.max(0, count), + step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), + error = step0 / step1; + if (error >= e10) step1 *= 10; + else if (error >= e5) step1 *= 5; + else if (error >= e2) step1 *= 2; + return stop < start ? -step1 : step1; + } + + function initRange(domain, range) { + switch (arguments.length) { + case 0: break; + case 1: this.range(domain); break; + default: this.range(range).domain(domain); break; + } + return this; + } + + function define(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; + } + + function extend(parent, definition) { + var prototype = Object.create(parent.prototype); + for (var key in definition) prototype[key] = definition[key]; + return prototype; + } + + function Color() {} + + var darker = 0.7; + var brighter = 1 / darker; + + var reI = "\\s*([+-]?\\d+)\\s*", + reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", + reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", + reHex = /^#([0-9a-f]{3,8})$/, + reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), + reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), + reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), + reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), + reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), + reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); + + var named = { + aliceblue: 0xf0f8ff, + antiquewhite: 0xfaebd7, + aqua: 0x00ffff, + aquamarine: 0x7fffd4, + azure: 0xf0ffff, + beige: 0xf5f5dc, + bisque: 0xffe4c4, + black: 0x000000, + blanchedalmond: 0xffebcd, + blue: 0x0000ff, + blueviolet: 0x8a2be2, + brown: 0xa52a2a, + burlywood: 0xdeb887, + cadetblue: 0x5f9ea0, + chartreuse: 0x7fff00, + chocolate: 0xd2691e, + coral: 0xff7f50, + cornflowerblue: 0x6495ed, + cornsilk: 0xfff8dc, + crimson: 0xdc143c, + cyan: 0x00ffff, + darkblue: 0x00008b, + darkcyan: 0x008b8b, + darkgoldenrod: 0xb8860b, + darkgray: 0xa9a9a9, + darkgreen: 0x006400, + darkgrey: 0xa9a9a9, + darkkhaki: 0xbdb76b, + darkmagenta: 0x8b008b, + darkolivegreen: 0x556b2f, + darkorange: 0xff8c00, + darkorchid: 0x9932cc, + darkred: 0x8b0000, + darksalmon: 0xe9967a, + darkseagreen: 0x8fbc8f, + darkslateblue: 0x483d8b, + darkslategray: 0x2f4f4f, + darkslategrey: 0x2f4f4f, + darkturquoise: 0x00ced1, + darkviolet: 0x9400d3, + deeppink: 0xff1493, + deepskyblue: 0x00bfff, + dimgray: 0x696969, + dimgrey: 0x696969, + dodgerblue: 0x1e90ff, + firebrick: 0xb22222, + floralwhite: 0xfffaf0, + forestgreen: 0x228b22, + fuchsia: 0xff00ff, + gainsboro: 0xdcdcdc, + ghostwhite: 0xf8f8ff, + gold: 0xffd700, + goldenrod: 0xdaa520, + gray: 0x808080, + green: 0x008000, + greenyellow: 0xadff2f, + grey: 0x808080, + honeydew: 0xf0fff0, + hotpink: 0xff69b4, + indianred: 0xcd5c5c, + indigo: 0x4b0082, + ivory: 0xfffff0, + khaki: 0xf0e68c, + lavender: 0xe6e6fa, + lavenderblush: 0xfff0f5, + lawngreen: 0x7cfc00, + lemonchiffon: 0xfffacd, + lightblue: 0xadd8e6, + lightcoral: 0xf08080, + lightcyan: 0xe0ffff, + lightgoldenrodyellow: 0xfafad2, + lightgray: 0xd3d3d3, + lightgreen: 0x90ee90, + lightgrey: 0xd3d3d3, + lightpink: 0xffb6c1, + lightsalmon: 0xffa07a, + lightseagreen: 0x20b2aa, + lightskyblue: 0x87cefa, + lightslategray: 0x778899, + lightslategrey: 0x778899, + lightsteelblue: 0xb0c4de, + lightyellow: 0xffffe0, + lime: 0x00ff00, + limegreen: 0x32cd32, + linen: 0xfaf0e6, + magenta: 0xff00ff, + maroon: 0x800000, + mediumaquamarine: 0x66cdaa, + mediumblue: 0x0000cd, + mediumorchid: 0xba55d3, + mediumpurple: 0x9370db, + mediumseagreen: 0x3cb371, + mediumslateblue: 0x7b68ee, + mediumspringgreen: 0x00fa9a, + mediumturquoise: 0x48d1cc, + mediumvioletred: 0xc71585, + midnightblue: 0x191970, + mintcream: 0xf5fffa, + mistyrose: 0xffe4e1, + moccasin: 0xffe4b5, + navajowhite: 0xffdead, + navy: 0x000080, + oldlace: 0xfdf5e6, + olive: 0x808000, + olivedrab: 0x6b8e23, + orange: 0xffa500, + orangered: 0xff4500, + orchid: 0xda70d6, + palegoldenrod: 0xeee8aa, + palegreen: 0x98fb98, + paleturquoise: 0xafeeee, + palevioletred: 0xdb7093, + papayawhip: 0xffefd5, + peachpuff: 0xffdab9, + peru: 0xcd853f, + pink: 0xffc0cb, + plum: 0xdda0dd, + powderblue: 0xb0e0e6, + purple: 0x800080, + rebeccapurple: 0x663399, + red: 0xff0000, + rosybrown: 0xbc8f8f, + royalblue: 0x4169e1, + saddlebrown: 0x8b4513, + salmon: 0xfa8072, + sandybrown: 0xf4a460, + seagreen: 0x2e8b57, + seashell: 0xfff5ee, + sienna: 0xa0522d, + silver: 0xc0c0c0, + skyblue: 0x87ceeb, + slateblue: 0x6a5acd, + slategray: 0x708090, + slategrey: 0x708090, + snow: 0xfffafa, + springgreen: 0x00ff7f, + steelblue: 0x4682b4, + tan: 0xd2b48c, + teal: 0x008080, + thistle: 0xd8bfd8, + tomato: 0xff6347, + turquoise: 0x40e0d0, + violet: 0xee82ee, + wheat: 0xf5deb3, + white: 0xffffff, + whitesmoke: 0xf5f5f5, + yellow: 0xffff00, + yellowgreen: 0x9acd32 + }; + + define(Color, color, { + copy: function(channels) { + return Object.assign(new this.constructor, this, channels); + }, + displayable: function() { + return this.rgb().displayable(); + }, + hex: color_formatHex, // Deprecated! Use color.formatHex. + formatHex: color_formatHex, + formatHsl: color_formatHsl, + formatRgb: color_formatRgb, + toString: color_formatRgb + }); + + function color_formatHex() { + return this.rgb().formatHex(); + } + + function color_formatHsl() { + return hslConvert(this).formatHsl(); + } + + function color_formatRgb() { + return this.rgb().formatRgb(); + } + + function color(format) { + var m, l; + format = (format + "").trim().toLowerCase(); + return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 + : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 + : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 + : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 + : null) // invalid hex + : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) + : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) + : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) + : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) + : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) + : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) + : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins + : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) + : null; + } + + function rgbn(n) { + return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); + } + + function rgba(r, g, b, a) { + if (a <= 0) r = g = b = NaN; + return new Rgb(r, g, b, a); + } + + function rgbConvert(o) { + if (!(o instanceof Color)) o = color(o); + if (!o) return new Rgb; + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); + } + + function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); + } + + function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; + } + + define(Rgb, rgb, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb: function() { + return this; + }, + displayable: function() { + return (-0.5 <= this.r && this.r < 255.5) + && (-0.5 <= this.g && this.g < 255.5) + && (-0.5 <= this.b && this.b < 255.5) + && (0 <= this.opacity && this.opacity <= 1); + }, + hex: rgb_formatHex, // Deprecated! Use color.formatHex. + formatHex: rgb_formatHex, + formatRgb: rgb_formatRgb, + toString: rgb_formatRgb + })); + + function rgb_formatHex() { + return "#" + hex(this.r) + hex(this.g) + hex(this.b); + } + + function rgb_formatRgb() { + var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "rgb(" : "rgba(") + + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + + (a === 1 ? ")" : ", " + a + ")"); + } + + function hex(value) { + value = Math.max(0, Math.min(255, Math.round(value) || 0)); + return (value < 16 ? "0" : "") + value.toString(16); + } + + function hsla(h, s, l, a) { + if (a <= 0) h = s = l = NaN; + else if (l <= 0 || l >= 1) h = s = NaN; + else if (s <= 0) h = NaN; + return new Hsl(h, s, l, a); + } + + function hslConvert(o) { + if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color)) o = color(o); + if (!o) return new Hsl; + if (o instanceof Hsl) return o; + o = o.rgb(); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + h = NaN, + s = max - min, + l = (max + min) / 2; + if (s) { + if (r === max) h = (g - b) / s + (g < b) * 6; + else if (g === max) h = (b - r) / s + 2; + else h = (r - g) / s + 4; + s /= l < 0.5 ? max + min : 2 - max - min; + h *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h; + } + return new Hsl(h, s, l, o.opacity); + } + + function hsl(h, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); + } + + function Hsl(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; + } + + define(Hsl, hsl, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = this.h % 360 + (this.h < 0) * 360, + s = isNaN(h) || isNaN(this.s) ? 0 : this.s, + l = this.l, + m2 = l + (l < 0.5 ? l : 1 - l) * s, + m1 = 2 * l - m2; + return new Rgb( + hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), + hsl2rgb(h, m1, m2), + hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), + this.opacity + ); + }, + displayable: function() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) + && (0 <= this.l && this.l <= 1) + && (0 <= this.opacity && this.opacity <= 1); + }, + formatHsl: function() { + var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "hsl(" : "hsla(") + + (this.h || 0) + ", " + + (this.s || 0) * 100 + "%, " + + (this.l || 0) * 100 + "%" + + (a === 1 ? ")" : ", " + a + ")"); + } + })); + + /* From FvD 13.37, CSS Color Module Level 3 */ + function hsl2rgb(h, m1, m2) { + return (h < 60 ? m1 + (m2 - m1) * h / 60 + : h < 180 ? m2 + : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 + : m1) * 255; + } + + var deg2rad = Math.PI / 180; + var rad2deg = 180 / Math.PI; + + // https://observablehq.com/@mbostock/lab-and-rgb + var K = 18, + Xn = 0.96422, + Yn = 1, + Zn = 0.82521, + t0 = 4 / 29, + t1 = 6 / 29, + t2 = 3 * t1 * t1, + t3 = t1 * t1 * t1; + + function labConvert(o) { + if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) return hcl2lab(o); + if (!(o instanceof Rgb)) o = rgbConvert(o); + var r = rgb2lrgb(o.r), + g = rgb2lrgb(o.g), + b = rgb2lrgb(o.b), + y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; + if (r === g && g === b) x = z = y; else { + x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); + z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); + } + return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); + } + + function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); + } + + function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; + } + + define(Lab, lab, extend(Color, { + brighter: function(k) { + return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker: function(k) { + return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb: function() { + var y = (this.l + 16) / 116, + x = isNaN(this.a) ? y : y + this.a / 500, + z = isNaN(this.b) ? y : y - this.b / 200; + x = Xn * lab2xyz(x); + y = Yn * lab2xyz(y); + z = Zn * lab2xyz(z); + return new Rgb( + lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), + lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), + lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), + this.opacity + ); + } + })); + + function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; + } + + function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); + } + + function lrgb2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); + } + + function rgb2lrgb(x) { + return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); + } + + function hclConvert(o) { + if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) o = labConvert(o); + if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); + var h = Math.atan2(o.b, o.a) * rad2deg; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); + } + + function hcl(h, c, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); + } + + function Hcl(h, c, l, opacity) { + this.h = +h; + this.c = +c; + this.l = +l; + this.opacity = +opacity; + } + + function hcl2lab(o) { + if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); + var h = o.h * deg2rad; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); + } + + define(Hcl, hcl, extend(Color, { + brighter: function(k) { + return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); + }, + darker: function(k) { + return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); + }, + rgb: function() { + return hcl2lab(this).rgb(); + } + })); + + var A = -0.14861, + B = +1.78277, + C = -0.29227, + D = -0.90649, + E = +1.97294, + ED = E * D, + EB = E * B, + BC_DA = B * C - D * A; + + function cubehelixConvert(o) { + if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Rgb)) o = rgbConvert(o); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), + bl = b - l, + k = (E * (g - l) - C * bl) / D, + s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 + h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN; + return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); + } + + function cubehelix(h, s, l, opacity) { + return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); + } + + function Cubehelix(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; + } + + define(Cubehelix, cubehelix, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad, + l = +this.l, + a = isNaN(this.s) ? 0 : this.s * l * (1 - l), + cosh = Math.cos(h), + sinh = Math.sin(h); + return new Rgb( + 255 * (l + a * (A * cosh + B * sinh)), + 255 * (l + a * (C * cosh + D * sinh)), + 255 * (l + a * (E * cosh)), + this.opacity + ); + } + })); + + function constant(x) { + return function() { + return x; + }; + } + + function linear(a, d) { + return function(t) { + return a + t * d; + }; + } + + function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { + return Math.pow(a + t * b, y); + }; + } + + function gamma(y) { + return (y = +y) === 1 ? nogamma : function(a, b) { + return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); + }; + } + + function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : constant(isNaN(a) ? b : a); + } + + var rgb$1 = (function rgbGamma(y) { + var color = gamma(y); + + function rgb$1(start, end) { + var r = color((start = rgb(start)).r, (end = rgb(end)).r), + g = color(start.g, end.g), + b = color(start.b, end.b), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.r = r(t); + start.g = g(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; + } + + rgb$1.gamma = rgbGamma; + + return rgb$1; + })(1); + + function numberArray(a, b) { + if (!b) b = []; + var n = a ? Math.min(b.length, a.length) : 0, + c = b.slice(), + i; + return function(t) { + for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; + return c; + }; + } + + function isNumberArray(x) { + return ArrayBuffer.isView(x) && !(x instanceof DataView); + } + + function genericArray(a, b) { + var nb = b ? b.length : 0, + na = a ? Math.min(nb, a.length) : 0, + x = new Array(na), + c = new Array(nb), + i; + + for (i = 0; i < na; ++i) x[i] = interpolate(a[i], b[i]); + for (; i < nb; ++i) c[i] = b[i]; + + return function(t) { + for (i = 0; i < na; ++i) c[i] = x[i](t); + return c; + }; + } + + function date(a, b) { + var d = new Date; + return a = +a, b = +b, function(t) { + return d.setTime(a * (1 - t) + b * t), d; + }; + } + + function interpolateNumber(a, b) { + return a = +a, b = +b, function(t) { + return a * (1 - t) + b * t; + }; + } + + function object(a, b) { + var i = {}, + c = {}, + k; + + if (a === null || typeof a !== "object") a = {}; + if (b === null || typeof b !== "object") b = {}; + + for (k in b) { + if (k in a) { + i[k] = interpolate(a[k], b[k]); + } else { + c[k] = b[k]; + } + } + + return function(t) { + for (k in i) c[k] = i[k](t); + return c; + }; + } + + var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, + reB = new RegExp(reA.source, "g"); + + function zero(b) { + return function() { + return b; + }; + } + + function one(b) { + return function(t) { + return b(t) + ""; + }; + } + + function string(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b + am, // current match in a + bm, // current match in b + bs, // string preceding current number in b, if any + i = -1, // index in s + s = [], // string constants and placeholders + q = []; // number interpolators + + // Coerce inputs to strings. + a = a + "", b = b + ""; + + // Interpolate pairs of numbers in a & b. + while ((am = reA.exec(a)) + && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { // a string precedes the next number in b + bs = b.slice(bi, bs); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match + if (s[i]) s[i] += bm; // coalesce with previous string + else s[++i] = bm; + } else { // interpolate non-matching numbers + s[++i] = null; + q.push({i: i, x: interpolateNumber(am, bm)}); + } + bi = reB.lastIndex; + } + + // Add remains of b. + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + + // Special optimization for only a single match. + // Otherwise, interpolate each of the numbers and rejoin the string. + return s.length < 2 ? (q[0] + ? one(q[0].x) + : zero(b)) + : (b = q.length, function(t) { + for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }); + } + + function interpolate(a, b) { + var t = typeof b, c; + return b == null || t === "boolean" ? constant(b) + : (t === "number" ? interpolateNumber + : t === "string" ? ((c = color(b)) ? (b = c, rgb$1) : string) + : b instanceof color ? rgb$1 + : b instanceof Date ? date + : isNumberArray(b) ? numberArray + : Array.isArray(b) ? genericArray + : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object + : interpolateNumber)(a, b); + } + + function interpolateRound(a, b) { + return a = +a, b = +b, function(t) { + return Math.round(a * (1 - t) + b * t); + }; + } + + function constant$1(x) { + return function() { + return x; + }; + } + + function number(x) { + return +x; + } + + var unit = [0, 1]; + + function identity(x) { + return x; + } + + function normalize(a, b) { + return (b -= (a = +a)) + ? function(x) { return (x - a) / b; } + : constant$1(isNaN(b) ? NaN : 0.5); + } + + function clamper(a, b) { + var t; + if (a > b) t = a, a = b, b = t; + return function(x) { return Math.max(a, Math.min(b, x)); }; + } + + // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. + // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. + function bimap(domain, range, interpolate) { + var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; + if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0); + else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); + return function(x) { return r0(d0(x)); }; + } + + function polymap(domain, range, interpolate) { + var j = Math.min(domain.length, range.length) - 1, + d = new Array(j), + r = new Array(j), + i = -1; + + // Reverse descending domains. + if (domain[j] < domain[0]) { + domain = domain.slice().reverse(); + range = range.slice().reverse(); + } + + while (++i < j) { + d[i] = normalize(domain[i], domain[i + 1]); + r[i] = interpolate(range[i], range[i + 1]); + } + + return function(x) { + var i = bisectRight(domain, x, 1, j) - 1; + return r[i](d[i](x)); + }; + } + + function copy(source, target) { + return target + .domain(source.domain()) + .range(source.range()) + .interpolate(source.interpolate()) + .clamp(source.clamp()) + .unknown(source.unknown()); + } + + function transformer() { + var domain = unit, + range = unit, + interpolate$1 = interpolate, + transform, + untransform, + unknown, + clamp = identity, + piecewise, + output, + input; + + function rescale() { + var n = Math.min(domain.length, range.length); + if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]); + piecewise = n > 2 ? polymap : bimap; + output = input = null; + return scale; + } + + function scale(x) { + return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x))); + } + + scale.invert = function(y) { + return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y))); + }; + + scale.domain = function(_) { + return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice(); + }; + + scale.range = function(_) { + return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); + }; + + scale.rangeRound = function(_) { + return range = Array.from(_), interpolate$1 = interpolateRound, rescale(); + }; + + scale.clamp = function(_) { + return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity; + }; + + scale.interpolate = function(_) { + return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1; + }; + + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + + return function(t, u) { + transform = t, untransform = u; + return rescale(); + }; + } + + function continuous() { + return transformer()(identity, identity); + } + + // Computes the decimal coefficient and exponent of the specified number x with + // significant digits p, where x is positive and p is in [1, 21] or undefined. + // For example, formatDecimal(1.23) returns ["123", 0]. + function formatDecimal(x, p) { + if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity + var i, coefficient = x.slice(0, i); + + // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ + // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). + return [ + coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, + +x.slice(i + 1) + ]; + } + + function exponent(x) { + return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN; + } + + function formatGroup(grouping, thousands) { + return function(value, width) { + var i = value.length, + t = [], + j = 0, + g = grouping[0], + length = 0; + + while (i > 0 && g > 0) { + if (length + g + 1 > width) g = Math.max(1, width - length); + t.push(value.substring(i -= g, i + g)); + if ((length += g + 1) > width) break; + g = grouping[j = (j + 1) % grouping.length]; + } + + return t.reverse().join(thousands); + }; + } + + function formatNumerals(numerals) { + return function(value) { + return value.replace(/[0-9]/g, function(i) { + return numerals[+i]; + }); + }; + } + + // [[fill]align][sign][symbol][0][width][,][.precision][~][type] + var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; + + function formatSpecifier(specifier) { + if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); + var match; + return new FormatSpecifier({ + fill: match[1], + align: match[2], + sign: match[3], + symbol: match[4], + zero: match[5], + width: match[6], + comma: match[7], + precision: match[8] && match[8].slice(1), + trim: match[9], + type: match[10] + }); + } + + formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof + + function FormatSpecifier(specifier) { + this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; + this.align = specifier.align === undefined ? ">" : specifier.align + ""; + this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; + this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; + this.zero = !!specifier.zero; + this.width = specifier.width === undefined ? undefined : +specifier.width; + this.comma = !!specifier.comma; + this.precision = specifier.precision === undefined ? undefined : +specifier.precision; + this.trim = !!specifier.trim; + this.type = specifier.type === undefined ? "" : specifier.type + ""; + } + + FormatSpecifier.prototype.toString = function() { + return this.fill + + this.align + + this.sign + + this.symbol + + (this.zero ? "0" : "") + + (this.width === undefined ? "" : Math.max(1, this.width | 0)) + + (this.comma ? "," : "") + + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) + + (this.trim ? "~" : "") + + this.type; + }; + + // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. + function formatTrim(s) { + out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { + switch (s[i]) { + case ".": i0 = i1 = i; break; + case "0": if (i0 === 0) i0 = i; i1 = i; break; + default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break; + } + } + return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; + } + + var prefixExponent; + + function formatPrefixAuto(x, p) { + var d = formatDecimal(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1], + i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, + n = coefficient.length; + return i === n ? coefficient + : i > n ? coefficient + new Array(i - n + 1).join("0") + : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) + : "0." + new Array(1 - i).join("0") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y! + } + + function formatRounded(x, p) { + var d = formatDecimal(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1]; + return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient + : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) + : coefficient + new Array(exponent - coefficient.length + 2).join("0"); + } + + var formatTypes = { + "%": function(x, p) { return (x * 100).toFixed(p); }, + "b": function(x) { return Math.round(x).toString(2); }, + "c": function(x) { return x + ""; }, + "d": function(x) { return Math.round(x).toString(10); }, + "e": function(x, p) { return x.toExponential(p); }, + "f": function(x, p) { return x.toFixed(p); }, + "g": function(x, p) { return x.toPrecision(p); }, + "o": function(x) { return Math.round(x).toString(8); }, + "p": function(x, p) { return formatRounded(x * 100, p); }, + "r": formatRounded, + "s": formatPrefixAuto, + "X": function(x) { return Math.round(x).toString(16).toUpperCase(); }, + "x": function(x) { return Math.round(x).toString(16); } + }; + + function identity$1(x) { + return x; + } + + var map = Array.prototype.map, + prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]; + + function formatLocale(locale) { + var group = locale.grouping === undefined || locale.thousands === undefined ? identity$1 : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""), + currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", + currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", + decimal = locale.decimal === undefined ? "." : locale.decimal + "", + numerals = locale.numerals === undefined ? identity$1 : formatNumerals(map.call(locale.numerals, String)), + percent = locale.percent === undefined ? "%" : locale.percent + "", + minus = locale.minus === undefined ? "-" : locale.minus + "", + nan = locale.nan === undefined ? "NaN" : locale.nan + ""; + + function newFormat(specifier) { + specifier = formatSpecifier(specifier); + + var fill = specifier.fill, + align = specifier.align, + sign = specifier.sign, + symbol = specifier.symbol, + zero = specifier.zero, + width = specifier.width, + comma = specifier.comma, + precision = specifier.precision, + trim = specifier.trim, + type = specifier.type; + + // The "n" type is an alias for ",g". + if (type === "n") comma = true, type = "g"; + + // The "" type, and any invalid type, is an alias for ".12~g". + else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g"; + + // If zero fill is specified, padding goes after sign and before digits. + if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "="; + + // Compute the prefix and suffix. + // For SI-prefix, the suffix is lazily computed. + var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", + suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; + + // What format function should we use? + // Is this an integer type? + // Can this type generate exponential notation? + var formatType = formatTypes[type], + maybeSuffix = /[defgprs%]/.test(type); + + // Set the default precision if not specified, + // or clamp the specified precision to the supported range. + // For significant precision, it must be in [1, 21]. + // For fixed precision, it must be in [0, 20]. + precision = precision === undefined ? 6 + : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) + : Math.max(0, Math.min(20, precision)); + + function format(value) { + var valuePrefix = prefix, + valueSuffix = suffix, + i, n, c; + + if (type === "c") { + valueSuffix = formatType(value) + valueSuffix; + value = ""; + } else { + value = +value; + + // Determine the sign. -0 is not less than 0, but 1 / -0 is! + var valueNegative = value < 0 || 1 / value < 0; + + // Perform the initial formatting. + value = isNaN(value) ? nan : formatType(Math.abs(value), precision); + + // Trim insignificant zeros. + if (trim) value = formatTrim(value); + + // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign. + if (valueNegative && +value === 0 && sign !== "+") valueNegative = false; + + // Compute the prefix and suffix. + valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; + valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); + + // Break the formatted value into the integer “value” part that can be + // grouped, and fractional or exponential “suffix” part that is not. + if (maybeSuffix) { + i = -1, n = value.length; + while (++i < n) { + if (c = value.charCodeAt(i), 48 > c || c > 57) { + valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; + value = value.slice(0, i); + break; + } + } + } + } + + // If the fill character is not "0", grouping is applied before padding. + if (comma && !zero) value = group(value, Infinity); + + // Compute the padding. + var length = valuePrefix.length + value.length + valueSuffix.length, + padding = length < width ? new Array(width - length + 1).join(fill) : ""; + + // If the fill character is "0", grouping is applied after padding. + if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; + + // Reconstruct the final output based on the desired alignment. + switch (align) { + case "<": value = valuePrefix + value + valueSuffix + padding; break; + case "=": value = valuePrefix + padding + value + valueSuffix; break; + case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break; + default: value = padding + valuePrefix + value + valueSuffix; break; + } + + return numerals(value); + } + + format.toString = function() { + return specifier + ""; + }; + + return format; + } + + function formatPrefix(specifier, value) { + var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), + e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3, + k = Math.pow(10, -e), + prefix = prefixes[8 + e / 3]; + return function(value) { + return f(k * value) + prefix; + }; + } + + return { + format: newFormat, + formatPrefix: formatPrefix + }; + } + + var locale; + var format; + var formatPrefix; + + defaultLocale({ + decimal: ".", + thousands: ",", + grouping: [3], + currency: ["$", ""], + minus: "-" + }); + + function defaultLocale(definition) { + locale = formatLocale(definition); + format = locale.format; + formatPrefix = locale.formatPrefix; + return locale; + } + + function precisionFixed(step) { + return Math.max(0, -exponent(Math.abs(step))); + } + + function precisionPrefix(step, value) { + return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step))); + } + + function precisionRound(step, max) { + step = Math.abs(step), max = Math.abs(max) - step; + return Math.max(0, exponent(max) - exponent(step)) + 1; + } + + function tickFormat(start, stop, count, specifier) { + var step = tickStep(start, stop, count), + precision; + specifier = formatSpecifier(specifier == null ? ",f" : specifier); + switch (specifier.type) { + case "s": { + var value = Math.max(Math.abs(start), Math.abs(stop)); + if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision; + return formatPrefix(specifier, value); + } + case "": + case "e": + case "g": + case "p": + case "r": { + if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); + break; + } + case "f": + case "%": { + if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2; + break; + } + } + return format(specifier); + } + + function linearish(scale) { + var domain = scale.domain; + + scale.ticks = function(count) { + var d = domain(); + return ticks(d[0], d[d.length - 1], count == null ? 10 : count); + }; + + scale.tickFormat = function(count, specifier) { + var d = domain(); + return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier); + }; + + scale.nice = function(count) { + if (count == null) count = 10; + + var d = domain(), + i0 = 0, + i1 = d.length - 1, + start = d[i0], + stop = d[i1], + step; + + if (stop < start) { + step = start, start = stop, stop = step; + step = i0, i0 = i1, i1 = step; + } + + step = tickIncrement(start, stop, count); + + if (step > 0) { + start = Math.floor(start / step) * step; + stop = Math.ceil(stop / step) * step; + step = tickIncrement(start, stop, count); + } else if (step < 0) { + start = Math.ceil(start * step) / step; + stop = Math.floor(stop * step) / step; + step = tickIncrement(start, stop, count); + } + + if (step > 0) { + d[i0] = Math.floor(start / step) * step; + d[i1] = Math.ceil(stop / step) * step; + domain(d); + } else if (step < 0) { + d[i0] = Math.ceil(start * step) / step; + d[i1] = Math.floor(stop * step) / step; + domain(d); + } + + return scale; + }; + + return scale; + } + + function linear$1() { + var scale = continuous(); + + scale.copy = function() { + return copy(scale, linear$1()); + }; + + initRange.apply(scale, arguments); + + return linearish(scale); + } + + var t0$1 = new Date, + t1$1 = new Date; + + function newInterval(floori, offseti, count, field) { + + function interval(date) { + return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date; + } + + interval.floor = function(date) { + return floori(date = new Date(+date)), date; + }; + + interval.ceil = function(date) { + return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; + }; + + interval.round = function(date) { + var d0 = interval(date), + d1 = interval.ceil(date); + return date - d0 < d1 - date ? d0 : d1; + }; + + interval.offset = function(date, step) { + return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; + }; + + interval.range = function(start, stop, step) { + var range = [], previous; + start = interval.ceil(start); + step = step == null ? 1 : Math.floor(step); + if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date + do range.push(previous = new Date(+start)), offseti(start, step), floori(start); + while (previous < start && start < stop); + return range; + }; + + interval.filter = function(test) { + return newInterval(function(date) { + if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); + }, function(date, step) { + if (date >= date) { + if (step < 0) while (++step <= 0) { + while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty + } else while (--step >= 0) { + while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty + } + } + }); + }; + + if (count) { + interval.count = function(start, end) { + t0$1.setTime(+start), t1$1.setTime(+end); + floori(t0$1), floori(t1$1); + return Math.floor(count(t0$1, t1$1)); + }; + + interval.every = function(step) { + step = Math.floor(step); + return !isFinite(step) || !(step > 0) ? null + : !(step > 1) ? interval + : interval.filter(field + ? function(d) { return field(d) % step === 0; } + : function(d) { return interval.count(0, d) % step === 0; }); + }; + } + + return interval; + } + + var millisecond = newInterval(function() { + // noop + }, function(date, step) { + date.setTime(+date + step); + }, function(start, end) { + return end - start; + }); + + // An optimized implementation for this simple case. + millisecond.every = function(k) { + k = Math.floor(k); + if (!isFinite(k) || !(k > 0)) return null; + if (!(k > 1)) return millisecond; + return newInterval(function(date) { + date.setTime(Math.floor(date / k) * k); + }, function(date, step) { + date.setTime(+date + step * k); + }, function(start, end) { + return (end - start) / k; + }); + }; + + var durationSecond = 1e3; + var durationMinute = 6e4; + var durationHour = 36e5; + var durationDay = 864e5; + var durationWeek = 6048e5; + + var second = newInterval(function(date) { + date.setTime(date - date.getMilliseconds()); + }, function(date, step) { + date.setTime(+date + step * durationSecond); + }, function(start, end) { + return (end - start) / durationSecond; + }, function(date) { + return date.getUTCSeconds(); + }); + + var minute = newInterval(function(date) { + date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond); + }, function(date, step) { + date.setTime(+date + step * durationMinute); + }, function(start, end) { + return (end - start) / durationMinute; + }, function(date) { + return date.getMinutes(); + }); + + var hour = newInterval(function(date) { + date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute); + }, function(date, step) { + date.setTime(+date + step * durationHour); + }, function(start, end) { + return (end - start) / durationHour; + }, function(date) { + return date.getHours(); + }); + + var day = newInterval(function(date) { + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setDate(date.getDate() + step); + }, function(start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay; + }, function(date) { + return date.getDate() - 1; + }); + + function weekday(i) { + return newInterval(function(date) { + date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setDate(date.getDate() + step * 7); + }, function(start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek; + }); + } + + var sunday = weekday(0); + var monday = weekday(1); + var tuesday = weekday(2); + var wednesday = weekday(3); + var thursday = weekday(4); + var friday = weekday(5); + var saturday = weekday(6); + + var month = newInterval(function(date) { + date.setDate(1); + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setMonth(date.getMonth() + step); + }, function(start, end) { + return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; + }, function(date) { + return date.getMonth(); + }); + + var year = newInterval(function(date) { + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setFullYear(date.getFullYear() + step); + }, function(start, end) { + return end.getFullYear() - start.getFullYear(); + }, function(date) { + return date.getFullYear(); + }); + + // An optimized implementation for this simple case. + year.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) { + date.setFullYear(Math.floor(date.getFullYear() / k) * k); + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setFullYear(date.getFullYear() + step * k); + }); + }; + + var utcMinute = newInterval(function(date) { + date.setUTCSeconds(0, 0); + }, function(date, step) { + date.setTime(+date + step * durationMinute); + }, function(start, end) { + return (end - start) / durationMinute; + }, function(date) { + return date.getUTCMinutes(); + }); + + var utcHour = newInterval(function(date) { + date.setUTCMinutes(0, 0, 0); + }, function(date, step) { + date.setTime(+date + step * durationHour); + }, function(start, end) { + return (end - start) / durationHour; + }, function(date) { + return date.getUTCHours(); + }); + + var utcDay = newInterval(function(date) { + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCDate(date.getUTCDate() + step); + }, function(start, end) { + return (end - start) / durationDay; + }, function(date) { + return date.getUTCDate() - 1; + }); + + function utcWeekday(i) { + return newInterval(function(date) { + date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCDate(date.getUTCDate() + step * 7); + }, function(start, end) { + return (end - start) / durationWeek; + }); + } + + var utcSunday = utcWeekday(0); + var utcMonday = utcWeekday(1); + var utcTuesday = utcWeekday(2); + var utcWednesday = utcWeekday(3); + var utcThursday = utcWeekday(4); + var utcFriday = utcWeekday(5); + var utcSaturday = utcWeekday(6); + + var utcMonth = newInterval(function(date) { + date.setUTCDate(1); + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCMonth(date.getUTCMonth() + step); + }, function(start, end) { + return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; + }, function(date) { + return date.getUTCMonth(); + }); + + var utcYear = newInterval(function(date) { + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCFullYear(date.getUTCFullYear() + step); + }, function(start, end) { + return end.getUTCFullYear() - start.getUTCFullYear(); + }, function(date) { + return date.getUTCFullYear(); + }); + + // An optimized implementation for this simple case. + utcYear.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) { + date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCFullYear(date.getUTCFullYear() + step * k); + }); + }; + + function localDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); + date.setFullYear(d.y); + return date; + } + return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); + } + + function utcDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); + date.setUTCFullYear(d.y); + return date; + } + return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); + } + + function newDate(y, m, d) { + return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0}; + } + + function formatLocale$1(locale) { + var locale_dateTime = locale.dateTime, + locale_date = locale.date, + locale_time = locale.time, + locale_periods = locale.periods, + locale_weekdays = locale.days, + locale_shortWeekdays = locale.shortDays, + locale_months = locale.months, + locale_shortMonths = locale.shortMonths; + + var periodRe = formatRe(locale_periods), + periodLookup = formatLookup(locale_periods), + weekdayRe = formatRe(locale_weekdays), + weekdayLookup = formatLookup(locale_weekdays), + shortWeekdayRe = formatRe(locale_shortWeekdays), + shortWeekdayLookup = formatLookup(locale_shortWeekdays), + monthRe = formatRe(locale_months), + monthLookup = formatLookup(locale_months), + shortMonthRe = formatRe(locale_shortMonths), + shortMonthLookup = formatLookup(locale_shortMonths); + + var formats = { + "a": formatShortWeekday, + "A": formatWeekday, + "b": formatShortMonth, + "B": formatMonth, + "c": null, + "d": formatDayOfMonth, + "e": formatDayOfMonth, + "f": formatMicroseconds, + "H": formatHour24, + "I": formatHour12, + "j": formatDayOfYear, + "L": formatMilliseconds, + "m": formatMonthNumber, + "M": formatMinutes, + "p": formatPeriod, + "q": formatQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatSeconds, + "u": formatWeekdayNumberMonday, + "U": formatWeekNumberSunday, + "V": formatWeekNumberISO, + "w": formatWeekdayNumberSunday, + "W": formatWeekNumberMonday, + "x": null, + "X": null, + "y": formatYear, + "Y": formatFullYear, + "Z": formatZone, + "%": formatLiteralPercent + }; + + var utcFormats = { + "a": formatUTCShortWeekday, + "A": formatUTCWeekday, + "b": formatUTCShortMonth, + "B": formatUTCMonth, + "c": null, + "d": formatUTCDayOfMonth, + "e": formatUTCDayOfMonth, + "f": formatUTCMicroseconds, + "H": formatUTCHour24, + "I": formatUTCHour12, + "j": formatUTCDayOfYear, + "L": formatUTCMilliseconds, + "m": formatUTCMonthNumber, + "M": formatUTCMinutes, + "p": formatUTCPeriod, + "q": formatUTCQuarter, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatUTCSeconds, + "u": formatUTCWeekdayNumberMonday, + "U": formatUTCWeekNumberSunday, + "V": formatUTCWeekNumberISO, + "w": formatUTCWeekdayNumberSunday, + "W": formatUTCWeekNumberMonday, + "x": null, + "X": null, + "y": formatUTCYear, + "Y": formatUTCFullYear, + "Z": formatUTCZone, + "%": formatLiteralPercent + }; + + var parses = { + "a": parseShortWeekday, + "A": parseWeekday, + "b": parseShortMonth, + "B": parseMonth, + "c": parseLocaleDateTime, + "d": parseDayOfMonth, + "e": parseDayOfMonth, + "f": parseMicroseconds, + "H": parseHour24, + "I": parseHour24, + "j": parseDayOfYear, + "L": parseMilliseconds, + "m": parseMonthNumber, + "M": parseMinutes, + "p": parsePeriod, + "q": parseQuarter, + "Q": parseUnixTimestamp, + "s": parseUnixTimestampSeconds, + "S": parseSeconds, + "u": parseWeekdayNumberMonday, + "U": parseWeekNumberSunday, + "V": parseWeekNumberISO, + "w": parseWeekdayNumberSunday, + "W": parseWeekNumberMonday, + "x": parseLocaleDate, + "X": parseLocaleTime, + "y": parseYear, + "Y": parseFullYear, + "Z": parseZone, + "%": parseLiteralPercent + }; + + // These recursive directive definitions must be deferred. + formats.x = newFormat(locale_date, formats); + formats.X = newFormat(locale_time, formats); + formats.c = newFormat(locale_dateTime, formats); + utcFormats.x = newFormat(locale_date, utcFormats); + utcFormats.X = newFormat(locale_time, utcFormats); + utcFormats.c = newFormat(locale_dateTime, utcFormats); + + function newFormat(specifier, formats) { + return function(date) { + var string = [], + i = -1, + j = 0, + n = specifier.length, + c, + pad, + format; + + if (!(date instanceof Date)) date = new Date(+date); + + while (++i < n) { + if (specifier.charCodeAt(i) === 37) { + string.push(specifier.slice(j, i)); + if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i); + else pad = c === "e" ? " " : "0"; + if (format = formats[c]) c = format(date, pad); + string.push(c); + j = i + 1; + } + } + + string.push(specifier.slice(j, i)); + return string.join(""); + }; + } + + function newParse(specifier, Z) { + return function(string) { + var d = newDate(1900, undefined, 1), + i = parseSpecifier(d, specifier, string += "", 0), + week, day$1; + if (i != string.length) return null; + + // If a UNIX timestamp is specified, return it. + if ("Q" in d) return new Date(d.Q); + if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); + + // If this is utcParse, never use the local timezone. + if (Z && !("Z" in d)) d.Z = 0; + + // The am-pm flag is 0 for AM, and 1 for PM. + if ("p" in d) d.H = d.H % 12 + d.p * 12; + + // If the month was not specified, inherit from the quarter. + if (d.m === undefined) d.m = "q" in d ? d.q : 0; + + // Convert day-of-week and week-of-year to day-of-year. + if ("V" in d) { + if (d.V < 1 || d.V > 53) return null; + if (!("w" in d)) d.w = 1; + if ("Z" in d) { + week = utcDate(newDate(d.y, 0, 1)), day$1 = week.getUTCDay(); + week = day$1 > 4 || day$1 === 0 ? utcMonday.ceil(week) : utcMonday(week); + week = utcDay.offset(week, (d.V - 1) * 7); + d.y = week.getUTCFullYear(); + d.m = week.getUTCMonth(); + d.d = week.getUTCDate() + (d.w + 6) % 7; + } else { + week = localDate(newDate(d.y, 0, 1)), day$1 = week.getDay(); + week = day$1 > 4 || day$1 === 0 ? monday.ceil(week) : monday(week); + week = day.offset(week, (d.V - 1) * 7); + d.y = week.getFullYear(); + d.m = week.getMonth(); + d.d = week.getDate() + (d.w + 6) % 7; + } + } else if ("W" in d || "U" in d) { + if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; + day$1 = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); + d.m = 0; + d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day$1 + 5) % 7 : d.w + d.U * 7 - (day$1 + 6) % 7; + } + + // If a time zone is specified, all fields are interpreted as UTC and then + // offset according to the specified time zone. + if ("Z" in d) { + d.H += d.Z / 100 | 0; + d.M += d.Z % 100; + return utcDate(d); + } + + // Otherwise, all fields are in local time. + return localDate(d); + }; + } + + function parseSpecifier(d, specifier, string, j) { + var i = 0, + n = specifier.length, + m = string.length, + c, + parse; + + while (i < n) { + if (j >= m) return -1; + c = specifier.charCodeAt(i++); + if (c === 37) { + c = specifier.charAt(i++); + parse = parses[c in pads ? specifier.charAt(i++) : c]; + if (!parse || ((j = parse(d, string, j)) < 0)) return -1; + } else if (c != string.charCodeAt(j++)) { + return -1; + } + } + + return j; + } + + function parsePeriod(d, string, i) { + var n = periodRe.exec(string.slice(i)); + return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseShortWeekday(d, string, i) { + var n = shortWeekdayRe.exec(string.slice(i)); + return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseWeekday(d, string, i) { + var n = weekdayRe.exec(string.slice(i)); + return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseShortMonth(d, string, i) { + var n = shortMonthRe.exec(string.slice(i)); + return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseMonth(d, string, i) { + var n = monthRe.exec(string.slice(i)); + return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseLocaleDateTime(d, string, i) { + return parseSpecifier(d, locale_dateTime, string, i); + } + + function parseLocaleDate(d, string, i) { + return parseSpecifier(d, locale_date, string, i); + } + + function parseLocaleTime(d, string, i) { + return parseSpecifier(d, locale_time, string, i); + } + + function formatShortWeekday(d) { + return locale_shortWeekdays[d.getDay()]; + } + + function formatWeekday(d) { + return locale_weekdays[d.getDay()]; + } + + function formatShortMonth(d) { + return locale_shortMonths[d.getMonth()]; + } + + function formatMonth(d) { + return locale_months[d.getMonth()]; + } + + function formatPeriod(d) { + return locale_periods[+(d.getHours() >= 12)]; + } + + function formatQuarter(d) { + return 1 + ~~(d.getMonth() / 3); + } + + function formatUTCShortWeekday(d) { + return locale_shortWeekdays[d.getUTCDay()]; + } + + function formatUTCWeekday(d) { + return locale_weekdays[d.getUTCDay()]; + } + + function formatUTCShortMonth(d) { + return locale_shortMonths[d.getUTCMonth()]; + } + + function formatUTCMonth(d) { + return locale_months[d.getUTCMonth()]; + } + + function formatUTCPeriod(d) { + return locale_periods[+(d.getUTCHours() >= 12)]; + } + + function formatUTCQuarter(d) { + return 1 + ~~(d.getUTCMonth() / 3); + } + + return { + format: function(specifier) { + var f = newFormat(specifier += "", formats); + f.toString = function() { return specifier; }; + return f; + }, + parse: function(specifier) { + var p = newParse(specifier += "", false); + p.toString = function() { return specifier; }; + return p; + }, + utcFormat: function(specifier) { + var f = newFormat(specifier += "", utcFormats); + f.toString = function() { return specifier; }; + return f; + }, + utcParse: function(specifier) { + var p = newParse(specifier += "", true); + p.toString = function() { return specifier; }; + return p; + } + }; + } + + var pads = {"-": "", "_": " ", "0": "0"}, + numberRe = /^\s*\d+/, // note: ignores next directive + percentRe = /^%/, + requoteRe = /[\\^$*+?|[\]().{}]/g; + + function pad(value, fill, width) { + var sign = value < 0 ? "-" : "", + string = (sign ? -value : value) + "", + length = string.length; + return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); + } + + function requote(s) { + return s.replace(requoteRe, "\\$&"); + } + + function formatRe(names) { + return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); + } + + function formatLookup(names) { + var map = {}, i = -1, n = names.length; + while (++i < n) map[names[i].toLowerCase()] = i; + return map; + } + + function parseWeekdayNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.w = +n[0], i + n[0].length) : -1; + } + + function parseWeekdayNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.u = +n[0], i + n[0].length) : -1; + } + + function parseWeekNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.U = +n[0], i + n[0].length) : -1; + } + + function parseWeekNumberISO(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.V = +n[0], i + n[0].length) : -1; + } + + function parseWeekNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.W = +n[0], i + n[0].length) : -1; + } + + function parseFullYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 4)); + return n ? (d.y = +n[0], i + n[0].length) : -1; + } + + function parseYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; + } + + function parseZone(d, string, i) { + var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); + return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; + } + + function parseQuarter(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; + } + + function parseMonthNumber(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.m = n[0] - 1, i + n[0].length) : -1; + } + + function parseDayOfMonth(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.d = +n[0], i + n[0].length) : -1; + } + + function parseDayOfYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; + } + + function parseHour24(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.H = +n[0], i + n[0].length) : -1; + } + + function parseMinutes(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.M = +n[0], i + n[0].length) : -1; + } + + function parseSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.S = +n[0], i + n[0].length) : -1; + } + + function parseMilliseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.L = +n[0], i + n[0].length) : -1; + } + + function parseMicroseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 6)); + return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; + } + + function parseLiteralPercent(d, string, i) { + var n = percentRe.exec(string.slice(i, i + 1)); + return n ? i + n[0].length : -1; + } + + function parseUnixTimestamp(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.Q = +n[0], i + n[0].length) : -1; + } + + function parseUnixTimestampSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.s = +n[0], i + n[0].length) : -1; + } + + function formatDayOfMonth(d, p) { + return pad(d.getDate(), p, 2); + } + + function formatHour24(d, p) { + return pad(d.getHours(), p, 2); + } + + function formatHour12(d, p) { + return pad(d.getHours() % 12 || 12, p, 2); + } + + function formatDayOfYear(d, p) { + return pad(1 + day.count(year(d), d), p, 3); + } + + function formatMilliseconds(d, p) { + return pad(d.getMilliseconds(), p, 3); + } + + function formatMicroseconds(d, p) { + return formatMilliseconds(d, p) + "000"; + } + + function formatMonthNumber(d, p) { + return pad(d.getMonth() + 1, p, 2); + } + + function formatMinutes(d, p) { + return pad(d.getMinutes(), p, 2); + } + + function formatSeconds(d, p) { + return pad(d.getSeconds(), p, 2); + } + + function formatWeekdayNumberMonday(d) { + var day = d.getDay(); + return day === 0 ? 7 : day; + } + + function formatWeekNumberSunday(d, p) { + return pad(sunday.count(year(d) - 1, d), p, 2); + } + + function formatWeekNumberISO(d, p) { + var day = d.getDay(); + d = (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d); + return pad(thursday.count(year(d), d) + (year(d).getDay() === 4), p, 2); + } + + function formatWeekdayNumberSunday(d) { + return d.getDay(); + } + + function formatWeekNumberMonday(d, p) { + return pad(monday.count(year(d) - 1, d), p, 2); + } + + function formatYear(d, p) { + return pad(d.getFullYear() % 100, p, 2); + } + + function formatFullYear(d, p) { + return pad(d.getFullYear() % 10000, p, 4); + } + + function formatZone(d) { + var z = d.getTimezoneOffset(); + return (z > 0 ? "-" : (z *= -1, "+")) + + pad(z / 60 | 0, "0", 2) + + pad(z % 60, "0", 2); + } + + function formatUTCDayOfMonth(d, p) { + return pad(d.getUTCDate(), p, 2); + } + + function formatUTCHour24(d, p) { + return pad(d.getUTCHours(), p, 2); + } + + function formatUTCHour12(d, p) { + return pad(d.getUTCHours() % 12 || 12, p, 2); + } + + function formatUTCDayOfYear(d, p) { + return pad(1 + utcDay.count(utcYear(d), d), p, 3); + } + + function formatUTCMilliseconds(d, p) { + return pad(d.getUTCMilliseconds(), p, 3); + } + + function formatUTCMicroseconds(d, p) { + return formatUTCMilliseconds(d, p) + "000"; + } + + function formatUTCMonthNumber(d, p) { + return pad(d.getUTCMonth() + 1, p, 2); + } + + function formatUTCMinutes(d, p) { + return pad(d.getUTCMinutes(), p, 2); + } + + function formatUTCSeconds(d, p) { + return pad(d.getUTCSeconds(), p, 2); + } + + function formatUTCWeekdayNumberMonday(d) { + var dow = d.getUTCDay(); + return dow === 0 ? 7 : dow; + } + + function formatUTCWeekNumberSunday(d, p) { + return pad(utcSunday.count(utcYear(d) - 1, d), p, 2); + } + + function formatUTCWeekNumberISO(d, p) { + var day = d.getUTCDay(); + d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d); + return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2); + } + + function formatUTCWeekdayNumberSunday(d) { + return d.getUTCDay(); + } + + function formatUTCWeekNumberMonday(d, p) { + return pad(utcMonday.count(utcYear(d) - 1, d), p, 2); + } + + function formatUTCYear(d, p) { + return pad(d.getUTCFullYear() % 100, p, 2); + } + + function formatUTCFullYear(d, p) { + return pad(d.getUTCFullYear() % 10000, p, 4); + } + + function formatUTCZone() { + return "+0000"; + } + + function formatLiteralPercent() { + return "%"; + } + + function formatUnixTimestamp(d) { + return +d; + } + + function formatUnixTimestampSeconds(d) { + return Math.floor(+d / 1000); + } + + var locale$1; + var timeFormat; + var timeParse; + var utcFormat; + var utcParse; + + defaultLocale$1({ + dateTime: "%x, %X", + date: "%-m/%-d/%Y", + time: "%-I:%M:%S %p", + periods: ["AM", "PM"], + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] + }); + + function defaultLocale$1(definition) { + locale$1 = formatLocale$1(definition); + timeFormat = locale$1.format; + timeParse = locale$1.parse; + utcFormat = locale$1.utcFormat; + utcParse = locale$1.utcParse; + return locale$1; + } + + var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; + + function formatIsoNative(date) { + return date.toISOString(); + } + + var formatIso = Date.prototype.toISOString + ? formatIsoNative + : utcFormat(isoSpecifier); + + function parseIsoNative(string) { + var date = new Date(string); + return isNaN(date) ? null : date; + } + + var parseIso = +new Date("2000-01-01T00:00:00.000Z") + ? parseIsoNative + : utcParse(isoSpecifier); + + var noop = {value: function() {}}; + + function 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 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.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, + T = 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 _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, that) { + if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + } + }; + + function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } + } + + function set(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) type.push({name: name, value: callback}); + return type; + } + + var xhtml = "http://www.w3.org/1999/xhtml"; + + var 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/" + }; + + 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; + } + + 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); + }; + } + + function creator(name) { + var fullname = namespace(name); + return (fullname.local + ? creatorFixed + : creatorInherit)(fullname); + } + + function none() {} + + function selector(selector) { + return selector == null ? none : function() { + return this.querySelector(selector); + }; + } + + 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); + } + + function empty() { + return []; + } + + function selectorAll(selector) { + return selector == null ? empty : function() { + return this.querySelectorAll(selector); + }; + } + + function selection_selectAll(select) { + if (typeof select !== "function") 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); + } + + function matcher(selector) { + return function() { + return this.matches(selector); + }; + } + + 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); + } + + function sparse(update) { + return new Array(update.length); + } + + function selection_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); } + }; + + function constant$2(x) { + return function() { + return x; + }; + } + + var keyPrefix = "$"; // Protect against keys like “__proto__”. + + 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 = {}, + 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 = keyPrefix + key.call(node, node.__data__, i, group); + if (keyValue in nodeByKeyValue) { + exit[i] = node; + } else { + nodeByKeyValue[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 = keyPrefix + key.call(parent, data[i], i, data); + if (node = nodeByKeyValue[keyValue]) { + update[i] = node; + node.__data__ = data[i]; + nodeByKeyValue[keyValue] = null; + } 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[keyValues[i]] === node)) { + exit[i] = node; + } + } + } + + function selection_data(value, key) { + if (!value) { + data = new Array(this.size()), j = -1; + this.each(function(d) { data[++j] = d; }); + return data; + } + + var bind = key ? bindKey : bindIndex, + parents = this._parents, + groups = this._groups; + + if (typeof value !== "function") value = constant$2(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 = 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; + } + + function selection_exit() { + return new Selection(this._exit || this._groups.map(sparse), this._parents); + } + + function selection_join(onenter, onupdate, onexit) { + var enter = this.enter(), update = this, exit = this.exit(); + enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); + if (onupdate != null) update = onupdate(update); + if (onexit == null) exit.remove(); else onexit(exit); + return enter && update ? enter.merge(update).order() : update; + } + + function selection_merge(selection) { + + 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); + } + + function selection_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; + } + + function selection_sort(compare) { + if (!compare) compare = ascending$1; + + 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$1(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + } + + function selection_call() { + var callback = arguments[0]; + arguments[0] = this; + callback.apply(null, arguments); + return this; + } + + function selection_nodes() { + var nodes = new Array(this.size()), i = -1; + this.each(function() { nodes[++i] = this; }); + return nodes; + } + + function selection_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; + } + + function selection_size() { + var size = 0; + this.each(function() { ++size; }); + return size; + } + + function selection_empty() { + return !this.node(); + } + + function selection_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; + } + + 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); + }; + } + + function selection_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)); + } + + function defaultView(node) { + return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node + || (node.document && node) // node is a Window + || node.defaultView; // node is a Document + } + + 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); + }; + } + + function selection_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) + || defaultView(node).getComputedStyle(node, null).getPropertyValue(name); + } + + 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; + }; + } + + function selection_property(name, value) { + return arguments.length > 1 + ? this.each((value == null + ? propertyRemove : typeof value === "function" + ? propertyFunction + : propertyConstant)(name, value)) + : this.node()[name]; + } + + 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); + }; + } + + function selection_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)); + } + + 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; + }; + } + + function selection_text(value) { + return arguments.length + ? this.each(value == null + ? textRemove : (typeof value === "function" + ? textFunction + : textConstant)(value)) + : this.node().textContent; + } + + 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; + }; + } + + function selection_html(value) { + return arguments.length + ? this.each(value == null + ? htmlRemove : (typeof value === "function" + ? htmlFunction + : htmlConstant)(value)) + : this.node().innerHTML; + } + + function raise() { + if (this.nextSibling) this.parentNode.appendChild(this); + } + + function selection_raise() { + return this.each(raise); + } + + function lower() { + if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); + } + + function selection_lower() { + return this.each(lower); + } + + function selection_append(name) { + var create = typeof name === "function" ? name : creator(name); + return this.select(function() { + return this.appendChild(create.apply(this, arguments)); + }); + } + + function constantNull() { + return null; + } + + function selection_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); + }); + } + + function remove() { + var parent = this.parentNode; + if (parent) parent.removeChild(this); + } + + function selection_remove() { + return this.each(remove); + } + + 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; + } + + function selection_clone(deep) { + return this.select(deep ? selection_cloneDeep : selection_cloneShallow); + } + + function selection_datum(value) { + return arguments.length + ? this.property("__data__", value) + : this.node().__data__; + } + + var filterEvents = {}; + + var event = null; + + if (typeof document !== "undefined") { + var element = document.documentElement; + if (!("onmouseenter" in element)) { + filterEvents = {mouseenter: "mouseover", mouseleave: "mouseout"}; + } + } + + function filterContextListener(listener, index, group) { + listener = contextListener(listener, index, group); + return function(event) { + var related = event.relatedTarget; + if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) { + listener.call(this, event); + } + }; + } + + function contextListener(listener, index, group) { + return function(event1) { + var event0 = event; // Events can be reentrant (e.g., focus). + event = event1; + try { + listener.call(this, this.__data__, index, group); + } finally { + event = event0; + } + }; + } + + function parseTypenames$1(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.capture); + } else { + on[++i] = o; + } + } + if (++i) on.length = i; + else delete this.__on; + }; + } + + function onAdd(typename, value, capture) { + var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener; + return function(d, i, group) { + var on = this.__on, o, listener = wrap(value, i, group); + 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.capture); + this.addEventListener(o.type, o.listener = listener, o.capture = capture); + o.value = value; + return; + } + } + this.addEventListener(typename.type, listener, capture); + o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture}; + if (!on) this.__on = [o]; + else on.push(o); + }; + } + + function selection_on(typename, value, capture) { + var typenames = parseTypenames$1(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; + if (capture == null) capture = false; + for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture)); + return this; + } + + function customEvent(event1, listener, that, args) { + var event0 = event; + event1.sourceEvent = event; + event = event1; + try { + return listener.apply(that, args); + } finally { + event = event0; + } + } + + function dispatchEvent(node, type, params) { + var window = defaultView(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)); + }; + } + + function selection_dispatch(type, params) { + return this.each((typeof params === "function" + ? dispatchFunction + : dispatchConstant)(type, params)); + } + + var root = [null]; + + function Selection(groups, parents) { + this._groups = groups; + this._parents = parents; + } + + function selection() { + return new Selection([[document.documentElement]], root); + } + + Selection.prototype = selection.prototype = { + constructor: Selection, + select: selection_select, + selectAll: selection_selectAll, + filter: selection_filter, + data: selection_data, + enter: selection_enter, + exit: selection_exit, + join: selection_join, + merge: selection_merge, + order: selection_order, + sort: selection_sort, + call: selection_call, + nodes: selection_nodes, + node: selection_node, + size: selection_size, + empty: selection_empty, + each: selection_each, + attr: selection_attr, + style: selection_style, + property: selection_property, + classed: selection_classed, + text: selection_text, + html: selection_html, + raise: selection_raise, + lower: selection_lower, + append: selection_append, + insert: selection_insert, + remove: selection_remove, + clone: selection_clone, + datum: selection_datum, + on: selection_on, + dispatch: selection_dispatch + }; + + function select(selector) { + return typeof selector === "string" + ? new Selection([[document.querySelector(selector)]], [document.documentElement]) + : new Selection([[selector]], root); + } + + function sourceEvent() { + var current = event, source; + while (source = current.sourceEvent) current = source; + return current; + } + + function point(node, event) { + var svg = node.ownerSVGElement || node; + + if (svg.createSVGPoint) { + var point = svg.createSVGPoint(); + point.x = event.clientX, point.y = event.clientY; + point = point.matrixTransform(node.getScreenCTM().inverse()); + return [point.x, point.y]; + } + + var rect = node.getBoundingClientRect(); + return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; + } + + function mouse(node) { + var event = sourceEvent(); + if (event.changedTouches) event = event.changedTouches[0]; + return point(node, event); + } + + function touch(node, touches, identifier) { + if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches; + + for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) { + if ((touch = touches[i]).identifier === identifier) { + return point(node, touch); + } + } + + return null; + } + + function nopropagation() { + event.stopImmediatePropagation(); + } + + function noevent() { + event.preventDefault(); + event.stopImmediatePropagation(); + } + + function nodrag(view) { + var root = view.document.documentElement, + selection = select(view).on("dragstart.drag", noevent, true); + if ("onselectstart" in root) { + selection.on("selectstart.drag", noevent, true); + } else { + root.__noselect = root.style.MozUserSelect; + root.style.MozUserSelect = "none"; + } + } + + function yesdrag(view, noclick) { + var root = view.document.documentElement, + selection = select(view).on("dragstart.drag", null); + if (noclick) { + selection.on("click.drag", noevent, true); + setTimeout(function() { selection.on("click.drag", null); }, 0); + } + if ("onselectstart" in root) { + selection.on("selectstart.drag", null); + } else { + root.style.MozUserSelect = root.__noselect; + delete root.__noselect; + } + } + + function constant$3(x) { + return function() { + return x; + }; + } + + function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) { + this.target = target; + this.type = type; + this.subject = subject; + this.identifier = id; + this.active = active; + this.x = x; + this.y = y; + this.dx = dx; + this.dy = dy; + this._ = dispatch; + } + + DragEvent.prototype.on = function() { + var value = this._.on.apply(this._, arguments); + return value === this._ ? this : value; + }; + + // Ignore right-click, since that should open the context menu. + function defaultFilter() { + return !event.ctrlKey && !event.button; + } + + function defaultContainer() { + return this.parentNode; + } + + function defaultSubject(d) { + return d == null ? {x: event.x, y: event.y} : d; + } + + function defaultTouchable() { + return navigator.maxTouchPoints || ("ontouchstart" in this); + } + + function drag() { + var filter = defaultFilter, + container = defaultContainer, + subject = defaultSubject, + touchable = defaultTouchable, + gestures = {}, + listeners = dispatch("start", "drag", "end"), + active = 0, + mousedownx, + mousedowny, + mousemoving, + touchending, + clickDistance2 = 0; + + function drag(selection) { + selection + .on("mousedown.drag", mousedowned) + .filter(touchable) + .on("touchstart.drag", touchstarted) + .on("touchmove.drag", touchmoved) + .on("touchend.drag touchcancel.drag", touchended) + .style("touch-action", "none") + .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } + + function mousedowned() { + if (touchending || !filter.apply(this, arguments)) return; + var gesture = beforestart("mouse", container.apply(this, arguments), mouse, this, arguments); + if (!gesture) return; + select(event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); + nodrag(event.view); + nopropagation(); + mousemoving = false; + mousedownx = event.clientX; + mousedowny = event.clientY; + gesture("start"); + } + + function mousemoved() { + noevent(); + if (!mousemoving) { + var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny; + mousemoving = dx * dx + dy * dy > clickDistance2; + } + gestures.mouse("drag"); + } + + function mouseupped() { + select(event.view).on("mousemove.drag mouseup.drag", null); + yesdrag(event.view, mousemoving); + noevent(); + gestures.mouse("end"); + } + + function touchstarted() { + if (!filter.apply(this, arguments)) return; + var touches = event.changedTouches, + c = container.apply(this, arguments), + n = touches.length, i, gesture; + + for (i = 0; i < n; ++i) { + if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) { + nopropagation(); + gesture("start"); + } + } + } + + function touchmoved() { + var touches = event.changedTouches, + n = touches.length, i, gesture; + + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + noevent(); + gesture("drag"); + } + } + } + + function touchended() { + var touches = event.changedTouches, + n = touches.length, i, gesture; + + if (touchending) clearTimeout(touchending); + touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + nopropagation(); + gesture("end"); + } + } + } + + function beforestart(id, container, point, that, args) { + var p = point(container, id), s, dx, dy, + sublisteners = listeners.copy(); + + if (!customEvent(new DragEvent(drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() { + if ((event.subject = s = subject.apply(that, args)) == null) return false; + dx = s.x - p[0] || 0; + dy = s.y - p[1] || 0; + return true; + })) return; + + return function gesture(type) { + var p0 = p, n; + switch (type) { + case "start": gestures[id] = gesture, n = active++; break; + case "end": delete gestures[id], --active; // nobreak + case "drag": p = point(container, id), n = active; break; + } + customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]); + }; + } + + drag.filter = function(_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : constant$3(!!_), drag) : filter; + }; + + drag.container = function(_) { + return arguments.length ? (container = typeof _ === "function" ? _ : constant$3(_), drag) : container; + }; + + drag.subject = function(_) { + return arguments.length ? (subject = typeof _ === "function" ? _ : constant$3(_), drag) : subject; + }; + + drag.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$3(!!_), drag) : touchable; + }; + + drag.on = function() { + var value = listeners.on.apply(listeners, arguments); + return value === listeners ? drag : value; + }; + + drag.clickDistance = function(_) { + return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2); + }; + + return drag; + } + + // Copyright 2018 The Distill Template Authors + + const T$a = Template('d-slider', ` + + +
        +
        +
        +
        +
        +
        +
        +
        +
        +`); + + // ARIA + // If the slider has a visible label, it is referenced by aria-labelledby on the slider element. Otherwise, the slider element has a label provided by aria-label. + // If the slider is vertically oriented, it has aria-orientation set to vertical. The default value of aria-orientation for a slider is horizontal. + + const keyCodes = { + left: 37, + up: 38, + right: 39, + down: 40, + pageUp: 33, + pageDown: 34, + end: 35, + home: 36 + }; + + class Slider extends T$a(HTMLElement) { + + + connectedCallback() { + this.connected = true; + this.setAttribute('role', 'slider'); + // Makes the element tab-able. + if (!this.hasAttribute('tabindex')) { this.setAttribute('tabindex', 0); } + + // Keeps track of keyboard vs. mouse interactions for focus rings + this.mouseEvent = false; + + // Handles to shadow DOM elements + this.knob = this.root.querySelector('.knob-container'); + this.background = this.root.querySelector('.background'); + this.trackFill = this.root.querySelector('.track-fill'); + this.track = this.root.querySelector('.track'); + + // Default values for attributes + this.min = this.min ? this.min : 0; + this.max = this.max ? this.max : 100; + this.scale = linear$1().domain([this.min, this.max]).range([0, 1]).clamp(true); + + this.origin = this.origin !== undefined ? this.origin : this.min; + this.step = this.step ? this.step : 1; + this.update(this.value ? this.value : 0); + + this.ticks = this.ticks ? this.ticks : false; + this.renderTicks(); + + this.drag = drag() + .container(this.background) + .on('start', () => { + this.mouseEvent = true; + this.background.classList.add('mousedown'); + this.changeValue = this.value; + this.dragUpdate(); + }) + .on('drag', () => { + this.dragUpdate(); + }) + .on('end', () => { + this.mouseEvent = false; + this.background.classList.remove('mousedown'); + this.dragUpdate(); + if (this.changeValue !== this.value) this.dispatchChange(); + this.changeValue = this.value; + }); + this.drag(select(this.background)); + + this.addEventListener('focusin', () => { + if(!this.mouseEvent) { + this.background.classList.add('focus'); + } + }); + this.addEventListener('focusout', () => { + this.background.classList.remove('focus'); + }); + this.addEventListener('keydown', this.onKeyDown); + + } + + static get observedAttributes() {return ['min', 'max', 'value', 'step', 'ticks', 'origin', 'tickValues', 'tickLabels']; } + + attributeChangedCallback(attr, oldValue, newValue) { + if (isNaN(newValue) || newValue === undefined || newValue === null) return; + if (attr == 'min') { + this.min = +newValue; + this.setAttribute('aria-valuemin', this.min); + } + if (attr == 'max') { + this.max = +newValue; + this.setAttribute('aria-valuemax', this.max); + } + if (attr == 'value') { + this.update(+newValue); + } + if (attr == 'origin') { + this.origin = +newValue; + // this.update(this.value); + } + if (attr == 'step') { + if (newValue > 0) { + this.step = +newValue; + } + } + if (attr == 'ticks') { + this.ticks = (newValue === '' ? true : newValue); + } + } + + onKeyDown(event) { + this.changeValue = this.value; + let stopPropagation = false; + switch (event.keyCode) { + case keyCodes.left: + case keyCodes.down: + this.update(this.value - this.step); + stopPropagation = true; + break; + case keyCodes.right: + case keyCodes.up: + this.update(this.value + this.step); + stopPropagation = true; + break; + case keyCodes.pageUp: + this.update(this.value + this.step * 10); + stopPropagation = true; + break; + + case keyCodes.pageDown: + this.update(this.value + this.step * 10); + stopPropagation = true; + break; + case keyCodes.home: + this.update(this.min); + stopPropagation = true; + break; + case keyCodes.end: + this.update(this.max); + stopPropagation = true; + break; + } + if (stopPropagation) { + this.background.classList.add('focus'); + event.preventDefault(); + event.stopPropagation(); + if (this.changeValue !== this.value) this.dispatchChange(); + } + } + + validateValueRange(min, max, value) { + return Math.max(Math.min(max, value), min); + } + + quantizeValue(value, step) { + return Math.round(value / step) * step; + } + + dragUpdate() { + const bbox = this.background.getBoundingClientRect(); + const x = event.x; + const width = bbox.width; + this.update(this.scale.invert(x / width)); + } + + update(value) { + let v = value; + if (this.step !== 'any') { + v = this.quantizeValue(value, this.step); + } + v = this.validateValueRange(this.min, this.max, v); + if (this.connected) { + this.knob.style.left = this.scale(v) * 100 + '%'; + this.trackFill.style.width = this.scale(this.min + Math.abs(v - this.origin)) * 100 + '%'; + this.trackFill.style.left = this.scale(Math.min(v, this.origin)) * 100 + '%'; + } + if (this.value !== v) { + this.value = v; + this.setAttribute('aria-valuenow', this.value); + this.dispatchInput(); + } + } + + // Dispatches only on a committed change (basically only on mouseup). + dispatchChange() { + const e = new Event('change'); + this.dispatchEvent(e, {}); + } + + // Dispatches on each value change. + dispatchInput() { + const e = new Event('input'); + this.dispatchEvent(e, {}); + } + + renderTicks() { + const ticksContainer = this.root.querySelector('.ticks'); + if (this.ticks !== false) { + let tickData = []; + if (this.ticks > 0) { + tickData = this.scale.ticks(this.ticks); + } else if (this.step === 'any') { + tickData = this.scale.ticks(); + } else { + tickData = range(this.min, this.max + 1e-6, this.step); + } + tickData.forEach(d => { + const tick = document.createElement('div'); + tick.classList.add('tick'); + tick.style.left = this.scale(d) * 100 + '%'; + ticksContainer.appendChild(tick); + }); + } else { + ticksContainer.style.display = 'none'; + } + } + } + + var logo = "\n \n\n"; + + const headerTemplate = ` + + +`; + + // Copyright 2018 The Distill Template Authors + + const T$b = Template('distill-header', headerTemplate, false); + + class DistillHeader extends T$b(HTMLElement) { + + } + + // Copyright 2018 The Distill Template Authors + + const styles$2 = ` + +`; + + function appendixTemplate(frontMatter) { + let html = styles$2; + + if (typeof frontMatter.githubUrl !== 'undefined') { + html += ` +

        Updates and Corrections

        +

        `; + if (frontMatter.githubCompareUpdatesUrl) { + html += `View all changes to this article since it was first published.`; + } + html += ` + If you see mistakes or want to suggest changes, please create an issue on GitHub.

        + `; + } + + const journal = frontMatter.journal; + if (typeof journal !== 'undefined' && journal.title === 'Distill') { + html += ` +

        Reuse

        +

        Diagrams and text are licensed under Creative Commons Attribution CC-BY 4.0 with the source available on GitHub, unless noted otherwise. The figures that have been reused from other sources don’t fall under this license and can be recognized by a note in their caption: “Figure from …”.

        + `; + } + + if (typeof frontMatter.publishedDate !== 'undefined') { + html += ` +

        Citation

        +

        For attribution in academic contexts, please cite this work as

        +
        ${frontMatter.concatenatedAuthors}, "${frontMatter.title}", Distill, ${frontMatter.publishedYear}.
        +

        BibTeX citation

        +
        ${serializeFrontmatterToBibtex(frontMatter)}
        + `; + } + + return html; + } + + class DistillAppendix extends HTMLElement { + + static get is() { return 'distill-appendix'; } + + set frontMatter(frontMatter) { + this.innerHTML = appendixTemplate(frontMatter); + } + + } + + const footerTemplate = ` + + + + +`; + + // Copyright 2018 The Distill Template Authors + + const T$c = Template('distill-footer', footerTemplate); + + class DistillFooter extends T$c(HTMLElement) { + + } + + // Copyright 2018 The Distill Template Authors + + let templateIsLoading = false; + let runlevel = 0; + const initialize = function() { + if (window.distill.runlevel < 1) { + throw new Error("Insufficient Runlevel for Distill Template!"); + } + + /* 1. Flag that we're being loaded */ + if ("distill" in window && window.distill.templateIsLoading) { + throw new Error( + "Runlevel 1: Distill Template is getting loaded more than once, aborting!" + ); + } else { + window.distill.templateIsLoading = true; + console.debug("Runlevel 1: Distill Template has started loading."); + } + + /* 2. Add styles if they weren't added during prerendering */ + makeStyleTag(document); + console.debug("Runlevel 1: Static Distill styles have been added."); + console.debug("Runlevel 1->2."); + window.distill.runlevel += 1; + + /* 3. Register Controller listener functions */ + /* Needs to happen before components to their connected callbacks have a controller to talk to. */ + for (const [functionName, callback] of Object.entries(Controller.listeners)) { + if (typeof callback === "function") { + document.addEventListener(functionName, callback); + } else { + console.error("Runlevel 2: Controller listeners need to be functions!"); + } + } + console.debug("Runlevel 2: We can now listen to controller events."); + console.debug("Runlevel 2->3."); + window.distill.runlevel += 1; + + /* 4. Register components */ + const components = [ + Abstract, Appendix, Article, Bibliography, Byline, Cite, CitationList, Code, + Footnote, FootnoteList, FrontMatter$1, HoverBox, Title, DMath, References, TOC, Figure, + Slider, Interstitial + ]; + + const distillComponents = [DistillHeader, DistillAppendix, DistillFooter]; + + if (window.distill.runlevel < 2) { + throw new Error("Insufficient Runlevel for adding custom elements!"); + } + const allComponents = components.concat(distillComponents); + for (const component of allComponents) { + console.debug("Runlevel 2: Registering custom element: " + component.is); + customElements.define(component.is, component); + } + + console.debug( + "Runlevel 3: Distill Template finished registering custom elements." + ); + console.debug("Runlevel 3->4."); + window.distill.runlevel += 1; + + // If template was added after DOMContentLoaded we may have missed that event. + // Controller will check for that case, so trigger the event explicitly: + if (domContentLoaded()) { + Controller.listeners.DOMContentLoaded(); + } + + console.debug("Runlevel 4: Distill Template initialisation complete."); + window.distill.templateIsLoading = false; + window.distill.templateHasLoaded = true; + }; + + window.distill = { runlevel, initialize, templateIsLoading }; + + /* 0. Check browser feature support; synchronously polyfill if needed */ + if (Polyfills.browserSupportsAllFeatures()) { + console.debug("Runlevel 0: No need for polyfills."); + console.debug("Runlevel 0->1."); + window.distill.runlevel += 1; + window.distill.initialize(); + } else { + console.debug("Runlevel 0: Distill Template is loading polyfills."); + Polyfills.load(window.distill.initialize); + } + +}))); +//# sourceMappingURL=template.v2.js.map diff --git a/src/fragmentLoader.js b/src/fragmentLoader.js new file mode 100644 index 0000000000000000000000000000000000000000..8da55c739012936443858a08bd1045b4310ec8c0 --- /dev/null +++ b/src/fragmentLoader.js @@ -0,0 +1,114 @@ +async function loadFragments() { + // Find all elements with ids starting with 'fragment-' + const fragmentElements = Array.from(document.querySelectorAll('[id^="fragment-"]')); + + class FetchQueue { + constructor(maxConcurrent = 3) { + this.queue = []; + this.maxConcurrent = maxConcurrent; + this.activeFetches = 0; + this.maxRetries = 3; // Maximum number of retry attempts + this.baseDelay = 1000; // Base delay in milliseconds (1 second) + } + + async sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); + } + + async fetchWithRetry(fragmentPath, retryCount = 0) { + try { + const response = await fetch(fragmentPath); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + return await response.text(); + } catch (error) { + if (retryCount < this.maxRetries) { + // Exponential backoff: 1s, 2s, 4s + const delay = this.baseDelay * Math.pow(2, retryCount); + console.warn(`Retry ${retryCount + 1}/${this.maxRetries} for ${fragmentPath} after ${delay}ms`); + await this.sleep(delay); + return this.fetchWithRetry(fragmentPath, retryCount + 1); + } + throw error; + } + } + + async addFetch(element) { + const fragmentName = element.id.replace('fragment-', ''); + const fragmentPath = `fragments/${fragmentName}.html`; + + return new Promise(async (resolve, reject) => { + try { + const fetchPromise = (async () => { + try { + const html = await this.fetchWithRetry(fragmentPath); + + // Process the fragment + const temp = document.createElement('div'); + temp.innerHTML = html; + element.innerHTML = temp.innerHTML; + + // Handle scripts + const scripts = temp.getElementsByTagName('script'); + Array.from(scripts).forEach(oldScript => { + const newScript = document.createElement('script'); + Array.from(oldScript.attributes).forEach(attr => { + newScript.setAttribute(attr.name, attr.value); + }); + newScript.textContent = oldScript.textContent; + oldScript.parentNode.removeChild(oldScript); + document.body.appendChild(newScript); + }); + + this.activeFetches--; + resolve(); + } catch (error) { + console.error(`Failed to load fragment ${fragmentPath} after ${this.maxRetries} retries:`, error); + this.activeFetches--; + reject(error); + } + })(); + + this.queue.push(fetchPromise); + this.activeFetches++; + } catch (error) { + reject(error); + } + }); + } + + async processNext(element) { + if (this.activeFetches < this.maxConcurrent && element) { + await this.addFetch(element); + } + } + } + + // Initialize queue + const fetchQueue = new FetchQueue(3); + let currentIndex = 0; + const elements = fragmentElements; // Assuming this is defined elsewhere + + // Initial loading of first 3 elements + while (currentIndex < elements.length && currentIndex < 3) { + await fetchQueue.processNext(elements[currentIndex]); + currentIndex++; + } + + // Process remaining elements as fetches complete + while (currentIndex < elements.length) { + // Wait for any fetch to complete + await Promise.race(fetchQueue.queue); + // Remove completed fetch from queue + fetchQueue.queue = fetchQueue.queue.filter(p => p.status === 'pending'); + // Add next element to queue + await fetchQueue.processNext(elements[currentIndex]); + currentIndex++; + } + + // Wait for remaining fetches to complete + await Promise.all(fetchQueue.queue); +} + +export { loadFragments } \ No newline at end of file diff --git a/src/fragments/banner.html b/src/fragments/banner.html new file mode 100644 index 0000000000000000000000000000000000000000..51d792aa5b340b84e27192ad1cd24614840c6ffb --- /dev/null +++ b/src/fragments/banner.html @@ -0,0 +1 @@ +
        \ No newline at end of file diff --git a/src/fragments/enterprisebanner.html b/src/fragments/enterprisebanner.html new file mode 100644 index 0000000000000000000000000000000000000000..73f0a788b0dadb10dc4cd534afe5b1bba5491292 --- /dev/null +++ b/src/fragments/enterprisebanner.html @@ -0,0 +1,11 @@ +
        + +
        + + \ No newline at end of file diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000000000000000000000000000000000000..4dace83015606723d9859f29edea6d4718809ae7 --- /dev/null +++ b/src/index.html @@ -0,0 +1,367 @@ + + + + + + + + + + + Enterprise Hub - Why you need it, how to get it + + + + + + + + +

        Enterprise Hub:
        Why you need it, how to get it

        +
        +
        + {{{fragment-enterprisebanner}}} +
        + + +
        +
        + + + + + +

        Welcome!
        In this article, you will learn all about the Enterprise features of Hugging Face, and how to get them.

        + + + +

        Executive Summary

        + +

        Hugging Face is the leading open platform for AI Builders - researchers, data scientists, machine learning engineers and software developers. 8 million AI Builders use Hugging Face, and created over 200,000 organizations to collaborate privately on models, datasets and applications.

        + +

        Free organizations are designed for small teams who need to collaborate and share transparently, but do not scale to medium sized companies: in free organizations, members join with their personal accounts, and everyone has access to everything.

        + +

        For companies whose teams need privacy, security, compliance and governance when building AI, Hugging Face offers Enterprise Hub and Enterprise Plus.

        + +

        Enterprise Hub provides advanced collaboration, compute, security and compliance features for organizations.
        + Enterprise Plus adds exclusive security and governance features, and direct expert support from the Hugging Face team.

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Free OrganizationsEnterprise HubEnterprise Plus
        CollaborationDIY AdminResource Groups
        + Private Datasets Viewer
        + Download Analytics
        + Extended Private Storage
        Resource Groups
        + Private Datasets Viewer
        + Download Analytics
        + Extended Private Storage
        ComputeInference Providers
        + Inference Endpoints GPU Quotas
        + Spaces ZeroGPU, Dev Mode
        Inference Providers
        + Inference Endpoints GPU Quotas
        + Spaces ZeroGPU, Dev Mode
        SecurityStandard SSO
        + 2 Factor Authentification
        + Access Token Management
        Advanced SSO
        + 2 Factor Authentification
        + Access Token Management
        GovernanceAudit LogsAudit Logs
        + HF Model Gateway (preview)
        ComplianceStorage RegionsStorage Regions
        + Network Security
        SupportCommunity Support (Forum)Email SupportDirect Expert Support (Slack)
        + +

        Enterprise Hub can be purchased with a credit card at hf.co/enterprise, or via a standard 1-year contract subject to a $50k / 50 seats minimum.

        +

        Enterprise Plus can be purchased via a custom 1-year contract subject to a $120k / 50 seats minimum.

        + +

        How do all these features benefit your organization? Let's dive in.

        + +

        Why upgrade to an Enterprise organization

        + +

        Advanced Collaboration

        + +

        Enterprise Hub and Enterprise Plus organizations allow their members to privately host and share unlimited models, datasets and Spaces repositories. Members of Enterprise organizations benefit from higher rate limits accessing all Hugging Face services from the Hub and the Hugging Face open source libraries.

        + +

        In addition, Enterprise organizations offer high storage limits for private repositories, including 1TB of private storage per member ; for instance an Enterprise organization with 1,000 members can store up to 1 Petabyte of private files at no additional cost!

        + + +

        In free organizations, everyone has access to everything. To organize resources across teams and projects, Enterprise organizations have access to Resource Groups. Enterprise organization admins can create new Resource Groups to assign specific repositories, add members and assign them specific permissions. This is great for teams who want to work on a specific project privately from the rest of the organization, or for different business units to segregate the models, datasets and Spaces they are working on.

        + + +

        A favourite feature of Hugging Face for data scientists is the Datasets Viewer and the Data Studio. With Datasets Viewer makes it easy to preview the content of public datasets, and with Data Studio you can apply SQL queries to the dataset, or even ask AI to create and run them for you! Enterprise organizations make Dataset Viewer and Data Studio available to private datasets hosted on the organization.

        + + +

        Hugging Face is the home of over 2 million public models, datasets contributed by the community. A great way for organizations to have impact and gain followers is by publicly sharing useful models and datasets. Enterprise organizations have access to power features for model and dataset contributors. Enterprise Analytics provides detailed download analytics for public repositories, easily exported via CSV. Enterprise organizations can also set up advanced model gating processes for Hugging Face users to provide information while requesting access to their public models.

        + + +

        Advanced Compute

        + +

        When upgrading their organization to Enterprise, companies provide their employees with powerful compute options to build and host AI applications.

        + +

        Enterprise organization members can use Inference Providers to use and integrate some of the most popular open models into their AI applications, with serverless inference powered by Hugging Face and Inference Providers, including Together AI, fal, Novita AI, Cerebras. Enterprise organizations get $2 free credit each month toward Inference Providers, for instance a 1,000 member organization can use for up to $2,000 of Inference Providers for free. Enterprise organization admins can set a monthly spend limit to control their costs.

        + + +

        To show what an AI model can do, AI Builders use Hugging Face Spaces. Spaces are hosted, interactive AI applications - over 1M public and private Spaces were created on Hugging Face. For companies, private Spaces is an ideal way to demo a model or application to colleagues. Enterprise organizations have access to advanced compute options for their Spaces:
        +

        + +
          +
        • ZeroGPU - Spaces can be powered by powerful A100 NVIDIA GPUs that spin up when the Space is used and down right after.
        • +
        • GPU Upgrades - Spaces can be upgraded to exclusive large GPU options for the most demanding applications, including 4xA10G and A100 Large instances.
        • +
        • Dev Mode - Dev Mode makes developing and debugging Spaces faster, connecting to the underlying container via SSH or VS Code.
        • +
        +

        + +

        Advanced Security

        + +

        Free organizations are designed for minimum friction adding collaborators, students, professionals to foster transparent collaboration. For companies that require security processes, Enterprise organizations offer many features to enforce security rules and make sure appropriate access controls and rules are in place.

        + +

        To secure accounts with access to the organization's private resources, Enterprise organization admins can require 2-Factor Authentication for all members of the organization, and require admin approval for new members.

        + + +

        To reduce the risk of members inadvertently publishing confidential information as public repositories, Enterprise organization admins can make new repositories private by default, or disable public repositories altogether.

        + + +

        User Access Tokens are keys users can create to give applications the permission to access private models, datasets and applications on Hugging Face. It’s very important to create and manage User Access Tokens with best security practices in mind - only give the minimum required scope of access, regularly rotate tokens and invalidate unnecessary tokens. For organization admins, User Access Tokens can be a source of concern as each token is a potential attack vector. Enterprise organizations can reduce risk and enforce best practices with Access Token Management.
        + With Access Token Management, organization admins have a centralized view of every User Access Token created by members of the organization. Each token can be inspected, and revoked. Admins can set up organization policies, for instance to disallow the creation of broad access tokens and require fine-grained tokens, and/or to require admin approval for any new token created by users of the organization.

        + + +

        To make sure that members with access to the organization’s private resources are actually employees of the company, Enterprise organizations can set up Single Sign-On (SSO). With SSO, user authentication to access Enterprise organization resources is managed by the company Identity Provider, such as Okta or Azure Active Directory. Roles and Teams mapping is available to automatically give specific access control permissions to employee groups, and/or assign them to Resource Groups.

        + + +

        Enterprise Plus organizations have access to Advanced SSO features. With Advanced SSO, the Hugging Face user accounts who are members of the organization are fully provisioned by the company Identity Provider.

        + +

        With Enterprise Plus, the user accounts belonging to the organization are Enterprise Managed Users, fully controlled by the company. With Enterprise Managed Users, SSO authentication manages not only the access to organization resources, but also the access to all Hugging Face Hub public resources. Enterprise Managed Users only need to login once to access all public and private resources on the Hugging Face Hub.

        + +

        With Enterprise Managed Users, Enterprise Plus customers can drastically reduce the risk of confidential information being published:
        +

          +
        • Enterprise Managed Users cannot create repositories under their personal profile
        • +
        • Enterprise Managed Users cannot join other organizations beside their Enterprise Plus organization
        • +
        • Enterprise Managed Users cannot subscribe to a PRO subscription for their personal account
        • +
        • Enterprise Managed Users cannot change their account email address, or set a password for their account
        • +
        +

        + +

        Advanced Governance and Compliance

        + +

        Enterprises need traceability and auditability of their confidential information. Enterprise organization admins on Hugging Face have access to Audit Logs to inspect and retrieve all changes made to their organization, such as new users, access tokens or repositories, changes to resource groups, access controls and more. Each log entry includes information about the user, their location, the action, change and time. Lots can be easily downloaded as JSON files for analysis.

        + + +

        Enterprise organizations can choose where their data is hosted with Storage Regions. Models, Datasets, Spaces can be stored in either US-based servers or Europe-based servers, allowing European companies to use Hugging Face in a GDPR compliant way.

        + + +

        Enterprise Plus offers organizations advanced governance and compliance features, with Network Security and Model Gateway.

        + +

        With Network Security, Enterprise Plus organizations can define their corporate network and precisely define which public models, datasets, organizations and applications should be accessible to their employees. Admins can require authentication to access Hugging Face, so that only authorized employees can access it. In addition, admins can define exactly which resources should be allowed or blocked, which is useful to enforce company model governance rules, for instance to restrict access to certain models or organizations disallowed per company policy. Also with Network Security, admins can enable higher rate limits for their organization, and unlock power users of Hugging Face.

        + + +

        Model Gateway is an on-premise proxy of the Hugging Face Hub for companies with strict security, compliance and governance requirements. The Model Gateway is deployed by the company within their environment, and acts as a caching, governance and security layer between the employees network and the public Hugging Face Hub. With Model Gateway, companies can:

        +
          +
        • Allow and restrict specific model, datasets and Spaces applications
        • +
        • Define the allowed licenses for models to prevent downloads of non-compliant models (for instance, to prevent employees from downloading GPL licensed or Non-Commercial licensed models)
        • +
        • Define the allowed file formats for models to reduce security risks (for instance, to prevent employees from downloading models stored as Pickle files)
        • +
        • Define model security scanning requirements, and implement custom model security scanners into the Model Gateway registry
        • +
        • Guarantee model supply chain robustness with models and versioning cached in local company storage (for instance, to prevent models from becoming unavailable if their provider on Hugging Face decided to delete them)
        • +
        • Simplify team model access for Gated models like Meta Llama, Google Gemma or Mistral models - permission is asked once and the model is then available to everyone at the company via the Model Gateway local registry.
        • +
        • Increase productivity for machine learning engineers with fast downloads from the local storage system
        • +
        • Provide auditability with logs documenting and attributing model downloads by employees
        • +
        +

        Model Gateway is a new feature currently in preview for select Enterprise Plus organizations.

        + +

        Advanced Support

        + +

        Enterprise Hub organization members enjoy priority support covering their usage of Hugging Face via email requests.

        +

        Enterprise Plus organization members enjoy direct expert support from the Hugging Face team via a dedicated, private Slack channel hosted by Hugging Face.

        + +

        How to upgrade to Enterprise

        + +

        Pricing

        + +

        Enterprise Hub can be purchased directly at hf.co/enterprise with a credit card as a $20/seat monthly subscription, or $216/seat yearly subscription.
        + Companies requiring a contract can request a standard 1-year contract subject to a $50k / 50 seats minimum.

        + +

        Enterprise Plus can only be purchased via a custom 1-year contract subject to a $120k / 50 seats minimum.

        + +

        When purchased through a contract, Enterprise Hub and Enterprise Plus licenses include a number of seats corresponding to the number of members expected to be onboarded in the organization during the first year of the contract. Additional members joining the organization during the yearly term are not charged, and the contract value is updated upon yearly renewal to the number of members of the organization at renewal.

        + +

        Enterprise organizations can purchase Compute Credits toward usage of premium features by their members, such as Inference Providers, Inference Endpoints and Spaces premium hardware. Compute Credits can be purchased upon request via an Order Form, are applied to the organization upon payment, and are valid for one year. Compute Credits purchases of $200k or higher qualify for volume discounts.

        + + +

        To contact the Hugging Face sales team, please email enterprise-contracts@huggingface.co

        + +

        Contracting

        + +

        To keep the process fast and smooth, Enterprise Hub and Enterprise Plus are governed by our standard online Terms of Service, complemented by brief Supplemental Terms. These terms follow industry standards and are regularly updated to ensure they remain clear and fair.

        + +

        Frequently Asked Questions

        + +

        Can I get on a call with a sales representative?
        + Hugging Face sells and onboards customers via a streamlined process relying on written async communication (email and Slack). We are happy to answer any question you may have via email, but do not offer sales calls.

        + +

        Can I get a free trial of Enterprise Hub?
        + Enterprise Hub features can be tested for as little as $20 with a credit card, and we do not offer free trials.

        + +

        How do I follow my internal new vendor onboarding processes?
        + Any vendor, security or legal review process requires to purchase Enterprise Hub or Enterprise Plus via a contract. Our team will be happy to follow your new vendor onboarding process requirements at enterprise-contracts@huggingface.co

        + +

        How do I set up a security review of Hugging Face prior to purchase?
        + Security reviews are only possible when purchasing Enterprise Hub or Enterprise Plus via a contract. Please contact our team at enterprise-contracts@huggingface.co, upon signing a unilateral NDA, Hugging Face will share our SOC2 Type2 report detailing all the information required in security reviews. Our security team can accommodate custom security questionnaires for contract values above $120k.

        + +

        Can the standard contract terms be modified after my legal team reviews them?
        + We only allow legal review for contract values above $120k, the Hugging Face legal team can review change requests to be added to the Order Form, which includes all contract legal terms.

        + +
        + + +

        Get Started

        +

        Upgrade your organization to Enterprise at hf.co/enterprise

        +
        + + + + + + + diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..ebab20ba9fa012c5fae254d091793e8c39ee594a --- /dev/null +++ b/src/index.js @@ -0,0 +1,10 @@ +// import { plotClusters } from './clusters' +import { loadFragments } from './fragmentLoader' +import { syncHFSpacesURLHash } from './syncHFSpacesURLHash' + +document.addEventListener("DOMContentLoaded", () => { + console.log("DOMContentLoaded"); + loadFragments(); + init_memory_plot(); + syncHFSpacesURLHash(); +}, { once: true }); diff --git a/src/plotly_example.py b/src/plotly_example.py new file mode 100644 index 0000000000000000000000000000000000000000..bd879cb835776316338b1a8bab90832577f4d2a8 --- /dev/null +++ b/src/plotly_example.py @@ -0,0 +1,82 @@ +import plotly.graph_objects as go +import numpy as np +import pandas as pd + +data = { + "x": 3*np.random.rand(512), + "y": np.random.rand(512), + "z": np.random.random(512), +} + +df = pd.DataFrame(data) + +def get_label(z): + if z<0.25: + return "smol dot" + if z<0.5: + return "ok-ish dot" + if z<0.75: + return "a dot" + else: + return "biiig dot" + +df["label"] = df["z"].apply(get_label) + +df["z"] = (df["z"]+1)*5 + +fig = go.Figure() + +fig.add_trace(go.Scatter( + x=df['x'], + y=df['y'], + mode='markers', + marker=dict( + size=df['z'], + color=df['z'], + colorscale=[ + [0, 'rgb(78, 165, 183)'], # Light blue + [0.5, 'rgb(206, 192, 250)'], # Purple + [1, 'rgb(232, 137, 171)'] # Pink + ], + opacity=0.9, + ), + customdata=df[["label"]], + hovertemplate="Dot category: %{customdata[0]}", + hoverlabel=dict(namelength=0), + showlegend=False +)) + + +fig.update_layout( + width=1200, + height=400, + paper_bgcolor='white', + plot_bgcolor='white', + showlegend=False, + margin=dict(l=0, r=0, t=0, b=0), + xaxis=dict( + showgrid=False, + zeroline=False, + showticklabels=False, + range=[0, 3] + ), + yaxis=dict( + showgrid=False, + zeroline=False, + showticklabels=False, + scaleanchor="x", + scaleratio=1, + range=[0, 1] + ) +) + +fig.show() + +fig.write_html("fragments/banner.html", + include_plotlyjs=False, + full_html=False, + config={ + 'displayModeBar': False, + 'responsive': True, + 'scrollZoom': False, + }) \ No newline at end of file diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000000000000000000000000000000000000..b578d8cb36dba9c05b860014ecb47abaf952e97b --- /dev/null +++ b/src/style.css @@ -0,0 +1,599 @@ +/* style.css */ +/* Define colors */ +:root { + --distill-gray: rgb(107, 114, 128); + --distill-gray-light: rgb(185, 185, 185); + --distill-gray-lighter: rgb(228, 228, 228); + --distill-gray-lightest: rgb(245, 245, 245); + --distill-blue: #007BFF; +} + +/* Container for the controls */ +[id^="plot-"] { + display: flex; + flex-direction: column; + align-items: center; + gap: 15px; /* Adjust the gap between controls as needed */ +} +[id^="plot-"] figure { + margin-bottom: 0px; + margin-top: 0px; + padding: 0px; +} +.plotly_caption { + font-style: italic; + margin-top: 10px; +} + +.plotly_controls { + display: flex; + flex-wrap: wrap; + flex-direction: row; + justify-content: center; + align-items: flex-start; + gap: 30px; +} + + +.plotly_input_container { + display: flex; + align-items: center; + flex-direction: column; + gap: 10px; +} + +/* Style for the select dropdown */ +.plotly_input_container > select { + padding: 2px 4px; + /* border: 1px solid #ccc; */ + line-height: 1.5em; + text-align: center; + border-radius: 4px; + font-size: 12px; + background-color: var(--distill-gray-lightest); + outline: none; +} + +/* Style for the range input */ + +.plotly_slider { + display: flex; + align-items: center; + gap: 10px; +} + +.plotly_slider > input[type="range"] { + -webkit-appearance: none; + height: 2px; + background: var(--distill-gray-light); + border-radius: 5px; + outline: none; +} + +.plotly_slider > span { + font-size: 14px; + line-height: 1.6em; + min-width: 16px; +} + +.plotly_slider > input[type="range"]::-webkit-slider-thumb { + -webkit-appearance: none; + appearance: none; + width: 18px; + height: 18px; + border-radius: 50%; + background: var(--distill-blue); + cursor: pointer; +} + +.plotly_slider > input[type="range"]::-moz-range-thumb { + width: 18px; + height: 18px; + border-radius: 50%; + background: var(--distill-blue); + cursor: pointer; +} + +/* Style for the labels */ +.plotly_input_container > label { + font-size: 14px; + font-weight: bold; +} + +.main-plot-container { + margin-top: 21px; + margin-bottom: 35px; +} + +.main-plot-container > figure { + display: block !important; + /* Let this be handled by graph-container */ + margin-bottom: 0px; + margin-top: 0px; +} +.main-plot-container > div { + display: none !important; +} + + +@media (min-width: 768px) { + .main-plot-container > figure { + display: none !important; + } + .main-plot-container > div { + display: flex !important; + } +} + +d-byline .byline { + grid-template-columns: 1fr; + grid-column: text; + font-size: 0.9rem; + line-height: 1.8em; +} + +@media (min-width: 768px) { + d-byline .byline { + grid-template-columns: 5fr 1fr 1fr; + } +} + +#title-plot { + margin-top: 0px; + margin-bottom: 0px; +} + +d-contents > nav a.active { + text-decoration: underline; +} + +@media (max-width: 1199px) { + d-contents { + display: none; + background: white; + justify-self: start; + align-self: start; + padding-bottom: 0.5em; + margin-bottom: 1em; + padding-left: 0.25em; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: rgba(0, 0, 0, 0.1); + overflow-y: scroll; + height: calc(100vh - 40px); + scrollbar-width: none; + z-index: -100; + } +} + +d-contents a:hover { + border-bottom: none; +} + +toc-title { + font-weight: bold; + font-size: 1.2em; + color: #333; +} + +toggle-icon { + transition: transform 0.3s; +} + +toggle-icon.collapsed { + transform: rotate(90deg); +} + +.toc-content { + margin-top: 15px; + overflow: hidden; + /* max-height: 1000px; */ + transition: max-height 0.3s ease-out; +} + +.toc-content.collapsed { + max-height: 0; + margin-top: 0; +} + +@media (min-width: 1200px) { + d-article { + /* Ensure d-article does not prevent sticky positioning */ + overflow: visible; + } + + d-contents { + align-self: start; + background: white; + grid-column-start: 1 !important; + grid-column-end: 4 !important; + grid-row: auto / span 6; + justify-self: end; + margin-top: 0em; + padding-right: 3em; + padding-left: 2em; + /* border-right: 1px solid rgba(0, 0, 0, 0.1); + border-right-width: 1px; + border-right-style: solid; + border-right-color: rgba(0, 0, 0, 0.1); */ + position: -webkit-sticky; /* For Safari */ + position: sticky; + top: 10px; /* Adjust this value if needed */ + overflow-y: auto; + height: calc(100vh - 40px); + scrollbar-width: none; + transition: max-height 0.3s ease-out; + z-index: -100; + } +} + +d-contents nav h3 { + margin-top: 0; + margin-bottom: 1em; +} + +d-contents nav div div { + color: rgba(0, 0, 0, 0.8); + font-weight: bold; +} + +d-contents nav a { + color: rgba(0, 0, 0, 0.8); + border-bottom: none; + text-decoration: none; +} + +d-contents li { + list-style-type: none; +} + +d-contents ul, d-article d-contents ul { + padding-left: 1em; +} + +d-contents nav ul li { + margin-bottom: .25em; +} + +d-contents nav a:hover { + text-decoration: underline solid rgba(0, 0, 0, 0.6); +} + +d-contents nav ul { + margin-top: 0; + margin-bottom: 6px; +} + + +d-contents nav > div { + display: block; + outline: none; + margin-bottom: 0.5em; +} + +d-contents nav > div > a { + font-size: 13px; + font-weight: 600; +} + +d-article aside { + margin-bottom: 1em; +} + +d-article img { + max-width: 100%; +} + +@media (min-width: 768px) { + d-article aside { + margin-bottom: 0; + } +} + +d-contents nav > div > a:hover, +d-contents nav > ul > li > a:hover { + text-decoration: none; +} + +.note-box { + background-color: #f6f8fa; + border-left: 4px solid #444444; + padding: 1rem; + margin: 1rem 0; /* Keep this modest margin */ + border-radius: 6px; + /* Add this to ensure the box only takes up needed space */ + display: inline-block; + width: 100%; +} + +.note-box-title { + margin: 0; + color: #444444; + font-weight: 600; + font-size: 1em; +} + +.note-box-content { + margin-top: 0.5rem; + margin-bottom: 0; /* Ensure no bottom margin */ + color: #24292f; + font-size: 0.9em; + line-height: 1.5em; +} + +/* For dark mode support */ +@media (prefers-color-scheme: dark) { + .note-box { + background-color: #1c1c1c; + border-left-color: #888888; + } + .note-box-title { + color: #888888; + } + .note-box-content { + color: #d4d4d4; + } +} + +d-article { + font-size: 1.0em; +} + +.figure-legend { + font-size: 0.9em; + font-style: italic; + color: var(--distill-gray); + line-height: 1.5em; +} + +d-code { + font-size: 12px; +} + +.large-image-background { + width: 100vw; + padding-top: 10px; + padding-bottom: 10px; + margin-left: calc(-50vw + 50%); + margin-right: calc(-50vw + 50%); + background: white; + height: fit-content; /* This will make it match the image height */ + display: flex; + justify-content: center; /* This will center your image */ +} + +.large-image-background-transparent { + /* width: 100vw; */ + padding-top: 10px; + padding-bottom: 10px; + /* margin-left: calc(-50vw + 50%); */ + margin-left:-100px; + margin-right: -100px; + /* margin-right: calc(-50vw + 50%); */ + /* background: white; */ + height: fit-content; /* This will make it match the image height */ + display: flex; + justify-content: center; /* This will center your image */ +} + +.boxed-image { + padding: 0.5rem; + background: white; + border-radius: 12px; + border: 1px solid #e5e7eb; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +d-article li { + margin-bottom: 0.0em; +} + +d-article ul ul { + margin-bottom: 0.0em; +} + +d-article ol ol { + margin-bottom: 0.0em; +} + +d-article hr { + grid-column: text; +} + +/* Memory visualization */ +#graph-all { + min-width: 500px; + margin-right: 10px; + margin-bottom: 2rem; + padding: 0.5rem; + background: #f9fafb; + border-radius: 12px; + border: 1px solid #e5e7eb; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + + +/* Main container styles */ +#controls { + max-width: 1200px; + /* margin: 2rem auto; */ + margin-bottom: 2rem; + margin-left: 10px; + padding: 0.6rem; + background: #f9fafb; + border-radius: 12px; + border: 1px solid #e5e7eb; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +/* Grid layout */ +#controls { + display: grid; + grid-template-columns: 1fr 1fr; + /* gap: 2rem; */ +} + +/* Cell styles */ +.cell { + margin-bottom: 0.2rem; +} + +/* Label styles */ +label { + display: block; + /* margin-bottom: 0.5rem; */ + font-size: 0.8rem; + font-weight: 500; + color: #374151; +} + +/* Input container for range + number combination */ +.input-container { + display: flex; + gap: 1rem; + align-items: center; +} + +/* Range input styling */ +input[type="range"] { + flex: 1; + height: 6px; + background: #e5e7eb; + border-radius: 3px; + appearance: none; + outline: none; +} + +input[type="range"]::-webkit-slider-thumb { + appearance: none; + width: 16px; + height: 16px; + background: #3b82f6; + border-radius: 50%; + cursor: pointer; + transition: background 0.15s ease; +} + +input[type="range"]::-webkit-slider-thumb:hover { + background: #2563eb; +} + +/* Number input styling */ +input[type="number"] { + width: 80px; + padding: 0.5rem; + border: 1px solid #e5e7eb; + border-radius: 6px; + font-size: 0.9rem; + color: #374151; +} + +/* Select styling */ +select { + width: 100%; + padding: 0.5rem; + border: 1px solid #e5e7eb; + border-radius: 6px; + background: white; + font-size: 0.9rem; + color: #374151; + cursor: pointer; +} + +/* Checkbox styling */ +input[type="checkbox"] { + width: 1.2rem; + height: 1.2rem; + margin-right: 0.5rem; + border: 2px solid #e5e7eb; + border-radius: 4px; + cursor: pointer; +} + +/* Column specific styles */ +.column-1 { + padding-right: 0.5rem; +} + +.column-2 { + padding-left: 0.5rem; +} + +/* Checkbox container */ +.checkbox-container { + display: flex; + align-items: center; + margin-bottom: 1rem; +} + +/* Memory visualization styles */ +.memory-block { + background: #fff; + border-radius: 8px; + padding: 1rem; + margin-bottom: 1rem; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); +} + +.memory-title { + font-size: 1.1rem; + font-weight: 500; + color: #374151; + margin-bottom: 0.5rem; +} + +.memory-value { + font-size: 1.5rem; + font-weight: 600; + color: #3b82f6; +} + +/* Responsive adjustments */ +@media (max-width: 768px) { + #controls { + grid-template-columns: 1fr; + padding: 1rem; + } + + .column-1, .column-2 { + padding: 0; + } +} + +/* Hover states and transitions */ +input:hover, select:hover { + border-color: #3b82f6; +} + +input:focus, select:focus { + border-color: #2563eb; + outline: none; + box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); +} + +/* Add smooth transitions */ +input, select, button { + transition: all 0.15s ease; +} + +/* Preset dropdown special styling */ +select[name="presets"] { + background-color: #f3f4f6; + font-weight: 500; +} + +/* Memory graph enhancements */ +.activation-memory { + background: #dbeafe; + padding: 1rem; + border-radius: 8px; + margin-bottom: 1rem; +} + +.gradient-memory { + background: #ede9fe; + padding: 1rem; + border-radius: 8px; +} + diff --git a/src/syncHFSpacesURLHash.js b/src/syncHFSpacesURLHash.js new file mode 100644 index 0000000000000000000000000000000000000000..3e26a2bcafc9bf3557b1df1c17c1a6ca5f976ce1 --- /dev/null +++ b/src/syncHFSpacesURLHash.js @@ -0,0 +1,124 @@ +const queryArg = "section"; + +function syncHFSpacesURLHash() { + // Handle explicit section requests (don't update hash automatically on load) + const hasExplicitRequest = handleExplicitSectionRequest(); + + // Set up hash change monitoring + updateHashBasedOnHashChange(); + + // Always set up scroll monitoring to update hash during scrolling + setupScrollMonitoring(); + + // If no explicit request, we don't update the hash on initial load + // The hash will only start updating when the user scrolls +} + +function handleExplicitSectionRequest() { + // Check for section parameter in URL + const urlParams = new URLSearchParams(window.location.search); + const sectionId = urlParams.get(queryArg); + + // If we have an explicit section request + if (sectionId) { + const targetElement = document.getElementById(sectionId); + if (targetElement) { + // Slight delay to ensure the browser doesn't try to do its own scrolling first + setTimeout(() => { + targetElement.scrollIntoView(); + history.replaceState(null, null, `#${sectionId}`); + }, 100); + } + return true; + } + + // No explicit section parameter found + return false; +} + +function setupScrollMonitoring() { + // Variables to manage throttling + let isScrolling = false; + let lastKnownScrollPosition = 0; + let initialScroll = true; + + // Add the scroll event listener + window.addEventListener('scroll', function() { + lastKnownScrollPosition = window.scrollY; + + if (!isScrolling) { + window.requestAnimationFrame(function() { + // Skip the first scroll event which might be browser's automatic scroll + // to a hash on page load + if (initialScroll) { + initialScroll = false; + } else { + updateHashBasedOnScroll(lastKnownScrollPosition); + } + isScrolling = false; + }); + } + + isScrolling = true; + }); +} + +// Function to update the URL hash based on scroll position +function updateHashBasedOnScroll(scrollPosition) { + const closestHeading = findClosestHeading(scrollPosition); + + // Update the URL hash if we found a closest element + if (closestHeading && closestHeading.id) { + // Only update if the hash is different to avoid unnecessary operations + if (window.location.hash !== `#${closestHeading.id}`) { + silentlyUpdateHash(closestHeading.id); + postMessageToHFSpaces(closestHeading.id); + } + } +} + +// Find the closest heading to the current scroll position +function findClosestHeading(scrollPosition) { + // Get only heading elements with IDs that we want to track + const headingsWithIds = Array.from(document.querySelectorAll('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]')); + + // Skip if there are no headings with IDs + if (headingsWithIds.length === 0) return null; + + // Find the element closest to the middle of the viewport + let closestHeading = null; + let closestDistance = Infinity; + const viewportMiddle = scrollPosition + window.innerHeight / 2; + + // Iterate through all headings to find the closest one + headingsWithIds.forEach(heading => { + const headingTop = heading.getBoundingClientRect().top + scrollPosition; + const distance = Math.abs(headingTop - viewportMiddle); + + if (distance < closestDistance) { + closestDistance = distance; + closestHeading = heading; + } + }); + + return closestHeading; +} + +// Update hash without triggering scroll or other side effects +function silentlyUpdateHash(id) { + history.replaceState(null, null, `#${id}`); +} + +function updateHashBasedOnHashChange() { + window.addEventListener('hashchange', () => { + const elementId = window.location.hash.slice(1); + postMessageToHFSpaces(elementId); + }); +} + +function postMessageToHFSpaces(elementId) { + const parentOrigin = "https://huggingface.co"; + window.parent.postMessage({ queryString: `${queryArg}=${elementId}` }, parentOrigin); +} + +export { syncHFSpacesURLHash }; diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000000000000000000000000000000000000..0508bc86e643ab753e62ec1b7ef47c7bcae1fb88 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,153 @@ +const path = require("path"); +const { CleanWebpackPlugin } = require("clean-webpack-plugin"); +const CopyPlugin = require("copy-webpack-plugin"); +const BundleAnalyzerPlugin = require("webpack-bundle-analyzer").BundleAnalyzerPlugin; +const Handlebars = require("handlebars"); +const fs = require("fs"); +const ImageMinimizerPlugin = require("image-minimizer-webpack-plugin"); +const HtmlMinimizerPlugin = require("html-minimizer-webpack-plugin"); + + +const FRAGMENTS_PATH = "src/fragments"; + +// Load the fragments from the fragments directory and caches it +const loadFragmentsMap = (() => { + let cachedFragments = null; + return async () => { + if (cachedFragments === null) { + cachedFragments = {}; + const walkDir = async (dir, basePath = '') => { + const files = fs.readdirSync(dir); + await Promise.all(files.map(async file => { + const filePath = path.join(dir, file); + const relativePath = path.join(basePath, file); + if (fs.statSync(filePath).isDirectory()) { + await walkDir(filePath, relativePath); + } else { + // Remove the .html extension before creating the dotted path + const nameWithoutExt = relativePath.replace(/\.html$/, ''); + const dottedPath = 'fragment-' + nameWithoutExt.replace(/\\/g, '-').replace(/\//g, '-').replace(/\./g, '-'); + const content = fs.readFileSync(filePath, "utf8"); + // Minify the HTML content using swcMinifyFragment + const minifiedRes = await HtmlMinimizerPlugin.swcMinifyFragment({"tmp.html": content}) + if (minifiedRes.errors) { + console.error(minifiedRes.errors) + } + const minifiedContent = minifiedRes.code; + cachedFragments[dottedPath] = minifiedContent; + } + })); + }; + await walkDir(FRAGMENTS_PATH); + } + return cachedFragments; + }; +})(); + +const transformHandlebars = async (data, path) => { + const fragments = await loadFragmentsMap(); + console.log(`Available fragments: ${Object.keys(fragments).join(', ')}`); + // Load the template file + const template = Handlebars.compile(data.toString('utf8')); + const html = template(fragments); + return html; +}; + +module.exports = { + entry: { + distill: "./src/distill.js", + main: "./src/index.js", + }, + output: { + filename: "[name].bundle.js", // The output file + path: path.resolve(__dirname, "dist"), // Output directory + }, + module: { + rules: [ + { test: /\.css$/, use: ["style-loader", "css-loader"] }, + { + test: /\.(js|mjs)$/, + exclude: /node_modules/, + use: { + loader: "babel-loader", + options: { + presets: ["@babel/preset-env"], + }, + }, + }, + {} + ], + }, + plugins: [ + new CleanWebpackPlugin(), + new CopyPlugin({ + patterns: [ + { + from: "assets", + to: "assets", + }, + { from: "src/fragments/*", to: "fragments/[name].html" }, + { from: "src/style.css", to: "style.css" }, + { from: "src/bibliography.bib", to: "bibliography.bib" }, + { + from: "src/index.html", + to: "index.html", + transform: transformHandlebars, + }, + ], + }), + ], + devtool: process.env.NODE_ENV === 'production' ? 'source-map' : 'eval-source-map', + devServer: { + static: "./dist", // Serve files from the 'dist' directory + open: process.env.NODE_ENV !== 'production', // Automatically open the browser unless in production + hot: process.env.NODE_ENV !== 'production', // Enable hot module replacement unless in production + }, + mode: process.env.NODE_ENV === 'production' ? 'production' : 'development', + optimization: { + minimizer: [ + // Hynek: Ideally we would convert all images to webp and just use webp, but I don't have time + // to write script which would also modify html to reflect the new extensions. + new ImageMinimizerPlugin({ + minimizer: [{ + implementation: ImageMinimizerPlugin.sharpMinify, + options: { + encodeOptions: { + // For JPG + jpeg: { + quality: 80 + }, + // For PNG + png: { + quality: 80 + }, + // For WebP + webp: { + quality: 80 + } + } + } + }, + { + implementation: ImageMinimizerPlugin.svgoMinify, + options: { + encodeOptions: { + multipass: true, + plugins: [ + 'preset-default', + ] + } + } + } + ] + }), + //Hynek: Ideally we don't run this twice but we + new HtmlMinimizerPlugin({ + test: /fragments\/.*\.html$/i, + minify: HtmlMinimizerPlugin.swcMinifyFragment, + }) + ] + }, +}; + +console.log(process.env.NODE_ENV) \ No newline at end of file