diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index ce1ba9d..0000000 --- a/.eslintignore +++ /dev/null @@ -1,15 +0,0 @@ -.pnp.* -.yarn/* - -dist/ -node_modules/ -playground/ -coverage/ -mocks/ -playwright-report/ -.nyc_output/ -tests/applications/ -tests/applications/ - -.vscode/ -.idea/ diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index fc78ab6..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,539 +0,0 @@ -/* eslint-disable sort-keys-fix/sort-keys-fix */ -const path = require('path') - -const restrictedGlobals = require('confusing-browser-globals') -const moduleConfig = require('eslint-plugin-n/lib/configs/recommended-module') -const scriptConfig = require('eslint-plugin-n/lib/configs/recommended-script') -const getPackageJson = require('eslint-plugin-n/lib/util/get-package-json') - -const packageJson = getPackageJson() -const isModule = (packageJson && packageJson.type) === 'module' - -const customModuleConfig = { - ...moduleConfig, - parserOptions: { - ecmaVersion: 12, - sourceType: 'module', - }, - rules: { - 'n/no-missing-import': 'off', - 'n/no-unpublished-import': 'off', - }, -} - -const customScriptConfig = { - ...scriptConfig, - rules: { - 'n/no-unpublished-require': 'off', - }, -} - -const jsConfigs = [ - { ...(isModule ? customModuleConfig : customScriptConfig), files: ['*.js'] }, - { ...scriptConfig, files: ['*.cjs', '.*.cjs'] }, - { ...customModuleConfig, files: ['*.mjs', '.*.mjs'] }, -] - -const tsConfigs = { - extends: [ - 'plugin:n/recommended-module', - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-requiring-type-checking', - 'plugin:@typescript-eslint/strict', - ], - - files: ['*.ts', '*.tsx'], - - parser: '@typescript-eslint/parser', - - parserOptions: { - project: [ - path.resolve(__dirname, './tsconfig.json'), - ], - }, - - plugins: ['@typescript-eslint', 'typescript-sort-keys'], - - rules: { - // TypeScript's `noFallthroughCasesInSwitch` option is more robust (#6906) - 'default-case': 'off', - // 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/291) - 'no-dupe-class-members': 'off', - // 'tsc' already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/477) - 'no-undef': 'off', - 'no-duplicate-imports': 'off', - 'no-shadow': 'off', - 'sort-imports': 'off', - 'no-use-before-define': 'off', - - '@typescript-eslint/consistent-type-imports': 'error', - '@typescript-eslint/member-delimiter-style': [ - 2, - { - multiline: { delimiter: 'none', requireLast: false }, - multilineDetection: 'brackets', - singleline: { delimiter: 'semi', requireLast: false }, - }, - ], - '@typescript-eslint/no-invalid-void-type': 'off', - '@typescript-eslint/no-shadow': ['error', { hoist: 'functions' }], - '@typescript-eslint/no-unused-vars': [ - 'error', - { - argsIgnorePattern: '^_(?:[0-9]+)?', - destructuredArrayIgnorePattern: '^_(?:[0-9]+)?', - ignoreRestSiblings: true, - }, - ], - '@typescript-eslint/non-nullable-type-assertion-style': 'off', - '@typescript-eslint/no-use-before-define': ['error', { typedefs: false }], - - 'typescript-sort-keys/interface': 'error', - 'typescript-sort-keys/string-enum': 'error', - - 'n/no-missing-import': 'off', - 'n/no-unpublished-import': 'off', - }, -} - -const reactConfigs = { - env: { - browser: true, - }, - - files: ['*.jsx', '*.tsx'], - - plugins: ['react', 'jsx-a11y', 'react-hooks'], - - rules: { - // http://eslint.org/docs/rules/ - 'jsx-quotes': ['error', 'prefer-single'], - - // https://github.com/yannickcr/eslint-plugin-react/tree/master/docs/rules - 'react/jsx-uses-react': 'error', - 'react/jsx-uses-vars': 'error', - 'react/forbid-foreign-prop-types': ['error', { allowInPropTypes: true }], - 'react/jsx-no-comment-textnodes': 'error', - 'react/jsx-no-duplicate-props': 'error', - 'react/jsx-no-target-blank': 'error', - 'react/jsx-no-undef': 'error', - 'react/jsx-pascal-case': ['error', { allowAllCaps: true, ignore: [] }], - 'react/no-danger-with-children': 'error', - 'react/no-direct-mutation-state': 'error', - 'react/no-is-mounted': 'error', - 'react/no-typos': 'error', - 'react/require-render-return': 'error', - 'react/style-prop-object': 'error', - 'react/jsx-no-bind': ['error', { allowArrowFunctions: true, allowBind: false, ignoreRefs: true }], - 'react/no-did-update-set-state': 'error', - 'react/no-unknown-property': 'error', - 'react/no-unused-prop-types': 'error', - 'react/prop-types': 'error', - 'react/react-in-jsx-scope': 'error', - 'react/jsx-sort-props': 'error', - - // https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules - 'jsx-a11y/alt-text': 'error', - 'jsx-a11y/anchor-has-content': 'error', - 'jsx-a11y/anchor-is-valid': ['error', { aspects: ['noHref', 'invalidHref'] }], - 'jsx-a11y/aria-activedescendant-has-tabindex': 'error', - 'jsx-a11y/aria-props': 'error', - 'jsx-a11y/aria-proptypes': 'error', - 'jsx-a11y/aria-role': ['error', { ignoreNonDOM: true }], - 'jsx-a11y/aria-unsupported-elements': 'error', - 'jsx-a11y/heading-has-content': 'error', - 'jsx-a11y/iframe-has-title': 'error', - 'jsx-a11y/img-redundant-alt': 'error', - 'jsx-a11y/no-access-key': 'error', - 'jsx-a11y/no-distracting-elements': 'error', - 'jsx-a11y/no-redundant-roles': 'error', - 'jsx-a11y/role-has-required-aria-props': 'error', - 'jsx-a11y/role-supports-aria-props': 'error', - 'jsx-a11y/scope': 'error', - - // https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks - 'react-hooks/rules-of-hooks': 'error', - 'react-hooks/exhaustive-deps': 'error', - }, - - settings: { - react: { - version: 'detect', - }, - }, -} - -const jsonConfigs = { - files: ['*.schema.json'], - parser: 'jsonc-eslint-parser', - plugins: ['jsonc'], - rules: { - 'jsonc/sort-keys': [ - 'error', - { - order: [ - '$id', - '$schema', - '$ref', - '$comment', - 'title', - 'description', - 'definitions', - 'type', - 'default', - 'readOnly', - 'writeOnly', - 'examples', - 'multipleOf', - 'maximum', - 'exclusiveMaximum', - 'minimum', - 'exclusiveMinimum', - 'maxLength', - 'minLength', - 'pattern', - 'additionalItems', - 'items', - 'maxItems', - 'minItems', - 'uniqueItems', - 'contains', - 'maxProperties', - 'minProperties', - 'properties', - 'additionalProperties', - 'patternProperties', - 'required', - 'dependencies', - 'propertyNames', - 'const', - 'enum', - 'format', - 'contentMediaType', - 'contentEncoding', - 'if', - 'then', - 'else', - 'allOf', - 'anyOf', - 'oneOf', - 'not', - ], - pathPattern: '.*', - }, - ], - }, -} - -const testFilesConfigs = { - files: ['*.test.*'], - rules: { - 'max-nested-callbacks': 'off', - 'max-statements': 'off', - 'no-unused-expressions': 'off', - }, -} - -// NOTE: When adding rules here, you need to make sure they are compatible with `typescript-eslint` -module.exports = { - env: { - es2022: true, - mocha: true, - node: true, - }, - - overrides: [...jsConfigs, tsConfigs, jsonConfigs, testFilesConfigs, reactConfigs], - - parserOptions: { ecmaVersion: 12 }, - - plugins: ['import', 'sort-keys-fix', 'mocha'], - - reportUnusedDisableDirectives: true, - - root: true, - - rules: { - // http://eslint.org/docs/rules/ - 'array-bracket-spacing': ['error', 'never'], - 'array-callback-return': 'error', - 'arrow-spacing': 'error', - 'block-scoped-var': 'error', - 'block-spacing': ['error', 'always'], - 'brace-style': ['error', '1tbs', { allowSingleLine: true }], - camelcase: ['error', { ignoreDestructuring: true, properties: 'never' }], - 'comma-dangle': [ - 'error', - { - arrays: 'always-multiline', - exports: 'always-multiline', - functions: 'ignore', - imports: 'always-multiline', - objects: 'always-multiline', - }, - ], - 'comma-spacing': 'error', - 'comma-style': 'error', - 'computed-property-spacing': ['error', 'never'], - 'constructor-super': 'error', - curly: 'error', - 'default-case': ['error', { commentPattern: '^skip\\sdefault' }], - 'dot-location': ['error', 'property'], - 'eol-last': 'error', - eqeqeq: ['error', 'smart'], - 'for-direction': 'error', - 'func-call-spacing': 'off', - 'func-name-matching': 'error', - 'func-names': ['error', 'as-needed'], - 'func-style': ['error', 'declaration', { allowArrowFunctions: true }], - 'generator-star-spacing': 'error', - 'getter-return': 'error', - 'global-require': 'error', - 'guard-for-in': 'error', - 'handle-callback-err': 'error', - 'id-blacklist': ['error', 'e', 'er', 'cb'], - 'id-length': ['error', { exceptions: ['_', 'i', 'j', 'x', 'y', 'z'], min: 2, properties: 'never' }], - indent: ['error', 2], - 'key-spacing': 'error', - 'keyword-spacing': 'error', - 'line-comment-position': 'error', - 'linebreak-style': ['error', 'unix'], - 'lines-around-comment': 'off', - 'max-depth': ['error', 4], - 'max-lines': [ - 'error', - { - max: 500, - skipBlankLines: true, - skipComments: true, - }, - ], - 'max-nested-callbacks': ['error', 4], - 'max-statements': ['error', 25, { ignoreTopLevelFunctions: true }], - 'max-statements-per-line': ['error', { max: 2 }], - 'new-parens': 'error', - 'newline-per-chained-call': ['error', { ignoreChainWithDepth: 3 }], - 'no-array-constructor': 'error', - 'no-async-promise-executor': 'error', - 'no-await-in-loop': 'error', - 'no-caller': 'error', - 'no-case-declarations': 'error', - 'no-class-assign': 'error', - 'no-compare-neg-zero': 'error', - 'no-cond-assign': ['error', 'except-parens'], - 'no-confusing-arrow': ['error', { allowParens: true }], - 'no-console': 'off', - 'no-const-assign': 'error', - 'no-constant-condition': 'error', - 'no-control-regex': 'error', - 'no-debugger': 'error', - 'no-delete-var': 'error', - 'no-dupe-args': 'error', - 'no-dupe-class-members': 'error', - 'no-dupe-else-if': 'error', - 'no-dupe-keys': 'error', - 'no-duplicate-case': 'error', - 'no-duplicate-imports': 'error', - 'no-else-return': 'error', - 'no-empty': 'error', - 'no-empty-character-class': 'error', - 'no-empty-function': 'error', - 'no-empty-pattern': 'error', - 'no-eq-null': 'error', - 'no-eval': 'error', - 'no-ex-assign': 'error', - 'no-extend-native': 'error', - 'no-extra-bind': 'error', - 'no-extra-boolean-cast': 'error', - 'no-extra-label': 'error', - 'no-extra-parens': ['error', 'functions'], - 'no-extra-semi': 'error', - 'no-fallthrough': 'error', - 'no-floating-decimal': 'error', - 'no-func-assign': 'error', - 'no-global-assign': 'error', - 'no-implicit-coercion': 'error', - 'no-implicit-globals': 'error', - 'no-implied-eval': 'error', - 'no-import-assign': 'error', - 'no-inner-declarations': 'error', - 'no-invalid-regexp': 'error', - 'no-irregular-whitespace': 'error', - 'no-iterator': 'error', - 'no-label-var': 'error', - 'no-labels': ['error', { allowLoop: true, allowSwitch: false }], - 'no-lone-blocks': 'error', - 'no-lonely-if': 'error', - 'no-loop-func': 'error', - 'no-loss-of-precision': 'error', - 'no-misleading-character-class': 'error', - 'no-mixed-operators': [ - 'error', - { - allowSamePrecedence: false, - groups: [ - ['&', '|', '^', '~', '<<', '>>', '>>>'], - ['==', '!=', '===', '!==', '>', '>=', '<', '<='], - ['&&', '||'], - ['in', 'instanceof'], - ], - }, - ], - 'no-mixed-spaces-and-tabs': 'error', - 'no-multi-assign': 'error', - 'no-multi-spaces': 'error', - 'no-multi-str': 'error', - 'no-multiple-empty-lines': 'error', - 'no-nested-ternary': 'error', - 'no-new': 'error', - 'no-new-func': 'error', - 'no-new-object': 'error', - 'no-new-require': 'error', - 'no-new-symbol': 'error', - 'no-new-wrappers': 'error', - 'no-nonoctal-decimal-escape': 'error', - 'no-obj-calls': 'error', - 'no-octal': 'error', - 'no-octal-escape': 'error', - 'no-param-reassign': 'error', - 'no-path-concat': 'error', - 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], - 'no-proto': 'error', - 'no-prototype-builtins': 'error', - 'no-redeclare': ['error', { builtinGlobals: false }], - 'no-regex-spaces': 'error', - 'no-restricted-globals': ['error'].concat(restrictedGlobals), - 'no-restricted-properties': [ - 'error', - { message: 'Please use import() instead', object: 'require', property: 'ensure' }, - { message: 'Please use import() instead', object: 'System', property: 'import' }, - ], - 'no-restricted-syntax': ['error', 'WithStatement'], - 'no-return-assign': 'error', - 'no-return-await': 'error', - 'no-script-url': 'error', - 'no-self-assign': 'error', - 'no-self-compare': 'error', - 'no-sequences': 'error', - 'no-setter-return': 'error', - 'no-shadow': ['error', { allow: ['fastify', 'next'], builtinGlobals: true }], - 'no-shadow-restricted-names': 'error', - 'no-sparse-arrays': 'error', - 'no-sync': 'error', - 'no-tabs': 'error', - 'no-template-curly-in-string': 'error', - 'no-this-before-super': 'error', - 'no-throw-literal': 'error', - 'no-trailing-spaces': 'error', - 'no-undef': 'error', - 'no-undef-init': 'error', - 'no-unexpected-multiline': 'error', - 'no-unmodified-loop-condition': 'error', - 'no-unneeded-ternary': 'error', - 'no-unreachable': 'error', - 'no-unsafe-finally': 'error', - 'no-unsafe-negation': 'error', - 'no-unsafe-optional-chaining': 'error', - 'no-unused-expressions': ['error', { allowShortCircuit: true, allowTaggedTemplates: true, allowTernary: true }], - 'no-unused-labels': 'error', - 'no-unused-vars': [ - 'error', - { - argsIgnorePattern: '^_(?:[0-9]+)?', - destructuredArrayIgnorePattern: '^_(?:[0-9]+)?', - ignoreRestSiblings: true, - }, - ], - 'no-use-before-define': ['error', { functions: false }], - 'no-useless-backreference': 'error', - 'no-useless-call': 'error', - 'no-useless-catch': 'error', - 'no-useless-computed-key': 'error', - 'no-useless-concat': 'error', - 'no-useless-constructor': 'error', - 'no-useless-escape': 'error', - 'no-useless-rename': ['error', { ignoreDestructuring: false, ignoreExport: false, ignoreImport: false }], - 'no-useless-return': 'error', - 'no-var': 'error', - 'no-void': 'error', - 'no-whitespace-before-property': 'error', - 'no-with': 'error', - 'nonblock-statement-body-position': 'error', - 'object-curly-spacing': ['error', 'always'], - 'object-property-newline': ['error', { allowMultiplePropertiesPerLine: true }], - 'object-shorthand': 'error', - 'one-var-declaration-per-line': 'error', - 'operator-assignment': 'error', - 'operator-linebreak': ['error', 'before'], - 'padded-blocks': ['error', 'never'], - 'prefer-arrow-callback': ['error', { allowNamedFunctions: true }], - 'prefer-const': 'error', - 'prefer-destructuring': ['error', { - AssignmentExpression: { - array: false, - object: false, - }, - VariableDeclarator: { - array: true, - object: true, - }, - }, { - enforceForRenamedProperties: false, - }], - 'prefer-object-spread': 'error', - 'prefer-promise-reject-errors': 'error', - 'prefer-rest-params': 'error', - 'prefer-spread': 'error', - 'prefer-template': 'error', - 'quote-props': ['error', 'as-needed'], - quotes: ['error', 'single', { allowTemplateLiterals: true, avoidEscape: true }], - 'require-atomic-updates': 'error', - 'require-yield': 'error', - 'rest-spread-spacing': ['error', 'never'], - semi: ['error', 'never'], - 'semi-spacing': 'error', - 'sort-imports': 'off', - 'space-before-blocks': 'error', - 'space-before-function-paren': ['error', { anonymous: 'always', named: 'never' }], - 'space-in-parens': 'error', - 'space-infix-ops': 'error', - 'space-unary-ops': 'error', - 'spaced-comment': ['error', 'always', { exceptions: ['!'] }], - strict: ['error', 'never'], - 'symbol-description': 'error', - 'template-curly-spacing': 'error', - 'template-tag-spacing': 'error', - 'unicode-bom': ['error', 'never'], - 'use-isnan': 'error', - 'valid-jsdoc': 'error', - 'valid-typeof': ['error', { requireStringLiterals: true }], - 'vars-on-top': 'error', - 'wrap-iife': 'error', - 'yield-star-spacing': 'error', - - // https://github.com/benmosher/eslint-plugin-import/tree/master/docs/rules - 'import/default': 'error', - 'import/export': 'error', - 'import/namespace': 'error', - 'import/no-duplicates': 'error', - 'import/no-named-as-default': 'error', - 'import/no-named-as-default-member': 'error', - 'import/order': [ - 'error', - { - alphabetize: { caseInsensitive: true, order: 'asc' }, - groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], - 'newlines-between': 'always', - }, - ], - - // https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules - 'n/callback-return': ['error', ['callback', 'cb', 'next', 'done']], - - // https://github.com/leo-buneev/eslint-plugin-sort-keys-fix - 'sort-keys-fix/sort-keys-fix': ['error', 'asc'], - }, - - settings: { - 'import/ignore': ['ora'], - }, -} diff --git a/.gitignore b/.gitignore index aead6fd..9738be1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,6 @@ dist/ !.yarn/releases !.yarn/sdks !.yarn/versions -.pnp.* +# .pnp.* .DS_Store diff --git a/.husky/pre-commit b/.husky/pre-commit index 3117a0b..2522bd7 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,5 +1,3 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - yarn lint +yarn build yarn test diff --git a/.mocharc.js b/.mocharc.js deleted file mode 100644 index 6d98a0d..0000000 --- a/.mocharc.js +++ /dev/null @@ -1,7 +0,0 @@ -/** @type {import('mocha').MochaOptions} */ -const options = { - require: ['ts-node/register'], - extension: ['ts'], -} - -module.exports = options \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 66e5806..e05b3a3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,7 @@ "**/.pnp.*": true }, "eslint.nodePath": ".yarn/sdks", - "typescript.tsdk": ".yarn/sdks/typescript/lib", - "typescript.enablePromptUseWorkspaceTsdk": true + "typescript.tsdk": "node_modules/typescript/lib", + "typescript.enablePromptUseWorkspaceTsdk": true, + "eslint.useFlatConfig": true } diff --git a/.yarn/plugins/@yarnpkg/plugin-version.cjs b/.yarn/plugins/@yarnpkg/plugin-version.cjs deleted file mode 100644 index 87de4f4..0000000 --- a/.yarn/plugins/@yarnpkg/plugin-version.cjs +++ /dev/null @@ -1,550 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-version", -factory: function (require) { -var plugin=(()=>{var ZB=Object.create,zy=Object.defineProperty,$B=Object.defineProperties,eU=Object.getOwnPropertyDescriptor,tU=Object.getOwnPropertyDescriptors,nU=Object.getOwnPropertyNames,uS=Object.getOwnPropertySymbols,rU=Object.getPrototypeOf,oS=Object.prototype.hasOwnProperty,iU=Object.prototype.propertyIsEnumerable;var lS=(i,o,f)=>o in i?zy(i,o,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[o]=f,E0=(i,o)=>{for(var f in o||(o={}))oS.call(o,f)&&lS(i,f,o[f]);if(uS)for(var f of uS(o))iU.call(o,f)&&lS(i,f,o[f]);return i},Gf=(i,o)=>$B(i,tU(o)),uU=i=>zy(i,"__esModule",{value:!0});var ce=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),sS=(i,o)=>{for(var f in o)zy(i,f,{get:o[f],enumerable:!0})},oU=(i,o,f)=>{if(o&&typeof o=="object"||typeof o=="function")for(let p of nU(o))!oS.call(i,p)&&p!=="default"&&zy(i,p,{get:()=>o[p],enumerable:!(f=eU(o,p))||f.enumerable});return i},Mi=i=>oU(uU(zy(i!=null?ZB(rU(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var eD=ce((F$,aS)=>{function lU(i,o){for(var f=-1,p=i==null?0:i.length,E=Array(p);++f
{function sU(){this.__data__=[],this.size=0}fS.exports=sU});var tD=ce((P$,dS)=>{function aU(i,o){return i===o||i!==i&&o!==o}dS.exports=aU});var qy=ce((I$,pS)=>{var fU=tD();function cU(i,o){for(var f=i.length;f--;)if(fU(i[f][0],o))return f;return-1}pS.exports=cU});var vS=ce((B$,hS)=>{var dU=qy(),pU=Array.prototype,hU=pU.splice;function vU(i){var o=this.__data__,f=dU(o,i);if(f<0)return!1;var p=o.length-1;return f==p?o.pop():hU.call(o,f,1),--this.size,!0}hS.exports=vU});var yS=ce((U$,mS)=>{var mU=qy();function yU(i){var o=this.__data__,f=mU(o,i);return f<0?void 0:o[f][1]}mS.exports=yU});var _S=ce((j$,gS)=>{var gU=qy();function _U(i){return gU(this.__data__,i)>-1}gS.exports=_U});var DS=ce((z$,ES)=>{var EU=qy();function DU(i,o){var f=this.__data__,p=EU(f,i);return p<0?(++this.size,f.push([i,o])):f[p][1]=o,this}ES.exports=DU});var Hy=ce((q$,wS)=>{var wU=cS(),SU=vS(),TU=yS(),CU=_S(),xU=DS();function jv(i){var o=-1,f=i==null?0:i.length;for(this.clear();++o {var xz=sd(),Az=function(){try{var i=xz(Object,"defineProperty");return i({},"",{}),i}catch(o){}}();UT.exports=Az});var sD=ce((Aee,jT)=>{var zT=lD();function Rz(i,o,f){o=="__proto__"&&zT?zT(i,o,{configurable:!0,enumerable:!0,value:f,writable:!0}):i[o]=f}jT.exports=Rz});var aD=ce((Ree,qT)=>{var Oz=sD(),kz=tD(),Mz=Object.prototype,Nz=Mz.hasOwnProperty;function Lz(i,o,f){var p=i[o];(!(Nz.call(i,o)&&kz(p,f))||f===void 0&&!(o in i))&&Oz(i,o,f)}qT.exports=Lz});var Gv=ce((Oee,HT)=>{var Fz=aD(),bz=sD();function Pz(i,o,f,p){var E=!f;f||(f={});for(var t=-1,k=o.length;++t {function LH(i,o){for(var f=-1,p=i==null?0:i.length,E=0,t=[];++f {function FH(){return[]}qC.exports=FH});var U_=ce((nte,HC)=>{var bH=zC(),PH=yD(),IH=Object.prototype,BH=IH.propertyIsEnumerable,WC=Object.getOwnPropertySymbols,UH=WC?function(i){return i==null?[]:(i=Object(i),bH(WC(i),function(o){return BH.call(i,o)}))}:PH;HC.exports=UH});var GC=ce((rte,VC)=>{var jH=Gv(),zH=U_();function qH(i,o){return jH(i,zH(i),o)}VC.exports=qH});var j_=ce((ite,YC)=>{function HH(i,o){for(var f=-1,p=o.length,E=i.length;++f {var WH=vD(),VH=WH(Object.getPrototypeOf,Object);KC.exports=VH});var gD=ce((ote,XC)=>{var GH=j_(),YH=z_(),KH=U_(),XH=yD(),QH=Object.getOwnPropertySymbols,JH=QH?function(i){for(var o=[];i;)GH(o,KH(i)),i=YH(i);return o}:XH;XC.exports=JH});var JC=ce((lte,QC)=>{var ZH=Gv(),$H=gD();function eW(i,o){return ZH(i,$H(i),o)}QC.exports=eW});var _D=ce((ste,ZC)=>{var tW=j_(),nW=fd();function rW(i,o,f){var p=o(i);return nW(i)?p:tW(p,f(i))}ZC.exports=rW});var e6=ce((ate,$C)=>{var iW=_D(),uW=U_(),oW=I_();function lW(i){return iW(i,oW,uW)}$C.exports=lW});var ED=ce((fte,t6)=>{var sW=_D(),aW=gD(),fW=B_();function cW(i){return sW(i,fW,aW)}t6.exports=cW});var r6=ce((cte,n6)=>{var dW=sd(),pW=Yf(),hW=dW(pW,"DataView");n6.exports=hW});var u6=ce((dte,i6)=>{var vW=sd(),mW=Yf(),yW=vW(mW,"Promise");i6.exports=yW});var l6=ce((pte,o6)=>{var gW=sd(),_W=Yf(),EW=gW(_W,"Set");o6.exports=EW});var a6=ce((hte,s6)=>{var DW=sd(),wW=Yf(),SW=DW(wW,"WeakMap");s6.exports=SW});var q_=ce((vte,f6)=>{var DD=r6(),wD=L_(),SD=u6(),TD=l6(),CD=a6(),c6=Qp(),Qv=uD(),d6="[object Map]",TW="[object Object]",p6="[object Promise]",h6="[object Set]",v6="[object WeakMap]",m6="[object DataView]",CW=Qv(DD),xW=Qv(wD),AW=Qv(SD),RW=Qv(TD),OW=Qv(CD),Jp=c6;(DD&&Jp(new DD(new ArrayBuffer(1)))!=m6||wD&&Jp(new wD)!=d6||SD&&Jp(SD.resolve())!=p6||TD&&Jp(new TD)!=h6||CD&&Jp(new CD)!=v6)&&(Jp=function(i){var o=c6(i),f=o==TW?i.constructor:void 0,p=f?Qv(f):"";if(p)switch(p){case CW:return m6;case xW:return d6;case AW:return p6;case RW:return h6;case OW:return v6}return o});f6.exports=Jp});var g6=ce((mte,y6)=>{var kW=Object.prototype,MW=kW.hasOwnProperty;function NW(i){var o=i.length,f=new i.constructor(o);return o&&typeof i[0]=="string"&&MW.call(i,"index")&&(f.index=i.index,f.input=i.input),f}y6.exports=NW});var E6=ce((yte,_6)=>{var LW=Yf(),FW=LW.Uint8Array;_6.exports=FW});var H_=ce((gte,D6)=>{var w6=E6();function bW(i){var o=new i.constructor(i.byteLength);return new w6(o).set(new w6(i)),o}D6.exports=bW});var T6=ce((_te,S6)=>{var PW=H_();function IW(i,o){var f=o?PW(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}S6.exports=IW});var x6=ce((Ete,C6)=>{var BW=/\w*$/;function UW(i){var o=new i.constructor(i.source,BW.exec(i));return o.lastIndex=i.lastIndex,o}C6.exports=UW});var M6=ce((Dte,A6)=>{var R6=zv(),O6=R6?R6.prototype:void 0,k6=O6?O6.valueOf:void 0;function jW(i){return k6?Object(k6.call(i)):{}}A6.exports=jW});var L6=ce((wte,N6)=>{var zW=H_();function qW(i,o){var f=o?zW(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}N6.exports=qW});var b6=ce((Ste,F6)=>{var HW=H_(),WW=T6(),VW=x6(),GW=M6(),YW=L6(),KW="[object Boolean]",XW="[object Date]",QW="[object Map]",JW="[object Number]",ZW="[object RegExp]",$W="[object Set]",eV="[object String]",tV="[object Symbol]",nV="[object ArrayBuffer]",rV="[object DataView]",iV="[object Float32Array]",uV="[object Float64Array]",oV="[object Int8Array]",lV="[object Int16Array]",sV="[object Int32Array]",aV="[object Uint8Array]",fV="[object Uint8ClampedArray]",cV="[object Uint16Array]",dV="[object Uint32Array]";function pV(i,o,f){var p=i.constructor;switch(o){case nV:return HW(i);case KW:case XW:return new p(+i);case rV:return WW(i,f);case iV:case uV:case oV:case lV:case sV:case aV:case fV:case cV:case dV:return YW(i,f);case QW:return new p;case JW:case eV:return new p(i);case ZW:return VW(i);case $W:return new p;case tV:return GW(i)}}F6.exports=pV});var B6=ce((Tte,P6)=>{var hV=qv(),I6=Object.create,vV=function(){function i(){}return function(o){if(!hV(o))return{};if(I6)return I6(o);i.prototype=o;var f=new i;return i.prototype=void 0,f}}();P6.exports=vV});var j6=ce((Cte,U6)=>{var mV=B6(),yV=z_(),gV=P_();function _V(i){return typeof i.constructor=="function"&&!gV(i)?mV(yV(i)):{}}U6.exports=_V});var q6=ce((xte,z6)=>{var EV=q_(),DV=ad(),wV="[object Map]";function SV(i){return DV(i)&&EV(i)==wV}z6.exports=SV});var G6=ce((Ate,H6)=>{var TV=q6(),CV=F_(),W6=b_(),V6=W6&&W6.isMap,xV=V6?CV(V6):TV;H6.exports=xV});var K6=ce((Rte,Y6)=>{var AV=q_(),RV=ad(),OV="[object Set]";function kV(i){return RV(i)&&AV(i)==OV}Y6.exports=kV});var Z6=ce((Ote,X6)=>{var MV=K6(),NV=F_(),Q6=b_(),J6=Q6&&Q6.isSet,LV=J6?NV(J6):MV;X6.exports=LV});var rx=ce((kte,$6)=>{var FV=PT(),bV=BT(),PV=aD(),IV=CC(),BV=NC(),UV=IC(),jV=UC(),zV=GC(),qV=JC(),HV=e6(),WV=ED(),VV=q_(),GV=g6(),YV=b6(),KV=j6(),XV=fd(),QV=cD(),JV=G6(),ZV=qv(),$V=Z6(),eG=I_(),tG=B_(),nG=1,rG=2,iG=4,ex="[object Arguments]",uG="[object Array]",oG="[object Boolean]",lG="[object Date]",sG="[object Error]",tx="[object Function]",aG="[object GeneratorFunction]",fG="[object Map]",cG="[object Number]",nx="[object Object]",dG="[object RegExp]",pG="[object Set]",hG="[object String]",vG="[object Symbol]",mG="[object WeakMap]",yG="[object ArrayBuffer]",gG="[object DataView]",_G="[object Float32Array]",EG="[object Float64Array]",DG="[object Int8Array]",wG="[object Int16Array]",SG="[object Int32Array]",TG="[object Uint8Array]",CG="[object Uint8ClampedArray]",xG="[object Uint16Array]",AG="[object Uint32Array]",Wu={};Wu[ex]=Wu[uG]=Wu[yG]=Wu[gG]=Wu[oG]=Wu[lG]=Wu[_G]=Wu[EG]=Wu[DG]=Wu[wG]=Wu[SG]=Wu[fG]=Wu[cG]=Wu[nx]=Wu[dG]=Wu[pG]=Wu[hG]=Wu[vG]=Wu[TG]=Wu[CG]=Wu[xG]=Wu[AG]=!0;Wu[sG]=Wu[tx]=Wu[mG]=!1;function W_(i,o,f,p,E,t){var k,L=o&nG,N=o&rG,C=o&iG;if(f&&(k=E?f(i,p,E,t):f(i)),k!==void 0)return k;if(!ZV(i))return i;var U=XV(i);if(U){if(k=GV(i),!L)return jV(i,k)}else{var q=VV(i),W=q==tx||q==aG;if(QV(i))return UV(i,L);if(q==nx||q==ex||W&&!E){if(k=N||W?{}:KV(i),!L)return N?qV(i,BV(k,i)):zV(i,IV(k,i))}else{if(!Wu[q])return E?i:{};k=YV(i,q,L)}}t||(t=new FV);var ne=t.get(i);if(ne)return ne;t.set(i,k),$V(i)?i.forEach(function(Se){k.add(W_(Se,o,f,Se,i,t))}):JV(i)&&i.forEach(function(Se,he){k.set(he,W_(Se,o,f,he,i,t))});var m=C?N?WV:HV:N?tG:eG,we=U?void 0:m(i);return bV(we||i,function(Se,he){we&&(he=Se,Se=i[he]),PV(k,he,W_(Se,o,f,he,i,t))}),k}$6.exports=W_});var V_=ce((Mte,ix)=>{var RG=Qp(),OG=ad(),kG="[object Symbol]";function MG(i){return typeof i=="symbol"||OG(i)&&RG(i)==kG}ix.exports=MG});var ox=ce((Nte,ux)=>{var NG=fd(),LG=V_(),FG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bG=/^\w*$/;function PG(i,o){if(NG(i))return!1;var f=typeof i;return f=="number"||f=="symbol"||f=="boolean"||i==null||LG(i)?!0:bG.test(i)||!FG.test(i)||o!=null&&i in Object(o)}ux.exports=PG});var ax=ce((Lte,lx)=>{var sx=oD(),IG="Expected a function";function xD(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(IG);var f=function(){var p=arguments,E=o?o.apply(this,p):p[0],t=f.cache;if(t.has(E))return t.get(E);var k=i.apply(this,p);return f.cache=t.set(E,k)||t,k};return f.cache=new(xD.Cache||sx),f}xD.Cache=sx;lx.exports=xD});var cx=ce((Fte,fx)=>{var BG=ax(),UG=500;function jG(i){var o=BG(i,function(p){return f.size===UG&&f.clear(),p}),f=o.cache;return o}fx.exports=jG});var px=ce((bte,dx)=>{var zG=cx(),qG=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,HG=/\\(\\)?/g,WG=zG(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(qG,function(f,p,E,t){o.push(E?t.replace(HG,"$1"):p||f)}),o});dx.exports=WG});var _x=ce((Pte,hx)=>{var vx=zv(),VG=eD(),GG=fd(),YG=V_(),KG=1/0,mx=vx?vx.prototype:void 0,yx=mx?mx.toString:void 0;function gx(i){if(typeof i=="string")return i;if(GG(i))return VG(i,gx)+"";if(YG(i))return yx?yx.call(i):"";var o=i+"";return o=="0"&&1/i==-KG?"-0":o}hx.exports=gx});var Dx=ce((Ite,Ex)=>{var XG=_x();function QG(i){return i==null?"":XG(i)}Ex.exports=QG});var G_=ce((Bte,wx)=>{var JG=fd(),ZG=ox(),$G=px(),eY=Dx();function tY(i,o){return JG(i)?i:ZG(i,o)?[i]:$G(eY(i))}wx.exports=tY});var Tx=ce((Ute,Sx)=>{function nY(i){var o=i==null?0:i.length;return o?i[o-1]:void 0}Sx.exports=nY});var AD=ce((jte,Cx)=>{var rY=V_(),iY=1/0;function uY(i){if(typeof i=="string"||rY(i))return i;var o=i+"";return o=="0"&&1/i==-iY?"-0":o}Cx.exports=uY});var Ax=ce((zte,xx)=>{var oY=G_(),lY=AD();function sY(i,o){o=oY(o,i);for(var f=0,p=o.length;i!=null&&f {function aY(i,o,f){var p=-1,E=i.length;o<0&&(o=-o>E?0:E+o),f=f>E?E:f,f<0&&(f+=E),E=o>f?0:f-o>>>0,o>>>=0;for(var t=Array(E);++p1&&arguments[1]!==void 0?arguments[1]:NaN,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Jf.DIRECTION_LTR;return k.call(this,L,N,C)}),$K({Config:o.Config,Node:o.Node,Layout:i("Layout",eX),Size:i("Size",C9),Value:i("Value",x9),getInstanceCount:function(){return o.getInstanceCount.apply(o,arguments)}},Jf)}});var R9=ce((exports,module)=>{(function(i,o){typeof define=="function"&&define.amd?define([],function(){return o}):typeof module=="object"&&module.exports?module.exports=o:(i.nbind=i.nbind||{}).init=o})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(i,o){return function(){i&&i.apply(this,arguments);try{Module.ccall("nbind_init")}catch(f){o(f);return}o(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module!="undefined"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof require=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(o,f){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),o=nodePath.normalize(o);var p=nodeFS.readFileSync(o);return f?p:p.toString()},Module.readBinary=function(o){var f=Module.read(o,!0);return f.buffer||(f=new Uint8Array(f)),assert(f.buffer),f},Module.load=function(o){globalEval(read(o))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module!="undefined"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr!="undefined"&&(Module.printErr=printErr),typeof read!="undefined"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(o){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(o));var f=read(o,"binary");return assert(typeof f=="object"),f},typeof scriptArgs!="undefined"?Module.arguments=scriptArgs:typeof arguments!="undefined"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(i,o){quit(i)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(o){var f=new XMLHttpRequest;return f.open("GET",o,!1),f.send(null),f.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(o){var f=new XMLHttpRequest;return f.open("GET",o,!1),f.responseType="arraybuffer",f.send(null),new Uint8Array(f.response)}),Module.readAsync=function(o,f,p){var E=new XMLHttpRequest;E.open("GET",o,!0),E.responseType="arraybuffer",E.onload=function(){E.status==200||E.status==0&&E.response?f(E.response):p()},E.onerror=p,E.send(null)},typeof arguments!="undefined"&&(Module.arguments=arguments),typeof console!="undefined")Module.print||(Module.print=function(o){console.log(o)}),Module.printErr||(Module.printErr=function(o){console.warn(o)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump!="undefined"?function(i){dump(i)}:function(i){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle=="undefined"&&(Module.setWindowTitle=function(i){document.title=i})}else throw"Unknown runtime environment. Where are we?";function globalEval(i){eval.call(null,i)}!Module.load&&Module.read&&(Module.load=function(o){globalEval(Module.read(o))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(i,o){throw o}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(i){return tempRet0=i,i},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(i){STACKTOP=i},getNativeTypeSize:function(i){switch(i){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(i[i.length-1]==="*")return Runtime.QUANTUM_SIZE;if(i[0]==="i"){var o=parseInt(i.substr(1));return assert(o%8==0),o/8}else return 0}}},getNativeFieldSize:function(i){return Math.max(Runtime.getNativeTypeSize(i),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(i,o){return o==="double"||o==="i64"?i&7&&(assert((i&7)==4),i+=4):assert((i&3)==0),i},getAlignSize:function(i,o,f){return!f&&(i=="i64"||i=="double")?8:i?Math.min(o||(i?Runtime.getNativeFieldSize(i):0),Runtime.QUANTUM_SIZE):Math.min(o,8)},dynCall:function(i,o,f){return f&&f.length?Module["dynCall_"+i].apply(null,[o].concat(f)):Module["dynCall_"+i].call(null,o)},functionPointers:[],addFunction:function(i){for(var o=0;o
>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?P>>>0>>1>>>0?S>>>0>>1>>>0?S>>>0