docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s

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 @@
!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ky=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ky",weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),weekStart:1,weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"}};return t.default.locale(d,null,!0),d}));
@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var BusyIndicatorRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
attributes: [{
name: 'aria-busy',
value: 'true'
}]
}
}],
type: 'widget'
};
var _default = BusyIndicatorRole;
exports.default = _default;
@@ -0,0 +1,4 @@
var K=Object.defineProperty;var o=(s,e)=>K(s,"name",{value:e,configurable:!0});import{r as Y}from"./get-pipe-path-BHW2eJdv.mjs";import d from"node:module";import p from"node:path";import{fileURLToPath as O}from"node:url";import{parseTsconfig as V,getTsconfig as Z,createFilesMatcher as q,createPathsMatcher as ee}from"get-tsconfig";import se,{writeSync as te}from"node:fs";import{b as ne,i as ae,a as re}from"./index-7AaEi15b.mjs";import{p as U}from"./client-BQVF1NaW.mjs";import{inspect as oe}from"node:util";import{b as ce,a as ie,c as le,d as fe,o as W}from"./index-gbaejti9.mjs";const R=o(s=>{if(!s.startsWith("data:text/javascript,"))return;const e=s.indexOf("?");if(e===-1)return;const n=new URLSearchParams(s.slice(e+1)).get("filePath");if(n)return n},"getOriginalFilePath"),D=o(s=>{const e=R(s);return e&&(d._cache[e]=d._cache[s],delete d._cache[s],s=e),s},"interopCjsExports"),me=o(s=>{const e=s.indexOf(":");if(e!==-1)return s.slice(0,e)},"getScheme"),N=o(s=>s[0]==="."&&(s[1]==="/"||s[1]==="."||s[2]==="/"),"isRelativePath"),j=o(s=>N(s)||p.isAbsolute(s),"isFilePath"),pe=o(s=>{if(j(s))return!0;const e=me(s);return e&&e!=="node"},"requestAcceptsQuery"),y="file://",he=[".ts",".tsx",".jsx",".mts",".cts"],C=/\.([cm]?ts|[tj]sx)($|\?)/,de=/[/\\].+\.(?:cts|cjs)(?:$|\?)/,ue=/\.json($|\?)/,E=/\/(?:$|\?)/,ge=/^(?:@[^/]+\/)?[^/\\]+$/,Q=`${p.sep}node_modules${p.sep}`;let M,_,S=!1;const A=o(s=>{let e=null;if(s){const a=p.resolve(s);e={path:a,config:V(a)}}else{try{e=Z()}catch{}if(!e)return}M=q(e),_=ee(e),S=e?.config.compilerOptions?.allowJs??!1},"loadTsconfig"),T=o(s=>Array.from(s).length>0?`?${s.toString()}`:"","urlSearchParamsStringify"),Pe=`
//# sourceMappingURL=data:application/json;base64,`,I=o(()=>process.sourceMapsEnabled??!0,"shouldApplySourceMap"),F=o(({code:s,map:e})=>s+Pe+Buffer.from(JSON.stringify(e),"utf8").toString("base64"),"inlineSourceMap"),v=Number(process.env.TSX_DEBUG);v&&(W.enabled=!0,W.supportLevel=3);const J=o(s=>(e,...a)=>{if(!v||e>v)return;const n=`${fe(` tsx P${process.pid} `)} ${s}`,t=a.map(r=>typeof r=="string"?r:oe(r,{colors:!0})).join(" ");te(1,`${n} ${t}
`)},"createLog"),P=J(ce(ie(" CJS "))),je=J(le(" ESM ")),be=[".cts",".mts",".ts",".tsx",".jsx"],xe=[".js",".cjs",".mjs"],k=[".ts",".tsx",".jsx"],$=o((s,e,a,n)=>{const t=Object.getOwnPropertyDescriptor(s,e);t?.set?s[e]=a:(!t||t.configurable)&&Object.defineProperty(s,e,{value:a,enumerable:t?.enumerable||n?.enumerable,writable:n?.writable??(t?t.writable:!0),configurable:n?.configurable??(t?t.configurable:!0)})},"safeSet"),ye=o((s,e,a)=>{const n=e[".js"],t=o((r,c)=>{if(s.enabled===!1)return n(r,c);const[i,f]=c.split("?");if((new URLSearchParams(f).get("namespace")??void 0)!==a)return n(r,c);P(2,"load",{filePath:c}),r.id.startsWith("data:text/javascript,")&&(r.path=p.dirname(i)),U?.send&&U.send({type:"dependency",path:i});const u=be.some(m=>i.endsWith(m)),g=xe.some(m=>i.endsWith(m));if(!u&&!g)return n(r,i);let h=se.readFileSync(i,"utf8");if(i.endsWith(".cjs")){const m=ne(c,h);m&&(h=I()?F(m):m.code)}else if(u||ae(h)){const m=re(h,c,{tsconfigRaw:M?.(i)});h=I()?F(m):m.code}P(1,"loaded",{filePath:i}),r._compile(h,i)},"transformer");$(e,".js",t);for(const r of k)$(e,r,t,{enumerable:!a,writable:!0,configurable:!0});return $(e,".mjs",t,{writable:!0,configurable:!0}),()=>{e[".js"]===t&&(e[".js"]=n);for(const r of[...k,".mjs"])e[r]===t&&delete e[r]}},"createExtensions"),Ee=o(s=>e=>{if((e==="."||e===".."||e.endsWith("/.."))&&(e+="/"),E.test(e)){let a=p.join(e,"index.js");e.startsWith("./")&&(a=`./${a}`);try{return s(a)}catch{}}try{return s(e)}catch(a){const n=a;if(n.code==="MODULE_NOT_FOUND")try{return s(`${e}${p.sep}index.js`)}catch{}throw n}},"createImplicitResolver"),B=[".js",".json"],G=[".ts",".tsx",".jsx"],_e=[...G,...B],Se=[...B,...G],b=Object.create(null);b[".js"]=[".ts",".tsx",".js",".jsx"],b[".jsx"]=[".tsx",".ts",".jsx",".js"],b[".cjs"]=[".cts"],b[".mjs"]=[".mts"];const X=o(s=>{const e=s.split("?"),a=e[1]?`?${e[1]}`:"",[n]=e,t=p.extname(n),r=[],c=b[t];if(c){const f=n.slice(0,-t.length);r.push(...c.map(l=>f+l+a))}const i=!(s.startsWith(y)||j(n))||n.includes(Q)||n.includes("/node_modules/")?Se:_e;return r.push(...i.map(f=>n+f+a)),r},"mapTsExtensions"),w=o((s,e,a)=>{if(P(3,"resolveTsFilename",{request:e,isDirectory:E.test(e),isTsParent:a,allowJs:S}),E.test(e)||!a&&!S)return;const n=X(e);if(n)for(const t of n)try{return s(t)}catch(r){const{code:c}=r;if(c!=="MODULE_NOT_FOUND"&&c!=="ERR_PACKAGE_PATH_NOT_EXPORTED")throw r}},"resolveTsFilename"),ve=o((s,e)=>a=>{if(P(3,"resolveTsFilename",{request:a,isTsParent:e,isFilePath:j(a)}),j(a)){const n=w(s,a,e);if(n)return n}try{return s(a)}catch(n){const t=n;if(t.code==="MODULE_NOT_FOUND"){if(t.path){const c=t.message.match(/^Cannot find module '([^']+)'$/);if(c){const f=c[1],l=w(s,f,e);if(l)return l}const i=t.message.match(/^Cannot find module '([^']+)'. Please verify that the package.json has a valid "main" entry$/);if(i){const f=i[1],l=w(s,f,e);if(l)return l}}const r=w(s,a,e);if(r)return r}throw t}},"createTsExtensionResolver"),z="at cjsPreparseModuleExports (node:internal",we=o(s=>{const e=s.stack.split(`
`).slice(1);return e[1].includes(z)||e[2].includes(z)},"isFromCjsLexer"),Me=o((s,e)=>{const a=s.split("?"),n=new URLSearchParams(a[1]);if(e?.filename){const t=R(e.filename);let r;if(t){const f=t.split("?"),l=f[0];r=f[1],e.filename=l,e.path=p.dirname(l),e.paths=d._nodeModulePaths(e.path),d._cache[l]=e}r||(r=e.filename.split("?")[1]);const i=new URLSearchParams(r).get("namespace");i&&n.append("namespace",i)}return[a[0],n,(t,r)=>(p.isAbsolute(t)&&!t.endsWith(".json")&&!t.endsWith(".node")&&!(r===0&&we(new Error))&&(t+=T(n)),t)]},"preserveQuery"),Te=o((s,e,a)=>{if(s.startsWith(y)&&(s=O(s)),_&&!j(s)&&!e?.filename?.includes(Q)){const n=_(s);for(const t of n)try{return a(t)}catch{}}return a(s)},"resolveTsPaths"),Fe=o((s,e,a)=>(n,t,...r)=>{if(s.enabled===!1)return e(n,t,...r);n=D(n);const[c,i,f]=Me(n,t);if((i.get("namespace")??void 0)!==a)return e(n,t,...r);P(2,"resolve",{request:n,parent:t?.filename??t,restOfArgs:r});let l=o(g=>e(g,t,...r),"nextResolveSimple");l=ve(l,!!(a||t?.filename&&C.test(t.filename))),l=Ee(l);const u=f(Te(c,t,l),r.length);return P(1,"resolved",{request:n,parent:t?.filename??t,resolved:u}),u},"createResolveFilename"),H=o((s,e)=>{if(!e)throw new Error("The current file path (__filename or import.meta.url) must be provided in the second argument of tsx.require()");return s.startsWith(".")?((typeof e=="string"&&e.startsWith(y)||e instanceof URL)&&(e=O(e)),p.resolve(p.dirname(e),s)):s},"resolveContext"),$e=o(s=>{const{sourceMapsEnabled:e}=process,a={enabled:!0};A(process.env.TSX_TSCONFIG_PATH),process.setSourceMapsEnabled(!0);const n=d._resolveFilename,t=Fe(a,n,s?.namespace);d._resolveFilename=t;const r=ye(a,d._extensions,s?.namespace),c=o(()=>{e===!1&&process.setSourceMapsEnabled(!1),a.enabled=!1,d._resolveFilename===t&&(d._resolveFilename=n),r()},"unregister");if(s?.namespace){const i=o((l,u)=>{const g=H(l,u),[h,m]=g.split("?"),x=new URLSearchParams(m);return s.namespace&&!h.startsWith("node:")&&x.set("namespace",s.namespace),Y(h+T(x))},"scopedRequire");c.require=i;const f=o((l,u,g)=>{const h=H(l,u),[m,x]=h.split("?"),L=new URLSearchParams(x);return s.namespace&&!m.startsWith("node:")&&L.set("namespace",s.namespace),t(m+T(L),module,!1,g)},"scopedResolve");c.resolve=f,c.unregister=c}return c},"register");export{D as a,ue as b,de as c,je as d,C as e,y as f,M as g,F as h,ge as i,v as j,pe as k,A as l,_ as m,E as n,X as o,N as p,S as q,$e as r,he as t};
@@ -0,0 +1,694 @@
// This definition file follows a somewhat unusual format. ESTree allows
// runtime type checks based on the `type` parameter. In order to explain this
// to typescript we want to use discriminated union types:
// https://github.com/Microsoft/TypeScript/pull/9163
//
// For ESTree this is a bit tricky because the high level interfaces like
// Node or Function are pulling double duty. We want to pass common fields down
// to the interfaces that extend them (like Identifier or
// ArrowFunctionExpression), but you can't extend a type union or enforce
// common fields on them. So we've split the high level interfaces into two
// types, a base type which passes down inherited fields, and a type union of
// all types which extend the base type. Only the type union is exported, and
// the union is how other types refer to the collection of inheriting types.
//
// This makes the definitions file here somewhat more difficult to maintain,
// but it has the notable advantage of making ESTree much easier to use as
// an end user.
export interface BaseNodeWithoutComments {
// Every leaf interface that extends BaseNode must specify a type property.
// The type property should be a string literal. For example, Identifier
// has: `type: "Identifier"`
type: string;
loc?: SourceLocation | null | undefined;
range?: [number, number] | undefined;
}
export interface BaseNode extends BaseNodeWithoutComments {
leadingComments?: Comment[] | undefined;
trailingComments?: Comment[] | undefined;
}
export interface NodeMap {
AssignmentProperty: AssignmentProperty;
CatchClause: CatchClause;
Class: Class;
ClassBody: ClassBody;
Expression: Expression;
Function: Function;
Identifier: Identifier;
Literal: Literal;
MethodDefinition: MethodDefinition;
ModuleDeclaration: ModuleDeclaration;
ModuleSpecifier: ModuleSpecifier;
Pattern: Pattern;
PrivateIdentifier: PrivateIdentifier;
Program: Program;
Property: Property;
PropertyDefinition: PropertyDefinition;
SpreadElement: SpreadElement;
Statement: Statement;
Super: Super;
SwitchCase: SwitchCase;
TemplateElement: TemplateElement;
VariableDeclarator: VariableDeclarator;
}
export type Node = NodeMap[keyof NodeMap];
export interface Comment extends BaseNodeWithoutComments {
type: "Line" | "Block";
value: string;
}
export interface SourceLocation {
source?: string | null | undefined;
start: Position;
end: Position;
}
export interface Position {
/** >= 1 */
line: number;
/** >= 0 */
column: number;
}
export interface Program extends BaseNode {
type: "Program";
sourceType: "script" | "module";
body: Array<Directive | Statement | ModuleDeclaration>;
comments?: Comment[] | undefined;
}
export interface Directive extends BaseNode {
type: "ExpressionStatement";
expression: Literal;
directive: string;
}
export interface BaseFunction extends BaseNode {
params: Pattern[];
generator?: boolean | undefined;
async?: boolean | undefined;
// The body is either BlockStatement or Expression because arrow functions
// can have a body that's either. FunctionDeclarations and
// FunctionExpressions have only BlockStatement bodies.
body: BlockStatement | Expression;
}
export type Function = FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
export type Statement =
| ExpressionStatement
| BlockStatement
| StaticBlock
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| Declaration;
export interface BaseStatement extends BaseNode {}
export interface EmptyStatement extends BaseStatement {
type: "EmptyStatement";
}
export interface BlockStatement extends BaseStatement {
type: "BlockStatement";
body: Statement[];
innerComments?: Comment[] | undefined;
}
export interface StaticBlock extends Omit<BlockStatement, "type"> {
type: "StaticBlock";
}
export interface ExpressionStatement extends BaseStatement {
type: "ExpressionStatement";
expression: Expression;
}
export interface IfStatement extends BaseStatement {
type: "IfStatement";
test: Expression;
consequent: Statement;
alternate?: Statement | null | undefined;
}
export interface LabeledStatement extends BaseStatement {
type: "LabeledStatement";
label: Identifier;
body: Statement;
}
export interface BreakStatement extends BaseStatement {
type: "BreakStatement";
label?: Identifier | null | undefined;
}
export interface ContinueStatement extends BaseStatement {
type: "ContinueStatement";
label?: Identifier | null | undefined;
}
export interface WithStatement extends BaseStatement {
type: "WithStatement";
object: Expression;
body: Statement;
}
export interface SwitchStatement extends BaseStatement {
type: "SwitchStatement";
discriminant: Expression;
cases: SwitchCase[];
}
export interface ReturnStatement extends BaseStatement {
type: "ReturnStatement";
argument?: Expression | null | undefined;
}
export interface ThrowStatement extends BaseStatement {
type: "ThrowStatement";
argument: Expression;
}
export interface TryStatement extends BaseStatement {
type: "TryStatement";
block: BlockStatement;
handler?: CatchClause | null | undefined;
finalizer?: BlockStatement | null | undefined;
}
export interface WhileStatement extends BaseStatement {
type: "WhileStatement";
test: Expression;
body: Statement;
}
export interface DoWhileStatement extends BaseStatement {
type: "DoWhileStatement";
body: Statement;
test: Expression;
}
export interface ForStatement extends BaseStatement {
type: "ForStatement";
init?: VariableDeclaration | Expression | null | undefined;
test?: Expression | null | undefined;
update?: Expression | null | undefined;
body: Statement;
}
export interface BaseForXStatement extends BaseStatement {
left: VariableDeclaration | Pattern;
right: Expression;
body: Statement;
}
export interface ForInStatement extends BaseForXStatement {
type: "ForInStatement";
}
export interface DebuggerStatement extends BaseStatement {
type: "DebuggerStatement";
}
export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
export interface BaseDeclaration extends BaseStatement {}
export interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
type: "FunctionDeclaration";
/** It is null when a function declaration is a part of the `export default function` statement */
id: Identifier | null;
body: BlockStatement;
}
export interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
id: Identifier;
}
export interface VariableDeclaration extends BaseDeclaration {
type: "VariableDeclaration";
declarations: VariableDeclarator[];
kind: "var" | "let" | "const" | "using" | "await using";
}
export interface VariableDeclarator extends BaseNode {
type: "VariableDeclarator";
id: Pattern;
init?: Expression | null | undefined;
}
export interface ExpressionMap {
ArrayExpression: ArrayExpression;
ArrowFunctionExpression: ArrowFunctionExpression;
AssignmentExpression: AssignmentExpression;
AwaitExpression: AwaitExpression;
BinaryExpression: BinaryExpression;
CallExpression: CallExpression;
ChainExpression: ChainExpression;
ClassExpression: ClassExpression;
ConditionalExpression: ConditionalExpression;
FunctionExpression: FunctionExpression;
Identifier: Identifier;
ImportExpression: ImportExpression;
Literal: Literal;
LogicalExpression: LogicalExpression;
MemberExpression: MemberExpression;
MetaProperty: MetaProperty;
NewExpression: NewExpression;
ObjectExpression: ObjectExpression;
SequenceExpression: SequenceExpression;
TaggedTemplateExpression: TaggedTemplateExpression;
TemplateLiteral: TemplateLiteral;
ThisExpression: ThisExpression;
UnaryExpression: UnaryExpression;
UpdateExpression: UpdateExpression;
YieldExpression: YieldExpression;
}
export type Expression = ExpressionMap[keyof ExpressionMap];
export interface BaseExpression extends BaseNode {}
export type ChainElement = SimpleCallExpression | MemberExpression;
export interface ChainExpression extends BaseExpression {
type: "ChainExpression";
expression: ChainElement;
}
export interface ThisExpression extends BaseExpression {
type: "ThisExpression";
}
export interface ArrayExpression extends BaseExpression {
type: "ArrayExpression";
elements: Array<Expression | SpreadElement | null>;
}
export interface ObjectExpression extends BaseExpression {
type: "ObjectExpression";
properties: Array<Property | SpreadElement>;
}
export interface PrivateIdentifier extends BaseNode {
type: "PrivateIdentifier";
name: string;
}
export interface Property extends BaseNode {
type: "Property";
key: Expression | PrivateIdentifier;
value: Expression | Pattern; // Could be an AssignmentProperty
kind: "init" | "get" | "set";
method: boolean;
shorthand: boolean;
computed: boolean;
}
export interface PropertyDefinition extends BaseNode {
type: "PropertyDefinition";
key: Expression | PrivateIdentifier;
value?: Expression | null | undefined;
computed: boolean;
static: boolean;
}
export interface FunctionExpression extends BaseFunction, BaseExpression {
id?: Identifier | null | undefined;
type: "FunctionExpression";
body: BlockStatement;
}
export interface SequenceExpression extends BaseExpression {
type: "SequenceExpression";
expressions: Expression[];
}
export interface UnaryExpression extends BaseExpression {
type: "UnaryExpression";
operator: UnaryOperator;
prefix: true;
argument: Expression;
}
export interface BinaryExpression extends BaseExpression {
type: "BinaryExpression";
operator: BinaryOperator;
left: Expression | PrivateIdentifier;
right: Expression;
}
export interface AssignmentExpression extends BaseExpression {
type: "AssignmentExpression";
operator: AssignmentOperator;
left: Pattern | MemberExpression;
right: Expression;
}
export interface UpdateExpression extends BaseExpression {
type: "UpdateExpression";
operator: UpdateOperator;
argument: Expression;
prefix: boolean;
}
export interface LogicalExpression extends BaseExpression {
type: "LogicalExpression";
operator: LogicalOperator;
left: Expression;
right: Expression;
}
export interface ConditionalExpression extends BaseExpression {
type: "ConditionalExpression";
test: Expression;
alternate: Expression;
consequent: Expression;
}
export interface BaseCallExpression extends BaseExpression {
callee: Expression | Super;
arguments: Array<Expression | SpreadElement>;
}
export type CallExpression = SimpleCallExpression | NewExpression;
export interface SimpleCallExpression extends BaseCallExpression {
type: "CallExpression";
optional: boolean;
}
export interface NewExpression extends BaseCallExpression {
type: "NewExpression";
}
export interface MemberExpression extends BaseExpression, BasePattern {
type: "MemberExpression";
object: Expression | Super;
property: Expression | PrivateIdentifier;
computed: boolean;
optional: boolean;
}
export type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
export interface BasePattern extends BaseNode {}
export interface SwitchCase extends BaseNode {
type: "SwitchCase";
test?: Expression | null | undefined;
consequent: Statement[];
}
export interface CatchClause extends BaseNode {
type: "CatchClause";
param: Pattern | null;
body: BlockStatement;
}
export interface Identifier extends BaseNode, BaseExpression, BasePattern {
type: "Identifier";
name: string;
}
export type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
export interface SimpleLiteral extends BaseNode, BaseExpression {
type: "Literal";
value: string | boolean | number | null;
raw?: string | undefined;
}
export interface RegExpLiteral extends BaseNode, BaseExpression {
type: "Literal";
value?: RegExp | null | undefined;
regex: {
pattern: string;
flags: string;
};
raw?: string | undefined;
}
export interface BigIntLiteral extends BaseNode, BaseExpression {
type: "Literal";
value?: bigint | null | undefined;
bigint: string;
raw?: string | undefined;
}
export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
export type BinaryOperator =
| "=="
| "!="
| "==="
| "!=="
| "<"
| "<="
| ">"
| ">="
| "<<"
| ">>"
| ">>>"
| "+"
| "-"
| "*"
| "/"
| "%"
| "**"
| "|"
| "^"
| "&"
| "in"
| "instanceof";
export type LogicalOperator = "||" | "&&" | "??";
export type AssignmentOperator =
| "="
| "+="
| "-="
| "*="
| "/="
| "%="
| "**="
| "<<="
| ">>="
| ">>>="
| "|="
| "^="
| "&="
| "||="
| "&&="
| "??=";
export type UpdateOperator = "++" | "--";
export interface ForOfStatement extends BaseForXStatement {
type: "ForOfStatement";
await: boolean;
}
export interface Super extends BaseNode {
type: "Super";
}
export interface SpreadElement extends BaseNode {
type: "SpreadElement";
argument: Expression;
}
export interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
type: "ArrowFunctionExpression";
expression: boolean;
body: BlockStatement | Expression;
}
export interface YieldExpression extends BaseExpression {
type: "YieldExpression";
argument?: Expression | null | undefined;
delegate: boolean;
}
export interface TemplateLiteral extends BaseExpression {
type: "TemplateLiteral";
quasis: TemplateElement[];
expressions: Expression[];
}
export interface TaggedTemplateExpression extends BaseExpression {
type: "TaggedTemplateExpression";
tag: Expression;
quasi: TemplateLiteral;
}
export interface TemplateElement extends BaseNode {
type: "TemplateElement";
tail: boolean;
value: {
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
cooked?: string | null | undefined;
raw: string;
};
}
export interface AssignmentProperty extends Property {
value: Pattern;
kind: "init";
method: boolean; // false
}
export interface ObjectPattern extends BasePattern {
type: "ObjectPattern";
properties: Array<AssignmentProperty | RestElement>;
}
export interface ArrayPattern extends BasePattern {
type: "ArrayPattern";
elements: Array<Pattern | null>;
}
export interface RestElement extends BasePattern {
type: "RestElement";
argument: Pattern;
}
export interface AssignmentPattern extends BasePattern {
type: "AssignmentPattern";
left: Pattern;
right: Expression;
}
export type Class = ClassDeclaration | ClassExpression;
export interface BaseClass extends BaseNode {
superClass?: Expression | null | undefined;
body: ClassBody;
}
export interface ClassBody extends BaseNode {
type: "ClassBody";
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
}
export interface MethodDefinition extends BaseNode {
type: "MethodDefinition";
key: Expression | PrivateIdentifier;
value: FunctionExpression;
kind: "constructor" | "method" | "get" | "set";
computed: boolean;
static: boolean;
}
export interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
type: "ClassDeclaration";
/** It is null when a class declaration is a part of the `export default class` statement */
id: Identifier | null;
}
export interface ClassDeclaration extends MaybeNamedClassDeclaration {
id: Identifier;
}
export interface ClassExpression extends BaseClass, BaseExpression {
type: "ClassExpression";
id?: Identifier | null | undefined;
}
export interface MetaProperty extends BaseExpression {
type: "MetaProperty";
meta: Identifier;
property: Identifier;
}
export type ModuleDeclaration =
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration;
export interface BaseModuleDeclaration extends BaseNode {}
export type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier;
export interface BaseModuleSpecifier extends BaseNode {
local: Identifier;
}
export interface ImportDeclaration extends BaseModuleDeclaration {
type: "ImportDeclaration";
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
attributes: ImportAttribute[];
source: Literal;
}
export interface ImportSpecifier extends BaseModuleSpecifier {
type: "ImportSpecifier";
imported: Identifier | Literal;
}
export interface ImportAttribute extends BaseNode {
type: "ImportAttribute";
key: Identifier | Literal;
value: Literal;
}
export interface ImportExpression extends BaseExpression {
type: "ImportExpression";
source: Expression;
options?: Expression | null | undefined;
}
export interface ImportDefaultSpecifier extends BaseModuleSpecifier {
type: "ImportDefaultSpecifier";
}
export interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
type: "ImportNamespaceSpecifier";
}
export interface ExportNamedDeclaration extends BaseModuleDeclaration {
type: "ExportNamedDeclaration";
declaration?: Declaration | null | undefined;
specifiers: ExportSpecifier[];
attributes: ImportAttribute[];
source?: Literal | null | undefined;
}
export interface ExportSpecifier extends Omit<BaseModuleSpecifier, "local"> {
type: "ExportSpecifier";
local: Identifier | Literal;
exported: Identifier | Literal;
}
export interface ExportDefaultDeclaration extends BaseModuleDeclaration {
type: "ExportDefaultDeclaration";
declaration: MaybeNamedFunctionDeclaration | MaybeNamedClassDeclaration | Expression;
}
export interface ExportAllDeclaration extends BaseModuleDeclaration {
type: "ExportAllDeclaration";
exported: Identifier | Literal | null;
attributes: ImportAttribute[];
source: Literal;
}
export interface AwaitExpression extends BaseExpression {
type: "AwaitExpression";
argument: Expression;
}
@@ -0,0 +1,2 @@
export type Options = import('./lib/index.js').Options;
export { cont, name, start } from "./lib/index.js";
@@ -0,0 +1,10 @@
"use strict";
// Generated using scripts/write-decode-map.ts
Object.defineProperty(exports, "__esModule", { value: true });
exports.xmlDecodeTree = void 0;
exports.xmlDecodeTree = new Uint16Array(
// prettier-ignore
/* #__PURE__ */ "\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022"
.split("")
.map((c) => c.charCodeAt(0)));
//# sourceMappingURL=decode-data-xml.js.map
@@ -0,0 +1 @@
{"name":"micromark-util-types","version":"2.0.2","requiresBuild":false,"files":{"license":{"checkedAt":1794532113091,"integrity":"sha512-ic4iF2Ap25Sn5T9MMw7nJ9C20WL6V01rybBBQi2Qx8cQC9/ERFEqGnove1HT65tK2TIKM30PZoOV3Qbz2FE//A==","mode":420,"size":1094},"index.js":{"checkedAt":1794532113091,"integrity":"sha512-3zndZr3w2gSmHzjsPMVPT08Eva7uCqMjr2l//FPxtBVMqC7HuZSjMryCMDBydhBImDvLA0K1u1234hVKPjz9hQ==","mode":420,"size":53},"package.json":{"checkedAt":1794532113092,"integrity":"sha512-KlX6RFIQHdptFl0Z8HRRMM4ezpsYBoTj7YMuA5N8aPa7OnkTxuSvTRc91h/P7WDjLAEY/sV0Swboite+32Iyqw==","mode":420,"size":1609},"readme.md":{"checkedAt":1794532113092,"integrity":"sha512-dKbXOAhOtkiQ/7wVnDj1zO0Ol3BTniLvO8Kg0LkAh6xu51xpzCV40TDEwOr6EKvfb7ze+JWc/NHCWVfkNVFHZw==","mode":420,"size":3915},"index.d.ts":{"checkedAt":1794532113092,"integrity":"sha512-ermKp/2WETdLO+y8GbwVYvt37fcZfhS0amjHciwdyo0Fhoxie0CNqraOoAeee9QwsWXrXP7CebGuH0UJW8OXkQ==","mode":420,"size":32279}}}
@@ -0,0 +1 @@
{"version":3,"file":"validateConstructorMetadataArray.d.ts","sourceRoot":"","sources":["../../../../src/metadata/calculations/validateConstructorMetadataArray.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAI9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,CAAC,oBAAoB,GAAG,SAAS,CAAC,EAAE,GAC1C,OAAO,CAAC,KAAK,IAAI,oBAAoB,EAAE,CAgCzC"}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2022_object: LibDefinition;
@@ -0,0 +1,75 @@
var iterate = require('./lib/iterate.js')
, initState = require('./lib/state.js')
, terminator = require('./lib/terminator.js')
;
// Public API
module.exports = serialOrdered;
// sorting helpers
module.exports.ascending = ascending;
module.exports.descending = descending;
/**
* Runs iterator over provided sorted array elements in series
*
* @param {array|object} list - array or object (named list) to iterate over
* @param {function} iterator - iterator to run
* @param {function} sortMethod - custom sort function
* @param {function} callback - invoked when all elements processed
* @returns {function} - jobs terminator
*/
function serialOrdered(list, iterator, sortMethod, callback)
{
var state = initState(list, sortMethod);
iterate(list, iterator, state, function iteratorHandler(error, result)
{
if (error)
{
callback(error, result);
return;
}
state.index++;
// are we there yet?
if (state.index < (state['keyedList'] || list).length)
{
iterate(list, iterator, state, iteratorHandler);
return;
}
// done here
callback(null, state.results);
});
return terminator.bind(state, callback);
}
/*
* -- Sort methods
*/
/**
* sort helper to sort array elements in ascending order
*
* @param {mixed} a - an item to compare
* @param {mixed} b - an item to compare
* @returns {number} - comparison result
*/
function ascending(a, b)
{
return a < b ? -1 : a > b ? 1 : 0;
}
/**
* sort helper to sort array elements in descending order
*
* @param {mixed} a - an item to compare
* @param {mixed} b - an item to compare
* @returns {number} - comparison result
*/
function descending(a, b)
{
return -1 * ascending(a, b);
}
@@ -0,0 +1 @@
{"version":3,"file":"minproc.browser.d.ts","sourceRoot":"","sources":["minproc.browser.js"],"names":[],"mappings":";;;AAKA,+BAEC"}
@@ -0,0 +1,20 @@
let Selector = require('../selector')
class Fullscreen extends Selector {
/**
* Return different selectors depend on prefix
*/
prefixed(prefix) {
if (prefix === '-webkit-') {
return ':-webkit-full-screen'
}
if (prefix === '-moz-') {
return ':-moz-full-screen'
}
return `:${prefix}fullscreen`
}
}
Fullscreen.names = [':fullscreen']
module.exports = Fullscreen
@@ -0,0 +1,3 @@
import Decimal from 'decimal.js';
import { UnsignedRoundingModeType } from '../types/number';
export declare function ApplyUnsignedRoundingMode(x: Decimal, r1: Decimal, r2: Decimal, unsignedRoundingMode: UnsignedRoundingModeType): Decimal;
@@ -0,0 +1,117 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "caracteres", verb: "tener" },
file: { unit: "bytes", verb: "tener" },
array: { unit: "elementos", verb: "tener" },
set: { unit: "elementos", verb: "tener" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "número";
}
case "object": {
if (Array.isArray(data)) {
return "arreglo";
}
if (data === null) {
return "nulo";
}
if (Object.getPrototypeOf(data) !== Object.prototype) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "entrada",
email: "dirección de correo electrónico",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "fecha y hora ISO",
date: "fecha ISO",
time: "hora ISO",
duration: "duración ISO",
ipv4: "dirección IPv4",
ipv6: "dirección IPv6",
cidrv4: "rango IPv4",
cidrv6: "rango IPv6",
base64: "cadena codificada en base64",
base64url: "URL codificada en base64",
json_string: "cadena JSON",
e164: "número E.164",
jwt: "JWT",
template_literal: "entrada",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Entrada inválida: se esperaba ${issue.expected}, recibido ${parsedType(issue.input)}`;
// return `Entrada inválida: se esperaba ${issue.expected}, recibido ${util.getParsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Entrada inválida: se esperaba ${util.stringifyPrimitive(issue.values[0])}`;
return `Opción inválida: se esperaba una de ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Demasiado grande: se esperaba que ${issue.origin ?? "valor"} tuviera ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementos"}`;
return `Demasiado grande: se esperaba que ${issue.origin ?? "valor"} fuera ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Demasiado pequeño: se esperaba que ${issue.origin} tuviera ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Demasiado pequeño: se esperaba que ${issue.origin} fuera ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Cadena inválida: debe comenzar con "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Cadena inválida: debe terminar en "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Cadena inválida: debe incluir "${_issue.includes}"`;
if (_issue.format === "regex")
return `Cadena inválida: debe coincidir con el patrón ${_issue.pattern}`;
return `Inválido ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Número inválido: debe ser múltiplo de ${issue.divisor}`;
case "unrecognized_keys":
return `Llave${issue.keys.length > 1 ? "s" : ""} desconocida${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Llave inválida en ${issue.origin}`;
case "invalid_union":
return "Entrada inválida";
case "invalid_element":
return `Valor inválido en ${issue.origin}`;
default:
return `Entrada inválida`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,11 @@
declare const _default: {
plugins: ["import-x"];
rules: {
'import-x/no-unresolved': 2;
'import-x/named': 2;
'import-x/namespace': 2;
'import-x/default': 2;
'import-x/export': 2;
};
};
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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 truncated
@@ -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 index_exports = {};
__export(index_exports, {
ResizablePanel: () => ResizablePanel,
TRANSITION_DEFAULTS: () => TRANSITION_DEFAULTS,
TRANSITION_EASINGS: () => TRANSITION_EASINGS,
TRANSITION_VARIANTS: () => TRANSITION_VARIANTS
});
module.exports = __toCommonJS(index_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
});
@@ -0,0 +1,17 @@
var baseGetAllKeys = require('./_baseGetAllKeys'),
getSymbolsIn = require('./_getSymbolsIn'),
keysIn = require('./keysIn');
/**
* Creates an array of own and inherited enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeysIn(object) {
return baseGetAllKeys(object, keysIn, getSymbolsIn);
}
module.exports = getAllKeysIn;
@@ -0,0 +1,55 @@
var $4gIVO$react = require("react");
var $4gIVO$reactariassr = require("@react-aria/ssr");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useViewportSize", () => $8b24bab62f5c65ad$export$d699905dd57c73ca);
/*
* 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.
*/
let $8b24bab62f5c65ad$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;
function $8b24bab62f5c65ad$export$d699905dd57c73ca() {
let isSSR = (0, $4gIVO$reactariassr.useIsSSR)();
let [size, setSize] = (0, $4gIVO$react.useState)(()=>isSSR ? {
width: 0,
height: 0
} : $8b24bab62f5c65ad$var$getViewportSize());
(0, $4gIVO$react.useEffect)(()=>{
// Use visualViewport api to track available height even on iOS virtual keyboard opening
let onResize = ()=>{
setSize((size)=>{
let newSize = $8b24bab62f5c65ad$var$getViewportSize();
if (newSize.width === size.width && newSize.height === size.height) return size;
return newSize;
});
};
if (!$8b24bab62f5c65ad$var$visualViewport) window.addEventListener('resize', onResize);
else $8b24bab62f5c65ad$var$visualViewport.addEventListener('resize', onResize);
return ()=>{
if (!$8b24bab62f5c65ad$var$visualViewport) window.removeEventListener('resize', onResize);
else $8b24bab62f5c65ad$var$visualViewport.removeEventListener('resize', onResize);
};
}, []);
return size;
}
function $8b24bab62f5c65ad$var$getViewportSize() {
return {
width: $8b24bab62f5c65ad$var$visualViewport && ($8b24bab62f5c65ad$var$visualViewport === null || $8b24bab62f5c65ad$var$visualViewport === void 0 ? void 0 : $8b24bab62f5c65ad$var$visualViewport.width) || window.innerWidth,
height: $8b24bab62f5c65ad$var$visualViewport && ($8b24bab62f5c65ad$var$visualViewport === null || $8b24bab62f5c65ad$var$visualViewport === void 0 ? void 0 : $8b24bab62f5c65ad$var$visualViewport.height) || window.innerHeight
};
}
//# sourceMappingURL=useViewportSize.main.js.map
@@ -0,0 +1,14 @@
'use strict';
import utils from './../utils.js';
/**
* Determines whether the payload is an error thrown by Axios
*
* @param {*} payload The value to test
*
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
*/
export default function isAxiosError(payload) {
return utils.isObject(payload) && (payload.isAxiosError === true);
}
@@ -0,0 +1,3 @@
declare function getSymbolDescription(thisArg: symbol | Symbol): string | undefined;
export = getSymbolDescription;
@@ -0,0 +1,77 @@
'use strict';
var identity = require('../../nodes/identity.js');
var toJS = require('../../nodes/toJS.js');
var YAMLMap = require('../../nodes/YAMLMap.js');
var YAMLSeq = require('../../nodes/YAMLSeq.js');
var pairs = require('./pairs.js');
class YAMLOMap extends YAMLSeq.YAMLSeq {
constructor() {
super();
this.add = YAMLMap.YAMLMap.prototype.add.bind(this);
this.delete = YAMLMap.YAMLMap.prototype.delete.bind(this);
this.get = YAMLMap.YAMLMap.prototype.get.bind(this);
this.has = YAMLMap.YAMLMap.prototype.has.bind(this);
this.set = YAMLMap.YAMLMap.prototype.set.bind(this);
this.tag = YAMLOMap.tag;
}
/**
* If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
* but TypeScript won't allow widening the signature of a child method.
*/
toJSON(_, ctx) {
if (!ctx)
return super.toJSON(_);
const map = new Map();
if (ctx?.onCreate)
ctx.onCreate(map);
for (const pair of this.items) {
let key, value;
if (identity.isPair(pair)) {
key = toJS.toJS(pair.key, '', ctx);
value = toJS.toJS(pair.value, key, ctx);
}
else {
key = toJS.toJS(pair, '', ctx);
}
if (map.has(key))
throw new Error('Ordered maps must not include duplicate keys');
map.set(key, value);
}
return map;
}
static from(schema, iterable, ctx) {
const pairs$1 = pairs.createPairs(schema, iterable, ctx);
const omap = new this();
omap.items = pairs$1.items;
return omap;
}
}
YAMLOMap.tag = 'tag:yaml.org,2002:omap';
const omap = {
collection: 'seq',
identify: value => value instanceof Map,
nodeClass: YAMLOMap,
default: false,
tag: 'tag:yaml.org,2002:omap',
resolve(seq, onError) {
const pairs$1 = pairs.resolvePairs(seq, onError);
const seenKeys = [];
for (const { key } of pairs$1.items) {
if (identity.isScalar(key)) {
if (seenKeys.includes(key.value)) {
onError(`Ordered maps must not include duplicate keys: ${key.value}`);
}
else {
seenKeys.push(key.value);
}
}
}
return Object.assign(new YAMLOMap(), pairs$1);
},
createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)
};
exports.YAMLOMap = YAMLOMap;
exports.omap = omap;
@@ -0,0 +1,105 @@
var assert = require('assert');
var uuid = require('../');
// Verify ordering of v1 ids created with explicit times
var TIME = 1321644961388; // 2011-11-18 11:36:01.388-08:00
function compare(name, ids) {
test(name, function() {
// avoid .map for older browsers
for (var i=0 ; i<ids.length ; ++i) {
ids[i] = ids[i].split('-').reverse().join('-');
}
ids = ids.sort();
var sorted = ([].concat(ids)).sort();
assert(sorted.toString() == ids.toString(), name + ' have expected order');
});
}
// Verify ordering of v1 ids created using default behavior
compare('uuids with current time', [
uuid.v1(),
uuid.v1(),
uuid.v1(),
uuid.v1(),
uuid.v1()
]);
// Verify ordering of v1 ids created with explicit times
compare('uuids with time option', [
uuid.v1({msecs: TIME - 10*3600*1000}),
uuid.v1({msecs: TIME - 1}),
uuid.v1({msecs: TIME}),
uuid.v1({msecs: TIME + 1}),
uuid.v1({msecs: TIME + 28*24*3600*1000})
]);
test('msec', function() {
assert(
uuid.v1({msecs: TIME}) != uuid.v1({msecs: TIME}),
'IDs created at same msec are different'
);
});
test('exception thrown when > 10k ids created in 1ms', function() {
// Verify throw if too many ids created
var thrown = false;
try {
uuid.v1({msecs: TIME, nsecs: 10000});
} catch (e) {
thrown = true;
}
assert(thrown, 'Exception thrown when > 10K ids created in 1 ms');
});
test('clock regression by msec', function() {
// Verify clock regression bumps clockseq
var uidt = uuid.v1({msecs: TIME});
var uidtb = uuid.v1({msecs: TIME - 1});
assert(
parseInt(uidtb.split('-')[3], 16) - parseInt(uidt.split('-')[3], 16) === 1,
'Clock regression by msec increments the clockseq'
);
});
test('clock regression by nsec', function() {
// Verify clock regression bumps clockseq
var uidtn = uuid.v1({msecs: TIME, nsecs: 10});
var uidtnb = uuid.v1({msecs: TIME, nsecs: 9});
assert(
parseInt(uidtnb.split('-')[3], 16) - parseInt(uidtn.split('-')[3], 16) === 1,
'Clock regression by nsec increments the clockseq'
);
});
test('explicit options product expected id', function() {
// Verify explicit options produce expected id
var id = uuid.v1({
msecs: 1321651533573,
nsecs: 5432,
clockseq: 0x385c,
node: [ 0x61, 0xcd, 0x3c, 0xbb, 0x32, 0x10 ]
});
assert(id == 'd9428888-122b-11e1-b85c-61cd3cbb3210', 'Explicit options produce expected id');
});
test('ids spanning 1ms boundary are 100ns apart', function() {
// Verify adjacent ids across a msec boundary are 1 time unit apart
var u0 = uuid.v1({msecs: TIME, nsecs: 9999});
var u1 = uuid.v1({msecs: TIME + 1, nsecs: 0});
var before = u0.split('-')[0], after = u1.split('-')[0];
var dt = parseInt(after, 16) - parseInt(before, 16);
assert(dt === 1, 'Ids spanning 1ms boundary are 100ns apart');
});
test('parse/unparse', function() {
var id = '00112233445566778899aabbccddeeff';
assert(uuid.unparse(uuid.parse(id.substr(0,10))) ==
'00112233-4400-0000-0000-000000000000', 'Short parse');
assert(uuid.unparse(uuid.parse('(this is the uuid -> ' + id + id)) ==
'00112233-4455-6677-8899-aabbccddeeff', 'Dirty parse');
});
@@ -0,0 +1,121 @@
import { basename, dirname, extname } from 'path';
import { existsSync } from 'fs';
function applyPolyfills(object, polyfill) {
return new Proxy(object, {
get(_target, p) {
var _a;
return (_a = object[p]) != null ? _a : polyfill[p];
}
});
}
function getParent(node) {
return node.parent;
}
const cache = /* @__PURE__ */ new WeakMap();
function getSourceCode(context) {
const original = context.sourceCode || context.getSourceCode();
const cached = cache.get(original);
if (cached) {
return cached;
}
const sourceCode = applyPolyfills(original, {
getScope(node) {
const inner = node.type !== "Program";
for (let n = node; n; n = getParent(n)) {
const scope = original.scopeManager.acquire(n, inner);
if (scope) {
if (scope.type === "function-expression-name") {
return scope.childScopes[0];
}
return scope;
}
}
return original.scopeManager.scopes[0];
},
markVariableAsUsed(name, refNode = original.ast) {
const currentScope = sourceCode.getScope(refNode);
if (currentScope === context.getScope()) {
return context.markVariableAsUsed(name);
}
let initialScope = currentScope;
if (currentScope.type === "global" && currentScope.childScopes.length > 0 && currentScope.childScopes[0].block === original.ast) {
initialScope = currentScope.childScopes[0];
}
for (let scope = initialScope; scope; scope = scope.upper) {
const variable = scope.variables.find(
(scopeVar) => scopeVar.name === name
);
if (variable) {
variable.eslintUsed = true;
return true;
}
}
return false;
},
getAncestors(node) {
const result = [];
for (let ancestor = getParent(node); ancestor; ancestor = ancestor.parent) {
result.unshift(ancestor);
}
return result;
},
getDeclaredVariables(node) {
return original.scopeManager.getDeclaredVariables(node);
},
isSpaceBetween(first, second) {
if (first.range[0] <= second.range[1] && second.range[0] <= first.range[1]) {
return false;
}
const [startingNodeOrToken, endingNodeOrToken] = first.range[1] <= second.range[0] ? [first, second] : [second, first];
const tokens = sourceCode.getTokensBetween(first, second, {
includeComments: true
});
let startIndex = startingNodeOrToken.range[1];
for (const token of tokens) {
if (startIndex !== token.range[0]) {
return true;
}
startIndex = token.range[1];
}
return startIndex !== endingNodeOrToken.range[0];
}
});
cache.set(original, sourceCode);
return sourceCode;
}
function getCwd(context) {
var _a, _b, _c;
return (_c = (_b = context.cwd) != null ? _b : (_a = context.getCwd) == null ? void 0 : _a.call(context)) != null ? _c : (
// getCwd is added in v6.6.0
process.cwd()
);
}
function getFilename(context) {
var _a;
return (_a = context.filename) != null ? _a : context.getFilename();
}
function getPhysicalFilename(context) {
var _a, _b;
const physicalFilename = (_b = context.physicalFilename) != null ? _b : (_a = context.getPhysicalFilename) == null ? void 0 : _a.call(context);
if (physicalFilename != null) {
return physicalFilename;
}
const filename = getFilename(context);
let target = filename;
while (/^\d+_/u.test(basename(target)) && !existsSync(target)) {
const next = dirname(target);
if (next === target || !extname(next)) {
break;
}
target = next;
}
return target;
}
export { getCwd, getFilename, getPhysicalFilename, getSourceCode };
@@ -0,0 +1,113 @@
import * as asn1js from "asn1js";
import { AnyConverterType, IAsnConverter, IntegerConverterType } from "./types";
import { AsnPropTypes } from "./enums";
import { OctetString } from "./types/index";
/**
* NOTE: Converter MUST have name Asn<Asn1PropType.name>Converter.
* Asn1Prop decorator link custom converters by name of the Asn1PropType
*/
/**
* ASN.1 ANY converter
*/
export declare const AsnAnyConverter: IAsnConverter<AnyConverterType>;
/**
* ASN.1 INTEGER to Number/String converter
*/
export declare const AsnIntegerConverter: IAsnConverter<IntegerConverterType, asn1js.Integer>;
/**
* ASN.1 ENUMERATED converter
*/
export declare const AsnEnumeratedConverter: IAsnConverter<number, asn1js.Enumerated>;
/**
* ASN.1 INTEGER to ArrayBuffer converter
*/
export declare const AsnIntegerArrayBufferConverter: IAsnConverter<ArrayBuffer, asn1js.Integer>;
/**
* ASN.1 INTEGER to BigInt converter
*/
export declare const AsnIntegerBigIntConverter: IAsnConverter<bigint, asn1js.Integer>;
/**
* ASN.1 BIT STRING converter
*/
export declare const AsnBitStringConverter: IAsnConverter<ArrayBuffer, asn1js.BitString>;
/**
* ASN.1 OBJECT IDENTIFIER converter
*/
export declare const AsnObjectIdentifierConverter: IAsnConverter<string, asn1js.ObjectIdentifier>;
/**
* ASN.1 BOOLEAN converter
*/
export declare const AsnBooleanConverter: IAsnConverter<boolean, asn1js.Boolean>;
/**
* ASN.1 OCTET_STRING converter
*/
export declare const AsnOctetStringConverter: IAsnConverter<ArrayBuffer, asn1js.OctetString>;
/**
* ASN.1 OCTET_STRING converter to OctetString class
*/
export declare const AsnConstructedOctetStringConverter: IAsnConverter<OctetString, asn1js.OctetString>;
/**
* ASN.1 UTF8_STRING converter
*/
export declare const AsnUtf8StringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 BPM STRING converter
*/
export declare const AsnBmpStringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 UNIVERSAL STRING converter
*/
export declare const AsnUniversalStringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 NUMERIC STRING converter
*/
export declare const AsnNumericStringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 PRINTABLE STRING converter
*/
export declare const AsnPrintableStringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 TELETEX STRING converter
*/
export declare const AsnTeletexStringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 VIDEOTEX STRING converter
*/
export declare const AsnVideotexStringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 IA5 STRING converter
*/
export declare const AsnIA5StringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 GRAPHIC STRING converter
*/
export declare const AsnGraphicStringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 VISIBLE STRING converter
*/
export declare const AsnVisibleStringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 GENERAL STRING converter
*/
export declare const AsnGeneralStringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 CHARACTER STRING converter
*/
export declare const AsnCharacterStringConverter: IAsnConverter<string, asn1js.AsnType>;
/**
* ASN.1 UTCTime converter
*/
export declare const AsnUTCTimeConverter: IAsnConverter<Date, asn1js.UTCTime>;
/**
* ASN.1 GeneralizedTime converter
*/
export declare const AsnGeneralizedTimeConverter: IAsnConverter<Date, asn1js.GeneralizedTime>;
/**
* ASN.1 ANY converter
*/
export declare const AsnNullConverter: IAsnConverter<null, asn1js.Null>;
/**
* Returns default converter for specified type
* @param type
*/
export declare function defaultConverter(type: AsnPropTypes): IAsnConverter | null;
@@ -0,0 +1,41 @@
import { isoBase64URL, isoUint8Array } from '../helpers/iso/index.js';
import { generateChallenge } from '../helpers/generateChallenge.js';
/**
* Prepare a value to pass into navigator.credentials.get(...) for authenticator authentication
*
* **Options:**
*
* @param rpID - Valid domain name (after `https://`)
* @param allowCredentials **(Optional)** - Authenticators previously registered by the user, if any. If undefined the client will ask the user which credential they want to use
* @param challenge **(Optional)** - Random value the authenticator needs to sign and pass back user for authentication. Defaults to generating a random value
* @param timeout **(Optional)** - How long (in ms) the user can take to complete authentication. Defaults to `60000`
* @param userVerification **(Optional)** - Set to `'discouraged'` when asserting as part of a 2FA flow, otherwise set to `'preferred'` or `'required'` as desired. Defaults to `"preferred"`
* @param extensions **(Optional)** - Additional plugins the authenticator or browser should use during authentication
*/
export async function generateAuthenticationOptions(options) {
const { allowCredentials, challenge = await generateChallenge(), timeout = 60000, userVerification = 'preferred', extensions, rpID, } = options;
/**
* Preserve ability to specify `string` values for challenges
*/
let _challenge = challenge;
if (typeof _challenge === 'string') {
_challenge = isoUint8Array.fromUTF8String(_challenge);
}
return {
rpId: rpID,
challenge: isoBase64URL.fromBuffer(_challenge),
allowCredentials: allowCredentials?.map((cred) => {
if (!isoBase64URL.isBase64URL(cred.id)) {
throw new Error(`allowCredential id "${cred.id}" is not a valid base64url string`);
}
return {
...cred,
id: isoBase64URL.trimPadding(cred.id),
type: 'public-key',
};
}),
timeout,
userVerification,
extensions,
};
}
@@ -0,0 +1 @@
{"name":"@uiw/codemirror-extensions-basic-setup","version":"4.25.4","requiresBuild":false,"files":{"cjs/index.js":{"checkedAt":1794532110700,"integrity":"sha512-8VqM0ouJQ6subJ6s4lpvkb2XTbMiwqOi8BeVApLR6XDeuf/hLU1bhz3hO3mmSXagxDrGgc427kA74Il9Pem95Q==","mode":420,"size":7100},"esm/index.js":{"checkedAt":1794532110700,"integrity":"sha512-yQsDqbgHzatftk7Wbu7pAeKmAkjOvKQTK+yvFGXzKurw6Qyq1IT0iLuAULX63vUCoQZFg5UTcofmIwew/Y1wtQ==","mode":420,"size":6777},"cjs/package.json":{"checkedAt":1794532110700,"integrity":"sha512-45xd0dtQbcCswWl4dRmcJAP7TbnFx4AWV6fhDyyOIz9VW7/JH5AGEcS8CYaxXj9cDY9VbpjsAoqfIP+SYLWhYA==","mode":420,"size":20},"esm/package.json":{"checkedAt":1794532110700,"integrity":"sha512-yJaw9MUXdELVmz7z3SYVp2blYklya3nL3pU6DnmPcM5rDXeD26fLnxMcB3WmvAQ/Uq9woAMNLTYvYRv/3m6T8Q==","mode":420,"size":18},"package.json":{"checkedAt":1794532110700,"integrity":"sha512-RmXsU2V+q3xaoMQXbNJw1UTxdtAS1rR2mvhsVOvWe7eW+dGd+uKpXT0rPBYZNQRyQQKQOEQbvrySR42aLL/3cA==","mode":420,"size":1736},"README.md":{"checkedAt":1794532110701,"integrity":"sha512-a0XCtkmbr4T6Yps7gRcb8nHa8Ioj9RWAT66zxZSsryfYpxvgLtdeuI7os20929THa8iYnR6hxusiGWlzAPt+iQ==","mode":420,"size":12934},"cjs/index.d.ts":{"checkedAt":1794532110701,"integrity":"sha512-yvj0zKBR5W6CmSXeaS5AH+piX1JXzzPMGI/51xTyerpaf+YDYGiz3m0RI1efto8xlugNDRoFG38yHlxRgcV0lg==","mode":420,"size":4217},"esm/index.d.ts":{"checkedAt":1794532110701,"integrity":"sha512-yvj0zKBR5W6CmSXeaS5AH+piX1JXzzPMGI/51xTyerpaf+YDYGiz3m0RI1efto8xlugNDRoFG38yHlxRgcV0lg==","mode":420,"size":4217},"src/index.ts":{"checkedAt":1794532110701,"integrity":"sha512-jxg6JINk0x23Aaqoyu6YhP9r0FhXrDd2FTGxI0vT8018n68qrafUfGe66cz3CWg+s89lKyI9cez+zFmO9u4UaA==","mode":420,"size":7930}}}
@@ -0,0 +1,313 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { ZodIssueCode } from "../ZodError.js";
import { util } from "../helpers/util.js";
test("refinement", () => {
const obj1 = z.object({
first: z.string(),
second: z.string(),
});
const obj2 = obj1.partial().strict();
const obj3 = obj2.refine((data) => data.first || data.second, "Either first or second should be filled in.");
expect(obj1 === (obj2 as any)).toEqual(false);
expect(obj2 === (obj3 as any)).toEqual(false);
expect(() => obj1.parse({})).toThrow();
expect(() => obj2.parse({ third: "adsf" })).toThrow();
expect(() => obj3.parse({})).toThrow();
obj3.parse({ first: "a" });
obj3.parse({ second: "a" });
obj3.parse({ first: "a", second: "a" });
});
test("refinement 2", () => {
const validationSchema = z
.object({
email: z.string().email(),
password: z.string(),
confirmPassword: z.string(),
})
.refine((data) => data.password === data.confirmPassword, "Both password and confirmation must match");
expect(() =>
validationSchema.parse({
email: "aaaa@gmail.com",
password: "aaaaaaaa",
confirmPassword: "bbbbbbbb",
})
).toThrow();
});
test("refinement type guard", () => {
const validationSchema = z.object({
a: z.string().refine((s): s is "a" => s === "a"),
});
type Input = z.input<typeof validationSchema>;
type Schema = z.infer<typeof validationSchema>;
util.assertEqual<"a", Input["a"]>(false);
util.assertEqual<string, Input["a"]>(true);
util.assertEqual<"a", Schema["a"]>(true);
util.assertEqual<string, Schema["a"]>(false);
});
test("refinement Promise", async () => {
const validationSchema = z
.object({
email: z.string().email(),
password: z.string(),
confirmPassword: z.string(),
})
.refine(
(data) => Promise.resolve().then(() => data.password === data.confirmPassword),
"Both password and confirmation must match"
);
await validationSchema.parseAsync({
email: "aaaa@gmail.com",
password: "password",
confirmPassword: "password",
});
});
test("custom path", async () => {
const result = await z
.object({
password: z.string(),
confirm: z.string(),
})
.refine((data) => data.confirm === data.password, { path: ["confirm"] })
.spa({ password: "asdf", confirm: "qewr" });
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues[0].path).toEqual(["confirm"]);
}
});
test("use path in refinement context", async () => {
const noNested = z.string()._refinement((_val, ctx) => {
if (ctx.path.length > 0) {
ctx.addIssue({
code: ZodIssueCode.custom,
message: `schema cannot be nested. path: ${ctx.path.join(".")}`,
});
return false;
} else {
return true;
}
});
const data = z.object({
foo: noNested,
});
const t1 = await noNested.spa("asdf");
const t2 = await data.spa({ foo: "asdf" });
expect(t1.success).toBe(true);
expect(t2.success).toBe(false);
if (t2.success === false) {
expect(t2.error.issues[0].message).toEqual("schema cannot be nested. path: foo");
}
});
test("superRefine", () => {
const Strings = z.array(z.string()).superRefine((val, ctx) => {
if (val.length > 3) {
ctx.addIssue({
code: z.ZodIssueCode.too_big,
maximum: 3,
type: "array",
inclusive: true,
exact: true,
message: "Too many items 😡",
});
}
if (val.length !== new Set(val).size) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: `No duplicates allowed.`,
});
}
});
const result = Strings.safeParse(["asfd", "asfd", "asfd", "asfd"]);
expect(result.success).toEqual(false);
if (!result.success) expect(result.error.issues.length).toEqual(2);
Strings.parse(["asfd", "qwer"]);
});
test("superRefine async", async () => {
const Strings = z.array(z.string()).superRefine(async (val, ctx) => {
if (val.length > 3) {
ctx.addIssue({
code: z.ZodIssueCode.too_big,
maximum: 3,
type: "array",
inclusive: true,
exact: true,
message: "Too many items 😡",
});
}
if (val.length !== new Set(val).size) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: `No duplicates allowed.`,
});
}
});
const result = await Strings.safeParseAsync(["asfd", "asfd", "asfd", "asfd"]);
expect(result.success).toEqual(false);
if (!result.success) expect(result.error.issues.length).toEqual(2);
Strings.parseAsync(["asfd", "qwer"]);
});
test("superRefine - type narrowing", () => {
type NarrowType = { type: string; age: number };
const schema = z
.object({
type: z.string(),
age: z.number(),
})
.nullable()
.superRefine((arg, ctx): arg is NarrowType => {
if (!arg) {
// still need to make a call to ctx.addIssue
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "cannot be null",
fatal: true,
});
return false;
}
return true;
});
util.assertEqual<z.infer<typeof schema>, NarrowType>(true);
expect(schema.safeParse({ type: "test", age: 0 }).success).toEqual(true);
expect(schema.safeParse(null).success).toEqual(false);
});
test("chained mixed refining types", () => {
type firstRefinement = { first: string; second: number; third: true };
type secondRefinement = { first: "bob"; second: number; third: true };
type thirdRefinement = { first: "bob"; second: 33; third: true };
const schema = z
.object({
first: z.string(),
second: z.number(),
third: z.boolean(),
})
.nullable()
.refine((arg): arg is firstRefinement => !!arg?.third)
.superRefine((arg, ctx): arg is secondRefinement => {
util.assertEqual<typeof arg, firstRefinement>(true);
if (arg.first !== "bob") {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "`first` property must be `bob`",
});
return false;
}
return true;
})
.refine((arg): arg is thirdRefinement => {
util.assertEqual<typeof arg, secondRefinement>(true);
return arg.second === 33;
});
util.assertEqual<z.infer<typeof schema>, thirdRefinement>(true);
});
test("get inner type", () => {
z.string()
.refine(() => true)
.innerType()
.parse("asdf");
});
test("chained refinements", () => {
const objectSchema = z
.object({
length: z.number(),
size: z.number(),
})
.refine(({ length }) => length > 5, {
path: ["length"],
message: "length greater than 5",
})
.refine(({ size }) => size > 7, {
path: ["size"],
message: "size greater than 7",
});
const r1 = objectSchema.safeParse({
length: 4,
size: 9,
});
expect(r1.success).toEqual(false);
if (!r1.success) expect(r1.error.issues.length).toEqual(1);
const r2 = objectSchema.safeParse({
length: 4,
size: 3,
});
expect(r2.success).toEqual(false);
if (!r2.success) expect(r2.error.issues.length).toEqual(2);
});
test("fatal superRefine", () => {
const Strings = z
.string()
.superRefine((val, ctx) => {
if (val === "") {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "foo",
fatal: true,
});
}
})
.superRefine((val, ctx) => {
if (val !== " ") {
ctx.addIssue({
code: z.ZodIssueCode.custom,
message: "bar",
});
}
});
const result = Strings.safeParse("");
expect(result.success).toEqual(false);
if (!result.success) expect(result.error.issues.length).toEqual(1);
});
test("superRefine after skipped transform", () => {
const schema = z
.string()
.regex(/^\d+$/)
.transform((val) => Number(val))
.superRefine((val) => {
if (typeof val !== "number") {
throw new Error("Called without transform");
}
});
const result = schema.safeParse("");
expect(result.success).toEqual(false);
});
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=getExtendedConstructorArguments.spec.d.ts.map
@@ -0,0 +1,46 @@
module['exports'] = function runTheTrap(text, options) {
var result = '';
text = text || 'Run the trap, drop the bass';
text = text.split('');
var trap = {
a: ['\u0040', '\u0104', '\u023a', '\u0245', '\u0394', '\u039b', '\u0414'],
b: ['\u00df', '\u0181', '\u0243', '\u026e', '\u03b2', '\u0e3f'],
c: ['\u00a9', '\u023b', '\u03fe'],
d: ['\u00d0', '\u018a', '\u0500', '\u0501', '\u0502', '\u0503'],
e: ['\u00cb', '\u0115', '\u018e', '\u0258', '\u03a3', '\u03be', '\u04bc',
'\u0a6c'],
f: ['\u04fa'],
g: ['\u0262'],
h: ['\u0126', '\u0195', '\u04a2', '\u04ba', '\u04c7', '\u050a'],
i: ['\u0f0f'],
j: ['\u0134'],
k: ['\u0138', '\u04a0', '\u04c3', '\u051e'],
l: ['\u0139'],
m: ['\u028d', '\u04cd', '\u04ce', '\u0520', '\u0521', '\u0d69'],
n: ['\u00d1', '\u014b', '\u019d', '\u0376', '\u03a0', '\u048a'],
o: ['\u00d8', '\u00f5', '\u00f8', '\u01fe', '\u0298', '\u047a', '\u05dd',
'\u06dd', '\u0e4f'],
p: ['\u01f7', '\u048e'],
q: ['\u09cd'],
r: ['\u00ae', '\u01a6', '\u0210', '\u024c', '\u0280', '\u042f'],
s: ['\u00a7', '\u03de', '\u03df', '\u03e8'],
t: ['\u0141', '\u0166', '\u0373'],
u: ['\u01b1', '\u054d'],
v: ['\u05d8'],
w: ['\u0428', '\u0460', '\u047c', '\u0d70'],
x: ['\u04b2', '\u04fe', '\u04fc', '\u04fd'],
y: ['\u00a5', '\u04b0', '\u04cb'],
z: ['\u01b5', '\u0240'],
};
text.forEach(function(c) {
c = c.toLowerCase();
var chars = trap[c] || [' '];
var rand = Math.floor(Math.random() * chars.length);
if (typeof trap[c] !== 'undefined') {
result += trap[c][rand];
} else {
result += c;
}
});
return result;
};
@@ -0,0 +1,19 @@
import { millisecondsToSeconds } from 'motion-utils';
import { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';
/**
* Create a progress => progress easing function from a generator.
*/
function createGeneratorEasing(options, scale = 100, createGenerator) {
const generator = createGenerator({ ...options, keyframes: [0, scale] });
const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
return {
type: "keyframes",
ease: (progress) => {
return generator.next(duration * progress).value / scale;
},
duration: millisecondsToSeconds(duration),
};
}
export { createGeneratorEasing };
@@ -0,0 +1 @@
{"version":3,"file":"static-require.js","sourceRoot":"","sources":["../../src/utils/static-require.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,eAAe,CAAC,IAA6B;IAC3D,OAAO,CACL,IAAI;QACJ,IAAI,CAAC,MAAM;QACX,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,YAAY;QACjC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;QAC9B,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;QAC3B,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,QAAQ,CAC5C,CAAA;AACH,CAAC"}
@@ -0,0 +1,79 @@
#!/usr/bin/env node
import { performance } from 'node:perf_hooks'
import module from 'node:module'
if (!import.meta.url.includes('node_modules')) {
try {
// only available as dev dependency
await import('source-map-support').then((r) => r.default.install())
} catch {}
process.on('unhandledRejection', (err) => {
throw new Error('UNHANDLED PROMISE REJECTION', { cause: err })
})
}
global.__vite_start_time = performance.now()
// check debug mode first before requiring the CLI.
const debugIndex = process.argv.findIndex((arg) => /^(?:-d|--debug)$/.test(arg))
const filterIndex = process.argv.findIndex((arg) =>
/^(?:-f|--filter)$/.test(arg),
)
const profileIndex = process.argv.indexOf('--profile')
if (debugIndex > 0) {
let value = process.argv[debugIndex + 1]
if (!value || value.startsWith('-')) {
value = 'vite:*'
} else {
// support debugging multiple flags with comma-separated list
value = value
.split(',')
.map((v) => `vite:${v}`)
.join(',')
}
process.env.DEBUG = `${
process.env.DEBUG ? process.env.DEBUG + ',' : ''
}${value}`
if (filterIndex > 0) {
const filter = process.argv[filterIndex + 1]
if (filter && !filter.startsWith('-')) {
process.env.VITE_DEBUG_FILTER = filter
}
}
}
function start() {
try {
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.8.0+ and only called if it exists
module.enableCompileCache?.()
// flush the cache after 10s because the cache is not flushed until process end
// for dev server, the cache is never flushed unless manually flushed because the process.exit is called
// also flushing the cache in SIGINT handler seems to cause the process to hang
setTimeout(() => {
try {
// eslint-disable-next-line n/no-unsupported-features/node-builtins -- it is supported in Node 22.12.0+ and only called if it exists
module.flushCompileCache?.()
} catch {}
}, 10 * 1000).unref()
} catch {}
return import('../dist/node/cli.js')
}
if (profileIndex > 0) {
process.argv.splice(profileIndex, 1)
const next = process.argv[profileIndex]
if (next && !next.startsWith('-')) {
process.argv.splice(profileIndex, 1)
}
const inspector = await import('node:inspector').then((r) => r.default)
const session = (global.__vite_profile_session = new inspector.Session())
session.connect()
session.post('Profiler.enable', () => {
session.post('Profiler.start', start)
})
} else {
start()
}
@@ -0,0 +1,36 @@
import type { FieldValues, InternalFieldName, Ref } from './fields';
import type { BrowserNativeObject, IsAny, LiteralUnion, Merge } from './utils';
import type { RegisterOptions, ValidateResult } from './validator';
export type Message = string;
export type MultipleFieldErrors = {
[K in keyof RegisterOptions]?: ValidateResult;
} & {
[key: string]: ValidateResult;
};
export type FieldError = {
type: LiteralUnion<keyof RegisterOptions, string>;
root?: FieldError;
ref?: Ref;
types?: MultipleFieldErrors;
message?: Message;
};
export type ErrorOption = {
message?: Message;
type?: LiteralUnion<keyof RegisterOptions, string>;
types?: MultipleFieldErrors;
};
export type DeepRequired<T> = T extends BrowserNativeObject | Blob ? T : {
[K in keyof T]-?: NonNullable<DeepRequired<T[K]>>;
};
export type FieldErrorsImpl<T extends FieldValues = FieldValues> = {
[K in keyof T]?: T[K] extends BrowserNativeObject | Blob ? FieldError : K extends 'root' | `root.${string}` ? GlobalError : T[K] extends object ? Merge<FieldError, FieldErrorsImpl<T[K]>> : FieldError;
};
export type GlobalError = Partial<{
type: string | number;
message: Message;
}>;
export type FieldErrors<T extends FieldValues = FieldValues> = Partial<FieldValues extends IsAny<FieldValues> ? any : FieldErrorsImpl<DeepRequired<T>>> & {
root?: Record<string, GlobalError> & GlobalError;
};
export type InternalFieldErrors = Partial<Record<InternalFieldName, FieldError>>;
//# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1,11 @@
{
"rules": {
"array-bracket-newline": 0,
"max-lines-per-function": 0,
"max-nested-callbacks": [2, 3],
"max-statements": [2, 12],
"max-statements-per-line": [2, { "max": 2 }],
"no-invalid-this": [1],
"object-curly-newline": 0,
}
}
@@ -0,0 +1,60 @@
'use strict'
const parse = require('./parse.js')
const diff = (version1, version2) => {
const v1 = parse(version1, null, true)
const v2 = parse(version2, null, true)
const comparison = v1.compare(v2)
if (comparison === 0) {
return null
}
const v1Higher = comparison > 0
const highVersion = v1Higher ? v1 : v2
const lowVersion = v1Higher ? v2 : v1
const highHasPre = !!highVersion.prerelease.length
const lowHasPre = !!lowVersion.prerelease.length
if (lowHasPre && !highHasPre) {
// Going from prerelease -> no prerelease requires some special casing
// If the low version has only a major, then it will always be a major
// Some examples:
// 1.0.0-1 -> 1.0.0
// 1.0.0-1 -> 1.1.1
// 1.0.0-1 -> 2.0.0
if (!lowVersion.patch && !lowVersion.minor) {
return 'major'
}
// If the main part has no difference
if (lowVersion.compareMain(highVersion) === 0) {
if (lowVersion.minor && !lowVersion.patch) {
return 'minor'
}
return 'patch'
}
}
// add the `pre` prefix if we are going to a prerelease version
const prefix = highHasPre ? 'pre' : ''
if (v1.major !== v2.major) {
return prefix + 'major'
}
if (v1.minor !== v2.minor) {
return prefix + 'minor'
}
if (v1.patch !== v2.patch) {
return prefix + 'patch'
}
// high and low are preleases
return 'prerelease'
}
module.exports = diff
@@ -0,0 +1,5 @@
"use strict";
0 && 0;
//# sourceMappingURL=cache-contexts.js.map
@@ -0,0 +1,44 @@
{
"name": "@react-aria/visually-hidden",
"version": "3.8.28",
"description": "Spectrum UI components in React",
"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": [
"*.css"
],
"repository": {
"type": "git",
"url": "https://github.com/adobe/react-spectrum"
},
"dependencies": {
"@react-aria/interactions": "^3.25.6",
"@react-aria/utils": "^3.31.0",
"@react-types/shared": "^3.32.1",
"@swc/helpers": "^0.5.0"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
},
"publishConfig": {
"access": "public"
},
"gitHead": "0bda51183baa23306342af32a82012ea0fe0f2dc"
}
@@ -0,0 +1,27 @@
"use client";
import {
pagination_default
} from "./chunk-APIAPHLK.mjs";
import {
pagination_cursor_default
} from "./chunk-KLIPPDN4.mjs";
import {
pagination_item_default
} from "./chunk-CNAEJLFQ.mjs";
import {
usePaginationItem
} from "./chunk-AQ7H3LB5.mjs";
import {
usePagination
} from "./chunk-DSTL7ZRK.mjs";
// src/index.ts
import { PaginationItemType } from "@heroui/use-pagination";
export {
pagination_default as Pagination,
pagination_cursor_default as PaginationCursor,
pagination_item_default as PaginationItem,
PaginationItemType,
usePagination,
usePaginationItem
};
@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toUpperCase = exports.toLowerCase = exports.trim = exports.normalize = exports.overwrite = exports.mime = exports.property = exports.endsWith = exports.startsWith = exports.includes = exports.uppercase = exports.lowercase = exports.regex = exports.length = exports.minLength = exports.maxLength = exports.size = exports.minSize = exports.maxSize = exports.multipleOf = exports.nonnegative = exports.nonpositive = exports.negative = exports.positive = exports.gte = exports.gt = exports.lte = exports.lt = void 0;
var index_js_1 = require("../core/index.cjs");
Object.defineProperty(exports, "lt", { enumerable: true, get: function () { return index_js_1._lt; } });
Object.defineProperty(exports, "lte", { enumerable: true, get: function () { return index_js_1._lte; } });
Object.defineProperty(exports, "gt", { enumerable: true, get: function () { return index_js_1._gt; } });
Object.defineProperty(exports, "gte", { enumerable: true, get: function () { return index_js_1._gte; } });
Object.defineProperty(exports, "positive", { enumerable: true, get: function () { return index_js_1._positive; } });
Object.defineProperty(exports, "negative", { enumerable: true, get: function () { return index_js_1._negative; } });
Object.defineProperty(exports, "nonpositive", { enumerable: true, get: function () { return index_js_1._nonpositive; } });
Object.defineProperty(exports, "nonnegative", { enumerable: true, get: function () { return index_js_1._nonnegative; } });
Object.defineProperty(exports, "multipleOf", { enumerable: true, get: function () { return index_js_1._multipleOf; } });
Object.defineProperty(exports, "maxSize", { enumerable: true, get: function () { return index_js_1._maxSize; } });
Object.defineProperty(exports, "minSize", { enumerable: true, get: function () { return index_js_1._minSize; } });
Object.defineProperty(exports, "size", { enumerable: true, get: function () { return index_js_1._size; } });
Object.defineProperty(exports, "maxLength", { enumerable: true, get: function () { return index_js_1._maxLength; } });
Object.defineProperty(exports, "minLength", { enumerable: true, get: function () { return index_js_1._minLength; } });
Object.defineProperty(exports, "length", { enumerable: true, get: function () { return index_js_1._length; } });
Object.defineProperty(exports, "regex", { enumerable: true, get: function () { return index_js_1._regex; } });
Object.defineProperty(exports, "lowercase", { enumerable: true, get: function () { return index_js_1._lowercase; } });
Object.defineProperty(exports, "uppercase", { enumerable: true, get: function () { return index_js_1._uppercase; } });
Object.defineProperty(exports, "includes", { enumerable: true, get: function () { return index_js_1._includes; } });
Object.defineProperty(exports, "startsWith", { enumerable: true, get: function () { return index_js_1._startsWith; } });
Object.defineProperty(exports, "endsWith", { enumerable: true, get: function () { return index_js_1._endsWith; } });
Object.defineProperty(exports, "property", { enumerable: true, get: function () { return index_js_1._property; } });
Object.defineProperty(exports, "mime", { enumerable: true, get: function () { return index_js_1._mime; } });
Object.defineProperty(exports, "overwrite", { enumerable: true, get: function () { return index_js_1._overwrite; } });
Object.defineProperty(exports, "normalize", { enumerable: true, get: function () { return index_js_1._normalize; } });
Object.defineProperty(exports, "trim", { enumerable: true, get: function () { return index_js_1._trim; } });
Object.defineProperty(exports, "toLowerCase", { enumerable: true, get: function () { return index_js_1._toLowerCase; } });
Object.defineProperty(exports, "toUpperCase", { enumerable: true, get: function () { return index_js_1._toUpperCase; } });
@@ -0,0 +1 @@
{"version":3,"file":"apply-default.js","sourceRoot":"","sources":["../../src/utils/apply-default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAU7D,MAAM,UAAU,YAAY,CAI1B,cAAiC,EACjC,WAAkC;IAGlC,MAAM,OAAO,GAAG,eAAe,CAAC,cAAc,CAAuB,CAAA;IAErE,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;QACxB,OAAO,OAAO,CAAA;IAChB,CAAC;IAID,KAAK,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,IAAK,OAAqB,CAAC,OAAO,EAAE,EAAE,CAAC;QACxD,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;YAC9B,OAAO,CAAC,CAAC,CAAC;gBACR,gBAAgB,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAAC,GAAG,CAAC;oBAChD,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC;oBACzB,CAAC,CAAC,OAAO,CAAA;QACf,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAA;AAChB,CAAC"}
@@ -0,0 +1,52 @@
/**
* @fileoverview Rule to flag use of arguments.callee and arguments.caller.
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Disallow the use of `arguments.caller` or `arguments.callee`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-caller",
},
schema: [],
messages: {
unexpected: "Avoid arguments.{{prop}}.",
},
},
create(context) {
return {
MemberExpression(node) {
const objectName = node.object.name,
propertyName = node.property.name;
if (
objectName === "arguments" &&
!node.computed &&
propertyName &&
propertyName.match(/^calle[er]$/u)
) {
context.report({
node,
messageId: "unexpected",
data: { prop: propertyName },
});
}
},
};
},
};
@@ -0,0 +1,37 @@
"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/button-group-context.ts
var button_group_context_exports = {};
__export(button_group_context_exports, {
ButtonGroupProvider: () => ButtonGroupProvider,
useButtonGroupContext: () => useButtonGroupContext
});
module.exports = __toCommonJS(button_group_context_exports);
var import_react_utils = require("@heroui/react-utils");
var [ButtonGroupProvider, useButtonGroupContext] = (0, import_react_utils.createContext)({
name: "ButtonGroupContext",
strict: false
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ButtonGroupProvider,
useButtonGroupContext
});
@@ -0,0 +1,2 @@
export declare function postConstruct(): MethodDecorator;
//# sourceMappingURL=postConstruct.d.ts.map
@@ -0,0 +1,601 @@
export default `flf2a 1 1 2 -1 13 0 0 242
Terminal by Glenn Chappell 4/93
Includes characters 128-255
Enhanced for Latin-2,3,4 by John Cowan <cowan@ccil.org>
Latin character sets supported only if your screen font does
figlet release 2.2 -- November 1996
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Double-checked by Paul Burton <solution@earthlink.net> 12/96. Added the new
parameter supported by FIGlet and FIGWin. Unlike all other FIGfonts, this one
is intended to produce output exactly the same as the input unless a control
file is used. Therefore it produces the SAME output for smush, kern or fit.
@
!@
"@
#@
$@
%@
&@
'@
(@
)@
*@
+@
,@
-@
.@
/@
0@
1@
2@
3@
4@
5@
6@
7@
8@
9@
:@
;@
<@
=@
>@
?@
@#
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@
[@
\\@
]@
^@
_@
\`@
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@
{@
|@
}@
~@
�@
�@
�@
�@
�@
�@
�@
128
�@
129
�@
130
�@
131
�@
132
�@
133
�@
134
�@
135
�@
136
�@
137
�@
138
�@
139
�@
140
�@
141
�@
142
�@
143
�@
144
�@
145
�@
146
�@
147
�@
148
�@
149
�@
150
�@
151
�@
152
�@
153
�@
154
�@
155
�@
156
�@
157
�@
158
�@
159
�@
160 NO-BREAK SPACE
�@
161 INVERTED EXCLAMATION MARK
�@
162 CENT SIGN
�@
163 POUND SIGN
�@
164 CURRENCY SIGN
�@
165 YEN SIGN
�@
166 BROKEN BAR
�@
167 SECTION SIGN
�@
168 DIAERESIS
�@
169 COPYRIGHT SIGN
�@
170 FEMININE ORDINAL INDICATOR
�@
171 LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
�@
172 NOT SIGN
�@
173 SOFT HYPHEN
�@
174 REGISTERED SIGN
�@
175 MACRON
�@
176 DEGREE SIGN
�@
177 PLUS-MINUS SIGN
�@
178 SUPERSCRIPT TWO
�@
179 SUPERSCRIPT THREE
�@
180 ACUTE ACCENT
�@
181 MICRO SIGN
�@
182 PILCROW SIGN
�@
183 MIDDLE DOT
�@
184 CEDILLA
�@
185 SUPERSCRIPT ONE
�@
186 MASCULINE ORDINAL INDICATOR
�@
187 RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
�@
188 VULGAR FRACTION ONE QUARTER
�@
189 VULGAR FRACTION ONE HALF
�@
190 VULGAR FRACTION THREE QUARTERS
�@
191 INVERTED QUESTION MARK
�@
192 LATIN CAPITAL LETTER A WITH GRAVE
�@
193 LATIN CAPITAL LETTER A WITH ACUTE
�@
194 LATIN CAPITAL LETTER A WITH CIRCUMFLEX
�@
195 LATIN CAPITAL LETTER A WITH TILDE
�@
196 LATIN CAPITAL LETTER A WITH DIAERESIS
�@
197 LATIN CAPITAL LETTER A WITH RING ABOVE
�@
198 LATIN CAPITAL LETTER AE
�@
199 LATIN CAPITAL LETTER C WITH CEDILLA
�@
200 LATIN CAPITAL LETTER E WITH GRAVE
�@
201 LATIN CAPITAL LETTER E WITH ACUTE
�@
202 LATIN CAPITAL LETTER E WITH CIRCUMFLEX
�@
203 LATIN CAPITAL LETTER E WITH DIAERESIS
�@
204 LATIN CAPITAL LETTER I WITH GRAVE
�@
205 LATIN CAPITAL LETTER I WITH ACUTE
�@
206 LATIN CAPITAL LETTER I WITH CIRCUMFLEX
�@
207 LATIN CAPITAL LETTER I WITH DIAERESIS
�@
208 LATIN CAPITAL LETTER ETH
�@
209 LATIN CAPITAL LETTER N WITH TILDE
�@
210 LATIN CAPITAL LETTER O WITH GRAVE
�@
211 LATIN CAPITAL LETTER O WITH ACUTE
�@
212 LATIN CAPITAL LETTER O WITH CIRCUMFLEX
�@
213 LATIN CAPITAL LETTER O WITH TILDE
�@
214 LATIN CAPITAL LETTER O WITH DIAERESIS
�@
215 MULTIPLICATION SIGN
�@
216 LATIN CAPITAL LETTER O WITH STROKE
�@
217 LATIN CAPITAL LETTER U WITH GRAVE
�@
218 LATIN CAPITAL LETTER U WITH ACUTE
�@
219 LATIN CAPITAL LETTER U WITH CIRCUMFLEX
�@
220 LATIN CAPITAL LETTER U WITH DIAERESIS
�@
221 LATIN CAPITAL LETTER Y WITH ACUTE
�@
222 LATIN CAPITAL LETTER THORN
�@
223 LATIN SMALL LETTER SHARP S
�@
224 LATIN SMALL LETTER A WITH GRAVE
�@
225 LATIN SMALL LETTER A WITH ACUTE
�@
226 LATIN SMALL LETTER A WITH CIRCUMFLEX
�@
227 LATIN SMALL LETTER A WITH TILDE
�@
228 LATIN SMALL LETTER A WITH DIAERESIS
�@
229 LATIN SMALL LETTER A WITH RING ABOVE
�@
230 LATIN SMALL LETTER AE
�@
231 LATIN SMALL LETTER C WITH CEDILLA
�@
232 LATIN SMALL LETTER E WITH GRAVE
�@
233 LATIN SMALL LETTER E WITH ACUTE
�@
234 LATIN SMALL LETTER E WITH CIRCUMFLEX
�@
235 LATIN SMALL LETTER E WITH DIAERESIS
�@
236 LATIN SMALL LETTER I WITH GRAVE
�@
237 LATIN SMALL LETTER I WITH ACUTE
�@
238 LATIN SMALL LETTER I WITH CIRCUMFLEX
�@
239 LATIN SMALL LETTER I WITH DIAERESIS
�@
240 LATIN SMALL LETTER ETH
�@
241 LATIN SMALL LETTER N WITH TILDE
�@
242 LATIN SMALL LETTER O WITH GRAVE
�@
243 LATIN SMALL LETTER O WITH ACUTE
�@
244 LATIN SMALL LETTER O WITH CIRCUMFLEX
�@
245 LATIN SMALL LETTER O WITH TILDE
�@
246 LATIN SMALL LETTER O WITH DIAERESIS
�@
247 DIVISION SIGN
�@
248 LATIN SMALL LETTER O WITH STROKE
�@
249 LATIN SMALL LETTER U WITH GRAVE
�@
250 LATIN SMALL LETTER U WITH ACUTE
�@
251 LATIN SMALL LETTER U WITH CIRCUMFLEX
�@
252 LATIN SMALL LETTER U WITH DIAERESIS
�@
253 LATIN SMALL LETTER Y WITH ACUTE
�@
254 LATIN SMALL LETTER THORN
�@
255 LATIN SMALL LETTER Y WITH DIAERESIS
�@
0x0100 LATIN CAPITAL LETTER A WITH MACRON
�@
0x0101 LATIN SMALL LETTER A WITH MACRON
�@
0x0102 LATIN CAPITAL LETTER A WITH BREVE
�@
0x0103 LATIN SMALL LETTER A WITH BREVE
�@
0x0104 LATIN CAPITAL LETTER A WITH OGONEK
�@
0x0105 LATIN SMALL LETTER A WITH OGONEK
�@
0x0106 LATIN CAPITAL LETTER C WITH ACUTE
�@
0x0107 LATIN SMALL LETTER C WITH ACUTE
�@
0x0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX
�@
0x0109 LATIN SMALL LETTER C WITH CIRCUMFLEX
�@
0x010A LATIN CAPITAL LETTER C WITH DOT ABOVE
�@
0x010B LATIN SMALL LETTER C WITH DOT ABOVE
�@
0x010C LATIN CAPITAL LETTER C WITH CARON
�@
0x010D LATIN SMALL LETTER C WITH CARON
�@
0x010E LATIN CAPITAL LETTER D WITH CARON
�@
0x010F LATIN SMALL LETTER D WITH CARON
�@
0x0110 LATIN CAPITAL LETTER D WITH STROKE
�@
0x0111 LATIN SMALL LETTER D WITH STROKE
�@
0x0112 LATIN CAPITAL LETTER E WITH MACRON
�@
0x0113 LATIN SMALL LETTER E WITH MACRON
�@
0x0116 LATIN CAPITAL LETTER E WITH DOT ABOVE
�@
0x0117 LATIN SMALL LETTER E WITH DOT ABOVE
�@
0x0118 LATIN CAPITAL LETTER E WITH OGONEK
�@
0x0119 LATIN SMALL LETTER E WITH OGONEK
�@
0x011A LATIN CAPITAL LETTER E WITH CARON
�@
0x011B LATIN SMALL LETTER E WITH CARON
�@
0x011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX
�@
0x011D LATIN SMALL LETTER G WITH CIRCUMFLEX
�@
0x011E LATIN CAPITAL LETTER G WITH BREVE
�@
0x011F LATIN SMALL LETTER G WITH BREVE
�@
0x0120 LATIN CAPITAL LETTER G WITH DOT ABOVE
�@
0x0121 LATIN SMALL LETTER G WITH DOT ABOVE
�@
0x0122 LATIN CAPITAL LETTER G WITH CEDILLA
�@
0x0123 LATIN SMALL LETTER G WITH CEDILLA
�@
0x0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX
�@
0x0125 LATIN SMALL LETTER H WITH CIRCUMFLEX
�@
0x0126 LATIN CAPITAL LETTER H WITH STROKE
�@
0x0127 LATIN SMALL LETTER H WITH STROKE
�@
0x0128 LATIN CAPITAL LETTER I WITH TILDE
�@
0x0129 LATIN SMALL LETTER I WITH TILDE
�@
0x012A LATIN CAPITAL LETTER I WITH MACRON
�@
0x012B LATIN SMALL LETTER I WITH MACRON
�@
0x012E LATIN CAPITAL LETTER I WITH OGONEK
�@
0x012F LATIN SMALL LETTER I WITH OGONEK
�@
0x0130 LATIN CAPITAL LETTER I WITH DOT ABOVE
�@
0x0131 LATIN SMALL LETTER DOTLESS I
�@
0x0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX
�@
0x0135 LATIN SMALL LETTER J WITH CIRCUMFLEX
�@
0x0136 LATIN CAPITAL LETTER K WITH CEDILLA
�@
0x0137 LATIN SMALL LETTER K WITH CEDILLA
�@
0x0138 LATIN SMALL LETTER KRA
�@
0x0139 LATIN CAPITAL LETTER L WITH ACUTE
�@
0x013A LATIN SMALL LETTER L WITH ACUTE
�@
0x013B LATIN CAPITAL LETTER L WITH CEDILLA
�@
0x013C LATIN SMALL LETTER L WITH CEDILLA
�@
0x013D LATIN CAPITAL LETTER L WITH CARON
�@
0x013E LATIN SMALL LETTER L WITH CARON
�@
0x0141 LATIN CAPITAL LETTER L WITH STROKE
�@
0x0142 LATIN SMALL LETTER L WITH STROKE
�@
0x0143 LATIN CAPITAL LETTER N WITH ACUTE
�@
0x0144 LATIN SMALL LETTER N WITH ACUTE
�@
0x0145 LATIN CAPITAL LETTER N WITH CEDILLA
�@
0x0146 LATIN SMALL LETTER N WITH CEDILLA
�@
0x0147 LATIN CAPITAL LETTER N WITH CARON
�@
0x0148 LATIN SMALL LETTER N WITH CARON
�@
0x014A LATIN CAPITAL LETTER ENG
�@
0x014B LATIN SMALL LETTER ENG
�@
0x014C LATIN CAPITAL LETTER O WITH MACRON
�@
0x014D LATIN SMALL LETTER O WITH MACRON
�@
0x0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
�@
0x0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE
�@
0x0154 LATIN CAPITAL LETTER R WITH ACUTE
�@
0x0155 LATIN SMALL LETTER R WITH ACUTE
�@
0x0156 LATIN CAPITAL LETTER R WITH CEDILLA
�@
0x0157 LATIN SMALL LETTER R WITH CEDILLA
�@
0x0158 LATIN CAPITAL LETTER R WITH CARON
�@
0x0159 LATIN SMALL LETTER R WITH CARON
�@
0x015A LATIN CAPITAL LETTER S WITH ACUTE
�@
0x015B LATIN SMALL LETTER S WITH ACUTE
�@
0x015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX
�@
0x015D LATIN SMALL LETTER S WITH CIRCUMFLEX
�@
0x015E LATIN CAPITAL LETTER S WITH CEDILLA
�@
0x015F LATIN SMALL LETTER S WITH CEDILLA
�@
0x0160 LATIN CAPITAL LETTER S WITH CARON
�@
0x0161 LATIN SMALL LETTER S WITH CARON
�@
0x0162 LATIN CAPITAL LETTER T WITH CEDILLA
�@
0x0163 LATIN SMALL LETTER T WITH CEDILLA
�@
0x0164 LATIN CAPITAL LETTER T WITH CARON
�@
0x0165 LATIN SMALL LETTER T WITH CARON
�@
0x0166 LATIN CAPITAL LETTER T WITH STROKE
�@
0x0167 LATIN SMALL LETTER T WITH STROKE
�@
0x0168 LATIN CAPITAL LETTER U WITH TILDE
�@
0x0169 LATIN SMALL LETTER U WITH TILDE
�@
0x016A LATIN CAPITAL LETTER U WITH MACRON
�@
0x016B LATIN SMALL LETTER U WITH MACRON
�@
0x016C LATIN CAPITAL LETTER U WITH BREVE
�@
0x016D LATIN SMALL LETTER U WITH BREVE
�@
0x016E LATIN CAPITAL LETTER U WITH RING ABOVE
�@
0x016F LATIN SMALL LETTER U WITH RING ABOVE
�@
0x0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
�@
0x0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE
�@
0x0172 LATIN CAPITAL LETTER U WITH OGONEK
�@
0x0173 LATIN SMALL LETTER U WITH OGONEK
�@
0x0179 LATIN CAPITAL LETTER Z WITH ACUTE
�@
0x017A LATIN SMALL LETTER Z WITH ACUTE
�@
0x017B LATIN CAPITAL LETTER Z WITH DOT ABOVE
�@
0x017C LATIN SMALL LETTER Z WITH DOT ABOVE
�@
0x017D LATIN CAPITAL LETTER Z WITH CARON
�@
0x017E LATIN SMALL LETTER Z WITH CARON
�@
0x02C7 CARON
�@
0x02D8 BREVE
�@
0x02D9 DOT ABOVE
�@
0x02DB OGONEK
�@
0x02DD DOUBLE ACUTE ACCENT
�@
`
@@ -0,0 +1,163 @@
import {
tv
} from "./chunk-UWE6H66T.mjs";
import {
groupDataFocusVisibleClasses,
hiddenInputClasses
} from "./chunk-GH5E4FQB.mjs";
// src/components/radio.ts
var radio = tv({
slots: {
base: "group relative max-w-fit inline-flex items-center justify-start cursor-pointer tap-highlight-transparent p-2 -m-2 select-none",
wrapper: [
"relative",
"inline-flex",
"items-center",
"justify-center",
"flex-shrink-0",
"overflow-hidden",
"border-solid",
"border-medium",
"box-border",
"border-default",
"rounded-full",
"group-data-[hover-unselected=true]:bg-default-100",
...groupDataFocusVisibleClasses
],
hiddenInput: hiddenInputClasses,
labelWrapper: "flex flex-col ml-1",
control: [
"z-10",
"w-2",
"h-2",
"opacity-0",
"scale-0",
"origin-center",
"rounded-full",
"group-data-[selected=true]:opacity-100",
"group-data-[selected=true]:scale-100"
],
label: "relative text-foreground select-none",
description: "relative text-foreground-400"
},
variants: {
color: {
default: {
control: "bg-default-500 text-default-foreground",
wrapper: "group-data-[selected=true]:border-default-500"
},
primary: {
control: "bg-primary text-primary-foreground",
wrapper: "group-data-[selected=true]:border-primary"
},
secondary: {
control: "bg-secondary text-secondary-foreground",
wrapper: "group-data-[selected=true]:border-secondary"
},
success: {
control: "bg-success text-success-foreground",
wrapper: "group-data-[selected=true]:border-success"
},
warning: {
control: "bg-warning text-warning-foreground",
wrapper: "group-data-[selected=true]:border-warning"
},
danger: {
control: "bg-danger text-danger-foreground",
wrapper: "group-data-[selected=true]:border-danger"
}
},
size: {
sm: {
wrapper: "w-4 h-4",
control: "w-1.5 h-1.5",
labelWrapper: "ml-1",
label: "text-small",
description: "text-tiny"
},
md: {
wrapper: "w-5 h-5",
control: "w-2 h-2",
labelWrapper: "ms-2",
label: "text-medium",
description: "text-small"
},
lg: {
wrapper: "w-6 h-6",
control: "w-2.5 h-2.5",
labelWrapper: "ms-2",
label: "text-large",
description: "text-medium"
}
},
isDisabled: {
true: {
base: "opacity-disabled pointer-events-none"
}
},
isInvalid: {
true: {
control: "bg-danger text-danger-foreground",
wrapper: "border-danger group-data-[selected=true]:border-danger",
label: "text-danger",
description: "text-danger-300"
}
},
disableAnimation: {
true: {},
false: {
wrapper: [
"group-data-[pressed=true]:scale-95",
"transition-transform-colors",
"motion-reduce:transition-none"
],
control: "transition-transform-opacity motion-reduce:transition-none",
label: "transition-colors motion-reduce:transition-none",
description: "transition-colors motion-reduce:transition-none"
}
}
},
defaultVariants: {
color: "primary",
size: "md",
isDisabled: false,
isInvalid: false
}
});
var radioGroup = tv({
slots: {
base: "relative flex flex-col gap-2",
label: "relative text-foreground-500",
wrapper: "flex flex-col flex-wrap gap-2 data-[orientation=horizontal]:flex-row",
description: "text-tiny text-foreground-400",
errorMessage: "text-tiny text-danger"
},
variants: {
isRequired: {
true: {
label: "after:content-['*'] after:text-danger after:ml-0.5"
}
},
isInvalid: {
true: {
description: "text-danger"
}
},
disableAnimation: {
true: {},
false: {
description: "transition-colors !duration-150 motion-reduce:transition-none"
}
}
},
defaultVariants: {
isInvalid: false,
isRequired: false
}
});
export {
radio,
radioGroup
};
@@ -0,0 +1,963 @@
import * as tailwind_variants from 'tailwind-variants';
import { VariantProps } from 'tailwind-variants';
import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
/**
* Input wrapper **Tailwind Variants** component
*
* @example
* ```js
* const {base, label, inputWrapper, input, clearButton, description, errorMessage} = input({...})
*
* <div className={base())}>
* <label className={label()}>Label</label>
* <div className={inputWrapper()}>
* <input className={input()}/>
* <button className={clearButton()}>Clear</button>
* </div>
* <span className={description()}>Description</span>
* <span className={errorMessage()}>Invalid input</span>
* </div>
* ```
*/
declare const input: tailwind_variants.TVReturnType<{
variant: {
flat: {
inputWrapper: string[];
};
faded: {
inputWrapper: string[];
value: string;
};
bordered: {
inputWrapper: string[];
};
underlined: {
inputWrapper: string[];
innerWrapper: string;
label: string;
};
};
color: {
default: {};
primary: {};
secondary: {};
success: {};
warning: {};
danger: {};
};
size: {
sm: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
md: {
inputWrapper: string;
input: string;
clearButton: string;
};
lg: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
};
radius: {
none: {
inputWrapper: string;
};
sm: {
inputWrapper: string;
};
md: {
inputWrapper: string;
};
lg: {
inputWrapper: string;
};
full: {
inputWrapper: string;
};
};
labelPlacement: {
outside: {
mainWrapper: string;
};
"outside-left": {
base: string;
inputWrapper: string;
mainWrapper: string;
label: string;
};
inside: {
label: string;
inputWrapper: string;
innerWrapper: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {};
};
isClearable: {
true: {
input: string;
clearButton: string[];
};
};
isDisabled: {
true: {
base: string;
inputWrapper: string;
label: string;
};
};
isInvalid: {
true: {
label: string;
input: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
inputWrapper: string;
innerWrapper: string;
input: string;
clearButton: string;
};
};
disableAnimation: {
true: {
input: string;
inputWrapper: string;
label: string;
};
false: {
inputWrapper: string;
label: string[];
clearButton: string[];
};
};
}, {
base: string;
label: string[];
mainWrapper: string;
inputWrapper: string;
innerWrapper: string;
input: string[];
clearButton: string[];
helperWrapper: string;
description: string;
errorMessage: string;
}, undefined, tailwind_variants_dist_config.TVConfig<{
variant: {
flat: {
inputWrapper: string[];
};
faded: {
inputWrapper: string[];
value: string;
};
bordered: {
inputWrapper: string[];
};
underlined: {
inputWrapper: string[];
innerWrapper: string;
label: string;
};
};
color: {
default: {};
primary: {};
secondary: {};
success: {};
warning: {};
danger: {};
};
size: {
sm: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
md: {
inputWrapper: string;
input: string;
clearButton: string;
};
lg: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
};
radius: {
none: {
inputWrapper: string;
};
sm: {
inputWrapper: string;
};
md: {
inputWrapper: string;
};
lg: {
inputWrapper: string;
};
full: {
inputWrapper: string;
};
};
labelPlacement: {
outside: {
mainWrapper: string;
};
"outside-left": {
base: string;
inputWrapper: string;
mainWrapper: string;
label: string;
};
inside: {
label: string;
inputWrapper: string;
innerWrapper: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {};
};
isClearable: {
true: {
input: string;
clearButton: string[];
};
};
isDisabled: {
true: {
base: string;
inputWrapper: string;
label: string;
};
};
isInvalid: {
true: {
label: string;
input: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
inputWrapper: string;
innerWrapper: string;
input: string;
clearButton: string;
};
};
disableAnimation: {
true: {
input: string;
inputWrapper: string;
label: string;
};
false: {
inputWrapper: string;
label: string[];
clearButton: string[];
};
};
}, {
variant: {
flat: {
inputWrapper: string[];
};
faded: {
inputWrapper: string[];
value: string;
};
bordered: {
inputWrapper: string[];
};
underlined: {
inputWrapper: string[];
innerWrapper: string;
label: string;
};
};
color: {
default: {};
primary: {};
secondary: {};
success: {};
warning: {};
danger: {};
};
size: {
sm: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
md: {
inputWrapper: string;
input: string;
clearButton: string;
};
lg: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
};
radius: {
none: {
inputWrapper: string;
};
sm: {
inputWrapper: string;
};
md: {
inputWrapper: string;
};
lg: {
inputWrapper: string;
};
full: {
inputWrapper: string;
};
};
labelPlacement: {
outside: {
mainWrapper: string;
};
"outside-left": {
base: string;
inputWrapper: string;
mainWrapper: string;
label: string;
};
inside: {
label: string;
inputWrapper: string;
innerWrapper: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {};
};
isClearable: {
true: {
input: string;
clearButton: string[];
};
};
isDisabled: {
true: {
base: string;
inputWrapper: string;
label: string;
};
};
isInvalid: {
true: {
label: string;
input: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
inputWrapper: string;
innerWrapper: string;
input: string;
clearButton: string;
};
};
disableAnimation: {
true: {
input: string;
inputWrapper: string;
label: string;
};
false: {
inputWrapper: string;
label: string[];
clearButton: string[];
};
};
}>, {
variant: {
flat: {
inputWrapper: string[];
};
faded: {
inputWrapper: string[];
value: string;
};
bordered: {
inputWrapper: string[];
};
underlined: {
inputWrapper: string[];
innerWrapper: string;
label: string;
};
};
color: {
default: {};
primary: {};
secondary: {};
success: {};
warning: {};
danger: {};
};
size: {
sm: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
md: {
inputWrapper: string;
input: string;
clearButton: string;
};
lg: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
};
radius: {
none: {
inputWrapper: string;
};
sm: {
inputWrapper: string;
};
md: {
inputWrapper: string;
};
lg: {
inputWrapper: string;
};
full: {
inputWrapper: string;
};
};
labelPlacement: {
outside: {
mainWrapper: string;
};
"outside-left": {
base: string;
inputWrapper: string;
mainWrapper: string;
label: string;
};
inside: {
label: string;
inputWrapper: string;
innerWrapper: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {};
};
isClearable: {
true: {
input: string;
clearButton: string[];
};
};
isDisabled: {
true: {
base: string;
inputWrapper: string;
label: string;
};
};
isInvalid: {
true: {
label: string;
input: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
inputWrapper: string;
innerWrapper: string;
input: string;
clearButton: string;
};
};
disableAnimation: {
true: {
input: string;
inputWrapper: string;
label: string;
};
false: {
inputWrapper: string;
label: string[];
clearButton: string[];
};
};
}, {
base: string;
label: string[];
mainWrapper: string;
inputWrapper: string;
innerWrapper: string;
input: string[];
clearButton: string[];
helperWrapper: string;
description: string;
errorMessage: string;
}, tailwind_variants.TVReturnType<{
variant: {
flat: {
inputWrapper: string[];
};
faded: {
inputWrapper: string[];
value: string;
};
bordered: {
inputWrapper: string[];
};
underlined: {
inputWrapper: string[];
innerWrapper: string;
label: string;
};
};
color: {
default: {};
primary: {};
secondary: {};
success: {};
warning: {};
danger: {};
};
size: {
sm: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
md: {
inputWrapper: string;
input: string;
clearButton: string;
};
lg: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
};
radius: {
none: {
inputWrapper: string;
};
sm: {
inputWrapper: string;
};
md: {
inputWrapper: string;
};
lg: {
inputWrapper: string;
};
full: {
inputWrapper: string;
};
};
labelPlacement: {
outside: {
mainWrapper: string;
};
"outside-left": {
base: string;
inputWrapper: string;
mainWrapper: string;
label: string;
};
inside: {
label: string;
inputWrapper: string;
innerWrapper: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {};
};
isClearable: {
true: {
input: string;
clearButton: string[];
};
};
isDisabled: {
true: {
base: string;
inputWrapper: string;
label: string;
};
};
isInvalid: {
true: {
label: string;
input: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
inputWrapper: string;
innerWrapper: string;
input: string;
clearButton: string;
};
};
disableAnimation: {
true: {
input: string;
inputWrapper: string;
label: string;
};
false: {
inputWrapper: string;
label: string[];
clearButton: string[];
};
};
}, {
base: string;
label: string[];
mainWrapper: string;
inputWrapper: string;
innerWrapper: string;
input: string[];
clearButton: string[];
helperWrapper: string;
description: string;
errorMessage: string;
}, undefined, tailwind_variants_dist_config.TVConfig<{
variant: {
flat: {
inputWrapper: string[];
};
faded: {
inputWrapper: string[];
value: string;
};
bordered: {
inputWrapper: string[];
};
underlined: {
inputWrapper: string[];
innerWrapper: string;
label: string;
};
};
color: {
default: {};
primary: {};
secondary: {};
success: {};
warning: {};
danger: {};
};
size: {
sm: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
md: {
inputWrapper: string;
input: string;
clearButton: string;
};
lg: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
};
radius: {
none: {
inputWrapper: string;
};
sm: {
inputWrapper: string;
};
md: {
inputWrapper: string;
};
lg: {
inputWrapper: string;
};
full: {
inputWrapper: string;
};
};
labelPlacement: {
outside: {
mainWrapper: string;
};
"outside-left": {
base: string;
inputWrapper: string;
mainWrapper: string;
label: string;
};
inside: {
label: string;
inputWrapper: string;
innerWrapper: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {};
};
isClearable: {
true: {
input: string;
clearButton: string[];
};
};
isDisabled: {
true: {
base: string;
inputWrapper: string;
label: string;
};
};
isInvalid: {
true: {
label: string;
input: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
inputWrapper: string;
innerWrapper: string;
input: string;
clearButton: string;
};
};
disableAnimation: {
true: {
input: string;
inputWrapper: string;
label: string;
};
false: {
inputWrapper: string;
label: string[];
clearButton: string[];
};
};
}, {
variant: {
flat: {
inputWrapper: string[];
};
faded: {
inputWrapper: string[];
value: string;
};
bordered: {
inputWrapper: string[];
};
underlined: {
inputWrapper: string[];
innerWrapper: string;
label: string;
};
};
color: {
default: {};
primary: {};
secondary: {};
success: {};
warning: {};
danger: {};
};
size: {
sm: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
md: {
inputWrapper: string;
input: string;
clearButton: string;
};
lg: {
label: string;
inputWrapper: string;
input: string;
clearButton: string;
};
};
radius: {
none: {
inputWrapper: string;
};
sm: {
inputWrapper: string;
};
md: {
inputWrapper: string;
};
lg: {
inputWrapper: string;
};
full: {
inputWrapper: string;
};
};
labelPlacement: {
outside: {
mainWrapper: string;
};
"outside-left": {
base: string;
inputWrapper: string;
mainWrapper: string;
label: string;
};
inside: {
label: string;
inputWrapper: string;
innerWrapper: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {};
};
isClearable: {
true: {
input: string;
clearButton: string[];
};
};
isDisabled: {
true: {
base: string;
inputWrapper: string;
label: string;
};
};
isInvalid: {
true: {
label: string;
input: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
inputWrapper: string;
innerWrapper: string;
input: string;
clearButton: string;
};
};
disableAnimation: {
true: {
input: string;
inputWrapper: string;
label: string;
};
false: {
inputWrapper: string;
label: string[];
clearButton: string[];
};
};
}>, unknown, unknown, undefined>>;
type InputVariantProps = VariantProps<typeof input>;
type InputSlots = keyof ReturnType<typeof input>;
export { InputSlots, InputVariantProps, input };
@@ -0,0 +1,214 @@
# Empty stylesheets
/* Just a comment */
==>
StyleSheet(Comment)
# Import statements
@import url("fineprint.css") print;
@import url("bluish.css") speech;
@import 'custom.css';
@import url("chrome://communicator/skin/");
@import "common.css" screen;
@import "reset.css" layer(framework.component);
@import "components.css" layer screen;
==>
StyleSheet(
ImportStatement(import,CallLiteral(CallTag,StringLiteral),KeywordQuery),
ImportStatement(import,CallLiteral(CallTag,StringLiteral),KeywordQuery),
ImportStatement(import,StringLiteral),
ImportStatement(import,CallLiteral(CallTag,StringLiteral)),
ImportStatement(import,StringLiteral,KeywordQuery),
ImportStatement(import,StringLiteral,Layer(layer,LayerName,LayerName)),
ImportStatement(import,StringLiteral,Layer(layer),KeywordQuery))
# Namespace statements
/* Default namespace */
@namespace url(XML-namespace-URL);
@namespace "XML-namespace-URL";
@namespace url(http://www.w3.org/1999/xhtml);
@namespace svg url(http://www.w3.org/2000/svg);
/* Prefixed namespace */
@namespace prefix url(XML-namespace-URL);
@namespace prefix "XML-namespace-URL";
==>
StyleSheet(
Comment,
NamespaceStatement(namespace,CallLiteral(CallTag,ParenthesizedContent)),
NamespaceStatement(namespace,StringLiteral),
NamespaceStatement(namespace,CallLiteral(CallTag,ParenthesizedContent)),
NamespaceStatement(namespace,NamespaceName,CallLiteral(CallTag,ParenthesizedContent)),
Comment,
NamespaceStatement(namespace,NamespaceName,CallLiteral(CallTag,ParenthesizedContent)),
NamespaceStatement(namespace,NamespaceName,StringLiteral))
# Keyframes statements
@keyframes important1 {
from { margin-top: 50px; }
50%, 60% { margin-top: 150px !important; } /* ignored */
to { margin-top: 100px; }
}
==>
StyleSheet(KeyframesStatement(keyframes,KeyframeName,KeyframeList(
KeyframeSelector(KeyframeRangeName),Block(Declaration(PropertyName,NumberLiteral(Unit))),
KeyframeSelector(NumberLiteral(Unit)),KeyframeSelector(NumberLiteral(Unit)),Block(
Declaration(PropertyName,NumberLiteral(Unit),Important)),
Comment,
KeyframeSelector(KeyframeRangeName),Block(Declaration(PropertyName,NumberLiteral(Unit))))))
# Keyframes statements with range
@keyframes anim-1 {
entry 0% { margin-top: 50px; }
entry 100% { margin-top: 50px; }
exit 0% { margin-top: 50px; }
exit 100% { margin-top: 50px; }
}
==>
StyleSheet(KeyframesStatement(keyframes,KeyframeName,KeyframeList(
KeyframeSelector(KeyframeRangeName,NumberLiteral(Unit)),Block(Declaration(PropertyName,NumberLiteral(Unit))),
KeyframeSelector(KeyframeRangeName,NumberLiteral(Unit)),Block(Declaration(PropertyName,NumberLiteral(Unit))),
KeyframeSelector(KeyframeRangeName,NumberLiteral(Unit)),Block(Declaration(PropertyName,NumberLiteral(Unit))),
KeyframeSelector(KeyframeRangeName,NumberLiteral(Unit)),Block(Declaration(PropertyName,NumberLiteral(Unit))))))
# Keyframes statements with range and multiple keyframe selectors
@keyframes fade-in-out-animation {
entry 0%, exit 100% { opacity: 0 }
entry 100%, exit 0% { opacity: 1 }
}
==>
StyleSheet(KeyframesStatement(keyframes,KeyframeName,KeyframeList(
KeyframeSelector(KeyframeRangeName,NumberLiteral(Unit)),KeyframeSelector(KeyframeRangeName,NumberLiteral(Unit)),Block(
Declaration(PropertyName,NumberLiteral)),
KeyframeSelector(KeyframeRangeName,NumberLiteral(Unit)),KeyframeSelector(KeyframeRangeName,NumberLiteral(Unit)),Block(
Declaration(PropertyName,NumberLiteral)))))
# Media statements
@media screen and (min-width: 30em) and (orientation: landscape) {}
@media (min-height: 680px), screen and (orientation: portrait) {}
@media not all and (monochrome) {}
@media only screen {}
@media (10em <= width < 30em) {}
==>
StyleSheet(
MediaStatement(media,BinaryQuery(BinaryQuery(KeywordQuery,LogicOp,FeatureQuery(FeatureName,NumberLiteral(Unit))),LogicOp,
FeatureQuery(FeatureName,ValueName)),Block),
MediaStatement(media,FeatureQuery(FeatureName,NumberLiteral(Unit)),BinaryQuery(KeywordQuery,LogicOp,FeatureQuery(FeatureName,ValueName)),Block),
MediaStatement(media,UnaryQuery(UnaryQueryOp,BinaryQuery(KeywordQuery,LogicOp,ParenthesizedQuery(KeywordQuery))),Block),
MediaStatement(media,UnaryQuery(UnaryQueryOp,KeywordQuery),Block),
MediaStatement(media,ComparisonQuery(NumberLiteral(Unit),CompareOp,FeatureName,CompareOp,NumberLiteral(Unit)),Block))
# Supports statements
@supports (animation-name: test) {
div { animation-name: test; }
}
@supports (transform-style: preserve) or (-moz-transform-style: preserve) {}
@supports not ((text-align-last: justify) or (-moz-text-align-last: justify)) {}
@supports not selector(:matches(a, b)) {}
==>
StyleSheet(
SupportsStatement(supports,FeatureQuery(FeatureName,ValueName),Block(RuleSet(TagSelector(TagName),Block(Declaration(PropertyName,ValueName))))),
SupportsStatement(supports,BinaryQuery(FeatureQuery(FeatureName,ValueName),LogicOp,FeatureQuery(FeatureName,ValueName)),Block),
SupportsStatement(supports,UnaryQuery(UnaryQueryOp,ParenthesizedQuery(
BinaryQuery(FeatureQuery(FeatureName,ValueName),LogicOp,FeatureQuery(FeatureName,ValueName)))),Block),
SupportsStatement(supports,UnaryQuery(UnaryQueryOp,SelectorQuery(selector,ParenthesizedSelector(PseudoClassSelector(PseudoClassName,ArgList(TagSelector(TagName),TagSelector(TagName)))))),Block))
# Charset statements
@charset "utf-8";
==>
StyleSheet(CharsetStatement(charset,StringLiteral))
# Other at-statements
@font-face {
font-family: "Open Sans";
src: url("/a") format("woff2"), url("/b/c") format("woff");
}
==>
StyleSheet(AtRule(AtKeyword,Block(
Declaration(PropertyName,StringLiteral),
Declaration(PropertyName,CallLiteral(CallTag,StringLiteral),CallExpression(Callee,ArgList(StringLiteral)),
CallLiteral(CallTag,StringLiteral),CallExpression(Callee,ArgList(StringLiteral))))))
# Unterminated Comment
p {}
/*
div {}
==>
StyleSheet(RuleSet(TagSelector(TagName),Block),Comment)
# Escaped identifiers
#foo\ bar {
--weird\\var: 5px;
width: var(--weird\\var);
c\6f lor: b\6c ue;
}
==>
StyleSheet(RuleSet(IdSelector(IdName),Block(
Declaration(VariableName,NumberLiteral(Unit)),
Declaration(PropertyName,CallExpression(Callee,ArgList(VariableName))),
Declaration(PropertyName, ValueName))))
# Scope
@scope { .x {} }
@scope (div) {}
@scope (.a) to (.b) {}
==>
StyleSheet(
ScopeStatement(scope,Block(RuleSet(ClassSelector(ClassName),Block))),
ScopeStatement(scope,ParenthesizedSelector(TagSelector(TagName)),Block),
ScopeStatement(scope,ParenthesizedSelector(ClassSelector(ClassName)),to,ParenthesizedSelector(ClassSelector(ClassName)),Block))
# If Expressions
p {
background-color: if(
style(--color: white): black;
supports(foo: bar): red;
else: pink
);
}
==>
StyleSheet(RuleSet(TagSelector(TagName),Block(
Declaration(PropertyName,IfExpression(if,ArgList(
IfBranch(CallQuery(QueryCallee,ArgList(FeatureName,ValueName)),ValueName),
IfBranch(CallQuery(QueryCallee,ArgList(FeatureName,ValueName)),ValueName),
IfBranch(KeywordQuery,ValueName)))))))
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"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:{"2":"xC TC J ZB K D 0C 1C","132":"6 7 8 9 E F A B C L M G N O P aB 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 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","450":"0 1 2 3 4 5 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"},D:{"2":"0 1 2 3 4 5 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 dB eB fB gB hB iB jB kB lB 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","66":"mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 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"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB 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 FD GD HD ID NC uC JD OC","66":"gB hB iB jB kB lB mB nB oB pB qB rB"},G:{"2":"E ZC KD vC LD MD ND 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"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"2":"I"},M:{"450":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"2":"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:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:7,C:"Context menu item (menuitem element)",D:true};
@@ -0,0 +1,3 @@
import type { FirstArgument, Transform } from '@dnd-kit/utilities';
import type { Modifiers, Modifier } from './types';
export declare function applyModifiers(modifiers: Modifiers | undefined, { transform, ...args }: FirstArgument<Modifier>): Transform;
@@ -0,0 +1,275 @@
// Note: since nyc uses this module to output coverage, any lines
// that are in the direct sync flow of nyc's outputCoverage are
// ignored, since we can never get coverage for them.
// grab a reference to node's real process object right away
import { signals } from './signals.js';
export { signals };
const processOk = (process) => !!process &&
typeof process === 'object' &&
typeof process.removeListener === 'function' &&
typeof process.emit === 'function' &&
typeof process.reallyExit === 'function' &&
typeof process.listeners === 'function' &&
typeof process.kill === 'function' &&
typeof process.pid === 'number' &&
typeof process.on === 'function';
const kExitEmitter = Symbol.for('signal-exit emitter');
const global = globalThis;
const ObjectDefineProperty = Object.defineProperty.bind(Object);
// teeny special purpose ee
class Emitter {
emitted = {
afterExit: false,
exit: false,
};
listeners = {
afterExit: [],
exit: [],
};
count = 0;
id = Math.random();
constructor() {
if (global[kExitEmitter]) {
return global[kExitEmitter];
}
ObjectDefineProperty(global, kExitEmitter, {
value: this,
writable: false,
enumerable: false,
configurable: false,
});
}
on(ev, fn) {
this.listeners[ev].push(fn);
}
removeListener(ev, fn) {
const list = this.listeners[ev];
const i = list.indexOf(fn);
/* c8 ignore start */
if (i === -1) {
return;
}
/* c8 ignore stop */
if (i === 0 && list.length === 1) {
list.length = 0;
}
else {
list.splice(i, 1);
}
}
emit(ev, code, signal) {
if (this.emitted[ev]) {
return false;
}
this.emitted[ev] = true;
let ret = false;
for (const fn of this.listeners[ev]) {
ret = fn(code, signal) === true || ret;
}
if (ev === 'exit') {
ret = this.emit('afterExit', code, signal) || ret;
}
return ret;
}
}
class SignalExitBase {
}
const signalExitWrap = (handler) => {
return {
onExit(cb, opts) {
return handler.onExit(cb, opts);
},
load() {
return handler.load();
},
unload() {
return handler.unload();
},
};
};
class SignalExitFallback extends SignalExitBase {
onExit() {
return () => { };
}
load() { }
unload() { }
}
class SignalExit extends SignalExitBase {
// "SIGHUP" throws an `ENOSYS` error on Windows,
// so use a supported signal instead
/* c8 ignore start */
#hupSig = process.platform === 'win32' ? 'SIGINT' : 'SIGHUP';
/* c8 ignore stop */
#emitter = new Emitter();
#process;
#originalProcessEmit;
#originalProcessReallyExit;
#sigListeners = {};
#loaded = false;
constructor(process) {
super();
this.#process = process;
// { <signal>: <listener fn>, ... }
this.#sigListeners = {};
for (const sig of signals) {
this.#sigListeners[sig] = () => {
// If there are no other listeners, an exit is coming!
// Simplest way: remove us and then re-send the signal.
// We know that this will kill the process, so we can
// safely emit now.
const listeners = this.#process.listeners(sig);
let { count } = this.#emitter;
// This is a workaround for the fact that signal-exit v3 and signal
// exit v4 are not aware of each other, and each will attempt to let
// the other handle it, so neither of them do. To correct this, we
// detect if we're the only handler *except* for previous versions
// of signal-exit, and increment by the count of listeners it has
// created.
/* c8 ignore start */
const p = process;
if (typeof p.__signal_exit_emitter__ === 'object' &&
typeof p.__signal_exit_emitter__.count === 'number') {
count += p.__signal_exit_emitter__.count;
}
/* c8 ignore stop */
if (listeners.length === count) {
this.unload();
const ret = this.#emitter.emit('exit', null, sig);
/* c8 ignore start */
const s = sig === 'SIGHUP' ? this.#hupSig : sig;
if (!ret)
process.kill(process.pid, s);
/* c8 ignore stop */
}
};
}
this.#originalProcessReallyExit = process.reallyExit;
this.#originalProcessEmit = process.emit;
}
onExit(cb, opts) {
/* c8 ignore start */
if (!processOk(this.#process)) {
return () => { };
}
/* c8 ignore stop */
if (this.#loaded === false) {
this.load();
}
const ev = opts?.alwaysLast ? 'afterExit' : 'exit';
this.#emitter.on(ev, cb);
return () => {
this.#emitter.removeListener(ev, cb);
if (this.#emitter.listeners['exit'].length === 0 &&
this.#emitter.listeners['afterExit'].length === 0) {
this.unload();
}
};
}
load() {
if (this.#loaded) {
return;
}
this.#loaded = true;
// This is the number of onSignalExit's that are in play.
// It's important so that we can count the correct number of
// listeners on signals, and don't wait for the other one to
// handle it instead of us.
this.#emitter.count += 1;
for (const sig of signals) {
try {
const fn = this.#sigListeners[sig];
if (fn)
this.#process.on(sig, fn);
}
catch (_) { }
}
this.#process.emit = (ev, ...a) => {
return this.#processEmit(ev, ...a);
};
this.#process.reallyExit = (code) => {
return this.#processReallyExit(code);
};
}
unload() {
if (!this.#loaded) {
return;
}
this.#loaded = false;
signals.forEach(sig => {
const listener = this.#sigListeners[sig];
/* c8 ignore start */
if (!listener) {
throw new Error('Listener not defined for signal: ' + sig);
}
/* c8 ignore stop */
try {
this.#process.removeListener(sig, listener);
/* c8 ignore start */
}
catch (_) { }
/* c8 ignore stop */
});
this.#process.emit = this.#originalProcessEmit;
this.#process.reallyExit = this.#originalProcessReallyExit;
this.#emitter.count -= 1;
}
#processReallyExit(code) {
/* c8 ignore start */
if (!processOk(this.#process)) {
return 0;
}
this.#process.exitCode = code || 0;
/* c8 ignore stop */
this.#emitter.emit('exit', this.#process.exitCode, null);
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
}
#processEmit(ev, ...args) {
const og = this.#originalProcessEmit;
if (ev === 'exit' && processOk(this.#process)) {
if (typeof args[0] === 'number') {
this.#process.exitCode = args[0];
/* c8 ignore start */
}
/* c8 ignore start */
const ret = og.call(this.#process, ev, ...args);
/* c8 ignore start */
this.#emitter.emit('exit', this.#process.exitCode, null);
/* c8 ignore stop */
return ret;
}
else {
return og.call(this.#process, ev, ...args);
}
}
}
const process = globalThis.process;
// wrap so that we call the method on the actual handler, without
// exporting it directly.
export const {
/**
* Called when the process is exiting, whether via signal, explicit
* exit, or running out of stuff to do.
*
* If the global process object is not suitable for instrumentation,
* then this will be a no-op.
*
* Returns a function that may be used to unload signal-exit.
*/
onExit,
/**
* Load the listeners. Likely you never need to call this, unless
* doing a rather deep integration with signal-exit functionality.
* Mostly exposed for the benefit of testing.
*
* @internal
*/
load,
/**
* Unload the listeners. Likely you never need to call this, unless
* doing a rather deep integration with signal-exit functionality.
* Mostly exposed for the benefit of testing.
*
* @internal
*/
unload, } = signalExitWrap(processOk(process) ? new SignalExit(process) : new SignalExitFallback());
//# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
import * as _heroui_system from '@heroui/system';
import { HTMLHeroUIProps } from '@heroui/system';
declare const CardBody: _heroui_system.InternalForwardRefRenderFunction<"div", HTMLHeroUIProps<"div", never>, never>;
export { CardBody as default };
@@ -0,0 +1 @@
{"version":3,"file":"MultipleInjectionResolvedValueElementMetadata.js","sourceRoot":"","sources":["../../../../src/metadata/models/MultipleInjectionResolvedValueElementMetadata.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from '../types.js';
import 'react';
declare const VolumeLowBoldIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { VolumeLowBoldIcon };
@@ -0,0 +1,86 @@
// Ported from https://github.com/mafintosh/end-of-stream with
// permission from the author, Mathias Buus (@mafintosh).
'use strict';
var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;
function once(callback) {
var called = false;
return function () {
if (called) return;
called = true;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
callback.apply(this, args);
};
}
function noop() {}
function isRequest(stream) {
return stream.setHeader && typeof stream.abort === 'function';
}
function eos(stream, opts, callback) {
if (typeof opts === 'function') return eos(stream, null, opts);
if (!opts) opts = {};
callback = once(callback || noop);
var readable = opts.readable || opts.readable !== false && stream.readable;
var writable = opts.writable || opts.writable !== false && stream.writable;
var onlegacyfinish = function onlegacyfinish() {
if (!stream.writable) onfinish();
};
var writableEnded = stream._writableState && stream._writableState.finished;
var onfinish = function onfinish() {
writable = false;
writableEnded = true;
if (!readable) callback.call(stream);
};
var readableEnded = stream._readableState && stream._readableState.endEmitted;
var onend = function onend() {
readable = false;
readableEnded = true;
if (!writable) callback.call(stream);
};
var onerror = function onerror(err) {
callback.call(stream, err);
};
var onclose = function onclose() {
var err;
if (readable && !readableEnded) {
if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
return callback.call(stream, err);
}
if (writable && !writableEnded) {
if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
return callback.call(stream, err);
}
};
var onrequest = function onrequest() {
stream.req.on('finish', onfinish);
};
if (isRequest(stream)) {
stream.on('complete', onfinish);
stream.on('abort', onclose);
if (stream.req) onrequest();else stream.on('request', onrequest);
} else if (writable && !stream._writableState) {
// legacy streams
stream.on('end', onlegacyfinish);
stream.on('close', onlegacyfinish);
}
stream.on('end', onend);
stream.on('finish', onfinish);
if (opts.error !== false) stream.on('error', onerror);
stream.on('close', onclose);
return function () {
stream.removeListener('complete', onfinish);
stream.removeListener('abort', onclose);
stream.removeListener('request', onrequest);
if (stream.req) stream.req.removeListener('finish', onfinish);
stream.removeListener('end', onlegacyfinish);
stream.removeListener('close', onlegacyfinish);
stream.removeListener('finish', onfinish);
stream.removeListener('end', onend);
stream.removeListener('error', onerror);
stream.removeListener('close', onclose);
};
}
module.exports = eos;
@@ -0,0 +1,35 @@
import {Except} from './except';
/**
Create a type that requires at least one of the given keys. The remaining keys are kept as is.
@example
```
import {RequireAtLeastOne} from 'type-fest';
type Responder = {
text?: () => string;
json?: () => string;
secure?: boolean;
};
const responder: RequireAtLeastOne<Responder, 'text' | 'json'> = {
json: () => '{"message": "ok"}',
secure: true
};
```
@category Utilities
*/
export type RequireAtLeastOne<
ObjectType,
KeysType extends keyof ObjectType = keyof ObjectType
> = {
// For each `Key` in `KeysType` make a mapped type:
[Key in KeysType]-?: Required<Pick<ObjectType, Key>> & // 1. Make `Key`'s type required
// 2. Make all other keys in `KeysType` optional
Partial<Pick<ObjectType, Exclude<KeysType, Key>>>;
}[KeysType] &
// 3. Add the remaining keys not in `KeysType`
Except<ObjectType, KeysType>;
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "es2015",
"module": "node16",
"declaration": true,
"outDir": "./es6",
"lib": ["es2016", "es5"]
},
"include": ["src"],
"exclude": ["node_modules"]
}
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var MarqueeRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'marquee'
}
}, {
module: 'HTML',
concept: {
name: 'marquee'
}
}],
type: 'structure'
};
var _default = MarqueeRole;
exports.default = _default;
@@ -0,0 +1,16 @@
ISC License
Copyright 2021 (c) npm, Inc.
Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,16 @@
var $d021d50e6b315ebb$exports = {};
$d021d50e6b315ebb$exports = {
"ascending": `\u{6607}\u{9806}`,
"ascendingSort": (args)=>`\u{5217} ${args.columnName} \u{3092}\u{6607}\u{9806}\u{3067}\u{4E26}\u{3079}\u{66FF}\u{3048}`,
"columnSize": (args)=>`${args.value} \u{30D4}\u{30AF}\u{30BB}\u{30EB}`,
"descending": `\u{964D}\u{9806}`,
"descendingSort": (args)=>`\u{5217} ${args.columnName} \u{3092}\u{964D}\u{9806}\u{3067}\u{4E26}\u{3079}\u{66FF}\u{3048}`,
"resizerDescription": `Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{30B5}\u{30A4}\u{30BA}\u{5909}\u{66F4}\u{3092}\u{958B}\u{59CB}`,
"select": `\u{9078}\u{629E}`,
"selectAll": `\u{3059}\u{3079}\u{3066}\u{9078}\u{629E}`,
"sortable": `\u{4E26}\u{3079}\u{66FF}\u{3048}\u{53EF}\u{80FD}\u{306A}\u{5217}`
};
export {$d021d50e6b315ebb$exports as default};
//# sourceMappingURL=ja-JP.module.js.map
@@ -0,0 +1,49 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
interface ObjectConstructor {
/**
* Returns an array of values of the enumerable own properties of an object
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
*/
values<T>(o: { [s: string]: T; } | ArrayLike<T>): T[];
/**
* Returns an array of values of the enumerable own properties of an object
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
*/
values(o: {}): any[];
/**
* Returns an array of key/values of the enumerable own properties of an object
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
*/
entries<T>(o: { [s: string]: T; } | ArrayLike<T>): [string, T][];
/**
* Returns an array of key/values of the enumerable own properties of an object
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
*/
entries(o: {}): [string, any][];
/**
* Returns an object containing all own property descriptors of an object
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object.
*/
getOwnPropertyDescriptors<T>(o: T): { [P in keyof T]: TypedPropertyDescriptor<T[P]>; } & { [x: string]: PropertyDescriptor; };
}
@@ -0,0 +1,196 @@
# levn [![Build Status](https://travis-ci.org/gkz/levn.png)](https://travis-ci.org/gkz/levn) <a name="levn" />
__Light ECMAScript (JavaScript) Value Notation__
Levn is a library which allows you to parse a string into a JavaScript value based on an expected type. It is meant for short amounts of human entered data (eg. config files, command line arguments).
Levn aims to concisely describe JavaScript values in text, and allow for the extraction and validation of those values. Levn uses [type-check](https://github.com/gkz/type-check) for its type format, and to validate the results. MIT license. Version 0.4.1.
__How is this different than JSON?__ levn is meant to be written by humans only, is (due to the previous point) much more concise, can be validated against supplied types, has regex and date literals, and can easily be extended with custom types. On the other hand, it is probably slower and thus less efficient at transporting large amounts of data, which is fine since this is not its purpose.
npm install levn
For updates on levn, [follow me on twitter](https://twitter.com/gkzahariev).
## Quick Examples
```js
var parse = require('levn').parse;
parse('Number', '2'); // 2
parse('String', '2'); // '2'
parse('String', 'levn'); // 'levn'
parse('String', 'a b'); // 'a b'
parse('Boolean', 'true'); // true
parse('Date', '#2011-11-11#'); // (Date object)
parse('Date', '2011-11-11'); // (Date object)
parse('RegExp', '/[a-z]/gi'); // /[a-z]/gi
parse('RegExp', 're'); // /re/
parse('Int', '2'); // 2
parse('Number | String', 'str'); // 'str'
parse('Number | String', '2'); // 2
parse('[Number]', '[1,2,3]'); // [1,2,3]
parse('(String, Boolean)', '(hi, false)'); // ['hi', false]
parse('{a: String, b: Number}', '{a: str, b: 2}'); // {a: 'str', b: 2}
// at the top level, you can ommit surrounding delimiters
parse('[Number]', '1,2,3'); // [1,2,3]
parse('(String, Boolean)', 'hi, false'); // ['hi', false]
parse('{a: String, b: Number}', 'a: str, b: 2'); // {a: 'str', b: 2}
// wildcard - auto choose type
parse('*', '[hi,(null,[42]),{k: true}]'); // ['hi', [null, [42]], {k: true}]
```
## Usage
`require('levn');` returns an object that exposes three properties. `VERSION` is the current version of the library as a string. `parse` and `parsedTypeParse` are functions.
```js
// parse(type, input, options);
parse('[Number]', '1,2,3'); // [1, 2, 3]
// parsedTypeParse(parsedType, input, options);
var parsedType = require('type-check').parseType('[Number]');
parsedTypeParse(parsedType, '1,2,3'); // [1, 2, 3]
```
### parse(type, input, options)
`parse` casts the string `input` into a JavaScript value according to the specified `type` in the [type format](https://github.com/gkz/type-check#type-format) (and taking account the optional `options`) and returns the resulting JavaScript value.
##### arguments
* type - `String` - the type written in the [type format](https://github.com/gkz/type-check#type-format) which to check against
* input - `String` - the value written in the [levn format](#levn-format)
* options - `Maybe Object` - an optional parameter specifying additional [options](#options)
##### returns
`*` - the resulting JavaScript value
##### example
```js
parse('[Number]', '1,2,3'); // [1, 2, 3]
```
### parsedTypeParse(parsedType, input, options)
`parsedTypeParse` casts the string `input` into a JavaScript value according to the specified `type` which has already been parsed (and taking account the optional `options`) and returns the resulting JavaScript value. You can parse a type using the [type-check](https://github.com/gkz/type-check) library's `parseType` function.
##### arguments
* type - `Object` - the type in the parsed type format which to check against
* input - `String` - the value written in the [levn format](#levn-format)
* options - `Maybe Object` - an optional parameter specifying additional [options](#options)
##### returns
`*` - the resulting JavaScript value
##### example
```js
var parsedType = require('type-check').parseType('[Number]');
parsedTypeParse(parsedType, '1,2,3'); // [1, 2, 3]
```
## Levn Format
Levn can use the type information you provide to choose the appropriate value to produce from the input. For the same input, it will choose a different output value depending on the type provided. For example, `parse('Number', '2')` will produce the number `2`, but `parse('String', '2')` will produce the string `"2"`.
If you do not provide type information, and simply use `*`, levn will parse the input according the unambiguous "explicit" mode, which we will now detail - you can also set the `explicit` option to true manually in the [options](#options).
* `"string"`, `'string'` are parsed as a String, eg. `"a msg"` is `"a msg"`
* `#date#` is parsed as a Date, eg. `#2011-11-11#` is `new Date('2011-11-11')`
* `/regexp/flags` is parsed as a RegExp, eg. `/re/gi` is `/re/gi`
* `undefined`, `null`, `NaN`, `true`, and `false` are all their JavaScript equivalents
* `[element1, element2, etc]` is an Array, and the casting procedure is recursively applied to each element. Eg. `[1,2,3]` is `[1,2,3]`.
* `(element1, element2, etc)` is an tuple, and the casting procedure is recursively applied to each element. Eg. `(1, a)` is `(1, a)` (is `[1, 'a']`).
* `{key1: val1, key2: val2, ...}` is an Object, and the casting procedure is recursively applied to each property. Eg. `{a: 1, b: 2}` is `{a: 1, b: 2}`.
* Any test which does not fall under the above, and which does not contain special characters (`[``]``(``)``{``}``:``,`) is a string, eg. `$12- blah` is `"$12- blah"`.
If you do provide type information, you can make your input more concise as the program already has some information about what it expects. Please see the [type format](https://github.com/gkz/type-check#type-format) section of [type-check](https://github.com/gkz/type-check) for more information about how to specify types. There are some rules about what levn can do with the information:
* If a String is expected, and only a String, all characters of the input (including any special ones) will become part of the output. Eg. `[({})]` is `"[({})]"`, and `"hi"` is `'"hi"'`.
* If a Date is expected, the surrounding `#` can be omitted from date literals. Eg. `2011-11-11` is `new Date('2011-11-11')`.
* If a RegExp is expected, no flags need to be specified, and the regex is not using any of the special characters,the opening and closing `/` can be omitted - this will have the affect of setting the source of the regex to the input. Eg. `regex` is `/regex/`.
* If an Array is expected, and it is the root node (at the top level), the opening `[` and closing `]` can be omitted. Eg. `1,2,3` is `[1,2,3]`.
* If a tuple is expected, and it is the root node (at the top level), the opening `(` and closing `)` can be omitted. Eg. `1, a` is `(1, a)` (is `[1, 'a']`).
* If an Object is expected, and it is the root node (at the top level), the opening `{` and closing `}` can be omitted. Eg `a: 1, b: 2` is `{a: 1, b: 2}`.
If you list multiple types (eg. `Number | String`), it will first attempt to cast to the first type and then validate - if the validation fails it will move on to the next type and so forth, left to right. You must be careful as some types will succeed with any input, such as String. Thus put String at the end of your list. In non-explicit mode, Date and RegExp will succeed with a large variety of input - also be careful with these and list them near the end if not last in your list.
Whitespace between special characters and elements is inconsequential.
## Options
Options is an object. It is an optional parameter to the `parse` and `parsedTypeParse` functions.
### Explicit
A `Boolean`. By default it is `false`.
__Example:__
```js
parse('RegExp', 're', {explicit: false}); // /re/
parse('RegExp', 're', {explicit: true}); // Error: ... does not type check...
parse('RegExp | String', 're', {explicit: true}); // 're'
```
`explicit` sets whether to be in explicit mode or not. Using `*` automatically activates explicit mode. For more information, read the [levn format](#levn-format) section.
### customTypes
An `Object`. Empty `{}` by default.
__Example:__
```js
var options = {
customTypes: {
Even: {
typeOf: 'Number',
validate: function (x) {
return x % 2 === 0;
},
cast: function (x) {
return {type: 'Just', value: parseInt(x)};
}
}
}
}
parse('Even', '2', options); // 2
parse('Even', '3', options); // Error: Value: "3" does not type check...
```
__Another Example:__
```js
function Person(name, age){
this.name = name;
this.age = age;
}
var options = {
customTypes: {
Person: {
typeOf: 'Object',
validate: function (x) {
x instanceof Person;
},
cast: function (value, options, typesCast) {
var name, age;
if ({}.toString.call(value).slice(8, -1) !== 'Object') {
return {type: 'Nothing'};
}
name = typesCast(value.name, [{type: 'String'}], options);
age = typesCast(value.age, [{type: 'Numger'}], options);
return {type: 'Just', value: new Person(name, age)};
}
}
}
parse('Person', '{name: Laura, age: 25}', options); // Person {name: 'Laura', age: 25}
```
`customTypes` is an object whose keys are the name of the types, and whose values are an object with three properties, `typeOf`, `validate`, and `cast`. For more information about `typeOf` and `validate`, please see the [custom types](https://github.com/gkz/type-check#custom-types) section of type-check.
`cast` is a function which receives three arguments, the value under question, options, and the typesCast function. In `cast`, attempt to cast the value into the specified type. If you are successful, return an object in the format `{type: 'Just', value: CAST-VALUE}`, if you know it won't work, return `{type: 'Nothing'}`. You can use the `typesCast` function to cast any child values. Remember to pass `options` to it. In your function you can also check for `options.explicit` and act accordingly.
## Technical About
`levn` is written in [LiveScript](http://livescript.net/) - a language that compiles to JavaScript. It uses [type-check](https://github.com/gkz/type-check) to both parse types and validate values. It also uses the [prelude.ls](http://preludels.com/) library.
@@ -0,0 +1 @@
module.exports={C:{"4":0.00907,"102":0.00453,"103":0.00453,"115":1.25564,"128":0.00453,"134":0.00453,"136":0.00453,"142":0.0136,"143":1.09699,"144":0.98366,_:"2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 129 130 131 132 133 135 137 138 139 140 141 145 146 147 3.5 3.6"},D:{"39":0.00907,"40":0.00907,"41":0.00453,"42":0.00907,"43":0.00907,"44":0.00907,"45":0.00453,"46":0.00453,"47":0.00907,"48":0.00453,"49":0.0136,"50":0.00907,"51":0.00907,"52":0.0136,"53":0.00907,"54":0.00907,"55":0.00907,"56":0.00907,"57":0.00907,"58":0.00453,"59":0.00453,"60":0.00907,"67":0.00453,"73":0.00453,"75":0.00453,"79":0.01813,"83":0.01813,"88":0.00907,"92":0.00453,"93":0.00453,"96":0.00907,"98":0.00453,"103":0.02267,"104":0.59836,"109":0.24478,"111":0.04533,"114":0.00453,"116":0.01813,"119":0.0136,"120":0.0136,"123":0.00453,"124":0.06346,"125":7.00349,"126":0.15412,"127":0.00453,"128":0.01813,"129":0.00907,"130":0.05893,"131":0.0136,"132":0.0136,"133":0.00453,"134":0.00907,"135":0.00907,"136":0.00453,"137":0.0544,"138":0.15412,"139":0.30824,"140":4.88204,"141":11.70874,"142":0.19492,"143":0.00907,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 66 68 69 70 71 72 74 76 77 78 80 81 84 85 86 87 89 90 91 94 95 97 99 100 101 102 105 106 107 108 110 112 113 115 117 118 121 122 144 145"},F:{"91":0.00907,"92":0.10426,"113":0.00453,"118":0.00907,"120":0.10426,"121":0.0272,"122":1.13325,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 115 116 117 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"12":0.00453,"17":0.00453,"18":0.00453,"92":0.00453,"109":0.00907,"114":0.51676,"122":0.00907,"128":0.00907,"129":0.00453,"133":0.05893,"136":0.00453,"137":0.0136,"138":0.00907,"139":0.0408,"140":1.23298,"141":3.71706,"142":0.00453,_:"13 14 15 16 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 123 124 125 126 127 130 131 132 134 135"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 14.1 15.1 15.2-15.3 15.4 15.5 16.1 16.2 16.3 16.4 16.5 17.0 17.3 18.0 18.2 18.4 26.1 26.2","13.1":0.4941,"15.6":0.09519,"16.0":0.0136,"16.6":0.14959,"17.1":0.02267,"17.2":0.00453,"17.4":0.0408,"17.5":0.0272,"17.6":0.03173,"18.1":0.00453,"18.3":0.00453,"18.5-18.6":0.04986,"26.0":0.26745},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00096,"5.0-5.1":0,"6.0-6.1":0.00386,"7.0-7.1":0.00289,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00868,"10.0-10.2":0.00096,"10.3":0.0164,"11.0-11.2":0.24316,"11.3-11.4":0.00579,"12.0-12.1":0.00193,"12.2-12.5":0.04728,"13.0-13.1":0,"13.2":0.00482,"13.3":0.00193,"13.4-13.7":0.00772,"14.0-14.4":0.0164,"14.5-14.8":0.01737,"15.0-15.1":0.0164,"15.2-15.3":0.01254,"15.4":0.01447,"15.5":0.0164,"15.6-15.8":0.21421,"16.0":0.02895,"16.1":0.05404,"16.2":0.02798,"16.3":0.05018,"16.4":0.01254,"16.5":0.02219,"16.6-16.7":0.28658,"17.0":0.02026,"17.1":0.03088,"17.2":0.02219,"17.3":0.03281,"17.4":0.0579,"17.5":0.09939,"17.6-17.7":0.25088,"18.0":0.05693,"18.1":0.11772,"18.2":0.06369,"18.3":0.20456,"18.4":0.10518,"18.5-18.6":5.36306,"26.0":0.6629,"26.1":0.02412},P:{"4":0.01037,"21":0.02073,"22":0.0311,"23":0.05183,"24":0.11402,"25":0.14512,"26":0.07256,"27":0.62195,"28":3.89756,"29":0.23841,_:"20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 14.0 15.0 16.0 17.0 18.0","7.2-7.4":0.0622,"13.0":0.01037,"19.0":0.01037},I:{"0":0.00546,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0.21415,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.00907,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.08747},Q:{"14.9":0.27335},O:{"0":0.28428},H:{"0":0.01},L:{"0":45.08009}};
@@ -0,0 +1,33 @@
var $47fa5ec5ff482271$exports = require("./context.main.js");
var $1NItU$internationalizednumber = require("@internationalized/number");
var $1NItU$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, "useNumberFormatter", () => $fea93c5b7c90d9f4$export$b7a616150fdb9f44);
/*
* 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 $fea93c5b7c90d9f4$export$b7a616150fdb9f44(options = {}) {
let { locale: locale } = (0, $47fa5ec5ff482271$exports.useLocale)();
return (0, $1NItU$react.useMemo)(()=>new (0, $1NItU$internationalizednumber.NumberFormatter)(locale, options), [
locale,
options
]);
}
//# sourceMappingURL=useNumberFormatter.main.js.map
@@ -0,0 +1,923 @@
'use strict'
// the PEND/UNPEND stuff tracks whether we're ready to emit end/close yet.
// but the path reservations are required to avoid race conditions where
// parallelized unpack ops may mess with one another, due to dependencies
// (like a Link depending on its target) or destructive operations (like
// clobbering an fs object to create one of a different type.)
const assert = require('assert')
const Parser = require('./parse.js')
const fs = require('fs')
const fsm = require('fs-minipass')
const path = require('path')
const mkdir = require('./mkdir.js')
const wc = require('./winchars.js')
const pathReservations = require('./path-reservations.js')
const stripAbsolutePath = require('./strip-absolute-path.js')
const normPath = require('./normalize-windows-path.js')
const stripSlash = require('./strip-trailing-slashes.js')
const normalize = require('./normalize-unicode.js')
const ONENTRY = Symbol('onEntry')
const CHECKFS = Symbol('checkFs')
const CHECKFS2 = Symbol('checkFs2')
const PRUNECACHE = Symbol('pruneCache')
const ISREUSABLE = Symbol('isReusable')
const MAKEFS = Symbol('makeFs')
const FILE = Symbol('file')
const DIRECTORY = Symbol('directory')
const LINK = Symbol('link')
const SYMLINK = Symbol('symlink')
const HARDLINK = Symbol('hardlink')
const UNSUPPORTED = Symbol('unsupported')
const CHECKPATH = Symbol('checkPath')
const MKDIR = Symbol('mkdir')
const ONERROR = Symbol('onError')
const PENDING = Symbol('pending')
const PEND = Symbol('pend')
const UNPEND = Symbol('unpend')
const ENDED = Symbol('ended')
const MAYBECLOSE = Symbol('maybeClose')
const SKIP = Symbol('skip')
const DOCHOWN = Symbol('doChown')
const UID = Symbol('uid')
const GID = Symbol('gid')
const CHECKED_CWD = Symbol('checkedCwd')
const crypto = require('crypto')
const getFlag = require('./get-write-flag.js')
const platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform
const isWindows = platform === 'win32'
const DEFAULT_MAX_DEPTH = 1024
// Unlinks on Windows are not atomic.
//
// This means that if you have a file entry, followed by another
// file entry with an identical name, and you cannot re-use the file
// (because it's a hardlink, or because unlink:true is set, or it's
// Windows, which does not have useful nlink values), then the unlink
// will be committed to the disk AFTER the new file has been written
// over the old one, deleting the new file.
//
// To work around this, on Windows systems, we rename the file and then
// delete the renamed file. It's a sloppy kludge, but frankly, I do not
// know of a better way to do this, given windows' non-atomic unlink
// semantics.
//
// See: https://github.com/npm/node-tar/issues/183
/* istanbul ignore next */
const unlinkFile = (path, cb) => {
if (!isWindows) {
return fs.unlink(path, cb)
}
const name = path + '.DELETE.' + crypto.randomBytes(16).toString('hex')
fs.rename(path, name, er => {
if (er) {
return cb(er)
}
fs.unlink(name, cb)
})
}
/* istanbul ignore next */
const unlinkFileSync = path => {
if (!isWindows) {
return fs.unlinkSync(path)
}
const name = path + '.DELETE.' + crypto.randomBytes(16).toString('hex')
fs.renameSync(path, name)
fs.unlinkSync(name)
}
// this.gid, entry.gid, this.processUid
const uint32 = (a, b, c) =>
a === a >>> 0 ? a
: b === b >>> 0 ? b
: c
// clear the cache if it's a case-insensitive unicode-squashing match.
// we can't know if the current file system is case-sensitive or supports
// unicode fully, so we check for similarity on the maximally compatible
// representation. Err on the side of pruning, since all it's doing is
// preventing lstats, and it's not the end of the world if we get a false
// positive.
// Note that on windows, we always drop the entire cache whenever a
// symbolic link is encountered, because 8.3 filenames are impossible
// to reason about, and collisions are hazards rather than just failures.
const cacheKeyNormalize = path => stripSlash(normPath(normalize(path)))
.toLowerCase()
const pruneCache = (cache, abs) => {
abs = cacheKeyNormalize(abs)
for (const path of cache.keys()) {
const pnorm = cacheKeyNormalize(path)
if (pnorm === abs || pnorm.indexOf(abs + '/') === 0) {
cache.delete(path)
}
}
}
const dropCache = cache => {
for (const key of cache.keys()) {
cache.delete(key)
}
}
class Unpack extends Parser {
constructor (opt) {
if (!opt) {
opt = {}
}
opt.ondone = _ => {
this[ENDED] = true
this[MAYBECLOSE]()
}
super(opt)
this[CHECKED_CWD] = false
this.reservations = pathReservations()
this.transform = typeof opt.transform === 'function' ? opt.transform : null
this.writable = true
this.readable = false
this[PENDING] = 0
this[ENDED] = false
this.dirCache = opt.dirCache || new Map()
if (typeof opt.uid === 'number' || typeof opt.gid === 'number') {
// need both or neither
if (typeof opt.uid !== 'number' || typeof opt.gid !== 'number') {
throw new TypeError('cannot set owner without number uid and gid')
}
if (opt.preserveOwner) {
throw new TypeError(
'cannot preserve owner in archive and also set owner explicitly')
}
this.uid = opt.uid
this.gid = opt.gid
this.setOwner = true
} else {
this.uid = null
this.gid = null
this.setOwner = false
}
// default true for root
if (opt.preserveOwner === undefined && typeof opt.uid !== 'number') {
this.preserveOwner = process.getuid && process.getuid() === 0
} else {
this.preserveOwner = !!opt.preserveOwner
}
this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ?
process.getuid() : null
this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ?
process.getgid() : null
// prevent excessively deep nesting of subfolders
// set to `Infinity` to remove this restriction
this.maxDepth = typeof opt.maxDepth === 'number'
? opt.maxDepth
: DEFAULT_MAX_DEPTH
// mostly just for testing, but useful in some cases.
// Forcibly trigger a chown on every entry, no matter what
this.forceChown = opt.forceChown === true
// turn ><?| in filenames into 0xf000-higher encoded forms
this.win32 = !!opt.win32 || isWindows
// do not unpack over files that are newer than what's in the archive
this.newer = !!opt.newer
// do not unpack over ANY files
this.keep = !!opt.keep
// do not set mtime/atime of extracted entries
this.noMtime = !!opt.noMtime
// allow .., absolute path entries, and unpacking through symlinks
// without this, warn and skip .., relativize absolutes, and error
// on symlinks in extraction path
this.preservePaths = !!opt.preservePaths
// unlink files and links before writing. This breaks existing hard
// links, and removes symlink directories rather than erroring
this.unlink = !!opt.unlink
this.cwd = normPath(path.resolve(opt.cwd || process.cwd()))
this.strip = +opt.strip || 0
// if we're not chmodding, then we don't need the process umask
this.processUmask = opt.noChmod ? 0 : process.umask()
this.umask = typeof opt.umask === 'number' ? opt.umask : this.processUmask
// default mode for dirs created as parents
this.dmode = opt.dmode || (0o0777 & (~this.umask))
this.fmode = opt.fmode || (0o0666 & (~this.umask))
this.on('entry', entry => this[ONENTRY](entry))
}
// a bad or damaged archive is a warning for Parser, but an error
// when extracting. Mark those errors as unrecoverable, because
// the Unpack contract cannot be met.
warn (code, msg, data = {}) {
if (code === 'TAR_BAD_ARCHIVE' || code === 'TAR_ABORT') {
data.recoverable = false
}
return super.warn(code, msg, data)
}
[MAYBECLOSE] () {
if (this[ENDED] && this[PENDING] === 0) {
this.emit('prefinish')
this.emit('finish')
this.emit('end')
}
}
[CHECKPATH] (entry) {
const p = normPath(entry.path)
const parts = p.split('/')
if (this.strip) {
if (parts.length < this.strip) {
return false
}
if (entry.type === 'Link') {
const linkparts = normPath(entry.linkpath).split('/')
if (linkparts.length >= this.strip) {
entry.linkpath = linkparts.slice(this.strip).join('/')
} else {
return false
}
}
parts.splice(0, this.strip)
entry.path = parts.join('/')
}
if (isFinite(this.maxDepth) && parts.length > this.maxDepth) {
this.warn('TAR_ENTRY_ERROR', 'path excessively deep', {
entry,
path: p,
depth: parts.length,
maxDepth: this.maxDepth,
})
return false
}
if (!this.preservePaths) {
if (parts.includes('..') || isWindows && /^[a-z]:\.\.$/i.test(parts[0])) {
this.warn('TAR_ENTRY_ERROR', `path contains '..'`, {
entry,
path: p,
})
return false
}
// strip off the root
const [root, stripped] = stripAbsolutePath(p)
if (root) {
entry.path = stripped
this.warn('TAR_ENTRY_INFO', `stripping ${root} from absolute path`, {
entry,
path: p,
})
}
}
if (path.isAbsolute(entry.path)) {
entry.absolute = normPath(path.resolve(entry.path))
} else {
entry.absolute = normPath(path.resolve(this.cwd, entry.path))
}
// if we somehow ended up with a path that escapes the cwd, and we are
// not in preservePaths mode, then something is fishy! This should have
// been prevented above, so ignore this for coverage.
/* istanbul ignore if - defense in depth */
if (!this.preservePaths &&
entry.absolute.indexOf(this.cwd + '/') !== 0 &&
entry.absolute !== this.cwd) {
this.warn('TAR_ENTRY_ERROR', 'path escaped extraction target', {
entry,
path: normPath(entry.path),
resolvedPath: entry.absolute,
cwd: this.cwd,
})
return false
}
// an archive can set properties on the extraction directory, but it
// may not replace the cwd with a different kind of thing entirely.
if (entry.absolute === this.cwd &&
entry.type !== 'Directory' &&
entry.type !== 'GNUDumpDir') {
return false
}
// only encode : chars that aren't drive letter indicators
if (this.win32) {
const { root: aRoot } = path.win32.parse(entry.absolute)
entry.absolute = aRoot + wc.encode(entry.absolute.slice(aRoot.length))
const { root: pRoot } = path.win32.parse(entry.path)
entry.path = pRoot + wc.encode(entry.path.slice(pRoot.length))
}
return true
}
[ONENTRY] (entry) {
if (!this[CHECKPATH](entry)) {
return entry.resume()
}
assert.equal(typeof entry.absolute, 'string')
switch (entry.type) {
case 'Directory':
case 'GNUDumpDir':
if (entry.mode) {
entry.mode = entry.mode | 0o700
}
// eslint-disable-next-line no-fallthrough
case 'File':
case 'OldFile':
case 'ContiguousFile':
case 'Link':
case 'SymbolicLink':
return this[CHECKFS](entry)
case 'CharacterDevice':
case 'BlockDevice':
case 'FIFO':
default:
return this[UNSUPPORTED](entry)
}
}
[ONERROR] (er, entry) {
// Cwd has to exist, or else nothing works. That's serious.
// Other errors are warnings, which raise the error in strict
// mode, but otherwise continue on.
if (er.name === 'CwdError') {
this.emit('error', er)
} else {
this.warn('TAR_ENTRY_ERROR', er, { entry })
this[UNPEND]()
entry.resume()
}
}
[MKDIR] (dir, mode, cb) {
mkdir(normPath(dir), {
uid: this.uid,
gid: this.gid,
processUid: this.processUid,
processGid: this.processGid,
umask: this.processUmask,
preserve: this.preservePaths,
unlink: this.unlink,
cache: this.dirCache,
cwd: this.cwd,
mode: mode,
noChmod: this.noChmod,
}, cb)
}
[DOCHOWN] (entry) {
// in preserve owner mode, chown if the entry doesn't match process
// in set owner mode, chown if setting doesn't match process
return this.forceChown ||
this.preserveOwner &&
(typeof entry.uid === 'number' && entry.uid !== this.processUid ||
typeof entry.gid === 'number' && entry.gid !== this.processGid)
||
(typeof this.uid === 'number' && this.uid !== this.processUid ||
typeof this.gid === 'number' && this.gid !== this.processGid)
}
[UID] (entry) {
return uint32(this.uid, entry.uid, this.processUid)
}
[GID] (entry) {
return uint32(this.gid, entry.gid, this.processGid)
}
[FILE] (entry, fullyDone) {
const mode = entry.mode & 0o7777 || this.fmode
const stream = new fsm.WriteStream(entry.absolute, {
flags: getFlag(entry.size),
mode: mode,
autoClose: false,
})
stream.on('error', er => {
if (stream.fd) {
fs.close(stream.fd, () => {})
}
// flush all the data out so that we aren't left hanging
// if the error wasn't actually fatal. otherwise the parse
// is blocked, and we never proceed.
stream.write = () => true
this[ONERROR](er, entry)
fullyDone()
})
let actions = 1
const done = er => {
if (er) {
/* istanbul ignore else - we should always have a fd by now */
if (stream.fd) {
fs.close(stream.fd, () => {})
}
this[ONERROR](er, entry)
fullyDone()
return
}
if (--actions === 0) {
fs.close(stream.fd, er => {
if (er) {
this[ONERROR](er, entry)
} else {
this[UNPEND]()
}
fullyDone()
})
}
}
stream.on('finish', _ => {
// if futimes fails, try utimes
// if utimes fails, fail with the original error
// same for fchown/chown
const abs = entry.absolute
const fd = stream.fd
if (entry.mtime && !this.noMtime) {
actions++
const atime = entry.atime || new Date()
const mtime = entry.mtime
fs.futimes(fd, atime, mtime, er =>
er ? fs.utimes(abs, atime, mtime, er2 => done(er2 && er))
: done())
}
if (this[DOCHOWN](entry)) {
actions++
const uid = this[UID](entry)
const gid = this[GID](entry)
fs.fchown(fd, uid, gid, er =>
er ? fs.chown(abs, uid, gid, er2 => done(er2 && er))
: done())
}
done()
})
const tx = this.transform ? this.transform(entry) || entry : entry
if (tx !== entry) {
tx.on('error', er => {
this[ONERROR](er, entry)
fullyDone()
})
entry.pipe(tx)
}
tx.pipe(stream)
}
[DIRECTORY] (entry, fullyDone) {
const mode = entry.mode & 0o7777 || this.dmode
this[MKDIR](entry.absolute, mode, er => {
if (er) {
this[ONERROR](er, entry)
fullyDone()
return
}
let actions = 1
const done = _ => {
if (--actions === 0) {
fullyDone()
this[UNPEND]()
entry.resume()
}
}
if (entry.mtime && !this.noMtime) {
actions++
fs.utimes(entry.absolute, entry.atime || new Date(), entry.mtime, done)
}
if (this[DOCHOWN](entry)) {
actions++
fs.chown(entry.absolute, this[UID](entry), this[GID](entry), done)
}
done()
})
}
[UNSUPPORTED] (entry) {
entry.unsupported = true
this.warn('TAR_ENTRY_UNSUPPORTED',
`unsupported entry type: ${entry.type}`, { entry })
entry.resume()
}
[SYMLINK] (entry, done) {
this[LINK](entry, entry.linkpath, 'symlink', done)
}
[HARDLINK] (entry, done) {
const linkpath = normPath(path.resolve(this.cwd, entry.linkpath))
this[LINK](entry, linkpath, 'link', done)
}
[PEND] () {
this[PENDING]++
}
[UNPEND] () {
this[PENDING]--
this[MAYBECLOSE]()
}
[SKIP] (entry) {
this[UNPEND]()
entry.resume()
}
// Check if we can reuse an existing filesystem entry safely and
// overwrite it, rather than unlinking and recreating
// Windows doesn't report a useful nlink, so we just never reuse entries
[ISREUSABLE] (entry, st) {
return entry.type === 'File' &&
!this.unlink &&
st.isFile() &&
st.nlink <= 1 &&
!isWindows
}
// check if a thing is there, and if so, try to clobber it
[CHECKFS] (entry) {
this[PEND]()
const paths = [entry.path]
if (entry.linkpath) {
paths.push(entry.linkpath)
}
this.reservations.reserve(paths, done => this[CHECKFS2](entry, done))
}
[PRUNECACHE] (entry) {
// if we are not creating a directory, and the path is in the dirCache,
// then that means we are about to delete the directory we created
// previously, and it is no longer going to be a directory, and neither
// is any of its children.
// If a symbolic link is encountered, all bets are off. There is no
// reasonable way to sanitize the cache in such a way we will be able to
// avoid having filesystem collisions. If this happens with a non-symlink
// entry, it'll just fail to unpack, but a symlink to a directory, using an
// 8.3 shortname or certain unicode attacks, can evade detection and lead
// to arbitrary writes to anywhere on the system.
if (entry.type === 'SymbolicLink') {
dropCache(this.dirCache)
} else if (entry.type !== 'Directory') {
pruneCache(this.dirCache, entry.absolute)
}
}
[CHECKFS2] (entry, fullyDone) {
this[PRUNECACHE](entry)
const done = er => {
this[PRUNECACHE](entry)
fullyDone(er)
}
const checkCwd = () => {
this[MKDIR](this.cwd, this.dmode, er => {
if (er) {
this[ONERROR](er, entry)
done()
return
}
this[CHECKED_CWD] = true
start()
})
}
const start = () => {
if (entry.absolute !== this.cwd) {
const parent = normPath(path.dirname(entry.absolute))
if (parent !== this.cwd) {
return this[MKDIR](parent, this.dmode, er => {
if (er) {
this[ONERROR](er, entry)
done()
return
}
afterMakeParent()
})
}
}
afterMakeParent()
}
const afterMakeParent = () => {
fs.lstat(entry.absolute, (lstatEr, st) => {
if (st && (this.keep || this.newer && st.mtime > entry.mtime)) {
this[SKIP](entry)
done()
return
}
if (lstatEr || this[ISREUSABLE](entry, st)) {
return this[MAKEFS](null, entry, done)
}
if (st.isDirectory()) {
if (entry.type === 'Directory') {
const needChmod = !this.noChmod &&
entry.mode &&
(st.mode & 0o7777) !== entry.mode
const afterChmod = er => this[MAKEFS](er, entry, done)
if (!needChmod) {
return afterChmod()
}
return fs.chmod(entry.absolute, entry.mode, afterChmod)
}
// Not a dir entry, have to remove it.
// NB: the only way to end up with an entry that is the cwd
// itself, in such a way that == does not detect, is a
// tricky windows absolute path with UNC or 8.3 parts (and
// preservePaths:true, or else it will have been stripped).
// In that case, the user has opted out of path protections
// explicitly, so if they blow away the cwd, c'est la vie.
if (entry.absolute !== this.cwd) {
return fs.rmdir(entry.absolute, er =>
this[MAKEFS](er, entry, done))
}
}
// not a dir, and not reusable
// don't remove if the cwd, we want that error
if (entry.absolute === this.cwd) {
return this[MAKEFS](null, entry, done)
}
unlinkFile(entry.absolute, er =>
this[MAKEFS](er, entry, done))
})
}
if (this[CHECKED_CWD]) {
start()
} else {
checkCwd()
}
}
[MAKEFS] (er, entry, done) {
if (er) {
this[ONERROR](er, entry)
done()
return
}
switch (entry.type) {
case 'File':
case 'OldFile':
case 'ContiguousFile':
return this[FILE](entry, done)
case 'Link':
return this[HARDLINK](entry, done)
case 'SymbolicLink':
return this[SYMLINK](entry, done)
case 'Directory':
case 'GNUDumpDir':
return this[DIRECTORY](entry, done)
}
}
[LINK] (entry, linkpath, link, done) {
// XXX: get the type ('symlink' or 'junction') for windows
fs[link](linkpath, entry.absolute, er => {
if (er) {
this[ONERROR](er, entry)
} else {
this[UNPEND]()
entry.resume()
}
done()
})
}
}
const callSync = fn => {
try {
return [null, fn()]
} catch (er) {
return [er, null]
}
}
class UnpackSync extends Unpack {
[MAKEFS] (er, entry) {
return super[MAKEFS](er, entry, () => {})
}
[CHECKFS] (entry) {
this[PRUNECACHE](entry)
if (!this[CHECKED_CWD]) {
const er = this[MKDIR](this.cwd, this.dmode)
if (er) {
return this[ONERROR](er, entry)
}
this[CHECKED_CWD] = true
}
// don't bother to make the parent if the current entry is the cwd,
// we've already checked it.
if (entry.absolute !== this.cwd) {
const parent = normPath(path.dirname(entry.absolute))
if (parent !== this.cwd) {
const mkParent = this[MKDIR](parent, this.dmode)
if (mkParent) {
return this[ONERROR](mkParent, entry)
}
}
}
const [lstatEr, st] = callSync(() => fs.lstatSync(entry.absolute))
if (st && (this.keep || this.newer && st.mtime > entry.mtime)) {
return this[SKIP](entry)
}
if (lstatEr || this[ISREUSABLE](entry, st)) {
return this[MAKEFS](null, entry)
}
if (st.isDirectory()) {
if (entry.type === 'Directory') {
const needChmod = !this.noChmod &&
entry.mode &&
(st.mode & 0o7777) !== entry.mode
const [er] = needChmod ? callSync(() => {
fs.chmodSync(entry.absolute, entry.mode)
}) : []
return this[MAKEFS](er, entry)
}
// not a dir entry, have to remove it
const [er] = callSync(() => fs.rmdirSync(entry.absolute))
this[MAKEFS](er, entry)
}
// not a dir, and not reusable.
// don't remove if it's the cwd, since we want that error.
const [er] = entry.absolute === this.cwd ? []
: callSync(() => unlinkFileSync(entry.absolute))
this[MAKEFS](er, entry)
}
[FILE] (entry, done) {
const mode = entry.mode & 0o7777 || this.fmode
const oner = er => {
let closeError
try {
fs.closeSync(fd)
} catch (e) {
closeError = e
}
if (er || closeError) {
this[ONERROR](er || closeError, entry)
}
done()
}
let fd
try {
fd = fs.openSync(entry.absolute, getFlag(entry.size), mode)
} catch (er) {
return oner(er)
}
const tx = this.transform ? this.transform(entry) || entry : entry
if (tx !== entry) {
tx.on('error', er => this[ONERROR](er, entry))
entry.pipe(tx)
}
tx.on('data', chunk => {
try {
fs.writeSync(fd, chunk, 0, chunk.length)
} catch (er) {
oner(er)
}
})
tx.on('end', _ => {
let er = null
// try both, falling futimes back to utimes
// if either fails, handle the first error
if (entry.mtime && !this.noMtime) {
const atime = entry.atime || new Date()
const mtime = entry.mtime
try {
fs.futimesSync(fd, atime, mtime)
} catch (futimeser) {
try {
fs.utimesSync(entry.absolute, atime, mtime)
} catch (utimeser) {
er = futimeser
}
}
}
if (this[DOCHOWN](entry)) {
const uid = this[UID](entry)
const gid = this[GID](entry)
try {
fs.fchownSync(fd, uid, gid)
} catch (fchowner) {
try {
fs.chownSync(entry.absolute, uid, gid)
} catch (chowner) {
er = er || fchowner
}
}
}
oner(er)
})
}
[DIRECTORY] (entry, done) {
const mode = entry.mode & 0o7777 || this.dmode
const er = this[MKDIR](entry.absolute, mode)
if (er) {
this[ONERROR](er, entry)
done()
return
}
if (entry.mtime && !this.noMtime) {
try {
fs.utimesSync(entry.absolute, entry.atime || new Date(), entry.mtime)
} catch (er) {}
}
if (this[DOCHOWN](entry)) {
try {
fs.chownSync(entry.absolute, this[UID](entry), this[GID](entry))
} catch (er) {}
}
done()
entry.resume()
}
[MKDIR] (dir, mode) {
try {
return mkdir.sync(normPath(dir), {
uid: this.uid,
gid: this.gid,
processUid: this.processUid,
processGid: this.processGid,
umask: this.processUmask,
preserve: this.preservePaths,
unlink: this.unlink,
cache: this.dirCache,
cwd: this.cwd,
mode: mode,
})
} catch (er) {
return er
}
}
[LINK] (entry, linkpath, link, done) {
try {
fs[link + 'Sync'](linkpath, entry.absolute)
done()
entry.resume()
} catch (er) {
return this[ONERROR](er, entry)
}
}
}
Unpack.Sync = UnpackSync
module.exports = Unpack
@@ -0,0 +1,36 @@
import baseAssignValue from './_baseAssignValue.js';
import createAggregator from './_createAggregator.js';
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The corresponding value of
* each key is the last element responsible for generating the key. The
* iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* var array = [
* { 'dir': 'left', 'code': 97 },
* { 'dir': 'right', 'code': 100 }
* ];
*
* _.keyBy(array, function(o) {
* return String.fromCharCode(o.code);
* });
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
*
* _.keyBy(array, 'dir');
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
*/
var keyBy = createAggregator(function(result, value, key) {
baseAssignValue(result, key, value);
});
export default keyBy;
@@ -0,0 +1,51 @@
'use strict';
var YAMLSeq = require('../nodes/YAMLSeq.js');
var resolveProps = require('./resolve-props.js');
var utilFlowIndentCheck = require('./util-flow-indent-check.js');
function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {
const NodeClass = tag?.nodeClass ?? YAMLSeq.YAMLSeq;
const seq = new NodeClass(ctx.schema);
if (ctx.atRoot)
ctx.atRoot = false;
if (ctx.atKey)
ctx.atKey = false;
let offset = bs.offset;
let commentEnd = null;
for (const { start, value } of bs.items) {
const props = resolveProps.resolveProps(start, {
indicator: 'seq-item-ind',
next: value,
offset,
onError,
parentIndent: bs.indent,
startOnNewline: true
});
if (!props.found) {
if (props.anchor || props.tag || value) {
if (value?.type === 'block-seq')
onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');
else
onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');
}
else {
commentEnd = props.end;
if (props.comment)
seq.comment = props.comment;
continue;
}
}
const node = value
? composeNode(ctx, value, props, onError)
: composeEmptyNode(ctx, props.end, start, null, props, onError);
if (ctx.schema.compat)
utilFlowIndentCheck.flowIndentCheck(bs.indent, value, onError);
offset = node.range[2];
seq.items.push(node);
}
seq.range = [bs.offset, offset, commentEnd ?? offset];
return seq;
}
exports.resolveBlockSeq = resolveBlockSeq;
@@ -0,0 +1 @@
{"mappings":"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","sources":["packages/@react-stately/collections/src/packages/@react-stately/collections/src/types.ts","packages/@react-stately/collections/src/packages/@react-stately/collections/src/Item.ts","packages/@react-stately/collections/src/packages/@react-stately/collections/src/Section.ts","packages/@react-stately/collections/src/packages/@react-stately/collections/src/CollectionBuilder.ts","packages/@react-stately/collections/src/packages/@react-stately/collections/src/useCollection.ts","packages/@react-stately/collections/src/packages/@react-stately/collections/src/getChildNodes.ts","packages/@react-stately/collections/src/packages/@react-stately/collections/src/getItemCount.ts","packages/@react-stately/collections/src/packages/@react-stately/collections/src/index.ts","packages/@react-stately/collections/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,"/*\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\nexport type {PartialNode} from './types';\nexport {Item} from './Item';\nexport {Section} from './Section';\nexport {useCollection} from './useCollection';\nexport {getItemCount} from './getItemCount';\nexport {getChildNodes, getFirstItem, getLastItem, getNthItem, compareNodeOrder} from './getChildNodes';\nexport {CollectionBuilder} from './CollectionBuilder';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -0,0 +1 @@
{"name":"mrmime","version":"2.0.1","requiresBuild":false,"files":{"license":{"checkedAt":1794532091661,"integrity":"sha512-ZkoPlLLLNE+x7uYhT2lFNl+mwCMeZeFOJcAZPO7exJwgOsqOVgLz1xP7U8obr3Ev63lEyJpJ72AcTI7XSYzgQg==","mode":420,"size":1122},"index.js":{"checkedAt":1794532091661,"integrity":"sha512-BfmVP4BzXCai83+4xkpWksAg3YgiT0PIsoJa0lL9fqEOXB0IBFMAe6p3IuDgZOnhVb/WwDgUH45ep0KDycpY1g==","mode":420,"size":13608},"package.json":{"checkedAt":1794532091661,"integrity":"sha512-xhAezE4KNApZNDjoKNeuTVa0/HITaVo0bp1zeiOMhQSqAs4FvGcyh8D9xIDXMKRyTt6ZhYdW0mT4iIJP+tKj8w==","mode":420,"size":887},"readme.md":{"checkedAt":1794532091661,"integrity":"sha512-8HPTXbXpQ0tRUzr94fmASje4wu4z+SzKSdpG2NqkNOxbwfZcSkqLlvnx+90Zh+iyHYRrjuk1k5OYfulK3m1Yvw==","mode":420,"size":3698},"index.mjs":{"checkedAt":1794532091661,"integrity":"sha512-MCfdTA6DKaUdLZ+2cUfkXv8LoF4CdmFbZnnxUEZuOVD3h+2rLSKIAFqhuEKyokiYSWlxI08rVG/F2ffGNgxhIw==","mode":420,"size":13586},"index.d.ts":{"checkedAt":1794532091661,"integrity":"sha512-94X4+zMkoUCdXL5/0/fQnbsdngs60gabnwXbDUHWycPBJ9D7Lxygj2h8JJXlg9U0zXbRK5XJSS9V8wcRRezqSg==","mode":420,"size":107}}}
@@ -0,0 +1,126 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "حروف", verb: "ہونا" },
file: { unit: "بائٹس", verb: "ہونا" },
array: { unit: "آئٹمز", verb: "ہونا" },
set: { unit: "آئٹمز", verb: "ہونا" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "نمبر";
}
case "object": {
if (Array.isArray(data)) {
return "آرے";
}
if (data === null) {
return "نل";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "ان پٹ",
email: "ای میل ایڈریس",
url: "یو آر ایل",
emoji: "ایموجی",
uuid: "یو یو آئی ڈی",
uuidv4: "یو یو آئی ڈی وی 4",
uuidv6: "یو یو آئی ڈی وی 6",
nanoid: "نینو آئی ڈی",
guid: "جی یو آئی ڈی",
cuid: "سی یو آئی ڈی",
cuid2: "سی یو آئی ڈی 2",
ulid: "یو ایل آئی ڈی",
xid: "ایکس آئی ڈی",
ksuid: "کے ایس یو آئی ڈی",
datetime: "آئی ایس او ڈیٹ ٹائم",
date: "آئی ایس او تاریخ",
time: "آئی ایس او وقت",
duration: "آئی ایس او مدت",
ipv4: "آئی پی وی 4 ایڈریس",
ipv6: "آئی پی وی 6 ایڈریس",
cidrv4: "آئی پی وی 4 رینج",
cidrv6: "آئی پی وی 6 رینج",
base64: "بیس 64 ان کوڈڈ سٹرنگ",
base64url: "بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",
json_string: "جے ایس او این سٹرنگ",
e164: "ای 164 نمبر",
jwt: "جے ڈبلیو ٹی",
template_literal: "ان پٹ",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `غلط ان پٹ: ${issue.expected} متوقع تھا، ${parsedType(issue.input)} موصول ہوا`;
case "invalid_value":
if (issue.values.length === 1) return `غلط ان پٹ: ${util.stringifyPrimitive(issue.values[0])} متوقع تھا`;
return `غلط آپشن: ${util.joinValues(issue.values, "|")} میں سے ایک متوقع تھا`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `بہت بڑا: ${issue.origin ?? "ویلیو"} کے ${adj}${issue.maximum.toString()} ${sizing.unit ?? "عناصر"} ہونے متوقع تھے`;
return `بہت بڑا: ${issue.origin ?? "ویلیو"} کا ${adj}${issue.maximum.toString()} ہونا متوقع تھا`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `بہت چھوٹا: ${issue.origin} کے ${adj}${issue.minimum.toString()} ${sizing.unit} ہونے متوقع تھے`;
}
return `بہت چھوٹا: ${issue.origin} کا ${adj}${issue.minimum.toString()} ہونا متوقع تھا`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") {
return `غلط سٹرنگ: "${_issue.prefix}" سے شروع ہونا چاہیے`;
}
if (_issue.format === "ends_with") return `غلط سٹرنگ: "${_issue.suffix}" پر ختم ہونا چاہیے`;
if (_issue.format === "includes") return `غلط سٹرنگ: "${_issue.includes}" شامل ہونا چاہیے`;
if (_issue.format === "regex") return `غلط سٹرنگ: پیٹرن ${_issue.pattern} سے میچ ہونا چاہیے`;
return `غلط ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `غلط نمبر: ${issue.divisor} کا مضاعف ہونا چاہیے`;
case "unrecognized_keys":
return `غیر تسلیم شدہ کی${issue.keys.length > 1 ? "ز" : ""}: ${util.joinValues(issue.keys, "، ")}`;
case "invalid_key":
return `${issue.origin} میں غلط کی`;
case "invalid_union":
return "غلط ان پٹ";
case "invalid_element":
return `${issue.origin} میں غلط ویلیو`;
default:
return `غلط ان پٹ`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,22 @@
import { ILayout, LogEvent, TCreateConverter, TPatternConverter } from './typings';
/**
* Pattern layout for logging messages (根据指定模版格式化日志内容)
*/
export default class PatternLayout implements ILayout {
private readonly converters;
/**
* Constructor (构造函数)
* @param pattern Pattern string (模版字符串)
*/
constructor(pattern?: string, createConverter?: TCreateConverter);
/**
* Add a converter (添加转换器)
* @param fn Converter function (转换器函数)
*/
use(fn: TPatternConverter): this;
/**
* Format a log event (格式化日志事件)
* @param event Log event (日志事件)
*/
format(event: LogEvent): string;
}
@@ -0,0 +1 @@
{"name":"strip-ansi","version":"6.0.1","requiresBuild":false,"files":{"license":{"checkedAt":1794532105520,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"index.js":{"checkedAt":1794532105520,"integrity":"sha512-BoXtEIwgyEs8DUvxgTGL8/OtZgLeG1u3Hcao03dXXpdMQrzBT11yokTwYES86PgQBcV+wtJGpRO28ZZwClAQwg==","mode":420,"size":154},"package.json":{"checkedAt":1794532105521,"integrity":"sha512-ckoeSYZxSUwiupKQYAWLVTms00uDnSY8kFigczPNpUPVx3Q1oKbxP3atsvMruT+iaD+AiSRdvEyIFb3hcWjrtw==","mode":420,"size":798},"readme.md":{"checkedAt":1794532105521,"integrity":"sha512-fOo3y0lg+mnFBEKQb4reHqQDNhcFRyqNIjsG6gXf2MT0zivVqcbcHGj+PMTWzKnnNeEwp2hUBMDocUiFRglSfA==","mode":420,"size":1599},"index.d.ts":{"checkedAt":1794532105521,"integrity":"sha512-hDHCpXYbeoCHQexoRmx5sNk6gl6ncJfehBzlvQ87ZJSev3hh2MaEZTBEIr75/1GSROyNjzcc+VBZYdAaeu8P2w==","mode":420,"size":369}}}
@@ -0,0 +1,5 @@
<svg viewbox="0 0 18 18">
<polyline class="ql-stroke" points="3.5 14 7 4 10.5 14"></polyline>
<line class="ql-stroke" x1="9.45" x2="4.55" y1="11" y2="11"></line>
<path class="ql-fill" d="M13.636,5.013a4.016,4.016,0,0,0-1.863.472,0.42,0.42,0,0,0-.179.629l0.112,0.214a0.418,0.418,0,0,0,.625.191,2.557,2.557,0,0,1,1.183-.326A0.933,0.933,0,0,1,14.573,7.2V7.338H14.339c-1.272,0-3.325.281-3.325,1.954A1.75,1.75,0,0,0,12.9,11.011a2.072,2.072,0,0,0,1.785-1.078h0.022a1.132,1.132,0,0,0-.022.247V10.4a0.412,0.412,0,0,0,.457.472h0.379A0.416,0.416,0,0,0,15.99,10.4V7.293A2.121,2.121,0,0,0,13.636,5.013Zm0.948,3.4a1.452,1.452,0,0,1-1.305,1.505,0.775,0.775,0,0,1-.859-0.753c0-.854,1.216-0.966,1.93-0.966h0.234V8.416Z"></path>
</svg>

After

Width:  |  Height:  |  Size: 724 B

@@ -0,0 +1,34 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 200
[*.js]
block_comment_start = /*
block_comment = *
block_comment_end = */
[*.yml]
indent_size = 1
[package.json]
indent_style = tab
[CHANGELOG.md]
indent_style = space
indent_size = 2
[{*.json,Makefile}]
max_line_length = unset
[test/{dotdot,resolver,module_dir,multirepo,node_path,pathfilter,precedence}/**/*]
indent_style = unset
indent_size = unset
max_line_length = unset
insert_final_newline = unset
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":["../index.js"],"sourcesContent":["// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n\n// strings\nvar NEWLINE = '\\n';\nvar FORWARD_SLASH = '/';\nvar ASTERISK = '*';\nvar EMPTY_STRING = '';\n\n// types\nvar TYPE_COMMENT = 'comment';\nvar TYPE_DECLARATION = 'declaration';\n\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */\nexport default function (style, options) {\n if (typeof style !== 'string') {\n throw new TypeError('First argument must be a string');\n }\n\n if (!style) return [];\n\n options = options || {};\n\n /**\n * Positional.\n */\n var lineno = 1;\n var column = 1;\n\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */\n function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */\n function position() {\n var start = { line: lineno, column: column };\n return function (node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */\n function Position(start) {\n this.start = start;\n this.end = { line: lineno, column: column };\n this.source = options.source;\n }\n\n /**\n * Non-enumerable source string.\n */\n Position.prototype.content = style;\n\n var errorsList = [];\n\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */\n function error(msg) {\n var err = new Error(\n options.source + ':' + lineno + ':' + column + ': ' + msg\n );\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */\n function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n\n /**\n * Parse whitespace.\n */\n function whitespace() {\n match(WHITESPACE_REGEX);\n }\n\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */\n function comments(rules) {\n var c;\n rules = rules || [];\n while ((c = comment())) {\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */\n function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n\n var i = 2;\n while (\n EMPTY_STRING != style.charAt(i) &&\n (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))\n ) {\n ++i;\n }\n i += 2;\n\n if (EMPTY_STRING === style.charAt(i - 1)) {\n return error('End of comment missing');\n }\n\n var str = style.slice(2, i - 2);\n column += 2;\n updatePosition(str);\n style = style.slice(i);\n column += 2;\n\n return pos({\n type: TYPE_COMMENT,\n comment: str\n });\n }\n\n /**\n * Parse declaration.\n *\n * @return {Object}\n * @throws {Error}\n */\n function declaration() {\n var pos = position();\n\n // prop\n var prop = match(PROPERTY_REGEX);\n if (!prop) return;\n comment();\n\n // :\n if (!match(COLON_REGEX)) return error(\"property missing ':'\");\n\n // val\n var val = match(VALUE_REGEX);\n\n var ret = pos({\n type: TYPE_DECLARATION,\n property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),\n value: val\n ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING))\n : EMPTY_STRING\n });\n\n // ;\n match(SEMICOLON_REGEX);\n\n return ret;\n }\n\n /**\n * Parse declarations.\n *\n * @return {Object[]}\n */\n function declarations() {\n Line truncated
@@ -0,0 +1,149 @@
var $625ad1e1f4c43bc1$exports = require("./CalendarDate.main.js");
var $a5090d6430502238$exports = require("./utils.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "HebrewCalendar", () => $0f5324ee3bdd9396$export$ca405048b8fb5af);
/*
* 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.
*/ // Portions of the code in this file are based on code from ICU.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
const $0f5324ee3bdd9396$var$HEBREW_EPOCH = 347997;
// Hebrew date calculations are performed in terms of days, hours, and
// "parts" (or halakim), which are 1/1080 of an hour, or 3 1/3 seconds.
const $0f5324ee3bdd9396$var$HOUR_PARTS = 1080;
const $0f5324ee3bdd9396$var$DAY_PARTS = 24 * $0f5324ee3bdd9396$var$HOUR_PARTS;
// An approximate value for the length of a lunar month.
// It is used to calculate the approximate year and month of a given
// absolute date.
const $0f5324ee3bdd9396$var$MONTH_DAYS = 29;
const $0f5324ee3bdd9396$var$MONTH_FRACT = 12 * $0f5324ee3bdd9396$var$HOUR_PARTS + 793;
const $0f5324ee3bdd9396$var$MONTH_PARTS = $0f5324ee3bdd9396$var$MONTH_DAYS * $0f5324ee3bdd9396$var$DAY_PARTS + $0f5324ee3bdd9396$var$MONTH_FRACT;
function $0f5324ee3bdd9396$var$isLeapYear(year) {
return (0, $a5090d6430502238$exports.mod)(year * 7 + 1, 19) < 7;
}
// Test for delay of start of new year and to avoid
// Sunday, Wednesday, and Friday as start of the new year.
function $0f5324ee3bdd9396$var$hebrewDelay1(year) {
let months = Math.floor((235 * year - 234) / 19);
let parts = 12084 + 13753 * months;
let day = months * 29 + Math.floor(parts / 25920);
if ((0, $a5090d6430502238$exports.mod)(3 * (day + 1), 7) < 3) day += 1;
return day;
}
// Check for delay in start of new year due to length of adjacent years
function $0f5324ee3bdd9396$var$hebrewDelay2(year) {
let last = $0f5324ee3bdd9396$var$hebrewDelay1(year - 1);
let present = $0f5324ee3bdd9396$var$hebrewDelay1(year);
let next = $0f5324ee3bdd9396$var$hebrewDelay1(year + 1);
if (next - present === 356) return 2;
if (present - last === 382) return 1;
return 0;
}
function $0f5324ee3bdd9396$var$startOfYear(year) {
return $0f5324ee3bdd9396$var$hebrewDelay1(year) + $0f5324ee3bdd9396$var$hebrewDelay2(year);
}
function $0f5324ee3bdd9396$var$getDaysInYear(year) {
return $0f5324ee3bdd9396$var$startOfYear(year + 1) - $0f5324ee3bdd9396$var$startOfYear(year);
}
function $0f5324ee3bdd9396$var$getYearType(year) {
let yearLength = $0f5324ee3bdd9396$var$getDaysInYear(year);
if (yearLength > 380) yearLength -= 30; // Subtract length of leap month.
switch(yearLength){
case 353:
return 0; // deficient
case 354:
return 1; // normal
case 355:
return 2; // complete
}
}
function $0f5324ee3bdd9396$var$getDaysInMonth(year, month) {
// Normalize month numbers from 1 - 13, even on non-leap years
if (month >= 6 && !$0f5324ee3bdd9396$var$isLeapYear(year)) month++;
// First of all, dispose of fixed-length 29 day months
if (month === 4 || month === 7 || month === 9 || month === 11 || month === 13) return 29;
let yearType = $0f5324ee3bdd9396$var$getYearType(year);
// If it's Heshvan, days depend on length of year
if (month === 2) return yearType === 2 ? 30 : 29;
// Similarly, Kislev varies with the length of year
if (month === 3) return yearType === 0 ? 29 : 30;
// Adar I only exists in leap years
if (month === 6) return $0f5324ee3bdd9396$var$isLeapYear(year) ? 30 : 0;
return 30;
}
class $0f5324ee3bdd9396$export$ca405048b8fb5af {
fromJulianDay(jd) {
let d = jd - $0f5324ee3bdd9396$var$HEBREW_EPOCH;
let m = d * $0f5324ee3bdd9396$var$DAY_PARTS / $0f5324ee3bdd9396$var$MONTH_PARTS; // Months (approx)
let year = Math.floor((19 * m + 234) / 235) + 1; // Years (approx)
let ys = $0f5324ee3bdd9396$var$startOfYear(year); // 1st day of year
let dayOfYear = Math.floor(d - ys);
// Because of the postponement rules, it's possible to guess wrong. Fix it.
while(dayOfYear < 1){
year--;
ys = $0f5324ee3bdd9396$var$startOfYear(year);
dayOfYear = Math.floor(d - ys);
}
// Now figure out which month we're in, and the date within that month
let month = 1;
let monthStart = 0;
while(monthStart < dayOfYear){
monthStart += $0f5324ee3bdd9396$var$getDaysInMonth(year, month);
month++;
}
month--;
monthStart -= $0f5324ee3bdd9396$var$getDaysInMonth(year, month);
let day = dayOfYear - monthStart;
return new (0, $625ad1e1f4c43bc1$exports.CalendarDate)(this, year, month, day);
}
toJulianDay(date) {
let jd = $0f5324ee3bdd9396$var$startOfYear(date.year);
for(let month = 1; month < date.month; month++)jd += $0f5324ee3bdd9396$var$getDaysInMonth(date.year, month);
return jd + date.day + $0f5324ee3bdd9396$var$HEBREW_EPOCH;
}
getDaysInMonth(date) {
return $0f5324ee3bdd9396$var$getDaysInMonth(date.year, date.month);
}
getMonthsInYear(date) {
return $0f5324ee3bdd9396$var$isLeapYear(date.year) ? 13 : 12;
}
getDaysInYear(date) {
return $0f5324ee3bdd9396$var$getDaysInYear(date.year);
}
getYearsInEra() {
// 6239 gregorian
return 9999;
}
getEras() {
return [
'AM'
];
}
balanceYearMonth(date, previousDate) {
// Keep date in the same month when switching between leap years and non leap years
if (previousDate.year !== date.year) {
if ($0f5324ee3bdd9396$var$isLeapYear(previousDate.year) && !$0f5324ee3bdd9396$var$isLeapYear(date.year) && previousDate.month > 6) date.month--;
else if (!$0f5324ee3bdd9396$var$isLeapYear(previousDate.year) && $0f5324ee3bdd9396$var$isLeapYear(date.year) && previousDate.month > 6) date.month++;
}
}
constructor(){
this.identifier = 'hebrew';
}
}
//# sourceMappingURL=HebrewCalendar.main.js.map
@@ -0,0 +1,87 @@
import {mergeProps as $bvdLj$mergeProps, filterDOMProps as $bvdLj$filterDOMProps, useFormReset as $bvdLj$useFormReset} from "@react-aria/utils";
import {usePress as $bvdLj$usePress, useFocusable as $bvdLj$useFocusable} from "@react-aria/interactions";
/*
* 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 $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
let { isDisabled: isDisabled = false, isReadOnly: isReadOnly = false, value: value, name: name, form: form, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, validationState: validationState = 'valid', isInvalid: isInvalid, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;
let onChange = (e)=>{
// since we spread props on label, onChange will end up there as well as in here.
// so we have to stop propagation at the lowest level that we care about
e.stopPropagation();
state.setSelected(e.target.checked);
};
let hasChildren = children != null;
let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;
if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');
// Handle press state for keyboard interactions and cases where labelProps is not used.
let { pressProps: pressProps, isPressed: isPressed } = (0, $bvdLj$usePress)({
onPressStart: onPressStart,
onPressEnd: onPressEnd,
onPressChange: onPressChange,
onPress: onPress,
onPressUp: onPressUp,
onClick: onClick,
isDisabled: isDisabled
});
// Handle press state on the label.
let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $bvdLj$usePress)({
onPressStart: onPressStart,
onPressEnd: onPressEnd,
onPressChange: onPressChange,
onPressUp: onPressUp,
onClick: onClick,
onPress (e) {
var _ref_current;
onPress === null || onPress === void 0 ? void 0 : onPress(e);
state.toggle();
(_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();
},
isDisabled: isDisabled || isReadOnly
});
let { focusableProps: focusableProps } = (0, $bvdLj$useFocusable)(props, ref);
let interactions = (0, $bvdLj$mergeProps)(pressProps, focusableProps);
let domProps = (0, $bvdLj$filterDOMProps)(props, {
labelable: true
});
(0, $bvdLj$useFormReset)(ref, state.defaultSelected, state.setSelected);
return {
labelProps: (0, $bvdLj$mergeProps)(labelProps, {
onClick: (e)=>e.preventDefault()
}),
inputProps: (0, $bvdLj$mergeProps)(domProps, {
'aria-invalid': isInvalid || validationState === 'invalid' || undefined,
'aria-errormessage': props['aria-errormessage'],
'aria-controls': props['aria-controls'],
'aria-readonly': isReadOnly || undefined,
onChange: onChange,
disabled: isDisabled,
...value == null ? {} : {
value: value
},
name: name,
form: form,
type: 'checkbox',
...interactions
}),
isSelected: state.isSelected,
isPressed: isPressed || isLabelPressed,
isDisabled: isDisabled,
isReadOnly: isReadOnly,
isInvalid: isInvalid || validationState === 'invalid'
};
}
export {$d2c8e2b0480f3f34$export$cbe85ee05b554577 as useToggle};
//# sourceMappingURL=useToggle.module.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2024_regexp: LibDefinition;
@@ -0,0 +1,45 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "filterDOMProps", () => $8d15d0e1797d4238$export$457c3d6518dd4c6f);
/*
* 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 $8d15d0e1797d4238$var$DOMPropNames = new Set([
'id'
]);
const $8d15d0e1797d4238$var$labelablePropNames = new Set([
'aria-label',
'aria-labelledby',
'aria-describedby',
'aria-details'
]);
// See LinkDOMProps in dom.d.ts.
const $8d15d0e1797d4238$var$linkPropNames = new Set([
'href',
'hrefLang',
'target',
'rel',
'download',
'ping',
'referrerPolicy'
]);
const $8d15d0e1797d4238$var$propRe = /^(data-.*)$/;
function $8d15d0e1797d4238$export$457c3d6518dd4c6f(props, opts = {}) {
let { labelable: labelable, isLink: isLink, propNames: propNames } = opts;
let filteredProps = {};
for(const prop in props)if (Object.prototype.hasOwnProperty.call(props, prop) && ($8d15d0e1797d4238$var$DOMPropNames.has(prop) || labelable && $8d15d0e1797d4238$var$labelablePropNames.has(prop) || isLink && $8d15d0e1797d4238$var$linkPropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $8d15d0e1797d4238$var$propRe.test(prop))) filteredProps[prop] = props[prop];
return filteredProps;
}
//# sourceMappingURL=filterDOMProps.main.js.map
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var toolbarRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-orientation': 'horizontal'
},
relatedConcepts: [{
concept: {
name: 'menubar'
},
module: 'ARIA'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'group']]
};
var _default = exports.default = toolbarRole;
@@ -0,0 +1,61 @@
/**
* @fileoverview Utility functions for propWrapperFunctions setting
*/
'use strict';
const filter = require('es-iterator-helpers/Iterator.prototype.filter');
const some = require('es-iterator-helpers/Iterator.prototype.some');
function searchPropWrapperFunctions(name, propWrapperFunctions) {
const splitName = name.split('.');
return some(propWrapperFunctions.values(), (func) => {
if (splitName.length === 2 && func.object === splitName[0] && func.property === splitName[1]) {
return true;
}
return name === func || func.property === name;
});
}
function getPropWrapperFunctions(context) {
return new Set(context.settings.propWrapperFunctions || []);
}
function isPropWrapperFunction(context, name) {
if (typeof name !== 'string') {
return false;
}
const propWrapperFunctions = getPropWrapperFunctions(context);
return searchPropWrapperFunctions(name, propWrapperFunctions);
}
function getExactPropWrapperFunctions(context) {
const propWrapperFunctions = getPropWrapperFunctions(context);
const exactPropWrappers = filter(propWrapperFunctions.values(), (func) => func.exact === true);
return new Set(exactPropWrappers);
}
function isExactPropWrapperFunction(context, name) {
const exactPropWrappers = getExactPropWrapperFunctions(context);
return searchPropWrapperFunctions(name, exactPropWrappers);
}
function formatPropWrapperFunctions(propWrapperFunctions) {
return Array.from(propWrapperFunctions, (func) => {
if (func.object && func.property) {
return `'${func.object}.${func.property}'`;
}
if (func.property) {
return `'${func.property}'`;
}
return `'${func}'`;
}).join(', ');
}
module.exports = {
formatPropWrapperFunctions,
getExactPropWrapperFunctions,
getPropWrapperFunctions,
isExactPropWrapperFunction,
isPropWrapperFunction,
};
@@ -0,0 +1,154 @@
/**
* @file 字体外观分类器
* @author mengke01(kekee000@gmail.com)
*
* @see:
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6OS2.html
*/
export default {
bFamilyType: [
'Any',
'No Fit',
'Text and Display',
'Script',
'Decorative',
'Pictorial'
],
bSerifStyle: [
'Any',
'No Fit',
'Cove',
'Obtuse Cove',
'Square Cove',
'Obtuse Square Cove',
'Square',
'Thin',
'Bone',
'Exaggerated',
'Triangle',
'Normal Sans',
'Obtuse Sans',
'Perp Sans',
'Flared',
'Rounded'
],
bWeight: [
'Any',
'No Fit',
'Very Light',
'Light',
'Thin',
'Book',
'Medium',
'Demi',
'Bold',
'Heavy',
'Black',
'Nord'
],
bProportion: [
'Any',
'No Fit',
'Old Style',
'Modern',
'Even Width',
'Expanded',
'Condensed',
'Very Expanded',
'Very Condensed',
'Monospaced'
],
bContrast: [
'Any',
'No Fit',
'None',
'Very Low',
'Low',
'Medium Low',
'Medium',
'Medium High',
'High',
'Very High'
],
bStrokeVariation: [
'Any',
'No Fit',
'Gradual/Diagonal',
'Gradual/Transitional',
'Gradual/Vertical',
'Gradual/Horizontal',
'Rapid/Vertical',
'Rapid/Horizontal',
'Instant/Vertical'
],
bArmStyle: [
'Any',
'No Fit',
'Straight Arms/Horizontal',
'Straight Arms/Wedge',
'Straight Arms/Vertical',
'Straight Arms/Single Serif',
'Straight Arms/Double Serif',
'Non-Straight Arms/Horizontal',
'Non-Straight Arms/Wedge',
'Non-Straight Arms/Vertical',
'Non-Straight Arms/Single Serif',
'Non-Straight Arms/Double Serif'
],
bLetterform: [
'Any',
'No Fit',
'Normal/Contact',
'Normal/Weighted',
'Normal/Boxed',
'Normal/Flattened',
'Normal/Rounded',
'Normal/Off Center',
'Normal/Square',
'Oblique/Contact',
'Oblique/Weighted',
'Oblique/Boxed',
'Oblique/Flattened',
'Oblique/Rounded',
'Oblique/Off Center',
'Oblique/Square'
],
bMidline: [
'Any',
'No Fit',
'Standard/Trimmed',
'Standard/Pointed',
'Standard/Serifed',
'High/Trimmed',
'High/Pointed',
'High/Serifed',
'Constant/Trimmed',
'Constant/Pointed',
'Constant/Serifed',
'Low/Trimmed',
'Low/Pointed',
'Low/Serifed'
],
bXHeight: [
'Any',
'No Fit',
'Constant/Small',
'Constant/Standard',
'Constant/Large',
'Ducking/Small',
'Ducking/Standard',
'Ducking/Large'
]
};
@@ -0,0 +1 @@
{"mappings":"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","sources":["packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/calculatePosition.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useCloseOnScroll.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useOverlayPosition.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useOverlay.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useOverlayTrigger.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/usePreventScroll.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/useModal.tsx","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/DismissButton.tsx","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/ariaHideOutside.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/usePopover.ts","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/PortalProvider.tsx","packages/@react-aria/overlays/src/packages/@react-aria/overlays/src/Overlay.tsx","packages/@react-aria/overlays/src/packagLine truncated
@@ -0,0 +1,440 @@
import { decodeLength, encodeLength, MAJOR_TYPE_ARRAY, MAJOR_TYPE_BYTE_STRING, MAJOR_TYPE_MAP, MAJOR_TYPE_NEGATIVE_INTEGER, MAJOR_TYPE_SIMPLE_OR_FLOAT, MAJOR_TYPE_TAG, MAJOR_TYPE_TEXT_STRING, MAJOR_TYPE_UNSIGNED_INTEGER, } from "./cbor_internal.js";
/**
* A value which is wrapped with a CBOR Tag.
* Several tags are registered with defined meanings like 0 for a date string.
* These meanings are **not interpreted** when decoded or encoded.
*
* This class is an immutable record.
* If the tag number or value needs to change, then construct a new tag
*/
export class CBORTag {
/**
* Wrap a value with a tag number.
* When encoded, this tag will be attached to the value.
*
* @param tag Tag number
* @param value Wrapped value
*/
constructor(tag, value) {
Object.defineProperty(this, "tagId", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
Object.defineProperty(this, "tagValue", {
enumerable: true,
configurable: true,
writable: true,
value: void 0
});
this.tagId = tag;
this.tagValue = value;
}
/**
* Read the tag number
*/
get tag() {
return this.tagId;
}
/**
* Read the value
*/
get value() {
return this.tagValue;
}
}
function decodeUnsignedInteger(data, argument, index) {
return decodeLength(data, argument, index);
}
function decodeNegativeInteger(data, argument, index) {
const [value, length] = decodeUnsignedInteger(data, argument, index);
return [-value - 1, length];
}
function decodeByteString(data, argument, index) {
const [lengthValue, lengthConsumed] = decodeLength(data, argument, index);
const dataStartIndex = index + lengthConsumed;
return [
new Uint8Array(data.buffer.slice(dataStartIndex, dataStartIndex + lengthValue)),
lengthConsumed + lengthValue,
];
}
const TEXT_DECODER = new TextDecoder();
function decodeString(data, argument, index) {
const [value, length] = decodeByteString(data, argument, index);
return [TEXT_DECODER.decode(value), length];
}
function decodeArray(data, argument, index) {
if (argument === 0) {
return [[], 1];
}
const [length, lengthConsumed] = decodeLength(data, argument, index);
let consumedLength = lengthConsumed;
const value = [];
for (let i = 0; i < length; i++) {
const remainingDataLength = data.byteLength - index - consumedLength;
if (remainingDataLength <= 0) {
throw new Error("array is not supported or well formed");
}
const [decodedValue, consumed] = decodeNext(data, index + consumedLength);
value.push(decodedValue);
consumedLength += consumed;
}
return [value, consumedLength];
}
const MAP_ERROR = "Map is not supported or well formed";
function decodeMap(data, argument, index) {
if (argument === 0) {
return [new Map(), 1];
}
const [length, lengthConsumed] = decodeLength(data, argument, index);
let consumedLength = lengthConsumed;
const result = new Map();
for (let i = 0; i < length; i++) {
let remainingDataLength = data.byteLength - index - consumedLength;
if (remainingDataLength <= 0) {
throw new Error(MAP_ERROR);
}
// Load key
const [key, keyConsumed] = decodeNext(data, index + consumedLength);
consumedLength += keyConsumed;
remainingDataLength -= keyConsumed;
// Check that there's enough to have a value
if (remainingDataLength <= 0) {
throw new Error(MAP_ERROR);
}
// Technically CBOR maps can have any type as the key, and so can JS Maps
// However, JS Maps can only reference such keys as references which would
// require key iteration and pattern matching.
// For simplicity, since such keys are not in use with WebAuthn, this
// capability is not implemented and the types are restricted to strings
// and numbers.
if (typeof key !== "string" && typeof key !== "number") {
throw new Error(MAP_ERROR);
}
// CBOR Maps are not well formed if there are duplicate keys
if (result.has(key)) {
throw new Error(MAP_ERROR);
}
// Load value
const [value, valueConsumed] = decodeNext(data, index + consumedLength);
consumedLength += valueConsumed;
result.set(key, value);
}
return [result, consumedLength];
}
function decodeFloat16(data, index) {
if (index + 3 > data.byteLength) {
throw new Error("CBOR stream ended before end of Float 16");
}
// Skip the first byte
const result = data.getUint16(index + 1, false);
// A minimal selection of supported values
if (result == 0x7c00) {
return [Infinity, 3];
}
else if (result == 0x7e00) {
return [NaN, 3];
}
else if (result == 0xfc00) {
return [-Infinity, 3];
}
throw new Error("Float16 data is unsupported");
}
function decodeFloat32(data, index) {
if (index + 5 > data.byteLength) {
throw new Error("CBOR stream ended before end of Float 32");
}
// Skip the first byte
const result = data.getFloat32(index + 1, false);
// First byte + 4 byte float
return [result, 5];
}
function decodeFloat64(data, index) {
if (index + 9 > data.byteLength) {
throw new Error("CBOR stream ended before end of Float 64");
}
// Skip the first byte
const result = data.getFloat64(index + 1, false);
// First byte + 8 byte float
return [result, 9];
}
function decodeTag(data, argument, index) {
const [tag, tagBytes] = decodeLength(data, argument, index);
const [value, valueBytes] = decodeNext(data, index + tagBytes);
return [new CBORTag(tag, value), tagBytes + valueBytes];
}
function decodeNext(data, index) {
if (index >= data.byteLength) {
throw new Error("CBOR stream ended before tag value");
}
const byte = data.getUint8(index);
const majorType = byte >> 5;
const argument = byte & 0x1f;
switch (majorType) {
case MAJOR_TYPE_UNSIGNED_INTEGER: {
return decodeUnsignedInteger(data, argument, index);
}
case MAJOR_TYPE_NEGATIVE_INTEGER: {
return decodeNegativeInteger(data, argument, index);
}
case MAJOR_TYPE_BYTE_STRING: {
return decodeByteString(data, argument, index);
}
case MAJOR_TYPE_TEXT_STRING: {
return decodeString(data, argument, index);
}
case MAJOR_TYPE_ARRAY: {
return decodeArray(data, argument, index);
}
case MAJOR_TYPE_MAP: {
return decodeMap(data, argument, index);
}
case MAJOR_TYPE_TAG: {
return decodeTag(data, argument, index);
}
case MAJOR_TYPE_SIMPLE_OR_FLOAT: {
switch (argument) {
case 20:
return [false, 1];
case 21:
return [true, 1];
case 22:
return [null, 1];
case 23:
return [undefined, 1];
// 24: Simple value (value 32..255 in following byte)
case 25: // IEEE 754 Half-Precision Float (16 bits follow)
return decodeFloat16(data, index);
case 26: // IEEE 754 Single-Precision Float (32 bits follow)
return decodeFloat32(data, index);
case 27: // IEEE 754 Double-Precision Float (64 bits follow)
return decodeFloat64(data, index);
// 28-30: Reserved, not well-formed in the present document
// 31: "break" stop code for indefinite-length items
}
}
}
throw new Error(`Unsupported or not well formed at ${index}`);
}
function encodeSimple(data) {
if (data === true) {
return 0xf5;
}
else if (data === false) {
return 0xf4;
}
else if (data === null) {
return 0xf6;
}
// Else undefined
return 0xf7;
}
function encodeFloat(data) {
if (Math.fround(data) == data || !Number.isFinite(data) || Number.isNaN(data)) {
// Float32
const output = new Uint8Array(5);
output[0] = 0xfa;
const view = new DataView(output.buffer);
view.setFloat32(1, data, false);
return output;
}
else {
// Float64
const output = new Uint8Array(9);
output[0] = 0xfb;
const view = new DataView(output.buffer);
view.setFloat64(1, data, false);
return output;
}
}
function encodeNumber(data) {
if (typeof data == "number") {
if (Number.isSafeInteger(data)) {
// Encode integer
if (data < 0) {
return encodeLength(MAJOR_TYPE_NEGATIVE_INTEGER, Math.abs(data));
}
else {
return encodeLength(MAJOR_TYPE_UNSIGNED_INTEGER, data);
}
}
return [encodeFloat(data)];
}
else {
if (data < 0n) {
return encodeLength(MAJOR_TYPE_NEGATIVE_INTEGER, data * -1n);
}
else {
return encodeLength(MAJOR_TYPE_UNSIGNED_INTEGER, data);
}
}
}
const ENCODER = new TextEncoder();
function encodeString(data, output) {
output.push(...encodeLength(MAJOR_TYPE_TEXT_STRING, data.length));
output.push(ENCODER.encode(data));
}
function encodeBytes(data, output) {
output.push(...encodeLength(MAJOR_TYPE_BYTE_STRING, data.length));
output.push(data);
}
function encodeArray(data, output) {
output.push(...encodeLength(MAJOR_TYPE_ARRAY, data.length));
for (const element of data) {
encodePartialCBOR(element, output);
}
}
function encodeMap(data, output) {
output.push(new Uint8Array(encodeLength(MAJOR_TYPE_MAP, data.size)));
for (const [key, value] of data.entries()) {
encodePartialCBOR(key, output);
encodePartialCBOR(value, output);
}
}
function encodeTag(tag, output) {
output.push(...encodeLength(MAJOR_TYPE_TAG, tag.tag));
encodePartialCBOR(tag.value, output);
}
function encodePartialCBOR(data, output) {
if (typeof data == "boolean" || data === null || data == undefined) {
output.push(encodeSimple(data));
return;
}
if (typeof data == "number" || typeof data == "bigint") {
output.push(...encodeNumber(data));
return;
}
if (typeof data == "string") {
encodeString(data, output);
return;
}
if (data instanceof Uint8Array) {
encodeBytes(data, output);
return;
}
if (Array.isArray(data)) {
encodeArray(data, output);
return;
}
if (data instanceof Map) {
encodeMap(data, output);
return;
}
if (data instanceof CBORTag) {
encodeTag(data, output);
return;
}
throw new Error("Not implemented");
}
/**
* Like {decodeCBOR}, but the length of the data is unknown and there is likely
* more -- possibly unrelated non-CBOR -- data afterwards.
*
* Examples:
*
* ```ts
* import {decodePartialCBOR} from './cbor.ts'
* decodePartialCBOR(new Uint8Array([1, 2, 245, 3, 4]), 2)
* // returns [true, 1]
* // It did not decode the leading [1, 2] or trailing [3, 4]
* ```
*
* @param data a data stream to read data from
* @param index where to start reading in the data stream
* @returns a tuple of the value followed by bytes read.
* @throws {Error}
* When the data stream ends early or the CBOR data is not well formed
*/
export function decodePartialCBOR(data, index) {
if (data.byteLength === 0 || data.byteLength <= index || index < 0) {
throw new Error("No data");
}
if (data instanceof Uint8Array) {
return decodeNext(new DataView(data.buffer), index);
}
else if (data instanceof ArrayBuffer) {
return decodeNext(new DataView(data), index);
}
// otherwise, it is a data view
return decodeNext(data, index);
}
/**
* Decode CBOR data from a binary stream
*
* The entire data stream from [0, length) will be consumed.
* If you require a partial decoding, see {decodePartialCBOR}.
*
* Examples:
*
* ```ts
* import {decodeCBOR, CBORTag, CBORType} from './cbor.ts'
* decodeCBOR(new Uint8Array([162, 99, 107, 101, 121, 101, 118, 97, 108, 117, 101, 1, 109, 97, 110, 111, 116, 104, 101, 114, 32, 118, 97, 108, 117, 101]));
* // returns new Map<string | number, CBORType>([
* // ["key", "value"],
* // [1, "another value"]
* // ]);
*
* const taggedItem = new Uint8Array([217, 4, 210, 101, 104, 101, 108, 108, 111]);
* decodeCBOR(new DataView(taggedItem.buffer))
* // returns new CBORTag(1234, "hello")
* ```
*
* @param data a data stream, multiple types are supported
* @returns
*/
export function decodeCBOR(data) {
const [value, length] = decodePartialCBOR(data, 0);
if (length !== data.byteLength) {
throw new Error(`Data was decoded, but the whole stream was not processed ${length} != ${data.byteLength}`);
}
return value;
}
/**
* Encode a supported structure to a CBOR byte string.
*
* Example:
*
* ```ts
* import {encodeCBOR, CBORType, CBORTag} from './cbor.ts'
* encodeCBOR(new Map<string | number, CBORType>([
* ["key", "value"],
* [1, "another value"]
* ]));
* // returns new Uint8Array([162, 99, 107, 101, 121, 101, 118, 97, 108, 117, 101, 1, 109, 97, 110, 111, 116, 104, 101, 114, 32 118, 97, 108, 117, 101])
*
* encodeCBOR(new CBORTag(1234, "hello"))
* // returns new UInt8Array([217, 4, 210, 101, 104, 101, 108, 108, 111])
* ```
*
* @param data Data to encode
* @returns A byte string as a Uint8Array
* @throws Error
* if unsupported data is found during encoding
*/
export function encodeCBOR(data) {
const results = [];
encodePartialCBOR(data, results);
let length = 0;
for (const result of results) {
if (typeof result == "number") {
length += 1;
}
else {
length += result.length;
}
}
const output = new Uint8Array(length);
let index = 0;
for (const result of results) {
if (typeof result == "number") {
output[index] = result;
index += 1;
}
else {
output.set(result, index);
index += result.length;
}
}
return output;
}
@@ -0,0 +1,224 @@
import _extends from '@babel/runtime/helpers/esm/extends';
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
import * as React from 'react';
import useLatest from 'use-latest';
import useComposedRef from 'use-composed-ref';
var isBrowser = typeof document !== 'undefined';
var HIDDEN_TEXTAREA_STYLE = {
'min-height': '0',
'max-height': 'none',
height: '0',
visibility: 'hidden',
overflow: 'hidden',
position: 'absolute',
'z-index': '-1000',
top: '0',
right: '0',
display: 'block'
};
var forceHiddenStyles = function forceHiddenStyles(node) {
Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function (key) {
node.style.setProperty(key, HIDDEN_TEXTAREA_STYLE[key], 'important');
});
};
var forceHiddenStyles$1 = forceHiddenStyles;
var hiddenTextarea = null;
var getHeight = function getHeight(node, sizingData) {
var height = node.scrollHeight;
if (sizingData.sizingStyle.boxSizing === 'border-box') {
// border-box: add border, since height = content + padding + border
return height + sizingData.borderSize;
}
// remove padding, since height = content
return height - sizingData.paddingSize;
};
function calculateNodeHeight(sizingData, value, minRows, maxRows) {
if (minRows === void 0) {
minRows = 1;
}
if (maxRows === void 0) {
maxRows = Infinity;
}
if (!hiddenTextarea) {
hiddenTextarea = document.createElement('textarea');
hiddenTextarea.setAttribute('tabindex', '-1');
hiddenTextarea.setAttribute('aria-hidden', 'true');
forceHiddenStyles$1(hiddenTextarea);
}
if (hiddenTextarea.parentNode === null) {
document.body.appendChild(hiddenTextarea);
}
var paddingSize = sizingData.paddingSize,
borderSize = sizingData.borderSize,
sizingStyle = sizingData.sizingStyle;
var boxSizing = sizingStyle.boxSizing;
Object.keys(sizingStyle).forEach(function (_key) {
var key = _key;
hiddenTextarea.style[key] = sizingStyle[key];
});
forceHiddenStyles$1(hiddenTextarea);
hiddenTextarea.value = value;
var height = getHeight(hiddenTextarea, sizingData);
// Double set and calc due to Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1795904
hiddenTextarea.value = value;
height = getHeight(hiddenTextarea, sizingData);
// measure height of a textarea with a single row
hiddenTextarea.value = 'x';
var rowHeight = hiddenTextarea.scrollHeight - paddingSize;
var minHeight = rowHeight * minRows;
if (boxSizing === 'border-box') {
minHeight = minHeight + paddingSize + borderSize;
}
height = Math.max(minHeight, height);
var maxHeight = rowHeight * maxRows;
if (boxSizing === 'border-box') {
maxHeight = maxHeight + paddingSize + borderSize;
}
height = Math.min(maxHeight, height);
return [height, rowHeight];
}
var noop = function noop() {};
var pick = function pick(props, obj) {
return props.reduce(function (acc, prop) {
acc[prop] = obj[prop];
return acc;
}, {});
};
var SIZING_STYLE = ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth', 'boxSizing', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'letterSpacing', 'lineHeight', 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop',
// non-standard
'tabSize', 'textIndent',
// non-standard
'textRendering', 'textTransform', 'width', 'wordBreak', 'wordSpacing', 'scrollbarGutter'];
var isIE = isBrowser ? !!document.documentElement.currentStyle : false;
var getSizingData = function getSizingData(node) {
var style = window.getComputedStyle(node);
if (style === null) {
return null;
}
var sizingStyle = pick(SIZING_STYLE, style);
var boxSizing = sizingStyle.boxSizing;
// probably node is detached from DOM, can't read computed dimensions
if (boxSizing === '') {
return null;
}
// IE (Edge has already correct behaviour) returns content width as computed width
// so we need to add manually padding and border widths
if (isIE && boxSizing === 'border-box') {
sizingStyle.width = parseFloat(sizingStyle.width) + parseFloat(sizingStyle.borderRightWidth) + parseFloat(sizingStyle.borderLeftWidth) + parseFloat(sizingStyle.paddingRight) + parseFloat(sizingStyle.paddingLeft) + 'px';
}
var paddingSize = parseFloat(sizingStyle.paddingBottom) + parseFloat(sizingStyle.paddingTop);
var borderSize = parseFloat(sizingStyle.borderBottomWidth) + parseFloat(sizingStyle.borderTopWidth);
return {
sizingStyle: sizingStyle,
paddingSize: paddingSize,
borderSize: borderSize
};
};
var getSizingData$1 = getSizingData;
function useListener(target, type, listener) {
var latestListener = useLatest(listener);
React.useLayoutEffect(function () {
var handler = function handler(ev) {
return latestListener.current(ev);
};
// might happen if document.fonts is not defined, for instance
if (!target) {
return;
}
target.addEventListener(type, handler);
return function () {
return target.removeEventListener(type, handler);
};
}, []);
}
var useFormResetListener = function useFormResetListener(libRef, listener) {
useListener(document.body, 'reset', function (ev) {
if (libRef.current.form === ev.target) {
listener(ev);
}
});
};
var useWindowResizeListener = function useWindowResizeListener(listener) {
useListener(window, 'resize', listener);
};
var useFontsLoadedListener = function useFontsLoadedListener(listener) {
useListener(document.fonts, 'loadingdone', listener);
};
var _excluded = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"];
var TextareaAutosize = function TextareaAutosize(_ref, userRef) {
var cacheMeasurements = _ref.cacheMeasurements,
maxRows = _ref.maxRows,
minRows = _ref.minRows,
_ref$onChange = _ref.onChange,
onChange = _ref$onChange === void 0 ? noop : _ref$onChange,
_ref$onHeightChange = _ref.onHeightChange,
onHeightChange = _ref$onHeightChange === void 0 ? noop : _ref$onHeightChange,
props = _objectWithoutPropertiesLoose(_ref, _excluded);
var isControlled = props.value !== undefined;
var libRef = React.useRef(null);
var ref = useComposedRef(libRef, userRef);
var heightRef = React.useRef(0);
var measurementsCacheRef = React.useRef();
var resizeTextarea = function resizeTextarea() {
var node = libRef.current;
var nodeSizingData = cacheMeasurements && measurementsCacheRef.current ? measurementsCacheRef.current : getSizingData$1(node);
if (!nodeSizingData) {
return;
}
measurementsCacheRef.current = nodeSizingData;
var _calculateNodeHeight = calculateNodeHeight(nodeSizingData, node.value || node.placeholder || 'x', minRows, maxRows),
height = _calculateNodeHeight[0],
rowHeight = _calculateNodeHeight[1];
if (heightRef.current !== height) {
heightRef.current = height;
node.style.setProperty('height', height + "px", 'important');
onHeightChange(height, {
rowHeight: rowHeight
});
}
};
var handleChange = function handleChange(event) {
if (!isControlled) {
resizeTextarea();
}
onChange(event);
};
if (isBrowser) {
React.useLayoutEffect(resizeTextarea);
useFormResetListener(libRef, function () {
if (!isControlled) {
var currentValue = libRef.current.value;
requestAnimationFrame(function () {
var node = libRef.current;
if (node && currentValue !== node.value) {
resizeTextarea();
}
});
}
});
useWindowResizeListener(resizeTextarea);
useFontsLoadedListener(resizeTextarea);
return /*#__PURE__*/React.createElement("textarea", _extends({}, props, {
onChange: handleChange,
ref: ref
}));
}
return /*#__PURE__*/React.createElement("textarea", _extends({}, props, {
onChange: onChange,
ref: ref
}));
};
var index = /* #__PURE__ */React.forwardRef(TextareaAutosize);
export { index as default };
@@ -0,0 +1,29 @@
/**
* Make a string safe for embedding in markdown constructs.
*
* In markdown, almost all punctuation characters can, in certain cases,
* result in something.
* Whether they do is highly subjective to where they happen and in what
* they happen.
*
* To solve this, `mdast-util-to-markdown` tracks:
*
* * Characters before and after something;
* * What “constructs” we are in.
*
* This information is then used by this function to escape or encode
* special characters.
*
* @param {State} state
* Info passed around about the current state.
* @param {string | null | undefined} input
* Raw value to make safe.
* @param {SafeConfig} config
* Configuration.
* @returns {string}
* Serialized markdown safe for embedding.
*/
export function safe(state: State, input: string | null | undefined, config: SafeConfig): string;
import type { State } from 'mdast-util-to-markdown';
import type { SafeConfig } from 'mdast-util-to-markdown';
//# sourceMappingURL=safe.d.ts.map
@@ -0,0 +1,76 @@
{
"name": "is-core-module",
"version": "2.16.1",
"description": "Is this specifier a node.js core module?",
"main": "index.js",
"sideEffects": false,
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"lint": "eslint .",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/inspect-js/is-core-module.git"
},
"keywords": [
"core",
"modules",
"module",
"npm",
"node",
"dependencies"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/inspect-js/is-core-module/issues"
},
"homepage": "https://github.com/inspect-js/is-core-module",
"dependencies": {
"hasown": "^2.0.2"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.1.1",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"mock-property": "^1.1.0",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"semver": "^6.3.1",
"tape": "^5.9.0"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1,7 @@
/**
* DON'T EDIT THIS FILE.
* This file was generated by "scripts/update-lib-configs.js" script.
*/
"use strict"
module.exports = { extends: [require.resolve("./no-new-in-es2023")] }
@@ -0,0 +1,34 @@
/**
* Look up info on a property.
*
* In most cases the given `schema` contains info on the property.
* All standard,
* most legacy,
* and some non-standard properties are supported.
* For these cases,
* the returned `Info` has hints about the value of the property.
*
* `name` can also be a valid data attribute or property,
* in which case an `Info` object with the correctly cased `attribute` and
* `property` is returned.
*
* `name` can be an unknown attribute,
* in which case an `Info` object with `attribute` and `property` set to the
* given name is returned.
* It is not recommended to provide unsupported legacy or recently specced
* properties.
*
*
* @param {Schema} schema
* Schema;
* either the `html` or `svg` export.
* @param {string} value
* An attribute-like or property-like name;
* it will be passed through `normalize` to hopefully find the correct info.
* @returns {Info}
* Info.
*/
export function find(schema: Schema, value: string): Info;
import type { Schema } from 'property-information';
import { Info } from './util/info.js';
//# sourceMappingURL=find.d.ts.map
@@ -0,0 +1,43 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Math.clz32` method.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-math-clz32.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"() {
const tracker = new ReferenceTracker(context.getScope())
for (const { node, path } of tracker.iterateGlobalReferences({
Math: {
clz32: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,37 @@
"use client";
// src/listbox-selected-icon.tsx
import { jsx } from "react/jsx-runtime";
function ListboxSelectedIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ jsx(
"svg",
{
"aria-hidden": "true",
"data-selected": isSelected,
role: "presentation",
viewBox: "0 0 17 18",
...otherProps,
children: /* @__PURE__ */ 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"
} : {}
}
)
}
);
}
export {
ListboxSelectedIcon
};
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('isWeakSet', require('../isWeakSet'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"names":["_superPropBase","require","_get","Reflect","get","exports","default","bind","target","property","receiver","base","superPropBase","desc","Object","getOwnPropertyDescriptor","call","arguments","length","value","apply"],"sources":["../../src/helpers/get.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport superPropBase from \"./superPropBase.ts\";\n\n// https://tc39.es/ecma262/multipage/reflection.html#sec-reflect.get\n//\n// 28.1ak.5 Reflect.get ( target, propertyKey [ , receiver ] )\nexport default function _get<T extends object, P extends PropertyKey>(\n target: T,\n property: P,\n receiver?: unknown,\n): P extends keyof T ? T[P] : any;\nexport default function _get(): any {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n // need a bind because https://github.com/babel/babel/issues/14527\n // @ts-expect-error function reassign\n _get = Reflect.get.bind(/* undefined */);\n } else {\n // @ts-expect-error function reassign\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n\n if (!base) return;\n\n var desc = Object.getOwnPropertyDescriptor(base, property)!;\n if (desc.get) {\n // STEP 3. If receiver is not present, then set receiver to target.\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get.apply(null, arguments as any as Parameters<typeof Reflect.get>);\n}\n"],"mappings":";;;;;;AAEA,IAAAA,cAAA,GAAAC,OAAA;AAUe,SAASC,IAAIA,CAAA,EAAQ;EAClC,IAAI,OAAOC,OAAO,KAAK,WAAW,IAAIA,OAAO,CAACC,GAAG,EAAE;IAGjDC,OAAA,CAAAC,OAAA,GAAAJ,IAAI,GAAGC,OAAO,CAACC,GAAG,CAACG,IAAI,CAAgB,CAAC;EAC1C,CAAC,MAAM;IAELF,OAAA,CAAAC,OAAA,GAAAJ,IAAI,GAAG,SAASA,IAAIA,CAACM,MAAM,EAAEC,QAAQ,EAAEC,QAAQ,EAAE;MAC/C,IAAIC,IAAI,GAAG,IAAAC,sBAAa,EAACJ,MAAM,EAAEC,QAAQ,CAAC;MAE1C,IAAI,CAACE,IAAI,EAAE;MAEX,IAAIE,IAAI,GAAGC,MAAM,CAACC,wBAAwB,CAACJ,IAAI,EAAEF,QAAQ,CAAE;MAC3D,IAAII,IAAI,CAACT,GAAG,EAAE;QAEZ,OAAOS,IAAI,CAACT,GAAG,CAACY,IAAI,CAACC,SAAS,CAACC,MAAM,GAAG,CAAC,GAAGV,MAAM,GAAGE,QAAQ,CAAC;MAChE;MAEA,OAAOG,IAAI,CAACM,KAAK;IACnB,CAAC;EACH;EAEA,OAAOjB,IAAI,CAACkB,KAAK,CAAC,IAAI,EAAEH,SAAkD,CAAC;AAC7E","ignoreList":[]}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more