@orchestrator-ui/orchestrator-ui-components
Version:
Library of UI Components used to display the workflow orchestrator frontend
1,738 lines (1,708 loc) • 2.13 MB
JavaScript
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
// ../../node_modules/xtend/immutable.js
var require_immutable = __commonJS({
"../../node_modules/xtend/immutable.js"(exports, module) {
"use strict";
module.exports = extend;
var hasOwnProperty = Object.prototype.hasOwnProperty;
function extend() {
var target = {};
for (var i = 0; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
}
}
});
// ../../node_modules/property-information/lib/util/schema.js
var require_schema = __commonJS({
"../../node_modules/property-information/lib/util/schema.js"(exports, module) {
"use strict";
module.exports = Schema;
var proto2 = Schema.prototype;
proto2.space = null;
proto2.normal = {};
proto2.property = {};
function Schema(property, normal, space) {
this.property = property;
this.normal = normal;
if (space) {
this.space = space;
}
}
}
});
// ../../node_modules/property-information/lib/util/merge.js
var require_merge = __commonJS({
"../../node_modules/property-information/lib/util/merge.js"(exports, module) {
"use strict";
var xtend = require_immutable();
var Schema = require_schema();
module.exports = merge;
function merge(definitions) {
var length = definitions.length;
var property = [];
var normal = [];
var index = -1;
var info;
var space;
while (++index < length) {
info = definitions[index];
property.push(info.property);
normal.push(info.normal);
space = info.space;
}
return new Schema(
xtend.apply(null, property),
xtend.apply(null, normal),
space
);
}
}
});
// ../../node_modules/property-information/normalize.js
var require_normalize = __commonJS({
"../../node_modules/property-information/normalize.js"(exports, module) {
"use strict";
module.exports = normalize;
function normalize(value) {
return value.toLowerCase();
}
}
});
// ../../node_modules/property-information/lib/util/info.js
var require_info = __commonJS({
"../../node_modules/property-information/lib/util/info.js"(exports, module) {
"use strict";
module.exports = Info;
var proto2 = Info.prototype;
proto2.space = null;
proto2.attribute = null;
proto2.property = null;
proto2.boolean = false;
proto2.booleanish = false;
proto2.overloadedBoolean = false;
proto2.number = false;
proto2.commaSeparated = false;
proto2.spaceSeparated = false;
proto2.commaOrSpaceSeparated = false;
proto2.mustUseProperty = false;
proto2.defined = false;
function Info(property, attribute) {
this.property = property;
this.attribute = attribute;
}
}
});
// ../../node_modules/property-information/lib/util/types.js
var require_types = __commonJS({
"../../node_modules/property-information/lib/util/types.js"(exports) {
"use strict";
var powers = 0;
exports.boolean = increment();
exports.booleanish = increment();
exports.overloadedBoolean = increment();
exports.number = increment();
exports.spaceSeparated = increment();
exports.commaSeparated = increment();
exports.commaOrSpaceSeparated = increment();
function increment() {
return Math.pow(2, ++powers);
}
}
});
// ../../node_modules/property-information/lib/util/defined-info.js
var require_defined_info = __commonJS({
"../../node_modules/property-information/lib/util/defined-info.js"(exports, module) {
"use strict";
var Info = require_info();
var types = require_types();
module.exports = DefinedInfo;
DefinedInfo.prototype = new Info();
DefinedInfo.prototype.defined = true;
var checks = [
"boolean",
"booleanish",
"overloadedBoolean",
"number",
"commaSeparated",
"spaceSeparated",
"commaOrSpaceSeparated"
];
var checksLength = checks.length;
function DefinedInfo(property, attribute, mask, space) {
var index = -1;
var check;
mark(this, "space", space);
Info.call(this, property, attribute);
while (++index < checksLength) {
check = checks[index];
mark(this, check, (mask & types[check]) === types[check]);
}
}
function mark(values, key, value) {
if (value) {
values[key] = value;
}
}
}
});
// ../../node_modules/property-information/lib/util/create.js
var require_create = __commonJS({
"../../node_modules/property-information/lib/util/create.js"(exports, module) {
"use strict";
var normalize = require_normalize();
var Schema = require_schema();
var DefinedInfo = require_defined_info();
module.exports = create;
function create(definition) {
var space = definition.space;
var mustUseProperty = definition.mustUseProperty || [];
var attributes = definition.attributes || {};
var props = definition.properties;
var transform = definition.transform;
var property = {};
var normal = {};
var prop2;
var info;
for (prop2 in props) {
info = new DefinedInfo(
prop2,
transform(attributes, prop2),
props[prop2],
space
);
if (mustUseProperty.indexOf(prop2) !== -1) {
info.mustUseProperty = true;
}
property[prop2] = info;
normal[normalize(prop2)] = prop2;
normal[normalize(info.attribute)] = prop2;
}
return new Schema(property, normal, space);
}
}
});
// ../../node_modules/property-information/lib/xlink.js
var require_xlink = __commonJS({
"../../node_modules/property-information/lib/xlink.js"(exports, module) {
"use strict";
var create = require_create();
module.exports = create({
space: "xlink",
transform: xlinkTransform,
properties: {
xLinkActuate: null,
xLinkArcRole: null,
xLinkHref: null,
xLinkRole: null,
xLinkShow: null,
xLinkTitle: null,
xLinkType: null
}
});
function xlinkTransform(_2, prop2) {
return "xlink:" + prop2.slice(5).toLowerCase();
}
}
});
// ../../node_modules/property-information/lib/xml.js
var require_xml = __commonJS({
"../../node_modules/property-information/lib/xml.js"(exports, module) {
"use strict";
var create = require_create();
module.exports = create({
space: "xml",
transform: xmlTransform,
properties: {
xmlLang: null,
xmlBase: null,
xmlSpace: null
}
});
function xmlTransform(_2, prop2) {
return "xml:" + prop2.slice(3).toLowerCase();
}
}
});
// ../../node_modules/property-information/lib/util/case-sensitive-transform.js
var require_case_sensitive_transform = __commonJS({
"../../node_modules/property-information/lib/util/case-sensitive-transform.js"(exports, module) {
"use strict";
module.exports = caseSensitiveTransform;
function caseSensitiveTransform(attributes, attribute) {
return attribute in attributes ? attributes[attribute] : attribute;
}
}
});
// ../../node_modules/property-information/lib/util/case-insensitive-transform.js
var require_case_insensitive_transform = __commonJS({
"../../node_modules/property-information/lib/util/case-insensitive-transform.js"(exports, module) {
"use strict";
var caseSensitiveTransform = require_case_sensitive_transform();
module.exports = caseInsensitiveTransform;
function caseInsensitiveTransform(attributes, property) {
return caseSensitiveTransform(attributes, property.toLowerCase());
}
}
});
// ../../node_modules/property-information/lib/xmlns.js
var require_xmlns = __commonJS({
"../../node_modules/property-information/lib/xmlns.js"(exports, module) {
"use strict";
var create = require_create();
var caseInsensitiveTransform = require_case_insensitive_transform();
module.exports = create({
space: "xmlns",
attributes: {
xmlnsxlink: "xmlns:xlink"
},
transform: caseInsensitiveTransform,
properties: {
xmlns: null,
xmlnsXLink: null
}
});
}
});
// ../../node_modules/property-information/lib/aria.js
var require_aria = __commonJS({
"../../node_modules/property-information/lib/aria.js"(exports, module) {
"use strict";
var types = require_types();
var create = require_create();
var booleanish = types.booleanish;
var number = types.number;
var spaceSeparated = types.spaceSeparated;
module.exports = create({
transform: ariaTransform,
properties: {
ariaActiveDescendant: null,
ariaAtomic: booleanish,
ariaAutoComplete: null,
ariaBusy: booleanish,
ariaChecked: booleanish,
ariaColCount: number,
ariaColIndex: number,
ariaColSpan: number,
ariaControls: spaceSeparated,
ariaCurrent: null,
ariaDescribedBy: spaceSeparated,
ariaDetails: null,
ariaDisabled: booleanish,
ariaDropEffect: spaceSeparated,
ariaErrorMessage: null,
ariaExpanded: booleanish,
ariaFlowTo: spaceSeparated,
ariaGrabbed: booleanish,
ariaHasPopup: null,
ariaHidden: booleanish,
ariaInvalid: null,
ariaKeyShortcuts: null,
ariaLabel: null,
ariaLabelledBy: spaceSeparated,
ariaLevel: number,
ariaLive: null,
ariaModal: booleanish,
ariaMultiLine: booleanish,
ariaMultiSelectable: booleanish,
ariaOrientation: null,
ariaOwns: spaceSeparated,
ariaPlaceholder: null,
ariaPosInSet: number,
ariaPressed: booleanish,
ariaReadOnly: booleanish,
ariaRelevant: null,
ariaRequired: booleanish,
ariaRoleDescription: spaceSeparated,
ariaRowCount: number,
ariaRowIndex: number,
ariaRowSpan: number,
ariaSelected: booleanish,
ariaSetSize: number,
ariaSort: null,
ariaValueMax: number,
ariaValueMin: number,
ariaValueNow: number,
ariaValueText: null,
role: null
}
});
function ariaTransform(_2, prop2) {
return prop2 === "role" ? prop2 : "aria-" + prop2.slice(4).toLowerCase();
}
}
});
// ../../node_modules/property-information/lib/html.js
var require_html = __commonJS({
"../../node_modules/property-information/lib/html.js"(exports, module) {
"use strict";
var types = require_types();
var create = require_create();
var caseInsensitiveTransform = require_case_insensitive_transform();
var boolean = types.boolean;
var overloadedBoolean = types.overloadedBoolean;
var booleanish = types.booleanish;
var number = types.number;
var spaceSeparated = types.spaceSeparated;
var commaSeparated = types.commaSeparated;
module.exports = create({
space: "html",
attributes: {
acceptcharset: "accept-charset",
classname: "class",
htmlfor: "for",
httpequiv: "http-equiv"
},
transform: caseInsensitiveTransform,
mustUseProperty: ["checked", "multiple", "muted", "selected"],
properties: {
// Standard Properties.
abbr: null,
accept: commaSeparated,
acceptCharset: spaceSeparated,
accessKey: spaceSeparated,
action: null,
allow: null,
allowFullScreen: boolean,
allowPaymentRequest: boolean,
allowUserMedia: boolean,
alt: null,
as: null,
async: boolean,
autoCapitalize: null,
autoComplete: spaceSeparated,
autoFocus: boolean,
autoPlay: boolean,
capture: boolean,
charSet: null,
checked: boolean,
cite: null,
className: spaceSeparated,
cols: number,
colSpan: null,
content: null,
contentEditable: booleanish,
controls: boolean,
controlsList: spaceSeparated,
coords: number | commaSeparated,
crossOrigin: null,
data: null,
dateTime: null,
decoding: null,
default: boolean,
defer: boolean,
dir: null,
dirName: null,
disabled: boolean,
download: overloadedBoolean,
draggable: booleanish,
encType: null,
enterKeyHint: null,
form: null,
formAction: null,
formEncType: null,
formMethod: null,
formNoValidate: boolean,
formTarget: null,
headers: spaceSeparated,
height: number,
hidden: boolean,
high: number,
href: null,
hrefLang: null,
htmlFor: spaceSeparated,
httpEquiv: spaceSeparated,
id: null,
imageSizes: null,
imageSrcSet: commaSeparated,
inputMode: null,
integrity: null,
is: null,
isMap: boolean,
itemId: null,
itemProp: spaceSeparated,
itemRef: spaceSeparated,
itemScope: boolean,
itemType: spaceSeparated,
kind: null,
label: null,
lang: null,
language: null,
list: null,
loading: null,
loop: boolean,
low: number,
manifest: null,
max: null,
maxLength: number,
media: null,
method: null,
min: null,
minLength: number,
multiple: boolean,
muted: boolean,
name: null,
nonce: null,
noModule: boolean,
noValidate: boolean,
onAbort: null,
onAfterPrint: null,
onAuxClick: null,
onBeforePrint: null,
onBeforeUnload: null,
onBlur: null,
onCancel: null,
onCanPlay: null,
onCanPlayThrough: null,
onChange: null,
onClick: null,
onClose: null,
onContextMenu: null,
onCopy: null,
onCueChange: null,
onCut: null,
onDblClick: null,
onDrag: null,
onDragEnd: null,
onDragEnter: null,
onDragExit: null,
onDragLeave: null,
onDragOver: null,
onDragStart: null,
onDrop: null,
onDurationChange: null,
onEmptied: null,
onEnded: null,
onError: null,
onFocus: null,
onFormData: null,
onHashChange: null,
onInput: null,
onInvalid: null,
onKeyDown: null,
onKeyPress: null,
onKeyUp: null,
onLanguageChange: null,
onLoad: null,
onLoadedData: null,
onLoadedMetadata: null,
onLoadEnd: null,
onLoadStart: null,
onMessage: null,
onMessageError: null,
onMouseDown: null,
onMouseEnter: null,
onMouseLeave: null,
onMouseMove: null,
onMouseOut: null,
onMouseOver: null,
onMouseUp: null,
onOffline: null,
onOnline: null,
onPageHide: null,
onPageShow: null,
onPaste: null,
onPause: null,
onPlay: null,
onPlaying: null,
onPopState: null,
onProgress: null,
onRateChange: null,
onRejectionHandled: null,
onReset: null,
onResize: null,
onScroll: null,
onSecurityPolicyViolation: null,
onSeeked: null,
onSeeking: null,
onSelect: null,
onSlotChange: null,
onStalled: null,
onStorage: null,
onSubmit: null,
onSuspend: null,
onTimeUpdate: null,
onToggle: null,
onUnhandledRejection: null,
onUnload: null,
onVolumeChange: null,
onWaiting: null,
onWheel: null,
open: boolean,
optimum: number,
pattern: null,
ping: spaceSeparated,
placeholder: null,
playsInline: boolean,
poster: null,
preload: null,
readOnly: boolean,
referrerPolicy: null,
rel: spaceSeparated,
required: boolean,
reversed: boolean,
rows: number,
rowSpan: number,
sandbox: spaceSeparated,
scope: null,
scoped: boolean,
seamless: boolean,
selected: boolean,
shape: null,
size: number,
sizes: null,
slot: null,
span: number,
spellCheck: booleanish,
src: null,
srcDoc: null,
srcLang: null,
srcSet: commaSeparated,
start: number,
step: null,
style: null,
tabIndex: number,
target: null,
title: null,
translate: null,
type: null,
typeMustMatch: boolean,
useMap: null,
value: booleanish,
width: number,
wrap: null,
// Legacy.
// See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
align: null,
// Several. Use CSS `text-align` instead,
aLink: null,
// `<body>`. Use CSS `a:active {color}` instead
archive: spaceSeparated,
// `<object>`. List of URIs to archives
axis: null,
// `<td>` and `<th>`. Use `scope` on `<th>`
background: null,
// `<body>`. Use CSS `background-image` instead
bgColor: null,
// `<body>` and table elements. Use CSS `background-color` instead
border: number,
// `<table>`. Use CSS `border-width` instead,
borderColor: null,
// `<table>`. Use CSS `border-color` instead,
bottomMargin: number,
// `<body>`
cellPadding: null,
// `<table>`
cellSpacing: null,
// `<table>`
char: null,
// Several table elements. When `align=char`, sets the character to align on
charOff: null,
// Several table elements. When `char`, offsets the alignment
classId: null,
// `<object>`
clear: null,
// `<br>`. Use CSS `clear` instead
code: null,
// `<object>`
codeBase: null,
// `<object>`
codeType: null,
// `<object>`
color: null,
// `<font>` and `<hr>`. Use CSS instead
compact: boolean,
// Lists. Use CSS to reduce space between items instead
declare: boolean,
// `<object>`
event: null,
// `<script>`
face: null,
// `<font>`. Use CSS instead
frame: null,
// `<table>`
frameBorder: null,
// `<iframe>`. Use CSS `border` instead
hSpace: number,
// `<img>` and `<object>`
leftMargin: number,
// `<body>`
link: null,
// `<body>`. Use CSS `a:link {color: *}` instead
longDesc: null,
// `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
lowSrc: null,
// `<img>`. Use a `<picture>`
marginHeight: number,
// `<body>`
marginWidth: number,
// `<body>`
noResize: boolean,
// `<frame>`
noHref: boolean,
// `<area>`. Use no href instead of an explicit `nohref`
noShade: boolean,
// `<hr>`. Use background-color and height instead of borders
noWrap: boolean,
// `<td>` and `<th>`
object: null,
// `<applet>`
profile: null,
// `<head>`
prompt: null,
// `<isindex>`
rev: null,
// `<link>`
rightMargin: number,
// `<body>`
rules: null,
// `<table>`
scheme: null,
// `<meta>`
scrolling: booleanish,
// `<frame>`. Use overflow in the child context
standby: null,
// `<object>`
summary: null,
// `<table>`
text: null,
// `<body>`. Use CSS `color` instead
topMargin: number,
// `<body>`
valueType: null,
// `<param>`
version: null,
// `<html>`. Use a doctype.
vAlign: null,
// Several. Use CSS `vertical-align` instead
vLink: null,
// `<body>`. Use CSS `a:visited {color}` instead
vSpace: number,
// `<img>` and `<object>`
// Non-standard Properties.
allowTransparency: null,
autoCorrect: null,
autoSave: null,
disablePictureInPicture: boolean,
disableRemotePlayback: boolean,
prefix: null,
property: null,
results: number,
security: null,
unselectable: null
}
});
}
});
// ../../node_modules/property-information/html.js
var require_html2 = __commonJS({
"../../node_modules/property-information/html.js"(exports, module) {
"use strict";
var merge = require_merge();
var xlink = require_xlink();
var xml = require_xml();
var xmlns = require_xmlns();
var aria = require_aria();
var html = require_html();
module.exports = merge([xml, xlink, xmlns, aria, html]);
}
});
// ../../node_modules/property-information/find.js
var require_find = __commonJS({
"../../node_modules/property-information/find.js"(exports, module) {
"use strict";
var normalize = require_normalize();
var DefinedInfo = require_defined_info();
var Info = require_info();
var data = "data";
module.exports = find;
var valid = /^data[-\w.:]+$/i;
var dash = /-[a-z]/g;
var cap = /[A-Z]/g;
function find(schema, value) {
var normal = normalize(value);
var prop2 = value;
var Type = Info;
if (normal in schema.normal) {
return schema.property[schema.normal[normal]];
}
if (normal.length > 4 && normal.slice(0, 4) === data && valid.test(value)) {
if (value.charAt(4) === "-") {
prop2 = datasetToProperty(value);
} else {
value = datasetToAttribute(value);
}
Type = DefinedInfo;
}
return new Type(prop2, value);
}
function datasetToProperty(attribute) {
var value = attribute.slice(5).replace(dash, camelcase);
return data + value.charAt(0).toUpperCase() + value.slice(1);
}
function datasetToAttribute(property) {
var value = property.slice(4);
if (dash.test(value)) {
return property;
}
value = value.replace(cap, kebab);
if (value.charAt(0) !== "-") {
value = "-" + value;
}
return data + value;
}
function kebab($0) {
return "-" + $0.toLowerCase();
}
function camelcase($0) {
return $0.charAt(1).toUpperCase();
}
}
});
// ../../node_modules/hast-util-parse-selector/index.js
var require_hast_util_parse_selector = __commonJS({
"../../node_modules/hast-util-parse-selector/index.js"(exports, module) {
"use strict";
module.exports = parse;
var search = /[#.]/g;
function parse(selector, defaultTagName) {
var value = selector || "";
var name = defaultTagName || "div";
var props = {};
var start = 0;
var subvalue;
var previous;
var match;
while (start < value.length) {
search.lastIndex = start;
match = search.exec(value);
subvalue = value.slice(start, match ? match.index : value.length);
if (subvalue) {
if (!previous) {
name = subvalue;
} else if (previous === "#") {
props.id = subvalue;
} else if (props.className) {
props.className.push(subvalue);
} else {
props.className = [subvalue];
}
start += subvalue.length;
}
if (match) {
previous = match[0];
start++;
}
}
return { type: "element", tagName: name, properties: props, children: [] };
}
}
});
// ../../node_modules/space-separated-tokens/index.js
var require_space_separated_tokens = __commonJS({
"../../node_modules/space-separated-tokens/index.js"(exports) {
"use strict";
exports.parse = parse;
exports.stringify = stringify;
var empty = "";
var space = " ";
var whiteSpace = /[ \t\n\r\f]+/g;
function parse(value) {
var input = String(value || empty).trim();
return input === empty ? [] : input.split(whiteSpace);
}
function stringify(values) {
return values.join(space).trim();
}
}
});
// ../../node_modules/comma-separated-tokens/index.js
var require_comma_separated_tokens = __commonJS({
"../../node_modules/comma-separated-tokens/index.js"(exports) {
"use strict";
exports.parse = parse;
exports.stringify = stringify;
var comma = ",";
var space = " ";
var empty = "";
function parse(value) {
var values = [];
var input = String(value || empty);
var index = input.indexOf(comma);
var lastIndex = 0;
var end = false;
var val;
while (!end) {
if (index === -1) {
index = input.length;
end = true;
}
val = input.slice(lastIndex, index).trim();
if (val || !end) {
values.push(val);
}
lastIndex = index + 1;
index = input.indexOf(comma, lastIndex);
}
return values;
}
function stringify(values, options) {
var settings = options || {};
var left = settings.padLeft === false ? empty : space;
var right = settings.padRight ? space : empty;
if (values[values.length - 1] === empty) {
values = values.concat(empty);
}
return values.join(right + comma + left).trim();
}
}
});
// ../../node_modules/hastscript/factory.js
var require_factory = __commonJS({
"../../node_modules/hastscript/factory.js"(exports, module) {
"use strict";
var find = require_find();
var normalize = require_normalize();
var parseSelector = require_hast_util_parse_selector();
var spaces = require_space_separated_tokens().parse;
var commas = require_comma_separated_tokens().parse;
module.exports = factory;
var own = {}.hasOwnProperty;
function factory(schema, defaultTagName, caseSensitive) {
var adjust = caseSensitive ? createAdjustMap(caseSensitive) : null;
return h;
function h(selector, properties) {
var node = parseSelector(selector, defaultTagName);
var children = Array.prototype.slice.call(arguments, 2);
var name = node.tagName.toLowerCase();
var property;
node.tagName = adjust && own.call(adjust, name) ? adjust[name] : name;
if (properties && isChildren(properties, node)) {
children.unshift(properties);
properties = null;
}
if (properties) {
for (property in properties) {
addProperty(node.properties, property, properties[property]);
}
}
addChild(node.children, children);
if (node.tagName === "template") {
node.content = { type: "root", children: node.children };
node.children = [];
}
return node;
}
function addProperty(properties, key, value) {
var info;
var property;
var result;
if (value === null || value === void 0 || value !== value) {
return;
}
info = find(schema, key);
property = info.property;
result = value;
if (typeof result === "string") {
if (info.spaceSeparated) {
result = spaces(result);
} else if (info.commaSeparated) {
result = commas(result);
} else if (info.commaOrSpaceSeparated) {
result = spaces(commas(result).join(" "));
}
}
if (property === "style" && typeof value !== "string") {
result = style(result);
}
if (property === "className" && properties.className) {
result = properties.className.concat(result);
}
properties[property] = parsePrimitives(info, property, result);
}
}
function isChildren(value, node) {
return typeof value === "string" || "length" in value || isNode(node.tagName, value);
}
function isNode(tagName, value) {
var type = value.type;
if (tagName === "input" || !type || typeof type !== "string") {
return false;
}
if (typeof value.children === "object" && "length" in value.children) {
return true;
}
type = type.toLowerCase();
if (tagName === "button") {
return type !== "menu" && type !== "submit" && type !== "reset" && type !== "button";
}
return "value" in value;
}
function addChild(nodes, value) {
var index;
var length;
if (typeof value === "string" || typeof value === "number") {
nodes.push({ type: "text", value: String(value) });
return;
}
if (typeof value === "object" && "length" in value) {
index = -1;
length = value.length;
while (++index < length) {
addChild(nodes, value[index]);
}
return;
}
if (typeof value !== "object" || !("type" in value)) {
throw new Error("Expected node, nodes, or string, got `" + value + "`");
}
nodes.push(value);
}
function parsePrimitives(info, name, value) {
var index;
var length;
var result;
if (typeof value !== "object" || !("length" in value)) {
return parsePrimitive(info, name, value);
}
length = value.length;
index = -1;
result = [];
while (++index < length) {
result[index] = parsePrimitive(info, name, value[index]);
}
return result;
}
function parsePrimitive(info, name, value) {
var result = value;
if (info.number || info.positiveNumber) {
if (!isNaN(result) && result !== "") {
result = Number(result);
}
} else if (info.boolean || info.overloadedBoolean) {
if (typeof result === "string" && (result === "" || normalize(value) === normalize(name))) {
result = true;
}
}
return result;
}
function style(value) {
var result = [];
var key;
for (key in value) {
result.push([key, value[key]].join(": "));
}
return result.join("; ");
}
function createAdjustMap(values) {
var length = values.length;
var index = -1;
var result = {};
var value;
while (++index < length) {
value = values[index];
result[value.toLowerCase()] = value;
}
return result;
}
}
});
// ../../node_modules/hastscript/html.js
var require_html3 = __commonJS({
"../../node_modules/hastscript/html.js"(exports, module) {
"use strict";
var schema = require_html2();
var factory = require_factory();
var html = factory(schema, "div");
html.displayName = "html";
module.exports = html;
}
});
// ../../node_modules/hastscript/index.js
var require_hastscript = __commonJS({
"../../node_modules/hastscript/index.js"(exports, module) {
"use strict";
module.exports = require_html3();
}
});
// ../../node_modules/character-entities-legacy/index.json
var require_character_entities_legacy = __commonJS({
"../../node_modules/character-entities-legacy/index.json"(exports, module) {
module.exports = {
AElig: "\xC6",
AMP: "&",
Aacute: "\xC1",
Acirc: "\xC2",
Agrave: "\xC0",
Aring: "\xC5",
Atilde: "\xC3",
Auml: "\xC4",
COPY: "\xA9",
Ccedil: "\xC7",
ETH: "\xD0",
Eacute: "\xC9",
Ecirc: "\xCA",
Egrave: "\xC8",
Euml: "\xCB",
GT: ">",
Iacute: "\xCD",
Icirc: "\xCE",
Igrave: "\xCC",
Iuml: "\xCF",
LT: "<",
Ntilde: "\xD1",
Oacute: "\xD3",
Ocirc: "\xD4",
Ograve: "\xD2",
Oslash: "\xD8",
Otilde: "\xD5",
Ouml: "\xD6",
QUOT: '"',
REG: "\xAE",
THORN: "\xDE",
Uacute: "\xDA",
Ucirc: "\xDB",
Ugrave: "\xD9",
Uuml: "\xDC",
Yacute: "\xDD",
aacute: "\xE1",
acirc: "\xE2",
acute: "\xB4",
aelig: "\xE6",
agrave: "\xE0",
amp: "&",
aring: "\xE5",
atilde: "\xE3",
auml: "\xE4",
brvbar: "\xA6",
ccedil: "\xE7",
cedil: "\xB8",
cent: "\xA2",
copy: "\xA9",
curren: "\xA4",
deg: "\xB0",
divide: "\xF7",
eacute: "\xE9",
ecirc: "\xEA",
egrave: "\xE8",
eth: "\xF0",
euml: "\xEB",
frac12: "\xBD",
frac14: "\xBC",
frac34: "\xBE",
gt: ">",
iacute: "\xED",
icirc: "\xEE",
iexcl: "\xA1",
igrave: "\xEC",
iquest: "\xBF",
iuml: "\xEF",
laquo: "\xAB",
lt: "<",
macr: "\xAF",
micro: "\xB5",
middot: "\xB7",
nbsp: "\xA0",
not: "\xAC",
ntilde: "\xF1",
oacute: "\xF3",
ocirc: "\xF4",
ograve: "\xF2",
ordf: "\xAA",
ordm: "\xBA",
oslash: "\xF8",
otilde: "\xF5",
ouml: "\xF6",
para: "\xB6",
plusmn: "\xB1",
pound: "\xA3",
quot: '"',
raquo: "\xBB",
reg: "\xAE",
sect: "\xA7",
shy: "\xAD",
sup1: "\xB9",
sup2: "\xB2",
sup3: "\xB3",
szlig: "\xDF",
thorn: "\xFE",
times: "\xD7",
uacute: "\xFA",
ucirc: "\xFB",
ugrave: "\xF9",
uml: "\xA8",
uuml: "\xFC",
yacute: "\xFD",
yen: "\xA5",
yuml: "\xFF"
};
}
});
// ../../node_modules/character-reference-invalid/index.json
var require_character_reference_invalid = __commonJS({
"../../node_modules/character-reference-invalid/index.json"(exports, module) {
module.exports = {
"0": "\uFFFD",
"128": "\u20AC",
"130": "\u201A",
"131": "\u0192",
"132": "\u201E",
"133": "\u2026",
"134": "\u2020",
"135": "\u2021",
"136": "\u02C6",
"137": "\u2030",
"138": "\u0160",
"139": "\u2039",
"140": "\u0152",
"142": "\u017D",
"145": "\u2018",
"146": "\u2019",
"147": "\u201C",
"148": "\u201D",
"149": "\u2022",
"150": "\u2013",
"151": "\u2014",
"152": "\u02DC",
"153": "\u2122",
"154": "\u0161",
"155": "\u203A",
"156": "\u0153",
"158": "\u017E",
"159": "\u0178"
};
}
});
// ../../node_modules/is-decimal/index.js
var require_is_decimal = __commonJS({
"../../node_modules/is-decimal/index.js"(exports, module) {
"use strict";
module.exports = decimal;
function decimal(character) {
var code = typeof character === "string" ? character.charCodeAt(0) : character;
return code >= 48 && code <= 57;
}
}
});
// ../../node_modules/is-hexadecimal/index.js
var require_is_hexadecimal = __commonJS({
"../../node_modules/is-hexadecimal/index.js"(exports, module) {
"use strict";
module.exports = hexadecimal;
function hexadecimal(character) {
var code = typeof character === "string" ? character.charCodeAt(0) : character;
return code >= 97 && code <= 102 || code >= 65 && code <= 70 || code >= 48 && code <= 57;
}
}
});
// ../../node_modules/is-alphabetical/index.js
var require_is_alphabetical = __commonJS({
"../../node_modules/is-alphabetical/index.js"(exports, module) {
"use strict";
module.exports = alphabetical;
function alphabetical(character) {
var code = typeof character === "string" ? character.charCodeAt(0) : character;
return code >= 97 && code <= 122 || code >= 65 && code <= 90;
}
}
});
// ../../node_modules/is-alphanumerical/index.js
var require_is_alphanumerical = __commonJS({
"../../node_modules/is-alphanumerical/index.js"(exports, module) {
"use strict";
var alphabetical = require_is_alphabetical();
var decimal = require_is_decimal();
module.exports = alphanumerical;
function alphanumerical(character) {
return alphabetical(character) || decimal(character);
}
}
});
// ../../node_modules/character-entities/index.json
var require_character_entities = __commonJS({
"../../node_modules/character-entities/index.json"(exports, module) {
module.exports = {
AEli: "\xC6",
AElig: "\xC6",
AM: "&",
AMP: "&",
Aacut: "\xC1",
Aacute: "\xC1",
Abreve: "\u0102",
Acir: "\xC2",
Acirc: "\xC2",
Acy: "\u0410",
Afr: "\u{1D504}",
Agrav: "\xC0",
Agrave: "\xC0",
Alpha: "\u0391",
Amacr: "\u0100",
And: "\u2A53",
Aogon: "\u0104",
Aopf: "\u{1D538}",
ApplyFunction: "\u2061",
Arin: "\xC5",
Aring: "\xC5",
Ascr: "\u{1D49C}",
Assign: "\u2254",
Atild: "\xC3",
Atilde: "\xC3",
Aum: "\xC4",
Auml: "\xC4",
Backslash: "\u2216",
Barv: "\u2AE7",
Barwed: "\u2306",
Bcy: "\u0411",
Because: "\u2235",
Bernoullis: "\u212C",
Beta: "\u0392",
Bfr: "\u{1D505}",
Bopf: "\u{1D539}",
Breve: "\u02D8",
Bscr: "\u212C",
Bumpeq: "\u224E",
CHcy: "\u0427",
COP: "\xA9",
COPY: "\xA9",
Cacute: "\u0106",
Cap: "\u22D2",
CapitalDifferentialD: "\u2145",
Cayleys: "\u212D",
Ccaron: "\u010C",
Ccedi: "\xC7",
Ccedil: "\xC7",
Ccirc: "\u0108",
Cconint: "\u2230",
Cdot: "\u010A",
Cedilla: "\xB8",
CenterDot: "\xB7",
Cfr: "\u212D",
Chi: "\u03A7",
CircleDot: "\u2299",
CircleMinus: "\u2296",
CirclePlus: "\u2295",
CircleTimes: "\u2297",
ClockwiseContourIntegral: "\u2232",
CloseCurlyDoubleQuote: "\u201D",
CloseCurlyQuote: "\u2019",
Colon: "\u2237",
Colone: "\u2A74",
Congruent: "\u2261",
Conint: "\u222F",
ContourIntegral: "\u222E",
Copf: "\u2102",
Coproduct: "\u2210",
CounterClockwiseContourIntegral: "\u2233",
Cross: "\u2A2F",
Cscr: "\u{1D49E}",
Cup: "\u22D3",
CupCap: "\u224D",
DD: "\u2145",
DDotrahd: "\u2911",
DJcy: "\u0402",
DScy: "\u0405",
DZcy: "\u040F",
Dagger: "\u2021",
Darr: "\u21A1",
Dashv: "\u2AE4",
Dcaron: "\u010E",
Dcy: "\u0414",
Del: "\u2207",
Delta: "\u0394",
Dfr: "\u{1D507}",
DiacriticalAcute: "\xB4",
DiacriticalDot: "\u02D9",
DiacriticalDoubleAcute: "\u02DD",
DiacriticalGrave: "`",
DiacriticalTilde: "\u02DC",
Diamond: "\u22C4",
DifferentialD: "\u2146",
Dopf: "\u{1D53B}",
Dot: "\xA8",
DotDot: "\u20DC",
DotEqual: "\u2250",
DoubleContourIntegral: "\u222F",
DoubleDot: "\xA8",
DoubleDownArrow: "\u21D3",
DoubleLeftArrow: "\u21D0",
DoubleLeftRightArrow: "\u21D4",
DoubleLeftTee: "\u2AE4",
DoubleLongLeftArrow: "\u27F8",
DoubleLongLeftRightArrow: "\u27FA",
DoubleLongRightArrow: "\u27F9",
DoubleRightArrow: "\u21D2",
DoubleRightTee: "\u22A8",
DoubleUpArrow: "\u21D1",
DoubleUpDownArrow: "\u21D5",
DoubleVerticalBar: "\u2225",
DownArrow: "\u2193",
DownArrowBar: "\u2913",
DownArrowUpArrow: "\u21F5",
DownBreve: "\u0311",
DownLeftRightVector: "\u2950",
DownLeftTeeVector: "\u295E",
DownLeftVector: "\u21BD",
DownLeftVectorBar: "\u2956",
DownRightTeeVector: "\u295F",
DownRightVector: "\u21C1",
DownRightVectorBar: "\u2957",
DownTee: "\u22A4",
DownTeeArrow: "\u21A7",
Downarrow: "\u21D3",
Dscr: "\u{1D49F}",
Dstrok: "\u0110",
ENG: "\u014A",
ET: "\xD0",
ETH: "\xD0",
Eacut: "\xC9",
Eacute: "\xC9",
Ecaron: "\u011A",
Ecir: "\xCA",
Ecirc: "\xCA",
Ecy: "\u042D",
Edot: "\u0116",
Efr: "\u{1D508}",
Egrav: "\xC8",
Egrave: "\xC8",
Element: "\u2208",
Emacr: "\u0112",
EmptySmallSquare: "\u25FB",
EmptyVerySmallSquare: "\u25AB",
Eogon: "\u0118",
Eopf: "\u{1D53C}",
Epsilon: "\u0395",
Equal: "\u2A75",
EqualTilde: "\u2242",
Equilibrium: "\u21CC",
Escr: "\u2130",
Esim: "\u2A73",
Eta: "\u0397",
Eum: "\xCB",
Euml: "\xCB",
Exists: "\u2203",
ExponentialE: "\u2147",
Fcy: "\u0424",
Ffr: "\u{1D509}",
FilledSmallSquare: "\u25FC",
FilledVerySmallSquare: "\u25AA",
Fopf: "\u{1D53D}",
ForAll: "\u2200",
Fouriertrf: "\u2131",
Fscr: "\u2131",
GJcy: "\u0403",
G: ">",
GT: ">",
Gamma: "\u0393",
Gammad: "\u03DC",
Gbreve: "\u011E",
Gcedil: "\u0122",
Gcirc: "\u011C",
Gcy: "\u0413",
Gdot: "\u0120",
Gfr: "\u{1D50A}",
Gg: "\u22D9",
Gopf: "\u{1D53E}",
GreaterEqual: "\u2265",
GreaterEqualLess: "\u22DB",
GreaterFullEqual: "\u2267",
GreaterGreater: "\u2AA2",
GreaterLess: "\u2277",
GreaterSlantEqual: "\u2A7E",
GreaterTilde: "\u2273",
Gscr: "\u{1D4A2}",
Gt: "\u226B",
HARDcy: "\u042A",
Hacek: "\u02C7",
Hat: "^",
Hcirc: "\u0124",
Hfr: "\u210C",
HilbertSpace: "\u210B",
Hopf: "\u210D",
HorizontalLine: "\u2500",
Hscr: "\u210B",
Hstrok: "\u0126",
HumpDownHump: "\u224E",
HumpEqual: "\u224F",
IEcy: "\u0415",
IJlig: "\u0132",
IOcy: "\u0401",
Iacut: "\xCD",
Iacute: "\xCD",
Icir: "\xCE",
Icirc: "\xCE",
Icy: "\u0418",
Idot: "\u0130",
Ifr: "\u2111",
Igrav: "\xCC",
Igrave: "\xCC",
Im: "\u2111",
Imacr: "\u012A",
ImaginaryI: "\u2148",
Implies: "\u21D2",
Int: "\u222C",
Integral: "\u222B",
Intersection: "\u22C2",
InvisibleComma: "\u2063",
InvisibleTimes: "\u2062",
Iogon: "\u012E",
Iopf: "\u{1D540}",
Iota: "\u0399",
Iscr: "\u2110",
Itilde: "\u0128",
Iukcy: "\u0406",
Ium: "\xCF",
Iuml: "\xCF",
Jcirc: "\u0134",
Jcy: "\u0419",
Jfr: "\u{1D50D}",
Jopf: "\u{1D541}",
Jscr: "\u{1D4A5}",
Jsercy: "\u0408",
Jukcy: "\u0404",
KHcy: "\u0425",
KJcy: "\u040C",
Kappa: "\u039A",
Kcedil: "\u0136",
Kcy: "\u041A",
Kfr: "\u{1D50E}",
Kopf: "\u{1D542}",
Kscr: "\u{1D4A6}",
LJcy: "\u0409",
L: "<",
LT: "<",
Lacute: "\u0139",
Lambda: "\u039B",
Lang: "\u27EA",
Laplacetrf: "\u2112",
Larr: "\u219E",
Lcaron: "\u013D",
Lcedil: "\u013B",
Lcy: "\u041B",
LeftAngleBracket: "\u27E8",
LeftArrow: "\u2190",
LeftArrowBar: "\u21E4",
LeftArrowRightArrow: "\u21C6",
LeftCeiling: "\u2308",
LeftDoubleBracket: "\u27E6",
LeftDownTeeVector: "\u2961",
LeftDownVector: "\u21C3",
LeftDownVectorBar: "\u2959",
LeftFloor: "\u230A",
LeftRightArrow: "\u2194",
LeftRightVector: "\u294E",
LeftTee: "\u22A3",
LeftTeeArrow: "\u21A4",
LeftTeeVector: "\u295A",
LeftTriangle: "\u22B2",
LeftTriangleBar: "\u29CF",
LeftTriangleEqual: "\u22B4",
LeftUpDownVector: "\u2951",
LeftUpTeeVector: "\u2960",
LeftUpVector: "\u21BF",
LeftUpVectorBar: "\u2958",
LeftVector: "\u21BC",
LeftVectorBar: "\u2952",
Leftarrow: "\u21D0",
Leftrightarrow: "\u21D4",
LessEqualGreater: "\u22DA",
LessFullEqual: "\u2266",
LessGreater: "\u2276",
LessLess: "\u2AA1",
LessSlantEqual: "\u2A7D",
LessTilde: "\u2272",
Lfr: "\u{1D50F}",
Ll: "\u22D8",
Lleftarrow: "\u21DA",
Lmidot: "\u013F",
LongLeftArrow: "\u27F5",
LongLeftRightArrow: "\u27F7",
LongRightArrow: "\u27F6",
Longleftarrow: "\u27F8",
Longleftrightarrow: "\u27FA",
Longrightarrow: "\u27F9",
Lopf: "\u{1D543}",
LowerLeftArrow: "\u2199",
LowerRightArrow: "\u2198",
Lscr: "\u2112",
Lsh: "\u21B0",
Lstrok: "\u0141",
Lt: "\u226A",
Map: "\u2905",
Mcy: "\u041C",
MediumSpace: "\u205F",
Mellintrf: "\u2133",
Mfr: "\u{1D510}",
MinusPlus: "\u2213",
Mopf: "\u{1D544}",
Mscr: "\u2133",
Mu: "\u039C",
NJcy: "\u040A",
Nacute: "\u0143",
Ncaron: "\u0147",
Ncedil: "\u0145",
Ncy: "\u041D",
NegativeMediumSpace: "\u200B",
NegativeThickSpace: "\u200B",
NegativeThinSpace: "\u200B",
NegativeVeryThinSpace: "\u200B",
NestedGreaterGreater: "\u226B",
NestedLessLess: "\u226A",
NewLine: "\n",
Nfr: "\u{1D511}",
NoBreak: "\u2060",
NonBreakingSpace: "\xA0",
Nopf: "\u2115",
Not: "\u2AEC",
NotCongruent: "\u2262",
NotCupCap: "\u226D",
NotDoubleVerticalBar: "\u2226",
NotElement: "\u2209",
NotEqual: "\u2260",
NotEqualTilde: "\u2242\u0338",
NotExists: "\u2204",
NotGreater: "\u226F",
NotGreaterEqual: "\u2271",
NotGreaterFullEqual: "\u2267\u0338",
NotGreaterGreater: "\u226B\u0338",
NotGreaterLess: "\u2279",
NotGreaterSlantEqual: "\u2A7E\u0338",
NotGreaterTilde: "\u2275",
NotHumpDownHump: "\u224E\u0338",
NotHumpEqual: "\u224F\u0338",
NotLeftTriangle: "\u22EA",
NotLeftTriangleBar: "\u29CF\u0338",
NotLeftTriangleEqual: "\u22EC",
NotLess: "\u226E",
NotLessEqual: "\u2270",
NotLessGreater: "\u2278",
NotLessLess: "\u226A\u0338",
NotLessSlantEqual: "\u2A7D\u0338",
NotLessTilde: "\u2274",
NotNestedGreaterGreater: "\u2AA2\u0338",
NotNestedLessLess: "\u2AA1\u0338",
NotPrecedes: "\u2280",
NotPrecedesEqual: "\u2AAF\u0338",
NotPrecedesSlantEqual: "\u22E0",
NotReverseElement: "\u220C",
NotRightTriangle: "\u22EB",
NotRightTriangleBar: "\u29D0\u0338",
NotRightTriangleEqual: "\u22ED",
NotSquareSubset: "\u228F\u0338",
NotSquareSubsetEqual: "\u22E2",
NotSquareSuperset: "\u2290\u0338",
NotSquareSupersetEqual: "\u22E3",
NotSubset: "\u2282\u20D2",
NotSubsetEqual: "\u2288",
NotSucceeds: "\u2281",
NotSucceedsEqual: "\u2AB0\u0338",
NotSucceedsSlantEqual: "\u22E1",
NotSucceedsTilde: "\u227F\u0338",
NotSuperset: "\u2283\u20D2",
NotSupersetEqual: "\u2289",
NotTilde: "\u2241",
NotTildeEqual: "\u2244",
NotTildeFullEqual: "\u2247",
NotTildeTilde: "\u2249",
NotVerticalBar: "\u2224",
Nscr: "\u{1D4A9}",
Ntild: "\xD1",
Ntilde: "\xD1",
Nu: "\u039D",
OElig: "\u0152",
Oacut: "\xD3",
Oacute: "\xD3",
Ocir: "\xD4",
Ocirc: "\xD4",
Ocy: "\u041E",
Odblac: "\u0150",
Ofr: "\u{1D512}",
Ograv: "\xD2",
Ograve: "\xD2",
Omacr: "\u014C",
Omega: "\u03A9",
Omicron: "\u039F",
Oopf: "\u{1D546}",
OpenCurlyDoubleQuote: "\u201C",
OpenCurlyQuote: "\u2018",
Or: "\u2A54",
Oscr: "\u{1D4AA}",
Oslas: "\xD8",
Oslash: "\xD8",
Otild: "\xD5",
Otilde: "\xD5",
Otimes: "\u2A37",
Oum: "\xD6",
Ouml: "\xD6",
OverBar: "\u203E",
OverBrace: "\u23DE",
OverBracket: "\u23B4",
OverParenthesis: "\u23DC",
PartialD: "\u2202",
Pcy: "\u041F",
Pfr: "\u{1D513}",
Phi: "\u03A6",
Pi: "\u03A0",
PlusMinus: "\xB1",
Poincareplane: "\u210C",
Popf: "\u2119",
Pr: "\u2ABB",
Precedes: "\u227A",
PrecedesEqual: "\u2AAF",
PrecedesSlantEqual: "\u227C",
PrecedesTilde: "\u227E",
Prime: "\u2033",
Product: "\u220F",
Proportion: "\u2237",
Proportional: "\u221D",
Pscr: "\u{1D4AB}",
Psi: "\u03A8",
QUO: '"',
QUOT: '"',
Qfr: "\u{1D514}",
Qopf: "\u211A",
Qscr: "\u{1D4AC}",
RBarr: "\u2910",
RE: "\xAE",
REG: "\xAE",
Racute: "\u0154",
Rang: "\u27EB",
Rarr: "\u21A0",
Rarrtl: "\u2916",
Rcaron: "\u0158",
Rcedil: "\u0156",
Rcy: "\u0420",
Re: "\u211C",
ReverseElement: "\u220B",
ReverseEquilibrium: "\