mimo-reasonix 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/package.json +1 -1
- package/node_modules/@alcalzone/ansi-tokenize/LICENSE +21 -0
- package/node_modules/@alcalzone/ansi-tokenize/README.md +278 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.d.ts +7 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js +57 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/consts.d.ts +17 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/consts.js +28 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/consts.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/diff.d.ts +6 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/diff.js +26 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/diff.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/index.d.ts +6 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/index.js +7 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/index.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/reduce.d.ts +5 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/reduce.js +37 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/reduce.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/styledChars.d.ts +6 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/styledChars.js +38 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/styledChars.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.d.ts +16 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js +194 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/tokenize.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/undo.d.ts +3 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/undo.js +11 -0
- package/node_modules/@alcalzone/ansi-tokenize/build/undo.js.map +1 -0
- package/node_modules/@alcalzone/ansi-tokenize/package.json +55 -0
- package/node_modules/ansi-regex/index.d.ts +33 -0
- package/node_modules/ansi-regex/index.js +14 -0
- package/node_modules/ansi-regex/license +9 -0
- package/node_modules/ansi-regex/package.json +61 -0
- package/node_modules/ansi-regex/readme.md +66 -0
- package/node_modules/ansi-styles/index.d.ts +236 -0
- package/node_modules/ansi-styles/index.js +223 -0
- package/node_modules/ansi-styles/license +9 -0
- package/node_modules/ansi-styles/package.json +54 -0
- package/node_modules/ansi-styles/readme.md +173 -0
- package/node_modules/auto-bind/index.d.ts +50 -0
- package/node_modules/auto-bind/index.js +41 -0
- package/node_modules/auto-bind/license +9 -0
- package/node_modules/auto-bind/package.json +51 -0
- package/node_modules/auto-bind/react.d.ts +26 -0
- package/node_modules/auto-bind/react.js +28 -0
- package/node_modules/auto-bind/readme.md +92 -0
- package/node_modules/bidi-js/LICENSE.txt +22 -0
- package/node_modules/bidi-js/README.md +133 -0
- package/node_modules/bidi-js/dist/bidi.js +1010 -0
- package/node_modules/bidi-js/dist/bidi.min.js +1 -0
- package/node_modules/bidi-js/dist/bidi.min.mjs +1 -0
- package/node_modules/bidi-js/dist/bidi.mjs +1002 -0
- package/node_modules/bidi-js/package.json +39 -0
- package/node_modules/bidi-js/src/brackets.js +30 -0
- package/node_modules/bidi-js/src/charTypes.js +66 -0
- package/node_modules/bidi-js/src/data/bidiBrackets.data.js +5 -0
- package/node_modules/bidi-js/src/data/bidiCharTypes.data.js +25 -0
- package/node_modules/bidi-js/src/data/bidiMirroring.data.js +2 -0
- package/node_modules/bidi-js/src/embeddingLevels.js +690 -0
- package/node_modules/bidi-js/src/index.js +5 -0
- package/node_modules/bidi-js/src/mirroring.js +48 -0
- package/node_modules/bidi-js/src/reordering.js +99 -0
- package/node_modules/bidi-js/src/util/parseCharacterMap.js +30 -0
- package/node_modules/chalk/license +9 -0
- package/node_modules/chalk/package.json +83 -0
- package/node_modules/chalk/readme.md +297 -0
- package/node_modules/chalk/source/index.d.ts +325 -0
- package/node_modules/chalk/source/index.js +225 -0
- package/node_modules/chalk/source/utilities.js +33 -0
- package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
- package/node_modules/cli-boxes/boxes.json +82 -0
- package/node_modules/cli-boxes/index.d.ts +122 -0
- package/node_modules/cli-boxes/index.js +3 -0
- package/node_modules/cli-boxes/license +9 -0
- package/node_modules/cli-boxes/package.json +49 -0
- package/node_modules/cli-boxes/readme.md +103 -0
- package/node_modules/code-excerpt/dist/index.d.ts +9 -0
- package/node_modules/code-excerpt/dist/index.js +27 -0
- package/node_modules/code-excerpt/license +21 -0
- package/node_modules/code-excerpt/package.json +43 -0
- package/node_modules/code-excerpt/readme.md +65 -0
- package/node_modules/convert-to-spaces/dist/index.d.ts +2 -0
- package/node_modules/convert-to-spaces/dist/index.js +4 -0
- package/node_modules/convert-to-spaces/license +21 -0
- package/node_modules/convert-to-spaces/package.json +40 -0
- package/node_modules/convert-to-spaces/readme.md +39 -0
- package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/node_modules/emoji-regex/README.md +107 -0
- package/node_modules/emoji-regex/index.d.ts +3 -0
- package/node_modules/emoji-regex/index.js +4 -0
- package/node_modules/emoji-regex/index.mjs +4 -0
- package/node_modules/emoji-regex/package.json +45 -0
- package/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/node_modules/escape-string-regexp/index.js +11 -0
- package/node_modules/escape-string-regexp/license +9 -0
- package/node_modules/escape-string-regexp/package.json +43 -0
- package/node_modules/escape-string-regexp/readme.md +29 -0
- package/node_modules/get-east-asian-width/index.d.ts +60 -0
- package/node_modules/get-east-asian-width/index.js +30 -0
- package/node_modules/get-east-asian-width/license +9 -0
- package/node_modules/get-east-asian-width/lookup-data.js +18 -0
- package/node_modules/get-east-asian-width/lookup.js +135 -0
- package/node_modules/get-east-asian-width/package.json +71 -0
- package/node_modules/get-east-asian-width/readme.md +65 -0
- package/node_modules/get-east-asian-width/utilities.js +24 -0
- package/node_modules/indent-string/index.d.ts +38 -0
- package/node_modules/indent-string/index.js +38 -0
- package/node_modules/indent-string/license +9 -0
- package/node_modules/indent-string/package.json +40 -0
- package/node_modules/indent-string/readme.md +73 -0
- package/node_modules/ink/LICENSE +30 -0
- package/node_modules/ink/package.json +53 -0
- package/node_modules/ink/src/Ansi.tsx +254 -0
- package/node_modules/ink/src/_internal/debug.ts +27 -0
- package/node_modules/ink/src/_internal/earlyInput.ts +7 -0
- package/node_modules/ink/src/_internal/env.ts +38 -0
- package/node_modules/ink/src/_internal/envUtils.ts +13 -0
- package/node_modules/ink/src/_internal/execFileNoThrow.ts +58 -0
- package/node_modules/ink/src/_internal/fullscreen.ts +9 -0
- package/node_modules/ink/src/_internal/intl.ts +13 -0
- package/node_modules/ink/src/_internal/iter-lines.ts +14 -0
- package/node_modules/ink/src/_internal/log.ts +15 -0
- package/node_modules/ink/src/_internal/semver.ts +12 -0
- package/node_modules/ink/src/_internal/sliceAnsi.ts +6 -0
- package/node_modules/ink/src/_internal/state.ts +22 -0
- package/node_modules/ink/src/_internal/yoga-layout.ts +23 -0
- package/node_modules/ink/src/ambient.d.ts +47 -0
- package/node_modules/ink/src/bidi.ts +110 -0
- package/node_modules/ink/src/clearTerminal.ts +53 -0
- package/node_modules/ink/src/colorize.ts +129 -0
- package/node_modules/ink/src/components/AlternateScreen.tsx +49 -0
- package/node_modules/ink/src/components/App.tsx +700 -0
- package/node_modules/ink/src/components/AppContext.ts +17 -0
- package/node_modules/ink/src/components/Box.tsx +105 -0
- package/node_modules/ink/src/components/Button.tsx +96 -0
- package/node_modules/ink/src/components/ClockContext.tsx +94 -0
- package/node_modules/ink/src/components/CursorDeclarationContext.ts +23 -0
- package/node_modules/ink/src/components/ErrorOverview.tsx +116 -0
- package/node_modules/ink/src/components/Link.tsx +27 -0
- package/node_modules/ink/src/components/Newline.tsx +11 -0
- package/node_modules/ink/src/components/NoSelect.tsx +16 -0
- package/node_modules/ink/src/components/RawAnsi.tsx +18 -0
- package/node_modules/ink/src/components/ScrollBox.tsx +209 -0
- package/node_modules/ink/src/components/Spacer.tsx +6 -0
- package/node_modules/ink/src/components/StdinContext.ts +35 -0
- package/node_modules/ink/src/components/TerminalFocusContext.tsx +37 -0
- package/node_modules/ink/src/components/TerminalSizeContext.tsx +9 -0
- package/node_modules/ink/src/components/Text.tsx +85 -0
- package/node_modules/ink/src/components/TextInput.tsx +140 -0
- package/node_modules/ink/src/constants.ts +2 -0
- package/node_modules/ink/src/cursor.ts +6 -0
- package/node_modules/ink/src/devtools.ts +2 -0
- package/node_modules/ink/src/dom.ts +451 -0
- package/node_modules/ink/src/events/click-event.ts +19 -0
- package/node_modules/ink/src/events/dispatcher.ts +185 -0
- package/node_modules/ink/src/events/emitter.ts +37 -0
- package/node_modules/ink/src/events/event-handlers.ts +60 -0
- package/node_modules/ink/src/events/event.ts +12 -0
- package/node_modules/ink/src/events/focus-event.ts +13 -0
- package/node_modules/ink/src/events/input-event.ts +212 -0
- package/node_modules/ink/src/events/keyboard-event.ts +41 -0
- package/node_modules/ink/src/events/paste-event.ts +11 -0
- package/node_modules/ink/src/events/resize-event.ts +13 -0
- package/node_modules/ink/src/events/terminal-event.ts +99 -0
- package/node_modules/ink/src/events/terminal-focus-event.ts +13 -0
- package/node_modules/ink/src/focus.ts +159 -0
- package/node_modules/ink/src/frame.ts +105 -0
- package/node_modules/ink/src/get-max-width.ts +10 -0
- package/node_modules/ink/src/hit-test.ts +107 -0
- package/node_modules/ink/src/hooks/use-animation-frame.ts +33 -0
- package/node_modules/ink/src/hooks/use-app.ts +6 -0
- package/node_modules/ink/src/hooks/use-declared-cursor.ts +59 -0
- package/node_modules/ink/src/hooks/use-input.ts +57 -0
- package/node_modules/ink/src/hooks/use-interval.ts +53 -0
- package/node_modules/ink/src/hooks/use-search-highlight.ts +41 -0
- package/node_modules/ink/src/hooks/use-selection.ts +86 -0
- package/node_modules/ink/src/hooks/use-stdin.ts +6 -0
- package/node_modules/ink/src/hooks/use-tab-status.ts +68 -0
- package/node_modules/ink/src/hooks/use-terminal-focus.ts +8 -0
- package/node_modules/ink/src/hooks/use-terminal-title.ts +21 -0
- package/node_modules/ink/src/hooks/use-terminal-viewport.ts +77 -0
- package/node_modules/ink/src/index.ts +150 -0
- package/node_modules/ink/src/ink.tsx +1499 -0
- package/node_modules/ink/src/instances.ts +5 -0
- package/node_modules/ink/src/layout/engine.ts +10 -0
- package/node_modules/ink/src/layout/geometry.ts +116 -0
- package/node_modules/ink/src/layout/node.ts +178 -0
- package/node_modules/ink/src/layout/yoga.ts +316 -0
- package/node_modules/ink/src/line-width-cache.ts +19 -0
- package/node_modules/ink/src/log-update.ts +777 -0
- package/node_modules/ink/src/measure-element.ts +14 -0
- package/node_modules/ink/src/measure-text.ts +29 -0
- package/node_modules/ink/src/node-cache.ts +58 -0
- package/node_modules/ink/src/optimizer.ts +65 -0
- package/node_modules/ink/src/output.ts +730 -0
- package/node_modules/ink/src/parse-keypress.ts +751 -0
- package/node_modules/ink/src/react-jsx-aug.d.ts +14 -0
- package/node_modules/ink/src/reconciler.ts +508 -0
- package/node_modules/ink/src/render-border.ts +230 -0
- package/node_modules/ink/src/render-node-to-output.ts +1477 -0
- package/node_modules/ink/src/render-to-screen.ts +201 -0
- package/node_modules/ink/src/renderer.ts +183 -0
- package/node_modules/ink/src/root.ts +148 -0
- package/node_modules/ink/src/screen.ts +1301 -0
- package/node_modules/ink/src/searchHighlight.ts +68 -0
- package/node_modules/ink/src/selection.ts +742 -0
- package/node_modules/ink/src/squash-text-nodes.ts +70 -0
- package/node_modules/ink/src/stringWidth.ts +222 -0
- package/node_modules/ink/src/styles.ts +603 -0
- package/node_modules/ink/src/supports-hyperlinks.ts +41 -0
- package/node_modules/ink/src/tabstops.ts +39 -0
- package/node_modules/ink/src/terminal-focus-state.ts +46 -0
- package/node_modules/ink/src/terminal-querier.ts +143 -0
- package/node_modules/ink/src/terminal.ts +220 -0
- package/node_modules/ink/src/termio/ansi.ts +66 -0
- package/node_modules/ink/src/termio/csi.ts +290 -0
- package/node_modules/ink/src/termio/dec.ts +52 -0
- package/node_modules/ink/src/termio/esc.ts +63 -0
- package/node_modules/ink/src/termio/osc.ts +364 -0
- package/node_modules/ink/src/termio/parser.ts +383 -0
- package/node_modules/ink/src/termio/sgr.ts +331 -0
- package/node_modules/ink/src/termio/tokenize.ts +311 -0
- package/node_modules/ink/src/termio/types.ts +225 -0
- package/node_modules/ink/src/termio.ts +20 -0
- package/node_modules/ink/src/useTerminalNotification.ts +124 -0
- package/node_modules/ink/src/warn.ts +10 -0
- package/node_modules/ink/src/widest-line.ts +12 -0
- package/node_modules/ink/src/wrap-text.ts +55 -0
- package/node_modules/ink/src/wrapAnsi.ts +15 -0
- package/node_modules/ink/tsconfig.json +26 -0
- package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/node_modules/is-fullwidth-code-point/index.js +12 -0
- package/node_modules/is-fullwidth-code-point/license +9 -0
- package/node_modules/is-fullwidth-code-point/package.json +53 -0
- package/node_modules/is-fullwidth-code-point/readme.md +31 -0
- package/node_modules/lodash-es/LICENSE +47 -0
- package/node_modules/lodash-es/README.md +10 -0
- package/node_modules/lodash-es/_DataView.js +7 -0
- package/node_modules/lodash-es/_Hash.js +32 -0
- package/node_modules/lodash-es/_LazyWrapper.js +28 -0
- package/node_modules/lodash-es/_ListCache.js +32 -0
- package/node_modules/lodash-es/_LodashWrapper.js +22 -0
- package/node_modules/lodash-es/_Map.js +7 -0
- package/node_modules/lodash-es/_MapCache.js +32 -0
- package/node_modules/lodash-es/_Promise.js +7 -0
- package/node_modules/lodash-es/_Set.js +7 -0
- package/node_modules/lodash-es/_SetCache.js +27 -0
- package/node_modules/lodash-es/_Stack.js +27 -0
- package/node_modules/lodash-es/_Symbol.js +6 -0
- package/node_modules/lodash-es/_Uint8Array.js +6 -0
- package/node_modules/lodash-es/_WeakMap.js +7 -0
- package/node_modules/lodash-es/_addMapEntry.js +15 -0
- package/node_modules/lodash-es/_addSetEntry.js +15 -0
- package/node_modules/lodash-es/_apply.js +21 -0
- package/node_modules/lodash-es/_arrayAggregator.js +22 -0
- package/node_modules/lodash-es/_arrayEach.js +22 -0
- package/node_modules/lodash-es/_arrayEachRight.js +21 -0
- package/node_modules/lodash-es/_arrayEvery.js +23 -0
- package/node_modules/lodash-es/_arrayFilter.js +25 -0
- package/node_modules/lodash-es/_arrayIncludes.js +17 -0
- package/node_modules/lodash-es/_arrayIncludesWith.js +22 -0
- package/node_modules/lodash-es/_arrayLikeKeys.js +49 -0
- package/node_modules/lodash-es/_arrayMap.js +21 -0
- package/node_modules/lodash-es/_arrayPush.js +20 -0
- package/node_modules/lodash-es/_arrayReduce.js +26 -0
- package/node_modules/lodash-es/_arrayReduceRight.js +24 -0
- package/node_modules/lodash-es/_arraySample.js +15 -0
- package/node_modules/lodash-es/_arraySampleSize.js +17 -0
- package/node_modules/lodash-es/_arrayShuffle.js +15 -0
- package/node_modules/lodash-es/_arraySome.js +23 -0
- package/node_modules/lodash-es/_asciiSize.js +12 -0
- package/node_modules/lodash-es/_asciiToArray.js +12 -0
- package/node_modules/lodash-es/_asciiWords.js +15 -0
- package/node_modules/lodash-es/_assignMergeValue.js +20 -0
- package/node_modules/lodash-es/_assignValue.js +28 -0
- package/node_modules/lodash-es/_assocIndexOf.js +21 -0
- package/node_modules/lodash-es/_baseAggregator.js +21 -0
- package/node_modules/lodash-es/_baseAssign.js +17 -0
- package/node_modules/lodash-es/_baseAssignIn.js +17 -0
- package/node_modules/lodash-es/_baseAssignValue.js +25 -0
- package/node_modules/lodash-es/_baseAt.js +23 -0
- package/node_modules/lodash-es/_baseClamp.js +22 -0
- package/node_modules/lodash-es/_baseClone.js +166 -0
- package/node_modules/lodash-es/_baseConforms.js +18 -0
- package/node_modules/lodash-es/_baseConformsTo.js +27 -0
- package/node_modules/lodash-es/_baseCreate.js +30 -0
- package/node_modules/lodash-es/_baseDelay.js +21 -0
- package/node_modules/lodash-es/_baseDifference.js +67 -0
- package/node_modules/lodash-es/_baseEach.js +14 -0
- package/node_modules/lodash-es/_baseEachRight.js +14 -0
- package/node_modules/lodash-es/_baseEvery.js +21 -0
- package/node_modules/lodash-es/_baseExtremum.js +32 -0
- package/node_modules/lodash-es/_baseFill.js +32 -0
- package/node_modules/lodash-es/_baseFilter.js +21 -0
- package/node_modules/lodash-es/_baseFindIndex.js +24 -0
- package/node_modules/lodash-es/_baseFindKey.js +23 -0
- package/node_modules/lodash-es/_baseFlatten.js +38 -0
- package/node_modules/lodash-es/_baseFor.js +16 -0
- package/node_modules/lodash-es/_baseForOwn.js +16 -0
- package/node_modules/lodash-es/_baseForOwnRight.js +16 -0
- package/node_modules/lodash-es/_baseForRight.js +15 -0
- package/node_modules/lodash-es/_baseFunctions.js +19 -0
- package/node_modules/lodash-es/_baseGet.js +24 -0
- package/node_modules/lodash-es/_baseGetAllKeys.js +20 -0
- package/node_modules/lodash-es/_baseGetTag.js +28 -0
- package/node_modules/lodash-es/_baseGt.js +14 -0
- package/node_modules/lodash-es/_baseHas.js +19 -0
- package/node_modules/lodash-es/_baseHasIn.js +13 -0
- package/node_modules/lodash-es/_baseInRange.js +18 -0
- package/node_modules/lodash-es/_baseIndexOf.js +20 -0
- package/node_modules/lodash-es/_baseIndexOfWith.js +23 -0
- package/node_modules/lodash-es/_baseIntersection.js +74 -0
- package/node_modules/lodash-es/_baseInverter.js +21 -0
- package/node_modules/lodash-es/_baseInvoke.js +24 -0
- package/node_modules/lodash-es/_baseIsArguments.js +18 -0
- package/node_modules/lodash-es/_baseIsArrayBuffer.js +17 -0
- package/node_modules/lodash-es/_baseIsDate.js +18 -0
- package/node_modules/lodash-es/_baseIsEqual.js +28 -0
- package/node_modules/lodash-es/_baseIsEqualDeep.js +83 -0
- package/node_modules/lodash-es/_baseIsMap.js +18 -0
- package/node_modules/lodash-es/_baseIsMatch.js +62 -0
- package/node_modules/lodash-es/_baseIsNaN.js +12 -0
- package/node_modules/lodash-es/_baseIsNative.js +47 -0
- package/node_modules/lodash-es/_baseIsRegExp.js +18 -0
- package/node_modules/lodash-es/_baseIsSet.js +18 -0
- package/node_modules/lodash-es/_baseIsTypedArray.js +60 -0
- package/node_modules/lodash-es/_baseIteratee.js +31 -0
- package/node_modules/lodash-es/_baseKeys.js +30 -0
- package/node_modules/lodash-es/_baseKeysIn.js +33 -0
- package/node_modules/lodash-es/_baseLodash.js +10 -0
- package/node_modules/lodash-es/_baseLt.js +14 -0
- package/node_modules/lodash-es/_baseMap.js +22 -0
- package/node_modules/lodash-es/_baseMatches.js +22 -0
- package/node_modules/lodash-es/_baseMatchesProperty.js +33 -0
- package/node_modules/lodash-es/_baseMean.js +20 -0
- package/node_modules/lodash-es/_baseMerge.js +42 -0
- package/node_modules/lodash-es/_baseMergeDeep.js +94 -0
- package/node_modules/lodash-es/_baseNth.js +20 -0
- package/node_modules/lodash-es/_baseOrderBy.js +49 -0
- package/node_modules/lodash-es/_basePick.js +19 -0
- package/node_modules/lodash-es/_basePickBy.js +30 -0
- package/node_modules/lodash-es/_baseProperty.js +14 -0
- package/node_modules/lodash-es/_basePropertyDeep.js +16 -0
- package/node_modules/lodash-es/_basePropertyOf.js +14 -0
- package/node_modules/lodash-es/_basePullAll.js +51 -0
- package/node_modules/lodash-es/_basePullAt.js +37 -0
- package/node_modules/lodash-es/_baseRandom.js +18 -0
- package/node_modules/lodash-es/_baseRange.js +28 -0
- package/node_modules/lodash-es/_baseReduce.js +23 -0
- package/node_modules/lodash-es/_baseRepeat.js +35 -0
- package/node_modules/lodash-es/_baseRest.js +17 -0
- package/node_modules/lodash-es/_baseSample.js +15 -0
- package/node_modules/lodash-es/_baseSampleSize.js +18 -0
- package/node_modules/lodash-es/_baseSet.js +51 -0
- package/node_modules/lodash-es/_baseSetData.js +17 -0
- package/node_modules/lodash-es/_baseSetToString.js +22 -0
- package/node_modules/lodash-es/_baseShuffle.js +15 -0
- package/node_modules/lodash-es/_baseSlice.js +31 -0
- package/node_modules/lodash-es/_baseSome.js +22 -0
- package/node_modules/lodash-es/_baseSortBy.js +21 -0
- package/node_modules/lodash-es/_baseSortedIndex.js +42 -0
- package/node_modules/lodash-es/_baseSortedIndexBy.js +67 -0
- package/node_modules/lodash-es/_baseSortedUniq.js +30 -0
- package/node_modules/lodash-es/_baseSum.js +24 -0
- package/node_modules/lodash-es/_baseTimes.js +20 -0
- package/node_modules/lodash-es/_baseToNumber.js +24 -0
- package/node_modules/lodash-es/_baseToPairs.js +18 -0
- package/node_modules/lodash-es/_baseToString.js +37 -0
- package/node_modules/lodash-es/_baseTrim.js +19 -0
- package/node_modules/lodash-es/_baseUnary.js +14 -0
- package/node_modules/lodash-es/_baseUniq.js +72 -0
- package/node_modules/lodash-es/_baseUnset.js +52 -0
- package/node_modules/lodash-es/_baseUpdate.js +18 -0
- package/node_modules/lodash-es/_baseValues.js +19 -0
- package/node_modules/lodash-es/_baseWhile.js +26 -0
- package/node_modules/lodash-es/_baseWrapperValue.js +25 -0
- package/node_modules/lodash-es/_baseXor.js +36 -0
- package/node_modules/lodash-es/_baseZipObject.js +23 -0
- package/node_modules/lodash-es/_cacheHas.js +13 -0
- package/node_modules/lodash-es/_castArrayLikeObject.js +14 -0
- package/node_modules/lodash-es/_castFunction.js +14 -0
- package/node_modules/lodash-es/_castPath.js +21 -0
- package/node_modules/lodash-es/_castRest.js +14 -0
- package/node_modules/lodash-es/_castSlice.js +18 -0
- package/node_modules/lodash-es/_charsEndIndex.js +19 -0
- package/node_modules/lodash-es/_charsStartIndex.js +20 -0
- package/node_modules/lodash-es/_cloneArrayBuffer.js +16 -0
- package/node_modules/lodash-es/_cloneBuffer.js +35 -0
- package/node_modules/lodash-es/_cloneDataView.js +16 -0
- package/node_modules/lodash-es/_cloneMap.js +22 -0
- package/node_modules/lodash-es/_cloneRegExp.js +17 -0
- package/node_modules/lodash-es/_cloneSet.js +22 -0
- package/node_modules/lodash-es/_cloneSymbol.js +18 -0
- package/node_modules/lodash-es/_cloneTypedArray.js +16 -0
- package/node_modules/lodash-es/_compareAscending.js +41 -0
- package/node_modules/lodash-es/_compareMultiple.js +44 -0
- package/node_modules/lodash-es/_composeArgs.js +39 -0
- package/node_modules/lodash-es/_composeArgsRight.js +41 -0
- package/node_modules/lodash-es/_copyArray.js +20 -0
- package/node_modules/lodash-es/_copyObject.js +40 -0
- package/node_modules/lodash-es/_copySymbols.js +16 -0
- package/node_modules/lodash-es/_copySymbolsIn.js +16 -0
- package/node_modules/lodash-es/_coreJsData.js +6 -0
- package/node_modules/lodash-es/_countHolders.js +21 -0
- package/node_modules/lodash-es/_createAggregator.js +23 -0
- package/node_modules/lodash-es/_createAssigner.js +37 -0
- package/node_modules/lodash-es/_createBaseEach.js +32 -0
- package/node_modules/lodash-es/_createBaseFor.js +25 -0
- package/node_modules/lodash-es/_createBind.js +28 -0
- package/node_modules/lodash-es/_createCaseFirst.js +33 -0
- package/node_modules/lodash-es/_createCompounder.js +24 -0
- package/node_modules/lodash-es/_createCtor.js +37 -0
- package/node_modules/lodash-es/_createCurry.js +46 -0
- package/node_modules/lodash-es/_createFind.js +25 -0
- package/node_modules/lodash-es/_createFlow.js +78 -0
- package/node_modules/lodash-es/_createHybrid.js +92 -0
- package/node_modules/lodash-es/_createInverter.js +17 -0
- package/node_modules/lodash-es/_createMathOperation.js +38 -0
- package/node_modules/lodash-es/_createOver.js +27 -0
- package/node_modules/lodash-es/_createPadding.js +33 -0
- package/node_modules/lodash-es/_createPartial.js +43 -0
- package/node_modules/lodash-es/_createRange.js +30 -0
- package/node_modules/lodash-es/_createRecurry.js +56 -0
- package/node_modules/lodash-es/_createRelationalOperation.js +20 -0
- package/node_modules/lodash-es/_createRound.js +35 -0
- package/node_modules/lodash-es/_createSet.js +19 -0
- package/node_modules/lodash-es/_createToPairs.js +30 -0
- package/node_modules/lodash-es/_createWrap.js +106 -0
- package/node_modules/lodash-es/_customDefaultsAssignIn.js +29 -0
- package/node_modules/lodash-es/_customDefaultsMerge.js +28 -0
- package/node_modules/lodash-es/_customOmitClone.js +16 -0
- package/node_modules/lodash-es/_deburrLetter.js +71 -0
- package/node_modules/lodash-es/_defineProperty.js +11 -0
- package/node_modules/lodash-es/_equalArrays.js +84 -0
- package/node_modules/lodash-es/_equalByTag.js +112 -0
- package/node_modules/lodash-es/_equalObjects.js +90 -0
- package/node_modules/lodash-es/_escapeHtmlChar.js +21 -0
- package/node_modules/lodash-es/_escapeStringChar.js +22 -0
- package/node_modules/lodash-es/_flatRest.js +16 -0
- package/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/node_modules/lodash-es/_getAllKeys.js +16 -0
- package/node_modules/lodash-es/_getAllKeysIn.js +17 -0
- package/node_modules/lodash-es/_getData.js +15 -0
- package/node_modules/lodash-es/_getFuncName.js +31 -0
- package/node_modules/lodash-es/_getHolder.js +13 -0
- package/node_modules/lodash-es/_getMapData.js +18 -0
- package/node_modules/lodash-es/_getMatchData.js +24 -0
- package/node_modules/lodash-es/_getNative.js +17 -0
- package/node_modules/lodash-es/_getPrototype.js +6 -0
- package/node_modules/lodash-es/_getRawTag.js +46 -0
- package/node_modules/lodash-es/_getSymbols.js +30 -0
- package/node_modules/lodash-es/_getSymbolsIn.js +25 -0
- package/node_modules/lodash-es/_getTag.js +58 -0
- package/node_modules/lodash-es/_getValue.js +13 -0
- package/node_modules/lodash-es/_getView.js +33 -0
- package/node_modules/lodash-es/_getWrapDetails.js +17 -0
- package/node_modules/lodash-es/_hasPath.js +39 -0
- package/node_modules/lodash-es/_hasUnicode.js +26 -0
- package/node_modules/lodash-es/_hasUnicodeWord.js +15 -0
- package/node_modules/lodash-es/_hashClear.js +15 -0
- package/node_modules/lodash-es/_hashDelete.js +17 -0
- package/node_modules/lodash-es/_hashGet.js +30 -0
- package/node_modules/lodash-es/_hashHas.js +23 -0
- package/node_modules/lodash-es/_hashSet.js +23 -0
- package/node_modules/lodash-es/_initCloneArray.js +26 -0
- package/node_modules/lodash-es/_initCloneByTag.js +77 -0
- package/node_modules/lodash-es/_initCloneObject.js +18 -0
- package/node_modules/lodash-es/_insertWrapDetails.js +23 -0
- package/node_modules/lodash-es/_isFlattenable.js +20 -0
- package/node_modules/lodash-es/_isIndex.js +25 -0
- package/node_modules/lodash-es/_isIterateeCall.js +30 -0
- package/node_modules/lodash-es/_isKey.js +29 -0
- package/node_modules/lodash-es/_isKeyable.js +15 -0
- package/node_modules/lodash-es/_isLaziable.js +28 -0
- package/node_modules/lodash-es/_isMaskable.js +14 -0
- package/node_modules/lodash-es/_isMasked.js +20 -0
- package/node_modules/lodash-es/_isPrototype.js +18 -0
- package/node_modules/lodash-es/_isStrictComparable.js +15 -0
- package/node_modules/lodash-es/_iteratorToArray.js +18 -0
- package/node_modules/lodash-es/_lazyClone.js +23 -0
- package/node_modules/lodash-es/_lazyReverse.js +23 -0
- package/node_modules/lodash-es/_lazyValue.js +69 -0
- package/node_modules/lodash-es/_listCacheClear.js +13 -0
- package/node_modules/lodash-es/_listCacheDelete.js +35 -0
- package/node_modules/lodash-es/_listCacheGet.js +19 -0
- package/node_modules/lodash-es/_listCacheHas.js +16 -0
- package/node_modules/lodash-es/_listCacheSet.js +26 -0
- package/node_modules/lodash-es/_mapCacheClear.js +21 -0
- package/node_modules/lodash-es/_mapCacheDelete.js +18 -0
- package/node_modules/lodash-es/_mapCacheGet.js +16 -0
- package/node_modules/lodash-es/_mapCacheHas.js +16 -0
- package/node_modules/lodash-es/_mapCacheSet.js +22 -0
- package/node_modules/lodash-es/_mapToArray.js +18 -0
- package/node_modules/lodash-es/_matchesStrictComparable.js +20 -0
- package/node_modules/lodash-es/_memoizeCapped.js +26 -0
- package/node_modules/lodash-es/_mergeData.js +90 -0
- package/node_modules/lodash-es/_metaMap.js +6 -0
- package/node_modules/lodash-es/_nativeCreate.js +6 -0
- package/node_modules/lodash-es/_nativeKeys.js +6 -0
- package/node_modules/lodash-es/_nativeKeysIn.js +20 -0
- package/node_modules/lodash-es/_nodeUtil.js +30 -0
- package/node_modules/lodash-es/_objectToString.js +22 -0
- package/node_modules/lodash-es/_overArg.js +15 -0
- package/node_modules/lodash-es/_overRest.js +36 -0
- package/node_modules/lodash-es/_parent.js +16 -0
- package/node_modules/lodash-es/_reEscape.js +4 -0
- package/node_modules/lodash-es/_reEvaluate.js +4 -0
- package/node_modules/lodash-es/_reInterpolate.js +4 -0
- package/node_modules/lodash-es/_realNames.js +4 -0
- package/node_modules/lodash-es/_reorder.js +29 -0
- package/node_modules/lodash-es/_replaceHolders.js +29 -0
- package/node_modules/lodash-es/_root.js +9 -0
- package/node_modules/lodash-es/_safeGet.js +21 -0
- package/node_modules/lodash-es/_setCacheAdd.js +19 -0
- package/node_modules/lodash-es/_setCacheHas.js +14 -0
- package/node_modules/lodash-es/_setData.js +20 -0
- package/node_modules/lodash-es/_setToArray.js +18 -0
- package/node_modules/lodash-es/_setToPairs.js +18 -0
- package/node_modules/lodash-es/_setToString.js +14 -0
- package/node_modules/lodash-es/_setWrapToString.js +21 -0
- package/node_modules/lodash-es/_shortOut.js +37 -0
- package/node_modules/lodash-es/_shuffleSelf.js +28 -0
- package/node_modules/lodash-es/_stackClear.js +15 -0
- package/node_modules/lodash-es/_stackDelete.js +18 -0
- package/node_modules/lodash-es/_stackGet.js +14 -0
- package/node_modules/lodash-es/_stackHas.js +14 -0
- package/node_modules/lodash-es/_stackSet.js +34 -0
- package/node_modules/lodash-es/_strictIndexOf.js +23 -0
- package/node_modules/lodash-es/_strictLastIndexOf.js +21 -0
- package/node_modules/lodash-es/_stringSize.js +18 -0
- package/node_modules/lodash-es/_stringToArray.js +18 -0
- package/node_modules/lodash-es/_stringToPath.js +27 -0
- package/node_modules/lodash-es/_toKey.js +21 -0
- package/node_modules/lodash-es/_toSource.js +26 -0
- package/node_modules/lodash-es/_trimmedEndIndex.js +19 -0
- package/node_modules/lodash-es/_unescapeHtmlChar.js +21 -0
- package/node_modules/lodash-es/_unicodeSize.js +44 -0
- package/node_modules/lodash-es/_unicodeToArray.js +40 -0
- package/node_modules/lodash-es/_unicodeWords.js +69 -0
- package/node_modules/lodash-es/_updateWrapDetails.js +46 -0
- package/node_modules/lodash-es/_wrapperClone.js +23 -0
- package/node_modules/lodash-es/add.js +22 -0
- package/node_modules/lodash-es/after.js +42 -0
- package/node_modules/lodash-es/array.default.js +81 -0
- package/node_modules/lodash-es/array.js +66 -0
- package/node_modules/lodash-es/ary.js +29 -0
- package/node_modules/lodash-es/assign.js +58 -0
- package/node_modules/lodash-es/assignIn.js +40 -0
- package/node_modules/lodash-es/assignInWith.js +38 -0
- package/node_modules/lodash-es/assignWith.js +37 -0
- package/node_modules/lodash-es/at.js +23 -0
- package/node_modules/lodash-es/attempt.js +35 -0
- package/node_modules/lodash-es/before.js +40 -0
- package/node_modules/lodash-es/bind.js +57 -0
- package/node_modules/lodash-es/bindAll.js +41 -0
- package/node_modules/lodash-es/bindKey.js +68 -0
- package/node_modules/lodash-es/camelCase.js +29 -0
- package/node_modules/lodash-es/capitalize.js +23 -0
- package/node_modules/lodash-es/castArray.js +44 -0
- package/node_modules/lodash-es/ceil.js +26 -0
- package/node_modules/lodash-es/chain.js +38 -0
- package/node_modules/lodash-es/chunk.js +50 -0
- package/node_modules/lodash-es/clamp.js +39 -0
- package/node_modules/lodash-es/clone.js +36 -0
- package/node_modules/lodash-es/cloneDeep.js +29 -0
- package/node_modules/lodash-es/cloneDeepWith.js +40 -0
- package/node_modules/lodash-es/cloneWith.js +42 -0
- package/node_modules/lodash-es/collection.default.js +37 -0
- package/node_modules/lodash-es/collection.js +29 -0
- package/node_modules/lodash-es/commit.js +33 -0
- package/node_modules/lodash-es/compact.js +31 -0
- package/node_modules/lodash-es/concat.js +43 -0
- package/node_modules/lodash-es/cond.js +60 -0
- package/node_modules/lodash-es/conforms.js +35 -0
- package/node_modules/lodash-es/conformsTo.js +32 -0
- package/node_modules/lodash-es/constant.js +26 -0
- package/node_modules/lodash-es/countBy.js +40 -0
- package/node_modules/lodash-es/create.js +43 -0
- package/node_modules/lodash-es/curry.js +57 -0
- package/node_modules/lodash-es/curryRight.js +54 -0
- package/node_modules/lodash-es/date.default.js +5 -0
- package/node_modules/lodash-es/date.js +2 -0
- package/node_modules/lodash-es/debounce.js +191 -0
- package/node_modules/lodash-es/deburr.js +45 -0
- package/node_modules/lodash-es/defaultTo.js +25 -0
- package/node_modules/lodash-es/defaults.js +64 -0
- package/node_modules/lodash-es/defaultsDeep.js +30 -0
- package/node_modules/lodash-es/defer.js +26 -0
- package/node_modules/lodash-es/delay.js +28 -0
- package/node_modules/lodash-es/difference.js +33 -0
- package/node_modules/lodash-es/differenceBy.js +44 -0
- package/node_modules/lodash-es/differenceWith.js +40 -0
- package/node_modules/lodash-es/divide.js +22 -0
- package/node_modules/lodash-es/drop.js +38 -0
- package/node_modules/lodash-es/dropRight.js +39 -0
- package/node_modules/lodash-es/dropRightWhile.js +45 -0
- package/node_modules/lodash-es/dropWhile.js +45 -0
- package/node_modules/lodash-es/each.js +1 -0
- package/node_modules/lodash-es/eachRight.js +1 -0
- package/node_modules/lodash-es/endsWith.js +43 -0
- package/node_modules/lodash-es/entries.js +1 -0
- package/node_modules/lodash-es/entriesIn.js +1 -0
- package/node_modules/lodash-es/eq.js +37 -0
- package/node_modules/lodash-es/escape.js +43 -0
- package/node_modules/lodash-es/escapeRegExp.js +32 -0
- package/node_modules/lodash-es/every.js +56 -0
- package/node_modules/lodash-es/extend.js +1 -0
- package/node_modules/lodash-es/extendWith.js +1 -0
- package/node_modules/lodash-es/fill.js +45 -0
- package/node_modules/lodash-es/filter.js +52 -0
- package/node_modules/lodash-es/find.js +42 -0
- package/node_modules/lodash-es/findIndex.js +55 -0
- package/node_modules/lodash-es/findKey.js +44 -0
- package/node_modules/lodash-es/findLast.js +25 -0
- package/node_modules/lodash-es/findLastIndex.js +59 -0
- package/node_modules/lodash-es/findLastKey.js +44 -0
- package/node_modules/lodash-es/first.js +1 -0
- package/node_modules/lodash-es/flatMap.js +29 -0
- package/node_modules/lodash-es/flatMapDeep.js +31 -0
- package/node_modules/lodash-es/flatMapDepth.js +31 -0
- package/node_modules/lodash-es/flatten.js +22 -0
- package/node_modules/lodash-es/flattenDeep.js +25 -0
- package/node_modules/lodash-es/flattenDepth.js +33 -0
- package/node_modules/lodash-es/flip.js +28 -0
- package/node_modules/lodash-es/floor.js +26 -0
- package/node_modules/lodash-es/flow.js +27 -0
- package/node_modules/lodash-es/flowRight.js +26 -0
- package/node_modules/lodash-es/forEach.js +41 -0
- package/node_modules/lodash-es/forEachRight.js +31 -0
- package/node_modules/lodash-es/forIn.js +39 -0
- package/node_modules/lodash-es/forInRight.js +37 -0
- package/node_modules/lodash-es/forOwn.js +36 -0
- package/node_modules/lodash-es/forOwnRight.js +34 -0
- package/node_modules/lodash-es/fromPairs.js +30 -0
- package/node_modules/lodash-es/function.default.js +31 -0
- package/node_modules/lodash-es/function.js +24 -0
- package/node_modules/lodash-es/functions.js +31 -0
- package/node_modules/lodash-es/functionsIn.js +31 -0
- package/node_modules/lodash-es/get.js +33 -0
- package/node_modules/lodash-es/groupBy.js +41 -0
- package/node_modules/lodash-es/gt.js +29 -0
- package/node_modules/lodash-es/gte.js +30 -0
- package/node_modules/lodash-es/has.js +35 -0
- package/node_modules/lodash-es/hasIn.js +34 -0
- package/node_modules/lodash-es/head.js +23 -0
- package/node_modules/lodash-es/identity.js +21 -0
- package/node_modules/lodash-es/inRange.js +55 -0
- package/node_modules/lodash-es/includes.js +53 -0
- package/node_modules/lodash-es/indexOf.js +42 -0
- package/node_modules/lodash-es/initial.js +22 -0
- package/node_modules/lodash-es/intersection.js +30 -0
- package/node_modules/lodash-es/intersectionBy.js +45 -0
- package/node_modules/lodash-es/intersectionWith.js +41 -0
- package/node_modules/lodash-es/invert.js +42 -0
- package/node_modules/lodash-es/invertBy.js +56 -0
- package/node_modules/lodash-es/invoke.js +24 -0
- package/node_modules/lodash-es/invokeMap.js +41 -0
- package/node_modules/lodash-es/isArguments.js +36 -0
- package/node_modules/lodash-es/isArray.js +26 -0
- package/node_modules/lodash-es/isArrayBuffer.js +27 -0
- package/node_modules/lodash-es/isArrayLike.js +33 -0
- package/node_modules/lodash-es/isArrayLikeObject.js +33 -0
- package/node_modules/lodash-es/isBoolean.js +29 -0
- package/node_modules/lodash-es/isBuffer.js +38 -0
- package/node_modules/lodash-es/isDate.js +27 -0
- package/node_modules/lodash-es/isElement.js +25 -0
- package/node_modules/lodash-es/isEmpty.js +77 -0
- package/node_modules/lodash-es/isEqual.js +35 -0
- package/node_modules/lodash-es/isEqualWith.js +41 -0
- package/node_modules/lodash-es/isError.js +36 -0
- package/node_modules/lodash-es/isFinite.js +36 -0
- package/node_modules/lodash-es/isFunction.js +37 -0
- package/node_modules/lodash-es/isInteger.js +33 -0
- package/node_modules/lodash-es/isLength.js +35 -0
- package/node_modules/lodash-es/isMap.js +27 -0
- package/node_modules/lodash-es/isMatch.js +36 -0
- package/node_modules/lodash-es/isMatchWith.js +41 -0
- package/node_modules/lodash-es/isNaN.js +38 -0
- package/node_modules/lodash-es/isNative.js +40 -0
- package/node_modules/lodash-es/isNil.js +25 -0
- package/node_modules/lodash-es/isNull.js +22 -0
- package/node_modules/lodash-es/isNumber.js +38 -0
- package/node_modules/lodash-es/isObject.js +31 -0
- package/node_modules/lodash-es/isObjectLike.js +29 -0
- package/node_modules/lodash-es/isPlainObject.js +62 -0
- package/node_modules/lodash-es/isRegExp.js +27 -0
- package/node_modules/lodash-es/isSafeInteger.js +37 -0
- package/node_modules/lodash-es/isSet.js +27 -0
- package/node_modules/lodash-es/isString.js +30 -0
- package/node_modules/lodash-es/isSymbol.js +29 -0
- package/node_modules/lodash-es/isTypedArray.js +27 -0
- package/node_modules/lodash-es/isUndefined.js +22 -0
- package/node_modules/lodash-es/isWeakMap.js +28 -0
- package/node_modules/lodash-es/isWeakSet.js +28 -0
- package/node_modules/lodash-es/iteratee.js +53 -0
- package/node_modules/lodash-es/join.js +26 -0
- package/node_modules/lodash-es/kebabCase.js +28 -0
- package/node_modules/lodash-es/keyBy.js +36 -0
- package/node_modules/lodash-es/keys.js +37 -0
- package/node_modules/lodash-es/keysIn.js +32 -0
- package/node_modules/lodash-es/lang.default.js +71 -0
- package/node_modules/lodash-es/lang.js +57 -0
- package/node_modules/lodash-es/last.js +20 -0
- package/node_modules/lodash-es/lastIndexOf.js +46 -0
- package/node_modules/lodash-es/lodash.default.js +643 -0
- package/node_modules/lodash-es/lodash.js +331 -0
- package/node_modules/lodash-es/lowerCase.js +27 -0
- package/node_modules/lodash-es/lowerFirst.js +22 -0
- package/node_modules/lodash-es/lt.js +29 -0
- package/node_modules/lodash-es/lte.js +30 -0
- package/node_modules/lodash-es/map.js +53 -0
- package/node_modules/lodash-es/mapKeys.js +36 -0
- package/node_modules/lodash-es/mapValues.js +43 -0
- package/node_modules/lodash-es/matches.js +46 -0
- package/node_modules/lodash-es/matchesProperty.js +44 -0
- package/node_modules/lodash-es/math.default.js +21 -0
- package/node_modules/lodash-es/math.js +16 -0
- package/node_modules/lodash-es/max.js +29 -0
- package/node_modules/lodash-es/maxBy.js +34 -0
- package/node_modules/lodash-es/mean.js +22 -0
- package/node_modules/lodash-es/meanBy.js +31 -0
- package/node_modules/lodash-es/memoize.js +73 -0
- package/node_modules/lodash-es/merge.js +39 -0
- package/node_modules/lodash-es/mergeWith.js +39 -0
- package/node_modules/lodash-es/method.js +34 -0
- package/node_modules/lodash-es/methodOf.js +33 -0
- package/node_modules/lodash-es/min.js +29 -0
- package/node_modules/lodash-es/minBy.js +34 -0
- package/node_modules/lodash-es/mixin.js +74 -0
- package/node_modules/lodash-es/multiply.js +22 -0
- package/node_modules/lodash-es/negate.js +40 -0
- package/node_modules/lodash-es/next.js +35 -0
- package/node_modules/lodash-es/noop.js +17 -0
- package/node_modules/lodash-es/now.js +23 -0
- package/node_modules/lodash-es/nth.js +29 -0
- package/node_modules/lodash-es/nthArg.js +32 -0
- package/node_modules/lodash-es/number.default.js +7 -0
- package/node_modules/lodash-es/number.js +4 -0
- package/node_modules/lodash-es/object.default.js +60 -0
- package/node_modules/lodash-es/object.js +48 -0
- package/node_modules/lodash-es/omit.js +57 -0
- package/node_modules/lodash-es/omitBy.js +29 -0
- package/node_modules/lodash-es/once.js +25 -0
- package/node_modules/lodash-es/orderBy.js +47 -0
- package/node_modules/lodash-es/over.js +24 -0
- package/node_modules/lodash-es/overArgs.js +61 -0
- package/node_modules/lodash-es/overEvery.js +34 -0
- package/node_modules/lodash-es/overSome.js +37 -0
- package/node_modules/lodash-es/package.json +23 -0
- package/node_modules/lodash-es/pad.js +49 -0
- package/node_modules/lodash-es/padEnd.js +39 -0
- package/node_modules/lodash-es/padStart.js +39 -0
- package/node_modules/lodash-es/parseInt.js +43 -0
- package/node_modules/lodash-es/partial.js +50 -0
- package/node_modules/lodash-es/partialRight.js +49 -0
- package/node_modules/lodash-es/partition.js +43 -0
- package/node_modules/lodash-es/pick.js +25 -0
- package/node_modules/lodash-es/pickBy.js +37 -0
- package/node_modules/lodash-es/plant.js +48 -0
- package/node_modules/lodash-es/property.js +32 -0
- package/node_modules/lodash-es/propertyOf.js +30 -0
- package/node_modules/lodash-es/pull.js +29 -0
- package/node_modules/lodash-es/pullAll.js +29 -0
- package/node_modules/lodash-es/pullAllBy.js +33 -0
- package/node_modules/lodash-es/pullAllWith.js +32 -0
- package/node_modules/lodash-es/pullAt.js +43 -0
- package/node_modules/lodash-es/random.js +91 -0
- package/node_modules/lodash-es/range.js +46 -0
- package/node_modules/lodash-es/rangeRight.js +41 -0
- package/node_modules/lodash-es/rearg.js +33 -0
- package/node_modules/lodash-es/reduce.js +51 -0
- package/node_modules/lodash-es/reduceRight.js +36 -0
- package/node_modules/lodash-es/reject.js +46 -0
- package/node_modules/lodash-es/remove.js +53 -0
- package/node_modules/lodash-es/repeat.js +37 -0
- package/node_modules/lodash-es/replace.js +29 -0
- package/node_modules/lodash-es/rest.js +40 -0
- package/node_modules/lodash-es/result.js +56 -0
- package/node_modules/lodash-es/reverse.js +34 -0
- package/node_modules/lodash-es/round.js +26 -0
- package/node_modules/lodash-es/sample.js +24 -0
- package/node_modules/lodash-es/sampleSize.js +37 -0
- package/node_modules/lodash-es/seq.default.js +20 -0
- package/node_modules/lodash-es/seq.js +15 -0
- package/node_modules/lodash-es/set.js +35 -0
- package/node_modules/lodash-es/setWith.js +32 -0
- package/node_modules/lodash-es/shuffle.js +25 -0
- package/node_modules/lodash-es/size.js +46 -0
- package/node_modules/lodash-es/slice.js +37 -0
- package/node_modules/lodash-es/snakeCase.js +28 -0
- package/node_modules/lodash-es/some.js +51 -0
- package/node_modules/lodash-es/sortBy.js +48 -0
- package/node_modules/lodash-es/sortedIndex.js +24 -0
- package/node_modules/lodash-es/sortedIndexBy.js +33 -0
- package/node_modules/lodash-es/sortedIndexOf.js +31 -0
- package/node_modules/lodash-es/sortedLastIndex.js +25 -0
- package/node_modules/lodash-es/sortedLastIndexBy.js +33 -0
- package/node_modules/lodash-es/sortedLastIndexOf.js +31 -0
- package/node_modules/lodash-es/sortedUniq.js +24 -0
- package/node_modules/lodash-es/sortedUniqBy.js +26 -0
- package/node_modules/lodash-es/split.js +52 -0
- package/node_modules/lodash-es/spread.js +63 -0
- package/node_modules/lodash-es/startCase.js +29 -0
- package/node_modules/lodash-es/startsWith.js +39 -0
- package/node_modules/lodash-es/string.default.js +41 -0
- package/node_modules/lodash-es/string.js +32 -0
- package/node_modules/lodash-es/stubArray.js +23 -0
- package/node_modules/lodash-es/stubFalse.js +18 -0
- package/node_modules/lodash-es/stubObject.js +23 -0
- package/node_modules/lodash-es/stubString.js +18 -0
- package/node_modules/lodash-es/stubTrue.js +18 -0
- package/node_modules/lodash-es/subtract.js +22 -0
- package/node_modules/lodash-es/sum.js +24 -0
- package/node_modules/lodash-es/sumBy.js +33 -0
- package/node_modules/lodash-es/tail.js +22 -0
- package/node_modules/lodash-es/take.js +37 -0
- package/node_modules/lodash-es/takeRight.js +39 -0
- package/node_modules/lodash-es/takeRightWhile.js +45 -0
- package/node_modules/lodash-es/takeWhile.js +45 -0
- package/node_modules/lodash-es/tap.js +29 -0
- package/node_modules/lodash-es/template.js +284 -0
- package/node_modules/lodash-es/templateSettings.js +71 -0
- package/node_modules/lodash-es/throttle.js +69 -0
- package/node_modules/lodash-es/thru.js +28 -0
- package/node_modules/lodash-es/times.js +51 -0
- package/node_modules/lodash-es/toArray.js +58 -0
- package/node_modules/lodash-es/toFinite.js +42 -0
- package/node_modules/lodash-es/toInteger.js +36 -0
- package/node_modules/lodash-es/toIterator.js +23 -0
- package/node_modules/lodash-es/toJSON.js +1 -0
- package/node_modules/lodash-es/toLength.js +38 -0
- package/node_modules/lodash-es/toLower.js +28 -0
- package/node_modules/lodash-es/toNumber.js +64 -0
- package/node_modules/lodash-es/toPairs.js +30 -0
- package/node_modules/lodash-es/toPairsIn.js +30 -0
- package/node_modules/lodash-es/toPath.js +33 -0
- package/node_modules/lodash-es/toPlainObject.js +32 -0
- package/node_modules/lodash-es/toSafeInteger.js +37 -0
- package/node_modules/lodash-es/toString.js +28 -0
- package/node_modules/lodash-es/toUpper.js +28 -0
- package/node_modules/lodash-es/transform.js +65 -0
- package/node_modules/lodash-es/trim.js +47 -0
- package/node_modules/lodash-es/trimEnd.js +41 -0
- package/node_modules/lodash-es/trimStart.js +43 -0
- package/node_modules/lodash-es/truncate.js +111 -0
- package/node_modules/lodash-es/unary.js +22 -0
- package/node_modules/lodash-es/unescape.js +34 -0
- package/node_modules/lodash-es/union.js +26 -0
- package/node_modules/lodash-es/unionBy.js +39 -0
- package/node_modules/lodash-es/unionWith.js +34 -0
- package/node_modules/lodash-es/uniq.js +25 -0
- package/node_modules/lodash-es/uniqBy.js +31 -0
- package/node_modules/lodash-es/uniqWith.js +28 -0
- package/node_modules/lodash-es/uniqueId.js +28 -0
- package/node_modules/lodash-es/unset.js +34 -0
- package/node_modules/lodash-es/unzip.js +45 -0
- package/node_modules/lodash-es/unzipWith.js +39 -0
- package/node_modules/lodash-es/update.js +35 -0
- package/node_modules/lodash-es/updateWith.js +33 -0
- package/node_modules/lodash-es/upperCase.js +27 -0
- package/node_modules/lodash-es/upperFirst.js +22 -0
- package/node_modules/lodash-es/util.default.js +42 -0
- package/node_modules/lodash-es/util.js +33 -0
- package/node_modules/lodash-es/value.js +1 -0
- package/node_modules/lodash-es/valueOf.js +1 -0
- package/node_modules/lodash-es/values.js +34 -0
- package/node_modules/lodash-es/valuesIn.js +32 -0
- package/node_modules/lodash-es/without.js +31 -0
- package/node_modules/lodash-es/words.js +35 -0
- package/node_modules/lodash-es/wrap.js +30 -0
- package/node_modules/lodash-es/wrapperAt.js +48 -0
- package/node_modules/lodash-es/wrapperChain.js +34 -0
- package/node_modules/lodash-es/wrapperLodash.js +147 -0
- package/node_modules/lodash-es/wrapperReverse.js +44 -0
- package/node_modules/lodash-es/wrapperValue.js +21 -0
- package/node_modules/lodash-es/xor.js +28 -0
- package/node_modules/lodash-es/xorBy.js +39 -0
- package/node_modules/lodash-es/xorWith.js +34 -0
- package/node_modules/lodash-es/zip.js +22 -0
- package/node_modules/lodash-es/zipObject.js +24 -0
- package/node_modules/lodash-es/zipObjectDeep.js +23 -0
- package/node_modules/lodash-es/zipWith.js +32 -0
- package/node_modules/lodash.debounce/LICENSE +47 -0
- package/node_modules/lodash.debounce/README.md +18 -0
- package/node_modules/lodash.debounce/index.js +377 -0
- package/node_modules/lodash.debounce/package.json +17 -0
- package/node_modules/require-from-string/index.js +34 -0
- package/node_modules/require-from-string/license +21 -0
- package/node_modules/require-from-string/package.json +28 -0
- package/node_modules/require-from-string/readme.md +56 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +665 -0
- package/node_modules/semver/bin/semver.js +191 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +557 -0
- package/node_modules/semver/classes/semver.js +333 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +91 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +16 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/signal-exit/LICENSE.txt +16 -0
- package/node_modules/signal-exit/README.md +74 -0
- package/node_modules/signal-exit/dist/cjs/browser.d.ts +12 -0
- package/node_modules/signal-exit/dist/cjs/browser.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/browser.js +10 -0
- package/node_modules/signal-exit/dist/cjs/browser.js.map +1 -0
- package/node_modules/signal-exit/dist/cjs/index.d.ts +48 -0
- package/node_modules/signal-exit/dist/cjs/index.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/index.js +279 -0
- package/node_modules/signal-exit/dist/cjs/index.js.map +1 -0
- package/node_modules/signal-exit/dist/cjs/package.json +3 -0
- package/node_modules/signal-exit/dist/cjs/signals.d.ts +29 -0
- package/node_modules/signal-exit/dist/cjs/signals.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/cjs/signals.js +42 -0
- package/node_modules/signal-exit/dist/cjs/signals.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/browser.d.ts +12 -0
- package/node_modules/signal-exit/dist/mjs/browser.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/browser.js +4 -0
- package/node_modules/signal-exit/dist/mjs/browser.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/index.d.ts +48 -0
- package/node_modules/signal-exit/dist/mjs/index.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/index.js +275 -0
- package/node_modules/signal-exit/dist/mjs/index.js.map +1 -0
- package/node_modules/signal-exit/dist/mjs/package.json +3 -0
- package/node_modules/signal-exit/dist/mjs/signals.d.ts +29 -0
- package/node_modules/signal-exit/dist/mjs/signals.d.ts.map +1 -0
- package/node_modules/signal-exit/dist/mjs/signals.js +39 -0
- package/node_modules/signal-exit/dist/mjs/signals.js.map +1 -0
- package/node_modules/signal-exit/package.json +106 -0
- package/node_modules/slice-ansi/index.d.ts +19 -0
- package/node_modules/slice-ansi/index.js +169 -0
- package/node_modules/slice-ansi/license +10 -0
- package/node_modules/slice-ansi/package.json +58 -0
- package/node_modules/slice-ansi/readme.md +54 -0
- package/node_modules/stack-utils/LICENSE.md +21 -0
- package/node_modules/stack-utils/index.js +344 -0
- package/node_modules/stack-utils/package.json +39 -0
- package/node_modules/stack-utils/readme.md +143 -0
- package/node_modules/string-width/index.d.ts +39 -0
- package/node_modules/string-width/index.js +82 -0
- package/node_modules/string-width/license +9 -0
- package/node_modules/string-width/package.json +64 -0
- package/node_modules/string-width/readme.md +66 -0
- package/node_modules/strip-ansi/index.d.ts +15 -0
- package/node_modules/strip-ansi/index.js +19 -0
- package/node_modules/strip-ansi/license +9 -0
- package/node_modules/strip-ansi/package.json +59 -0
- package/node_modules/strip-ansi/readme.md +37 -0
- package/node_modules/supports-hyperlinks/browser.js +10 -0
- package/node_modules/supports-hyperlinks/index.d.ts +25 -0
- package/node_modules/supports-hyperlinks/index.js +157 -0
- package/node_modules/supports-hyperlinks/license +10 -0
- package/node_modules/supports-hyperlinks/node_modules/has-flag/index.d.ts +39 -0
- package/node_modules/supports-hyperlinks/node_modules/has-flag/index.js +8 -0
- package/node_modules/supports-hyperlinks/node_modules/has-flag/license +9 -0
- package/node_modules/supports-hyperlinks/node_modules/has-flag/package.json +49 -0
- package/node_modules/supports-hyperlinks/node_modules/has-flag/readme.md +74 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/browser.d.ts +1 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/browser.js +35 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/index.d.ts +55 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/index.js +202 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/license +9 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/package.json +64 -0
- package/node_modules/supports-hyperlinks/node_modules/supports-color/readme.md +75 -0
- package/node_modules/supports-hyperlinks/package.json +47 -0
- package/node_modules/supports-hyperlinks/readme.md +39 -0
- package/node_modules/tagged-tag/index.d.ts +3 -0
- package/node_modules/tagged-tag/license +9 -0
- package/node_modules/tagged-tag/package.json +36 -0
- package/node_modules/tagged-tag/readme.md +5 -0
- package/node_modules/type-fest/index.d.ts +221 -0
- package/node_modules/type-fest/license-cc0 +121 -0
- package/node_modules/type-fest/license-mit +9 -0
- package/node_modules/type-fest/package.json +75 -0
- package/node_modules/type-fest/readme.md +1077 -0
- package/node_modules/type-fest/source/absolute.d.ts +52 -0
- package/node_modules/type-fest/source/all-extend.d.ts +119 -0
- package/node_modules/type-fest/source/all-union-fields.d.ts +91 -0
- package/node_modules/type-fest/source/and-all.d.ts +76 -0
- package/node_modules/type-fest/source/and.d.ts +82 -0
- package/node_modules/type-fest/source/array-element.d.ts +46 -0
- package/node_modules/type-fest/source/array-indices.d.ts +25 -0
- package/node_modules/type-fest/source/array-length.d.ts +36 -0
- package/node_modules/type-fest/source/array-reverse.d.ts +84 -0
- package/node_modules/type-fest/source/array-slice.d.ts +132 -0
- package/node_modules/type-fest/source/array-splice.d.ts +104 -0
- package/node_modules/type-fest/source/array-tail.d.ts +70 -0
- package/node_modules/type-fest/source/array-values.d.ts +24 -0
- package/node_modules/type-fest/source/arrayable.d.ts +31 -0
- package/node_modules/type-fest/source/async-return-type.d.ts +28 -0
- package/node_modules/type-fest/source/asyncify.d.ts +25 -0
- package/node_modules/type-fest/source/basic.d.ts +38 -0
- package/node_modules/type-fest/source/camel-case.d.ts +125 -0
- package/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +106 -0
- package/node_modules/type-fest/source/camel-cased-properties.d.ts +49 -0
- package/node_modules/type-fest/source/characters.d.ts +67 -0
- package/node_modules/type-fest/source/conditional-except.d.ts +47 -0
- package/node_modules/type-fest/source/conditional-keys.d.ts +63 -0
- package/node_modules/type-fest/source/conditional-pick-deep.d.ts +122 -0
- package/node_modules/type-fest/source/conditional-pick.d.ts +48 -0
- package/node_modules/type-fest/source/conditional-simplify-deep.d.ts +73 -0
- package/node_modules/type-fest/source/conditional-simplify.d.ts +50 -0
- package/node_modules/type-fest/source/delimiter-case.d.ts +78 -0
- package/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +115 -0
- package/node_modules/type-fest/source/delimiter-cased-properties.d.ts +52 -0
- package/node_modules/type-fest/source/distributed-omit.d.ts +96 -0
- package/node_modules/type-fest/source/distributed-pick.d.ts +92 -0
- package/node_modules/type-fest/source/empty-object.d.ts +51 -0
- package/node_modules/type-fest/source/entries.d.ts +64 -0
- package/node_modules/type-fest/source/entry.d.ts +67 -0
- package/node_modules/type-fest/source/exact.d.ts +73 -0
- package/node_modules/type-fest/source/except.d.ts +112 -0
- package/node_modules/type-fest/source/exclude-exactly.d.ts +57 -0
- package/node_modules/type-fest/source/exclude-rest-element.d.ts +40 -0
- package/node_modules/type-fest/source/exclude-strict.d.ts +51 -0
- package/node_modules/type-fest/source/exclusify-union.d.ts +147 -0
- package/node_modules/type-fest/source/extends-strict.d.ts +44 -0
- package/node_modules/type-fest/source/extract-rest-element.d.ts +30 -0
- package/node_modules/type-fest/source/extract-strict.d.ts +51 -0
- package/node_modules/type-fest/source/find-global-type.d.ts +68 -0
- package/node_modules/type-fest/source/fixed-length-array.d.ts +97 -0
- package/node_modules/type-fest/source/get.d.ts +227 -0
- package/node_modules/type-fest/source/global-this.d.ts +24 -0
- package/node_modules/type-fest/source/globals/index.d.ts +3 -0
- package/node_modules/type-fest/source/globals/observable-like.d.ts +78 -0
- package/node_modules/type-fest/source/greater-than-or-equal.d.ts +63 -0
- package/node_modules/type-fest/source/greater-than.d.ts +92 -0
- package/node_modules/type-fest/source/has-optional-keys.d.ts +23 -0
- package/node_modules/type-fest/source/has-readonly-keys.d.ts +23 -0
- package/node_modules/type-fest/source/has-required-keys.d.ts +61 -0
- package/node_modules/type-fest/source/has-writable-keys.d.ts +23 -0
- package/node_modules/type-fest/source/if-any.d.ts +28 -0
- package/node_modules/type-fest/source/if-empty-object.d.ts +30 -0
- package/node_modules/type-fest/source/if-never.d.ts +28 -0
- package/node_modules/type-fest/source/if-null.d.ts +28 -0
- package/node_modules/type-fest/source/if-unknown.d.ts +28 -0
- package/node_modules/type-fest/source/if.d.ts +102 -0
- package/node_modules/type-fest/source/includes.d.ts +24 -0
- package/node_modules/type-fest/source/int-closed-range.d.ts +45 -0
- package/node_modules/type-fest/source/int-range.d.ts +67 -0
- package/node_modules/type-fest/source/internal/array.d.ts +144 -0
- package/node_modules/type-fest/source/internal/characters.d.ts +65 -0
- package/node_modules/type-fest/source/internal/enforce-optional.d.ts +49 -0
- package/node_modules/type-fest/source/internal/index.d.ts +11 -0
- package/node_modules/type-fest/source/internal/keys.d.ts +100 -0
- package/node_modules/type-fest/source/internal/numeric.d.ts +141 -0
- package/node_modules/type-fest/source/internal/object.d.ts +292 -0
- package/node_modules/type-fest/source/internal/string.d.ts +202 -0
- package/node_modules/type-fest/source/internal/tuple.d.ts +79 -0
- package/node_modules/type-fest/source/internal/type.d.ts +165 -0
- package/node_modules/type-fest/source/invariant-of.d.ts +85 -0
- package/node_modules/type-fest/source/is-any.d.ts +31 -0
- package/node_modules/type-fest/source/is-equal.d.ts +41 -0
- package/node_modules/type-fest/source/is-float.d.ts +43 -0
- package/node_modules/type-fest/source/is-integer.d.ts +60 -0
- package/node_modules/type-fest/source/is-literal.d.ts +315 -0
- package/node_modules/type-fest/source/is-lowercase.d.ts +38 -0
- package/node_modules/type-fest/source/is-never.d.ts +56 -0
- package/node_modules/type-fest/source/is-null.d.ts +22 -0
- package/node_modules/type-fest/source/is-nullable.d.ts +30 -0
- package/node_modules/type-fest/source/is-optional-key-of.d.ts +51 -0
- package/node_modules/type-fest/source/is-optional.d.ts +28 -0
- package/node_modules/type-fest/source/is-readonly-key-of.d.ts +55 -0
- package/node_modules/type-fest/source/is-required-key-of.d.ts +51 -0
- package/node_modules/type-fest/source/is-tuple.d.ts +92 -0
- package/node_modules/type-fest/source/is-undefined.d.ts +22 -0
- package/node_modules/type-fest/source/is-union.d.ts +40 -0
- package/node_modules/type-fest/source/is-unknown.d.ts +43 -0
- package/node_modules/type-fest/source/is-uppercase.d.ts +38 -0
- package/node_modules/type-fest/source/is-writable-key-of.d.ts +51 -0
- package/node_modules/type-fest/source/iterable-element.d.ts +66 -0
- package/node_modules/type-fest/source/join.d.ts +79 -0
- package/node_modules/type-fest/source/json-value.d.ts +33 -0
- package/node_modules/type-fest/source/jsonifiable.d.ts +37 -0
- package/node_modules/type-fest/source/jsonify.d.ts +127 -0
- package/node_modules/type-fest/source/kebab-case.d.ts +47 -0
- package/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +72 -0
- package/node_modules/type-fest/source/kebab-cased-properties.d.ts +46 -0
- package/node_modules/type-fest/source/key-as-string.d.ts +27 -0
- package/node_modules/type-fest/source/keys-of-union.d.ts +44 -0
- package/node_modules/type-fest/source/last-array-element.d.ts +36 -0
- package/node_modules/type-fest/source/less-than-or-equal.d.ts +60 -0
- package/node_modules/type-fest/source/less-than.d.ts +60 -0
- package/node_modules/type-fest/source/literal-to-primitive-deep.d.ts +71 -0
- package/node_modules/type-fest/source/literal-to-primitive.d.ts +38 -0
- package/node_modules/type-fest/source/literal-union.d.ts +39 -0
- package/node_modules/type-fest/source/merge-deep.d.ts +495 -0
- package/node_modules/type-fest/source/merge-exclusive.d.ts +45 -0
- package/node_modules/type-fest/source/merge.d.ts +87 -0
- package/node_modules/type-fest/source/multidimensional-array.d.ts +38 -0
- package/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +38 -0
- package/node_modules/type-fest/source/non-empty-object.d.ts +38 -0
- package/node_modules/type-fest/source/non-empty-string.d.ts +32 -0
- package/node_modules/type-fest/source/non-empty-tuple.d.ts +24 -0
- package/node_modules/type-fest/source/non-nullable-deep.d.ts +102 -0
- package/node_modules/type-fest/source/numeric.d.ts +226 -0
- package/node_modules/type-fest/source/object-merge.d.ts +194 -0
- package/node_modules/type-fest/source/omit-deep.d.ts +153 -0
- package/node_modules/type-fest/source/omit-index-signature.d.ts +98 -0
- package/node_modules/type-fest/source/opaque.d.ts +3 -0
- package/node_modules/type-fest/source/optional-keys-of.d.ts +46 -0
- package/node_modules/type-fest/source/optional.d.ts +31 -0
- package/node_modules/type-fest/source/or-all.d.ts +73 -0
- package/node_modules/type-fest/source/or.d.ts +82 -0
- package/node_modules/type-fest/source/override-properties.d.ts +43 -0
- package/node_modules/type-fest/source/package-json.d.ts +710 -0
- package/node_modules/type-fest/source/partial-deep.d.ts +157 -0
- package/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +81 -0
- package/node_modules/type-fest/source/pascal-case.d.ts +52 -0
- package/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +79 -0
- package/node_modules/type-fest/source/pascal-cased-properties.d.ts +46 -0
- package/node_modules/type-fest/source/paths.d.ts +241 -0
- package/node_modules/type-fest/source/pick-deep.d.ts +139 -0
- package/node_modules/type-fest/source/pick-index-signature.d.ts +52 -0
- package/node_modules/type-fest/source/primitive.d.ts +15 -0
- package/node_modules/type-fest/source/promisable.d.ts +27 -0
- package/node_modules/type-fest/source/readonly-deep.d.ts +118 -0
- package/node_modules/type-fest/source/readonly-keys-of.d.ts +38 -0
- package/node_modules/type-fest/source/readonly-tuple.d.ts +34 -0
- package/node_modules/type-fest/source/remove-prefix.d.ts +132 -0
- package/node_modules/type-fest/source/replace.d.ts +87 -0
- package/node_modules/type-fest/source/require-all-or-none.d.ts +54 -0
- package/node_modules/type-fest/source/require-at-least-one.d.ts +48 -0
- package/node_modules/type-fest/source/require-exactly-one.d.ts +48 -0
- package/node_modules/type-fest/source/require-one-or-none.d.ts +49 -0
- package/node_modules/type-fest/source/required-deep.d.ts +78 -0
- package/node_modules/type-fest/source/required-keys-of.d.ts +38 -0
- package/node_modules/type-fest/source/schema.d.ts +119 -0
- package/node_modules/type-fest/source/screaming-snake-case.d.ts +31 -0
- package/node_modules/type-fest/source/set-field-type.d.ts +67 -0
- package/node_modules/type-fest/source/set-non-nullable-deep.d.ts +88 -0
- package/node_modules/type-fest/source/set-non-nullable.d.ts +34 -0
- package/node_modules/type-fest/source/set-optional.d.ts +42 -0
- package/node_modules/type-fest/source/set-parameter-type.d.ts +125 -0
- package/node_modules/type-fest/source/set-readonly.d.ts +40 -0
- package/node_modules/type-fest/source/set-required-deep.d.ts +64 -0
- package/node_modules/type-fest/source/set-required.d.ts +75 -0
- package/node_modules/type-fest/source/set-return-type.d.ts +31 -0
- package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +180 -0
- package/node_modules/type-fest/source/shared-union-fields.d.ts +79 -0
- package/node_modules/type-fest/source/simplify-deep.d.ts +117 -0
- package/node_modules/type-fest/source/simplify.d.ts +61 -0
- package/node_modules/type-fest/source/single-key-object.d.ts +28 -0
- package/node_modules/type-fest/source/snake-case.d.ts +48 -0
- package/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +72 -0
- package/node_modules/type-fest/source/snake-cased-properties.d.ts +46 -0
- package/node_modules/type-fest/source/some-extend.d.ts +113 -0
- package/node_modules/type-fest/source/split-on-rest-element.d.ts +106 -0
- package/node_modules/type-fest/source/split.d.ts +90 -0
- package/node_modules/type-fest/source/spread.d.ts +78 -0
- package/node_modules/type-fest/source/string-repeat.d.ts +49 -0
- package/node_modules/type-fest/source/string-slice.d.ts +39 -0
- package/node_modules/type-fest/source/stringified.d.ts +25 -0
- package/node_modules/type-fest/source/structured-cloneable.d.ts +89 -0
- package/node_modules/type-fest/source/subtract.d.ts +87 -0
- package/node_modules/type-fest/source/sum.d.ts +82 -0
- package/node_modules/type-fest/source/tagged-union.d.ts +53 -0
- package/node_modules/type-fest/source/tagged.d.ts +261 -0
- package/node_modules/type-fest/source/trim.d.ts +29 -0
- package/node_modules/type-fest/source/tsconfig-json.d.ts +1356 -0
- package/node_modules/type-fest/source/tuple-of.d.ts +80 -0
- package/node_modules/type-fest/source/tuple-to-object.d.ts +47 -0
- package/node_modules/type-fest/source/tuple-to-union.d.ts +54 -0
- package/node_modules/type-fest/source/typed-array.d.ts +19 -0
- package/node_modules/type-fest/source/undefined-on-partial-deep.d.ts +83 -0
- package/node_modules/type-fest/source/union-length.d.ts +27 -0
- package/node_modules/type-fest/source/union-member.d.ts +65 -0
- package/node_modules/type-fest/source/union-to-intersection.d.ts +35 -0
- package/node_modules/type-fest/source/union-to-tuple.d.ts +49 -0
- package/node_modules/type-fest/source/unknown-array.d.ts +27 -0
- package/node_modules/type-fest/source/unknown-map.d.ts +26 -0
- package/node_modules/type-fest/source/unknown-record.d.ts +33 -0
- package/node_modules/type-fest/source/unknown-set.d.ts +26 -0
- package/node_modules/type-fest/source/unwrap-partial.d.ts +33 -0
- package/node_modules/type-fest/source/value-of.d.ts +24 -0
- package/node_modules/type-fest/source/words.d.ts +148 -0
- package/node_modules/type-fest/source/writable-deep.d.ts +84 -0
- package/node_modules/type-fest/source/writable-keys-of.d.ts +34 -0
- package/node_modules/type-fest/source/writable.d.ts +68 -0
- package/node_modules/type-fest/source/xor.d.ts +83 -0
- package/node_modules/usehooks-ts/LICENSE +22 -0
- package/node_modules/usehooks-ts/README.md +473 -0
- package/node_modules/usehooks-ts/dist/index.cjs +1084 -0
- package/node_modules/usehooks-ts/dist/index.d.cts +953 -0
- package/node_modules/usehooks-ts/dist/index.d.ts +953 -0
- package/node_modules/usehooks-ts/dist/index.js +1046 -0
- package/node_modules/usehooks-ts/package.json +74 -0
- package/node_modules/wrap-ansi/index.d.ts +41 -0
- package/node_modules/wrap-ansi/index.js +222 -0
- package/node_modules/wrap-ansi/license +9 -0
- package/node_modules/wrap-ansi/package.json +69 -0
- package/node_modules/wrap-ansi/readme.md +75 -0
- package/package.json +3 -2
|
@@ -0,0 +1,1002 @@
|
|
|
1
|
+
function bidiFactory() {
|
|
2
|
+
var bidi = (function (exports) {
|
|
3
|
+
|
|
4
|
+
// Bidi character types data, auto generated
|
|
5
|
+
var DATA = {
|
|
6
|
+
"R": "13k,1a,2,3,3,2+1j,ch+16,a+1,5+2,2+n,5,a,4,6+16,4+3,h+1b,4mo,179q,2+9,2+11,2i9+7y,2+68,4,3+4,5+13,4+3,2+4k,3+29,8+cf,1t+7z,w+17,3+3m,1t+3z,16o1+5r,8+30,8+mc,29+1r,29+4v,75+73",
|
|
7
|
+
"EN": "1c+9,3d+1,6,187+9,513,4+5,7+9,sf+j,175h+9,qw+q,161f+1d,4xt+a,25i+9",
|
|
8
|
+
"ES": "17,2,6dp+1,f+1,av,16vr,mx+1,4o,2",
|
|
9
|
+
"ET": "z+2,3h+3,b+1,ym,3e+1,2o,p4+1,8,6u,7c,g6,1wc,1n9+4,30+1b,2n,6d,qhx+1,h0m,a+1,49+2,63+1,4+1,6bb+3,12jj",
|
|
10
|
+
"AN": "16o+5,2j+9,2+1,35,ed,1ff2+9,87+u",
|
|
11
|
+
"CS": "18,2+1,b,2u,12k,55v,l,17v0,2,3,53,2+1,b",
|
|
12
|
+
"B": "a,3,f+2,2v,690",
|
|
13
|
+
"S": "9,2,k",
|
|
14
|
+
"WS": "c,k,4f4,1vk+a,u,1j,335",
|
|
15
|
+
"ON": "x+1,4+4,h+5,r+5,r+3,z,5+3,2+1,2+1,5,2+2,3+4,o,w,ci+1,8+d,3+d,6+8,2+g,39+1,9,6+1,2,33,b8,3+1,3c+1,7+1,5r,b,7h+3,sa+5,2,3i+6,jg+3,ur+9,2v,ij+1,9g+9,7+a,8m,4+1,49+x,14u,2+2,c+2,e+2,e+2,e+1,i+n,e+e,2+p,u+2,e+2,36+1,2+3,2+1,b,2+2,6+5,2,2,2,h+1,5+4,6+3,3+f,16+2,5+3l,3+81,1y+p,2+40,q+a,m+13,2r+ch,2+9e,75+hf,3+v,2+2w,6e+5,f+6,75+2a,1a+p,2+2g,d+5x,r+b,6+3,4+o,g,6+1,6+2,2k+1,4,2j,5h+z,1m+1,1e+f,t+2,1f+e,d+3,4o+3,2s+1,w,535+1r,h3l+1i,93+2,2s,b+1,3l+x,2v,4g+3,21+3,kz+1,g5v+1,5a,j+9,n+v,2,3,2+8,2+1,3+2,2,3,46+1,4+4,h+5,r+5,r+a,3h+2,4+6,b+4,78,1r+24,4+c,4,1hb,ey+6,103+j,16j+c,1ux+7,5+g,fsh,jdq+1t,4,57+2e,p1,1m,1m,1m,1m,4kt+1,7j+17,5+2r,d+e,3+e,2+e,2+10,m+4,w,1n+5,1q,4z+5,4b+rb,9+c,4+c,4+37,d+2g,8+b,l+b,5+1j,9+9,7+13,9+t,3+1,27+3c,2+29,2+3q,d+d,3+4,4+2,6+6,a+o,8+6,a+2,e+6,16+42,2+1i",
|
|
16
|
+
"BN": "0+8,6+d,2s+5,2+p,e,4m9,1kt+2,2b+5,5+5,17q9+v,7k,6p+8,6+1,119d+3,440+7,96s+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+1,1ekf+75,6p+2rz,1ben+1,1ekf+1,1ekf+1",
|
|
17
|
+
"NSM": "lc+33,7o+6,7c+18,2,2+1,2+1,2,21+a,1d+k,h,2u+6,3+5,3+1,2+3,10,v+q,2k+a,1n+8,a,p+3,2+8,2+2,2+4,18+2,3c+e,2+v,1k,2,5+7,5,4+6,b+1,u,1n,5+3,9,l+1,r,3+1,1m,5+1,5+1,3+2,4,v+1,4,c+1,1m,5+4,2+1,5,l+1,n+5,2,1n,3,2+3,9,8+1,c+1,v,1q,d,1f,4,1m+2,6+2,2+3,8+1,c+1,u,1n,g+1,l+1,t+1,1m+1,5+3,9,l+1,u,21,8+2,2,2j,3+6,d+7,2r,3+8,c+5,23+1,s,2,2,1k+d,2+4,2+1,6+a,2+z,a,2v+3,2+5,2+1,3+1,q+1,5+2,h+3,e,3+1,7,g,jk+2,qb+2,u+2,u+1,v+1,1t+1,2+6,9,3+a,a,1a+2,3c+1,z,3b+2,5+1,a,7+2,64+1,3,1n,2+6,2,2,3+7,7+9,3,1d+g,1s+3,1d,2+4,2,6,15+8,d+1,x+3,3+1,2+2,1l,2+1,4,2+2,1n+7,3+1,49+2,2+c,2+6,5,7,4+1,5j+1l,2+4,k1+w,2db+2,3y,2p+v,ff+3,30+1,n9x+3,2+9,x+1,29+1,7l,4,5,q+1,6,48+1,r+h,e,13+7,q+a,1b+2,1d,3+3,3+1,14,1w+5,3+1,3+1,d,9,1c,1g,2+2,3+1,6+1,2,17+1,9,6n,3,5,fn5,ki+f,h+f,r2,6b,46+4,1af+2,2+1,6+3,15+2,5,4m+1,fy+3,as+1,4a+a,4x,1j+e,1l+2,1e+3,3+1,1y+2,11+4,2+7,1r,d+1,1h+8,b+3,3,2o+2,3,2+1,7,4h,4+7,m+1,1m+1,4,12+6,4+4,5g+7,3+2,2,o,2d+5,2,5+1,2+1,6n+3,7+1,2+1,s+1,2e+7,3,2+1,2z,2,3+5,2,2u+2,3+3,2+4,78+8,2+1,75+1,2,5,41+3,3+1,5,x+5,3+1,15+5,3+3,9,a+5,3+2,1b+c,2+1,bb+6,2+5,2d+l,3+6,2+1,2+1,3f+5,4,2+1,2+6,2,21+1,4,2,9o+1,f0c+4,1o+6,t5,1s+3,2a,f5l+1,43t+2,i+7,3+6,v+3,45+2,1j0+1i,5+1d,9,f,n+4,2+e,11t+6,2+g,3+6,2+1,2+4,7a+6,c6+3,15t+6,32+6,gzhy+6n",
|
|
18
|
+
"AL": "16w,3,2,e+1b,z+2,2+2s,g+1,8+1,b+m,2+t,s+2i,c+e,4h+f,1d+1e,1bwe+dp,3+3z,x+c,2+1,35+3y,2rm+z,5+7,b+5,dt+l,c+u,17nl+27,1t+27,4x+6n,3+d",
|
|
19
|
+
"LRO": "6ct",
|
|
20
|
+
"RLO": "6cu",
|
|
21
|
+
"LRE": "6cq",
|
|
22
|
+
"RLE": "6cr",
|
|
23
|
+
"PDF": "6cs",
|
|
24
|
+
"LRI": "6ee",
|
|
25
|
+
"RLI": "6ef",
|
|
26
|
+
"FSI": "6eg",
|
|
27
|
+
"PDI": "6eh"
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var TYPES = {};
|
|
31
|
+
var TYPES_TO_NAMES = {};
|
|
32
|
+
TYPES.L = 1; //L is the default
|
|
33
|
+
TYPES_TO_NAMES[1] = 'L';
|
|
34
|
+
Object.keys(DATA).forEach(function (type, i) {
|
|
35
|
+
TYPES[type] = 1 << (i + 1);
|
|
36
|
+
TYPES_TO_NAMES[TYPES[type]] = type;
|
|
37
|
+
});
|
|
38
|
+
Object.freeze(TYPES);
|
|
39
|
+
|
|
40
|
+
var ISOLATE_INIT_TYPES = TYPES.LRI | TYPES.RLI | TYPES.FSI;
|
|
41
|
+
var STRONG_TYPES = TYPES.L | TYPES.R | TYPES.AL;
|
|
42
|
+
var NEUTRAL_ISOLATE_TYPES = TYPES.B | TYPES.S | TYPES.WS | TYPES.ON | TYPES.FSI | TYPES.LRI | TYPES.RLI | TYPES.PDI;
|
|
43
|
+
var BN_LIKE_TYPES = TYPES.BN | TYPES.RLE | TYPES.LRE | TYPES.RLO | TYPES.LRO | TYPES.PDF;
|
|
44
|
+
var TRAILING_TYPES = TYPES.S | TYPES.WS | TYPES.B | ISOLATE_INIT_TYPES | TYPES.PDI | BN_LIKE_TYPES;
|
|
45
|
+
|
|
46
|
+
var map = null;
|
|
47
|
+
|
|
48
|
+
function parseData () {
|
|
49
|
+
if (!map) {
|
|
50
|
+
//const start = performance.now()
|
|
51
|
+
map = new Map();
|
|
52
|
+
var loop = function ( type ) {
|
|
53
|
+
if (DATA.hasOwnProperty(type)) {
|
|
54
|
+
var lastCode = 0;
|
|
55
|
+
DATA[type].split(',').forEach(function (range) {
|
|
56
|
+
var ref = range.split('+');
|
|
57
|
+
var skip = ref[0];
|
|
58
|
+
var step = ref[1];
|
|
59
|
+
skip = parseInt(skip, 36);
|
|
60
|
+
step = step ? parseInt(step, 36) : 0;
|
|
61
|
+
map.set(lastCode += skip, TYPES[type]);
|
|
62
|
+
for (var i = 0; i < step; i++) {
|
|
63
|
+
map.set(++lastCode, TYPES[type]);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
for (var type in DATA) loop( type );
|
|
70
|
+
//console.log(`char types parsed in ${performance.now() - start}ms`)
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @param {string} char
|
|
76
|
+
* @return {number}
|
|
77
|
+
*/
|
|
78
|
+
function getBidiCharType (char) {
|
|
79
|
+
parseData();
|
|
80
|
+
return map.get(char.codePointAt(0)) || TYPES.L
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function getBidiCharTypeName(char) {
|
|
84
|
+
return TYPES_TO_NAMES[getBidiCharType(char)]
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Bidi bracket pairs data, auto generated
|
|
88
|
+
var data$1 = {
|
|
89
|
+
"pairs": "14>1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",
|
|
90
|
+
"canonical": "6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Parses an string that holds encoded codepoint mappings, e.g. for bracket pairs or
|
|
95
|
+
* mirroring characters, as encoded by scripts/generateBidiData.js. Returns an object
|
|
96
|
+
* holding the `map`, and optionally a `reverseMap` if `includeReverse:true`.
|
|
97
|
+
* @param {string} encodedString
|
|
98
|
+
* @param {boolean} includeReverse - true if you want reverseMap in the output
|
|
99
|
+
* @return {{map: Map<number, number>, reverseMap?: Map<number, number>}}
|
|
100
|
+
*/
|
|
101
|
+
function parseCharacterMap (encodedString, includeReverse) {
|
|
102
|
+
var radix = 36;
|
|
103
|
+
var lastCode = 0;
|
|
104
|
+
var map = new Map();
|
|
105
|
+
var reverseMap = includeReverse && new Map();
|
|
106
|
+
var prevPair;
|
|
107
|
+
encodedString.split(',').forEach(function visit(entry) {
|
|
108
|
+
if (entry.indexOf('+') !== -1) {
|
|
109
|
+
for (var i = +entry; i--;) {
|
|
110
|
+
visit(prevPair);
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
prevPair = entry;
|
|
114
|
+
var ref = entry.split('>');
|
|
115
|
+
var a = ref[0];
|
|
116
|
+
var b = ref[1];
|
|
117
|
+
a = String.fromCodePoint(lastCode += parseInt(a, radix));
|
|
118
|
+
b = String.fromCodePoint(lastCode += parseInt(b, radix));
|
|
119
|
+
map.set(a, b);
|
|
120
|
+
includeReverse && reverseMap.set(b, a);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
return { map: map, reverseMap: reverseMap }
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
var openToClose, closeToOpen, canonical;
|
|
127
|
+
|
|
128
|
+
function parse$1 () {
|
|
129
|
+
if (!openToClose) {
|
|
130
|
+
//const start = performance.now()
|
|
131
|
+
var ref = parseCharacterMap(data$1.pairs, true);
|
|
132
|
+
var map = ref.map;
|
|
133
|
+
var reverseMap = ref.reverseMap;
|
|
134
|
+
openToClose = map;
|
|
135
|
+
closeToOpen = reverseMap;
|
|
136
|
+
canonical = parseCharacterMap(data$1.canonical, false).map;
|
|
137
|
+
//console.log(`brackets parsed in ${performance.now() - start}ms`)
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function openingToClosingBracket (char) {
|
|
142
|
+
parse$1();
|
|
143
|
+
return openToClose.get(char) || null
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function closingToOpeningBracket (char) {
|
|
147
|
+
parse$1();
|
|
148
|
+
return closeToOpen.get(char) || null
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function getCanonicalBracket (char) {
|
|
152
|
+
parse$1();
|
|
153
|
+
return canonical.get(char) || null
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Local type aliases
|
|
157
|
+
var TYPE_L = TYPES.L;
|
|
158
|
+
var TYPE_R = TYPES.R;
|
|
159
|
+
var TYPE_EN = TYPES.EN;
|
|
160
|
+
var TYPE_ES = TYPES.ES;
|
|
161
|
+
var TYPE_ET = TYPES.ET;
|
|
162
|
+
var TYPE_AN = TYPES.AN;
|
|
163
|
+
var TYPE_CS = TYPES.CS;
|
|
164
|
+
var TYPE_B = TYPES.B;
|
|
165
|
+
var TYPE_S = TYPES.S;
|
|
166
|
+
var TYPE_ON = TYPES.ON;
|
|
167
|
+
var TYPE_BN = TYPES.BN;
|
|
168
|
+
var TYPE_NSM = TYPES.NSM;
|
|
169
|
+
var TYPE_AL = TYPES.AL;
|
|
170
|
+
var TYPE_LRO = TYPES.LRO;
|
|
171
|
+
var TYPE_RLO = TYPES.RLO;
|
|
172
|
+
var TYPE_LRE = TYPES.LRE;
|
|
173
|
+
var TYPE_RLE = TYPES.RLE;
|
|
174
|
+
var TYPE_PDF = TYPES.PDF;
|
|
175
|
+
var TYPE_LRI = TYPES.LRI;
|
|
176
|
+
var TYPE_RLI = TYPES.RLI;
|
|
177
|
+
var TYPE_FSI = TYPES.FSI;
|
|
178
|
+
var TYPE_PDI = TYPES.PDI;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @typedef {object} GetEmbeddingLevelsResult
|
|
182
|
+
* @property {{start, end, level}[]} paragraphs
|
|
183
|
+
* @property {Uint8Array} levels
|
|
184
|
+
*/
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* This function applies the Bidirectional Algorithm to a string, returning the resolved embedding levels
|
|
188
|
+
* in a single Uint8Array plus a list of objects holding each paragraph's start and end indices and resolved
|
|
189
|
+
* base embedding level.
|
|
190
|
+
*
|
|
191
|
+
* @param {string} string - The input string
|
|
192
|
+
* @param {"ltr"|"rtl"|"auto"} [baseDirection] - Use "ltr" or "rtl" to force a base paragraph direction,
|
|
193
|
+
* otherwise a direction will be chosen automatically from each paragraph's contents.
|
|
194
|
+
* @return {GetEmbeddingLevelsResult}
|
|
195
|
+
*/
|
|
196
|
+
function getEmbeddingLevels (string, baseDirection) {
|
|
197
|
+
var MAX_DEPTH = 125;
|
|
198
|
+
|
|
199
|
+
// Start by mapping all characters to their unicode type, as a bitmask integer
|
|
200
|
+
var charTypes = new Uint32Array(string.length);
|
|
201
|
+
for (var i = 0; i < string.length; i++) {
|
|
202
|
+
charTypes[i] = getBidiCharType(string[i]);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
var charTypeCounts = new Map(); //will be cleared at start of each paragraph
|
|
206
|
+
function changeCharType(i, type) {
|
|
207
|
+
var oldType = charTypes[i];
|
|
208
|
+
charTypes[i] = type;
|
|
209
|
+
charTypeCounts.set(oldType, charTypeCounts.get(oldType) - 1);
|
|
210
|
+
if (oldType & NEUTRAL_ISOLATE_TYPES) {
|
|
211
|
+
charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) - 1);
|
|
212
|
+
}
|
|
213
|
+
charTypeCounts.set(type, (charTypeCounts.get(type) || 0) + 1);
|
|
214
|
+
if (type & NEUTRAL_ISOLATE_TYPES) {
|
|
215
|
+
charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) || 0) + 1);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
var embedLevels = new Uint8Array(string.length);
|
|
220
|
+
var isolationPairs = new Map(); //init->pdi and pdi->init
|
|
221
|
+
|
|
222
|
+
// === 3.3.1 The Paragraph Level ===
|
|
223
|
+
// 3.3.1 P1: Split the text into paragraphs
|
|
224
|
+
var paragraphs = []; // [{start, end, level}, ...]
|
|
225
|
+
var paragraph = null;
|
|
226
|
+
for (var i$1 = 0; i$1 < string.length; i$1++) {
|
|
227
|
+
if (!paragraph) {
|
|
228
|
+
paragraphs.push(paragraph = {
|
|
229
|
+
start: i$1,
|
|
230
|
+
end: string.length - 1,
|
|
231
|
+
// 3.3.1 P2-P3: Determine the paragraph level
|
|
232
|
+
level: baseDirection === 'rtl' ? 1 : baseDirection === 'ltr' ? 0 : determineAutoEmbedLevel(i$1, false)
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
if (charTypes[i$1] & TYPE_B) {
|
|
236
|
+
paragraph.end = i$1;
|
|
237
|
+
paragraph = null;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
var FORMATTING_TYPES = TYPE_RLE | TYPE_LRE | TYPE_RLO | TYPE_LRO | ISOLATE_INIT_TYPES | TYPE_PDI | TYPE_PDF | TYPE_B;
|
|
242
|
+
var nextEven = function (n) { return n + ((n & 1) ? 1 : 2); };
|
|
243
|
+
var nextOdd = function (n) { return n + ((n & 1) ? 2 : 1); };
|
|
244
|
+
|
|
245
|
+
// Everything from here on will operate per paragraph.
|
|
246
|
+
for (var paraIdx = 0; paraIdx < paragraphs.length; paraIdx++) {
|
|
247
|
+
paragraph = paragraphs[paraIdx];
|
|
248
|
+
var statusStack = [{
|
|
249
|
+
_level: paragraph.level,
|
|
250
|
+
_override: 0, //0=neutral, 1=L, 2=R
|
|
251
|
+
_isolate: 0 //bool
|
|
252
|
+
}];
|
|
253
|
+
var stackTop = (void 0);
|
|
254
|
+
var overflowIsolateCount = 0;
|
|
255
|
+
var overflowEmbeddingCount = 0;
|
|
256
|
+
var validIsolateCount = 0;
|
|
257
|
+
charTypeCounts.clear();
|
|
258
|
+
|
|
259
|
+
// === 3.3.2 Explicit Levels and Directions ===
|
|
260
|
+
for (var i$2 = paragraph.start; i$2 <= paragraph.end; i$2++) {
|
|
261
|
+
var charType = charTypes[i$2];
|
|
262
|
+
stackTop = statusStack[statusStack.length - 1];
|
|
263
|
+
|
|
264
|
+
// Set initial counts
|
|
265
|
+
charTypeCounts.set(charType, (charTypeCounts.get(charType) || 0) + 1);
|
|
266
|
+
if (charType & NEUTRAL_ISOLATE_TYPES) {
|
|
267
|
+
charTypeCounts.set(NEUTRAL_ISOLATE_TYPES, (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES) || 0) + 1);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// Explicit Embeddings: 3.3.2 X2 - X3
|
|
271
|
+
if (charType & FORMATTING_TYPES) { //prefilter all formatters
|
|
272
|
+
if (charType & (TYPE_RLE | TYPE_LRE)) {
|
|
273
|
+
embedLevels[i$2] = stackTop._level; // 5.2
|
|
274
|
+
var level = (charType === TYPE_RLE ? nextOdd : nextEven)(stackTop._level);
|
|
275
|
+
if (level <= MAX_DEPTH && !overflowIsolateCount && !overflowEmbeddingCount) {
|
|
276
|
+
statusStack.push({
|
|
277
|
+
_level: level,
|
|
278
|
+
_override: 0,
|
|
279
|
+
_isolate: 0
|
|
280
|
+
});
|
|
281
|
+
} else if (!overflowIsolateCount) {
|
|
282
|
+
overflowEmbeddingCount++;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// Explicit Overrides: 3.3.2 X4 - X5
|
|
287
|
+
else if (charType & (TYPE_RLO | TYPE_LRO)) {
|
|
288
|
+
embedLevels[i$2] = stackTop._level; // 5.2
|
|
289
|
+
var level$1 = (charType === TYPE_RLO ? nextOdd : nextEven)(stackTop._level);
|
|
290
|
+
if (level$1 <= MAX_DEPTH && !overflowIsolateCount && !overflowEmbeddingCount) {
|
|
291
|
+
statusStack.push({
|
|
292
|
+
_level: level$1,
|
|
293
|
+
_override: (charType & TYPE_RLO) ? TYPE_R : TYPE_L,
|
|
294
|
+
_isolate: 0
|
|
295
|
+
});
|
|
296
|
+
} else if (!overflowIsolateCount) {
|
|
297
|
+
overflowEmbeddingCount++;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// Isolates: 3.3.2 X5a - X5c
|
|
302
|
+
else if (charType & ISOLATE_INIT_TYPES) {
|
|
303
|
+
// X5c - FSI becomes either RLI or LRI
|
|
304
|
+
if (charType & TYPE_FSI) {
|
|
305
|
+
charType = determineAutoEmbedLevel(i$2 + 1, true) === 1 ? TYPE_RLI : TYPE_LRI;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
embedLevels[i$2] = stackTop._level;
|
|
309
|
+
if (stackTop._override) {
|
|
310
|
+
changeCharType(i$2, stackTop._override);
|
|
311
|
+
}
|
|
312
|
+
var level$2 = (charType === TYPE_RLI ? nextOdd : nextEven)(stackTop._level);
|
|
313
|
+
if (level$2 <= MAX_DEPTH && overflowIsolateCount === 0 && overflowEmbeddingCount === 0) {
|
|
314
|
+
validIsolateCount++;
|
|
315
|
+
statusStack.push({
|
|
316
|
+
_level: level$2,
|
|
317
|
+
_override: 0,
|
|
318
|
+
_isolate: 1,
|
|
319
|
+
_isolInitIndex: i$2
|
|
320
|
+
});
|
|
321
|
+
} else {
|
|
322
|
+
overflowIsolateCount++;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// Terminating Isolates: 3.3.2 X6a
|
|
327
|
+
else if (charType & TYPE_PDI) {
|
|
328
|
+
if (overflowIsolateCount > 0) {
|
|
329
|
+
overflowIsolateCount--;
|
|
330
|
+
} else if (validIsolateCount > 0) {
|
|
331
|
+
overflowEmbeddingCount = 0;
|
|
332
|
+
while (!statusStack[statusStack.length - 1]._isolate) {
|
|
333
|
+
statusStack.pop();
|
|
334
|
+
}
|
|
335
|
+
// Add to isolation pairs bidirectional mapping:
|
|
336
|
+
var isolInitIndex = statusStack[statusStack.length - 1]._isolInitIndex;
|
|
337
|
+
if (isolInitIndex != null) {
|
|
338
|
+
isolationPairs.set(isolInitIndex, i$2);
|
|
339
|
+
isolationPairs.set(i$2, isolInitIndex);
|
|
340
|
+
}
|
|
341
|
+
statusStack.pop();
|
|
342
|
+
validIsolateCount--;
|
|
343
|
+
}
|
|
344
|
+
stackTop = statusStack[statusStack.length - 1];
|
|
345
|
+
embedLevels[i$2] = stackTop._level;
|
|
346
|
+
if (stackTop._override) {
|
|
347
|
+
changeCharType(i$2, stackTop._override);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
// Terminating Embeddings and Overrides: 3.3.2 X7
|
|
353
|
+
else if (charType & TYPE_PDF) {
|
|
354
|
+
if (overflowIsolateCount === 0) {
|
|
355
|
+
if (overflowEmbeddingCount > 0) {
|
|
356
|
+
overflowEmbeddingCount--;
|
|
357
|
+
} else if (!stackTop._isolate && statusStack.length > 1) {
|
|
358
|
+
statusStack.pop();
|
|
359
|
+
stackTop = statusStack[statusStack.length - 1];
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
embedLevels[i$2] = stackTop._level; // 5.2
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// End of Paragraph: 3.3.2 X8
|
|
366
|
+
else if (charType & TYPE_B) {
|
|
367
|
+
embedLevels[i$2] = paragraph.level;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// Non-formatting characters: 3.3.2 X6
|
|
372
|
+
else {
|
|
373
|
+
embedLevels[i$2] = stackTop._level;
|
|
374
|
+
// NOTE: This exclusion of BN seems to go against what section 5.2 says, but is required for test passage
|
|
375
|
+
if (stackTop._override && charType !== TYPE_BN) {
|
|
376
|
+
changeCharType(i$2, stackTop._override);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// === 3.3.3 Preparations for Implicit Processing ===
|
|
382
|
+
|
|
383
|
+
// Remove all RLE, LRE, RLO, LRO, PDF, and BN characters: 3.3.3 X9
|
|
384
|
+
// Note: Due to section 5.2, we won't remove them, but we'll use the BN_LIKE_TYPES bitset to
|
|
385
|
+
// easily ignore them all from here on out.
|
|
386
|
+
|
|
387
|
+
// 3.3.3 X10
|
|
388
|
+
// Compute the set of isolating run sequences as specified by BD13
|
|
389
|
+
var levelRuns = [];
|
|
390
|
+
var currentRun = null;
|
|
391
|
+
for (var i$3 = paragraph.start; i$3 <= paragraph.end; i$3++) {
|
|
392
|
+
var charType$1 = charTypes[i$3];
|
|
393
|
+
if (!(charType$1 & BN_LIKE_TYPES)) {
|
|
394
|
+
var lvl = embedLevels[i$3];
|
|
395
|
+
var isIsolInit = charType$1 & ISOLATE_INIT_TYPES;
|
|
396
|
+
var isPDI = charType$1 === TYPE_PDI;
|
|
397
|
+
if (currentRun && lvl === currentRun._level) {
|
|
398
|
+
currentRun._end = i$3;
|
|
399
|
+
currentRun._endsWithIsolInit = isIsolInit;
|
|
400
|
+
} else {
|
|
401
|
+
levelRuns.push(currentRun = {
|
|
402
|
+
_start: i$3,
|
|
403
|
+
_end: i$3,
|
|
404
|
+
_level: lvl,
|
|
405
|
+
_startsWithPDI: isPDI,
|
|
406
|
+
_endsWithIsolInit: isIsolInit
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
var isolatingRunSeqs = []; // [{seqIndices: [], sosType: L|R, eosType: L|R}]
|
|
412
|
+
for (var runIdx = 0; runIdx < levelRuns.length; runIdx++) {
|
|
413
|
+
var run = levelRuns[runIdx];
|
|
414
|
+
if (!run._startsWithPDI || (run._startsWithPDI && !isolationPairs.has(run._start))) {
|
|
415
|
+
var seqRuns = [currentRun = run];
|
|
416
|
+
for (var pdiIndex = (void 0); currentRun && currentRun._endsWithIsolInit && (pdiIndex = isolationPairs.get(currentRun._end)) != null;) {
|
|
417
|
+
for (var i$4 = runIdx + 1; i$4 < levelRuns.length; i$4++) {
|
|
418
|
+
if (levelRuns[i$4]._start === pdiIndex) {
|
|
419
|
+
seqRuns.push(currentRun = levelRuns[i$4]);
|
|
420
|
+
break
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
// build flat list of indices across all runs:
|
|
425
|
+
var seqIndices = [];
|
|
426
|
+
for (var i$5 = 0; i$5 < seqRuns.length; i$5++) {
|
|
427
|
+
var run$1 = seqRuns[i$5];
|
|
428
|
+
for (var j = run$1._start; j <= run$1._end; j++) {
|
|
429
|
+
seqIndices.push(j);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
// determine the sos/eos types:
|
|
433
|
+
var firstLevel = embedLevels[seqIndices[0]];
|
|
434
|
+
var prevLevel = paragraph.level;
|
|
435
|
+
for (var i$6 = seqIndices[0] - 1; i$6 >= 0; i$6--) {
|
|
436
|
+
if (!(charTypes[i$6] & BN_LIKE_TYPES)) { //5.2
|
|
437
|
+
prevLevel = embedLevels[i$6];
|
|
438
|
+
break
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
var lastIndex = seqIndices[seqIndices.length - 1];
|
|
442
|
+
var lastLevel = embedLevels[lastIndex];
|
|
443
|
+
var nextLevel = paragraph.level;
|
|
444
|
+
if (!(charTypes[lastIndex] & ISOLATE_INIT_TYPES)) {
|
|
445
|
+
for (var i$7 = lastIndex + 1; i$7 <= paragraph.end; i$7++) {
|
|
446
|
+
if (!(charTypes[i$7] & BN_LIKE_TYPES)) { //5.2
|
|
447
|
+
nextLevel = embedLevels[i$7];
|
|
448
|
+
break
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
isolatingRunSeqs.push({
|
|
453
|
+
_seqIndices: seqIndices,
|
|
454
|
+
_sosType: Math.max(prevLevel, firstLevel) % 2 ? TYPE_R : TYPE_L,
|
|
455
|
+
_eosType: Math.max(nextLevel, lastLevel) % 2 ? TYPE_R : TYPE_L
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// The next steps are done per isolating run sequence
|
|
461
|
+
for (var seqIdx = 0; seqIdx < isolatingRunSeqs.length; seqIdx++) {
|
|
462
|
+
var ref = isolatingRunSeqs[seqIdx];
|
|
463
|
+
var seqIndices$1 = ref._seqIndices;
|
|
464
|
+
var sosType = ref._sosType;
|
|
465
|
+
var eosType = ref._eosType;
|
|
466
|
+
/**
|
|
467
|
+
* All the level runs in an isolating run sequence have the same embedding level.
|
|
468
|
+
*
|
|
469
|
+
* DO NOT change any `embedLevels[i]` within the current scope.
|
|
470
|
+
*/
|
|
471
|
+
var embedDirection = ((embedLevels[seqIndices$1[0]]) & 1) ? TYPE_R : TYPE_L;
|
|
472
|
+
|
|
473
|
+
// === 3.3.4 Resolving Weak Types ===
|
|
474
|
+
|
|
475
|
+
// W1 + 5.2. Search backward from each NSM to the first character in the isolating run sequence whose
|
|
476
|
+
// bidirectional type is not BN, and set the NSM to ON if it is an isolate initiator or PDI, and to its
|
|
477
|
+
// type otherwise. If the NSM is the first non-BN character, change the NSM to the type of sos.
|
|
478
|
+
if (charTypeCounts.get(TYPE_NSM)) {
|
|
479
|
+
for (var si = 0; si < seqIndices$1.length; si++) {
|
|
480
|
+
var i$8 = seqIndices$1[si];
|
|
481
|
+
if (charTypes[i$8] & TYPE_NSM) {
|
|
482
|
+
var prevType = sosType;
|
|
483
|
+
for (var sj = si - 1; sj >= 0; sj--) {
|
|
484
|
+
if (!(charTypes[seqIndices$1[sj]] & BN_LIKE_TYPES)) { //5.2 scan back to first non-BN
|
|
485
|
+
prevType = charTypes[seqIndices$1[sj]];
|
|
486
|
+
break
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
changeCharType(i$8, (prevType & (ISOLATE_INIT_TYPES | TYPE_PDI)) ? TYPE_ON : prevType);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// W2. Search backward from each instance of a European number until the first strong type (R, L, AL, or sos)
|
|
495
|
+
// is found. If an AL is found, change the type of the European number to Arabic number.
|
|
496
|
+
if (charTypeCounts.get(TYPE_EN)) {
|
|
497
|
+
for (var si$1 = 0; si$1 < seqIndices$1.length; si$1++) {
|
|
498
|
+
var i$9 = seqIndices$1[si$1];
|
|
499
|
+
if (charTypes[i$9] & TYPE_EN) {
|
|
500
|
+
for (var sj$1 = si$1 - 1; sj$1 >= -1; sj$1--) {
|
|
501
|
+
var prevCharType = sj$1 === -1 ? sosType : charTypes[seqIndices$1[sj$1]];
|
|
502
|
+
if (prevCharType & STRONG_TYPES) {
|
|
503
|
+
if (prevCharType === TYPE_AL) {
|
|
504
|
+
changeCharType(i$9, TYPE_AN);
|
|
505
|
+
}
|
|
506
|
+
break
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// W3. Change all ALs to R
|
|
514
|
+
if (charTypeCounts.get(TYPE_AL)) {
|
|
515
|
+
for (var si$2 = 0; si$2 < seqIndices$1.length; si$2++) {
|
|
516
|
+
var i$10 = seqIndices$1[si$2];
|
|
517
|
+
if (charTypes[i$10] & TYPE_AL) {
|
|
518
|
+
changeCharType(i$10, TYPE_R);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// W4. A single European separator between two European numbers changes to a European number. A single common
|
|
524
|
+
// separator between two numbers of the same type changes to that type.
|
|
525
|
+
if (charTypeCounts.get(TYPE_ES) || charTypeCounts.get(TYPE_CS)) {
|
|
526
|
+
for (var si$3 = 1; si$3 < seqIndices$1.length - 1; si$3++) {
|
|
527
|
+
var i$11 = seqIndices$1[si$3];
|
|
528
|
+
if (charTypes[i$11] & (TYPE_ES | TYPE_CS)) {
|
|
529
|
+
var prevType$1 = 0, nextType = 0;
|
|
530
|
+
for (var sj$2 = si$3 - 1; sj$2 >= 0; sj$2--) {
|
|
531
|
+
prevType$1 = charTypes[seqIndices$1[sj$2]];
|
|
532
|
+
if (!(prevType$1 & BN_LIKE_TYPES)) { //5.2
|
|
533
|
+
break
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
for (var sj$3 = si$3 + 1; sj$3 < seqIndices$1.length; sj$3++) {
|
|
537
|
+
nextType = charTypes[seqIndices$1[sj$3]];
|
|
538
|
+
if (!(nextType & BN_LIKE_TYPES)) { //5.2
|
|
539
|
+
break
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
if (prevType$1 === nextType && (charTypes[i$11] === TYPE_ES ? prevType$1 === TYPE_EN : (prevType$1 & (TYPE_EN | TYPE_AN)))) {
|
|
543
|
+
changeCharType(i$11, prevType$1);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
// W5. A sequence of European terminators adjacent to European numbers changes to all European numbers.
|
|
550
|
+
if (charTypeCounts.get(TYPE_EN)) {
|
|
551
|
+
for (var si$4 = 0; si$4 < seqIndices$1.length; si$4++) {
|
|
552
|
+
var i$12 = seqIndices$1[si$4];
|
|
553
|
+
if (charTypes[i$12] & TYPE_EN) {
|
|
554
|
+
for (var sj$4 = si$4 - 1; sj$4 >= 0 && (charTypes[seqIndices$1[sj$4]] & (TYPE_ET | BN_LIKE_TYPES)); sj$4--) {
|
|
555
|
+
changeCharType(seqIndices$1[sj$4], TYPE_EN);
|
|
556
|
+
}
|
|
557
|
+
for (si$4++; si$4 < seqIndices$1.length && (charTypes[seqIndices$1[si$4]] & (TYPE_ET | BN_LIKE_TYPES | TYPE_EN)); si$4++) {
|
|
558
|
+
if (charTypes[seqIndices$1[si$4]] !== TYPE_EN) {
|
|
559
|
+
changeCharType(seqIndices$1[si$4], TYPE_EN);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
// W6. Otherwise, separators and terminators change to Other Neutral.
|
|
567
|
+
if (charTypeCounts.get(TYPE_ET) || charTypeCounts.get(TYPE_ES) || charTypeCounts.get(TYPE_CS)) {
|
|
568
|
+
for (var si$5 = 0; si$5 < seqIndices$1.length; si$5++) {
|
|
569
|
+
var i$13 = seqIndices$1[si$5];
|
|
570
|
+
if (charTypes[i$13] & (TYPE_ET | TYPE_ES | TYPE_CS)) {
|
|
571
|
+
changeCharType(i$13, TYPE_ON);
|
|
572
|
+
// 5.2 transform adjacent BNs too:
|
|
573
|
+
for (var sj$5 = si$5 - 1; sj$5 >= 0 && (charTypes[seqIndices$1[sj$5]] & BN_LIKE_TYPES); sj$5--) {
|
|
574
|
+
changeCharType(seqIndices$1[sj$5], TYPE_ON);
|
|
575
|
+
}
|
|
576
|
+
for (var sj$6 = si$5 + 1; sj$6 < seqIndices$1.length && (charTypes[seqIndices$1[sj$6]] & BN_LIKE_TYPES); sj$6++) {
|
|
577
|
+
changeCharType(seqIndices$1[sj$6], TYPE_ON);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
// W7. Search backward from each instance of a European number until the first strong type (R, L, or sos)
|
|
584
|
+
// is found. If an L is found, then change the type of the European number to L.
|
|
585
|
+
// NOTE: implemented in single forward pass for efficiency
|
|
586
|
+
if (charTypeCounts.get(TYPE_EN)) {
|
|
587
|
+
for (var si$6 = 0, prevStrongType = sosType; si$6 < seqIndices$1.length; si$6++) {
|
|
588
|
+
var i$14 = seqIndices$1[si$6];
|
|
589
|
+
var type = charTypes[i$14];
|
|
590
|
+
if (type & TYPE_EN) {
|
|
591
|
+
if (prevStrongType === TYPE_L) {
|
|
592
|
+
changeCharType(i$14, TYPE_L);
|
|
593
|
+
}
|
|
594
|
+
} else if (type & STRONG_TYPES) {
|
|
595
|
+
prevStrongType = type;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
// === 3.3.5 Resolving Neutral and Isolate Formatting Types ===
|
|
601
|
+
|
|
602
|
+
if (charTypeCounts.get(NEUTRAL_ISOLATE_TYPES)) {
|
|
603
|
+
// N0. Process bracket pairs in an isolating run sequence sequentially in the logical order of the text
|
|
604
|
+
// positions of the opening paired brackets using the logic given below. Within this scope, bidirectional
|
|
605
|
+
// types EN and AN are treated as R.
|
|
606
|
+
var R_TYPES_FOR_N_STEPS = (TYPE_R | TYPE_EN | TYPE_AN);
|
|
607
|
+
var STRONG_TYPES_FOR_N_STEPS = R_TYPES_FOR_N_STEPS | TYPE_L;
|
|
608
|
+
|
|
609
|
+
// * Identify the bracket pairs in the current isolating run sequence according to BD16.
|
|
610
|
+
var bracketPairs = [];
|
|
611
|
+
{
|
|
612
|
+
var openerStack = [];
|
|
613
|
+
for (var si$7 = 0; si$7 < seqIndices$1.length; si$7++) {
|
|
614
|
+
// NOTE: for any potential bracket character we also test that it still carries a NI
|
|
615
|
+
// type, as that may have been changed earlier. This doesn't seem to be explicitly
|
|
616
|
+
// called out in the spec, but is required for passage of certain tests.
|
|
617
|
+
if (charTypes[seqIndices$1[si$7]] & NEUTRAL_ISOLATE_TYPES) {
|
|
618
|
+
var char = string[seqIndices$1[si$7]];
|
|
619
|
+
var oppositeBracket = (void 0);
|
|
620
|
+
// Opening bracket
|
|
621
|
+
if (openingToClosingBracket(char) !== null) {
|
|
622
|
+
if (openerStack.length < 63) {
|
|
623
|
+
openerStack.push({ char: char, seqIndex: si$7 });
|
|
624
|
+
} else {
|
|
625
|
+
break
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
// Closing bracket
|
|
629
|
+
else if ((oppositeBracket = closingToOpeningBracket(char)) !== null) {
|
|
630
|
+
for (var stackIdx = openerStack.length - 1; stackIdx >= 0; stackIdx--) {
|
|
631
|
+
var stackChar = openerStack[stackIdx].char;
|
|
632
|
+
if (stackChar === oppositeBracket ||
|
|
633
|
+
stackChar === closingToOpeningBracket(getCanonicalBracket(char)) ||
|
|
634
|
+
openingToClosingBracket(getCanonicalBracket(stackChar)) === char
|
|
635
|
+
) {
|
|
636
|
+
bracketPairs.push([openerStack[stackIdx].seqIndex, si$7]);
|
|
637
|
+
openerStack.length = stackIdx; //pop the matching bracket and all following
|
|
638
|
+
break
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
bracketPairs.sort(function (a, b) { return a[0] - b[0]; });
|
|
645
|
+
}
|
|
646
|
+
// * For each bracket-pair element in the list of pairs of text positions
|
|
647
|
+
for (var pairIdx = 0; pairIdx < bracketPairs.length; pairIdx++) {
|
|
648
|
+
var ref$1 = bracketPairs[pairIdx];
|
|
649
|
+
var openSeqIdx = ref$1[0];
|
|
650
|
+
var closeSeqIdx = ref$1[1];
|
|
651
|
+
// a. Inspect the bidirectional types of the characters enclosed within the bracket pair.
|
|
652
|
+
// b. If any strong type (either L or R) matching the embedding direction is found, set the type for both
|
|
653
|
+
// brackets in the pair to match the embedding direction.
|
|
654
|
+
var foundStrongType = false;
|
|
655
|
+
var useStrongType = 0;
|
|
656
|
+
for (var si$8 = openSeqIdx + 1; si$8 < closeSeqIdx; si$8++) {
|
|
657
|
+
var i$15 = seqIndices$1[si$8];
|
|
658
|
+
if (charTypes[i$15] & STRONG_TYPES_FOR_N_STEPS) {
|
|
659
|
+
foundStrongType = true;
|
|
660
|
+
var lr = (charTypes[i$15] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;
|
|
661
|
+
if (lr === embedDirection) {
|
|
662
|
+
useStrongType = lr;
|
|
663
|
+
break
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
// c. Otherwise, if there is a strong type it must be opposite the embedding direction. Therefore, test
|
|
668
|
+
// for an established context with a preceding strong type by checking backwards before the opening paired
|
|
669
|
+
// bracket until the first strong type (L, R, or sos) is found.
|
|
670
|
+
// 1. If the preceding strong type is also opposite the embedding direction, context is established, so
|
|
671
|
+
// set the type for both brackets in the pair to that direction.
|
|
672
|
+
// 2. Otherwise set the type for both brackets in the pair to the embedding direction.
|
|
673
|
+
if (foundStrongType && !useStrongType) {
|
|
674
|
+
useStrongType = sosType;
|
|
675
|
+
for (var si$9 = openSeqIdx - 1; si$9 >= 0; si$9--) {
|
|
676
|
+
var i$16 = seqIndices$1[si$9];
|
|
677
|
+
if (charTypes[i$16] & STRONG_TYPES_FOR_N_STEPS) {
|
|
678
|
+
var lr$1 = (charTypes[i$16] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;
|
|
679
|
+
if (lr$1 !== embedDirection) {
|
|
680
|
+
useStrongType = lr$1;
|
|
681
|
+
} else {
|
|
682
|
+
useStrongType = embedDirection;
|
|
683
|
+
}
|
|
684
|
+
break
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
if (useStrongType) {
|
|
689
|
+
charTypes[seqIndices$1[openSeqIdx]] = charTypes[seqIndices$1[closeSeqIdx]] = useStrongType;
|
|
690
|
+
// * Any number of characters that had original bidirectional character type NSM prior to the application
|
|
691
|
+
// of W1 that immediately follow a paired bracket which changed to L or R under N0 should change to match
|
|
692
|
+
// the type of their preceding bracket.
|
|
693
|
+
if (useStrongType !== embedDirection) {
|
|
694
|
+
for (var si$10 = openSeqIdx + 1; si$10 < seqIndices$1.length; si$10++) {
|
|
695
|
+
if (!(charTypes[seqIndices$1[si$10]] & BN_LIKE_TYPES)) {
|
|
696
|
+
if (getBidiCharType(string[seqIndices$1[si$10]]) & TYPE_NSM) {
|
|
697
|
+
charTypes[seqIndices$1[si$10]] = useStrongType;
|
|
698
|
+
}
|
|
699
|
+
break
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
if (useStrongType !== embedDirection) {
|
|
704
|
+
for (var si$11 = closeSeqIdx + 1; si$11 < seqIndices$1.length; si$11++) {
|
|
705
|
+
if (!(charTypes[seqIndices$1[si$11]] & BN_LIKE_TYPES)) {
|
|
706
|
+
if (getBidiCharType(string[seqIndices$1[si$11]]) & TYPE_NSM) {
|
|
707
|
+
charTypes[seqIndices$1[si$11]] = useStrongType;
|
|
708
|
+
}
|
|
709
|
+
break
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// N1. A sequence of NIs takes the direction of the surrounding strong text if the text on both sides has the
|
|
717
|
+
// same direction.
|
|
718
|
+
// N2. Any remaining NIs take the embedding direction.
|
|
719
|
+
for (var si$12 = 0; si$12 < seqIndices$1.length; si$12++) {
|
|
720
|
+
if (charTypes[seqIndices$1[si$12]] & NEUTRAL_ISOLATE_TYPES) {
|
|
721
|
+
var niRunStart = si$12, niRunEnd = si$12;
|
|
722
|
+
var prevType$2 = sosType; //si === 0 ? sosType : (charTypes[seqIndices[si - 1]] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L
|
|
723
|
+
for (var si2 = si$12 - 1; si2 >= 0; si2--) {
|
|
724
|
+
if (charTypes[seqIndices$1[si2]] & BN_LIKE_TYPES) {
|
|
725
|
+
niRunStart = si2; //5.2 treat BNs adjacent to NIs as NIs
|
|
726
|
+
} else {
|
|
727
|
+
prevType$2 = (charTypes[seqIndices$1[si2]] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;
|
|
728
|
+
break
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
var nextType$1 = eosType;
|
|
732
|
+
for (var si2$1 = si$12 + 1; si2$1 < seqIndices$1.length; si2$1++) {
|
|
733
|
+
if (charTypes[seqIndices$1[si2$1]] & (NEUTRAL_ISOLATE_TYPES | BN_LIKE_TYPES)) {
|
|
734
|
+
niRunEnd = si2$1;
|
|
735
|
+
} else {
|
|
736
|
+
nextType$1 = (charTypes[seqIndices$1[si2$1]] & R_TYPES_FOR_N_STEPS) ? TYPE_R : TYPE_L;
|
|
737
|
+
break
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
for (var sj$7 = niRunStart; sj$7 <= niRunEnd; sj$7++) {
|
|
741
|
+
charTypes[seqIndices$1[sj$7]] = prevType$2 === nextType$1 ? prevType$2 : embedDirection;
|
|
742
|
+
}
|
|
743
|
+
si$12 = niRunEnd;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
// === 3.3.6 Resolving Implicit Levels ===
|
|
750
|
+
|
|
751
|
+
for (var i$17 = paragraph.start; i$17 <= paragraph.end; i$17++) {
|
|
752
|
+
var level$3 = embedLevels[i$17];
|
|
753
|
+
var type$1 = charTypes[i$17];
|
|
754
|
+
// I2. For all characters with an odd (right-to-left) embedding level, those of type L, EN or AN go up one level.
|
|
755
|
+
if (level$3 & 1) {
|
|
756
|
+
if (type$1 & (TYPE_L | TYPE_EN | TYPE_AN)) {
|
|
757
|
+
embedLevels[i$17]++;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
// I1. For all characters with an even (left-to-right) embedding level, those of type R go up one level
|
|
761
|
+
// and those of type AN or EN go up two levels.
|
|
762
|
+
else {
|
|
763
|
+
if (type$1 & TYPE_R) {
|
|
764
|
+
embedLevels[i$17]++;
|
|
765
|
+
} else if (type$1 & (TYPE_AN | TYPE_EN)) {
|
|
766
|
+
embedLevels[i$17] += 2;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
// 5.2: Resolve any LRE, RLE, LRO, RLO, PDF, or BN to the level of the preceding character if there is one,
|
|
771
|
+
// and otherwise to the base level.
|
|
772
|
+
if (type$1 & BN_LIKE_TYPES) {
|
|
773
|
+
embedLevels[i$17] = i$17 === 0 ? paragraph.level : embedLevels[i$17 - 1];
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// 3.4 L1.1-4: Reset the embedding level of segment/paragraph separators, and any sequence of whitespace or
|
|
777
|
+
// isolate formatting characters preceding them or the end of the paragraph, to the paragraph level.
|
|
778
|
+
// NOTE: this will also need to be applied to each individual line ending after line wrapping occurs.
|
|
779
|
+
if (i$17 === paragraph.end || getBidiCharType(string[i$17]) & (TYPE_S | TYPE_B)) {
|
|
780
|
+
for (var j$1 = i$17; j$1 >= 0 && (getBidiCharType(string[j$1]) & TRAILING_TYPES); j$1--) {
|
|
781
|
+
embedLevels[j$1] = paragraph.level;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
// DONE! The resolved levels can then be used, after line wrapping, to flip runs of characters
|
|
788
|
+
// according to section 3.4 Reordering Resolved Levels
|
|
789
|
+
return {
|
|
790
|
+
levels: embedLevels,
|
|
791
|
+
paragraphs: paragraphs
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
function determineAutoEmbedLevel (start, isFSI) {
|
|
795
|
+
// 3.3.1 P2 - P3
|
|
796
|
+
for (var i = start; i < string.length; i++) {
|
|
797
|
+
var charType = charTypes[i];
|
|
798
|
+
if (charType & (TYPE_R | TYPE_AL)) {
|
|
799
|
+
return 1
|
|
800
|
+
}
|
|
801
|
+
if ((charType & (TYPE_B | TYPE_L)) || (isFSI && charType === TYPE_PDI)) {
|
|
802
|
+
return 0
|
|
803
|
+
}
|
|
804
|
+
if (charType & ISOLATE_INIT_TYPES) {
|
|
805
|
+
var pdi = indexOfMatchingPDI(i);
|
|
806
|
+
i = pdi === -1 ? string.length : pdi;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
return 0
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
function indexOfMatchingPDI (isolateStart) {
|
|
813
|
+
// 3.1.2 BD9
|
|
814
|
+
var isolationLevel = 1;
|
|
815
|
+
for (var i = isolateStart + 1; i < string.length; i++) {
|
|
816
|
+
var charType = charTypes[i];
|
|
817
|
+
if (charType & TYPE_B) {
|
|
818
|
+
break
|
|
819
|
+
}
|
|
820
|
+
if (charType & TYPE_PDI) {
|
|
821
|
+
if (--isolationLevel === 0) {
|
|
822
|
+
return i
|
|
823
|
+
}
|
|
824
|
+
} else if (charType & ISOLATE_INIT_TYPES) {
|
|
825
|
+
isolationLevel++;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
return -1
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
// Bidi mirrored chars data, auto generated
|
|
833
|
+
var data = "14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1";
|
|
834
|
+
|
|
835
|
+
var mirrorMap;
|
|
836
|
+
|
|
837
|
+
function parse () {
|
|
838
|
+
if (!mirrorMap) {
|
|
839
|
+
//const start = performance.now()
|
|
840
|
+
var ref = parseCharacterMap(data, true);
|
|
841
|
+
var map = ref.map;
|
|
842
|
+
var reverseMap = ref.reverseMap;
|
|
843
|
+
// Combine both maps into one
|
|
844
|
+
reverseMap.forEach(function (value, key) {
|
|
845
|
+
map.set(key, value);
|
|
846
|
+
});
|
|
847
|
+
mirrorMap = map;
|
|
848
|
+
//console.log(`mirrored chars parsed in ${performance.now() - start}ms`)
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
function getMirroredCharacter (char) {
|
|
853
|
+
parse();
|
|
854
|
+
return mirrorMap.get(char) || null
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Given a string and its resolved embedding levels, build a map of indices to replacement chars
|
|
859
|
+
* for any characters in right-to-left segments that have defined mirrored characters.
|
|
860
|
+
* @param string
|
|
861
|
+
* @param embeddingLevels
|
|
862
|
+
* @param [start]
|
|
863
|
+
* @param [end]
|
|
864
|
+
* @return {Map<number, string>}
|
|
865
|
+
*/
|
|
866
|
+
function getMirroredCharactersMap(string, embeddingLevels, start, end) {
|
|
867
|
+
var strLen = string.length;
|
|
868
|
+
start = Math.max(0, start == null ? 0 : +start);
|
|
869
|
+
end = Math.min(strLen - 1, end == null ? strLen - 1 : +end);
|
|
870
|
+
|
|
871
|
+
var map = new Map();
|
|
872
|
+
for (var i = start; i <= end; i++) {
|
|
873
|
+
if (embeddingLevels[i] & 1) { //only odd (rtl) levels
|
|
874
|
+
var mirror = getMirroredCharacter(string[i]);
|
|
875
|
+
if (mirror !== null) {
|
|
876
|
+
map.set(i, mirror);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
return map
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Given a start and end denoting a single line within a string, and a set of precalculated
|
|
885
|
+
* bidi embedding levels, produce a list of segments whose ordering should be flipped, in sequence.
|
|
886
|
+
* @param {string} string - the full input string
|
|
887
|
+
* @param {GetEmbeddingLevelsResult} embeddingLevelsResult - the result object from getEmbeddingLevels
|
|
888
|
+
* @param {number} [start] - first character in a subset of the full string
|
|
889
|
+
* @param {number} [end] - last character in a subset of the full string
|
|
890
|
+
* @return {number[][]} - the list of start/end segments that should be flipped, in order.
|
|
891
|
+
*/
|
|
892
|
+
function getReorderSegments(string, embeddingLevelsResult, start, end) {
|
|
893
|
+
var strLen = string.length;
|
|
894
|
+
start = Math.max(0, start == null ? 0 : +start);
|
|
895
|
+
end = Math.min(strLen - 1, end == null ? strLen - 1 : +end);
|
|
896
|
+
|
|
897
|
+
var segments = [];
|
|
898
|
+
embeddingLevelsResult.paragraphs.forEach(function (paragraph) {
|
|
899
|
+
var lineStart = Math.max(start, paragraph.start);
|
|
900
|
+
var lineEnd = Math.min(end, paragraph.end);
|
|
901
|
+
if (lineStart < lineEnd) {
|
|
902
|
+
// Local slice for mutation
|
|
903
|
+
var lineLevels = embeddingLevelsResult.levels.slice(lineStart, lineEnd + 1);
|
|
904
|
+
|
|
905
|
+
// 3.4 L1.4: Reset any sequence of whitespace characters and/or isolate formatting characters at the
|
|
906
|
+
// end of the line to the paragraph level.
|
|
907
|
+
for (var i = lineEnd; i >= lineStart && (getBidiCharType(string[i]) & TRAILING_TYPES); i--) {
|
|
908
|
+
lineLevels[i] = paragraph.level;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
// L2. From the highest level found in the text to the lowest odd level on each line, including intermediate levels
|
|
912
|
+
// not actually present in the text, reverse any contiguous sequence of characters that are at that level or higher.
|
|
913
|
+
var maxLevel = paragraph.level;
|
|
914
|
+
var minOddLevel = Infinity;
|
|
915
|
+
for (var i$1 = 0; i$1 < lineLevels.length; i$1++) {
|
|
916
|
+
var level = lineLevels[i$1];
|
|
917
|
+
if (level > maxLevel) { maxLevel = level; }
|
|
918
|
+
if (level < minOddLevel) { minOddLevel = level | 1; }
|
|
919
|
+
}
|
|
920
|
+
for (var lvl = maxLevel; lvl >= minOddLevel; lvl--) {
|
|
921
|
+
for (var i$2 = 0; i$2 < lineLevels.length; i$2++) {
|
|
922
|
+
if (lineLevels[i$2] >= lvl) {
|
|
923
|
+
var segStart = i$2;
|
|
924
|
+
while (i$2 + 1 < lineLevels.length && lineLevels[i$2 + 1] >= lvl) {
|
|
925
|
+
i$2++;
|
|
926
|
+
}
|
|
927
|
+
if (i$2 > segStart) {
|
|
928
|
+
segments.push([segStart + lineStart, i$2 + lineStart]);
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
return segments
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
/**
|
|
939
|
+
* @param {string} string
|
|
940
|
+
* @param {GetEmbeddingLevelsResult} embedLevelsResult
|
|
941
|
+
* @param {number} [start]
|
|
942
|
+
* @param {number} [end]
|
|
943
|
+
* @return {string} the new string with bidi segments reordered
|
|
944
|
+
*/
|
|
945
|
+
function getReorderedString(string, embedLevelsResult, start, end) {
|
|
946
|
+
var indices = getReorderedIndices(string, embedLevelsResult, start, end);
|
|
947
|
+
var chars = [].concat( string );
|
|
948
|
+
indices.forEach(function (charIndex, i) {
|
|
949
|
+
chars[i] = (
|
|
950
|
+
(embedLevelsResult.levels[charIndex] & 1) ? getMirroredCharacter(string[charIndex]) : null
|
|
951
|
+
) || string[charIndex];
|
|
952
|
+
});
|
|
953
|
+
return chars.join('')
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* @param {string} string
|
|
958
|
+
* @param {GetEmbeddingLevelsResult} embedLevelsResult
|
|
959
|
+
* @param {number} [start]
|
|
960
|
+
* @param {number} [end]
|
|
961
|
+
* @return {number[]} an array with character indices in their new bidi order
|
|
962
|
+
*/
|
|
963
|
+
function getReorderedIndices(string, embedLevelsResult, start, end) {
|
|
964
|
+
var segments = getReorderSegments(string, embedLevelsResult, start, end);
|
|
965
|
+
// Fill an array with indices
|
|
966
|
+
var indices = [];
|
|
967
|
+
for (var i = 0; i < string.length; i++) {
|
|
968
|
+
indices[i] = i;
|
|
969
|
+
}
|
|
970
|
+
// Reverse each segment in order
|
|
971
|
+
segments.forEach(function (ref) {
|
|
972
|
+
var start = ref[0];
|
|
973
|
+
var end = ref[1];
|
|
974
|
+
|
|
975
|
+
var slice = indices.slice(start, end + 1);
|
|
976
|
+
for (var i = slice.length; i--;) {
|
|
977
|
+
indices[end - i] = slice[i];
|
|
978
|
+
}
|
|
979
|
+
});
|
|
980
|
+
return indices
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
exports.closingToOpeningBracket = closingToOpeningBracket;
|
|
984
|
+
exports.getBidiCharType = getBidiCharType;
|
|
985
|
+
exports.getBidiCharTypeName = getBidiCharTypeName;
|
|
986
|
+
exports.getCanonicalBracket = getCanonicalBracket;
|
|
987
|
+
exports.getEmbeddingLevels = getEmbeddingLevels;
|
|
988
|
+
exports.getMirroredCharacter = getMirroredCharacter;
|
|
989
|
+
exports.getMirroredCharactersMap = getMirroredCharactersMap;
|
|
990
|
+
exports.getReorderSegments = getReorderSegments;
|
|
991
|
+
exports.getReorderedIndices = getReorderedIndices;
|
|
992
|
+
exports.getReorderedString = getReorderedString;
|
|
993
|
+
exports.openingToClosingBracket = openingToClosingBracket;
|
|
994
|
+
|
|
995
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
996
|
+
|
|
997
|
+
return exports;
|
|
998
|
+
|
|
999
|
+
}({}));
|
|
1000
|
+
return bidi}
|
|
1001
|
+
|
|
1002
|
+
export default bidiFactory;
|