@opensumi/ide-core-common 2.12.1-next-079c1930
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/lib/application-error.d.ts +36 -0
- package/lib/application-error.d.ts.map +1 -0
- package/lib/application-error.js +64 -0
- package/lib/application-error.js.map +1 -0
- package/lib/application-props.d.ts +26 -0
- package/lib/application-props.d.ts.map +1 -0
- package/lib/application-props.js +3 -0
- package/lib/application-props.js.map +1 -0
- package/lib/arrays.d.ts +131 -0
- package/lib/arrays.d.ts.map +1 -0
- package/lib/arrays.js +533 -0
- package/lib/arrays.js.map +1 -0
- package/lib/async.d.ts +165 -0
- package/lib/async.d.ts.map +1 -0
- package/lib/async.js +417 -0
- package/lib/async.js.map +1 -0
- package/lib/browser-fs/ensure-dir.d.ts +7 -0
- package/lib/browser-fs/ensure-dir.d.ts.map +1 -0
- package/lib/browser-fs/ensure-dir.js +40 -0
- package/lib/browser-fs/ensure-dir.js.map +1 -0
- package/lib/browser-fs/util.d.ts +18 -0
- package/lib/browser-fs/util.d.ts.map +1 -0
- package/lib/browser-fs/util.js +21 -0
- package/lib/browser-fs/util.js.map +1 -0
- package/lib/cache.d.ts +12 -0
- package/lib/cache.d.ts.map +1 -0
- package/lib/cache.js +36 -0
- package/lib/cache.js.map +1 -0
- package/lib/cancellation.d.ts +23 -0
- package/lib/cancellation.d.ts.map +1 -0
- package/lib/cancellation.js +116 -0
- package/lib/cancellation.js.map +1 -0
- package/lib/charCode.d.ts +406 -0
- package/lib/charCode.d.ts.map +1 -0
- package/lib/charCode.js +8 -0
- package/lib/charCode.js.map +1 -0
- package/lib/character-classifier.d.ts +25 -0
- package/lib/character-classifier.d.ts.map +1 -0
- package/lib/character-classifier.js +58 -0
- package/lib/character-classifier.js.map +1 -0
- package/lib/command.d.ts +350 -0
- package/lib/command.d.ts.map +1 -0
- package/lib/command.js +408 -0
- package/lib/command.js.map +1 -0
- package/lib/connection.d.ts +8 -0
- package/lib/connection.d.ts.map +1 -0
- package/lib/connection.js +17 -0
- package/lib/connection.js.map +1 -0
- package/lib/const/application.d.ts +3 -0
- package/lib/const/application.d.ts.map +1 -0
- package/lib/const/application.js +6 -0
- package/lib/const/application.js.map +1 -0
- package/lib/const/encodings.d.ts +10 -0
- package/lib/const/encodings.d.ts.map +1 -0
- package/lib/const/encodings.js +244 -0
- package/lib/const/encodings.js.map +1 -0
- package/lib/const/index.d.ts +2 -0
- package/lib/const/index.d.ts.map +1 -0
- package/lib/const/index.js +5 -0
- package/lib/const/index.js.map +1 -0
- package/lib/contribution-provider.d.ts +38 -0
- package/lib/contribution-provider.d.ts.map +1 -0
- package/lib/contribution-provider.js +60 -0
- package/lib/contribution-provider.js.map +1 -0
- package/lib/credential.d.ts +21 -0
- package/lib/credential.d.ts.map +1 -0
- package/lib/credential.js +6 -0
- package/lib/credential.js.map +1 -0
- package/lib/cryptr.d.ts +7 -0
- package/lib/cryptr.d.ts.map +1 -0
- package/lib/cryptr.js +6 -0
- package/lib/cryptr.js.map +1 -0
- package/lib/date.d.ts +2 -0
- package/lib/date.d.ts.map +1 -0
- package/lib/date.js +16 -0
- package/lib/date.js.map +1 -0
- package/lib/declare.d.ts +3 -0
- package/lib/declare.d.ts.map +1 -0
- package/lib/declare.js +3 -0
- package/lib/declare.js.map +1 -0
- package/lib/di-helper/domain-helper.d.ts +14 -0
- package/lib/di-helper/domain-helper.d.ts.map +1 -0
- package/lib/di-helper/domain-helper.js +48 -0
- package/lib/di-helper/domain-helper.js.map +1 -0
- package/lib/di-helper/index.d.ts +2 -0
- package/lib/di-helper/index.d.ts.map +1 -0
- package/lib/di-helper/index.js +5 -0
- package/lib/di-helper/index.js.map +1 -0
- package/lib/disposable.d.ts +88 -0
- package/lib/disposable.d.ts.map +1 -0
- package/lib/disposable.js +309 -0
- package/lib/disposable.js.map +1 -0
- package/lib/electron.d.ts +118 -0
- package/lib/electron.d.ts.map +1 -0
- package/lib/electron.js +7 -0
- package/lib/electron.js.map +1 -0
- package/lib/encoding/index.d.ts +34 -0
- package/lib/encoding/index.d.ts.map +1 -0
- package/lib/encoding/index.js +219 -0
- package/lib/encoding/index.js.map +1 -0
- package/lib/env.d.ts +2 -0
- package/lib/env.d.ts.map +1 -0
- package/lib/env.js +5 -0
- package/lib/env.js.map +1 -0
- package/lib/errors.d.ts +60 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +148 -0
- package/lib/errors.js.map +1 -0
- package/lib/event-bus/basic-event.d.ts +5 -0
- package/lib/event-bus/basic-event.d.ts.map +1 -0
- package/lib/event-bus/basic-event.js +10 -0
- package/lib/event-bus/basic-event.js.map +1 -0
- package/lib/event-bus/event-bus-types.d.ts +66 -0
- package/lib/event-bus/event-bus-types.d.ts.map +1 -0
- package/lib/event-bus/event-bus-types.js +5 -0
- package/lib/event-bus/event-bus-types.js.map +1 -0
- package/lib/event-bus/event-bus.d.ts +13 -0
- package/lib/event-bus/event-bus.d.ts.map +1 -0
- package/lib/event-bus/event-bus.js +55 -0
- package/lib/event-bus/event-bus.js.map +1 -0
- package/lib/event-bus/event-decorator.d.ts +10 -0
- package/lib/event-bus/event-decorator.d.ts.map +1 -0
- package/lib/event-bus/event-decorator.js +34 -0
- package/lib/event-bus/event-decorator.js.map +1 -0
- package/lib/event-bus/index.d.ts +5 -0
- package/lib/event-bus/index.d.ts.map +1 -0
- package/lib/event-bus/index.js +8 -0
- package/lib/event-bus/index.js.map +1 -0
- package/lib/event.d.ts +270 -0
- package/lib/event.d.ts.map +1 -0
- package/lib/event.js +810 -0
- package/lib/event.js.map +1 -0
- package/lib/filters.d.ts +51 -0
- package/lib/filters.d.ts.map +1 -0
- package/lib/filters.js +688 -0
- package/lib/filters.js.map +1 -0
- package/lib/functional.d.ts +4 -0
- package/lib/functional.d.ts.map +1 -0
- package/lib/functional.js +45 -0
- package/lib/functional.js.map +1 -0
- package/lib/hash-calculate/WASMInterface.d.ts +61 -0
- package/lib/hash-calculate/WASMInterface.d.ts.map +1 -0
- package/lib/hash-calculate/WASMInterface.js +180 -0
- package/lib/hash-calculate/WASMInterface.js.map +1 -0
- package/lib/hash-calculate/hash-calculate.d.ts +13 -0
- package/lib/hash-calculate/hash-calculate.d.ts.map +1 -0
- package/lib/hash-calculate/hash-calculate.js +41 -0
- package/lib/hash-calculate/hash-calculate.js.map +1 -0
- package/lib/hash-calculate/lockedCreate.d.ts +4 -0
- package/lib/hash-calculate/lockedCreate.d.ts.map +1 -0
- package/lib/hash-calculate/lockedCreate.js +17 -0
- package/lib/hash-calculate/lockedCreate.js.map +1 -0
- package/lib/hash-calculate/md5.wasm.json +1 -0
- package/lib/hash-calculate/mutex.d.ts +6 -0
- package/lib/hash-calculate/mutex.d.ts.map +1 -0
- package/lib/hash-calculate/mutex.js +32 -0
- package/lib/hash-calculate/mutex.js.map +1 -0
- package/lib/hash-calculate/util.d.ts +12 -0
- package/lib/hash-calculate/util.d.ts.map +1 -0
- package/lib/hash-calculate/util.js +166 -0
- package/lib/hash-calculate/util.js.map +1 -0
- package/lib/id-generator.d.ts +8 -0
- package/lib/id-generator.d.ts.map +1 -0
- package/lib/id-generator.js +15 -0
- package/lib/id-generator.js.map +1 -0
- package/lib/index.d.ts +47 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +50 -0
- package/lib/index.js.map +1 -0
- package/lib/iterator.d.ts +14 -0
- package/lib/iterator.d.ts.map +1 -0
- package/lib/iterator.js +9 -0
- package/lib/iterator.js.map +1 -0
- package/lib/json-schema.d.ts +65 -0
- package/lib/json-schema.d.ts.map +1 -0
- package/lib/json-schema.js +3 -0
- package/lib/json-schema.js.map +1 -0
- package/lib/keyboard/index.d.ts +3 -0
- package/lib/keyboard/index.d.ts.map +1 -0
- package/lib/keyboard/index.js +6 -0
- package/lib/keyboard/index.js.map +1 -0
- package/lib/keyboard/keyboard-layout-provider.d.ts +38 -0
- package/lib/keyboard/keyboard-layout-provider.d.ts.map +1 -0
- package/lib/keyboard/keyboard-layout-provider.js +23 -0
- package/lib/keyboard/keyboard-layout-provider.js.map +1 -0
- package/lib/keyboard/keymap.d.ts +71 -0
- package/lib/keyboard/keymap.d.ts.map +1 -0
- package/lib/keyboard/keymap.js +128 -0
- package/lib/keyboard/keymap.js.map +1 -0
- package/lib/lifecycle.d.ts +17 -0
- package/lib/lifecycle.d.ts.map +1 -0
- package/lib/lifecycle.js +37 -0
- package/lib/lifecycle.js.map +1 -0
- package/lib/line-text.d.ts +17 -0
- package/lib/line-text.d.ts.map +1 -0
- package/lib/line-text.js +72 -0
- package/lib/line-text.js.map +1 -0
- package/lib/linked-list.d.ts +18 -0
- package/lib/linked-list.d.ts.map +1 -0
- package/lib/linked-list.js +138 -0
- package/lib/linked-list.js.map +1 -0
- package/lib/linkedText.d.ts +13 -0
- package/lib/linkedText.d.ts.map +1 -0
- package/lib/linkedText.js +50 -0
- package/lib/linkedText.js.map +1 -0
- package/lib/localize.d.ts +52 -0
- package/lib/localize.d.ts.map +1 -0
- package/lib/localize.js +128 -0
- package/lib/localize.js.map +1 -0
- package/lib/log.d.ts +181 -0
- package/lib/log.d.ts.map +1 -0
- package/lib/log.js +163 -0
- package/lib/log.js.map +1 -0
- package/lib/map.d.ts +124 -0
- package/lib/map.d.ts.map +1 -0
- package/lib/map.js +819 -0
- package/lib/map.js.map +1 -0
- package/lib/menu.d.ts +27 -0
- package/lib/menu.d.ts.map +1 -0
- package/lib/menu.js +5 -0
- package/lib/menu.js.map +1 -0
- package/lib/mocks/electron/browserMock.d.ts +2 -0
- package/lib/mocks/electron/browserMock.d.ts.map +1 -0
- package/lib/mocks/electron/browserMock.js +15 -0
- package/lib/mocks/electron/browserMock.js.map +1 -0
- package/lib/mocks/electron/ipcRenderer.d.ts +13 -0
- package/lib/mocks/electron/ipcRenderer.d.ts.map +1 -0
- package/lib/mocks/electron/ipcRenderer.js +32 -0
- package/lib/mocks/electron/ipcRenderer.js.map +1 -0
- package/lib/module.d.ts +23 -0
- package/lib/module.d.ts.map +1 -0
- package/lib/module.js +22 -0
- package/lib/module.js.map +1 -0
- package/lib/network.d.ts +33 -0
- package/lib/network.d.ts.map +1 -0
- package/lib/network.js +37 -0
- package/lib/network.js.map +1 -0
- package/lib/node/port.d.ts +14 -0
- package/lib/node/port.d.ts.map +1 -0
- package/lib/node/port.js +124 -0
- package/lib/node/port.js.map +1 -0
- package/lib/path.d.ts +92 -0
- package/lib/path.d.ts.map +1 -0
- package/lib/path.js +1711 -0
- package/lib/path.js.map +1 -0
- package/lib/platform.d.ts +48 -0
- package/lib/platform.d.ts.map +1 -0
- package/lib/platform.js +143 -0
- package/lib/platform.js.map +1 -0
- package/lib/preferences/index.d.ts +3 -0
- package/lib/preferences/index.d.ts.map +1 -0
- package/lib/preferences/index.js +6 -0
- package/lib/preferences/index.js.map +1 -0
- package/lib/preferences/preference-schema.d.ts +76 -0
- package/lib/preferences/preference-schema.d.ts.map +1 -0
- package/lib/preferences/preference-schema.js +59 -0
- package/lib/preferences/preference-schema.js.map +1 -0
- package/lib/preferences/preference-scope.d.ts +15 -0
- package/lib/preferences/preference-scope.d.ts.map +1 -0
- package/lib/preferences/preference-scope.js +54 -0
- package/lib/preferences/preference-scope.js.map +1 -0
- package/lib/problem-matcher.d.ts +111 -0
- package/lib/problem-matcher.d.ts.map +1 -0
- package/lib/problem-matcher.js +294 -0
- package/lib/problem-matcher.js.map +1 -0
- package/lib/problem-pattern.d.ts +193 -0
- package/lib/problem-pattern.d.ts.map +1 -0
- package/lib/problem-pattern.js +416 -0
- package/lib/problem-pattern.js.map +1 -0
- package/lib/process.d.ts +5 -0
- package/lib/process.d.ts.map +1 -0
- package/lib/process.js +15 -0
- package/lib/process.js.map +1 -0
- package/lib/progress.d.ts +56 -0
- package/lib/progress.d.ts.map +1 -0
- package/lib/progress.js +25 -0
- package/lib/progress.js.map +1 -0
- package/lib/range.d.ts +7 -0
- package/lib/range.d.ts.map +1 -0
- package/lib/range.js +28 -0
- package/lib/range.js.map +1 -0
- package/lib/reference.d.ts +35 -0
- package/lib/reference.d.ts.map +1 -0
- package/lib/reference.js +122 -0
- package/lib/reference.js.map +1 -0
- package/lib/reporter.d.ts +16 -0
- package/lib/reporter.d.ts.map +1 -0
- package/lib/reporter.js +66 -0
- package/lib/reporter.js.map +1 -0
- package/lib/sequence.d.ts +20 -0
- package/lib/sequence.d.ts.map +1 -0
- package/lib/sequence.js +17 -0
- package/lib/sequence.js.map +1 -0
- package/lib/storage.d.ts +64 -0
- package/lib/storage.d.ts.map +1 -0
- package/lib/storage.js +70 -0
- package/lib/storage.js.map +1 -0
- package/lib/task-definition.d.ts +45 -0
- package/lib/task-definition.d.ts.map +1 -0
- package/lib/task-definition.js +130 -0
- package/lib/task-definition.js.map +1 -0
- package/lib/theme.d.ts +5 -0
- package/lib/theme.d.ts.map +1 -0
- package/lib/theme.js +8 -0
- package/lib/theme.js.map +1 -0
- package/lib/types/accessibility.d.ts +5 -0
- package/lib/types/accessibility.d.ts.map +1 -0
- package/lib/types/accessibility.js +3 -0
- package/lib/types/accessibility.js.map +1 -0
- package/lib/types/application.d.ts +13 -0
- package/lib/types/application.d.ts.map +1 -0
- package/lib/types/application.js +5 -0
- package/lib/types/application.js.map +1 -0
- package/lib/types/authentication.d.ts +90 -0
- package/lib/types/authentication.d.ts.map +1 -0
- package/lib/types/authentication.js +8 -0
- package/lib/types/authentication.js.map +1 -0
- package/lib/types/common.d.ts +10 -0
- package/lib/types/common.d.ts.map +1 -0
- package/lib/types/common.js +6 -0
- package/lib/types/common.js.map +1 -0
- package/lib/types/dnd.d.ts +8 -0
- package/lib/types/dnd.d.ts.map +1 -0
- package/lib/types/dnd.js +9 -0
- package/lib/types/dnd.js.map +1 -0
- package/lib/types/editor.d.ts +157 -0
- package/lib/types/editor.d.ts.map +1 -0
- package/lib/types/editor.js +148 -0
- package/lib/types/editor.js.map +1 -0
- package/lib/types/extension.d.ts +73 -0
- package/lib/types/extension.d.ts.map +1 -0
- package/lib/types/extension.js +28 -0
- package/lib/types/extension.js.map +1 -0
- package/lib/types/file-watch.d.ts +70 -0
- package/lib/types/file-watch.d.ts.map +1 -0
- package/lib/types/file-watch.js +72 -0
- package/lib/types/file-watch.js.map +1 -0
- package/lib/types/file.d.ts +219 -0
- package/lib/types/file.d.ts.map +1 -0
- package/lib/types/file.js +51 -0
- package/lib/types/file.js.map +1 -0
- package/lib/types/index.d.ts +13 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +16 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/markers/index.d.ts +3 -0
- package/lib/types/markers/index.d.ts.map +1 -0
- package/lib/types/markers/index.js +6 -0
- package/lib/types/markers/index.js.map +1 -0
- package/lib/types/markers/markers-manager.d.ts +120 -0
- package/lib/types/markers/markers-manager.d.ts.map +1 -0
- package/lib/types/markers/markers-manager.js +307 -0
- package/lib/types/markers/markers-manager.js.map +1 -0
- package/lib/types/markers/markers.d.ts +76 -0
- package/lib/types/markers/markers.d.ts.map +1 -0
- package/lib/types/markers/markers.js +76 -0
- package/lib/types/markers/markers.js.map +1 -0
- package/lib/types/message.d.ts +7 -0
- package/lib/types/message.d.ts.map +1 -0
- package/lib/types/message.js +11 -0
- package/lib/types/message.js.map +1 -0
- package/lib/types/reporter.d.ts +83 -0
- package/lib/types/reporter.d.ts.map +1 -0
- package/lib/types/reporter.js +63 -0
- package/lib/types/reporter.js.map +1 -0
- package/lib/types/string.d.ts +4 -0
- package/lib/types/string.d.ts.map +1 -0
- package/lib/types/string.js +3 -0
- package/lib/types/string.js.map +1 -0
- package/lib/uint.d.ts +32 -0
- package/lib/uint.d.ts.map +1 -0
- package/lib/uint.js +28 -0
- package/lib/uint.js.map +1 -0
- package/lib/uri.d.ts +94 -0
- package/lib/uri.d.ts.map +1 -0
- package/lib/uri.js +226 -0
- package/lib/uri.js.map +1 -0
- package/lib/utils/ansi.d.ts +5 -0
- package/lib/utils/ansi.d.ts.map +1 -0
- package/lib/utils/ansi.js +16 -0
- package/lib/utils/ansi.js.map +1 -0
- package/lib/utils/arrays.d.ts +62 -0
- package/lib/utils/arrays.d.ts.map +1 -0
- package/lib/utils/arrays.js +254 -0
- package/lib/utils/arrays.js.map +1 -0
- package/lib/utils/buffer.d.ts +36 -0
- package/lib/utils/buffer.d.ts.map +1 -0
- package/lib/utils/buffer.js +178 -0
- package/lib/utils/buffer.js.map +1 -0
- package/lib/utils/comparers.d.ts +7 -0
- package/lib/utils/comparers.d.ts.map +1 -0
- package/lib/utils/comparers.js +135 -0
- package/lib/utils/comparers.js.map +1 -0
- package/lib/utils/decorators.d.ts +13 -0
- package/lib/utils/decorators.d.ts.map +1 -0
- package/lib/utils/decorators.js +150 -0
- package/lib/utils/decorators.js.map +1 -0
- package/lib/utils/file-uri.d.ts +30 -0
- package/lib/utils/file-uri.d.ts.map +1 -0
- package/lib/utils/file-uri.js +62 -0
- package/lib/utils/file-uri.js.map +1 -0
- package/lib/utils/glob.d.ts +46 -0
- package/lib/utils/glob.d.ts.map +1 -0
- package/lib/utils/glob.js +546 -0
- package/lib/utils/glob.js.map +1 -0
- package/lib/utils/index.d.ts +14 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +17 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/ipc.d.ts +2 -0
- package/lib/utils/ipc.d.ts.map +1 -0
- package/lib/utils/ipc.js +21 -0
- package/lib/utils/ipc.js.map +1 -0
- package/lib/utils/json.d.ts +78 -0
- package/lib/utils/json.d.ts.map +1 -0
- package/lib/utils/json.js +190 -0
- package/lib/utils/json.js.map +1 -0
- package/lib/utils/marshalling.d.ts +7 -0
- package/lib/utils/marshalling.d.ts.map +1 -0
- package/lib/utils/marshalling.js +57 -0
- package/lib/utils/marshalling.js.map +1 -0
- package/lib/utils/objects.d.ts +6 -0
- package/lib/utils/objects.d.ts.map +1 -0
- package/lib/utils/objects.js +103 -0
- package/lib/utils/objects.js.map +1 -0
- package/lib/utils/os.d.ts +42 -0
- package/lib/utils/os.d.ts.map +1 -0
- package/lib/utils/os.js +94 -0
- package/lib/utils/os.js.map +1 -0
- package/lib/utils/paths.d.ts +35 -0
- package/lib/utils/paths.d.ts.map +1 -0
- package/lib/utils/paths.js +318 -0
- package/lib/utils/paths.js.map +1 -0
- package/lib/utils/promise-util.d.ts +10 -0
- package/lib/utils/promise-util.d.ts.map +1 -0
- package/lib/utils/promise-util.js +17 -0
- package/lib/utils/promise-util.js.map +1 -0
- package/lib/utils/strings.d.ts +177 -0
- package/lib/utils/strings.d.ts.map +1 -0
- package/lib/utils/strings.js +837 -0
- package/lib/utils/strings.js.map +1 -0
- package/lib/utils/types.d.ts +65 -0
- package/lib/utils/types.d.ts.map +1 -0
- package/lib/utils/types.js +194 -0
- package/lib/utils/types.js.map +1 -0
- package/lib/uuid.d.ts +2 -0
- package/lib/uuid.d.ts.map +1 -0
- package/lib/uuid.js +10 -0
- package/lib/uuid.js.map +1 -0
- package/package.json +30 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/utils/decorators.ts"],"names":[],"mappings":"AAMA,wBAAgB,eAAe,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,KAAK,QAAQ,GAAG,QAAQ,CAmBxF;AAGD,wBAAgB,cAAc;aAIW,GAAG,OAAO,MAAM,cAAc,GAAG;;EAiDzE;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,QAEhE;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAClC,CAAC,aAAa,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;CACtC;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAC,EAAE,MAAM,CAAC,GAAG,QAAQ,CAuBlH;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAC,EAAE,MAAM,CAAC,GAAG,QAAQ,CAuClH;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,CAS/C"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
// Some code copued and modified from https://github.com/microsoft/vscode/blob/1.44.0/src/vs/base/common/decorators.ts
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.es5ClassCompat = exports.throttle = exports.debounce = exports.memoize = exports.createMemoizer = exports.createDecorator = void 0;
|
|
9
|
+
function createDecorator(mapFn) {
|
|
10
|
+
return (target, key, descriptor) => {
|
|
11
|
+
let fnKey = null;
|
|
12
|
+
let fn = null;
|
|
13
|
+
if (typeof descriptor.value === 'function') {
|
|
14
|
+
fnKey = 'value';
|
|
15
|
+
fn = descriptor.value;
|
|
16
|
+
}
|
|
17
|
+
else if (typeof descriptor.get === 'function') {
|
|
18
|
+
fnKey = 'get';
|
|
19
|
+
fn = descriptor.get;
|
|
20
|
+
}
|
|
21
|
+
if (!fn) {
|
|
22
|
+
throw new Error('not supported');
|
|
23
|
+
}
|
|
24
|
+
descriptor[fnKey] = mapFn(fn, key);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.createDecorator = createDecorator;
|
|
28
|
+
let memoizeId = 0;
|
|
29
|
+
function createMemoizer() {
|
|
30
|
+
const memoizeKeyPrefix = `$memoize${memoizeId++}`;
|
|
31
|
+
let self = undefined;
|
|
32
|
+
const result = function memoize(target, key, descriptor) {
|
|
33
|
+
let fnKey = null;
|
|
34
|
+
let fn = null;
|
|
35
|
+
if (typeof descriptor.value === 'function') {
|
|
36
|
+
fnKey = 'value';
|
|
37
|
+
fn = descriptor.value;
|
|
38
|
+
if (fn.length !== 0) {
|
|
39
|
+
console.warn('Memoize should only be used in functions with zero parameters');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else if (typeof descriptor.get === 'function') {
|
|
43
|
+
fnKey = 'get';
|
|
44
|
+
fn = descriptor.get;
|
|
45
|
+
}
|
|
46
|
+
if (!fn) {
|
|
47
|
+
throw new Error('not supported');
|
|
48
|
+
}
|
|
49
|
+
const memoizeKey = `${memoizeKeyPrefix}:${key}`;
|
|
50
|
+
descriptor[fnKey] = function (...args) {
|
|
51
|
+
self = this;
|
|
52
|
+
if (!this.hasOwnProperty(memoizeKey)) {
|
|
53
|
+
Object.defineProperty(this, memoizeKey, {
|
|
54
|
+
configurable: true,
|
|
55
|
+
enumerable: false,
|
|
56
|
+
writable: true,
|
|
57
|
+
value: fn.apply(this, args)
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return this[memoizeKey];
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
result.clear = () => {
|
|
64
|
+
if (typeof self === 'undefined') {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
Object.getOwnPropertyNames(self).forEach(property => {
|
|
68
|
+
if (property.indexOf(memoizeKeyPrefix) === 0) {
|
|
69
|
+
delete self[property];
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
exports.createMemoizer = createMemoizer;
|
|
76
|
+
function memoize(target, key, descriptor) {
|
|
77
|
+
return createMemoizer()(target, key, descriptor);
|
|
78
|
+
}
|
|
79
|
+
exports.memoize = memoize;
|
|
80
|
+
function debounce(delay, reducer, initialValueProvider) {
|
|
81
|
+
return createDecorator((fn, key) => {
|
|
82
|
+
const timerKey = `$debounce$${key}`;
|
|
83
|
+
const resultKey = `$debounce$result$${key}`;
|
|
84
|
+
return function (...args) {
|
|
85
|
+
if (!this[resultKey]) {
|
|
86
|
+
this[resultKey] = initialValueProvider ? initialValueProvider() : undefined;
|
|
87
|
+
}
|
|
88
|
+
clearTimeout(this[timerKey]);
|
|
89
|
+
if (reducer) {
|
|
90
|
+
this[resultKey] = reducer(this[resultKey], ...args);
|
|
91
|
+
args = [this[resultKey]];
|
|
92
|
+
}
|
|
93
|
+
this[timerKey] = setTimeout(() => {
|
|
94
|
+
fn.apply(this, args);
|
|
95
|
+
this[resultKey] = initialValueProvider ? initialValueProvider() : undefined;
|
|
96
|
+
}, delay);
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
exports.debounce = debounce;
|
|
101
|
+
function throttle(delay, reducer, initialValueProvider) {
|
|
102
|
+
return createDecorator((fn, key) => {
|
|
103
|
+
const timerKey = `$throttle$timer$${key}`;
|
|
104
|
+
const resultKey = `$throttle$result$${key}`;
|
|
105
|
+
const lastRunKey = `$throttle$lastRun$${key}`;
|
|
106
|
+
const pendingKey = `$throttle$pending$${key}`;
|
|
107
|
+
return function (...args) {
|
|
108
|
+
if (!this[resultKey]) {
|
|
109
|
+
this[resultKey] = initialValueProvider ? initialValueProvider() : undefined;
|
|
110
|
+
}
|
|
111
|
+
if (this[lastRunKey] === null || this[lastRunKey] === undefined) {
|
|
112
|
+
this[lastRunKey] = -Number.MAX_VALUE;
|
|
113
|
+
}
|
|
114
|
+
if (reducer) {
|
|
115
|
+
this[resultKey] = reducer(this[resultKey], ...args);
|
|
116
|
+
}
|
|
117
|
+
if (this[pendingKey]) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const nextTime = this[lastRunKey] + delay;
|
|
121
|
+
if (nextTime <= Date.now()) {
|
|
122
|
+
this[lastRunKey] = Date.now();
|
|
123
|
+
fn.apply(this, [this[resultKey]]);
|
|
124
|
+
this[resultKey] = initialValueProvider ? initialValueProvider() : undefined;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
this[pendingKey] = true;
|
|
128
|
+
this[timerKey] = setTimeout(() => {
|
|
129
|
+
this[pendingKey] = false;
|
|
130
|
+
this[lastRunKey] = Date.now();
|
|
131
|
+
fn.apply(this, [this[resultKey]]);
|
|
132
|
+
this[resultKey] = initialValueProvider ? initialValueProvider() : undefined;
|
|
133
|
+
}, nextTime - Date.now());
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
exports.throttle = throttle;
|
|
139
|
+
function es5ClassCompat(target) {
|
|
140
|
+
/// @ts-ignore
|
|
141
|
+
function _() { return Reflect.construct(target, arguments, this.constructor); }
|
|
142
|
+
Object.defineProperty(_, 'name', Object.getOwnPropertyDescriptor(target, 'name'));
|
|
143
|
+
/// @ts-ignore
|
|
144
|
+
Object.setPrototypeOf(_, target);
|
|
145
|
+
/// @ts-ignore
|
|
146
|
+
Object.setPrototypeOf(_.prototype, target.prototype);
|
|
147
|
+
return _;
|
|
148
|
+
}
|
|
149
|
+
exports.es5ClassCompat = es5ClassCompat;
|
|
150
|
+
//# sourceMappingURL=decorators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/utils/decorators.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;AAChG,sHAAsH;;;AAEtH,SAAgB,eAAe,CAAC,KAA8C;IAC7E,OAAO,CAAC,MAAW,EAAE,GAAW,EAAE,UAAe,EAAE,EAAE;QACpD,IAAI,KAAK,GAAkB,IAAI,CAAC;QAChC,IAAI,EAAE,GAAoB,IAAI,CAAC;QAE/B,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,UAAU,EAAE;YAC3C,KAAK,GAAG,OAAO,CAAC;YAChB,EAAE,GAAG,UAAU,CAAC,KAAK,CAAC;SACtB;aAAM,IAAI,OAAO,UAAU,CAAC,GAAG,KAAK,UAAU,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ACJ,CAAC;AAvCD,4BAuCC;AAED,SAAgB,cAAc,CAAC,MAAW;IACzC,cAAc;IACd,SAAS,CAAC,KAAK,OAAO,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAC/E,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAE,CAAC,CAAC;IACnF,cAAc;IACd,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACjC,cAAc;IACd,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IACrD,OAAO,CAAC,CAAC;AACV,CAAC;AATD,wCASC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (C) 2017 TypeFox and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
import { URI } from '../uri';
|
|
17
|
+
export declare namespace FileUri {
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new file URI from the filesystem path argument.
|
|
20
|
+
* @param fsPath the filesystem path.
|
|
21
|
+
*/
|
|
22
|
+
function create(_fsPath: string): URI;
|
|
23
|
+
/**
|
|
24
|
+
* Returns with the platform specific FS path that is represented by the URI argument.
|
|
25
|
+
*
|
|
26
|
+
* @param uri the file URI that has to be resolved to a platform specific FS path.
|
|
27
|
+
*/
|
|
28
|
+
function fsPath(uri: URI | string): string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=file-uri.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-uri.d.ts","sourceRoot":"","sources":["../../src/utils/file-uri.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EAAE,GAAG,EAAO,MAAM,QAAQ,CAAC;AAGlC,yBAAiB,OAAO,CAAC;IAIvB;;;OAGG;IACH,SAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,OAErC;IAED;;;;OAIG;IACH,SAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,MAAM,CAqBhD;CAEF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (C) 2017 TypeFox and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.FileUri = void 0;
|
|
19
|
+
const uri_1 = require("../uri");
|
|
20
|
+
const os_1 = require("./os");
|
|
21
|
+
var FileUri;
|
|
22
|
+
(function (FileUri) {
|
|
23
|
+
const windowsDriveRegex = /^([^:/?#]+?):$/;
|
|
24
|
+
/**
|
|
25
|
+
* Creates a new file URI from the filesystem path argument.
|
|
26
|
+
* @param fsPath the filesystem path.
|
|
27
|
+
*/
|
|
28
|
+
function create(_fsPath) {
|
|
29
|
+
return new uri_1.URI(uri_1.Uri.file(_fsPath));
|
|
30
|
+
}
|
|
31
|
+
FileUri.create = create;
|
|
32
|
+
/**
|
|
33
|
+
* Returns with the platform specific FS path that is represented by the URI argument.
|
|
34
|
+
*
|
|
35
|
+
* @param uri the file URI that has to be resolved to a platform specific FS path.
|
|
36
|
+
*/
|
|
37
|
+
function fsPath(uri) {
|
|
38
|
+
if (typeof uri === 'string') {
|
|
39
|
+
return fsPath(new uri_1.URI(uri));
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
/*
|
|
43
|
+
* A uri for the root of a Windows drive, eg file:\\\c%3A, is converted to c:
|
|
44
|
+
* by the Uri class. However file:\\\c%3A is unambiguously a uri to the root of
|
|
45
|
+
* the drive and c: is interpreted as the default directory for the c drive
|
|
46
|
+
* (by, for example, the readdir function in the fs-extra module).
|
|
47
|
+
* A backslash must be appended to the drive, eg c:\, to ensure the correct path.
|
|
48
|
+
*/
|
|
49
|
+
// tslint:disable-next-line:no-any
|
|
50
|
+
const fsPathFromVsCodeUri = uri.codeUri.fsPath;
|
|
51
|
+
if (os_1.isWindows) {
|
|
52
|
+
const isWindowsDriveRoot = windowsDriveRegex.exec(fsPathFromVsCodeUri);
|
|
53
|
+
if (isWindowsDriveRoot) {
|
|
54
|
+
return fsPathFromVsCodeUri + '\\';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return fsPathFromVsCodeUri;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
FileUri.fsPath = fsPath;
|
|
61
|
+
})(FileUri = exports.FileUri || (exports.FileUri = {}));
|
|
62
|
+
//# sourceMappingURL=file-uri.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-uri.js","sourceRoot":"","sources":["../../src/utils/file-uri.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,gCAAkC;AAClC,6BAAiC;AAEjC,IAAiB,OAAO,CAwCvB;AAxCD,WAAiB,OAAO;IAEtB,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;IAE3C;;;OAGG;IACH,SAAgB,MAAM,CAAC,OAAe;QACpC,OAAO,IAAI,SAAG,CAAC,SAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IACpC,CAAC;IAFe,cAAM,SAErB,CAAA;IAED;;;;OAIG;IACH,SAAgB,MAAM,CAAC,GAAiB;QACtC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC3B,OAAO,MAAM,CAAC,IAAI,SAAG,CAAC,GAAG,CAAC,CAAC,CAAC;SAC7B;aAAM;YACL;;;;;;eAMG;YACH,kCAAkC;YAClC,MAAM,mBAAmB,GAAI,GAAW,CAAC,OAAO,CAAC,MAAM,CAAC;YACxD,IAAI,cAAS,EAAE;gBACb,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;gBACvE,IAAI,kBAAkB,EAAE;oBACtB,OAAO,mBAAmB,GAAG,IAAI,CAAC;iBACnC;aACF;YACD,OAAO,mBAAmB,CAAC;SAC5B;IACH,CAAC;IArBe,cAAM,SAqBrB,CAAA;AAEH,CAAC,EAxCgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAwCvB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface IExpression {
|
|
2
|
+
[pattern: string]: boolean | SiblingClause;
|
|
3
|
+
}
|
|
4
|
+
export interface IRelativePattern {
|
|
5
|
+
base: string;
|
|
6
|
+
pattern: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function getEmptyExpression(): IExpression;
|
|
9
|
+
export interface SiblingClause {
|
|
10
|
+
when: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function splitGlobAware(pattern: string, splitChar: string): string[];
|
|
13
|
+
export declare type ParsedPattern = (path: string, basename?: string) => boolean;
|
|
14
|
+
export declare type ParsedExpression = (path: string, basename?: string, hasSibling?: (name: string) => boolean | Promise<boolean>) => string | null | Promise<string | null>;
|
|
15
|
+
export interface IGlobOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Simplify patterns for use as exclusion filters during tree traversal to skip entire subtrees. Cannot be used outside of a tree traversal.
|
|
18
|
+
*/
|
|
19
|
+
trimForExclusions?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Simplified glob matching. Supports a subset of glob patterns:
|
|
23
|
+
* - * matches anything inside a path segment
|
|
24
|
+
* - ? matches 1 character inside a path segment
|
|
25
|
+
* - ** matches anything including an empty path segment
|
|
26
|
+
* - simple brace expansion ({js,ts} => js or ts)
|
|
27
|
+
* - character ranges (using [...])
|
|
28
|
+
*/
|
|
29
|
+
export declare function match(pattern: string | IRelativePattern, path: string): boolean;
|
|
30
|
+
export declare function match(expression: IExpression, path: string, hasSibling?: (name: string) => boolean): string;
|
|
31
|
+
/**
|
|
32
|
+
* Simplified glob matching. Supports a subset of glob patterns:
|
|
33
|
+
* - * matches anything inside a path segment
|
|
34
|
+
* - ? matches 1 character inside a path segment
|
|
35
|
+
* - ** matches anything including an empty path segment
|
|
36
|
+
* - simple brace expansion ({js,ts} => js or ts)
|
|
37
|
+
* - character ranges (using [...])
|
|
38
|
+
*/
|
|
39
|
+
export declare function parse(pattern: string | IRelativePattern, options?: IGlobOptions): ParsedPattern;
|
|
40
|
+
export declare function parse(expression: IExpression, options?: IGlobOptions): ParsedExpression;
|
|
41
|
+
export declare function hasSiblingPromiseFn(siblingsFn?: () => Promise<string[]>): ((name: string) => Promise<boolean>) | undefined;
|
|
42
|
+
export declare function hasSiblingFn(siblingsFn?: () => string[]): ((name: string) => boolean) | undefined;
|
|
43
|
+
export declare function isRelativePattern(obj: unknown): obj is IRelativePattern;
|
|
44
|
+
export declare function getBasenameTerms(patternOrExpression: ParsedPattern | ParsedExpression): string[];
|
|
45
|
+
export declare function getPathTerms(patternOrExpression: ParsedPattern | ParsedExpression): string[];
|
|
46
|
+
//# sourceMappingURL=glob.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/utils/glob.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,WAAW;IAC1B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC;CAC5C;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,IAAI,WAAW,CAEhD;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd;AAsBD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CA4C3E;AAkJD,oBAAY,aAAa,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;AAGzE,oBAAY,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAA4B;AAEjM,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACF,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AA0KD;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,EA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