docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -0,0 +1,8 @@
var $3c220ae7ef8a35fd$exports = {};
$3c220ae7ef8a35fd$exports = {
"dismiss": `Dispensar`
};
export {$3c220ae7ef8a35fd$exports as default};
//# sourceMappingURL=pt-PT.module.js.map
@@ -0,0 +1,18 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');
var $SyntaxError = require('es-errors/syntax');
var $resolve = GetIntrinsic('%Promise.resolve%', true);
var $PromiseResolve = $resolve && callBind($resolve);
// https://262.ecma-international.org/9.0/#sec-promise-resolve
module.exports = function PromiseResolve(C, x) {
if (!$PromiseResolve) {
throw new $SyntaxError('This environment does not support Promises.');
}
return $PromiseResolve(C, x);
};
@@ -0,0 +1,38 @@
'use strict'
var reusify = require('../')
var fib = require('./fib')
var instance = reusify(MyObject)
var max = 100000000
var start = Date.now()
function reuseNoCodeFunction () {
var obj = instance.get()
obj.num = 100
obj.func()
obj.num = 0
instance.release(obj)
}
function MyObject () {
this.next = null
var that = this
this.num = 0
this.func = function () {
/* eslint no-constant-condition: "off" */
if (null) {
// do nothing
} else {
fib(that.num)
}
}
}
for (var i = 0; i < max; i++) {
reuseNoCodeFunction()
}
var time = Date.now() - start
console.log('Total time', time)
console.log('Total iterations', max)
console.log('Iteration/s', max / time * 1000)
@@ -0,0 +1 @@
{"version":3,"sources":["../src/utils/react.ts","../src/utils/react-is.ts","../src/utils/warning.ts","../src/connect/verifySubselectors.ts","../src/connect/selectorFactory.ts","../src/utils/bindActionCreators.ts","../src/utils/isPlainObject.ts","../src/utils/verifyPlainObject.ts","../src/connect/wrapMapToProps.ts","../src/connect/invalidArgFactory.ts","../src/connect/mapDispatchToProps.ts","../src/connect/mapStateToProps.ts","../src/connect/mergeProps.ts","../src/utils/batch.ts","../src/utils/Subscription.ts","../src/utils/useIsomorphicLayoutEffect.ts","../src/utils/shallowEqual.ts","../src/utils/hoistStatics.ts","../src/components/Context.ts","../src/components/connect.tsx","../src/components/Provider.tsx","../src/hooks/useReduxContext.ts","../src/hooks/useStore.ts","../src/hooks/useDispatch.ts","../src/hooks/useSelector.ts","../src/exports.ts"],"sourcesContent":["import * as React from 'react'\n\nexport { React }\n","import type { ElementType, MemoExoticComponent, ReactElement } from 'react'\nimport { React } from './react'\n\n// Directly ported from:\n// https://unpkg.com/browse/react-is@19.0.0/cjs/react-is.production.js\n// It's very possible this could change in the future, but given that\n// we only use these in `connect`, this is a low priority.\n\nexport const IS_REACT_19 = /* @__PURE__ */ React.version.startsWith('19')\n\nconst REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for(\n IS_REACT_19 ? 'react.transitional.element' : 'react.element',\n)\nconst REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for('react.portal')\nconst REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for('react.fragment')\nconst REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for('react.strict_mode')\nconst REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for('react.profiler')\nconst REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for('react.consumer')\nconst REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for('react.context')\nconst REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for('react.forward_ref')\nconst REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for('react.suspense')\nconst REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for(\n 'react.suspense_list',\n)\nconst REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for('react.memo')\nconst REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for('react.lazy')\nconst REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for('react.offscreen')\nconst REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for(\n 'react.client.reference',\n)\n\nexport const ForwardRef = REACT_FORWARD_REF_TYPE\nexport const Memo = REACT_MEMO_TYPE\n\nexport function isValidElementType(type: any): type is ElementType {\n return typeof type === 'string' ||\n typeof type === 'function' ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n type === REACT_OFFSCREEN_TYPE ||\n (typeof type === 'object' &&\n type !== null &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE ||\n type.getModuleId !== undefined))\n ? !0\n : !1\n}\n\nfunction typeOf(object: any): symbol | undefined {\n if (typeof object === 'object' && object !== null) {\n const { $$typeof } = object\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (((object = object.type), object)) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return object\n default:\n switch (((object = object && object.$$typeof), object)) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object\n case REACT_CONSUMER_TYPE:\n return object\n default:\n return $$typeof\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof\n }\n }\n}\n\nexport function isContextConsumer(object: any): object is ReactElement {\n return IS_REACT_19\n ? typeOf(object) === REACT_CONSUMER_TYPE\n : typeOf(object) === REACT_CONTEXT_TYPE\n}\n\nexport function isMemo(object: any): object is MemoExoticComponent<any> {\n return typeOf(object) === REACT_MEMO_TYPE\n}\n","/**\r\n * Prints a warning in the console if it exists.\r\n *\r\n * @param {String} message The warning message.\r\n * @returns {void}\r\n */\r\nexport default function warning(message: string) {\r\n /* eslint-disable no-console */\r\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\r\n console.error(message)\r\nLine truncated
@@ -0,0 +1,12 @@
import type Scroll from '../blots/scroll.js';
import Emitter from './emitter.js';
declare class Composition {
private scroll;
private emitter;
isComposing: boolean;
constructor(scroll: Scroll, emitter: Emitter);
private setupListeners;
private handleCompositionStart;
private handleCompositionEnd;
}
export default Composition;
@@ -0,0 +1,2 @@
export type MakeRequired<Base, Key extends keyof Base> = Omit<Base, Key> & Required<Record<Key, NonNullable<Base[Key]>>>;
export type ValueOf<T> = T[keyof T];
@@ -0,0 +1,20 @@
import * as _heroui_system from '@heroui/system';
import { UseTableProps } from './use-table.mjs';
import '@react-types/table';
import 'react';
import '@heroui/theme';
import '@react-stately/virtualizer';
import '@react-types/shared';
import '@react-stately/table';
import '@react-aria/table';
import '@heroui/react-utils';
import '@heroui/checkbox';
interface TableProps<T = object> extends Omit<UseTableProps<T>, "isSelectable" | "isMultiSelectable"> {
isVirtualized?: boolean;
rowHeight?: number;
maxTableHeight?: number;
}
declare const VirtualizedTable: _heroui_system.InternalForwardRefRenderFunction<"table", TableProps<object>, never>;
export { type TableProps, VirtualizedTable as default };
@@ -0,0 +1,7 @@
module.exports = {
content: [],
theme: {
extend: {},
},
plugins: [],
}
@@ -0,0 +1 @@
{"version":3,"file":"curryLazyBuildPlanServiceNodeFromResolvedValueElementMetadata.js","sourceRoot":"","sources":["../../../../src/planning/actions/curryLazyBuildPlanServiceNodeFromResolvedValueElementMetadata.ts"],"names":[],"mappings":";;AAaA,sIA2CC;AArDD,8EAA2E;AAC3E,sFAAmF;AAOnF,2IAAwI;AAExI,SAAgB,6DAA6D,CAC3E,wBAMsB;IAMtB,MAAM,oDAAoD,GAKxD,IAAA,qHAAyD,EACvD,wBAAwB,CACzB,CAAC;IAEJ,OAAO,CACL,MAAqB,EACrB,sBAA6E,EAC7E,eAA6C,EAChB,EAAE;QAC/B,IAAI,CAAC;YACH,OAAO,oDAAoD,CACzD,MAAM,EACN,sBAAsB,EACtB,eAAe,CAChB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,IACE,uCAAkB,CAAC,aAAa,CAAC,KAAK,EAAE,+CAAsB,CAAC,QAAQ,CAAC,EACxE,CAAC;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;YAED,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,73 @@
import * as fns from "date-manip";
export * from "date-manip";
const { parse, get, set } = fns;
class DateChain {
constructor(input, format) {
const _input = input instanceof DateChain ? input._d : input;
this._i = input;
this._f = format;
this._d = parse(_input, format);
}
clone() {
return new DateChain(this, this._f);
}
toArray() {
const date = this._d;
return [
get(date, "year"),
get(date, "month"),
get(date, "date"),
get(date, "hours"),
get(date, "minutes"),
get(date, "seconds"),
get(date, "milliseconds")
// -date.getTimezoneOffset()
];
}
toDate() {
return new Date(this._d);
}
toISOString() {
return this._d.toISOString();
}
toJSON() {
return this.toISOString();
}
toString() {
return this._d.toString();
}
valueOf() {
return this._d.valueOf();
}
}
const proto = DateChain.prototype;
Object.entries(fns.units).forEach(([, method]) => {
const fn = function(val) {
if (val == null) {
return get(this._d, method);
}
set(this._d, method, val);
return this;
};
proto[method] = fn;
if (method !== "time") {
proto[`${method}s`] = fn;
}
});
const exclude = ["compile", "parse", "units"];
Object.entries(fns).forEach(([name, method]) => {
if (!exclude.includes(name)) {
proto[name] = function() {
const date = this._d;
const ret = method(date, ...arguments);
return ret === date ? this : ret;
};
}
DateChain[name] = method;
});
function chain(input, format) {
return new DateChain(input, format);
}
export {
chain
};
@@ -0,0 +1,171 @@
const DropdownIcon = "<svg viewbox=\"0 0 18 18\"><polygon class=\"ql-stroke\" points=\"7 11 9 13 11 11 7 11\"/><polygon class=\"ql-stroke\" points=\"7 7 9 5 11 7 7 7\"/></svg>";
let optionsCounter = 0;
function toggleAriaAttribute(element, attribute) {
element.setAttribute(attribute, `${!(element.getAttribute(attribute) === 'true')}`);
}
class Picker {
constructor(select) {
this.select = select;
this.container = document.createElement('span');
this.buildPicker();
this.select.style.display = 'none';
// @ts-expect-error Fix me later
this.select.parentNode.insertBefore(this.container, this.select);
this.label.addEventListener('mousedown', () => {
this.togglePicker();
});
this.label.addEventListener('keydown', event => {
switch (event.key) {
case 'Enter':
this.togglePicker();
break;
case 'Escape':
this.escape();
event.preventDefault();
break;
default:
}
});
this.select.addEventListener('change', this.update.bind(this));
}
togglePicker() {
this.container.classList.toggle('ql-expanded');
// Toggle aria-expanded and aria-hidden to make the picker accessible
toggleAriaAttribute(this.label, 'aria-expanded');
// @ts-expect-error
toggleAriaAttribute(this.options, 'aria-hidden');
}
buildItem(option) {
const item = document.createElement('span');
// @ts-expect-error
item.tabIndex = '0';
item.setAttribute('role', 'button');
item.classList.add('ql-picker-item');
const value = option.getAttribute('value');
if (value) {
item.setAttribute('data-value', value);
}
if (option.textContent) {
item.setAttribute('data-label', option.textContent);
}
item.addEventListener('click', () => {
this.selectItem(item, true);
});
item.addEventListener('keydown', event => {
switch (event.key) {
case 'Enter':
this.selectItem(item, true);
event.preventDefault();
break;
case 'Escape':
this.escape();
event.preventDefault();
break;
default:
}
});
return item;
}
buildLabel() {
const label = document.createElement('span');
label.classList.add('ql-picker-label');
label.innerHTML = DropdownIcon;
// @ts-expect-error
label.tabIndex = '0';
label.setAttribute('role', 'button');
label.setAttribute('aria-expanded', 'false');
this.container.appendChild(label);
return label;
}
buildOptions() {
const options = document.createElement('span');
options.classList.add('ql-picker-options');
// Don't want screen readers to read this until options are visible
options.setAttribute('aria-hidden', 'true');
// @ts-expect-error
options.tabIndex = '-1';
// Need a unique id for aria-controls
options.id = `ql-picker-options-${optionsCounter}`;
optionsCounter += 1;
this.label.setAttribute('aria-controls', options.id);
// @ts-expect-error
this.options = options;
Array.from(this.select.options).forEach(option => {
const item = this.buildItem(option);
options.appendChild(item);
if (option.selected === true) {
this.selectItem(item);
}
});
this.container.appendChild(options);
}
buildPicker() {
Array.from(this.select.attributes).forEach(item => {
this.container.setAttribute(item.name, item.value);
});
this.container.classList.add('ql-picker');
this.label = this.buildLabel();
this.buildOptions();
}
escape() {
// Close menu and return focus to trigger label
this.close();
// Need setTimeout for accessibility to ensure that the browser executes
// focus on the next process thread and after any DOM content changes
setTimeout(() => this.label.focus(), 1);
}
close() {
this.container.classList.remove('ql-expanded');
this.label.setAttribute('aria-expanded', 'false');
// @ts-expect-error
this.options.setAttribute('aria-hidden', 'true');
}
selectItem(item) {
let trigger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
const selected = this.container.querySelector('.ql-selected');
if (item === selected) return;
if (selected != null) {
selected.classList.remove('ql-selected');
}
if (item == null) return;
item.classList.add('ql-selected');
// @ts-expect-error Fix me later
this.select.selectedIndex = Array.from(item.parentNode.children).indexOf(item);
if (item.hasAttribute('data-value')) {
// @ts-expect-error Fix me later
this.label.setAttribute('data-value', item.getAttribute('data-value'));
} else {
this.label.removeAttribute('data-value');
}
if (item.hasAttribute('data-label')) {
// @ts-expect-error Fix me later
this.label.setAttribute('data-label', item.getAttribute('data-label'));
} else {
this.label.removeAttribute('data-label');
}
if (trigger) {
this.select.dispatchEvent(new Event('change'));
this.close();
}
}
update() {
let option;
if (this.select.selectedIndex > -1) {
const item =
// @ts-expect-error Fix me later
this.container.querySelector('.ql-picker-options').children[this.select.selectedIndex];
option = this.select.options[this.select.selectedIndex];
// @ts-expect-error
this.selectItem(item);
} else {
this.selectItem(null);
}
const isActive = option != null && option !== this.select.querySelector('option[selected]');
this.label.classList.toggle('ql-active', isActive);
}
}
export default Picker;
//# sourceMappingURL=picker.js.map
@@ -0,0 +1,511 @@
'use strict';
var javascript$1 = require('@lezer/javascript');
var language = require('@codemirror/language');
var state = require('@codemirror/state');
var view = require('@codemirror/view');
var autocomplete = require('@codemirror/autocomplete');
var common = require('@lezer/common');
/**
A collection of JavaScript-related
[snippets](https://codemirror.net/6/docs/ref/#autocomplete.snippet).
*/
const snippets = [
autocomplete.snippetCompletion("function ${name}(${params}) {\n\t${}\n}", {
label: "function",
detail: "definition",
type: "keyword"
}),
autocomplete.snippetCompletion("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}", {
label: "for",
detail: "loop",
type: "keyword"
}),
autocomplete.snippetCompletion("for (let ${name} of ${collection}) {\n\t${}\n}", {
label: "for",
detail: "of loop",
type: "keyword"
}),
autocomplete.snippetCompletion("do {\n\t${}\n} while (${})", {
label: "do",
detail: "loop",
type: "keyword"
}),
autocomplete.snippetCompletion("while (${}) {\n\t${}\n}", {
label: "while",
detail: "loop",
type: "keyword"
}),
autocomplete.snippetCompletion("try {\n\t${}\n} catch (${error}) {\n\t${}\n}", {
label: "try",
detail: "/ catch block",
type: "keyword"
}),
autocomplete.snippetCompletion("if (${}) {\n\t${}\n}", {
label: "if",
detail: "block",
type: "keyword"
}),
autocomplete.snippetCompletion("if (${}) {\n\t${}\n} else {\n\t${}\n}", {
label: "if",
detail: "/ else block",
type: "keyword"
}),
autocomplete.snippetCompletion("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}", {
label: "class",
detail: "definition",
type: "keyword"
}),
autocomplete.snippetCompletion("import {${names}} from \"${module}\"\n${}", {
label: "import",
detail: "named",
type: "keyword"
}),
autocomplete.snippetCompletion("import ${name} from \"${module}\"\n${}", {
label: "import",
detail: "default",
type: "keyword"
})
];
/**
A collection of snippet completions for TypeScript. Includes the
JavaScript [snippets](https://codemirror.net/6/docs/ref/#lang-javascript.snippets).
*/
const typescriptSnippets = snippets.concat([
autocomplete.snippetCompletion("interface ${name} {\n\t${}\n}", {
label: "interface",
detail: "definition",
type: "keyword"
}),
autocomplete.snippetCompletion("type ${name} = ${type}", {
label: "type",
detail: "definition",
type: "keyword"
}),
autocomplete.snippetCompletion("enum ${name} {\n\t${}\n}", {
label: "enum",
detail: "definition",
type: "keyword"
})
]);
const cache = new common.NodeWeakMap();
const ScopeNodes = new Set([
"Script", "Block",
"FunctionExpression", "FunctionDeclaration", "ArrowFunction", "MethodDeclaration",
"ForStatement"
]);
function defID(type) {
return (node, def) => {
let id = node.node.getChild("VariableDefinition");
if (id)
def(id, type);
return true;
};
}
const functionContext = ["FunctionDeclaration"];
const gatherCompletions = {
FunctionDeclaration: defID("function"),
ClassDeclaration: defID("class"),
ClassExpression: () => true,
EnumDeclaration: defID("constant"),
TypeAliasDeclaration: defID("type"),
NamespaceDeclaration: defID("namespace"),
VariableDefinition(node, def) { if (!node.matchContext(functionContext))
def(node, "variable"); },
TypeDefinition(node, def) { def(node, "type"); },
__proto__: null
};
function getScope(doc, node) {
let cached = cache.get(node);
if (cached)
return cached;
let completions = [], top = true;
function def(node, type) {
let name = doc.sliceString(node.from, node.to);
completions.push({ label: name, type });
}
node.cursor(common.IterMode.IncludeAnonymous).iterate(node => {
if (top) {
top = false;
}
else if (node.name) {
let gather = gatherCompletions[node.name];
if (gather && gather(node, def) || ScopeNodes.has(node.name))
return false;
}
else if (node.to - node.from > 8192) {
// Allow caching for bigger internal nodes
for (let c of getScope(doc, node.node))
completions.push(c);
return false;
}
});
cache.set(node, completions);
return completions;
}
const Identifier = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/;
const dontComplete = [
"TemplateString", "String", "RegExp",
"LineComment", "BlockComment",
"VariableDefinition", "TypeDefinition", "Label",
"PropertyDefinition", "PropertyName",
"PrivatePropertyDefinition", "PrivatePropertyName",
"JSXText", "JSXAttributeValue", "JSXOpenTag", "JSXCloseTag", "JSXSelfClosingTag",
".", "?."
];
/**
Completion source that looks up locally defined names in
JavaScript code.
*/
function localCompletionSource(context) {
let inner = language.syntaxTree(context.state).resolveInner(context.pos, -1);
if (dontComplete.indexOf(inner.name) > -1)
return null;
let isWord = inner.name == "VariableName" ||
inner.to - inner.from < 20 && Identifier.test(context.state.sliceDoc(inner.from, inner.to));
if (!isWord && !context.explicit)
return null;
let options = [];
for (let pos = inner; pos; pos = pos.parent) {
if (ScopeNodes.has(pos.name))
options = options.concat(getScope(context.state.doc, pos));
}
return {
options,
from: isWord ? inner.from : context.pos,
validFor: Identifier
};
}
function pathFor(read, member, name) {
var _a;
let path = [];
for (;;) {
let obj = member.firstChild, prop;
if ((obj === null || obj === void 0 ? void 0 : obj.name) == "VariableName") {
path.push(read(obj));
return { path: path.reverse(), name };
}
else if ((obj === null || obj === void 0 ? void 0 : obj.name) == "MemberExpression" && ((_a = (prop = obj.lastChild)) === null || _a === void 0 ? void 0 : _a.name) == "PropertyName") {
path.push(read(prop));
member = obj;
}
else {
return null;
}
}
}
/**
Helper function for defining JavaScript completion sources. It
returns the completable name and object path for a completion
context, or null if no name/property completion should happen at
that position. For example, when completing after `a.b.c` it will
return `{path: ["a", "b"], name: "c"}`. When completing after `x`
it will return `{path: [], name: "x"}`. When not in a property or
name, it will return null if `context.explicit` is false, and
`{path: [], name: ""}` otherwise.
*/
function completionPath(context) {
let read = (node) => context.state.doc.sliceString(node.from, node.to);
let inner = language.syntaxTree(context.state).resolveInner(context.pos, -1);
if (inner.name == "PropertyName") {
return pathFor(read, inner.parent, read(inner));
}
else if ((inner.name == "." || inner.name == "?.") && inner.parent.name == "MemberExpression") {
return pathFor(read, inner.parent, "");
}
else if (dontComplete.indexOf(inner.name) > -1) {
return null;
}
else if (inner.name == "VariableName" || inner.to - inner.from < 20 && Identifier.test(read(inner))) {
return { path: [], name: read(inner) };
}
else if (inner.name == "MemberExpression") {
return pathFor(read, inner, "");
}
else {
return context.explicit ? { path: [], name: "" } : null;
}
}
function enumeratePropertyCompletions(obj, top) {
let options = [], seen = new Set;
for (let depth = 0;; depth++) {
for (let name of (Object.getOwnPropertyNames || Object.keys)(obj)) {
if (!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(name) || seen.has(name))
continue;
seen.add(name);
let value;
try {
value = obj[name];
}
catch (_) {
continue;
}
options.push({
label: name,
type: typeof value == "function" ? (/^[A-Z]/.test(name) ? "class" : top ? "function" : "method")
: top ? "variable" : "property",
boost: -depth
});
}
let next = Object.getPrototypeOf(obj);
if (!next)
return options;
obj = next;
}
}
/**
Defines a [completion source](https://codemirror.net/6/docs/ref/#autocomplete.CompletionSource) that
completes from the given scope object (for example `globalThis`).
Will enter properties of the object when completing properties on
a directly-named path.
*/
function scopeCompletionSource(scope) {
let cache = new Map;
return (context) => {
let path = completionPath(context);
if (!path)
return null;
let target = scope;
for (let step of path.path) {
target = target[step];
if (!target)
return null;
}
let options = cache.get(target);
if (!options)
cache.set(target, options = enumeratePropertyCompletions(target, !path.path.length));
return {
from: context.pos - path.name.length,
options,
validFor: Identifier
};
};
}
/**
A language provider based on the [Lezer JavaScript
parser](https://github.com/lezer-parser/javascript), extended with
highlighting and indentation information.
*/
const javascriptLanguage = language.LRLanguage.define({
name: "javascript",
parser: javascript$1.parser.configure({
props: [
language.indentNodeProp.add({
IfStatement: language.continuedIndent({ except: /^\s*({|else\b)/ }),
TryStatement: language.continuedIndent({ except: /^\s*({|catch\b|finally\b)/ }),
LabeledStatement: language.flatIndent,
SwitchBody: context => {
let after = context.textAfter, closed = /^\s*\}/.test(after), isCase = /^\s*(case|default)\b/.test(after);
return context.baseIndent + (closed ? 0 : isCase ? 1 : 2) * context.unit;
},
Block: language.delimitedIndent({ closing: "}" }),
ArrowFunction: cx => cx.baseIndent + cx.unit,
"TemplateString BlockComment": () => null,
"Statement Property": language.continuedIndent({ except: /^\s*{/ }),
JSXElement(context) {
let closed = /^\s*<\//.test(context.textAfter);
return context.lineIndent(context.node.from) + (closed ? 0 : context.unit);
},
JSXEscape(context) {
let closed = /\s*\}/.test(context.textAfter);
return context.lineIndent(context.node.from) + (closed ? 0 : context.unit);
},
"JSXOpenTag JSXSelfClosingTag"(context) {
return context.column(context.node.from) + context.unit;
}
}),
language.foldNodeProp.add({
"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": language.foldInside,
BlockComment(tree) { return { from: tree.from + 2, to: tree.to - 2 }; }
})
]
}),
languageData: {
closeBrackets: { brackets: ["(", "[", "{", "'", '"', "`"] },
commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
indentOnInput: /^\s*(?:case |default:|\{|\}|<\/)$/,
wordChars: "$"
}
});
const jsxSublanguage = {
test: node => /^JSX/.test(node.name),
facet: language.defineLanguageFacet({ commentTokens: { block: { open: "{/*", close: "*/}" } } })
};
/**
A language provider for TypeScript.
*/
const typescriptLanguage = javascriptLanguage.configure({ dialect: "ts" }, "typescript");
/**
Language provider for JSX.
*/
const jsxLanguage = javascriptLanguage.configure({
dialect: "jsx",
props: [language.sublanguageProp.add(n => n.isTop ? [jsxSublanguage] : undefined)]
});
/**
Language provider for JSX + TypeScript.
*/
const tsxLanguage = javascriptLanguage.configure({
dialect: "jsx ts",
props: [language.sublanguageProp.add(n => n.isTop ? [jsxSublanguage] : undefined)]
}, "typescript");
let kwCompletion = (name) => ({ label: name, type: "keyword" });
const keywords = "break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(kwCompletion);
const typescriptKeywords = keywords.concat(["declare", "implements", "private", "protected", "public"].map(kwCompletion));
/**
JavaScript support. Includes [snippet](https://codemirror.net/6/docs/ref/#lang-javascript.snippets)
and local variable completion.
*/
function javascript(config = {}) {
let lang = config.jsx ? (config.typescript ? tsxLanguage : jsxLanguage)
: config.typescript ? typescriptLanguage : javascriptLanguage;
let completions = config.typescript ? typescriptSnippets.concat(typescriptKeywords) : snippets.concat(keywords);
return new language.LanguageSupport(lang, [
javascriptLanguage.data.of({
autocomplete: autocomplete.ifNotIn(dontComplete, autocomplete.completeFromList(completions))
}),
javascriptLanguage.data.of({
autocomplete: localCompletionSource
}),
config.jsx ? autoCloseTags : [],
]);
}
function findOpenTag(node) {
for (;;) {
if (node.name == "JSXOpenTag" || node.name == "JSXSelfClosingTag" || node.name == "JSXFragmentTag")
return node;
if (node.name == "JSXEscape" || !node.parent)
return null;
node = node.parent;
}
}
function elementName(doc, tree, max = doc.length) {
for (let ch = tree === null || tree === void 0 ? void 0 : tree.firstChild; ch; ch = ch.nextSibling) {
if (ch.name == "JSXIdentifier" || ch.name == "JSXBuiltin" || ch.name == "JSXNamespacedName" ||
ch.name == "JSXMemberExpression")
return doc.sliceString(ch.from, Math.min(ch.to, max));
}
return "";
}
const android = typeof navigator == "object" && /Android\b/.test(navigator.userAgent);
/**
Extension that will automatically insert JSX close tags when a `>` or
`/` is typed.
*/
const autoCloseTags = view.EditorView.inputHandler.of((view, from, to, text, defaultInsert) => {
if ((android ? view.composing : view.compositionStarted) || view.state.readOnly ||
from != to || (text != ">" && text != "/") ||
!javascriptLanguage.isActiveAt(view.state, from, -1))
return false;
let base = defaultInsert(), { state: state$1 } = base;
let closeTags = state$1.changeByRange(range => {
var _a;
let { head } = range, around = language.syntaxTree(state$1).resolveInner(head - 1, -1), name;
if (around.name == "JSXStartTag")
around = around.parent;
if (state$1.doc.sliceString(head - 1, head) != text || around.name == "JSXAttributeValue" && around.to > head) ;
else if (text == ">" && around.name == "JSXFragmentTag") {
return { range, changes: { from: head, insert: `</>` } };
}
else if (text == "/" && around.name == "JSXStartCloseTag") {
let empty = around.parent, base = empty.parent;
if (base && empty.from == head - 2 &&
((name = elementName(state$1.doc, base.firstChild, head)) || ((_a = base.firstChild) === null || _a === void 0 ? void 0 : _a.name) == "JSXFragmentTag")) {
let insert = `${name}>`;
return { range: state.EditorSelection.cursor(head + insert.length, -1), changes: { from: head, insert } };
}
}
else if (text == ">") {
let openTag = findOpenTag(around);
if (openTag && openTag.name == "JSXOpenTag" &&
!/^\/?>|^<\//.test(state$1.doc.sliceString(head, head + 2)) &&
(name = elementName(state$1.doc, openTag, head)))
return { range, changes: { from: head, insert: `</${name}>` } };
}
return { range };
});
if (closeTags.changes.empty)
return false;
view.dispatch([
base,
state$1.update(closeTags, { userEvent: "input.complete", scrollIntoView: true })
]);
return true;
});
/**
Connects an [ESLint](https://eslint.org/) linter to CodeMirror's
[lint](https://codemirror.net/6/docs/ref/#lint) integration. `eslint` should be an instance of the
[`Linter`](https://eslint.org/docs/developer-guide/nodejs-api#linter)
class, and `config` an optional ESLint configuration. The return
value of this function can be passed to [`linter`](https://codemirror.net/6/docs/ref/#lint.linter)
to create a JavaScript linting extension.
Note that ESLint targets node, and is tricky to run in the
browser. The
[eslint-linter-browserify](https://github.com/UziTech/eslint-linter-browserify)
package may help with that (see
[example](https://github.com/UziTech/eslint-linter-browserify/blob/master/example/script.js)).
*/
function esLint(eslint, config) {
if (!config) {
config = {
parserOptions: { ecmaVersion: 2019, sourceType: "module" },
env: { browser: true, node: true, es6: true, es2015: true, es2017: true, es2020: true },
rules: {}
};
eslint.getRules().forEach((desc, name) => {
var _a;
if ((_a = desc.meta.docs) === null || _a === void 0 ? void 0 : _a.recommended)
config.rules[name] = 2;
});
}
return (view) => {
let { state } = view, found = [];
for (let { from, to } of javascriptLanguage.findRegions(state)) {
let fromLine = state.doc.lineAt(from), offset = { line: fromLine.number - 1, col: from - fromLine.from, pos: from };
for (let d of eslint.verify(state.sliceDoc(from, to), config))
found.push(translateDiagnostic(d, state.doc, offset));
}
return found;
};
}
function mapPos(line, col, doc, offset) {
return doc.line(line + offset.line).from + col + (line == 1 ? offset.col - 1 : -1);
}
function translateDiagnostic(input, doc, offset) {
let start = mapPos(input.line, input.column, doc, offset);
let result = {
from: start,
to: input.endLine != null && input.endColumn != 1 ? mapPos(input.endLine, input.endColumn, doc, offset) : start,
message: input.message,
source: input.ruleId ? "eslint:" + input.ruleId : "eslint",
severity: input.severity == 1 ? "warning" : "error",
};
if (input.fix) {
let { range, text } = input.fix, from = range[0] + offset.pos - start, to = range[1] + offset.pos - start;
result.actions = [{
name: "fix",
apply(view, start) {
view.dispatch({ changes: { from: start + from, to: start + to, insert: text }, scrollIntoView: true });
}
}];
}
return result;
}
exports.autoCloseTags = autoCloseTags;
exports.completionPath = completionPath;
exports.esLint = esLint;
exports.javascript = javascript;
exports.javascriptLanguage = javascriptLanguage;
exports.jsxLanguage = jsxLanguage;
exports.localCompletionSource = localCompletionSource;
exports.scopeCompletionSource = scopeCompletionSource;
exports.snippets = snippets;
exports.tsxLanguage = tsxLanguage;
exports.typescriptLanguage = typescriptLanguage;
exports.typescriptSnippets = typescriptSnippets;
@@ -0,0 +1,72 @@
<a href="https://react-hot-toast.com/"><img alt="react-hot-toast - Try it out" src="https://github.com/timolins/react-hot-toast/raw/main/assets/header.svg"/></a>
<div align="center">
<img src="https://badgen.net/npm/v/react-hot-toast" alt="NPM Version" />
<img src="https://badgen.net/bundlephobia/minzip/react-hot-toast" alt="minzipped size"/>
<img src="https://github.com/timolins/react-hot-toast/workflows/CI/badge.svg" alt="Build Status" />
</a>
</div>
<br />
<div align="center"><strong>Smoking hot Notifications for React.</strong></div>
<div align="center"> Lightweight, customizable and beautiful by default.</div>
<br />
<div align="center">
<a href="https://react-hot-toast.com/">Website</a>
<span> · </span>
<a href="https://react-hot-toast.com/docs">Documentation</a>
<span> · </span>
<a href="https://twitter.com/timolins">Twitter</a>
</div>
<br />
<div align="center">
<sub>Cooked by <a href="https://twitter.com/timolins">Timo Lins</a> 👨‍🍳</sub>
</div>
<br />
## Features
- 🔥 **Hot by default**
- 🔩 **Easily Customizable**
- ⏳ **Promise API** - _Automatic loader from a promise_
- 🕊 **Lightweight** - _less than 5kb including styles_
- ✅ **Accessible**
- 🤯 **Headless Hooks** - _Create your own with [`useToaster()`](https://react-hot-toast.com/docs/use-toaster)_
## Installation
#### With pnpm
```sh
pnpm add react-hot-toast
```
#### With NPM
```sh
npm install react-hot-toast
```
## Getting Started
Add the Toaster to your app first. It will take care of rendering all notifications emitted. Now you can trigger `toast()` from anywhere!
```jsx
import toast, { Toaster } from 'react-hot-toast';
const notify = () => toast('Here is your toast.');
const App = () => {
return (
<div>
<button onClick={notify}>Make me a toast</button>
<Toaster />
</div>
);
};
```
## Documentation
Find the full API reference on [official documentation](https://react-hot-toast.com/docs).
@@ -0,0 +1,33 @@
export default (function (o, c, dayjs) {
var proto = c.prototype;
var parseDate = function parseDate(cfg) {
var date = cfg.date,
utc = cfg.utc;
if (Array.isArray(date)) {
if (utc) {
if (!date.length) {
return new Date();
}
return new Date(Date.UTC.apply(null, date));
}
if (date.length === 1) {
return dayjs(String(date[0])).toDate();
}
return new (Function.prototype.bind.apply(Date, [null].concat(date)))();
}
return date;
};
var oldParse = proto.parse;
proto.parse = function (cfg) {
cfg.date = parseDate.bind(this)(cfg);
oldParse.bind(this)(cfg);
};
});
@@ -0,0 +1,226 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.$ZodRealError = exports.$ZodError = void 0;
exports.flattenError = flattenError;
exports.formatError = formatError;
exports.treeifyError = treeifyError;
exports.toDotPath = toDotPath;
exports.prettifyError = prettifyError;
const core_js_1 = require("./core.cjs");
const util = __importStar(require("./util.cjs"));
const initializer = (inst, def) => {
inst.name = "$ZodError";
Object.defineProperty(inst, "_zod", {
value: inst._zod,
enumerable: false,
});
Object.defineProperty(inst, "issues", {
value: def,
enumerable: false,
});
Object.defineProperty(inst, "message", {
get() {
return JSON.stringify(def, util.jsonStringifyReplacer, 2);
},
enumerable: true,
// configurable: false,
});
Object.defineProperty(inst, "toString", {
value: () => inst.message,
enumerable: false,
});
};
exports.$ZodError = (0, core_js_1.$constructor)("$ZodError", initializer);
exports.$ZodRealError = (0, core_js_1.$constructor)("$ZodError", initializer, { Parent: Error });
function flattenError(error, mapper = (issue) => issue.message) {
const fieldErrors = {};
const formErrors = [];
for (const sub of error.issues) {
if (sub.path.length > 0) {
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
fieldErrors[sub.path[0]].push(mapper(sub));
}
else {
formErrors.push(mapper(sub));
}
}
return { formErrors, fieldErrors };
}
function formatError(error, _mapper) {
const mapper = _mapper ||
function (issue) {
return issue.message;
};
const fieldErrors = { _errors: [] };
const processError = (error) => {
for (const issue of error.issues) {
if (issue.code === "invalid_union" && issue.errors.length) {
issue.errors.map((issues) => processError({ issues }));
}
else if (issue.code === "invalid_key") {
processError({ issues: issue.issues });
}
else if (issue.code === "invalid_element") {
processError({ issues: issue.issues });
}
else if (issue.path.length === 0) {
fieldErrors._errors.push(mapper(issue));
}
else {
let curr = fieldErrors;
let i = 0;
while (i < issue.path.length) {
const el = issue.path[i];
const terminal = i === issue.path.length - 1;
if (!terminal) {
curr[el] = curr[el] || { _errors: [] };
}
else {
curr[el] = curr[el] || { _errors: [] };
curr[el]._errors.push(mapper(issue));
}
curr = curr[el];
i++;
}
}
}
};
processError(error);
return fieldErrors;
}
function treeifyError(error, _mapper) {
const mapper = _mapper ||
function (issue) {
return issue.message;
};
const result = { errors: [] };
const processError = (error, path = []) => {
var _a, _b;
for (const issue of error.issues) {
if (issue.code === "invalid_union" && issue.errors.length) {
// regular union error
issue.errors.map((issues) => processError({ issues }, issue.path));
}
else if (issue.code === "invalid_key") {
processError({ issues: issue.issues }, issue.path);
}
else if (issue.code === "invalid_element") {
processError({ issues: issue.issues }, issue.path);
}
else {
const fullpath = [...path, ...issue.path];
if (fullpath.length === 0) {
result.errors.push(mapper(issue));
continue;
}
let curr = result;
let i = 0;
while (i < fullpath.length) {
const el = fullpath[i];
const terminal = i === fullpath.length - 1;
if (typeof el === "string") {
curr.properties ?? (curr.properties = {});
(_a = curr.properties)[el] ?? (_a[el] = { errors: [] });
curr = curr.properties[el];
}
else {
curr.items ?? (curr.items = []);
(_b = curr.items)[el] ?? (_b[el] = { errors: [] });
curr = curr.items[el];
}
if (terminal) {
curr.errors.push(mapper(issue));
}
i++;
}
}
}
};
processError(error);
return result;
}
/** Format a ZodError as a human-readable string in the following form.
*
* From
*
* ```ts
* ZodError {
* issues: [
* {
* expected: 'string',
* code: 'invalid_type',
* path: [ 'username' ],
* message: 'Invalid input: expected string'
* },
* {
* expected: 'number',
* code: 'invalid_type',
* path: [ 'favoriteNumbers', 1 ],
* message: 'Invalid input: expected number'
* }
* ];
* }
* ```
*
* to
*
* ```
* username
* ✖ Expected number, received string at "username
* favoriteNumbers[0]
* ✖ Invalid input: expected number
* ```
*/
function toDotPath(path) {
const segs = [];
for (const seg of path) {
if (typeof seg === "number")
segs.push(`[${seg}]`);
else if (typeof seg === "symbol")
segs.push(`[${JSON.stringify(String(seg))}]`);
else if (/[^\w$]/.test(seg))
segs.push(`[${JSON.stringify(seg)}]`);
else {
if (segs.length)
segs.push(".");
segs.push(seg);
}
}
return segs.join("");
}
function prettifyError(error) {
const lines = [];
// sort by path length
const issues = [...error.issues].sort((a, b) => a.path.length - b.path.length);
// Process each issue
for (const issue of issues) {
lines.push(`✖ ${issue.message}`);
if (issue.path?.length)
lines.push(` → at ${toDotPath(issue.path)}`);
}
// Convert Map to formatted string
return lines.join("\n");
}
@@ -0,0 +1,31 @@
import { motionValue } from 'motion-dom';
import { isKeyframesTarget } from '../../animation/utils/is-keyframes-target.mjs';
import { resolveVariant } from './resolve-dynamic-variants.mjs';
/**
* Set VisualElement's MotionValue, creating a new MotionValue for it if
* it doesn't exist.
*/
function setMotionValue(visualElement, key, value) {
if (visualElement.hasValue(key)) {
visualElement.getValue(key).set(value);
}
else {
visualElement.addValue(key, motionValue(value));
}
}
function resolveFinalValueInKeyframes(v) {
// TODO maybe throw if v.length - 1 is placeholder token?
return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v;
}
function setTarget(visualElement, definition) {
const resolved = resolveVariant(visualElement, definition);
let { transitionEnd = {}, transition = {}, ...target } = resolved || {};
target = { ...target, ...transitionEnd };
for (const key in target) {
const value = resolveFinalValueInKeyframes(target[key]);
setMotionValue(visualElement, key, value);
}
}
export { setTarget };
@@ -0,0 +1,14 @@
# @lezer/common
[ [**WEBSITE**](http://lezer.codemirror.net) | [**ISSUES**](https://github.com/lezer-parser/lezer/issues) | [**FORUM**](https://discuss.codemirror.net/c/lezer) | [**CHANGELOG**](https://github.com/lezer-parser/common/blob/master/CHANGELOG.md) ]
[Lezer](https://lezer.codemirror.net/) is an incremental parser system
intended for use in an editor or similar system.
@lezer/common provides the syntax tree data structure and parser
abstractions for Lezer parsers.
Its programming interface is documented on [the
website](https://lezer.codemirror.net/docs/ref/#common).
This code is licensed under an MIT license.
@@ -0,0 +1,45 @@
#define _WIN32_WINNT 0x0501
#include <stdio.h>
#include <windows.h>
#include "../src/shared/DebugClient.cc"
const int SC_CONSOLE_MARK = 0xFFF2;
const int SC_CONSOLE_SELECT_ALL = 0xFFF5;
CALLBACK DWORD pausingThread(LPVOID dummy)
{
HWND hwnd = GetConsoleWindow();
while (true) {
SendMessage(hwnd, WM_SYSCOMMAND, SC_CONSOLE_SELECT_ALL, 0);
Sleep(1000);
SendMessage(hwnd, WM_CHAR, 27, 0x00010001);
Sleep(1000);
}
}
int main()
{
HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO info;
GetConsoleScreenBufferInfo(out, &info);
COORD initial = info.dwCursorPosition;
CreateThread(NULL, 0,
pausingThread, NULL,
0, NULL);
for (int i = 0; i < 30; ++i) {
Sleep(100);
GetConsoleScreenBufferInfo(out, &info);
if (memcmp(&info.dwCursorPosition, &initial, sizeof(COORD)) != 0) {
trace("cursor moved to [%d,%d]",
info.dwCursorPosition.X,
info.dwCursorPosition.Y);
} else {
trace("cursor in expected position");
}
}
return 0;
}
@@ -0,0 +1,14 @@
var baseSetToString = require('./_baseSetToString'),
shortOut = require('./_shortOut');
/**
* Sets the `toString` method of `func` to return `string`.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var setToString = shortOut(baseSetToString);
module.exports = setToString;
@@ -0,0 +1,48 @@
var $47fa5ec5ff482271$exports = require("./context.main.js");
var $8WbGG$internationalizedmessage = require("@internationalized/message");
var $8WbGG$react = require("react");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useMessageFormatter", () => $c376aa482226bf60$export$ec23bf898b1eed85);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $c376aa482226bf60$var$cache = new WeakMap();
function $c376aa482226bf60$var$getCachedDictionary(strings) {
let dictionary = $c376aa482226bf60$var$cache.get(strings);
if (!dictionary) {
dictionary = new (0, $8WbGG$internationalizedmessage.MessageDictionary)(strings);
$c376aa482226bf60$var$cache.set(strings, dictionary);
}
return dictionary;
}
function $c376aa482226bf60$export$ec23bf898b1eed85(strings) {
let { locale: locale } = (0, $47fa5ec5ff482271$exports.useLocale)();
let dictionary = (0, $8WbGG$react.useMemo)(()=>$c376aa482226bf60$var$getCachedDictionary(strings), [
strings
]);
let formatter = (0, $8WbGG$react.useMemo)(()=>new (0, $8WbGG$internationalizedmessage.MessageFormatter)(locale, dictionary), [
locale,
dictionary
]);
return (0, $8WbGG$react.useCallback)((key, variables)=>formatter.format(key, variables), [
formatter
]);
}
//# sourceMappingURL=useMessageFormatter.main.js.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=ResolvedValueInjectOptions.js.map
@@ -0,0 +1,35 @@
import { COSEALG } from './cose.js';
/**
* Map X.509 signature algorithm OIDs to COSE algorithm IDs
*
* - EC2 OIDs: https://oidref.com/1.2.840.10045.4.3
* - RSA OIDs: https://oidref.com/1.2.840.113549.1.1
*/
export function mapX509SignatureAlgToCOSEAlg(signatureAlgorithm) {
let alg;
if (signatureAlgorithm === '1.2.840.10045.4.3.2') {
alg = COSEALG.ES256;
}
else if (signatureAlgorithm === '1.2.840.10045.4.3.3') {
alg = COSEALG.ES384;
}
else if (signatureAlgorithm === '1.2.840.10045.4.3.4') {
alg = COSEALG.ES512;
}
else if (signatureAlgorithm === '1.2.840.113549.1.1.11') {
alg = COSEALG.RS256;
}
else if (signatureAlgorithm === '1.2.840.113549.1.1.12') {
alg = COSEALG.RS384;
}
else if (signatureAlgorithm === '1.2.840.113549.1.1.13') {
alg = COSEALG.RS512;
}
else if (signatureAlgorithm === '1.2.840.113549.1.1.5') {
alg = COSEALG.RS1;
}
else {
throw new Error(`Unable to map X.509 signature algorithm ${signatureAlgorithm} to a COSE algorithm`);
}
return alg;
}
@@ -0,0 +1,39 @@
'use strict';
var add = require('./add');
var bitwiseAND = require('./bitwiseAND');
var bitwiseNOT = require('./bitwiseNOT');
var bitwiseOR = require('./bitwiseOR');
var bitwiseXOR = require('./bitwiseXOR');
var divide = require('./divide');
var equal = require('./equal');
var exponentiate = require('./exponentiate');
var leftShift = require('./leftShift');
var lessThan = require('./lessThan');
var multiply = require('./multiply');
var remainder = require('./remainder');
var signedRightShift = require('./signedRightShift');
var subtract = require('./subtract');
var toString = require('./toString');
var unaryMinus = require('./unaryMinus');
var unsignedRightShift = require('./unsignedRightShift');
module.exports = {
add: add,
bitwiseAND: bitwiseAND,
bitwiseNOT: bitwiseNOT,
bitwiseOR: bitwiseOR,
bitwiseXOR: bitwiseXOR,
divide: divide,
equal: equal,
exponentiate: exponentiate,
leftShift: leftShift,
lessThan: lessThan,
multiply: multiply,
remainder: remainder,
signedRightShift: signedRightShift,
subtract: subtract,
toString: toString,
unaryMinus: unaryMinus,
unsignedRightShift: unsignedRightShift
};
@@ -0,0 +1,41 @@
import { ColorfulAppender } from "blf-colorful-appender";
import format from "date-manip/dist/format.mjs";
import createDebug from "debug";
class DebugAppender extends ColorfulAppender {
constructor() {
super(...arguments);
this.name = "debug";
this.dateFormat = "HH:mm:ss";
}
setup({ name }) {
const debug = createDebug(name);
debug.enabled = true;
debug.namespace = name;
this.debug = debug;
}
/**
* Write log (写入日志)
* @param event Log event (日志事件)
*/
write(event) {
const { layout, debug } = this;
debug.namespace = event.loggerName;
if (layout) {
debug(this.color(layout.format(event), event));
} else {
debug(
this.color(`[${format(event.timestamp, this.dateFormat)}] [${event.levelName}] -`, event),
...event.message
);
}
}
/**
* Close appender (关闭输出)
*/
close() {
return Promise.resolve();
}
}
export {
DebugAppender
};
@@ -0,0 +1,67 @@
'use strict';
var $abs = require('math-intrinsics/abs');
var $floor = require('math-intrinsics/floor');
var $pow = require('math-intrinsics/pow');
var isFinite = require('math-intrinsics/isFinite');
var isNaN = require('math-intrinsics/isNaN');
var isNegativeZero = require('math-intrinsics/isNegativeZero');
var maxFiniteFloat32 = 3.4028234663852886e+38; // roughly 2 ** 128 - 1
module.exports = function valueToFloat32Bytes(value, isLittleEndian) {
if (isNaN(value)) {
return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; // hardcoded
}
var leastSig;
if (value === 0) {
leastSig = isNegativeZero(value) ? 0x80 : 0;
return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0];
}
if ($abs(value) > maxFiniteFloat32 || !isFinite(value)) {
leastSig = value < 0 ? 255 : 127;
return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0];
}
var sign = value < 0 ? 1 : 0;
value = $abs(value); // eslint-disable-line no-param-reassign
var exponent = 0;
while (value >= 2) {
exponent += 1;
value /= 2; // eslint-disable-line no-param-reassign
}
while (value < 1) {
exponent -= 1;
value *= 2; // eslint-disable-line no-param-reassign
}
var mantissa = value - 1;
mantissa *= $pow(2, 23) + 0.5;
mantissa = $floor(mantissa);
exponent += 127;
exponent <<= 23;
var result = (sign << 31)
| exponent
| mantissa;
var byte0 = result & 255;
result >>= 8;
var byte1 = result & 255;
result >>= 8;
var byte2 = result & 255;
result >>= 8;
var byte3 = result & 255;
if (isLittleEndian) {
return [byte0, byte1, byte2, byte3];
}
return [byte3, byte2, byte1, byte0];
};
@@ -0,0 +1,191 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TokenMap = void 0;
var _t = require("@babel/types");
const {
traverseFast,
VISITOR_KEYS
} = _t;
class TokenMap {
constructor(ast, tokens, source) {
this._tokens = void 0;
this._source = void 0;
this._nodesToTokenIndexes = new Map();
this._nodesOccurrencesCountCache = new Map();
this._tokensCache = new Map();
this._tokens = tokens;
this._source = source;
traverseFast(ast, node => {
const indexes = this._getTokensIndexesOfNode(node);
if (indexes.length > 0) this._nodesToTokenIndexes.set(node, indexes);
});
this._tokensCache.clear();
}
has(node) {
return this._nodesToTokenIndexes.has(node);
}
getIndexes(node) {
return this._nodesToTokenIndexes.get(node);
}
find(node, condition) {
const indexes = this._nodesToTokenIndexes.get(node);
if (indexes) {
for (let k = 0; k < indexes.length; k++) {
const index = indexes[k];
const tok = this._tokens[index];
if (condition(tok, index)) return tok;
}
}
return null;
}
findLastIndex(node, condition) {
const indexes = this._nodesToTokenIndexes.get(node);
if (indexes) {
for (let k = indexes.length - 1; k >= 0; k--) {
const index = indexes[k];
const tok = this._tokens[index];
if (condition(tok, index)) return index;
}
}
return -1;
}
findMatching(node, test, occurrenceCount = 0) {
const indexes = this._nodesToTokenIndexes.get(node);
if (indexes) {
let i = 0;
const count = occurrenceCount;
if (count > 1) {
const cache = this._nodesOccurrencesCountCache.get(node);
if (cache && cache.test === test && cache.count < count) {
i = cache.i + 1;
occurrenceCount -= cache.count + 1;
}
}
for (; i < indexes.length; i++) {
const tok = this._tokens[indexes[i]];
if (this.matchesOriginal(tok, test)) {
if (occurrenceCount === 0) {
if (count > 0) {
this._nodesOccurrencesCountCache.set(node, {
test,
count,
i
});
}
return tok;
}
occurrenceCount--;
}
}
}
return null;
}
matchesOriginal(token, test) {
if (token.end - token.start !== test.length) return false;
if (token.value != null) return token.value === test;
return this._source.startsWith(test, token.start);
}
startMatches(node, test) {
const indexes = this._nodesToTokenIndexes.get(node);
if (!indexes) return false;
const tok = this._tokens[indexes[0]];
if (tok.start !== node.start) return false;
return this.matchesOriginal(tok, test);
}
endMatches(node, test) {
const indexes = this._nodesToTokenIndexes.get(node);
if (!indexes) return false;
const tok = this._tokens[indexes[indexes.length - 1]];
if (tok.end !== node.end) return false;
return this.matchesOriginal(tok, test);
}
_getTokensIndexesOfNode(node) {
if (node.start == null || node.end == null) return [];
const {
first,
last
} = this._findTokensOfNode(node, 0, this._tokens.length - 1);
let low = first;
const children = childrenIterator(node);
if ((node.type === "ExportNamedDeclaration" || node.type === "ExportDefaultDeclaration") && node.declaration && node.declaration.type === "ClassDeclaration") {
children.next();
}
const indexes = [];
for (const child of children) {
if (child == null) continue;
if (child.start == null || child.end == null) continue;
const childTok = this._findTokensOfNode(child, low, last);
const high = childTok.first;
for (let k = low; k < high; k++) indexes.push(k);
low = childTok.last + 1;
}
for (let k = low; k <= last; k++) indexes.push(k);
return indexes;
}
_findTokensOfNode(node, low, high) {
const cached = this._tokensCache.get(node);
if (cached) return cached;
const first = this._findFirstTokenOfNode(node.start, low, high);
const last = this._findLastTokenOfNode(node.end, first, high);
this._tokensCache.set(node, {
first,
last
});
return {
first,
last
};
}
_findFirstTokenOfNode(start, low, high) {
while (low <= high) {
const mid = high + low >> 1;
if (start < this._tokens[mid].start) {
high = mid - 1;
} else if (start > this._tokens[mid].start) {
low = mid + 1;
} else {
return mid;
}
}
return low;
}
_findLastTokenOfNode(end, low, high) {
while (low <= high) {
const mid = high + low >> 1;
if (end < this._tokens[mid].end) {
high = mid - 1;
} else if (end > this._tokens[mid].end) {
low = mid + 1;
} else {
return mid;
}
}
return high;
}
}
exports.TokenMap = TokenMap;
function* childrenIterator(node) {
if (node.type === "TemplateLiteral") {
yield node.quasis[0];
for (let i = 1; i < node.quasis.length; i++) {
yield node.expressions[i - 1];
yield node.quasis[i];
}
return;
}
const keys = VISITOR_KEYS[node.type];
for (const key of keys) {
const child = node[key];
if (!child) continue;
if (Array.isArray(child)) {
yield* child;
} else {
yield child;
}
}
}
//# sourceMappingURL=token-map.js.map
@@ -0,0 +1 @@
{"name":"streamifier","version":"0.1.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532099833,"integrity":"sha512-Q3ccs7S9ME7Tt9Sa0qAN7tbZLej7t1cSyv9iJevst6v4vLaHcfpVA/+zgasDtEr0NSylHxeYR/7J5i34VkddoQ==","mode":438,"size":386},"README.md":{"checkedAt":1794532099833,"integrity":"sha512-fteTSsVehSjFk7Oq9kWyrWCz7iDlAxgxVD92rHYw4MHTn6n7Gxseky8eQT0wQraAA68WAKGK/uZmc3e5dTLaoQ==","mode":438,"size":716},"LICENSE":{"checkedAt":1794532099833,"integrity":"sha512-UCidWlal40pC3O8hh2rZSXn7hpCqC2q5G/4TEY4x5H3vCqLxzVu08eEQiGIAezISaYHAuL6IG7oDtpUw61hVJQ==","mode":438,"size":1080},"CHANGES":{"checkedAt":1794532099833,"integrity":"sha512-bsFNnjjLGq2VUv0/NQXv5MNotwvU1cSM7i60WOEQBYcQsBj4OMfHYLUIzINmNz1fBWgtNo+DvTPctnezG85Fgw==","mode":438,"size":329},"lib/index.js":{"checkedAt":1794532099834,"integrity":"sha512-P3jAl2hIIdW5XbEtvZdmXtvrzghIs8avIvED6uEUrAxi+UDr56eEAvgRuAsKMXFKMhsFGgRIPxNvMAGlj6V7lA==","mode":438,"size":685}}}
@@ -0,0 +1,46 @@
import { InstanceContext, NapCatCore } from '../napcat-core';
import { OB11ConfigLoader } from './config';
import { OB11NetworkManager } from './network';
import { NapCatPathWrapper } from '../napcat-common/src/path';
import { OneBotFriendApi, OneBotGroupApi, OneBotMsgApi, OneBotQuickActionApi, OneBotUserApi } from './api';
import { ActionMap } from './action';
import { OneBotConfig } from './config/config';
import { OneBotFileApi } from './api/file';
interface ApiListType {
GroupApi: OneBotGroupApi;
UserApi: OneBotUserApi;
FriendApi: OneBotFriendApi;
MsgApi: OneBotMsgApi;
QuickActionApi: OneBotQuickActionApi;
FileApi: OneBotFileApi;
}
export declare class NapCatOneBot11Adapter {
readonly core: NapCatCore;
readonly context: InstanceContext;
configLoader: OB11ConfigLoader;
apis: ApiListType;
networkManager: OB11NetworkManager;
actions: ActionMap;
private readonly bootTime;
recallEventCache: Map<string, NodeJS.Timeout>;
constructor(core: NapCatCore, context: InstanceContext, pathWrapper: NapCatPathWrapper);
creatOneBotLog(ob11Config: OneBotConfig): Promise<string>;
InitOneBot(): Promise<void>;
private reloadNetwork;
private handleConfigChange;
private initMsgListener;
private initBuddyListener;
private initGroupListener;
private emitMsg;
private handleMsg;
private isSelfMessage;
private handleGroupEvent;
private handlePrivateMsgEvent;
private emitRecallMsg;
private emitFriendRecallMsg;
private emitGroupRecallMsg;
}
export * from './types/index';
export * from './api/index';
export * from './event/index';
export * from './config/index';
@@ -0,0 +1,73 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/common/assertion.ts
var assertion_exports = {};
__export(assertion_exports, {
__DEV__: () => __DEV__,
__TEST__: () => __TEST__,
dataAttr: () => dataAttr,
isArray: () => isArray,
isEmpty: () => isEmpty,
isEmptyArray: () => isEmptyArray,
isEmptyObject: () => isEmptyObject,
isFunction: () => isFunction,
isNumeric: () => isNumeric,
isObject: () => isObject
});
module.exports = __toCommonJS(assertion_exports);
var __DEV__ = process.env.NODE_ENV !== "production";
var __TEST__ = process.env.NODE_ENV === "test";
function isArray(value) {
return Array.isArray(value);
}
function isEmptyArray(value) {
return isArray(value) && value.length === 0;
}
function isObject(value) {
const type = typeof value;
return value != null && (type === "object" || type === "function") && !isArray(value);
}
function isEmptyObject(value) {
return isObject(value) && Object.keys(value).length === 0;
}
function isEmpty(value) {
if (isArray(value)) return isEmptyArray(value);
if (isObject(value)) return isEmptyObject(value);
if (value == null || value === "") return true;
return false;
}
function isFunction(value) {
return typeof value === "function";
}
var dataAttr = (condition) => condition ? "true" : void 0;
var isNumeric = (value) => value != null && parseInt(value.toString(), 10) > 0;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
__DEV__,
__TEST__,
dataAttr,
isArray,
isEmpty,
isEmptyArray,
isEmptyObject,
isFunction,
isNumeric,
isObject
});
@@ -0,0 +1,14 @@
'use strict';
var implementation = require('./implementation');
module.exports = function getPolyfill() {
if (String.prototype.matchAll) {
try {
''.matchAll(RegExp.prototype);
} catch (e) {
return String.prototype.matchAll;
}
}
return implementation;
};
@@ -0,0 +1,97 @@
(function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.IsWhatType = {}));
})(this, function(exports2) {
"use strict";
function ensureType(value, checked) {
return checked;
}
function getType(value) {
return Object.prototype.toString.call(value).slice(8, -1);
}
const PROTOCOL = /^([a-z][a-z\d+\-.]*:)?\/\//i;
function isAbsoluteURL(value) {
return PROTOCOL.test(value);
}
function isLength(value) {
return Number.isInteger(value) && value > -1;
}
function isArrayLike(value) {
return value != null && isLength(value.length) && typeof value !== "function";
}
function isAsyncFunction(value) {
return getType(value) === "AsyncFunction";
}
function isObject(value) {
return value !== null && typeof value === "object";
}
const hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
function isESModule(value) {
return isObject(value) && (value.__esModule || hasSymbol && value[Symbol.toStringTag] === "Module");
}
function isError(value) {
if (value == null) {
return false;
}
if (value instanceof Error) {
return true;
}
const { name } = value;
return typeof name === "string" && name.endsWith("Error");
}
function isFunction(value) {
return typeof value === "function";
}
function isIterable(value) {
return value != null && typeof value[Symbol.iterator] === "function";
}
function isNumber(value) {
return typeof value === "number" && value === value;
}
function isValidDate(value) {
return value instanceof Date && value.toString() !== "Invalid Date";
}
function isLeapYear(value) {
let year = value;
if (isValidDate(value)) {
year = value.getFullYear();
} else if (!isNumber(value)) {
return false;
}
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
}
function isNil(value) {
return value == null;
}
function isPlainObject(value) {
if (!isObject(value) || getType(value) !== "Object") {
return false;
}
const prototype = Object.getPrototypeOf(value);
return prototype === null || prototype === Object.prototype;
}
function isPromiseLike(value) {
return isObject(value) && typeof value.then === "function";
}
function isWhat(value, type, comparingType) {
return type === comparingType;
}
exports2.ensureType = ensureType;
exports2.getType = getType;
exports2.isAbsoluteURL = isAbsoluteURL;
exports2.isArrayLike = isArrayLike;
exports2.isAsyncFunction = isAsyncFunction;
exports2.isESModule = isESModule;
exports2.isError = isError;
exports2.isFunction = isFunction;
exports2.isIterable = isIterable;
exports2.isLeapYear = isLeapYear;
exports2.isLength = isLength;
exports2.isNil = isNil;
exports2.isNumber = isNumber;
exports2.isObject = isObject;
exports2.isPlainObject = isPlainObject;
exports2.isPromiseLike = isPromiseLike;
exports2.isValidDate = isValidDate;
exports2.isWhat = isWhat;
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
});
@@ -0,0 +1 @@
{"version":3,"file":"jsx.d.ts","sourceRoot":"","sources":["jsx.js"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,qCAHW,MAAM,GACJ,OAAO,CAKnB;AAED;;;;;;GAMG;AACH,iCALW,UAAU,eACV,MAAM,kBACN,MAAM,GACJ,OAAO,CAsBnB;AAED;;;;GAIG;AACH,4BAHW,MAAM,GACJ,OAAO,CAInB;AAED;;;;GAIG;AACH,wCAHW,OAAO,GACL,OAAO,CAOnB;AAED;;;;GAIG;AACH,qCAHW,OAAO,GACL,OAAO,CAInB;AAED;;;;;;;;GAQG;AACH,wCANW,OAAO,WACP,OAAO,WACP,OAAO,eACP,OAAO,GACL,OAAO,CAgDnB;AAED;;;;;;GAMG;AACH,6CAJW,OAAO,WACP,OAAO,GACL,OAAO,CAsCnB"}
@@ -0,0 +1,14 @@
export declare function getScrollPosition(scrollingContainer: Element): {
isTop: boolean;
isLeft: boolean;
isBottom: boolean;
isRight: boolean;
maxScroll: {
x: number;
y: number;
};
minScroll: {
x: number;
y: number;
};
};
@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/babel__traverse`
# Summary
This package contains type definitions for @babel/traverse (https://github.com/babel/babel/tree/main/packages/babel-traverse).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse.
### Additional Details
* Last updated: Thu, 31 Jul 2025 21:02:30 GMT
* Dependencies: [@babel/types](https://npmjs.com/package/@babel/types)
# Credits
These definitions were written by [Troy Gerwien](https://github.com/yortus), [Marvin Hagemeister](https://github.com/marvinhagemeister), [Ryan Petrich](https://github.com/rpetrich), [Melvin Groenhoff](https://github.com/mgroenhoff), [Dean L.](https://github.com/dlgrit), [Ifiok Jr.](https://github.com/ifiokjr), [ExE Boss](https://github.com/ExE-Boss), and [Daniel Tschinder](https://github.com/danez).
@@ -0,0 +1,113 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ariaAbstractRoles = _interopRequireDefault(require("./etc/roles/ariaAbstractRoles"));
var _ariaLiteralRoles = _interopRequireDefault(require("./etc/roles/ariaLiteralRoles"));
var _ariaDpubRoles = _interopRequireDefault(require("./etc/roles/ariaDpubRoles"));
var _ariaGraphicsRoles = _interopRequireDefault(require("./etc/roles/ariaGraphicsRoles"));
var _iterationDecorator = _interopRequireDefault(require("./util/iterationDecorator"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
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 _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; }
var roles = [].concat(_ariaAbstractRoles.default, _ariaLiteralRoles.default, _ariaDpubRoles.default, _ariaGraphicsRoles.default);
roles.forEach(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
roleDefinition = _ref2[1];
// Conglomerate the properties
var _iterator = _createForOfIteratorHelper(roleDefinition.superClass),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var superClassIter = _step.value;
var _iterator2 = _createForOfIteratorHelper(superClassIter),
_step2;
try {
var _loop = function _loop() {
var superClassName = _step2.value;
var superClassRoleTuple = roles.filter(function (_ref3) {
var _ref4 = _slicedToArray(_ref3, 1),
name = _ref4[0];
return name === superClassName;
})[0];
if (superClassRoleTuple) {
var superClassDefinition = superClassRoleTuple[1];
for (var _i = 0, _Object$keys = Object.keys(superClassDefinition.props); _i < _Object$keys.length; _i++) {
var prop = _Object$keys[_i];
if (
// $FlowIssue Accessing the hasOwnProperty on the Object prototype is fine.
!Object.prototype.hasOwnProperty.call(roleDefinition.props, prop)) {
// $FlowIgnore assigning without an index signature is fine
roleDefinition.props[prop] = superClassDefinition.props[prop];
}
}
}
};
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
_loop();
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
});
var rolesMap = {
entries: function entries() {
return roles;
},
forEach: function forEach(fn) {
var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var _iterator3 = _createForOfIteratorHelper(roles),
_step3;
try {
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var _step3$value = _slicedToArray(_step3.value, 2),
key = _step3$value[0],
values = _step3$value[1];
fn.call(thisArg, values, key, roles);
}
} catch (err) {
_iterator3.e(err);
} finally {
_iterator3.f();
}
},
get: function get(key) {
var item = roles.filter(function (tuple) {
return tuple[0] === key ? true : false;
})[0];
return item && item[1];
},
has: function has(key) {
return !!rolesMap.get(key);
},
keys: function keys() {
return roles.map(function (_ref5) {
var _ref6 = _slicedToArray(_ref5, 1),
key = _ref6[0];
return key;
});
},
values: function values() {
return roles.map(function (_ref7) {
var _ref8 = _slicedToArray(_ref7, 2),
values = _ref8[1];
return values;
});
}
};
var _default = exports.default = (0, _iterationDecorator.default)(rolesMap, rolesMap.entries());
@@ -0,0 +1,63 @@
/**
* stream.js: Transport for outputting to any arbitrary stream.
*
* (C) 2010 Charlie Robbins
* MIT LICENCE
*/
'use strict';
const isStream = require('is-stream');
const { MESSAGE } = require('triple-beam');
const os = require('os');
const TransportStream = require('winston-transport');
/**
* Transport for outputting to any arbitrary stream.
* @type {Stream}
* @extends {TransportStream}
*/
module.exports = class Stream extends TransportStream {
/**
* Constructor function for the Console transport object responsible for
* persisting log messages and metadata to a terminal or TTY.
* @param {!Object} [options={}] - Options for this instance.
*/
constructor(options = {}) {
super(options);
if (!options.stream || !isStream(options.stream)) {
throw new Error('options.stream is required.');
}
// We need to listen for drain events when write() returns false. This can
// make node mad at times.
this._stream = options.stream;
this._stream.setMaxListeners(Infinity);
this.isObjectMode = options.stream._writableState.objectMode;
this.eol = (typeof options.eol === 'string') ? options.eol : os.EOL;
}
/**
* Core logging method exposed to Winston.
* @param {Object} info - TODO: add param description.
* @param {Function} callback - TODO: add param description.
* @returns {undefined}
*/
log(info, callback) {
setImmediate(() => this.emit('logged', info));
if (this.isObjectMode) {
this._stream.write(info);
if (callback) {
callback(); // eslint-disable-line callback-return
}
return;
}
this._stream.write(`${info[MESSAGE]}${this.eol}`);
if (callback) {
callback(); // eslint-disable-line callback-return
}
return;
}
};
@@ -0,0 +1,9 @@
1.0.1 / 2021-11-14
==================
* pref: enable strict mode
1.0.0 / 2018-07-09
==================
* Initial release
@@ -0,0 +1,11 @@
var getNative = require('./_getNative');
var defineProperty = (function() {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}());
module.exports = defineProperty;
@@ -0,0 +1 @@
{"name":"@types/use-sync-external-store","version":"0.0.6","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532110446,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"README.md":{"checkedAt":1794532110447,"integrity":"sha512-XPDcMpY5GDU+8Fyxf2xIx6CHLUMjdB0dCQH5LV72Szalro3miAcwXlw6ggCY0fILnVqHxir47ZYJGaAX0MOwbw==","mode":420,"size":565},"index.d.ts":{"checkedAt":1794532110447,"integrity":"sha512-3RO3yqXSJvapcUI5Vd0PLQAapWxDmbT9k5ioVabZkgczAdB6bfjTstpbYyF0hZ6H25Dl8Gl6aLPCFvCVmZNPGg==","mode":420,"size":192},"package.json":{"checkedAt":1794532110447,"integrity":"sha512-zYgbfMzB66C2X/nLo4KmoBgmNS+RH+wWaJO6mHOICxt8aEppjOGbpP9hQF/doOVMwi2h+FNvCG1FhmJzh6fZIQ==","mode":420,"size":997},"with-selector.d.ts":{"checkedAt":1794532110447,"integrity":"sha512-weOyQal3yRcNsoMA6KlRrmN7mKSx/lnF3jU3Cez/tDX9PrE43azLKFuje28DCGMsXlg7GZf94dkWPk06EmKPZQ==","mode":420,"size":340},"shim/index.d.ts":{"checkedAt":1794532110447,"integrity":"sha512-Vm42/aWN6orybolFVDjc7v5mNfJAOVlPxBaek9Jf3S7S1GawiuCVY4FE8u1iFBRFs2+j8K9et1upqyGJG4ovZQ==","mode":420,"size":21},"shim/with-selector.d.ts":{"checkedAt":1794532110447,"integrity":"sha512-Eoza4tWVH47hatyuEMMndbVsFwJakT9C2L1Iq2FjpD/On3fg9/LHHW5R1FNi3RetdQjfSINnCCJUWC2O+DxWjg==","mode":420,"size":34}}}
@@ -0,0 +1,297 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/menu-item.tsx
var menu_item_exports = {};
__export(menu_item_exports, {
default: () => menu_item_default
});
module.exports = __toCommonJS(menu_item_exports);
var import_react2 = require("react");
// src/use-menu-item.ts
var import_react = require("react");
var import_theme = require("@heroui/theme");
var import_system = require("@heroui/system");
var import_focus = require("@react-aria/focus");
var import_shared_utils = require("@heroui/shared-utils");
var import_menu = require("@react-aria/menu");
var import_interactions = require("@react-aria/interactions");
var import_utils = require("@react-aria/utils");
var import_use_is_mobile = require("@heroui/use-is-mobile");
var import_react_utils = require("@heroui/react-utils");
function useMenuItem(originalProps) {
var _a, _b;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.menuItem.variantKeys);
const {
as,
item,
state,
shortcut,
description,
startContent,
endContent,
isVirtualized,
selectedIcon,
className,
classNames,
onAction,
autoFocus,
onPress,
onPressStart,
onPressUp,
onPressEnd,
onPressChange,
onHoverStart: hoverStartProp,
onHoverChange,
onHoverEnd,
hideSelectedIcon = false,
isReadOnly = false,
closeOnSelect,
onClose,
onClick: deprecatedOnClick,
...otherProps
} = props;
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const domRef = (0, import_react.useRef)(null);
const Component = as || ((otherProps == null ? void 0 : otherProps.href) ? "a" : "li");
const shouldFilterDOMProps = typeof Component === "string";
const { rendered, key } = item;
const isDisabledProp = state.disabledKeys.has(key) || originalProps.isDisabled;
const isSelectable = state.selectionManager.selectionMode !== "none";
const isMobile = (0, import_use_is_mobile.useIsMobile)();
const { isFocusVisible, focusProps } = (0, import_focus.useFocusRing)({
autoFocus
});
if (deprecatedOnClick && typeof deprecatedOnClick === "function") {
(0, import_shared_utils.warn)(
"onClick is deprecated, please use onPress instead. See: https://github.com/heroui-inc/heroui/issues/4292",
"MenuItem"
);
}
const handlePress = (0, import_react.useCallback)(
(e) => {
deprecatedOnClick == null ? void 0 : deprecatedOnClick(e);
onPress == null ? void 0 : onPress(e);
},
[deprecatedOnClick, onPress]
);
const {
isPressed,
isFocused,
isSelected,
isDisabled,
menuItemProps,
labelProps,
descriptionProps,
keyboardShortcutProps
} = (0, import_menu.useMenuItem)(
{
key,
onClose,
isDisabled: isDisabledProp,
onPress: handlePress,
onPressStart,
onPressUp,
onPressEnd,
onPressChange,
"aria-label": props["aria-label"],
closeOnSelect,
isVirtualized,
onAction
},
state,
domRef
);
let { hoverProps, isHovered } = (0, import_interactions.useHover)({
isDisabled,
onHoverStart(e) {
if (!(0, import_interactions.isFocusVisible)()) {
state.selectionManager.setFocused(true);
state.selectionManager.setFocusedKey(key);
}
hoverStartProp == null ? void 0 : hoverStartProp(e);
},
onHoverChange,
onHoverEnd
});
let itemProps = menuItemProps;
const slots = (0, import_react.useMemo)(
() => (0, import_theme.menuItem)({
...variantProps,
isDisabled,
disableAnimation,
hasTitleTextChild: typeof rendered === "string",
hasDescriptionTextChild: typeof description === "string"
}),
[(0, import_shared_utils.objectToDeps)(variantProps), isDisabled, disableAnimation, rendered, description]
);
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
if (isReadOnly) {
itemProps = (0, import_shared_utils.removeEvents)(itemProps);
}
const getItemProps = (props2 = {}) => ({
ref: domRef,
...(0, import_utils.mergeProps)(
isReadOnly ? {} : focusProps,
(0, import_react_utils.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps
}),
itemProps,
hoverProps,
props2
),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-selectable": (0, import_shared_utils.dataAttr)(isSelectable),
"data-hover": (0, import_shared_utils.dataAttr)(isMobile ? isHovered || isPressed : isHovered),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
"data-selected": (0, import_shared_utils.dataAttr)(isSelected),
"data-pressed": (0, import_shared_utils.dataAttr)(isPressed),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
className: slots.base({ class: (0, import_shared_utils.clsx)(baseStyles, props2.className) })
});
const getLabelProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(labelProps, props2),
className: slots.title({ class: classNames == null ? void 0 : classNames.title })
});
const getDescriptionProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(descriptionProps, props2),
className: slots.description({ class: classNames == null ? void 0 : classNames.description })
});
const getKeyboardShortcutProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(keyboardShortcutProps, props2),
className: slots.shortcut({ class: classNames == null ? void 0 : classNames.shortcut })
});
const getSelectedIconProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
"aria-hidden": (0, import_shared_utils.dataAttr)(true),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
className: slots.selectedIcon({ class: classNames == null ? void 0 : classNames.selectedIcon }),
...props2
};
},
[isDisabled, slots, classNames]
);
return {
Component,
domRef,
slots,
classNames,
isSelectable,
isSelected,
isDisabled,
rendered,
shortcut,
description,
startContent,
endContent,
selectedIcon,
disableAnimation,
getItemProps,
getLabelProps,
hideSelectedIcon,
getDescriptionProps,
getKeyboardShortcutProps,
getSelectedIconProps
};
}
// src/menu-selected-icon.tsx
var import_jsx_runtime = require("react/jsx-runtime");
function MenuSelectedIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
"data-selected": isSelected,
role: "presentation",
viewBox: "0 0 17 18",
...otherProps,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"polyline",
{
fill: "none",
points: "1 9 7 14 15 4",
stroke: "currentColor",
strokeDasharray: 22,
strokeDashoffset: isSelected ? 44 : 66,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5,
style: !disableAnimation ? {
transition: "stroke-dashoffset 200ms ease"
} : {}
}
)
}
);
}
// src/menu-item.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var MenuItem = (props) => {
const {
Component,
slots,
classNames,
rendered,
shortcut,
description,
isSelectable,
isSelected,
isDisabled,
selectedIcon,
startContent,
endContent,
disableAnimation,
hideSelectedIcon,
getItemProps,
getLabelProps,
getDescriptionProps,
getKeyboardShortcutProps,
getSelectedIconProps
} = useMenuItem(props);
const selectedContent = (0, import_react2.useMemo)(() => {
const defaultIcon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MenuSelectedIcon, { disableAnimation, isSelected });
if (typeof selectedIcon === "function") {
return selectedIcon({ icon: defaultIcon, isSelected, isDisabled });
}
if (selectedIcon)
return selectedIcon;
return defaultIcon;
}, [selectedIcon, isSelected, isDisabled, disableAnimation]);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ...getItemProps(), children: [
startContent,
description ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getLabelProps(), children: rendered }),
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getDescriptionProps(), children: description })
] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getLabelProps(), children: rendered }),
shortcut && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("kbd", { ...getKeyboardShortcutProps(), children: shortcut }),
isSelectable && !hideSelectedIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getSelectedIconProps(), children: selectedContent }),
endContent
] });
};
MenuItem.displayName = "HeroUI.MenuItem";
var menu_item_default = MenuItem;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,34 @@
{
"name": "kuler",
"version": "2.0.0",
"description": "Color your terminal using CSS/hex color codes",
"main": "index.js",
"scripts": {
"test": "mocha test.js"
},
"repository": {
"type": "git",
"url": "https://github.com/3rd-Eden/kuler"
},
"keywords": [
"kuler",
"ansi",
"color",
"colour",
"chalk",
"css",
"hex",
"rgb",
"rgv"
],
"author": "Arnout Kazemier",
"license": "MIT",
"bugs": {
"url": "https://github.com/3rd-Eden/kuler/issues"
},
"homepage": "https://github.com/3rd-Eden/kuler",
"devDependencies": {
"assume": "^2.0.1",
"mocha": "^5.1.1"
}
}
@@ -0,0 +1,363 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'return-await',
meta: {
type: 'problem',
docs: {
description: 'Enforce consistent awaiting of returned promises',
recommended: {
strict: ['error-handling-correctness-only'],
},
requiresTypeChecking: true,
},
fixable: 'code',
// eslint-disable-next-line eslint-plugin/require-meta-has-suggestions -- suggestions are exposed through a helper.
hasSuggestions: true,
messages: {
disallowedPromiseAwait: 'Returning an awaited promise is not allowed in this context.',
disallowedPromiseAwaitSuggestion: 'Remove `await` before the expression. Use caution as this may impact control flow.',
nonPromiseAwait: 'Returning an awaited value that is not a promise is not allowed.',
requiredPromiseAwait: 'Returning an awaited promise is required in this context.',
requiredPromiseAwaitSuggestion: 'Add `await` before the expression. Use caution as this may impact control flow.',
},
schema: [
{
type: 'string',
oneOf: [
{
type: 'string',
description: 'Requires that all returned promises be awaited.',
enum: ['always'],
},
{
type: 'string',
description: 'In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule does not enforce any particular behavior around whether returned promises are awaited.',
enum: ['error-handling-correctness-only'],
},
{
type: 'string',
description: 'In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule enforces that returned promises _must not_ be awaited.',
enum: ['in-try-catch'],
},
{
type: 'string',
description: 'Disallows awaiting any returned promises.',
enum: ['never'],
},
],
},
],
},
defaultOptions: ['in-try-catch'],
create(context, [option]) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
const scopeInfoStack = [];
function enterFunction(node) {
scopeInfoStack.push({
hasAsync: node.async,
owningFunc: node,
});
}
function exitFunction() {
scopeInfoStack.pop();
}
function affectsExplicitResourceManagement(node) {
// just need to determine if there is a `using` declaration in scope.
let scope = context.sourceCode.getScope(node);
const functionScope = scope.variableScope;
while (true) {
for (const variable of scope.variables) {
if (variable.defs.length !== 1) {
// This can't be the case for `using` or `await using` since it's
// an error to redeclare those more than once in the same scope,
// unlike, say, `var` declarations.
continue;
}
const declaration = variable.defs[0];
const declaratorNode = declaration.node;
const declarationNode = declaratorNode.parent;
// if it's a using/await using declaration, and it comes _before_ the
// node we're checking, it affects control flow for that node.
if (['await using', 'using'].includes(declarationNode.kind) &&
declaratorNode.range[1] < node.range[0]) {
return true;
}
}
if (scope === functionScope) {
// We've checked all the relevant scopes
break;
}
// This should always exist, since the rule should only be checking
// contexts in which `return` statements are legal, which should always
// be inside a function.
scope = (0, util_1.nullThrows)(scope.upper, 'Expected parent scope to exist. return-await should only operate on return statements within functions');
}
return false;
}
/**
* Tests whether a node is inside of an explicit error handling context
* (try/catch/finally) in a way that throwing an exception will have an
* impact on the program's control flow.
*/
function affectsExplicitErrorHandling(node) {
// If an error-handling block is followed by another error-handling block,
// control flow is affected by whether promises in it are awaited or not.
// Otherwise, we need to check recursively for nested try statements until
// we get to the top level of a function or the program. If by then,
// there's no offending error-handling blocks, it doesn't affect control
// flow.
const tryAncestorResult = findContainingTryStatement(node);
if (tryAncestorResult == null) {
return false;
}
const { block, tryStatement } = tryAncestorResult;
switch (block) {
case 'catch':
// Exceptions thrown in catch blocks followed by a finally block affect
// control flow.
if (tryStatement.finallyBlock != null) {
return true;
}
// Otherwise recurse.
return affectsExplicitErrorHandling(tryStatement);
case 'finally':
return affectsExplicitErrorHandling(tryStatement);
case 'try':
// Try blocks are always followed by either a catch or finally,
// so exceptions thrown here always affect control flow.
return true;
default: {
const __never = block;
throw new Error(`Unexpected block type: ${String(__never)}`);
}
}
}
/**
* A try _statement_ is the whole thing that encompasses try block,
* catch clause, and finally block. This function finds the nearest
* enclosing try statement (if present) for a given node, and reports which
* part of the try statement the node is in.
*/
function findContainingTryStatement(node) {
let child = node;
let ancestor = node.parent;
while (ancestor && !ts.isFunctionLike(ancestor)) {
if (ts.isTryStatement(ancestor)) {
let block;
if (child === ancestor.tryBlock) {
block = 'try';
}
else if (child === ancestor.catchClause) {
block = 'catch';
}
else if (child === ancestor.finallyBlock) {
block = 'finally';
}
return {
block: (0, util_1.nullThrows)(block, 'Child of a try statement must be a try block, catch clause, or finally block'),
tryStatement: ancestor,
};
}
child = ancestor;
ancestor = ancestor.parent;
}
return undefined;
}
function removeAwait(fixer, node) {
// Should always be an await node; but let's be safe.
/* istanbul ignore if */ if (!(0, util_1.isAwaitExpression)(node)) {
return null;
}
const awaitToken = context.sourceCode.getFirstToken(node, util_1.isAwaitKeyword);
// Should always be the case; but let's be safe.
/* istanbul ignore if */ if (!awaitToken) {
return null;
}
const startAt = awaitToken.range[0];
let endAt = awaitToken.range[1];
// Also remove any extraneous whitespace after `await`, if there is any.
const nextToken = context.sourceCode.getTokenAfter(awaitToken, {
includeComments: true,
});
if (nextToken) {
endAt = nextToken.range[0];
}
return fixer.removeRange([startAt, endAt]);
}
function insertAwait(fixer, node, isHighPrecedence) {
if (isHighPrecedence) {
return fixer.insertTextBefore(node, 'await ');
}
return [
fixer.insertTextBefore(node, 'await ('),
fixer.insertTextAfter(node, ')'),
];
}
function test(node, expression) {
let child;
const isAwait = ts.isAwaitExpression(expression);
if (isAwait) {
child = expression.getChildAt(1);
}
else {
child = expression;
}
const type = checker.getTypeAtLocation(child);
const certainty = (0, util_1.needsToBeAwaited)(checker, expression, type);
// handle awaited _non_thenables
if (certainty !== util_1.Awaitable.Always) {
if (isAwait) {
if (certainty === util_1.Awaitable.May) {
return;
}
context.report({
node,
messageId: 'nonPromiseAwait',
fix: fixer => removeAwait(fixer, node),
});
}
return;
}
// At this point it's definitely a thenable.
const affectsErrorHandling = affectsExplicitErrorHandling(expression) ||
affectsExplicitResourceManagement(node);
const useAutoFix = !affectsErrorHandling;
const ruleConfiguration = getConfiguration(option);
const shouldAwaitInCurrentContext = affectsErrorHandling
? ruleConfiguration.errorHandlingContext
: ruleConfiguration.ordinaryContext;
switch (shouldAwaitInCurrentContext) {
case 'await':
if (!isAwait) {
context.report({
node,
messageId: 'requiredPromiseAwait',
...(0, util_1.getFixOrSuggest)({
fixOrSuggest: useAutoFix ? 'fix' : 'suggest',
suggestion: {
messageId: 'requiredPromiseAwaitSuggestion',
fix: fixer => insertAwait(fixer, node, (0, util_1.isHigherPrecedenceThanAwait)(expression)),
},
}),
});
}
break;
case "don't-care":
break;
case 'no-await':
if (isAwait) {
context.report({
node,
messageId: 'disallowedPromiseAwait',
...(0, util_1.getFixOrSuggest)({
fixOrSuggest: useAutoFix ? 'fix' : 'suggest',
suggestion: {
messageId: 'disallowedPromiseAwaitSuggestion',
fix: fixer => removeAwait(fixer, node),
},
}),
});
}
break;
}
}
function findPossiblyReturnedNodes(node) {
if (node.type === utils_1.AST_NODE_TYPES.ConditionalExpression) {
return [
...findPossiblyReturnedNodes(node.alternate),
...findPossiblyReturnedNodes(node.consequent),
];
}
return [node];
}
return {
ArrowFunctionExpression: enterFunction,
'ArrowFunctionExpression:exit': exitFunction,
FunctionDeclaration: enterFunction,
'FunctionDeclaration:exit': exitFunction,
FunctionExpression: enterFunction,
'FunctionExpression:exit': exitFunction,
// executes after less specific handler, so exitFunction is called
'ArrowFunctionExpression[async = true]:exit'(node) {
if (node.body.type !== utils_1.AST_NODE_TYPES.BlockStatement) {
findPossiblyReturnedNodes(node.body).forEach(node => {
const tsNode = services.esTreeNodeToTSNodeMap.get(node);
test(node, tsNode);
});
}
},
ReturnStatement(node) {
const scopeInfo = scopeInfoStack.at(-1);
if (!scopeInfo?.hasAsync || !node.argument) {
return;
}
findPossiblyReturnedNodes(node.argument).forEach(node => {
const tsNode = services.esTreeNodeToTSNodeMap.get(node);
test(node, tsNode);
});
},
};
},
});
function getConfiguration(option) {
switch (option) {
case 'always':
return {
errorHandlingContext: 'await',
ordinaryContext: 'await',
};
case 'error-handling-correctness-only':
return {
errorHandlingContext: 'await',
ordinaryContext: "don't-care",
};
case 'in-try-catch':
return {
errorHandlingContext: 'await',
ordinaryContext: 'no-await',
};
case 'never':
return {
errorHandlingContext: 'no-await',
ordinaryContext: 'no-await',
};
}
}
@@ -0,0 +1,7 @@
import path from 'node:path';
import { pkgUp } from './pkg-up.js';
export function pkgDir(cwd) {
const fp = pkgUp({ cwd });
return fp ? path.dirname(fp) : null;
}
//# sourceMappingURL=pkg-dir.js.map
@@ -0,0 +1,34 @@
import { urlAlphabet } from './url-alphabet/index.js'
let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
let customRandom = (alphabet, defaultSize, getRandom) => {
let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
let step = -~((1.6 * mask * defaultSize) / alphabet.length)
return (size = defaultSize) => {
let id = ''
while (true) {
let bytes = getRandom(step)
let j = step | 0
while (j--) {
id += alphabet[bytes[j] & mask] || ''
if (id.length === size) return id
}
}
}
}
let customAlphabet = (alphabet, size = 21) =>
customRandom(alphabet, size, random)
let nanoid = (size = 21) =>
crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
byte &= 63
if (byte < 36) {
id += byte.toString(36)
} else if (byte < 62) {
id += (byte - 26).toString(36).toUpperCase()
} else if (byte > 62) {
id += '-'
} else {
id += '_'
}
return id
}, '')
export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
@@ -0,0 +1,7 @@
import type { TSESLint } from '@typescript-eslint/utils';
export declare const phrases: {
readonly TSInterfaceDeclaration: "Interface";
readonly TSTypeLiteral: "Type literal";
};
declare const _default: TSESLint.RuleModule<"functionTypeOverCallableType" | "unexpectedThisOnFunctionOnlyInterface", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1,206 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/components/image.ts
var image_exports = {};
__export(image_exports, {
image: () => image
});
module.exports = __toCommonJS(image_exports);
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/components/image.ts
var image = tv({
slots: {
wrapper: "relative shadow-black/5",
zoomedWrapper: "relative overflow-hidden rounded-inherit",
img: "relative z-10 opacity-0 shadow-black/5 data-[loaded=true]:opacity-100",
blurredImg: [
"absolute",
"z-0",
"inset-0",
"w-full",
"h-full",
"object-cover",
"filter",
"blur-lg",
"scale-105",
"saturate-150",
"opacity-30",
"translate-y-1"
]
},
variants: {
radius: {
none: {},
sm: {},
md: {},
lg: {},
full: {}
},
shadow: {
none: {
wrapper: "shadow-none",
img: "shadow-none"
},
sm: {
wrapper: "shadow-small",
img: "shadow-small"
},
md: {
wrapper: "shadow-medium",
img: "shadow-medium"
},
lg: {
wrapper: "shadow-large",
img: "shadow-large"
}
},
isZoomed: {
true: {
img: ["object-cover", "transform", "hover:scale-125"]
}
},
showSkeleton: {
true: {
wrapper: ["group", "relative", "overflow-hidden", "bg-content3 dark:bg-content2"],
img: "opacity-0"
}
},
disableAnimation: {
true: {
img: "transition-none"
},
false: {
img: "transition-transform-opacity motion-reduce:transition-none !duration-300"
}
}
},
defaultVariants: {
radius: "lg",
shadow: "none",
isZoomed: false,
isBlurred: false,
showSkeleton: false
},
compoundVariants: [
{
showSkeleton: true,
disableAnimation: false,
class: {
wrapper: [
"before:opacity-100",
"before:absolute",
"before:inset-0",
"before:-translate-x-full",
"before:animate-[shimmer_2s_infinite]",
"before:border-t",
"before:border-content4/30",
"before:bg-gradient-to-r",
"before:from-transparent",
"before:via-content4",
"dark:before:via-default-700/10",
"before:to-transparent",
"after:opacity-100",
"after:absolute",
"after:inset-0",
"after:-z-10",
"after:bg-content3",
"dark:after:bg-content2"
]
}
}
],
compoundSlots: [
{
slots: ["wrapper", "img", "blurredImg", "zoomedWrapper"],
radius: "none",
class: "rounded-none"
},
{
slots: ["wrapper", "img", "blurredImg", "zoomedWrapper"],
radius: "full",
class: "rounded-full"
},
{
slots: ["wrapper", "img", "blurredImg", "zoomedWrapper"],
radius: "sm",
class: "rounded-small"
},
{
slots: ["wrapper", "img", "blurredImg", "zoomedWrapper"],
radius: "md",
class: "rounded-md"
},
{
slots: ["wrapper", "img", "blurredImg", "zoomedWrapper"],
radius: "lg",
class: "rounded-large"
}
]
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
image
});
@@ -0,0 +1,63 @@
'use strict';
/**
* Stringify a CST document, token, or collection item
*
* Fair warning: This applies no validation whatsoever, and
* simply concatenates the sources in their logical order.
*/
const stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst);
function stringifyToken(token) {
switch (token.type) {
case 'block-scalar': {
let res = '';
for (const tok of token.props)
res += stringifyToken(tok);
return res + token.source;
}
case 'block-map':
case 'block-seq': {
let res = '';
for (const item of token.items)
res += stringifyItem(item);
return res;
}
case 'flow-collection': {
let res = token.start.source;
for (const item of token.items)
res += stringifyItem(item);
for (const st of token.end)
res += st.source;
return res;
}
case 'document': {
let res = stringifyItem(token);
if (token.end)
for (const st of token.end)
res += st.source;
return res;
}
default: {
let res = token.source;
if ('end' in token && token.end)
for (const st of token.end)
res += st.source;
return res;
}
}
}
function stringifyItem({ start, key, sep, value }) {
let res = '';
for (const st of start)
res += st.source;
if (key)
res += stringifyToken(key);
if (sep)
for (const st of sep)
res += st.source;
if (value)
res += stringifyToken(value);
return res;
}
exports.stringify = stringify;
@@ -0,0 +1,186 @@
// @ts-ignore TS6133
import { test } from "vitest";
import * as z from "zod/v3";
test("test", () => {
z;
});
// const fish = z.object({
// name: z.string(),
// props: z.object({
// color: z.string(),
// numScales: z.number(),
// }),
// });
// const nonStrict = z
// .object({
// name: z.string(),
// color: z.string(),
// })
// .nonstrict();
// test('object pick type', () => {
// const modNonStrictFish = nonStrict.omit({ name: true });
// modNonStrictFish.parse({ color: 'asdf' });
// const bad1 = () => fish.pick({ props: { unknown: true } } as any);
// const bad2 = () => fish.omit({ name: true, props: { unknown: true } } as any);
// expect(bad1).toThrow();
// expect(bad2).toThrow();
// });
// test('f1', () => {
// const f1 = fish.pick(true);
// f1.parse({ name: 'a', props: { color: 'b', numScales: 3 } });
// });
// test('f2', () => {
// const f2 = fish.pick({ props: true });
// f2.parse({ props: { color: 'asdf', numScales: 1 } });
// const badcheck2 = () => f2.parse({ name: 'a', props: { color: 'b', numScales: 3 } } as any);
// expect(badcheck2).toThrow();
// });
// test('f3', () => {
// const f3 = fish.pick({ props: { color: true } });
// f3.parse({ props: { color: 'b' } });
// const badcheck3 = () => f3.parse({ name: 'a', props: { color: 'b', numScales: 3 } } as any);
// expect(badcheck3).toThrow();
// });
// test('f4', () => {
// const badcheck4 = () => fish.pick({ props: { color: true, unknown: true } });
// expect(badcheck4).toThrow();
// });
// test('f6', () => {
// const f6 = fish.omit({ props: true });
// const badcheck6 = () => f6.parse({ name: 'a', props: { color: 'b', numScales: 3 } } as any);
// f6.parse({ name: 'adsf' });
// expect(badcheck6).toThrow();
// });
// test('f7', () => {
// const f7 = fish.omit({ props: { color: true } });
// f7.parse({ name: 'a', props: { numScales: 3 } });
// const badcheck7 = () => f7.parse({ name: 'a', props: { color: 'b', numScales: 3 } } as any);
// expect(badcheck7).toThrow();
// });
// test('f8', () => {
// const badcheck8 = () => fish.omit({ props: { color: true, unknown: true } });
// expect(badcheck8).toThrow();
// });
// test('f9', () => {
// const f9 = nonStrict.pick(true);
// f9.parse({ name: 'a', color: 'asdf' });
// });
// test('f10', () => {
// const f10 = nonStrict.pick({ name: true });
// f10.parse({ name: 'a' });
// const val = f10.parse({ name: 'a', color: 'b' });
// expect(val).toEqual({ name: 'a' });
// });
// test('f12', () => {
// const badfcheck12 = () => nonStrict.omit({ color: true, asdf: true });
// expect(badfcheck12).toThrow();
// });
// test('array masking', () => {
// const fishArray = z.array(fish);
// const modFishArray = fishArray.pick({
// name: true,
// props: {
// numScales: true,
// },
// });
// modFishArray.parse([{ name: 'fish', props: { numScales: 12 } }]);
// const bad1 = () => modFishArray.parse([{ name: 'fish', props: { numScales: 12, color: 'asdf' } }] as any);
// expect(bad1).toThrow();
// });
// test('array masking', () => {
// const fishArray = z.array(fish);
// const fail = () =>
// fishArray.pick({
// name: true,
// props: {
// whatever: true,
// },
// } as any);
// expect(fail).toThrow();
// });
// test('array masking', () => {
// const fishArray = z.array(fish);
// const fail = () =>
// fishArray.omit({
// whateve: true,
// } as any);
// expect(fail).toThrow();
// });
// test('array masking', () => {
// const fishArray = z.array(fish);
// const modFishList = fishArray.omit({
// name: true,
// props: {
// color: true,
// },
// });
// modFishList.parse([{ props: { numScales: 12 } }]);
// const fail = () => modFishList.parse([{ name: 'hello', props: { numScales: 12 } }] as any);
// expect(fail).toThrow();
// });
// test('primitive array masking', () => {
// const fishArray = z.array(z.number());
// const fail = () => fishArray.pick({} as any);
// expect(fail).toThrow();
// });
// test('other array masking', () => {
// const fishArray = z.array(z.array(z.number()));
// const fail = () => fishArray.pick({} as any);
// expect(fail).toThrow();
// });
// test('invalid mask #1', () => {
// const fail = () => fish.pick(1 as any);
// expect(fail).toThrow();
// });
// test('invalid mask #2', () => {
// const fail = () => fish.pick([] as any);
// expect(fail).toThrow();
// });
// test('invalid mask #3', () => {
// const fail = () => fish.pick(false as any);
// expect(fail).toThrow();
// });
// test('invalid mask #4', () => {
// const fail = () => fish.pick('asdf' as any);
// expect(fail).toThrow();
// });
// test('invalid mask #5', () => {
// const fail = () => fish.omit(1 as any);
// expect(fail).toThrow();
// });
// test('invalid mask #6', () => {
// const fail = () => fish.omit([] as any);
// expect(fail).toThrow();
// });
// test('invalid mask #7', () => {
// const fail = () => fish.omit(false as any);
// expect(fail).toThrow();
// });
// test('invalid mask #8', () => {
// const fail = () => fish.omit('asdf' as any);
// expect(fail).toThrow();
// });
@@ -0,0 +1,3 @@
import type { DebounceOptions } from './debounceOptions';
declare function useDebounce<T>(value: T, options?: DebounceOptions): T;
export default useDebounce;
@@ -0,0 +1,92 @@
import { expect, test } from "vitest";
import * as z from "zod/v4";
const literalTuna = z.literal("tuna");
const literalTunaCustomMessage = z.literal("tuna", {
message: "That's not a tuna",
});
const literalFortyTwo = z.literal(42);
const literalTrue = z.literal(true);
test("passing validations", () => {
literalTuna.parse("tuna");
literalFortyTwo.parse(42);
literalTrue.parse(true);
});
test("failing validations", () => {
expect(() => literalTuna.parse("shark")).toThrow();
expect(() => literalFortyTwo.parse(43)).toThrow();
expect(() => literalTrue.parse(false)).toThrow();
});
test("invalid_literal should have `input` field with data", () => {
const data = "shark";
const result = literalTuna.safeParse(data);
const issue = result.error!.issues[0];
expect(issue.code).toBe("invalid_value");
expect(issue).toMatchInlineSnapshot(`
{
"code": "invalid_value",
"message": "Invalid input: expected "tuna"",
"path": [],
"values": [
"tuna",
],
}
`);
});
test("invalid_literal should return default message", () => {
const data = "shark";
const result = literalTuna.safeParse(data);
const issue = result.error!.issues[0];
expect(issue.message).toEqual(`Invalid input: expected \"tuna\"`);
});
test("invalid_literal should return custom message", () => {
const data = "shark";
const result = literalTunaCustomMessage.safeParse(data);
const issue = result.error!.issues[0];
expect(issue.message).toEqual(`That's not a tuna`);
});
test("literal default error message", () => {
const result = z.literal("Tuna").safeParse("Trout");
expect(result.success).toEqual(false);
expect(result.error!.issues.length).toEqual(1);
expect(result.error).toMatchInlineSnapshot(`
[ZodError: [
{
"code": "invalid_value",
"values": [
"Tuna"
],
"path": [],
"message": "Invalid input: expected \\"Tuna\\""
}
]]
`);
});
test("literal bigint default error message", () => {
const result = z.literal(BigInt(12)).safeParse(BigInt(13));
expect(result.success).toBe(false);
expect(result.error!.issues.length).toEqual(1);
expect(result.error!.issues[0].message).toEqual(`Invalid input: expected 12n`);
});
test(".value getter", () => {
expect(z.literal("tuna").value).toEqual("tuna");
expect(() => z.literal([1, 2, 3]).value).toThrow();
});
test("readonly", () => {
const a = ["asdf"] as const;
z.literal(a);
});
@@ -0,0 +1,528 @@
==================================
Code Page 437, Consolas font
==================================
Options: -face "Consolas" -family 0x36
Chars: A2 A3 2014 3044 30FC 4000
FontSurvey "-face \"Consolas\" -family 0x36"
Windows 7
---------
Size 1: 1,3 BAD (HHHHHH)
Size 2: 1,2 BAD (HHHHHH)
Size 3: 1,3 BAD (HHHHHH)
Size 4: 2,4 BAD (HHHHHH)
Size 5: 2,5 BAD (HHHHHH)
Size 6: 3,6 BAD (HHHHHH)
Size 7: 3,6 BAD (HHHHHH)
Size 8: 4,8 BAD (HHHHHH)
Size 9: 4,9 BAD (HHHHHH)
Size 10: 5,10 BAD (HHHHHH)
Size 11: 5,11 BAD (HHHHHH)
Size 12: 6,12 BAD (HHHHHH)
Size 13: 6,13 BAD (HHHHHH)
Size 14: 7,14 BAD (HHHHHH)
Size 15: 7,15 BAD (HHHHHH)
Size 16: 8,16 BAD (HHHHHH)
Size 17: 8,17 BAD (HHHHHH)
Size 18: 8,18 BAD (HHHHHH)
Size 19: 9,19 BAD (HHHHHH)
Size 20: 9,20 BAD (HHHHHH)
Size 21: 10,22 BAD (HHHHHH)
Size 22: 10,22 BAD (HHHHHH)
Size 23: 11,23 BAD (HHHHHH)
Size 24: 11,24 BAD (HHHHHH)
Size 25: 12,25 BAD (HHHHHH)
Size 26: 12,26 BAD (HHHHHH)
Size 27: 13,27 BAD (HHHHHH)
Size 28: 13,28 BAD (HHHHHH)
Size 29: 14,29 BAD (HHHHHH)
Size 30: 14,30 BAD (HHHHHH)
Size 31: 15,31 BAD (HHHHHH)
Size 32: 15,32 BAD (HHHHHH)
Size 33: 15,33 BAD (HHHHHH)
Size 34: 16,34 BAD (HHHHHH)
Size 35: 16,36 BAD (HHHHHH)
Size 36: 17,36 BAD (HHHHHH)
Size 37: 17,37 BAD (HHHHHH)
Size 38: 18,38 BAD (HHHHHH)
Size 39: 18,39 BAD (HHHHHH)
Size 40: 19,40 BAD (HHHHHH)
Size 41: 19,41 BAD (HHHHHH)
Size 42: 20,42 BAD (HHHHHH)
Size 43: 20,43 BAD (HHHHHH)
Size 44: 21,44 BAD (HHHHHH)
Size 45: 21,45 BAD (HHHHHH)
Size 46: 22,46 BAD (HHHHHH)
Size 47: 22,47 BAD (HHHHHH)
Size 48: 23,48 BAD (HHHHHH)
Size 49: 23,49 BAD (HHHHHH)
Size 50: 23,50 BAD (HHHHHH)
Size 51: 24,51 BAD (HHHHHH)
Size 52: 24,52 BAD (HHHHHH)
Size 53: 25,53 BAD (HHHHHH)
Size 54: 25,54 BAD (HHHHHH)
Size 55: 26,55 BAD (HHHHHH)
Size 56: 26,56 BAD (HHHHHH)
Size 57: 27,57 BAD (HHHHHH)
Size 58: 27,58 BAD (HHHHHH)
Size 59: 28,59 BAD (HHHHHH)
Size 60: 28,60 BAD (HHHHHH)
Size 61: 29,61 BAD (HHHHHH)
Size 62: 29,62 BAD (HHHHHH)
Size 63: 30,64 BAD (HHHHHH)
Size 64: 30,64 BAD (HHHHHH)
Size 65: 31,65 BAD (HHHHHH)
Size 66: 31,66 BAD (HHHHHH)
Size 67: 31,67 BAD (HHHHHH)
Size 68: 32,68 BAD (HHHHHH)
Size 69: 32,69 BAD (HHHHHH)
Size 70: 33,70 BAD (HHHHHH)
Size 71: 33,71 BAD (HHHHHH)
Size 72: 34,72 BAD (HHHHHH)
Size 73: 34,73 BAD (HHHHHH)
Size 74: 35,74 BAD (HHHHHH)
Size 75: 35,75 BAD (HHHHHH)
Size 76: 36,76 BAD (HHHHHH)
Size 77: 36,77 BAD (HHHHHH)
Size 78: 37,78 BAD (HHHHHH)
Size 79: 37,79 BAD (HHHHHH)
Size 80: 38,80 BAD (HHHHHH)
Size 81: 38,81 BAD (HHHHHH)
Size 82: 39,82 BAD (HHHHHH)
Size 83: 39,83 BAD (HHHHHH)
Size 84: 39,84 BAD (HHHHHH)
Size 85: 40,85 BAD (HHHHHH)
Size 86: 40,86 BAD (HHHHHH)
Size 87: 41,87 BAD (HHHHHH)
Size 88: 41,88 BAD (HHHHHH)
Size 89: 42,89 BAD (HHHHHH)
Size 90: 42,90 BAD (HHHHHH)
Size 91: 43,91 BAD (HHHHHH)
Size 92: 43,92 BAD (HHHHHH)
Size 93: 44,93 BAD (HHHHHH)
Size 94: 44,94 BAD (HHHHHH)
Size 95: 45,95 BAD (HHHHHH)
Size 96: 45,96 BAD (HHHHHH)
Size 97: 46,97 BAD (HHHHHH)
Size 98: 46,98 BAD (HHHHHH)
Size 99: 46,99 BAD (HHHHHH)
Size 100: 47,100 BAD (HHHHHH)
Windows 8
---------
Size 1: 1,3 BAD (HHHHHH)
Size 2: 1,2 BAD (HHHHHH)
Size 3: 1,3 BAD (HHHHHH)
Size 4: 2,4 BAD (HHHHHH)
Size 5: 2,5 BAD (HHHHHH)
Size 6: 3,6 BAD (HHHHHH)
Size 7: 3,6 BAD (HHHHHH)
Size 8: 4,8 BAD (HHHHHH)
Size 9: 4,9 BAD (HHHHHH)
Size 10: 5,10 BAD (HHHHHH)
Size 11: 5,11 BAD (HHHHHH)
Size 12: 6,12 BAD (HHHHHH)
Size 13: 6,13 BAD (HHHHHH)
Size 14: 7,14 BAD (HHHHHH)
Size 15: 7,15 BAD (HHHHHH)
Size 16: 8,16 BAD (HHHHHH)
Size 17: 8,17 BAD (HHHHHH)
Size 18: 8,18 BAD (HHHHHH)
Size 19: 9,19 BAD (HHHHHH)
Size 20: 9,20 BAD (HHHHHH)
Size 21: 10,22 BAD (HHHHHH)
Size 22: 10,22 BAD (HHHHHH)
Size 23: 11,23 BAD (HHHHHH)
Size 24: 11,24 BAD (HHHHHH)
Size 25: 12,25 BAD (HHHHHH)
Size 26: 12,26 BAD (HHHHHH)
Size 27: 13,27 BAD (HHHHHH)
Size 28: 13,28 BAD (HHHHHH)
Size 29: 14,29 BAD (HHHHHH)
Size 30: 14,30 BAD (HHHHHH)
Size 31: 15,31 BAD (HHHHHH)
Size 32: 15,32 BAD (HHHHHH)
Size 33: 15,33 BAD (HHHHHH)
Size 34: 16,34 BAD (HHHHHH)
Size 35: 16,36 BAD (HHHHHH)
Size 36: 17,36 BAD (HHHHHH)
Size 37: 17,37 BAD (HHHHHH)
Size 38: 18,38 BAD (HHHHHH)
Size 39: 18,39 BAD (HHHHHH)
Size 40: 19,40 BAD (HHHHHH)
Size 41: 19,41 BAD (HHHHHH)
Size 42: 20,42 BAD (HHHHHH)
Size 43: 20,43 BAD (HHHHHH)
Size 44: 21,44 BAD (HHHHHH)
Size 45: 21,45 BAD (HHHHHH)
Size 46: 22,46 BAD (HHHHHH)
Size 47: 22,47 BAD (HHHHHH)
Size 48: 23,48 BAD (HHHHHH)
Size 49: 23,49 BAD (HHHHHH)
Size 50: 23,50 BAD (HHHHHH)
Size 51: 24,51 BAD (HHHHHH)
Size 52: 24,52 BAD (HHHHHH)
Size 53: 25,53 BAD (HHHHHH)
Size 54: 25,54 BAD (HHHHHH)
Size 55: 26,55 BAD (HHHHHH)
Size 56: 26,56 BAD (HHHHHH)
Size 57: 27,57 BAD (HHHHHH)
Size 58: 27,58 BAD (HHHHHH)
Size 59: 28,59 BAD (HHHHHH)
Size 60: 28,60 BAD (HHHHHH)
Size 61: 29,61 BAD (HHHHHH)
Size 62: 29,62 BAD (HHHHHH)
Size 63: 30,64 BAD (HHHHHH)
Size 64: 30,64 BAD (HHHHHH)
Size 65: 31,65 BAD (HHHHHH)
Size 66: 31,66 BAD (HHHHHH)
Size 67: 31,67 BAD (HHHHHH)
Size 68: 32,68 BAD (HHHHHH)
Size 69: 32,69 BAD (HHHHHH)
Size 70: 33,70 BAD (HHHHHH)
Size 71: 33,71 BAD (HHHHHH)
Size 72: 34,72 BAD (HHHHHH)
Size 73: 34,73 BAD (HHHHHH)
Size 74: 35,74 BAD (HHHHHH)
Size 75: 35,75 BAD (HHHHHH)
Size 76: 36,76 BAD (HHHHHH)
Size 77: 36,77 BAD (HHHHHH)
Size 78: 37,78 BAD (HHHHHH)
Size 79: 37,79 BAD (HHHHHH)
Size 80: 38,80 BAD (HHHHHH)
Size 81: 38,81 BAD (HHHHHH)
Size 82: 39,82 BAD (HHHHHH)
Size 83: 39,83 BAD (HHHHHH)
Size 84: 39,84 BAD (HHHHHH)
Size 85: 40,85 BAD (HHHHHH)
Size 86: 40,86 BAD (HHHHHH)
Size 87: 41,87 BAD (HHHHHH)
Size 88: 41,88 BAD (HHHHHH)
Size 89: 42,89 BAD (HHHHHH)
Size 90: 42,90 BAD (HHHHHH)
Size 91: 43,91 BAD (HHHHHH)
Size 92: 43,92 BAD (HHHHHH)
Size 93: 44,93 BAD (HHHHHH)
Size 94: 44,94 BAD (HHHHHH)
Size 95: 45,95 BAD (HHHHHH)
Size 96: 45,96 BAD (HHHHHH)
Size 97: 46,97 BAD (HHHHHH)
Size 98: 46,98 BAD (HHHHHH)
Size 99: 46,99 BAD (HHHHHH)
Size 100: 47,100 BAD (HHHHHH)
Windows 8.1
-----------
Size 1: 1,3 BAD (HHHHHH)
Size 2: 1,2 BAD (HHHHHH)
Size 3: 1,3 BAD (HHHHHH)
Size 4: 2,4 BAD (HHHHHH)
Size 5: 2,5 BAD (HHHHHH)
Size 6: 3,6 BAD (HHHHHH)
Size 7: 3,6 BAD (HHHHHH)
Size 8: 4,8 BAD (HHHHHH)
Size 9: 4,9 BAD (HHHHHH)
Size 10: 5,10 BAD (HHHHHH)
Size 11: 5,11 BAD (HHHHHH)
Size 12: 6,12 BAD (HHHHHH)
Size 13: 6,13 BAD (HHHHHH)
Size 14: 7,14 BAD (HHHHHH)
Size 15: 7,15 BAD (HHHHHH)
Size 16: 8,16 BAD (HHHHHH)
Size 17: 8,17 BAD (HHHHHH)
Size 18: 8,18 BAD (HHHHHH)
Size 19: 9,19 BAD (HHHHHH)
Size 20: 9,20 BAD (HHHHHH)
Size 21: 10,22 BAD (HHHHHH)
Size 22: 10,22 BAD (HHHHHH)
Size 23: 11,23 BAD (HHHHHH)
Size 24: 11,24 BAD (HHHHHH)
Size 25: 12,25 BAD (HHHHHH)
Size 26: 12,26 BAD (HHHHHH)
Size 27: 13,27 BAD (HHHHHH)
Size 28: 13,28 BAD (HHHHHH)
Size 29: 14,29 BAD (HHHHHH)
Size 30: 14,30 BAD (HHHHHH)
Size 31: 15,31 BAD (HHHHHH)
Size 32: 15,32 BAD (HHHHHH)
Size 33: 15,33 BAD (HHHHHH)
Size 34: 16,34 BAD (HHHHHH)
Size 35: 16,36 BAD (HHHHHH)
Size 36: 17,36 BAD (HHHHHH)
Size 37: 17,37 BAD (HHHHHH)
Size 38: 18,38 BAD (HHHHHH)
Size 39: 18,39 BAD (HHHHHH)
Size 40: 19,40 BAD (HHHHHH)
Size 41: 19,41 BAD (HHHHHH)
Size 42: 20,42 BAD (HHHHHH)
Size 43: 20,43 BAD (HHHHHH)
Size 44: 21,44 BAD (HHHHHH)
Size 45: 21,45 BAD (HHHHHH)
Size 46: 22,46 BAD (HHHHHH)
Size 47: 22,47 BAD (HHHHHH)
Size 48: 23,48 BAD (HHHHHH)
Size 49: 23,49 BAD (HHHHHH)
Size 50: 23,50 BAD (HHHHHH)
Size 51: 24,51 BAD (HHHHHH)
Size 52: 24,52 BAD (HHHHHH)
Size 53: 25,53 BAD (HHHHHH)
Size 54: 25,54 BAD (HHHHHH)
Size 55: 26,55 BAD (HHHHHH)
Size 56: 26,56 BAD (HHHHHH)
Size 57: 27,57 BAD (HHHHHH)
Size 58: 27,58 BAD (HHHHHH)
Size 59: 28,59 BAD (HHHHHH)
Size 60: 28,60 BAD (HHHHHH)
Size 61: 29,61 BAD (HHHHHH)
Size 62: 29,62 BAD (HHHHHH)
Size 63: 30,64 BAD (HHHHHH)
Size 64: 30,64 BAD (HHHHHH)
Size 65: 31,65 BAD (HHHHHH)
Size 66: 31,66 BAD (HHHHHH)
Size 67: 31,67 BAD (HHHHHH)
Size 68: 32,68 BAD (HHHHHH)
Size 69: 32,69 BAD (HHHHHH)
Size 70: 33,70 BAD (HHHHHH)
Size 71: 33,71 BAD (HHHHHH)
Size 72: 34,72 BAD (HHHHHH)
Size 73: 34,73 BAD (HHHHHH)
Size 74: 35,74 BAD (HHHHHH)
Size 75: 35,75 BAD (HHHHHH)
Size 76: 36,76 BAD (HHHHHH)
Size 77: 36,77 BAD (HHHHHH)
Size 78: 37,78 BAD (HHHHHH)
Size 79: 37,79 BAD (HHHHHH)
Size 80: 38,80 BAD (HHHHHH)
Size 81: 38,81 BAD (HHHHHH)
Size 82: 39,82 BAD (HHHHHH)
Size 83: 39,83 BAD (HHHHHH)
Size 84: 39,84 BAD (HHHHHH)
Size 85: 40,85 BAD (HHHHHH)
Size 86: 40,86 BAD (HHHHHH)
Size 87: 41,87 BAD (HHHHHH)
Size 88: 41,88 BAD (HHHHHH)
Size 89: 42,89 BAD (HHHHHH)
Size 90: 42,90 BAD (HHHHHH)
Size 91: 43,91 BAD (HHHHHH)
Size 92: 43,92 BAD (HHHHHH)
Size 93: 44,93 BAD (HHHHHH)
Size 94: 44,94 BAD (HHHHHH)
Size 95: 45,95 BAD (HHHHHH)
Size 96: 45,96 BAD (HHHHHH)
Size 97: 46,97 BAD (HHHHHH)
Size 98: 46,98 BAD (HHHHHH)
Size 99: 46,99 BAD (HHHHHH)
Size 100: 47,100 BAD (HHHHHH)
Windows 10 14342 Old Console
----------------------------
Size 1: 1,3 BAD (HHHHHH)
Size 2: 1,2 BAD (HHHHHH)
Size 3: 1,3 BAD (HHHHHH)
Size 4: 2,4 BAD (HHHHHH)
Size 5: 2,5 BAD (HHHHHH)
Size 6: 3,6 BAD (HHHHHH)
Size 7: 3,6 BAD (HHHHHH)
Size 8: 4,8 BAD (HHHHHH)
Size 9: 4,9 BAD (HHHHHH)
Size 10: 5,10 BAD (HHHHHH)
Size 11: 5,11 BAD (HHHHHH)
Size 12: 6,12 BAD (HHHHHH)
Size 13: 6,13 BAD (HHHHHH)
Size 14: 7,14 BAD (HHHHHH)
Size 15: 7,15 BAD (HHHHHH)
Size 16: 8,16 BAD (HHHHHH)
Size 17: 8,17 BAD (HHHHHH)
Size 18: 8,18 BAD (HHHHHH)
Size 19: 9,19 BAD (HHHHHH)
Size 20: 9,20 BAD (HHHHHH)
Size 21: 10,22 BAD (HHHHHH)
Size 22: 10,22 BAD (HHHHHH)
Size 23: 11,23 BAD (HHHHHH)
Size 24: 11,24 BAD (HHHHHH)
Size 25: 12,25 BAD (HHHHHH)
Size 26: 12,26 BAD (HHHHHH)
Size 27: 13,27 BAD (HHHHHH)
Size 28: 13,28 BAD (HHHHHH)
Size 29: 14,29 BAD (HHHHHH)
Size 30: 14,30 BAD (HHHHHH)
Size 31: 15,31 BAD (HHHHHH)
Size 32: 15,32 BAD (HHHHHH)
Size 33: 15,33 BAD (HHHHHH)
Size 34: 16,34 BAD (HHHHHH)
Size 35: 16,36 BAD (HHHHHH)
Size 36: 17,36 BAD (HHHHHH)
Size 37: 17,37 BAD (HHHHHH)
Size 38: 18,38 BAD (HHHHHH)
Size 39: 18,39 BAD (HHHHHH)
Size 40: 19,40 BAD (HHHHHH)
Size 41: 19,41 BAD (HHHHHH)
Size 42: 20,42 BAD (HHHHHH)
Size 43: 20,43 BAD (HHHHHH)
Size 44: 21,44 BAD (HHHHHH)
Size 45: 21,45 BAD (HHHHHH)
Size 46: 22,46 BAD (HHHHHH)
Size 47: 22,47 BAD (HHHHHH)
Size 48: 23,48 BAD (HHHHHH)
Size 49: 23,49 BAD (HHHHHH)
Size 50: 23,50 BAD (HHHHHH)
Size 51: 24,51 BAD (HHHHHH)
Size 52: 24,52 BAD (HHHHHH)
Size 53: 25,53 BAD (HHHHHH)
Size 54: 25,54 BAD (HHHHHH)
Size 55: 26,55 BAD (HHHHHH)
Size 56: 26,56 BAD (HHHHHH)
Size 57: 27,57 BAD (HHHHHH)
Size 58: 27,58 BAD (HHHHHH)
Size 59: 28,59 BAD (HHHHHH)
Size 60: 28,60 BAD (HHHHHH)
Size 61: 29,61 BAD (HHHHHH)
Size 62: 29,62 BAD (HHHHHH)
Size 63: 30,64 BAD (HHHHHH)
Size 64: 30,64 BAD (HHHHHH)
Size 65: 31,65 BAD (HHHHHH)
Size 66: 31,66 BAD (HHHHHH)
Size 67: 31,67 BAD (HHHHHH)
Size 68: 32,68 BAD (HHHHHH)
Size 69: 32,69 BAD (HHHHHH)
Size 70: 33,70 BAD (HHHHHH)
Size 71: 33,71 BAD (HHHHHH)
Size 72: 34,72 BAD (HHHHHH)
Size 73: 34,73 BAD (HHHHHH)
Size 74: 35,74 BAD (HHHHHH)
Size 75: 35,75 BAD (HHHHHH)
Size 76: 36,76 BAD (HHHHHH)
Size 77: 36,77 BAD (HHHHHH)
Size 78: 37,78 BAD (HHHHHH)
Size 79: 37,79 BAD (HHHHHH)
Size 80: 38,80 BAD (HHHHHH)
Size 81: 38,81 BAD (HHHHHH)
Size 82: 39,82 BAD (HHHHHH)
Size 83: 39,83 BAD (HHHHHH)
Size 84: 39,84 BAD (HHHHHH)
Size 85: 40,85 BAD (HHHHHH)
Size 86: 40,86 BAD (HHHHHH)
Size 87: 41,87 BAD (HHHHHH)
Size 88: 41,88 BAD (HHHHHH)
Size 89: 42,89 BAD (HHHHHH)
Size 90: 42,90 BAD (HHHHHH)
Size 91: 43,91 BAD (HHHHHH)
Size 92: 43,92 BAD (HHHHHH)
Size 93: 44,93 BAD (HHHHHH)
Size 94: 44,94 BAD (HHHHHH)
Size 95: 45,95 BAD (HHHHHH)
Size 96: 45,96 BAD (HHHHHH)
Size 97: 46,97 BAD (HHHHHH)
Size 98: 46,98 BAD (HHHHHH)
Size 99: 46,99 BAD (HHHHHH)
Size 100: 47,100 BAD (HHHHHH)
Windows 10 14342 New Console
----------------------------
Size 1: 1,1 BAD (HHHHHH)
Size 2: 1,2 BAD (HHHHHH)
Size 3: 1,3 BAD (HHHHHH)
Size 4: 2,4 BAD (HHHHHH)
Size 5: 2,5 BAD (HHHHHH)
Size 6: 3,6 BAD (HHHHHH)
Size 7: 3,7 BAD (HHHHHH)
Size 8: 4,8 BAD (HHHHHH)
Size 9: 4,9 BAD (HHHHHH)
Size 10: 5,10 BAD (HHHHHH)
Size 11: 5,11 BAD (HHHHHH)
Size 12: 6,12 BAD (HHHHHH)
Size 13: 6,13 BAD (HHHHHH)
Size 14: 7,14 BAD (HHHHHH)
Size 15: 7,15 BAD (HHHHHH)
Size 16: 8,16 BAD (HHHHHH)
Size 17: 8,17 BAD (HHHHHH)
Size 18: 8,18 BAD (HHHHHH)
Size 19: 9,19 BAD (HHHHHH)
Size 20: 9,20 BAD (HHHHHH)
Size 21: 10,21 BAD (HHHHHH)
Size 22: 10,22 BAD (HHHHHH)
Size 23: 11,23 BAD (HHHHHH)
Size 24: 11,24 BAD (HHHHHH)
Size 25: 12,25 BAD (HHHHHH)
Size 26: 12,26 BAD (HHHHHH)
Size 27: 13,27 BAD (HHHHHH)
Size 28: 13,28 BAD (HHHHHH)
Size 29: 14,29 BAD (HHHHHH)
Size 30: 14,30 BAD (HHHHHH)
Size 31: 15,31 BAD (HHHHHH)
Size 32: 15,32 BAD (HHHHHH)
Size 33: 15,33 BAD (HHHHHH)
Size 34: 16,34 BAD (HHHHHH)
Size 35: 16,35 BAD (HHHHHH)
Size 36: 17,36 BAD (HHHHHH)
Size 37: 17,37 BAD (HHHHHH)
Size 38: 18,38 BAD (HHHHHH)
Size 39: 18,39 BAD (HHHHHH)
Size 40: 19,40 BAD (HHHHHH)
Size 41: 19,41 BAD (HHHHHH)
Size 42: 20,42 BAD (HHHHHH)
Size 43: 20,43 BAD (HHHHHH)
Size 44: 21,44 BAD (HHHHHH)
Size 45: 21,45 BAD (HHHHHH)
Size 46: 22,46 BAD (HHHHHH)
Size 47: 22,47 BAD (HHHHHH)
Size 48: 23,48 BAD (HHHHHH)
Size 49: 23,49 BAD (HHHHHH)
Size 50: 23,50 BAD (HHHHHH)
Size 51: 24,51 BAD (HHHHHH)
Size 52: 24,52 BAD (HHHHHH)
Size 53: 25,53 BAD (HHHHHH)
Size 54: 25,54 BAD (HHHHHH)
Size 55: 26,55 BAD (HHHHHH)
Size 56: 26,56 BAD (HHHHHH)
Size 57: 27,57 BAD (HHHHHH)
Size 58: 27,58 BAD (HHHHHH)
Size 59: 28,59 BAD (HHHHHH)
Size 60: 28,60 BAD (HHHHHH)
Size 61: 29,61 BAD (HHHHHH)
Size 62: 29,62 BAD (HHHHHH)
Size 63: 30,63 BAD (HHHHHH)
Size 64: 30,64 BAD (HHHHHH)
Size 65: 31,65 BAD (HHHHHH)
Size 66: 31,66 BAD (HHHHHH)
Size 67: 31,67 BAD (HHHHHH)
Size 68: 32,68 BAD (HHHHHH)
Size 69: 32,69 BAD (HHHHHH)
Size 70: 33,70 BAD (HHHHHH)
Size 71: 33,71 BAD (HHHHHH)
Size 72: 34,72 BAD (HHHHHH)
Size 73: 34,73 BAD (HHHHHH)
Size 74: 35,74 BAD (HHHHHH)
Size 75: 35,75 BAD (HHHHHH)
Size 76: 36,76 BAD (HHHHHH)
Size 77: 36,77 BAD (HHHHHH)
Size 78: 37,78 BAD (HHHHHH)
Size 79: 37,79 BAD (HHHHHH)
Size 80: 38,80 BAD (HHHHHH)
Size 81: 38,81 BAD (HHHHHH)
Size 82: 39,82 BAD (HHHHHH)
Size 83: 39,83 BAD (HHHHHH)
Size 84: 39,84 BAD (HHHHHH)
Size 85: 40,85 BAD (HHHHHH)
Size 86: 40,86 BAD (HHHHHH)
Size 87: 41,87 BAD (HHHHHH)
Size 88: 41,88 BAD (HHHHHH)
Size 89: 42,89 BAD (HHHHHH)
Size 90: 42,90 BAD (HHHHHH)
Size 91: 43,91 BAD (HHHHHH)
Size 92: 43,92 BAD (HHHHHH)
Size 93: 44,93 BAD (HHHHHH)
Size 94: 44,94 BAD (HHHHHH)
Size 95: 45,95 BAD (HHHHHH)
Size 96: 45,96 BAD (HHHHHH)
Size 97: 46,97 BAD (HHHHHH)
Size 98: 46,98 BAD (HHHHHH)
Size 99: 46,99 BAD (HHHHHH)
Size 100: 47,100 BAD (HHHHHH)
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var timerRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'status']]
};
var _default = exports.default = timerRole;
@@ -0,0 +1,76 @@
# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
> Detect whether a terminal supports color
## Install
```
$ npm install supports-color
```
## Usage
```js
const supportsColor = require('supports-color');
if (supportsColor.stdout) {
console.log('Terminal stdout supports color');
}
if (supportsColor.stdout.has256) {
console.log('Terminal stdout supports 256 colors');
}
if (supportsColor.stderr.has16m) {
console.log('Terminal stderr supports 16 million colors (truecolor)');
}
```
## API
Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported.
The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag:
- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)
- `.level = 2` and `.has256 = true`: 256 color support
- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors)
## Info
It obeys the `--color` and `--no-color` CLI flags.
For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
## Related
- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-supports-color?utm_source=npm-supports-color&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
---
@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var checkboxRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: true,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {
'aria-checked': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-invalid': null,
'aria-readonly': null,
'aria-required': null
},
relatedConcepts: [{
concept: {
attributes: [{
name: 'type',
value: 'checkbox'
}],
name: 'input'
},
module: 'HTML'
}, {
concept: {
name: 'option'
},
module: 'ARIA'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {
'aria-checked': null
},
superClass: [['roletype', 'widget', 'input']]
};
var _default = exports.default = checkboxRole;
@@ -0,0 +1,295 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var multilineCommentStyle = utils.createRule({
name: "multiline-comment-style",
package: "js",
meta: {
type: "suggestion",
docs: {
description: "Enforce a particular style for multiline comments"
},
fixable: "whitespace",
schema: {
anyOf: [
{
type: "array",
items: [
{
enum: ["starred-block", "bare-block"],
type: "string"
}
],
additionalItems: false
},
{
type: "array",
items: [
{
enum: ["separate-lines"],
type: "string"
},
{
type: "object",
properties: {
checkJSDoc: {
type: "boolean"
}
},
additionalProperties: false
}
],
additionalItems: false
}
]
},
messages: {
expectedBlock: "Expected a block comment instead of consecutive line comments.",
expectedBareBlock: "Expected a block comment without padding stars.",
startNewline: "Expected a linebreak after '/*'.",
endNewline: "Expected a linebreak before '*/'.",
missingStar: "Expected a '*' at the start of this line.",
alignment: "Expected this line to be aligned with the start of the comment.",
expectedLines: "Expected multiple line comments instead of a block comment."
}
},
create(context) {
const sourceCode = context.sourceCode;
const option = context.options[0] || "starred-block";
const params = context.options[1] || {};
const checkJSDoc = !!params.checkJSDoc;
function isStarredCommentLine(line) {
return /^\s*\*/u.test(line);
}
function isStarredBlockComment([firstComment]) {
if (firstComment.type !== "Block")
return false;
const lines = firstComment.value.split(utils.LINEBREAK_MATCHER);
return lines.length > 0 && lines.every((line, i) => (i === 0 || i === lines.length - 1 ? /^\s*$/u : /^\s*\*/u).test(line));
}
function isJSDocComment([firstComment]) {
if (firstComment.type !== "Block")
return false;
const lines = firstComment.value.split(utils.LINEBREAK_MATCHER);
return /^\*\s*$/u.test(lines[0]) && lines.slice(1, -1).every((line) => /^\s* /u.test(line)) && /^\s*$/u.test(lines.at(-1));
}
function processSeparateLineComments(commentGroup) {
const allLinesHaveLeadingSpace = commentGroup.map(({ value }) => value).filter((line) => line.trim().length).every((line) => line.startsWith(" "));
return commentGroup.map(({ value }) => allLinesHaveLeadingSpace ? value.replace(/^ /u, "") : value);
}
function processStarredBlockComment(comment) {
const lines = comment.value.split(utils.LINEBREAK_MATCHER).filter((line, i, linesArr) => !(i === 0 || i === linesArr.length - 1)).map((line) => line.replace(/^\s*$/u, ""));
const allLinesHaveLeadingSpace = lines.map((line) => line.replace(/\s*\*/u, "")).filter((line) => line.trim().length).every((line) => line.startsWith(" "));
return lines.map((line) => line.replace(allLinesHaveLeadingSpace ? /\s*\* ?/u : /\s*\*/u, ""));
}
function processBareBlockComment(comment) {
const lines = comment.value.split(utils.LINEBREAK_MATCHER).map((line) => line.replace(/^\s*$/u, ""));
const leadingWhitespace = `${sourceCode.text.slice(comment.range[0] - comment.loc.start.column, comment.range[0])} `;
let offset = "";
for (const [i, line] of lines.entries()) {
if (!line.trim().length || i === 0)
continue;
const [, lineOffset] = line.match(/^(\s*\*?\s*)/u);
if (lineOffset.length < leadingWhitespace.length) {
const newOffset = leadingWhitespace.slice(lineOffset.length - leadingWhitespace.length);
if (newOffset.length > offset.length)
offset = newOffset;
}
}
return lines.map((line) => {
const match = line.match(/^(\s*\*?\s*)(.*)/u);
const [, lineOffset, lineContents] = match;
if (lineOffset.length > leadingWhitespace.length)
return `${lineOffset.slice(leadingWhitespace.length - (offset.length + lineOffset.length))}${lineContents}`;
if (lineOffset.length < leadingWhitespace.length)
return `${lineOffset.slice(leadingWhitespace.length)}${lineContents}`;
return lineContents;
});
}
function getCommentLines(commentGroup) {
const [firstComment] = commentGroup;
if (firstComment.type === "Line")
return processSeparateLineComments(commentGroup);
if (isStarredBlockComment(commentGroup))
return processStarredBlockComment(firstComment);
return processBareBlockComment(firstComment);
}
function getInitialOffset(comment) {
return sourceCode.text.slice(comment.range[0] - comment.loc.start.column, comment.range[0]);
}
function convertToStarredBlock(firstComment, commentLinesList) {
const initialOffset = getInitialOffset(firstComment);
return `/*
${commentLinesList.map((line) => `${initialOffset} * ${line}`).join("\n")}
${initialOffset} */`;
}
function convertToSeparateLines(firstComment, commentLinesList) {
return commentLinesList.map((line) => `// ${line}`).join(`
${getInitialOffset(firstComment)}`);
}
function convertToBlock(firstComment, commentLinesList) {
return `/* ${commentLinesList.join(`
${getInitialOffset(firstComment)} `)} */`;
}
const commentGroupCheckers = {
"starred-block": function(commentGroup) {
const [firstComment] = commentGroup;
const commentLines = getCommentLines(commentGroup);
if (commentLines.some((value) => value.includes("*/")))
return;
if (commentGroup.length > 1) {
context.report({
loc: {
start: firstComment.loc.start,
end: commentGroup.at(-1).loc.end
},
messageId: "expectedBlock",
fix(fixer) {
const range = [firstComment.range[0], commentGroup.at(-1).range[1]];
return commentLines.some((value) => value.startsWith("/")) ? null : fixer.replaceTextRange(range, convertToStarredBlock(firstComment, commentLines));
}
});
} else {
const lines = firstComment.value.split(utils.LINEBREAK_MATCHER);
const expectedLeadingWhitespace = getInitialOffset(firstComment);
const expectedLinePrefix = `${expectedLeadingWhitespace} *`;
if (!/^\*?\s*$/u.test(lines[0])) {
const start = firstComment.value.startsWith("*") ? firstComment.range[0] + 1 : firstComment.range[0];
context.report({
loc: {
start: firstComment.loc.start,
end: { line: firstComment.loc.start.line, column: firstComment.loc.start.column + 2 }
},
messageId: "startNewline",
fix: (fixer) => fixer.insertTextAfterRange([start, start + 2], `
${expectedLinePrefix}`)
});
}
if (!/^\s*$/u.test(lines.at(-1))) {
context.report({
loc: {
start: { line: firstComment.loc.end.line, column: firstComment.loc.end.column - 2 },
end: firstComment.loc.end
},
messageId: "endNewline",
fix: (fixer) => fixer.replaceTextRange([firstComment.range[1] - 2, firstComment.range[1]], `
${expectedLinePrefix}/`)
});
}
for (let lineNumber = firstComment.loc.start.line + 1; lineNumber <= firstComment.loc.end.line; lineNumber++) {
const lineText = sourceCode.lines[lineNumber - 1];
const errorType = isStarredCommentLine(lineText) ? "alignment" : "missingStar";
if (!lineText.startsWith(expectedLinePrefix)) {
context.report({
loc: {
start: { line: lineNumber, column: 0 },
end: { line: lineNumber, column: lineText.length }
},
messageId: errorType,
fix(fixer) {
const lineStartIndex = sourceCode.getIndexFromLoc({ line: lineNumber, column: 0 });
if (errorType === "alignment") {
const [, commentTextPrefix2 = ""] = lineText.match(/^(\s*\*)/u) || [];
const commentTextStartIndex2 = lineStartIndex + commentTextPrefix2.length;
return fixer.replaceTextRange([lineStartIndex, commentTextStartIndex2], expectedLinePrefix);
}
const [, commentTextPrefix = ""] = lineText.match(/^(\s*)/u) || [];
const commentTextStartIndex = lineStartIndex + commentTextPrefix.length;
let offset;
for (const [idx, line] of lines.entries()) {
if (!/\S+/u.test(line))
continue;
const lineTextToAlignWith = sourceCode.lines[firstComment.loc.start.line - 1 + idx];
const [, prefix = "", initialOffset = ""] = lineTextToAlignWith.match(/^(\s*(?:\/?\*)?(\s*))/u) || [];
offset = `${commentTextPrefix.slice(prefix.length)}${initialOffset}`;
if (/^\s*\//u.test(lineText) && offset.length === 0)
offset += " ";
break;
}
return fixer.replaceTextRange([lineStartIndex, commentTextStartIndex], `${expectedLinePrefix}${offset}`);
}
});
}
}
}
},
"separate-lines": function(commentGroup) {
const [firstComment] = commentGroup;
const isJSDoc = isJSDocComment(commentGroup);
if (firstComment.type !== "Block" || !checkJSDoc && isJSDoc)
return;
let commentLines = getCommentLines(commentGroup);
if (isJSDoc)
commentLines = commentLines.slice(1, commentLines.length - 1);
const tokenAfter = sourceCode.getTokenAfter(firstComment, { includeComments: true });
if (tokenAfter && firstComment.loc.end.line === tokenAfter.loc.start.line)
return;
context.report({
loc: {
start: firstComment.loc.start,
end: { line: firstComment.loc.start.line, column: firstComment.loc.start.column + 2 }
},
messageId: "expectedLines",
fix(fixer) {
return fixer.replaceText(firstComment, convertToSeparateLines(firstComment, commentLines));
}
});
},
"bare-block": function(commentGroup) {
if (isJSDocComment(commentGroup))
return;
const [firstComment] = commentGroup;
const commentLines = getCommentLines(commentGroup);
if (firstComment.type === "Line" && commentLines.length > 1 && !commentLines.some((value) => value.includes("*/"))) {
context.report({
loc: {
start: firstComment.loc.start,
end: commentGroup.at(-1).loc.end
},
messageId: "expectedBlock",
fix(fixer) {
return fixer.replaceTextRange(
[firstComment.range[0], commentGroup.at(-1).range[1]],
convertToBlock(firstComment, commentLines)
);
}
});
}
if (isStarredBlockComment(commentGroup)) {
context.report({
loc: {
start: firstComment.loc.start,
end: { line: firstComment.loc.start.line, column: firstComment.loc.start.column + 2 }
},
messageId: "expectedBareBlock",
fix(fixer) {
return fixer.replaceText(firstComment, convertToBlock(firstComment, commentLines));
}
});
}
}
};
return {
Program() {
return sourceCode.getAllComments().filter((comment) => comment.type !== "Shebang").filter((comment) => !utils.COMMENTS_IGNORE_PATTERN.test(comment.value)).filter((comment) => {
const tokenBefore = sourceCode.getTokenBefore(comment, { includeComments: true });
return !tokenBefore || tokenBefore.loc.end.line < comment.loc.start.line;
}).reduce((commentGroups, comment, index, commentList) => {
const tokenBefore = sourceCode.getTokenBefore(comment, { includeComments: true });
if (comment.type === "Line" && index && commentList[index - 1].type === "Line" && tokenBefore && tokenBefore.loc.end.line === comment.loc.start.line - 1 && tokenBefore === commentList[index - 1]) {
commentGroups.at(-1).push(comment);
} else {
commentGroups.push([comment]);
}
return commentGroups;
}, []).filter((commentGroup) => !(commentGroup.length === 1 && commentGroup[0].loc.start.line === commentGroup[0].loc.end.line)).forEach(commentGroupCheckers[option]);
}
};
}
});
module.exports = multilineCommentStyle;
@@ -0,0 +1,8 @@
import type { CollectionItem, Token } from './cst';
/**
* Stringify a CST document, token, or collection item
*
* Fair warning: This applies no validation whatsoever, and
* simply concatenates the sources in their logical order.
*/
export declare const stringify: (cst: Token | CollectionItem) => string;
@@ -0,0 +1,31 @@
/**
* Extractor function for a UnaryExpression type value node.
* A unary expression is an expression with a unary operator.
* For example, !"foobar" will evaluate to false, so this will return false.
*
* @param - value - AST Value object with type `UnaryExpression`
* @returns - The extracted value converted to correct type.
*/
export default function extractValueFromUnaryExpression(value) {
// eslint-disable-next-line global-require
const getValue = require('.').default;
const { operator, argument } = value;
switch (operator) {
case '-':
return -getValue(argument);
case '+':
return +getValue(argument); // eslint-disable-line no-implicit-coercion
case '!':
return !getValue(argument);
case '~':
return ~getValue(argument); // eslint-disable-line no-bitwise
case 'delete':
// I believe delete statements evaluate to true.
return true;
case 'typeof':
case 'void':
default:
return undefined;
}
}
@@ -0,0 +1,6 @@
export type ClassValue = ClassArray | ClassDictionary | string | number | bigint | null | boolean | undefined;
export type ClassDictionary = Record<string, any>;
export type ClassArray = ClassValue[];
export function clsx(...inputs: ClassValue[]): string;
export default clsx;
@@ -0,0 +1,138 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = populatePlaceholders;
var _t = require("@babel/types");
const {
blockStatement,
cloneNode,
emptyStatement,
expressionStatement,
identifier,
isStatement,
isStringLiteral,
stringLiteral,
validate
} = _t;
function populatePlaceholders(metadata, replacements) {
const ast = cloneNode(metadata.ast);
if (replacements) {
metadata.placeholders.forEach(placeholder => {
if (!hasOwnProperty.call(replacements, placeholder.name)) {
const placeholderName = placeholder.name;
throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a
placeholder you may want to consider passing one of the following options to @babel/template:
- { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}
- { placeholderPattern: /^${placeholderName}$/ }`);
}
});
Object.keys(replacements).forEach(key => {
if (!metadata.placeholderNames.has(key)) {
throw new Error(`Unknown substitution "${key}" given`);
}
});
}
metadata.placeholders.slice().reverse().forEach(placeholder => {
try {
var _ref;
applyReplacement(placeholder, ast, (_ref = replacements && replacements[placeholder.name]) != null ? _ref : null);
} catch (e) {
e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
throw e;
}
});
return ast;
}
function applyReplacement(placeholder, ast, replacement) {
if (placeholder.isDuplicate) {
if (Array.isArray(replacement)) {
replacement = replacement.map(node => cloneNode(node));
} else if (typeof replacement === "object") {
replacement = cloneNode(replacement);
}
}
const {
parent,
key,
index
} = placeholder.resolve(ast);
if (placeholder.type === "string") {
if (typeof replacement === "string") {
replacement = stringLiteral(replacement);
}
if (!replacement || !isStringLiteral(replacement)) {
throw new Error("Expected string substitution");
}
} else if (placeholder.type === "statement") {
if (index === undefined) {
if (!replacement) {
replacement = emptyStatement();
} else if (Array.isArray(replacement)) {
replacement = blockStatement(replacement);
} else if (typeof replacement === "string") {
replacement = expressionStatement(identifier(replacement));
} else if (!isStatement(replacement)) {
replacement = expressionStatement(replacement);
}
} else {
if (replacement && !Array.isArray(replacement)) {
if (typeof replacement === "string") {
replacement = identifier(replacement);
}
if (!isStatement(replacement)) {
replacement = expressionStatement(replacement);
}
}
}
} else if (placeholder.type === "param") {
if (typeof replacement === "string") {
replacement = identifier(replacement);
}
if (index === undefined) throw new Error("Assertion failure.");
} else {
if (typeof replacement === "string") {
replacement = identifier(replacement);
}
if (Array.isArray(replacement)) {
throw new Error("Cannot replace single expression with an array.");
}
}
function set(parent, key, value) {
const node = parent[key];
parent[key] = value;
if (node.type === "Identifier" || node.type === "Placeholder") {
if (node.typeAnnotation) {
value.typeAnnotation = node.typeAnnotation;
}
if (node.optional) {
value.optional = node.optional;
}
if (node.decorators) {
value.decorators = node.decorators;
}
}
}
if (index === undefined) {
validate(parent, key, replacement);
set(parent, key, replacement);
} else {
const items = parent[key].slice();
if (placeholder.type === "statement" || placeholder.type === "param") {
if (replacement == null) {
items.splice(index, 1);
} else if (Array.isArray(replacement)) {
items.splice(index, 1, ...replacement);
} else {
set(items, index, replacement);
}
} else {
set(items, index, replacement);
}
validate(parent, key, items);
parent[key] = items;
}
}
//# sourceMappingURL=populate.js.map
@@ -0,0 +1,67 @@
import {useCollator as $325a3faab7a68acd$export$a16aca283550c30d} from "./useCollator.module.js";
import {useCallback as $21ck9$useCallback, useMemo as $21ck9$useMemo} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $bb77f239b46e8c72$export$3274cf84b703fff(options) {
let collator = (0, $325a3faab7a68acd$export$a16aca283550c30d)({
usage: 'search',
...options
});
// TODO(later): these methods don't currently support the ignorePunctuation option.
let startsWith = (0, $21ck9$useCallback)((string, substring)=>{
if (substring.length === 0) return true;
// Normalize both strings so we can slice safely
// TODO: take into account the ignorePunctuation option as well...
string = string.normalize('NFC');
substring = substring.normalize('NFC');
return collator.compare(string.slice(0, substring.length), substring) === 0;
}, [
collator
]);
let endsWith = (0, $21ck9$useCallback)((string, substring)=>{
if (substring.length === 0) return true;
string = string.normalize('NFC');
substring = substring.normalize('NFC');
return collator.compare(string.slice(-substring.length), substring) === 0;
}, [
collator
]);
let contains = (0, $21ck9$useCallback)((string, substring)=>{
if (substring.length === 0) return true;
string = string.normalize('NFC');
substring = substring.normalize('NFC');
let scan = 0;
let sliceLen = substring.length;
for(; scan + sliceLen <= string.length; scan++){
let slice = string.slice(scan, scan + sliceLen);
if (collator.compare(substring, slice) === 0) return true;
}
return false;
}, [
collator
]);
return (0, $21ck9$useMemo)(()=>({
startsWith: startsWith,
endsWith: endsWith,
contains: contains
}), [
startsWith,
endsWith,
contains
]);
}
export {$bb77f239b46e8c72$export$3274cf84b703fff as useFilter};
//# sourceMappingURL=useFilter.module.js.map
@@ -0,0 +1,12 @@
/**
* This is a compatibility ruleset that:
* - disables rules from eslint:recommended which are already handled by TypeScript.
* - enables rules that make sense due to TS's typechecking / transpilation.
*/
declare const _default: {
overrides: {
files: string[];
rules: Record<string, "error" | "off" | "warn">;
}[];
};
export = _default;
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAyBM,SAAS,0CAAiC,GAAG,IAAO;IACzD,oFAAoF;IACpF,uDAAuD;IACvD,IAAI,SAAgB;QAAC,GAAG,IAAI,CAAC,EAAE;IAAA;IAC/B,IAAK,IAAI,IAAI,GAAG,IAAI,KAAK,MAAM,EAAE,IAAK;QACpC,IAAI,QAAQ,IAAI,CAAC,EAAE;QACnB,IAAK,IAAI,OAAO,MAAO;YACrB,IAAI,IAAI,MAAM,CAAC,IAAI;YACnB,IAAI,IAAI,KAAK,CAAC,IAAI;YAElB,eAAe;YACf,IACE,OAAO,MAAM,cACb,OAAO,MAAM,cACb,qCAAqC;YACrC,GAAG,CAAC,EAAE,KAAK,OACX,GAAG,CAAC,EAAE,KAAK,OACX,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,MAC/B,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,IAE/B,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,yCAAI,EAAE,GAAG;iBAGlB,IACL,AAAC,CAAA,QAAQ,eAAe,QAAQ,kBAAiB,KACjD,OAAO,MAAM,YACb,OAAO,MAAM,UAEb,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,WAAG,EAAE,GAAG;iBACjB,IAAI,QAAQ,QAAQ,KAAK,GAC9B,OAAO,EAAE,GAAG,CAAA,GAAA,yCAAO,EAAE,GAAG;iBAGxB,MAAM,CAAC,IAAI,GAAG,MAAM,YAAY,IAAI;QAExC;IACF;IAEA,OAAO;AACT","sources":["packages/@react-aria/utils/src/mergeProps.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n // Start with a base clone of the first argument. This is a lot faster than starting\n // with an empty object and adding properties as we go.\n let result: Props = {...args[0]};\n for (let i = 1; i < args.length; i++) {\n let props = args[i];\n for (let key in props) {\n let a = result[key];\n let b = props[key];\n\n // Chain events\n if (\n typeof a === 'function' &&\n typeof b === 'function' &&\n // This is a lot faster than a regex.\n key[0] === 'o' &&\n key[1] === 'n' &&\n key.charCodeAt(2) >= /* 'A' */ 65 &&\n key.charCodeAt(2) <= /* 'Z' */ 90\n ) {\n result[key] = chain(a, b);\n\n // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n } else if (\n (key === 'className' || key === 'UNSAFE_className') &&\n typeof a === 'string' &&\n typeof b === 'string'\n ) {\n result[key] = clsx(a, b);\n } else if (key === 'id' && a && b) {\n result.id = mergeIds(a, b);\n // Override others\n } else {\n result[key] = b !== undefined ? b : a;\n }\n }\n }\n\n return result as UnionToIntersection<TupleTypes<T>>;\n}\n"],"names":[],"version":3,"file":"mergeProps.module.js.map"}
@@ -0,0 +1,8 @@
/**
* Check if the given character code, or the character code at the first
* character, is decimal.
*
* @param {string|number} character
* @returns {boolean} Whether `character` is a decimal
*/
export function isDecimal(character: string | number): boolean
@@ -0,0 +1,32 @@
import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from "./useLayoutEffect.mjs";
import {useRef as $lmaYr$useRef, useCallback as $lmaYr$useCallback} from "react";
/*
* Copyright 2023 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
const ref = (0, $lmaYr$useRef)(null);
(0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{
ref.current = fn;
}, [
fn
]);
// @ts-ignore
return (0, $lmaYr$useCallback)((...args)=>{
const f = ref.current;
return f === null || f === void 0 ? void 0 : f(...args);
}, []);
}
export {$8ae05eaa5c114e9c$export$7f54fc3180508a52 as useEffectEvent};
//# sourceMappingURL=useEffectEvent.module.js.map
@@ -0,0 +1,19 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/types.ts
var types_exports = {};
module.exports = __toCommonJS(types_exports);
@@ -0,0 +1,5 @@
/**
* http://ecma-international.org/ecma-402/7.0/index.html#sec-canonicalizelocalelist
* @param locales
*/
export declare function CanonicalizeLocaleList(locales?: string | readonly string[]): string[];
@@ -0,0 +1,10 @@
export default {
settings: {
'import-x/resolver': {
node: {
extensions: ['.js', '.web.js', '.ios.js', '.android.js'],
},
},
},
};
//# sourceMappingURL=react-native.js.map
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Fabian Hiller
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,56 @@
import { test } from "vitest";
import * as z from "zod/v3";
const crazySchema = z.object({
tuple: z.tuple([
z.string().nullable().optional(),
z.number().nullable().optional(),
z.boolean().nullable().optional(),
z.null().nullable().optional(),
z.undefined().nullable().optional(),
z.literal("1234").nullable().optional(),
]),
merged: z
.object({
k1: z.string().optional(),
})
.merge(z.object({ k1: z.string().nullable(), k2: z.number() })),
union: z.array(z.union([z.literal("asdf"), z.literal(12)])).nonempty(),
array: z.array(z.number()),
// sumTransformer: z.transformer(z.array(z.number()), z.number(), (arg) => {
// return arg.reduce((a, b) => a + b, 0);
// }),
sumMinLength: z.array(z.number()).refine((arg) => arg.length > 5),
intersection: z.intersection(z.object({ p1: z.string().optional() }), z.object({ p1: z.number().optional() })),
enum: z.intersection(z.enum(["zero", "one"]), z.enum(["one", "two"])),
nonstrict: z.object({ points: z.number() }).nonstrict(),
numProm: z.promise(z.number()),
lenfun: z.function(z.tuple([z.string()]), z.boolean()),
});
// const asyncCrazySchema = crazySchema.extend({
// // async_transform: z.transformer(
// // z.array(z.number()),
// // z.number(),
// // async (arg) => {
// // return arg.reduce((a, b) => a + b, 0);
// // }
// // ),
// async_refine: z.array(z.number()).refine(async (arg) => arg.length > 5),
// });
test("parse", () => {
crazySchema.parse({
tuple: ["asdf", 1234, true, null, undefined, "1234"],
merged: { k1: "asdf", k2: 12 },
union: ["asdf", 12, "asdf", 12, "asdf", 12],
array: [12, 15, 16],
// sumTransformer: [12, 15, 16],
sumMinLength: [12, 15, 16, 98, 24, 63],
intersection: {},
enum: "one",
nonstrict: { points: 1234 },
numProm: Promise.resolve(12),
lenfun: (x: string) => x.length,
});
});
@@ -0,0 +1,62 @@
'use strict';var _contextCompat = require('eslint-module-utils/contextCompat');
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
type: 'suggestion',
docs: {
category: 'Helpful warnings',
description: 'Forbid the use of mutable exports with `var` or `let`.',
url: (0, _docsUrl2['default'])('no-mutable-exports') },
schema: [] },
create: function () {function create(context) {
function checkDeclaration(node) {var
kind = node.kind;
if (kind === 'var' || kind === 'let') {
context.report(node, 'Exporting mutable \'' + String(kind) + '\' binding, use \'const\' instead.');
}
}
/** @type {(scope: import('eslint').Scope.Scope, name: string) => void} */
function checkDeclarationsInScope(_ref, name) {var variables = _ref.variables;
variables.
filter(function (variable) {return variable.name === name;}).
forEach(function (variable) {
variable.defs.
filter(function (def) {return def.type === 'Variable' && def.parent;}).
forEach(function (def) {
checkDeclaration(def.parent);
});
});
}
return {
/** @param {import('estree').ExportDefaultDeclaration} node */
ExportDefaultDeclaration: function () {function ExportDefaultDeclaration(node) {
var scope = (0, _contextCompat.getScope)(context, node);
if ('name' in node.declaration && node.declaration.name) {
checkDeclarationsInScope(scope, node.declaration.name);
}
}return ExportDefaultDeclaration;}(),
/** @param {import('estree').ExportNamedDeclaration} node */
ExportNamedDeclaration: function () {function ExportNamedDeclaration(node) {
var scope = (0, _contextCompat.getScope)(context, node);
if ('declaration' in node && node.declaration) {
checkDeclaration(node.declaration);
} else if (!('source' in node) || !node.source) {
node.specifiers.forEach(function (specifier) {
checkDeclarationsInScope(scope, specifier.local.name);
});
}
}return ExportNamedDeclaration;}() };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1tdXRhYmxlLWV4cG9ydHMuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsImNhdGVnb3J5IiwiZGVzY3JpcHRpb24iLCJ1cmwiLCJzY2hlbWEiLCJjcmVhdGUiLCJjb250ZXh0IiwiY2hlY2tEZWNsYXJhdGlvbiIsIm5vZGUiLCJraW5kIiwicmVwb3J0IiwiY2hlY2tEZWNsYXJhdGlvbnNJblNjb3BlIiwibmFtZSIsInZhcmlhYmxlcyIsImZpbHRlciIsInZhcmlhYmxlIiwiZm9yRWFjaCIsImRlZnMiLCJkZWYiLCJwYXJlbnQiLCJFeHBvcnREZWZhdWx0RGVjbGFyYXRpb24iLCJzY29wZSIsImRlY2xhcmF0aW9uIiwiRXhwb3J0TmFtZWREZWNsYXJhdGlvbiIsInNvdXJjZSIsInNwZWNpZmllcnMiLCJzcGVjaWZpZXIiLCJsb2NhbCJdLCJtYXBwaW5ncyI6ImFBQUE7O0FBRUEscUM7O0FBRUE7QUFDQUEsT0FBT0MsT0FBUCxHQUFpQjtBQUNmQyxRQUFNO0FBQ0pDLFVBQU0sWUFERjtBQUVKQyxVQUFNO0FBQ0pDLGdCQUFVLGtCQUROO0FBRUpDLG1CQUFhLHdEQUZUO0FBR0pDLFdBQUssMEJBQVEsb0JBQVIsQ0FIRCxFQUZGOztBQU9KQyxZQUFRLEVBUEosRUFEUzs7O0FBV2ZDLFFBWGUsK0JBV1JDLE9BWFEsRUFXQztBQUNkLGVBQVNDLGdCQUFULENBQTBCQyxJQUExQixFQUFnQztBQUN0QkMsWUFEc0IsR0FDYkQsSUFEYSxDQUN0QkMsSUFEc0I7QUFFOUIsWUFBSUEsU0FBUyxLQUFULElBQWtCQSxTQUFTLEtBQS9CLEVBQXNDO0FBQ3BDSCxrQkFBUUksTUFBUixDQUFlRixJQUFmLGtDQUEyQ0MsSUFBM0M7QUFDRDtBQUNGOztBQUVEO0FBQ0EsZUFBU0Usd0JBQVQsT0FBaURDLElBQWpELEVBQXVELEtBQW5CQyxTQUFtQixRQUFuQkEsU0FBbUI7QUFDckRBO0FBQ0dDLGNBREgsQ0FDVSxVQUFDQyxRQUFELFVBQWNBLFNBQVNILElBQVQsS0FBa0JBLElBQWhDLEVBRFY7QUFFR0ksZUFGSCxDQUVXLFVBQUNELFFBQUQsRUFBYztBQUNyQkEsbUJBQVNFLElBQVQ7QUFDR0gsZ0JBREgsQ0FDVSxVQUFDSSxHQUFELFVBQVNBLElBQUluQixJQUFKLEtBQWEsVUFBYixJQUEyQm1CLElBQUlDLE1BQXhDLEVBRFY7QUFFR0gsaUJBRkgsQ0FFVyxVQUFDRSxHQUFELEVBQVM7QUFDaEJYLDZCQUFpQlcsSUFBSUMsTUFBckI7QUFDRCxXQUpIO0FBS0QsU0FSSDtBQVNEOztBQUVELGFBQU87QUFDTDtBQUNBQyxnQ0FGSyxpREFFb0JaLElBRnBCLEVBRTBCO0FBQzdCLGdCQUFNYSxRQUFRLDZCQUFTZixPQUFULEVBQWtCRSxJQUFsQixDQUFkOztBQUVBLGdCQUFJLFVBQVVBLEtBQUtjLFdBQWYsSUFBOEJkLEtBQUtjLFdBQUwsQ0FBaUJWLElBQW5ELEVBQXlEO0FBQ3ZERCx1Q0FBeUJVLEtBQXpCLEVBQWdDYixLQUFLYyxXQUFMLENBQWlCVixJQUFqRDtBQUNEO0FBQ0YsV0FSSTs7QUFVTDtBQUNBVyw4QkFYSywrQ0FXa0JmLElBWGxCLEVBV3dCO0FBQzNCLGdCQUFNYSxRQUFRLDZCQUFTZixPQUFULEVBQWtCRSxJQUFsQixDQUFkOztBQUVBLGdCQUFJLGlCQUFpQkEsSUFBakIsSUFBeUJBLEtBQUtjLFdBQWxDLEVBQWdEO0FBQzlDZiwrQkFBaUJDLEtBQUtjLFdBQXRCO0FBQ0QsYUFGRCxNQUVPLElBQUksRUFBRSxZQUFZZCxJQUFkLEtBQXVCLENBQUNBLEtBQUtnQixNQUFqQyxFQUF5QztBQUM5Q2hCLG1CQUFLaUIsVUFBTCxDQUFnQlQsT0FBaEIsQ0FBd0IsVUFBQ1UsU0FBRCxFQUFlO0FBQ3JDZix5Q0FBeUJVLEtBQXpCLEVBQWdDSyxVQUFVQyxLQUFWLENBQWdCZixJQUFoRDtBQUNELGVBRkQ7QUFHRDtBQUNGLFdBckJJLG1DQUFQOztBQXVCRCxLQXZEYyxtQkFBakIiLCJmaWxlIjoibm8tbXV0YWJsZS1leHBvcnRzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZ2V0U2NvcGUgfSBmcm9tICdlc2xpbnQtbW9kdWxlLXV0aWxzL2NvbnRleHRDb21wYXQnO1xuXG5pbXBvcnQgZG9jc1VybCBmcm9tICcuLi9kb2NzVXJsJztcblxuLyoqIEB0eXBlIHtpbXBvcnQoJ2VzbGludCcpLlJ1bGUuUnVsZU1vZHVsZX0gKi9cbm1vZHVsZS5leHBvcnRzID0ge1xuICBtZXRhOiB7XG4gICAgdHlwZTogJ3N1Z2dlc3Rpb24nLFxuICAgIGRvY3M6IHtcbiAgICAgIGNhdGVnb3J5OiAnSGVscGZ1bCB3YXJuaW5ncycsXG4gICAgICBkZXNjcmlwdGlvbjogJ0ZvcmJpZCB0aGUgdXNlIG9mIG11dGFibGUgZXhwb3J0cyB3aXRoIGB2YXJgIG9yIGBsZXRgLicsXG4gICAgICB1cmw6IGRvY3NVcmwoJ25vLW11dGFibGUtZXhwb3J0cycpLFxuICAgIH0sXG4gICAgc2NoZW1hOiBbXSxcbiAgfSxcblxuICBjcmVhdGUoY29udGV4dCkge1xuICAgIGZ1bmN0aW9uIGNoZWNrRGVjbGFyYXRpb24obm9kZSkge1xuICAgICAgY29uc3QgeyBraW5kIH0gPSBub2RlO1xuICAgICAgaWYgKGtpbmQgPT09ICd2YXInIHx8IGtpbmQgPT09ICdsZXQnKSB7XG4gICAgICAgIGNvbnRleHQucmVwb3J0KG5vZGUsIGBFeHBvcnRpbmcgbXV0YWJsZSAnJHtraW5kfScgYmluZGluZywgdXNlICdjb25zdCcgaW5zdGVhZC5gKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvKiogQHR5cGUgeyhzY29wZTogaW1wb3J0KCdlc2xpbnQnKS5TY29wZS5TY29wZSwgbmFtZTogc3RyaW5nKSA9PiB2b2lkfSAqL1xuICAgIGZ1bmN0aW9uIGNoZWNrRGVjbGFyYXRpb25zSW5TY29wZSh7IHZhcmlhYmxlcyB9LCBuYW1lKSB7XG4gICAgICB2YXJpYWJsZXNcbiAgICAgICAgLmZpbHRlcigodmFyaWFibGUpID0+IHZhcmlhYmxlLm5hbWUgPT09IG5hbWUpXG4gICAgICAgIC5mb3JFYWNoKCh2YXJpYWJsZSkgPT4ge1xuICAgICAgICAgIHZhcmlhYmxlLmRlZnNcbiAgICAgICAgICAgIC5maWx0ZXIoKGRlZikgPT4gZGVmLnR5cGUgPT09ICdWYXJpYWJsZScgJiYgZGVmLnBhcmVudClcbiAgICAgICAgICAgIC5mb3JFYWNoKChkZWYpID0+IHtcbiAgICAgICAgICAgICAgY2hlY2tEZWNsYXJhdGlvbihkZWYucGFyZW50KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICByZXR1cm4ge1xuICAgICAgLyoqIEBwYXJhbSB7aW1wb3J0KCdlc3RyZWUnKS5FeHBvcnREZWZhdWx0RGVjbGFyYXRpb259IG5vZGUgKi9cbiAgICAgIEV4cG9ydERlZmF1bHREZWNsYXJhdGlvbihub2RlKSB7XG4gICAgICAgIGNvbnN0IHNjb3BlID0gZ2V0U2NvcGUoY29udGV4dCwgbm9kZSk7XG5cbiAgICAgICAgaWYgKCduYW1lJyBpbiBub2RlLmRlY2xhcmF0aW9uICYmIG5vZGUuZGVjbGFyYXRpb24ubmFtZSkge1xuICAgICAgICAgIGNoZWNrRGVjbGFyYXRpb25zSW5TY29wZShzY29wZSwgbm9kZS5kZWNsYXJhdGlvbi5uYW1lKTtcbiAgICAgICAgfVxuICAgICAgfSxcblxuICAgICAgLyoqIEBwYXJhbSB7aW1wb3J0KCdlc3RyZWUnKS5FeHBvcnROYW1lZERlY2xhcmF0aW9ufSBub2RlICovXG4gICAgICBFeHBvcnROYW1lZERlY2xhcmF0aW9uKG5vZGUpIHtcbiAgICAgICAgY29uc3Qgc2NvcGUgPSBnZXRTY29wZShjb250ZXh0LCBub2RlKTtcblxuICAgICAgICBpZiAoJ2RlY2xhcmF0aW9uJyBpbiBub2RlICYmIG5vZGUuZGVjbGFyYXRpb24pICB7XG4gICAgICAgICAgY2hlY2tEZWNsYXJhdGlvbihub2RlLmRlY2xhcmF0aW9uKTtcbiAgICAgICAgfSBlbHNlIGlmICghKCdzb3VyY2UnIGluIG5vZGUpIHx8ICFub2RlLnNvdXJjZSkge1xuICAgICAgICAgIG5vZGUuc3BlY2lmaWVycy5mb3JFYWNoKChzcGVjaWZpZXIpID0+IHtcbiAgICAgICAgICAgIGNoZWNrRGVjbGFyYXRpb25zSW5TY29wZShLine truncated
@@ -0,0 +1,15 @@
import { Scalar } from '../../nodes/Scalar.js';
const nullTag = {
identify: value => value == null,
createNode: () => new Scalar(null),
default: true,
tag: 'tag:yaml.org,2002:null',
test: /^(?:~|[Nn]ull|NULL)?$/,
resolve: () => new Scalar(null),
stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)
? source
: ctx.options.nullStr
};
export { nullTag };
@@ -0,0 +1,105 @@
/**
* @typedef {(error?: Error | null | undefined, ...output: Array<any>) => void} Callback
* Callback.
*
* @typedef {(...input: Array<any>) => any} Middleware
* Ware.
*
* @typedef Pipeline
* Pipeline.
* @property {Run} run
* Run the pipeline.
* @property {Use} use
* Add middleware.
*
* @typedef {(...input: Array<any>) => void} Run
* Call all middleware.
*
* Calls `done` on completion with either an error or the output of the
* last middleware.
*
* > 👉 **Note**: as the length of input defines whether async functions get a
* > `next` function,
* > it’s recommended to keep `input` at one value normally.
*
* @typedef {(fn: Middleware) => Pipeline} Use
* Add middleware.
*/
/**
* Create new middleware.
*
* @returns {Pipeline}
* Pipeline.
*/
export function trough(): Pipeline;
/**
* Wrap `middleware` into a uniform interface.
*
* You can pass all input to the resulting function.
* `callback` is then called with the output of `middleware`.
*
* If `middleware` accepts more arguments than the later given in input,
* an extra `done` function is passed to it after that input,
* which must be called by `middleware`.
*
* The first value in `input` is the main input value.
* All other input values are the rest input values.
* The values given to `callback` are the input values,
* merged with every non-nullish output value.
*
* * if `middleware` throws an error,
* returns a promise that is rejected,
* or calls the given `done` function with an error,
* `callback` is called with that error
* * if `middleware` returns a value or returns a promise that is resolved,
* that value is the main output value
* * if `middleware` calls `done`,
* all non-nullish values except for the first one (the error) overwrite the
* output values
*
* @param {Middleware} middleware
* Function to wrap.
* @param {Callback} callback
* Callback called with the output of `middleware`.
* @returns {Run}
* Wrapped middleware.
*/
export function wrap(middleware: Middleware, callback: Callback): Run;
/**
* Callback.
*/
export type Callback = (error?: Error | null | undefined, ...output: Array<any>) => void;
/**
* Ware.
*/
export type Middleware = (...input: Array<any>) => any;
/**
* Pipeline.
*/
export type Pipeline = {
/**
* Run the pipeline.
*/
run: Run;
/**
* Add middleware.
*/
use: Use;
};
/**
* Call all middleware.
*
* Calls `done` on completion with either an error or the output of the
* last middleware.
*
* > 👉 **Note**: as the length of input defines whether async functions get a
* > `next` function,
* > it’s recommended to keep `input` at one value normally.
*/
export type Run = (...input: Array<any>) => void;
/**
* Add middleware.
*/
export type Use = (fn: Middleware) => Pipeline;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,38 @@
import { useRef } from 'react';
var useLoadingDelayPlugin = function (fetchInstance, _a) {
var loadingDelay = _a.loadingDelay, ready = _a.ready;
var timerRef = useRef(undefined);
if (!loadingDelay) {
return {};
}
var cancelTimeout = function () {
if (timerRef.current) {
clearTimeout(timerRef.current);
}
};
return {
onBefore: function () {
cancelTimeout();
// Two cases:
// 1. ready === undefined
// 2. ready === true
if (ready !== false) {
timerRef.current = setTimeout(function () {
fetchInstance.setState({
loading: true,
});
}, loadingDelay);
}
return {
loading: false,
};
},
onFinally: function () {
cancelTimeout();
},
onCancel: function () {
cancelTimeout();
},
};
};
export default useLoadingDelayPlugin;
@@ -0,0 +1,325 @@
/**
* Copyright (c) 2012-2015, Christopher Jeffrey, Peter Sunde (MIT License)
* Copyright (c) 2016, Daniel Imms (MIT License).
* Copyright (c) 2018, Microsoft Corporation (MIT License).
*/
import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import { Socket } from 'net';
import { ArgvOrCommandLine } from './types';
import { fork } from 'child_process';
import { ConoutConnection } from './windowsConoutConnection';
let conptyNative: IConptyNative;
let winptyNative: IWinptyNative;
/**
* The amount of time to wait for additional data after the conpty shell process has exited before
* shutting down the socket. The timer will be reset if a new data event comes in after the timer
* has started.
*/
const FLUSH_DATA_INTERVAL = 1000;
/**
* This agent sits between the WindowsTerminal class and provides a common interface for both conpty
* and winpty.
*/
export class WindowsPtyAgent {
private _inSocket: Socket;
private _outSocket: Socket;
private _pid: number = 0;
private _innerPid: number = 0;
private _closeTimeout: NodeJS.Timer | undefined;
private _exitCode: number | undefined;
private _conoutSocketWorker: ConoutConnection;
private _fd: any;
private _pty: number;
private _ptyNative: IConptyNative | IWinptyNative;
public get inSocket(): Socket { return this._inSocket; }
public get outSocket(): Socket { return this._outSocket; }
public get fd(): any { return this._fd; }
public get innerPid(): number { return this._innerPid; }
public get pty(): number { return this._pty; }
constructor(
file: string,
args: ArgvOrCommandLine,
env: string[],
cwd: string,
cols: number,
rows: number,
debug: boolean,
private _useConpty: boolean | undefined,
private _useConptyDll: boolean = false,
conptyInheritCursor: boolean = false
) {
if (this._useConpty === undefined || this._useConpty === true) {
this._useConpty = this._getWindowsBuildNumber() >= 18309;
}
if (this._useConpty) {
if (!conptyNative) {
try {
conptyNative = require('../build/Release/conpty.node');
} catch (outerError) {
try {
conptyNative = require('../build/Debug/conpty.node');
} catch (innerError) {
console.error('innerError', innerError);
// Re-throw the exception from the Release require if the Debug require fails as well
throw outerError;
}
}
}
} else {
if (!winptyNative) {
try {
winptyNative = require('../build/Release/pty.node');
} catch (outerError) {
try {
winptyNative = require('../build/Debug/pty.node');
} catch (innerError) {
console.error('innerError', innerError);
// Re-throw the exception from the Release require if the Debug require fails as well
throw outerError;
}
}
}
}
this._ptyNative = this._useConpty ? conptyNative : winptyNative;
// Sanitize input variable.
cwd = path.resolve(cwd);
// Compose command line
const commandLine = argsToCommandLine(file, args);
// Open pty session.
let term: IConptyProcess | IWinptyProcess;
if (this._useConpty) {
term = (this._ptyNative as IConptyNative).startProcess(file, cols, rows, debug, this._generatePipeName(), conptyInheritCursor, this._useConptyDll);
} else {
term = (this._ptyNative as IWinptyNative).startProcess(file, commandLine, env, cwd, cols, rows, debug);
this._pid = (term as IWinptyProcess).pid;
this._innerPid = (term as IWinptyProcess).innerPid;
}
// Not available on windows.
this._fd = term.fd;
// Generated incremental number that has no real purpose besides using it
// as a terminal id.
this._pty = term.pty;
// Create terminal pipe IPC channel and forward to a local unix socket.
this._outSocket = new Socket();
this._outSocket.setEncoding('utf8');
// The conout socket must be ready out on another thread to avoid deadlocks
this._conoutSocketWorker = new ConoutConnection(term.conout);
this._conoutSocketWorker.onReady(() => {
this._conoutSocketWorker.connectSocket(this._outSocket);
});
this._outSocket.on('connect', () => {
this._outSocket.emit('ready_datapipe');
});
const inSocketFD = fs.openSync(term.conin, 'w');
this._inSocket = new Socket({
fd: inSocketFD,
readable: false,
writable: true
});
this._inSocket.setEncoding('utf8');
if (this._useConpty) {
const connect = (this._ptyNative as IConptyNative).connect(this._pty, commandLine, cwd, env, c => this._$onProcessExit(c));
this._innerPid = connect.pid;
}
}
public resize(cols: number, rows: number): void {
if (this._useConpty) {
if (this._exitCode !== undefined) {
throw new Error('Cannot resize a pty that has already exited');
}
(this._ptyNative as IConptyNative).resize(this._pty, cols, rows, this._useConptyDll);
return;
}
(this._ptyNative as IWinptyNative).resize(this._pid, cols, rows);
}
public clear(): void {
if (this._useConpty) {
(this._ptyNative as IConptyNative).clear(this._pty, this._useConptyDll);
}
}
public kill(): void {
this._inSocket.readable = false;
this._outSocket.readable = false;
// Tell the agent to kill the pty, this releases handles to the process
if (this._useConpty) {
this._getConsoleProcessList().then(consoleProcessList => {
consoleProcessList.forEach((pid: number) => {
try {
process.kill(pid);
} catch (e) {
// Ignore if process cannot be found (kill ESRCH error)
}
});
(this._ptyNative as IConptyNative).kill(this._pty, this._useConptyDll);
});
} else {
// Because pty.kill closes the handle, it will kill most processes by itself.
// Process IDs can be reused as soon as all handles to them are
// dropped, so we want to immediately kill the entire console process list.
// If we do not force kill all processes here, node servers in particular
// seem to become detached and remain running (see
// Microsoft/vscode#26807).
const processList: number[] = (this._ptyNative as IWinptyNative).getProcessList(this._pid);
(this._ptyNative as IWinptyNative).kill(this._pid, this._innerPid);
processList.forEach(pid => {
try {
process.kill(pid);
} catch (e) {
// Ignore if process cannot be found (kill ESRCH error)
}
});
}
this._conoutSocketWorker.dispose();
}
private _getConsoleProcessList(): Promise<number[]> {
return new Promise<number[]>(resolve => {
const agent = fork(path.join(__dirname, 'conpty_console_list_agent'), [ this._innerPid.toString() ]);
agent.on('message', message => {
clearTimeout(timeout);
// @ts-ignore
resolve(message.consoleProcessList);
});
const timeout = setTimeout(() => {
// Something went wrong, just send back the shell PID
agent.kill();
resolve([ this._innerPid ]);
}, 5000);
});
}
public get exitCode(): number | undefined {
if (this._useConpty) {
return this._exitCode;
}
const winptyExitCode = (this._ptyNative as IWinptyNative).getExitCode(this._innerPid);
return winptyExitCode === -1 ? undefined : winptyExitCode;
}
private _getWindowsBuildNumber(): number {
const osVersion = (/(\d+)\.(\d+)\.(\d+)/g).exec(os.release());
let buildNumber: number = 0;
if (osVersion && osVersion.length === 4) {
buildNumber = parseInt(osVersion[3]);
}
return buildNumber;
}
private _generatePipeName(): string {
return `conpty-${Math.random() * 10000000}`;
}
/**
* Triggered from the native side when a contpy process exits.
*/
private _$onProcessExit(exitCode: number): void {
this._exitCode = exitCode;
this._flushDataAndCleanUp();
this._outSocket.on('data', () => this._flushDataAndCleanUp());
}
private _flushDataAndCleanUp(): void {
if (this._closeTimeout) {
// @ts-ignore
clearTimeout(this._closeTimeout);
}
this._closeTimeout = setTimeout(() => this._cleanUpProcess(), FLUSH_DATA_INTERVAL);
}
private _cleanUpProcess(): void {
this._inSocket.readable = false;
this._outSocket.readable = false;
this._outSocket.destroy();
}
}
// Convert argc/argv into a Win32 command-line following the escaping convention
// documented on MSDN (e.g. see CommandLineToArgvW documentation). Copied from
// winpty project.
export function argsToCommandLine(file: string, args: ArgvOrCommandLine): string {
if (isCommandLine(args)) {
if (args.length === 0) {
return file;
}
return `${argsToCommandLine(file, [])} ${args}`;
}
const argv = [file];
Array.prototype.push.apply(argv, args);
let result = '';
for (let argIndex = 0; argIndex < argv.length; argIndex++) {
if (argIndex > 0) {
result += ' ';
}
const arg = argv[argIndex];
// if it is empty or it contains whitespace and is not already quoted
const hasLopsidedEnclosingQuote = xOr((arg[0] !== '"'), (arg[arg.length - 1] !== '"'));
const hasNoEnclosingQuotes = ((arg[0] !== '"') && (arg[arg.length - 1] !== '"'));
const quote =
arg === '' ||
(arg.indexOf(' ') !== -1 ||
arg.indexOf('\t') !== -1) &&
((arg.length > 1) &&
(hasLopsidedEnclosingQuote || hasNoEnclosingQuotes));
if (quote) {
result += '\"';
}
let bsCount = 0;
for (let i = 0; i < arg.length; i++) {
const p = arg[i];
if (p === '\\') {
bsCount++;
} else if (p === '"') {
result += repeatText('\\', bsCount * 2 + 1);
result += '"';
bsCount = 0;
} else {
result += repeatText('\\', bsCount);
bsCount = 0;
result += p;
}
}
if (quote) {
result += repeatText('\\', bsCount * 2);
result += '\"';
} else {
result += repeatText('\\', bsCount);
}
}
return result;
}
function isCommandLine(args: ArgvOrCommandLine): args is string {
return typeof args === 'string';
}
function repeatText(text: string, count: number): string {
let result = '';
for (let i = 0; i < count; i++) {
result += text;
}
return result;
}
function xOr(arg1: boolean, arg2: boolean): boolean {
return ((arg1 && !arg2) || (!arg1 && arg2));
}
@@ -0,0 +1,28 @@
// Copyright (c) 2016 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
#ifndef AGENT_CREATE_DESKTOP_H
#define AGENT_CREATE_DESKTOP_H
#include <windows.h>
void handleCreateDesktop(LPCWSTR controlPipeName);
#endif // AGENT_CREATE_DESKTOP_H
@@ -0,0 +1,57 @@
# forwarded
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][ci-image]][ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Parse HTTP X-Forwarded-For header
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install forwarded
```
## API
```js
var forwarded = require('forwarded')
```
### forwarded(req)
```js
var addresses = forwarded(req)
```
Parse the `X-Forwarded-For` header from the request. Returns an array
of the addresses, including the socket address for the `req`, in reverse
order (i.e. index `0` is the socket address and the last index is the
furthest address, typically the end-user).
## Testing
```sh
$ npm test
```
## License
[MIT](LICENSE)
[ci-image]: https://badgen.net/github/checks/jshttp/forwarded/master?label=ci
[ci-url]: https://github.com/jshttp/forwarded/actions?query=workflow%3Aci
[npm-image]: https://img.shields.io/npm/v/forwarded.svg
[npm-url]: https://npmjs.org/package/forwarded
[node-version-image]: https://img.shields.io/node/v/forwarded.svg
[node-version-url]: https://nodejs.org/en/download/
[coveralls-image]: https://img.shields.io/coveralls/jshttp/forwarded/master.svg
[coveralls-url]: https://coveralls.io/r/jshttp/forwarded?branch=master
[downloads-image]: https://img.shields.io/npm/dm/forwarded.svg
[downloads-url]: https://npmjs.org/package/forwarded
@@ -0,0 +1,56 @@
{
"name": "@heroui/use-safe-layout-effect",
"version": "2.1.2",
"description": "",
"keywords": [
"use-safe-layout-effect"
],
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/hooks/use-safe-layout-effect"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0"
},
"clean-package": "../../../clean-package.config.json",
"tsup": {
"clean": true,
"target": "es2019",
"format": [
"cjs",
"esm"
]
},
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup src --dts",
"build:fast": "tsup src",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit"
}
}
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DecoratorInfoKind = void 0;
var DecoratorInfoKind;
(function (DecoratorInfoKind) {
DecoratorInfoKind[DecoratorInfoKind["method"] = 0] = "method";
DecoratorInfoKind[DecoratorInfoKind["parameter"] = 1] = "parameter";
DecoratorInfoKind[DecoratorInfoKind["property"] = 2] = "property";
})(DecoratorInfoKind || (exports.DecoratorInfoKind = DecoratorInfoKind = {}));
//# sourceMappingURL=DecoratorInfoKind.js.map
@@ -0,0 +1,13 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.js';
import 'react';
declare const CloseIcon: (props: IconSvgProps & {
"data-checked"?: string;
isSelected?: boolean;
isIndeterminate?: boolean;
disableAnimation?: boolean;
className?: string;
}) => react_jsx_runtime.JSX.Element;
export { CloseIcon };
@@ -0,0 +1,299 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _getCFFString = _interopRequireDefault(require("./getCFFString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file 解析cffdict数据
* @author mengke01(kekee000@gmail.com)
*/
var TOP_DICT_META = [{
name: 'version',
op: 0,
type: 'SID'
}, {
name: 'notice',
op: 1,
type: 'SID'
}, {
name: 'copyright',
op: 1200,
type: 'SID'
}, {
name: 'fullName',
op: 2,
type: 'SID'
}, {
name: 'familyName',
op: 3,
type: 'SID'
}, {
name: 'weight',
op: 4,
type: 'SID'
}, {
name: 'isFixedPitch',
op: 1201,
type: 'number',
value: 0
}, {
name: 'italicAngle',
op: 1202,
type: 'number',
value: 0
}, {
name: 'underlinePosition',
op: 1203,
type: 'number',
value: -100
}, {
name: 'underlineThickness',
op: 1204,
type: 'number',
value: 50
}, {
name: 'paintType',
op: 1205,
type: 'number',
value: 0
}, {
name: 'charstringType',
op: 1206,
type: 'number',
value: 2
}, {
name: 'fontMatrix',
op: 1207,
type: ['real', 'real', 'real', 'real', 'real', 'real'],
value: [0.001, 0, 0, 0.001, 0, 0]
}, {
name: 'uniqueId',
op: 13,
type: 'number'
}, {
name: 'fontBBox',
op: 5,
type: ['number', 'number', 'number', 'number'],
value: [0, 0, 0, 0]
}, {
name: 'strokeWidth',
op: 1208,
type: 'number',
value: 0
}, {
name: 'xuid',
op: 14,
type: [],
value: null
}, {
name: 'charset',
op: 15,
type: 'offset',
value: 0
}, {
name: 'encoding',
op: 16,
type: 'offset',
value: 0
}, {
name: 'charStrings',
op: 17,
type: 'offset',
value: 0
}, {
name: 'private',
op: 18,
type: ['number', 'offset'],
value: [0, 0]
}];
var PRIVATE_DICT_META = [{
name: 'subrs',
op: 19,
type: 'offset',
value: 0
}, {
name: 'defaultWidthX',
op: 20,
type: 'number',
value: 0
}, {
name: 'nominalWidthX',
op: 21,
type: 'number',
value: 0
}];
function entriesToObject(entries) {
var hash = {};
for (var i = 0, l = entries.length; i < l; i++) {
var key = entries[i][0];
if (undefined !== hash[key]) {
console.warn('dict already has key:' + key);
continue;
}
var values = entries[i][1];
hash[key] = values.length === 1 ? values[0] : values;
}
return hash;
}
/* eslint-disable no-constant-condition */
function parseFloatOperand(reader) {
var s = '';
var eof = 15;
var lookup = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', 'E', 'E-', null, '-'];
while (true) {
var b = reader.readUint8();
var n1 = b >> 4;
var n2 = b & 15;
if (n1 === eof) {
break;
}
s += lookup[n1];
if (n2 === eof) {
break;
}
s += lookup[n2];
}
return parseFloat(s);
}
/* eslint-enable no-constant-condition */
/**
* 解析cff字典数据
*
* @param {Reader} reader 读取器
* @param {number} b0 操作码
* @return {number} 数据
*/
function parseOperand(reader, b0) {
var b1;
var b2;
var b3;
var b4;
if (b0 === 28) {
b1 = reader.readUint8();
b2 = reader.readUint8();
return b1 << 8 | b2;
}
if (b0 === 29) {
b1 = reader.readUint8();
b2 = reader.readUint8();
b3 = reader.readUint8();
b4 = reader.readUint8();
return b1 << 24 | b2 << 16 | b3 << 8 | b4;
}
if (b0 === 30) {
return parseFloatOperand(reader);
}
if (b0 >= 32 && b0 <= 246) {
return b0 - 139;
}
if (b0 >= 247 && b0 <= 250) {
b1 = reader.readUint8();
return (b0 - 247) * 256 + b1 + 108;
}
if (b0 >= 251 && b0 <= 254) {
b1 = reader.readUint8();
return -(b0 - 251) * 256 - b1 - 108;
}
throw new Error('invalid b0 ' + b0 + ',at:' + reader.offset);
}
/**
* 解析字典值
*
* @param {Object} dict 字典数据
* @param {Array} meta 元数据
* @param {Object} strings cff字符串字典
* @return {Object} 解析后数据
*/
function interpretDict(dict, meta, strings) {
var newDict = {};
// Because we also want to include missing values, we start out from the meta list
// and lookup values in the dict.
for (var i = 0, l = meta.length; i < l; i++) {
var m = meta[i];
var value = dict[m.op];
if (value === undefined) {
value = m.value !== undefined ? m.value : null;
}
if (m.type === 'SID') {
value = (0, _getCFFString.default)(strings, value);
}
newDict[m.name] = value;
}
return newDict;
}
/**
* 解析cff dict字典
*
* @param {Reader} reader 读取器
* @param {number} offset 起始偏移
* @param {number} length 大小
* @return {Object} 配置
*/
function parseCFFDict(reader, offset, length) {
if (null != offset) {
reader.seek(offset);
}
var entries = [];
var operands = [];
var lastOffset = reader.offset + (null != length ? length : reader.length);
while (reader.offset < lastOffset) {
var op = reader.readUint8();
// The first byte for each dict item distinguishes between operator (key) and operand (value).
// Values <= 21 are operators.
if (op <= 21) {
// Two-byte operators have an initial escape byte of 12.
if (op === 12) {
op = 1200 + reader.readUint8();
}
entries.push([op, operands]);
operands = [];
} else {
// Since the operands (values) come before the operators (keys), we store all operands in a list
// until we encounter an operator.
operands.push(parseOperand(reader, op));
}
}
return entriesToObject(entries);
}
/**
* 解析cff top字典
*
* @param {Reader} reader 读取器
* @param {number} start 开始offset
* @param {number} length 大小
* @param {Object} strings 字符串集合
* @return {Object} 字典数据
*/
function parseTopDict(reader, start, length, strings) {
var dict = parseCFFDict(reader, start || 0, length || reader.length);
return interpretDict(dict, TOP_DICT_META, strings);
}
/**
* 解析cff私有字典
*
* @param {Reader} reader 读取器
* @param {number} start 开始offset
* @param {number} length 大小
* @param {Object} strings 字符串集合
* @return {Object} 字典数据
*/
function parsePrivateDict(reader, start, length, strings) {
var dict = parseCFFDict(reader, start || 0, length || reader.length);
return interpretDict(dict, PRIVATE_DICT_META, strings);
}
var _default = exports.default = {
parseTopDict: parseTopDict,
parsePrivateDict: parsePrivateDict
};
@@ -0,0 +1,3 @@
var l=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,u=e=>!e||typeof e!="object"||Object.keys(e).length===0,x=(e,o)=>JSON.stringify(e)===JSON.stringify(o),A=e=>typeof e=="boolean";function i(e,o){e.forEach(function(r){Array.isArray(r)?i(r,o):o.push(r);});}function y(e){let o=[];return i(e,o),o}var a=(...e)=>y(e).filter(Boolean),p=(e,o)=>{let r={},c=Object.keys(e),f=Object.keys(o);for(let t of c)if(f.includes(t)){let s=e[t],n=o[t];typeof s=="object"&&typeof n=="object"?r[t]=p(s,n):Array.isArray(s)||Array.isArray(n)?r[t]=a(n,s):r[t]=n+" "+s;}else r[t]=e[t];for(let t of f)c.includes(t)||(r[t]=o[t]);return r},g=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();
export { l as a, u as b, x as c, A as d, y as e, a as f, p as g, g as h };
@@ -0,0 +1,154 @@
"use client";
// src/transition-utils.ts
var TRANSITION_EASINGS = {
ease: [0.36, 0.66, 0.4, 1],
easeIn: [0.4, 0, 1, 1],
easeOut: [0, 0, 0.2, 1],
easeInOut: [0.4, 0, 0.2, 1],
spring: [0.155, 1.105, 0.295, 1.12],
springOut: [0.57, -0.15, 0.62, 0.07],
softSpring: [0.16, 1.11, 0.3, 1.02]
};
var TRANSITION_DEFAULTS = {
enter: {
duration: 0.2,
ease: TRANSITION_EASINGS.easeOut
},
exit: {
duration: 0.1,
ease: TRANSITION_EASINGS.easeIn
}
};
var TRANSITION_VARIANTS = {
scaleSpring: {
enter: {
transform: "scale(1)",
opacity: 1,
transition: {
type: "spring",
bounce: 0,
duration: 0.2
}
},
exit: {
transform: "scale(0.85)",
opacity: 0,
transition: {
type: "easeOut",
duration: 0.15
}
}
},
scaleSpringOpacity: {
initial: {
opacity: 0,
transform: "scale(0.8)"
},
enter: {
opacity: 1,
transform: "scale(1)",
transition: {
type: "spring",
bounce: 0,
duration: 0.3
}
},
exit: {
opacity: 0,
transform: "scale(0.96)",
transition: {
type: "easeOut",
bounce: 0,
duration: 0.15
}
}
},
scale: {
enter: { scale: 1 },
exit: { scale: 0.95 }
},
scaleFadeIn: {
enter: {
transform: "scale(1)",
opacity: 1,
transition: {
duration: 0.25,
ease: TRANSITION_EASINGS.easeIn
}
},
exit: {
transform: "scale(0.95)",
opacity: 0,
transition: {
duration: 0.2,
ease: TRANSITION_EASINGS.easeOut
}
}
},
scaleInOut: {
enter: {
transform: "scale(1)",
opacity: 1,
transition: {
duration: 0.4,
ease: TRANSITION_EASINGS.ease
}
},
exit: {
transform: "scale(1.03)",
opacity: 0,
transition: {
duration: 0.3,
ease: TRANSITION_EASINGS.ease
}
}
},
fade: {
enter: {
opacity: 1,
transition: {
duration: 0.4,
ease: TRANSITION_EASINGS.ease
}
},
exit: {
opacity: 0,
transition: {
duration: 0.3,
ease: TRANSITION_EASINGS.ease
}
}
},
collapse: {
enter: {
opacity: 1,
height: "auto",
transition: {
height: {
type: "spring",
bounce: 0,
duration: 0.3
},
opacity: {
easings: "ease",
duration: 0.4
}
}
},
exit: {
opacity: 0,
height: 0,
transition: {
easings: "ease",
duration: 0.3
}
}
}
};
export {
TRANSITION_EASINGS,
TRANSITION_DEFAULTS,
TRANSITION_VARIANTS
};
@@ -0,0 +1,11 @@
import { useRef } from 'react';
import { depsEqual } from '../utils/depsEqual';
export var createDeepCompareEffect = function (hook) { return function (effect, deps) {
var ref = useRef(undefined);
var signalRef = useRef(0);
if (deps === undefined || !depsEqual(deps, ref.current)) {
signalRef.current += 1;
}
ref.current = deps;
hook(effect, [signalRef.current]);
}; };
@@ -0,0 +1,5 @@
type ResponsiveConfig = Record<string, number>;
type ResponsiveInfo = Record<string, boolean>;
export declare function configResponsive(config: ResponsiveConfig): void;
declare function useResponsive(): ResponsiveInfo;
export default useResponsive;
@@ -0,0 +1,126 @@
import type {Point, Position} from 'unist'
// To do: next major: remove `void` from allowed return types.
/**
* @typeParam Context
* Value used as `this`.
* @this
* The `warningContext` given to `parseEntities`
* @param reason
* Human readable reason for emitting a parse error.
* @param point
* Place where the error occurred.
* @param code
* Machine readable code the error.
*/
export type WarningHandler<Context = undefined> = (
this: Context,
reason: string,
point: Point,
code: number
) => undefined | void
/**
* @typeParam Context
* Value used as `this`.
* @this
* The `referenceContext` given to `parseEntities`
* @param value
* Decoded character reference.
* @param position
* Place where `value` starts and ends.
* @param source
* Raw source of character reference.
*/
export type ReferenceHandler<Context = undefined> = (
this: Context,
value: string,
position: Position,
source: string
) => undefined | void
/**
* @typeParam Context
* Value used as `this`.
* @this
* The `textContext` given to `parseEntities`.
* @param value
* String of content.
* @param position
* Place where `value` starts and ends.
*/
export type TextHandler<Context = undefined> = (
this: Context,
value: string,
position: Position
) => undefined | void
/**
* Configuration.
*
* @typeParam WarningContext
* Value used as `this` in the `warning` handler.
* @typeParam ReferenceContext
* Value used as `this` in the `reference` handler.
* @typeParam TextContext
* Value used as `this` in the `text` handler.
*/
export interface Options<
WarningContext = undefined,
ReferenceContext = undefined,
TextContext = undefined
> {
/**
* Additional character to accept.
* This allows other characters, without error, when following an ampersand.
*
* @default ''
*/
additional?: string | null | undefined
/**
* Whether to parse `value` as an attribute value.
* This results in slightly different behavior.
*
* @default false
*/
attribute?: boolean | null | undefined
/**
* Whether to allow nonterminated character references.
* For example, `&copycat` for `©cat`.
* This behavior is compliant to the spec but can lead to unexpected results.
*
* @default true
*/
nonTerminated?: boolean | null | undefined
/**
* Starting `position` of `value` (`Point` or `Position`). Useful when dealing with values nested in some sort of syntax tree.
*/
position?: Readonly<Position> | Readonly<Point> | null | undefined
/**
* Context used when calling `warning`.
*/
warningContext?: WarningContext | null | undefined
/**
* Context used when calling `reference`.
*/
referenceContext?: ReferenceContext | null | undefined
/**
* Context used when calling `text`.
*/
textContext?: TextContext | null | undefined
/**
* Warning handler.
*/
warning?: WarningHandler<WarningContext> | null | undefined
/**
* Reference handler.
*/
reference?: ReferenceHandler<ReferenceContext> | null | undefined
/**
* Text handler.
*/
text?: TextHandler<TextContext> | null | undefined
}
export {parseEntities} from './lib/index.js'
@@ -0,0 +1,18 @@
/**
* DON'T EDIT THIS FILE.
* This file was generated by "scripts/update-lib-flat-configs.js" script.
*/
"use strict"
module.exports = {
plugins: {
get "es-x"() {
return require("../../index.js")
},
},
rules: {
"es-x/no-intl-numberformat-prototype-formatrange": "error",
"es-x/no-intl-numberformat-prototype-formatrangetoparts": "error",
"es-x/no-intl-pluralrules-prototype-selectrange": "error",
},
}
@@ -0,0 +1,36 @@
{
"name": "@internationalized/message",
"version": "3.1.8",
"description": "Internationalized message formatting and locale negotiation",
"license": "Apache-2.0",
"main": "dist/main.js",
"module": "dist/module.js",
"exports": {
"source": "./src/index.ts",
"types": [
"./dist/types.d.ts",
"./src/index.ts"
],
"import": "./dist/import.mjs",
"require": "./dist/main.js"
},
"types": "dist/types.d.ts",
"source": "src/index.ts",
"files": [
"dist",
"src"
],
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@swc/helpers": "^0.5.0",
"intl-messageformat": "^10.1.0"
},
"publishConfig": {
"access": "public"
},
"gitHead": "265b4d7f107905ee1c6e87a8af1613ab440a6849"
}
@@ -0,0 +1,23 @@
(The MIT License)
Copyright (c) 2012 TJ Holowaychuk
Copyright (c) 2014-2022 Douglas Christopher Wilson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,20 @@
{
"name": "@esbuild/linux-x64",
"version": "0.27.2",
"description": "The Linux 64-bit binary for esbuild, a JavaScript bundler.",
"repository": {
"type": "git",
"url": "git+https://github.com/evanw/esbuild.git"
},
"license": "MIT",
"preferUnplugged": true,
"engines": {
"node": ">=18"
},
"os": [
"linux"
],
"cpu": [
"x64"
]
}
@@ -0,0 +1,140 @@
{
"name": "react-hook-form",
"description": "Performant, flexible and extensible forms library for React Hooks",
"version": "7.66.0",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.mjs",
"umd:main": "dist/index.umd.js",
"unpkg": "dist/index.umd.js",
"jsdelivr": "dist/index.umd.js",
"jsnext:main": "dist/index.esm.mjs",
"source": "src/index.ts",
"types": "dist/index.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"react-server": "./dist/react-server.esm.mjs",
"import": "./dist/index.esm.mjs",
"require": "./dist/index.cjs.js"
}
},
"scripts": {
"clean": "rimraf dist",
"prepare": "husky",
"prebuild": "pnpm clean",
"build": "pnpm build:modern",
"build:watch": "pnpm build:modern -w",
"postbuild": "node ./scripts/rollup/assert-esm-exports.mjs && node ./scripts/rollup/assert-cjs-exports.cjs",
"build:modern": "rollup --bundleConfigAsCjs -c ./scripts/rollup/rollup.config.js",
"build:esm": "rollup --bundleConfigAsCjs -c ./scripts/rollup/rollup.esm.config.js",
"prettier:fix": "prettier --config .prettierrc --write .",
"lint": "eslint '**/*.{js,ts,tsx}'",
"lint:fix": "pnpm lint --fix",
"type": "tsc --noEmit",
"jest-preview": "jest-preview",
"test": "jest --config ./scripts/jest/jest.config.js",
"test:coverage": "pnpm test -- --coverage",
"test:watch": "pnpm test -- --onlyChanged --watch",
"test:web": "TEST_ENV=web pnpm test",
"test:type": "tsd src/__typetest__",
"e2e": "cypress run",
"e2e:watch": "cypress open",
"api-extractor": "api-extractor run --local",
"api-extractor:build": "pnpm build:esm && pnpm api-extractor",
"api-extractor:ci": "node scripts/apiExtractor.js",
"postversion": "git push && git push origin v$npm_package_version",
"prepublishOnly": "pnpm install && pnpm lint:fix && pnpm type && pnpm test && pnpm build",
"bundlewatch": "pnpm build:modern && bundlewatch",
"start": "pnpm build:esm && pnpm --dir ./app install && pnpm --dir ./app run dev",
"csb:install": "npm i -g pnpm@8 && pnpm i"
},
"keywords": [
"react",
"hooks",
"form",
"forms",
"form-validation",
"validation",
"typescript",
"react-hooks"
],
"repository": {
"type": "git",
"url": "https://github.com/react-hook-form/react-hook-form"
},
"homepage": "https://react-hook-form.com",
"author": "Beier(Bill) Luo <bluebill1049@hotmail.com>",
"license": "MIT",
"devDependencies": {
"@eslint/compat": "^1.4.0",
"@microsoft/api-extractor": "^7.53.0",
"@rollup/plugin-commonjs": "^28.0.6",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-terser": "^0.4.4",
"@swc/core": "^1.13.5",
"@swc/jest": "^0.2.39",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.0",
"@types/jest": "^30.0.0",
"@types/react": "^19.2.0",
"@types/react-dom": "^19.2.0",
"bundlewatch": "^0.4.1",
"cypress": "^15.3.0",
"eslint": "^9.37.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-cypress": "^5.2.0",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"husky": "^9.1.7",
"jest": "^30.2.0",
"jest-environment-jsdom": "^30.2.0",
"jest-fixed-jsdom": "^0.0.10",
"jest-preview": "^0.3.2",
"lint-staged": "^16.2.3",
"prettier": "^3.6.2",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"rimraf": "^6.0.1",
"rollup": "^4.52.4",
"rollup-plugin-typescript2": "^0.36.0",
"tsd": "^0.33.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.45.0",
"whatwg-fetch": "^3.6.20",
"zod": "^3.25.76"
},
"bundlewatch": {
"files": [
{
"path": "./dist/index.cjs.js",
"maxSize": "11.0 kB"
}
]
},
"peerDependencies": {
"react": "^16.8.0 || ^17 || ^18 || ^19"
},
"lint-staged": {
"*.{js,ts,tsx}": [
"pnpm lint:fix",
"pnpm prettier:fix"
],
"*.{md,json,yml}": [
"prettier --write"
]
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/react-hook-form"
},
"engines": {
"node": ">=18.0.0"
}
}
@@ -0,0 +1,992 @@
## [1.11.19](https://github.com/iamkun/dayjs/compare/v1.11.18...v1.11.19) (2025-10-31)
### Bug Fixes
* added usage warnings for diff + updated unit tests ([#2948](https://github.com/iamkun/dayjs/issues/2948)) ([269a7a9](https://github.com/iamkun/dayjs/commit/269a7a9cf3649b7a4b328e771173701764a8480d))
* dont instantiate regexes within ar locale functions to avoid performance overhead ([#2898](https://github.com/iamkun/dayjs/issues/2898)) ([af5e9f0](https://github.com/iamkun/dayjs/commit/af5e9f0e7649cbd1ecf707daab8303f2733f2563))
* replace italian locale "un' ora fa" with "un'ora fa", add tests for it ([#2930](https://github.com/iamkun/dayjs/issues/2930)) ([9e9f76c](https://github.com/iamkun/dayjs/commit/9e9f76cf117fa834260b30193434bc4481b4b6be))
* Updated Belarusian locale with relative time ([#2656](https://github.com/iamkun/dayjs/issues/2656)) ([1d8746c](https://github.com/iamkun/dayjs/commit/1d8746c23bd667bde80ee627a915301ebd69e1a2))
## [1.11.18](https://github.com/iamkun/dayjs/compare/v1.11.17...v1.11.18) (2025-08-30)
### Bug Fixes
* error semantic-release dependency ([8cfb313](https://github.com/iamkun/dayjs/commit/8cfb31386d840d31e9655870f4d8c01592eb753a))
## [1.11.17](https://github.com/iamkun/dayjs/compare/v1.11.16...v1.11.17) (2025-08-29)
### Bug Fixes
* [en-AU] locale use the same ordinal as moment ([#2878](https://github.com/iamkun/dayjs/issues/2878)) ([1b95ecd](https://github.com/iamkun/dayjs/commit/1b95ecd21d4feafe7ab113a2d48d7d8d93bb95c9))
## [1.11.16](https://github.com/iamkun/dayjs/compare/v1.11.15...v1.11.16) (2025-08-29)
### Bug Fixes
* test release workflow (no code changes) ([c38c428](https://github.com/iamkun/dayjs/commit/c38c428a78c344699eff373adfc8c007bb3a514f))
## [1.11.15](https://github.com/iamkun/dayjs/compare/v1.11.14...v1.11.15) (2025-08-28)
### Bug Fixes
* Fix misspellings in Irish or Irish Gaelic [ga] ([#2861](https://github.com/iamkun/dayjs/issues/2861)) ([9c14a42](https://github.com/iamkun/dayjs/commit/9c14a4245a8e764ee3260ff17a7ff48dfd09d279))
## [1.11.14](https://github.com/iamkun/dayjs/compare/v1.11.13...v1.11.14) (2025-08-27)
### Bug Fixes
* .utcOffset(0, true) result and its clone are different bug ([#2505](https://github.com/iamkun/dayjs/issues/2505)) ([fefdcd4](https://github.com/iamkun/dayjs/commit/fefdcd4b6b807786f65139b6dd801e0014d7dc6f))
## [1.11.13](https://github.com/iamkun/dayjs/compare/v1.11.12...v1.11.13) (2024-08-20)
### Bug Fixes
* customParseFormat supports Q quter / w ww weekOfYear ([#2705](https://github.com/iamkun/dayjs/issues/2705)) ([8ca74f1](https://github.com/iamkun/dayjs/commit/8ca74f178eff4bb4eb686676cf35fe7edb815536))
## [1.11.12](https://github.com/iamkun/dayjs/compare/v1.11.11...v1.11.12) (2024-07-18)
### Bug Fixes
* Add NegativeYear Plugin support ([#2640](https://github.com/iamkun/dayjs/issues/2640)) ([6a42e0d](https://github.com/iamkun/dayjs/commit/6a42e0d7398639238f575d51287daaf4d495a2a3))
* add UTC support to negativeYear plugin ([#2692](https://github.com/iamkun/dayjs/issues/2692)) ([f3ef705](https://github.com/iamkun/dayjs/commit/f3ef705613af83333fe132b470896a65e12f31b0))
* Fix zero offset issue when use tz with locale ([#2532](https://github.com/iamkun/dayjs/issues/2532)) ([d0e6738](https://github.com/iamkun/dayjs/commit/d0e6738a66e1b65d3706aad2f9168ebb43d4f887))
* Improve typing for min/max plugin ([#2573](https://github.com/iamkun/dayjs/issues/2573)) ([4fbe94a](https://github.com/iamkun/dayjs/commit/4fbe94aaba8c815a42cf4d23dabac918ec50e68c))
* timezone plugin correct parse UTC tz ([#2693](https://github.com/iamkun/dayjs/issues/2693)) ([b575c81](https://github.com/iamkun/dayjs/commit/b575c81a8c9c85c7a0baf6f608a12f9d3ba95bd1))
## [1.11.11](https://github.com/iamkun/dayjs/compare/v1.11.10...v1.11.11) (2024-04-28)
### Bug Fixes
* day of week type literal ([#2630](https://github.com/iamkun/dayjs/issues/2630)) ([f68d73e](https://github.com/iamkun/dayjs/commit/f68d73efe562fdedd9e288ecb0ce6565e602f507))
* improve locale "zh-hk" format and meridiem ([#2419](https://github.com/iamkun/dayjs/issues/2419)) ([a947a51](https://github.com/iamkun/dayjs/commit/a947a5171aad5695eaf593bc95fe073de0f0894a))
* Update 'da' locale to match correct first week of year ([#2592](https://github.com/iamkun/dayjs/issues/2592)) ([44b0936](https://github.com/iamkun/dayjs/commit/44b0936ad709212b63e48672d8b9c225e2c3b830))
* update locale Bulgarian monthsShort Jan ([#2538](https://github.com/iamkun/dayjs/issues/2538)) ([f0c9a41](https://github.com/iamkun/dayjs/commit/f0c9a41c6ec91528f3790e442b0c5dff15a4e640))
## [1.11.10](https://github.com/iamkun/dayjs/compare/v1.11.9...v1.11.10) (2023-09-19)
### Bug Fixes
* Add Korean Day of Month with ordinal ([#2395](https://github.com/iamkun/dayjs/issues/2395)) ([dd55ee2](https://github.com/iamkun/dayjs/commit/dd55ee2aadd1009242235e47d558bbf028827896))
* change back fa locale to the Gregorian calendar equivalent ([#2411](https://github.com/iamkun/dayjs/issues/2411)) ([95e9458](https://github.com/iamkun/dayjs/commit/95e9458b221fe35e59ee4a160a5db247313a68fb))
* duration plugin - MILLISECONDS_A_MONTH const calculation ([#2362](https://github.com/iamkun/dayjs/issues/2362)) ([f0a0b54](https://github.com/iamkun/dayjs/commit/f0a0b546b074b3b511c2319a1ce83d412894b91f))
* duration plugin getter get result 0 instead of undefined ([#2369](https://github.com/iamkun/dayjs/issues/2369)) ([061aa7e](https://github.com/iamkun/dayjs/commit/061aa7ed6c31696974665fc9b11a74d30841ebed))
* fix isDayjs check logic ([#2383](https://github.com/iamkun/dayjs/issues/2383)) ([5f3f878](https://github.com/iamkun/dayjs/commit/5f3f8786c796cd432fe6bcb6966a810daea89203))
* fix timezone plugin to get correct locale setting ([#2420](https://github.com/iamkun/dayjs/issues/2420)) ([4f45012](https://github.com/iamkun/dayjs/commit/4f4501256fa1bc72128aae1d841bbd782df86aed))
* **locale:** add meridiem in `ar` locale ([#2418](https://github.com/iamkun/dayjs/issues/2418)) ([361be5c](https://github.com/iamkun/dayjs/commit/361be5c7c628614ee833d710acbe154a598b904d))
* round durations to millisecond precision for ISO string ([#2367](https://github.com/iamkun/dayjs/issues/2367)) ([890a17a](https://github.com/iamkun/dayjs/commit/890a17a8d8ddd43c7c8b806e3afc7b27f3288d27))
* sub-second precisions need to be rounded at the seconds field to avoid adding floats ([#2377](https://github.com/iamkun/dayjs/issues/2377)) ([a9d7d03](https://github.com/iamkun/dayjs/commit/a9d7d0398d22ebd4bfc3812ca0134a97606d54d9))
* update $x logic to avoid plugin error ([#2429](https://github.com/iamkun/dayjs/issues/2429)) ([2254635](https://github.com/iamkun/dayjs/commit/22546357f30924fcff3b3ffa14fd04be21f97a5e))
* Update Slovenian locale for relative time ([#2396](https://github.com/iamkun/dayjs/issues/2396)) ([5470a15](https://github.com/iamkun/dayjs/commit/5470a15e437fac803797363063b24f3ba3bd5299))
* update uzbek language translation ([#2327](https://github.com/iamkun/dayjs/issues/2327)) ([0a91056](https://github.com/iamkun/dayjs/commit/0a910564d76dc7c128da8e0d85d8e11ebdb5660b))
## [1.11.9](https://github.com/iamkun/dayjs/compare/v1.11.8...v1.11.9) (2023-07-01)
### Bug Fixes
* Add null to min and max plugin return type ([#2355](https://github.com/iamkun/dayjs/issues/2355)) ([62d9042](https://github.com/iamkun/dayjs/commit/62d9042eb84b78d78324694ccbeaad1679d37e68))
* check if null passed to objectSupport parser ([#2175](https://github.com/iamkun/dayjs/issues/2175)) ([013968f](https://github.com/iamkun/dayjs/commit/013968f609c32e2269df69b4dd1feb2e8e1e035a))
* dayjs.diff improve performance ([#2244](https://github.com/iamkun/dayjs/issues/2244)) ([33c80e1](https://github.com/iamkun/dayjs/commit/33c80e14cf14f70ceb4f54639e266cd70a3c3996))
* dayjs(null) throws error, not return dayjs object as invalid date ([#2334](https://github.com/iamkun/dayjs/issues/2334)) ([c79e2f5](https://github.com/iamkun/dayjs/commit/c79e2f5d03eef5660b1f13385b69c0c9668d2f98))
* objectSupport plugin causes an error when null is passed to dayjs function (closes [#2277](https://github.com/iamkun/dayjs/issues/2277)) ([#2342](https://github.com/iamkun/dayjs/issues/2342)) ([89bf31c](https://github.com/iamkun/dayjs/commit/89bf31ce0a36dcfc892029dc019d85d3654cf5fb))
* Optimize format method ([#2313](https://github.com/iamkun/dayjs/issues/2313)) ([1fe1b1d](https://github.com/iamkun/dayjs/commit/1fe1b1d9a214d3b8c9f267b432801424a493f1c4))
* update Duration plugin add/subtract take into account days in month ([#2337](https://github.com/iamkun/dayjs/issues/2337)) ([3b1060f](https://github.com/iamkun/dayjs/commit/3b1060f92183ab3a3c49289c2d87fbdd34c1eacc))
* update MinMax plugin 1. ignore the 'null' in args 2. return the only one arg ([#2330](https://github.com/iamkun/dayjs/issues/2330)) ([3c2c6ee](https://github.com/iamkun/dayjs/commit/3c2c6ee4db00bbb43a7a3bb0b56bc0d0f03daddc))
## [1.11.8](https://github.com/iamkun/dayjs/compare/v1.11.7...v1.11.8) (2023-06-02)
### Bug Fixes
* .format add padding to 'YYYY' ([#2231](https://github.com/iamkun/dayjs/issues/2231)) ([00c223b](https://github.com/iamkun/dayjs/commit/00c223b7e92970d07557133994fcb225a6d4c960))
* Added .valueOf method to Duration class ([#2226](https://github.com/iamkun/dayjs/issues/2226)) ([9b4fcfd](https://github.com/iamkun/dayjs/commit/9b4fcfde35b39693894be1821b6c7222fac98657))
* timezone type mark `date` parameter as optional ([#2222](https://github.com/iamkun/dayjs/issues/2222)) ([b87aa0e](https://github.com/iamkun/dayjs/commit/b87aa0ed9a748c478a66ef48230cd1d6350d7b8a))
* type file first parameter date is optional in isSame(), isBefore(), isAfter() ([#2272](https://github.com/iamkun/dayjs/issues/2272)) ([4d56f3e](https://github.com/iamkun/dayjs/commit/4d56f3eb2b3770879d60f824590bf1b32f237d47))
## [1.11.7](https://github.com/iamkun/dayjs/compare/v1.11.6...v1.11.7) (2022-12-06)
### Bug Fixes
* Add locale (zh-tw) meridiem ([#2149](https://github.com/iamkun/dayjs/issues/2149)) ([1e9ba76](https://github.com/iamkun/dayjs/commit/1e9ba761ff4e3f2759106dfe1aa9054d5826451c))
* update fa locale ([#2151](https://github.com/iamkun/dayjs/issues/2151)) ([1c26732](https://github.com/iamkun/dayjs/commit/1c267321a1a01b4947e1482bac67d67ebc7c3dfa))
## [1.11.6](https://github.com/iamkun/dayjs/compare/v1.11.5...v1.11.6) (2022-10-21)
### Bug Fixes
* add BigIntSupport plugin ([#2087](https://github.com/iamkun/dayjs/issues/2087)) ([f6dce48](https://github.com/iamkun/dayjs/commit/f6dce48a9e39677718b087867d9fd901d5078155))
* Fix objectSupport collides with Duration plugin - issue [#2027](https://github.com/iamkun/dayjs/issues/2027) ([#2038](https://github.com/iamkun/dayjs/issues/2038)) ([c9370ea](https://github.com/iamkun/dayjs/commit/c9370ea96bf420439ee7eaa4146e8ed643160312))
## [1.11.5](https://github.com/iamkun/dayjs/compare/v1.11.4...v1.11.5) (2022-08-12)
### Bug Fixes
* ordinal for nl not working ([#2011](https://github.com/iamkun/dayjs/issues/2011)) ([c93c85e](https://github.com/iamkun/dayjs/commit/c93c85eaa11564a1aae2d823480a417812c01bf4))
* wrong ordinal for french locale ([#2010](https://github.com/iamkun/dayjs/issues/2010)) ([dd192a7](https://github.com/iamkun/dayjs/commit/dd192a72fc5d26ce56481e89b0c1ccf5f939be0c))
## [1.11.4](https://github.com/iamkun/dayjs/compare/v1.11.3...v1.11.4) (2022-07-19)
### Bug Fixes
* correct past property in ku (kurdish) locale ([#1916](https://github.com/iamkun/dayjs/issues/1916)) ([74e82b9](https://github.com/iamkun/dayjs/commit/74e82b9da5ec8b90361fc27ac7c8b63faf354502))
* fix French [fr] local ordinal ([#1932](https://github.com/iamkun/dayjs/issues/1932)) ([8f09834](https://github.com/iamkun/dayjs/commit/8f09834a88b8e7f8353c6e7473d4711596890a8c))
* fix objectSupport plugin ConfigTypeMap type ([#1441](https://github.com/iamkun/dayjs/issues/1441)) ([#1990](https://github.com/iamkun/dayjs/issues/1990)) ([fd51fe4](https://github.com/iamkun/dayjs/commit/fd51fe4f7fa799d8c598343e71fa59299ec4cf93))
* fix type error to add ordianl property in InstanceLocaleDataReturn and GlobalLocaleDataReturn types ([#1931](https://github.com/iamkun/dayjs/issues/1931)) ([526f0ae](https://github.com/iamkun/dayjs/commit/526f0ae549ffbeeb9ef1099ca23964791fc59743))
* update locale ar-* meridiem function ([#1954](https://github.com/iamkun/dayjs/issues/1954)) ([3d31611](https://github.com/iamkun/dayjs/commit/3d316117f04362d31f4e8bd349620b8414ce5d0c))
* zh-tw / zh-hk locale ordinal error ([#1976](https://github.com/iamkun/dayjs/issues/1976)) ([0a1bd08](https://github.com/iamkun/dayjs/commit/0a1bd08e736be7d4e378aaca280caa6543f8066d))
## [1.11.3](https://github.com/iamkun/dayjs/compare/v1.11.2...v1.11.3) (2022-06-06)
### Bug Fixes
* customParseFormat plugin to parse comma as a separator character ([#1913](https://github.com/iamkun/dayjs/issues/1913)) ([41b1405](https://github.com/iamkun/dayjs/commit/41b1405971e099431211ae6c2a100cd797da4427))
* update Dutch [nl] locale ordinal ([#1908](https://github.com/iamkun/dayjs/issues/1908)) ([5da98f8](https://github.com/iamkun/dayjs/commit/5da98f8085d2d2847d79e38c795082703a14f24b))
## [1.11.2](https://github.com/iamkun/dayjs/compare/v1.11.1...v1.11.2) (2022-05-06)
### Bug Fixes
* add OpUnitType (week) to quarterOfYear startOf/endOf types ([#1865](https://github.com/iamkun/dayjs/issues/1865)) ([400bc3e](https://github.com/iamkun/dayjs/commit/400bc3e8915e0c58e7abbfd3a1235364b1abaf3e))
* Fix type issue with ManipulateType ([#1864](https://github.com/iamkun/dayjs/issues/1864)) ([d033dfc](https://github.com/iamkun/dayjs/commit/d033dfcfc1d2ced39b2733898e8d85ad5984c9e9))
* fix UTC plugin .valueOf not taking DST into account ([#1448](https://github.com/iamkun/dayjs/issues/1448)) ([27d1c50](https://github.com/iamkun/dayjs/commit/27d1c506100ae6624f258c21cc06b24768ced733))
## [1.11.1](https://github.com/iamkun/dayjs/compare/v1.11.0...v1.11.1) (2022-04-15)
### Bug Fixes
* add Bengali (Bangladesh) [bn-bd] locale ([#1806](https://github.com/iamkun/dayjs/issues/1806)) ([840ed76](https://github.com/iamkun/dayjs/commit/840ed76eedc085afefc4dedd05f31d44196b63b0))
* refactor replace deprecated String.prototype.substr() ([#1836](https://github.com/iamkun/dayjs/issues/1836)) ([627fa39](https://github.com/iamkun/dayjs/commit/627fa393e4daf83c92431162dbe18534b23fcbae))
* Update German [de] locale, adds the abbreviations for month including a . in the end, as in September -> Sept. ([#1831](https://github.com/iamkun/dayjs/issues/1831)) ([4e2802c](https://github.com/iamkun/dayjs/commit/4e2802cc3bec2941ffb737a15fb531c90951eafe))
* update Italian (Switzerland) [it-ch] locale relativeTime ([#1829](https://github.com/iamkun/dayjs/issues/1829)) ([8e6d11d](https://github.com/iamkun/dayjs/commit/8e6d11d053393d97bee1ba411adb2d82de1a58c4))
* update Kurdish [ku] locale strings and formatted output contains non-standard kurdish characters ([#1848](https://github.com/iamkun/dayjs/issues/1848)) ([a597d0b](https://github.com/iamkun/dayjs/commit/a597d0b1b8dd28e626f8c59d326622088f7b51e7))
* update locale bo [Tibetan]: corrected the orders in formats ([#1823](https://github.com/iamkun/dayjs/issues/1823)) ([e790516](https://github.com/iamkun/dayjs/commit/e79051617af6787358f6c9b5443d987b8b53a9e1))
# [1.11.0](https://github.com/iamkun/dayjs/compare/v1.10.8...v1.11.0) (2022-03-14)
### Bug Fixes
* Add Kirundi (rn) locale ([#1793](https://github.com/iamkun/dayjs/issues/1793)) ([74e5247](https://github.com/iamkun/dayjs/commit/74e5247227a779fffde39bdfcd1ee19911496709))
* add missing date shorthand D type definition ([#1752](https://github.com/iamkun/dayjs/issues/1752)) ([b045baf](https://github.com/iamkun/dayjs/commit/b045baf1646a81f7e4f446f355d02d5fb0ef4aa7))
* Add relative time to Galician (gl) and fix ordinals ([#1800](https://github.com/iamkun/dayjs/issues/1800)) ([dcbf170](https://github.com/iamkun/dayjs/commit/dcbf1708400624addfbddbc71e0f6a9ac15fa961))
* update German locales (de-at, de-ch) ([#1775](https://github.com/iamkun/dayjs/issues/1775)) ([f9055a7](https://github.com/iamkun/dayjs/commit/f9055a77bf3d84c575e5fcf99e21611138ba64d7))
* update Icelandic [is] locale relativeTime config ([#1796](https://github.com/iamkun/dayjs/issues/1796)) ([76f9e17](https://github.com/iamkun/dayjs/commit/76f9e1756de7e99c01e471dab30ea074b9ec9629))
* Update index.d.ts note ([#1716](https://github.com/iamkun/dayjs/issues/1716)) ([5a108ff](https://github.com/iamkun/dayjs/commit/5a108ff3159c53fd270ea7638f33c35c934d6457))
* Update locale German [de] monthsShort ([#1746](https://github.com/iamkun/dayjs/issues/1746)) ([4a7b7d0](https://github.com/iamkun/dayjs/commit/4a7b7d07c885bb9338514c234dbb708e24e9863e))
* update meridiem function to Kurdish (ku) locale ([#1725](https://github.com/iamkun/dayjs/issues/1725)) ([efd3904](https://github.com/iamkun/dayjs/commit/efd3904ff8cbf0a4fc064911dda76fc86b669f7b))
* update updateLocal plugin typescript types ([#1692](https://github.com/iamkun/dayjs/issues/1692)) ([c7a3f73](https://github.com/iamkun/dayjs/commit/c7a3f73064dbb63b4d365b2ad4c792f075f4d8d8))
### Features
* Fallback to language only locale + support uppercase locales ([#1524](https://github.com/iamkun/dayjs/issues/1524)) ([9138dc2](https://github.com/iamkun/dayjs/commit/9138dc28206875372da4fb74c64716437cd11b95))
## [1.10.8](https://github.com/iamkun/dayjs/compare/v1.10.7...v1.10.8) (2022-02-28)
### Bug Fixes
* set locale pt, pt-br correct weekdays and months ([#1697](https://github.com/iamkun/dayjs/issues/1697)) ([e019301](https://github.com/iamkun/dayjs/commit/e01930171c8235f58a114236f146086428f99569))
## [1.10.7](https://github.com/iamkun/dayjs/compare/v1.10.6...v1.10.7) (2021-09-10)
### Bug Fixes
* Add Spanish (Mexico) [es-mx] locale ([#1614](https://github.com/iamkun/dayjs/issues/1614)) ([3393f2a](https://github.com/iamkun/dayjs/commit/3393f2ad55346d55902683a2e31c6f253d96c8c2))
* Add Arabic (Iraq) [ar-iq] locale ([#1627](https://github.com/iamkun/dayjs/issues/1627)) ([b5a1391](https://github.com/iamkun/dayjs/commit/b5a1391011b247d08863d291542db5937b23b427))
* add format object type to type file ([#1572](https://github.com/iamkun/dayjs/issues/1572)) ([5a79cc6](https://github.com/iamkun/dayjs/commit/5a79cc6408e825d9e123629eb44fc19c996d7751))
* duration plugin when parsing duration from ISO string, set missing components to 0 instead of NaN ([#1611](https://github.com/iamkun/dayjs/issues/1611)) ([252585b](https://github.com/iamkun/dayjs/commit/252585b4b2bd59508150e21bb994908a9d78f9b0))
* narrow type for `add` and `subtract` ([#1576](https://github.com/iamkun/dayjs/issues/1576)) ([1686962](https://github.com/iamkun/dayjs/commit/16869621b1a42563064dbf87f80c1ebfd74c1188))
* update customParseFormat plugin strict x X parsing ([#1571](https://github.com/iamkun/dayjs/issues/1571)) ([08adda5](https://github.com/iamkun/dayjs/commit/08adda54edbcca38601f57841921d0f87f84e49e))
* update Lithuanian [lt] locale spelling for single month ([#1609](https://github.com/iamkun/dayjs/issues/1609)) ([255dc54](https://github.com/iamkun/dayjs/commit/255dc54d9295de135a9037ce6ca13cae4bfd2cfb))
* Update Norwegian Bokmål [nb] local yearStart 4 ([#1608](https://github.com/iamkun/dayjs/issues/1608)) ([7a8467c](https://github.com/iamkun/dayjs/commit/7a8467c0b7d59821f7e19d4a6973bcda8e4c19b1))
* update plugin advancedFormat `isValid` validation ([#1566](https://github.com/iamkun/dayjs/issues/1566)) ([755fc8b](https://github.com/iamkun/dayjs/commit/755fc8bb1c532eb991459f180eee81367d12016c))
* update Sinhalese [si] locale month name ([#1475](https://github.com/iamkun/dayjs/issues/1475)) ([63de2a8](https://github.com/iamkun/dayjs/commit/63de2a8b7dcd7e68c132c85d88572d4c9d296907))
* update utcOffset plugin type file ([#1604](https://github.com/iamkun/dayjs/issues/1604)) ([f68e4b1](https://github.com/iamkun/dayjs/commit/f68e4b1a29fc33542f74cde10ec6d9fb045ca37e))
## [1.10.6](https://github.com/iamkun/dayjs/compare/v1.10.5...v1.10.6) (2021-07-06)
### Bug Fixes
* add invalid date string override ([#1465](https://github.com/iamkun/dayjs/issues/1465)) ([#1470](https://github.com/iamkun/dayjs/issues/1470)) ([06f88f4](https://github.com/iamkun/dayjs/commit/06f88f425828b1ce96b737332d25145a95a4ee9d))
* add sv-fi Finland Swedish locale ([#1522](https://github.com/iamkun/dayjs/issues/1522)) ([8e32164](https://github.com/iamkun/dayjs/commit/8e32164855cff724642e24c37a631eb4c4d760c8))
* customParseFormat support parsing X x timestamp ([#1567](https://github.com/iamkun/dayjs/issues/1567)) ([eb087f5](https://github.com/iamkun/dayjs/commit/eb087f52861313b8dd8a5c1b77858665ec72859e))
* dayjs ConfigTypeMap add null & undefined ([#1560](https://github.com/iamkun/dayjs/issues/1560)) ([b5e40e6](https://github.com/iamkun/dayjs/commit/b5e40e6f16abeaea6a0facfa466d20aefaa8a444))
* Fix DayOfYear plugin when using BadMutable plugin ([#1511](https://github.com/iamkun/dayjs/issues/1511)) ([0b0c6a3](https://github.com/iamkun/dayjs/commit/0b0c6a31ec9c0aff991b0e8dd6eed116201274cc))
* Implement ordinal in Bulgarian translation (fixes [#1501](https://github.com/iamkun/dayjs/issues/1501)) ([#1502](https://github.com/iamkun/dayjs/issues/1502)) ([b728da5](https://github.com/iamkun/dayjs/commit/b728da5ed9ed08210004ed20ce5fcd52a92de7da))
* more strict delimiter in REGEX_PARSE ([#1555](https://github.com/iamkun/dayjs/issues/1555)) ([bfdab5c](https://github.com/iamkun/dayjs/commit/bfdab5c0d45a5736b68e8e1b1354fc021e05f607))
* parameter type ([#1549](https://github.com/iamkun/dayjs/issues/1549)) ([f369844](https://github.com/iamkun/dayjs/commit/f369844dd69d253c4c7cbf68150939db3db233be))
* update customParseFormat plugin to custom two-digit year parse function ([#1421](https://github.com/iamkun/dayjs/issues/1421)) ([bb5df55](https://github.com/iamkun/dayjs/commit/bb5df55cd3975dc7638b8f4e762afa470b6620f7))
* update names of weekdays and months in Bulgarian [bg] to lowercase ([#1438](https://github.com/iamkun/dayjs/issues/1438)) ([b246210](https://github.com/iamkun/dayjs/commit/b24621091fec9cf6704de21e4b323f6f0c4abbf1))
* update type file `.diff` ([#1505](https://github.com/iamkun/dayjs/issues/1505)) ([6508494](https://github.com/iamkun/dayjs/commit/6508494a4e62977b4397baaeef293d1bcf3c7235))
* update UTC plugin type file for strict parsing ([#1443](https://github.com/iamkun/dayjs/issues/1443)) ([b4f28df](https://github.com/iamkun/dayjs/commit/b4f28df219fe63202dffdbeeaec5677c4d2c9111))
## [1.10.5](https://github.com/iamkun/dayjs/compare/v1.10.4...v1.10.5) (2021-05-26)
### Bug Fixes
* add meridiem in ar locales ([#1375](https://github.com/iamkun/dayjs/issues/1375)) ([319f616](https://github.com/iamkun/dayjs/commit/319f616e572a03b984013d04d1b3a18ffd5b1190))
* Added Zulu support to customParseFormat ([#1359](https://github.com/iamkun/dayjs/issues/1359)) ([1138a3f](https://github.com/iamkun/dayjs/commit/1138a3f0a76592c6d72fb86c4399e133fa41e2ec))
* fix Bengali [bn] locale monthsShort error ([a0e6c0c](https://github.com/iamkun/dayjs/commit/a0e6c0cf3e1828020dfa11432c6716990f6ed5e0))
* fix missing types for ArraySupport plugin ([#1401](https://github.com/iamkun/dayjs/issues/1401)) ([b1abdc4](https://github.com/iamkun/dayjs/commit/b1abdc40ee6c9d18ff46c311a114e0755677ea6f))
* fix Ukrainian [uk] locale ([#1463](https://github.com/iamkun/dayjs/issues/1463)) ([0fdac93](https://github.com/iamkun/dayjs/commit/0fdac93ff2531542301b76952be9b084b2e2dfa0))
* hotfix for `Duration` types ([#1357](https://github.com/iamkun/dayjs/issues/1357)) ([855b7b3](https://github.com/iamkun/dayjs/commit/855b7b3d049a3903794f91db3419f167c00dabd2)), closes [#1354](https://github.com/iamkun/dayjs/issues/1354)
* timezone plugin DST error ([#1352](https://github.com/iamkun/dayjs/issues/1352)) ([71bed15](https://github.com/iamkun/dayjs/commit/71bed155edf32bff24379930ac684fc783538d8f))
* Update duration plugin change string to number ([#1394](https://github.com/iamkun/dayjs/issues/1394)) ([e1546d1](https://github.com/iamkun/dayjs/commit/e1546d1a0cdb97ae92cf11efe61d94707af6a3a3))
* update Duration plugin to support no-argument ([#1400](https://github.com/iamkun/dayjs/issues/1400)) ([8d9a5ae](https://github.com/iamkun/dayjs/commit/8d9a5ae0749e1b4e76babd4deeaa3b1d9776c29b))
* Update Finnish [fi] locale to set yearStart ([#1378](https://github.com/iamkun/dayjs/issues/1378)) ([f3370bd](https://github.com/iamkun/dayjs/commit/f3370bda4e435118f714c8a7daf5c88cfc4b69ba))
* update Russian [ru] locale meridiem and unit tests ([#1403](https://github.com/iamkun/dayjs/issues/1403)) ([f10f39d](https://github.com/iamkun/dayjs/commit/f10f39de7db70244a3c35e4a421090a12972457b))
* update Russian [ru] locale yearStart config ([#1372](https://github.com/iamkun/dayjs/issues/1372)) ([5052515](https://github.com/iamkun/dayjs/commit/5052515fe35b2444201ef8ef87220b1876a94d0a))
* update Slovenian [sl] locale to set correct ordinal ([#1386](https://github.com/iamkun/dayjs/issues/1386)) ([cb4f746](https://github.com/iamkun/dayjs/commit/cb4f74633b3020d6dbf19548c8cb13613dafca18))
* update Spanish [es] locale to change month names to lowercase ([#1414](https://github.com/iamkun/dayjs/issues/1414)) ([9c20e77](https://github.com/iamkun/dayjs/commit/9c20e77caf7b1b5eccf418175203b198d4e29535))
* update Swedish [sv] locale to set correct yearStart ([#1385](https://github.com/iamkun/dayjs/issues/1385)) ([66c5935](https://github.com/iamkun/dayjs/commit/66c59354964ef456bcd5f6152819618f44978082))
* update UTC plugin to support string argument like +HH:mm ([#1395](https://github.com/iamkun/dayjs/issues/1395)) ([656127c](https://github.com/iamkun/dayjs/commit/656127cc44eda50923a1ac755602863fc32b9e69))
## [1.10.4](https://github.com/iamkun/dayjs/compare/v1.10.3...v1.10.4) (2021-01-22)
### Bug Fixes
* Correct handling negative duration ([#1317](https://github.com/iamkun/dayjs/issues/1317)) ([3f5c085](https://github.com/iamkun/dayjs/commit/3f5c085608182472f20b84766b10949945663e44))
* Improve `Duration` types ([#1338](https://github.com/iamkun/dayjs/issues/1338)) ([4aca4b1](https://github.com/iamkun/dayjs/commit/4aca4b1b584a15de1146d929f95c944594032f20))
* parse a string for MMM month format with underscore delimiter ([#1349](https://github.com/iamkun/dayjs/issues/1349)) ([82ef9a3](https://github.com/iamkun/dayjs/commit/82ef9a304f06287ac0a14c4da9a7fe6152b5fec9))
* Update Bengali [bn] locale ([#1329](https://github.com/iamkun/dayjs/issues/1329)) ([02d96ec](https://github.com/iamkun/dayjs/commit/02d96ec7189f62d6ef8987135919cbb5ceff20a6))
* update locale Portuguese [pt] yearStart ([#1345](https://github.com/iamkun/dayjs/issues/1345)) ([5c785d5](https://github.com/iamkun/dayjs/commit/5c785d528cc08811638d7cbfc7fc158d67b32d75))
* update Polish [pl] locale yearStart ([#1348](https://github.com/iamkun/dayjs/issues/1348)) ([e93e6b8](https://github.com/iamkun/dayjs/commit/e93e6b8ffa61036b26382f1763e3864d4a7d5df5))
* Update Slovenian [sl] relativeTime locale ([#1333](https://github.com/iamkun/dayjs/issues/1333)) ([fe5f1d0](https://github.com/iamkun/dayjs/commit/fe5f1d0afbe57b70339e268047e6c3028ca3d59b))
## [1.10.3](https://github.com/iamkun/dayjs/compare/v1.10.2...v1.10.3) (2021-01-09)
### Bug Fixes
* fix customParseFormat plugin strict mode parse meridiem bug ([#1321](https://github.com/iamkun/dayjs/issues/1321)) ([e49eeef](https://github.com/iamkun/dayjs/commit/e49eeefbe8acb36419d36ca2e7ed8bc152f73ac1))
* fix weekYear plugin missing locale bug ([#1319](https://github.com/iamkun/dayjs/issues/1319)) ([344bdc0](https://github.com/iamkun/dayjs/commit/344bdc0eed6843edb05723dc7853a41833d88f08)), closes [#1304](https://github.com/iamkun/dayjs/issues/1304)
* update advancedFormat plugin to add format options for iso week and weekyear ([#1309](https://github.com/iamkun/dayjs/issues/1309)) ([2c54c64](https://github.com/iamkun/dayjs/commit/2c54c6441871a175ac9b95e41e4cd075dbac10cb))
* update devHelper to add dev warning setting locale before loading ([c5cc893](https://github.com/iamkun/dayjs/commit/c5cc89355e1e206ca72433c19c40cb528690b04f))
* update German [de] locale yearStart ([1858df8](https://github.com/iamkun/dayjs/commit/1858df8008de56570680723df89b36a8cbc970ef)), closes [#1264](https://github.com/iamkun/dayjs/issues/1264)
## [1.10.2](https://github.com/iamkun/dayjs/compare/v1.10.1...v1.10.2) (2021-01-05)
### Bug Fixes
* fix parse regex bug ([#1307](https://github.com/iamkun/dayjs/issues/1307)) ([db2b6a5](https://github.com/iamkun/dayjs/commit/db2b6a5ea8e70f9fda645d113ca33495aa96b616)), closes [#1305](https://github.com/iamkun/dayjs/issues/1305)
* remove module entry in package.json to revert 1.10.1 change ([#1314](https://github.com/iamkun/dayjs/issues/1314)) ([824dcb8](https://github.com/iamkun/dayjs/commit/824dcb8dfcccf14f64b6a2741a00fcdfe53dcd98))
* update devHelper add warning "passing Year as a Number will be parsed as a Unix timestamp" ([#1315](https://github.com/iamkun/dayjs/issues/1315)) ([b0dda31](https://github.com/iamkun/dayjs/commit/b0dda3139e25441ab4e7c1f4f192dee0ecce6ef8))
## [1.10.1](https://github.com/iamkun/dayjs/compare/v1.10.0...v1.10.1) (2021-01-03)
### Bug Fixes
* fix typescript type error UnitTypeLongPlural ([#1302](https://github.com/iamkun/dayjs/issues/1302)) ([bfaabe4](https://github.com/iamkun/dayjs/commit/bfaabe4f398c11564eca6cda7c8aded22e1b231a)), closes [#1300](https://github.com/iamkun/dayjs/issues/1300)
# [1.10.0](https://github.com/iamkun/dayjs/compare/v1.9.8...v1.10.0) (2021-01-03)
### Bug Fixes
* add ordinal to localeData plugin ([#1266](https://github.com/iamkun/dayjs/issues/1266)) ([fd229fa](https://github.com/iamkun/dayjs/commit/fd229fa5bd26bcba810e2535eb937ea8d99106c2))
* add preParsePostFormat plugin & update Arabic [ar] locale ([#1255](https://github.com/iamkun/dayjs/issues/1255)) ([f2e4790](https://github.com/iamkun/dayjs/commit/f2e479006a9a49bc0917f8620101d40ac645f7f2))
* add type support for plural forms of units ([#1289](https://github.com/iamkun/dayjs/issues/1289)) ([de49bb1](https://github.com/iamkun/dayjs/commit/de49bb100badfb92b9a5933cc568841f340a923f))
* escape last period to match only milliseconds ([#1239](https://github.com/iamkun/dayjs/issues/1239)) ([#1295](https://github.com/iamkun/dayjs/issues/1295)) ([64037e6](https://github.com/iamkun/dayjs/commit/64037e6a8cf303dcfd2b954f309bd9691f87fffc))
### Features
* add ES6 Module Support, package.json module point to "esm/index.js" ([#1298](https://github.com/iamkun/dayjs/issues/1298)) ([f63375d](https://github.com/iamkun/dayjs/commit/f63375dea89becbd3bb2bb8ea7289c58c752bfed)), closes [#598](https://github.com/iamkun/dayjs/issues/598) [#313](https://github.com/iamkun/dayjs/issues/313)
## [1.9.8](https://github.com/iamkun/dayjs/compare/v1.9.7...v1.9.8) (2020-12-27)
### Bug Fixes
* fix Ukrainian [uk] locale typo ([1605cc0](https://github.com/iamkun/dayjs/commit/1605cc0f6fe0e9c46a92d529bc9cd6e130432337))
* update Hebrew [he] locale for double units ([#1287](https://github.com/iamkun/dayjs/issues/1287)) ([1c4b0da](https://github.com/iamkun/dayjs/commit/1c4b0da1468522e59dc9ee646d10dd2b31477d99))
* update zh locale meridiem "noon" ([0e7ff3d](https://github.com/iamkun/dayjs/commit/0e7ff3dd29ca3aed85cb76dfcb8298d326e26542))
* update zh-cn locale definition of noon ([#1278](https://github.com/iamkun/dayjs/issues/1278)) ([d5930b9](https://github.com/iamkun/dayjs/commit/d5930b96ff884f4176ca3fcb1bc95e8f1ec75c71))
## [1.9.7](https://github.com/iamkun/dayjs/compare/v1.9.6...v1.9.7) (2020-12-05)
### Bug Fixes
* add duration.format to format a Duration ([#1202](https://github.com/iamkun/dayjs/issues/1202)) ([9a859a1](https://github.com/iamkun/dayjs/commit/9a859a147ba223a1eeff0f2bb6f33d97e0ccc6c7))
* Add function handling for relativeTime.future and relativeTime.past ([#1197](https://github.com/iamkun/dayjs/issues/1197)) ([ef1979c](https://github.com/iamkun/dayjs/commit/ef1979ce85c61fe2d759ef3c37cb6aaf2358094f))
* avoid install installed plugin ([#1214](https://github.com/iamkun/dayjs/issues/1214)) ([a92eb6c](https://github.com/iamkun/dayjs/commit/a92eb6c4dc1437ec920e69484d52984f5921a8ea))
* avoid memory leak after installing a plugin too many times ([b8d2e32](https://github.com/iamkun/dayjs/commit/b8d2e32a9eb59661a7ed6200daa070687becaebd))
* fix diff bug when UTC plugin enabled ([#1201](https://github.com/iamkun/dayjs/issues/1201)) ([9544ed2](https://github.com/iamkun/dayjs/commit/9544ed2a6c466b8308d26b33a388a6737435a1f4)), closes [#1200](https://github.com/iamkun/dayjs/issues/1200)
* fix startOf/endOf bug in timezone plugin ([#1229](https://github.com/iamkun/dayjs/issues/1229)) ([eb5fbc4](https://github.com/iamkun/dayjs/commit/eb5fbc4c7d1b62a8615d2f263b404a9515d8e15c))
* fix utc plugin diff edge case ([#1187](https://github.com/iamkun/dayjs/issues/1187)) ([971b3d4](https://github.com/iamkun/dayjs/commit/971b3d40b4c9403165138f1034e2223cd97c3abf))
* update customParseFormat plugin to parse 2-digit offset ([#1209](https://github.com/iamkun/dayjs/issues/1209)) ([b56936a](https://github.com/iamkun/dayjs/commit/b56936ab77b8f6289a1b77d49307b495c4bf9f91)), closes [#1205](https://github.com/iamkun/dayjs/issues/1205)
* Update timezone plugin type definition ([#1221](https://github.com/iamkun/dayjs/issues/1221)) ([34cfb92](https://github.com/iamkun/dayjs/commit/34cfb920b9653ad44d4b31fe49e533692a3ce01b))
## [1.9.6](https://github.com/iamkun/dayjs/compare/v1.9.5...v1.9.6) (2020-11-10)
### Bug Fixes
* fix customParseFormat plugin parsing date bug ([#1198](https://github.com/iamkun/dayjs/issues/1198)) ([50f05ad](https://github.com/iamkun/dayjs/commit/50f05ad3addf27827c5657ae7519514e40d9faec)), closes [#1194](https://github.com/iamkun/dayjs/issues/1194)
* Update lv (Latvian) locale relative time ([#1192](https://github.com/iamkun/dayjs/issues/1192)) ([6d6c684](https://github.com/iamkun/dayjs/commit/6d6c6841b13ba4f7e69de92caf132a3592c5253a))
## [1.9.5](https://github.com/iamkun/dayjs/compare/v1.9.4...v1.9.5) (2020-11-05)
### Bug Fixes
* customParseFormat plugin supports parsing localizedFormats ([#1110](https://github.com/iamkun/dayjs/issues/1110)) ([402b603](https://github.com/iamkun/dayjs/commit/402b603aa3ee4199786950bc88b3fdc6b527aa35))
* fix customParseFormat plugin parse meridiem bug ([#1169](https://github.com/iamkun/dayjs/issues/1169)) ([9e8f8d9](https://github.com/iamkun/dayjs/commit/9e8f8d96c69d557f4d267f42567c25ae9e7ab227)), closes [#1168](https://github.com/iamkun/dayjs/issues/1168)
* fix devHelper error in umd bundle in browser ([#1165](https://github.com/iamkun/dayjs/issues/1165)) ([d11b5ee](https://github.com/iamkun/dayjs/commit/d11b5ee7dc11af671355f65ccda00f6ba42cc725))
* fix utc plugin diff bug in DST ([#1171](https://github.com/iamkun/dayjs/issues/1171)) ([f8da3fe](https://github.com/iamkun/dayjs/commit/f8da3fe7e50c84c0502bf5be0b364910922dbd79)), closes [#1097](https://github.com/iamkun/dayjs/issues/1097) [#1021](https://github.com/iamkun/dayjs/issues/1021)
* isoWeek plugin type ([#1177](https://github.com/iamkun/dayjs/issues/1177)) ([c3d0436](https://github.com/iamkun/dayjs/commit/c3d0436b06f74989e3a2c751a5d170f8072c4aad))
* update localeData plugin to support meridiem ([#1174](https://github.com/iamkun/dayjs/issues/1174)) ([fdb09e4](https://github.com/iamkun/dayjs/commit/fdb09e4074cc7e8f6196846f18d3566c1f9e8fcd)), closes [#1172](https://github.com/iamkun/dayjs/issues/1172)
* update timezone plugin parse Date instance / timestamp logic & remove useless test ([#1183](https://github.com/iamkun/dayjs/issues/1183)) ([a7f858b](https://github.com/iamkun/dayjs/commit/a7f858bb70ad81f718ba35c479e84b54eace48b2))
## [1.9.4](https://github.com/iamkun/dayjs/compare/v1.9.3...v1.9.4) (2020-10-23)
### Bug Fixes
* Add descriptions to types ([#1148](https://github.com/iamkun/dayjs/issues/1148)) ([9a407a1](https://github.com/iamkun/dayjs/commit/9a407a140b089345a387d1aceab4d0d1635229c7))
* add devHelper plugin ([#1163](https://github.com/iamkun/dayjs/issues/1163)) ([de49dc8](https://github.com/iamkun/dayjs/commit/de49dc80c83b85de4170571b64412bd60ada221b))
* Fix Hungarian (hu) locale ([#1112](https://github.com/iamkun/dayjs/issues/1112)) ([ab13754](https://github.com/iamkun/dayjs/commit/ab13754f43c5033dacaa0eb2042dc4ab1a7a2754))
* fix minMax plugin parsing empty array bug ([#1062](https://github.com/iamkun/dayjs/issues/1062)) ([368108b](https://github.com/iamkun/dayjs/commit/368108bc6d5cb1542f711b8eba722bd4dfaab0cd))
* update adding/subtracting Duration from Dayjs object ([#1156](https://github.com/iamkun/dayjs/issues/1156)) ([f861aca](https://github.com/iamkun/dayjs/commit/f861acac3e83e28d3a4a96312c71119fd6b544fc))
* update en-NZ locale to use proper ordinal formatting function ([#1143](https://github.com/iamkun/dayjs/issues/1143)) ([fcdbc58](https://github.com/iamkun/dayjs/commit/fcdbc5880710456a29b2bacf250542230bf48b99))
* update localeData plugin type ([#1116](https://github.com/iamkun/dayjs/issues/1116)) ([ee5a4ec](https://github.com/iamkun/dayjs/commit/ee5a4ec41edddfb57d103c35182dc635c9264a10))
* update timezone plugin to support custom parse format ([#1160](https://github.com/iamkun/dayjs/issues/1160)) ([48cbf31](https://github.com/iamkun/dayjs/commit/48cbf3118ba5427de428777c2e025896db654f2e)), closes [#1159](https://github.com/iamkun/dayjs/issues/1159)
* update timezone plugin to support keepLocalTime ([#1161](https://github.com/iamkun/dayjs/issues/1161)) ([1d429e5](https://github.com/iamkun/dayjs/commit/1d429e5fe4467ebddcf81b43cf6f36e5e3be944c)), closes [#1149](https://github.com/iamkun/dayjs/issues/1149)
## [1.9.3](https://github.com/iamkun/dayjs/compare/v1.9.2...v1.9.3) (2020-10-13)
### Bug Fixes
* fix localizedFormat export error ([#1133](https://github.com/iamkun/dayjs/issues/1133)) ([deecd6a](https://github.com/iamkun/dayjs/commit/deecd6ab8a2f4173ee7046f6b568b41fd2677531)), closes [#1132](https://github.com/iamkun/dayjs/issues/1132)
## [1.9.2](https://github.com/iamkun/dayjs/compare/v1.9.1...v1.9.2) (2020-10-13)
### Bug Fixes
* add arraySupport plugin ([#1129](https://github.com/iamkun/dayjs/issues/1129)) ([be505c2](https://github.com/iamkun/dayjs/commit/be505c2c540261027342cecc55d8919a3d18d893))
* export type of duration plugin ([#1094](https://github.com/iamkun/dayjs/issues/1094)) ([2c92e71](https://github.com/iamkun/dayjs/commit/2c92e71bf55d09601120cdf433da7a19cc8abff6))
* Fix LocaleData plugin longDateFormat lowercase error ([#1101](https://github.com/iamkun/dayjs/issues/1101)) ([7937ccd](https://github.com/iamkun/dayjs/commit/7937ccdeac47d094a60e65ebb62a6020b81c46f4))
* Fix objectSupport plugin bug in UTC ([#1107](https://github.com/iamkun/dayjs/issues/1107)) ([fe90bb6](https://github.com/iamkun/dayjs/commit/fe90bb6944f2ff1969ca975954d303b449dfa95b)), closes [#1105](https://github.com/iamkun/dayjs/issues/1105)
* fix Serbian locale grammar (sr, sr-cyrl) ([#1108](https://github.com/iamkun/dayjs/issues/1108)) ([cc87eff](https://github.com/iamkun/dayjs/commit/cc87eff8b75b0d86ce0956516319d402bccae6c0))
* Fix typo for "monday" in arabic ([#1067](https://github.com/iamkun/dayjs/issues/1067)) ([2e1e426](https://github.com/iamkun/dayjs/commit/2e1e42650124f30282dc4d710798d576b928f1c7))
* support dayjs.add(Duration), dayjs.subtract(Duration) ([#1099](https://github.com/iamkun/dayjs/issues/1099)) ([b1a0294](https://github.com/iamkun/dayjs/commit/b1a02942c5238203aaa04ce9a074c73742324ab7))
* update Breton [br] locale relativeTime config ([#1103](https://github.com/iamkun/dayjs/issues/1103)) ([b038bfd](https://github.com/iamkun/dayjs/commit/b038bfdb128889d677c95534d2be29cc30c9e72f))
* update Catalan [ca] locale ordinal ([73da380](https://github.com/iamkun/dayjs/commit/73da38024c8b550bdcfbe3ff7e578e742c7aecf2))
* update German [de] locale relativeTime config ([#1109](https://github.com/iamkun/dayjs/issues/1109)) ([f6e771b](https://github.com/iamkun/dayjs/commit/f6e771b70f93d19ebb12e6b794aa4628a1796248))
* update localeData plugin to add longDateFormat to global localeData ([#1106](https://github.com/iamkun/dayjs/issues/1106)) ([16937d1](https://github.com/iamkun/dayjs/commit/16937d16e053b8c1d4a607622fa2fdbfd9809832))
* Update objectSupport plugin to return current date time while parsing empty object ([f56783e](https://github.com/iamkun/dayjs/commit/f56783e14d8cf50916b015e7188b23bb6fbca839))
## [1.9.1](https://github.com/iamkun/dayjs/compare/v1.9.0...v1.9.1) (2020-09-28)
### Bug Fixes
* Fix objectSupport plugin to get the correct result (zero-based month) ([#1089](https://github.com/iamkun/dayjs/issues/1089)) ([f95ac15](https://github.com/iamkun/dayjs/commit/f95ac15a4577ae5a3d1ce353872a2cd9fc454bc2))
# [1.9.0](https://github.com/iamkun/dayjs/compare/v1.8.36...v1.9.0) (2020-09-28)
### Bug Fixes
* Add `setDefault` typing to timezone.d.ts ([#1057](https://github.com/iamkun/dayjs/issues/1057)) ([c0f0886](https://github.com/iamkun/dayjs/commit/c0f088620f17260e6e3ebce7697d561b5623f5f3))
* fix DST bug in utc plugin ([#1053](https://github.com/iamkun/dayjs/issues/1053)) ([3d73543](https://github.com/iamkun/dayjs/commit/3d7354361f042ced1176d91f9ae9edffe6173425))
* Fix optional type for timezone plugin ([#1081](https://github.com/iamkun/dayjs/issues/1081)) ([a6ebcf2](https://github.com/iamkun/dayjs/commit/a6ebcf283a83273562dce5663155e3b3a12ea9a5)), closes [#1079](https://github.com/iamkun/dayjs/issues/1079)
* Fix timezone plugin conversion bug ([#1073](https://github.com/iamkun/dayjs/issues/1073)) ([16816a3](https://github.com/iamkun/dayjs/commit/16816a31ff43220aca9d1d179df6b729182abb55))
* update duration plugin type file ([#1065](https://github.com/iamkun/dayjs/issues/1065)) ([94af9af](https://github.com/iamkun/dayjs/commit/94af9af27c5bc182cbb24f1845e561dd1d82d776))
* update timezone plugin to support getting offset name e.g. EST ([#1069](https://github.com/iamkun/dayjs/issues/1069)) ([cbb755e](https://github.com/iamkun/dayjs/commit/cbb755e5c68d49c5678291f3ce832b32831a056e))
* update utc plugin to support keepLocalTime `.utc(true)` ([#1080](https://github.com/iamkun/dayjs/issues/1080)) ([5ce4e0d](https://github.com/iamkun/dayjs/commit/5ce4e0d2f552f3645262537ff7afdc946f5a7e72))
### Features
* Correct casing for en-sg locale name ([#1048](https://github.com/iamkun/dayjs/issues/1048)) ([2edaddc](https://github.com/iamkun/dayjs/commit/2edaddc22a7eb914f915531f389766217acd7034))
## [1.8.36](https://github.com/iamkun/dayjs/compare/v1.8.35...v1.8.36) (2020-09-17)
### Bug Fixes
* Add Amharic (am) locale ([#1046](https://github.com/iamkun/dayjs/issues/1046)) ([cdc49a1](https://github.com/iamkun/dayjs/commit/cdc49a1911c74b7ea96ed222f42796d53715cfed))
* Export Duration type in duration plugin ([#1043](https://github.com/iamkun/dayjs/issues/1043)) ([0f20c3a](https://github.com/iamkun/dayjs/commit/0f20c3ac75d9ac1026a15a7bb343d3a150d9b30f))
* Fix duration plugin parsing milliseconds bug ([#1042](https://github.com/iamkun/dayjs/issues/1042)) ([fe2301b](https://github.com/iamkun/dayjs/commit/fe2301b22318886aaa89ed1620e0a118e98c2b8a))
* Timezone plugin set default timezone ([#1033](https://github.com/iamkun/dayjs/issues/1033)) ([0c2050a](https://github.com/iamkun/dayjs/commit/0c2050a152da708b01edd6150a5013f642b14576))
* Timezone plugin should have the same behavior in latest ICU version ([#1032](https://github.com/iamkun/dayjs/issues/1032)) ([de31592](https://github.com/iamkun/dayjs/commit/de315921575cc50c38464b27d0338e30a54d8e2a))
* Update Finnish (fi) locale ([#963](https://github.com/iamkun/dayjs/issues/963)) ([cf8b6a0](https://github.com/iamkun/dayjs/commit/cf8b6a096f24b54cbdb95675ac386d8ac85ea616))
* Update Polish (pl) , Hungarian (hr) and Lithuanian (lt) localization ([#1045](https://github.com/iamkun/dayjs/issues/1045)) ([638fd39](https://github.com/iamkun/dayjs/commit/638fd394fc24f4188390faf387da6b156e7c6320))
## [1.8.35](https://github.com/iamkun/dayjs/compare/v1.8.34...v1.8.35) (2020-09-02)
### Bug Fixes
* Fix BadMutable plugin bug in .diff ([#1023](https://github.com/iamkun/dayjs/issues/1023)) ([40ab6d9](https://github.com/iamkun/dayjs/commit/40ab6d9a53e8047cfca63c611c25dd045372d021))
* fix LocaleData plugin to support instance.weekdays() API ([#1019](https://github.com/iamkun/dayjs/issues/1019)) ([a09d259](https://github.com/iamkun/dayjs/commit/a09d259a407b81d1cb6bb5623fad551c775d8674)), closes [#1017](https://github.com/iamkun/dayjs/issues/1017)
* Update Dutch (nl) locale to set correct yearStart ([1533a2c](https://github.com/iamkun/dayjs/commit/1533a2cc1475270032da2d87b19fc3d62327e6e3))
## [1.8.34](https://github.com/iamkun/dayjs/compare/v1.8.33...v1.8.34) (2020-08-20)
### Bug Fixes
* Fix Timezone plugin to preserve milliseconds while changing timezone ([#1003](https://github.com/iamkun/dayjs/issues/1003)) ([5f446ed](https://github.com/iamkun/dayjs/commit/5f446eda770fa97e895c81a8195b3ba5d082cef0)), closes [#1002](https://github.com/iamkun/dayjs/issues/1002)
* support parsing unlimited decimals of millisecond ([#1010](https://github.com/iamkun/dayjs/issues/1010)) ([d1bdd36](https://github.com/iamkun/dayjs/commit/d1bdd36a56e3d1786523a180e3fc18068f609135)), closes [#544](https://github.com/iamkun/dayjs/issues/544)
* update Duration plugin to support global locale ([#1008](https://github.com/iamkun/dayjs/issues/1008)) ([1c49c83](https://github.com/iamkun/dayjs/commit/1c49c83e79811eede13db6372b5d65db598aee77)), closes [#1007](https://github.com/iamkun/dayjs/issues/1007)
## [1.8.33](https://github.com/iamkun/dayjs/compare/v1.8.32...v1.8.33) (2020-08-10)
### Bug Fixes
* Add PluralGetSet plugin for plural getters/setters ([#996](https://github.com/iamkun/dayjs/issues/996)) ([f76e3ce](https://github.com/iamkun/dayjs/commit/f76e3ce2fbe5d3e9ed9121086baf55eb0cc4d355))
* Add typescript type defs in esm build ([#985](https://github.com/iamkun/dayjs/issues/985)) ([50e3b3c](https://github.com/iamkun/dayjs/commit/50e3b3c6719cb0b4ec6eff394dacd63d5db8f253))
* Fix isoWeek Plugin cal bug in UTC mode ([#993](https://github.com/iamkun/dayjs/issues/993)) ([f2e5f32](https://github.com/iamkun/dayjs/commit/f2e5f327aaf12b4572296ec6e107ecc05fcf76e7))
* Fix Timezone plugin parsing js date, Day.js object, timestamp bug && update type file ([#994](https://github.com/iamkun/dayjs/issues/994)) ([22f3d49](https://github.com/iamkun/dayjs/commit/22f3d49405da98db6da56d1673eebcd01b57554b)), closes [#992](https://github.com/iamkun/dayjs/issues/992) [#989](https://github.com/iamkun/dayjs/issues/989)
* Fix Timezone plugin UTCOffset rounding bug ([#987](https://github.com/iamkun/dayjs/issues/987)) ([b07182b](https://github.com/iamkun/dayjs/commit/b07182bbdf5aef7f6bf1e88fcd38432e2b8ee465)), closes [#986](https://github.com/iamkun/dayjs/issues/986)
* Fix UTC plugin bug while comparing an utc instance to a local one ([#995](https://github.com/iamkun/dayjs/issues/995)) ([747c0fb](https://github.com/iamkun/dayjs/commit/747c0fb4eba6353755b5dad3417fd8d5a408c378))
* Update pt-br locale weekStart 0 ([#984](https://github.com/iamkun/dayjs/issues/984)) ([0f881c1](https://github.com/iamkun/dayjs/commit/0f881c18efb02b9d0ba7f76cba92bb504226fa95))
## [1.8.32](https://github.com/iamkun/dayjs/compare/v1.8.31...v1.8.32) (2020-08-04)
### Bug Fixes
* Add Experimental Timezone Plugin ([#974](https://github.com/iamkun/dayjs/issues/974)) ([e69caba](https://github.com/iamkun/dayjs/commit/e69caba1b0957241a855aa0ae38db899fa2c3795))
* fix parse date string error e.g. '2020/9/30' ([#980](https://github.com/iamkun/dayjs/issues/980)) ([231790d](https://github.com/iamkun/dayjs/commit/231790da62af0494732960c2c50d86ae9bf63ec6)), closes [#979](https://github.com/iamkun/dayjs/issues/979)
* update monthDiff function to get more accurate results ([19e8a7f](https://github.com/iamkun/dayjs/commit/19e8a7f2f7582b717f49d446822e39603694433c))
* Update UTC plugin to support keepLocalTime ([#973](https://github.com/iamkun/dayjs/issues/973)) ([9f488e5](https://github.com/iamkun/dayjs/commit/9f488e5aca92f0b4c2951459436829d79f86d8d7))
## [1.8.31](https://github.com/iamkun/dayjs/compare/v1.8.30...v1.8.31) (2020-07-29)
### Bug Fixes
* Rollback LocalePresetType to string ([#968](https://github.com/iamkun/dayjs/issues/968)) ([b342bd3](https://github.com/iamkun/dayjs/commit/b342bd3d84987d6c7587a0c4590d614fb0e670d7))
* Update Regex to parse 'YYYY' correctly ([#969](https://github.com/iamkun/dayjs/issues/969)) ([70c1239](https://github.com/iamkun/dayjs/commit/70c123990dcc6bd479fa2b5d7f9985127872a826))
## [1.8.30](https://github.com/iamkun/dayjs/compare/v1.8.29...v1.8.30) (2020-07-22)
### Bug Fixes
* Add Haitian Creole (ht) and Spanish Puerto Rico (es-pr) locale configs ([#958](https://github.com/iamkun/dayjs/issues/958)) ([b2642e2](https://github.com/iamkun/dayjs/commit/b2642e2d1f87734a34808c66e5176cb18bc0414d))
* Fix UTC plugin wrong hour bug while adding month or year ([#957](https://github.com/iamkun/dayjs/issues/957)) ([28ae070](https://github.com/iamkun/dayjs/commit/28ae070024ff26685c88ce4cc8747307e86923c9))
* Update French (fr) locale to set correct yearStart ([14ab808](https://github.com/iamkun/dayjs/commit/14ab808a7b7e226f2eb2cbe894916a18ed5d967d)), closes [#956](https://github.com/iamkun/dayjs/issues/956)
## [1.8.29](https://github.com/iamkun/dayjs/compare/v1.8.28...v1.8.29) (2020-07-02)
### Bug Fixes
* Duration plugin supports parse ISO string with week (W) ([#950](https://github.com/iamkun/dayjs/issues/950)) ([f0fc12a](https://github.com/iamkun/dayjs/commit/f0fc12adadcab53fb0577ad8f5e2f1cf784fd8f5))
* LocaleData plugin supports locale order ([#938](https://github.com/iamkun/dayjs/issues/938)) ([62f429d](https://github.com/iamkun/dayjs/commit/62f429db73a0a069b1267231dea172b85f4b90e3)), closes [#936](https://github.com/iamkun/dayjs/issues/936)
* Update type definition to support array format ([#945](https://github.com/iamkun/dayjs/issues/945)) ([81d4740](https://github.com/iamkun/dayjs/commit/81d4740511d47e34f891b21afeb0449ef8a28688)), closes [#944](https://github.com/iamkun/dayjs/issues/944)
* Update type definition to support strict mode ([#951](https://github.com/iamkun/dayjs/issues/951)) ([8d54f3f](https://github.com/iamkun/dayjs/commit/8d54f3f7d4d161e72c767fa09699e70a2b3d681c))
## [1.8.28](https://github.com/iamkun/dayjs/compare/v1.8.27...v1.8.28) (2020-05-28)
### Bug Fixes
* Fix CustomParseFormat plugin month index error ([#918](https://github.com/iamkun/dayjs/issues/918)) ([fa2ec7f](https://github.com/iamkun/dayjs/commit/fa2ec7fcb980dcd2c7498dafe2f9ca2e52d735cf)), closes [#915](https://github.com/iamkun/dayjs/issues/915)
* Update Ukrainian (uk) locale monthFormat and monthStandalone ([#899](https://github.com/iamkun/dayjs/issues/899)) ([a08756e](https://github.com/iamkun/dayjs/commit/a08756e80bd1d7126fca28c5ad9e382613fc86c4))
## [1.8.27](https://github.com/iamkun/dayjs/compare/v1.8.26...v1.8.27) (2020-05-14)
### Bug Fixes
* Add Kinyarwanda (rw) locale ([#903](https://github.com/iamkun/dayjs/issues/903)) ([f355235](https://github.com/iamkun/dayjs/commit/f355235a836540d77880959fb1b614c87e9f7b3e))
* Add plugin objectSupport ([#887](https://github.com/iamkun/dayjs/issues/887)) ([52dfb13](https://github.com/iamkun/dayjs/commit/52dfb13a6b84f0a753cc5761192b92416f440961))
* Add Turkmen (tk) locale ([#893](https://github.com/iamkun/dayjs/issues/893)) ([a9ca8dc](https://github.com/iamkun/dayjs/commit/a9ca8dcbbd0964c5b9abb4e8a2d620c983cf091a))
* Fix CustomParseFormat plugin set locale error ([#896](https://github.com/iamkun/dayjs/issues/896)) ([8035c8a](https://github.com/iamkun/dayjs/commit/8035c8a760549b631252252718db3cdc4ab2f68f))
* Fix locale month function bug ([#908](https://github.com/iamkun/dayjs/issues/908)) ([bf347c3](https://github.com/iamkun/dayjs/commit/bf347c36e401f50727fb5afcc537497b54b90d6b))
* Update CustomParseFormat plugin to support Array formats ([#906](https://github.com/iamkun/dayjs/issues/906)) ([97856c6](https://github.com/iamkun/dayjs/commit/97856c603ef5fbbeb1cf8a42387479e56a77dbe8))
## [1.8.26](https://github.com/iamkun/dayjs/compare/v1.8.25...v1.8.26) (2020-04-30)
### Bug Fixes
* Fix Duration plugin `.toISOString` format bug ([#889](https://github.com/iamkun/dayjs/issues/889)) ([058d624](https://github.com/iamkun/dayjs/commit/058d624808fd2be024ae846bcb2e03885f39b556)), closes [#888](https://github.com/iamkun/dayjs/issues/888)
* Fix WeekOfYear plugin bug while using BadMutable plugin ([#884](https://github.com/iamkun/dayjs/issues/884)) ([2977438](https://github.com/iamkun/dayjs/commit/2977438458542573a4500e21f7ba5d1f8442960e))
* Update CustomParseFormat plugin strict mode ([#882](https://github.com/iamkun/dayjs/issues/882)) ([db642ac](https://github.com/iamkun/dayjs/commit/db642ac73e52e00d8c41546b2935c9e691cf66e0))
* Update RelativeTime plugin default config ([#883](https://github.com/iamkun/dayjs/issues/883)) ([0606f42](https://github.com/iamkun/dayjs/commit/0606f425aef8ccbfc3da3e43cba368130603b0cc))
## [1.8.25](https://github.com/iamkun/dayjs/compare/v1.8.24...v1.8.25) (2020-04-21)
### Bug Fixes
* Fix CustomParseFormat plugin of parsing only YYYY / YYYY-MM bug ([#873](https://github.com/iamkun/dayjs/issues/873)) ([3cea04d](https://github.com/iamkun/dayjs/commit/3cea04d33d54d44bbdd3d026b5c7f67ebf176116)), closes [#849](https://github.com/iamkun/dayjs/issues/849)
* Fix Duration plugin get seconds ([#867](https://github.com/iamkun/dayjs/issues/867)) ([62b092d](https://github.com/iamkun/dayjs/commit/62b092d9f9a3db5506ef01f798bdf211f163f53f))
* Fix type definition of locale ([9790b85](https://github.com/iamkun/dayjs/commit/9790b853e6113243a7f4a81dd12c6509e406a102))
* Fix UTC plugin startOf, endOf bug ([#872](https://github.com/iamkun/dayjs/issues/872)) ([4141084](https://github.com/iamkun/dayjs/commit/4141084ba96d35cadcda3f1e661bf1d0f6c8e4de)), closes [#809](https://github.com/iamkun/dayjs/issues/809) [#808](https://github.com/iamkun/dayjs/issues/808)
## [1.8.24](https://github.com/iamkun/dayjs/compare/v1.8.23...v1.8.24) (2020-04-10)
### Bug Fixes
* Add config option to RelativeTime plugin ([#851](https://github.com/iamkun/dayjs/issues/851)) ([bd24034](https://github.com/iamkun/dayjs/commit/bd24034b95bfc656024b75ef3f3c986708845fed))
* add Duration plugin ([#858](https://github.com/iamkun/dayjs/issues/858)) ([d568273](https://github.com/iamkun/dayjs/commit/d568273223199ca0497f238e2cc3a8d3dcf32d0f))
* Add en-in, en-tt locales ([#855](https://github.com/iamkun/dayjs/issues/855)) ([c39fb96](https://github.com/iamkun/dayjs/commit/c39fb96e2a9102c14b004c14a6c073af9d266f2f))
* add isToday, isTomorrow, isYesterday plugins ([#857](https://github.com/iamkun/dayjs/issues/857)) ([fc08ab6](https://github.com/iamkun/dayjs/commit/fc08ab68f8a28269802deeab9d6b0473b92cdc51))
* Add option callback to Calendar plugin ([#839](https://github.com/iamkun/dayjs/issues/839)) ([b25be90](https://github.com/iamkun/dayjs/commit/b25be9094325295310c8fc5e617fb058be8a5f68))
* Fix monthsShort for locale fr ([#862](https://github.com/iamkun/dayjs/issues/862)) ([d2de9a0](https://github.com/iamkun/dayjs/commit/d2de9a0b44b830038ed0094f79bfd40726311f2a))
* Update Breton locale (br) meridiem config ([#856](https://github.com/iamkun/dayjs/issues/856)) ([a2a6672](https://github.com/iamkun/dayjs/commit/a2a66720abb788a8f1cffbfd0929b35579f29c72))
* Update Ukrainian (uk) locale relative time ([#842](https://github.com/iamkun/dayjs/issues/842)) ([578bc1a](https://github.com/iamkun/dayjs/commit/578bc1a23c6e737783bbac3da12c0ed5d1edcf82))
## [1.8.23](https://github.com/iamkun/dayjs/compare/v1.8.22...v1.8.23) (2020-03-16)
### Bug Fixes
* Add Chinese (zh) locale ([f9b8945](https://github.com/iamkun/dayjs/commit/f9b89453166d8b53d33b1d7eefd9942022552e6e))
* Fix IsoWeek plugin typescript definition ([#828](https://github.com/iamkun/dayjs/issues/828)) ([30aab0c](https://github.com/iamkun/dayjs/commit/30aab0c7bce85dfac0ae208a891def30f88b5cb4))
* Update Arabic (ar) locale relative time ([#836](https://github.com/iamkun/dayjs/issues/836)) ([14044c6](https://github.com/iamkun/dayjs/commit/14044c6fda1229e3f0e5473d3f886bd79589b15f))
* Update Slovak (sk) locale, Czech (cs) locale ([#833](https://github.com/iamkun/dayjs/issues/833)) ([f0d451f](https://github.com/iamkun/dayjs/commit/f0d451f795e9ebf752cd854d51b25b11de2343a3))
* Update Thai (th) locale relativeTime ([#826](https://github.com/iamkun/dayjs/issues/826)) ([63b7c03](https://github.com/iamkun/dayjs/commit/63b7c03a6dbb0507d60776e8bad6cccde3828b88)), closes [#816](https://github.com/iamkun/dayjs/issues/816)
## [1.8.22](https://github.com/iamkun/dayjs/compare/v1.8.21...v1.8.22) (2020-03-08)
### Bug Fixes
* Add IsoWeek plugin ([#811](https://github.com/iamkun/dayjs/issues/811)) ([28a2207](https://github.com/iamkun/dayjs/commit/28a2207ef9849afbac15dd29267b2e7a09cd3c16))
* Fix unsupported locale fallback to previous one ([#819](https://github.com/iamkun/dayjs/issues/819)) ([4868715](https://github.com/iamkun/dayjs/commit/48687152cf5bee6a4c1b8ceea4bda8b9bab9be10))
## [1.8.21](https://github.com/iamkun/dayjs/compare/v1.8.20...v1.8.21) (2020-02-26)
### Bug Fixes
* Set + Get accept 'D' as the short version of 'date' ([#795](https://github.com/iamkun/dayjs/issues/795)) ([523c038](https://github.com/iamkun/dayjs/commit/523c03880fa8bbad83214494ad02cd606cdb8b30))
* Update DayOfYear plugin type ([#799](https://github.com/iamkun/dayjs/issues/799)) ([5809652](https://github.com/iamkun/dayjs/commit/5809652e40245b7759827d9bf317abdcfa75a330))
* Update fi (Finnish) locale relativeTime ([#797](https://github.com/iamkun/dayjs/issues/797)) ([4a470fb](https://github.com/iamkun/dayjs/commit/4a470fbd6fef9e051727d0f26d53cc050b85935d))
## [1.8.20](https://github.com/iamkun/dayjs/compare/v1.8.19...v1.8.20) (2020-02-04)
### Bug Fixes
* Add Bislama Locale (bi) ([#780](https://github.com/iamkun/dayjs/issues/780)) ([9ac6ab4](https://github.com/iamkun/dayjs/commit/9ac6ab481bc883dd4ecc02caab12c8b2fc218a42))
* Fix weekOfYear plugin to support yearStart locale for better week number result ([#769](https://github.com/iamkun/dayjs/issues/769)) ([f00db36](https://github.com/iamkun/dayjs/commit/f00db36e70bc7beaca1abadeb30a9b1fbb3261ee))
* Update et (Estonian) locale relativeTime ([#790](https://github.com/iamkun/dayjs/issues/790)) ([d8e0f45](https://github.com/iamkun/dayjs/commit/d8e0f45f6cd2d5e5704b9797929227454c92d1a5))
* Update LocaleData plugin to support dayjs.localeData().weekdays() API ([287fed6](https://github.com/iamkun/dayjs/commit/287fed6db9eb4fd979b4861aca4dacbd32422533)), closes [#779](https://github.com/iamkun/dayjs/issues/779)
* Update LocaleData plugin to support dayjs.months dayjs.weekdays API ([144c2ae](https://github.com/iamkun/dayjs/commit/144c2ae6e15fbf89e3acd7c8cb9e237c5f6e1348)), closes [#779](https://github.com/iamkun/dayjs/issues/779)
* Update pl locale fusional config ([d372475](https://github.com/iamkun/dayjs/commit/d3724758bb27d5b17587b995ba14e7e80dcd1151))
## [1.8.19](https://github.com/iamkun/dayjs/compare/v1.8.18...v1.8.19) (2020-01-06)
### Bug Fixes
* Add UpdateLocale plugin to update a locale's properties ([#766](https://github.com/iamkun/dayjs/issues/766)) ([82ce2ba](https://github.com/iamkun/dayjs/commit/82ce2ba8d7e402e40f6d005d400eb5356a0b0633))
* Fix CustomParseFormat Plugin 'YYYY-MM' use first day of the month ([ba709ec](https://github.com/iamkun/dayjs/commit/ba709eca86a71ae648bc68bf67d9abdc229198d4)), closes [#761](https://github.com/iamkun/dayjs/issues/761)
* Fix CustomParseFormat Plugin to set correct locale ([66ce23f](https://github.com/iamkun/dayjs/commit/66ce23f2e18c5506e8f1a7ef20d3483a4df80087))
* Fix WeekOfYear Plugin wrong calender week number bug ([79b86db](https://github.com/iamkun/dayjs/commit/79b86dbbf3cfd3f1e2165b3d479a7061ad1b6925)), closes [#760](https://github.com/iamkun/dayjs/issues/760)
* Update RelativeTime plugin to support function to make additional processing ([#767](https://github.com/iamkun/dayjs/issues/767)) ([4bd9250](https://github.com/iamkun/dayjs/commit/4bd9250fbe7131e2fddfb5fa1b3350e8c2262ca9))
* Update ru, uk, cs locale to support relativeTime with plural ([3f080f7](https://github.com/iamkun/dayjs/commit/3f080f7d6bfdc4018cbb7c4d0112ff1ead4ef6b8))
## [1.8.18](https://github.com/iamkun/dayjs/compare/v1.8.17...v1.8.18) (2019-12-18)
### Bug Fixes
* Add missing locale type definition ([#716](https://github.com/iamkun/dayjs/issues/716)) ([cde5d0b](https://github.com/iamkun/dayjs/commit/cde5d0b91be7b2f5f3098de4aa0b9a4f0f28ea5c))
* Fix .locale() handel unsupported locale ([78ec173](https://github.com/iamkun/dayjs/commit/78ec173fcecc1299516ab7b44f4554d431b4b2fd))
* Update Italian locale (it) ([#727](https://github.com/iamkun/dayjs/issues/727)) ([5b53e98](https://github.com/iamkun/dayjs/commit/5b53e98c0a3ba0eb9573a9c77caeb907439be9e7))
* Update locale (fa) ([#733](https://github.com/iamkun/dayjs/issues/733)) ([9ad2e47](https://github.com/iamkun/dayjs/commit/9ad2e47e0569b23991bb0d5578f49c792c12df08))
* Update locale (zh-cn) ([#706](https://github.com/iamkun/dayjs/issues/706)) ([e31e544](https://github.com/iamkun/dayjs/commit/e31e54414fb90e1f54da13a117748ba37f52645d))
* Update locale (zh-cn) meridiem ([#735](https://github.com/iamkun/dayjs/issues/735)) ([15d1b81](https://github.com/iamkun/dayjs/commit/15d1b813e7faf5a1f9d1ea6fc673fd27ac49d8b1))
* Update LocaleData plugin to support dayjs().longDateFormat() ([#734](https://github.com/iamkun/dayjs/issues/734)) ([aa0f210](https://github.com/iamkun/dayjs/commit/aa0f210a1e3c4f6aba61c3b96f9eb445b43a33f0)), closes [#680](https://github.com/iamkun/dayjs/issues/680)
* Update Mongolian (mn) locale relativeTime ([#753](https://github.com/iamkun/dayjs/issues/753)) ([6d51435](https://github.com/iamkun/dayjs/commit/6d51435092c0c94d8e50256d3f0f058cdd15febe))
* Update Swedish locale (sv) fix ordinal error ([#745](https://github.com/iamkun/dayjs/issues/745)) ([49670d5](https://github.com/iamkun/dayjs/commit/49670d5ae31e4e21636cc5a8bfe35fef0f6d9e4a)), closes [#743](https://github.com/iamkun/dayjs/issues/743)
## [1.8.17](https://github.com/iamkun/dayjs/compare/v1.8.16...v1.8.17) (2019-11-06)
### Bug Fixes
* Fix set utcOffset in utc mode ([d148115](https://github.com/iamkun/dayjs/commit/d148115dad8f1a5afc0a64e9b8163dfeba4616b6))
* Update advancedFormat plugin to support w ww wo week tokens … ([#678](https://github.com/iamkun/dayjs/issues/678)) ([26cfa63](https://github.com/iamkun/dayjs/commit/26cfa63a524b803f7966dac5464f9cbf8f63387e)), closes [#676](https://github.com/iamkun/dayjs/issues/676)
* Update ka locale weekdays ([f8ca3d4](https://github.com/iamkun/dayjs/commit/f8ca3d4ba1d3cbe41613d3909c0627935a51a0c4))
* Update nb locale ([#679](https://github.com/iamkun/dayjs/issues/679)) ([1063b0e](https://github.com/iamkun/dayjs/commit/1063b0e1b5c19a1354d233cc0f21438e7073233a))
* Update Polish locale (pl)([#713](https://github.com/iamkun/dayjs/issues/713)) ([30d2f02](https://github.com/iamkun/dayjs/commit/30d2f026b47188833a4f44fee4bab52467d4a718))
* Update Ukrainian locale (uk) ([#710](https://github.com/iamkun/dayjs/issues/710)) ([360161c](https://github.com/iamkun/dayjs/commit/360161cac75f597fdd51d9d1ff138601282a1b4b))
* UTC plugin set utcOffset value ([#668](https://github.com/iamkun/dayjs/issues/668)) ([8877883](https://github.com/iamkun/dayjs/commit/88778838e71dd309e79cd1a8094d5bea36ca3390))
## [1.8.16](https://github.com/iamkun/dayjs/compare/v1.8.15...v1.8.16) (2019-08-27)
### Bug Fixes
* Fix relativeTime Plugin .FromNow() result error in UTC mode ([a385d5c](https://github.com/iamkun/dayjs/commit/a385d5c))
* Handle locale in WeekOfYear plugin ([#658](https://github.com/iamkun/dayjs/issues/658)) ([0e45b0a](https://github.com/iamkun/dayjs/commit/0e45b0a))
* LocaleData plugin returns all months and weekdays data when pas no argument ([#645](https://github.com/iamkun/dayjs/issues/645)) ([95e70b4](https://github.com/iamkun/dayjs/commit/95e70b4))
* Return null in toJSON if not valid ([#633](https://github.com/iamkun/dayjs/issues/633)) ([19affc8](https://github.com/iamkun/dayjs/commit/19affc8))
* Update Danish (da) locale ([#626](https://github.com/iamkun/dayjs/issues/626)) ([ac2ec77](https://github.com/iamkun/dayjs/commit/ac2ec77))
* Update Korean locale meridiem ([#642](https://github.com/iamkun/dayjs/issues/642)) ([b457146](https://github.com/iamkun/dayjs/commit/b457146))
* update Occitan locale Catalan locale ([#630](https://github.com/iamkun/dayjs/issues/630)) ([fef135e](https://github.com/iamkun/dayjs/commit/fef135e))
* update pt-br locale ([#628](https://github.com/iamkun/dayjs/issues/628)) ([ccf596d](https://github.com/iamkun/dayjs/commit/ccf596d))
* Update weekdaysShort to some locale files ([#643](https://github.com/iamkun/dayjs/issues/643)) ([cc1f15f](https://github.com/iamkun/dayjs/commit/cc1f15f))
## [1.8.15](https://github.com/iamkun/dayjs/compare/v1.8.14...v1.8.15) (2019-07-08)
### Bug Fixes
* Fix dayjs.locale() returns current global locale ([#602](https://github.com/iamkun/dayjs/issues/602)) ([790cd1a](https://github.com/iamkun/dayjs/commit/790cd1a))
* Fix incorrect Thai locale translation of July ([#607](https://github.com/iamkun/dayjs/issues/607)) ([43cbfd3](https://github.com/iamkun/dayjs/commit/43cbfd3))
* Lowercase french locale months and weekdays ([#615](https://github.com/iamkun/dayjs/issues/615)) ([e5a257c](https://github.com/iamkun/dayjs/commit/e5a257c))
* Type - Export Ls object to query all available locales ([#623](https://github.com/iamkun/dayjs/issues/623)) ([f6bfae0](https://github.com/iamkun/dayjs/commit/f6bfae0))
* Update nb (Norsk Bokmål) locale ([#604](https://github.com/iamkun/dayjs/issues/604)) ([907f5c9](https://github.com/iamkun/dayjs/commit/907f5c9))
* Update types of `.diff` API ([#617](https://github.com/iamkun/dayjs/issues/617)) ([f0f43d2](https://github.com/iamkun/dayjs/commit/f0f43d2))
## [1.8.14](https://github.com/iamkun/dayjs/compare/v1.8.13...v1.8.14) (2019-05-07)
### Bug Fixes
* Fix `.format` API returns UTC offset when value is 0 bug ([b254964](https://github.com/iamkun/dayjs/commit/b254964))
* Fix QuarterOfYear plugin bug ([#591](https://github.com/iamkun/dayjs/issues/591)) ([434f774](https://github.com/iamkun/dayjs/commit/434f774))
* Fix UTC plugin add day DST bug ([#590](https://github.com/iamkun/dayjs/issues/590)) ([86cd839](https://github.com/iamkun/dayjs/commit/86cd839))
## [1.8.13](https://github.com/iamkun/dayjs/compare/v1.8.12...v1.8.13) (2019-04-26)
### Bug Fixes
* Add missing relativeTime and formats for some locales ([#560](https://github.com/iamkun/dayjs/issues/560)) ([96b917e](https://github.com/iamkun/dayjs/commit/96b917e))
* Add weekday (locale aware day of the week) plugin ([#569](https://github.com/iamkun/dayjs/issues/569)) ([9007cc5](https://github.com/iamkun/dayjs/commit/9007cc5)), closes [#559](https://github.com/iamkun/dayjs/issues/559)
* Allow customizing "am" / "pm" strings with locale meridiem function ([#580](https://github.com/iamkun/dayjs/issues/580)) ([576e93e](https://github.com/iamkun/dayjs/commit/576e93e)), closes [#578](https://github.com/iamkun/dayjs/issues/578)
* Fix `.add` day/week decimal rouding bug ([800f6c9](https://github.com/iamkun/dayjs/commit/800f6c9))
* Fix `.diff` type definition error ([#565](https://github.com/iamkun/dayjs/issues/565)) ([c4921ae](https://github.com/iamkun/dayjs/commit/c4921ae)), closes [#561](https://github.com/iamkun/dayjs/issues/561)
* Fix CustomParseFormat plugin bug ([#568](https://github.com/iamkun/dayjs/issues/568)) ([1f5a9db](https://github.com/iamkun/dayjs/commit/1f5a9db)), closes [#555](https://github.com/iamkun/dayjs/issues/555)
* Fix relativeTime plugin Math.round bug ([40bea40](https://github.com/iamkun/dayjs/commit/40bea40))
* skip square brackets in buddhistEra, advancedFormat plugins ([#556](https://github.com/iamkun/dayjs/issues/556)) ([9279718](https://github.com/iamkun/dayjs/commit/9279718)), closes [#554](https://github.com/iamkun/dayjs/issues/554)
* Update Indonesian locale([#574](https://github.com/iamkun/dayjs/issues/574)) ([0aa7143](https://github.com/iamkun/dayjs/commit/0aa7143))
* Update locale month to support both array and function ([#581](https://github.com/iamkun/dayjs/issues/581)) ([b6599d3](https://github.com/iamkun/dayjs/commit/b6599d3))
* Update LocalizedFormat plugin lowercase formats logic ([#557](https://github.com/iamkun/dayjs/issues/557)) ([d409304](https://github.com/iamkun/dayjs/commit/d409304))
## [1.8.12](https://github.com/iamkun/dayjs/compare/v1.8.11...v1.8.12) (2019-04-02)
### Bug Fixes
* Add .get API ([7318797](https://github.com/iamkun/dayjs/commit/7318797))
* Add 79 locales ([#541](https://github.com/iamkun/dayjs/issues/541)) ([f75a125](https://github.com/iamkun/dayjs/commit/f75a125))
* Add Calendar plugin ([d1b9cf9](https://github.com/iamkun/dayjs/commit/d1b9cf9))
* Add isoWeeksInYear plugin ([2db8631](https://github.com/iamkun/dayjs/commit/2db8631))
* Add Occitan (oc-lnc) locale file ([#551](https://github.com/iamkun/dayjs/issues/551)) ([c30b715](https://github.com/iamkun/dayjs/commit/c30b715))
* Add plugin minMax to sopport .max .min ([2870a23](https://github.com/iamkun/dayjs/commit/2870a23))
* Fix set Month Year error in last day of the month ([d058f4a](https://github.com/iamkun/dayjs/commit/d058f4a))
* Update ko locale weekdaysShort ([#543](https://github.com/iamkun/dayjs/issues/543)) ([317fd3e](https://github.com/iamkun/dayjs/commit/317fd3e))
* Update localizedFormat plugin to support lowercase localizable formats (l, ll, lll, llll) ([#546](https://github.com/iamkun/dayjs/issues/546)) ([f2b5ebf](https://github.com/iamkun/dayjs/commit/f2b5ebf))
## [1.8.11](https://github.com/iamkun/dayjs/compare/v1.8.10...v1.8.11) (2019-03-21)
### Bug Fixes
* Add .add('quarter') .startOf('quarter') through plugin quarterOfYear ([dde39e9](https://github.com/iamkun/dayjs/commit/dde39e9)), closes [#537](https://github.com/iamkun/dayjs/issues/537) [#531](https://github.com/iamkun/dayjs/issues/531)
* Add locale support for Azerbaijani language (az) ([#535](https://github.com/iamkun/dayjs/issues/535)) ([eeb20fa](https://github.com/iamkun/dayjs/commit/eeb20fa))
* Correct typescript definition `add` ([22a249c](https://github.com/iamkun/dayjs/commit/22a249c)), closes [#531](https://github.com/iamkun/dayjs/issues/531)
* Fix CustomParseFormat plugin formatting bug ([#536](https://github.com/iamkun/dayjs/issues/536)) ([8578546](https://github.com/iamkun/dayjs/commit/8578546)), closes [#533](https://github.com/iamkun/dayjs/issues/533)
* Update pt locale ([#538](https://github.com/iamkun/dayjs/issues/538)) ([1ac9e1e](https://github.com/iamkun/dayjs/commit/1ac9e1e))
## [1.8.10](https://github.com/iamkun/dayjs/compare/v1.8.9...v1.8.10) (2019-03-10)
### Bug Fixes
* **locale:** Add nepali (ne) locale ([#524](https://github.com/iamkun/dayjs/issues/524)) ([bdbec01](https://github.com/iamkun/dayjs/commit/bdbec01))
* Add WeekYear plugin ([a892608](https://github.com/iamkun/dayjs/commit/a892608))
* API .locale() with no argument should return current locale name string ([8d63d88](https://github.com/iamkun/dayjs/commit/8d63d88))
* CustomParseFormat correct parse HH:mm:ss with only one digit like 0:12:10 ([600d547](https://github.com/iamkun/dayjs/commit/600d547))
* CustomParseFormat plugin parse Do format string ([bf27fda](https://github.com/iamkun/dayjs/commit/bf27fda)), closes [#522](https://github.com/iamkun/dayjs/issues/522)
* Expand setters like .year(2000) .hour(12) ([ac532a0](https://github.com/iamkun/dayjs/commit/ac532a0))
* Move toObject, toArray API to separate plugin from core ([40a3431](https://github.com/iamkun/dayjs/commit/40a3431))
## [1.8.9](https://github.com/iamkun/dayjs/compare/v1.8.8...v1.8.9) (2019-03-06)
### Features
* Add UTC mode with UTC plugin ([#517](https://github.com/iamkun/dayjs/issues/517)) ([caf335c](https://github.com/iamkun/dayjs/commit/caf335c))
> For plugin developers: Please note, we have changed the name of some method in `Utils` in order to reduce the file size. ([#517](https://github.com/iamkun/dayjs/issues/517)) ([detail](https://github.com/iamkun/dayjs/pull/517/files#diff-2b4ca49d4bb0a774c4d4c1672d7aa781R46))
### Bug Fixes
* Add locale de-AT ([#515](https://github.com/iamkun/dayjs/issues/515)) ([d93f7b6](https://github.com/iamkun/dayjs/commit/d93f7b6))
* Add locale zh-hk ([#516](https://github.com/iamkun/dayjs/issues/516)) ([5fc05a6](https://github.com/iamkun/dayjs/commit/5fc05a6))
## [1.8.8](https://github.com/iamkun/dayjs/compare/v1.8.7...v1.8.8) (2019-02-25)
### Bug Fixes
* Update relativeTime plugin type definition ([de56f2c](https://github.com/iamkun/dayjs/commit/de56f2c))
## [1.8.7](https://github.com/iamkun/dayjs/compare/v1.8.6...v1.8.7) (2019-02-24)
### Bug Fixes
* Add plugin type definitions ([#418](https://github.com/iamkun/dayjs/issues/418)) ([361d437](https://github.com/iamkun/dayjs/commit/361d437))
* Add Swahili locale ([#508](https://github.com/iamkun/dayjs/issues/508)) ([b9cee84](https://github.com/iamkun/dayjs/commit/b9cee84))
* Parse month string 'MMMM MMM (February, Feb)' in customParseFormat ([#457](https://github.com/iamkun/dayjs/issues/457)) ([f343206](https://github.com/iamkun/dayjs/commit/f343206))
* Update declaration file .diff .isBefore .isSame .isAfter ([#496](https://github.com/iamkun/dayjs/issues/496)) ([4523275](https://github.com/iamkun/dayjs/commit/4523275))
* Word orders corrections for locale 'fa' ([#491](https://github.com/iamkun/dayjs/issues/491)) ([56050c2](https://github.com/iamkun/dayjs/commit/56050c2))
## [1.8.6](https://github.com/iamkun/dayjs/compare/v1.8.5...v1.8.6) (2019-02-14)
### Bug Fixes
* Add Bahasa Melayu (Malaysia) locale ([#485](https://github.com/iamkun/dayjs/issues/485)) ([cb208b0](https://github.com/iamkun/dayjs/commit/cb208b0))
* Copy & export built-in en locale to /locale folder as a separate file ([a7e05e0](https://github.com/iamkun/dayjs/commit/a7e05e0))
* Fix bug in customParseFormat plugin while month(MM) is '01' ([9884ca5](https://github.com/iamkun/dayjs/commit/9884ca5)), closes [#494](https://github.com/iamkun/dayjs/issues/494)
* Fix startOf week bug while week start is not Sunday ([5eaf77b](https://github.com/iamkun/dayjs/commit/5eaf77b))
* Implemented isBetween inclusivity ([#464](https://github.com/iamkun/dayjs/issues/464)) ([af2f4f1](https://github.com/iamkun/dayjs/commit/af2f4f1))
* Update Swedish and Finnish locales ([#488](https://github.com/iamkun/dayjs/issues/488)) ([f142082](https://github.com/iamkun/dayjs/commit/f142082))
* Fix commonJS require ES Module bug in webpack4 ([23f9f3d](https://github.com/iamkun/dayjs/commit/23f9f3d)), check [#492](https://github.com/iamkun/dayjs/issues/492)
> Get access to ESM code with `import dayjs from 'dayjs/esm'`
## [1.8.5](https://github.com/iamkun/dayjs/compare/v1.8.4...v1.8.5) (2019-02-07)
### Bug Fixes
* Add en-gb locale ([#478](https://github.com/iamkun/dayjs/issues/478)) ([508c3a7](https://github.com/iamkun/dayjs/commit/508c3a7))
* **module:** transpile everything except ES6 modules in the 'module' entrypoint ([#477](https://github.com/iamkun/dayjs/issues/477)) ([#480](https://github.com/iamkun/dayjs/issues/480)) ([#482](https://github.com/iamkun/dayjs/issues/482)) ([767017d](https://github.com/iamkun/dayjs/commit/767017d))
* update customParseFormat plugin support hh:mm ([54947cc](https://github.com/iamkun/dayjs/commit/54947cc)), closes [#484](https://github.com/iamkun/dayjs/issues/484)
* Update module in package.json ([5c5a7a0](https://github.com/iamkun/dayjs/commit/5c5a7a0))
## [1.8.4](https://github.com/iamkun/dayjs/compare/v1.8.3...v1.8.4) (2019-02-05)
* Allow set start day of week in locale && Allow set week in weekOfYear plugin ([1295591](https://github.com/iamkun/dayjs/commit/1295591))
### Bug Fixes
* update all locale files with correct week start ([5b03412](https://github.com/iamkun/dayjs/commit/5b03412))
* update es es-do locale adding weekStart && update weekStart test ([66e42ec](https://github.com/iamkun/dayjs/commit/66e42ec))
* Revert default export ([b00da1b](https://github.com/iamkun/dayjs/commit/b00da1b))
## [1.8.3](https://github.com/iamkun/dayjs/compare/v1.8.2...v1.8.3) (2019-02-04)
### Bug Fixes
* fix ios safari YYYY-MM-DD HH:mm parse BUG ([e02ae82](https://github.com/iamkun/dayjs/commit/e02ae82)), closes [#254](https://github.com/iamkun/dayjs/issues/254)
## [1.8.2](https://github.com/iamkun/dayjs/compare/v1.8.1...v1.8.2) (2019-02-02)
### Bug Fixes
* Add missing czech language locale ([#461](https://github.com/iamkun/dayjs/issues/461)) ([7e04004](https://github.com/iamkun/dayjs/commit/7e04004))
* Add utcOffset api method and fix calculating diff error in DST ([#453](https://github.com/iamkun/dayjs/issues/453)) ([ce2e30e](https://github.com/iamkun/dayjs/commit/ce2e30e))
* Fix it locale error ([#458](https://github.com/iamkun/dayjs/issues/458)) ([f6d9a64](https://github.com/iamkun/dayjs/commit/f6d9a64))
* Add DayOfYear plugin (#454)
* Fix es locale monthsShort error
## [1.8.1](https://github.com/iamkun/dayjs/compare/v1.8.0...v1.8.1) (2019-02-02)
* Add LocalizedFormat plugin supplying format like LTS, LT, LLLL
* <del>update declaration File with default export (#278)</del>
> <del>From v1.8.1, in TypeScript Project, just `import from dayjs from 'dayjs'`</del>
* add ES2015 module support (#451)
### Performance Improvements
* **format:** reuse matches instead of created when replacing ([#441](https://github.com/iamkun/dayjs/issues/441)) ([10b79d8](https://github.com/iamkun/dayjs/commit/10b79d8))
# [1.8.0](https://github.com/iamkun/dayjs/compare/v1.7.8...v1.8.0) (2019-01-14)
### Features
* add CustomParseFormat plugin and QuarterOfYear plugin ([#450](https://github.com/iamkun/dayjs/issues/450)) ([8f6f63c](https://github.com/iamkun/dayjs/commit/8f6f63c))
## [1.7.8](https://github.com/iamkun/dayjs/compare/v1.7.7...v1.7.8) (2018-12-13)
### Feature
* update isSame isBefore isAfter supports units ([fd65464](https://github.com/iamkun/dayjs/commit/fd65464))
* add greek lithuanian locales
## [1.7.7](https://github.com/iamkun/dayjs/compare/v1.7.6...v1.7.7) (2018-09-26)
### Bug Fixes
* **DST:** fix daylight saving time DST bug && add test ([#354](https://github.com/iamkun/dayjs/issues/354)) ([6fca6d5](https://github.com/iamkun/dayjs/commit/6fca6d5))
## [1.7.6](https://github.com/iamkun/dayjs/compare/v1.7.5...v1.7.6) (2018-09-25)
### Bug Fixes
* **add dayjs.unix:** add dayjs.unix to parse timestamp in seconds && locale update ([5711c5e](https://github.com/iamkun/dayjs/commit/5711c5e))
## [1.7.5](https://github.com/iamkun/dayjs/compare/v1.7.4...v1.7.5) (2018-08-10)
### Bug Fixes
* add isBetween API & update ([b5fc3d1](https://github.com/iamkun/dayjs/commit/b5fc3d1))
## [1.7.4](https://github.com/iamkun/dayjs/compare/v1.7.3...v1.7.4) (2018-07-11)
### Bug Fixes
* update set week logic ([60b6325](https://github.com/iamkun/dayjs/commit/60b6325)), closes [#276](https://github.com/iamkun/dayjs/issues/276)
## [1.7.3](https://github.com/iamkun/dayjs/compare/v1.7.2...v1.7.3) (2018-07-10)
### Bug Fixes
* **locale-nl:** set correct weekdays and months ([6d089d7](https://github.com/iamkun/dayjs/commit/6d089d7))
## [1.7.2](https://github.com/iamkun/dayjs/compare/v1.7.1...v1.7.2) (2018-07-04)
### Bug Fixes
* DEPRECATED isLeapYear, use IsLeapYear plugin instead ([e2e5116](https://github.com/iamkun/dayjs/commit/e2e5116))
## [1.7.1](https://github.com/iamkun/dayjs/compare/v1.7.0...v1.7.1) (2018-07-03)
### Bug Fixes
* fix week() error near the end of the year ([fa03689](https://github.com/iamkun/dayjs/commit/fa03689))
# [1.7.0](https://github.com/iamkun/dayjs/compare/v1.6.10...v1.7.0) (2018-07-02)
### Features
* Added method `.week()` to retrieve week of the year ([e1c1b1c](https://github.com/iamkun/dayjs/commit/e1c1b1c))
* Updated Japanese locae
## [1.6.10](https://github.com/iamkun/dayjs/compare/v1.6.9...v1.6.10) (2018-06-25)
### Bug Fixes
* Add relative locales to russian language ([c7e9898](https://github.com/iamkun/dayjs/commit/c7e9898)), closes [#256](https://github.com/iamkun/dayjs/issues/256)
## [1.6.9](https://github.com/iamkun/dayjs/compare/v1.6.8...v1.6.9) (2018-06-14)
### Bug Fixes
* add isDayjs => boolean API ([6227c8b](https://github.com/iamkun/dayjs/commit/6227c8b))
## [1.6.8](https://github.com/iamkun/dayjs/compare/v1.6.7...v1.6.8) (2018-06-14)
### Bug Fixes
* fix Advanced format bug in zh-cn ([0c07874](https://github.com/iamkun/dayjs/commit/0c07874)), closes [#242](https://github.com/iamkun/dayjs/issues/242)
## [1.6.7](https://github.com/iamkun/dayjs/compare/v1.6.6...v1.6.7) (2018-06-11)
### Bug Fixes
* fix id locale ([1ebbeb8](https://github.com/iamkun/dayjs/commit/1ebbeb8)), closes [#234](https://github.com/iamkun/dayjs/issues/234)
<a name="1.6.6"></a>
## [1.6.6](https://github.com/iamkun/dayjs/compare/v1.6.5...v1.6.6) (2018-06-06)
### Bug Fixes
* format API update and locale file update ([5ca48f0](https://github.com/iamkun/dayjs/commit/5ca48f0)), closes [#228](https://github.com/iamkun/dayjs/issues/228)
<a name="1.6.5"></a>
## [1.6.5](https://github.com/iamkun/dayjs/compare/v1.6.4...v1.6.5) (2018-05-31)
### Bug Fixes
* bugfix, utils update and locale file update ([ebcb6d5](https://github.com/iamkun/dayjs/commit/ebcb6d5)), closes [#214](https://github.com/iamkun/dayjs/issues/214)
<a name="1.6.4"></a>
## [1.6.4](https://github.com/iamkun/dayjs/compare/v1.6.3...v1.6.4) (2018-05-25)
### Bug Fixes
* add RelativeTime plugin and locale file update ([c1fbbca](https://github.com/iamkun/dayjs/commit/c1fbbca)), closes [#198](https://github.com/iamkun/dayjs/issues/198)
<a name="1.6.3"></a>
## [1.6.3](https://github.com/iamkun/dayjs/compare/v1.6.2...v1.6.3) (2018-05-21)
### Bug Fixes
* Changing locales locally is immutable from this release ([2cce729](https://github.com/iamkun/dayjs/commit/2cce729)), closes [#182](https://github.com/iamkun/dayjs/issues/182)
* instance locale change should be immutable ([84597c9](https://github.com/iamkun/dayjs/commit/84597c9))
* Add more locales
* english ordinal fix
<a name="1.6.2"></a>
## [1.6.2](https://github.com/iamkun/dayjs/compare/v1.6.1...v1.6.2) (2018-05-18)
### Bug Fixes
* change-log update && test new npm release ([aa49cba](https://github.com/iamkun/dayjs/commit/aa49cba)), closes [#163](https://github.com/iamkun/dayjs/issues/163)
<a name="1.6.1"></a>
## [1.6.1](https://github.com/iamkun/dayjs/compare/v1.6.0...v1.6.1) (2018-05-18)
### Bug Fixes
* Add German, Brazilian Portuguese locales
* add() & parse() bug fix & add locale de, pt-br ([bf1331e](https://github.com/iamkun/dayjs/commit/bf1331e))
<a name="1.6.0"></a>
# [1.6.0](https://github.com/iamkun/dayjs/compare/v1.5.24...v1.6.0) (2018-05-15)
### Features
* Locale && Plugin ([2342c55](https://github.com/iamkun/dayjs/commit/2342c55)), closes [#141](https://github.com/iamkun/dayjs/issues/141)
@@ -0,0 +1,275 @@
# crypto-js
JavaScript library of crypto standards.
## Discontinued
Active development of CryptoJS has been discontinued. This library is no longer maintained.
Nowadays, NodeJS and modern browsers have a native `Crypto` module. The latest version of CryptoJS already uses the native Crypto module for random number generation, since `Math.random()` is not crypto-safe. Further development of CryptoJS would result in it only being a wrapper of native Crypto. Therefore, development and maintenance has been discontinued, it is time to go for the native `crypto` module.
## Node.js (Install)
Requirements:
- Node.js
- npm (Node.js package manager)
```bash
npm install crypto-js
```
### Usage
ES6 import for typical API call signing use case:
```javascript
import sha256 from 'crypto-js/sha256';
import hmacSHA512 from 'crypto-js/hmac-sha512';
import Base64 from 'crypto-js/enc-base64';
const message, nonce, path, privateKey; // ...
const hashDigest = sha256(nonce + message);
const hmacDigest = Base64.stringify(hmacSHA512(path + hashDigest, privateKey));
```
Modular include:
```javascript
var AES = require("crypto-js/aes");
var SHA256 = require("crypto-js/sha256");
...
console.log(SHA256("Message"));
```
Including all libraries, for access to extra methods:
```javascript
var CryptoJS = require("crypto-js");
console.log(CryptoJS.HmacSHA1("Message", "Key"));
```
## Client (browser)
Requirements:
- Node.js
- Bower (package manager for frontend)
```bash
bower install crypto-js
```
### Usage
Modular include:
```javascript
require.config({
packages: [
{
name: 'crypto-js',
location: 'path-to/bower_components/crypto-js',
main: 'index'
}
]
});
require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) {
console.log(SHA256("Message"));
});
```
Including all libraries, for access to extra methods:
```javascript
// Above-mentioned will work or use this simple form
require.config({
paths: {
'crypto-js': 'path-to/bower_components/crypto-js/crypto-js'
}
});
require(["crypto-js"], function (CryptoJS) {
console.log(CryptoJS.HmacSHA1("Message", "Key"));
});
```
### Usage without RequireJS
```html
<script type="text/javascript" src="path-to/bower_components/crypto-js/crypto-js.js"></script>
<script type="text/javascript">
var encrypted = CryptoJS.AES(...);
var encrypted = CryptoJS.SHA256(...);
</script>
```
## API
See: https://cryptojs.gitbook.io/docs/
### AES Encryption
#### Plain text encryption
```javascript
var CryptoJS = require("crypto-js");
// Encrypt
var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123').toString();
// Decrypt
var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
var originalText = bytes.toString(CryptoJS.enc.Utf8);
console.log(originalText); // 'my message'
```
#### Object encryption
```javascript
var CryptoJS = require("crypto-js");
var data = [{id: 1}, {id: 2}]
// Encrypt
var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123').toString();
// Decrypt
var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
var decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
console.log(decryptedData); // [{id: 1}, {id: 2}]
```
### List of modules
- ```crypto-js/core```
- ```crypto-js/x64-core```
- ```crypto-js/lib-typedarrays```
---
- ```crypto-js/md5```
- ```crypto-js/sha1```
- ```crypto-js/sha256```
- ```crypto-js/sha224```
- ```crypto-js/sha512```
- ```crypto-js/sha384```
- ```crypto-js/sha3```
- ```crypto-js/ripemd160```
---
- ```crypto-js/hmac-md5```
- ```crypto-js/hmac-sha1```
- ```crypto-js/hmac-sha256```
- ```crypto-js/hmac-sha224```
- ```crypto-js/hmac-sha512```
- ```crypto-js/hmac-sha384```
- ```crypto-js/hmac-sha3```
- ```crypto-js/hmac-ripemd160```
---
- ```crypto-js/pbkdf2```
---
- ```crypto-js/aes```
- ```crypto-js/tripledes```
- ```crypto-js/rc4```
- ```crypto-js/rabbit```
- ```crypto-js/rabbit-legacy```
- ```crypto-js/evpkdf```
---
- ```crypto-js/format-openssl```
- ```crypto-js/format-hex```
---
- ```crypto-js/enc-latin1```
- ```crypto-js/enc-utf8```
- ```crypto-js/enc-hex```
- ```crypto-js/enc-utf16```
- ```crypto-js/enc-base64```
---
- ```crypto-js/mode-cfb```
- ```crypto-js/mode-ctr```
- ```crypto-js/mode-ctr-gladman```
- ```crypto-js/mode-ofb```
- ```crypto-js/mode-ecb```
---
- ```crypto-js/pad-pkcs7```
- ```crypto-js/pad-ansix923```
- ```crypto-js/pad-iso10126```
- ```crypto-js/pad-iso97971```
- ```crypto-js/pad-zeropadding```
- ```crypto-js/pad-nopadding```
## Release notes
### 4.2.0
Change default hash algorithm and iteration's for PBKDF2 to prevent weak security by using the default configuration.
Custom KDF Hasher
Blowfish support
### 4.1.1
Fix module order in bundled release.
Include the browser field in the released package.json.
### 4.1.0
Added url safe variant of base64 encoding. [357](https://github.com/brix/crypto-js/pull/357)
Avoid webpack to add crypto-browser package. [364](https://github.com/brix/crypto-js/pull/364)
### 4.0.0
This is an update including breaking changes for some environments.
In this version `Math.random()` has been replaced by the random methods of the native crypto module.
For this reason CryptoJS might not run in some JavaScript environments without native crypto module. Such as IE 10 or before or React Native.
### 3.3.0
Rollback, `3.3.0` is the same as `3.1.9-1`.
The move of using native secure crypto module will be shifted to a new `4.x.x` version. As it is a breaking change the impact is too big for a minor release.
### 3.2.1
The usage of the native crypto module has been fixed. The import and access of the native crypto module has been improved.
### 3.2.0
In this version `Math.random()` has been replaced by the random methods of the native crypto module.
For this reason CryptoJS might does not run in some JavaScript environments without native crypto module. Such as IE 10 or before.
If it's absolute required to run CryptoJS in such an environment, stay with `3.1.x` version. Encrypting and decrypting stays compatible. But keep in mind `3.1.x` versions still use `Math.random()` which is cryptographically not secure, as it's not random enough.
This version came along with `CRITICAL` `BUG`.
DO NOT USE THIS VERSION! Please, go for a newer version!
### 3.1.x
The `3.1.x` are based on the original CryptoJS, wrapped in CommonJS modules.
@@ -0,0 +1 @@
module.exports={A:{A:{"8":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","4":"DB EB","8":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB 0C 1C"},D:{"1":"0 1 2 3 4 5 eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","4":"dB","8":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB"},E:{"1":"E F A B C L M G 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","8":"J ZB K D 2C ZC 3C 4C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","4":"aB","8":"F B C G N O P FD GD HD ID NC uC JD OC"},G:{"1":"E OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","8":"ZC KD vC LD MD ND"},H:{"8":"hD"},I:{"1":"I nD","8":"TC J iD jD kD lD vC mD"},J:{"8":"D A"},K:{"1":"H","8":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"8":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:6,C:"Promises",D:true};
@@ -0,0 +1,207 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
ResizablePanel: () => ResizablePanel,
TRANSITION_DEFAULTS: () => TRANSITION_DEFAULTS,
TRANSITION_EASINGS: () => TRANSITION_EASINGS,
TRANSITION_VARIANTS: () => TRANSITION_VARIANTS
});
module.exports = __toCommonJS(src_exports);
// src/transition-utils.ts
var TRANSITION_EASINGS = {
ease: [0.36, 0.66, 0.4, 1],
easeIn: [0.4, 0, 1, 1],
easeOut: [0, 0, 0.2, 1],
easeInOut: [0.4, 0, 0.2, 1],
spring: [0.155, 1.105, 0.295, 1.12],
springOut: [0.57, -0.15, 0.62, 0.07],
softSpring: [0.16, 1.11, 0.3, 1.02]
};
var TRANSITION_DEFAULTS = {
enter: {
duration: 0.2,
ease: TRANSITION_EASINGS.easeOut
},
exit: {
duration: 0.1,
ease: TRANSITION_EASINGS.easeIn
}
};
var TRANSITION_VARIANTS = {
scaleSpring: {
enter: {
transform: "scale(1)",
opacity: 1,
transition: {
type: "spring",
bounce: 0,
duration: 0.2
}
},
exit: {
transform: "scale(0.85)",
opacity: 0,
transition: {
type: "easeOut",
duration: 0.15
}
}
},
scaleSpringOpacity: {
initial: {
opacity: 0,
transform: "scale(0.8)"
},
enter: {
opacity: 1,
transform: "scale(1)",
transition: {
type: "spring",
bounce: 0,
duration: 0.3
}
},
exit: {
opacity: 0,
transform: "scale(0.96)",
transition: {
type: "easeOut",
bounce: 0,
duration: 0.15
}
}
},
scale: {
enter: { scale: 1 },
exit: { scale: 0.95 }
},
scaleFadeIn: {
enter: {
transform: "scale(1)",
opacity: 1,
transition: {
duration: 0.25,
ease: TRANSITION_EASINGS.easeIn
}
},
exit: {
transform: "scale(0.95)",
opacity: 0,
transition: {
duration: 0.2,
ease: TRANSITION_EASINGS.easeOut
}
}
},
scaleInOut: {
enter: {
transform: "scale(1)",
opacity: 1,
transition: {
duration: 0.4,
ease: TRANSITION_EASINGS.ease
}
},
exit: {
transform: "scale(1.03)",
opacity: 0,
transition: {
duration: 0.3,
ease: TRANSITION_EASINGS.ease
}
}
},
fade: {
enter: {
opacity: 1,
transition: {
duration: 0.4,
ease: TRANSITION_EASINGS.ease
}
},
exit: {
opacity: 0,
transition: {
duration: 0.3,
ease: TRANSITION_EASINGS.ease
}
}
},
collapse: {
enter: {
opacity: 1,
height: "auto",
transition: {
height: {
type: "spring",
bounce: 0,
duration: 0.3
},
opacity: {
easings: "ease",
duration: 0.4
}
}
},
exit: {
opacity: 0,
height: 0,
transition: {
easings: "ease",
duration: 0.3
}
}
}
};
// src/resizable-panel.tsx
var import_react = require("react");
var import_framer_motion = require("framer-motion");
var import_use_measure = require("@heroui/use-measure");
var import_jsx_runtime = require("react/jsx-runtime");
var ResizablePanel = (0, import_react.forwardRef)(
(originalProps, ref) => {
const { children, ...props } = originalProps;
let [measureRef, bounds] = (0, import_use_measure.useMeasure)();
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.LazyMotion, { features: import_framer_motion.domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_framer_motion.m.div,
{
ref,
animate: {
width: bounds.width && (bounds == null ? void 0 : bounds.width) > 0 ? bounds.width : "auto",
height: bounds.height && bounds.height > 0 ? bounds.height : "auto"
},
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: measureRef, ...props, children })
}
) });
}
);
ResizablePanel.displayName = "HeroUI - ResizablePanel";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ResizablePanel,
TRANSITION_DEFAULTS,
TRANSITION_EASINGS,
TRANSITION_VARIANTS
});
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more